From 4e62a2c4b2c809ea020423e7e328ba96e379d64d Mon Sep 17 00:00:00 2001 From: Bernhard Schommer Date: Wed, 23 Mar 2016 14:22:33 +0100 Subject: Added the _Noreturn keyword. CompCert now recognizes the C11 _Noreturn function specifier and emits a simple warning for functions declared _Noreturn containing a return statement. Also the stdnoreturn header and additionally the stdalign header are added. Bug 18541 --- cparser/Lexer.mll | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cparser/Lexer.mll') diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 871f2bf9..d3747e22 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -65,6 +65,7 @@ let () = ("goto", fun loc -> GOTO loc); ("if", fun loc -> IF loc); ("inline", fun loc -> INLINE loc); + ("_Noreturn", fun loc -> NORETURN loc); ("int", fun loc -> INT loc); ("long", fun loc -> LONG loc); ("register", fun loc -> REGISTER loc); @@ -551,6 +552,7 @@ and singleline_comment = parse | MOD_ASSIGN loc -> loop MOD_ASSIGN't loc | MUL_ASSIGN loc -> loop MUL_ASSIGN't loc | NEQ loc -> loop NEQ't loc + | NORETURN loc -> loop NORETURN't loc | OR_ASSIGN loc -> loop OR_ASSIGN't loc | PACKED loc -> loop PACKED't loc | PERCENT loc -> loop PERCENT't loc -- cgit