This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch c++]:PR/15774 - Conflicting function decls not diagnosed (this time really for 15774)
- From: Dave Korn <dave dot korn dot cygwin at gmail dot com>
- To: Kai Tietz <ktietz70 at googlemail dot com>
- Cc: Jason Merrill <jason at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 04 Jan 2011 04:24:34 +0000
- Subject: Re: [patch c++]:PR/15774 - Conflicting function decls not diagnosed (this time really for 15774)
- References: <AANLkTinGynF-v_UmCCNJrH7GEOcFQDC-5RHc4XbK+Fr2@mail.gmail.com> <AANLkTi=nmhXXFAJziR9-B89oswb=xQPLkxKzJh_D4Eea@mail.gmail.com> <AANLkTimwLR40B4d_TW22XPmgvfVOcD+x487TwskXwqkX@mail.gmail.com> <4D1510FA.4030605@redhat.com> <AANLkTi=zA7h22ttqnru3AcU3n+QN8r30o5dnabLG-wTQ@mail.gmail.com> <AANLkTi=i83Djyy28Cc8-D72YK7Y3EOFcPD09A1kPdjea@mail.gmail.com> <4D2297F8.6060008@gmail.com>
On 04/01/2011 03:46, Dave Korn wrote:
> On 25/12/2010 10:41, Kai Tietz wrote:
>> 2010/12/24 Kai Tietz <ktietz70@googlemail.com>:
>>> 2010/12/24 Jason Merrill <jason@redhat.com>:
>>>> OK. Does the error message mention the attributes?
>>>>
>>>> Jason
>>>>
>>> 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.
>>>
>>> Regards,
>>> Kai
>>>
>>> PS: Merry Christmas
>>>
>> Applied at revision 168241.
>
> Unfortunately this broke the use of typedefs with dll attributes on them,
Um, I'm not reading and thinking clearly. This is actually PR17136(*) come
back to haunt us. Nothing to do with the typedef in the formal parameters,
nor dll attributes; just the missing stdcall on the function prototype that is
causing the problem. Reduced testcase:
-------------------------------------
#define JNICALL __stdcall
int _Jv_JNI_ToReflectedField (void);
int JNICALL
_Jv_JNI_ToReflectedField (void)
{
return 0;
}
-------------------------------------
As the explanation in the PR makes clear, this is a real bug in libjava,
that we have not previously diagnosed. Danny suggested a fix in that PR; I'll
take a look at updating it for current trunk.
cheers,
DaveK
--
(*) - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17136