public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/111900] New: newlines in arguments in function-like macros are not preserved
@ 2023-10-20 17:54 ben at wibking dot com
  0 siblings, 0 replies; only message in thread
From: ben at wibking dot com @ 2023-10-20 17:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 111900
           Summary: newlines in arguments in function-like macros are not
                    preserved
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ben at wibking dot com
  Target Milestone: ---

The documentation for the cpp preprocessor states:

"The invocation of a function-like macro can extend over many logical lines.
However, in the present implementation, the entire expansion comes out on one
line. Thus line numbers emitted by the compiler or debugger refer to the line
the invocation started on, which might be different to the line containing the
argument causing the problem.

"We consider this a bug, and intend to fix it in the near future."

There does not appear to be a tracking bug in the Bugzilla for this.

This is an important feature to have in order to be able to debug code compiled
with single-pass host/device compilers when using function-like macros that
specialize for host or device code, e.g., NV_IF_TARGET
(https://github.com/NVIDIA/cccl/blob/61c1fd043ac0942805bab97429fdf72242182314/libcudacxx/examples/nv_target.cu#L14).

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-10-20 17:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-20 17:54 [Bug preprocessor/111900] New: newlines in arguments in function-like macros are not preserved ben at wibking dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).