summaryrefslogtreecommitdiff
path: root/gcc/cccp.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-06 09:54:30 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>1999-04-06 09:54:30 +0000
commit7b4db0874bd67cb61a93734a30f68d7e9f94485c (patch)
treee311b1aae3a8eba00538f1d3bc047ebff6363bcc /gcc/cccp.c
parent4a58318a271ea1bbafdba0c1290552468a5d9fbf (diff)
downloadgcc-7b4db0874bd67cb61a93734a30f68d7e9f94485c.tar.gz
1999-04-06 12:51 -0400 Zack Weinberg <zack@rabi.columbia.edu>
* cppinit.c (install_predefs): Delete function. (cpp_start_read): Don't call install_predefs. (cpp_handle_option): Remove case 'u' and all refs to opts->inhibit_predefs. (print_help): Don't mention -undef. (initialize_builtins): Define __HAVE_BUILTIN_SETJMP__, to match cccp. * cpplib.h (struct cpp_options): Remove inhibit_predefs member. * cccp.c (predefs): Delete variable. (main): Remove case 'u' in argument parse loop, 'inhibit_predefs' variable, and the code block that would process CPP_PREDEFINES. (initialize_builtins): Don't define __OBJC__, the driver will do that. * gcc.c (default_compilers): Remove -undef from all specs that invoke a C preprocessor. * ch/lang-specs.h: Likewise. * cp/lang-specs.h: Likewise. * f/lang-specs.h: Likewise. * objc/lang-specs.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26212 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cccp.c')
-rw-r--r--gcc/cccp.c146
1 files changed, 0 insertions, 146 deletions
diff --git a/gcc/cccp.c b/gcc/cccp.c
index a849aabd6b3..9cbd82d17b7 100644
--- a/gcc/cccp.c
+++ b/gcc/cccp.c
@@ -658,13 +658,6 @@ static HASHNODE *hashtab[HASHSIZE];
#define HASHSTEP(old, c) ((old << 2) + c)
#define MAKE_POS(v) (v & 0x7fffffff) /* make number positive */
-/* Symbols to predefine. */
-
-#ifdef CPP_PREDEFINES
-static char *predefs = CPP_PREDEFINES;
-#else
-static char *predefs = "";
-#endif
/* We let tm.h override the types used here, to handle trivial differences
such as the choice of unsigned int or long unsigned int for size_t.
@@ -1210,7 +1203,6 @@ main (argc, argv)
This is preparation for supporting more than one option for making
an assertion. */
char **pend_assertion_options;
- int inhibit_predefs = 0;
int no_standard_includes = 0;
int no_standard_cplusplus_includes = 0;
int missing_newline = 0;
@@ -1659,7 +1651,6 @@ main (argc, argv)
on the command line. That way we can get rid of any
that were passed automatically in from GCC. */
int j;
- inhibit_predefs = 1;
for (j = 0; j < i; j++)
pend_defs[j] = pend_assertions[j] = 0;
} else {
@@ -1727,12 +1718,6 @@ main (argc, argv)
remap = 1;
break;
- case 'u':
- /* Sun compiler passes undocumented switch "-undef".
- Let's assume it means to inhibit the predefined symbols. */
- inhibit_predefs = 1;
- break;
-
case '\0': /* JF handle '-' as file name meaning stdin or stdout */
if (in_fname == NULL) {
in_fname = "";
@@ -1783,135 +1768,6 @@ main (argc, argv)
and option processing. */
initialize_builtins (fp, &outbuf);
- /* Do standard #defines and assertions
- that identify system and machine type. */
-
- if (!inhibit_predefs) {
- char *p = (char *) alloca (strlen (predefs) + 1);
-
-#ifdef VMS
- struct dsc$descriptor_s lcl_name;
- struct item_list {
- unsigned short length; /* input length */
- unsigned short code; /* item code */
- unsigned long dptr; /* data ptr */
- unsigned long lptr; /* output length ptr */
- };
-
- unsigned long syi_length;
- char syi_data[16];
-
- struct item_list items[] = {
- { 16, SYI$_VERSION, 0, 0 },
- { 0, 0, 0, 0 }
- };
-
- items[0].dptr = (unsigned long)syi_data;
- items[0].lptr = (unsigned long)(&syi_length);
-
- if (SYS$GETSYIW (0, 0, 0, items, NULL, NULL, NULL, NULL) == SS$_NORMAL)
- {
- unsigned long vms_version_value;
- char *vers;
-
- vers = syi_data;
- vms_version_value = 0;
-
- if (*vers == 'V')
- vers++;
- if (ISDIGIT (*vers))
- {
- vms_version_value = (*vers - '0') * 10000000;
- }
- vers++;
- if (*vers == '.')
- {
- vers++;
- if (ISDIGIT (*vers))
- {
- vms_version_value += (*vers - '0') * 100000;
- }
- }
-
- if (vms_version_value > 0)
- {
- char versbuf[32];
-
- sprintf (versbuf, "__VMS_VER=%08ld", vms_version_value);
- if (debug_output)
- output_line_directive (fp, &outbuf, 0, same_file);
- make_definition (versbuf);
- }
- }
-#endif
-
- strcpy (p, predefs);
- while (*p) {
- char *q;
- while (*p == ' ' || *p == '\t')
- p++;
- /* Handle -D options. */
- if (p[0] == '-' && p[1] == 'D') {
- q = &p[2];
- while (*p && *p != ' ' && *p != '\t')
- p++;
- if (*p != 0)
- *p++= 0;
- if (debug_output)
- output_line_directive (fp, &outbuf, 0, same_file);
- make_definition (q);
- while (*p == ' ' || *p == '\t')
- p++;
- } else if (p[0] == '-' && p[1] == 'A') {
- /* Handle -A options (assertions). */
- char *assertion;
- char *past_name;
- char *value;
- char *past_value;
- char *termination;
- int save_char;
-
- assertion = &p[2];
- past_name = assertion;
- /* Locate end of name. */
- while (*past_name && *past_name != ' '
- && *past_name != '\t' && *past_name != '(')
- past_name++;
- /* Locate `(' at start of value. */
- value = past_name;
- while (*value && (*value == ' ' || *value == '\t'))
- value++;
- if (*value++ != '(')
- abort ();
- while (*value && (*value == ' ' || *value == '\t'))
- value++;
- past_value = value;
- /* Locate end of value. */
- while (*past_value && *past_value != ' '
- && *past_value != '\t' && *past_value != ')')
- past_value++;
- termination = past_value;
- while (*termination && (*termination == ' ' || *termination == '\t'))
- termination++;
- if (*termination++ != ')')
- abort ();
- if (*termination && *termination != ' ' && *termination != '\t')
- abort ();
- /* Temporarily null-terminate the value. */
- save_char = *termination;
- *termination = '\0';
- /* Install the assertion. */
- make_assertion ("-A", assertion);
- *termination = (char) save_char;
- p = termination;
- while (*p == ' ' || *p == '\t')
- p++;
- } else {
- abort ();
- }
- }
- }
-
/* Now handle the command line options. */
/* Do -U's, -D's and -A's in the order they were seen. */
@@ -10217,8 +10073,6 @@ initialize_builtins (inp, outp)
install ((U_CHAR *) "__STDC__", -1, T_CONST, "1", -1);
install ((U_CHAR *) "__STDC_VERSION__", -1, T_CONST, "199409L", -1);
}
- if (objc)
- install ((U_CHAR *) "__OBJC__", -1, T_CONST, "1", -1);
/* This is supplied using a -D by the compiler driver
so that it is present only when truly compiling with GNU C. */
/* install ((U_CHAR *) "__GNUC__", -1, T_CONST, "2", -1); */