• 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: Any predefined macro for current function?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any predefined macro for current function?


  • Subject: Re: Any predefined macro for current function?
  • From: Chris Ridd <email@hidden>
  • Date: Wed, 10 May 2006 22:22:34 +0100
  • Thread-topic: Any predefined macro for current function?

On 10/5/06 9:08, Eric Albert <email@hidden> wrote:

> On May 10, 2006, at 1:02 PM, Chris Ridd wrote:
>
>> On 10/5/06 8:58, Tommy Nordgren <email@hidden> wrote:
>>
>>> Are there any predefined macro in gcc 4.0 that expands to the name of
>>> the function
>>> currently compiled?
>>> If available, this would help in writing debug logging macros.
>>
>> GCC defines __FUNCTION__, which is either the function you're in,
>> or the
>> Objective-C method name.
>
> The C standard (C99, that is) specifies __func__, which gcc also
> supports:
> <http://gcc.gnu.org/onlinedocs/gcc/Function-Names.html>

Thanks for the heads up; it is much better to use something standard.

Cheers,

Chris


 _______________________________________________
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

References: 
 >Re: Any predefined macro for current function? (From: Eric Albert <email@hidden>)

  • Prev by Date: Re: Any predefined macro for current function?
  • Next by Date: syntax coloring for here-doc style Perl code
  • Previous by thread: Re: Any predefined macro for current function?
  • Next by thread: Re: Any predefined macro for current function?
  • Index(es):
    • Date
    • Thread