1. 09 May, 2015 1 commit
  2. 05 May, 2015 2 commits
    • Fix indentation issues seen by -Wmisleading-indentation · 21c0a521
      gcc/ChangeLog:
      	* auto-profile.c (afdo_find_equiv_class): Fix indentation so
      	that it reflects the block structure.
      	(afdo_propagate_edge): Likewise.
      	(afdo_calculate_branch_prob): Likewise.
      	(afdo_annotate_cfg): Likewise.
      	* cfgcleanup.c (equal_different_set_p): Likewise.
      	(try_crossjump_to_edge): Likewise.
      	* cgraph.c (cgraph_node::verify_node): Likewise.
      	* cgraphunit.c (expand_all_functions): Likewise.
      	* config/i386/i386.c (ix86_expand_copysign): Likewise.
      	(exact_dependency_1): Likewise.
      	* dwarf2asm.c (dw2_output_indirect_constants): Likewise.
      	* dwarf2out.c (tree_add_const_value_attribute_for_decl): Likewise.
      	* gensupport.c (process_define_subst): Likewise.
      	* lto-wrapper.c (merge_and_complain): Likewise.
      	* tree-if-conv.c (if_convertible_bb_p): Likewise.
      	* tree-ssa-loop-prefetch.c (find_or_create_group): Likewise.
      	* tree-ssa-tail-merge.c (gsi_advance_fw_nondebug_nonlocal): Likewise.
      	* tree-vect-data-refs.c (vect_grouped_load_supported): Likewise.
      	* tree-vect-loop.c (vectorizable_reduction): Likewise.
      	* tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
      	* tree-vect-stmts.c (vectorizable_shift): Likewise.
      	* tree-vrp.c (vrp_finalize): Likewise.
      	* tree.c (variably_modified_type_p): Likewise.
      
      gcc/cp/ChangeLog:
      	* parser.c (cp_parser_asm_definition): Only test for
              error_mark_node if "outputs" was just set.
      	(cp_parser_asm_definition): Likewise for "inputs".
      
      gcc/fortran/ChangeLog:
      	* expr.c (check_inquiry): Fix indentation so that it reflects the
      	block structure.
      	* interface.c (compare_parameter): Likewise.
      	* parse.c (parse_oacc_structured_block): Likewise.
      	* target-memory.c (expr_to_char): Likewise.
      	* trans-types.c (gfc_init_kinds): Likewise.
      
      libcpp/ChangeLog:
      	* pch.c (cpp_valid_state): Fix indentation so that it reflects the
      	block structure.
      
      From-SVN: r222823
      David Malcolm committed
    • libcpp: Improvements to comments in line-map.h/c · c87b25e6
      libcpp/ChangeLog:
      	* include/line-map.h: Fix comment at the top of the file.
      	(source_location): Rewrite and expand the comment for this
      	typedef, adding an ascii-art table to clarify how source_location
      	values are allocated.
      	* line-map.c: Fix comment at the top of the file.
      
      From-SVN: r222806
      David Malcolm committed
  3. 01 May, 2015 1 commit
  4. 30 Apr, 2015 1 commit
  5. 13 Apr, 2015 1 commit
  6. 12 Apr, 2015 1 commit
  7. 10 Apr, 2015 2 commits
  8. 09 Apr, 2015 1 commit
  9. 07 Apr, 2015 2 commits
  10. 06 Apr, 2015 1 commit
  11. 02 Apr, 2015 1 commit
  12. 24 Mar, 2015 1 commit
  13. 23 Mar, 2015 2 commits
    • * fr.po: Update. · d2e70142
      From-SVN: r221598
      Joseph Myers committed
    • re PR preprocessor/65238 (__has_attribute is not handled properly with -traditional-cpp.) · fb136e35
      	PR preprocessor/65238
      	* internal.h (_cpp_scan_out_logical_line): Add third argument.
      	* directives.c (prepare_directive_trad): Pass false to it.
      	* traditional.c (_cpp_read_logical_line_trad,
      	_cpp_create_trad_definition): Likewise.
      	(struct fun_macro): Add paramc field.
      	(fun_like_macro): New function.
      	(maybe_start_funlike): Handle NODE_BUILTIN macros.  Initialize
      	macro->paramc field.
      	(save_argument): Use macro->paramc instead of
      	macro->node->value.macro->paramc.
      	(push_replacement_text): Formatting fix.
      	(recursive_macro): Use fun_like_macro helper.
      	(_cpp_scan_out_logical_line): Likewise.  Add BUILTIN_MACRO_ARG
      	argument.  Initialize fmacro.paramc field.  Handle builtin
      	function-like macros.
      
      	* c-c++-common/cpp/pr65238-1.c: New test.
      	* gcc.dg/cpp/pr65238-2.c: New test.
      	* gcc.dg/cpp/trad/pr65238-3.c: New test.
      	* gcc.dg/cpp/trad/pr65238-4.c: New test.
      
      From-SVN: r221587
      Jakub Jelinek committed
  14. 17 Mar, 2015 1 commit
  15. 04 Mar, 2015 1 commit
    • re PR target/65261 (bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime… · 44d95244
      re PR target/65261 (bootstrap-ubsan ppc64le: gcc/libcpp/lex.c:552:30: runtime error: load of misaligned address 0x01002172dfc6 for type 'const uchar', which requires 16 byte alignment)
      
      Fix PR65261
      
      Running bootstrap-ubsan on ppc64le shows many instances of:
      
        libcpp/lex.c:552:30: runtime error: load of misaligned address
        0x01001f31d37a for type 'const uchar', which requires 16 byte alignment
      
      But the unaligned vector loads are intended in this case, because they
      are preferable to forced-alignment on POWER8. So just silence the ubsan
      errors.
      
      2015-03-02  Markus Trippelsdorf  <markus@trippelsdorf.de>
      
      include/
      	PR target/65261
      	* ansidecl.h (ATTRIBUTE_NO_SANITIZE_UNDEFINED): New macro.
      
      libcpp/
      	PR target/65261
      	* lex.c (search_line_fast): Silence ubsan errors.
      
      From-SVN: r221190
      Markus Trippelsdorf committed
  16. 25 Feb, 2015 1 commit
    • be.po, [...]: Update. · 6badc991
      	* be.po, ca.po, da.po, de.po, el.po, eo.po, es.po, fi.po, fr.po,
      	id.po, ja.po, nl.po, pr_BR.po, ru.po, sr.po, sv.po, tr.po, uk.po,
      	vi.po, zh_CN.po, zh_TW.po: Update.
      
      From-SVN: r220976
      Joseph Myers committed
  17. 03 Feb, 2015 1 commit
    • PR preprocessor/64803 - __LINE__ inside macro is not constant · f8abc9ba
      Consider the example code mentionned in this PR:
      
       $ cat -n test.c
            1	#define C(a, b) a ## b
            2	#define L(x) C(L, x)
            3	#define M(a) goto L(__LINE__); __LINE__; L(__LINE__):
            4	M(a /* --> this is the line of the expansion point of M.  */
            5	  ); /* --> this is the line of the end of the invocation of M.  */
       $
      
      "cc1 -quiet -E test.c" yields:
      
       goto L5; 5; L4:
          ;
      
      Notice how we have a 'L4' there, where it should be L5.  That is the issue.
      
      My understanding is that during the *second* expansion of __LINE__
      (the one between the two L(__LINE__)), builtin_macro() is called by
      enter_macro_context() with the location of the expansion point of M
      (which is at line 4).  Then _cpp_builtin_macro_text() expands __LINE__
      into the line number of the location of the last token that has been
      lexed, which is the location of the closing parenthesis of the
      invocation of M, at line 5.  So that invocation of __LINE__ is
      expanded into 5.
      
      Now let's see why the last invocation of __LINE__ is expanded into 4.
      
      In builtin_macro(), we have this code at some point:
      
         /* Set pfile->cur_token as required by _cpp_lex_direct.  */
         pfile->cur_token = _cpp_temp_token (pfile);
         cpp_token *token = _cpp_lex_direct (pfile);
         /* We should point to the expansion point of the builtin macro.  */
         token->src_loc = loc;
      
      The first two statements insert a new token in the stream of lexed
      token and pfile->cur_token[-1], is the "new" last token that has been
      lexed.  But the location of pfile->cur_token[-1] is the same location
      as the location of the "previous" pfile->cur_token[-1], by courtesy of
      _cpp_temp_token().  So normally, in subsequent invocations of
      builtin_macro(), the location of pfile->cur_token[-1] should always be
      the location of the closing parenthesis of the invocation of M at line
      5.  Except that that code in master now has the statement
      "token->src_loc = loc;" on the next line.  That statement actually
      sets the location of pfile->cur_token[-1] to 'loc'.  Which is the
      location of the expansion point of M, which is on line 4.
      
      So in the subsequent call to builtin_macro() (for the last expansion
      of __LINE__ in L(__LINE__)), for _cpp_builtin_macro_text(),
      pfile->cur_token[-1].src_loc is going to have a line number of 4.
      
      I think the core issue here is that the location that is passed to
      builtin_macro() from enter_macro_context() is not correct when we are
      in presence of a top-most function-like macro invocation; in that
      case, that location should be the location of the closing parenthesis
      of the macro invocation.  Otherwise, if we are in presence of a a
      top-most object-like macro invocation then the location passed down
      to builtin_macro should be the location of the expansion point of the
      macro.
      
      That way, in the particular case of the input code above, the location
      received by builtin_macro() will always have line number 5.
      
      Boostrapped and tested on x86_64-unknown-linux-gnu against trunk.
      
      libcpp/ChangeLog:
      
      	* internal.h (cpp_reader::top_most_macro_node): New data member.
      	* macro.c (enter_macro_context): Pass the location of the end of
      	the top-most invocation of the function-like macro, or the
      	location of the expansion point of the top-most object-like macro.
      	(cpp_get_token_1): Store the top-most macro node in the new
      	pfile->top_most_macro_node data member.
      	(_cpp_pop_context): Clear the new cpp_reader::top_most_macro_node
      	data member.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/cpp/builtin-macro-1.c: New test case.
      
      Signed-off-by: Dodji Seketeli <dodji@redhat.com>
      
      From-SVN: r220367
      Dodji Seketeli committed
  18. 02 Feb, 2015 1 commit
  19. 30 Jan, 2015 1 commit
  20. 23 Jan, 2015 1 commit
  21. 16 Jan, 2015 1 commit
  22. 05 Jan, 2015 1 commit
  23. 19 Dec, 2014 1 commit
    • re PR preprocessor/63831 (r217292 causes segfaults with -MM) · 1f8d3e84
      	PR preprocessor/63831
      	* c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
      	and __has_cpp_attribute here.
      	* c-ppoutput.c (init_pp_output): Set cb->has_attribute to
      	c_common_has_attribute.
      	* c-common.h (c_common_has_attribute): New prototype.
      	* c-lex.c (init_c_lex): Set cb->has_attribute to
      	c_common_has_attribute instead of cb_has_attribute.
      	(get_token_no_padding): New function.
      	(cb_has_attribute): Renamed to ...
      	(c_common_has_attribute): ... this.  No longer static.  Use
      	get_token_no_padding, require ()s, don't build TREE_LIST
      	unnecessarily, fix up formatting, adjust diagnostics, call
      	init_attributes.
      
      	* directives.c (lex_macro_node): Remove __has_attribute__ handling.
      	* internal.h (struct spec_node): Remove n__has_attribute__ field.
      	(struct lexer_state): Remove in__has_attribute__ field.
      	* macro.c (_cpp_builtin_macro_text): Handle BT_HAS_ATTRIBUTE.
      	* identifiers.c (_cpp_init_hashtable): Remove __has_attribute__
      	handling.
      	* init.c (builtin_array): Add __has_attribute and __has_cpp_attribute.
      	(cpp_init_special_builtins): Don't initialize __has_attribute
      	or __has_cpp_attribute if CLK_ASM or pfile->cb.has_attribute is NULL.
      	* traditional.c (enum ls): Remove ls_has_attribute,
      	ls_has_attribute_close.
      	(_cpp_scan_out_logical_line): Remove __has_attribute__ handling.
      	* include/cpplib.h (enum cpp_builtin_type): Add BT_HAS_ATTRIBUTE.
      	* pch.c (cpp_read_state): Remove __has_attribute__ handling.
      	* expr.c (eval_token): Likewise.
      	(parse_has_attribute): Removed.
      
      	* c-c++-common/cpp/pr63831-1.c: New test.
      	* c-c++-common/cpp/pr63831-2.c: New test.
      
      From-SVN: r218948
      Jakub Jelinek committed
  24. 11 Dec, 2014 1 commit
    • xvasprintf.c: New file. · 01ca36af
      	* xvasprintf.c: New file.
      	* vprintf-support.h: Likewise.
      	* vprintf-support.c: Likewise.
      	* Makefile.in (CFILES): Add vprintf-support.c, xvasprintf.c.
      	(REQUIRED_OFILES): Add vprintf-support.$(objext), xvasprintf.$(objext).
      	(vprintf-support.$(objext), xvasprintf.$(objext)): New targets.
      	(vasprintf.$(objext)): Depend on $(srcdir)/vprintf-support.h.
      	* functions.texi: Regenerate.
      	* vasprintf.c (int_vasprintf): Use libiberty_vprintf_buffer_size.
      
      include/ChangeLog:
      
      	* libiberty.h (xvasprintf): Declare.
      
      libcpp/ChangeLog:
      
      	* directives.c (cpp_define_formatted): Use xvasprintf.
      
      
      Co-Authored-By: Ben Elliston <bje@au.ibm.com>
      Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
      
      From-SVN: r218618
      Uros Bizjak committed
  25. 04 Dec, 2014 1 commit
  26. 02 Dec, 2014 2 commits
  27. 29 Nov, 2014 1 commit
  28. 25 Nov, 2014 1 commit
  29. 20 Nov, 2014 2 commits
  30. 13 Nov, 2014 1 commit
  31. 11 Nov, 2014 2 commits
    • re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$… · 3aa34c1d
      re PR fortran/44054 (Handle -Werror, -Werror=, -fdiagnostics-show-option, !GCC$ diagnostic (pragmas) and color)
      
      libcpp/ChangeLog:
      
      2014-11-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR fortran/44054
      	* include/line-map.h (linemap_position_for_loc_and_offset):
      	Declare.
      	* line-map.c (linemap_position_for_loc_and_offset): New.
      
      
      gcc/fortran/ChangeLog:
      
      2014-11-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR fortran/44054
      	* gfortran.h (warn_use_without_only): Remove.
      	(gfc_diagnostics_finish): Declare.
      	* error.c: Include tree-diagnostics.h
      	(gfc_format_decoder): New.
      	(gfc_diagnostics_init): Use gfc_format_decoder. Set default caret
      	char.
      	(gfc_diagnostics_finish): Restore tree diagnostics defaults, but
      	keep gfc_diagnostics_starter and finalizer. Restore default caret.
      	* options.c: Remove all uses of warn_use_without_only.
      	* lang.opt (Wuse-without-only): Add Var.
      	* f95-lang.c (gfc_be_parse_file): Call gfc_diagnostics_finish.
      	* module.c (gfc_use_module): Use gfc_warning_now_2.
      	* parse.c (decode_statement): Likewise.
      	(decode_gcc_attribute): Likewise.
      	(next_free): Likewise.
      	(next_fixed): Likewise.
      
      
      gcc/testsuite/ChangeLog:
      
      2014-11-11  Manuel López-Ibáñez  <manu@gcc.gnu.org>
      
      	PR fortran/44054
      	* lib/gfortran-dg.exp: Update regexp to match locus and message
      	without caret.
      	* gfortran.dg/use_without_only_1.f90: Add column numbers.
              * gfortran.dg/warnings_are_errors_1.f: Update.
      
      From-SVN: r217383
      Manuel López-Ibáñez committed
    • Merger of dmalcolm/jit branch from git · 35485da9
      ChangeLog:
      	* ChangeLog.jit: New.
      	* MAINTAINERS (Various Maintainers): Add myself as jit maintainer.
      
      contrib/ChangeLog:
      	* ChangeLog.jit: New.
      	* jit-coverage-report.py: New file: a script to print crude
      	code-coverage information for the libgccjit API.
      
      gcc/ChangeLog:
      	* ChangeLog.jit: New.
      	* Makefile.in (doc_build_sys): New variable, set to "sphinx" if
      	sphinx is installed, falling back to "texinfo" otherwise.
      	(FULL_DRIVER_NAME): New variable, adapted from the
      	install-driver target.  New target, a symlink within the builddir,
      	linked to "xgcc", for use when running the JIT library from the
      	builddir.
      	(MOSTLYCLEANFILES): Add FULL_DRIVER_NAME.
      	(install-driver): Use $(FULL_DRIVER_NAME) rather than spelling it
      	out.
      	* configure.ac (doc_build_sys): New variable, set to "sphinx" if
      	sphinx is installed, falling back to "texinfo" otherwise.
      	(GCC_DRIVER_NAME): Generate a gcc-driver-name.h file containing
      	GCC_DRIVER_NAME for the benefit of jit/internal-api.c.
      	* configure: Regenerate.
      	* doc/install.texi (--enable-host-shared): Specify that this is
      	required when building libgccjit.
      	(Tools/packages necessary for modifying GCC): Add Sphinx.
      	* timevar.def (TV_JIT_REPLAY): New.
      	(TV_ASSEMBLE): New.
      	(TV_LINK): New.
      	(TV_LOAD): New.
      
      gcc/java/ChangeLog:
      	* gcc/ChangeLog.jit: New.
      
      gcc/jit/ChangeLog:
      	* ChangeLog.jit: New.
      	* ChangeLog: New.
      	* Make-lang.in: New.
      	* TODO.rst: New.
      	* config-lang.in: New.
      	* docs/Makefile: New.
      	* docs/_build/texinfo/Makefile: New.
      	* docs/_build/texinfo/factorial.png: New.
      	* docs/_build/texinfo/libgccjit.texi: New.
      	* docs/_build/texinfo/sum-of-squares.png: New.
      	* docs/conf.py: New.
      	* docs/examples/tut01-hello-world.c: New.
      	* docs/examples/tut02-square.c: New.
      	* docs/examples/tut03-sum-of-squares.c: New.
      	* docs/examples/tut04-toyvm/Makefile: New.
      	* docs/examples/tut04-toyvm/factorial.toy: New.
      	* docs/examples/tut04-toyvm/fibonacci.toy: New.
      	* docs/examples/tut04-toyvm/toyvm.c: New.
      	* docs/index.rst: New.
      	* docs/internals/index.rst: New.
      	* docs/intro/factorial.png: New.
      	* docs/intro/index.rst: New.
      	* docs/intro/sum-of-squares.png: New.
      	* docs/intro/tutorial01.rst: New.
      	* docs/intro/tutorial02.rst: New.
      	* docs/intro/tutorial03.rst: New.
      	* docs/intro/tutorial04.rst: New.
      	* docs/topics/contexts.rst: New.
      	* docs/topics/expressions.rst: New.
      	* docs/topics/functions.rst: New.
      	* docs/topics/index.rst: New.
      	* docs/topics/locations.rst: New.
      	* docs/topics/objects.rst: New.
      	* docs/topics/results.rst: New.
      	* docs/topics/types.rst: New.
      	* dummy-frontend.c: New.
      	* jit-builtins.c: New.
      	* jit-builtins.h: New.
      	* jit-common.h: New.
      	* jit-playback.c: New.
      	* jit-playback.h: New.
      	* jit-recording.c: New.
      	* jit-recording.h: New.
      	* libgccjit++.h: New.
      	* libgccjit.c: New.
      	* libgccjit.h: New.
      	* libgccjit.map: New.
      	* notes.txt: New.
      
      gcc/testsuite/ChangeLog:
      	* ChangeLog.jit: New.
      	* jit.dg/all-non-failing-tests.h: New.
      	* jit.dg/harness.h: New.
      	* jit.dg/jit.exp: New.
      	* jit.dg/test-accessing-struct.c: New.
      	* jit.dg/test-accessing-union.c: New.
      	* jit.dg/test-array-as-pointer.c: New.
      	* jit.dg/test-arrays.c: New.
      	* jit.dg/test-calling-external-function.c: New.
      	* jit.dg/test-calling-function-ptr.c: New.
      	* jit.dg/test-combination.c: New.
      	* jit.dg/test-dot-product.c: New.
      	* jit.dg/test-empty.c: New.
      	* jit.dg/test-error-accessing-field-in-other-struct.c: New.
      	* jit.dg/test-error-adding-to-terminated-block.c: New.
      	* jit.dg/test-error-array-as-pointer.c: New.
      	* jit.dg/test-error-bad-cast.c: New.
      	* jit.dg/test-error-block-in-wrong-function.c: New.
      	* jit.dg/test-error-call-through-ptr-with-mismatching-args.c: New.
      	* jit.dg/test-error-call-through-ptr-with-non-function.c: New.
      	* jit.dg/test-error-call-through-ptr-with-non-pointer.c: New.
      	* jit.dg/test-error-call-through-ptr-with-not-enough-args.c: New.
      	* jit.dg/test-error-call-through-ptr-with-too-many-args.c: New.
      	* jit.dg/test-error-call-with-mismatching-args.c: New.
      	* jit.dg/test-error-call-with-not-enough-args.c: New.
      	* jit.dg/test-error-call-with-too-many-args.c: New.
      	* jit.dg/test-error-dereference-field-of-non-pointer.c: New.
      	* jit.dg/test-error-dereference-read-of-non-pointer.c: New.
      	* jit.dg/test-error-get-type-bad-enum.c: New.
      	* jit.dg/test-error-index-not-a-numeric-type.c: New.
      	* jit.dg/test-error-mismatching-types-in-assignment.c: New.
      	* jit.dg/test-error-mismatching-types-in-call.c: New.
      	* jit.dg/test-error-missing-return.c: New.
      	* jit.dg/test-error-new-binary-op-bad-op.c: New.
      	* jit.dg/test-error-new-function-bad-kind.c: New.
      	* jit.dg/test-error-new-unary-op-bad-op.c: New.
      	* jit.dg/test-error-null-passed-to-api.c: New.
      	* jit.dg/test-error-return-within-void-function.c: New.
      	* jit.dg/test-error-unreachable-block.c: New.
      	* jit.dg/test-error-unterminated-block.c: New.
      	* jit.dg/test-error-value-not-a-numeric-type.c: New.
      	* jit.dg/test-expressions.c: New.
      	* jit.dg/test-factorial.c: New.
      	* jit.dg/test-fibonacci.c: New.
      	* jit.dg/test-functions.c: New.
      	* jit.dg/test-fuzzer.c: New.
      	* jit.dg/test-hello-world.c: New.
      	* jit.dg/test-linked-list.c: New.
      	* jit.dg/test-long-names.c: New.
      	* jit.dg/test-nested-contexts.c: New.
      	* jit.dg/test-nested-loops.c: New.
      	* jit.dg/test-operator-overloading.cc: New.
      	* jit.dg/test-quadratic.c: New.
      	* jit.dg/test-quadratic.cc: New.
      	* jit.dg/test-reading-struct.c: New.
      	* jit.dg/test-string-literal.c: New.
      	* jit.dg/test-sum-of-squares.c: New.
      	* jit.dg/test-threads.c: New.
      	* jit.dg/test-types.c: New.
      	* jit.dg/test-using-global.c: New.
      	* jit.dg/test-volatile.c: New.
      
      include/ChangeLog:
      	* ChangeLog.jit: New.
      
      libbacktrace/ChangeLog:
      	* ChangeLog.jit: New.
      
      libcpp/ChangeLog:
      	* ChangeLog.jit: New.
      
      libdecnumber/ChangeLog:
      	* ChangeLog.jit: New.
      
      libiberty/ChangeLog:
      	* ChangeLog.jit: New.
      
      zlib/ChangeLog:
      	* ChangeLog.jit: New.
      
      From-SVN: r217374
      David Malcolm committed
  32. 10 Nov, 2014 1 commit
    • cpplib.h (cpp_callbacks): Add has_attribute. · 42fd12b1
      libcpp:
      
      2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	* include/cpplib.h (cpp_callbacks): Add has_attribute.
      	* internal.h (lexer_state): Add in__has_attribute__.
      	* directives.c (lex_macro_node): Prevent use of __has_attribute__
      	as a macro.
      	* expr.c (parse_has_attribute): New function; (eval_token): Look for
      	__has_attribute__ and route to parse_has_attribute.
      	* identifiers.c (_cpp_init_hashtable): Initialize n__has_attribute__.
      	* pch.c (cpp_read_state): Initialize n__has_attribute__.
      	* traditional.c (enum ls): Add ls_has_attribute, ls_has_attribute_close;
      	(_cpp_scan_out_logical_line): Attend to __has_attribute__.
      
      
      gcc/c-family:
      
      2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	* c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
      	(__cpp_rtti, __cpp_exceptions): New macros for C++98;
      	(__cpp_range_based_for, __cpp_initializer_lists,
      	__cpp_delegating_constructors, __cpp_nsdmi,
      	__cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
      	for C++11; (__cpp_attribute_deprecated): Remove in favor of
      	__has_cpp_attribute.
      	* c-lex.c (cb_has_attribute): New callback CPP function;
      	(init_c_lex): Set has_attribute callback.
      
      
      gcc/testsuite:
      
      2014-11-10  Edward Smith-Rowland  <3dw4rd@verizon.net>
      
      	* g++.dg/cpp1y/feat-cxx11.C: Test new feature macros for C++98
      	and C++11; Test existence of __has_cpp_attribute;  Test C++11
      	attributes.
      	* g++.dg/cpp1y/feat-cxx11-neg.C: Ditto.
      	* g++.dg/cpp1y/feat-cxx14.C: Ditto and test for C++14 attributes.
      	* g++.dg/cpp1y/feat-cxx98.C: Test new feature macros for C++98.
      	* g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
      	* g++.dg/cpp1y/feat-neg.C: Test that __cpp_rtti, _cpp_exceptions
      	will be undefined for -fno-rtti -fno-exceptions.
      
      From-SVN: r217292
      Edward Smith-Rowland committed
  33. 07 Nov, 2014 1 commit