Commit Graph

596 Commits

Author SHA1 Message Date
Joseph Myers 04df569c86 * sv.po: Update.
From-SVN: r222692
2015-05-01 17:23:49 +01:00
Joseph Myers 21a331b334 be.po, [...]: Update.
* 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: r222646
2015-04-30 18:54:41 +01:00
Joseph Myers 272ccea97c gcc.pot: Regenerate.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r222061
2015-04-13 21:10:53 +01:00
Joseph Myers b8d6284e3a * sr.po: Update.
From-SVN: r222021
2015-04-12 14:40:38 +01:00
Joseph Myers 312ca97504 * fr.po: Update.
From-SVN: r221996
2015-04-11 00:13:05 +01:00
Joseph Myers 8a5a514518 * fr.po: Update.
From-SVN: r221989
2015-04-10 21:33:11 +01:00
Richard Biener ca70802553 re PR pch/65550 (ICE (segfault) with pch)
2015-04-09  Richard Biener  <rguenther@suse.de>

	PR pch/65550
	* files.c (pch_open_file): Allow main and pre-included files
	when trying to open a PCH.

From-SVN: r221949
2015-04-09 13:37:53 +00:00
Joseph Myers 5612a814f5 * da.po: Update.
From-SVN: r221908
2015-04-07 21:40:01 +01:00
Joseph Myers 0a4ff641fc gcc.pot: Regenerate.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r221904
2015-04-07 16:59:24 +01:00
Jakub Jelinek e4b33ee5e4 re PR preprocessor/61977 (powerpc preprocessor breaks on lines that end with "vector")
PR preprocessor/61977
	* lex.c (cpp_peek_token): If peektok is CPP_EOF, back it up
	with all tokens peeked by the current function.

	* gcc.dg/cpp/pr61977.c: New test.

From-SVN: r221882
2015-04-06 19:01:50 +02:00
Jakub Jelinek b8cd77f40c re PR preprocessor/61977 (powerpc preprocessor breaks on lines that end with "vector")
PR preprocessor/61977
	* lex.c (cpp_peek_token): Temporarily clear pfile->cb.line_change.

	* gcc.target/powerpc/pr61977-1.c: New test.
	* gcc.target/powerpc/pr61977-2.c: New test.

From-SVN: r221839
2015-04-02 13:57:02 +02:00
Joseph Myers 88db3715f9 * fr.po: Update.
From-SVN: r221638
2015-03-24 16:47:21 +00:00
Joseph Myers d2e7014272 * fr.po: Update.
From-SVN: r221598
2015-03-23 15:34:57 +00:00
Jakub Jelinek fb136e35c7 re PR preprocessor/65238 (__has_attribute is not handled properly with -traditional-cpp.)
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
2015-03-23 09:02:39 +01:00
Edward Smith-Rowland a5858a3dff re PR c++/64626 (C++14 single quote should not always be a digit separator)
libcpp/

