This is the mail archive of the gcc-patches@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: [patch i386,c,c++]: PR/12171 - calling convention omitted in error message


On Wed, 22 Dec 2010, Gabriel Dos Reis wrote:

> I'm satisfied with the patch.

I still maintain that even if you do wish to print only some attributes 
(in which case I'd say the hook should be a hook to say what target 
attributes to print, not one saying what's a calling convention 
attribute, since the two sets need not be the same) the duplication 
between ix86_attribute_affects_calling_convention and other functions in 
knowing what attributes are calling convention attributes is best avoided.  
And manually handling the possibility of leading and trailing __ in a back 
end is certainly a bad idea; we have a perfectly good is_attribute_p 
function to handle this in one place only.

Even better than a hook saying whether to print an attribute would be an 
additional field in struct attribute_spec saying whether an attribute 
(target or not) should be printed.  That way the information - if you do 
want to print only some attributes - would be provided via an existing 
data hook rather than needing a new function hook at all, and you can 
easily start printing some target-independent attributes as well if 
desired.

-- 
Joseph S. Myers
joseph@codesourcery.com


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