• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: multiple definitions of symbol _xxxx
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multiple definitions of symbol _xxxx


  • Subject: Re: multiple definitions of symbol _xxxx
  • From: Thomas Engelmeier <email@hidden>
  • Date: Fri, 9 Feb 2007 11:46:14 +0100


On 09.02.2007, at 11:26, Steve Checkoway wrote:

On Feb 9, 2007, at 1:21 AM, Thomas Engelmeier wrote:

BTW, it is not necessary to use static for C++ inlines in order to enforce "local" linkage. I am not sure if C99 has inline as keyword and how it handles it, though.

6.4.1.1 of ISO/IEC 9899:1999 (E) specifies inline as a keyword. 6.7.4 describes the requirements on inline. There are somewhat mysterious interactions between inline and functions with external linkage that I don't really care to try to parse:


6.7.4.6 says
Any function with internal linkage can be an inline function. For a function with external linkage, the following restrictions apply: If a function is declared with an inline function specifier, then it shall also be defined in the same translation unit. If all of the file scope declarations for a function in a translation unit include the inline function specifier without extern, then the definition in that translation unit is an inline definition. An inline definition does not provide an external definition for the function, and does not forbid an external definition in another translation unit. An inline definition provides an alternative to an external definition, which a translator may use to implement any call to the function in the same translation unit. It is unspecified whether a call to the function uses the inline definition or the external definition.

The spec doesn't seem to say anything about inline forcing internal linkage.

Well for me it parses to "inline means translation unit local linkage. inline can be used in C99 to provide a different implementation of an existing external function, but in this case it is implementation specific which function will be used"...


(Which IMO renders the option to provide an alternative function useless.)

Regards,
	Tom_E
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: multiple definitions of symbol _xxxx
      • From: Steve Checkoway <email@hidden>
References: 
 >multiple definitions of symbol _xxxx (From: Ken Tozier <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Steve Christensen <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Eric Albert <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Steve Christensen <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Ken Tozier <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Thomas Engelmeier <email@hidden>)
 >Re: multiple definitions of symbol _xxxx (From: Steve Checkoway <email@hidden>)

  • Prev by Date: Re: How to find out if my app is running on PPC or i386
  • Next by Date: Re: Strange behavior in XCode, not exhibited in Dev-C++
  • Previous by thread: Re: multiple definitions of symbol _xxxx
  • Next by thread: Re: multiple definitions of symbol _xxxx
  • Index(es):
    • Date
    • Thread