C++ bug when using extern "C"

Dima Volodin dvv@egcs.dvv.ru
Sat Jul 14 16:02:00 GMT 2001


On Fri, 13 Jul 2001 23:01:16 +0200, you wrote:

>Hi,
>
>Today I may have hit a bug in g++.
>Try compiling the following program with g++ -c
>
>extern "C" {
>  void xxx(void (*f)());
>  void yyy(void (*f)(void));
>}
>
>void xxx(void (*f)())
>{
>}
>
>void yyy(void (*f)(void))
>{
>}

AFAIK, you must specify the linkage for both declarations and
definitions.

>Dirk De Rycke

Dima



More information about the Gcc-bugs mailing list