From: Eli Friedman Date: Wed, 27 May 2009 22:48:34 +0000 (+0000) Subject: restrict is not a keyword in gnu89 mode. Change TokenKinds.def to X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2073fd555f714e9632d70e9c5a88d140930aeadb;p=clang restrict is not a keyword in gnu89 mode. Change TokenKinds.def to reflect that. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/TokenKinds.def b/include/clang/Basic/TokenKinds.def index d5575ca99a..9b65288f68 100644 --- a/include/clang/Basic/TokenKinds.def +++ b/include/clang/Basic/TokenKinds.def @@ -203,7 +203,7 @@ KEYWORD(inline , KEYC99|KEYCXX|KEYGNU) KEYWORD(int , KEYALL) KEYWORD(long , KEYALL) KEYWORD(register , KEYALL) -KEYWORD(restrict , KEYC99|KEYGNU) +KEYWORD(restrict , KEYC99) KEYWORD(return , KEYALL) KEYWORD(short , KEYALL) KEYWORD(signed , KEYALL) diff --git a/test/Sema/gnu89.c b/test/Sema/gnu89.c new file mode 100644 index 0000000000..4601cbe93f --- /dev/null +++ b/test/Sema/gnu89.c @@ -0,0 +1,3 @@ +// RUN: clang-cc %s -std=gnu89 -pedantic -fsyntax-only -verify + +int f(int restrict);