Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/warn/pr13358-4.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
// PR c++/13358: g++ should accept a long long constant sans LL suffix // if -Wno-long-long is in use. // { dg-do compile { target c++11 } } // { dg-require-effective-target int32plus } // { dg-options "-pedantic-errors -Wlong-long" } void use_longlong () { unsigned long long x1, x2, x3; // { dg-warning "ISO C\\+\\+ 1998 does not support 'long long'" } // make sure we warn with hex, decimal and octal x1 = 0x1b27da572ef3cd86; // { dg-warning "integer constant is too large for 'long' type" "long long" { target { llp64 || ilp32 } } } x2 = 1956772631100509574; // { dg-warning "integer constant is too large for 'long' type" "long long" { target { llp64 || ilp32 } } } x3 = 0154476645345674746606; // { dg-warning "integer constant is too large for 'long' type" "long long" { target { llp64 || ilp32 } } } } void use_longlong2 () { unsigned long long x1, x2, x3; // { dg-warning "ISO C\\+\\+ 1998 does not support 'long long'" } // make sure we warn with hex, decimal and octal x1 = 0x1b27da572ef3cd86LL; // { dg-warning "long long" } x2 = 1956772631100509574LL; // { dg-warning "long long" } x3 = 0154476645345674746606LL; // { dg-warning "long long" } }