aboutsummaryrefslogtreecommitdiff
path: root/libcpp
AgeCommit message (Collapse)AuthorFilesLines
2005-04-27From Andris Pavenis, approved by Zack Weinberg, for DJGPP build problem.Andris Pavenis2-0/+5
* files.c: Include io.h for DJGPP to get prototype of setmode. From-SVN: r98910
2005-04-27be.po, [...]: Update.Joseph Myers14-551/+17651
* 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: Update. From-SVN: r98845
2005-04-21re PR preprocessor/20907 (long comments throw off line numbers)Per Bothner2-1/+11
PR preprocessor/20907 * line-map.c (linemap_line_start): Fix bug when we need to increse column_bits but can re-use the current line_map. From-SVN: r98515
2005-04-19system.h (fopen, [...]): Define these to the unlocked libiberty functions.Kaveh R. Ghazi2-0/+10
fixincludes: * system.h (fopen, fdopen, freopen): Define these to the unlocked libiberty functions. gcc: * system.h (fopen, fdopen, freopen): Define these to the unlocked libiberty functions. libcpp: * system.h (fopen, fdopen, freopen): Define these to the unlocked libiberty functions. From-SVN: r98407
2005-04-11configure.ac (fixincludes_UNLOCKED_FUNCS): New.Kaveh R. Ghazi5-31/+971
fixincludes: * configure.ac (fixincludes_UNLOCKED_FUNCS): New. (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for fixincludes_UNLOCKED_FUNCS. * system.h (putchar, getc, getchar, clearerr, feof, fileno, fflush, fgetc, fgets, ferror, fread): Redefine to the associated _unlocked function. (fwrite_unlocked): Fix prototype. * configure, config.h.in: Regenerate. gcc: PR/17092 * configure.ac (gcc_UNLOCKED_FUNCS): New. (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for gcc_UNLOCKED_FUNCS. * system.h (putchar, getc, getchar, clearerr, feof, fileno, fflush, fgetc, fgets, ferror, fread): Redefine to the associated _unlocked function. (fwrite_unlocked): Fix prototype. * configure, config.in: Regenerate. libcpp: * configure.ac (libcpp_UNLOCKED_FUNCS): New. (AC_CHECK_FUNCS, AC_CHECK_DECLS): Check for libcpp_UNLOCKED_FUNCS. * system.h (putchar, getc, getchar, clearerr, feof, fileno, fflush, fgetc, fgets, ferror, fread): Redefine to the associated _unlocked function. (fwrite_unlocked): Fix prototype. * configure, config.in: Regenerate. From-SVN: r97986
2005-04-06rw.po: New file.Joseph Myers2-0/+971
* rw.po: New file. [[Split portion of a mixed commit.]] From-SVN: r97668.2
2005-04-05re PR preprocessor/19475 (missing whitespace after macro name in C90 or C++)Jakub Jelinek2-2/+41
PR preprocessor/19475 * macro.c (create_iso_definition): For < ISO C99, don't pedwarn if there is no whitespace between macro name and its replacement, but the replacement starts with a basic character set character. * gcc.dg/cpp/macspace1.c: New test. * gcc.dg/cpp/macspace2.c: New test. From-SVN: r97652
2005-03-29* de.po: Update.Joseph Myers2-15/+18
From-SVN: r97202
2005-03-28lex.c (warn_about_normalization): Cast field width to int to avoid warning.Andreas Jaeger2-3/+8
* lex.c (warn_about_normalization): Cast field width to int to avoid warning. From-SVN: r97126
2005-03-19config.gcc: Consistently use solaris2.1[0-9]* instead of solaris2.1[0-9].Joseph Myers3-2/+8
gcc: * config.gcc: Consistently use solaris2.1[0-9]* instead of solaris2.1[0-9]. libcpp: * configure.ac: Consistently use solaris2.1[0-9]* instead of solaris2.1[0-9]. * configure: Regenerate. From-SVN: r96743
2005-03-16charset.c (_cpp_valid_ucn): In identifiers, reject a partial UCN rather than ↵Geoffrey Keating2-4/+13
printing an error. 2005-03-15 Geoffrey Keating <geoffk@apple.com> * charset.c (_cpp_valid_ucn): In identifiers, reject a partial UCN rather than printing an error. Index: gcc/testsuite/ChangeLog 2005-03-15 Geoffrey Keating <geoffk@apple.com> * gcc.dg/cpp/ucnid-7.c: New. From-SVN: r96546
2005-03-15Index: libcpp/ChangeLogGeoffrey Keating2-1/+6
2005-03-14 Geoffrey Keating <geoffk@apple.com> * lex.c (forms_identifier_p): Disable UCNs in C89 mode. Index: gcc/testsuite/ChangeLog 2005-03-14 Geoffrey Keating <geoffk@apple.com> * gcc.dg/cpp/ucnid-6.c: New. From-SVN: r96475
2005-03-15Index: gcc/ChangeLogGeoffrey Keating10-548/+1402
2005-03-14 Geoffrey Keating <geoffk@apple.com> * doc/cppopts.texi (-fexec-charset): Add concept index entry. (-fwide-exec-charset): Likewise. (-finput-charset): Likewise. * doc/invoke.texi (Warning Options): Document -Wnormalized=. * c-opts.c (c_common_handle_option): Handle -Wnormalized=. * c.opt (Wnormalized): New. Index: libcpp/ChangeLog 2005-03-14 Geoffrey Keating <geoffk@apple.com> * init.c (cpp_create_reader): Default warn_normalize to normalized_C. * charset.c: Update for new format of ucnid.h. (ucn_valid_in_identifier): Update for new format of ucnid.h. Add NST parameter, and update it; update callers. (cpp_valid_ucn): Add NST parameter, update callers. Replace abort with cpp_error. (convert_ucn): Pass normalize_state to cpp_valid_ucn. * internal.h (struct normalize_state): New. (INITIAL_NORMALIZE_STATE): New. (NORMALIZE_STATE_RESULT): New. (NORMALIZE_STATE_UPDATE_IDNUM): New. (_cpp_valid_ucn): New. * lex.c (warn_about_normalization): New. (forms_identifier_p): Add normalize_state parameter, update callers. (lex_identifier): Add normalize_state parameter, update callers. Keep the state current. (lex_number): Likewise. (_cpp_lex_direct): Pass normalize_state to subroutines. Check it with warn_about_normalization. * makeucnid.c: New. * ucnid.h: Replace. * ucnid.pl: Remove. * ucnid.tab: Make appropriate for input to makeucnid.c. Remove comments about obsolete version of C++. * include/cpplib.h (enum cpp_normalize_level): New. (struct cpp_options): Add warn_normalize field. Index: gcc/testsuite/ChangeLog 2005-03-14 Geoffrey Keating <geoffk@apple.com> * gcc.dg/cpp/normalize-1.c: New. * gcc.dg/cpp/normalize-2.c: New. * gcc.dg/cpp/normalize-3.c: New. * gcc.dg/cpp/normalize-4.c: New. * gcc.dg/cpp/ucnid-4.c: New. * gcc.dg/cpp/ucnid-5.c: New. * g++.dg/cpp/normalize-1.C: New. * g++.dg/cpp/ucnid-1.C: New. From-SVN: r96459
2005-03-12Index: libcpp/ChangeLogGeoffrey Keating7-42/+198
2005-03-12 Geoffrey Keating <geoffk@apple.com> * directives.c (glue_header_name): Update call to cpp_spell_token. * internal.h (_cpp_interpret_identifier): New. * charset.c (_cpp_interpret_identifier): New. (_cpp_valid_ucn): Allow UCN version of '$'. * lex.c (lex_identifier): Add extra parameter to indicate if initial character was '$' or '\'. Support identifiers with UCNs. (forms_identifier_p): Allow UCNs. (_cpp_lex_direct): Pass extra parameter to lex_identifier. (utf8_to_ucn): New. (cpp_spell_token): Add FORSTRING parameter. Use it. (cpp_token_as_text): Update call to cpp_spell_token. (cpp_output_token): Write UCNs back out. (stringify_arg): Update call to cpp_spell_token. (paste_tokens): Likewise. (cpp_macro_definition): Likewise. * macro.c (stringify_arg): Likewise. (paste_tokens): Likewise. (cpp_macro_definition): Likewise. * include/cpplib.h: Add parameter to cpp_spell_token. Index: gcc/ChangeLog 2005-03-12 Geoffrey Keating <geoffk@apple.com> * c-lex.c (c_lex_with_flags): Add parameter to call to cpp_spell_token. Index: gcc/testsuite/ChangeLog 2005-03-12 Geoffrey Keating <geoffk@apple.com> * gcc.dg/ucnid-1.c: New. * gcc.dg/ucnid-2.c: New. * gcc.dg/ucnid-3.c: New. * gcc.dg/ucnid-4.c: New. * gcc.dg/ucnid-5.c: New. * gcc.dg/ucnid-6.c: New. * gcc.dg/cpp/ucnid-1.c: New. * gcc.dg/cpp/ucnid-2.c: New. * gcc.dg/cpp/ucnid-3.c: New. * g++.dg/other/ucnid-1.C: New. From-SVN: r96333
2005-03-04tr.po: Update.Joseph Myers3-9/+839
* tr.po: Update. * vi.po: New file. From-SVN: r95898
2005-03-04re PR preprocessor/20282 (gcc4 can not bootstrap itself anymore)Jakub Jelinek2-2/+9
PR bootstrap/20282 PR bootstrap/20305 * macro.c (replace_args, cpp_get_token): Copy whole cpp_token_u instead of just cpp_string field from it. From-SVN: r95887
2005-03-04be.po, [...]: Update.Joseph Myers12-969/+1110
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po, sv.po, tr.po: Update. [[Split portion of a mixed commit.]] From-SVN: r95861.2
2005-02-28directives.c (do_line): Save sysp early before line table is realloc'ed.Devang Patel2-1/+11
* directives.c (do_line): Save sysp early before line table is realloc'ed. From-SVN: r95691
2005-02-25* cpplib.pot: Regenerate.Joseph Myers2-92/+122
From-SVN: r95560
2005-02-20re PR middle-end/18785 (isdigit builtin function fails with EBCDIC character ↵Zack Weinberg3-14/+75
sets) PR 18785 libcpp: * charset.c (LAST_POSSIBLY_BASIC_SOURCE_CHAR): New helper macro. (cpp_host_to_exec_charset): New function. * include/cpplib.h: Declare cpp_host_to_exec_charset. gcc: * langhooks.h (struct lang_hooks): Add to_target_charset. * langhooks.c (lhd_to_target_charset): New function. * langhooks-def.h: Declare lhd_to_target_charset. (LANG_HOOKS_TO_TARGET_CHARSET): New macro. (LANG_HOOKS_INITIALIZER): Update. * c-common.c (c_common_to_target_charset): New function. * c-common.h: Declare it. * c-objc-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. * defaults.c (TARGET_BELL, TARGET_BS, TARGET_CR, TARGET_DIGIT0) (TARGET_ESC, TARGET_FF, TARGET_NEWLINE, TARGET_TAB, TARGET_VT): Delete definitions. * system.h: Poison them. * doc/tm.texi: Don't discuss them. * builtins.c (fold_builtin_isdigit): Use lang_hooks.to_target_charset. * c-pretty-print.c (pp_c_integer_constant): Don't use pp_c_char. (pp_c_char): Do not attempt to generate letter escapes for newline, tab, etc. * config/arm/arm.c (output_ascii_pseudo_op): Likewise. * config/mips/mips.c (mips_output_ascii): Likewise. gcc/cp: * cp-objcp-common.h (LANG_HOOKS_TO_TARGET_CHARSET): Set to c_common_to_target_charset. Delete bogus comment. gcc/testsuite: * gcc.dg/charset/builtin1.c: New test. From-SVN: r95304
2005-02-19charset.c (_cpp_convert_input): Check '\r' before inserting '\n' at the end.Devang Patel2-1/+14
* charset.c (_cpp_convert_input): Check '\r' before inserting '\n' at the end. * gcc.dg/cpp/mac-eol-at-eof.c: New test. From-SVN: r95289
2005-02-15re PR preprocessor/19077 (Internal compiler error compiling MPlayer)Eric Christopher2-4/+15
2005-02-15 Eric Christopher <echristo@redhat.com> PR preprocessor/19077 * macro.c (cpp_macro_definition): Move handling of whitespace to PREV_WHITE conditional. Remove overloading of len variable. 2005-02-15 Eric Christopher <echristo@redhat.com> * gcc.dg/cpp/20050215-1.c: New file. From-SVN: r95080
2005-02-14directives.c, [...]: Update copyright.Kazu Hirata8-7/+13
* directives.c, files.c, init.c, internal.h, macro.c, pch.c, traditional.c: Update copyright. From-SVN: r95012
2005-02-14re PR bootstrap/19818 (GCC 4.0 cannot bootstrap itself)Paolo Bonzini7-7/+179
include: 2005-02-08 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/19818 * ansidecl.h (PARAMS): Guard from redefinition. libcpp: 2005-02-08 Paolo Bonzini <bonzini@gnu.org> PR bootstrap/19818 * configure.ac: Check for declaration of basename and getopt. * config.in: Regenerate. * configure: Regenerate. * internal.h (ustrcspn): New. * macro.c (create_iso_definition): Fix allocation of memory. (padding_token): Add cast to remove const-ness. * pch.c (cpp_read_state): Use ustrcspn. From-SVN: r95003
2005-02-09files.c (pchf_adder): Remove.Mike Stump2-57/+46
* files.c (pchf_adder): Remove. (struct pchf_adder_info): Likewise. (_cpp_save_file_entries): Write out all files so that #import works. From-SVN: r94755
2005-01-23re PR bootstrap/18058 (Bootstrap fails with non-GCC compilers)Joseph Myers2-1/+9
config: * warnings.m4 (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Don't do anything for non-GCC compilers. libcpp: * configure: Regenerate. gcc: PR bootstrap/18058 * recog.c (recog_memoized): Don't define if GENERATOR_FILE. * ggc-none.c (ggc_free): Define. From-SVN: r94123
2005-01-11* include/cpplib.h: Also update copyright years.Tobias Schlüter2-1/+4
From-SVN: r93191
2005-01-11* include/cpplib.h (c_lang): Fix comment to say cpp_create_reader.Tobias Schlüter2-1/+5
From-SVN: r93190
2005-01-04Index: libcpp/ChangeLogGeoffrey Keating2-1/+14
2005-01-03 Geoffrey Keating <geoffk@apple.com> * files.c (_cpp_find_file): Add files found by search_path_exhausted to the list of all files. Index: gcc/testsuite/ChangeLog 2005-01-03 Geoffrey Keating <geoffk@apple.com> Robert Bowdidge <bowdidge@apple.com> * gcc.dg/cpp/subframework1.c: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/A.h: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/B.h: New. * gcc.dg/cpp/frame/one.framework/Frameworks/OneSub.framework/Headers/C.h: New. * gcc.dg/cpp/frame/one.framework/Headers/one-includeSubs.h: New. Co-Authored-By: Robert Bowdidge <bowdidge@apple.com> From-SVN: r92883
2005-01-02internal.h: Update references to Cpp lib filenames.Gabriel Dos Reis6-21/+29
* internal.h: Update references to Cpp lib filenames. * directives.c: Likewise. * init.c: Likewise. * macro.c: Likewise. * traditional.c: Likewise. From-SVN: r92799
2004-12-15* fr.po: Update.Joseph Myers2-6/+9
From-SVN: r92224
2004-12-15re PR preprocessor/15167 (Internal compiler error with "#pragma once")Eric Botcazou2-6/+50
PR preprocessor/15167 * files.c (destroy_cpp_file): New function. (should_stack_file): Make a new file if the compared file is still stacked. From-SVN: r92194
2004-12-04* tr.po: Update.Joseph Myers2-24/+30
From-SVN: r91726
2004-12-02* es.po: Update.Joseph Myers2-19217/+10
From-SVN: r91640
2004-12-02be.po, [...]: Update.Joseph Myers12-4173/+104767
* be.po, ca.po, da.po, de.po, el.po, es.po, fr.po, ja.po, nl.po, sv.po, tr.po: Update. From-SVN: r91591
2004-11-28re PR preprocessor/17610 (Empty #include statement halts gcc)Nathanael Nerode2-0/+14
(libcpp) PR preprocessor/17610 * directives.c (do_include_common): Error out if an empty filename is given for #include (or #include_next or #import). (gcc) PR preprocessor/17610 * testsuite/gcc.dg/cpp/empty-include.c: New testcase. From-SVN: r91428
2004-11-27internal.h: Replace all uses of uchar with unsigned char.Roger Sayle3-46/+59
* internal.h: Replace all uses of uchar with unsigned char. * include/cpp-id-data.h: Likewise. Guard typedef of uchar with !IN_GCC, so uchar is only defined whilst building libcpp. Co-Authored-By: Zack Weinberg <zack@codesourcery.com> From-SVN: r91394
2004-11-27* cpplib.pot: Regenerate.Joseph Myers2-48/+52
From-SVN: r91388
2004-11-24aclocal.m4: Regenerate.Kelley Cook2-1/+5
2004-11-24 Kelley Cook <kcook@gcc.gnu.org> * aclocal.m4: Regenerate. From-SVN: r91199
2004-11-24re PR preprocessor/15824 (uchar redefinition warnings in libcpp)Roger Sayle3-4/+9
PR preprocessor/15824 * configure.ac: Correct HAVE_UCHAR test to #include <sys/types.h> directly, instead of the non-existant "system.h" and "ansidecl.h". * configure: Regenerate. From-SVN: r91157
2004-11-23sol2-c.c (solaris_register_pragmas): Use c_register_pragma_with_expansion.Daniel Jacobowitz4-16/+50
gcc: 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * config/sol2-c.c (solaris_register_pragmas): Use c_register_pragma_with_expansion. * config/sol2.h (HANDLE_PRAGMA_PACK_WITH_EXPANSION): Define. * c-pragma.c (c_register_pragma): Update call to cpp_register_pragma. (c_register_pragma_with_expansion): New function. (init_pragma): Honor HANDLE_PRAGMA_PACK_WITH_EXPANSION. * c-pragma.h (c_register_pragma_with_expansion): New prototype. * doc/extend.texi (Solaris Pragmas): Mention macro expansion for #pragma align. * doc/tm.texi (c_register_pragma_with_expansion, HANDLE_PRAGMA_PACK_WITH_EXPANSION): Document. gcc/testsuite: 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com> * gcc.dg/pragma-align-2.c: Test macro expansion. * gcc.dg/pragma-pack-2.c: New test. libcpp: 2004-11-23 Daniel Jacobowitz <dan@codesourcery.com> Joseph Myers <joseph@codesourcery.com> * internal.h (struct lexer_state): Add in_deferred_pragma. * directives.c (struct pragma_entry): Add allow_expansion. (insert_pragma_entry): Take allow_expansion flag. (register_pragma): Likewise. (cpp_register_pragma): Likewise. (_cpp_init_internal_pragmas): Update calls to cpp_register_pragma. (do_pragma): Honor allow_expansion. (cpp_handle_deferred_pragma): Set in_deferred_pragma. * include/cpplib.h (cpp_register_pragma): Update prototype. Co-Authored-By: Joseph Myers <joseph@codesourcery.com> From-SVN: r91117
2004-11-18configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set need_64bit_hwint=yes.Daniel Jacobowitz3-0/+9
libcpp: 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com> Mark Mitchell <mark@codesourcery.com> * configure.ac (i[34567]86-*-solaris2.1[0-9]*): Set need_64bit_hwint=yes. * configure: Regenerate. gcc: 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com> Mark Mitchell <mark@codesourcery.com> * config/i386/sol2-10.h, config/i386/t-sol2-10: New files. * config/i386/i386.c (i386_solaris_elf_named_section): New function. * config.gcc (i[34567]86-*-solaris2*): Handle Solaris 2.10. * config/i386/sol2.h (ASM_PREFERRED_EH_DATA_FORMAT): Handle 64-bit. (ASM_QUAD): Don't undefine for biarch targets. * config/i386/t-sol2: Introduce multilib support. gcc/testsuite: 2004-11-18 Daniel Jacobowitz <dan@codesourcery.com> Mark Mitchell <mark@codesourcery.com> * testsuite/gcc.dg/pragma-init-fini-2.c: New test. Co-Authored-By: Mark Mitchell <mark@codesourcery.com> From-SVN: r90839
2004-11-09* cpplib.pot: Regenerate.Joseph Myers2-329/+375
From-SVN: r90369
2004-11-09Makefile.in ($(PACKAGE).pot): New rule.Joseph Myers2-3/+16
* Makefile.in ($(PACKAGE).pot): New rule. Depend on po/$(PACKAGE).pot. (po/$(PACKAGE).pot): Use ":" instead of "," in --keyword arguments. Add keywords _, N_, SYNTAX_ERROR and SYNTAX_ERROR2. Remove local srcdir path from generated file. From-SVN: r90368
2004-11-04internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H as well.Zack Weinberg2-1/+11
* internal.h (HAVE_ICONV): Undefine if we do not have HAVE_ICONV_H as well. Co-Authored-By: Gerald Pfeifer <gerald@pfeifer.com> From-SVN: r90079
2004-10-27re PR c++/18075 (#pragma implementation broken in presence of #pragma ident)Zack Weinberg2-31/+41
PR 18075 * directives.c (do_pragma): Do not defer pragmas which are unknown. (cpp_handle_deferred_pragma): Add cast to silence warning. From-SVN: r89693
2004-10-14errors.c (_cpp_begin_message): Print "error: " for errors.Joseph Myers2-0/+6
libcpp: * errors.c (_cpp_begin_message): Print "error: " for errors. gcc/testsuite: * gcc.dg/cpp/error-1.c: New test. From-SVN: r89025
2004-10-11Remove extra whitespace.Andreas Jaeger1-1/+1
From-SVN: r88871
2004-10-11makedepend.c: Include mkdeps.h for prototype of deps_add_vpath.Andreas Jaeger3-1/+7
* makedepend.c: Include mkdeps.h for prototype of deps_add_vpath. * Makefile.in (makedepend.o): Add dependency on mkdeps.h. From-SVN: r88870
2004-10-08pch.c (cpp_write_pch_state): Remove variable z as it is not used.Andrew Pinski2-5/+7
2004-10-08 Andrew Pinski <pinskia@physics.uc.edu> * pch.c (cpp_write_pch_state): Remove variable z as it is not used. (cpp_read_state): Remove unused variables, m, d and mac_count. From-SVN: r88748