Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
16 Views

error #791: calling convention specified more than once

Jump to solution
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

Accepted Solutions
Highlighted
Employee
16 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
Highlighted
Employee
17 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
Highlighted
Beginner
16 Views
Thank you -- it appears that the WDK build infrastructure inserts /WX by default. Overriding this fixed my build.
0 Kudos