summaryrefslogtreecommitdiff
path: root/gcc/fix-header.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2000-03-31 23:16:11 +0000
committerZack Weinberg <zack@gcc.gnu.org>2000-03-31 23:16:11 +0000
commitae79697b721b607964d32468c87d1881c3a39974 (patch)
treec407bb10c858c1ee81576f79ea01d3e9c8890316 /gcc/fix-header.c
parent7bde2862db58ec0828e26fc95768f6d008a97f6f (diff)
downloadgcc-ae79697b721b607964d32468c87d1881c3a39974.tar.gz
cpplib.h: Merge struct cpp_options into struct cpp_reader.
* cpplib.h: Merge struct cpp_options into struct cpp_reader. Reorder struct cpp_options and struct cpp_reader for better packing. Replace CPP_OPTIONS macro with CPP_OPTION which takes two args. Change all 'char' flags to 'unsigned char'. Move show_column flag into struct cpp_options. Don't prototype cpp_options_init. * cpphash.h, cpperror.c, cppexp.c, cppfiles.c, cpphash.c, cppinit.c, cpplex.c, cpplib.c: Replace CPP_OPTIONS (pfile)->whatever with CPP_OPTION (pfile, whatever), and likewise for opts = CPP_OPTIONS (pfile); ... opts->whatever; * cppinit.c (merge_include_chains): Take a cpp_reader *. Extract CPP_OPTION (pfile, pending) and work with that directly. (cpp_options_init): Delete. (cpp_reader_init): Turn on on-by-default options here. Allocate the pending structure here. (cl_options, enum opt_code): Define these from the same table, kept in a large macro. Add -fshow-column and -fno-show-column options. * cpperror.c (v_message): If show_column is off, don't print the column number. * cppmain.c: Update for new interface. * fix-header.c: Likewise. From-SVN: r32850
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r--gcc/fix-header.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c
index c4d7e728ae1..f6dae3a8ffa 100644
--- a/gcc/fix-header.c
+++ b/gcc/fix-header.c
@@ -617,7 +617,6 @@ read_scan_file (in_fname, argc, argv)
char **argv;
{
cpp_reader scan_in;
- cpp_options scan_options;
struct fn_decl *fn;
int i;
register struct symbol_list *cur_symbols;
@@ -625,13 +624,11 @@ read_scan_file (in_fname, argc, argv)
obstack_init (&scan_file_obstack);
cpp_reader_init (&scan_in);
- scan_in.opts = &scan_options;
- cpp_options_init (&scan_options);
/* We are going to be scanning a header file out of its proper context,
so ignore warnings and errors. */
- scan_options.inhibit_warnings = 1;
- scan_options.inhibit_errors = 1;
- scan_options.no_line_commands = 1;
+ CPP_OPTION (&scan_in, inhibit_warnings) = 1;
+ CPP_OPTION (&scan_in, inhibit_errors) = 1;
+ CPP_OPTION (&scan_in, no_line_commands) = 1;
i = cpp_handle_options (&scan_in, argc, argv);
if (i < argc && ! CPP_FATAL_ERRORS (&scan_in))
cpp_fatal (&scan_in, "Invalid option `%s'", argv[i]);