(main): If C++ for Dwarf requested, warn and turn it off.
authorRichard Stallman <rms@gnu.org>
Wed, 5 May 1993 20:13:33 +0000 (20:13 +0000)
committerRichard Stallman <rms@gnu.org>
Wed, 5 May 1993 20:13:33 +0000 (20:13 +0000)
From-SVN: r4340

gcc/toplev.c

index 45ea3d3afa4751f23b4bdc0c5058707fd9541c47..e88742141019abda0ae81c11209acfc7e24ea82a 100644 (file)
@@ -3301,6 +3301,15 @@ You Lose!  You must define PREFERRED_DEBUGGING_TYPE!
        warning ("-Wuninitialized is not supported without -O");
     }
 
+#if defined(DWARF_DEBUGGING_INFO)
+  if (write_symbols == DWARF_DEBUG
+      && strcmp (language_string, "GNU C++") == 0)
+    {
+      warning ("-g option for g++ on SVR4 systems: -g disabled");
+      write_symbols = NO_DEBUG;
+    }
+#endif /* defined(DWARF_DEBUGGING_INFO) */
+
 #ifdef OVERRIDE_OPTIONS
   /* Some machines may reject certain combinations of options.  */
   OVERRIDE_OPTIONS;