2015-03-16  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/64626
	* lex.c (lex_number): If a number ends with digit-seps (') skip back
	and let lex_string take them.


gcc/testsuite/

2015-03-16  Edward Smith-Rowland  <3dw4rd@verizon.net>

	PR c++/64626
	g++.dg/cpp1y/pr64626-1.C: New.
	g++.dg/cpp1y/pr64626-2.C: New.
	g++.dg/cpp1y/digit-sep-neg.C: Adjust errors and warnings.

From-SVN: r221470
2015-03-17 00:50:55 +00:00
Markus Trippelsdorf 44d952440e 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
2015-03-04 17:28:56 +00:00
Joseph Myers 6badc991fc be.po, [...]: Update.
* 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
2015-02-25 16:08:20 +00:00
Dodji Seketeli f8abc9ba2d PR preprocessor/64803 - __LINE__ inside macro is not constant
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
2015-02-03 10:26:46 +01:00
Joseph Myers 0f323065dd Regenerate .pot files.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r220349
2015-02-02 16:07:12 +00:00
Szabolcs Nagy 95d0610c17 [Patch/libcpp] Change __ARM_NEON__ to __ARM_NEON in lex.c
2015-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* lex.c (search_line_fast): Change __ARM_NEON__ to __ARM_NEON.

From-SVN: r220281
2015-01-30 14:07:00 +00:00
Marek Polacek 10ef8f287e re PR preprocessor/60570 (expression in 'elif' directive mis-diagnosed as error when group will be skipped)
DR#412
	PR preprocessor/60570
	* directives.c (do_elif): Don't evaluate #elif conditionals
	when they don't need to be.

	* gcc.dg/cpp/pr36320.c: Turn dg-error into dg-bogus.
	* gcc.dg/cpp/pr60570.c: New test.

From-SVN: r220035
2015-01-23 11:57:43 +00:00
Jakub Jelinek 6e6cb47146 expr.c (cpp_classify_number): Add N_() around ?...
* expr.c (cpp_classify_number): Add N_() around ?: string
	literals used in cpp_error_with_line call as format string.

From-SVN: r219759
2015-01-16 18:40:15 +01:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
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
Uros Bizjak 01ca36af91 xvasprintf.c: New file.
* 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
2014-12-11 09:15:37 +01:00
Manuel López-Ibáñez b93c07227e line-map.c (linemap_position_for_loc_and_offset): Add new linemap_assert_fails.
libcpp/ChangeLog:

2014-12-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* line-map.c (linemap_position_for_loc_and_offset): Add new
	linemap_assert_fails.

gcc/fortran/ChangeLog:

2014-12-05  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* scanner.c (gfc_next_char_literal): Use gfc_warning_now.
	(load_file): Use the line length as the column hint for
	linemap_line_start. Reserve a location for the highest column of
	the line.

From-SVN: r218407
2014-12-04 23:35:29 +00:00
Manuel López-Ibáñez 73bd83290a line-map.h (linemap_assert_fails): Declare.
libcpp/ChangeLog:

2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* include/line-map.h (linemap_assert_fails): Declare.
	* line-map.c (linemap_position_for_loc_and_offset): Use it.

From-SVN: r218277
2014-12-02 16:03:31 +00:00
Manuel López-Ibáñez 9c320ab1f1 line-map.c (linemap_add): Fix typo.
2014-12-02  Manuel López-Ibáñez  <manu@gcc.gnu.org>

        * line-map.c (linemap_add): Fix typo.
        (linemap_line_start): Fix whitespace.

From-SVN: r218276
2014-12-02 16:00:33 +00:00
Joseph Myers 81fee4a708 Fix off-by-one bug in utf16 conversion (PR preprocessor/41698).
libcpp:
2014-11-29  John Schmerge  <jbschmerge@gmail.com>

	PR preprocessor/41698
	* charset.c (one_utf8_to_utf16): Do not produce surrogate pairs
	for 0xffff.

gcc/testsuite:
2014-11-29  Joseph Myers  <joseph@codesourcery.com>

	PR preprocessor/41698
	* gcc/testsuite/g++.dg/cpp/utf16-pr41698-1.C: New test.

From-SVN: r218179
2014-11-29 01:56:06 +00:00
Jakub Jelinek 43ba1c6c3e re PR preprocessor/60436 (C preprocessor segfaults on assembly file)
PR preprocessor/60436
	* line-map.c (linemap_line_start): If highest is above 0x60000000
	and we are still tracking columns or highest is above 0x70000000,
	force add_map.

From-SVN: r218042
2014-11-25 12:16:27 +01:00
Uros Bizjak 1b6b13f3ee re PR target/63966 (inconsistent operand constraints compiling build libcpp)
PR target/63966
	* lex.c [__i386__ || __x86_64__]: Compile special SSE functions
	only for (__GNUC__ >= 5 || !defined(__PIC__)).

From-SVN: r217851
2014-11-20 13:10:12 +01:00
Uros Bizjak 8a23b10063 re PR target/63966 (inconsistent operand constraints compiling build libcpp)
PR target/63966
	* lex.c [__i386__ || __x86_64__]: Include system <cpuid.h> for
	GCC_VERSION < 5000.

From-SVN: r217830
2014-11-20 11:43:45 +01:00
Manuel López-Ibáñez d82f1e1305 line-map.h: Include EXPR, so that unused variable warnings do not occur.
* include/line-map.h: Include EXPR, so that unused variable warnings
	do not occur.

From-SVN: r217473
2014-11-13 10:46:56 +00:00
Manuel López-Ibáñez 3aa34c1d8f 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
2014-11-11 22:50:48 +00:00
David Malcolm 35485da996 Merger of dmalcolm/jit branch from git
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
2014-11-11 21:55:52 +00:00
Edward Smith-Rowland 42fd12b1e7 cpplib.h (cpp_callbacks): Add has_attribute.
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
2014-11-10 15:53:12 +00:00
Joseph Myers 6343f5d75b * ja.po: Update.
From-SVN: r217220
2014-11-07 12:45:36 +00:00
Joseph Myers be5ffc59ad Preserve original spellings of extended identifiers.
This patch makes cpplib track the original spellings of extended
identifiers, as well as the canonical UTF-8 version, in order to
follow standard semantics properly without needing a convoluted and
undocumented canonicalization in translation phase 1 (see bug 9449
comments 39-46 regarding such a canonicalization).

The spelling is tracked in cpp_identifier and cpp_macro_arg without
making cpp_token any larger.  The original spelling is used for checks
of duplicate macro definitions, stringizing (see the C++ tests added;
this case is only an issue for C++ not C because C makes it
implementation-defined whether a \ is inserted before the \ of a UCN
in a string or character constant when stringizing, while C++ does
not), pasting (relevant when the result is then stringized for C++)
and when macro definitions are output as text (e.g. for -d options).

Once a macro has been defined, only the original spelling of the
argument names needs keeping in the argument list.  While it is being
defined, however, both spellings are needed: the original one for
subsequent saving for checks of duplicate macro definitions, and the
canonical one which is the node marked specially to generate macro
argument tokens rather than normal identifier tokens.  The buffer that
is used to save the original values of the identifier tokens is
changed so that it stores both those original values and a pointer to
the canonical hash nodes, so that those canonical nodes can be found
when their values need restoring after the macro definition has been
parsed.

I believe this covers the known standards issues in extended
identifiers support (the remaining unimplemented C99 areas in GCC all
being floating-point-related), except for C++ translation of extended
characters to UCNs in phase 1 (which I have no plans to work on).
There are however probably issues left with handling of extended
identifiers in other places, as listed in
<https://gcc.gnu.org/ml/gcc-patches/2014-11/msg00337.html> (those
issues are generally the sort of thing that could be addressed as bugs
outside development stage 1).  (The bulk of the potential issues Zack
was concerned about in 2003-5, that resulted in extended identifiers
being disabled in the absence of -fextended-identifiers, were
effectively eliminated by the audit and fixes I did in 2009, however;
that todo list reflects what was left over after that audit.)

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
	* include/cpp-id-data.h (struct cpp_macro): Update comment
	regarding parameters.
	* include/cpplib.h (struct cpp_macro_arg, struct cpp_identifier):
	Add spelling fields.
	(struct cpp_token): Update comment on macro_arg.
	* internal.h (_cpp_save_parameter): Add extra argument.
	(_cpp_spell_ident_ucns): New declaration.
	* lex.c (lex_identifier): Add SPELLING argument.  Set *SPELLING to
	original spelling of identifier.
	(_cpp_lex_direct): Update calls to lex_identifier.
	(_cpp_spell_ident_ucns): New function, factored out of
	cpp_spell_token.
	(cpp_spell_token): Adjust FORSTRING argument semantics to return
	original spelling of identifiers.  Use _cpp_spell_ident_ucns in
	!FORSTRING case.
	(_cpp_equiv_tokens): Check spellings of identifiers and macro
	arguments are identical.
	* macro.c (macro_arg_saved_data): New structure.
	(paste_tokens): Use original spellings of identifiers from
	cpp_spell_token.
	(_cpp_save_parameter): Add argument SPELLING.  Save both canonical
	node and its value.
	(parse_params): Update calls to _cpp_save_parameter.
	(lex_expansion_token): Save spelling of macro argument tokens.
	(_cpp_create_definition): Extract canonical node from saved data.
	(cpp_macro_definition): Use UCNs in spelling of macro name.  Use
	original spellings of macro argument tokens and identifiers.
	* traditional.c (scan_parameters): Update call to
	_cpp_save_parameter.

