1. 07 Dec, 2011 1 commit
  2. 05 Dec, 2011 1 commit
  3. 22 Nov, 2011 1 commit
  4. 21 Nov, 2011 1 commit
  5. 03 Nov, 2011 1 commit
  6. 02 Nov, 2011 2 commits
  7. 31 Oct, 2011 2 commits
    • re PR libstdc++/1773 (__cplusplus defined to 1, should be 199711L) · 1fb80b0c
      	PR libstdc++/1773
      	* init.c (cpp_init_builtins): Set __cplusplus for C++11.
      
      From-SVN: r180708
      Jason Merrill committed
    • re PR c++/50920 (add a -std=c++11 option to the driver) · 97e3ad20
      	PR c++/50920
      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.
      
      From-SVN: r180707
      Jason Merrill committed
  8. 26 Oct, 2011 1 commit
    • Implement C++11 user-defined literals. · 3ce4f9e4
      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.
      
      From-SVN: r180536
      Ed Smith-Rowland committed
  9. 25 Oct, 2011 2 commits
    • Fix lookup of macro maps · 3bb0c8db
      	* line-map.c (linemap_macro_map_lookup): Fix logic.
      
      From-SVN: r180427
      Dodji Seketeli committed
    • Support expansion of reserved locations wrapped in virtual locations · 84756fd4
      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.
      
      From-SVN: r180426
      Dodji Seketeli committed
  10. 22 Oct, 2011 1 commit
  11. 20 Oct, 2011 1 commit
  12. 18 Oct, 2011 1 commit
    • Fix bootstrap on !NO_IMPLICIT_EXTERN_C and ia32 targets · d17687f6
      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.
      
      From-SVN: r180124
      Dodji Seketeli committed
  13. 17 Oct, 2011 6 commits
    • Fix bootstrapping with --disable-checking · 411f92de
      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.
      
      From-SVN: r180090
      Dodji Seketeli committed
    • Reduce memory waste due to non-power-of-2 allocs · b9bd6f74
      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.
      
      Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r180086
      Tom Tromey committed
    • Add line map statistics to -fmem-report output · 64a1a422
      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.
      
      Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r180085
      Tom Tromey committed
    • Support -fdebug-cpp option · 847e697a
      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.
      
      Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r180084
      Tom Tromey committed
    • Generate virtual locations for tokens · 92582b75
      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.
      
      Co-Authored-By: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r180082
      Tom Tromey committed
    • Linemap infrastructure for virtual locations · 46427374
      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.
      
      From-SVN: r180081
      Tom Tromey committed
  14. 28 Aug, 2011 1 commit
    • Fix the use of linemap_add and remove unnecessary kludge · 892a371f
      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.
      
      From-SVN: r178146
      Dodji Seketeli committed
  15. 22 Aug, 2011 1 commit
    • Add ability to force lexed tokens' source_locations. · e3dfef44
      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.
      
      From-SVN: r177973
      Gabriel Charette committed
  16. 18 Aug, 2011 3 commits
  17. 15 Aug, 2011 1 commit
  18. 28 Jul, 2011 2 commits
  19. 25 Jul, 2011 1 commit
  20. 22 Jul, 2011 1 commit
    • re PR bootstrap/49794 (Solaris 10/x86 bootstrap broken by C++ build) · 5b6d595b
      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
      Rainer Orth committed
  21. 15 Jul, 2011 1 commit
    • Use source_location where it is due · d0a9fbe1
      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.
      
      From-SVN: r176333
      Dodji Seketeli committed
  22. 08 Jul, 2011 1 commit
  23. 07 Jul, 2011 1 commit
    • re PR bootstrap/39150 (Configure scripts have no 64-Bit Solaris defined (only i386-solaris*).) · fbdd5d87
      	gcc:
      	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]*.
      
      From-SVN: r175958
      Rainer Orth committed
  24. 21 Jun, 2011 1 commit
  25. 16 Jun, 2011 1 commit
  26. 06 Jun, 2011 1 commit
  27. 02 Jun, 2011 1 commit
  28. 22 May, 2011 2 commits