This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/12153] use of keywords in macro definitions can make compilation fail


http://sourceware.org/bugzilla/show_bug.cgi?id=12153

--- Comment #7 from Vincent LefÃvre <vincent+libc at vinc17 dot org> 2010-10-22 22:22:23 UTC ---
(In reply to comment #6)
> 2. the user doesn't use the keyword in his code (the use of a keyword by a
> standard macro is hidden).

Just to give an example about this, a user may decide to define

#define float the_float_type_must_not_be_used

as a way to ensure that the float type is not used in the code, while still
allowing double for FP computations. But the fpclassify macro should still be
usable as it makes sense on double. And if the fpclassify uses the float
keyword, it breaks the code.

There might be other good reasons to define macros with the name of a keyword.
It would not be the first time one may think that some feature would/should not
be used, but it would become more meaningful in the future. Standards are there
to say whether something is allowed or forbidden.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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