1 // RUN: %clang_cc1 -x c -verify %s
3 // Primary fixed point types
4 // Without `-ffixed-point`, these keywords are now treated as typedef'd types or identifiers.
5 _Accum accum
; // expected-error{{unknown type name '_Accum'}}
6 _Fract fract
; // expected-error{{unknown type name '_Fract'}}
7 _Sat _Accum sat_accum
; // expected-error{{unknown type name '_Sat'}}
8 // expected-error@-1{{expected ';' after top level declarator}}
9 signed _Accum signed_accum
; // expected-error{{expected ';' after top level declarator}}
10 signed _Fract signed_fract
; // expected-error{{expected ';' after top level declarator}}
11 signed _Sat _Accum signed_sat_accum
; // expected-error{{expected ';' after top level declarator}}
13 // Cannot use fixed point suffixes
14 int accum_int
= 10k
; // expected-error{{invalid suffix 'k' on integer constant}}
15 int fract_int
= 10r
; // expected-error{{invalid suffix 'r' on integer constant}}
16 float accum_flt
= 10.0k
; // expected-error{{invalid suffix 'k' on floating constant}}
17 float fract_flt
= 10.0r
; // expected-error{{invalid suffix 'r' on floating constant}}