Commit Graph

371 Commits

Author SHA1 Message Date
Joseph Myers c7f9c0b983 re PR preprocessor/39646 (__FILE__ breaks for empty file name)
libcpp:
	PR preprocessor/39646
	* include/line-map.h (enum lc_reason): Add LC_RENAME_VERBATIM.
	* line-map.c (linemap_add): Handle LC_RENAME_VERBATIM.
	* directives.c (do_line, do_linemarker): Use LC_RENAME_VERBATIM in
	place of LC_RENAME.

gcc/testsuite:
	* gcc.dg/cpp/line8.c: New test.

From-SVN: r146319
2009-04-18 18:36:28 +01:00
Joseph Myers a5cb563b79 re PR preprocessor/39647 (Syntax checks in #line not quite right)
libcpp:
	PR preprocessor/39647
	* directives.c (check_eol): Add parameter expand.
	(do_undef, parse_include, do_line, do_linemarker, do_ident,
	do_pragma_once, do_pragma_system_header, do_ifdef, do_ifndef,
	do_else, do_endif, do_assert, do_unassert): All callers changed.
	Pass true from do_line, false elsewhere.

gcc/testsuite:
	* gcc.dg/cpp/line7.c: New test.

From-SVN: r146316
2009-04-18 16:28:40 +01:00
Joseph Myers 18f41a1b45 re PR preprocessor/31869 (stringifying empty macros)
libcpp:
	PR preprocessor/31869
	* macro.c (stringify_arg): Handle NULL source token in padding
	token where previous padding token did not have source token with
	preceding whitespace.

gcc/testsuite:
	* gcc.dg/cpp/strify5.c: New test.

From-SVN: r145989
2009-04-12 23:20:02 +01:00
Jakub Jelinek 748086b7b2 Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.
From-SVN: r145841
2009-04-09 17:00:19 +02:00
Janis Johnson 839a3b8ab5 re PR target/39027 (double floating point suffix of 'd' and 'D' not accepted)
gcc/
	PR c/29027
	* c-lex.c (interpret_float): Default (no suffix) is double.

libcpp/
	PR c/29027
	* include/cpplib.h (CPP_N_DEFAULT): Define.
	* expr.c (interpret_float_suffix): Recognize d or D for double,
	return new value for default.
	(cpp_classify_number): Issue pedwarn for use of d or D in suffix.

gcc/testsuite/
	PR c/29027
	* gcc.dg/fltconst-1.c: Don't error for use of d or D in suffix.
	* gcc.dg/fltconst-2.c: New test.
	* gcc.dg/fltconst-double-pedantic-1.c: New test.
	* gcc.dg/fltconst-double-pedantic-2.c: New test.

From-SVN: r145422
2009-04-01 17:31:26 +00:00
Janis Johnson eec4911606 re PR c/33466 (mixed-case suffix for decimal float constants)
libcpp/
	PR c/33466
	* expr.c (interpret_float_suffix): Reject invalid suffix that uses
	letters from decimal float and fixed-point suffixes.

gcc/testsuite
	PR c/33466
	* gcc.dg/cpp/pr33466.c: New test.
	* gcc.dg/dfp/pr33466.c: New test.
	* gcc.dg/fixed-point/pr33466.c: New test.

From-SVN: r145417
2009-04-01 17:04:42 +00:00
Joseph Myers 47580d22b2 re PR preprocessor/15638 (gcc should have option to treat missing headers as fatal)
PR preprocessor/15638
gcc:
	* c-common.c (c_cpp_error): Handle CPP_DL_FATAL.

gcc/fortran:
	* cpp.c (cb_cpp_error): Handle CPP_DL_FATAL.

gcc/testsuite:
	* gcc.dg/cpp/missing-header-1.c: New test.
	* gcc.dg/cpp/include2.c: Only test #include <>.  Expect
	"compilation terminated" message.
	* gcc.dg/cpp/include2a.c: New test.  Copy of include2.c but only
	test #include "".
	* gcc.dg/pch/counter-2.c, gcc.dg/pch/valid-1.c,
	gcc.dg/pch/valid-2.c, gcc.dg/pch/warn-1.c: Expect "compilation
	terminated" message.

libcpp:
	* files.c (_cpp_find_file): Call open_file_failed after diagnosing
	invalid PCH.
	(open_file_failed): Make error for missing file fatal.
	* include/cpplib.h (CPP_DL_FATAL): Define.

From-SVN: r145341
2009-03-31 13:43:29 +01:00
Sergiy Vyshnevetskiy 5a2df0fa12 re PR preprocessor/31932 (cpp -f*-charset and gcj --encoding accept no values except UTF-8)
2009-03-30  Sergiy Vyshnevetskiy  <serg@vostok.net>

	PR preprocessor/31932:
	* internal.h: Don't mention HAVE_ICONV_H.
	* configure, config.in: Rebuild.
	* configure.ac: Don't check for iconv.h.

From-SVN: r145316
2009-03-30 20:54:18 +00:00
Tom Tromey c1a8a3c6ff re PR preprocessor/39512 (linemap_init in lex.c does not initialize reallocator)
PR preprocessor/39512:
	* line-map.c (linemap_init): Initialize 'reallocator' field.

From-SVN: r145300
2009-03-30 15:25:42 +00:00
Jakub Jelinek a37a7b8a01 re PR target/39558 (Bad interaction of decls named 'vector' and -maltivec vector support)
PR target/39558
	* macro.c (cpp_get_token): If macro_to_expand returns NULL
	and used some tokens, add CPP_PADDING before next token.

	* gcc.target/powerpc/altivec-29.c: New test.

From-SVN: r145297
2009-03-30 17:00:52 +02:00
Joseph Myers 148e4216a4 re PR preprocessor/34695 (Preprocessor warning->error conversion from -Werror is silent)
PR preprocessor/34695

gcc:
	* Makefile.in (c-opts.o): Depend on c-tree.h.
	* c-common.c: Move down include of diagnostic.h.
	(done_lexing, c_cpp_error): New.
	* c-common.h (done_lexing): Declare.
	* c-decl.c (c_write_global_declarations): Don't check cpp_errors
	(parse_in).
	* c-opts.c: Include c-tree.h.
	(c_common_init_options): Set preprocessor error callback.
	(c_common_handle_option): Do not set preprocessor
	inhibit_warnings, warnings_are_errors, warn_system_headers,
	pedantic_errors or inhibit_warnings flags.
	(c_common_post_options): Do not check cpp_errors (parse_in).
	(c_common_finish): Do not output dependencies if there were
	errors.  Do not check return value of cpp_finish.
	* c-ppoutput.c (pp_file_change): Set input_location.
	* c-tree.h (c_cpp_error): Declare.
	* diagnostic.c (diagnostic_set_info_translated): Also initialize
	override_column.
	(diagnostic_build_prefix): Check override_column.
	* diagnostic.h (diagnostic_info): Add override_column field.
	(diagnostic_override_column): Define.

gcc/cp:
	* cp-tree.h (cp_cpp_error): Remove.
	* error.c (cp_cpp_error): Remove.
	* parser.c (cp_lexer_new_main): Set done_lexing instead of
	client_diagnostic and error callback.

gcc/fortran:
	* cpp.c (cb_cpp_error): New.
	(gfc_cpp_post_options): Don't set cpp_option->inhibit_warnings.
	Don't check cpp_errors (cpp_in).
	(gfc_cpp_init_0): Set cb->error.

gcc/testsuite:
	* gcc.dg/builtin-redefine.c, gcc.dg/cpp/redef2.c,
	gcc.dg/cpp/redef3.c, gcc.dg/cpp/trad/redef2.c: Use dg-message
	instead of dg-warning for "previous definition" messages.
	* gcc.dg/cpp/Wvariadic-1.c, gcc.dg/cpp/Wvariadic-3.c: Expect
	"warnings being treated as errors" message.
	* gcc.dg/fltconst-1.c: Use -fshow-column.

libcpp:
	* makedepend.c: Remove.
	* Makefile.in (makedepend_OBJS, makedepend$(EXEEXT)): Remove.
	(all, clean, TAGS_SOURCES, include): Remove makedepend handling.
	* directives.c (cpp_errors): Remove.
	* errors.c (print_location, _cpp_begin_message, v_message):
	Remove.
	(cpp_error, cpp_error_with_line): Always use error callback.
	(cpp_error, cpp_error_with_line, cpp_errno): Return bool.
	* include/cpplib.h (cpp_options): Remove pedantic_errors,
	inhibit_warnings, warn_system_headers, inhibit_errors,
	warnings_are_errors, client_diagnostic.
	(cpp_callbacks): Add extra arguments to error callback; make it
	return bool.
	(cpp_finish): Return void.
	(cpp_destroy): Remove inaccurate comment about return value.
	(cpp_errors, CPP_DL_EXTRACT, CPP_DL_WARNING_P): Remove.
	(CPP_DL_NOTE): Define.
	* include/line-map.h (linemap_print_containing_files): Remove.
	* init.c (cpp_finish): Do not check for or return number of
	errors.
	* internal.h (cpp_reader): Remove errors field.
	* line-map.c (linemap_print_containing_files): Remove.
	* macro.c (_cpp_create_definition): Use CPP_DL_NOTE for message
	about previous definition.  Only emit it if previous diagnostic
	was emitted.

From-SVN: r145263
2009-03-29 23:56:07 +01:00
Joseph Myers f145021137 Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not mkinstalldirs.
* Makefile.in (po/$(PACKAGE).pot): Use $(mkinstalldirs) not
	mkinstalldirs.

From-SVN: r145160
2009-03-28 06:57:44 +00:00
Joseph Myers f5b9c3604e * cpplib.pot: Regenerate.
From-SVN: r145159
2009-03-28 06:57:06 +00:00
Jakub Jelinek 8f5929e11f dse.c (struct group_info): Reorder fields for 64-bit hosts.
* dse.c (struct group_info): Reorder fields for 64-bit hosts.
	* matrix-reorg.c (struct matrix_info): Likewise.
	* tree-ssa-loop-ivopts.c (struct ivopts_data): Likewise.
	* rtl.h (struct mem_attrs): Likewise.
	* df.h (struct df): Likewise.
	* tree-data-ref.h (struct data_dependence_relation): Likewise.
	* ira-int.h (struct ira_allocno): Likewise.
	* df-scan.c (struct df_collection_rec): Likewise.
	* ira.c (struct equivalence): Likewise.
	* function.c (struct temp_slot): Likewise.
	* cfgloop.h (struct loop): Likewise.

	* parser.c (struct cp_token): Reorder fields for 64-bit hosts.
	(eof_token): Adjust.

	* include/cpplib.h (struct cpp_dir): Reorder fields for 64-bit hosts.

From-SVN: r144938
2009-03-18 18:04:26 +01:00
Joseph Myers c0de290730 * es.po: Update.
From-SVN: r144600
2009-03-04 10:48:40 +00:00
Joseph Myers 4bb09c26bc lex.c (lex_string): Return a CPP_LESS token for missing '>' in a header name.
libcpp:
	* lex.c (lex_string): Return a CPP_LESS token for missing '>' in a
	header name.
	(_cpp_lex_direct): Handle this.

gcc/testsuite:
	* gcc.dg/cpp/include4.c: New test.

From-SVN: r144361
2009-02-21 21:25:39 +00:00
Richard Guenther 68c9ab451b revert: configure.ac: Enable LFS.
Revert
2009-02-13  Richard Guenther  <rguenther@suse.de>

	* configure.ac: Enable LFS.
	* configure: Re-generate.
	* config.in: Likewise.

	libcpp/
	* configure.ac: Enable LFS.
	* configure: Re-generate.
	* config.in: Likewise.

From-SVN: r144189
2009-02-15 11:11:13 +00:00
Joseph Myers df20009b99 * zh_CN.po: Update.
From-SVN: r144156
2009-02-13 13:21:34 +00:00
Richard Guenther 601b3e1ab1 configure.ac: Enable LFS.
2009-02-13  Richard Guenther  <rguenther@suse.de>

	* configure.ac: Enable LFS.
	* configure: Re-generate.
	* config.in: Likewise.

	libcpp/
	* configure.ac: Enable LFS.
	* configure: Re-generate.
	* config.in: Likewise.

From-SVN: r144151
2009-02-13 10:52:08 +00:00
Joseph Myers 4c51d57f49 * vi.po: Update.
From-SVN: r143990
2009-02-06 20:14:10 +00:00
Ben Elliston fc0cd18072 Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
libcpp/
	* Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
	(.po.pox): Likewise.
	(po/$(PACKAGE).pot): Likewise.

gcc/
	* Makefile.in (.po.gmo): Use mkinstalldirs, not test -d || mkdir.
	(.po.pox): Likewise.
	(po/gcc.pot): Likewise.

From-SVN: r143073
2009-01-05 21:35:40 +11:00
Alexandre Oliva db89a3be51 re PR target/37033 (Revision 138733 breaks -g vs -g0 for PCH)
gcc/ChangeLog:
PR target/37033
* dwarf2out.c (saved_do_cfi_asm): New.
(dwarf2out_do_frame): Take it into account.
(dwarf2out_d_cfi_asm): Likewise.  Set it when appropriate.
libcpp/ChangeLog:
PR target/37033
* pch.c (cpp_valid_state): Improve message for poisoned symbols.
Allow for differences in __GCC_HAVE_DWARF2_CFI_ASM.

From-SVN: r142652
2008-12-10 17:31:07 +00:00
Joseph Myers 230f375563 * nl.po, sv.po: Update.
From-SVN: r142525
2008-12-06 18:03:27 +00:00
Joseph Myers 44b55e85d2 be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, id.po, ja.po,
	nl.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r142281
2008-11-29 17:39:29 +00:00
Joseph Myers cc95528267 lex.c (cpp_token_len): Use 6 as default length.
libcpp:
	* lex.c (cpp_token_len): Use 6 as default length.

gcc/testsuite:
	* g++.dg/cpp/stringop-1.C: New test.

From-SVN: r142275
2008-11-29 12:21:10 +00:00
Joseph Myers 32f6cf8719 * cpplib.pot: Regenerate.
From-SVN: r141974
2008-11-18 20:07:59 +00:00
Joseph Myers a0daa81106 * id.po: New.
From-SVN: r141831
2008-11-13 21:21:49 +00:00
Manuel López-Ibáñez 47960aaf16 expr.c (struct op): Add location.
2008-10-31  Manuel López-Ibáñez  <manu@gcc.gnu.org>

libcpp/
	* expr.c (struct op): Add location.
	(_cpp_parse_expr): Propagate locations throught the stack
	of expressions.
	(reduce): Likewise.
	(check_promotion): Use explicit location in errors.
	
testsuite/
	* gcc.dg/cpp/Wsignprom.c: Add column numbers.
	* gcc.dg/cpp/if-mpar.c: Likewise.

From-SVN: r141503
2008-10-31 22:00:37 +00:00
Matthew Gingell 631d0d3610 cpplib.h (cpp_comments, [...]): New structs.
2008-10-05  Matthew Gingell  <gingell@adacore.com>
	    Arnaud Charlet  <charlet@adacore.com>

	* include/cpplib.h (cpp_comments, cpp_comment_table): New structs.
	(cpp_get_comments): New function.
	* internal.h (struct cpp_reader): Add comments field.
	* init.c (cpp_destroy): Free comments.
	* lex.c (store_comment, cpp_get_comments): New functions.
	(comments): New struct.
	(save_comment): Store comments in comments struct.

Co-Authored-By: Arnaud Charlet <charlet@adacore.com>

From-SVN: r140883
2008-10-05 14:35:36 +02:00
Simon Baldwin c047ce9383 cpplib.h (struct cpp_options): Add new boolean flag warn_builtin_macro_redefined.
* include/cpplib.h (struct cpp_options): Add new boolean flag
	warn_builtin_macro_redefined.
	* init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
	* (struct builtin_operator): Split out from previous struct builtin,
	enhance extra const correctness.
	* (struct builtin_macro): Split out from previous struct builtin, add
	new always_warn_if_redefined flag, enhance const correctness.
	* (mark_named_operators): Use struct builtin_operator.
	* (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
	to builtins selectively.
	* macro.c (warn_of_redefinition): Return false if a builtin macro
	is not flagged with NODE_WARN.

	* c-opts.c (c_common_handle_option): Add handling for
	-Wbuiltin-macro-redefined command line option.
	* c.opt: Added builtin-macro-redefined option.
	* doc/invoke.texi (Warning Options): Add -Wbuiltin-macro-redefined
	documentation.

	* gcc.dg/builtin-redefine.c: New.

From-SVN: r140461
2008-09-18 15:39:08 +00:00
Joseph Myers f3af21b556 gcc.pot: Regenerate.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r139630
2008-08-27 18:44:43 +01:00
Jakub Jelinek affa55c67f re PR preprocessor/36649 (-H option doesn't work as expected)
PR preprocessor/36649
	* files.c (struct report_missing_guard_data): New type.
	(report_missing_guard): Put paths into an array instead of printing
	them right away.  Return 1 rather than 0.
	(report_missing_guard_cmp): New function.
	(_cpp_report_missing_guards): Sort and print paths gathered by
	report_missing_guard callback.

	* gcc.dg/pch/cpp-3.hs: Add include guards.
	* gcc.dg/pch/cpp-3a.h: Likewise.
	* gcc.dg/pch/cpp-3b.h: Likewise.
	* gcc.dg/cpp/mi8.c: New test.
	* gcc.dg/cpp/mi8a.h: New file.
	* gcc.dg/cpp/mi8b.h: New file.
	* gcc.dg/cpp/mi8c.h: New file.
	* gcc.dg/cpp/mi8d.h: New file.

From-SVN: r138432
2008-07-31 21:12:14 +02:00
Manuel López-Ibáñez 3b8f20a10d re PR preprocessor/28079 (#line range not verified without -pedantic)
2008-07-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR 28079
libcpp/
	* directives.c (strtolinenum): Handle overflow.
	(do_line): Give a warning if line number overflowed.
	(do_linemarker): Update call to strtolinenum.

gcc/testsuite/
	* gcc.dg/cpp/line6.c: New.

From-SVN: r138049
2008-07-22 09:45:58 +00:00
Manuel López-Ibáñez 1bb64668d0 line-map.h (linenum_type): New typedef.
2008-07-21  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	* include/line-map.h (linenum_type): New typedef.
	(struct line_map): Use it.
	(SOURCE_LINE): Second arguments is a LOCATION not a LINE.
	(SOURCE_COLUMN): Likewise.
	* macro.c (_cpp_builtin_macro_text): Use linenum_type. Don't store
	source_location values in a variable of type linenum_type.
	* directives.c (struct if_stack): Use linenum_type.
	(strtoul_for_line): Rename as strtolinenum.
	(do_line): Use linenum_type.
	(do_linemarker): Use linenum_type and strtolinenum.
	(_cpp_do_file_change): Use linenum_t.
	* line-map.c (linemap_add): Likewise.
	(linemap_line_start): Likewise.
	* traditional.c (struct fun_macro): 'line' is a source_location.
	* errors.c (print_location): Use linenum_type.
	* directives-only.c (_cpp_preprocess_dir_only): Likewise.
	* internal.h (CPP_INCREMENT_LINE): Likewise.
	* lex.c (_cpp_skip_block_comment): Use source_location.

From-SVN: r138026
2008-07-21 09:33:38 +00:00
Ben Elliston 5950c3c9a7 cpplib.h (NODE_CONDITIONAL): New.
libcpp/
	* include/cpplib.h (NODE_CONDITIONAL): New.
	(struct cpp_callbacks): New macro_to_expand field.
	(struct cpp_hashnode): Adjust size of flags and type fields.
	(cpp_peek_token): Prototype.
	* lex.c (cpp_peek_token): New function.
	(_cpp_temp_token): Protect pre-existing lookaheads.
	* macro.c (cpp_get_token): Expand any conditional macros.
	(_cpp_backup_tokens_direct): New.
	(_cpp_backup_tokens): Call _cpp_backup_tokens_direct.
	(warn_of_redefinition): Silently allow redefined conditional
	macros.
	(_cpp_create_definition): Remove the conditional flag when a user
	defines one of the conditional macros.
	* internal.h (_cpp_backup_tokens_direct): New prototype.

gcc/
	* c-common.h (C_CPP_HASHNODE): New macro.
	* coretypes.h (struct cpp_token): Forward declare.
	* doc/extend.texi (PowerPC AltiVec Built-in Functions): Document
	the context-sensitive keyword method.
	* config/rs6000/rs6000-c.c (__vector_keyword, vector_keyword,
	__pixel_keyword, pixel_keyword, __bool_keyword, bool_keyword,
	expand_bool_pixel): New.
	(altivec_categorize_keyword): New function.
	(init_vector_keywords): New function.
	(rs6000_macro_to_expand): Likewise.
	(rs6000_cpu_cpp_builtins): Enable context-sensitive macros if not
	compiling an ISO C dialect.

gcc/testsuite/
	* gcc.target/powerpc/altivec-macros.c: New test.
	* gcc.target/powerpc/altviec-26.c: Likewise.
	* gcc.dg/vmx/1b-06.c: Remove bool variable.
	* gcc.dg/vmx/1b-07.c: Likewise.
	* gcc.dg/vmx/1b-06-ansi.c: New test for the pre-define method.
	* gcc.dg/vmx/1b-07-ansi.c: Likewise.

From-SVN: r137775
2008-07-14 15:09:48 +10:00
Andrew Haley e85edc9ed5 re PR preprocessor/33305 (We should warn about empty macro arguments)
2008-06-13  Andrew Haley  <aph@redhat.com>

        PR preprocessor/33305
        * macro.c (replace_args): Print a warning for empty macro
        arguments in C89 and C++.

From-SVN: r137414
2008-07-03 10:31:50 +00:00
Ralf Wildenhues 18c04407bf Makefile.tpl ($(srcdir)/configure): Update dependencies.
* Makefile.tpl ($(srcdir)/configure): Update dependencies.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

config/
	* override.m4: Use m4_version_prereq throughout.
	(_AC_ARG_VAR_VALIDATE, AC_MSG_FAILURE): Backport from git
	Autoconf: output pwd along with fatal errors, so the right
	config.log file is hinted at more prominently.
	(PARSE_ARGS): Push setting of ac_pwd in this diversion.
	(_GCC_AUTOCONF_VERSION): New, define to 2.59 if not defined.
	(_GCC_AUTOCONF_VERSION_CHECK): New macro, require use of Autoconf
	version _GCC_AUTOCONF_VERSION throughout the tree.
	(m4_wrap): New override, fix for Posix semantics of m4wrap.

libgcc/
	* configure.ac: sinclude override.m4.
	* configure: Regenerate.

gnattools/
	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

libada/
	* configure.ac: move sinclude of acx.m4 before AC_INIT,
	also sinclude override.m4.
	* Makefile.in ($(srcdir)/configure): Update dependencies.
	* configure: Regenerate.

intl/
	* configure: Regenerate.

libiberty/
	* configure: Regenerate.

boehm-gc/
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* include/gc_config.h.in: Regenerate.

fixincludes/
	* configure: Regenerate.

gcc/
	* configure: Regenerate.

libcpp/
	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

libdecnumber/
	* Makefile.in ($(srcdir)/aclocal.m4): Update dependencies.
	* configure: Regenerate.

libffi/
	* configure: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libgfortran/
	* configure: Regenerate.

libgomp/
	* configure: Regenerate.

libjava/classpath/
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* doc/api/Makefile.in: Regenerate.
	* examples/Makefile.in: Regenerate.
	* external/Makefile.in: Regenerate.
	* external/jsr166/Makefile.in: Regenerate.
	* external/relaxngDatatype/Makefile.in: Regenerate.
	* external/sax/Makefile.in: Regenerate.
	* external/w3c_dom/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* lib/Makefile.in: Regenerate.
	* native/Makefile.in: Regenerate.
	* native/fdlibm/Makefile.in: Regenerate.
	* native/jawt/Makefile.in: Regenerate.
	* native/jni/Makefile.in: Regenerate.
	* native/jni/classpath/Makefile.in: Regenerate.
	* native/jni/gconf-peer/Makefile.in: Regenerate.
	* native/jni/gstreamer-peer/Makefile.in: Regenerate.
	* native/jni/gtk-peer/Makefile.in: Regenerate.
	* native/jni/java-io/Makefile.in: Regenerate.
	* native/jni/java-lang/Makefile.in: Regenerate.
	* native/jni/java-net/Makefile.in: Regenerate.
	* native/jni/java-nio/Makefile.in: Regenerate.
	* native/jni/java-util/Makefile.in: Regenerate.
	* native/jni/midi-alsa/Makefile.in: Regenerate.
	* native/jni/midi-dssi/Makefile.in: Regenerate.
	* native/jni/native-lib/Makefile.in: Regenerate.
	* native/jni/qt-peer/Makefile.in: Regenerate.
	* native/jni/xmlj/Makefile.in: Regenerate.
	* native/plugin/Makefile.in: Regenerate.
	* resource/Makefile.in: Regenerate.
	* scripts/Makefile.in: Regenerate.
	* tools/Makefile.in: Regenerate.

libjava/
	* configure: Regenerate.
	* gcj/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libjava/libltdl/
	* Makefile.in: Regenerate.
	* configure: Regenerate.

libmudflap/
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* testsuite/Makefile.in: Regenerate.

libobjc/
	* configure: Regenerate.

libssp/
	* Makefile.in: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.

libstdc++-v3/
	* configure: Regenerate.

zlib/
	* Makefile.in: Regenerate.
	* configure: Regenerate.

From-SVN: r136876
2008-06-17 23:13:35 +00:00
Ralf Wildenhues 2d09b6406a Makefile.in (FLAGS_TO_PASS): Add $(datarootdir).
gcc/
	* Makefile.in (FLAGS_TO_PASS): Add $(datarootdir).

intl/
	* Makefile.in (datarootdir): New variable.

libcpp/
	* Makefile.in (datarootdir): New variable.

libdecnumber/
	* Makefile.in (datarootdir): New variable.

From-SVN: r136845
2008-06-16 17:58:14 +00:00
H.J. Lu 0b7c73cc04 re PR preprocessor/36479 (Short buffer in libcpp)
2008-06-12  H.J. Lu  <hongjiu.lu@intel.com>

	PR preprocessor/36479
	* charset.c (cpp_interpret_string_notranslate): Also set
	narrow_cset_desc.width.

From-SVN: r136714
2008-06-12 10:03:41 -07:00
Joseph Myers cd985f6672 MAINTAINERS (mt port): Remove.
* MAINTAINERS (mt port): Remove.
	(sco5, unixware, sco udk): Remove.
	(Kean Johnston): Add to Write After Approval.

fixincludes:
	* inclhack.def (AAB_svr4_replace_byteorder,
	AAB_ultrix_ansi_compat, AAB_ultrix_limits, AAB_ultrix_memory,
	libc1_G_va_list, libc1_ifdefd_memx, nested_motorola,
	ptx_sys_mc_param_h, sco_regset, sco_static_func, sco_utime,
	solaris_mutex_init_1, solaris_socket, solaris_unistd,
	solaris_widec, svr4_krnl, ultrix_atexit_param, ultrix_atof_param,
	ultrix_const3, ultrix_fix_fixproto, ultrix_ifdef, ultrix_locale,
	ultrix_math_ifdef, ultrix_nested_ioctl, ultrix_nested_svc,
	ultrix_stat, ultrix_static, ultrix_stdlib, ultrix_strings,
	ultrix_strings2, ultrix_sys_time, ultrix_unistd,
	unicosmk_restrict, uw7_byteorder_fix, windiss_math1,
	windiss_math2, windiss_valist): Remove.
	* fixincl.x: Regenerate.
	* mkfixinc.sh: (arm-semi-aof, hppa1.1-*-osf*, hppa1.1-*-bsd*,
	i370-*-openedition, i?86-*-moss*, i?86-*-uwin*,
	powerpc-*-eabiaix*): Remove.
	* tests/base/math.h: Update.
	* tests/base/pthread.h: Update.
	* tests/base/stdio.h: Update.
	* tests/base/stdlib.h: Update.
	* tests/base/string.h: Update.
	* tests/base/strings.h: Update.
	* tests/base/sys/file.h: Update.
	* tests/base/sys/limits.h: Update.
	* tests/base/sys/socket.h: Update.
	* tests/base/sys/stat.h: Update.
	* tests/base/sys/time.h: Update.
	* tests/base/testing.h: Update.
	* tests/base/unistd.h: Update.
	* tests/base/_G_config.h: Remove.
	* tests/base/arpa: Remove directory.
	* tests/base/fs: Remove directory.
	* tests/base/locale.h: Remove.
	* tests/base/machine: Remove directory.
	* tests/base/rpc/svc.h: Remove.
	* tests/base/sys/ioctl.h: Remove.
	* tests/base/sys/regset.h: Remove.
	* tests/base/sys/times.h: Remove.
	* tests/base/sys/utsname.h: Remove.
	* tests/base/widec.h: Remove.

gcc:
	* config.gcc (Obsolete configurations): Remove list of
	configurations.
	(Unsupported targets list): Add *-*-linux*aout*, *-*-linux*libc1*,
	*-*-solaris2.[0-6], *-*-solaris2.[0-6].*, *-*-sysv*.  Remove other
	targets matched by those patterns.
	(strongarm*-*-*, ep9312*-*-*, xscale-*-*, parisc*-*-*,
	m680[012]0-*-*, *-*-linux*libc1*, *-*-linux*aout*,
	alpha*-*-unicosmk*, strongarm*-*-freebsd*, ep9312-*-elf,
	arm*-*-kaos*, cris-*-aout, parisc*64*-*-linux*, parisc*-*-linux*,
	hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-bsd*,
	i[34567]86-sequent-ptx4*, i[34567]86-sequent-sysv4*,
	i[34567]86-*-beoself*, i[34567]86-*-beos*, i[34567]86-*-sco3.2v5*,
	i[34567]86-*-sysv5*, i[34567]86-*-sysv4*, i[34567]86-*-uwin*,
	i[34567]86-*-kaos*, m68020-*-elf*, m68010-*-netbsdelf*,
	mips-wrs-windiss, mt-*-elf, powerpc-*-beos*, powerpc-*-chorusos*,
	powerpc-wrs-windiss*, powerpcle-*-sysv*, powerpc-*-kaos*,
	powerpcle-*-kaos*, sh*-*-kaos*, sparc-*-sysv4*, strongarm-*-elf*,
	strongarm-*-pe, strongarm-*-kaos*, vax-*-bsd*, vax-*-sysv*,
	vax-*-ultrix*, xscale-*-elf, xscale-*-coff,
	i[34567]86-*-linux*aout*, i[34567]86-*-linux*libc1): Remove.
	Make code for Solaris 7 and greater unconditional for Solaris.
	(ep9312-*-*, parisc1*, m680[012]0-*-*, parisc*-*-*, mt-*-*):
	Remove --with-* handling.
	* config/rs6000/sysv4.h (-mwindiss): Remove from all specs.
	(LIB_WINDISS_SPEC, CPP_OS_WINDISS_SPEC, STARTFILE_WINDISS_SPEC,
	ENDFILE_WINDISS_SPEC, LINK_START_WINDISS_SPEC,
	LINK_OS_WINDISS_SPEC): Remove.
	* config/rs6000/sysv4.opt (mwindiss): Remove.
	* configure.ac (strongarm*-*-*, xscale*-*-*): Remove.
	* configure: Regenerate.
	* doc/cpp.texi: Don't mention BeOS.
	* doc/extend.texi (interrupt): Don't mention MS1.
	* doc/install.texi: (i386-@var{any}-sysv, m68k-bull-sysv,
	m68k-hp-hpux, m68000-hp-hpux, m68000-att-sysv,
	alphaev5-cray-unicosmk*, xscale-*-*, i?86-*-linux*aout,
	i?86-*-sco3.2v5*, i?86-*-udk, m68k-hp-hpux, powerpc-*-sysv4,
	powerpc-*-sysv4, powerpcle-*-sysv4, *-*-sysv*, vax-dec-ultrix):
	Remove.
	* doc/invoke.texi (MT Options): Remove.
	(-mwindiss): Remove.
	(CRIS Options): Remove cris-axis-aout references.
	(HPPA Options): Don't mention hppa1.1-*-pro.
	* doc/md.texi: (MorphoTech family): Remove.
	* libgcc2.c: Don't handle UWIN.
	* config/alpha/t-unicosmk: Remove.
	* config/alpha/unicosmk.h: Remove.
	* config/arm/kaos-arm.h: Remove.
	* config/arm/kaos-strongarm.h: Remove.
	* config/arm/strongarm-coff.h: Remove.
	* config/arm/strongarm-elf.h: Remove.
	* config/arm/strongarm-pe.h: Remove.
	* config/arm/t-strongarm-pe: Remove.
	* config/arm/t-xscale-coff: Remove.
	* config/arm/t-xscale-elf: Remove.
	* config/arm/xscale-coff.h: Remove.
	* config/arm/xscale-elf.h: Remove.
	* config/chorus.h: Remove.
	* config/cris/aout.h: Remove.
	* config/cris/aout.opt: Remove.
	* config/cris/t-aout: Remove.
	* config/i386/beos-elf.h: Remove.
	* config/i386/kaos-i386.h: Remove.
	* config/i386/ptx4-i.h: Remove.
	* config/i386/sco5.h: Remove.
	* config/i386/sco5.opt: Remove.
	* config/i386/sysv4-cpp.h: Remove.
	* config/i386/sysv5.h: Remove.
	* config/i386/t-beos: Remove.
	* config/i386/t-sco5: Remove.
	* config/i386/t-uwin: Remove.
	* config/i386/uwin.asm: Remove.
	* config/i386/uwin.h: Remove.
	* config/kaos.h: Remove.
	* config/mips/windiss.h: Remove.
	* config/mt: Remove directory.
	* config/pa/pa-osf.h: Remove.
	* config/pa/pa-pro-end.h: Remove.
	* config/pa/t-pro: Remove.
	* config/ptx4.h: Remove.
	* config/rs6000/beos.h: Remove.
	* config/rs6000/kaos-ppc.h: Remove.
	* config/rs6000/t-beos: Remove.
	* config/rs6000/windiss.h: Remove.
	* config/sh/kaos-sh.h: Remove.
	* config/sol2-6.h: Remove.
	* config/sparc/sol26-sld.h: Remove.
	* config/sparc/sysv4-only.h: Remove.
	* config/vax/bsd.h: Remove.
	* config/vax/t-memfuncs: Remove.
	* config/vax/ultrix.h: Remove.
	* config/vax/vaxv.h: Remove.
	* config/windiss.h: Remove.

gcc/testsuite:
	* g++.dg/abi/arm_cxa_vec1.C: Don't handle xscale*-*-*.
	* g++.dg/eh/spbp.C: Don't handle *-*-solaris2.[56]*.
	* g++.dg/warn/miss-format-1.C: Don't handle Solaris before Solaris
	7.
	* gcc.c-torture/compile/981006-1.c: Don't handle xscale*-*-*,
	strongarm*-*-* and cris-*-aout*.
	* gcc.c-torture/execute/941014-1.x: Don't handle xscale*-*-* and
	strongarm*-*-*.
	* gcc.dg/20030909-1.c: Don't handle xscale*-*-* and
	strongarm*-*-*.
	* gcc.dg/20031108-1.c: Don't handle xscale*-*-* and
	strongarm*-*-*.
	* gcc.dg/20040813-1.c: Don't handle *-*-sysv5*.
	* gcc.dg/arm-asm.c: Don't handle strongarm*-*-* and xscale*-*-*.
	* gcc.dg/arm-scd42-1.c: Use target arm*-*-*.
	* gcc.dg/arm-scd42-3.c: Use target arm*-*-*.
	* gcc.dg/cpp/assert4.c: Don't handle BeOS.
	* gcc.dg/debug/pr35154.c: Don't handle *-*-sysv5*.
	* gcc.dg/intmax_t-1.c: Don't handle *-*-solaris2.5.1 and
	xscale*-*-elf*.
	* gcc.dg/pragma-align.c: Don't handle i?86-*-sco3.2v5*.
	* gcc.dg/pthread-init-2.c: Don't handle *-*-solaris2.5.1.
	* gcc.misc-tests/arm-isr.exp: Use target arm*-*-*.
	* gcc.target/powerpc/ppc-sdata-1.c: Don't handle powerpc-*-sysv*.
	* gcc.target/powerpc/ppc-sdata-2.c: Don't handle powerpc-*-sysv*.
	* gcc.target/powerpc/ppc-stackalign-1.c: Don't handle
	powerpc-*-sysv*.
	* gfortran.dg/debug/pr35154-stabs.f: Don't handle *-*-sysv5*.
	* lib/target-supports.exp: Don't handle strongarm*-*-elf,
	xscale*-*-elf and *-*-windiss.
	* obj-c++.dg/dwarf-2.mm: Don't handle *-*-solaris2.[56]*.
	* objc.dg/dwarf-1.m: Don't handle *-*-solaris2.[56]*.
	* objc.dg/dwarf-2.m: Don't handle *-*-solaris2.[56]*.
	* gcc.dg/mt-loopi1.c: Remove.

gnattools:
	* configure.ac (xscale*-wrs-vx*, xscale*-wrs-coff): Remove.
	* configure: Regenerate.

libcpp:
	* configure.ac (parisc*64*-*-*): Remove.
	* configure: Regenerate.

libffi:
	* configure.ac (parisc*-*-linux*, powerpc-*-sysv*,
	powerpc-*-beos*): Remove.
	* configure: Regenerate.

libgcc:
	* config.host (strongarm*-*-*, ep9312*-*-*, xscale-*-*,
	parisc*-*-*, m680[012]0-*-*, *-*-linux*libc1*, *-*-linux*aout*,
	alpha*-*-unicosmk*, strongarm*-*-freebsd*, ep9312-*-elf,
	arm*-*-kaos*, cris-*-aout, parisc*64*-*-linux*, parisc*-*-linux*,
	hppa1.1-*-pro*, hppa1.1-*-osf*, hppa1.1-*-bsd*,
	i[34567]86-sequent-ptx4*, i[34567]86-sequent-sysv4*,
	i[34567]86-*-beoself*, i[34567]86-*-beos*, i[34567]86-*-sco3.2v5*,
	i[34567]86-*-sysv5*, i[34567]86-*-sysv4*, i[34567]86-*-uwin*,
	i[34567]86-*-kaos*, m68020-*-elf*, m68010-*-netbsdelf*,
	mips-wrs-windiss, mt-*-elf, powerpc-*-beos*, powerpc-*-chorusos*,
	powerpc-wrs-windiss*, powerpcle-*-sysv*, powerpc-*-kaos*,
	powerpcle-*-kaos*, sh*-*-kaos*, sparc-*-sysv4*, strongarm-*-elf*,
	strongarm-*-pe, strongarm-*-kaos*, vax-*-bsd*, vax-*-sysv*,
	vax-*-ultrix*, xscale-*-elf, xscale-*-coff): Remove.

libjava:
	* configure.host (strongarm*-elf, xscale*-elf): Remove.

libstdc++-v3:
	* configure.host (xscale, ep9312, m680[246]0, solaris2.5,
	solaris2.5.[0-9], solaris2.6, windiss*): Remove.
	* crossconfig.m4 (*-solaris2.5, *-solaris2.6, *-windiss*): Remove.
	* configure: Regenerate.
	* config/os/solaris/solaris2.5: Remove directory.
	* config/os/solaris/solaris2.6: Remove directory.
	* config/os/windiss: Remove directory.

From-SVN: r136534
2008-06-07 19:00:15 +01:00
Tom Tromey d750887f5f re PR preprocessor/36320 (Required diagnosis of syntax error missed)
gcc/testsuite
	PR preprocessor/36320:
	* gcc.dg/cpp/pr36320.c: New file.
libcpp
	PR preprocessor/36320:
	* internal.h (_cpp_parse_expr): Update.
	* expr.c (_cpp_parse_expr): Add 'is_if' argument.  Update error
	messages.
	* directives.c (do_if): Update.
	(do_elif): Require expression if processing group.

From-SVN: r136209
2008-05-30 14:25:09 +00:00
Danny Smith c100de59eb cpplib.h (struct cpp_dir): Add new field, canonical_name.
libcpp/ChangeLog
	* include/cpplib.h (struct cpp_dir): Add new field, canonical_name.

gcc/ChangeLog

	* incpath.c: Use HOST_LACKS_INODE_NUMBERS conditional
	rather than OS names to choose INO_T_EQ definition.
	(DIRS_EQ) [!INO_T_EQ]: Don't worry about case in comparison.
	(add_path) [!INO_T_EQ]: Use lrealpath to fill canonical_name field.

From-SVN: r136196
2008-05-30 00:57:56 +00:00
Tom Tromey 5d6342ebc2 re PR preprocessor/27777 (Bad diagnostic emission when #error contains a trigraph)
gcc/testsuite
	PR preprocessor/27777:
	* gcc.dg/cpp/pr27777.c: New file.
libcpp
	PR preprocessor/27777:
	* lex.c (cpp_output_line_to_string): New function.
	* internal.h (_cpp_begin_message): Don't declare.
	* errors.c (_cpp_begin_message): Now static.
	* include/cpplib.h (cpp_output_line_to_string): Declare.
	* directives.c (do_diagnostic): Rewrote.  Use
	cpp_output_line_to_string.  Don't use _cpp_begin_message.

From-SVN: r135740
2008-05-21 21:52:57 +00:00
Tom Tromey dae4174e53 symtab.h (HT_ALLOCED): Remove.
libcpp
	* include/symtab.h (HT_ALLOCED): Remove.
	(ht_purge): Declare.
	* symtab.c (DELETED): New define.
	(ht_lookup): Update comment.
	(ht_lookup_with_hash): Handle deleted entries.  Remove HT_ALLOCED
	code.  Use subobject allocator for strings, if it exists.
	(ht_expand): Handle deleted entries.
	(ht_forall): Likewise.
	(ht_purge): New function.
	(ht_dump_statistics): Print deletion statistics.
gcc
	* ggc-zone.c (lookup_page_table_if_allocated): New function.
	(zone_find_object_offset): Likewise.
	(gt_ggc_m_S): Likewise.
	(highest_bit): Likewise.
	* ggc-page.c (gt_ggc_m_S): New function.
	* stringpool.c (string_stack): Remove.
	(init_stringpool): Update.
	(ggc_alloc_string): Use ggc_alloc.
	(maybe_delete_ident): New function.
	(ggc_purge_stringpool): Likewise.
	(gt_ggc_m_S): Remove.
	* ggc-common.c (ggc_protect_identifiers): New global.
	(ggc_mark_roots): Call ggc_purge_stringpool.  Use
	ggc_protect_identifiers.
	* ggc.h (ggc_protect_identifiers): Declare.
	(gt_ggc_m_S): Update.
	(ggc_purge_stringpool): Declare.
	* toplev.c (compile_file): Set and reset ggc_protect_identifiers.
	* gengtype.c (write_types_process_field) <TYPE_STRING>: Remove
	special case.
	(write_root): Cast gt_ggc_m_S to gt_pointer_walker.
gcc/cp
	* mangle.c (save_partially_mangled_name): Remove.
	(restore_partially_mangled_name): Likewise.
	(write_encoding): Update.
	(write_unqualified_name): Likewise.
	(start_mangling): Always use name_obstack.  Remove 'ident_p'
	argument.
	(get_identifier_nocopy): Remove.
	(finish_mangling_internal): Rename from finish_mangling.
	(finish_mangling): New function.
	(finish_mangling_get_identifier): Likewise.
	(partially_mangled_name, partially_mangled_name_len): Remove.
	(mangle_decl_string): Change return type.  Update.
	(mangle_decl, mangle_type_string, mangle_special_for_type,
	mangle_ctor_vtbl_for_type, mangle_thunk, mangle_guard_variable,
	mangle_ref_init_variable): Update.

From-SVN: r135720
2008-05-21 15:00:59 +00:00
Tom Tromey 899015a064 re PR preprocessor/22168 (#if #A == #B should have a diagnostic in ISO C mode)
libcpp
	PR preprocessor/22168:
	* include/cpplib.h (struct cpp_options) <objc>: Update
	documentation.
	* expr.c (eval_token): Warn for use of assertions.
	* directives.c (directive_diagnostics): Warn about extensions.
	(DEPRECATED): New define.
	(DIRECTIVE_TABLE): Use it.
gcc
	PR preprocessor/22168:
	* doc/cpp.texi (Top): Update menu.
	(Alternatives to Wrapper #ifndef): New node.
	(Other Directives): Document deprecation.
	(Obsolete Features): Remove menu.
	(Assertions): Merge node into Obsolete Features.
	(Obsolete once-only headers): Move earlier; rename to Alternatives
	to Wrapper #ifndef.
	* doc/cppopts.texi: Update.
	* c.opt (Wdeprecated): Enable for C and ObjC.
	* doc/invoke.texi (Option Summary): Move -Wno-deprecated.
	(C++ Dialect Options): Move -Wno-deprecated from here to...
	(Warning Options): ... here.
gcc/testsuite
	PR preprocessor/22168:
	* gcc.dg/pch/import-2.hs: Add -Wno-deprecated.
	* gcc.dg/pch/import-1.hs: Add -Wno-deprecated.
	* gcc.dg/pch/import-2.c: Add -Wno-deprecated.
	* gcc.dg/pch/import-1.c: Add -Wno-deprecated.
	* gcc.dg/cpp/import2.c: Add -Wno-deprecated.
	* gcc.dg/cpp/import1.c: Add -Wno-deprecated.
	* gcc.dg/cpp/trad/assert3.c: Add -Wno-deprecated.
	* gcc.dg/cpp/trad/assert2.c: Add -Wno-deprecated.
	* gcc.dg/cpp/trad/assert1.c: Add -Wno-deprecated.
	* gcc.dg/cpp/ident.c: Add -Wno-deprecated.
	* gcc.dg/cpp/ident-1.c: Add -Wno-deprecated.
	* gcc.dg/cpp/extratokens.c: Add -Wno-deprecated.
	* gcc.dg/cpp/assert3.c: Add -Wno-deprecated.
	* gcc.dg/cpp/assert2.c: Add -Wno-deprecated.
	* gcc.dg/cpp/assert1.c: Add -Wno-deprecated.
	* gcc.dg/cpp/assert4.c: Compile with -ansi and not -pedantic.  Add
	-Wno-deprecated.
	* gcc.dg/cpp/pr22168.c: New file.
	* gcc.dg/cpp/pr22168-2.c: New file.

From-SVN: r135264
2008-05-13 14:50:27 +00:00
Tom Tromey 71c10038d1 PR preprocessor/35313, PR preprocessor/36088:
gcc/testsuite
	PR preprocessor/35313, PR preprocessor/36088:
	* gcc.dg/cpp/pr35313.c: New file.
	* gcc.dg/cpp/if-oppr.c: Remove test for ',' in a conditional
	expression.
	* gcc.dg/cpp/if-oppr2.c: New file.
libcpp
	PR preprocessor/35313, PR preprocessor/36088:
	* expr.c (optab) <QUERY, COMMA>: Set precedence to 4.
	(reduce) <case CPP_QUERY>: Special case CPP_COMMA and CPP_COLON.

From-SVN: r134989
2008-05-06 17:15:07 +00:00
David S. Miller 2bd0fe3d07 Sorry, forgot this in previous commit.
From-SVN: r134930
2008-05-04 04:25:30 -07:00
David S. Miller 5f7ca34bf5 config.gcc (sparc*-*-*): Always set need_64bit_hwint to yes.
gcc/

	* config.gcc (sparc*-*-*): Always set need_64bit_hwint to yes.
	(sparc*-*-linux*): Use linux.h in tm_file.
	(sparc-*-linux*): If 'enabled_targets' is 'all', build a bi-arch
	compiler defaulting to 32-bit.
	(sparc*-*-*): Remove explicit target settings of need_64bit_hwint,
	no longer needed.
	* config/sparc/linux.h: Remove definitions now obtained
	properly from linux.h
	* config/sparc/linux64.h: Likewise.
	(ASM_CPU_DEFAULT_SPEC): Change this to ASM_CPU64_DEFAULT_SPEC, we
	don't want this setting for 32-bit builds in a biarch compiler.
	* doc/install.texi: Add sparc-linux to list of targets
	supporting --enable-targets=all.

libcpp/

	* configure.ac (sparc*-*-*): Always set need_64bit_hwint to yes.
	* configure: Regenerate.

From-SVN: r134929
2008-05-04 04:25:04 -07:00
Daniel Franke 28f6862553 cpplib.h (cpp_define_formatted): New.
2008-04-22  Daniel Franke  <franke.daniel@gmail.com>

        * include/cpplib.h (cpp_define_formatted): New.
        * directives.c (cpp_define_formatted): New.

From-SVN: r134564
2008-04-22 14:04:32 -04:00
Tom Tromey 688e7a5344 re PR preprocessor/33415 (Can't compile .cpp file with UTF-8 BOM.)
libcpp
	PR libcpp/33415:
	* charset.c (_cpp_convert_input): Add buffer_start argument.
	Ignore UTF-8 BOM if seen.
	* internal.h (_cpp_convert_input): Add argument.
	* files.c (struct _cpp_file) <buffer_start>: New field.
	(destroy_cpp_file): Free buffer_start, not buffer.
	(_cpp_pop_file_buffer): Likewise.
	(read_file_guts): Update.
gcc/testsuite
	PR libcpp/33415:
	* gcc.dg/cpp/pr33415.c: New file.

From-SVN: r134507
2008-04-21 14:02:00 +00:00
Kris Van Hees b6baa67d79 cpp-id-data.h (UC): Was U, conflicts with U...
libcpp/ChangeLog:
2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>

* include/cpp-id-data.h (UC): Was U, conflicts with U... literal.
* include/cpplib.h (CHAR16, CHAR32, STRING16, STRING32): New tokens.
(struct cpp_options): Added uliterals.
(cpp_interpret_string): Update prototype.
(cpp_interpret_string_notranslate): Idem.
* charset.c (init_iconv_desc): New width member in cset_converter.
(cpp_init_iconv): Add support for char{16,32}_cset_desc.
(convert_ucn): Idem.
(emit_numeric_escape): Idem.
(convert_hex): Idem.
(convert_oct): Idem.
(convert_escape): Idem.
(converter_for_type): New function.
(cpp_interpret_string): Use converter_for_type, support u and U prefix.
(cpp_interpret_string_notranslate): Match changed prototype.
(wide_str_to_charconst): Use converter_for_type.
(cpp_interpret_charconst): Add support for CPP_CHAR{16,32}.
* directives.c (linemarker_dir): Macro U changed to UC.
(parse_include): Idem.
(register_pragma_1): Idem.
(restore_registered_pragmas): Idem.
(get__Pragma_string): Support CPP_STRING{16,32}.
* expr.c (eval_token): Support CPP_CHAR{16,32}.
* init.c (struct lang_flags): Added uliterals.
(lang_defaults): Idem.
* internal.h (struct cset_converter) <width>: New field.
(struct cpp_reader) <char16_cset_desc>: Idem.
(struct cpp_reader) <char32_cset_desc>: Idem.
* lex.c (digraph_spellings): Macro U changed to UC.
(OP, TK): Idem.
(lex_string): Add support for u'...', U'...', u... and U....
(_cpp_lex_direct): Idem.
* macro.c (_cpp_builtin_macro_text): Macro U changed to UC.
(stringify_arg): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.

gcc/ChangeLog:
2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>
  
* c-common.c (CHAR16_TYPE, CHAR32_TYPE): New macros.
(fname_as_string): Match updated cpp_interpret_string prototype.
(fix_string_type): Support char16_t* and char32_t*.
(c_common_nodes_and_builtins): Add char16_t and char32_t (and
derivative) nodes.  Register as builtin if C++0x.
(c_parse_error): Support CPP_CHAR{16,32}.
* c-common.h (RID_CHAR16, RID_CHAR32): New elements. 
(enum c_tree_index) <CTI_CHAR16_TYPE, CTI_SIGNED_CHAR16_TYPE,
CTI_UNSIGNED_CHAR16_TYPE, CTI_CHAR32_TYPE, CTI_SIGNED_CHAR32_TYPE,
CTI_UNSIGNED_CHAR32_TYPE, CTI_CHAR16_ARRAY_TYPE,
CTI_CHAR32_ARRAY_TYPE>: New elements.
(char16_type_node, signed_char16_type_node, unsigned_char16_type_node,
char32_type_node, signed_char32_type_node, char16_array_type_node,
char32_array_type_node): New defines.
* c-lex.c (cb_ident): Match updated cpp_interpret_string prototype.
(c_lex_with_flags): Support CPP_CHAR{16,32} and CPP_STRING{16,32}.
(lex_string): Support CPP_STRING{16,32}, match updated
cpp_interpret_string and cpp_interpret_string_notranslate prototypes.
(lex_charconst): Support CPP_CHAR{16,32}.
* c-parser.c (c_parser_postfix_expression): Support CPP_CHAR{16,32}
and CPP_STRING{16,32}.

gcc/cp/ChangeLog:
2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>

* cvt.c (type_promotes_to): Support char16_t and char32_t.
* decl.c (grokdeclarator): Disallow signed/unsigned/short/long on
char16_t and char32_t.
* lex.c (reswords): Add char16_t and char32_t (for c++0x).
* mangle.c (write_builtin_type): Mangle char16_t/char32_t as vendor
extended builtin type u8char32_t.
* parser.c (cp_lexer_next_token_is_decl_specifier_keyword): Support
RID_CHAR{16,32}.
(cp_lexer_print_token): Support CPP_STRING{16,32}.
(cp_parser_is_string_literal): Idem.
(cp_parser_string_literal): Idem.
(cp_parser_primary_expression): Support CPP_CHAR{16,32} and
CPP_STRING{16,32}.
(cp_parser_simple_type_specifier): Support RID_CHAR{16,32}. 
* tree.c (char_type_p): Support char16_t and char32_t as char types.
* typeck.c (string_conv_p): Support char16_t and char32_t.

gcc/testsuite/ChangeLog:
2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>

Tests for char16_t and char32_t support.
* g++.dg/ext/utf-cvt.C: New
* g++.dg/ext/utf-cxx0x.C: New
* g++.dg/ext/utf-cxx98.C: New
* g++.dg/ext/utf-dflt.C: New
* g++.dg/ext/utf-gnuxx0x.C: New
* g++.dg/ext/utf-gnuxx98.C: New
* g++.dg/ext/utf-mangle.C: New
* g++.dg/ext/utf-typedef-cxx0x.C: New
* g++.dg/ext/utf-typedef-
* g++.dg/ext/utf-typespec.C: New
* g++.dg/ext/utf16-1.C: New
* g++.dg/ext/utf16-2.C: New
* g++.dg/ext/utf16-3.C: New
* g++.dg/ext/utf16-4.C: New
* g++.dg/ext/utf32-1.C: New
* g++.dg/ext/utf32-2.C: New
* g++.dg/ext/utf32-3.C: New
* g++.dg/ext/utf32-4.C: New
* gcc.dg/utf-cvt.c: New
* gcc.dg/utf-dflt.c: New
* gcc.dg/utf16-1.c: New
* gcc.dg/utf16-2.c: New
* gcc.dg/utf16-3.c: New
* gcc.dg/utf16-4.c: New
* gcc.dg/utf32-1.c: New
* gcc.dg/utf32-2.c: New
* gcc.dg/utf32-3.c: New
* gcc.dg/utf32-4.c: New

libiberty/ChangeLog:
2008-04-14  Kris Van Hees <kris.van.hees@oracle.com>

* testsuite/demangle-expected: Added tests for char16_t and char32_t.

From-SVN: r134438
2008-04-18 09:58:08 -04:00
Paolo Bonzini deb984e6de re PR other/35457 (Error building GCC trunk on CELL SPU)
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* configure.ac: Include override.m4.
	* configure: Regenerate.

libgomp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libdecnumber:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

gcc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libstdc++-v3:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libobjc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

intl:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libgfortran:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libmudflap:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

boehm-gc:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libiberty:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Add override.m4.
	* configure: Regenerate.

libffi:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libssp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

config:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457

	* confsubdir.m4: Rename to...
	* override.m4: ... this.  Make sure aclocal always picks it.
	Add more lenient precious variable check, backported from
	autoconf trunk.

libjava/libltdl:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libjava/classpath:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libjava:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

libcpp:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

fixincludes:
2008-04-18  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/35457
	* Makefile.in: Rewrite aclocal.m4 rule.
	* aclocal.m4: Regenerate.
	* configure: Regenerate.

From-SVN: r134434
2008-04-18 10:28:53 +00:00
Tom Tromey bf048bea9c re PR preprocessor/34866 (valgrind error indication in testsuite from errors.c:156:cpp_error with gcc.dg/cpp/Wmissingdirs.c)
PR libcpp/34866:
	* errors.c (cpp_error): Don't reference a token before the start
	of the current run.

From-SVN: r134421
2008-04-18 00:58:58 +00:00
Tom Tromey 7f27b0f8a2 Makefile.in (TAGS_SOURCES): New variable.
* Makefile.in (TAGS_SOURCES): New variable.
	(TAGS): New target.

From-SVN: r134367
2008-04-16 21:10:37 +00:00
Kaz Kojima a1fcb9a1de config.gcc (need_64bit_hwint): Need 64bit hwint for sh-*-*.
* config.gcc (need_64bit_hwint): Need 64bit hwint for sh-*-*.

	[libcpp]
	* configure.ac: (need_64bit_hwint): Need 64bit hwint for sh-*-*
	and shbe-*-*.
	* configure: Rebuilt.

From-SVN: r134190
2008-04-11 04:21:18 +00:00
Joseph Myers 93d45d9eda cppopts.texi (-dU): Document.
gcc:
	* doc/cppopts.texi (-dU): Document.
	* c-common.h (flag_dump_macros): Update comment.
	* c-opts.c (handle_OPT_d): Handle -dU.
	* c-ppoutput.c (macro_queue, define_queue, undef_queue,
	dump_queued_macros, cb_used_define, cb_used_undef): New.
	(init_pp_output): Handle -dU.
	(cb_line_change): Call dump_queued_macros.
	* toplev.c (decode_d_option): Accept -dU as preprocessor option.

gcc/testsuite:
	* gcc.dg/cpp/cmdlne-dU-1.c, gcc.dg/cpp/cmdlne-dU-2.c,
	gcc.dg/cpp/cmdlne-dU-3.c, gcc.dg/cpp/cmdlne-dU-4.c,
	gcc.dg/cpp/cmdlne-dU-5.c, gcc.dg/cpp/cmdlne-dU-6.c,
	gcc.dg/cpp/cmdlne-dU-7.c, gcc.dg/cpp/cmdlne-dU-8.c,
	gcc.dg/cpp/cmdlne-dU-9.c, gcc.dg/cpp/cmdlne-dU-10.c,
	gcc.dg/cpp/cmdlne-dU-11.c, gcc.dg/cpp/cmdlne-dU-12.c,
	gcc.dg/cpp/cmdlne-dU-13.c, gcc.dg/cpp/cmdlne-dU-14.c,
	gcc.dg/cpp/cmdlne-dU-15.c, gcc.dg/cpp/cmdlne-dU-16.c,
	gcc.dg/cpp/cmdlne-dU-17.c, gcc.dg/cpp/cmdlne-dU-18.c,
	gcc.dg/cpp/cmdlne-dU-19.c, gcc.dg/cpp/cmdlne-dU-20.c,
	gcc.dg/cpp/cmdlne-dU-21.c, gcc.dg/cpp/cmdlne-dU-22.c: New tests.

libcpp:
	* include/cpplib.h (struct cpp_callbacks): Add used_define,
	used_undef and before_define.
	(NODE_USED): Define.
	* directives.c (do_define, do_undef, undefine_macros, do_ifdef,
	do_ifndef, cpp_pop_definition): Handle new flag and use new
	callbacks.
	* expr.c (parse_defined): Handle new flag and use new callbacks.
	* macro.c (enter_macro_context, _cpp_free_definition): Handle new
	flag and use new callbacks.

From-SVN: r133847
2008-04-02 20:42:53 +01:00
Jakub Jelinek d4c32e1d76 re PR pch/13675 (#including a precompiled header more than once in the same unit fails)
PR pch/13675
	* files.c (struct _cpp_file): Remove pch field.
	(pch_open_file): Don't set file->pch, just file->pchname.
	(should_stack_file): After pfile->cb.read_pch call
	free pchname and clear pchname, don't close file->fd.
	Test file->pchname instead of file->pch.  Don't close fd after cb.
	(_cpp_stack_include): Test file->pchname instead of file->pch.

	* c-pch.c (c_common_read_pch): On error close (fd) resp. fclose (f).

From-SVN: r133790
2008-04-01 12:58:02 +02:00
Tom Tromey 161031e3ae Makefile.in (POSTCOMPILE): New variable.
* Makefile.in (POSTCOMPILE): New variable.
	(.c.o): Use it.

From-SVN: r133682
2008-03-28 13:32:47 +00:00
Joseph Myers 5bbc43bfd3 * fr.po: Update.
From-SVN: r133665
2008-03-28 02:07:37 +00:00
Joseph Myers 6fd85d2144 * vi.po: Update.
From-SVN: r133376
2008-03-20 13:55:23 +00:00
Joseph Myers 88ab8cf2a5 * es.po, nl.po: Update.
From-SVN: r133322
2008-03-18 19:59:25 +00:00
Joseph Myers 107276837f * zh_CN.po: Update.
From-SVN: r133255
2008-03-15 17:58:46 +00:00
Joseph Myers a02fbb400f * de.po: Update.
From-SVN: r133244
2008-03-15 12:01:29 +00:00
Joseph Myers 988071547d * sv.po: Update.
From-SVN: r133225
2008-03-14 20:51:34 +00:00
Joseph Myers edd3c31e3f rw.po: Remove.
* rw.po: Remove.
	* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r133211
2008-03-14 13:11:20 +00:00
Tom Tromey 14ccf8003e re PR preprocessor/35322 (ICE with incomplete macro)
gcc/testsuite
	PR libcpp/35322:
	* gcc.dg/cpp/pr35322.c: New file.
libcpp
	PR libcpp/35322:
	* directives.c (destringize_and_run): Set pfile->directive.

From-SVN: r133195
2008-03-13 21:10:07 +00:00
Markus Milleder 830465c6ea re PR preprocessor/35458 (Dependency generation (-M) does not quote '#' in filenames)
libcpp
2008-03-06  Markus Milleder  <markus.milleder@generali.at>
	PR preprocessor/35458
	* mkdeps.c (munge): Quote '#' with a '\'.
gcc/testsuite
2008-03-06  Markus Milleder  <markus.milleder@generali.at>
	PR preprocessor/35458
	* gcc.dg/cpp/cmdlne-M-2.c: New file.
	* gcc.dg/cpp/cmdlne-M-2#.h: New file.
	* gcc.dg/cpp/#cmdlne-M-2.h: New file.

From-SVN: r132982
2008-03-06 18:08:40 +00:00
Ralf Wildenhues d482a07324 re PR preprocessor/35379 (-MT generates a target string too long over two lines)
libcpp:
	PR preprocessor/35379
	* mkdeps.c (deps_write): Ensure the first target always appears
	in the first column, without leading backslash newline.  Avoid
	some more extra whitespace.

From-SVN: r132727
2008-02-27 21:42:23 +00:00
Thiemo Seufer 185a6cc159 Makefile.in ($(srcdir)/config.in): Depend on configure.ac.
From-SVN: r132670
2008-02-26 11:41:01 +00:00
Tom Tromey 2bf41bf05d traditional.c (lex_identifier): Use CPP_HASHNODE.
* traditional.c (lex_identifier): Use CPP_HASHNODE.
	* lex.c (lex_identifier): Use CPP_HASHNODE.
	* include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Wrap in
	do-while.
	* identifiers.c (alloc_node): Change return type.
	(_cpp_init_hashtable): Don't cast 'alloc_node'.
	(proxy_assertion_broken): New declaration.
	(cpp_forall_identifiers): Move comment.
	* line-map.c (linemap_add): Comment fix.
	(linemap_line_start): Indentation fix.

From-SVN: r132467
2008-02-20 02:16:43 +00:00
Joseph Myers 0d7bcd0f35 * cpplib.pot: Regenerate.
From-SVN: r132001
2008-02-01 16:26:03 +00:00
Jakub Jelinek 765d600ac5 re PR preprocessor/34692 (Internal error with pragma in macro)
PR preprocessor/34692
	* macro.c (collect_args): Add pragma_buff argument.  Push
	CPP_PRAGMA ... CPP_PRAGMA_EOL tokens to *pragma_buff, rather
	than into arguments.  Reset prevent_expansion and parsing_args
	state at CPP_PRAGMA_EOL/CPP_EOF.
	(funlike_invocation_p): Add pragma_buff argument, pass it through
	to collect_args.
	(enter_macro_context): Add result argument.  Adjust
	funlike_invocation_p caller.  Emit all deferred pragma tokens
	gathered during collect_args before the expansion, add a padding
	token.  Return 2 instead of 1 if any pragma tokens were prepended.
	(cpp_get_token): If enter_macro_context returns 2, don't return
	a padding token, instead cycle to grab CPP_PRAGMA token.
	* directives.c (_cpp_handle_directive): If was_parsing_args
	in deferred pragma, leave parsing_args and prevent_expansion as is.

	* gcc.dg/cpp/pr34692.c: New test.
	* gcc.dg/gomp/pr34692.c: New test.

From-SVN: r131819
2008-01-25 10:01:27 +01:00
Tom Tromey ec46053bfa re PR c++/34859 (g++ -D__STDC_LIMIT_MACROS -D__STDC_LIMIT_MACROS causes error)
libcpp
	PR c++/34859:
	* macro.c (_cpp_create_definition): Handle __STDC_LIMIT_MACROS and
	__STDC_CONSTANT_MACROS.
gcc/testsuite
	PR c++/34859:
	* gcc.dg/cpp/pr34859.c: New file.

From-SVN: r131743
2008-01-22 21:43:49 +00:00
Joseph Myers bdf8f544b6 * sv.po: Update.
From-SVN: r131678
2008-01-20 14:53:58 +00:00
Joseph Myers 1831259863 * sv.po: Update.
From-SVN: r131664
2008-01-20 00:13:43 +00:00
Joseph Myers e523d4f296 * sv.po: Update.
From-SVN: r131663
2008-01-20 00:12:09 +00:00
Fred Fish 681c6ab0da re PR preprocessor/30363 (Support for -traditional-cpp is incomplete in current gcc relative to gcc 2.95.3)
libcpp
2008-01-07  Fred Fish  <fnf@specifix.com>
	PR preprocessor/30363:
	* traditional.c (replace_args_and_push): Add local variable
	cxtquote, calculate the replacement text size assuming a 
	worst case of every input character quoted with backslash,
	and properly handle output quoting of quote characters in
	actual arguments used in function-like macros.
gcc/testsuite
2008-01-07  Fred Fish  <fnf@specifix.com>
	PR preprocessor/30363:
	* gcc.dg/cpp/trad/macroargs.c: Add code to test quoting in
	macro expansions.

From-SVN: r131379
2008-01-07 17:23:40 +00:00
Tom Tromey 33ae48375f re PR preprocessor/34602 (Internal error with invalid #line directive)
libcpp
	PR preprocessor/34602.
	* directives.c (do_line): Don't try to spell EOF token.
	(do_linemarker): Add comment.
gcc/testsuite
	PR preprocessor/34602:
	* gcc.dg/cpp/pr34602.c: New file.

From-SVN: r131304
2008-01-03 17:58:26 +00:00
DJ Delorie 675575f57a charset.c (convert_using_iconv): Close out any shift states, returning to the initial state.
* charset.c (convert_using_iconv): Close out any shift states,
returning to the initial state.

From-SVN: r130785
2007-12-11 20:38:10 -05:00
Tom Tromey 97f6bd406c re PR c/29172 (--combine can't handle #pragma once)
gcc
	PR c/29172:
	* c-opts.c (c_common_parse_file): Call cpp_clear_file_cache.
libcpp
	PR c/29172:
	* internal.h (struct cpp_reader) <file_hash_entries>: Changed
	type.
	<file_hash_entries_allocated, file_hash_entries_used>: Removed.
	* files.c (FILE_HASH_POOL_SIZE): New macro.
	(struct file_hash_entry_pool): New.
	(destroy_all_cpp_files): New function.
	(allocate_file_hash_entries): Allocate a file_hash_entry_pool.
	(new_file_hash_entry): Update.
	(free_file_hash_entries): New function.
	(_cpp_cleanup_files): Call free_file_hash_entries and
	destroy_all_cpp_files.
	(cpp_clear_file_cache): New function.
	* include/cpplib.h (cpp_clear_file_cache): Declare.

From-SVN: r130656
2007-12-06 18:56:26 +00:00
Joseph Myers 4fa3bca112 * vi.po: Update.
From-SVN: r130615
2007-12-05 01:48:45 +00:00
Tom Tromey d56a25e130 ( 5)
From-SVN: r130586
2007-12-03 21:04:47 +00:00
Tom Tromey 607f74e9c6 re PR preprocessor/32868 (Don't warn about redefinitions of __STDC_FORMAT_MACROS)
libcpp
	PR preprocessor/32868:
	* macro.c (_cpp_create_definition): Special case
	__STDC_FORMAT_MACROS.
gcc/testsuite
	PR preprocessor/32868:
	* gcc.dg/cpp/pr32868.c: New file.

From-SVN: r130544
2007-11-30 18:24:01 +00:00
Tom Tromey dc3800e59e Really remove accidentally committed ChangeLog entry
From-SVN: r130541
2007-11-30 17:44:03 +00:00
Michael Matz b0f4807f9e * files.c (search_path_head): Fix check for absolute paths.
From-SVN: r130229
2007-11-16 13:46:57 +00:00
Joseph Myers 5e2ec4b268 * es.po: Update.
From-SVN: r130204
2007-11-15 16:18:41 +00:00
Tom Tromey 7803a05def Fix erroneous ChangeLog change
From-SVN: r130094
2007-11-12 00:40:07 +00:00
Tom Tromey f1e207107a re PR c++/17577 (#pragma implementation no longer diagnoses use after file to which it applies)
gcc/cp
	PR c++/17577:
	* lex.c (handle_pragma_implementation): Use cpp_included_before.
gcc/testsuite
	PR c++/17577:
	* g++.dg/ext/pr17577.h: New file.
	* g++.dg/ext/pr17577.C: New file.
libcpp
	PR c++/17557:
	* include/cpplib.h (cpp_included_before): Declare.
	* files.c (struct file_hash_entry) <location>: New field.
	(_cpp_find_file): Initialize new field.
	(make_cpp_dir): Likewise.
	(cpp_included_before): New function.

From-SVN: r130093
2007-11-12 00:38:48 +00:00
Joseph Myers 5a269cfd7e * de.po, zh_CN.po: Update.
From-SVN: r130084
2007-11-11 13:34:54 +00:00
Joseph Myers 9113fd7b18 be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r130075
2007-11-10 18:36:53 +00:00
Joseph Myers d84767fb01 * cpplib.pot: Regenerate.
From-SVN: r130027
2007-11-08 21:15:46 +00:00
Tom Tromey f373b44d28 re PR preprocessor/30805 (Internal compiler error when using "x##,##__VA_ARGS__" in macro)
libcpp
	PR preprocessor/30805:
	* macro.c (paste_tokens): Handle padding token.
	(paste_tokens): Don't abort unless padding has PASTE_LEFT flag.
gcc/testsuite
	PR preprocessor/30805:
	* gcc.dg/cpp/pr30805.c: New file.

From-SVN: r129827
2007-11-01 18:20:48 +00:00
Tom Tromey 5b9a40df4e re PR preprocessor/30786 (ICE on _Pragma at end of file)
gcc/testsuite
	PR preprocessor/30786:
	* gcc.dg/cpp/pr30786.c: New file.
libcpp
	PR preprocessor/30786:
	* macro.c (builtin_macro): Return result of _cpp_do__Pragma.
	* directives.c (_cpp_do__Pragma): Return error status.
	* internal.h (_cpp_do__Pragma): Update.
	* directives.c (get__Pragma_string): Back up if EOF seen.

From-SVN: r129800
2007-10-31 14:50:13 +00:00
Joseph Myers 68d9cb44ae * es.po, vi.po: Update.
From-SVN: r129537
2007-10-21 18:58:21 +01:00
Joseph Myers e7c61201aa be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r129206
2007-10-10 14:18:12 +01:00
Tom Tromey 5ffeb913b1 tree-cfg.c (remove_bb): Only warn if line is non-zero.
gcc:
	* tree-cfg.c (remove_bb): Only warn if line is non-zero.
	* c-pch.c (c_common_read_pch): Restore current location after
	reading PCH file.
	* tree.c (expand_location): Update.
	(expr_filename): Changed return type.  Unified the two cases.
	(expr_lineno): Likewise.
	(annotate_with_file_line): Don't use EXPR_LINENO and EXPR_FILENAME
	as lvalues.
	* toplev.c (line_table): Changed type.
	(general_init): Update.
	(realloc_for_line_map): New function.
	(general_init): Allocate line_table using GC.
	* fix-header.c (line_table): Changed type.
	(read_scan_file): Update.
	(read_scan_file): Update.
	* c-ppoutput.c (maybe_print_line): Update.
	(print_line): Update.
	(cb_line_change): Update.
	(cb_define): Update.
	(pp_file_change): Update.
	* c-opts.c (c_common_init_options): Update.
	(finish_options): Update.
	(push_command_line_include): Update.
	* c-lex.c (cb_line_change): Update.
	(cb_def_pragma): Update.
	(cb_define): Update.
	(cb_undef): Update.
	(c_lex_with_flags): Use cpp_get_token_with_location.
	* input.h (line_table): Changed type.
	(location_from_locus): New macro.
	* tree.h (EXPR_FILENAME): No longer an lvalue.
	(EXPR_LINENO): Likewise.
	(expr_locus, set_expr_locus): Declare separately for
	USE_MAPPED_LOCATION.
	(expr_filename, expr_lineno): Changed return type.
	* gimplify.c (tree_to_gimple_tuple): Use SET_EXPR_LOCUS.
	* cfgexpand.c (expand_gimple_cond_expr): Use location_from_locus.
	(expand_gimple_basic_block): Likewise.
	* final.c (final_scan_insn): Use expanded_location.
gcc/cp:
	* decl.c (finish_function): Put return's location on line zero of
	file.
gcc/fortran:
	* scanner.c (get_file): Update.
	(load_file): Update.
	(gfc_next_char_literal): Use gfc_linebuf_linenum.
	* f95-lang.c (gfc_init): Update.
	* gfortran.h (gfc_linebuf_linenum): New macro.
gcc/java:
	* lang.c (java_post_options): Update.
	* jcf-parse.c (set_source_filename): Update.
	(give_name_to_class): Update.
	(jcf_parse): Update.
	(duplicate_class_warning): Update.
	(parse_class_file): Update.
	(java_parse_file): Update.
	* expr.c (expand_byte_code): Update.
gcc/testsuite:
	* lib/g++.exp (g++_target_compile): Use -fno-show-column.
gcc/treelang:
	* tree1.c (treelang_init): Update.
	(treelang_parse_file): Update.
	(treelang_parse_file): Update.
	(treelang_parse_file): Update.
	* lex.l: Update.
	(update_lineno_charno): Likewise.
libcpp:
	* internal.h (struct cpp_reader) <invocation_location>: New
	field.
	(struct cpp_reader) <set_invocation_location>: Likewise.
	* init.c (cpp_set_line_map): New function.
	* line-map.c (linemap_add): Use linemap's allocator.
	* include/line-map.h (GTY): Define.
	(line_map_realloc): New typedef.
	(struct line_map): Mark with GTY.
	(struct line_maps): Likewise.
	(struct line_maps) <maps>: Likewise.
	(struct line_maps) <reallocator>: New field.
	* include/symtab.h (GTY): Conditionally define.
	* include/cpplib.h (cpp_set_line_map): Declare.
	(cpp_get_token_with_location): Declare.
	* macro.c (cpp_get_token): Set invocation_location on the reader.
	(cpp_get_token_with_location): New function.

From-SVN: r128190
2007-09-06 16:24:05 +00:00
Chao-ying Fu ac6b1c676c expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur, ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
* expr.c (interpret_float_suffix): Support hr, r, lr, llr, uhr, ur,
	ulr, ullr, hk, k, lk, llk, uhk, uk, ulk, ullk.
	(cpp_classify_number): Support decimal fixed-point constants without
	exponents.
	Warn about fixed-point constants when -pedantic.
	* include/cpplib.h (CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE): Change
	comments to support fixed-point values.
	(CPP_N_FRACT, CPP_N_ACCUM): Define.

From-SVN: r127940
2007-08-30 23:05:17 +00:00
Joseph Myers 42e61fe73d be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po: Update.
	* uk.po: New.

From-SVN: r127664
2007-08-21 12:46:39 +01:00
Tom Tromey cda5e672d8 re PR preprocessor/32974 (#pragma GCC dependency generates extra token error.)
gcc/testsuite
	PR preprocessor/32974:
	* gcc.dg/cpp/pr32974.c: New file.
libcpp
	PR preprocessor/32974:
	* directives.c (parse_include): Don't check for EOL when
	processing #pragma dependency.

From-SVN: r127614
2007-08-18 17:54:11 +00:00
Ollie Wild ccfc4c91bb directives-only.c: New file.
libcpp/
	* directives-only.c: New file.
	* internal.h (struct _cpp_dir_only_callbacks): New.
	(_cpp_preprocess_dir_only): New function.
	* directives.c (_cpp_handle_directive): Check directives_only before
	disabling execution of indented directives.
	* files.c (_cpp_stack_file): Add directives_only check.
	* include/cpplib.h (struct cpp_options): Add directives_only.
	(cpp_init_special_builtins): New function.
	* init.c (cpp_init_special_builtins): New function.
	(cpp_init_builtins): Move builtin_array initialization to
	cpp_init_special_builtins.
	(post_options): Check directives_only before setting
	pfile->state.prevent_expansion = 1.
	* macro.c (_cpp_builtin_macro_text): Print an error if __COUNTER__
	is expanded inside a directive while -fdirectives-only is enabled.
	* Makefile.in (libcpp_a_OBJS): Add directives-only.o.
	(libcpp_a_SOURCES): Add directives-only.c.

	gcc/
	* c-ppoutput.c (print_lines_directives_only): New function.
	(scan_translation_unit_directives_only): New function.
	(preprocess_file): Add call to scan_translation_unit_directives_only.
	* c-opts.c (c_common_handle_option): Add OPT_fdirectives_only.
	(sanitize_cpp_opts): Add default flag_dump_macros setting for
	-fdirectives-only.  Add errors for -fdirectives-only conflict with
	-Wunused-macros and -traditional.
	(finish_options): Add builtin macro initialization for
	-fdirectives-only + -fpreprocessed.
	* c.opt (fdirectives-only): New.
	* doc/cppopts.texi (fdirectives-only): New.

	gcc/testsuite/
	* gcc.dg/cpp/counter-2.c: New test.
	* gcc.dg/cpp/counter-3.c: New test.
	* gcc.dg/cpp/dir-only-1.c: New test.
	* gcc.dg/cpp/dir-only-1.h: New file.
	* gcc.dg/cpp/dir-only-2.c: New test.
	* gcc.dg/cpp/dir-only-3.c: New test.
	* gcc.dg/cpp/dir-only-3a.h: New file.
	* gcc.dg/cpp/dir-only-3b.h: New file.
	* gcc.dg/cpp/dir-only-4.c: New test.
	* gcc.dg/cpp/dir-only-5.c: New test.
	* gcc.dg/cpp/dir-only-6.c: New test.

From-SVN: r127066
2007-07-30 18:29:20 +00:00
Uros Bizjak a206413ab4 traditional.c (_cpp_scan_out_logical_line): Initialize fmacro.args...
* traditional.c (_cpp_scan_out_logical_line): Initialize
	fmacro.args, fmacro.node, fmacro.offset, fmacro.line and
	fmacro.args to prevent 'may be used uninitialized' warning.

From-SVN: r126311
2007-07-04 12:08:44 +02:00
Uros Bizjak c77cd3d140 cpplib.h (CPP_N_WIDTH_MD, [...]): Add new constants.
libcpp/ChangeLog:

	* include/cpplib.h (CPP_N_WIDTH_MD, CPP_N_MD_W, CPP_N_MD_Q):
	Add new constants.
	* expr.c (interpret_float_suffix): Process 'w', 'W', 'q' and 'Q'
	suffixes.  Return CPP_N_MD_W for 'w' or 'W' suffixes and CPP_N_MD_Q
	for 'q' or 'Q' suffixes.

gcc/ChangeLog:

	* targhooks.h (default_mode_for_suffix): New function declaration.
	* targhooks.c (default_mode_for_suffix): New default target hook.
	* target.h (struct c): New structure in the targetm struct.
	(mode_for_suffix): New target hook as part of struct c.
	target-def.h (TARGET_C_MODE_FOR_SUFFIX): Define as
	default_mode_for_suffix.
	(TARGET_C): New define.
	* c-lex.c: Include "target.h".
	(interpret_float): Use targetm.c.mode_for_suffix to determine
	the mode for a given non-standard suffix.
	Makefile.in (c-lex.o): Depend on $(TARGET_H).

	* config/i386/i386.c (ix86_c_mode_for_suffix): New static function.
	(TARGET_C_MODE_FOR_SUFFIX): Define to ix86_c_mode_for_suffix.

	* doc/extend.texi (Floating Types): New node.  Document __float80 and
	__float128 types.  Document 'w', 'W', 'q' and 'Q' suffixes.

testsuite/ChangeLog:

	* gcc.dg/const-float80.c : New test.
	* gcc.dg/const-float128.c : New test.
	* gcc.dg/const-float80-ped.c : New test.
	* gcc.dg/const-float128-ped.c : New test.

From-SVN: r126244
2007-07-03 07:53:58 +02:00
Joseph Myers a40cfc58fa be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	rw.po, sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r126041
2007-06-26 21:05:37 +01:00
Danny Smith e1311401df Correct filename of files.c in recent Changelog entries.
From-SVN: r125779
2007-06-17 23:19:09 +00:00
Danny Smith 66938a1d5d cppfiles.c (open_file): Correct typo.
* cppfiles.c (open_file): Correct typo.

From-SVN: r125778
2007-06-17 23:15:58 +00:00
Vladimir Prus 71995ede98 cppfiles.c (open_file): Prevent the call for stat from overwriting errno.
* cppfiles.c (open_file): Prevent the call
        for stat from overwriting errno.

From-SVN: r125757
2007-06-16 12:30:49 +00:00
Vladimir Prus 84152c25a5 cppfiles.c (open_file): Account for the fact that on windows, opening a directory gives EACCES.
* cppfiles.c (open_file): Account for the
        fact that on windows, opening a directory gives
        EACCES.

From-SVN: r125590
2007-06-09 10:16:52 +00:00
Joerg Wunsch f7fd775f02 re PR preprocessor/23479 (Implement binary constants with a "0b" prefix)
2007-06-05  Joerg Wunsch  <j.gnu@uriah.heep.sax.de>

	PR preprocessor/23479
gcc/
	* doc/extend.texi: Document the 0b-prefixed binary integer
	constant extension.

libcpp/
	* expr.c (cpp_classify_number): Implement 0b-prefixed binary
	integer constants.
	(append_digit): Likewise.
	* include/cpplib.h: Add CPP_N_BINARY, to be used for 0b-prefixed
	binary integer constants.

testsuite/
	* testsuite/gcc.dg/binary-constants-1.c: Add test suites for
	the 0b-prefixed binary integer constants.
	* testsuite/gcc.dg/binary-constants-2.c: Ditto.
	* testsuite/gcc.dg/binary-constants-3.c: Ditto.
	* testsuite/gcc.dg/binary-constants-4.c: Ditto.

From-SVN: r125346
2007-06-05 22:25:27 +00:00
Mike Stump b699150bde Fixup whitespacing
From-SVN: r125255
2007-06-01 02:12:37 +00:00
Dave Korn ed0e74e0a6 re PR preprocessor/14331 (please add option to suppress warning message "no newline at end of file")
2007-05-31  Dave Korn  <dave.korn@artimi.com>

        PR preprocessor/14331
        * lex.c (_cpp_get_fresh_line):  Don't warn if no newline at EOF.

From-SVN: r125212
2007-05-31 02:06:48 +00:00
Ollie Wild a702045a24 macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
* macro.c (_cpp_builtin_macro_text): Handle BT_COUNTER.
	* pch.c (cpp_write_pch_deps): Save __COUNTER__ state.
	(cpp_write_pch_state): Save __COUNTER__ state.
	(cpp_valid_state): Check valid __COUNTER__ state.
	(cpp_read_state): Read new __COUNTER__ state.
	* include/cpplib.h (enum builtin_type): Add BT_COUNTER enumerator.
	* init.c (builtin_array): Add __COUNTER__/BT_COUNTER.
	* internal.h (struct cpp_reader): Add counter member.

	* gcc.dg/cpp/counter-1.c: New test.
	* gcc.dg/pch/counter-1.c: New test.
	* gcc.dg/pch/counter-1.hs: New file.
	* gcc.dg/pch/counter-2.c: New test.
	* gcc.dg/pch/counter-2.hs: New file.
	* gcc.dg/pch/counter-3.c: New test.
	* gcc.dg/pch/counter-3.hs: New file.

	* doc/cpp.texi (Common Predefined Macros): Add __COUNTER__
	description.

From-SVN: r125041
2007-05-24 20:55:36 +00:00
Simon Martin 126e073b22 re PR preprocessor/20077 (GCC accepts macro definitions that fail a constraint)
2007-05-23  Simon Martin  <simartin@users.sourceforge.net>

	PR preprocessor/20077
	* macro.c (create_iso_definition): Fixed the method to determine whether
	the token-pasting operator appears at the beginning or the end of a macro.

From-SVN: r125000
2007-05-23 20:58:34 +00:00
Ian Lance Taylor 0b4cafec04 internal.h (struct cpp_reader): Add new fields: nonexistent_file_hash and nonexistent_file_ob.
* internal.h (struct cpp_reader): Add new fields:
	nonexistent_file_hash and nonexistent_file_ob.
	* files.c: Include "obstack.h".
	(find_file_in_dir): Before trying to open the file, look up the
	path name in the hash table of nonexistent files.  After failing
	to open the file, add the path name to the hash table.
	(_cpp_find_file): Cache the results of looking up the file name
	starting with the quote and bracket chain heads, if we can.
	(nonexistent_file_hash_eq): New static function.
	(_cpp_init_files): Initialize pfile->nonexistent_file_hash and
	pfile->nonexistent_file_ob.
	(_cpp_cleanup_files): Free pfile->nonexistent_file_hash and
	pfile->nonexistent_file_ob.

From-SVN: r124929
2007-05-21 23:43:53 +00:00
Janis Johnson 5a6bb57eb9 expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
libcpp/
        * expr.c (cpp_classify_number): Warn about dfp constant for -pedantic.
gcc/testsuite/
        * gcc.dg/fltconst-pedantic-dfp.c: New test.

From-SVN: r124731
2007-05-14 23:45:40 +00:00
Janis Johnson 30e0492187 re PR c/31924 (gcc accepts invalid suffixes for decimal float constants)
libcpp/
        PR c/31924
        * expr.c (interpret_float_suffix): Check for invalid suffix.
gcc/testsuite/
        PR c/31924
        * gcc.dg/fltconst-1.c: New test.

From-SVN: r124730
2007-05-14 23:43:07 +00:00
Eric Christopher 22a8a52d65 if-div.c: New file.
2007-05-02  Eric Christopher  <echristo@apple.com>

	    * gcc.dg/cpp/if-div.c: New file.

2007-05-02  Eric Christopher  <echristo@apple.com>

	    * expr.c (num_div_op): Don't overflow if the result is
	    zero.

From-SVN: r124358
2007-05-02 21:57:50 +00:00
Tom Tromey fca35e1b54 re PR preprocessor/28709 (Bad diagnostic pasting tokens with ##)
libcpp
	PR preprocessor/28709:
	* macro.c (paste_tokens): Remove PASTE_LEFT from the old lhs.
gcc/testsuite
	PR preprocessor/28709:
	* gcc.dg/cpp/pr28709.c: New file.

From-SVN: r124356
2007-05-02 19:33:44 +00:00
Michael Meissner 4cd97075ff make alloca call type correct
From-SVN: r123374
2007-03-30 22:40:19 +00:00
Richard Henderson 121de39fc0 directives.c (lex_macro_node_from_str): New.
libcpp/
        * directives.c (lex_macro_node_from_str): New.
        (cpp_push_definition, cpp_pop_definition): New.
        * include/cpplib.h (cpp_push_definition, cpp_pop_definition): Declare.
gcc/
        * c-pragma.c (struct def_pragma_macro_value): New.
        (struct def_pragma_macro): New.
        (pushed_macro_table): New.
        (dpm_hash, dpm_eq): New.
        (handle_pragma_push_macro, handle_pragma_pop_macro): New.
        (init_pragma): Install them.
        * doc/tm.texi (HANDLE_PRAGMA_PUSH_POP_MACRO): New.

Co-Authored-By: Kai Tietz <kai.tietz@onevision.com>

From-SVN: r123370
2007-03-30 14:12:53 -07:00
Joseph Myers 1a777b2d5d * cpplib.pot: Regenerate.
From-SVN: r122666
2007-03-07 18:01:18 +00:00
Brooks Moses 4fcb360b62 * Makefile.in: Add dummy install-pdf target.
From-SVN: r122445
2007-03-01 15:56:24 -08:00
Tom Tromey 67e6443958 re PR preprocessor/30468 (-M not fully chops dirname)
PR preprocessor/30468:
	* mkdeps.c (apply_vpath): Strip successive '/'s if we stripped
	'./'.

From-SVN: r121341
2007-01-30 15:50:00 +00:00
Tom Tromey ee380365ef re PR preprocessor/29966 (crash in cc1 with backtrace from free())
PR preprocessor/29966:
	* macro.c (lex_expansion_token): Save and restore cpp_reader's
	cur_token.
	(_cpp_create_definition): Don't restore cur_token here.
	* lex.c (_cpp_lex_token): Added assertion.

From-SVN: r121340
2007-01-30 15:46:01 +00:00
Tom Tromey 024abeb327 depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make directory.
config
2007-01-27  Paolo Bonzini  <bonzini@gnu.org>
	* depstand.m4 (ZW_CREATE_DEPDIR): Use mkinstalldirs to make
	directory.

libcpp
	* configure: Rebuilt.

From-SVN: r121237
2007-01-27 19:50:38 +00:00
Tom Tromey ee1c2a100a re PR preprocessor/28227 (valid #ifdef rejected)
libcpp
	PR preprocessor/28227:
	* directives.c (lex_macro_node): Added 'is_def_or_undef'
	argument.
	(do_define): Update.
	(do_undef): Update.
	(do_ifdef): Update.
	(do_ifndef): Update.
gcc/testsuite
	PR preprocessor/28227:
	* gcc.dg/cpp/pr28227.c: New file.

From-SVN: r120731
2007-01-12 19:46:49 +00:00
Paolo Bonzini 1aa6ca40fb warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable.
config:
2007-01-11  Paolo Bonzini  <bonzini@gnu.org>

        * warnings.m4: Use m4_expand_once to clear the AC_SUBST'ed variable.
        (ACX_PROG_CC_WARNINGS_ARE_ERRORS): Fix typo.  Add optional 2nd argument.

libcpp:
2007-01-11  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

From-SVN: r120675
2007-01-11 15:21:53 +00:00
Paolo Bonzini 67214c1624 warnings.m4: Add second parameter with name of variable.
config:
2007-01-11  Paolo Bonzini  <bonzini@gnu.org>

	* config/warnings.m4: Add second parameter with name of variable.
	Always append to the variable if it exists.

libcpp:
2007-01-11  Paolo Bonzini  <bonzini@gnu.org>

	* configure: Regenerate.

From-SVN: r120673
2007-01-11 14:11:32 +00:00
Tom Tromey 705e2d28a1 re PR preprocessor/28165 (_Pragma GCC system_header broken)
libcpp
	PR preprocessor/28165:
	* internal.h (cpp_in_primary_file): New function.
	* directives.c (do_include_next): Use cpp_in_primary_file.
	(do_pragma_once): Likewise.
	(do_pragma_system_header): Likewise.
gcc/testsuite
	PR preprocessor/28165:
	* gcc.dg/cpp/pr28165.c: New file.

From-SVN: r120441
2007-01-04 15:32:26 +00:00
Ian Lance Taylor 7af45bd465 lex.c (_cpp_clean_line): Add uses of __builtin_expect.
* lex.c (_cpp_clean_line): Add uses of __builtin_expect.  Don't
	look backward at the end of the line unless we saw a backslash.

From-SVN: r120263
2006-12-29 15:43:55 +00:00
Jakub Jelinek 9d30f270db re PR preprocessor/29612 (gcc --save-temps does not give "multi-character character constant" error)
PR preprocessor/29612
	* directives.c (do_linemarker): Set pfile->buffer->sysp always, not
	only when new_sysp is non-zero.

	* gcc.dg/cpp/pr29612-1.c: New test.
	* gcc.dg/cpp/pr29612-2.c: New test.

From-SVN: r120257
2006-12-29 09:15:08 +01:00
Tom Tromey 30b0edc057 re PR preprocessor/30001 (out-of-bounds access when processing empty file)
PR preprocessor/30001:
	* charset.c (_cpp_convert_input): Check that to.len is greater
	than zero.

From-SVN: r120245
2006-12-28 18:45:48 +00:00
Ben Elliston 83cc06b2b8 Formatting fixes.
From-SVN: r119042
2006-11-21 13:22:40 +11:00
Trevor Smigiel 85d9c13c20 configure.in (skipdirs): Don't build target-libiberty for SPU.
ChangeLog

	* configure.in (skipdirs) : Don't build target-libiberty for SPU.
	* configure : Rebuilt.

gcc/ChangeLog

	* config.gcc : Add target for SPU.
	* config/spu/constraints.md : New file.
	* config/spu/crt0.c : New file.
	* config/spu/crtend.c : New file.
	* config/spu/crti.asm : New file.
	* config/spu/crtn.asm : New file.
	* config/spu/float_unsdidf.c : New file.
	* config/spu/float_unssidf.c : New file.
	* config/spu/predicates.md : New file.
	* config/spu/spu-builtins.def : New file.
	* config/spu/spu-builtins.h : New file.
	* config/spu/spu-builtins.md : New file.
	* config/spu/spu-c.c : New file.
	* config/spu/spu-elf.h : New file.
	* config/spu/spu-modes.def : New file.
	* config/spu/spu-protos.h : New file.
	* config/spu/spu.c : New file.
	* config/spu/spu.h : New file.
	* config/spu/spu.md : New file.
	* config/spu/spu.opt : New file.
	* config/spu/spu_internals.h : New file.
	* config/spu/spu_intrinsics.h : New file.
	* config/spu/spu_mfcio.h : New file.
	* config/spu/t-spu-elf : New file.
	* config/spu/vec_types.h : New file.
	* config/spu/vmx2spu.h : New file.
	* doc/contrib.texi : Document SPU contributor.
	* doc/extend.texi : Document SPU extensions.
	* doc/invoke.texi : Document SPU options.
	* doc/md.texi : Document SPU constraints.

libcpp/ChangeLog

	* configure.ac (need_64bit_hwint): Need 64bit hwint for SPU.
	* configure : Rebuilt.

From-SVN: r119041
2006-11-21 01:35:42 +00:00
Douglas Gregor dfafdaa655 cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X for experimental C++0x mode.
2006-11-01	Douglas Gregor <doug.gregor@gmail.com>

	* include/cpplib.h (enum c_lang): Add CLK_GNUCXX0X and CLK_CXX0X
	for experimental C++0x mode.
	* init.c (lang_defaults): Add defaults for C++0x modes. C++0x has
	adopted the preprocessor changes introduced in C99.

From-SVN: r118385
2006-11-01 16:27:23 +00:00
Joseph Myers 0f45f0f588 config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all.
gcc:
	* config.gcc (i[34567]86-*-linux*): Handle --enable-targets=all.
	Handle tuning for bi-arch i[34567]86-*-linux* like that for
	i[34567]86-*-solaris2.1[0-9]*.
	* config/i386/linux64.h (TARGET_VERSION, MULTILIB_DEFAULTS):
	Define conditionally depending on TARGET_64BIT_DEFAULT.
	(SPEC_32, SPEC_64): Define.
	(LINK_SPEC): Use them.
	* doc/install.texi (--enable-targets=all): Document for x86-linux.

libcpp:
	* configure.ac (need_64bit_hwint): Set for i[34567]86-*-linux*
	depending on --enable-targets=all.
	* configure: Regenerate.

fixincludes:
	* inclhack.def (AAB_fd_zero_asm_posix_types_h): Bypass on x86_64.
	* fixincl.x: Regenerate.

From-SVN: r118147
2006-10-29 16:35:50 +00:00
Joseph Myers 59edb6b4b4 * cpplib.pot: Regenerate.
From-SVN: r117954
2006-10-22 13:40:31 +01:00
Jakub Jelinek de000d222a re PR preprocessor/28709 (Bad diagnostic pasting tokens with ##)
PR preprocessor/28709
	* macro.c (paste_tokens): Do error reporting here, use BUF with the
	spelled LHS token as opposed to spelling it again.
	(paste_all_tokens): Don't report errors here, just break on failure.

	* gcc.dg/cpp/paste14.c: New test.

From-SVN: r117664
2006-10-12 11:25:59 +02:00
Brooks Moses b5422ad772 --(top level)--------------------------------------------
2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.def: Added pdf target handling.
	* Makefile.tpl: Added pdf target handling.
	* Makefile.in: Regenerated.

---fixincludes--------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---gcc----------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* configure.ac: Added pdf to "Make-hooks"
	* Makefile.in: Added TEXI2PDF definition, and various pdf-file
	targets and *.pdf file patterns in cleanup targets.
	* configure: Regenerated.

---gcc/cp-------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "c++.pdf" target support.

---gcc/fortran--------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "fortran.pdf", "gfortran.pdf" target
	support.

---gcc/java-----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "java.pdf", "gcj.pdf" target support.

---gcc/objc-----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added empty "objc.pdf" target.

---gcc/objcp----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added empty "obj-c++.pdf" target.

---gcc/treelang-------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Make-lang.in: Added "treelang.pdf" target support.

---gnattools----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libcpp-------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libdecnumber-------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

---libiberty----------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added "pdf", "libiberty.pdf" target support.
	* testsuite/Makefile.in: Added empty "pdf" target.

---libobjc------------------------------------------------

2006-10-10  Brooks Moses  <bmoses@stanford.edu>

	* Makefile.in: Added empty "pdf" target.

From-SVN: r117618
2006-10-10 16:48:09 -07:00
Geoffrey Keating aaf50ff29c configure.ac: Make need_64_bit_hwint case for x86-darwin match exactly the glob in gcc/config.gcc.
* configure.ac: Make need_64_bit_hwint case for x86-darwin
	match exactly the glob in gcc/config.gcc.
	* configure: Regenerate.

From-SVN: r117156
2006-09-22 23:26:20 +00:00
Joseph Myers c663e30103 re PR c/28768 (Preprocessor doesn't parse tokens correctly?)
libcpp:
	PR c/28768
	PR preprocessor/14634
	* lex.c (lex_string): Pedwarn for unterminated literals.

libgomp:
	* configure.ac (HAVE_CLOCK_GETTIME): Add missing second argument
	to AC_DEFINE.
	* configure: Regenerate.

gcc/testsuite:
	* gcc.dg/cpp/include2.c, gcc.dg/cpp/macspace1.c,
	gcc.dg/cpp/macspace2.c, gcc.dg/cpp/multiline.c,
	gcc.dg/cpp/trad/literals-2.c: Update expected diagnostics.

From-SVN: r116915
2006-09-13 02:04:18 +01:00
Eric Christopher f728889939 config.gcc (i?86-*-darwin): Add 64-bit HWI support.
2006-09-08  Eric Christopher  <echristo@apple.com>

        * config.gcc (i?86-*-darwin): Add 64-bit HWI support.
        * config/t-slibgcc-darwin: Support x86_64 multilib.
        * config/i386/i386.h (JUMP_TABLES_IN_TEXT_SECTION):
        Return 1 for x86_64-darwin.
        * config/i386/t-darwin: Add m64 multilib.
        (LIB2_SIDITI_CONV_FUNCS): Use.
        (LIB2FUNCS_EXTRA): Ditto.
        * config/i386/darwin.h: Support x86_64.
        * config/i386/i386.c (override_options): Turn on flag_pic
        for x86_64-darwin. Disable flag_omit_pointer.
        (get_pc_thunk_name): Assert !TARGET_64BIT.
        (legitimate_address_p): Disable machopic addressing for
        x86_64.
        (legitimize_pic_address): Ditto.
        (ix86_expand_move): Ditto.
        (ix86_expand_call): Ditto.
        (machopic_output_stub): Ditto.
        * config/darwin.c (machopic_select_section): Support literal16.
        (machopic_select_rtx_section): Ditto.
        * config/darwin-sections.def: Ditto.
        * config/darwin-64.c: New.

2006-09-08  Eric Christopher  <echristo@apple.com>

        * gcc.target/i386/20060512-3.c: Run test on ilp32 only.
        * gcc.target/i386/memcpy-1.c: Ditto.
        * gcc.target/i386/asm-1.c: Ditto.
        * gcc.target/i386/20060512-4.c: Ditto.
        * gcc.target/i386/compress-float-387.c: Ditto.
        * gcc.target/i386/20060512-1.c: Ditto.
        * gcc.target/i386/compress-float-sse.c: Ditto.
        * gcc.target/i386/20060512-2.c: Ditto.
        * gcc.target/i386/compress-float-sse-pic.c: Ditto.
        * gcc.target/i386/stack-prot-kernel.c: Ditto.
        * gcc.target/i386/compress-float-387-pic.c: Ditto.
        * gcc.dg/pr26449.c: Ditto.
        * gcc.dg/attr-ms_struct-2.c: Ditto.
        * gcc.dg/attr-ms_struct-1.c: Ditto.
        * gcc.misc-tests/linkage.exp: Fix 64-bit darwin support.

2006-09-08  Eric Christopher  <echristo@apple.com>

        * configure.ac: Add 64-bit HWI support for i?86-darwin.

From-SVN: r116795
2006-09-09 00:27:47 +00:00
Joseph Myers ebbc2cc3dd * vi.po: Update.
From-SVN: r116670
2006-09-03 12:54:34 +01:00
Steve Ellcey b52dbbf865 re PR c++/28288 (ICE with min/max operator)
PR c++/28288
	PR c++/14556
	* operators.def: Remove <?, ?>, <?=, and >?= operators.
	* parser.c: Remove CPP_MIN, CPP_MAX, CPP_MIN_EQ, and CPP_MAX_EQ.
	(cp_parser_warn_min_max): Remove.
	* include/cpplib.h: Remove <?, >?, <?=, and >?= tokens.
	(CPP_LAST_EQ): Change.
	(CPP_LAST_PUNCTUATOR): Change.
	* expr.c (cpp_operator): Remove MIN and MAX.
	(reduce): Remove CPP_MIN and CPP_MAX.
	(num_binary_op): Ditto.
	* lex.c (_cpp_lex_direct): Ditto.
	(cpp_avoid_paste): Remove ? as legal symbol after > or <.

From-SVN: r116140
2006-08-14 23:13:54 +00:00
Joseph Myers 423c6f59a7 * sv.po: Update.
From-SVN: r114973
2006-06-24 19:34:14 +01:00
Joseph Myers a253223291 be.po, [...]: Update.
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po,
	rw.po, sv.po, tr.po, vi.po, zh_CN.po, zh_TW.po: Update.

From-SVN: r114967
2006-06-24 16:40:32 +01:00
Jakub Jelinek 1c90c6f9c0 re PR preprocessor/27746 (ICE on openmp code when using _Pragma from macro)
PR preprocessor/27746
	* directives.c (do_pragma): Handle pragma with valid namespace
	and invalid name coming from macro expansion.
	* directives.c (destringize_and_run): Initialize next field in
	context.

	PR c/27747
	PR c++/27748
	* directives.c (destringize_and_run): Set NO_EXPAND on the
	tokens.

	* macro.c (_cpp_backup_tokens): Fix comment typo.
testsuite/
	PR c/27747
	* gcc.dg/cpp/_Pragma6.c: New test.

	PR c++/27748
	* g++.dg/cpp/_Pragma1.C: New test.

	PR preprocessor/27746
	* gcc.dg/gomp/macro-3.c: New test.
	* gcc.dg/gomp/macro-4.c: New test.
	* g++.dg/gomp/macro-3.C: New test.
	* g++.dg/gomp/macro-4.C: New test.

From-SVN: r114519
2006-06-09 23:13:25 +02:00
Daniel Jacobowitz 5c3c36836e gcc/, libcpp/
gcc/, libcpp/
	* Makefile.in (CATALOGS): Add po/ prefix.
	* configure: Regenerated.
config/
	* gettext-sister.m4 (ZW_GNU_GETTEXT_SISTER_DIR): Provide some
	defines otherwise gotten from AM_GNU_GETTEXT.  Remove the
	po/ prefix from CATALOGS.

From-SVN: r114268
2006-05-31 15:34:37 +00:00
Carlos O'Donell b2bd74bc43 Makefile.in: Add install-html target.
2006-05-23  Carlos O'Donell  <carlos@codesourcery.com>

	* Makefile.in: Add install-html target. Add install-html to .PHONY

From-SVN: r114039
2006-05-24 01:48:20 +00:00
Joseph Myers ef8b9222b7 * de.po: Update.
From-SVN: r113146
2006-04-21 20:45:50 +01:00
Joseph Myers f555078868 * sv.po: Update.
From-SVN: r112580
2006-03-31 18:05:06 +01:00