public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/7425: deprecated attribute doesn't merge with multiple declarations
@ 2003-05-03 12:36 Falk Hueffner
  0 siblings, 0 replies; 3+ messages in thread
From: Falk Hueffner @ 2003-05-03 12:36 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7425; it has been noted by GNATS.

From: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org,
   james@mail.and.org
Cc:  
Subject: Re: c/7425: deprecated attribute doesn't merge with multiple declarations
Date: 03 May 2003 14:31:47 +0200

 This boils down to
 
 void func(void);
 void func(void) __attribute__((deprecated));
 
 void f(void) {
     func();
 }
 
 I'm not sure what is supposed to happen with multiple declarations
 with conflicting attributes, I cannot find anything in the manual
 about this. Do we really want to "merge" them? What should happen if
 they conflict? Other options seem to be "choose any" and "choose the
 later". Current behaviour seems to be "choose any".
 
 -- 
 	Falk


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

* Re: c/7425: deprecated attribute doesn't merge with multiple declarations
@ 2003-05-03 16:16 Joseph S. Myers
  0 siblings, 0 replies; 3+ messages in thread
From: Joseph S. Myers @ 2003-05-03 16:16 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c/7425; it has been noted by GNATS.

From: "Joseph S. Myers" <jsm28@cam.ac.uk>
To: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>
Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc@gcc.gnu.org, 
    james@mail.and.org
Subject: Re: c/7425: deprecated attribute doesn't merge with multiple
 declarations
Date: Sat, 3 May 2003 17:07:14 +0100 (BST)

 On Sat, 3 May 2003, Falk Hueffner wrote:
 
 > I'm not sure what is supposed to happen with multiple declarations
 > with conflicting attributes, I cannot find anything in the manual
 > about this. Do we really want to "merge" them? What should happen if
 > they conflict? Other options seem to be "choose any" and "choose the
 > later". Current behaviour seems to be "choose any".
 
 Multiple attribute lists should be merged; if in any case they aren't,
 this is a bug.  Where attributes have some effect on the type or the decl
 beyond simply adding to the attribute list, there may need to be specific
 code to handle that merging.  If they conflict (which in this case they
 don't), this should be a hard error.  E.g., conflicting i386 regparm
 attributes ought to generate a hard error (there was a Linux kernel was
 with such conflicting attributes, which was noticed when a new GCC version
 changed which of the two conflicting regparm attributes was used; but GCC
 ought to detect that sort of thing).  Targets need to define
 TARGET_COMP_ATTRIBUTES, TARGET_MERGE_{TYPE,DECL}_ATTRIBUTES if there are
 any conflicting target attributes.
 
 -- 
 Joseph S. Myers
 jsm28@cam.ac.uk


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

* c/7425: deprecated attribute doesn't merge with multiple declarations
@ 2002-07-28 12:26 James Antill
  0 siblings, 0 replies; 3+ messages in thread
From: James Antill @ 2002-07-28 12:26 UTC (permalink / raw)
  To: gcc-gnats


>Number:         7425
>Category:       c
>Synopsis:       deprecated attribute doesn't merge with multiple declarations
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 12:26:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     James Antill
>Release:        3.1.1
>Organization:
n/a
>Environment:
System: Linux code.and.org 2.4.18-5 #1 Mon Jun 10 15:37:14 EDT 2002 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/opt : (reconfigured) ./configure --prefix=/opt/gcc-3.1.1
>Description:
	If you have to extern declarations for a function as in...

extern void func(void);
extern __typeof(func) func __attribute__((deprecated)) ;

	...then the attribute is ignored.

>How-To-Repeat:
	see above.
>Fix:
	I'm guessing that a new TREE() node is created for the second
declaration, so either make that the one that is found ... or merge them.

>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2003-05-03 16:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-03 12:36 c/7425: deprecated attribute doesn't merge with multiple declarations Falk Hueffner
  -- strict thread matches above, loose matches on Subject: below --
2003-05-03 16:16 Joseph S. Myers
2002-07-28 12:26 James Antill

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