From 285933f8ca633495e7e4d03481a58ead3323c504 Mon Sep 17 00:00:00 2001 From: Xavier Leroy Date: Thu, 7 Jun 2018 15:26:02 +0200 Subject: Remove the `_Alignas(expr)` construct (#125) The `_Alignas(expr)` construct is not C11, only `_Alignas(type)` is. --- cparser/Parser.vy | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cparser/Parser.vy') diff --git a/cparser/Parser.vy b/cparser/Parser.vy index 7fe686f1..b3731809 100644 --- a/cparser/Parser.vy +++ b/cparser/Parser.vy @@ -172,10 +172,8 @@ unary_expression: | loc = SIZEOF LPAREN typ = type_name RPAREN { (TYPE_SIZEOF typ, loc) } (* Non-standard *) -| loc = ALIGNOF expr = unary_expression - { (EXPR_ALIGNOF (fst expr), loc) } | loc = ALIGNOF LPAREN typ = type_name RPAREN - { (TYPE_ALIGNOF typ, loc) } + { (ALIGNOF typ, loc) } unary_operator: | loc = AND @@ -546,7 +544,7 @@ attribute_specifier: | loc = ALIGNAS LPAREN args = argument_expression_list RPAREN { (ALIGNAS_ATTR (rev' args) loc, loc) } | loc = ALIGNAS LPAREN typ = type_name RPAREN - { (ALIGNAS_ATTR [TYPE_ALIGNOF typ] loc, loc) } + { (ALIGNAS_ATTR [ALIGNOF typ] loc, loc) } gcc_attribute_list: | a = gcc_attribute -- cgit