This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ bug when using extern "C"


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]