Skip to content
Snippets Groups Projects
  1. Jan 03, 2024
  2. Jan 16, 2023
  3. Jan 03, 2022
  4. Nov 23, 2021
  5. Jan 04, 2021
  6. May 19, 2020
    • Nathan Sidwell's avatar
      preprocessor: Random cleanups · 7cf3f604
      Nathan Sidwell authored
      This fixes a bunch of poorly formatted decls, marks some getters as
      PURE, deletes some C-relevant bool hackery, and finally uses a
      passed-in location rather than deducing a closely-related but not
      necessarily the same location.
      
      	* include/cpplib.h (cpp_get_otions, cpp_get_callbacks)
      	(cpp_get_deps): Mark as PURE.
      	* include/line-map.h (get_combined_adhoc_loc)
      	(get_location_from_adhoc_loc, get_pure_location): Reformat decls.
      	* internal.h (struct lexer_state): Clarify comment.
      	* system.h: Remove now-unneeded bool hackery.
      	* files.c (_cpp_find_file): Store LOC not highest_location.
      7cf3f604
  7. Jan 01, 2020
  8. Jan 01, 2019
  9. May 23, 2018
  10. May 17, 2018
  11. Jan 03, 2018
  12. Jan 01, 2017
  13. Nov 23, 2016
    • Paolo Bonzini's avatar
      system.h (HAVE_DESIGNATED_INITIALIZERS, [...]): Do not use "defined" in macros. · fb2675cb
      Paolo Bonzini authored
      gcc:
      2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* system.h (HAVE_DESIGNATED_INITIALIZERS,
      	HAVE_DESIGNATED_UNION_INITIALIZERS): Do not use
      	"defined" in macros.
      	* doc/cpp.texi (Defined): Mention -Wexpansion-to-defined.
      	* doc/cppopts.texi (Invocation): Document -Wexpansion-to-defined.
      	* doc/invoke.texi (Warning Options): Document -Wexpansion-to-defined.
      
      gcc/c-family:
      2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* c.opt (Wexpansion-to-defined): New.
      
      gcc/testsuite:
      2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* gcc.dg/cpp/defined.c: Mark newly introduced warnings and
      	adjust for warning->pedwarn change.
      	* gcc.dg/cpp/defined-syshdr.c,
      	gcc.dg/cpp/defined-Wexpansion-to-defined.c,
      	gcc.dg/cpp/defined-Wextra-Wno-expansion-to-defined.c,
      	gcc.dg/cpp/defined-Wextra.c,
      	gcc.dg/cpp/defined-Wno-expansion-to-defined.c: New testcases.
      
      libcpp:
      2016-11-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* include/cpplib.h (struct cpp_options): Add new member
      	warn_expansion_to_defined.
      	(CPP_W_EXPANSION_TO_DEFINED): New enum member.
      	* expr.c (parse_defined): Warn for all uses of "defined"
      	in macros, and tie warning to CPP_W_EXPANSION_TO_DEFINED.
      	Make it a pedwarning instead of a warning.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): Do not use
      	"defined" in macros.
      
      From-SVN: r242743
      fb2675cb
  14. Jan 04, 2016
  15. Oct 21, 2015
    • Mikhail Maltsev's avatar
      [PATCH 1/9] ENABLE_CHECKING refactoring · 7ec491c0
      Mikhail Maltsev authored
      gcc/
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* configure.ac (CHECKING_P): Define.
      	* system.h: Use CHECKING_P.
      
      libcpp/
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* configure.ac (CHECKING_P): Define.
      	* system.h (fancy_abort): Declare.
      	(abort): Define.
      	(gcc_assert): Define. Use CHECKING_P.
      
      From-SVN: r229149
      7ec491c0
  16. Oct 13, 2015
    • Mikhail Maltsev's avatar
      [PATCH 1/9] ENABLE_CHECKING refactoring · 179b8d05
      Mikhail Maltsev authored
      [PATCH 1/9] ENABLE_CHECKING refactoring
      gcc/ChangeLog:
      
      2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* common.opt: Add flag_checking.
      	* system.h (CHECKING_P): Define.
      
      libcpp/ChangeLog:
      
      2015-10-05  Mikhail Maltsev  <maltsevm@gmail.com>
      
      	* system.h (CHECKING_P, gcc_checking_assert): Define.
      
      From-SVN: r228787
      179b8d05
  17. Sep 07, 2015
  18. Jan 05, 2015
  19. Jan 02, 2014
  20. Jan 14, 2013
  21. Jan 03, 2012
  22. Jul 25, 2011
  23. Jul 22, 2011
    • Rainer Orth's avatar
      re PR bootstrap/49794 (Solaris 10/x86 bootstrap broken by C++ build) · 5b6d595b
      Rainer Orth authored
      
      2011-07-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
      	    Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
      
      	gcc:
      	PR bootstrap/49794
      	* configure.ac: Test AM_ICONV with CXX.
      	* configure: Regenerate.
      	* config/sol2-c.c (solaris_format_types): Use EXPORTED_CONST.
      
      	gcc/ada:
      	PR bootstrap/49794
      	* init.c [sun && __SVR4 && !__vxworks] (__gnat_install_handler):
      	Assign to act.sa_sigaction.
      	* tracebak.c [USE_GENERIC_UNWINDER] (__gnat_backtrace): Cast
      	current->return_address to char * before arithmetic.
      
      	libcpp:
      	PR bootstrap/49794
      	* configure.ac: Test AM_ICONV with CXX.
      	* configure: Regenerate.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): Never define for C++.
      
      Co-Authored-By: default avatarRalf Wildenhues <Ralf.Wildenhues@gmx.de>
      
      From-SVN: r176620
      5b6d595b
  24. Apr 25, 2011
  25. Aug 26, 2010
  26. Aug 21, 2010
    • Richard Henderson's avatar
      Vectorize fast path of _cpp_clean_line. · 246a2fcb
      Richard Henderson authored
      
      	* configure.ac (AC_C_BIGENDIAN, AC_TYPE_UINTPTR_T): New tests.
      	(ssize_t): Check via AC_TYPE_SSIZE_T instead of AC_CHECK_TYPE.
      	(ptrdiff_t): Check via AC_CHECK_TYPE.
      	* config.in, configure: Rebuild.
      	* system.h: Include stdint.h, if available.
      	* lex.c (WORDS_BIGENDIAN): Provide default.
      	(acc_char_mask_misalign, acc_char_replicate, acc_char_cmp,
      	acc_char_index, search_line_acc_char, repl_chars, search_line_mmx,
      	search_line_sse2, search_line_sse42, init_vectorized_lexer,
      	search_line_fast): New.
      	(_cpp_clean_line): Use search_line_fast.  Restructure the fast
      	loop to make it clear when we're leaving the loop.  Stay in the
      	fast loop for non-trigraph '?'.
      
      Co-Authored-By: default avatarAndi Kleen <ak@linux.intel.com>
      Co-Authored-By: default avatarDavid S. Miller <davem@davemloft.net>
      
      From-SVN: r163446
      246a2fcb
  27. Apr 09, 2009
  28. Jun 29, 2005
  29. May 28, 2005
    • Gabriel Dos Reis's avatar
      configure.ac: Check declarations for asprintf and vasprintf. · c3f829c1
      Gabriel Dos Reis authored
      	* configure.ac: Check declarations for asprintf and vasprintf.
      	* config.in: Regenerate.
      	* configure: Likewise.
      
      	* charset.c (conversion_loop): Use XRESIZEVEC.
      	(convert_no_conversion): Likewise.
      	(convert_using_iconv): Likewise.
      	(init_iconv_desc): Cast return value of alloca.
      	(cpp_host_to_exec_charset): Use XNEWVEC.
      	(emit_numeric_escape): Use XRESIZEVEC.
      	(cpp_interpret_string): Use XNEWVEC.
      	(cpp_interpret_string): Use XRESIZEVEC.
      	(_cpp_interpret_identifier): Cast return value of alloca.
      	(_cpp_convert_input): Use XNEWVEC and XRESIZEVEC.
      	* directives.c (glue_header_name): Use XNEWVEC and XRESIZEVEC.
      	(parse_include): Use XNEWVEC.
      	(insert_pragma_entry): Rename local variable "new" to
      	"new_entry".
      	(save_registered_pragmas): Cast return value of xmemdup.
      	(destringize_and_run): Same for alloca.
      	(parse_assertion): Likewise.
      	(do_assert): Cast allocated storage to proper type.
      	(cpp_define): Likewise.
      	(_cpp_define_builtin): Likewise.
      	(cpp_undef): Likewise.
      	(handle_assertion): Likewise.
      	(cpp_push_buffer): Rename local variable "new" to "new_buffer".
      	* expr.c (CPP_UPLUS): Cast value to type cpp_ttype.
      	(CPP_UMINUS): Likewise.
      	(struct cpp_operator): Rename from struct operator.
      	(_cpp_expand_op_stack): Use XRESIZEVEC.
      	* files.c (pch_open_file): Use XNEWVEC.
      	(pch_open_file): Use XRESIZEVEC.
      	(read_file_guts): Use XNEWVEC and XRESIZEVEC.
      	(dir_name_of_file): Use XNEWVEC.
      	(make_cpp_file): Use XCNEW.
      	(make_cpp_dir): Likewise.
      	(allocate_file_hash_entries): USE XNEWVEC.
      	(cpp_included): Cast return value of htab_find_with_hash.
      	(append_file_to_dir): Use XNEWVEC.
      	(read_filename_string): Likewise. Use XRESIZEVEC too.
      	(read_name_map): Cast return value of alloca.  Use XRESIZEVEC.
      	(remap_filename): Use XNEWVEC.
      	(struct pchf_entry): Move definition out of struct pchf_data.
      	(_cpp_save_file_entries): Use XCNEWVAR.
      	(_cpp_read_file_entries): Use XNEWVAR.
      	* identifiers.c (alloc_node): Use XOBNEW.
      	* init.c (cpp_create_reader): Use XCNEW.
      	(cpp_init_builtins): Cast of b->value to enum builtin_type.
      	(read_original_directory): Cast return value of alloca.
      	* lex.c (add_line_note): Use XRESIZEVEC.
      	(warn_about_normalization): Use XNEWVEC.
      	(_cpp_lex_direct): Cast node->directive_index to (enum cpp_ttype).
      	(new_buff): Use XNEWVEC.
      	* line-map.c (linemap_add): Use XRESIZEVEC.
      	* macro.c (builtin_macro): Cast return value of alloca.
      	(paste_tokens): Likewise.
      	(expand_arg): Use XNEWVEC and XRESIZEVEC.
      	(_cpp_save_parameter): Use XRESIZEVEC.
      	(create_iso_definition): Cast allocated storage to proper type.
      	(_cpp_create_definition): Likewise.
      	(cpp_macro_definition): Use XRESIZEVEC.
      	* makedepend.c (add_clm): Use XNEW.
      	(add_dir): Likewise.
      	* mkdeps.c (munge): Use XNEWVEC.
      	(deps_init): Use XCNEW.
      	(deps_add_target): Use XRESIZEVEC.
      	(deps_add_default_target): Cast return value of alloca.
      	(deps_add_dep): Use XRESIZEVEC.
      	(deps_add_vpath): Likewise.  Use XNEWVEC too.
      	(deps_restore): Likewise.
      	* pch.c (save_idents): Use XNEW and XNEWVEC.
      	(cpp_save_state): Use XNEW.
      	(count_defs): Cast return value of htab_find.
      	(write_defs): Likewise.
      	(cpp_write_pch_deps): Use XNEWVEC.
      	(collect_ht_nodes): Use XRESIZEVEC.
      	(cpp_valid_state): Use XNEWVEC.
      	(save_macros): Use XRESIZEVEC.  Cast return value of xmemdup.
      	* symtab.c (ht_create): Use XCNEW.
      	(ht_lookup_with_hash): Cast return value of obstack_copy0.
      	(ht_expand): Use XCNEWVEC.
      	* system.h (HAVE_DESIGNATED_INITIALIZERS): False if __cplusplus.
      	(bool): Do not define if __cplusplus.
      
      From-SVN: r100295
      c3f829c1
  30. Apr 19, 2005
  31. Apr 11, 2005
    • Kaveh R. Ghazi's avatar
      configure.ac (fixincludes_UNLOCKED_FUNCS): New. · 0d667716
      Kaveh R. Ghazi authored
      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
      0d667716
  32. Jun 12, 2004
    • Zack Weinberg's avatar
      configure.ac: Don't invoke ACX_HEADER_STDBOOL. · 2fac9c01
      Zack Weinberg authored
      gcc:
      	* configure.ac: Don't invoke ACX_HEADER_STDBOOL.
      	* configure, config.in: Regenerate.
      	* system.h: Unconditionally define bool as unsigned char,
      	BOOL_BITFIELD as unsigned int.
      	* domwalk.h: Use BOOL_BITFIELD.
      libcpp:
      	* configure.ac: Don't invoke ACX_HEADER_STDBOOL.
      	* configure, config.in: Regenerate.
      	* system.h: Unconditionally define bool as unsigned char,
      	BOOL_BITFIELD as unsigned int.
      	* .cvsignore: New file.
      
      From-SVN: r83020
      2fac9c01
  33. May 24, 2004
    • Paolo Bonzini's avatar
      system.h: dgettext takes two parameters. · c86dd7db
      Paolo Bonzini authored
      2004-05-24  Paolo Bonzini  <bonzini@gnu.org>
      
      	* system.h [!ENABLE_NLS]: dgettext takes two
      	parameters.
      
      From-SVN: r82204
      c86dd7db
    • Paolo Bonzini's avatar
      Makefile.def (host_modules): add libcpp. · 4f4e53dd
      Paolo Bonzini authored
      ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Makefile.def (host_modules): add libcpp.
      	* Makefile.tpl: Add dependencies on and for libcpp.
      	* Makefile.in: Regenerate.
      	* configure.in: Add libcpp host module.
      	* configure: Regenerate.
      
      config/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* acx.m4 (ACX_HEADER_STDBOOL, ACX_HEADER_STRING):
      	From gcc.
      
      gcc/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Move libcpp to the toplevel.
      	* Makefile.in: Remove references to libcpp files,
      	use CPPLIBS instead of libcpp.a.  Define SYMTAB_H
      	and change hashtable.h to that.
      	* aclocal.m4 (gcc_AC_HEADER_STDBOOL,
      	gcc_AC_HEADER_STRING, gcc_AC_C__BOOL): Remove.
      	* configure.ac (gcc_AC_C__BOOL, HAVE_UCHAR): Remove tests.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* c-ppoutput.c: Include ../libcpp/internal.h instead of cpphash.h.
      	* cppcharset.c: Removed.
      	* cpperror.c: Removed.
      	* cppexp.c: Removed.
      	* cppfiles.c: Removed.
      	* cpphash.c: Removed.
      	* cpphash.h: Removed.
      	* cppinit.c: Removed.
      	* cpplex.c: Removed.
      	* cpplib.c: Removed.
      	* cpplib.h: Removed.
      	* cppmacro.c: Removed.
      	* cpppch.c: Removed.
      	* cpptrad.c: Removed.
      	* cppucnid.h: Removed.
      	* cppucnid.pl: Removed.
      	* cppucnid.tab: Removed.
      	* hashtable.c: Removed.
      	* hashtable.h: Removed.
      	* line-map.c: Removed.
      	* line-map.h: Removed.
      	* mkdeps.c: Removed.
      	* mkdeps.h: Removed.
      	* stringpool.h: Include symtab.h instead of hashtable.h.
      	* tree.h: Include symtab.h instead of hashtable.h.
      	* system.h (O_NONBLOCK, O_NOCTTY): Do not define.
      
      gcc/cp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: No need to specify $(LIBCPP).
      
      gcc/java/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* Make-lang.in: Link in $(LIBCPP) instead of mkdeps.o.
      
      libcpp/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	Moved libcpp from the gcc subdirectory to the toplevel.
      	* Makefile.am: New file.
      	* Makefile.in: Regenerate.
      	* configure.ac: New file.
      	* configure: Regenerate.
      	* config.in: Regenerate.
      	* charset.c: Moved from gcc/cppcharset.c.  Add note about
      	brokenness of input charset detection.  Adjust for change
      	in name of cppucnid.h.
      	* errors.c: Moved from gcc/cpperror.c.  Do not include intl.h.
      	* expr.c: Moved from gcc/cppexp.c.
      	* files.c: Moved from gcc/cppfiles.c.  Do not include intl.h.
      	Remove #define of O_BINARY, it is in system.h.
      	* identifiers.c: Moved from gcc/cpphash.c.
      	* internal.h: Moved from gcc/cpphash.h.  Change header
      	guard name.  All other files adjusted to match name change.
      	* init.c: Moved from gcc/cppinit.c.
      	(init_library) [ENABLE_NLS]: Call bindtextdomain.
      	* lex.c: Moved from gcc/cpplex.c.
      	* directives.c: Moved from gcc/cpplib.c.
      	* macro.c: Moved from gcc/cppmacro.c.
      	* pch.c: Moved from gcc/cpppch.c.  Do not include intl.h.
      	* traditional.c: Moved from gcc/cpptrad.c.
      	* ucnid.h: Moved from gcc/cppucnid.h.  Change header
      	guard name.
      	* ucnid.pl: Moved from gcc/cppucnid.pl.
      	* ucnid.tab: Moved from gcc/cppucnid.tab.  Change header
      	guard name.
      	* symtab.c: Moved from gcc/hashtable.c.
      	* line-map.c: Moved from gcc.  Do not include intl.h.
      	* mkdeps.c: Moved from gcc.
      	* system.h: New file.
      
      libcpp/include/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* cpplib.h: Moved from gcc.  Change header guard name.
      	* line-map.h: Moved from gcc.  Change header guard name.
      	* mkdeps.h: Moved from gcc.  Change header guard name.
      	* symtab.h: Moved from gcc/hashtable.h.  Change header
      	guard name.
      
      libcpp/po/ChangeLog:
      
      2004-05-23  Paolo Bonzini  <bonzini@gnu.org>
      
      	* be.po: Extracted from gcc/po/be.po.
      	* ca.po: Extracted from gcc/po/ca.po.
      	* da.po: Extracted from gcc/po/da.po.
      	* de.po: Extracted from gcc/po/de.po.
      	* el.po: Extracted from gcc/po/el.po.
      	* es.po: Extracted from gcc/po/es.po.
      	* fr.po: Extracted from gcc/po/fr.po.
      	* ja.po: Extracted from gcc/po/ja.po.
      	* nl.po: Extracted from gcc/po/nl.po.
      	* sv.po: Extracted from gcc/po/sv.po.
      	* tr.po: Extracted from gcc/po/tr.po.
      
      From-SVN: r82199
      4f4e53dd
Loading