aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-07-18 19:22:48 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-07-18 19:22:48 -0400
commitbc35f8c25684ba2c09eee78b9b45ecb6205fd43a (patch)
treecc78915558e3dc1414c5f5b534b507d86dd63dc3
parent35d17c1d94820ecd169be6ef9b16027d587b4d7a (diff)
downloadgcc-bc35f8c25684ba2c09eee78b9b45ecb6205fd43a.zip
gcc-bc35f8c25684ba2c09eee78b9b45ecb6205fd43a.tar.gz
gcc-bc35f8c25684ba2c09eee78b9b45ecb6205fd43a.tar.bz2
(main): cplusplus_comments now defaults to 1.
But clear it if -traditional or the new option -lang-c89 is given. From-SVN: r10148
-rw-r--r--gcc/cccp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index 5a98ad5..01cad99 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -1356,7 +1356,7 @@ main (argc, argv)
dump_macros = dump_none;
no_output = 0;
cplusplus = 0;
- cplusplus_comments = 0;
+ cplusplus_comments = 1;
bzero ((char *) pend_files, argc * sizeof (char *));
bzero ((char *) pend_defs, argc * sizeof (char *));
@@ -1541,6 +1541,7 @@ main (argc, argv)
case 't':
if (!strcmp (argv[i], "-traditional")) {
traditional = 1;
+ cplusplus_comments = 0;
if (dollars_in_ident > 0)
dollars_in_ident = 1;
} else if (!strcmp (argv[i], "-trigraphs")) {
@@ -1550,11 +1551,11 @@ main (argc, argv)
case 'l':
if (! strcmp (argv[i], "-lang-c"))
+ cplusplus = 0, cplusplus_comments = 1, objc = 0;
+ if (! strcmp (argv[i], "-lang-c89"))
cplusplus = 0, cplusplus_comments = 0, objc = 0;
if (! strcmp (argv[i], "-lang-c++"))
cplusplus = 1, cplusplus_comments = 1, objc = 0;
- if (! strcmp (argv[i], "-lang-c-c++-comments"))
- cplusplus = 0, cplusplus_comments = 1, objc = 0;
if (! strcmp (argv[i], "-lang-objc"))
objc = 1, cplusplus = 0, cplusplus_comments = 1;
if (! strcmp (argv[i], "-lang-objc++"))