Changeset 4f5a8a2
- Timestamp:
- Aug 10, 2019, 9:39:08 AM (5 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 7d01cf44, b3976bf, ef46abb
- Parents:
- 98399b2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
driver/cfa.cc
r98399b2 r4f5a8a2 10 10 // Created On : Tue Aug 20 13:44:49 2002 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Fri Aug 9 18:51:44201913 // Update Count : 3 0912 // Last Modified On : Sat Aug 10 08:44:15 2019 13 // Update Count : 311 14 14 // 15 15 … … 96 96 string compiler_name; // name of C compiler 97 97 98 bool suffixp= false; // -x flag98 bool x_flag = false; // -x flag 99 99 bool nonoptarg = false; // indicates non-option argument specified 100 100 bool link = true; // linking as well as compiling … … 191 191 args[nargs] = argv[i]; // pass the argument along 192 192 nargs += 1; 193 } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) {194 std_flag = true; // -std=XX provided195 args[nargs] = argv[i]; // pass the argument along196 nargs += 1;197 } else if ( arg == "-w" ) {198 args[nargs] = argv[i]; // pass the argument along199 nargs += 1;200 args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp201 nargs += 1;202 193 } else if ( prefix( arg, "-x" ) ) { // file suffix ? 203 194 string lang; … … 213 204 lang = arg.substr( 2 ); 214 205 } // if 215 suffixp = lang != "none"; 206 x_flag = lang != "none"; 207 } else if ( prefix( arg, "-std=" ) || prefix( arg, "--std=" ) ) { 208 std_flag = true; // -std=XX provided 209 args[nargs] = argv[i]; // pass the argument along 210 nargs += 1; 211 } else if ( arg == "-w" ) { 212 args[nargs] = argv[i]; // pass the argument along 213 nargs += 1; 214 args[nargs] = ( *new string( string("-D__CFA_FLAG__=") + arg ) ).c_str(); // add the argument for cfa-cpp 215 nargs += 1; 216 216 } else if ( prefix( arg, "-W" ) ) { // check before next tests 217 217 if ( arg == "-Werror" || arg == "-Wall" ) { … … 291 291 } else { 292 292 bool cfa = suffix( arg ); // check suffix 293 if ( ! suffixp&& cfa ) { // no explicit suffix and cfa suffix ?293 if ( ! x_flag && cfa ) { // no explicit suffix and cfa suffix ? 294 294 args[nargs] = "-x"; 295 295 nargs += 1; … … 299 299 args[nargs] = argv[i]; // concatenate file 300 300 nargs += 1; 301 if ( ! suffixp&& cfa ) { // no explicit suffix and cfa suffix ?301 if ( ! x_flag && cfa ) { // no explicit suffix and cfa suffix ? 302 302 args[nargs] = "-x"; 303 303 nargs += 1;
Note: See TracChangeset
for help on using the changeset viewer.