gcc:
	* doc/invoke.texi (-std=c99, -std=c11): Don't refer to corner
	cases of extended identifiers.

gcc/testsuite:
	* g++.dg/cpp/ucnid-2.C, g++.dg/cpp/ucnid-3.C,
	gcc.dg/cpp/ucnid-11.c, gcc.dg/cpp/ucnid-12.c,
	gcc.dg/cpp/ucnid-13.c, gcc.dg/cpp/ucnid-14.c,
	gcc.dg/cpp/ucnid-15.c: New tests.

From-SVN: r217202
2014-11-06 21:08:52 +00:00
Joseph Myers 701cade1a2 Enable -fextended-identifiers by default.
As proposed at <https://gcc.gnu.org/ml/gcc/2014-11/msg00014.html>,
this patch enables -fextended-identifiers by default for all standard
versions including this feature (all C++ versions, C99 and above for
C, but not C90 / C94 / gnu89 / preprocessing assembler).  It adds a
couple of tests for areas where I previously noted testsuite coverage
for extended identifiers was lacking, removes -fextended-identifiers
from existing tests, adds -g to various such tests to verify that
extended identifiers don't break debug info generation and removes the
test that was only there to verify that the feature was off by
default.

The current state of the feature may not correspond exactly to any
particular checklist from 2004/5 (see bug 9449) of what was wanted
before enabling the feature by default, but I don't think it's any
worse than plenty of other features supported by default before every
corner case is fully functional, and think problems can readily be
fixed incrementally.

