This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
extern "C" should not make a difference.
- To: egcs at cygnus dot com
- Subject: extern "C" should not make a difference.
- From: "Han Holl" <jeholl at euronet dot nl>
- Date: Tue, 24 Feb 1998 20:00:32 +0100 (MET)
The following:
void f(unsigned char *(*)[][2]);
produces:
t6.C:3: pointer or reference to array of unknown bound in parm type
But with extern "C" linkage, it compiles (even with -W -Wall -pedantic -ansi).
Stroustrup 3ed, 9.2.4, pg 206:
"In particular,a function declared extern "C" still obeys the C++ type
checking and argument conversion rules and not the weaker C rules."
It looks like egcs uses name mangling for error checking purposes.
Han Holl