>Category: c >Synopsis: -std=gnu99 and casted empty srtuct initializers >Confidential: no >Severity: serious >Priority: medium >Class: rejects-legal >Submitter-Id: net >Originator: Marcus Brinkmann >Release: gcc (GCC) 3.2 (20020809) Debian prerelease >Environment: i386-gnu >Description: This bug only occurs with -std=gnu99.
Initializing an empty struct with an empty struct does not work if the empty struct is explicitely casted to the struct type. GCC bails out with "initializer element not constant" >How-To-Repeat: Compile the following code with "gcc -std=gnu99": typedef struct { } foo_t; /* This one works. */ foo_t bar = { }; /* This one fails with "initializer element is not constant. */ foo_t baz = (foo_t) { }; int main () { return 0; } >Fix: >Unformatted: _______________________________________________ Bug-hurd mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-hurd