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.
+2020-04-20 Gary Benson <gbenson@redhat.com>
+
+ * gdb.base/nested-subp1.exp: Disable test when using clang.
+ * gdb.base/nested-subp2.exp: Likewise.
+ * gdb.base/nested-subp3.exp: Likewise.
+
2020-04-20 Gary Benson <gbenson@redhat.com>
* gdb.cp/exception.cc: Fix compilation error with clang.
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 \
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 \
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 \