public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [OB PATCH] Disable nested function tests for clang
@ 2020-04-20 14:49 Gary Benson
  2020-04-20 14:52 ` Pedro Alves
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Benson @ 2020-04-20 14:49 UTC (permalink / raw)
  To: gdb-patches

Clang does not support nested functions, and there are no plans to
change this.  This commit disables the three nested function tests
when using clang.

gdb/testsuite/ChangeLog:

	* gdb.base/nested-subp1.exp: Disable test when using clang.
	* gdb.base/nested-subp2.exp: Likewise.
	* gdb.base/nested-subp3.exp: Likewise.
---
 gdb/testsuite/ChangeLog                 | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp1.exp | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp2.exp | 6 ++++++
 gdb/testsuite/gdb.base/nested-subp3.exp | 6 ++++++
 4 files changed, 24 insertions(+)

diff --git a/gdb/testsuite/gdb.base/nested-subp1.exp b/gdb/testsuite/gdb.base/nested-subp1.exp
index c733af5..3d46325 100644
--- a/gdb/testsuite/gdb.base/nested-subp1.exp
+++ b/gdb/testsuite/gdb.base/nested-subp1.exp
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp1"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \
diff --git a/gdb/testsuite/gdb.base/nested-subp2.exp b/gdb/testsuite/gdb.base/nested-subp2.exp
index cd041ec..6976f33 100644
--- a/gdb/testsuite/gdb.base/nested-subp2.exp
+++ b/gdb/testsuite/gdb.base/nested-subp2.exp
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp2"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \
diff --git a/gdb/testsuite/gdb.base/nested-subp3.exp b/gdb/testsuite/gdb.base/nested-subp3.exp
index 5d2e1ec..37bbfca 100644
--- a/gdb/testsuite/gdb.base/nested-subp3.exp
+++ b/gdb/testsuite/gdb.base/nested-subp3.exp
@@ -24,6 +24,12 @@ standard_testfile
 
 set testcase "nested-subp3"
 
+get_compiler_info
+if { [test_compiler_info "clang-*"] } {
+    untested "compiler does not support nested functions"
+    return -1
+}
+
 if { [gdb_compile "${srcdir}/${subdir}/${testcase}.c" \
                   [standard_output_file "${testcase}"] \
                   executable \
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OB PATCH] Disable nested function tests for clang
  2020-04-20 14:49 [OB PATCH] Disable nested function tests for clang Gary Benson
@ 2020-04-20 14:52 ` Pedro Alves
  2020-04-20 16:07   ` Gary Benson
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2020-04-20 14:52 UTC (permalink / raw)
  To: Gary Benson, gdb-patches

On 4/20/20 3:49 PM, Gary Benson via Gdb-patches wrote:
> Clang does not support nested functions, and there are no plans to
> change this.  This commit disables the three nested function tests
> when using clang.
> 
> gdb/testsuite/ChangeLog:
> 
> 	* gdb.base/nested-subp1.exp: Disable test when using clang.
> 	* gdb.base/nested-subp2.exp: Likewise.
> 	* gdb.base/nested-subp3.exp: Likewise.

Please use the support_nested_function_tests procedure instead.

Thanks,
Pedro Alves


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [OB PATCH] Disable nested function tests for clang
  2020-04-20 14:52 ` Pedro Alves
@ 2020-04-20 16:07   ` Gary Benson
  0 siblings, 0 replies; 3+ messages in thread
From: Gary Benson @ 2020-04-20 16:07 UTC (permalink / raw)
  To: Pedro Alves; +Cc: gdb-patches

Pedro Alves wrote:
> On 4/20/20 3:49 PM, Gary Benson via Gdb-patches wrote:
> > Clang does not support nested functions, and there are no plans to
> > change this.  This commit disables the three nested function tests
> > when using clang.
> > 
> > gdb/testsuite/ChangeLog:
> > 
> > 	* gdb.base/nested-subp1.exp: Disable test when using clang.
> > 	* gdb.base/nested-subp2.exp: Likewise.
> > 	* gdb.base/nested-subp3.exp: Likewise.
> 
> Please use the support_nested_function_tests procedure instead.

Thanks, I've updated it.

Cheers,
Gary


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-20 16:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-20 14:49 [OB PATCH] Disable nested function tests for clang Gary Benson
2020-04-20 14:52 ` Pedro Alves
2020-04-20 16:07   ` Gary Benson

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).