From: drl7x Date: Thu, 6 Mar 2003 04:29:34 +0000 (+0000) Subject: In response to [ 689702 ] Missing C99 __func__ predefined identifier X-Git-Tag: splint-3_1_0~41 X-Git-Url: http://andersk.mit.edu/gitweb/splint.git/commitdiff_plain/e12d6988fa4e9f96f4b4d13d783a4e95761f6196 In response to [ 689702 ] Missing C99 __func__ predefined identifier Added the __func__ identifier from C99 Not this won't follow the same semantics as __func__ in C99 FWIW C99 says that __func__ should have the value of the lexically enclosing function e.g. in the function foo __func__ == "foo" in bar __func__ == "bar" We're just having the value be constant here and picking an arbitary value. --- diff --git a/lib/ansi.h b/lib/ansi.h index 6623d8b..add8f09 100644 --- a/lib/ansi.h +++ b/lib/ansi.h @@ -1252,3 +1252,17 @@ typedef /*@unsignedintegraltype@*/ uintmax_t; /*@constant size_t INTPTR_MIN@*/ /*@constant size_t INTPTR_MAX@*/ + +/*drl added the __func__ identifier from C99 + This won't follow the same semantics as + __func__ in C99 + + FWIW C99 says that __func__ should have the value of the + lexically enclosing function + e.g. in the function foo __func__ == "foo" + in bar __func__ == "bar" + + We're just having the value be constant here and picking + an arbitary value. +*/ +static const char _ _func_ _[] = "function-name";