Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/usr.bin/xlint/lint1 tests/lint: test precedence of __r...
details: https://anonhg.NetBSD.org/src/rev/7b884c895b46
branches: trunk
changeset: 984558:7b884c895b46
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Jul 11 19:39:00 2021 +0000
description:
tests/lint: test precedence of __real__ and cast_expression
diffstat:
tests/usr.bin/xlint/lint1/d_c99_complex_split.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 612084f3f29a -r 7b884c895b46 tests/usr.bin/xlint/lint1/d_c99_complex_split.c
--- a/tests/usr.bin/xlint/lint1/d_c99_complex_split.c Sun Jul 11 19:30:56 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/d_c99_complex_split.c Sun Jul 11 19:39:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: d_c99_complex_split.c,v 1.7 2021/04/09 21:42:12 rillig Exp $ */
+/* $NetBSD: d_c99_complex_split.c,v 1.8 2021/07/11 19:39:00 rillig Exp $ */
# 3 "d_c99_complex_split.c"
/*
@@ -81,3 +81,13 @@
c += 1.0;
return c | c; /* expect: incompatible types */
}
+
+void
+precedence_cast_expression(void)
+{
+ double _Complex z = 0;
+ if (b(__real__(double _Complex)z) && b(__imag__(double _Complex)z))
+ return;
+ if (b(__real__(z)) && b(__imag__(z)))
+ return;
+}
Home |
Main Index |
Thread Index |
Old Index