This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/16903] __LINE__ is not implemented in preprocessor
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Aug 2004 18:08:56 -0000
- Subject: [Bug preprocessor/16903] __LINE__ is not implemented in preprocessor
- References: <20040806171123.16903.whitis@freelabs.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-08-06 18:08 -------
Confirmed. Section 16.8/1 states:
---------------------------------
16.8 Predefined macro names [cpp.predefined]
1 The following macro names shall be defined by the implementation:
__LINE__
The line number of the current source line (a decimal constant).
[...]
---------------------------------
However, later on we read (in subclause 3):
---------------------------------
3 If any of the pre-defined macro names in this subclause, or the
identifier defined, is the subject of a #define or a #undef
preprocessing directive, the behavior is undefined.
---------------------------------
In other words, what you want doesn't work.
W.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16903