Firm Bugtracker - cparser
Viewing Issue Advanced Details
141 preprocessor minor always 2014-07-02 22:31 2016-01-03 03:28
haass  
Matze  
normal  
closed 0.9.14  
fixed  
none    
none  
0000141: Problem handling preprocessor switches
cparser -M returns "error: builtin preprocessor does not support dependency generation yet"
cparser -MD did not but according to gcc&clang behavior -MD also triggers dependency generation without -M or -MM.
Attached patch fixes this case but there is more, everything passed directly to the preprocessor using -Wp is not checked ATM.
? file icon 0001-Option-parser-add-MD-to-MODE_GENERATE_DEPENDENCIES.patch [^] (948 bytes) 2014-07-02 22:31
Issue History
2014-07-02 22:31 haass New Issue
2014-07-02 22:31 haass File Added: 0001-Option-parser-add-MD-to-MODE_GENERATE_DEPENDENCIES.patch
2014-07-09 16:35 Matze Note Added: 0000214
2014-07-09 16:35 Matze Assigned To => Matze
2014-07-09 16:35 Matze Status new => resolved
2014-07-09 16:35 Matze Resolution open => fixed
2014-07-09 16:40 Matze Note Added: 0000215
2016-01-03 03:28 Matze Status resolved => closed

Notes
(0000214)
Matze   
2014-07-09 16:35   
The internal preprocessor does indeed not support dependency generation yet. However the attached patch is not correct. We already parsed the -MD flag but contrary to -MM and -M it does not trigger the compiler to only output dependencies, so no major mode switch to dependency generation should be done (we still want the normal compilation process).
The parser was already setting construct_dep_target = true; to indicate that we should additionaly generate a dependency file as a side effect of the normal compilation.

I added a warning when construct_dep_target is set for the internal preprocessor in 8b326abdabcdc94727c41c2d9f7bfbf869601ca5
(0000215)
Matze   
2014-07-09 16:40   
Also note that I created 2 additional bug reports about -Wp options being ignored by the builtin preprocessor and dependency generation not being supported by the builtin preprocessor.