Changeset c67158d7


Ignore:
Timestamp:
Jul 8, 2026, 5:54:34 PM (39 hours ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
d9235b6b
Parents:
0fd9c68
Message:

formatting, add -fwrapv compilation flag to fully define integer signed overflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • driver/cfa.cc

    r0fd9c68 rc67158d7  
    1010// Created On       : Tue Aug 20 13:44:49 2002
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Sep 28 21:53:54 2023
    13 // Update Count     : 484
     12// Last Modified On : Wed Jul  8 17:45:04 2026
     13// Update Count     : 487
    1414//
    1515
     
    455455        } // if
    456456
    457         args[nargs++] = "-fexceptions";                                         // add exception flags (unconditionally)
     457        args[nargs++] = "-fexceptions";                                         // Generates code to propagate exceptions
     458        args[nargs++] = "-fwrapv";                                                      // fully define integer signed overflow
    458459        args[nargs++] = "-D_GNU_SOURCE";                                        // force gnu libraries
    459460
     
    471472        } // if
    472473
    473         if ( CFA_flag ) {
    474                 Putenv( argv, "-N" );
    475                 Putenv( argv, "-CFA" );
    476                 // -CFA implies cc1 stage 2, but gcc does not pass the -o file to this stage because it believe the file is for
    477                 // the linker. Hence, the -o file is explicit passed to cc1 stage 2 and used as cfa-cpp's output file.
    478                 if ( o_file ) Putenv( argv, string( "-o=" ) + argv[o_file] );
    479         } else {
    480                 Putenv( argv, "-L" );
    481         } // if
    482 
    483474        if ( debug ) {
    484475                heading += " (debug)";
     
    486477        } else {
    487478                heading += " (no debug)";
     479        } // if
     480
     481        if ( CFA_flag ) {
     482                Putenv( argv, "-N" );
     483                Putenv( argv, "-CFA" );
     484                // -CFA implies cc1 stage 2, but gcc does not pass the -o file to this stage because it believes the file is for
     485                // the linker. Hence, the -o file is explicit passed to cc1 stage 2 and used as cfa-cpp's output file.
     486                if ( o_file ) Putenv( argv, string( "-o=" ) + argv[o_file] );
     487        } else {
     488                Putenv( argv, "-L" );
    488489        } // if
    489490
Note: See TracChangeset for help on using the changeset viewer.