[Bug c/44772] [4.5 Regression] -Wc++-compat warns incorrectly for anonymous unions

2010-11-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44772

--- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-11 
20:40:36 UTC ---
Author: jakub
Date: Thu Nov 11 20:40:32 2010
New Revision: 166620

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=166620
Log:
Backport from mainline
2010-11-05  Jakub Jelinek  ja...@redhat.com

PR c/44772
* c-decl.c (warn_cxx_compat_finish_struct): Don't call
pointer_set_contains if DECL_NAME is NULL.

* gcc.dg/Wcxx-compat-21.c: New test.

Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/Wcxx-compat-21.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/c-decl.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


[Bug c/44772] [4.5 Regression] -Wc++-compat warns incorrectly for anonymous unions

2010-11-11 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44772

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED

--- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-11 
22:13:25 UTC ---
Fixed.


[Bug c/44772] [4.5 Regression] -Wc++-compat warns incorrectly for anonymous unions

2010-11-07 Thread ml-gnu-dale at riyescott dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44772

--- Comment #6 from Dale Stimson ml-gnu-dale at riyescott dot com 2010-11-07 
23:18:23 UTC ---
Created attachment 22317
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=22317
Backport of Jakub's patch from 4.6 trunk to 4.5.1.

The attached patch for gcc 4.5.1 is provided in case it is useful to any one...

Thanks to Jakub for solving this problem.  This attachment is derived from
Jakub's patch by backporting to 4.5.1 (as obtained from the presumably pristine
Fedora gcc file gcc-4.5.1-20100924.tar.bz2 from Fedora's
gcc-4.5.1-4.fc14.src.rpm).

I have lightly tested this.  It works for me.


[Bug c/44772] [4.5 Regression] -Wc++-compat warns incorrectly for anonymous unions

2010-11-05 Thread jakub at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44772

Jakub Jelinek jakub at gcc dot gnu.org changed:

   What|Removed |Added

Summary|[4.5/4.6 Regression]|[4.5 Regression]
   |-Wc++-compat warns  |-Wc++-compat warns
   |incorrectly for anonymous   |incorrectly for anonymous
   |unions  |unions

--- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org 2010-11-06 
00:10:05 UTC ---
Fixed on the trunk so far.