public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal
@ 2005-02-18  8:38 roland at redhat dot com
  2005-02-18  9:29 ` [Bug c/20043] " roland at redhat dot com
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: roland at redhat dot com @ 2005-02-18  8:38 UTC (permalink / raw)
  To: gcc-bugs

GCC 4 now produces a "conflicting types" error for code that gcc 3.4 accepts
without complaint.  This usage pattern occurs when using glibc's <sys/socket.h>
with _GNU_SOURCE defined, followed by a POSIX-compliant redeclaration of
function like `accept'.  This is what transparent_union was invented to support.

-- 
           Summary: transparent_union doesn't allow restrict qualifier
                    removal
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: roland at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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

* [Bug c/20043] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
@ 2005-02-18  9:29 ` roland at redhat dot com
  2005-02-18  9:41 ` [Bug c/20043] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: roland at redhat dot com @ 2005-02-18  9:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From roland at redhat dot com  2005-02-17 23:16 -------
Created an attachment (id=8218)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=8218&action=view)
small test case for this bug

3.4 likes this fine, but 4.0 does not. 

-- 


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


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

* [Bug c/20043] [4.0 Regression] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
  2005-02-18  9:29 ` [Bug c/20043] " roland at redhat dot com
@ 2005-02-18  9:41 ` pinskia at gcc dot gnu dot org
  2005-02-18 10:42 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-18  9:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-17 23:19 -------
Been failing since 20040909.

Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-17 23:19:58
               date|                            |
            Summary|transparent_union doesn't   |[4.0 Regression]
                   |allow restrict qualifier    |transparent_union doesn't
                   |removal                     |allow restrict qualifier
                   |                            |removal
   Target Milestone|---                         |4.0.0


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


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

* [Bug c/20043] [4.0 Regression] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
  2005-02-18  9:29 ` [Bug c/20043] " roland at redhat dot com
  2005-02-18  9:41 ` [Bug c/20043] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-18 10:42 ` pinskia at gcc dot gnu dot org
  2005-02-18 16:48 ` jakub at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-18 10:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-17 23:25 -------
What is werid is that 3.4.0 rejects the follow "legal" code though:
typedef union { int *__restrict i; long *__restrict l; } u __attribute__((transparent_union));

extern void foobar(u arg);
extern void foobar(int *__restrict);

Though 4.0.0 does compile it so we traded one bug for another.

-- 


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


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

* [Bug c/20043] [4.0 Regression] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
                   ` (2 preceding siblings ...)
  2005-02-18 10:42 ` pinskia at gcc dot gnu dot org
@ 2005-02-18 16:48 ` jakub at gcc dot gnu dot org
  2005-02-19 14:42 ` cvs-commit at gcc dot gnu dot org
  2005-02-19 14:53 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-18 16:48 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jakub at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-02-17 23:19:58         |2005-02-18 09:29:43
               date|                            |


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


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

* [Bug c/20043] [4.0 Regression] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
                   ` (3 preceding siblings ...)
  2005-02-18 16:48 ` jakub at gcc dot gnu dot org
@ 2005-02-19 14:42 ` cvs-commit at gcc dot gnu dot org
  2005-02-19 14:53 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-19 14:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-19 00:26 -------
Subject: Bug 20043

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-02-19 00:26:38

Modified files:
	gcc            : ChangeLog c-typeck.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: transparent-union-1.c 
	                      transparent-union-2.c 

Log message:
	PR c/20043
	* c-typeck.c (composite_type): Handle quals in transparent unions.
	(type_lists_compatible_p): Likewise.
	
	* gcc.dg/transparent-union-1.c: New test.
	* gcc.dg/transparent-union-2.c: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.7532&r2=2.7533
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-typeck.c.diff?cvsroot=gcc&r1=1.418&r2=1.419
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5051&r2=1.5052
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/transparent-union-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/transparent-union-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


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


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

* [Bug c/20043] [4.0 Regression] transparent_union doesn't allow restrict qualifier removal
  2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
                   ` (4 preceding siblings ...)
  2005-02-19 14:42 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-19 14:53 ` jakub at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2005-02-19 14:53 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jakub at gcc dot gnu dot org  2005-02-19 00:51 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2005-02-19  0:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-18  8:38 [Bug c/20043] New: transparent_union doesn't allow restrict qualifier removal roland at redhat dot com
2005-02-18  9:29 ` [Bug c/20043] " roland at redhat dot com
2005-02-18  9:41 ` [Bug c/20043] [4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-18 10:42 ` pinskia at gcc dot gnu dot org
2005-02-18 16:48 ` jakub at gcc dot gnu dot org
2005-02-19 14:42 ` cvs-commit at gcc dot gnu dot org
2005-02-19 14:53 ` jakub 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).