https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94535

--- Comment #2 from Alisdair Meredith <alisdairm at me dot com> ---
Thanks for the speedy response, really appreciated!

I believe this is well-defined behavior, but can accept that the value of
__LINE__ may be unspecified - I do struggle with pre-processor wording.

There is no multiline "macro function" here, there is an invocation of a macro,
and the invocation spans multiple lines.  Our actual use case looks more like:

   INVOKE_MACRO(ARG1,
                ARG2,
                ARG3);

Where the line-wraps are forced by coding convention and line-length limits. 
This is not a control-line that defined a macro, so I believe the token
sequence is taken after discarding irrelevant whitespace.  The issue is whether
__LINE__ should correspond to the line with the opening paren, the closing
paren, or one of the lines in-between.  Until gcc9, AFAICT, all compilers
agreed on the line with the opening paren.  Even if it is unspecified behavior
(so free to choose) it would be helpful to preserve a compatibility with past
gcc compilers, and all other tested compilers, unless there is a strong reason
to want the change.  If there were more compiler divergence on the issue, I
would be less concerned.

Reply via email to