* [pushed] aarch64: Remove expected error for compound literals
@ 2023-01-26 15:53 Richard Sandiford
0 siblings, 0 replies; only message in thread
From: Richard Sandiford @ 2023-01-26 15:53 UTC (permalink / raw)
To: gcc-patches
GCC no longer treats empty compound literals as an error
(see 14cfa01755a66afbae2539f8b5796c960ddcecc6).
Tested on aarch64-linux-gnu & pushed.
Richard
gcc/testsuite/
* gcc.target/aarch64/bfloat16_scalar_typecheck.c: Accept empty
compound literals.
---
gcc/testsuite/gcc.target/aarch64/bfloat16_scalar_typecheck.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/testsuite/gcc.target/aarch64/bfloat16_scalar_typecheck.c b/gcc/testsuite/gcc.target/aarch64/bfloat16_scalar_typecheck.c
index 7c9188cf29d..f4ae6802883 100644
--- a/gcc/testsuite/gcc.target/aarch64/bfloat16_scalar_typecheck.c
+++ b/gcc/testsuite/gcc.target/aarch64/bfloat16_scalar_typecheck.c
@@ -40,7 +40,7 @@ bfloat16_t footest (bfloat16_t scalar0)
short initi_1_4 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
double initi_1_5 = glob_bfloat; /* { dg-error {invalid conversion from type 'bfloat16_t'} } */
- bfloat16_t scalar2_1 = {}; /* { dg-error {empty scalar initializer} } */
+ bfloat16_t scalar2_1 = {};
bfloat16_t scalar2_2 = { glob_bfloat };
bfloat16_t scalar2_3 = { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
bfloat16_t scalar2_4 = { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
@@ -92,7 +92,7 @@ bfloat16_t footest (bfloat16_t scalar0)
/* Compound literals. */
- (bfloat16_t) {}; /* { dg-error {empty scalar initializer} } */
+ (bfloat16_t) {};
(bfloat16_t) { glob_bfloat };
(bfloat16_t) { 0 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
(bfloat16_t) { 0.1 }; /* { dg-error {invalid conversion to type 'bfloat16_t'} } */
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-26 15:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-26 15:53 [pushed] aarch64: Remove expected error for compound literals Richard Sandiford
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).