Austin Group Defect Tracker

Aardvark Mark III


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0000650 [1003.1(2008)/Issue 7] Shell and Utilities Editorial Omission 2013-01-29 00:19 2013-03-14 15:15
Reporter dalias View Status public  
Assigned To ajosey
Priority normal Resolution Accepted As Marked  
Status Resolved  
Name Rich Felker
Organization musl libc
User Reference
Section c99
Page Number 2489
Line Number 79568
Interp Status ---
Final Accepted Text Note: 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
Attached Files

- Relationships
parent of 0000667Resolvedajosey Add handling of .i files to c99 (c11) in Issue 8 

-  Notes
(0001486)
geoffclare (manager)
2013-03-08 12:16

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).

- Issue History
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 => Note: 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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker