public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/54441] New: Infinite loop with brace initializer on zero-length array
@ 2012-08-31 19:22 strikosn at gmail dot com
  2012-09-03 10:41 ` [Bug c++/54441] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: strikosn at gmail dot com @ 2012-08-31 19:22 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54441

             Bug #: 54441
           Summary: Infinite loop with brace initializer on zero-length
                    array
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: strikosn@gmail.com


Consider this:

struct s { char c[]; };

int main()
{
    struct s s = { .c = 0 };
    return 0;
}

Compiling with 'g++ -Wall h.c' gives infinite warnings:

h.c: In function 'int main()':
h.c:5:24: warning: missing braces around initializer for 'char [0]'
[-Wmissing-braces]
h.c:5:24: warning: missing braces around initializer for 'char [0]'
[-Wmissing-braces]
h.c:5:24: warning: missing braces around initializer for 'char [0]'
[-Wmissing-braces]
h.c:5:24: warning: missing braces around initializer for 'char [0]'
[-Wmissing-braces]
...

Version: GNU C++ (GCC) version 4.7.0
Target: x86_64-unknown-linux-gnu


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-09-05 15:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 19:22 [Bug c++/54441] New: Infinite loop with brace initializer on zero-length array strikosn at gmail dot com
2012-09-03 10:41 ` [Bug c++/54441] [4.7/4.8 Regression] " rguenth at gcc dot gnu.org
2012-09-05  4:17 ` jason at gcc dot gnu.org
2012-09-05  4:20 ` jason at gcc dot gnu.org
2012-09-05 15:15 ` paolo.carlini at oracle dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).