From: Pierre-Marie de Rodat Date: Mon, 14 Sep 2015 07:53:49 +0000 (+0000) Subject: misc.c (gnat_post_options): Issue a warning if generating STABS debugging information... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f64c1daf3a393f6614aaf6fdaaf867ccd66006c;p=gcc.git misc.c (gnat_post_options): Issue a warning if generating STABS debugging information when not the default. * gcc-interface/misc.c (gnat_post_options): Issue a warning if generating STABS debugging information when not the default. From-SVN: r227737 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e3d0e2289f9..d11227b0839 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-09-14 Pierre-Marie de Rodat + + * gcc-interface/misc.c (gnat_post_options): Issue a warning if + generating STABS debugging information when not the default. + 2015-09-14 Eric Botcazou * gcc-interface/gigi.h (ref_filename): Delete. diff --git a/gcc/ada/gcc-interface/misc.c b/gcc/ada/gcc-interface/misc.c index 9d8d2621c45..da91c6f326d 100644 --- a/gcc/ada/gcc-interface/misc.c +++ b/gcc/ada/gcc-interface/misc.c @@ -268,6 +268,13 @@ gnat_post_options (const char **pfilename ATTRIBUTE_UNUSED) if (!global_options_set.x_flag_diagnostics_show_caret) global_dc->show_caret = false; + /* Warn only if STABS is not the default: we don't want to emit a warning if + the user did not use a -gstabs option. */ + if (PREFERRED_DEBUGGING_TYPE != DBX_DEBUG && write_symbols == DBX_DEBUG) + warning (0, "STABS debugging information for Ada is obsolete and not " + "supported anymore"); + + /* Copy global settings to local versions. */ optimize = global_options.x_optimize; optimize_size = global_options.x_optimize_size; flag_compare_debug = global_options.x_flag_compare_debug;