[Issue 23693] ImportC: Unclear documentation of #line and linemarker support

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Dec 4 07:43:56 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=23693

Walter Bright <bugzilla at digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX

--- Comment #4 from Walter Bright <bugzilla at digitalmars.com> ---
There are two different things:

1. #line directives described as part of the preprocessing pass, in C11 6.10.4.
They were asked for for D, and I didn't see an issue with leaving them in for
C.

2. linemarkers

The linemarker tests:

    # 1020 "cstuff3.c" 1 2 3 4

conform to gcc's specification of them:

"After the file name comes zero or more flags, which are ‘1’, ‘2’, ‘3’, or ‘4’.
If there are multiple flags, spaces separate them."

https://gcc.gnu.org/onlinedocs/gcc-11.1.0/cpp/Preprocessor-Output.html

gcc does indeed barf on more than one flag, but that's a bug in gcc, according
to gcc's spec.

Both are documented by referring to the respective documents for them. I don't
want to write an equivalent specification that is identical but different in
order to avoid copyright issues.

And, lastly, the test suite is for testing ImportC, not for testing gcc.
Although your work in running them through gcc is valuable and has uncovered
problems with ImportC, and I appreciate your efforts in doing this.

I'm going to mark this as wontfix.

--


More information about the Digitalmars-d-bugs mailing list