bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#44795: automake-1.16.3 make check failed on Solaris 11.3 x86/x64


From: Karl Berry
Subject: bug#44795: automake-1.16.3 make check failed on Solaris 11.3 x86/x64
Date: Sun, 22 Nov 2020 16:19:03 -0700

    joe.cc:84:21: error: conflicting declaration of 'int yylex()' with 'C' 
linkage
       84 | #define YY_DECL int yylex (void)
          |                     ^~~~~
    joe.cc:85:12: note: in expansion of macro 'YY_DECL'
       85 | extern "C" YY_DECL;
          |            ^~~~~~~
    joe.cc:32:6: note: previous declaration with 'C++' linkage
       32 |  int yylex(void);
          |      ^~~~~

I'm sorry, but I don't know what to do. Apparently the error is
intentional in gcc10 (I think it's about gcc10, not Solaris), and the
same identifier can't be defined in two language "linkage" namespaces.
So how is anyone supposed to write code that works under both C and C++
any more?  I'm obviously missing something fundamental.

Anyway, in the particular case at hand, those tests include the code:

#define YY_DECL int yylex (void)
extern "C" YY_DECL;
..
extern "C" int yylex (void);

I assume it was written that way because it had to be. So I don't know
how to change it to placate the compiler (and still work with older
compilers).

Paul, Jim, anyone?

Thanks for the report,
Karl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]