This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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 preprocessor/16903] __LINE__ is not implemented in preprocessor


------- 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


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