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: [C++ PATCH] Fix bug 51


>>>>> "Nathan" == Nathan Sidwell <nathan@codesourcery.com> writes:

> Jason Merrill wrote:
>> 
>> > Nathan Sidwell wrote:

>> > Oh, forgot to mention, g++.brendan/err-msg2.C is apparently incorrect
>> > and needs to be removed.
>> 
>> It's an error because the first typedef has C++ linkage and the second C.
> Ah, the problem is that it is being rejected because of the two
> specifiers, _not_ because of the difference in language between the two
> typedefs (if the second typedef specified "C++" linkage, it would still
> give an error). I propose changing that test case to

> typedef void (*pfv)(double, double);
> extern "C" {
>   typedef void (*pfv)(double, double); // ERROR - conflicting linkage - XFAIL
> }

> which is still erroneous, but unconfused with the two specifiers problem.
> Note it's XFAILed, the patch for PR51 doesn't affect that.

> Do you agree, and if so is my patch for PR 51 OK? (I will, of course, file
> something in GNATS)

Works for me.  Is there a place to document the convention you are using to
indicate extern "LANG" vs. plain extern?  If not, just adding comments in
the affected code is OK.  With that, the patch is preapproved.

Jason


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