Re: /bzr/squid3/trunk/ r9533: Add MYNAME macro for use in debugs

From: Henrik Nordstrom <henrik_at_henriknordstrom.net>
Date: Sun, 08 Mar 2009 22:10:37 +0100

tis 2009-02-24 klockan 14:38 +1300 skrev Amos Jeffries:
> #define HERE __FILE__<<"("<<__LINE__<<") "<<__FUNCTION__<<": "

__func__ is the standardized name, at least in C (C99).

> +#ifdef __PRETTY_FUNCTION__
> +#define MYNAME __PRETTY_FUNCTION__ << " "
> +#else
> +#define MYNAME __FUNCTION__ << " "
> +#endif

That should not work proper.. __PRETTY_FUNCTION__ is not a macro, it's a
builtin variable name.

See the GCC manual.

Regards
Henrik
Received on Sun Mar 08 2009 - 21:10:46 MDT

This archive was generated by hypermail 2.2.0 : Mon Mar 09 2009 - 12:00:03 MDT