[Ada] Disable warning about unsafe use of __builtin_frame_address
authorEric Botcazou <ebotcazou@adacore.com>
Mon, 25 May 2020 08:53:00 +0000 (10:53 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 8 Jul 2020 14:55:56 +0000 (10:55 -0400)
gcc/ada/

* tracebak.c [generic implementation]: Add pragma GCC diagnostic
to disable warning about __builtin_frame_address.

gcc/ada/tracebak.c

index 43dc438a1d6e100574006a682fdcfa39d40dc2a2..d643cfc50dbc3f7a65b07199d3e92d5c82ba9630 100644 (file)
@@ -690,6 +690,9 @@ __gnat_backtrace (void ** traceback __attribute__((unused)),
 
 #elif defined (USE_GENERIC_UNWINDER)
 
+/* No warning since the cases where FRAME_LEVEL > 0 are known to work.  */
+#pragma GCC diagnostic ignored "-Wframe-address"
+
 #ifndef CURRENT_STACK_FRAME
 # define CURRENT_STACK_FRAME  ({ char __csf; &__csf; })
 #endif