aboutsummaryrefslogtreecommitdiff
path: root/libcpp/system.h
AgeCommit message (Collapse)AuthorFilesLines
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-05-23* system.h: #include <new> earlier.Jason Merrill1-4/+4
From-SVN: r260620
2018-05-17line-map.c (linemap_init): Use placement new.Jason Merrill1-0/+4
* line-map.c (linemap_init): Use placement new. * system.h: #include <new>. From-SVN: r260343
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-11-23system.h (HAVE_DESIGNATED_INITIALIZERS, [...]): Do not use "defined" in macros.Paolo Bonzini1-2/+5
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
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-10-21[PATCH 1/9] ENABLE_CHECKING refactoringMikhail Maltsev1-3/+18
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
2015-10-13[PATCH 1/9] ENABLE_CHECKING refactoringMikhail Maltsev1-0/+9
[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
2015-09-07system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning.Marek Polacek1-1/+1
* system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. * system.h (INTTYPE_MINIMUM): Rewrite to avoid shift warning. From-SVN: r227516
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-01-02Update copyright years in libcpp/Richard Sandiford1-1/+1
From-SVN: r206293
2013-01-14Update copyright years in libcpp.Richard Sandiford1-2/+1
From-SVN: r195162
2012-01-03system.h: Prior to #define, #undef fopen and freopen unconditionally.Olivier Hainque1-0/+8
gcc/ * system.h: Prior to #define, #undef fopen and freopen unconditionally. libcpp/ * system.h: Likewise. From-SVN: r182837
2011-07-25system.h [...]: Wrap C function declarations in extern "C".Rainer Orth1-0/+16
* system.h [__cplusplus]: Wrap C function declarations in extern "C". -This line, and those below, will be ignored-- M ChangeLog M system.h From-SVN: r176748
2011-07-22re PR bootstrap/49794 (Solaris 10/x86 bootstrap broken by C++ build)Rainer Orth1-3/+3
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: Ralf Wildenhues <Ralf.Wildenhues@gmx.de> From-SVN: r176620
2011-04-25ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h.Jan Kratochvil1-9/+0
include/ * ansidecl.h (ENUM_BITFIELD): New, from gcc/system.h. contrib/ * paranoia.cc (ENUM_BITFIELD): Remove. gcc/ * system.h (ENUM_BITFIELD): Remove. libcpp/ * system.h (ENUM_BITFIELD): Remove. From-SVN: r172933
2010-08-26* system.h [HAVE_INTTYPES_H]: Include inttypes.h.Rainer Orth1-1/+4
From-SVN: r163569
2010-08-21Vectorize fast path of _cpp_clean_line.Richard Henderson1-0/+3
* 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: Andi Kleen <ak@linux.intel.com> Co-Authored-By: David S. Miller <davem@davemloft.net> From-SVN: r163446
2009-04-09Licensing changes to GPLv3 resp. GPLv3 with GCC Runtime Exception.Jakub Jelinek1-6/+5
From-SVN: r145841
2005-06-29all files: Update FSF address in copyright headers.Kelley Cook1-2/+2
2005-06-29 Kelley Cook <kcook@gcc.gnu.org> * all files: Update FSF address in copyright headers. * makeucnid.c (write_copyright): Update outputted FSF address. From-SVN: r101413
2005-05-28configure.ac: Check declarations for asprintf and vasprintf.Gabriel Dos Reis1-2/+8
* 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
2005-04-19system.h (fopen, [...]): Define these to the unlocked libiberty functions.Kaveh R. Ghazi1-0/+5
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. Ghazi1-1/+69
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
2004-06-12configure.ac: Don't invoke ACX_HEADER_STDBOOL.Zack Weinberg1-29/+12
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
2004-05-24system.h: dgettext takes two parameters.Paolo Bonzini1-1/+1
2004-05-24 Paolo Bonzini <bonzini@gnu.org> * system.h [!ENABLE_NLS]: dgettext takes two parameters. From-SVN: r82204
2004-05-24Makefile.def (host_modules): add libcpp.Paolo Bonzini1-0/+363
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