gcc/libcpp
Jakub Jelinek 1f8d3e84ee re PR preprocessor/63831 (r217292 causes segfaults with -MM)
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
2014-12-19 13:20:58 +01:00
..
include re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
po * ja.po: Update. 2014-11-07 12:45:36 +00:00
aclocal.m4
ChangeLog re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
ChangeLog.jit Merger of dmalcolm/jit branch from git 2014-11-11 21:55:52 +00:00
charset.c Fix off-by-one bug in utf16 conversion (PR preprocessor/41698). 2014-11-29 01:56:06 +00:00
config.in
configure
configure.ac
directives-only.c
directives.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
errors.c
expr.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
files.c
identifiers.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
init.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
internal.h re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
lex.c re PR target/63966 (inconsistent operand constraints compiling build libcpp) 2014-11-20 13:10:12 +01:00
line-map.c line-map.c (linemap_position_for_loc_and_offset): Add new linemap_assert_fails. 2014-12-04 23:35:29 +00:00
macro.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
Makefile.in
makeucnid.c
mkdeps.c
pch.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
symtab.c
system.h
traditional.c re PR preprocessor/63831 (r217292 causes segfaults with -MM) 2014-12-19 13:20:58 +01:00
ucnid.h
ucnid.tab