buggperf - Bugs: bug #37071, plain inlines (with external...


bug #37071: plain inlines (with external linkage) cause havoc when mixed with internal linkage inlines

Submitted by:  Sebastian Freundt <hroptatyr>
Submitted on:  Fri 10 Aug 2012 12:50:03 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Fri 10 Aug 2012 12:50:03 PM UTC, original submission:

The emitted code

#ifdef _GNUC_
#ifdef __cplusplus
static unsigned int
__tid_hash (register const char *str, register unsigned int len)

has internal linkage (as per the static keyword).

In contrast, a few lines down the road:

#ifdef _GNUC_
#if defined _GNUC_STDC_INLINE_ || defined _GNUC_GNU_INLINE_
_attribute_ ((_gnu_inline_))
const struct tws_xml_tag_s *
__tiddify (register const char *str, register unsigned int len)
register int key = __tid_hash (str, len);

there's a reference from a function with external linkage (as per the plain inline) to a function with internal linkage.

This results in a warning:

../../src/proto-twsxml-tag.gperf(28): warning #1173: an entity with internal linkage cannot be referenced within an inline function with external linkage

Suggested fix:
Both functions (maybe optionally) should have internal linkage.

Sebastian Freundt <hroptatyr>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by hroptatyr (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    No Changes Have Been Made to This Item

    Back to the top

    Powered by Savane 3.1-cleanup