| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
-fpreprocessed.
* cpplib.c (_cpp_handle_directive): If -fpreprocessed, accept
IN_I directives only if the # is in column 1 and the directive
name begins in column 2.
* cppmain.c (scan_buffer): Insert a space between # and an
identifier, when that identifier is a directive name.
* tradcpp.c (struct file_buf): Add a pointer to the next entry
in the header search path.
(enum node_type): Add T_INCLUDE_NEXT.
(directive_table): Add entry for include_next.
(do_include_next): New function.
(process_include): New routine, broken out of do_include.
(finclude): Insert 'nhd' argument, to be copied into
next_header_dir of the new buffer.
(main): Adjust to match.
* gsyslimits.h, limity.h: Un-indent #include_next.
testsuite:
* gcc.dg/cpp/direct2.c: New test.
* gcc.dg/cpp/direct2s.c: New test.
* gcc.c-torture/execute/920730-1t.c: #undef __GNUC__ at head.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41932 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
* gcc.dg/cpp/tr-define.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41773 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
| |
* tradcif.y (yyerror): Likewise. Add format specifier in call to
`error'.
* tradcpp.c (macroexpand): Likewise for call to `error_with_line'.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40939 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
| |
* cppinit.c (cpp_start_read): Remove deps_add_dep call.
* tradcpp.c (main): Add -imacros or -include'd dependencies
for -M*.
* cpp.texi (-M, -MM): Document -M -include behaviour.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39240 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cppinit.c (cpp_start_read): If -fpreprocessed, ignore
-D, -U and -A, and don't initialize the builtins.
* cppmain.c (cb_define, cb_undef): Unconditionally process
the callback.
* tradcpp.c (main): Fix typo.
2000-01-11 Mark Elbrecht <snowball3@bigfoot.com>
* cppfiles.c (cpp_included, find_include_file, _cpp_execute_include)
(read_name_map): Use IS_ABSOLUTE_PATH.
* tradcpp.c (get_filename): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38925 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* cppinit.c (cpp_start_read): Update comment, remove unneeded
if statement.
* tradcpp.c: Include mkdeps.h.
(deps, print_deps_phony_targets, deps_append, output_deps,
init_dependency_output, output_deps): New.
(deps_buffer, deps_allocated_size, deps_size, deps_column,
deps_output): Delete.
(print_deps_missing_files): Rename deps_missing_files.
(inhibit_output): Make global.
(main): Delete inhibit_output, deps_stream, deps_target.
Use mkdeps functionality in the same way as cpplib. Remove
-g3 handling. Handle -MF, -MP, -MQ, -MT. Update handling of
-M and -MM. Remove old handling of deps via deps_out, and
old reading of environment variables.
(get_filename): Update to use deps_add_dep.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38885 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
(main): Handle -MG, -MD, -MMD. Bail out if -MG is given without -M
or -MM.
(do_include): Handle missing headers like cpp0.
* cppfiles.c (_cpp_execute_include): Don't prefix absolute header
paths with first include pathname. Don't strcat to uninitialized
string.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38683 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
* tradcpp.c (main): Make sure finclude() is called with a valid
indepth value while handling -include.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38674 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
(do_warning): New function.
(finclude): Skip past the newline and increase the line number
before calling output_line_command.
(do_line): Skip the new line after output_line_command. Don't
pre-decrement the line number.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38305 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
though it is still not perfect.
(do_define): Don't define illegal macro names.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38230 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
for error message.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38212 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
| |
(do_error): New function.
(directive_table): Add #error handler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38205 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38133 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* safe-ctype.h: New file.
libiberty:
* safe-ctype.c: New file.
* Makefile.in (CFILES): Add safe-ctype.c.
(REQUIRED_OFILES): Add safe-ctype.o.
* argv.c: Define ISBLANK and use it, not isspace.
* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use
uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c)
before calling TOLOWER(c)/TOUPPER(c).
gcc:
* Makefile.in (HOST_RTL): Add safe-ctype.o.
(safe-ctype.o): New rule.
* system.h: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros.
* cpphash.h: Zap IStable and related macros. Define is_* in
terms of safe-ctype.h macros.
* cppinit.c: Delete the IStable and all related code.
* tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and
is_space arrays. Delete initialize_char_syntax. Change all
references to the above arrays to use macros instead.
* tradcpp.h: Define is_idchar, is_idstart, is_space, and
is_nvspace in terms of safe_ctype.h's macros.
* tradcif.y: is_idchar, is_idstart are macros not arrays.
* config/i370/i370.c, config/winnt/dirent.c,
config/winnt/fixinc-nt.c, config/winnt/ld.c:
Use uppercase ctype macros. If we included ctype.h,
include safe-ctype.h instead.
* fixinc/fixfixes.c: Use uppercase ctype macros. Don't test
ISLOWER(c) before calling TOUPPER(c).
* fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk.
* fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h. No need to
wrap ctype macros. Don't test ISUPPER(x) before calling TOLOWER(x).
gcc/ch:
* lex.c: Don't bother checking whether ISUPPER(c) before
calling TOLOWER(c). Don't bother checking whether isascii(c)
before testing ISSPACE(c); ISSPACE(c) includes '\n'.
gcc/f:
* Make-lang.in: Link f/fini with safe-ctype.o.
* bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c).
* com.c: Use TOUPPER, not ffesrc_toupper.
* fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c).
* intrin.c: Don't test IN_CTYPE_DOMAIN(c).
* src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their
initializing code; use TOUPPER and TOLOWER instead of
ffesrc_toupper and ffesrc_tolower.
* src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_.
Don't define ffesrc_toupper or ffesrc_tolower.
gcc/java:
* jvgenmain.c: Use ISPRINT not isascii.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38124 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
assertions in conditional expressions.
* tradcpp.c (parse_answer): Assertions do not need to go to
end of line in conditional directives.
(parse_assertion): Get first character of identifiers correct.
(test_assertion): New function.
* tradcpp.h (test_assertion): New prototype.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38011 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
canonicalize_text, find_answer): New.
(do_assert, do_unassert): Provide appropriate function bodies.
(union hashval): New member answers.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37953 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(struct directive): Drop 4th argument from handlers.
(do_define, do_line, do_include, do_undef, do_else, do_elif,
do_endif): Similarly.
(do_assert, do_unassert, do_ifdef, do_ifndef): New handlers.
(do_ifxdef): Update as common handler of do_ifdef and do_ifndef.
(make_definition, make_undef): Take a const char*.
(make_assertion): New function.
(struct directive_table): Update.
(main): Handle -A command line argument.
(handle_directive): Drop fourth handler argument.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37820 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
(main): Allocate a pending directive set of these. Use it.
Merge handling of -D and -U. Update handling of pending
directives. Free the memory after use.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37803 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
`line' commands.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37616 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* builtins.c (c_getstr): Constify variable.
* gmon-sol2.c (_mcleanup): Comment out #endif labels.
* conflict.c (const_conflict_graph_arc): New typedef.
(arc_hash, arc_eq): Avoid needlessly casting away const-ness.
* cppmacro.c (builtin_macro): Likewise.
* dwarf2out.c (output_comp_unit): Constify variable.
* fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF.
* protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper.
* ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting
away const-ness.
* tradcpp.c (rescan, do_line, macroexpand, macarg): Use
ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint.
* varasm.c (const_str_htab_hash, const_str_htab_eq,
compare_constant_1, record_constant_1): Constify.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37565 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tradcif.y: Include tradcpp.h. Constify. Make functions static.
Move extern function declarations to tradcpp.h.
* tradcpp.c: Likewise.
* tradcpp.h: New file.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37550 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
reference to GPLv1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37455 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add ATTRIBUTE_PRINTF.
* tradcpp.c (v_message, warning, error, fatal, error_with_line):
Add ATTRIBUTE_PRINTF*.
java:
* parse.y (issue_warning_error_from_context): Add
ATTRIBUTE_PRINTF.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37419 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
than writing to an unallocated buffer.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37278 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
print just the filename.
* cpplex.c (_cpp_run_directive): Add additional argument, the
name to give the synthetic buffer. This defaults to
translated "<command line>".
* cpplib.c (cpp_define, cpp_undef, cpp_assert, cpp_unassert):
Adjust to match.
(_cpp_define_builtin): New function.
* cppinit.c (initialize_builtins): Use _cpp_define_builtin.
* cpphash.h: Update prototypes.
* tradcpp.c (main): Process -D and -U simultaneously, in the
order they appeared on the command line.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36043 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
* cppinit.c (builtin_array): Define __WINT_TYPE__.
* tradcpp.c (initialize_builtins): Define __WINT_TYPE__.
* tm.texi (NO_BUILTIN_WINT_TYPE, WINT_TYPE): Document.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35478 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
as well.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35229 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
rtl.c.
(fatal_function, set_fatal_function): Removed.
(fatal): Don't prepare for or call the fatal_function.
(diagnostic_lock, error_recursion): New.
(diagnostic_for_decl, report_diagnostic): Guard against
re-entering the error reporting routines.
(fancy_abort): Assume function is not NULL.
* errors.c (fancy_abort): New. Assume function is not NULL.
* tradcpp.c (fancy_abort): Assume function is not NULL.
* system.h: Provide default definition of __FUNCTION__.
* rtl.h: Use __FUNCTION__ not __PRETTY_FUNCTION__ throughout.
Always use __FUNCTION__ in definition of abort.
* tree.h: Likewise.
* varray.h: Likewise.
* toplev.h: Likewise. Don't prototype set_fatal_function.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35170 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* tradcpp.c (main): Don't munge -D options.
(make_definition): Bring -D handling in line with cpplib.
(do_define): Strip all leading whitespace from macro definitions.
2000-07-20 David Billinghurst <David.Billinghurst@riotinto.com.au>
* Makefile.in (tradcpp): Depend on intl.o and version.o.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35145 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
| |
is indented.
* gcc.dg/cpp/tr-direct.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35139 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
|
|
|
|
| |
strsignal() of the signal number, and ask for a bug report.
Do not do this for SIGPIPE if there's already been an error.
* tradcpp.c: Don't include signal.h. Don't catch SIGPIPE.
Delete pipe_closed.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35006 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
| |
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35004 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
avoid conflicts with variable `include' in traditional C.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34908 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
|
|
|
|
|
| |
and friends.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34905 138bc75d-0d04-0410-961f-82ee72b054a4
|
|
* tradcif.y: New file.
* tradcif.c: New generated file.
* Makefile.in: Add rules to build tradcpp.o, tradcif.o,
$(srcdir)/tradcif.c. Add tradcpp to STAGESTUFF and
dependencies of C. Install tradcpp from install-common, in
$(libsubdir).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34893 138bc75d-0d04-0410-961f-82ee72b054a4
|