IBM Support

PI49444: VISUAL C++ COMPILER FLAG /ZC:FORSCOPE- IS BEING IGNORED WHEN SCANNING C/C++ PROJECTS.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as new function.

Error description

  • Visual C++ compiler flag  /Zc:forScope- is being ignored when
    scanning C/C++ projects.
    This is causing compilation errors:
    
    08/19/15 13:56:01 - Skipping file BOBundleManager.cpp due to
    error: "D:\git\dev\CMServers\BO\BOBundling\BOBundleManager.cpp",
    line 2675: error:
              identifier "i" is undefined
         for( i = 0; i < count; i++ )
    
    Expected behavior:
    
    The C/C++ code should compile cleanly when this flag is used,
    without making any additional changes manually to the project.
    

Local fix

  • There are two work arounds available;
    
    Option 1:
    
    1. Open scan.ozsettings file in a text editor
    2. Search for cl_to_edg_option_mapping
    3. In the value attribute add zcforScope=--old_for_init; in
    front of Zp1=--pack_alignment 1
    4. Save the scan.ozsettings file
    5. In Visual Studio, open the project properties
    6. Go to Configuration Properties -> C\C++ -> Command Line
    7. Add /zcforScope to the Additional Options text area
    8. Click Apply & OK
    9. Restart the AppScan Source client
    10. Rescan
    
    Option 2:
    
    1. Create a new application
    2. Do a Copy as Manual Project to the application created in
    step 1
    3. Open the project properties of the copied project
    4. Go to the Project Dependencies Tab
    5. In the Options field add the following:
    --edg --old_for_init
    
    5. Save the changes
    6. Scan the copied project
    

Problem summary

  • ****************************************************************
    * USERS AFFECTED:                                              *
    * Any user who scans their C/C++ code using AppScan Source for *
    * Analysis product on a Microsoft Windows machine.             *
    ****************************************************************
    * PROBLEM DESCRIPTION:                                         *
    * A C/C++ project can be successfully scanned in Microsoft     *
    * Visual Studio using the compiler flag  /ZC:FORSCOPE-, but    *
    * when that same project is imported into AppScan Source, it   *
    * fails to compile/scan because that flag is not recognized.   *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    

Problem conclusion

  • We fixed the code so AppScan Source now recognizes
    /ZC:FORSCOPE- flag and scans the project successfully.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PI49444

  • Reported component name

    SEC APPSCAN SRC

  • Reported component ID

    5724Z3400

  • Reported release

    902

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2015-09-28

  • Closed date

    2015-11-17

  • Last modified date

    2015-12-21

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    SEC APPSCAN SRC

  • Fixed component ID

    5724Z3400

Applicable component levels

  • R900 PSY

       UP

  • R901 PSY

       UP

  • R902 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSS9LM","label":"IBM Security AppScan Source for Automation"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"902","Line of Business":{"code":"LOB24","label":"Security Software"}}]

Document Information

Modified date:
20 December 2021