[LLVMbugs] [Bug 22973] Different __LINE__ for different lines during macro expansion

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Mar 22 00:14:52 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=22973

jonathan.sauer at gmx.de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jonathan.sauer at gmx.de
         Resolution|---                         |INVALID

--- Comment #2 from jonathan.sauer at gmx.de ---
The C11 standard only says (N1570 ยง6.10.8.1p1):

| __LINE__ - The presumed line number (within the current source file) of the
| current source line (an integer constant)

As the two invocations of the "inner" macro are originally on two different
lines, I'd say that clang is correct here. I also think that "presumed" leaves
preprocessor implementations a bit of leeway.

BTW: clang is not affected by the GCC bug you mentioned.

I'm closing this bug. Please feel free to reopen if you disagree.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150322/d6ebfc6c/attachment.html>


More information about the llvm-bugs mailing list