mirror of
https://github.com/pragma-/pbot.git
synced 2024-11-19 10:29:30 +01:00
CGrammar: Add C11's _Alignof
This commit is contained in:
parent
162e264e82
commit
9623086310
@ -13,8 +13,8 @@ use warnings;
|
||||
# These are set automatically by the build/commit script
|
||||
use constant {
|
||||
BUILD_NAME => "PBot",
|
||||
BUILD_REVISION => 711,
|
||||
BUILD_DATE => "2014-07-05",
|
||||
BUILD_REVISION => 712,
|
||||
BUILD_DATE => "2014-07-06",
|
||||
};
|
||||
|
||||
1;
|
||||
|
@ -973,6 +973,12 @@ unary_expression:
|
||||
{ $return = "the size of the type of the expression ($item{assignment_expression})"; }
|
||||
| 'sizeof' unary_expression[context => 'sizeof']
|
||||
{ $return = "the size of $item{unary_expression}"; }
|
||||
| Alignof '(' type_name ')'
|
||||
{ $return = "the alignment of the type $item{type_name}"; }
|
||||
|
||||
Alignof:
|
||||
'_Alignof'
|
||||
| 'alignof'
|
||||
|
||||
postfix_productions:
|
||||
'(' argument_expression_list(?) ')' postfix_productions[context => 'function call'](?)
|
||||
@ -1824,6 +1830,6 @@ string:
|
||||
reserved:
|
||||
/(auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto
|
||||
|if|inline|int|long|register|restrict|return|short|signed|sizeof|static|struct|switch|typedef
|
||||
|union|unsigned|void|volatile|while|_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic
|
||||
|union|unsigned|void|volatile|while|_Alignas|alignas|_Alignof|alignof|_Atomic|_Bool|_Complex|_Generic
|
||||
|_Imaginary|_Noreturn|_Static_assert|_Thread_local)\b/x
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user