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 c++]:PR/15774 - Conflicting function decls not diagnosed (this time really for 15774)


On 12/24/2010 05:24 PM, Kai Tietz wrote:
Ok, I'll apply it tomorrow. No the error message doesn't display the
attribute as it displays a decl.  This would be possibly another task
to display attributes (at least a wished limited set) also for
declarations.

I think we want to print whatever attributes cause the attributed entity to be considered distinct from the non-attributed version, rather than a redeclaration.


Thinking about it that way, I think your patch actually isn't the right way to handle this: in pr15774-1.C, the two foos are the same foo, just the change in attributes is ill-formed. So decls_match should return 1, but we should complain about attribute mismatch in duplicate_decls, perhaps just before the call to merge_decl_attributes.

Jason


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