Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7956 Discussions

error #791: calling convention specified more than once

phastphill
Beginner
420 Views
I recently upgraded the Intel C++ Compiler in my build environment from v11 (067) to v12 (12.0.1.127 Build 20101116).
With the new compiler, I get error #791 when compiling rpcndr.h (a header in the MS Windows DDK). The same file compiles without issue with v11.
The offending lines of code are lines 1428-1446:
RPCRTAPI
unsigned char * RPC_ENTRY
RPC_ENTRY
NdrCsArrayUnmarshall(
PMIDL_STUB_MESSAGE pStubMsg,
unsigned char ** ppMemory,
PFORMAT_STRING pFormat,
unsigned char fMustAlloc
);
RPCRTAPI
unsigned char * RPC_ENTRY
RPC_ENTRY
NdrCsTagUnmarshall(
PMIDL_STUB_MESSAGE pStubMsg,
unsigned char ** ppMemory,
PFORMAT_STRING pFormat,
unsigned char fMustAlloc
);
Documentation of the error is sparse:
Why does this cause errors in v12 and not with v11?
Thanks,
Phill Williams
0 Kudos
1 Solution
Judith_W_Intel
Employee
420 Views

This diagnostic is never an error by default. It is only a warning. You must be doing something special (like using the /WX command line option) to turn this warning into an error.

The warning occurswhen you specify the same calling convention more than once on a functiondeclaration, i.e.:

void __cdecl __cdecl foo();

If you preprocess the file (using -E or -P) you should be able to see the actual declarations after macro expansion.

Judy

View solution in original post

0 Kudos
2 Replies
Judith_W_Intel
Employee
421 Views

This diagnostic is never an error by default. It is only a warning. You must be doing something special (like using the /WX command line option) to turn this warning into an error.

The warning occurswhen you specify the same calling convention more than once on a functiondeclaration, i.e.:

void __cdecl __cdecl foo();

If you preprocess the file (using -E or -P) you should be able to see the actual declarations after macro expansion.

Judy
0 Kudos
phastphill
Beginner
420 Views
Thank you -- it appears that the WDK build infrastructure inserts /WX by default. Overriding this fixed my build.
0 Kudos
Reply