View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002001 | 1003.1(2024)/Issue8 | Shell and Utilities | public | 2026-10-20 00:03 | 2026-10-20 00:06 |
| Reporter | Love4Boobies | Assigned To | |||
| Priority | normal | Severity | Editorial | Type | Error |
| Status | New | Resolution | Open | ||
| 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 | |||||
| Final Accepted Text | |||||
| Summary | 0002001: Zero output after preprocessing on cc17 -E | ||||
| Description | The -E compiler option POSIX's answer to dependency generation for make, as also explained in the rationale. This report has to do with the description of the -E option in the STDOUT section which is already being amended as per bug report 1925. That amendment does not introduce the issue I am describing here, it inherited it from the current standard, but I thought it was worth pointing out since we have two reports on the same text. With that correction in place, the wording would be as follows: --- 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> or "# %d \"%s\" %s\n", <line>, <pathname>, <flags> 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, pathname is the pathname used to open the file, and flags is an implementation-defined string. --- The issue is with the wording "unless no other output generated from that file is present in the output." My reading of this is that if after preprocessing an included header does not output any tokens then -E should ignore it. Consider however the following example: // foo.h #define FOO 42 // foo.c #include "foo.h" The header produces no output after preprocessing and thus -E will ignore it when used in the process of generating a list of dependencies. Thus foo.h is essentially untracked so if we changed the definition of FOO, a makefile based on the generated dependency list would not know to recompile foo.c | ||||
| Desired Action | The bit about headers not producing any headers should simply be stripped unless there is some good reason to keep it there which I am missing. | ||||
| Tags | No tags attached. | ||||
|
|
Sorry, I meant to write"the bit about headers not producing any OUTPUT" in the Desired Action field. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2026-10-20 00:03 | Love4Boobies | New Issue | |
| 2026-10-20 00:06 | Love4Boobies | Note Added: 0007532 |