aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Lexer.mll
diff options
context:
space:
mode:
authorXavier Leroy <xavier.leroy@inria.fr>2014-09-21 16:56:32 +0200
committerXavier Leroy <xavier.leroy@inria.fr>2014-09-21 16:56:32 +0200
commitea81ecd2870df743bf71e0317d60ae787dcbe17d (patch)
treeb3aa473f179c990b3bd6c035c80eac0e67834267 /cparser/Lexer.mll
parent0899260c83d012af0a50d4099abf039f53d61fbb (diff)
downloadcompcert-kvx-ea81ecd2870df743bf71e0317d60ae787dcbe17d.tar.gz
compcert-kvx-ea81ecd2870df743bf71e0317d60ae787dcbe17d.zip
GCCism: accept __volatile and __volatile__
These alternate keywords for "volatile" are used in some header files in the wild.
Diffstat (limited to 'cparser/Lexer.mll')
-rw-r--r--cparser/Lexer.mll2
1 files changed, 2 insertions, 0 deletions
diff --git a/cparser/Lexer.mll b/cparser/Lexer.mll
index 53a27d81..3ab83902 100644
--- a/cparser/Lexer.mll
+++ b/cparser/Lexer.mll
@@ -67,6 +67,8 @@ let init filename channel : Lexing.lexbuf =
("unsigned", fun loc -> UNSIGNED loc);
("void", fun loc -> VOID loc);
("volatile", fun loc -> VOLATILE loc);
+ ("__volatile", fun loc -> VOLATILE loc);
+ ("__volatile__", fun loc -> VOLATILE loc);
("while", fun loc -> WHILE loc);
("_Alignas", fun loc -> ALIGNAS loc);
("_Alignof", fun loc -> ALIGNOF loc);