The following aspects of extended identifiers could still do with more
work (and should be straightforward):

* C -aux-info (output should use UCNs).

* ObjC -gen-decls (output should use UCNs; associated diagnostics from
  the ObjC front end should use extended characters or UCNs as
  appropriate to the locale, via using %qE or identifier_to_locale).

* Use DW_AT_use_UTF8 in DWARF-3 debug info for compilation units built
  with extended identifiers enabled (or unconditionally).

* cpplib diagnostics (outputting characters or UCNs as appropriate
  depending on the locale, as done for identifiers in non-cpplib
  diagnostics).

* C++ test for UCN linking with C and extern "C".

* Check GDB support / file issues for support if needed.

* Actual UTF-8 in identifiers (?).  (Be careful about not affecting
  performance for the normal fast path of lexing identifiers, if
  possible.)

The following may be trickier:

* cpplib spelling preservation (required to diagnose macro
  redefinition with different spellings of the same identifier in the
  definition or argument names; different spellings of the name of the
  macro itself are OK, however; also required for correct handling of
  multiple stringizing in C++); correct output for -d (UCNs), DWARF
  debug info for macros (UCNs), PCH and PCH tests.  (Spelling
  preservation is the issue that needs fixing to remove references to
  corner cases in the documentation of -std=c99 and -std=c11 and in
  c99status.html.)  The idea would be to add a second pointer to
  cpp_identifier that stores the original spelling (whether for
  extended identifiers only, or for all identifiers); this does not
  enlarge cpp_token because the resulting larger cpp_identifier
  structure is no bigger than cpp_string.

