public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/17189] New: bogus warning for  struct Foo { int; };
@ 2004-08-25 18:30 terra at gnome dot org
  2004-08-25 18:40 ` [Bug c/17189] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: terra at gnome dot org @ 2004-08-25 18:30 UTC (permalink / raw)
  To: gcc-bugs

The first given warning here is bogus.  It true, but does not apply to the 
program being compiled.

struct Foo { int; };

> gcc-3.4 -std=c99 -pedantic -Wall ~/foo.c
/home/welinder/foo.c:1: warning: ISO C doesn't support unnamed structs/unions
/home/welinder/foo.c:1: warning: declaration does not declare anything
/home/welinder/foo.c:1: warning: struct has no members

-- 
           Summary: bogus warning for  struct Foo { int; };
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: terra at gnome dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: sparc-sun-solaris2.8
  GCC host triplet: sparc-sun-solaris2.8
GCC target triplet: sparc-sun-solaris2.8


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


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

* [Bug c/17189] bogus warning for  struct Foo { int; };
  2004-08-25 18:30 [Bug c/17189] New: bogus warning for struct Foo { int; }; terra at gnome dot org
@ 2004-08-25 18:40 ` pinskia at gcc dot gnu dot org
  2004-10-10  0:47 ` cvs-commit at gcc dot gnu dot org
  2004-10-10  0:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-08-25 18:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-08-25 18:40 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2004-08-25 18:40:39
               date|                            |


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


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

* [Bug c/17189] bogus warning for  struct Foo { int; };
  2004-08-25 18:30 [Bug c/17189] New: bogus warning for struct Foo { int; }; terra at gnome dot org
  2004-08-25 18:40 ` [Bug c/17189] " pinskia at gcc dot gnu dot org
@ 2004-10-10  0:47 ` cvs-commit at gcc dot gnu dot org
  2004-10-10  0:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-10  0:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-10 00:47 -------
Subject: Bug 17189

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-10-10 00:47:20

Modified files:
	gcc            : ChangeLog c-decl.c c-parse.in 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: anon-struct-5.c 

Log message:
	PR c/17189
	* c-decl.c (grokfield): Make diagnostic for bad cases of unnamed
	fields a pedwarn.  Pedwarn here for unnamed structs/unions if
	pedantic.
	* c-parse.in (component_decl): Don't pedwarn here for unnamed
	fields.
	
	testsuite:
	* gcc.dg/anon-struct-5.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5823&r2=2.5824
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.597&r2=1.598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-parse.in.diff?cvsroot=gcc&r1=1.245&r2=1.246
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4424&r2=1.4425
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/anon-struct-5.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/17189] bogus warning for  struct Foo { int; };
  2004-08-25 18:30 [Bug c/17189] New: bogus warning for struct Foo { int; }; terra at gnome dot org
  2004-08-25 18:40 ` [Bug c/17189] " pinskia at gcc dot gnu dot org
  2004-10-10  0:47 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-10  0:51 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-10  0:51 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-10 00:51 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

end of thread, other threads:[~2004-10-10  0:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-25 18:30 [Bug c/17189] New: bogus warning for struct Foo { int; }; terra at gnome dot org
2004-08-25 18:40 ` [Bug c/17189] " pinskia at gcc dot gnu dot org
2004-10-10  0:47 ` cvs-commit at gcc dot gnu dot org
2004-10-10  0:51 ` pinskia at gcc dot gnu dot org

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