]> andersk Git - splint.git/commitdiff
In response to [ 689702 ] Missing C99 __func__ predefined identifier
authordrl7x <drl7x>
Thu, 6 Mar 2003 04:29:34 +0000 (04:29 +0000)
committerdrl7x <drl7x>
Thu, 6 Mar 2003 04:29:34 +0000 (04:29 +0000)
 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.

lib/ansi.h

index 6623d8b7823dff17b5a41fb0b5461ed25be167aa..add8f09062c64bd6a4101c09544f90860e91f373 100644 (file)
@@ -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";
This page took 0.0654 seconds and 5 git commands to generate.