]> Git Repo - binutils.git/blobdiff - gdb/testsuite/lib/gdb.exp
Add gdb_caching_proc support_nested_function_tests to lib/gdb.exp
[binutils.git] / gdb / testsuite / lib / gdb.exp
index 806e5a0c304e8b130909fd854f3fcd6ab07f5317..8b1ec62c9c21570f3d3cb4c9d3fa0bdce016876e 100644 (file)
@@ -6395,6 +6395,21 @@ gdb_caching_proc target_supports_scheduler_locking {
     return $supports_schedule_locking
 }
 
+# Return 1 if compiler supports use of nested functions.  Otherwise,
+# return 0.
+
+gdb_caching_proc support_nested_function_tests {
+    # Compile a test program containing a nested function
+    return [gdb_can_simple_compile nested_func {
+       int main () {
+           int foo () {
+               return 0;
+           }
+           return foo ();
+       }
+    } executable]
+}
+
 # gdb_target_symbol returns the provided symbol with the correct prefix
 # prepended.  (See gdb_target_symbol_prefix, above.)
 
This page took 0.024655 seconds and 4 git commands to generate.