File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
regression/cpp/gcc_attributes2 Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 1
1
#ifdef __GNUC__
2
2
typedef int my_int16_t __attribute__ ((__mode__(__HI__)));
3
3
static_assert (sizeof (my_int16_t ) == 2, "16 bit");
4
+
5
+ template <std::size_t _Align = __alignof__(int )>
6
+ struct __attribute__ ((__aligned__((_Align))))
7
+ {
8
+ } __align;
4
9
#endif
5
10
6
11
int main ()
Original file line number Diff line number Diff line change @@ -4522,6 +4522,12 @@ bool Parser::rClassSpec(typet &spec)
4522
4522
std::cout << std::string (__indent, ' ' ) << " Parser::rClassSpec 3\n " ;
4523
4523
#endif
4524
4524
4525
+ if (!optAlignas (spec))
4526
+ return false ;
4527
+
4528
+ if (!optAttribute (spec))
4529
+ return false ;
4530
+
4525
4531
if (lex.LookAhead (0 )==' {' )
4526
4532
{
4527
4533
// no tag
@@ -4531,12 +4537,6 @@ bool Parser::rClassSpec(typet &spec)
4531
4537
}
4532
4538
else
4533
4539
{
4534
- if (!optAlignas (spec))
4535
- return false ;
4536
-
4537
- if (!optAttribute (spec))
4538
- return false ;
4539
-
4540
4540
irept name;
4541
4541
4542
4542
if (!rName (name))
You can’t perform that action at this time.
0 commit comments