aboutsummaryrefslogtreecommitdiff
path: root/gcc/errors.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-09-06 17:52:24 +0200
committerJakub Jelinek <jakub@redhat.com>2023-09-06 17:52:24 +0200
commit52e2aaaa70e847d240fb68a27c88ee60189515a6 (patch)
tree763f6682405f6ab7bef50976a20d973bb449c85b /gcc/errors.cc
parentdce6f6a974d4ecce8491c989c35e23c59223f762 (diff)
downloadgcc-52e2aaaa70e847d240fb68a27c88ee60189515a6.zip
gcc-52e2aaaa70e847d240fb68a27c88ee60189515a6.tar.gz
gcc-52e2aaaa70e847d240fb68a27c88ee60189515a6.tar.bz2
Additional _BitInt test coverage [PR102989]
On Tue, Sep 05, 2023 at 10:40:26PM +0000, Joseph Myers wrote: > Additional tests I think should be added (for things I expect should > already work): > > * Tests for BITINT_MAXWIDTH in <limits.h>. Test that it's defined for > C2x, but not defined for C11/C17 (the latter independent of whether the > target has _BitInt support). Test the value as well: _BitInt > (BITINT_MAXWIDTH) should be OK (both signed and unsigned) but _BitInt > (BITINT_MAXWIDTH + 1) should not be OK. Also test that BITINT_MAXWIDTH >= > ULLONG_MAX. > > * Test _BitInt (N) where N is a constexpr variable or enum constant (I > expect these should work - the required call to convert_lvalue_to_rvalue > for constexpr to work is present - but I don't see such tests in the > testsuite). > > * Test that -funsigned-bitfields does not affect the signedness of _BitInt > (N) bit-fields (the standard wording isn't entirely clear, but that's > what's implemented in the patches). > > * Test the errors for _Sat used with _BitInt (though such a test might not > actually run at present because no target supports both features). The following patch does that plus for most of the new changes in the C _BitInt support patch requested in patch review it also does testsuite coverage. 2023-09-06 Jakub Jelinek <jakub@redhat.com> PR c/102989 * gcc.dg/bitint-2.c (foo): Add tests for constexpr var or enumerator arguments of _BitInt. * gcc.dg/bitint-31.c: Remove forgotten 0 &&. * gcc.dg/bitint-32.c: New test. * gcc.dg/bitint-33.c: New test. * gcc.dg/bitint-34.c: New test. * gcc.dg/bitint-35.c: New test. * gcc.dg/bitint-36.c: New test. * gcc.dg/fixed-point/bitint-1.c: New test.
Diffstat (limited to 'gcc/errors.cc')
0 files changed, 0 insertions, 0 deletions