View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000650 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2013-01-29 00:19 | 2019-06-10 08:55 |
Reporter | dalias | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Omission |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Rich Felker | ||||
Organization | musl libc | ||||
User Reference | |||||
Section | c99 | ||||
Page Number | 2489 | ||||
Line Number | 79568 | ||||
Interp Status | --- | ||||
Final Accepted Text | 0000650:0001486 | ||||
Summary | 0000650: c99 -E option fails to define "expanding all preprocessor directives" w.r.t. #pragma | ||||
Description | Per ISO C, #pragma is a preprocessor directive. However, it does not "expand" to any particular text. Thus, it's unclear what "expanding all preprocessor directives" could mean when a source file contains #pragma. As far as I know, all existing compilers, when given the -E option, pass #pragma directives through. This seems like the most desirable behavior if the intent is that the preprocessed output can be passed back to the compiler later without the separate preprocessing stage having altered the meaning of the program. | ||||
Desired Action | Add text to specify the behavior of c99 -E with respect to #pragma, either specifying a particular behavior that matches existing implementations or offering a range of behaviors. | ||||
Tags | tc2-2008 |
|
The following are the changes suggested to fix the #pragma issue in TC2. Additional changes to address passing preprocessed output back to the compiler will be proposed in a separate bug targeting Issue 8. At page 2489 line 79568 section c99 in the -E description change: expanding all preprocessor directives to executing all preprocessor directives At page 2497 line 79928 section c99 add a new paragraph to the end of the RATIONALE section: When the -E option is used, execution of some #pragma preprocessor directives may simply result in a copy of the directive being included in the output as part of the allowed extra information used by subsequent compilation passes (see STDOUT). |
Date Modified | Username | Field | Change |
---|---|---|---|
2013-01-29 00:19 | dalias | New Issue | |
2013-01-29 00:19 | dalias | Status | New => Under Review |
2013-01-29 00:19 | dalias | Assigned To | => ajosey |
2013-01-29 00:19 | dalias | Name | => Rich Felker |
2013-01-29 00:19 | dalias | Organization | => musl libc |
2013-01-29 00:19 | dalias | Section | => c99 |
2013-01-29 00:19 | dalias | Page Number | => unknown |
2013-01-29 00:19 | dalias | Line Number | => unknown |
2013-03-08 12:16 | geoffclare | Note Added: 0001486 | |
2013-03-08 12:17 | geoffclare | Page Number | unknown => 2489 |
2013-03-08 12:17 | geoffclare | Line Number | unknown => 79568 |
2013-03-08 12:17 | geoffclare | Interp Status | => --- |
2013-03-08 12:25 | geoffclare | Relationship added | parent of 0000667 |
2013-03-14 15:15 | geoffclare | Final Accepted Text | => 0000650:0001486 |
2013-03-14 15:15 | geoffclare | Status | Under Review => Resolved |
2013-03-14 15:15 | geoffclare | Resolution | Open => Accepted As Marked |
2013-03-14 15:15 | geoffclare | Tag Attached: tc2-2008 | |
2019-06-10 08:55 | agadmin | Status | Resolved => Closed |