Frama-C Bug Tracking System - Frama-C
View Issue Details
0001132Frama-CKernelpublic2012-03-23 10:162014-02-12 16:59
Anne 
signoles 
normalminorhave not tried
closedfixed 
 
Frama-C Oxygen-20120901 
0001132: -cpp-extra-args option should be a list
The "-cpp-extra-args" option is a StringSet option. It seems to me that is should better be a list since the order might be important...
With the following script: ============================================= let main () = Kernel.CppExtraArgs.add "-Ilib1"; Kernel.CppExtraArgs.add "-Ilib2"; Kernel.Files.set [ "tests/test.c" ]; () let main : unit -> unit = Dynamic.register ~plugin:"Frama_c_journal" "main" (Datatype.func Datatype.unit Datatype.unit) ~journalize:false main let () = Cmdline.run_after_loading_stage main; Cmdline.is_going_to_load () ============================================= You always get : [kernel] preprocessing with "gcc -C -E -I. -Ilib2 -Ilib1 tests/test.c" whatever the order of the [Kernel.CppExtraArgs.add] commands is.
No tags attached.
Issue History
2012-03-23 10:16AnneNew Issue
2012-03-23 10:19AnneNote Added: 0002799
2012-03-26 09:48signolesStatusnew => assigned
2012-03-26 09:48signolesAssigned To => signoles
2012-03-26 09:53svnCheckin
2012-03-26 09:53svnStatusassigned => resolved
2012-03-26 09:53svnResolutionopen => fixed
2012-03-26 09:57signolesNote Added: 0002801
2012-03-26 10:21signolesNote Edited: 0002801
2012-09-19 17:15signolesFixed in Version => Frama-C Oxygen-20120901
2012-09-19 17:16signolesStatusresolved => closed
2014-02-12 16:59signolesNote Added: 0004712
2014-02-12 16:59signolesStatusclosed => resolved

Notes
(0002799)
Anne   
2012-03-23 10:19   
Of course, a workaround is to do : Kernel.CppExtraArgs.add "-Ilib1 -Ilib2";
(0002801)
signoles   
2012-03-26 09:57   
(edited on: 2012-03-26 10:21)
Done. Note however that the order of -llib and -llib2 in the Frama-C command line below is yet not specified since the order in which command line options are parsed (without -then) remains unspecified. $ frama-c foo.c -cpp-extra-args="-llib1" -cpp-extra-args="-llib2"
(0004712)
signoles   
2014-02-12 16:59   
Fix committed to stable/neon branch.