Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r81bd7e3 rf5f2768  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Apr 10 21:16:00 2023
    13 // Update Count     : 476
     12// Last Modified On : Tue Feb 14 22:46:38 2023
     13// Update Count     : 470
    1414//
    1515
     
    4444        static int flags = 0;
    4545
    46     // This allocation 'leaks' memory from the program to the execution
    47     // environment, as putenv does not manage the storage of the string used
    48     // as an environment variable. This leak is necessary to ensure the
    49     // underlying C string is allocated long enough.
    5046        if ( putenv( (char *)( *new string( string( __CFA_FLAGPREFIX__ + to_string( flags++ ) + "__=" ) + arg ) ).c_str() ) ) {
    5147                cerr << argv[0] << " error, cannot set environment variable." << endl;
     
    202198                                } // if
    203199                        } else if ( arg == "-CFA" ) {
    204                                 CFA_flag = true;                                                // strip -CFA flag
     200                                CFA_flag = true;                                                // strip the -CFA flag
    205201                                link = false;
    206202                                args[nargs++] = "-fsyntax-only";                // stop after stage 2
    207203                        } else if ( arg == "-debug" ) {
    208                                 debug = true;                                                   // strip debug flag
     204                                debug = true;                                                   // strip the debug flag
    209205                        } else if ( arg == "-nodebug" ) {
    210                                 debug = false;                                                  // strip nodebug flag
     206                                debug = false;                                                  // strip the nodebug flag
    211207                        } else if ( arg == "-quiet" ) {
    212                                 quiet = true;                                                   // strip quiet flag
     208                                quiet = true;                                                   // strip the quiet flag
    213209                        } else if ( arg == "-noquiet" ) {
    214                                 quiet = false;                                                  // strip noquiet flag
    215                         } else if ( arg == "-invariant" ) {
    216                                 Putenv( argv, "-" + arg );
    217                         } else if ( arg == "--invariant" ) {
    218                                 Putenv( argv, arg );
     210                                quiet = false;                                                  // strip the noquiet flag
    219211                        } else if ( arg == "-no-include-stdhdr" ) {
    220                                 noincstd_flag = true;                                   // strip no-include-stdhdr flag
     212                                noincstd_flag = true;                                   // strip the no-include-stdhdr flag
    221213                        } else if ( arg == "-nolib" ) {
    222                                 nolib = true;                                                   // strip nolib flag
     214                                nolib = true;                                                   // strip the nolib flag
    223215                        } else if ( arg == "-help" ) {
    224                                 help = true;                                                    // strip help flag
     216                                help = true;                                                    // strip the help flag
    225217                        } else if ( arg == "-nohelp" ) {
    226                                 help = false;                                                   // strip nohelp flag
     218                                help = false;                                                   // strip the nohelp flag
    227219                        } else if ( arg == "-cfalib") {
    228220                                compiling_libs = true;
     
    282274                                } // if
    283275                        } else if ( prefix( arg, "-B" ) ) {
    284                                 bprefix = arg.substr(2);                                // strip -B flag
     276                                bprefix = arg.substr(2);                                // strip the -B flag
    285277                        } else if ( arg == "-c" || arg == "-S" || arg == "-E" || arg == "-M" || arg == "-MM" ) {
    286278                                args[nargs++] = argv[i];                                // pass flag along
Note: See TracChangeset for help on using the changeset viewer.