Skip to content

[array_ref hack] llvm-gcc error on static initializer #3323

@sunfishcode

Description

@sunfishcode
Bugzilla Link 2951
Resolution WONTFIX
Resolved on Apr 09, 2011 07:05
Version trunk
OS Linux
CC @asl

Extended Description

GCC 4.2 (and other versions) accept this C testcase without error:

void p = ((void)&((char*)0)[0]);

llvm-gcc-4.2 rejects it with this message:

t.c:1: error: initializer element is not constant

This is reproducible on both trunk and the 2.4 prerelease.

This prevents llvm-gcc from compiling SQLite version 3.6.4,
which is the current version at this time. The specific
error message is:

sqlite3.c:12108: error: initializer element is not constant

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillacompile-failUse [accepts-invalid] and [rejects-valid] insteadllvm-toolsAll llvm tools that do not have corresponding tagwontfixIssue is real, but we can't or won't fix it. Not invalid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions