Created On:  30 January 2012


When verifying C programs in Modernization Workbench, the C/C++ PARSER PARAMETERS OPTION, should be populated with the compilation options of the programs involved.

For example:

/Ox /Ob1 /I "\include\doddle" /I "\include\softnet" /I "\coms" /I "\teller\sources\include" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "DODWIN" /D "DOS" /D "DIP" /D "IBMPC" /D "NTE" /D "COMG" /D "_WIN32_DCOM" /D "_COMCAU" /D "AUTOTREAS" /D "BOC" /D "DODCOM" /D "ENGLISH" /D "TELLER" /D "TLRRUNS" /D "EMV" /D "DELAYTOTCLR" /D "USEBINTABLE" /D "HAL_OUTPUT" /D "DEMOIMG" /D "DTR" /D "B4DTR" /GF /FD /EHsc /MT /Zp2 /Gy /Yu"stdafx.h" /Fp"\teller\objects\win32\Release/TELLER.pch" /Fo"\teller\objects\win32\Release/" /Fd"\teller\objects\win32\Release/" /W3 /nologo /c

Verification results in the error - 53000 - Too Many Arguements on the command line.

How can this be overcome?


The "C/C++ Parser Parameters" field is used to pass information to our C/C++ parser (an external product from EDG), and not the Visual Studio parser (which is where
the client's command-line info came from).

In general, our parser primarily cares about two types of parameters:

  -D : used to specify symbol definitions
  -I : used to specify include file directories

The -I values are usually taken from the "List of Include Directories" option, rather than the "Parser Parameters" option, only the -D options need to be specified.

The only other reason the "Parser Parameters" option would be used by most clients would be special cases - for example, a client that is using some specific syntax
that has to be separately enabled in the EDG parser.  Most clients don't need to import their Visual Studio command-line into the option field.

So there are three problems with the client's command-line parameters:

1. The EDG parser, unlike Visual Studio, uses "-" to mark command-line switches, and not "/". So it uses "-D", not "/D".

2. There are many parameters present that are not relevant to our parser; for example,
"/Ox" specifies an optimization level, and our parser does not perform optimization (since it is really only doing syntax scanning).

3. The length of the entire command-line is longer than the allowed 256 characters 

The changes necessary to overcome this problem are...
1. Move the "/I" parameters into the "List of Include Directories" option.
    Within Project OPTIONS, on the VERIFICATION tab, under C File, add the required entries in the List Of Include Directories option. 
2. Change the various "/D" parameters to use "-D" instead.

3. Remove the other parameters completely.

4. Then re-verify the sources affected.
Incident #2548377