summaryrefslogtreecommitdiffstats
path: root/libcpp
Commit message (Collapse)AuthorAgeFilesLines
* Add ports for TILE-Gx and TILEPro.walt2012-02-143-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . * MAINTAINERS (tilegx port): Add myself. (tilepro port): Add myself. contrib * config-list.mk (LIST): Add tilegx-linux-gnu and tilepro-linux-gnu. * gcc_update (gcc/config/tilegx/mul-tables.c): New dependencies. (gcc/config/tilepro/mul-tables.c): New dependencies. gcc * config.gcc: Handle tilegx and tilepro. * configure.ac (gcc_cv_as_dwarf2_debug_line): Enable test for tilegx and tilepro. Add HAVE_AS_TLS check for tilegx and tilepro. * configure: Regenerate. * doc/contrib.texi: Add Mat Hostetter and self. * doc/extend.texi (TILE-Gx Built-in Functions): New node. Document instruction intrinsics and network accessing intrinsics. (TILEPro Built-in Functions): New node. Document instruction intrinsics and network accessing intrinsics. * doc/install.texi (Specific, tilegx-*-linux*): Document it. (Specific, tilepro-*-linux*): Likewise. * doc/invoke.texi (TILE-Gx Options): New section. (TILEPro Options): New section. * doc/md.texi (TILE-Gx): New section. (TILEPro): New section. * common/config/tilegx: New directory for tilegx. * common/config/tilepro: New directory for tilepro. * config/tilegx: New directory for tilegx. * config/tilepro: New directory for tilepro. gcc/testsuite * g++.dg/other/PR23205.C: Disable test on tile. * g++.dg/other/pr23205-2.C: Disable test on tile. * gcc.dg/20020312-2.c: Add a condition for __tile__. * gcc.dg/20040813-1.c: Disable test on tile. * gcc.dg/lower-subreg-1.c: Disable test on tilegx. * gcc.misc-tests/linkage.exp: Handle tilegx. libcpp * configure.ac: Require 64-bit hwint for tilegx and tilepro. * configure: Regenerate. libgcc * config.host: Handle tilegx and tilepro. * config/tilegx: New directory for tilegx. * config/tilepro: New directory for tilepro. libgomp * configure.tgt: Handle tilegx and tilepro. * config/linux/tile: New directory for tilegx and tilepro. Added: trunk/gcc/common/config/tilegx/tilegx-common.c trunk/gcc/common/config/tilepro/tilepro-common.c trunk/gcc/config/tilegx/constraints.md trunk/gcc/config/tilegx/linux.h trunk/gcc/config/tilegx/mul-tables.c trunk/gcc/config/tilegx/predicates.md trunk/gcc/config/tilegx/sync.md trunk/gcc/config/tilegx/t-tilegx trunk/gcc/config/tilegx/tilegx-builtins.h trunk/gcc/config/tilegx/tilegx-c.c trunk/gcc/config/tilegx/tilegx-generic.md trunk/gcc/config/tilegx/tilegx-modes.def trunk/gcc/config/tilegx/tilegx-multiply.h trunk/gcc/config/tilegx/tilegx-protos.h trunk/gcc/config/tilegx/tilegx.c trunk/gcc/config/tilegx/tilegx.h trunk/gcc/config/tilegx/tilegx.md trunk/gcc/config/tilegx/tilegx.opt trunk/gcc/config/tilepro/constraints.md trunk/gcc/config/tilepro/gen-mul-tables.cc trunk/gcc/config/tilepro/linux.h trunk/gcc/config/tilepro/mul-tables.c trunk/gcc/config/tilepro/predicates.md trunk/gcc/config/tilepro/t-tilepro trunk/gcc/config/tilepro/tilepro-builtins.h trunk/gcc/config/tilepro/tilepro-c.c trunk/gcc/config/tilepro/tilepro-generic.md trunk/gcc/config/tilepro/tilepro-modes.def trunk/gcc/config/tilepro/tilepro-multiply.h trunk/gcc/config/tilepro/tilepro-protos.h trunk/gcc/config/tilepro/tilepro.c trunk/gcc/config/tilepro/tilepro.h trunk/gcc/config/tilepro/tilepro.md trunk/gcc/config/tilepro/tilepro.opt trunk/libgcc/config/tilegx/sfp-machine.h trunk/libgcc/config/tilegx/sfp-machine32.h trunk/libgcc/config/tilegx/sfp-machine64.h trunk/libgcc/config/tilegx/t-crtstuff trunk/libgcc/config/tilegx/t-softfp trunk/libgcc/config/tilegx/t-tilegx trunk/libgcc/config/tilepro/atomic.c trunk/libgcc/config/tilepro/atomic.h trunk/libgcc/config/tilepro/linux-unwind.h trunk/libgcc/config/tilepro/sfp-machine.h trunk/libgcc/config/tilepro/softdivide.c trunk/libgcc/config/tilepro/softmpy.S trunk/libgcc/config/tilepro/t-crtstuff trunk/libgcc/config/tilepro/t-tilepro trunk/libgomp/config/linux/tile/futex.h Modified: trunk/MAINTAINERS trunk/contrib/config-list.mk trunk/contrib/gcc_update trunk/gcc/config.gcc trunk/gcc/configure trunk/gcc/configure.ac trunk/gcc/doc/contrib.texi trunk/gcc/doc/extend.texi trunk/gcc/doc/install.texi trunk/gcc/doc/invoke.texi trunk/gcc/doc/md.texi trunk/gcc/testsuite/g++.dg/other/PR23205.C trunk/gcc/testsuite/g++.dg/other/pr23205-2.C trunk/gcc/testsuite/gcc.dg/20020312-2.c trunk/gcc/testsuite/gcc.dg/20040813-1.c trunk/gcc/testsuite/gcc.dg/lower-subreg-1.c trunk/gcc/testsuite/gcc.misc-tests/linkage.exp trunk/libcpp/configure trunk/libcpp/configure.ac trunk/libgcc/config.host trunk/libgomp/configure.tgt git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@184203 138bc75d-0d04-0410-961f-82ee72b054a4
* * uk.po: Update.jsm282012-01-312-82/+57
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183774 138bc75d-0d04-0410-961f-82ee72b054a4
* * es.po: Update.jsm282012-01-312-138/+140
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183766 138bc75d-0d04-0410-961f-82ee72b054a4
* * be.po, ca.po, da.po, de.po, el.po, es.po, fi.po, fr.po, id.po,jsm282012-01-3019-2536/+2638
| | | | | | | | ja.po, nl.po, ru.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183744 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/po:jsm282012-01-272-148/+156
| | | | | | | | | | * gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183634 138bc75d-0d04-0410-961f-82ee72b054a4
* 2012-01-09 Richard Guenther <rguenther@suse.de>rguenth2012-01-092-2/+4
| | | | | | | * macro.c (_cpp_builtin_macro_text): Remove unused variable map. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183013 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/gfunck2012-01-094-8/+24
| | | | | | | | | | | | | | | | | | | PR preprocessor/33919 * files.c (_cpp_get_file_name): New. Implement file name access function. * internal.h (_cpp_get_file_name): New prototype. * macro.c (_cpp_builtin_macro_text): Call _cpp_get_file_name() to use pfile->main_file in lieu of traversing INCLUDED_FROM chain. gcc/testsuite/ PR preprocessor/33919 * gcc.dg/pr33919.c: New test. * gcc.dg/pr33919-0.h: New test header file. * gcc.dg/pr33919-1.h: Ditto. * gcc.dg/pr33919-2.h: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183003 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/hainque2012-01-032-0/+12
| | | | | | | | | | | * system.h: Prior to #define, #undef fopen and freopen unconditionally. libcpp/ * system.h: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182837 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:jsm282011-12-203-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * c-decl.c (diagnose_mismatched_decls, grokdeclarator, grokfield) (finish_struct): Refer to C11 in comments. Use flag_isoc11. * c-parser.c (c_parser_static_assert_declaration) (c_parser_static_assert_declaration_no_semi, c_parser_declspecs) (c_parser_alignas_specifier, c_parser_alignof_expression): Refer to C11 in comments. Use flag_isoc11. * c-typeck.c (comptypes_check_different_types): Refer to C11 in comment. * doc/cpp.texi (Overview): Refer to -std=c11 instead of -std=c1x. * doc/cppopts.texi (-std=c11, -std=gnu11): Document in preference to -std=c1x and -std=gnu1x. * doc/extend.texi (Inline, Alternate Keywords, Other Builtins) (__builtin_complex, Unnamed Fields): Refer to -std=c11 and C11 instead of -std=c1x and C1X. * doc/invoke.texi (-std=c11, -std=iso9899:2011): Document in preference to -std=c1x. (-std=gnu11): Document in preference to -std=gnu1x. * doc/standards.texi: Document C11 instead of C1X. Document C11 as actual standard. Document headers required from freestanding C11 implementations. * ginclude/float.h, ginclude/stddef.h: Test __STDC_VERSION__ >= 201112L for C11. Update comments to refer to C11. gcc/c-family: * c-common.c (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-common.h (flag_isoc99): Update comment to refer to C11. (flag_isoc1x): Change to flag_isoc11. * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to C11. * c-opts.c (set_std_c1x): Change to set_std_c11. (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11. Call set_std_c11. (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11. (set_std_c1): Use CLK_STDC11 and CLK_GNUC11. * c.opt (std=c1x): Change to std=c11. Document as non-draft standard. (std=c1x, std=iso9899:2011): Add as aliases of std=c11. (std=gnu1x): Change to std=gnu11. Refer to non-draft standard. (std=gnu1x): Make alias of std=gnu11. gcc/testsuite: * gcc.dg/c11-version-1.c, gcc.dg/c11-version-2.c, gcc.dg/c94-version-1.c, gcc.dg/c99-version-1.c, gcc.dg/gnu11-version-1.c: New tests. libcpp: * include/cpplib.h (CLK_GNUC1X): Change to CLK_GNUC11. (CLK_STDC1X): Change to CLK_STDC11. * init.c (lang_defaults): Update comments. (cpp_init_builtins): Update language tests. Use 201112L for C11 __STDC_VERSION__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182551 138bc75d-0d04-0410-961f-82ee72b054a4
* config/:schwab2011-12-202-3/+7
| | | | | | | | | | | | | | | | | | | | * warnings.m4 (ACX_PROG_CC_WARNING_OPTS): Avoid leading dash in expr call. fixincludes/: * configure: Regenerate. gcc/: * configure: Regenerate. libcpp/: * configure: Regenerate. libdecnumber/: * configure: Regenerate. libiberty/: * configure: Regenerate. lto-plugin/: * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182546 138bc75d-0d04-0410-961f-82ee72b054a4
* Check for warning flags without no- prefixschwab2011-12-192-15/+39
| | | | | | | | | | | | | | | | | | | | | | | config/: PR bootstrap/51388 * warnings.m4 (ACX_PROG_CC_WARNING_OPTS) (ACX_PROG_CC_WARNING_ALMOST_PEDANTIC): Run the test without the no- prefix. fixincludes/: * configure: Regenerate. gcc/: * configure: Regenerate. libcpp/: * configure: Regenerate. libdecnumber/: * configure: Regenerate. libiberty/: * configure: Regenerate. lto-plugin/: * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182478 138bc75d-0d04-0410-961f-82ee72b054a4
* PR bootstrap/50237jakub2011-12-074-1/+25
| | | | | | | | | | | | * internal.h (_cpp_init_lexer): New prototype. * init.c (init_library): Call it. * lex.c (init_vectorized_lexer): Remove constructor attribute, add inline keyword. (HAVE_init_vectorized_lexer): Define. (_cpp_init_lexer): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182090 138bc75d-0d04-0410-961f-82ee72b054a4
* Add 'inline' to prototype of tokens_buff_remove_last_tokendodji2011-12-052-8/+14
| | | | | | | | | | libcpp/ * macro.c (tokens_buff_remove_last_token) (tokens_buff_put_token_to): Add an 'inline' function specifier to the prototype. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182002 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/line-map.h (linemap_dump): Declare.dnovillo2011-11-223-0/+107
| | | | | | | | (line_table_dump): Declare. * line-map.c (linemap_dump): New. (line_table_dump): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181625 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/50958jason2011-11-212-2/+7
| | | | | | | | | | | | gcc/cp/ * parser.c (lookup_literal_operator): New. (cp_parser_userdef_char_literal): Use it. (cp_parser_userdef_numeric_literal): Use it. (cp_parser_userdef_string_literal): Use lookup_name. libcpp/ * expr.c (cpp_userdef_char_remove_type): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181595 138bc75d-0d04-0410-961f-82ee72b054a4
* libcpp/matz2011-11-034-1/+57
| | | | | | | | | | | | | | | | | | PR bootstrap/50857 * configure.ac: Check for -fno-exceptions -fno-rtti. * configure: Regenerate. * Makefile.in (NOEXCEPTION_FLAGS): New flag. (ALL_CXXFLAGS): Use it. gcc/ PR bootstrap/50857 * configure.ac: Check for -fno-exceptions -fno-rtti. * configure: Regenerate. * Makefile.in (NOEXCEPTION_FLAGS): New flag. (ALL_CXXFLAGS): Use it. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180833 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>paolo2011-11-022-6/+10
| | | | | | | * internal.h (uxstrdup, ustrchr): Return const unsigned char *. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180796 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/50810jason2011-11-023-2/+7
| | | | | | | | | | | | | | | | | | | gcc/c-family * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default Wnarrowing for C++0x and C++98. * c.opt ([Wnarrowing]): Update. gcc/cp * typeck2.c (check_narrowing): Adjust OPT_Wnarrowing diagnostics. (digest_init_r): Call check_narrowing irrespective of the C++ dialect. * decl.c (check_initializer): Likewise. * semantics.c (finish_compound_literal): Likewise. gcc/ * configure.ac: Add -Wno-narrowing to warning options. libcpp/ * configure.ac: Add -Wno-narrowing to warning options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180794 138bc75d-0d04-0410-961f-82ee72b054a4
* PR libstdc++/1773jason2011-10-312-1/+10
| | | | | | * init.c (cpp_init_builtins): Set __cplusplus for C++11. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180708 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/50920jason2011-10-313-5/+11
| | | | | | | | | | | | | | | | | | | | gcc/c-family * c-common.h (cxx_dialect): Add cxx11 and cxx03. * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03, and -Wc++11-compat. * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x. gcc/cp * class.c (check_field_decl): Change c++0x in diags to c++11. * error.c (maybe_warn_cpp0x): Likewise. * parser.c (cp_parser_diagnose_invalid_type_name): Likewise. * pt.c (check_default_tmpl_args): Likewise. libcpp * include/cpplib.h (enum c_lang): Rename CLK_CXX0X to CLK_CXX11, CLK_GNUCXX0X to CLK_GNUCXX11. libstdc++-v3 * include/bits/c++0x_warning.h: Change -std=c++0x to -std=c++11. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180707 138bc75d-0d04-0410-961f-82ee72b054a4
* Implement C++11 user-defined literals.jason2011-10-265-28/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libcpp/ * expr.c: (cpp_interpret_float_suffix, cpp_interpret_int_suffix, cpp_userdef_string_remove_type, cpp_userdef_string_add_type, cpp_userdef_char_remove_type, cpp_userdef_char_add_type, cpp_userdef_string_p, cpp_userdef_char_p, cpp_get_userdef_suffix): New. (cpp_classify_number): Classify unrecognized tokens as user-defined literals. * include/cpplib.h: Add new tokens for user-defined literals. * init.c: Add new preprocessor flag (cxx11). * lex.c: (lex_string, lex_raw_string): Handle user-defined literals including concatenation and promotion with suffixes. c-family/ * c-common.c (build_userdef_literal): New. * c-common.def: New tree code. * c-common.h (tree_userdef_literal): New tree struct and accessors. * c-lex.c (interpret_float): Add suffix parm. (c_lex_with_flags): Build literal tokens. cp/ * cp-objcp-common.c: (cp_tree_size) Return size of USERDEF_LITERAL tree. * cp-tree.h: (UDLIT_OP_*, UDLIT_OPER_P): Literal operator name tools. New tree code for user-defined literals. * cxx-pretty-print.h: (pp_cxx_userdef_literal) New. * cxx-pretty-print.c: (pp_cxx_userdef_literal) New. (pp_cxx_primary_expression, pp_cxx_expression): Use it. * decl.c: (cp_tree_node_structure): Return new tree code. (duplicate_decls): Check for raw vs. template operator conflicts. (grokfndecl, grokdeclarator): New checks for literal operators. * error.c: (dump_expr): Warn about user-defined literals in C++98 mode. (dump_function_name): Pretty printing. * mangle.c: (write_literal_operator_name): New. (write_unqualified_id, write_unqualified_name): Use it. * parser.c: (cp_parser_operator): Handle operator"". (cp_parser_userdef_char_literal, cp_parser_userdef_numeric_literal, cp_parser_userdef_string_literal): New. (cp_parser_primary_expression): Handle new user-defined literal tokens with new functions. * semantics.c: (potential_constant_expression_1): Add user-defined literals. * typeck.c (check_raw_literal_operator, check_literal_operator_args): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180536 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix lookup of macro mapsdodji2011-10-252-3/+7
| | | | | | * line-map.c (linemap_macro_map_lookup): Fix logic. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180427 138bc75d-0d04-0410-961f-82ee72b054a4
* Support expansion of reserved locations wrapped in virtual locationsdodji2011-10-253-55/+93
| | | | | | | | | | | | | | | | | | | | | | | | | libcpp/ * include/line-map.h (linemap_expand_location): Take a line table parameter. Update comment. (linemap_resolve_location): Update comment. (linemap_expand_location_full): Remove. * line-map.c (linemap_resolve_location): Handle reserved locations; return a NULL map in those cases. (linemap_expand_location): If location is reserved, return a zeroed expanded location. Update comment. Take a line table to assert that the function takes non-virtual locations only. (linemap_expand_location_full): remove. (linemap_dump_location): Handle the fact that linemap_resolve_location can return NULL line maps when the location resolves to a reserved location. gcc/ * input.c (expand_location): Rewrite using linemap_resolve_location and linemap_expand_location. Add a comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180426 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix cpp_peek_token behaviour (PR bootstrap/50778)dodji2011-10-223-10/+18
| | | | | | | | | | | | | libcpp/ * include/internal.h (_cpp_remaining_tokens_num_in_context): Take the context to act upon. * lex.c (_cpp_remaining_tokens_num_in_context): Likewise. Update comment. (cpp_token_from_context_at): Likewise. (cpp_peek_token): Use the context to peek tokens from. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180328 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix thinko in _cpp_remaining_tokens_num_in_contextdodji2011-10-202-4/+8
| | | | | | | | | libcpp/ * lex.c (_cpp_remaining_tokens_num_in_context): Fix computation of number of tokens. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180239 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix bootstrap on !NO_IMPLICIT_EXTERN_C and ia32 targetsdodji2011-10-184-12/+24
| | | | | | | | | | | | | | | | | | | libcpp/ * include/line-map.h (struct linemap_stats): Change the type of the members from size_t to long. * macro.c (macro_arg_token_iter_init): Unconditionally initialize iter->location_ptr. gcc/c-family/ * c-lex.c (fe_file_change): Use LINEMAP_SYSP when !NO_IMPLICIT_EXTERN_C. gcc/ * input.c (dump_line_table_statistics): Use long, not size_t. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180124 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix bootstrapping with --disable-checkingdodji2011-10-172-6/+10
| | | | | | | | | | libcpp/ChangeLog * line-map.c (linemap_macro_map_loc_to_exp_point): Avoid setting a variable without using it if ENABLE_CHECKING is not defined. Mark the LOCATION parameter as being unused. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180090 138bc75d-0d04-0410-961f-82ee72b054a4
* Reduce memory waste due to non-power-of-2 allocsdodji2011-10-173-6/+49
| | | | | | | | | | | | | | | | | | This patch basically arranges for the allocation size of line_map buffers to be as close as possible to a power of two. This *significantly* decreases peak memory consumption as (macro) maps are numerous and stay live during all the compilation. The patch adds a new ggc_round_alloc_size interface to the ggc allocator. In each of the two main allocator implementations ('page' and 'zone') the function has been extracted from the main allocation function code and returns the actual size of the allocated memory region, thus giving a chance to the caller to maximize the amount of memory it actually uses from the allocated memory region. In the 'none' allocator implementation (that uses xmalloc) the ggc_round_alloc_size just returns the requested allocation size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180086 138bc75d-0d04-0410-961f-82ee72b054a4
* Add line map statistics to -fmem-report outputdodji2011-10-174-4/+121
| | | | | | | | This patch adds statistics about line maps' memory consumption and macro expansion to the output of -fmem-report. It has been useful in trying to reduce the memory consumption of the macro maps support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180085 138bc75d-0d04-0410-961f-82ee72b054a4
* Support -fdebug-cpp optiondodji2011-10-174-0/+53
| | | | | | | | | This patch adds -fdebug-cpp option. When used with -E this dumps the relevant macro map before every single token. This clutters the output a lot but has proved to be invaluable in tracking some bugs during the development of the virtual location support. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180084 138bc75d-0d04-0410-961f-82ee72b054a4
* Generate virtual locations for tokensdodji2011-10-1710-149/+1376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This second instalment uses the infrastructure of the previous patch to allocate a macro map for each macro expansion and assign a virtual location to each token resulting from the expansion. To date when cpp_get_token comes across a token that happens to be a macro, the macro expander kicks in, expands the macro, pushes the resulting tokens onto a "token context" and returns a dummy padding token. The next call to cpp_get_token goes look into the token context for the next token [which is going to result from the previous macro expansion] and returns it. If the token is a macro, the macro expander kicks in and you know the story. This patch piggy-backs on that macro expansion process, so to speak. First it modifies the macro expander to make it create a macro map for each macro expansion. It then allocates a virtual location for each resulting token. Virtual locations of tokens resulting from macro expansions are then stored on a special kind of context called an "expanded tokens context". In other words, in an expanded tokens context, there are tokens resulting from macro expansion and their associated virtual locations. cpp_get_token_with_location is modified to return the virtual location of tokens resulting from macro expansion. Note that once all tokens from an expanded token context have been consumed and the context and is freed, the memory used to store the virtual locations of the tokens held in that context is freed as well. This helps reducing the overall peak memory consumption. The client code that was getting macro expansion point location from cpp_get_token_with_location now gets virtual location from it. Those virtual locations can in turn be resolved into the different interesting physical locations thanks to the linemap API exposed by the previous patch. Expensive progress. Possibly. So this whole virtual location allocation business is switched off by default. So by default no extended token is created. No extended token context is created either. One has to use -ftrack-macro-expansion to switch this on. This complicates the code but I believe it can be useful as some of our friends found out at http://llvm.org/bugs/show_bug.cgi?id=5610 The patch tries to reduce the memory consumption by freeing some token context memory that was being reused before. I didn't notice any compilation slow down due to this immediate freeing on my GNU/Linux system. As no client code tries to resolve virtual locations to anything but what was being done before, no new test case has been added. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180082 138bc75d-0d04-0410-961f-82ee72b054a4
* Linemap infrastructure for virtual locationsdodji2011-10-178-141/+1634
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the first instalment of a set which goal is to track locations of tokens across macro expansions. Tom Tromey did the original work and attached the patch to PR preprocessor/7263. This opus is a derivative of that original work. This patch modifies the linemap module of libcpp to add virtual locations support. A virtual location is a mapped location that can resolve to several different physical locations. It can always resolve to the spelling location of a token. For tokens resulting from macro expansion it can resolve to: - either the location of the expansion point of the macro. - or the location of the token in the definition of the macro - or, if the token is an argument of a function-like macro, the location of the use of the matching macro parameter in the definition of the macro The patch creates a new type of line map called a macro map. For every single macro expansion, there is a macro map that generates a virtual location for every single resulting token of the expansion. The good old type of line map we all know is now called an ordinary map. That one still encodes spelling locations as it has always had. As a result linemap_lookup as been extended to return a macro map when given a virtual location resulting from a macro expansion. The layout of structs line_map has changed to support this new type of map. So did the layout of struct line_maps. Accessor macros have been introduced to avoid messing with the implementation details of these datastructures directly. This helped already as we have been testing different ways of arranging these datastructure. Having to constantly adjust client code that is too tied with the internals of line_map and line_maps would have been even more painful. Of course, many new public functions have been added to the linemap module to handle the resolution of virtual locations. This patch introduces the infrastructure but no part of the compiler uses virtual locations yet. However the client code of the linemap data structures has been adjusted as per the changes. E.g, it's not anymore reliable for a client code to manipulate struct line_map directly if it just wants to deal with spelling locations, because struct line_map can now represent a macro map as well. In that case, it's better to use the convenient API to resolve the initial (possibly virtual) location to a spelling location (or to an ordinary map) and use that. This is the reason why the patch adjusts the Java, Ada and Fortran front ends. Also, note that virtual locations are not supposed to be ordered for relations '<' and '>' anymore. To test if a virtual location appears "before" another one, one has to use a new operator exposed by the line map interface. The patch updates the only spot (in the diagnostics module) I have found that was making the assumption that locations were ordered for these relations. This is the only change that introduces a use of the new line map API in this patch, so I am adding a regression test for it only. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@180081 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix the use of linemap_add and remove unnecessary kludgedodji2011-08-282-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | libcpp/ * line-map.c (linemap_add): Assert that reason must not be LC_RENAME when called for the first time on a "main input file". c-family/ * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as it's the first time it's being called on this main TU. gcc/lto/ * lto-lang.c (lto_init): Likewise. Also, avoid calling linemap_add twice. gcc/fortran/ * scanner.c (load_file): Don't abuse LC_RENAME reason while (indirectly) calling linemap_add. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178146 138bc75d-0d04-0410-961f-82ee72b054a4
* Add ability to force lexed tokens' source_locations.gchare2011-08-225-2/+42
| | | | | | | | | | | | | | | | | | | | Use it to force BUILTINS_LOCATION when declaring builtins instead of creating a <built-in> entry in the line_table which is wrong. * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens defined in cpp_init_builtins and c_cpp_builtins. gcc/fortran/ChangeLog * cpp.c (gfc_cpp_init): Force BUILTINS_LOCATION for tokens defined in cpp_define_builtins. libcpp/ChangeLog * init.c (cpp_create_reader): Inititalize forced_token_location_p. * internal.h (struct cpp_reader): Add field forced_token_location_p. * lex.c (_cpp_lex_direct): Use forced_token_location_p. (cpp_force_token_locations): New. (cpp_stop_forcing_token_locations): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177973 138bc75d-0d04-0410-961f-82ee72b054a4
* Properly define __cplusplus (PR libstdc++-v3/1773)ro2011-08-182-1/+6
| | | | | | | PR libstdc++/1773 * init.c (cpp_init_builtins): Define __cplusplus 19971L. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177877 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/cpplib.h (struct cpp_options): Fix typo.jsm282011-08-182-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177869 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/testsuite:jsm282011-08-184-20/+43
| | | | | | | | | | | | | | * gcc.dg/c1x-uni-string-1.c, gcc.dg/c1x-uni-string-2.c: New tests. libcpp: * include/cpplib.h (struct cpp_options): Add rliterals. * init.c (struct lang_flags, lang_defaults): Add rliterals. (cpp_set_lang): Set rliterals option. (cpp_init_builtins): Define __STDC_UTF_16__ and __STDC_UTF_32__. * lex.c (_cpp_lex_direct): Only accept raw strings if rliterals. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177868 138bc75d-0d04-0410-961f-82ee72b054a4
* LINEMAP_POSITION_FOR_COLUMN had the exact same effect asgchare2011-08-154-20/+8
| | | | | | | | | | | | | | | | linemap_position_for_column, removed it and updated users to use linemap_position_for_column instead libcpp/ChangeLog * include/line-map.h (LINEMAP_POSITION_FOR_COLUMN): Remove. Update all users to use linemap_position_for_column instead. gcc/go/ChangeLog * gofrontend/lex.cc (Lex::location): Update to use linemap_position_for_column instead. (Lex::earlier_location): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177768 138bc75d-0d04-0410-961f-82ee72b054a4
* * include/line-map.h (struct line_maps):gchare2011-07-283-6/+5
| | | | | | Remove unused field last_listed. Update all users. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176898 138bc75d-0d04-0410-961f-82ee72b054a4
* Set need_64bit_hwint to yes for x86 targets.hjl2011-07-283-20/+7
| | | | | | | | | | | | | | | | | | gcc/ 2011-07-28 H.J. Lu <hongjiu.lu@intel.com> * config.gcc: Set need_64bit_hwint to yes for x86 targets. libcpp/ 2011-07-28 H.J. Lu <hongjiu.lu@intel.com> * configure.ac: Set need_64bit_hwint to yes for x86 targets. * configure: Regenerated. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176871 138bc75d-0d04-0410-961f-82ee72b054a4
* * system.h [__cplusplus]: Wrap C function declarations in extern "C".ro2011-07-252-0/+20
| | | | | | | | | | -This line, and those below, will be ignored-- M ChangeLog M system.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176748 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-07-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>ro2011-07-224-4/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | 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++. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176620 138bc75d-0d04-0410-961f-82ee72b054a4
* Use source_location where it is duedodji2011-07-153-8/+16
| | | | | | | | | | | | libcpp/ * directives.c (struct if_stack): Use source_location as type here. * include/cpplib.h (struct cpp_callbacks)<include, define, undef, indent, def_pragma, used_define, used_undef>: Properly use source_location as parameter type, rather than unsigned int. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176333 138bc75d-0d04-0410-961f-82ee72b054a4
* * be.po, ca.po, da.po, de.po, el.po, es.po, fi.po, fr.po, id.po,jsm282011-07-0819-1080/+1254
| | | | | | | | ja.po, nl.po, ru.po, sv.po, tr.po, uk,po, vi.po, zh_CN.po, zh_TW.po: Update. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176061 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:ro2011-07-073-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR target/39150 * configure.ac (gcc_cv_as_hidden): Also accept x86_64-*-solaris2.1[0-9]*. (gcc_cv_as_cfi_directive): Likewise. (gcc_cv_as_comdat_group_group): Likewise. (set_have_as_tls): Likewise. * configure: Regenerate. * config.gcc (i[34567]86-*-solaris2*): Also handle x86_64-*-solaris2.1[0-9]*. * config.host (i[34567]86-*-solaris2*): Likewise. * config/sparc/sol2.h (ASM_CPU_DEFAULT_SPEC): Remove. * config/sol2-bi.h (ASM_CPU_DEFAULT_SPEC): Redefine. [USE_GLD] (ARCH_DEFAULT_EMULATION): Define. (TARGET_LD_EMULATION): Use it. * config/i386/sol2.h (ASM_CPU_DEFAULT_SPEC): Define. (SUBTARGET_CPU_EXTRA_SPECS): Add asm_cpu_default. * config/i386/sol2-bi.h (ASM_CPU32_DEFAULT_SPEC): Define. (ASM_CPU64_DEFAULT_SPEC): Define. (ASM_CPU_SPEC): Use %(asm_cpu_default). (ASM_SPEC): Redefine. (DEFAULT_ARCH32_P): Define using TARGET_64BIT_DEFAULT. * config/host-solaris.c [__x86_64__] (TRY_EMPTY_VM_SPACE): Reduce. * doc/install.texi (Specific, amd64-*-solaris2.1[0-9]*): Document. (Specific, i?86-*-solaris2.10): Mention x86_64-*-solaris2.1[0-9]* configuration. (Specific, x86_64-*-solaris2.1[0-9]*): Document. gcc/ada: PR target/39150 * gcc-interface/Makefile.in: Handle x86_64-solaris2. libgcc: PR target/39150 * config.host (*-*-solaris2*): Handle x86_64-*-solaris2.1[0-9]* like i?86-*-solaris2.1[0-9]*. (i[34567]86-*-solaris2*): Also handle x86_64-*-solaris2.1[0-9]*. * configure.ac (i?86-*-solaris2*): Likewise. * configure: Regenerate. gcc/testsuite: PR target/39150 * gcc.misc-tests/linkage.exp: Handle x86_64-*-solaris2.1[0-9]*. toplevel: PR target/39150 * configure.ac (i[3456789]86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. * configure: Regenerate. boehm-gc: PR target/39150 * configure.ac (i?86-*-solaris2.[89]): Also accept x86_64-*-solaris2.1?. * configure: Regenerate. gnattools: PR target/39150 * configure.ac (*86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. * configure: Regenerate. libcpp: PR target/39150 * configure.ac (host_wide_int): Handle x86_64-*-solaris2.1[0-9] like i[34567]86-*-solaris2.1[0-9]*. * configure: Regenerate. libgo: PR target/39150 * config/libtool.m4: Handle x86_64-*-solaris2.1[0-9]* like i?86-*-solaris*. * configure: Regenerate. libjava: PR target/39150 * configure.host (x86_64-*): Add -Usun to libgcj_flags. (x86_64-*-solaris2.1[0-9]*): New case. (i?86-*-solaris2*): Also accept x86_64-*-solaris2.1[0-9]*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175958 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/po:jsm282011-06-212-67/+70
| | | | | | | | | | * gcc.pot: Regenerate. libcpp/po: * cpplib.pot: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175251 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/45399jason2011-06-162-8/+5
| | | | | | * lex.c (lex_raw_string): Don't check for embedded NUL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175121 138bc75d-0d04-0410-961f-82ee72b054a4
* PR preprocessor/48532dodji2011-06-062-1/+36
| | | | | | | | | | | | | libcpp/ * directives.c (do_pragma): Don't forget the invocation location when parsing the pragma name of a namespaced pragma directive. gcc/testsuite/ * gcc.dg/cpp/pragma-3.c: New test case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174694 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-29 John Tytgat <John.Tytgat@aaug.net>tromey2011-06-022-2/+6
| | | | | | * files.c (read_file_guts): Add test on non-zero value of S_ISREG. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174571 138bc75d-0d04-0410-961f-82ee72b054a4
* * lex.c (init_vectorized_lexer): Fix comparison of masked value.uros2011-05-221-1/+2
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174037 138bc75d-0d04-0410-961f-82ee72b054a4
OpenPOWER on IntegriCloud