This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/12153] use of keywords in macro definitions can make compilation fail
- From: "vincent+libc at vinc17 dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 22 Oct 2010 22:22:28 +0000
- Subject: [Bug libc/12153] use of keywords in macro definitions can make compilation fail
- Auto-submitted: auto-generated
- References: <bug-12153-131@http.sourceware.org/bugzilla/>
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.