This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: Remove parameter names from libiberty.h
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: "'H. J. Lu'" <hjl at lucon dot org>,"'Andrew Pinski'" <pinskia at physics dot uc dot edu>
- Cc: "'Paul Schlie'" <schlie at comcast dot net>,"'Kaveh R. Ghazi'" <ghazi at caip dot rutgers dot edu>,<binutils at sources dot redhat dot com>,<gcc-patches at gcc dot gnu dot org>,<amodra at bigpond dot net dot au>,<dj at redhat dot com>,"'Ian Lance Taylor'" <ian at airs dot com>
- Date: Thu, 14 Apr 2005 18:50:06 +0100
- Subject: RE: Remove parameter names from libiberty.h
----Original Message----
>From: H. J. Lu
>Sent: 14 April 2005 18:18
> On Thu, Apr 14, 2005 at 12:17:11PM -0400, Andrew Pinski wrote:
>>>
>>>> Kaveh R. Ghazi writes:
>>>> As noted here:
>>>> http://sourceware.org/ml/binutils/2005-04/msg00269.html
>>>>
>>>> The new f*open_unlocked function prototypes in libiberty.h are in
>>>> conflict with binutils sources because one of the parameter names
>>>> ("mode") gets defined to "31" and the build dies.
>>>
>>> Why not alternatively fix the real problem (as you had noted), as
>>> opposed to indirectly establishing the policy that libiberty prototypes
>>> don't include parameter names (as it doesn't seem like the true
>>> solution to the problem).
>>
>> I don't know why I am replying to you but ...
>> Anyways there is no other way to fix the problem correctly. If we change
>> the parameter name, someone else might have defined it so we get into
>> a cycle.
>>
>
> There are many prototypes in libiberty.h with names.
>
My two cents is that it's asking for trouble to #define an all-lower case
word, particularly an extremely common one such as 'mode'. I had a quick
grep but couldn't figure out where it's coming from. I guess that sort of
thing is vaguely-ok-if-innately-fragile if it's being defined by the
m88k-dis source file, but if there's a public header in either binutils or
libiberty that's doing it, I'd think it ought to change.
cheers,
DaveK
--
Can't think of a witty .sigline today....