diff options
author | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2022-05-02 17:31:35 +0200 |
---|---|---|
committer | Xavier Leroy <xavier.leroy@college-de-france.fr> | 2022-05-13 11:21:18 +0200 |
commit | e44143ad023400c7a8193b7e9fc3b62b9f9614e1 (patch) | |
tree | e887f1fac6525441ab4ebdb9de56aa3525eeea0d /cparser/Lexer.mll | |
parent | 1d572b330362711c808094333134ba94fcd7b768 (diff) | |
download | compcert-e44143ad023400c7a8193b7e9fc3b62b9f9614e1.tar.gz compcert-e44143ad023400c7a8193b7e9fc3b62b9f9614e1.zip |
Support _Generic from ISO C 2011
Entirely handled during elaboration. No impact on the verified part of CompCert.
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r-- | cparser/Lexer.mll | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll index 42980d30..9f7fba1e 100644 --- a/cparser/Lexer.mll +++ b/cparser/Lexer.mll @@ -34,6 +34,7 @@ let () = ("_Alignas", fun loc -> ALIGNAS loc); ("_Alignof", fun loc -> ALIGNOF loc); ("_Bool", fun loc -> UNDERSCORE_BOOL loc); + ("_Generic", fun loc -> GENERIC loc); ("_Complex", fun loc -> reserved_keyword loc "_Complex"); ("_Imaginary", fun loc -> reserved_keyword loc "_Imaginary"); ("_Static_assert", fun loc -> STATIC_ASSERT loc); @@ -538,6 +539,7 @@ and singleline_comment = parse | Pre_parser.EXTERN loc -> loop (Parser.EXTERN loc) | Pre_parser.FLOAT loc -> loop (Parser.FLOAT loc) | Pre_parser.FOR loc -> loop (Parser.FOR loc) + | Pre_parser.GENERIC loc -> loop (Parser.GENERIC loc) | Pre_parser.GEQ loc -> loop (Parser.GEQ loc) | Pre_parser.GOTO loc -> loop (Parser.GOTO loc) | Pre_parser.GT loc -> loop (Parser.GT loc) |