public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r12-7898] c-family: Add -Wmisleading-indentation testcase [PR71637]
@ 2022-03-29 17:44 Patrick Palka
0 siblings, 0 replies; only message in thread
From: Patrick Palka @ 2022-03-29 17:44 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:89976d082488b3a7dc7520b980f854ce83043d38
commit r12-7898-g89976d082488b3a7dc7520b980f854ce83043d38
Author: Patrick Palka <ppalka@redhat.com>
Date: Tue Mar 29 13:44:05 2022 -0400
c-family: Add -Wmisleading-indentation testcase [PR71637]
We no longer emit a bogus warning for the below testcase after
r11-3266-g4839de55e2c986.
PR c++/71637
gcc/testsuite/ChangeLog:
* c-c++-common/Wmisleading-indentation-6.c: New test.
Diff:
---
gcc/testsuite/c-c++-common/Wmisleading-indentation-6.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/gcc/testsuite/c-c++-common/Wmisleading-indentation-6.c b/gcc/testsuite/c-c++-common/Wmisleading-indentation-6.c
new file mode 100644
index 00000000000..5b7dd7fd2fd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wmisleading-indentation-6.c
@@ -0,0 +1,11 @@
+/* PR c++/71637 */
+/* { dg-options "-ftrack-macro-expansion=0 -Wmisleading-indentation" } */
+
+#define m(x) ({ int y; if (x) y=0; else y=1; y; })
+
+int main()
+{
+ int x =
+ m(0);
+ return x;
+}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-03-29 17:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-29 17:44 [gcc r12-7898] c-family: Add -Wmisleading-indentation testcase [PR71637] Patrick Palka
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).