Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

g++ inline behavior

68 views
Skip to first unread message

Johann Klammer

unread,
Sep 28, 2014, 6:26:04 PM9/28/14
to
Hello,

I was trying to recompile icarus verilog on my box, and ran into this
rather strange bug.

<http://members.aon.at/~aklamme4/scratch/gcc_fail.tbz>

This contains two .cc files and one script that compiles(ignore the
warnings) and links them. When linking it complains:

/./gcc_a.cc:23: undefined reference to `check_identifier(char const*,
unsigned int)'
collect2: error: ld returned 1 exit status

The function is there but declared with:

#ifdef __GNUC__
__inline
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
const struct lexor_keyword *
...

It does not get called from outside...

-rdynamic and -ldl do not seem to change things

Versions:

$ dpkg -l binutils gcc
Desired=Unknown/Install/Remove/Purge/Hold
|
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-============-============-=================================
ii binutils 2.24.51.2014 i386 GNU assembler, linker and
binary
ii gcc 4:4.9.1-1 i386 GNU C compiler

(on a debian testing)

The code fragment is from a gperf generated file....

Note: g++ is used for compilation.

what to do?

PS: I've posted this to a gnu.gcc.help newsgroup and a
help-gp...@gnu.org mailing list earlier, but this place seems more
lively.


Louis Krupp

unread,
Sep 28, 2014, 11:28:01 PM9/28/14
to
A search for __gnu_inline__ turned up this:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41194

I don't understand it, but you might find it useful.

Louis

Johann Klammer

unread,
Sep 29, 2014, 7:01:09 AM9/29/14
to
On 09/29/2014 05:28 AM, Louis Krupp wrote:
>
> A search for __gnu_inline__ turned up this:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41194
>
> I don't understand it, but you might find it useful.
>
> Louis
>
Thanks, I'll file a bug with iverilog, then.

0 new messages