This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: __attribute__ ((regparm(...))) in function declaration and gcc3.4.0


Hi,

On Mon, 1 Mar 2004, Giovanni Bajo wrote:

> Yes, but I don't know if this is intended. Maybe someone can clarify
> this? Otherwise we should file a bugreport.

It was intended, yes.  (The immediate issue were funny runtime problems in 
the linux kernel resulting from conflicting regparm specifications between 
prototype and definition).

Zack suggested to lower this error to a warning if the definition doesn't 
have _any_ regparm attribute (and then ensure that it will inherit the one 
from the prototype, or the first decl).  I've not yet looked at how to 
make this happen reliably (the duplicate_decls mechanism is twisty), and I 
also don't know if I would like it.  Currently the rule is easy, and hence 
simple.  Every exception makes it more difficult, and I'm not sure if we 
should sacrifice clarity for programmers using regparm's.  They should be 
able to use the right macro magic.


Ciao,
Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]