error #5082 (Tell fpp to ignore c++ style comment?)

error #5082 (Tell fpp to ignore c++ style comment?)

FortCpp's picture

Dear ifort users and intel developers,

I am trying a small hello world program. But I got some error messages like these:

>C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include/petscconf.h(374): error #5082: Syntax error, found '//' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...
1>C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include/petscconf.h(374): error #5082: Syntax error, found END-OF-STATEMENT when expecting one of: ( =
1>C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include/petscconf.h(375): error #5082: Syntax error, found '//' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...
1>C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include/petscconf.h(375): error #5082: Syntax error, found INTEGER_CONSTANT '1' when expecting one of: ( =
1>C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include/petscconf.h(376): error #5082: Syntax error, found '//' when expecting one of: <LABEL> <END-OF-STATEMENT> ; BLOCK BLOCKDATA PROGRAM MODULE TYPE INTEGER REAL ...

the corresponding lines are:

//#ifndef PETSC_HAVE__INTEL_FAST_MEMCPY
//#define PETSC_HAVE__INTEL_FAST_MEMCPY 1
//#endif

Here is the command line:

/nologo /debug:full /Od /fpp /I"C:\Program Files\WinPETSc\PETSc\include" /I"C:\Program Files\WinPETSc\PETSc\c-debug_icl_mkl\include" /I"C:\MPICH2_x86-64\include" /module:"x64\Debug\\" /object:"x64\Debug\\" /Fd"x64\Debug\vc100.pdb" /traceback /check:bounds /check:stack /libs:static /threads /dbglibs /c

I guess the problem is that fpp didn't ignore c++ sytle comment. But I can't find how to tell fpp to do so. Could you help me out? Thanks!

4 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
mecej4's picture

Fortran is not C++. The double slash is used as the string concatenation operator in Fortran, so it cannot be used to signify "start of comment".

FortCpp's picture

OK. I see. Thanks.

Steve Lionel (Intel)'s picture

However, if you really want to do this, you need to use:

/fpp:"-noB"

on the command line. This variation can't be specified using the Visual Studio property, so you'd have to add it on the "Command Line" property page.  I don't recommend it.

Steve

Login to leave a comment.