diff --git a/cfg/gnu.cfg b/cfg/gnu.cfg index 95616a87e..3aa6d58d0 100644 --- a/cfg/gnu.cfg +++ b/cfg/gnu.cfg @@ -47,6 +47,7 @@ + diff --git a/lib/tokenize.cpp b/lib/tokenize.cpp index 8951d5768..388c5758a 100644 --- a/lib/tokenize.cpp +++ b/lib/tokenize.cpp @@ -842,8 +842,8 @@ void Tokenizer::simplifyTypedef() } } - // typeof: typedef __typeof__ ( ... ) type; - else if (Token::simpleMatch(tokOffset->previous(), "__typeof__ (") && + // typeof: typedef typeof ( ... ) type; + else if (Token::simpleMatch(tokOffset->previous(), "typeof (") && Token::Match(tokOffset->link(), ") %type% ;")) { argStart = tokOffset; argEnd = tokOffset->link(); diff --git a/test/testsimplifytypedef.cpp b/test/testsimplifytypedef.cpp index 30f2555cf..939a13f83 100644 --- a/test/testsimplifytypedef.cpp +++ b/test/testsimplifytypedef.cpp @@ -1626,10 +1626,10 @@ private: } void simplifyTypedef64() { - const char code[] = "typedef __typeof__(__type1() + __type2()) __type;" + const char code[] = "typedef typeof(__type1() + __type2()) __type;" "__type t;"; const std::string actual(tok(code)); - ASSERT_EQUALS("__typeof__ ( __type1 ( ) + __type2 ( ) ) t ;", actual); + ASSERT_EQUALS("typeof ( __type1 ( ) + __type2 ( ) ) t ;", actual); ASSERT_EQUALS("", errout.str()); }