File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ extern char *yyansi_ctext;
148
148
%token TOK_GCC_BUILTIN_TYPES_COMPATIBLE_P " __builtin_types_compatible_p"
149
149
%token TOK_OFFSETOF " __offsetof"
150
150
%token TOK_ALIGNOF " __alignof__"
151
+ %token TOK_CONVERTVECTOR " __builtin_convertvector"
151
152
%token TOK_MSC_TRY " __try"
152
153
%token TOK_MSC_FINALLY " __finally"
153
154
%token TOK_MSC_EXCEPT " __except"
@@ -647,6 +648,11 @@ unary_expression:
647
648
stack ($$).id(ID_alignof);
648
649
stack ($$).add(ID_type_arg).swap(stack($3 ));
649
650
}
651
+ | TOK_CONVERTVECTOR ' (' unary_expression ' ,' type_name ' )'
652
+ {
653
+ // TODO: cast each vector element of $3 to $5
654
+ $$ =$3 ;
655
+ }
650
656
;
651
657
652
658
cast_expression :
Original file line number Diff line number Diff line change @@ -686,6 +686,17 @@ void ansi_c_scanner_init()
686
686
return make_identifier ();
687
687
}
688
688
689
+ " __builtin_convertvector" {
690
+ if (PARSER.mode ==configt::ansi_ct::flavourt::APPLE)
691
+ {
692
+ loc ();
693
+ return TOK_CONVERTVECTOR;
694
+ }
695
+ else
696
+ return make_identifier ();
697
+ }
698
+
699
+
689
700
%{
690
701
/* C++ Keywords and Operators */
691
702
%}
You can’t perform that action at this time.
0 commit comments