public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/53196] New: unknown struct name in C99 compound initializer doesn't generate error
@ 2012-05-02 17:55 lzie59p1 at frolickingcow dot net
  2012-05-02 19:13 ` [Bug c/53196] " manu at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: lzie59p1 at frolickingcow dot net @ 2012-05-02 17:55 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 53196
           Summary: unknown struct name in C99 compound initializer
                    doesn't generate error
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: lzie59p1@frolickingcow.net


I think this code shouldn't compile (see foo_typo). It compiles on 4.5.3 and
4.7.0.

#include <stdio.h>

struct foo {
    int i;
};

int
main(void)
{
    struct foo f = (struct foo_typo) { };
    printf("%d\n", f.i);
    return 0;
}


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

end of thread, other threads:[~2013-02-19 20:37 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-02 17:55 [Bug c/53196] New: unknown struct name in C99 compound initializer doesn't generate error lzie59p1 at frolickingcow dot net
2012-05-02 19:13 ` [Bug c/53196] " manu at gcc dot gnu.org
2012-05-02 19:32 ` redi at gcc dot gnu.org
2012-05-02 19:52 ` manu at gcc dot gnu.org
2012-05-02 20:00 ` joseph at codesourcery dot com
2012-05-02 20:11 ` manu at gcc dot gnu.org
2012-05-02 21:17 ` redi at gcc dot gnu.org
2012-05-02 21:22 ` redi at gcc dot gnu.org
2012-06-12 21:16 ` jakub at gcc dot gnu.org
2013-02-19 20:37 ` LpSolit at netscape dot net

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).