View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001925 | 1003.1(2024)/Issue8 | Shell and Utilities | public | 2025-05-10 02:36 | 2025-07-08 14:23 |
| Reporter | Love4Boobies | Assigned To | geoffclare | ||
| Priority | normal | Severity | Objection | Type | Error |
| Status | Applied | Resolution | Accepted As Marked | ||
| Name | Bogdan Barbu | ||||
| Organization | |||||
| User Reference | |||||
| Section | c17 | ||||
| Page Number | https://pubs.opengroup.org/onlinepubs/9799919799/utilities/c17.html | ||||
| Line Number | STDOUT section | ||||
| Interp Status | Approved | ||||
| Final Accepted Text | see 0001925:0007184 | ||||
| Summary | 0001925: c17 -E output is incompatible with existing implementations | ||||
| Description | Under the STDOUT section of the c17 description, POSIX reads: --- If the -E option is specified, the standard output shall be a text file that represents the results of the preprocessing stage of the language; it may contain extra information appropriate for subsequent compilation passes and shall contain at least one line with the format: "# %d \"%s\"\n", <line>, <pathname> for each file processed as a result of a #include directive, unless no other output generated from that file is present in the output, where line is a line number and pathname is the pathname used to open the file. --- GCC, clang, ICC, EDG, also add flags towards the end of the line. For example, see GCC's documentation: https://gcc.gnu.org/onlinedocs/cpp/Preprocessor-Output.html This is important because this is how automatic make dependencies cand be implemented portably under POSIX according to #1325. In fact, this output is used in EXAMPLES on the make page; it is the 4th example in that section. Someone reading the semantics of -E might do something similar to that example, except write the sed part similarly to this do to the assumption that '\n' follows the quoted pathname: LC_ALL=C sed -En '/^# [1-9][[:digit:]]* "([^"]*)"$$/s//\1/p' (I put an extra [1-9] in there to exclude the impossible line number 0 which GCC uses for built-in headers.) | ||||
| Desired Action | Either standardize the flags as well, since they're pretty useful, or make the format less restrictive. | ||||
| Tags | tc1-2024 | ||||
|
|
Interpretation response ------------------------ The standard states the output format for c17 -E, and conforming implementations must conform to this. However, concerns have been raised about this which are being referred to the sponsor. Rationale: ------------- None. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- Change Page 2673 lines 88033-88036 from:
to:
|
|
|
Interpretation Proposed: 16 May 2025 |
|
|
Interpretation Approved: 17 June 2025 |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-05-10 02:36 | Love4Boobies | New Issue | |
| 2025-05-15 15:52 | nick | Note Added: 0007184 | |
| 2025-05-15 15:53 | nick | Status | New => Interpretation Required |
| 2025-05-15 15:53 | nick | Resolution | Open => Accepted As Marked |
| 2025-05-15 15:53 | nick | Interp Status | => --- |
| 2025-05-15 15:53 | nick | Final Accepted Text | => see 0001925:0007184 |
| 2025-05-15 15:54 | nick | Tag Attached: tc1-2024 | |
| 2025-05-15 15:54 | nick | Interp Status | --- => Pending |
| 2025-05-16 06:05 | agadmin | Interp Status | Pending => Proposed |
| 2025-05-16 06:05 | agadmin | Note Added: 0007185 | |
| 2025-06-17 13:23 | agadmin | Interp Status | Proposed => Approved |
| 2025-06-17 13:23 | agadmin | Note Added: 0007204 | |
| 2025-07-03 16:13 | geoffclare | Assigned To | => geoffclare |
| 2025-07-08 14:23 | geoffclare | Status | Interpretation Required => Applied |