This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: how to declare dynamic 2-dimensional array in C++?


In article <3870E536.5A00FA79@earthlink.net> Martin Ambuhl <mambuhl@earthlink.net> writes:
>"Johnny Favorite (it means \"Writhing Tentacle of Death\")" wrote:
>> Alex Vinokur wrote:
>> > 3. __PRETTY_FUNCTION__
>> >     --FUNCTION__
>> 
>> Since your other two examples were pretty cool-sounding I have to ask about
>> this one.  What the heck does __PRETTY_FUNCTION__ do?
>
>File: gcc.info,  Node: Function Names,  Next: Return Address,  Prev:
>Incomplete Enums,  Up: C Extensions
>
>Function Names as Strings
>=========================
>
>   GNU CC predefines two string variables to be the name of the current
>function.  The variable `__FUNCTION__' is the name of the function as
>it appears in the source.  The variable `__PRETTY_FUNCTION__' is the
>name of the function pretty printed in a language specific fashion.

BTW, C99 now support an __func__ predefined variable to do this.

- Greg
-- 
       Comeau Computing, 91-34 120th Street, Richmond Hill, NY, 11418-3214
          Producers of Comeau C/C++ 4.2.42 -- NOTE 4.2.42 NOW AVAILABLE
    Email: comeau@comeaucomputing.com / Voice:718-945-0009 / Fax:718-441-2310
                *** WEB: http://www.comeaucomputing.com *** 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]