* C++ translation of extended characters (including $@` and various
  control characters) to UCNs in phase 1 (note diagnostics thus
  needed, but not for C++11, for control characters in strings /
  character constants as those UCNs invalid); a likely implementation
  approach is to do translation when identifiers / strings / character
  constants are lexed, together with errors for stray $@` / control
  characters in program as not being valid UCNs in identifiers ($ only
  if not accepted in identifiers); note that this translation should
  not take place inside raw string literals.

Bootstrapped with no regressions on x86_64-unknown-linux-gnu.

libcpp:
	PR preprocessor/9449
	* init.c (lang_defaults): Enable extended identifiers for C++ and
	C99-based standards.

gcc:
	PR preprocessor/9449
	* doc/cpp.texi (Character sets, Tokenization)
	(Implementation-defined behavior): Don't refer to UCNs in
	identifiers requiring -fextended-identifiers.
	* doc/cppopts.texi (-fextended-identifiers): Document as enabled
	by default for C99 and later and C++.
	* doc/invoke.texi (-std=c99, -std=c11): Don't refer to extended
	identifiers needing -fextended-identifiers.

gcc/testsuite:
	PR preprocessor/9449
	* lib/target-supports.exp (check_effective_target_ucn_nocache):
	Don't use -fextended-identifiers.
	* c-c++-common/cpp/normalize-3.c, c-c++-common/cpp/ucnid-2011-1.c,
	g++.dg/cpp/ucn-1.C, g++.dg/cpp/ucnid-1.C, g++.dg/other/ucnid-1.C,
	gcc.dg/cpp/normalize-1.c, gcc.dg/cpp/normalize-2.c,
	gcc.dg/cpp/normalize-4.c: Don't use -fextended-identifiers.
	* gcc.dg/cpp/ucnid-1.c: Don't use -fextended-identifiers.  Use
	-g3.
	* gcc.dg/cpp/ucnid-10.c, gcc.dg/cpp/ucnid-2.c,
	gcc.dg/cpp/ucnid-3.c, gcc.dg/cpp/ucnid-4.c, gcc.dg/cpp/ucnid-5.c,
	gcc.dg/cpp/ucnid-7.c, gcc.dg/cpp/ucnid-9.c,
	gcc.dg/cpp/warn-normalized-1.c, gcc.dg/cpp/warn-normalized-2.c,
	gcc.dg/cpp/warn-normalized-3.c: Don't use -fextended-identifiers.
	* gcc.dg/ucnid-1.c, gcc.dg/ucnid-2.c, gcc.dg/ucnid-3.c,
	gcc.dg/ucnid-4.c, gcc.dg/ucnid-5.c, gcc.dg/ucnid-6.c: Don't use
	-fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-7.c, gcc.dg/ucnid-8.c: Don't use
	-fextended-identifiers.
	* gcc.dg/ucnid-9.c: Don't use -fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-10.c: Don't use -fextended-identifiers.
	* gcc.dg/ucnid-11.c, gcc.dg/ucnid-12.c: Don't use
	-fextended-identifiers.  Use -g.
	* gcc.dg/ucnid-13.c: Don't use -fextended-identifiers.
	* gcc.dg/cpp/ucnid-8.c: Remove test.
	* gcc.dg/cpp/ucnid-10.c, gcc.dg/ucnid-14.c: New tests.

From-SVN: r217144
2014-11-05 16:19:10 +00:00
Alan Modra 19a9ba64e7 gengtype.h (obstack_chunk_alloc, [...]): Remove cast.
gcc/
	* gengtype.h (obstack_chunk_alloc, obstack_chunk_free): Remove cast.
	* coretypes.h (obstack_chunk_alloc, obstack_chunk_free): Likewise.
	(gcc_obstack_init): Use obstack_specify_allocation in place of
	_obstack_begin.
	* genautomata.c (next_sep_el): Cast result of obstack_base to (char *).
	(regexp_representation): Likewise.
	* godump.c (go_output_type): Likewise.
gcc/java/
	* mangle.c (finish_mangling): Cast result of obstack_base to (char *).
	* typeck.c (build_java_argument_signature): Likewise.
	(build_java_signature): Likewise.
gcc/objc/
	* objc-encoding.c (encode_array): Cast result of obstack_base.
	(encode_type): Likewise.
libcpp/
	* symtab.c (ht_create): Use obstack_specify_allocation in place of
	_obstack_begin.
	* files.c (_cpp_init_files): Likewise.
	* init.c (cpp_create_reader): Likewise.
	* identifiers.c (_cpp_init_hashtable): Likewise.

From-SVN: r216539
2014-10-22 12:11:31 +10:30
Manuel López-Ibáñez 3aac09524b line-map.h (linemap_location_from_macro_expansion_p): const struct line_maps * argument.
libcpp/ChangeLog:

2014-10-14  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* include/line-map.h (linemap_location_from_macro_expansion_p):
	const struct line_maps * argument.
	(linemap_position_for_line_and_column): const struct line_map *
	argument.
	* line-map.c (linemap_add_macro_token): Use correct argument name
	in comment.
	(linemap_position_for_line_and_column): const struct line_map *
	argument.
	(linemap_macro_map_loc_to_def_point): Fix comment. Make static.
	(linemap_location_from_macro_expansion_p): const struct line_maps *
	argument.
	(linemap_resolve_location): Fix argument names in comment.

From-SVN: r216205
2014-10-14 14:45:36 +00:00
Bill Schmidt 0ccaaab0e3 lex.c (search_line_fast): Add new version to be used for Power8 and later targets when Altivec is enabled.
2014-10-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* lex.c (search_line_fast): Add new version to be used for Power8
	and later targets when Altivec is enabled.  Restrict the existing
	Altivec version to big-endian systems so that lvsr is not used on
	little endian, where it is deprecated.  Remove LE-specific code
	from the now-BE-only version.

From-SVN: r215873
2014-10-03 20:06:38 +00:00
Bernd Edlinger dc257367bb charset.c (convert_no_conversion): Reallocate memory with 25% headroom.
2014-10-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
            Jeff Law  <law@redhat.com>

        * charset.c (convert_no_conversion): Reallocate memory with 25%
        headroom.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r215785
2014-10-02 00:06:28 +00:00
Edward Smith-Rowland a15f7cb8b8 Implement SD-6: SG10 Feature Test Recommendations
2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* internal.h (lexer_state, spec_nodes): Add in__has_include__.
	* directives.c: Support __has_include__ builtin.
	* expr.c (parse_has_include): New function to parse __has_include__
	builtin; (eval_token()): Use it.
	* files.c (_cpp_has_header()): New funtion to look for header;
	(open_file_failed()): Not an error to not find a header file for
	__has_include__.
	* identifiers.c (_cpp_init_hashtable()): Add entry for __has_include__.
	* pch.c (cpp_read_state): Lookup __has_include__.
	* traditional.c (enum ls, _cpp_scan_out_logical_line()): Walk through
	__has_include__ statements.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* c-cppbuiltin.c (c_cpp_builtins()): Define language feature
	macros and the __has_header macro.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* include/bits/basic_string.h: Add __cpp_lib feature test macro.
	* include/bits/stl_algobase.h: Ditto.
	* include/bits/stl_function.h: Ditto.
	* include/bits/unique_ptr.h: Ditto.
	* include/std/chrono: Ditto.
	* include/std/complex: Ditto.
	* include/std/iomanip: Ditto.
	* include/std/shared_mutex: Ditto.
	* include/std/tuple: Ditto.
	* include/std/type_traits: Ditto.
	* include/std/utility: Ditto.
	* testsuite/experimental/feat-cxx14.cc: New.
	* testsuite/experimental/feat-lib-fund.cc: New.
	* testsuite/20_util/declval/requirements/1_neg.cc: Adjust.
	* testsuite/20_util/duration/literals/range.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg1.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg2.cc: Adjust.
	* testsuite/20_util/duration/requirements/typedefs_neg3.cc: Adjust.
	* testsuite/20_util/make_signed/requirements/typedefs_neg.cc: Adjust.
	* testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/get_neg.cc: Adjust.
	* testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc:
	Adjust.

2014-10-01  Edward Smith-Rowland  <3dw4rd@verizon.net>

	Implement SD-6: SG10 Feature Test Recommendations
	* g++.dg/cpp1y/feat-cxx11-neg.C: New.
	* g++.dg/cpp1y/feat-cxx11.C: New.
	* g++.dg/cpp1y/feat-cxx14.C: New.
	* g++.dg/cpp1y/feat-cxx98.C: New.
	* g++.dg/cpp1y/feat-cxx98-neg.C: New.
	* g++.dg/cpp1y/phoobhar.h: New.
	* g++.dg/cpp1y/testinc/phoobhar.h: New.

From-SVN: r215752
2014-10-01 11:49:23 +00:00
Bernd Edlinger cc811a8ae6 re PR preprocessor/58893 (<command-line>:0:0: internal compiler error: Segmentation fault)
2014-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR preprocessor/58893
	* errors.c (cpp_diagnostic): Fix possible out of bounds access.
	* files.c (_cpp_stack_include): Initialize src_loc for IT_CMDLINE.

testsuite:
2014-09-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR preprocessor/58893
	* gcc.dg/pr58893.c: New test case.
	* gcc.dg/pr58893-0.h: New include.

From-SVN: r215730
2014-09-30 16:08:53 +00:00
Marek Polacek 083e891e69 re PR c/61405 (Not emitting "enumeration value not handled in switch" warning for bit-field enums)
PR c/61405
	PR c/53874
gcc/
	* asan.c (maybe_instrument_call): Add default case.
	* ipa-pure-const.c (special_builtin_state): Likewise.
	* predict.c (expr_expected_value_1): Likewise.
	* lto-streamer-out.c (write_symbol): Initialize variable.
gcc/c-family/
	* c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
gcc/c/
	* c-parser.c: Don't define CPP_KEYWORD.
	(c_parser_switch_statement): Pass original type to c_finish_case.
	* c-tree.h (c_finish_case): Update declaration.
	* c-typeck.c (c_finish_case): Add TYPE parameter.  Pass it
	conditionally to c_do_switch_warnings.
gcc/cp/
	* semantics.c (finish_switch_cond): Call unlowered_expr_type.
	* tree.c (bot_manip): Add default case.
	* parser.c (cp_parser_primary_expression): Cast the controlling
	expression of a switch to an int.
	(cp_parser_unqualified_id): Likewise.
gcc/testsuite/
	* c-c++-common/pr53874.c: New test.
	* c-c++-common/pr61405.c: New test.
libcpp/
	* include/cpplib.h (enum cpp_ttype): Define CPP_KEYWORD.

From-SVN: r215559
2014-09-24 17:23:56 +00:00
Jan Hubicka d87fc69983 charset.c (conversion): Rename to ...
* charset.c (conversion): Rename to ...
	(cpp_conversion): ... this one; update.
	* files.c (file_hash_entry): Rename to ...
	(cpp_file_hash_entry): ... this one ; update.

From-SVN: r215482
2014-09-22 19:43:02 +00:00
Marek Polacek 909eb89ca5 re PR c/61854 (Warning single-line comment for -std=c89?)
PR c/61854
libcpp/
	* init.c (struct lang_flags): Remove cplusplus_comments.
	(cpp_set_lang): Likewise.
	(post_options): Likewise.
	* lex.c (_cpp_lex_direct): Disallow C++ style comments in C90/C94.
testsuite/
	* gcc.dg/cpp/pr61854-1.c: New test.
	* gcc.dg/cpp/pr61854-2.c: New test.
	* gcc.dg/cpp/pr61854-3.c: New test.
	* gcc.dg/cpp/pr61854-3.h: New test.
	* gcc.dg/cpp/pr61854-4.c: New test.
	* gcc.dg/cpp/pr61854-5.c: New test.
	* gcc.dg/cpp/pr61854-6.c: New test.
	* gcc.dg/cpp/pr61854-7.c: New test.
	* gcc.dg/cpp/pr61854-c90.c: New test.
	* gcc.dg/cpp/pr61854-c94.c: New test.

From-SVN: r215339
2014-09-17 21:49:46 +00:00
Manuel López-Ibáñez 1ef33fd4cd invoke.texi (Wnormalized=): Update.
gcc/ChangeLog:

2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* doc/invoke.texi (Wnormalized=): Update.

libcpp/ChangeLog:

2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* include/cpplib.h (struct cpp_options): Declare warn_normalize as
	int instead of enum.

gcc/c-family/ChangeLog:

2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* c.opt	(Wnormalized): New.
	(Wnormalized=): Use Enum and Reject Negative.
	* c-opts.c (c_common_handle_option): Do not handle Wnormalized here.

gcc/testsuite/ChangeLog:

2014-09-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* gcc.dg/cpp/warn-normalized-3.c: Delete useless dg-prune-output.

From-SVN: r215093
2014-09-09 21:41:43 +00:00
Manuel López-Ibáñez 2b71f4a4f8 options.texi: Document that Var and Init are required if CPP is given.
gcc/ChangeLog:

2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* doc/options.texi: Document that Var and Init are required if CPP
	is given.
	* optc-gen.awk: Require Var and Init if CPP is given.
	* common.opt (Wpedantic): Use Init.

libcpp/ChangeLog:

2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* macro.c (replace_args): Use cpp_pedwarning, cpp_warning and
	CPP_W flags.
	* include/cpplib.h: Add CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
	* init.c (cpp_create_reader): Do not init to -1 here.
	* expr.c (num_binary_op): Use cpp_pedwarning.

gcc/c-family/ChangeLog:

2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
	Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
	(Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
	and Init.
	* c-opts.c (c_common_handle_option): Do not handle here.
	(sanitize_cpp_opts): Likewise.
	* c-common.c (struct reason_option_codes_t): Handle
	CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.

gcc/testsuite/ChangeLog:

2014-09-04  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	* gcc.dg/cpp/endif-pedantic2.c: More general options do not
	override specific ones, but specific ones do.

From-SVN: r214904
2014-09-04 15:13:40 +00:00