This is the mail archive of the 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] Fix PR C++/9021 and 11005

On Thu, 11 Dec 2003 21:59:29 +1100 (EST), Danny Smith <> wrote:

>  --- Jason Merrill <> wrote:

>> I think it probably makes sense to use your patch, but make it conditional
>> on whether or not the class is complete; if it is, then specifying
>> additional attributes is an error.
> Maybe. This rule:
> "If !COMPLETE_TYPE_P, merge attributes, else ignore the new attributes"

That's not what I was proposing.  Rather, ... else give an error if new
attributes are specified.

> // Case 3:
> // Finally, this is the case where we try to add an attribute 
> // to a complete type.
> // Definition  without attribute, followed by a redeclaration
> // with  attribute.
> struct Foo3
> {
>   int foo3fun(void) const;
> };
> struct  __attribute__((dllimport)) Foo3; // Ignore attribute?


> Even without a check for COMPLETE_TYPE_P before merging attributes,
> foo3fun doesn't get marked as dllimport.

Silently ignoring the user is never a good idea.  If we can't do what they
ask for, we should tell them so.


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