annotate clang/test/Frontend/fixed_point_errors.cpp @ 266:00f31e85ec16
default tip
Added tag current for changeset 31d058e83c98
author |
Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
date |
Sat, 14 Oct 2023 10:13:55 +0900 |
parents |
1d019706d866 |
children |
|
rev |
line source |
150
|
1 // RUN: %clang_cc1 -x c++ %s -verify
|
|
2 // RUN: %clang_cc1 -x c++ -ffixed-point %s -verify
|
|
3
|
|
4 // Name namgling is not provided for fixed point types in c++
|
|
5
|
|
6 _Accum accum; // expected-error{{unknown type name '_Accum'}}
|
|
7 _Fract fract; // expected-error{{unknown type name '_Fract'}}
|
|
8 _Sat _Accum sat_accum; // expected-error{{unknown type name '_Sat'}}
|
|
9 // expected-error@-1{{expected ';' after top level declarator}}
|
|
10
|
|
11 int accum_int = 10k; // expected-error{{invalid suffix 'k' on integer constant}}
|
|
12 int fract_int = 10r; // expected-error{{invalid suffix 'r' on integer constant}}
|
|
13 float accum_flt = 10.0k; // expected-error{{invalid suffix 'k' on floating constant}}
|
|
14 float fract_flt = 10.0r; // expected-error{{invalid suffix 'r' on floating constant}}
|