Turn __FUNCTION__ into an alias for __func__.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 23 May 2012 05:29:01 +0000 (07:29 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 23 May 2012 05:31:15 +0000 (07:31 +0200)
parser.c
tokens.inc

index e87bbb2..0a2b4e9 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -254,7 +254,6 @@ static void semantic_comparison(binary_expression_t *expression);
        case T_STRING_LITERAL:            \
        case T___FUNCDNAME__:             \
        case T___FUNCSIG__:               \
-       case T___FUNCTION__:              \
        case T___PRETTY_FUNCTION__:       \
        case T___alignof__:               \
        case T___builtin_classify_type:   \
@@ -6674,7 +6673,6 @@ static expression_t *parse_primary_expression(void)
        case T_FLOATINGPOINT:                return parse_number_literal();
        case T_CHARACTER_CONSTANT:           return parse_character_constant();
        case T_STRING_LITERAL:               return parse_string_literal();
-       case T___FUNCTION__:
        case T___func__:                     return parse_function_keyword(FUNCNAME_FUNCTION);
        case T___PRETTY_FUNCTION__:          return parse_function_keyword(FUNCNAME_PRETTY_FUNCTION);
        case T___FUNCSIG__:                  return parse_function_keyword(FUNCNAME_FUNCSIG);
@@ -9783,7 +9781,6 @@ static statement_t *parse_compound_statement(bool inside_expression_statement)
        add_anchor_token(T__Bool);
        add_anchor_token(T__Complex);
        add_anchor_token(T__Imaginary);
-       add_anchor_token(T___FUNCTION__);
        add_anchor_token(T___PRETTY_FUNCTION__);
        add_anchor_token(T___alignof__);
        add_anchor_token(T___attribute__);
@@ -9951,7 +9948,6 @@ static statement_t *parse_compound_statement(bool inside_expression_statement)
        rem_anchor_token(T___attribute__);
        rem_anchor_token(T___alignof__);
        rem_anchor_token(T___PRETTY_FUNCTION__);
-       rem_anchor_token(T___FUNCTION__);
        rem_anchor_token(T__Imaginary);
        rem_anchor_token(T__Complex);
        rem_anchor_token(T__Bool);
index 162e73b..3bbfde0 100644 (file)
@@ -101,9 +101,7 @@ S(_ALL, __builtin_islessequal)
 S(_ALL, __builtin_islessgreater)
 S(_ALL, __builtin_isunordered)
 S(_ALL, __PRETTY_FUNCTION__)
-S(_ALL, __FUNCTION__)
 S(_ALL, __label__)
-S(_C99, __func__)
 S(_MS, __FUNCSIG__)
 S(_MS, __FUNCDNAME__)
 #undef S
@@ -131,6 +129,8 @@ S(_MS, __FUNCDNAME__)
 #undef __restrict
 
 #define S(mode, x, val) T(mode, x, #x, val)
+S(_C99,            __func__,)
+S(_ALL,            __FUNCTION__,           = T___func__)
 S(_ANSI|_C99|_CXX,   signed,               )
 S(_ALL,            __signed,               = T_signed)
 S(_ALL,            __signed__,             = T_signed)