]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/ChangeLog
substring-locations: add class format_string_diagnostic_t
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
1 2018-09-17 David Malcolm <dmalcolm@redhat.com>
2
3 * c-format.c (format_warning_at_char): Update for introduction of
4 format_string_diagnostic_t.
5 (format_type_warning): Likewise.
6
7 2018-09-17 Martin Jambor <mjambor@suse.cz>
8
9 PR c/63886
10 * c.opt (Wabsolute-value): New.
11
12 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
13
14 * c-common.c (complete_flexible_array_elts): New helper function.
15 * c-common.h (complete_flexible_array_elts): Declare.
16
17 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
18
19 * c-common.c (braced_list_to_string): Remove eval parameter.
20 Add some more checks. Always create zero-terminated STRING_CST.
21 * c-common.h (braced_list_to_string): Adjust prototype.
22
23 2018-08-27 David Malcolm <dmalcolm@redhat.com>
24
25 PR 87091
26 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
27 to a tri-state.
28 (maybe_suggest_missing_token_insertion): Likewise.
29 (maybe_add_include_fixit): Add param "override_location". If set,
30 and source-printing is enabled, then override the rich_location's
31 primary location with that of the insertion point for the fix-it
32 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
33 * c-common.h (extern void maybe_add_include_fixit): Add bool
34 param.
35 * c-format.c (selftest::test_type_mismatch_range_labels): Update
36 for conversion of show_caret_p to a tri-state.
37 * c-warn.c (warn_for_restrict): Likewise.
38 * known-headers.cc
39 (suggest_missing_header::~suggest_missing_header): Update call to
40 maybe_add_include_fixit to suggest overriding the location, as it
41 is for a note.
42
43 2018-08-27 Martin Liska <mliska@suse.cz>
44
45 * c-common.c (check_function_restrict): Use new function
46 fndecl_built_in_p and remove check for FUNCTION_DECL if
47 possible.
48 (check_builtin_function_arguments): Likewise.
49 (reject_gcc_builtin): Likewise.
50 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
51
52 2018-08-26 Marek Polacek <polacek@redhat.com>
53
54 PR c++/87029, Implement -Wredundant-move.
55 * c.opt (Wredundant-move): New option.
56
57 2018-08-21 Marek Polacek <polacek@redhat.com>
58
59 PR c++/86981, Implement -Wpessimizing-move.
60 * c.opt (Wpessimizing-move): New option.
61
62 2018-08-20 David Malcolm <dmalcolm@redhat.com>
63
64 PR other/84889
65 * c-attribs.c (common_handle_aligned_attribute): Add
66 auto_diagnostic_group instance.
67 * c-indentation.c (warn_for_misleading_indentation): Likewise.
68 * c-opts.c (c_common_post_options): Likewise.
69 * c-warn.c (warn_logical_not_parentheses): Likewise.
70 (warn_duplicated_cond_add_or_warn): Likewise.
71 (warn_for_multistatement_macros): Likewise.
72
73 2018-08-20 Nathan Sidwell <nathan@acm.org>
74
75 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
76 access.
77
78 2018-08-17 Nathan Sidwell <nathan@acm.org>
79
80 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
81 field.
82 (laxy_hex_fp_value_count): Make unsigned.
83 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
84 manipulate the macro.
85 (builtin_defin_with_hex_fp_value): Adjust callback name, use
86 cpp_define_lazily.
87
88 2018-08-17 David Malcolm <dmalcolm@redhat.com>
89
90 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
91 (gcc_dump_printf_length_specs): New.
92 (gcc_dump_printf_flag_pairs): New.
93 (gcc_dump_printf_flag_specs): New.
94 (gcc_dump_printf_char_table): New.
95 (format_types_orig): Add entry for "gcc_dump_printf".
96 (init_dynamic_diag_info): Set up length_char_specs and
97 conversion_specs for gcc_dump_printf_format_type.
98 (handle_format_attribute): Handle gcc_dump_printf_format_type.
99
100 2018-08-17 Nathan Sidwell <nathan@acm.org>
101
102 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
103
104 * c-ada-spec.c: Don't #include "cpp-id-data.h"
105 * c-cppbuiltin.c: Likewise.
106
107 2018-08-17 Martin Liska <mliska@suse.cz>
108
109 * c.opt: Remove Warn, Init and Report for options with
110 Ignore/Deprecated flag. Warning is done automatically for
111 Deprecated flags.
112
113 2018-08-16 David Malcolm <dmalcolm@redhat.com>
114
115 PR c++/70693
116 * c-common.c (selftest::c_family_tests): Call
117 selftest::c_indentation_c_tests.
118 * c-common.h (selftest::c_indentation_c_tests): New decl.
119 * c-indentation.c: Include "selftest.h".
120 (next_tab_stop): Add "tab_width" param, rather than accessing
121 cpp_opts.
122 (get_visual_column): Likewise. Clarify comment. Bulletproof
123 against reading past the end of the line.
124 (get_first_nws_vis_column): Add "tab_width" param.
125 (detect_intervening_unindent): Likewise.
126 (should_warn_for_misleading_indentation): Read tab width from
127 cpp_opts and pass around.
128 (selftest::test_next_tab_stop): New test.
129 (selftest::assert_get_visual_column_succeeds): New function.
130 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
131 (selftest::assert_get_visual_column_fails): New function.
132 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
133 (selftest::test_get_visual_column): New test.
134 (selftest::c_indentation_c_tests): New function.
135
136 2018-08-16 Nathan Sidwell <nathan@acm.org>
137
138 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
139 (store_ada_macro): Likewise.
140 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
141 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
142
143 2018-08-15 David Malcolm <dmalcolm@redhat.com>
144
145 * c-format.c: Include "selftest-diagnostic.h" and
146 "gcc-rich-location.h".
147 (format_warning_at_char): Pass NULL for new label params of
148 format_warning_va.
149 (class indirection_suffix): New class.
150 (class range_label_for_format_type_mismatch): New class.
151 (format_type_warning): Move logic for generating "*" suffix to
152 class indirection_suffix. Create "fmt_label" and "param_label"
153 to show their types, and pass them to the
154 format_warning_at_substring calls.
155 (selftest::test_type_mismatch_range_labels): New test.
156 (selftest::c_format_c_tests): Call it.
157
158 2018-08-13 Martin Sebor <msebor@redhat.com>
159
160 PR tree-optimization/71625
161 * c-common.c (braced_list_to_string): New function.
162 * c-common.h (braced_list_to_string): Declare it.
163
164 2018-08-08 Nathan Sidwell <nathan@acm.org>
165
166 * c-common.c (try_to_locate_new_include_inertion_point): Use
167 linemap_included_from_linemap.
168 * c-lex.c (fe_file_change): Use linemap_included_from.
169 * c-ppoutput.c (pp_file_change): Likewise.
170
171 2018-08-01 Martin Sebor <msebor@redhat.com>
172
173 PR tree-optimization/86650
174 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
175 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
176 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
177 * c-format.h (T89_G): Update to be "gimple *" rather than
178 "gcall *".
179 (local_gcall_ptr_node): Rename...
180 (local_gimple_ptr_node): ...to this.
181
182 2018-07-31 David Malcolm <dmalcolm@redhat.com>
183
184 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
185 table entries for gcc_diag_char_table, and the 'Z' entry from
186 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
187 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
188 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
189 adding missing "Z" for this table. Remove erroneous "G" and "K"
190 entries.
191 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
192 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
193 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
194
195 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
196
197 * c-common.c (speculation_safe_resolve_call): New function.
198 (speculation_safe_resolve_params): New function.
199 (speculation_safe_resolve_return): New function.
200 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
201 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
202 __HAVE_SPECULATION_SAFE_VALUE.
203
204 2018-07-20 David Malcolm <dmalcolm@redhat.com>
205
206 * c-common.c (c_cpp_error): Remove redundant "line_table"
207 parameter from call to rich_location::set_range.
208 (maybe_suggest_missing_token_insertion): Likewise.
209
210 2018-07-20 Martin Sebor <msebor@redhat.com>
211
212 PR middle-end/82063
213 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
214
215 2018-07-20 Martin Sebor <msebor@redhat.com>
216
217 PR middle-end/82063
218 * c-common.h (c_common_handle_option): Change function argument
219 to HOST_WIDE_INT.
220 * c-opts.c (c_common_init_options): Same.
221 (c_common_handle_option): Same. Remove special handling of
222 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
223 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
224 options to take a HOST_WIDE_INT argument and accept a byte-size
225 suffix. Initialize.
226 (-Wvla-larger-than): Same.
227 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
228 (-Wno-vla-larger-than): Same.
229
230 2018-07-12 Jakub Jelinek <jakub@redhat.com>
231
232 * c-attribs.c (c_common_attribute_table): Add
233 "omp declare target implicit" attribute.
234
235 2018-07-12 Richard Biener <rguenther@suse.de>
236
237 PR c/86453
238 * c-attribs.c (handle_packed_attribute): Do not build a variant
239 type with TYPE_PACKED, instead ignore the attribute if we may
240 not apply to the original type.
241
242 2018-07-10 Jakub Jelinek <jakub@redhat.com>
243
244 PR c++/86443
245 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
246 to contain TREE_LIST for both the original class iterator and the
247 "last" helper var.
248
249 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
250
251 * c-ada-spec.c (to_ada_name): Remove index parameter.
252 (pp_ada_tree_identifier): Likewise.
253 (dump_ada_macros): Adjust call to to_ada_name.
254 (struct overloaded_name_hash): Delete.
255 (struct overloaded_name_hasher): Likewise.
256 (overloaded_names): Likewise.
257 (compute_overloading_index): Likewise.
258 (dump_ada_decl_name): Do not call compute_overloading_index and
259 adjust calls to pp_ada_tree_identifier.
260 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
261 (dump_ada_import): Add spc parameter and switch to aspect syntax.
262 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
263 (dump_ada_enum_type): Remove type and display_convention parameters.
264 Adjust calls to pp_ada_tree_identifier.
265 (dump_ada_node): Likewise and for dump_ada_structure.
266 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
267 and tidy up.
268 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
269 syntax.
270 (print_constructor): Adjust call to pp_ada_tree_identifier.
271 (print_destructor): Likewise.
272 (dump_ada_declaration): Switch to aspect syntax.
273 (dump_ada_structure): Likewise and tidy up. Replace display_convention
274 parameter with nested parameter.
275 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
276 (dump_ada_specs): Do not delete overloaded_names table.
277
278 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
279
280 PR target/86324
281 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
282 target hook.
283
284 2018-07-05 Nathan Sidwell <nathan@acm.org>
285
286 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
287 NO_IMPLICIT_EXTERN_C.
288
289 2018-06-28 Martin Liska <mliska@suse.cz>
290
291 * cppspec.c: Include opt-suggestions.h.
292
293 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
294 Thomas Schwinge <thomas@codesourcery.com>
295 Cesar Philippidis <cesar@codesourcery.com>
296
297 * c-pragma.h (enum pragma_omp_clause): Add
298 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
299 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
300
301 2018-06-20 Jakub Jelinek <jakub@redhat.com>
302
303 PR c++/86210
304 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
305 comment.
306
307 2018-06-18 Martin Sebor <msebor@redhat.com>
308
309 PR middle-end/85602
310 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
311 nonstring.
312
313 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
314
315 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
316
317 2018-06-13 Jason Merrill <jason@redhat.com>
318
319 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
320 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
321 handling.
322
323 PR c++/86094 - wrong code with defaulted move ctor.
324 * c-opts.c (c_common_post_options): Bump the current ABI version to
325 13. Set warn_abi_version and flag_abi_compat_version to the current
326 version rather than 0. Fix defaulting flag_abi_compat_version from
327 warn_abi_version.
328
329 2018-06-12 Martin Sebor <msebor@redhat.com>
330
331 PR c/85931
332 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
333 sizeof source and destination yields the same value.
334
335 2018-06-12 Martin Liska <mliska@suse.cz>
336
337 * c.opt: Make MPX-related options as Deprecated.
338
339 2018-06-08 David Malcolm <dmalcolm@redhat.com>
340
341 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
342 rather than 0.
343
344 2018-06-08 Martin Liska <mliska@suse.cz>
345
346 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
347 for MPX (macros, related functions, fields in cgraph_node, ...).
348 (handle_bnd_legacy): Likewise.
349 (handle_bnd_instrument): Likewise.
350 * c.opt: Likewise.
351
352 2018-06-06 Jakub Jelinek <jakub@redhat.com>
353
354 PR c++/86068
355 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
356 __cpp_transactional_memory to 201500 instead of 210500.
357
358 2018-06-06 Jason Merrill <jason@redhat.com>
359
360 PR c++/85710 - ICE with -Wmemset-elt-size.
361 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
362
363 2018-06-01 Jason Merrill <jason@redhat.com>
364
365 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
366 201703.
367
368 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
369
370 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
371 declaration for a typedef independently of whether the declaration of
372 the subtype is generated.
373
374 2018-05-31 Martin Sebor <msebor@redhat.com>
375
376 PR c/82063
377 * c.opt (-Wno-alloc-size-larger-than): New option.
378
379 2018-04-22 David Pagan <dave.pagan@oracle.com>
380
381 PR c/55976
382 * c-opts.c (c_common_post_options): Set default for warn_return_type
383 for C++/C++ with ObjC extensions only. For C, makes it possible to
384 differentiate between default (no option), -Wreturn-type, and
385 -Wno-return-type.
386
387 2018-05-29 Jason Merrill <jason@redhat.com>
388
389 * c.opt (Winit-list-lifetime): New flag.
390
391 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
392
393 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
394 splay_tree_delete_pointers.
395
396 2018-05-26 Jakub Jelinek <jakub@redhat.com>
397
398 PR bootstrap/85921
399 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
400 noinline variable to workaround broken kernel headers.
401
402 2018-05-18 Jason Merrill <jason@redhat.com>
403
404 * c.opt (Wdeprecated-copy): New flag.
405
406 2018-05-17 Martin Liska <mliska@suse.cz>
407
408 * c-warn.c (overflow_warning): Do not use
409 space in between 'G_' and '('.
410
411 2018-05-09 Jason Merrill <jason@redhat.com>
412
413 * c-common.c (valid_array_size_p): Add complain parameter.
414 * c-common.h: ...which defaults to true.
415
416 2018-05-11 Jakub Jelinek <jakub@redhat.com>
417
418 PR c/85696
419 * c-omp.c (c_omp_predetermined_sharing): Return
420 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
421
422 2018-05-11 Martin Liska <mliska@suse.cz>
423
424 PR sanitizer/85556
425 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
426 TREE_LIST values.
427
428 2018-05-10 Jakub Jelinek <jakub@redhat.com>
429
430 PR c++/85662
431 * c-common.h (fold_offsetof_1): Removed.
432 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
433 CTX argument defaulted to ERROR_MARK.
434 * c-common.c (fold_offsetof_1): Renamed to ...
435 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
436 argument, convert the pointer constant to TYPE and use size_binop
437 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
438 a pointer type. Adjust recursive calls.
439
440 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
441
442 PR c++/85400
443 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
444
445 2018-05-07 Nathan Sidwell <nathan@acm.org>
446
447 * c.opt (ffor-scope): Remove functionality, issue warning.
448
449 2018-05-03 Nathan Sidwell <nathan@acm.org>
450
451 * c.opt (ffriend-injection): Remove functionality, issue warning.
452
453 2018-05-01 David Malcolm <dmalcolm@redhat.com>
454
455 PR c/84258
456 * c-format.c (struct format_check_results): Add field
457 "number_non_char".
458 (check_format_info): Initialize it, and warn if encountered.
459 (check_format_arg): Distinguish between wide char and
460 everything else when detecting arrays of non-char.
461
462 2018-04-30 David Malcolm <dmalcolm@redhat.com>
463
464 * c-format.c (get_corrected_substring): Update for
465 location_get_source_line returning a char_span. Use a char_span
466 when handling the prefix of the correction.
467 * c-indentation.c (get_visual_column): Update for
468 location_get_source_line returning a char_span.
469 (get_first_nws_vis_column): Likewise.
470
471 2018-03-29 David Malcolm <dmalcolm@redhat.com>
472
473 PR c++/84269
474 * known-headers.cc (get_stdlib_header_for_name): Add various names
475 from <assert.h>, <string.h>, and <memory.h>; add more names from
476 <stdio.h>.
477
478 2018-03-27 Jakub Jelinek <jakub@redhat.com>
479
480 PR c++/85061
481 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
482 get_base_address of the second operand is a VAR_P, rather than the
483 operand itself, and use gcc_checking_assert instead of gcc_assert.
484
485 2018-03-23 Marek Polacek <polacek@redhat.com>
486
487 PR c++/85045
488 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
489 <case RDIV_EXPR>: Tweak condition.
490
491 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
492
493 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
494
495 2018-03-16 Jakub Jelinek <jakub@redhat.com>
496
497 PR c/84909
498 * c-warn.c (conversion_warning): Replace "to to" with "to" in
499 diagnostics.
500
501 PR c/84910
502 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
503 diagnostics.
504
505 2018-03-16 Richard Biener <rguenther@suse.de>
506
507 PR c/84873
508 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
509 unshare the possibly folded expression.
510
511 2018-03-15 Richard Biener <rguenther@suse.de>
512
513 PR c/84873
514 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
515
516 2018-03-13 Martin Sebor <msebor@redhat.com>
517
518 PR tree-optimization/84725
519 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
520 with all three narrow character types, including their qualified forms.
521
522 2018-03-12 Martin Sebor <msebor@redhat.com>
523
524 PR tree-optimization/83456
525 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
526 Restore checking of bounded built-in functions.
527 (check_function_arguments): Also return the result
528 of warn_for_restrict.
529 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
530 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
531
532 2018-03-02 Marek Polacek <polacek@redhat.com>
533
534 PR c++/84171
535 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
536 is erroneous.
537
538 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
539
540 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
541 function".
542
543 2018-03-01 Marek Polacek <polacek@redhat.com>
544
545 PR c++/84639
546 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
547 alignment in computation.
548
549 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
550
551 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
552 <REAL_TYPE>: Deal specifically with _Float128/__float128.
553
554 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
555
556 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
557 (is_char_array): Take a type instead of a declaration.
558 (dump_ada_array_type): Likewise.
559 (is_simple_enum): Minor tweak.
560 (dump_ada_enum_type): New function extracted from...
561 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
562 <INTEGER_TYPE>: Remove unreachable code.
563 <RECORD_TYPE>: Likewise. Minor tweaks.
564 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
565 <ENUMERAL_TYPE>: New case.
566 <RECORD_TYPE>: Factor out common code.
567 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
568 Minor tweaks. Deal with enumeral types.
569 (dump_ada_structure): Minor tweaks.
570
571 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
572
573 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
574 address for incomplete structures.
575 (dump_forward_type): Do not bail out for incomplete structures.
576 (dump_ada_declaration): Do not special-case incomplete structures
577 for subtypes. Dump them as null records for types.
578
579 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
580
581 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
582 (is_char_array): Fix formatting.
583 (dump_template_types): Likewise.
584 (dump_generic_ada_node): Rename into...
585 (dump_ada_node): ...this.
586 <POINTER_TYPE>: Remove superfluous space. Use generic address for
587 incomplete structures and not for empty structures. Do not use it
588 when forward declarations are needed.
589 (dump_forward_type): New function.
590 (dump_nested_types): Remove FORWARD parameter. Do not consider
591 TREE_VISITED and do not generate a forward declaration. Only dump
592 original nested types for nested declaration.
593 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
594 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
595 <RECORD_TYPE>: Do not consider TREE_VISITED.
596 (dump_ada_declaration): Use booleans and fix formatting throughout.
597 <TYPE_DECL>: Skip incomplete structures and not empty structures.
598 Call dump_forward_type instead of dump_nested_types for a typedef.
599 Remove superfluous check and adjust call to dump_nested_types.
600 <POINTER_TYPE>: Call dump_forward_type and fall through.
601 (dump_ada_struct_decl): Rename into...
602 (dump_ada_structure): ...this. Do not special-case empty structures.
603
604 2018-02-27 Martin Sebor <msebor@redhat.com>
605
606 PR c++/83871
607 * c.opt (-Wmissing-attributes): New option.
608
609 2018-02-21 Martin Liska <mliska@suse.cz>
610
611 * c.opt (Wcatch-value=): Add IntegerRange.
612
613 2018-02-15 Jason Merrill <jason@redhat.com>
614
615 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
616
617 2018-02-09 Nathan Sidwell <nathan@acm.org>
618
619 PR c/84293
620 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
621 arg.
622 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
623 arg. Adjust.
624
625 2018-02-09 Martin Sebor <msebor@redhat.com>
626
627 PR lto/84212
628 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
629 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
630 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
631 (-Wstrict-overflow, -Wsuggest-attribute): Same.
632 (-Wuninitialized): Same.
633
634 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
635
636 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
637 keyword for components.
638
639 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
640
641 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
642
643 2018-02-02 Julia Koval <julia.koval@intel.com>
644
645 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
646
647 2018-01-29 Marek Polacek <polacek@redhat.com>
648
649 PR c/83966
650 * c-format.c (check_function_format): Check current_function_decl.
651
652 2018-01-27 Jakub Jelinek <jakub@redhat.com>
653
654 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
655 argument.
656 (LAZY_HEX_FP_VALUES_CNT): Define.
657 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
658 values rather than just 12.
659 (builtin_define_with_hex_fp_value): Likewise.
660
661 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
662
663 PR other/70268
664 * c.opt (-fmacro-prefix-map): New option.
665 * c-opts.c (c_common_handle_option): Handle it.
666 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
667 * c-ppoutput.c (init_pp_output): Likewise.
668
669 2018-01-17 David Malcolm <dmalcolm@redhat.com>
670
671 PR c++/83814
672 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
673
674 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
675
676 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
677 Skip 'f' and 'F' characters if it is true.
678 (store_ada_macro): Minor tweak.
679 (dump_ada_macros) <CPP_COMMENT>: Likewise.
680 <CPP_WSTRING>: Likewise.
681 <CPP_STRING>: Output '&' in the buffer if not the first string.
682 <CPP_NUMBER>: Adjust calls to dump_number.
683
684 2018-01-10 David Malcolm <dmalcolm@redhat.com>
685
686 PR c++/43486
687 * c-common.c: Include "selftest.h".
688 (get_atomic_generic_size): Perform the test for integral type
689 before the range test for any integer constant, fixing indentation
690 of braces. Call fold_for_warn before testing for an INTEGER_CST.
691 (reject_gcc_builtin): Strip any location wrapper from EXPR.
692 (selftest::test_fold_for_warn): New function.
693 (selftest::c_common_c_tests): New function.
694 (selftest::c_family_tests): Call it, and
695 selftest::c_pretty_print_c_tests.
696 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
697 * c-format.c (check_format_arg): Convert VAR_P check to a
698 fold_for_warn.
699 * c-pretty-print.c: Include "selftest.h".
700 (pp_c_cast_expression): Don't print casts for location wrappers.
701 (selftest::assert_c_pretty_printer_output): New function.
702 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
703 (selftest::test_location_wrappers): New function.
704 (selftest::c_pretty_print_c_tests): New function.
705 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
706
707 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
708 Alan Hayward <alan.hayward@arm.com>
709 David Sherwood <david.sherwood@arm.com>
710
711 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
712
713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
714 Alan Hayward <alan.hayward@arm.com>
715 David Sherwood <david.sherwood@arm.com>
716
717 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
718 as polynomial.
719
720 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
721 Alan Hayward <alan.hayward@arm.com>
722 David Sherwood <david.sherwood@arm.com>
723
724 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
725 (convert_vector_to_array_for_subscript): Handle polynomial
726 TYPE_VECTOR_SUBPARTS.
727 (c_common_type_for_mode): Check valid_vector_subparts_p.
728 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
729 VECTOR_CST_NELTS.
730
731 2018-01-03 Jakub Jelinek <jakub@redhat.com>
732
733 Update copyright years.
734
735 2017-12-22 Mike Stump <mikestump@comcast.net>
736 Eric Botcazou <ebotcazou@adacore.com>
737
738 * c-pragma.c (init_pragma): Register pragma GCC unroll.
739 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
740
741 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
742
743 PR debug/83527
744 PR debug/83419
745 * c-semantics.c (only_debug_stmts_after_p): New.
746 (pop_stmt_list): Clear side effects in debug-only stmt list.
747 Check for single nondebug stmt followed by debug stmts only.
748
749 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
750
751 PR debug/83419
752 * c-semantics.c (pop_stmt_list): Propagate side effects from
753 single nondebug stmt to container list.
754
755 2017-12-19 Jakub Jelinek <jakub@redhat.com>
756
757 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
758 conditions with typical order conditions.
759
760 2017-12-18 Marek Polacek <polacek@redhat.com>
761
762 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
763 not in effect.
764
765 2017-12-17 Martin Sebor <msebor@redhat.com>
766
767 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
768 an error for attribute warn_if_not_aligned.
769
770 2017-12-16 Martin Sebor <msebor@redhat.com>
771
772 PR tree-optimization/78918
773 * c-common.c (check_function_restrict): Avoid checking built-ins.
774 * c.opt (-Wrestrict): Include in -Wall.
775
776 2017-12-15 Jakub Jelinek <jakub@redhat.com>
777
778 * c-attribs.c (c_common_attribute_table,
779 c_common_format_attribute_table): Swap affects_type_identity
780 and handler fields, adjust comments.
781
782 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
783
784 * c.opt (Wcast-function-type): New warning option.
785 * c-lex.c (get_fileinfo): Avoid warning.
786 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
787
788 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
789
790 PR middle_end/79538
791 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
792 Adjust the size of buf1 and buf2, add a new buf to avoid
793 format-overflow warning.
794
795 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
796
797 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
798 subsequent statement list.
799
800 2017-12-07 Martin Sebor <msebor@redhat.com>
801
802 PR c/81544
803 PR c/81566
804 * c-attribs.c (attr_aligned_exclusions): New array.
805 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
806 (attr_common_exclusions, attr_const_pure_exclusions): Same.
807 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
808 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
809 (attr_warn_unused_result_exclusions): Same.
810 (handle_hot_attribute, handle_cold_attribute): Simplify.
811 (handle_const_attribute): Warn on function returning void.
812 (handle_pure_attribute): Same.
813 (handle_aligned_attribute): Diagnose conflicting attribute
814 specifications.
815 * c-warn.c (diagnose_mismatched_attributes): Simplify.
816
817 2017-12-06 David Malcolm <dmalcolm@redhat.com>
818
819 PR c/83236
820 * c-common.c (selftest::c_family_tests): Call
821 selftest::c_spellcheck_cc_tests.
822 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
823 * c-spellcheck.cc: Include "selftest.h".
824 (name_reserved_for_implementation_p): New function.
825 (should_suggest_as_macro_p): New function.
826 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
827 should_suggest_as_macro_p and call it.
828 (selftest::test_name_reserved_for_implementation_p): New function.
829 (selftest::c_spellcheck_cc_tests): New function.
830 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
831
832 2017-12-06 David Malcolm <dmalcolm@redhat.com>
833
834 * c-spellcheck.cc: New file, taken from macro-handling code in
835 spellcheck-tree.c.
836 * c-spellcheck.h: New file, taken from macro-handling code in
837 spellcheck-tree.h.
838
839 2017-12-01 Jakub Jelinek <jakub@redhat.com>
840
841 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
842 attribute.
843 (handle_simd_attribute): Don't check for "cilk simd function"
844 attribute. Reindent, formatting changes.
845
846 2017-11-30 Julia Koval <julia.koval@intel.com>
847
848 * c-common.h (inv_list): Remove.
849
850 2017-11-28 Jakub Jelinek <jakub@redhat.com>
851
852 PR sanitizer/81275
853 * c-common.c (c_switch_covers_all_cases_p_1,
854 c_switch_covers_all_cases_p): New functions.
855 * c-common.h (c_switch_covers_all_cases_p): Declare.
856
857 2017-11-28 Julia Koval <julia.koval@intel.com>
858 Sebastian Peryt <sebastian.peryt@intel.com>
859
860 * array-notation-common.c: Delete.
861 * c-cilkplus.c: Ditto.
862 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
863 * c-common.def (ARRAY_NOTATION_REF): Remove.
864 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
865 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
866 c_validate_cilk_plus_loop, cilkplus_an_parts,
867 cilk_ignorable_spawn_rhs_op,
868 cilk_recognize_spawn): Remove.
869 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
870 * c-omp.c: Remove CILK_SIMD check.
871 * c-pragma.c: Ditto.
872 * c-pragma.h: Remove CILK related pragmas.
873 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
874 ARRAY_NOTATION_REF condition.
875 (c_pretty_printer::expression): Ditto.
876 * c.opt (fcilkplus): Remove.
877 * cilk.c: Delete.
878
879 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
880
881 * c-pretty-print.c (pp_c_additive_expression,
882 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
883
884 2017-11-21 Jakub Jelinek <jakub@redhat.com>
885
886 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
887
888 PR c++/83059
889 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
890 instead of tree_to_uhwi, formatting fix.
891
892 2017-11-20 David Malcolm <dmalcolm@redhat.com>
893
894 PR c/81404
895 * known-headers.cc: New file, based on material from c/c-decl.c.
896 (suggest_missing_header): Copied as-is.
897 (get_stdlib_header_for_name): New, based on get_c_name_hint but
898 heavily edited to add C++ support. Add some knowledge about
899 <limits.h>, <stdint.h>, and <wchar.h>.
900 * known-headers.h: Likewise.
901
902 2017-11-20 David Malcolm <dmalcolm@redhat.com>
903
904 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
905 (lookup_name_fuzzy): Likewise. Convert return type from
906 const char * to name_hint. Add location_t param.
907 * name-hint.h: New header.
908
909 2017-11-19 Jakub Jelinek <jakub@redhat.com>
910
911 PR c/66618
912 PR c/69960
913 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
914
915 2017-11-16 Joseph Myers <joseph@codesourcery.com>
916
917 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
918 expected publication date of C17.
919 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
920
921 2017-11-15 Joseph Myers <joseph@codesourcery.com>
922
923 PR c/81156
924 * c-common.c (c_common_reswords): Add __builtin_tgmath.
925 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
926
927 2017-11-10 Martin Sebor <msebor@redhat.com>
928
929 PR c/81117
930 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
931 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
932 * c.opt (-Wstringop-truncation): New option.
933
934 2017-11-06 Martin Liska <mliska@suse.cz>
935
936 PR middle-end/82404
937 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
938 FE.
939 * c.opt: Set default value of warn_return_type.
940
941 2017-10-31 David Malcolm <dmalcolm@redhat.com>
942
943 * c-common.c (binary_op_error): Update for renaming of
944 error_at_rich_loc.
945 (c_parse_error): Likewise.
946 * c-warn.c (warn_logical_not_parentheses): Likewise for
947 renaming of inform_at_rich_loc.
948 (warn_for_restrict): Likewise for renaming of
949 warning_at_rich_loc_n.
950
951 2017-10-30 Joseph Myers <joseph@codesourcery.com>
952
953 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
954 * c-opts.c (set_std_c17): New function.
955 (c_common_init_options): Use gnu17 as default C version.
956 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
957
958 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
959
960 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
961 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
962 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
963 __FP_FAST_FMA<N>X.
964
965 2017-10-23 Marek Polacek <polacek@redhat.com>
966
967 PR c/82681
968 * c-warn.c (warnings_for_convert_and_check): Fix typos.
969
970 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
971
972 * c-common.c (check_builtin_function_arguments): Also check arguments
973 of __builtin_alloca_with_align_and_max.
974
975 2017-10-17 David Malcolm <dmalcolm@redhat.com>
976
977 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
978 rather than NULL to format_warning_va.
979 (check_format_types): Likewise when calling format_type_warning.
980 Remove code to extract source_ranges and source_range * in favor
981 of just a location_t.
982 (format_type_warning): Convert source_range * param to a
983 location_t.
984
985 2017-10-13 Jakub Jelinek <jakub@redhat.com>
986
987 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
988 [LR]SHIFT_EXPR.
989
990 2017-10-12 David Malcolm <dmalcolm@redhat.com>
991
992 * c-common.c (enum missing_token_insertion_kind): New enum.
993 (get_missing_token_insertion_kind): New function.
994 (maybe_suggest_missing_token_insertion): New function.
995 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
996
997 2017-10-11 Nathan Sidwell <nathan@acm.org>
998
999 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1000 (c_common_handle_option): Update incpath_kind names.
1001
1002 2017-10-11 Martin Liska <mliska@suse.cz>
1003
1004 PR sanitizer/82490
1005 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1006 Wattributes warning.
1007
1008 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1009
1010 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1011 operating on trees as wide_ints.
1012 * c-common.c (pointer_int_sum): Likewise.
1013 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1014 * c-warn.c (match_case_to_enum_1): Likewise.
1015 (c_do_switch_warnings): Likewise.
1016 (maybe_warn_shift_overflow): Likewise.
1017
1018 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1019
1020 PR c/82437
1021 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1022 instead of wide_int::from.
1023
1024 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c/82437
1027 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1028 using to_widest use wide_int with the larger of the two precisions.
1029
1030 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1031
1032 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1033 functions.
1034
1035 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1036
1037 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1038 when combining the original unconverted comparison operands.
1039
1040 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1041
1042 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1043 attribute.
1044
1045 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1046
1047 * c-ada-spec.c (to_ada_name): Add index parameter.
1048 (pp_ada_tree_identifier): Likewise.
1049 (dump_ada_macros): Adjust call to to_ada_name.
1050 (struct overloaded_name_hash): New type.
1051 (struct overloaded_name_hasher): Likewise.
1052 (overloaded_names): New hash table.
1053 (compute_overloading_index): New function.
1054 (dump_ada_decl_name): Call it and pass the result to
1055 pp_ada_tree_identifier.
1056 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1057 (dump_ada_function_declaration): Likewise.
1058 (dump_generic_ada_node): Likewise.
1059 (print_constructor): Likewise.
1060 (print_destructor): Likewise.
1061 (dump_ada_specs): Delete overloaded_names table.
1062
1063 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1064
1065 * c-ada-spec.c (max_ada_macros): Move around.
1066 (store_ada_macro_index): Likewise.
1067 (source_file): Rename into...
1068 (macro_source_file): ...this.
1069 (count_ada_macro): Move around.
1070 (store_ada_macro): Likewise.
1071 (compare_macro): Likewise.
1072 (print_ada_macros): Merge in...
1073 (dump_ada_macros): ...this.
1074 (source_file_base): Rename into...
1075 (current_source_file): ...this.
1076 (print_comment): Move around.
1077 (dump_ada_nodes): Call dump_ada_declaration directly.
1078 (struct with): Change type of limited field to bool.
1079 (append_withs): Change type of limited_access parameter to bool.
1080 (pp_ada_tree_identifie): Likewise.
1081 (dump_ada_decl_nam): Likewise.
1082 (dump_generic_ada_node): Likewise. Do not print the return type.
1083 (to_ada_name): Change type of space_found parameter to bool.
1084 (dump_ada_function_declaration): Return void and change type of
1085 parameters to bool. Also print the return type for a function.
1086 (print_ada_methods): Rename into...
1087 (dump_ada_methods): ...this.
1088 (print_ada_declaration): Rename into ...
1089 (dump_ada_declaration): ...this. Do not print the return type.
1090 (print_ada_struct_decl): Rename into...
1091 (dump_ada_struct_decl): ...this.
1092
1093 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1094
1095 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1096 rather than DECL_INITIAL.
1097 (common_handle_aligned_attribute): Likewise.
1098
1099 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1100
1101 * c.opt (gen-decls): Add RejectNegative.
1102
1103 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1104 Jakub Jelinek <jakub@redhat.com>
1105
1106 Add support for -std=c++2a.
1107 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1108 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1109 * c-opts.c (set_std_cxx2a): New.
1110 (c_common_handle_option): Set options when -std=c++2a is enabled.
1111 (c_common_post_options): Adjust comments.
1112 (set_std_cxx14, set_std_cxx17): Likewise.
1113
1114 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1115
1116 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1117 message for non-uniform endianness and issue a warning in C++.
1118
1119 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1120
1121 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1122 (Wc++17-compat): Change from undocumented alias to option.
1123 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1124 change C++1z to C++17 in description.
1125 (std=c++1z, std=gnu++1z): Change from option to undocumented
1126 deprecated alias.
1127 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1128 Adjust description.
1129 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1130 * c-opts.c (set_std_cxx1z): Rename to ...
1131 (set_std_cxx17): ... this.
1132 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1133 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1134 caller.
1135 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1136 comments.
1137
1138 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1139
1140 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1141 function alignment if warn_if_not_aligned_p is true.
1142
1143 2017-09-12 Nathan Sidwell <nathan@acm.org>
1144
1145 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1146 resort_sorted_fields): Move to c/c-decl.c.
1147 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1148 (struct sorted_fields_type): Move to c/c-lang.h.
1149
1150 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1151
1152 PR c++/81852
1153 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1154
1155 2017-09-04 Marek Polacek <polacek@redhat.com>
1156
1157 PR c/81783
1158 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1159 (warn_tautological_cmp): Call it.
1160
1161 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1162
1163 * c-opts.c (c_common_finish): Write dependency information even if
1164 there are errors.
1165
1166 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1167
1168 PR c/81887
1169 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1170 (omp_pragmas_simd): ... here.
1171 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1172 create new clauses list containing just simd clause.
1173
1174 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1175 Alan Hayward <alan.hayward@arm.com>
1176 David Sherwood <david.sherwood@arm.com>
1177
1178 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1179 into scalar_mode_supported_p call.
1180 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1181
1182 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1183 Alan Hayward <alan.hayward@arm.com>
1184 David Sherwood <david.sherwood@arm.com>
1185
1186 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1187 for the mode iterator.
1188
1189 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1190 Alan Hayward <alan.hayward@arm.com>
1191 David Sherwood <david.sherwood@arm.com>
1192
1193 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1194 * c-common.c (c_build_vec_perm_expr): Likewise.
1195
1196 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1197 Alan Hayward <alan.hayward@arm.com>
1198 David Sherwood <david.sherwood@arm.com>
1199
1200 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1201
1202 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1203 Alan Hayward <alan.hayward@arm.com>
1204 David Sherwood <david.sherwood@arm.com>
1205
1206 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1207 before calling targetm.addr_space.valid_pointer_mode.
1208
1209 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1210 Alan Hayward <alan.hayward@arm.com>
1211 David Sherwood <david.sherwood@arm.com>
1212
1213 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1214
1215 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1216 Alan Hayward <alan.hayward@arm.com>
1217 David Sherwood <david.sherwood@arm.com>
1218
1219 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1220 iterators.
1221 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1222
1223 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1224 Alan Hayward <alan.hayward@arm.com>
1225 David Sherwood <david.sherwood@arm.com>
1226
1227 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1228 case statements.
1229
1230 2017-08-29 Martin Liska <mliska@suse.cz>
1231
1232 PR other/39851
1233 * c-common.c (parse_optimize_options): Add argument to function
1234 call.
1235 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1236
1237 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1238
1239 * c-lex.c (interpret_float): Use token location
1240 when building an EXCESS_PRECISION_EXPR.
1241
1242 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1243
1244 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1245 it to check_function_format.
1246 * c-common.h (check_function_arguments): Add vec<location_t> *
1247 param.
1248 (check_function_format): Likewise.
1249 * c-format.c (struct format_check_context): Add field "arglocs".
1250 (check_function_format): Add param "arglocs"; pass it to
1251 check_format_info.
1252 (check_format_info): Add param "arglocs"; use it to initialize
1253 new field of format_ctx.
1254 (check_format_arg): Pass format_ctx->arglocs to new param of
1255 check_format_info_main.
1256 (class argument_parser): New field "arglocs".
1257 (argument_parser::argument_parser): Add "arglocs_" param and use
1258 it to initialize new field.
1259 (argument_parser::check_argument_type): Pass new arglocs field to
1260 check_format_types.
1261 (check_format_info_main): Add param "arglocs", and use it when
1262 constructing arg_parser.
1263 (check_format_types): Add param "arglocs"; use it if non-NULL when
1264 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1265
1266 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1267
1268 PR c/53037
1269 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1270 (c_common_attribute_table): Add warn_if_not_aligned.
1271 (handle_aligned_attribute): Renamed to ...
1272 (common_handle_aligned_attribute): Remove argument, name, and add
1273 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1274 (handle_aligned_attribute): New.
1275 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1276
1277 2017-08-14 Martin Sebor <msebor@redhat.com>
1278
1279 PR c/81117
1280 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1281 (handle_nonstring_attribute): New function.
1282
1283 2017-08-14 Martin Sebor <msebor@redhat.com>
1284
1285 PR c/81117
1286 * c-format.h (T89_G): New macro.
1287 * c-format.c (local_gcall_ptr_node): New variable.
1288 (init_dynamic_diag_info): Initialize it.
1289
1290 2017-08-11 Martin Liska <mliska@suse.cz>
1291
1292 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1293 TARGET_SUPPORTS_ALIASES.
1294
1295 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1296
1297 * c-common.c (c_parse_error): Add rich_location * param, using it
1298 rather implicitly using input_location.
1299 * c-common.h (c_parse_error): Add rich_location * param.
1300
1301 2017-08-09 Marek Polacek <polacek@redhat.com>
1302
1303 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1304 (c_common_truthvalue_conversion): Likewise.
1305 * c-omp.c (c_finish_omp_atomic): Likewise.
1306 * c-common.h (build_binary_op): Update declaration.
1307
1308 2017-08-08 Martin Liska <mliska@suse.cz>
1309
1310 * c-ada-spec.c: Include header files.
1311 * c-ubsan.c: Likewise.
1312 * c-warn.c: Likewise.
1313
1314 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1315
1316 PR c/69389
1317 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1318
1319 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1320
1321 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1322 (print_ada_methods): Likewise.
1323 (print_ada_declaration): Likewise.
1324
1325 2017-08-07 Martin Liska <mliska@suse.cz>
1326
1327 * array-notation-common.c: Add new includes.
1328 * c-format.c( handle_format_attribute): Canonicalize a format
1329 function name.
1330 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1331 attribute.
1332 * c-pretty-print.c: Add new include.
1333
1334 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1335
1336 * c-ada-spec.c (has_static_fields): Look only into variables.
1337 (print_constructor): Add TYPE parameter and use it for the name.
1338 (print_destructor): Likewise.
1339 (print_ada_declaration): Adjust to new constructor/destructor names.
1340 Adjust calls to print_constructor and print_destructor.
1341 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1342 Look only into variables in the final loop.
1343
1344 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1345
1346 * c-ada-spec.c (has_static_fields): Look only into fields.
1347 (dump_generic_ada_node): Small tweak.
1348 (dump_nested_types): Look only into fields.
1349 (print_ada_declaration): Look only into methods. Small tweak.
1350 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1351
1352 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1353
1354 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1355 (dump_ada_function_declaration): Likewise.
1356 (dump_generic_ada_node): Likewise.
1357 (print_ada_declaration): Add support for const-qualified variables.
1358
1359 2017-07-31 Martin Liska <mliska@suse.cz>
1360
1361 PR sanitize/81530
1362 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1363 Guard condition with flag_sanitize_p also with current_function_decl
1364 non-null equality.
1365 (ubsan_maybe_instrument_reference_or_call): Likewise.
1366
1367 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1368
1369 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1370
1371 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1372
1373 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1374 for enumeral types.
1375 (print_ada_declaration): Add missing guard for record types.
1376
1377 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1378
1379 PR c/45784
1380 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1381 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1382 new COMPOUND_EXPRs around the rhs of the comparison.
1383
1384 2017-07-27 Marek Polacek <polacek@redhat.com>
1385
1386 PR c/81417
1387 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1388 the types.
1389
1390 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1391
1392 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1393 (handle_noipa_attribute): New function.
1394
1395 2017-07-07 Torsten Duwe <duwe@suse.de>
1396
1397 * c-attribs.c (c_common_attribute_table): Add entry for
1398 "patchable_function_entry".
1399
1400 2017-07-20 Nathan Sidwell <nathan@acm.org>
1401
1402 Remove TYPE_METHODS.
1403 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1404 dump_ada_template, print_ada_methods,
1405 print_ada_declaration): Member fns are on TYPE_FIELDS.
1406
1407 2017-07-18 Nathan Sidwell <nathan@acm.org>
1408
1409 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1410
1411 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1412
1413 * c-common.c (try_to_locate_new_include_insertion_point): New
1414 function.
1415 (per_file_includes_t): New typedef.
1416 (added_includes_t): New typedef.
1417 (added_includes): New variable.
1418 (maybe_add_include_fixit): New function.
1419 * c-common.h (maybe_add_include_fixit): New decl.
1420
1421 2017-07-10 Martin Sebor <msebor@redhat.com>
1422
1423 PR other/81345
1424 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1425
1426 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1427
1428 * c-common.c (selftest::c_family_tests): New.
1429 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1430 (selftest::c_family_tests): New decl.
1431
1432 2017-07-04 Marek Polacek <polacek@redhat.com>
1433
1434 PR c/81231
1435 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1436 types.
1437
1438 2017-07-04 Marek Polacek <polacek@redhat.com>
1439
1440 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1441
1442 2017-06-28 Martin Liska <mliska@suse.cz>
1443
1444 PR ipa/81128
1445 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1446 to a function declaration.
1447
1448 2017-06-28 Martin Liska <mliska@suse.cz>
1449
1450 PR driver/79659
1451 * c.opt: Add IntegerRange to various options.
1452
1453 2017-06-26 Marek Polacek <polacek@redhat.com>
1454
1455 PR c/80116
1456 * c-common.h (warn_for_multistatement_macros): Declare.
1457 * c-warn.c: Include "c-family/c-indentation.h".
1458 (warn_for_multistatement_macros): New function.
1459 * c.opt (Wmultistatement-macros): New option.
1460 * c-indentation.c (guard_tinfo_to_string): No longer static.
1461 Change the parameter type to "enum rid". Handle RID_SWITCH.
1462 * c-indentation.h (guard_tinfo_to_string): Declare.
1463
1464 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1465
1466 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1467
1468 2017-06-15 Martin Sebor <msebor@redhat.com>
1469
1470 PR c++/80560
1471 * c.opt (-Wclass-memaccess): New option.
1472
1473 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1474
1475 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1476
1477 2017-06-13 Marek Polacek <polacek@redhat.com>
1478
1479 PR objc/80949
1480 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1481 branches is null.
1482
1483 2017-06-13 Martin Liska <mliska@suse.cz>
1484
1485 PR sanitize/78204
1486 * c-attribs.c (add_no_sanitize_value): New function.
1487 (handle_no_sanitize_attribute): Likewise.
1488 (handle_no_sanitize_address_attribute): Use the function.
1489 (handle_no_sanitize_thread_attribute): New function.
1490 (handle_no_address_safety_analysis_attribute): Use
1491 add_no_sanitize_value.
1492 (handle_no_sanitize_undefined_attribute): Likewise.
1493 * c-common.h: Declare new functions.
1494 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1495 (ubsan_instrument_shift): Likewise.
1496 (ubsan_instrument_bounds): Likewise.
1497 (ubsan_maybe_instrument_array_ref): Likewise.
1498 (ubsan_maybe_instrument_reference_or_call): Likewise.
1499
1500 2017-06-11 Jason Merrill <jason@redhat.com>
1501
1502 * c-ada-spec.c, c-pragma.c: Use id_equal.
1503
1504 2017-06-04 Marek Polacek <polacek@redhat.com>
1505
1506 PR c/80919
1507 * c-format.c (matching_type_p): Return false if any of the types
1508 requires structural equality.
1509
1510 2017-06-02 Martin Sebor <msebor@redhat.com>
1511
1512 PR c/80892
1513 * c-warn.c (conversion_warning): Use -Wconversion for integer
1514 conversion and -Wfloat-conversion for floating one.
1515
1516 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1517
1518 * c.opt (Wsizeof-pointer-div): New warning option.
1519
1520 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1521
1522 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1523 (Wcatch-value=1): Enable by -Wall.
1524
1525 2017-05-30 David Malcolm <dmalcolm@redhat.com>
1526
1527 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1528 format_chars.
1529 * c.opt (fdiagnostics-show-template-tree): New option.
1530 (felide-type): New option.
1531
1532 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1533
1534 * c.opt (Wcatch-value=): New C++ warning flag.
1535
1536 2017-05-24 Nathan Sidwell <nathan@acm.org>
1537
1538 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1539 const casts to avoid warning.
1540
1541 2017-05-24 Martin Sebor <msebor@redhat.com>
1542
1543 PR c/80731
1544 * c-common.h (unsafe_conversion_p): Add a function argument.
1545 * c-common.c (unsafe_conversion_p): Same.
1546 Add type names and values to diagnostics.
1547 (scalar_to_vector): Adjust.
1548 * c-warn.c (constant_expression_error): Add a function argument.
1549 Add type names and values to diagnostics.
1550 (conversion_warning): Add a function argument.
1551 Add type names and values to diagnostics.
1552 (warnings_for_convert_and_check): Same.
1553
1554 2017-05-19 Jason Merrill <jason@redhat.com>
1555
1556 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1557 enumerators.
1558
1559 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1560
1561 * c-format.c (locus): Move out of function scope,
1562 add GTY attribute.
1563
1564 2017-05-19 Nathan Sidwell <nathan@acm.org>
1565
1566 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1567 (c_common_parse_file): Remove class dump handling.
1568 (get_dump_info): Likewise.
1569
1570 2017-05-19 Richard Biener <rguenther@suse.de>
1571
1572 PR c++/80593
1573 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1574 to alias-set zero memory.
1575
1576 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1577
1578 * c-format.c (local_tree_type_node): Add GTY attribute.
1579
1580 2017-05-18 Marek Polacek <polacek@redhat.com>
1581
1582 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1583 (c_common_fixed_point_type_for_size): Likewise.
1584 (c_common_type_for_mode): Likewise.
1585 (shorten_compare): Likewise.
1586 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1587 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1588
1589 2017-05-18 Marek Polacek <polacek@redhat.com>
1590
1591 * c-common.c (self_promoting_args_p): Change the return type to bool.
1592 Use false/true instead of 0/1.
1593 * c-common.h (self_promoting_args_p): Update.
1594
1595 2017-05-17 Marek Polacek <polacek@redhat.com>
1596
1597 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1598 * c-warn.c: Likewise.
1599
1600 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1601
1602 Implement new C++ intrinsics __is_assignable and __is_constructible.
1603 * c-common.c (__is_assignable, __is_constructible): New.
1604 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1605
1606 2017-05-17 Martin Liska <mliska@suse.cz>
1607
1608 * c-common.h: Introduce dump_flags_t type and
1609 use it instead of int type.
1610 * c-gimplify.c (c_genericize): Likewise.
1611 * c-opts.c: Likewise.
1612
1613 2017-05-17 Marek Polacek <polacek@redhat.com>
1614
1615 * c-common.c (c_save_expr): Remove.
1616 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1617 * c-common.h (c_save_expr): Remove declaration.
1618
1619 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1620
1621 PR c/35441
1622 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1623 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1624 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1625 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1626 RDIV_EXPR.
1627 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1628
1629 2017-05-09 Marek Polacek <polacek@redhat.com>
1630
1631 PR c/80525
1632 * c-warn.c (unwrap_c_maybe_const): New.
1633 (warn_logical_operator): Call it.
1634
1635 2017-05-09 Nathan Sidwell <nathan@acm.org>
1636
1637 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1638 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1639
1640 2017-05-08 Martin Sebor <msebor@redhat.com>
1641
1642 PR translation/80280
1643 * c-format.h (struct format_flag_spec): Add new member.
1644 (T89_T): New macro.
1645 * c-format.c (local_tree_type_node): New global.
1646 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1647 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1648 (strfmon_flag_specs): Likewise.
1649 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1650 with distinct quoting properties.
1651 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1652 (flag_chars_t::validate): Add argument and handle bad quoting.
1653 (check_format_info_main): Handle quoting problems.
1654 (init_dynamic_diag_info): Simplify.
1655
1656 2017-05-08 Jason Merrill <jason@redhat.com>
1657
1658 * c-opts.c (c_common_post_options): Update defaults for
1659 flag_abi_version and flag_abi_compat_version.
1660
1661 2017-05-05 David Malcolm <dmalcolm@redhat.com>
1662
1663 * c-common.c (c_cpp_error): Replace report_diagnostic
1664 with diagnostic_report_diagnostic.
1665
1666 2017-05-04 Martin Sebor <msebor@redhat.com>
1667
1668 PR translation/80280
1669 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1670 (handle_weakref_attribute): Same.
1671
1672 2017-05-03 Nathan Sidwell <nathan@acm.org>
1673
1674 Canonicalize canonical type hashing
1675 * c-common.c (complete_array_type): Use type_hash_canon.
1676
1677 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1678
1679 PR c++/80038
1680 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1681 prototype.
1682 (cilk_install_body_pedigree_operations): Likewise.
1683 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1684 detatched.
1685 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1686 (cilk_install_body_pedigree_operations): Likewise.
1687 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1688 unwrapping.
1689
1690 2017-04-27 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c++/80534
1693 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1694 flag on non-aggregate element types.
1695
1696 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1697
1698 * c-common.c (c_type_hasher, type_hash_table): Remove.
1699 (c_common_get_alias_set): Remove unreachable code.
1700 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1701
1702 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1703
1704 * c.opt (Wextra-semi): New C++ warning flag.
1705
1706 2017-04-20 Jakub Jelinek <jakub@redhat.com>
1707
1708 PR middle-end/80423
1709 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1710
1711 2017-04-18 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR middle-end/79788
1714 PR middle-end/80375
1715 * c-common.c (c_common_type_for_mode): Don't handle
1716 widest_*_literal_type_node here.
1717 c_common_signed_or_unsigned_type): Likewise.
1718 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1719 to *intTI_type_node or *intDI_type_node depending on whether
1720 TImode is supported by the target or not.
1721
1722 2017-04-10 Martin Liska <mliska@suse.cz>
1723
1724 PR sanitizer/80350
1725 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1726 doing an UBSAN check.
1727
1728 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
1729
1730 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1731
1732 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1733
1734 PR c++/79572
1735 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1736 tree *.
1737 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1738 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1739 REFERENCE_TYPE.
1740
1741 2017-03-31 David Malcolm <dmalcolm@redhat.com>
1742
1743 PR documentation/78732
1744 * c.opt (Wendif-labels): Fix description to refer to
1745 #else rather than #elif.
1746
1747 2017-03-31 Jakub Jelinek <jakub@redhat.com>
1748
1749 PR libstdc++/80251
1750 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1751 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1752
1753 2017-03-27 Jakub Jelinek <jakub@redhat.com>
1754
1755 PR middle-end/80162
1756 * c-common.c (c_common_mark_addressable_vec): Don't set
1757 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1758
1759 2017-03-21 Martin Sebor <msebor@redhat.com>
1760
1761 PR c++/79548
1762 * c-common.c (set_underlying_type): Mark type used only when
1763 original del is declared unused.
1764
1765 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1766
1767 PR translation/79848
1768 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1769 "%qs".
1770
1771 2017-03-10 David Malcolm <dmalcolm@redhat.com>
1772
1773 PR c/79921
1774 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1775 from inform's message, so that xgettext can locate it.
1776
1777 2017-03-09 Marek Polacek <polacek@redhat.com>
1778
1779 PR c++/79962
1780 PR c++/79984
1781 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1782 conversion to the attribute list.
1783
1784 2017-03-09 Martin Liska <mliska@suse.cz>
1785
1786 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1787
1788 2017-03-03 Jason Merrill <jason@redhat.com>
1789
1790 * c.opt (Wnoexcept-type): New.
1791
1792 2017-03-02 Richard Biener <rguenther@suse.de>
1793
1794 PR c/79756
1795 * c-common.c (c_common_mark_addressable_vec): Look through
1796 C_MAYBE_CONST_EXPR.
1797
1798 2017-02-28 Martin Liska <mliska@suse.cz>
1799
1800 * c.opt: Replace space with tabular for options of <number>
1801 type.
1802
1803 2017-02-28 Martin Liska <mliska@suse.cz>
1804
1805 * c.opt: Fix --help=option -Q for options which are of
1806 an enum type.
1807
1808 2017-02-24 Jakub Jelinek <jakub@redhat.com>
1809
1810 PR c++/79588
1811 * c-common.c (check_function_restrict): New function.
1812 (check_function_arguments): Add FNDECL argument. Call
1813 check_function_restrict if -Wrestrict.
1814 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1815 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1816 * c-common.h (check_function_arguments): Add FNDECL argument.
1817 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1818
1819 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1820
1821 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1822 treatment of parameters with pointer-to-tagged type and tidy up.
1823 (print_ada_methods): Remove the special treatment of C++ static member
1824 functions.
1825
1826 2017-02-22 Martin Liska <mliska@suse.cz>
1827
1828 * c.opt: Replace inequality signs with square brackets
1829 for -Wnornalized.
1830
1831 2017-02-21 Jakub Jelinek <jakub@redhat.com>
1832
1833 PR c++/79641
1834 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1835 preserve quals.
1836
1837 2017-02-17 Joseph Myers <joseph@codesourcery.com>
1838
1839 * c-cppbuiltin.c (builtin_define_float_constants): Define
1840 __DECIMAL_DIG__ to the value for long double.
1841
1842 2017-02-15 Marek Polacek <polacek@redhat.com>
1843
1844 PR c/79515
1845 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1846 conversion has occured.
1847
1848 2017-01-24 David Malcolm <dmalcolm@redhat.com>
1849
1850 * c-common.c (c_common_reswords): Add "__RTL".
1851 * c-common.h (enum rid): Add RID_RTL.
1852
1853 2017-01-20 Marek Polacek <polacek@redhat.com>
1854
1855 PR c/64279
1856 * c-common.h (do_warn_duplicated_branches_r): Declare.
1857 * c-gimplify.c (c_genericize): Walk the function tree calling
1858 do_warn_duplicated_branches_r.
1859 * c-warn.c (expr_from_macro_expansion_r): New.
1860 (do_warn_duplicated_branches): New.
1861 (do_warn_duplicated_branches_r): New.
1862 * c.opt (Wduplicated-branches): New option.
1863
1864 2017-01-17 David Malcolm <dmalcolm@redhat.com>
1865
1866 PR c++/71497
1867 * c-indentation.c (warn_for_misleading_indentation): Use the past
1868 subjunctive in the note.
1869
1870 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
1871
1872 PR c/79116
1873 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1874 start type to integer_type.
1875
1876 2017-01-16 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR driver/49726
1879 * c.opt (gen-decls): Add Driver flag.
1880
1881 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1882
1883 Revert:
1884 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1885
1886 PR c++/71737
1887 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1888
1889 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1890
1891 PR c++/71737
1892 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1893
1894 2017-01-12 Martin Sebor <msebor@redhat.com>
1895
1896 (-Wformat-overflow): ...to this.
1897
1898 2017-01-11 Martin Sebor <msebor@redhat.com>
1899
1900 PR c/78768
1901 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1902 Also enable for LTO.
1903
1904 2017-01-10 Jason Merrill <jason@redhat.com>
1905
1906 Implement P0195R2, C++17 variadic using.
1907 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1908
1909 2017-01-09 Jakub Jelinek <jakub@redhat.com>
1910
1911 PR translation/79019
1912 PR translation/79020
1913 * c.opt (Wnormalized=): Fix typo in description.
1914
1915 2017-01-08 Martin Sebor <msebor@redhat.com>
1916
1917 PR middle-end/77708
1918 * c.opt (-Wformat-truncation): New option.
1919
1920 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
1921
1922 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1923 value to unsigned short to fit in 4 hex digits without
1924 warnings.
1925
1926 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1927
1928 * c.opt (fsso-struct): Add 'native' value.
1929
1930 2017-01-05 Martin Liska <mliska@suse.cz>
1931
1932 PR pch/78970
1933 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1934 header.
1935
1936 2017-01-04 Marek Polacek <polacek@redhat.com>
1937
1938 PR c++/64767
1939 * c.opt (Wpointer-compare): New option.
1940
1941 2017-01-04 Jakub Jelinek <jakub@redhat.com>
1942
1943 PR driver/78957
1944 * c.opt (fsso-struct=): Add RejectNegative.
1945
1946 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1947
1948 Update copyright years.
1949
1950 2016-12-29 Martin Liska <mliska@suse.cz>
1951
1952 PR c/78933
1953 * c.opt (strong-eval-order): Add RejectNegative keyword.
1954
1955 2016-12-22 Jason Merrill <jason@redhat.com>
1956
1957 Implement P0522R0, matching of template template arguments.
1958 * c-cppbuiltin.c (c_cpp_builtins): Define
1959 __cpp_template_template_args.
1960
1961 2016-12-21 Jakub Jelinek <jakub@redhat.com>
1962
1963 PR bootstrap/78817
1964 * c-common.c (struct nonnull_arg_ctx): New type.
1965 (check_function_nonnull): Return bool instead of void. Use
1966 nonnull_arg_ctx as context rather than just location_t.
1967 (check_nonnull_arg): Adjust for the new context type, set
1968 warned_p to true if a warning has been diagnosed.
1969 (check_function_arguments): Return bool instead of void.
1970 * c-common.h (check_function_arguments): Adjust prototype.
1971
1972 2016-12-21 Jason Merrill <jason@redhat.com>
1973
1974 * c.opt (-fnew-ttp-matching): New flag.
1975 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1976
1977 2016-12-14 Martin Jambor <mjambor@suse.cz>
1978
1979 * c-omp.c: Include omp-general.h instead of omp-low.h.
1980 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1981 name.
1982
1983 2016-12-14 Martin Sebor <msebor@redhat.com>
1984
1985 PR c/17308
1986 * c-common.c (check_nonnull_arg): Disable when optimization
1987 is enabled.
1988
1989 2016-12-12 Marek Polacek <polacek@redhat.com>
1990
1991 PR c++/78647
1992 * c-common.c (attribute_fallthrough_p): Return false for
1993 error_mark_node.
1994
1995 2016-12-08 Martin Sebor <msebor@redhat.com>
1996
1997 PR c/78284
1998 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1999
2000 2016-12-08 Martin Sebor <msebor@redhat.com>
2001
2002 PR c/78165
2003 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2004 suffix.
2005
2006 2016-12-07 Martin Sebor <msebor@redhat.com>
2007
2008 PR c/53562
2009 PR middle-end/77784
2010 PR middle-end/78149
2011 PR middle-end/78138
2012 * c.opt (-Wstringop-overflow): New option.
2013
2014 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2015
2016 * c-attribs.c (asan odr indicator): New attribute.
2017 (handle_asan_odr_indicator_attribute): New function.
2018
2019 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2020
2021 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2022 ptrdiff_type_node;
2023
2024 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2025
2026 * c-common.c (excess_precision_mode_join): New.
2027 (c_ts18661_flt_eval_method): New.
2028 (c_c11_flt_eval_method): Likewise.
2029 (c_flt_eval_method): Likewise.
2030 * c-common.h (excess_precision_mode_join): New.
2031 (c_flt_eval_method): Likewise.
2032 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2033 (cpp_iec_559_value): Call it.
2034 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2035 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2036 __FLT_EVAL_METHOD_TS_18661_3__.
2037
2038 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2039
2040 * c-opts.c (c_common_post_options): Add logic to handle the default
2041 case for -fpermitted-flt-eval-methods.
2042
2043 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2044
2045 * c.opt (Wexpansion-to-defined): New.
2046
2047 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2048
2049 PR target/78451
2050 * c-pragma.c (handle_pragma_target): Don't replace
2051 current_target_pragma, but chainon the new args to the current one.
2052
2053 2016-11-22 Nathan Sidwell <nathan@acm.org>
2054
2055 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2056 indentation and formatting.
2057
2058 2016-11-21 Martin Sebor <msebor@redhat.com>
2059
2060 * c.opt (-fprintf-return-value): Enable by default.
2061
2062 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2063
2064 PR c++/71973
2065 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2066 * c-common.c (c_common_nodes_and_builtins): Initialize
2067 const_tm_ptr_type_node.
2068
2069 2016-11-16 Marek Polacek <polacek@redhat.com>
2070
2071 PR c/78285
2072 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2073
2074 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2075
2076 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2077
2078 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2079 Richard Biener <rguenther@suse.de>
2080
2081 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2082 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2083 * c.opt (fgimple): New option.
2084
2085 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2086
2087 PR c/35503
2088 * c-common.h (warn_for_restrict): Declare.
2089 * c-warn.c: Include gcc-rich-location.h.
2090 (warn_for_restrict): New function.
2091 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2092 (gcc_cdiag_char_table): Likewise.
2093 (gcc_cxxdiag_char_table): Likewise.
2094 * c.opt (Wrestrict): New option.
2095
2096 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2097
2098 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2099 for nested types only if the type is a record or union and dump SLOC.
2100
2101 2016-11-09 Jason Merrill <jason@redhat.com>
2102
2103 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2104
2105 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2106
2107 * c-ubsan.c (ubsan_instrument_shift): Handle split
2108 -fsanitize=shift-base and -fsanitize=shift-exponent.
2109
2110 2016-11-07 Jason Merrill <jason@redhat.com>
2111
2112 * c.opt (Wc++1z-compat): New.
2113 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2114
2115 2016-11-07 Martin Liska <mliska@suse.cz>
2116
2117 * c-warn.c (warn_for_unused_label): Save all labels used
2118 in goto or in &label.
2119
2120 2016-11-03 Jason Merrill <jason@redhat.com>
2121
2122 * c-cppbuiltin.c (c_cpp_builtins): Correct
2123 __cpp_inheriting_constructors.
2124
2125 2016-11-01 Jason Merrill <jason@redhat.com>
2126
2127 * c-cppbuiltin.c (c_cpp_builtins): Update
2128 __cpp_inheriting_constructors.
2129
2130 * c.opt (-fnew-inheriting-ctors): New.
2131 * c-opts.c: Default to on for ABI 11+.
2132
2133 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2134
2135 PR c++/77948
2136 * c.opt (fext-numeric-literals): Add Var and Init.
2137 * c-opts.c (c_common_handle_option): Don't clear
2138 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2139 (c_common_post_options): Clear it here if not set
2140 explicitly.
2141
2142 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2143
2144 PR debug/77773
2145 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2146 if NULL.
2147
2148 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2149
2150 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2151 * c-common.c (c_common_reswords): Add __builtin_launder.
2152
2153 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2154
2155 * c-common.c (c_common_truthvalue_conversion): Warn for
2156 multiplications in boolean context. Fix the quoting of '<<' and '<'
2157 in the shift warning.
2158
2159 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2160
2161 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2162
2163 2016-10-20 Jason Merrill <jason@redhat.com>
2164
2165 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2166
2167 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2168
2169 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2170 integer shift ops in boolean context.
2171
2172 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2173
2174 * c.opt (Walloca): New.
2175 (Walloca-larger-than=): New.
2176 (Wvla-larger-than=): New.
2177
2178 2016-10-17 Marek Polacek <polacek@redhat.com>
2179
2180 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2181 Return immediately when finding a match.
2182 (warn_tautological_cmp): Remove a boolean variable that is no longer
2183 needed.
2184
2185 2016-10-17 Marek Polacek <polacek@redhat.com>
2186
2187 * c-attribs.c: New file.
2188 * c-common.c: Move attributes handling to c-attribs.c.
2189 (get_nonnull_operand): No longer static.
2190 * c-common.h: Move the declarations from c-attribs.c to its own section.
2191
2192 2016-10-14 Jason Merrill <jason@redhat.com>
2193
2194 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2195 and __cpp_deduction_guides.
2196
2197 2016-10-13 Jason Merrill <jason@redhat.com>
2198
2199 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2200
2201 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2202
2203 * c-cppbuiltin.c: Include memmodel.h.
2204 * c-opts.c: Likewise.
2205 * c-pragma.c: Likewise.
2206 * c-warn.c: Likewise.
2207
2208 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2209
2210 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2211 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2212 * c-opts.c (sanitize_cpp_opts): Initialize
2213 cpp_opts->cpp_warn_implicit_fallthrough.
2214
2215 2016-10-11 Marek Polacek <polacek@redhat.com>
2216
2217 * c-common.c (warning_candidate_p): Change the return type to bool
2218 and return true/false instead of 1/0.
2219 (vector_mode_valid_p): Likewise.
2220
2221 2016-10-11 Marek Polacek <polacek@redhat.com>
2222
2223 * c-common.c (fold_for_warn): No longer static.
2224 (bool_promoted_to_int_p): Likewise.
2225 (c_common_get_narrower): Likewise.
2226 (constant_expression_warning): Move to c-warn.c.
2227 (constant_expression_error): Likewise.
2228 (overflow_warning): Likewise.
2229 (warn_logical_operator): Likewise.
2230 (find_array_ref_with_const_idx_r): Likewise.
2231 (warn_tautological_cmp): Likewise.
2232 (expr_has_boolean_operands_p): Likewise.
2233 (warn_logical_not_parentheses): Likewise.
2234 (warn_if_unused_value): Likewise.
2235 (strict_aliasing_warning): Likewise.
2236 (sizeof_pointer_memaccess_warning): Likewise.
2237 (check_main_parameter_types): Likewise.
2238 (conversion_warning): Likewise.
2239 (warnings_for_convert_and_check): Likewise.
2240 (match_case_to_enum_1): Likewise.
2241 (match_case_to_enum): Likewise.
2242 (c_do_switch_warnings): Likewise.
2243 (warn_for_omitted_condop): Likewise.
2244 (readonly_error): Likewise.
2245 (lvalue_error): Likewise.
2246 (invalid_indirection_error): Likewise.
2247 (warn_array_subscript_with_type_char): Likewise.
2248 (warn_about_parentheses): Likewise.
2249 (warn_for_unused_label): Likewise.
2250 (warn_for_div_by_zero): Likewise.
2251 (warn_for_memset): Likewise.
2252 (warn_for_sign_compare): Likewise.
2253 (do_warn_double_promotion): Likewise.
2254 (do_warn_unused_parameter): Likewise.
2255 (record_locally_defined_typedef): Likewise.
2256 (maybe_record_typedef_use): Likewise.
2257 (maybe_warn_unused_local_typedefs): Likewise.
2258 (maybe_warn_bool_compare): Likewise.
2259 (maybe_warn_shift_overflow): Likewise.
2260 (warn_duplicated_cond_add_or_warn): Likewise.
2261 (diagnose_mismatched_attributes): Likewise.
2262 * c-common.h: Move the declarations from c-warn.c to its own section.
2263 * c-warn.c: New file.
2264
2265 2016-10-08 Jason Merrill <jason@redhat.com>
2266
2267 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2268 into COND_EXPR in C++.
2269
2270 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2271
2272 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2273 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2274 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2275
2276 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2277
2278 Implement LWG2296 helper intrinsic
2279 * c-common.h (enum rid): Add RID_ADDRESSOF.
2280 * c-common.c (c_common_reswords): Add __builtin_addressof.
2281
2282 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2283
2284 PR c++/77700
2285 * c-common.c (c_common_truthvalue_conversion): Warn also for
2286 suspicious enum values in boolean context.
2287
2288 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2289
2290 Implement P0258R2 - helper for C++17
2291 std::has_unique_object_representations trait
2292 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2293 * c-common.c (c_common_reswords): Add
2294 __has_unique_object_representations.
2295
2296 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2297
2298 PR sanitizer/66343
2299 * c-ubsan.c (ubsan_instrument_return): Don't call
2300 initialize_sanitizer_builtins here.
2301
2302 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2303
2304 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2305 conditional expression in boolean context when only one arm is
2306 non-boolean.
2307
2308 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR sanitizer/77823
2311 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2312 is not integral.
2313
2314 * c-common.c (c_common_reswords): Update comment for C++11.
2315
2316 2016-10-04 Jason Merrill <jason@redhat.com>
2317
2318 * c-common.c (make_tree_vector_from_ctor): New.
2319 * c-common.h: Declare it.
2320
2321 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2322
2323 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2324 __LIBGCC_JCR_SECTION_NAME__.
2325
2326 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2327
2328 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2329 left shift in boolean context.
2330
2331 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2332
2333 Implement P0001R1 - C++17 removal of register storage class specifier
2334 * c.opt (Wregister): New warning.
2335 * c-opts.c (c_common_post_options): Enable -Wregister by
2336 default for C++17.
2337
2338 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2339
2340 * c-opts.c (c_common_post_options): Remove special case for
2341 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2342 in C++.
2343
2344 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2345
2346 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2347 -std=c++1z.
2348
2349 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2350
2351 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2352
2353 * c-common.c: Include memmodel.h.
2354
2355 2016-09-26 Marek Polacek <polacek@redhat.com>
2356
2357 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2358
2359 2016-09-26 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/7652
2362 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2363 (handle_fallthrough_attribute): New function.
2364 (attribute_fallthrough_p): New function.
2365 * c-common.h (attribute_fallthrough_p): Declare.
2366
2367 2016-09-24 Marek Polacek <polacek@redhat.com>
2368
2369 PR c/77490
2370 * c.opt (Wbool-operation): New.
2371
2372 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2373
2374 * c-common.c (c_common_truthvalue_conversion): Inhibit
2375 Wint-in-bool-context warning with from_macro_definition_at.
2376 Mention the expression will always evaluate to true.
2377
2378 2016-09-21 Martin Sebor <msebor@redhat.com>
2379
2380 PR bootstrap/77676
2381 * c.opt (fprintf-return-value): Temporarily initialize to zero
2382 to unblock bootstrap failures.
2383
2384 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2385
2386 PR c++/77651
2387 * c.opt (Waligned-new=): Add RejectNegative.
2388 (faligned-new=): Likewise. Spelling fix - change
2389 aligned_new_threshhold to aligned_new_threshold.
2390 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2391 to aligned_new_threshold.
2392
2393 2016-09-20 Martin Sebor <msebor@redhat.com>
2394
2395 PR middle-end/49905
2396 * c.opt: Add -Wformat-length and -fprintf-return-value.
2397
2398 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2399
2400 PR c++/77434
2401 * c.opt (Wint-in-bool-context): New warning.
2402 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2403 constants in boolean context.
2404
2405 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2406
2407 * c-common.c (max_align_t_align): Also consider alignment of
2408 float128_type_node.
2409
2410 2016-09-15 Jason Merrill <jason@redhat.com>
2411
2412 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2413 DECL_EXTERNAL.
2414
2415 2016-09-14 Jason Merrill <jason@redhat.com>
2416
2417 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2418 limit FIELD_DECL, either.
2419
2420 2016-09-14 Marek Polacek <polacek@redhat.com>
2421
2422 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2423 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2424 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2425
2426 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2427
2428 * c-common.c (warn_logical_not_parentheses): Replace
2429 rich_location::add_fixit_insert calls with add_fixit_insert_before
2430 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2431
2432 2016-09-13 Jason Merrill <jason@redhat.com>
2433 Tom de Vries <tom@codesourcery.com>
2434
2435 PR c++/77427
2436 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2437
2438 2016-09-13 Jason Merrill <jason@redhat.com>
2439
2440 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2441 limit types at all.
2442
2443 2016-09-12 Jason Merrill <jason@redhat.com>
2444
2445 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2446 bit/byte confusion, allow large alignment for types.
2447
2448 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2449
2450 PR c++/77496
2451 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2452
2453 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2454
2455 PR c/72858
2456 * c-format.c (argument_parser::check_argument_type): Add params
2457 "type_start" and "conversion_char". Use the former to generate
2458 offset_to_type_start and pass it and conversion_char to
2459 check_format_types.
2460 (check_format_info_main): Capture the start of the type
2461 information as "type_start", and pass it an format_char
2462 to arg_parser.check_argument_type.
2463 (check_format_types): Provide an example in the leading comment.
2464 Add params "offset_to_type_start" and "conversion_char"; pass
2465 them to format_type_warning calls.
2466 (test_get_modifier_for_format_len): Likewise.
2467 (matching_type_p): New function.
2468 (get_format_for_type): Add param "conversion_char" and move
2469 implementation into...
2470 (get_format_for_type_1): ...new function, called twice.
2471 Use new function matching_type_p rather than checking for
2472 TYPE_CANONICAL equality.
2473 (get_corrected_substring): New function.
2474 (format_type_warning): Provide an example in the leading comment.
2475 Add params "offset_to_type_start" and "conversion_char". Replace
2476 call to get_format_for_type with call to get_corrected_substring
2477 and move rejection of hints for widths/precisions there.
2478 (assert_format_for_type_streq): Add param "conversion_char".
2479 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2480 (test_get_format_for_type_printf): Add conversion chars to the
2481 tests, adding coverage for various combinations of integer
2482 vs double conversions, and for preserving octal and hexadecimal
2483 conversions.
2484 (test_get_format_for_type_scanf): Add conversion chars to the
2485 tests.
2486
2487 2016-09-10 Tom de Vries <tom@codesourcery.com>
2488
2489 PR C/71602
2490 * c-common.c (build_va_arg): Handle more strict
2491 targetm.canonical_va_list_type. Replace first argument type error with
2492 assert.
2493
2494 2016-09-09 Martin Sebor <msebor@redhat.com>
2495
2496 PR c/77520
2497 PR c/77521
2498 * c-format.c (argument_parser::find_format_char_info): Use %qc
2499 format directive unconditionally.
2500
2501 2016-09-09 Jason Merrill <jason@redhat.com>
2502
2503 Implement C++17 new of over-aligned types.
2504 * c.opt: Add -faligned-new and -Waligned-new.
2505 * c-common.c (max_align_t_align): Split out from...
2506 (cxx_fundamental_alignment_p): ...here.
2507 * c-common.h: Declare it.
2508 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2509
2510 2016-09-09 Joseph Myers <joseph@codesourcery.com>
2511
2512 * c-cppbuiltin.c (builtin_define_type_width): New function.
2513 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2514 macros.
2515
2516 2016-09-07 David Malcolm <dmalcolm@redhat.com>
2517
2518 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2519 a POINTER_TYPE.
2520 (substring_loc::get_location): Move to substring-locations.c,
2521 keeping implementation as...
2522 (c_get_substring_location): New function, from the above, reworked
2523 to use accessors rather than member lookup.
2524 * c-common.h (class substring_loc): Move to substring-locations.h,
2525 replacing with a forward decl.
2526 (c_get_substring_location): New decl.
2527 * c-format.c: Include "substring-locations.h".
2528 (format_warning_va): Move to substring-locations.c.
2529 (format_warning_at_substring): Likewise.
2530
2531 2016-09-06 Martin Sebor <msebor@redhat.com>
2532
2533 PR c/77336
2534 * c-format.c (check_function_format): Avoid issuing warnings for
2535 functions unless they call format functions with non-constant
2536 format strings.
2537
2538 2016-09-06 Richard Biener <rguenther@suse.de>
2539
2540 PR c/77450
2541 * c-common.c (c_common_mark_addressable_vec): Handle
2542 COMPOUND_LITERAL_EXPR.
2543
2544 2016-09-05 Marek Polacek <polacek@redhat.com>
2545
2546 PR c/77423
2547 * c-common.c (bool_promoted_to_int_p): New function.
2548 (expr_has_boolean_operands_p): New function.
2549 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2550 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2551
2552 2016-09-04 Tom de Vries <tom@codesourcery.com>
2553
2554 revert:
2555 2016-08-29 Tom de Vries <tom@codesourcery.com>
2556
2557 * c-common.c (build_va_arg): Replace first argument type error
2558 with assert.
2559
2560 2016-09-02 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/65467
2563 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2564 (c_finish_omp_for): Reject _Atomic qualified iterators.
2565
2566 2016-09-01 Martin Sebor <msebor@redhat.com>
2567
2568 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2569 size to guarantee it fits the output of the formatted function
2570 regardless of its arguments.
2571
2572 2016-09-01 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/7652
2575 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2576 FALLTHRU comments.
2577
2578 2016-08-29 Marek Polacek <polacek@redhat.com>
2579
2580 PR c/77292
2581 * c-common.c (warn_logical_not_parentheses): Don't warn for
2582 a comparison or a logical operator.
2583
2584 2016-08-29 Tom de Vries <tom@codesourcery.com>
2585
2586 * c-common.c (build_va_arg): Fix type comparison assert.
2587
2588 2016-08-29 Tom de Vries <tom@codesourcery.com>
2589
2590 * c-common.c (build_va_arg): Replace first argument type error
2591 with assert.
2592
2593 2016-08-29 Tom de Vries <tom@codesourcery.com>
2594
2595 PR c/77398
2596 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2597 with error_mark_node as va_list instead of with illegal va_list.
2598
2599 2016-08-25 Marek Polacek <polacek@redhat.com>
2600 David Malcolm <dmalcolm@redhat.com>
2601
2602 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2603 * c-common.h (warn_logical_not_parentheses): Update declaration.
2604
2605 2016-08-22 Marek Polacek <polacek@redhat.com>
2606
2607 PR c++/77321
2608 * c-common.c (warn_for_memset): Check type for null.
2609
2610 2016-08-22 Joseph Myers <joseph@codesourcery.com>
2611
2612 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
2613 _FloatNx types for suffixes for built-in functions.
2614
2615 2016-08-19 Joseph Myers <joseph@codesourcery.com>
2616
2617 PR c/32187
2618 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2619 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2620 (RID_FLOAT128X): New enum rid values.
2621 (CASE_RID_FLOATN_NX): New macro.
2622 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2623 keywords.
2624 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2625 corresponding complex types.
2626 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2627 _FloatNx and corresponding complex types.
2628 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2629 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2630 and _FloatNx types for the widest type for determining
2631 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2632 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2633 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2634 and _FloatNx types.
2635 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2636 constants.
2637 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2638 _FloatNx types.
2639
2640 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2641
2642 * c-opts.c (c_diagnostic_finalizer): Update for change to
2643 diagnostic_show_locus.
2644
2645 2016-08-18 David Malcolm <dmalcolm@redhat.com>
2646
2647 * c-common.c: Include "spellcheck.h".
2648 (cb_get_suggestion): New function.
2649 * c-common.h (cb_get_suggestion): New decl.
2650 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2651 cb_get_suggestion.
2652
2653 2016-08-18 Marek Polacek <polacek@redhat.com>
2654
2655 PR c/71514
2656 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2657 and pointer-to-VLA.
2658
2659 2016-08-16 David Malcolm <dmalcolm@redhat.com>
2660
2661 PR c/72857
2662 * c-common.c (substring_loc::get_range): Rename to...
2663 (substring_loc::get_location): ...this, converting param from a
2664 source_range * to a location_t *. Call
2665 get_source_location_for_substring rather than
2666 get_source_range_for_substring, and pass in m_caret_idx.
2667 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2668 (substring_loc::get_range): Replace with...
2669 (substring_loc::get_location): ...this.
2670 (substring_loc::set_caret_index): New method.
2671 (substring_loc): Add field m_caret_idx.
2672 * c-format.c (format_warning_va): Update for above changes.
2673 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2674 clashing with type name.
2675 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2676 (check_argument_type): Likewise.
2677 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2678 Use a copy when emitting warnings, setting the caret index from TYPE.
2679
2680 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
2681 Arnaud Charlet <charlet@adacore.com>
2682
2683 * c-ada-spec.c (dump_number): New function.
2684 (handle_escape_character): Likewise.
2685 (print_ada_macros): Add handling of constant integers and strings.
2686
2687 2016-08-12 Marek Polacek <polacek@redhat.com>
2688
2689 PR c/7652
2690 * c-common.c (scalar_to_vector): Adjust fall through comment.
2691 * c-opts.c (c_common_handle_option): Likewise.
2692 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2693 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2694 fall through comment.
2695 * cilk.c (extract_free_variables): Add FALLTHRU.
2696
2697 2016-08-10 Jason Merrill <jason@redhat.com>
2698
2699 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2700
2701 2016-08-09 Jason Merrill <jason@redhat.com>
2702
2703 * c-common.c (c_common_attribute_table): vector_size affects type
2704 identity.
2705
2706 2016-08-09 Marek Polacek <polacek@redhat.com>
2707
2708 PR c/7652
2709 * c-ada-spec.c (dump_generic_ada_node): Add return.
2710
2711 2016-08-09 Jason Merrill <jason@redhat.com>
2712
2713 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2714 C++17 constexpr lambdas.
2715
2716 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2717
2718 PR c/64955
2719 * c-common.h (selftest::c_format_c_tests): New declaration.
2720 (selftest::run_c_tests): New declaration.
2721 * c-format.c: Include "selftest.h.
2722 (format_warning_va): Add param "corrected_substring" and use
2723 it to add a replacement fix-it hint.
2724 (format_warning_at_substring): Likewise.
2725 (format_warning_at_char): Update for new param of
2726 format_warning_va.
2727 (argument_parser::check_argument_type): Pass "fki" to
2728 check_format_types.
2729 (check_format_types): Add param "fki" and pass it to
2730 format_type_warning.
2731 (deref_n_times): New function.
2732 (get_modifier_for_format_len): New function.
2733 (selftest::test_get_modifier_for_format_len): New function.
2734 (get_format_for_type): New function.
2735 (format_type_warning): Add param "fki" and use it to attempt
2736 to provide hints for argument types when calling
2737 format_warning_at_substring.
2738 (selftest::get_info): New function.
2739 (selftest::assert_format_for_type_streq): New function.
2740 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2741 (selftest::test_get_format_for_type_printf): New function.
2742 (selftest::test_get_format_for_type_scanf): New function.
2743 (selftest::c_format_c_tests): New function.
2744
2745 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2746
2747 PR c/52952
2748 * c-format.c: Include "diagnostic.h".
2749 (location_column_from_byte_offset): Delete.
2750 (location_from_offset): Delete.
2751 (format_warning_va): New function.
2752 (format_warning_at_substring): New function.
2753 (format_warning_at_char): New function.
2754 (check_format_arg): Capture location of format_tree and pass to
2755 check_format_info_main.
2756 (argument_parser): Add fields "start_of_this_format" and
2757 "format_string_cst".
2758 (flag_chars_t::validate): Add param "format_string_cst". Convert
2759 warning_at call using location_from_offset to call to
2760 format_warning_at_char.
2761 (argument_parser::argument_parser): Add param "format_string_cst_"
2762 and use use it to initialize field "format_string_cst".
2763 Initialize new field "start_of_this_format".
2764 (argument_parser::read_format_flags): Convert warning_at call
2765 using location_from_offset to a call to format_warning_at_char.
2766 (argument_parser::read_any_format_left_precision): Likewise.
2767 (argument_parser::read_any_format_precision): Likewise.
2768 (argument_parser::read_any_other_modifier): Likewise.
2769 (argument_parser::find_format_char_info): Likewise, in three places.
2770 (argument_parser::parse_any_scan_set): Likewise, in one place.
2771 (argument_parser::handle_conversions): Likewise, in two places.
2772 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2773 and use it to make a substring_loc. Pass the latter to
2774 check_format_types.
2775 (check_format_info_main): Add params "fmt_param_loc" and
2776 "format_string_cst". Convert warning_at calls using
2777 location_from_offset to calls to format_warning_at_char. Pass the
2778 new params to the arg_parser ctor. Pass "format_string_cst" to
2779 flag_chars.validate. Pass "fmt_param_loc" to
2780 arg_parser.check_argument_type.
2781 (check_format_types): Convert first param from a location_t
2782 to a const substring_loc & and rename to "fmt_loc". Attempt
2783 to extract the range of the relevant parameter and pass it
2784 to format_type_warning.
2785 (format_type_warning): Convert first param from a location_t
2786 to a const substring_loc & and rename to "fmt_loc". Add
2787 params "param_range" and "type". Replace calls to warning_at
2788 with calls to format_warning_at_substring.
2789
2790 2016-08-08 David Malcolm <dmalcolm@redhat.com>
2791
2792 * c-format.c (class flag_chars_t): New class.
2793 (struct length_modifier): New struct.
2794 (class argument_parser): New class.
2795 (flag_chars_t::flag_chars_t): New ctor.
2796 (flag_chars_t::has_char_p): New method.
2797 (flag_chars_t::add_char): New method.
2798 (flag_chars_t::validate): New method.
2799 (flag_chars_t::get_alloc_flag): New method.
2800 (flag_chars_t::assignment_suppression_p): New method.
2801 (argument_parser::argument_parser): New ctor.
2802 (argument_parser::read_any_dollar): New method.
2803 (argument_parser::read_format_flags): New method.
2804 (argument_parser::read_any_format_width): New method.
2805 (argument_parser::read_any_format_left_precision): New method.
2806 (argument_parser::read_any_format_precision): New method.
2807 (argument_parser::handle_alloc_chars): New method.
2808 (argument_parser::read_any_length_modifier): New method.
2809 (argument_parser::read_any_other_modifier): New method.
2810 (argument_parser::find_format_char_info): New method.
2811 (argument_parser::validate_flag_pairs): New method.
2812 (argument_parser::give_y2k_warnings): New method.
2813 (argument_parser::parse_any_scan_set): New method.
2814 (argument_parser::handle_conversions): New method.
2815 (argument_parser::check_argument_type): New method.
2816 (check_format_info_main): Introduce classes argument_parser
2817 and flag_chars_t, moving the code within the loop into methods
2818 of these classes. Make various locals "const".
2819
2820 2016-08-05 David Malcolm <dmalcolm@redhat.com>
2821
2822 * c-common.c: Include "substring-locations.h".
2823 (get_cpp_ttype_from_string_type): New function.
2824 (g_string_concat_db): New global.
2825 (substring_loc::get_range): New method.
2826 * c-common.h (g_string_concat_db): New declaration.
2827 (class substring_loc): New class.
2828 * c-lex.c (lex_string): When concatenating strings, capture the
2829 locations of all tokens using a new obstack, and record the
2830 concatenation locations within g_string_concat_db.
2831 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2832 on the ggc-heap.
2833
2834 2016-07-29 Marek Polacek <polacek@redhat.com>
2835
2836 PR c/71926
2837 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2838 parentheses warning.
2839
2840 PR c/71574
2841 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2842
2843 2016-07-28 Martin Liska <mliska@suse.cz>
2844
2845 PR gcov-profile/68025
2846 * c-common.c (handle_no_profile_instrument_function_attribute):
2847
2848 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2849
2850 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2851 BITS_PER_UNIT_LOG.
2852
2853 2016-07-25 Jason Merrill <jason@redhat.com>
2854
2855 PR c++/65970
2856 * c.opt (fconstexpr-loop-limit): New.
2857
2858 2016-07-22 Martin Sebor <msebor@redhat.com>
2859
2860 PR c++/71675
2861 * c-common.c (resolve_overloaded_builtin): Avoid converting
2862 __atomic_compare_exchange_n return type to that of what its
2863 first argument points to.
2864
2865 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
2866
2867 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2868 ~(unsigned HOST_WIDE_INT) 0.
2869
2870 2016-07-22 Martin Liska <mliska@suse.cz>
2871
2872 PR gcov-profile/69028
2873 PR gcov-profile/62047
2874 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2875 to the current_function_decl.
2876
2877 2016-07-21 Jason Merrill <jason@redhat.com>
2878
2879 PR c++/65168
2880 * c-common.c (c_common_truthvalue_conversion): Check
2881 c_inhibit_evaluation_warnings for warning about address of
2882 reference.
2883
2884 2016-07-20 David Malcolm <dmalcolm@redhat.com>
2885
2886 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2887 const char *.
2888
2889 2016-07-15 Jason Merrill <jason@redhat.com>
2890
2891 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2892
2893 2016-07-15 Jakub Jelinek <jakub@redhat.com>
2894
2895 PR c/71858
2896 * c-common.h (enum lookup_name_fuzzy_kind): Add
2897 FUZZY_LOOKUP_FUNCTION_NAME.
2898
2899 2016-07-08 Jason Merrill <jason@redhat.com>
2900
2901 P0145: Refining Expression Order for C++.
2902 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2903 * c-opts.c: Adjust.
2904
2905 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2906
2907 PR c++/71214
2908 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2909
2910 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2911
2912 * c-pragma.h (enum pragma_kind): Rename
2913 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2914 users.
2915
2916 2016-06-29 Richard Biener <rguenther@suse.de>
2917
2918 PR middle-end/71002
2919 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2920
2921 2016-06-24 Jason Merrill <jason@redhat.com>
2922
2923 P0145R2: Refining Expression Order for C++.
2924 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2925 MODIFY_EXPR.
2926
2927 2016-06-24 Jakub Jelinek <jakub@redhat.com>
2928
2929 * c-common.c (check_builtin_function_arguments): Require last
2930 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2931 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2932 if the last argument is pointer to enumerated or boolean type.
2933
2934 2016-06-22 David Malcolm <dmalcolm@redhat.com>
2935
2936 PR c/70339
2937 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2938 (lookup_name_fuzzy): New prototype.
2939
2940 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
2941
2942 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2943
2944 2016-06-14 Jason Merrill <jason@redhat.com>
2945
2946 P0145R2: Refining Expression Order for C++.
2947 * c.opt (fargs-in-order): New.
2948 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2949
2950 2016-06-13 Jakub Jelinek <jakub@redhat.com>
2951
2952 PR sanitizer/71498
2953 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2954 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2955
2956 PR preprocessor/71183
2957 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2958 to cb_get_source_date_epoch.
2959
2960 2016-06-10 Jakub Jelinek <jakub@redhat.com>
2961
2962 PR c/68657
2963 * c.opt (Wpsabi): Add Warning flag.
2964
2965 2016-06-10 Martin Sebor <msebor@redhat.com>
2966
2967 PR c/71392
2968 * c-common.c (handle_nonnull_attribute): Accept
2969 the nonnull attribute in type-generic builtins.
2970
2971 2016-06-09 Martin Sebor <msebor@redhat.com>
2972
2973 PR c/70883
2974 * c-common.c (builtin_function_validate_nargs): Make text of error
2975 message consistent with others like it.
2976
2977 2016-06-08 Martin Sebor <msebor@redhat.com>
2978 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR c++/70507
2981 PR c/68120
2982 * c-common.c (check_builtin_function_arguments): Handle
2983 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2984
2985 2016-06-08 Richard Biener <rguenther@suse.de>
2986
2987 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2988
2989 2016-06-07 Richard Biener <rguenther@suse.de>
2990
2991 PR c/61564
2992 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2993 options and warn about others.
2994
2995 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
2996
2997 * c-common.c (get_source_date_epoch): Rename to
2998 cb_get_source_date_epoch.
2999 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3000 message when the parsing fails. Use error_at instead of fatal_error.
3001 * c-common.h (get_source_date_epoch): Rename to
3002 cb_get_source_date_epoch.
3003 * c-common.h (cb_get_source_date_epoch): Prototype.
3004 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3005 * c-common.h (c_omp_region_type): Remove trailing comma.
3006 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3007 * c-lex.c (c_lex_with_flags): Remove initialization of
3008 pfile->source_date_epoch.
3009
3010 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3011
3012 PR c++/71349
3013 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3014 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3015 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3016 instead of C_OMP_CLAUSE_SPLIT_FOR.
3017
3018 2016-05-24 Richard Biener <rguenther@suse.de>
3019
3020 PR middle-end/70434
3021 PR c/69504
3022 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3023 (convert_vector_to_array_for_subscript): ... this.
3024 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3025 VIEW_CONVERT_EXPR to an array type. Rename to ...
3026 (convert_vector_to_array_for_subscript): ... this.
3027
3028 2016-05-12 Marek Polacek <polacek@redhat.com>
3029
3030 PR c/70756
3031 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3032 size_in_bytes and pass LOC to it.
3033
3034 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3035
3036 PR c/43651
3037 * c.opt (Wduplicate-decl-specifier): New option.
3038
3039 2016-05-11 Marek Polacek <polacek@redhat.com>
3040
3041 PR c++/71024
3042 * c-common.c (diagnose_mismatched_attributes): New function.
3043 * c-common.h (diagnose_mismatched_attributes): Declare.
3044
3045 2016-05-04 Marek Polacek <polacek@redhat.com>
3046
3047 * c.opt (Wdangling-else): New option.
3048
3049 2016-05-03 Marek Polacek <polacek@redhat.com>
3050
3051 PR c/70859
3052 * c-common.c (builtin_function_validate_nargs): Add location
3053 parameter. Use it.
3054 (check_builtin_function_arguments): Add location and arguments
3055 parameters. Use them.
3056 * c-common.h (check_builtin_function_arguments): Update declaration.
3057
3058 2016-05-03 Richard Biener <rguenther@suse.de>
3059
3060 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3061 allow call args to gimplify to SSA names.
3062
3063 2016-05-03 Marek Polacek <polacek@redhat.com>
3064
3065 * c-common.h (enum c_omp_region_type): Remove stray comma.
3066
3067 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3068
3069 * c-common.h (enum c_omp_region_type): Define.
3070
3071 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3072
3073 * c-common.c (shorten_compare): Use wi::to_wide.
3074
3075 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3076
3077 PR middle-end/70626
3078 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3079 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3080 reduction clauses in acc parallel loops.
3081
3082 2016-04-29 Marek Polacek <polacek@redhat.com>
3083
3084 PR c/70852
3085 * c-common.c (warn_for_memset): Check domain before accessing it.
3086
3087 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3088
3089 PR/69089
3090 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3091 "aligned" attribute.
3092
3093 2016-04-28 Jason Merrill <jason@redhat.com>
3094
3095 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3096
3097 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3098 Matthias Klose <doko@debian.org>
3099
3100 * c-common.c (get_source_date_epoch): New function, gets the environment
3101 variable SOURCE_DATE_EPOCH and parses it as long long with error
3102 handling.
3103 * c-common.h (get_source_date_epoch): Prototype.
3104 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3105
3106 2015-04-27 Ryan Burn <contact@rnburn.com>
3107
3108 PR c++/69024
3109 PR c++/68997
3110 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3111 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3112 external linkage.
3113 (cilk_detect_and_unwrap): Corresponding changes.
3114 (extract_free_variables): Don't extract free variables from
3115 AGGR_INIT_EXPR slot.
3116 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3117 (cilk_recognize_spawn): Likewise.
3118
3119 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3120
3121 * c.opt (Wmemset-elt-size): New option.
3122 * c-common.c (warn_for_memset): New function.
3123 * c-common.h (warn_for_memset): Declare.
3124
3125 2016-04-25 Jason Merrill <jason@redhat.com>
3126
3127 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3128 No longer static.
3129 * c-common.h: Declare it.
3130 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3131
3132 2016-04-22 Jason Merrill <jason@redhat.com>
3133
3134 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3135
3136 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3137
3138 PR c++/69363
3139 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3140 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3141
3142 2016-04-18 Michael Matz <matz@suse.de>
3143
3144 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3145 and SET_DECL_ALIGN.
3146
3147 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3148
3149 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3150 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3151 to incomplete types.
3152 (dump_nested_type): Remove redundant tests and tidy up.
3153 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3154 a type which is the typedef of an original type.
3155
3156 2016-04-15 Marek Polacek <polacek@redhat.com>
3157
3158 PR c/70651
3159 * c-common.c (build_va_arg): Change two asserts into errors and return
3160 error_mark_node.
3161
3162 2016-04-13 Marek Polacek <polacek@redhat.com>
3163
3164 PR c++/70639
3165 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3166 for switch statements, too.
3167
3168 2016-03-28 Jason Merrill <jason@redhat.com>
3169
3170 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3171
3172 2016-03-23 Marek Polacek <polacek@redhat.com>
3173
3174 PR c++/69884
3175 * c.opt (Wignored-attributes): New option.
3176
3177 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3178
3179 PR c/69993
3180 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3181 diagnostic text, reversing the order of the warning and note so
3182 that they appear in source order.
3183
3184 2016-03-17 Marek Polacek <polacek@redhat.com>
3185
3186 PR c/69407
3187 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3188 operations.
3189
3190 2016-03-14 Jason Merrill <jason@redhat.com>
3191
3192 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3193
3194 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3195
3196 2016-03-09 Richard Biener <rguenther@suse.de>
3197
3198 PR c/70143
3199 * c-common.c (strict_aliasing_warning): Add back
3200 alias_sets_conflict_p check.
3201
3202 2016-03-08 Jason Merrill <jason@redhat.com>
3203
3204 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3205
3206 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3207
3208 PR c/68187
3209 * c-indentation.c (get_visual_column): Move code to determine next
3210 tab stop to...
3211 (next_tab_stop): ...this new function.
3212 (line_contains_hash_if): Delete function.
3213 (detect_preprocessor_logic): Delete function.
3214 (get_first_nws_vis_column): New function.
3215 (detect_intervening_unindent): New function.
3216 (should_warn_for_misleading_indentation): Replace call to
3217 detect_preprocessor_logic with a call to
3218 detect_intervening_unindent.
3219
3220 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3221
3222 PR c/68187
3223 * c-indentation.c (should_warn_for_misleading_indentation): When
3224 suppressing warnings about cases where the guard and body are on
3225 the same column, only use the first non-whitespace column in place
3226 of the guard token column when dealing with "else" clauses.
3227 When rejecting aligned BODY and NEXT, loosen the requirement
3228 from equality with the first non-whitespace of guard to simply
3229 that they not be indented relative to it.
3230
3231 2016-03-04 Richard Biener <rguenther@suse.de>
3232
3233 PR c++/70054
3234 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3235 instead of alias_sets_conflict_p.
3236
3237 2016-03-01 Marek Polacek <polacek@redhat.com>
3238
3239 PR c++/69795
3240 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3241 any DECL.
3242
3243 2016-02-22 Martin Sebor <msebor@redhat.com>
3244
3245 PR middle-end/69780
3246 * c-common.c (check_builtin_function_arguments): Validate and
3247 reject invalid arguments to __builtin_alloca_with_align.
3248
3249 2016-02-20 Mark Wielaard <mjw@redhat.com>
3250
3251 PR c/28901
3252 * c.opt (Wunused-const-variable): Turn into Alias for...
3253 (Wunused-const-variable=): New option.
3254
3255 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3256
3257 PR c++/69865
3258 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3259 here...
3260 (c_common_init_options): ...to here.
3261 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3262
3263 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3264
3265 PR c++/69826
3266 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3267 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3268 flag_preprocess_only.
3269
3270 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3271
3272 PR c/69835
3273 * c.opt (Wnonnull-compare): Enable for -Wall.
3274
3275 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3276
3277 PR c++/69797
3278 * c-common.c (sync_resolve_size): Diagnose too few arguments
3279 even when params is non-NULL empty vector.
3280
3281 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3282
3283 PR target/60410
3284 * c.opt (fshort-double): Remove.
3285
3286 2016-02-05 Martin Sebor <msebor@redhat.com>
3287
3288 PR c++/69662
3289 * c.opt (Warning options): Update -Wplacement-new to take
3290 an optional argument.
3291
3292 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3293
3294 PR preprocessor/69543
3295 PR c/69558
3296 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3297 instead of loc to control_warning_option.
3298
3299 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3300
3301 * c.opt (fopenacc-dim=): New option.
3302
3303 2016-01-27 Ryan Burn <contact@rnburn.com>
3304
3305 PR cilkplus/69267
3306 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3307 gimplify_arg. Removed superfluous post_p argument.
3308 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3309 superfluous post_p argument.
3310 * c-gimplify.c (c_gimplify_expr): Likewise.
3311
3312 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3313
3314 PR other/69006
3315 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3316 pp_newline_and_flush with pp_flush.
3317
3318 2016-01-20 Martin Sebor <msebor@redhat.com>
3319
3320 PR c/69405
3321 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3322 an incompatible argument when the argument isn't a valid tree node.
3323
3324 2016-01-18 Jason Merrill <jason@redhat.com>
3325
3326 PR c++/68767
3327 * c-common.c (check_function_arguments_recurse): Fold the whole
3328 COND_EXPR, not just the condition.
3329
3330 2016-01-18 Tom de Vries <tom@codesourcery.com>
3331
3332 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3333 classify as loop clause.
3334
3335 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3336
3337 PR bootstrap/68271
3338 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3339 C++ FE no longer has limit on number of pragmas.
3340
3341 2015-01-14 Ryan Burn <contact@rnburn.com>
3342
3343 PR c++/69048
3344 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3345 to add missing cleanup point.
3346
3347 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3348
3349 PR c++/68819
3350 * c-indentation.c (get_visual_column): Add location_t param.
3351 Handle the column number being zero by effectively disabling the
3352 warning, with an "inform".
3353 (should_warn_for_misleading_indentation): Add location_t argument
3354 for all uses of get_visual_column.
3355
3356 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3357
3358 PR c++/69029
3359 * c-indentation.c (should_warn_for_misleading_indentation):
3360 Don't warn about do-while statements.
3361
3362 2016-01-07 Martin Sebor <msebor@redhat.com>
3363
3364 PR c/68966
3365 * c-common.c (sync_resolve_size): Reject first argument when it's
3366 a pointer to _Bool.
3367
3368 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3369
3370 PR c/69122
3371 * c-indentation.c (get_visual_column): Remove default argument.
3372 (should_warn_for_misleading_indentation): For the multiline case,
3373 update call to get_visual_column for next_stmt_exploc so that it
3374 captures the location of the first non-whitespace character in the
3375 relevant line. Don't issue warnings if there is non-whitespace
3376 before the next statement.
3377
3378 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3379
3380 Update copyright years.
3381
3382 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3383
3384 * c-common.c (binary_op_error): Convert first param from
3385 location_t to rich_location * and use it when emitting an error.
3386 * c-common.h (binary_op_error): Convert first param from
3387 location_t to rich_location *.
3388
3389 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3390
3391 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3392 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3393
3394 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3395
3396 * c-common.c (c_common_attribute_table): Handle "omp declare target
3397 link" attribute.
3398
3399 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3400
3401 PR c/68833
3402 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3403
3404 2014-12-12 Tobias Burnus <burnus@net-b.de>
3405
3406 PR fortran/68815
3407 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3408 specifiers (%d, %i,%u and %c).
3409
3410 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3411
3412 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3413
3414 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3415
3416 PR c/48088
3417 PR c/68657
3418 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3419 * c-pragma.c (handle_pragma_diagnostic): Adjust
3420 control_warning_option caller.
3421
3422 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3423
3424 * c-common.c (c_cpp_error): Update for change to
3425 rich_location::set_range.
3426
3427 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3428
3429 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3430 shifting 1 out of the sign bit.
3431
3432 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3433
3434 * c-common.c (c_common_attribute_table[]): Update max arguments
3435 count for "simd" attribute.
3436 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3437
3438 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3439
3440 PR preprocessor/57580
3441 * c-ppoutput.c (print): Change printed field to bool.
3442 Move src_file last for smaller padding.
3443 (init_pp_output): Set print.printed to false instead of 0.
3444 (scan_translation_unit): Fix up formatting. Set print.printed
3445 to true after printing something other than newline.
3446 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3447 (maybe_print_line_1): Set print.printed to false instead of 0.
3448 (print_line_1): Likewise.
3449 (do_line_change): Set print.printed to true instead of 1.
3450 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3451 dump_macro): Set print.printed to false after printing newline.
3452
3453 2015-12-02 Jason Merrill <jason@redhat.com>
3454
3455 * c-common.c (fold_for_warn): New.
3456 (warn_logical_operator, warn_tautological_cmp)
3457 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3458
3459 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3460 (c_fully_fold_internal, decl_constant_value_for_optimization):
3461 Move to c/c-fold.c.
3462 * c-common.h: Don't declare decl_constant_value_for_optimization.
3463
3464 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3465
3466 PR c/68162
3467 * c-common.h (c_build_qualified_type): Add extra default
3468 arguments.
3469
3470 2015-12-01 Julian Brown <julian@codesourcery.com>
3471 Cesar Philippidis <cesar@codesourcery.com>
3472 James Norris <James_Norris@mentor.com>
3473
3474 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3475 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3476 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3477
3478 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3479
3480 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3481 (decl_sloc_common): Delete and move bulk of processing to...
3482 (decl_sloc): ...here.
3483 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3484 (dump_ada_double_name): Remove S parameter and compute the suffix.
3485 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3486 element type and deal with an anonymous one.
3487 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3488 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3489 and remove reference to QUAL_UNION_TYPE.
3490 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3491 (dump_nested_type): ...here. New function extracted from above.
3492 Generate a full declaration for anonymous element type of arrays.
3493 (print_ada_declaration): Really skip anonymous declarations. Remove
3494 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3495 Clean up processing of declarations of array types and objects.
3496 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3497 Remove obsolete code and tidy up.
3498
3499 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
3500
3501 PR c/67581
3502 * c-common.c (handle_transparent_union_attribute): Update
3503 also type variants.
3504
3505 2015-11-27 Martin Liska <mliska@suse.cz>
3506
3507 PR c++/68312
3508 * array-notation-common.c (cilkplus_extract_an_triplets):
3509 Release vector of vectors.
3510 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3511
3512 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3513
3514 PR c++/68527
3515 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3516 (print_ada_struct_decl): Likewise.
3517
3518 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3519
3520 PR c++/68001
3521 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3522 * cilk.c (recognize_spawn): Determine location in a more precise
3523 way.
3524
3525 2015-11-19 Jason Merrill <jason@redhat.com>
3526
3527 * c-common.c (shorten_compare): But look through macros from
3528 system headers.
3529
3530 2015-11-18 Jason Merrill <jason@redhat.com>
3531
3532 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3533 non-constant operand comes from a macro.
3534
3535 2015-11-17 Jason Merrill <jason@redhat.com>
3536
3537 PR bootstrap/68346
3538 * c-common.c (warn_tautological_cmp): Fold before checking for
3539 constants.
3540
3541 2015-11-16 Marek Polacek <polacek@redhat.com>
3542
3543 PR c++/68362
3544 * c-common.c (check_case_bounds): Fold low and high cases.
3545
3546 2015-11-16 Marek Polacek <polacek@redhat.com>
3547
3548 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3549 * c-common.c (c_common_get_alias_set): Likewise.
3550 (handle_visibility_attribute): Likewise.
3551
3552 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3553
3554 * c-common.c (handle_simd_attribute): New.
3555 (struct attribute_spec): Add entry for "simd".
3556 (handle_simd_attribute): New.
3557
3558 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
3559
3560 * c-lex.c (interpret_float): Use fold_convert.
3561
3562 2015-11-13 David Malcolm <dmalcolm@redhat.com>
3563
3564 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3565 and store it on the result.
3566 * c-opts.c (c_common_init_options): Set
3567 global_dc->colorize_source_p.
3568
3569 2015-11-12 James Norris <jnorris@codesourcery.com>
3570 Joseph Myers <joseph@codesourcery.com>
3571
3572 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
3573 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3574 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3575 PRAGMA_OACC_CLAUSE_LINK.
3576
3577 2015-11-11 Marek Polacek <polacek@redhat.com>
3578
3579 PR c/68107
3580 PR c++/68266
3581 * c-common.c (valid_array_size_p): New function.
3582 * c-common.h (valid_array_size_p): Declare.
3583
3584 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
3585
3586 PR bootstrap/68271
3587 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3588
3589 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
3590
3591 * array-notation-common.c: Remove unused header files.
3592 * c-ada-spec.c: Likewise.
3593 * c-cilkplus.c: Likewise.
3594 * c-common.c: Likewise.
3595 * c-cppbuiltin.c: Likewise.
3596 * c-dump.c: Likewise.
3597 * c-format.c: Likewise.
3598 * c-gimplify.c: Likewise.
3599 * c-indentation.c: Likewise.
3600 * c-lex.c: Likewise.
3601 * c-omp.c: Likewise.
3602 * c-opts.c: Likewise.
3603 * c-pch.c: Likewise.
3604 * c-ppoutput.c: Likewise.
3605 * c-pragma.c: Likewise.
3606 * c-pretty-print.c: Likewise.
3607 * c-semantics.c: Likewise.
3608 * c-ubsan.c: Likewise.
3609 * cilk.c: Likewise.
3610 * stub-objc.c: Likewise.
3611
3612 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3613 Cesar Philippidis <cesar@codesourcery.com>
3614 James Norris <jnorris@codesourcery.com>
3615 Julian Brown <julian@codesourcery.com>
3616 Nathan Sidwell <nathan@codesourcery.com>
3617
3618 * c-pragma.c (oacc_pragmas): Add "routine".
3619 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3620
3621 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3622
3623 * c-common.c (c_common_attributes): Add scalar_storage_order.
3624 (handle_scalar_storage_order_attribute): New function.
3625 * c-pragma.c (global_sso): New variable.
3626 (maybe_apply_pragma_scalar_storage_order): New function.
3627 (handle_pragma_scalar_storage_order): Likewise.
3628 (init_pragma): Register scalar_storage_order.
3629 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3630 * c.opt (Wscalar-storage-order): New warning.
3631 (fsso-struct=): New option.
3632
3633 2015-11-08 Martin Sebor <msebor@redhat.com>
3634
3635 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3636
3637 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3638
3639 * c-common.c: Don't undef DEF_BUILTIN.
3640
3641 2015-11-06 David Malcolm <dmalcolm@redhat.com>
3642
3643 * c-common.c (c_cpp_error): Convert parameter from location_t to
3644 rich_location *. Eliminate the "column_override" parameter and
3645 the call to diagnostic_override_column.
3646 Update the "done_lexing" clause to set range 0
3647 on the rich_location, rather than overwriting a location_t.
3648 * c-common.h (c_cpp_error): Convert parameter from location_t to
3649 rich_location *. Eliminate the "column_override" parameter.
3650
3651 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3652 Thomas Schwinge <thomas@codesourcery.com>
3653 James Norris <jnorris@codesourcery.com>
3654
3655 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3656 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3657 clauses with parallel and kernels and loops.
3658 * c-pragma.h (enum pragma_omp_clause): Add entries for
3659 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3660 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3661 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3662 INDEPENDENT,SEQ}.
3663 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3664
3665 2015-11-05 Martin Sebor <msebor@redhat.com>
3666
3667 PR c++/67942
3668 * c.opt (-Wplacement-new): New option.
3669
3670 2015-11-05 Jakub Jelinek <jakub@redhat.com>
3671
3672 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3673 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3674 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3675 save_expr or create_tmp_var* if TEST is true.
3676 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3677 Don't call add_stmt here.
3678 (struct c_omp_check_loop_iv_data): New type.
3679 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3680 c_omp_check_loop_iv_exprs): New functions.
3681 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3682 distribute.
3683 (c_omp_declare_simd_clauses_to_numbers): Change
3684 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3685 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3686 from numbers to PARM_DECLs.
3687
3688 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3689
3690 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3691 flag_checking.
3692
3693 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
3694
3695 PR c++-common/67882
3696 * c-common.h (fold_offsetof_1): Add argument.
3697 * c-common.c (fold_offsetof_1): Diagnose more invalid
3698 offsetof expressions that reference elements past the end of
3699 an array.
3700
3701 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3702 Chung-Lin Tang <cltang@codesourcery.com>
3703
3704 * c-pragma.c (oacc_pragmas): Add "atomic".
3705 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3706
3707 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3708
3709 * c-common.c (handle_target_clones_attribute): New.
3710 (c_common_attribute_table): Add handle_target_clones_attribute.
3711 (handle_always_inline_attribute): Add check on target_clones attribute.
3712 (handle_target_attribute): Ditto.
3713
3714 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
3715
3716 * array-notation-common.c: Reorder #include's and remove duplicates.
3717 * c-ada-spec.c: Likewise.
3718 * c-cilkplus.c: Likewise.
3719 * c-common.c: Likewise.
3720 * c-cppbuiltin.c: Likewise.
3721 * c-dump.c: Likewise.
3722 * c-format.c: Likewise.
3723 * c-gimplify.c: Likewise.
3724 * c-indentation.c: Likewise.
3725 * c-lex.c: Likewise.
3726 * c-omp.c: Likewise.
3727 * c-opts.c: Likewise.
3728 * c-pch.c: Likewise.
3729 * c-ppoutput.c: Likewise.
3730 * c-pragma.c: Likewise.
3731 * c-pretty-print.c: Likewise.
3732 * c-semantics.c: Likewise.
3733 * c-ubsan.c: Likewise.
3734 * cilk.c: Likewise.
3735 * stub-objc.c: Likewise.
3736
3737 2015-10-28 Jason Merrill <jason@redhat.com>
3738
3739 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3740
3741 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3742 James Norris <jnorris@codesourcery.com>
3743 Cesar Philippidis <cesar@codesourcery.com>
3744
3745 PR c/64765
3746 PR c/64880
3747 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3748 * c-omp.c (c_oacc_split_loop_clauses): New function.
3749
3750 2015-10-21 Martin Sebor <msebor@redhat.com>
3751
3752 PR driver/68043
3753 * c.opt: End each sentence that describes an option with a period.
3754
3755 2015-10-20 Marek Polacek <polacek@redhat.com>
3756
3757 * array-notation-common.c (is_cilkplus_vector_p): Define.
3758 * c-common.h (is_cilkplus_vector_p): Declare.
3759
3760 2015-10-20 Marek Polacek <polacek@redhat.com>
3761
3762 * c.opt (std=gnu++11): Do not describe as experimental.
3763 (std=gnu++14): Likewise.
3764
3765 2015-10-19 Jason Merrill <jason@redhat.com>
3766
3767 * c-cppbuiltin.c (c_cpp_builtins): Define
3768 __cpp_nontype_template_args.
3769
3770 2015-10-19 Jason Merrill <jason@redhat.com>
3771
3772 * c-cppbuiltin.c (c_cpp_builtins): Define
3773 __cpp_enumerator_attributes, __cpp_fold_expressions,
3774 __cpp_unicode_characters.
3775
3776 2015-10-13 Jakub Jelinek <jakub@redhat.com>
3777 Aldy Hernandez <aldyh@redhat.com>
3778
3779 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3780 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3781 (c_define_builtins): Likewise.
3782 * c-common.h (enum c_omp_clause_split): Add
3783 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3784 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3785 (c_finish_omp_for): Add ORIG_DECLV argument.
3786 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3787 201511 instead of 201307.
3788 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3789 OMP_CRITICAL_CLAUSES to it.
3790 (c_finish_omp_ordered): Add CLAUSES argument, set
3791 OMP_ORDERED_CLAUSES to it.
3792 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3793 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3794 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3795 constructs and new OpenMP 4.5 clauses. Clear
3796 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3797 verification code.
3798 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3799 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3800 (enum pragma_omp_clause): Add
3801 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3802 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3803
3804 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3805
3806 * c-lex.c (interpret_float): Use real_equal instead of
3807 REAL_VALUES_EQUAL.
3808
3809 2015-10-04 Jason Merrill <jason@redhat.com>
3810
3811 Implement N4514, C++ Extensions for Transactional Memory.
3812 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3813 (c_common_attribute_table): Add transaction_safe_dynamic.
3814 transaction_safe now affects type identity.
3815 (handle_tm_attribute): Handle transaction_safe_dynamic.
3816 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3817 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3818 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3819 (D_TRANSMEM): New.
3820 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3821 * c-pretty-print.c (pp_c_attributes_display): Don't print
3822 transaction_safe in C++.
3823
3824 2015-10-02 Marek Polacek <polacek@redhat.com>
3825
3826 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3827
3828 2015-10-02 Marek Polacek <polacek@redhat.com>
3829
3830 PR c/64249
3831 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3832 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3833 * c.opt (Wduplicated-cond): New option.
3834
3835 2015-10-01 Joseph Myers <joseph@codesourcery.com>
3836
3837 * c.opt (std=c11): Do not describe as experimental.
3838 (std=gnu11): Likewise.
3839 (std=iso9899:2011): Likewise.
3840
3841 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3842
3843 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3844 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3845
3846 2015-09-25 Marek Polacek <polacek@redhat.com>
3847
3848 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3849 (ubsan_instrument_shift): Likewise.
3850
3851 2015-09-25 Marek Polacek <polacek@redhat.com>
3852
3853 PR sanitizer/64906
3854 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3855
3856 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3857
3858 * c-indentation.c (should_warn_for_misleading_indentation):
3859 Compare next_stmt_vis_column with guard_line_first_nws instead
3860 of with guard_line_vis_column.
3861
3862 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3863
3864 PR c/49654
3865 PR c/49655
3866 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3867 options and options not valid for the current language.
3868
3869 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3870
3871 * c-indentation.c (should_warn_for_misleading_indentation):
3872 Float out and consolidate the calls to get_visual_column that
3873 are passed guard_exploc as an argument. Compare
3874 next_stmt_vis_column with guard_line_first_nws instead of with
3875 body_line_first_nws.
3876
3877 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3878
3879 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3880 Wnamespaces): New C++ warnings.
3881
3882 2015-09-22 Jason Merrill <jason@redhat.com>
3883
3884 * c-common.h (abi_compat_version_crosses): New.
3885 (warn_abi_version): Declare.
3886 * c-common.c: Define it.
3887 * c-opts.c (c_common_post_options): Handle it.
3888 flag_abi_compat_version defaults to 8.
3889
3890 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3891
3892 Complete the implementation of N4230, Nested namespace definition.
3893 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3894 __cpp_nested_namespace_definitions.
3895
3896 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3897
3898 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3899
3900 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3901
3902 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3903 when warning.
3904 * c-pragma.h (pragma_lex): Add optional loc argument.
3905
3906 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3907
3908 * c-format.c (check_format_arg): Adjust to use common block size in all
3909 object pools.
3910
3911 2015-09-15 David Malcolm <dmalcolm@redhat.com>
3912
3913 * c-format.c (location_from_offset): Update for change in
3914 signature of location_get_source_line.
3915 * c-indentation.c (get_visual_column): Likewise.
3916 (line_contains_hash_if): Likewise.
3917
3918 2015-09-14 Marek Polacek <polacek@redhat.com>
3919
3920 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3921 setting various warnings.
3922
3923 2015-09-14 Marek Polacek <polacek@redhat.com>
3924
3925 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3926 a negative value.
3927
3928 2015-09-11 Mark Wielaard <mjw@redhat.com>
3929
3930 PR c/28901
3931 * c.opt (Wunused-variable): Option from common.opt.
3932 (Wunused-const-variable): New option.
3933
3934 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3935
3936 PR c++/53184
3937 * c.opt ([Wsubobject-linkage]): Add.
3938
3939 2015-09-03 Martin Sebor <msebor@redhat.com>
3940
3941 PR c/66516
3942 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3943 functions.
3944 * c-common.c (reject_gcc_builtin): Define.
3945
3946 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3947
3948 PR middle-end/60586
3949 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3950 prototype.
3951 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3952 cilk_gimplify_call_params_in_spawned_fn.
3953 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3954 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3955 unwrapping.
3956
3957 2015-08-25 Marek Polacek <polacek@redhat.com>
3958
3959 PR middle-end/67330
3960 * c-common.c (handle_weak_attribute): Don't check whether the
3961 visibility can be changed here.
3962
3963 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3964
3965 * c-lex.c (c_lex_with_flags): Use explicit locations.
3966
3967 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3968
3969 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3970 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3971
3972 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3973
3974 PR middle-end/36757
3975 * c-common.c (check_builtin_function_arguments): Add check
3976 for BUILT_IN_SIGNBIT argument.
3977
3978 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3979
3980 PR c++/67160
3981 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3982 in c++1z mode.
3983
3984 2015-08-17 Marek Polacek <polacek@redhat.com>
3985
3986 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3987 with whitespaces before qualifier names.
3988
3989 2015-08-12 Marek Polacek <polacek@redhat.com>
3990
3991 PR c++/55095
3992 * c-common.c (maybe_warn_shift_overflow): Properly handle
3993 left-shifting 1 into the sign bit.
3994
3995 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3996
3997 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3998
3999 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4000 Braden Obrzut <admin@maniacsvault.net>
4001 Jason Merrill <jason@redhat.com>
4002
4003 Add C++ Concepts TS support.
4004 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4005 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4006 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4007 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4008 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4009 * c.opt (fconcepts): New.
4010
4011 2015-08-02 Martin Sebor <msebor@redhat.com>
4012
4013 * c.opt (-Wframe-address): New warning option.
4014
4015 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4016
4017 * c-indentation.c (should_warn_for_misleading_indentation):
4018 Improve heuristics.
4019
4020 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4021
4022 * c-indentation.c (get_visual_column): Add parameter first_nws,
4023 use it. Update comment documenting the function.
4024 (is_first_nonwhitespace_on_line): Remove.
4025 (should_warn_for_misleading_indentation): Replace usage of
4026 of is_first_nonwhitespace_on_line with get_visual_column.
4027
4028 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4029
4030 * c-indentation.h (struct token_indent_info): Define.
4031 (get_token_indent_info): Define.
4032 (warn_for_misleading_information): Declare.
4033 * c-common.h (warn_for_misleading_information): Remove.
4034 * c-identation.c (warn_for_misleading_indentation):
4035 Change declaration to take three token_indent_infos. Adjust
4036 accordingly.
4037 * c-identation.c (should_warn_for_misleading_indentation):
4038 Likewise. Bail out early if the body is a compound statement.
4039 (guard_tinfo_to_string): Define.
4040
4041 2015-07-30 Jason Merrill <jason@redhat.com>
4042
4043 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4044 '*' for reference decay.
4045
4046 2015-07-30 Marek Polacek <polacek@redhat.com>
4047
4048 * c-common.c (warn_tautological_cmp): Bail for float types.
4049
4050 2015-07-27 Marek Polacek <polacek@redhat.com>
4051
4052 PR bootstrap/67030
4053 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4054
4055 2015-07-27 Marek Polacek <polacek@redhat.com>
4056
4057 PR c++/66555
4058 PR c/54979
4059 * c-common.c (find_array_ref_with_const_idx_r): New function.
4060 (warn_tautological_cmp): New function.
4061 * c-common.h (warn_tautological_cmp): Declare.
4062 * c.opt (Wtautological-compare): New option.
4063
4064 2015-07-23 Marek Polacek <polacek@redhat.com>
4065
4066 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4067 (ubsan_instrument_shift): Likewise.
4068
4069 2015-07-23 Marek Polacek <polacek@redhat.com>
4070
4071 PR sanitizer/66908
4072 * c-ubsan.c: Include gimplify.h.
4073 (ubsan_instrument_division): Unshare OP0 and OP1.
4074 (ubsan_instrument_shift): Likewise.
4075
4076 2015-07-20 Marek Polacek <polacek@redhat.com>
4077 Richard Sandiford <richard.sandiford@arm.com>
4078
4079 PR c++/55095
4080 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4081 Use EXPR_LOC_OR_LOC.
4082 (maybe_warn_shift_overflow): New function.
4083 * c-common.h (maybe_warn_shift_overflow): Declare.
4084 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4085 * c.opt (Wshift-overflow): New option.
4086
4087 2015-07-16 Martin Liska <mliska@suse.cz>
4088
4089 * c-format.c (static void check_format_info_main): Use
4090 object_allocator instead of pool_allocator.
4091 (check_format_arg): Likewise.
4092 (check_format_info_main): Likewise.
4093
4094 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4095
4096 * c-opts.c: Remove multiline #include comment.
4097
4098 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4099
4100 * c-common.c: Fix double word typos.
4101
4102 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4103
4104 * c-ada-spec.h (cpp_operation): Revert latest change.
4105 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4106 constructors and destructors.
4107
4108 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4109
4110 * c-common.h: Adjust includes for flags.h changes.
4111 * stub-objc.c: Likewise.
4112
4113 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4114
4115 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4116 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4117
4118 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4119
4120 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4121 are to be removed, return NULL rather than original clauses list.
4122
4123 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4124
4125 * array-notation-common.c: Adjust includes.
4126 * c-ada-spec.c: Likewise.
4127 * c-cilkplus.c: Likewise.
4128 * c-common.h: Likewise.
4129 * c-cppbuiltin.c: Likewise.
4130 * c-dump.c: Likewise.
4131 * c-format.c: Likewise.
4132 * c-gimplify.c: Likewise.
4133 * c-indentation.c: Likewise.
4134 * c-lex.c: Likewise.
4135 * c-omp.c: Likewise.
4136 * c-opts.c: Likewise.
4137 * c-pch.c: Likewise.
4138 * c-ppoutput.c: Likewise.
4139 * c-pragma.c: Likewise.
4140 * c-pretty-print.c: Likewise.
4141 * c-semantics.c: Likewise.
4142 * c-ubsan.c: Likewise.
4143 * cilk.c: Likewise.
4144 * stub-objc.c: Likewise.
4145
4146 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4147
4148 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4149 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4150
4151 2015-07-01 Jason Merrill <jason@redhat.com>
4152
4153 * c-common.h (D_CXX11): Rename from D_CXX0X.
4154 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4155 * c-common.c: Adjust.
4156
4157 * c-opts.c (c_common_post_options): Default to C++14.
4158
4159 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4160
4161 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4162
4163 Implement N4197 - Adding u8 character literals
4164 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4165 CPP_CHAR.
4166 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4167 CPP_UTF8CHAR_USERDEF tokens.
4168 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4169 and CPP_UTF8CHAR tokens.
4170 (lex_charconst): Treat CPP_UTF8CHAR token.
4171
4172 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4173
4174 PR fortran/66605
4175 * c-common.c (do_warn_unused_parameter): Move here.
4176 * c-common.h (do_warn_unused_parameter): Declare.
4177
4178 2015-06-29 Marek Polacek <polacek@redhat.com>
4179
4180 PR c/66322
4181 * c-common.c (check_case_bounds): Add bool * parameter. Set
4182 OUTSIDE_RANGE_P.
4183 (c_add_case_label): Add bool * parameter. Pass it down to
4184 check_case_bounds.
4185 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4186 warning here.
4187 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4188 declarations.
4189
4190 2015-06-27 Marek Polacek <polacek@redhat.com>
4191
4192 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4193 or VECTOR_INTEGER_TYPE_P throughout.
4194 * c-gimplify.c: Likewise.
4195
4196 2015-06-26 Marek Polacek <polacek@redhat.com>
4197
4198 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4199 * c-common.c (c_fully_fold_internal): Likewise.
4200 (c_alignof_expr): Likewise.
4201 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4202 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4203 * cilk.c (create_parm_list): Likewise.
4204
4205 2015-06-26 Marek Polacek <polacek@redhat.com>
4206
4207 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4208
4209 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4210
4211 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4212 * c-gimplify.c: Likewise.
4213 * c-pragma.c: Likewise.
4214 * c-ubsan.c: Likewise.
4215 * cilk.c: Likewise.
4216
4217 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4218
4219 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4220 ggc_hasher.
4221
4222 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4223
4224 * cilk.c: Move calls.h after tm.h in the include chain.
4225
4226 2015-06-25 Marek Polacek <polacek@redhat.com>
4227
4228 * array-notation-common.c: Use VAR_P throughout.
4229 * c-ada-spec.c: Likewise.
4230 * c-common.c: Likewise.
4231 * c-format.c: Likewise.
4232 * c-gimplify.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-pragma.c: Likewise.
4235 * c-pretty-print.c: Likewise.
4236 * cilk.c: Likewise.
4237
4238 2015-06-25 Marek Polacek <polacek@redhat.com>
4239
4240 * cilk.c (extract_free_variables): Use is_global_var.
4241
4242 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4243
4244 * c-common.c: Don't include target-def.h.
4245
4246 2015-06-23 Marek Polacek <polacek@redhat.com>
4247
4248 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4249 when comparing INTEGER_CSTs.
4250
4251 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4252
4253 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4254 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4255 (dump_ada_template): Skip partially specialized types.
4256
4257 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4258
4259 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4260 swapping.
4261
4262 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4263
4264 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4265 * c-ada-spec.c: Likewise.
4266 * c-cilkplus.c: Likewise.
4267 * c-common.c: Likewise.
4268 * c-common.h: Likewise.
4269 * c-cppbuiltin.c: Likewise.
4270 * c-dump.c: Likewise.
4271 * c-format.c: Likewise.
4272 * c-gimplify.c: Likewise.
4273 * c-indentation.c: Likewise.
4274 * c-lex.c: Likewise.
4275 * c-omp.c: Likewise.
4276 * c-opts.c: Likewise.
4277 * c-pch.c: Likewise.
4278 * c-ppoutput.c: Likewise.
4279 * c-pragma.c: Likewise.
4280 * c-pretty-print.c: Likewise.
4281 * c-semantics.c: Likewise.
4282 * c-ubsan.c: Likewise.
4283 * cilk.c: Likewise.
4284 * stub-objc.c: Likewise.
4285
4286 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4287
4288 PR c++/65168
4289 * c-common.c (c_common_truthvalue_conversion): Warn when
4290 converting an address of a reference to a truth value.
4291
4292 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4293
4294 * array-notation-common.c : Adjust include files.
4295 * c-ada-spec.c : Likewise.
4296 * c-cilkplus.c : Likewise.
4297 * c-common.c : Likewise.
4298 * c-common.h : Likewise.
4299 * c-cppbuiltin.c : Likewise.
4300 * c-dump.c : Likewise.
4301 * c-format.c : Likewise.
4302 * c-gimplify.c : Likewise.
4303 * c-indentation.c : Likewise.
4304 * c-lex.c : Likewise.
4305 * c-omp.c : Likewise.
4306 * c-opts.c : Likewise.
4307 * c-pch.c : Likewise.
4308 * c-ppoutput.c : Likewise.
4309 * c-pragma.c : Likewise.
4310 * c-pretty-print.c : Likewise.
4311 * c-semantics.c : Likewise.
4312 * c-ubsan.c : Likewise.
4313 * cilk.c : Likewise.
4314 * stub-objc.c : Likewise.
4315
4316 2015-06-08 Marek Polacek <polacek@redhat.com>
4317
4318 PR c/66415
4319 * c-format.c (location_from_offset): Return LOC if LINE is null.
4320
4321 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4322
4323 * c-common.h (c_parse_final_cleanups): New prototype.
4324 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4325
4326 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4327
4328 * c-common.c (noplt): New attribute.
4329 (handle_noplt_attribute): New handler.
4330
4331 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4332
4333 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4334 * c-ada-spec.c: Likewise.
4335 * c-cilkplus.c: Likewise.
4336 * c-common.c: Likewise.
4337 * c-common.h: Likewise.
4338 * c-cppbuiltin.c: Likewise.
4339 * c-dump.c: Likewise.
4340 * c-format.c: Likewise.
4341 * c-gimplify.c: Likewise.
4342 * c-indentation.c: Likewise.
4343 * c-lex.c: Likewise.
4344 * c-omp.c: Likewise.
4345 * c-opts.c: Likewise.
4346 * c-pch.c: Likewise.
4347 * c-ppoutput.c: Likewise.
4348 * c-pragma.c: Likewise.
4349 * c-pretty-print.c: Likewise.
4350 * c-semantics.c: Likewise.
4351 * c-ubsan.c: Likewise.
4352 * cilk.c: Likewise.
4353 * stub-objc.c: Likewise.
4354
4355 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4356
4357 PR c/66220:
4358 * c-indentation.c (should_warn_for_misleading_indentation): Use
4359 expand_location rather than expand_location_to_spelling_point.
4360 Don't warn if the guarding statement is more indented than the
4361 next/body stmts.
4362
4363 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4364
4365 * c-indentation.c (warn_for_misleading_indentation): Bail out
4366 immediately if -Wmisleading-indentation isn't enabled.
4367
4368 2015-06-01 Martin Liska <mliska@suse.cz>
4369
4370 * c-format.c (check_format_arg):Use new type-based pool allocator.
4371 (check_format_info_main) Likewise.
4372
4373 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4374
4375 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4376 (has_nontrivial_methods): Likewise.
4377
4378 2015-05-25 Marek Polacek <polacek@redhat.com>
4379
4380 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4381
4382 2015-05-22 Marek Polacek <polacek@redhat.com>
4383
4384 PR c/47043
4385 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4386
4387 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4388
4389 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4390 STACK_GROWS_DOWNWARD.
4391
4392 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4393
4394 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4395 STACK_GROWS_DOWNWARD rather than if it is defined.
4396
4397 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4398
4399 PR c/52952
4400 * c-format.c (location_column_from_byte_offset): New.
4401 (location_from_offset): New.
4402 (struct format_wanted_type): Add offset_loc field.
4403 (check_format_info): Move handling of location for extra arguments
4404 closer to the point of warning.
4405 (check_format_info_main): Pass the result of location_from_offset
4406 to warning_at.
4407 (format_type_warning): Pass the result of location_from_offset
4408 to warning_at.
4409
4410 2015-05-20 Marek Polacek <polacek@redhat.com>
4411
4412 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4413
4414 2015-05-20 Marek Polacek <polacek@redhat.com>
4415
4416 * c-ada-spec.c (dump_sloc): Use DECL_P.
4417
4418 2015-05-20 Marek Polacek <polacek@redhat.com>
4419
4420 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4421 * c-common.c: Likewise.
4422
4423 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4424
4425 * c-common.h (fe_file_change): Strengthen param from
4426 const line_map * to const line_map_ordinary *.
4427 (pp_file_change): Likewise.
4428 * c-lex.c (fe_file_change): Likewise.
4429 (cb_define): Use linemap_check_ordinary when invoking
4430 SOURCE_LINE.
4431 (cb_undef): Likewise.
4432 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4433 invoking cb_file_change.
4434 (c_finish_options): Likewise.
4435 (push_command_line_include): Likewise.
4436 (cb_file_change): Strengthen param "new_map" from
4437 const line_map * to const line_map_ordinary *.
4438 * c-ppoutput.c (cb_define): Likewise for local "map".
4439 (pp_file_change): Likewise for param "map" and local "from".
4440
4441 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4442
4443 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4444
4445 2015-05-18 Tom de Vries <tom@codesourcery.com>
4446
4447 * c-common.c (build_va_arg_1): New function.
4448 (build_va_arg): Add address operator to va_list operand if necessary.
4449
4450 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4451
4452 PR c/48956
4453 * c-common.c (int_safely_convertible_to_real_p): Define.
4454 (unsafe_conversion_p): Check conversions involving complex types.
4455 (conversion_warning): Add new warning message for conversions which
4456 discard imaginary component.
4457 * c-common.h: (enum conversion_safety): Add new enumerator for such
4458 conversions.
4459
4460 2015-05-14 Marek Polacek <polacek@redhat.com>
4461
4462 PR c/66066
4463 PR c/66127
4464 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4465 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4466 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4467 use it. If FOR_INT_CONST, require that all evaluated operands be
4468 INTEGER_CSTs.
4469
4470 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4471
4472 * c-common.h (warn_for_misleading_indentation): New prototype.
4473 * c-indentation.c: New file.
4474 * c.opt (Wmisleading-indentation): New option.
4475
4476 2015-05-12 Tom de Vries <tom@codesourcery.com>
4477
4478 PR tree-optimization/66010
4479 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4480
4481 2015-05-09 Jason Merrill <jason@redhat.com>
4482
4483 * c-opts.c (c_common_post_options): Also clear
4484 cpp_opts->cpp_warn_cxx11_compat.
4485
4486 * c-common.h (enum cxx_dialect): Add cxx_unset.
4487 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4488 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4489
4490 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4491 (std=gnu++0x): Mark as Undocumented.
4492 (std=gnu++1y): Add deprecated message.
4493
4494 2015-05-08 Jason Merrill <jason@redhat.com>
4495
4496 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4497 * c-opts.c: Adjust.
4498
4499 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4500
4501 2015-05-08 Marek Polacek <polacek@redhat.com>
4502
4503 PR c/64918
4504 * c.opt (Woverride-init-side-effects): New option.
4505
4506 2015-05-07 Marek Polacek <polacek@redhat.com>
4507
4508 PR c/65179
4509 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4510 negative value.
4511 * c.opt (Wshift-negative-value): New option.
4512 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4513 when -Wextra and C99/C++11 mode.
4514
4515 2015-05-07 Marek Polacek <polacek@redhat.com>
4516 Martin Uecker <uecker@eecs.berkeley.edu>
4517
4518 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4519 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4520
4521 2015-05-05 Jason Merrill <jason@redhat.com>
4522
4523 * c.opt (Wterminate): New.
4524
4525 2015-04-30 Marek Polacek <polacek@redhat.com>
4526
4527 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4528 require that the non-constant be of a boolean type.
4529
4530 2015-04-29 Josh Triplett <josh@joshtriplett.org>
4531
4532 * c-common.c (handle_section_attribute): Refactor to reduce
4533 nesting and distinguish between error cases.
4534
4535 2015-04-29 Marek Polacek <polacek@redhat.com>
4536
4537 PR c/64610
4538 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4539 with 0/1.
4540
4541 2015-04-29 Jakub Jelinek <jakub@redhat.com>
4542
4543 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4544 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4545 HOST_BITS_PER_WIDE_INT.
4546
4547 2015-04-28 Tom de Vries <tom@codesourcery.com>
4548
4549 PR tree-optimization/65887
4550 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4551
4552 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
4553 Pierre-Marie de Rodat <derodat@adacore.com>
4554
4555 * c-ada-spec.c (in_function): Delete.
4556 (dump_generic_ada_node): Do not change in_function and remove the
4557 redundant code dealing with it.
4558 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4559 (print_ada_methods): Output the static member functions in a nested
4560 package after the regular methods as well as associated renamings.
4561
4562 2015-04-24 Marek Polacek <polacek@redhat.com>
4563
4564 PR c/65830
4565 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4566 and OPT_Wshift_count_overflow.
4567
4568 PR c/63357
4569 * c-common.c (warn_logical_operator): Warn if the operands have the
4570 same expressions.
4571
4572 2015-04-24 Marek Polacek <polacek@redhat.com>
4573
4574 PR c/61534
4575 * c-common.c (warn_logical_operator): Bail if either operand comes
4576 from a macro expansion.
4577
4578 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4579
4580 PR target/55143
4581 * c-common.c (c_default_pointer_mode): Add definition.
4582 * c-common.h (c_default_pointer_mode): Add declaration.
4583
4584 2015-03-11 Jakub Jelinek <jakub@redhat.com>
4585
4586 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4587 on record_builtin_type argument.
4588
4589 2015-03-10 Jakub Jelinek <jakub@redhat.com>
4590
4591 PR c/65120
4592 * c-common.c (warn_logical_not_parentheses): Don't warn for
4593 !x == 0 or !x != 0.
4594
4595 2015-03-07 Marek Polacek <polacek@redhat.com>
4596
4597 PR sanitizer/65280
4598 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4599 before trying to figure out whether we have a flexible array member.
4600
4601 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
4602 Jonathan Wakely <jwakely.gcc@gmail.com>
4603
4604 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4605
4606 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4607
4608 PR ada/65319
4609 * c-ada-spec.c (print_destructor): Remove obsolete code.
4610
4611 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4612
4613 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4614 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4615 DECL_TEMPLATE_RESULT emulations.
4616 (dump_ada_template)): Add guard for TYPE_METHODS.
4617
4618 2015-02-27 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/65040
4621 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4622
4623 2015-02-27 Kai Tietz <ktietz@redhat.com>
4624
4625 PR c/35330
4626 * c-pragma.c (handle_pragma_weak): Do not try to create
4627 weak/alias of declarations not being function, or variable
4628 declarations.
4629
4630 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4631
4632 PR libgomp/64625
4633 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4634 Remove macros.
4635 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4636
4637 2015-02-16 Marek Polacek <polacek@redhat.com>
4638
4639 PR c/65066
4640 * c-format.c (check_format_types): Handle null param.
4641
4642 2015-02-13 Marek Polacek <polacek@redhat.com>
4643
4644 PR c/65040
4645 * c-format.c (check_format_types): Don't warn about different
4646 signedness if the original value is in the range of WANTED_TYPE.
4647
4648 2015-02-12 Jason Merrill <jason@redhat.com>
4649
4650 PR c++/64956
4651 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4652 to the current highest version.
4653 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4654
4655 2015-02-04 Jakub Jelinek <jakub@redhat.com>
4656
4657 PR c/64824
4658 PR c/64868
4659 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4660 instead of RDIV_EXPR. Use build_binary_op instead of
4661 build2_loc.
4662
4663 2015-01-30 Joseph Myers <joseph@codesourcery.com>
4664
4665 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4666 to pass input_location as first argument.
4667
4668 2015-01-23 Tom de Vries <tom@codesourcery.com>
4669
4670 PR libgomp/64672
4671 * c.opt (fopenacc): Mark as LTO option.
4672
4673 2015-01-23 Tom de Vries <tom@codesourcery.com>
4674
4675 PR libgomp/64707
4676 * c.opt (fopenmp): Mark as LTO option.
4677
4678 2015-01-21 Jakub Jelinek <jakub@redhat.com>
4679
4680 PR c/63307
4681 * cilk.c (fill_decls_vec): Only put decls into vector v.
4682 (compare_decls): Fix up formatting.
4683
4684 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4685
4686 PR c/63307
4687 * cilk.c: Include vec.h.
4688 (struct cilk_decls): New structure.
4689 (wrapper_parm_cb): Split this function to...
4690 (fill_decls_vec): ...this...
4691 (create_parm_list): ...and this.
4692 (compare_decls): New function.
4693 (for_local_cb): Remove.
4694 (wrapper_local_cb): Ditto.
4695 (build_wrapper_type): For now first traverse and fill vector of
4696 declarations then sort it and then deal with sorted vector.
4697 (cilk_outline): Ditto.
4698 (declare_one_free_variable): Ditto.
4699
4700 2015-01-21 Jason Merrill <jason@redhat.com>
4701
4702 PR c++/64629
4703 * c-format.c (check_format_arg): Call decl_constant_value.
4704
4705 2015-01-19 Martin Liska <mliska@suse.cz>
4706
4707 * c-common.c (handle_noicf_attribute): New function.
4708
4709 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4710 Bernd Schmidt <bernds@codesourcery.com>
4711 James Norris <jnorris@codesourcery.com>
4712 Cesar Philippidis <cesar@codesourcery.com>
4713 Ilmir Usmanov <i.usmanov@samsung.com>
4714 Jakub Jelinek <jakub@redhat.com>
4715
4716 * c.opt (fopenacc): New option.
4717 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4718 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4719 New macros.
4720 * c-common.h (c_finish_oacc_wait): New prototype.
4721 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4722 (c_finish_oacc_wait): New function.
4723 * c-pragma.c (oacc_pragmas): New variable.
4724 (c_pp_lookup_pragma, init_pragma): Handle it.
4725 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4726 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4727 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4728 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4729 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4730 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4731 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4732 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4733 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4734 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4735 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4736 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4737 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4738 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4739 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4740 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4741 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4742 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4743 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4744 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4745 PRAGMA_OACC_CLAUSE_WORKER.
4746
4747 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
4748
4749 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4750 for the new option fstack-protector_explicit.
4751 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4752 (handle_stack_protect_attribute): New function.
4753
4754 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
4755
4756 * c.opt: New option -Warray-bounds=.
4757
4758 2015-01-09 Michael Collison <michael.collison@linaro.org>
4759
4760 * array-notation-common.c: Include hash-set.h, machmode.h,
4761 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4762 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4763 * c-ada-spec.c: Ditto.
4764 * c-cilkplus.c: Ditto.
4765 * c-common.c: Include input.h due to flattening of tree.h.
4766 Define macro GCC_C_COMMON_C.
4767 * c-common.h: Flatten tree.h header files into c-common.h.
4768 Remove include of tree-core.h.
4769 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4770 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4771 fold-const.h, wide-int.h, and inchash.h due to
4772 flattening of tree.h.
4773 * c-dump.c: Ditto.
4774 * c-format.c: Flatten tree.h header files into c-common.h.
4775 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4776 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4777 fold-const.h, wide-int.h, and inchash.h due to
4778 flattening of tree.h.
4779 * c-dump.c: Include hash-set.h, machmode.h,
4780 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4781 fold-const.h, wide-int.h, and inchash.h due to
4782 flattening of tree.h.
4783 * c-format.c: Include hash-set.h, machmode.h,
4784 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4785 fold-const.h, wide-int.h, inchash.h and real.h due to
4786 flattening of tree.h.
4787 * c-gimplify.c: Include hash-set.h, machmode.h,
4788 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4789 fold-const.h, wide-int.h, and inchash.h due to
4790 flattening of tree.h.
4791 * cilk.c: Ditto.
4792 * c-lex.c: Ditto.
4793 * c-omp.c: Ditto.
4794 * c-opts.c: Ditto.
4795 * c-pch.c: Ditto.
4796 * c-ppoutput.c: Ditto.
4797 * c-pragma.c: Ditto.
4798 * c-pretty-print.c: Ditto.
4799 * c-semantics.c: Ditto.
4800 * c-ubsan.c: Ditto.
4801 * stub-objc.c: Ditto.
4802
4803 2015-01-08 Jason Merrill <jason@redhat.com>
4804
4805 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4806 do_ubsan_in_current_function.
4807 (ubsan_maybe_instrument_reference_or_call): Likewise.
4808 * c-ubsan.h: Declare it.
4809
4810 2015-01-08 Mike Stump <mikestump@comcast.net>
4811
4812 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4813
4814 2015-01-07 Marek Polacek <polacek@redhat.com>
4815
4816 PR c/64440
4817 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4818 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4819
4820 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4821
4822 PR c++/31397
4823 * c.opt (Wsuggest-override): New option.
4824
4825 2015-01-05 Jakub Jelinek <jakub@redhat.com>
4826
4827 Update copyright years.
4828
4829 2015-01-05 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/64423
4832 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4833 parameter. Use it.
4834 * c-common.h (warn_array_subscript_with_type_char): Update
4835 declaration.
4836
4837 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4838
4839 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4840 Control macro with flag_sized_deallocation.
4841
4842 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
4843
4844 * c.opt (Wdiscarded-array-qualifiers): New option.
4845
4846 2014-12-19 Jakub Jelinek <jakub@redhat.com>
4847
4848 PR preprocessor/63831
4849 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4850 and __has_cpp_attribute here.
4851 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4852 c_common_has_attribute.
4853 * c-common.h (c_common_has_attribute): New prototype.
4854 * c-lex.c (init_c_lex): Set cb->has_attribute to
4855 c_common_has_attribute instead of cb_has_attribute.
4856 (get_token_no_padding): New function.
4857 (cb_has_attribute): Renamed to ...
4858 (c_common_has_attribute): ... this. No longer static. Use
4859 get_token_no_padding, require ()s, don't build TREE_LIST
4860 unnecessarily, fix up formatting, adjust diagnostics, call
4861 init_attributes.
4862
4863 2014-12-15 Jason Merrill <jason@redhat.com>
4864
4865 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4866 (-Wsized-deallocation): New.
4867 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4868 to on in C++14 and up.
4869
4870 2014-12-11 Jason Merrill <jason@redhat.com>
4871
4872 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4873
4874 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4875 we aren't complaining about VLAs.
4876
4877 2014-12-06 Marek Polacek <polacek@redhat.com>
4878
4879 PR tree-optimization/64183
4880 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4881 shift-expression if it is integer_type_node. Use types_compatible_p.
4882
4883 2014-11-29 Jakub Jelinek <jakub@redhat.com>
4884
4885 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4886 last argument from create_tmp_var_raw and create_tmp_var calls.
4887 * cilk.c (gimplify_cilk_spawn): Likewise.
4888 * c-omp.c (c_finish_omp_atomic): Likewise.
4889
4890 2014-11-28 Marek Polacek <polacek@redhat.com>
4891
4892 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4893 instead of unsigned_type_node.
4894
4895 2014-11-28 Marek Polacek <polacek@redhat.com>
4896
4897 PR c/63862
4898 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4899 to op1_utype.
4900 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4901 expression to unsigned_type_node.
4902
4903 2014-11-20 Mark Wielaard <mjw@redhat.com>
4904
4905 PR debug/38757
4906 * c-opts.c (set_std_c89): Set lang_hooks.name.
4907 (set_std_c99): Likewise.
4908 (set_std_c11): Likewise.
4909 (set_std_cxx98): Likewise.
4910 (set_std_cxx11): Likewise.
4911 (set_std_cxx14): Likewise.
4912 (set_std_cxx1z): Likewise.
4913
4914 2014-11-21 Jakub Jelinek <jakub@redhat.com>
4915
4916 PR target/63764
4917 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4918 return type to bool.
4919 * c-common.c: Include gimple-expr.h.
4920 (convert_vector_to_pointer_for_subscript): Change return type to
4921 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4922 and copy it into a TARGET_EXPR and use that instead of *vecp
4923 directly.
4924
4925 2014-11-19 David Malcolm <dmalcolm@redhat.com>
4926
4927 Merger of git branch "gimple-classes-v2-option-3".
4928 * ChangeLog.gimple-classes: New.
4929 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4930 from being just a vec<gimple> to a vec<gbind *>.
4931
4932 2014-11-18 Jakub Jelinek <jakub@redhat.com>
4933
4934 PR sanitizer/63813
4935 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4936 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4937 get_pointer_alignment for non-pointers. Use ptype, or if it is
4938 reference type, corresponding pointer type, as type of kind
4939 argument.
4940 (ubsan_maybe_instrument_reference,
4941 ubsan_maybe_instrument_member_call): Adjust callers.
4942
4943 2014-11-15 Marek Polacek <polacek@redhat.com>
4944
4945 PR middle-end/63884
4946 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4947 for NULL fndecl.
4948 (extract_array_notation_exprs): Return for NULL node.
4949
4950 2014-11-12 Joseph Myers <joseph@codesourcery.com>
4951
4952 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4953 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4954
4955 2014-11-12 Jakub Jelinek <jakub@redhat.com>
4956
4957 PR c/59708
4958 * c-common.c (check_builtin_function_arguments): Handle
4959 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4960
4961 2014-11-10 Andi Kleen <ak@linux.intel.com>
4962
4963 PR c/60804
4964 * c-common.h (check_no_cilk): Declare.
4965 * cilk.c (get_error_location): New function.
4966 (check_no_cilk): Dito.
4967
4968 2014-11-10 Andi Kleen <ak@linux.intel.com>
4969
4970 * cilk.c (recognize_spawn): Use expression location
4971 for error message.
4972
4973 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4974
4975 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4976
4977 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4978
4979 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4980 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4981 (__cpp_range_based_for, __cpp_initializer_lists,
4982 __cpp_delegating_constructors, __cpp_nsdmi,
4983 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4984 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4985 __has_cpp_attribute.
4986 * c-lex.c (cb_has_attribute): New callback CPP function;
4987 (init_c_lex): Set has_attribute callback.
4988
4989 2014-11-04 Richard Biener <rguenther@suse.de>
4990
4991 * c-common.c (shorten_compare): Do not shorten mixed
4992 DFP and non-DFP compares.
4993
4994 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4995
4996 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4997 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4998 Commentary and rearrangement of tests.
4999 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5000 Commentary and rearrangement of tests.
5001 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5002 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5003
5004 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5005
5006 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5007 enum from machine_mode.
5008
5009 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5010
5011 * c-common.c: Adjust include files.
5012 * c-gimplify.c: Ditto.
5013 * cilk.c: Ditto.
5014 * c-pragma.c: Ditto.
5015 * c-ubsan.c: Ditto.
5016
5017 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5018
5019 * c-gimplify.c: Adjust include files.
5020
5021 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5022
5023 PR c++/53061
5024 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5025 c_common_initialize_diagnostics.
5026 * c-common.h: Likewise.
5027
5028 2014-10-24 Marek Polacek <polacek@redhat.com>
5029
5030 PR c/56980
5031 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5032 print "struct"/"union"/"enum" for typedefed names.
5033
5034 2014-10-23 Marek Polacek <polacek@redhat.com>
5035
5036 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5037 in unsigned type.
5038
5039 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5040 Yury Gribov <y.gribov@samsung.com>
5041
5042 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5043 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5044 instead of flag_sanitize_recover as bool flag.
5045
5046 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5047
5048 * cilk.c: Revert previous change.
5049
5050 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5051
5052 PR c/63307
5053 * cilk.c: Include vec.h.
5054 (struct cilk_decls): New structure.
5055 (wrapper_parm_cb): Split this function to...
5056 (fill_decls_vec): ...this...
5057 (create_parm_list): ...and this.
5058 (compare_decls): New function.
5059 (for_local_cb): Remove.
5060 (wrapper_local_cb): Ditto.
5061 (build_wrapper_type): For now first traverse and fill vector of
5062 declarations then sort it and then deal with sorted vector.
5063 (cilk_outline): Ditto.
5064 (declare_one_free_variable): Ditto.
5065
5066 2014-10-17 Marek Polacek <polacek@redhat.com>
5067
5068 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5069 * c.opt (Wimplicit-int): Initialize to -1.
5070
5071 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5072
5073 * c-pragma.c: Adjust include files.
5074 * c-semantics.c: Likewise.
5075
5076 2014-10-16 DJ Delorie <dj@redhat.com>
5077
5078 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5079 multiples of bytes.
5080
5081 2014-10-14 Jason Merrill <jason@redhat.com>
5082
5083 PR c++/63455
5084 * c-common.h (CPP_PREPARSED_EXPR): New.
5085 (N_CP_TTYPES): Adjust.
5086
5087 2014-10-15 Marek Polacek <polacek@redhat.com>
5088
5089 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5090
5091 2014-10-14 DJ Delorie <dj@redhat.com>
5092
5093 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5094 types, not just __int128.
5095 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5096 types, not just __int128.
5097 (cpp_atomic_builtins): Round pointer sizes up.
5098 (type_suffix): Use type precision, not specific types.
5099 * c-common.c (c_common_reswords): Remove __int128 special case.
5100 (c_common_type_for_size): Check for all __intN types, not just
5101 __int128.
5102 (c_common_type_for_mode): Likewise.
5103 (c_common_signed_or_unsigned_type): Likewise.
5104 (c_build_bitfield_integer_type): Likewise.
5105 (c_common_nodes_and_builtins): Likewise.
5106 (keyword_begins_type_specifier): Likewise.
5107 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5108 __intN variants.
5109
5110 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5111
5112 * c-common.c: Use hash_table instead of hashtab.
5113
5114 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5115
5116 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5117 C++11 section.
5118
5119 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5120
5121 PR c++/54427
5122 PR c++/57198
5123 PR c++/58845
5124 * c-common.c (warn_logical_operator): Punt for vectors.
5125
5126 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5127
5128 Implement SD-6: SG10 Feature Test Recommendations
5129 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5130 macros and the __has_header macro.
5131
5132 2014-09-30 Jason Merrill <jason@redhat.com>
5133
5134 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5135 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5136 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5137
5138 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5139 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5140
5141 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5142 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5143
5144 2014-09-24 Marek Polacek <polacek@redhat.com>
5145
5146 PR c/61405
5147 PR c/53874
5148 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5149
5150 2014-09-23 Andi Kleen <ak@linux.intel.com>
5151
5152 * c-common.c (handle_no_reorder_attribute): New function.
5153 (c_common_attribute_table): Add no_reorder attribute.
5154
5155 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5156
5157 * c-cppbuiltin.c (c_cpp_builtins): Define
5158 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5159 modes.
5160
5161 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5162
5163 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5164 for supported floating-point modes.
5165
5166 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5167
5168 * c.opt (Wpsabi): Use LangEnabledBy.
5169 * c-opts.c (c_common_handle_option): Do not handle here.
5170
5171 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5172
5173 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5174 macros for floating-point modes.
5175
5176 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5177
5178 PR target/58757
5179 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5180 __*_DENORM_MIN__ without denormals.
5181
5182 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5183
5184 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5185 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5186 ubsan_create_data callers.
5187 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5188 index is constant or BIT_AND_EXPR with constant mask and is
5189 small enough for the bound.
5190 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5191 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5192
5193 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5194
5195 * c.opt: Add CppReason to various flags.
5196 (Wdate-time): Re-sort.
5197 * c-common.c: Include c-common.h earlier.
5198 (struct reason_option_codes_t): Delete.
5199 (c_option_controlling_cpp_error): Prefix global type and struct
5200 with cpp_.
5201
5202 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5203
5204 * c.opt (Wnormalized): New.
5205 (Wnormalized=): Use Enum and Reject Negative.
5206 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5207
5208 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5209
5210 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5211 digits of floating-point modes if -fbuilding-libgcc.
5212
5213 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5214
5215 * c-cppbuiltin.c (c_cpp_builtins): Also define
5216 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5217 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5218 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5219 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5220 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5221 __LIBGCC_STACK_GROWS_DOWNWARD__,
5222 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5223 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5224 __LIBGCC_DWARF_FRAME_REGISTERS__,
5225 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5226 __LIBGCC_STACK_POINTER_REGNUM__ and
5227 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5228 (builtin_define_with_value): Handle backslash-escaping in string
5229 macro values.
5230
5231 2014-09-05 Richard Biener <rguenther@suse.de>
5232
5233 PR middle-end/63148
5234 * c-format.c (check_format_arg): Properly handle
5235 effectively signed POINTER_PLUS_EXPR offset.
5236
5237 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5238
5239 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5240 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5241 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5242 and Init.
5243 * c-opts.c (c_common_handle_option): Do not handle here.
5244 (sanitize_cpp_opts): Likewise.
5245 * c-common.c (struct reason_option_codes_t): Handle
5246 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5247
5248 2014-09-03 Marek Polacek <polacek@redhat.com>
5249
5250 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5251
5252 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5253 Balaji V. Iyer <balaji.v.iyer@intel.com>
5254 Igor Zamyatin <igor.zamyatin@intel.com>
5255
5256 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5257 * c-common.c (c_common_reswords): Added _Cilk_for.
5258 * c-common.h (enum rid): Added RID_CILK_FOR.
5259 (cilk_for_number_of_iterations): Add declaration.
5260 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5261 CILK_FOR.
5262 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5263 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5264
5265 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5266
5267 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5268 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5269 Wundef): Use CPP, Var and Init.
5270 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5271
5272 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5273
5274 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5275 * c-opts.c (c_common_handle_option): Do not handle here.
5276
5277 2014-08-25 Jason Merrill <jason@redhat.com>
5278
5279 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5280 -std=c++14 and -std=gnu++14, rather than the reverse.
5281 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5282 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5283 * c-common.h (cxx_dialect): Remove cxx1y.
5284
5285 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5286
5287 * c-common.h (enum cxx_dialect): Add cxx14.
5288 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5289 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5290 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5291
5292 2014-08-22 Jason Merrill <jason@redhat.com>
5293
5294 * c.opt (std=gnu++17): Fix alias.
5295
5296 2014-08-22 Marek Polacek <polacek@redhat.com>
5297
5298 PR c++/62199
5299 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5300 check for vector types. Drop LHS argument.
5301 * c-common.h (warn_logical_not_parentheses): Adjust.
5302
5303 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5304
5305 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5306 (Wmultichar): Likewise.
5307 (Wdate-time): Use C-family languages instead of Common. Use CPP
5308 and Var.
5309 * c-opts.c (c_common_handle_option): Do not handle the above
5310 options here.
5311 (sanitize_cpp_opts): Likewise.
5312
5313 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5314
5315 PR fortran/44054
5316 * c-opts.c: Include tree-diagnostics.h.
5317 (c_diagnostic_finalizer): New.
5318 (c_common_initialize_diagnostics): Use it.
5319
5320 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5321
5322 PR preprocessor/51303
5323 * c-common.c (struct reason_option_codes_t option_codes):
5324 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5325
5326 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5327
5328 PR c/60975
5329 PR c/53063
5330 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5331 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5332 (c_common_post_options): Call init_global_opts_from_cpp.
5333 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5334
5335 2014-08-19 Marek Polacek <polacek@redhat.com>
5336
5337 PR c++/62153
5338 * c-common.c (maybe_warn_bool_compare): New function.
5339 * c-common.h (maybe_warn_bool_compare): Declare.
5340 * c.opt (Wbool-compare): New option.
5341
5342 2014-08-19 Marek Polacek <polacek@redhat.com>
5343
5344 * c.opt (Wc99-c11-compat): New option.
5345
5346 2014-08-19 Marek Polacek <polacek@redhat.com>
5347
5348 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5349 to warn_c90_c99_compat.
5350 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5351 to -1.
5352
5353 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5354 Steven Bosscher <steven@gcc.gnu.org>
5355
5356 PR c/52952
5357 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5358 format_check_results.
5359 (check_function_format): Use true and add comment for boolean
5360 argument.
5361 (finish_dollar_format_checking): Use explicit location when warning.
5362 (check_format_info): Likewise.
5363 (check_format_arg): Set extra_arg_loc and format_string_loc.
5364 (check_format_info_main): Use explicit location when warning.
5365 (check_format_types): Pass explicit location.
5366 (format_type_warning): Likewise.
5367
5368 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5369
5370 PR fortran/44054
5371 * c-format.c: Handle Fortran flags.
5372
5373 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5374
5375 PR other/61962
5376 * array-notation-common.c (find_rank): Added handling for other
5377 types of references.
5378
5379 2014-08-10 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/51849
5382 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5383 * c.opt (Wc90-c99-compat): Add option.
5384
5385 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5386
5387 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5388
5389 2014-08-03 Marek Polacek <polacek@redhat.com>
5390
5391 * c-common.c (check_case_value): Add location_t parameter. Use it.
5392 (c_add_case_label): Pass loc to check_case_value.
5393
5394 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5395
5396 * cilk.c: Use hash_map instead of pointer_map.
5397
5398 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5399
5400 * c-gimplify.c: Use hash_set instead of pointer_set.
5401
5402 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5403
5404 PR middle-end/61455
5405 * array-notation-common.c (extract_array_notation_exprs): Handling
5406 of DECL_EXPR added.
5407
5408 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5409
5410 * c-common.h (min_align_of_type): Removed prototype.
5411 * c-common.c (min_align_of_type): Removed.
5412 * c-ubsan.h (ubsan_maybe_instrument_reference,
5413 ubsan_maybe_instrument_member_call): New prototypes.
5414 * c-ubsan.c: Include stor-layout.h and builtins.h.
5415 (ubsan_maybe_instrument_reference_or_call,
5416 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5417 functions.
5418
5419 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5420
5421 PR c++/60517
5422 * c.opt (-Wreturn-local-addr): Move to common.opt.
5423
5424 2014-07-30 Jason Merrill <jason@redhat.com>
5425
5426 PR c++/61659
5427 PR c++/61687
5428 Revert:
5429 * c.opt (-fuse-all-virtuals): New.
5430
5431 2014-07-30 Tom Tromey <tromey@redhat.com>
5432
5433 PR c/59855
5434 * c.opt (Wdesignated-init): New option.
5435 * c-common.c (c_common_attribute_table): Add "designated_init".
5436 (handle_designated_init): New function.
5437
5438 2014-07-24 Marek Polacek <polacek@redhat.com>
5439
5440 PR c/57653
5441 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5442
5443 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5444
5445 PR preprocessor/60723 - missing system-ness marks for macro tokens
5446 * c-ppoutput.c (struct print::prev_was_system_token): New data
5447 member.
5448 (init_pp_output): Initialize it.
5449 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5450 (do_line_change): Return a flag saying if a line marker was
5451 emitted or not.
5452 (scan_translation_unit): Detect if the system-ness of the token we
5453 are about to emit is different from the one of the previously
5454 emitted token. If so, emit a line marker. Avoid emitting useless
5455 adjacent line markers. Avoid emitting line markers for tokens
5456 originating from the expansion of built-in macros.
5457 (scan_translation_unit_directives_only): Adjust.
5458
5459 2014-07-15 Marek Polacek <polacek@redhat.com>
5460
5461 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5462 TYPE_MAX_VALUE is NULL.
5463
5464 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5465
5466 PR middle-end/61294
5467 * c.opt (Wmemset-transposed-args): New warning.
5468
5469 2014-07-10 Jason Merrill <jason@redhat.com>
5470
5471 PR c++/61659
5472 PR c++/61687
5473 * c.opt (-fuse-all-virtuals): New.
5474
5475 2014-07-09 Richard Biener <rguenther@suse.de>
5476
5477 PR c-family/61741
5478 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5479 using unsigned arithmetic if overflow does not wrap instead of
5480 if overflow is undefined.
5481
5482 2014-07-06 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/6940
5485 * c.opt (Wsizeof-array-argument): New option.
5486
5487 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5488
5489 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5490 comments->count <= 1, as comments->entries might be NULL.
5491
5492 2014-07-01 Marek Polacek <polacek@redhat.com>
5493
5494 * c.opt (Wint-conversion): New option.
5495
5496 2014-07-01 Marek Polacek <polacek@redhat.com>
5497
5498 PR c/58286
5499 * c.opt (Wincompatible-pointer-types): New option.
5500
5501 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5502
5503 PR c++/51400
5504 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5505 Do not discard TYPE_QUALS of type.
5506
5507 2014-06-26 Jason Merrill <jason@redhat.com>
5508
5509 * c-common.h (enum cxx_dialect): Add cxx1z.
5510 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5511 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5512
5513 2014-06-26 Teresa Johnson <tejohnson@google.com>
5514
5515 * c-common.h (get_dump_info): Declare.
5516 * c-gimplify.c (c_genericize): Use saved dump files.
5517 * c-opts.c (c_common_parse_file): Begin and end dumps
5518 once around parsing invocation.
5519 (get_dump_info): New function.
5520
5521 2014-06-23 Marek Polacek <polacek@redhat.com>
5522 Andrew MacLeod <amacleod@redhat.com>
5523
5524 PR c/61553
5525 * c-common.c (get_atomic_generic_size): Don't segfault if the
5526 type doesn't have a size.
5527
5528 2014-06-20 Marek Polacek <polacek@redhat.com>
5529
5530 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5531 (ubsan_walk_array_refs_r): New function.
5532 (c_genericize): Instrument array bounds.
5533 * c-ubsan.c: Include "internal-fn.h".
5534 (ubsan_instrument_division): Mark instrumented arrays as having
5535 side effects. Adjust ubsan_type_descriptor call.
5536 (ubsan_instrument_shift): Likewise.
5537 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5538 (ubsan_instrument_bounds): New function.
5539 (ubsan_array_ref_instrumented_p): New function.
5540 (ubsan_maybe_instrument_array_ref): New function.
5541 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5542 (ubsan_array_ref_instrumented_p): Declare.
5543 (ubsan_maybe_instrument_array_ref): Declare.
5544
5545 2014-06-20 Hale Wang <hale.wang@arm.com>
5546
5547 PR lto/61123
5548 * c.opt (fshort-enums): Add to LTO.
5549 * c.opt (fshort-wchar): Likewise.
5550
5551 2014-06-16 Marek Polacek <polacek@redhat.com>
5552
5553 PR c/60439
5554 * c.opt (Wswitch-bool): Add Var.
5555
5556 2014-06-12 Jakub Jelinek <jakub@redhat.com>
5557
5558 PR middle-end/61486
5559 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5560 #pragma omp target teams or
5561 #pragma omp {,target }teams distribute simd.
5562
5563 2014-06-12 Jason Merrill <jason@redhat.com>
5564
5565 * c.opt (Wabi=, fabi-compat-version): New.
5566 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5567 (c_common_post_options): Handle flag_abi_compat_version default.
5568 Disallow -fabi-compat-version=1.
5569 * c-common.h (abi_version_crosses): New.
5570
5571 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
5572
5573 * c-common.c (handle_section_attribute): Update handling for
5574 section names that are no longer trees.
5575
5576 2014-06-10 Jakub Jelinek <jakub@redhat.com>
5577
5578 PR fortran/60928
5579 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5580 (omp_pragmas): ... back here.
5581
5582 2014-06-05 Marek Polacek <polacek@redhat.com>
5583
5584 PR c/49706
5585 * c-common.c (warn_logical_not_parentheses): New function.
5586 * c-common.h (warn_logical_not_parentheses): Declare.
5587 * c.opt (Wlogical-not-parentheses): New option.
5588
5589 2014-06-04 Marek Polacek <polacek@redhat.com>
5590
5591 PR c/30020
5592 * c-common.c (check_case_bounds): Add location parameter.
5593 Use it.
5594 (c_add_case_label): Pass loc to check_case_bounds.
5595
5596 2014-06-03 Marek Polacek <polacek@redhat.com>
5597
5598 PR c/60439
5599 * c.opt (Wswitch-bool): New option.
5600
5601 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5602
5603 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5604 Remove prototypes.
5605 (record_types_used_by_current_var_decl): Move prototype to where
5606 it belongs.
5607
5608 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5609 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5610 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5611
5612 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5613
5614 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5615 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5616 void_zero_node.
5617 * c-pretty-print.c (pp_c_void_constant): New function.
5618 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5619 (c_pretty_printer::expression): Handle VOID_CST.
5620 * cilk.c (extract_free_variables): Likewise.
5621 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5622 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5623
5624 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5625
5626 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5627 * c-pragma.c (push_alignment): Adjust.
5628 (handle_pragma_push_options): Likewise.
5629
5630 2014-05-09 Marek Polacek <polacek@redhat.com>
5631
5632 PR c/50459
5633 * c-common.c (check_user_alignment): Return -1 if alignment is error
5634 node.
5635 (handle_aligned_attribute): Don't call default_conversion on
5636 FUNCTION_DECLs.
5637 (handle_vector_size_attribute): Likewise.
5638 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5639 (handle_sentinel_attribute): Call default_conversion and allow even
5640 integral types as an argument.
5641
5642 2014-05-08 Marek Polacek <polacek@redhat.com>
5643
5644 PR c/61053
5645 * c-common.c (min_align_of_type): New function factored out from...
5646 (c_sizeof_or_alignof_type): ...here.
5647 * c-common.h (min_align_of_type): Declare.
5648
5649 2014-05-08 Marek Polacek <polacek@redhat.com>
5650
5651 PR c/61077
5652 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5653 parameter type of main.
5654
5655 2014-05-07 DJ Delorie <dj@redhat.com>
5656
5657 * c-cppbuiltin.c (print_bits_of_hex): New.
5658 (builtin_define_type_minmax): Print values using hex so as not to
5659 require a pre-computed list of string values.
5660
5661 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5662 Mike Stump <mikestump@comcast.net>
5663 Richard Sandiford <rdsandiford@googlemail.com>
5664
5665 * c-ada-spec.c: Include wide-int.h.
5666 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5667 (dump_generic_ada_node): Use wide-int interfaces.
5668 * c-common.c: Include wide-int-print.h.
5669 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5670 (pointer_int_sum): Use wide-int interfaces.
5671 (c_common_nodes_and_builtins): Use make_int_cst.
5672 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5673 (handle_alloc_size_attribute): Use wide-int interfaces.
5674 (get_nonnull_operand): Likewise.
5675 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5676 * c-lex.c: Include wide-int.h.
5677 (narrowest_unsigned_type): Take a widest_int rather than two
5678 HOST_WIDE_INTs.
5679 (narrowest_signed_type): Likewise.
5680 (interpret_integer): Update accordingly. Use wide-int interfaces.
5681 (lex_charconst): Use wide-int interfaces.
5682 * c-pretty-print.c: Include wide-int.h.
5683 (pp_c_integer_constant): Use wide-int interfaces.
5684 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5685 INT_CST_LT_UNSIGNED.
5686
5687 2014-05-06 Richard Biener <rguenther@suse.de>
5688
5689 * c-opts.c (c_common_post_options): For -freestanding,
5690 -fno-hosted and -fno-builtin disable pattern recognition
5691 if not enabled explicitely.
5692
5693 2014-05-02 Marek Polacek <polacek@redhat.com>
5694
5695 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5696
5697 2014-05-01 Marek Polacek <polacek@redhat.com>
5698
5699 PR c/43245
5700 * c.opt (Wdiscarded-qualifiers): Add.
5701
5702 2014-04-30 Marek Polacek <polacek@redhat.com>
5703
5704 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5705 INT_MIN / -1 sanitization only for integer types.
5706
5707 2014-04-25 Marek Polacek <polacek@redhat.com>
5708
5709 PR c/18079
5710 * c-common.c (handle_noinline_attribute): Warn if the attribute
5711 conflicts with always_inline attribute.
5712 (handle_always_inline_attribute): Warn if the attribute conflicts
5713 with noinline attribute.
5714
5715 2014-04-25 Marek Polacek <polacek@redhat.com>
5716
5717 PR c/60156
5718 * c-common.c (check_main_parameter_types): Warn about variadic main.
5719
5720 2014-04-24 Mike Stump <mikestump@comcast.net>
5721
5722 * c.opt (Wshadow-ivar): Default to on.
5723
5724 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5725
5726 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5727
5728 2014-04-23 Marek Polacek <polacek@redhat.com>
5729
5730 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5731
5732 2014-04-22 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR sanitizer/60275
5735 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5736 if flag_sanitize_undefined_trap_on_error.
5737 (ubsan_instrument_division, ubsan_instrument_shift,
5738 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5739 if !flag_sanitize_recover.
5740
5741 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
5742
5743 PR libstdc++/43622
5744 * c-common.c (registered_builtin_types): Make non-static.
5745 * c-common.h (registered_builtin_types): Declare.
5746
5747 2014-04-14 Richard Biener <rguenther@suse.de>
5748 Marc Glisse <marc.glisse@inria.fr>
5749
5750 PR c/60819
5751 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5752 apply may-alias the scalar pointer type when applicable.
5753
5754 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5755
5756 PR middle-end/60467
5757 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5758 as possible argument for Cilk_spawn.
5759
5760 2014-04-11 Tobias Burnus <burnus@net-b.de>
5761
5762 PR c/60194
5763 * c.opt (Wformat-signedness): Add
5764 * c-format.c(check_format_types): Use it.
5765
5766 2014-04-11 Jason Merrill <jason@redhat.com>
5767
5768 PR c++/57926
5769 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5770 default_conversion for an array argument.
5771
5772 2014-04-08 Marek Polacek <polacek@redhat.com>
5773
5774 PR sanitizer/60745
5775 * c-ubsan.c: Include asan.h.
5776 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5777
5778 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5779
5780 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5781
5782 2014-04-02 Marek Polacek <polacek@redhat.com>
5783
5784 * c-common.h (c_expand_expr): Remove declaration.
5785
5786 2014-03-28 Jakub Jelinek <jakub@redhat.com>
5787
5788 PR c++/60689
5789 * c-common.c (add_atomic_size_parameter): When creating new
5790 params vector, push the size argument first.
5791
5792 2014-03-26 Jakub Jelinek <jakub@redhat.com>
5793
5794 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5795 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5796 ubsan_create_data callers.
5797
5798 2014-03-22 Jakub Jelinek <jakub@redhat.com>
5799
5800 PR debug/60603
5801 * c-opts.c (c_finish_options): Restore cb_file_change call to
5802 <built-in>.
5803
5804 2014-03-13 Jakub Jelinek <jakub@redhat.com>
5805
5806 PR middle-end/36282
5807 * c-pragma.c (apply_pragma_weak): Only look at
5808 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5809 DECL_ASSEMBLER_NAME_SET_P (decl).
5810 (maybe_apply_pending_pragma_weaks): Exit early if
5811 vec_safe_is_empty (pending_weaks) rather than only when
5812 !pending_weaks.
5813 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5814 set assembler name back to NULL afterwards.
5815
5816 2014-03-11 Jason Merrill <jason@redhat.com>
5817
5818 * c.opt: Add -std=gnu++14.
5819
5820 2014-03-11 Ian Bolton <ian.bolton@arm.com>
5821
5822 * c-opts.c (c_common_post_options): Don't override
5823 -ffp-contract=fast if unsafe-math-optimizations is on.
5824
5825 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
5826
5827 * c.opt: Enable LTO FE for fshort-double.
5828
5829 2014-03-07 Jason Merrill <jason@redhat.com>
5830
5831 * c.opt: Add -std=c++14.
5832
5833 2014-03-06 Marek Polacek <polacek@redhat.com>
5834
5835 PR c/60197
5836 * cilk.c (contains_cilk_spawn_stmt): New function.
5837 (contains_cilk_spawn_stmt_walker): Likewise.
5838 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5839 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5840
5841 2014-03-03 Jakub Jelinek <jakub@redhat.com>
5842
5843 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5844 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5845 even when flag_preprocess_only.
5846
5847 2014-02-26 Jason Merrill <jason@redhat.com>
5848
5849 PR c++/59231
5850 PR c++/11586
5851 * c-common.c (shorten_compare): Don't check
5852 c_inhibit_evaluation_warnings.
5853
5854 2014-02-19 Jakub Jelinek <jakub@redhat.com>
5855
5856 PR c/37743
5857 * c-common.c (c_common_nodes_and_builtins): When initializing
5858 c_uint{16,32,64}_type_node, also set corresponding
5859 uint{16,32,64}_type_node to the same value.
5860
5861 PR c++/60267
5862 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5863 for PRAGMA_IVDEP if flag_preprocess_only.
5864
5865 2014-02-12 Jakub Jelinek <jakub@redhat.com>
5866
5867 PR c/60101
5868 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5869 if false, add ADD itself, rather than vice versa.
5870 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5871 copy. For SAVE_EXPR, only call merge_tlist once.
5872
5873 2014-02-08 Jakub Jelinek <jakub@redhat.com>
5874
5875 PR middle-end/60092
5876 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5877 and tree_to_uhwi.
5878 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5879 functions.
5880 (c_common_attribute_table): Add alloc_align and assume_aligned
5881 attributes.
5882
5883 2014-02-06 Marek Polacek <polacek@redhat.com>
5884
5885 PR c/60087
5886 * c-common.c (warn_for_sign_compare): Call warning_at with location
5887 instead of warning.
5888
5889 2014-02-05 Marek Polacek <polacek@redhat.com>
5890
5891 PR c/53123
5892 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5893 statement.
5894
5895 2014-02-04 Marek Polacek <polacek@redhat.com>
5896
5897 PR c/60036
5898 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5899 SAVE_EXPR.
5900
5901 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
5902
5903 PR c++/53017
5904 PR c++/59211
5905 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5906 handle_vector_size_attribute, handle_nonnull_attribute): Call
5907 default_conversion on the attribute argument.
5908 (handle_nonnull_attribute): Increment the argument number.
5909
5910 2014-01-31 Marek Polacek <polacek@redhat.com>
5911
5912 PR c/59963
5913 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5914 build_function_call_vec.
5915 (resolve_overloaded_builtin): Likewise.
5916 * c-common.h (build_function_call_vec): Adjust declaration.
5917
5918 2014-01-30 Marek Polacek <polacek@redhat.com>
5919
5920 PR c/59940
5921 * c-common.h (unsafe_conversion_p): Adjust declaration.
5922 (warnings_for_convert_and_check): Likewise.
5923 (convert_and_check): Likewise.
5924 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5925 expansion_point_location_if_in_system_header on it.
5926 (warnings_for_convert_and_check): Add location parameter. Call
5927 expansion_point_location_if_in_system_header on it. Use it.
5928 (convert_and_check): Add location parameter. Use it.
5929 (conversion_warning): Likewise.
5930 (c_add_case_label): Adjust convert_and_check calls.
5931 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5932
5933 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5934
5935 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5936 flag_cilkplus.
5937 * c-pragma.c (init_pragma): Likewise.
5938 * c.opt: Likewise.
5939
5940 2014-01-23 Marek Polacek <polacek@redhat.com>
5941
5942 PR c/59846
5943 * c-common.c (shorten_compare): Add location_t parameter.
5944 * c-common.h (shorten_binary_op): Adjust declaration.
5945
5946 2014-01-23 Marek Polacek <polacek@redhat.com>
5947
5948 PR c/58346
5949 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5950 * c-common.h: Declare it.
5951
5952 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5953
5954 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5955 * c-ada-spec.c (dump_ads): Likewise.
5956 (cpp_check): Likewise.
5957 (dump_ada_specs): Likewise.
5958
5959 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
5960
5961 PR c++/49718
5962 * c-common.c (handle_no_instrument_function_attribute): Allow
5963 no_instrument_function attribute in class member
5964 definition/declaration.
5965
5966 2014-01-15 Jakub Jelinek <jakub@redhat.com>
5967
5968 PR c/58943
5969 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5970 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5971 being COMPOUND_EXPR.
5972 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5973 operand a SAVE_EXPR and second MODIFY_EXPR.
5974
5975 2014-01-09 Jakub Jelinek <jakub@redhat.com>
5976
5977 PR target/58115
5978 * c-pch.c (c_common_write_pch): Call
5979 prepare_target_option_nodes_for_pch.
5980
5981 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5982
5983 Update copyright years
5984
5985 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5986
5987 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5988 the copyright notice.
5989
5990 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5991
5992 * c-ada-spec.c (print_constructor): New function.
5993 (print_destructor): Retrieve the origin of the destructor.
5994 (print_ada_declaration): Revamp handling of constructors/destructors.
5995
5996 2013-12-23 Stuart Hastings <stuart@apple.com>
5997 Bill Maddox <maddox@google.com>
5998 Jason Merrill <jason@redhat.com>
5999
6000 * c.opt: Add -fdeclone-ctor-dtor.
6001 * c-opts.c (c_common_post_options): Default to on iff -Os.
6002
6003 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6004
6005 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6006 attribute.
6007 * c-pragma.h (enum pragma_cilk_clause): Remove.
6008 (enum pragma_omp_clause): Added the following fields:
6009 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6010 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6011 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6012 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6013 PRAGMA_CILK_CLAUSE_UNIFORM.
6014
6015
6016 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6017
6018 * cilk.c (cilk_outline): Made this function non-static.
6019 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6020 (create_cilk_wrapper): Added a new parameter: a function pointer.
6021 (c_install_body_w_frame_cleanup): Remove
6022 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6023 * c-common.h (cilk_outline): New prototype.
6024 (gimplify_cilk_spawn): Removed two parameters.
6025 (cilk_install_body_with_frame_cleanup): New prototype.
6026 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6027 CILK_SPAWN_STMT case.
6028
6029 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6030
6031 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6032
6033 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6034 (int_array_type_node): Remove.
6035 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6036
6037 2013-12-05 Marek Polacek <polacek@redhat.com>
6038
6039 PR c/52023
6040 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6041 [ADJUST_FIELD_ALIGN].
6042
6043 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6044
6045 PR c/52023
6046 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6047 and check field alignment if set.
6048 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6049 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6050
6051 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6052 Marek Polacek <polacek@redhat.com>
6053
6054 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6055 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6056
6057 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6058
6059 PR c/59309
6060 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6061 arguments.
6062
6063 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6064
6065 PR c/59280
6066 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6067 goto invalid. If it is error_mark_node, don't issue further
6068 diagnostics.
6069
6070 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6071
6072 * c.opt (Wopenmp-simd): New.
6073
6074 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6075
6076 * c-ubsan.h (ubsan_instrument_return): New prototype.
6077 * c-ubsan.c (ubsan_instrument_return): New function.
6078
6079 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6080
6081 * c-common.c: Add required include files from gimple.h.
6082 * c-gimplify.c: Likewise
6083 * cilk.c: Likewise
6084
6085 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6086
6087 * c-common.c (unsafe_conversion_p): Remove use of
6088 EXPR_LOC_OR_HERE macro.
6089 (conversion_warning): Likewise.
6090 (warnings_for_convert_and_check): Likewise.
6091 (warn_for_collisions_1): Likewise.
6092 (shorten_compare): Likewise, and remove use of in_system_header
6093 macro, using the location from the former.
6094 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6095 (cb_def_pragma): Remove use of in_system_header macro.
6096 (lex_string): Likewise.
6097 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6098
6099 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6100 Mike Stump <mikestump@comcast.net>
6101 Richard Sandiford <rdsandiford@googlemail.com>
6102
6103 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6104 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6105 tree_fits_shwi_p or tree_fits_uhwi_p.
6106 (dump_generic_ada_node): Likewise.
6107 * c-format.c (check_format_arg): Likewise.
6108 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6109
6110 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6111
6112 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6113
6114 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6115
6116 PR c/53001
6117 * c-common.c (unsafe_conversion_p): Make this function
6118 return an enumeration with more detail.
6119 (conversion_warning): Use the new return type of
6120 unsafe_conversion_p to separately warn either about conversions
6121 that lower floating point number precision or about the other
6122 kinds of conversions.
6123 * c-common.h (enum conversion_safety): New enumeration.
6124 (unsafe_conversion_p): switching return type to
6125 conversion_safety enumeration.
6126 * c.opt: Adding new warning -Wfloat-conversion and
6127 enabling it with -Wconversion.
6128
6129 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6130
6131 * c-opts.c: Include plugin.h.
6132 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6133
6134 2013-11-19 Marek Polacek <polacek@redhat.com>
6135
6136 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6137 call.
6138 (ubsan_instrument_shift): Likewise.
6139 (ubsan_instrument_vla): Likewise.
6140
6141 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6142
6143 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6144 cast to unsigned type.
6145
6146 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6147
6148 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6149 tree_low_cst.
6150 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6151 rather than tree_low_cst.
6152
6153 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6154
6155 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6156 tree_to_uhwi throughout.
6157
6158 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6159
6160 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6161 tree_low_cst (..., 0) with tree_to_shwi throughout.
6162
6163 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6164
6165 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6166 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6167
6168 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6169
6170 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6171 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6172
6173 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6174
6175 * c-cilkplus.c: New file.
6176 * c-common.c (readonly_error): Add location argument.
6177 * c-common.h (readonly_error): Same.
6178 (c_finish_cilk_clauses): Protoize.
6179 (c_check_cilk_loop): Same.
6180 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6181 Do not fail on error_mark_node.
6182 Abstract increment canonicalization to here...
6183 (c_omp_for_incr_canonicalize_ptr): New.
6184 c-pragma.c (init_pragma): Register "simd" pragma.
6185 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6186 (enum pragma_cilk_clause): New.
6187
6188 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6189
6190 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6191 wchar_type and host_integerp checks.
6192
6193 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6194
6195 * c-common.c: Likewise.
6196 * c-gimplify.c: Likewise.
6197 * cilk.c: Likewise.
6198
6199 2013-11-14 Diego Novillo <dnovillo@google.com>
6200
6201 * c-common.c: Include fold-const.h.
6202 Include stor-layout.h.
6203 Include calls.h.
6204 Include stringpool.h.
6205 Include attribs.h.
6206 Include varasm.h.
6207 Include trans-mem.h.
6208 * c-cppbuiltin.c: Include stor-layout.h.
6209 Include stringpool.h.
6210 * c-format.c: Include stringpool.h.
6211 * c-lex.c: Include stringpool.h.
6212 Include stor-layout.h.
6213 * c-pragma.c: Include stringpool.h.
6214 Include attribs.h.
6215 Include varasm.h.
6216 Include gcc-symtab.h.
6217 * c-pretty-print.c: Include stor-layout.h.
6218 Include attribs.h.
6219 * cilk.c: Include stringpool.h.
6220 Include calls.h.
6221
6222 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6223
6224 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6225 * c-common.c (c_common_reswords): Add __auto_type.
6226 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6227
6228 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6229
6230 * c-common.c: Include gimplify.h.
6231 * c-gimplify.c: Likewise.
6232 * cilk.c: Likewise.
6233 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6234 * c-ubsan.c: Don't include gimple.h.
6235
6236 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6237
6238 * c-common.c (c_common_reswords): Add _Thread_local.
6239
6240 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6241
6242 * c-common.c (atomic_size_supported_p): New function.
6243 (resolve_overloaded_atomic_exchange)
6244 (resolve_overloaded_atomic_compare_exchange)
6245 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6246 Use it instead of comparing size with a local list of sizes.
6247
6248 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6249 Joseph Myers <joseph@codesourcery.com>
6250
6251 * c-common.h (enum rid): Add RID_ATOMIC.
6252 * c-common.c (c_common_reswords): Add _Atomic.
6253 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6254 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6255 * c-format.c (check_format_types): Check for extra _Atomic
6256 qualifiers in format argument.
6257 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6258 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6259
6260 2013-11-06 Tobias Burnus <burnus@net-b.de>
6261
6262 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6263
6264 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6265
6266 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6267 standards modes.
6268 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6269 to mean lack of IEEE 754 support.
6270
6271 2013-11-05 Tobias Burnus <burnus@net-b.de>
6272
6273 * c.opt (-Wdate-time): New option
6274 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6275
6276 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6277
6278 * c-cppbuiltin.c (cpp_iec_559_value): Test
6279 flag_excess_precision_cmdline not flag_excess_precision.
6280
6281 2013-11-05 Tobias Burnus <burnus@net-b.de>
6282
6283 * c.opt (fopenmp-simd): New option.
6284 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6285 (omp_pragmas): ... this new struct.
6286 (c_pp_lookup_pragma): Also walk omp_pragmas.
6287 (init_pragma): Init pragmas for -fopenmp-simd.
6288
6289 2013-11-04 Marek Polacek <polacek@redhat.com>
6290
6291 PR c++/58979
6292 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6293
6294 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6295
6296 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6297 New functions.
6298 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6299
6300 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6301
6302 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6303 (dump_ada_specs): Adjust prototype of second callback.
6304 * c-ada-spec.c (cpp_check): New global variable.
6305 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6306 (print_generic_ada_decl): Likewise.
6307 (has_static_fields): Change return type to bool and add guard.
6308 (has_nontrivial_methods): New predicate.
6309 (is_tagged_type): Change return type to bool.
6310 (separate_class_package): Call has_nontrivial_methods.
6311 (pp_ada_tree_identifier): Minor tweaks.
6312 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6313 (dump_ada_array_domains): Likewise.
6314 (dump_ada_array_type): Likewise.
6315 (dump_template_types): Remove cpp_check parameter and do not pass it to
6316 dump_generic_ada_node.
6317 (dump_ada_template): Likewise.
6318 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6319 recursively.
6320 (print_ada_methods): Change return type to integer. Remove cpp_check
6321 parameter and do not pass it down.
6322 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6323 dump_generic_ada_node.
6324 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6325 accessing methods.
6326 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6327 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6328 value of print_ada_methods.
6329 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6330 Set cpp_check to it before invoking dump_ada_nodes.
6331 (dump_ada_specs): Likewise.
6332
6333 2013-11-03 Marek Polacek <polacek@redhat.com>
6334
6335 * c-ubsan.c: Don't include hash-table.h.
6336 (ubsan_instrument_vla): New function.
6337 * c-ubsan.h: Declare it.
6338
6339 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6340
6341 Automated part of renaming of symtab_node_base to symtab_node.
6342
6343 Patch autogenerated by rename_symtab.py from
6344 https://github.com/davidmalcolm/gcc-refactoring-scripts
6345 revision 58bb219cc090b2f4516a9297d868c245495ee622
6346
6347 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6348 symtab_node_base to symtab_node.
6349
6350 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6351
6352 Implement C++14 digit separators.
6353 * c-lex.c (interpret_float): Remove digit separators from scratch string
6354 before building real literal.
6355
6356 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6357
6358 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6359
6360 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6361
6362 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6363 fields.
6364 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6365 enabled.
6366 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6367 (insert_cilk_frame): New prototype.
6368 (cilk_init_builtins): Likewise.
6369 (gimplify_cilk_spawn): Likewise.
6370 (c_cilk_install_body_w_frame_cleanup): Likewise.
6371 (cilk_detect_spawn_and_unwrap): Likewise.
6372 (cilk_set_spawn_marker): Likewise.
6373 (build_cilk_sync): Likewise.
6374 (build_cilk_spawn): Likewise.
6375 * cilk.c: New file.
6376
6377 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6378
6379 Patch autogenerated by refactor_symtab.py from
6380 https://github.com/davidmalcolm/gcc-refactoring-scripts
6381 revision 58bb219cc090b2f4516a9297d868c245495ee622
6382
6383 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6384 to a true class hierarchy.
6385 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6386
6387 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6388
6389 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6390
6391 2013-10-26 Jeff Law <law@redhat.com>
6392
6393 * c-common.c (c_define_builtins): Remove mudflap support.
6394 * c.opt: Ignore and warn for mudflap options.
6395
6396 2013-10-24 Tobias Burnus <burnus@net-b.de>
6397
6398 PR other/33426
6399 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6400 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6401
6402 2013-10-23 Jason Merrill <jason@redhat.com>
6403
6404 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6405
6406 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6407
6408 * c-common.h (omp_clause_mask::operator !=): New method.
6409 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6410 instead of if (mask & something) tests everywhere.
6411
6412 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6413 201307 instead of 201107.
6414 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6415 (c_common_attribute_table): Add "omp declare target" and
6416 "omp declare simd" attributes.
6417 (handle_omp_declare_target_attribute,
6418 handle_omp_declare_simd_attribute): New functions.
6419 * c-omp.c: Include c-pragma.h.
6420 (c_finish_omp_taskgroup): New function.
6421 (c_finish_omp_atomic): Add swapped argument, if true,
6422 build the operation first with rhs, lhs arguments and use NOP_EXPR
6423 build_modify_expr.
6424 (c_finish_omp_for): Add code argument, pass it down to make_code.
6425 (c_omp_split_clauses): New function.
6426 (c_split_parallel_clauses): Removed.
6427 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6428 c_omp_declare_simd_clauses_to_decls): New functions.
6429 * c-common.h (omp_clause_mask): New type.
6430 (OMP_CLAUSE_MASK_1): Define.
6431 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6432 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6433 omp_clause_mask::operator |, omp_clause_mask::operator &,
6434 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6435 omp_clause_mask::operator ==): New methods.
6436 (enum c_omp_clause_split): New.
6437 (c_finish_omp_taskgroup): New prototype.
6438 (c_finish_omp_atomic): Add swapped argument.
6439 (c_finish_omp_for): Add code argument.
6440 (c_omp_split_clauses): New prototype.
6441 (c_split_parallel_clauses): Removed.
6442 (c_omp_declare_simd_clauses_to_numbers,
6443 c_omp_declare_simd_clauses_to_decls): New prototypes.
6444 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6445 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6446 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6447 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6448 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6449 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6450 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6451 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6452 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6453 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6454 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6455 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6456 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6457 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6458 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6459 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6460 PRAGMA_OMP_CLAUSE_UNIFORM.
6461
6462 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6463
6464 PR tree-optimization/20318
6465 * c-common.c (handle_returns_nonnull_attribute): New function.
6466 (c_common_attribute_table): Add returns_nonnull.
6467
6468 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6469
6470 PR c++/19476
6471 * c.opt (fcheck-new): Move to common.opt.
6472
6473 2013-09-25 Marek Polacek <polacek@redhat.com>
6474 Jakub Jelinek <jakub@redhat.com>
6475
6476 PR sanitizer/58413
6477 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6478 an expression if we can prove it is correct.
6479 (ubsan_instrument_division): Likewise. Remove unnecessary
6480 check.
6481
6482 2013-09-18 Marek Polacek <polacek@redhat.com>
6483
6484 PR sanitizer/58411
6485 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6486 Declare it.
6487 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6488
6489 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6490
6491 PR target/48094
6492 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6493 fobjc-gc, freplace-objc-classes): Accept for LTO.
6494
6495 2013-09-13 Jacek Caban <jacek@codeweavers.com>
6496
6497 * c-target.def: New hook
6498
6499 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6500
6501 PR c++/43452
6502 * c.opt (Wdelete-incomplete): Add.
6503
6504 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6505
6506 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6507 (vector_types_compatible_elements_p): New function.
6508 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6509 declaration.
6510 (vector_types_compatible_elements_p): Declare.
6511
6512 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6513
6514 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6515 a virtual member function.
6516 (pp_simple_type_specifier): Remove.
6517 (pp_c_type_specifier): Likewise.
6518 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6519 Rename from pp_c_type_specifier. Adjust.
6520 (c_pretty_printer::c_pretty_printer): Do not assign to
6521 simple_type_specifier.
6522
6523 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6524
6525 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6526 member function.
6527 (c_pretty_printer::storage_class_specifier): Likewise.
6528 (c_pretty_printer::initializer): Likewise.
6529 (pp_declaration): Remove.
6530 (pp_declaration_specifiers): Likewise.
6531 (pp_abstract_declarator): Likewise.
6532 (pp_declarator): Likewise.
6533 (pp_type_id): Likewise.
6534 (pp_statement): Likewise.
6535 (pp_constant): Likewise.
6536 (pp_id_expression): Likewise.
6537 (pp_primary_expression): Likewise.
6538 (pp_unary_expression): Likewise.
6539 (pp_multiplicative_expression): Likewise.
6540 (pp_conditional_expression): Likewise.
6541 (pp_assignment_expression): Likewise.
6542 (pp_expression): Likewise.
6543 (pp_c_type_id): Likewise.
6544 (pp_c_storage_class_specifier): Likewise.
6545 * c-pretty-print.c (pp_c_type_cast): Tidy.
6546 (pp_c_pointer): Likewise.
6547 (pp_c_type_specifier): Likewise.
6548 (pp_c_parameter_type_list): Likewise.
6549 (pp_c_function_definition): Likewise.
6550 (pp_c_init_declarator): Likewise.
6551 (pp_c_initializer_list): Likewise.
6552 (pp_c_constructor_elts): Likewise.
6553 (c_pretty_printer::direct_abstract_declarator): Likewise.
6554 (c_pretty_printer::declaration_specifiers): Likewise.
6555 (c_pretty_printer::primary_expression): Likewise.
6556 (c_pretty_printer::postfix_expression): Likewise.
6557 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6558 (c_pretty_printer::storage_class_specifier): Rename from
6559 pp_c_storage_class_specifier.
6560 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6561 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6562 storage_class_specifier, initializer, offset_list, flags.
6563
6564 2013-08-30 Marek Polacek <polacek@redhat.com>
6565
6566 * c-ubsan.c: New file.
6567 * c-ubsan.h: New file.
6568
6569 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6570
6571 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6572 member function.
6573 (c_pretty_printer::declaration_specifiers): Likewise.
6574 (c_pretty_printer::declarator): Likewise.
6575 (c_pretty_printer::abstract_declarator): Likewise.
6576 (c_pretty_printer::direct_abstract_declarator): Likewise.
6577 (c_pretty_printer::direct_declarator): Likewise.
6578 (c_pretty_printer::function_specifier): Likewise.
6579 (pp_declaration): Adjust.
6580 (pp_declaration_specifiers): Likewise.
6581 (pp_abstract_declarator): Likewise.
6582 (pp_direct_declarator): Likewise.
6583 (pp_function_specifier): Likewise.
6584 (pp_direct_abstract_declarator): Remove as unused.
6585 (pp_c_declaration): Remove.
6586 (pp_c_declaration_specifiers): Likewise.
6587 (pp_c_declarator): Likewise.
6588 (pp_c_direct_declarator): Likewise.
6589 (pp_c_function_specifier): Likewise.
6590 (pp_c_direct_abstract_declarator): Likewise.
6591 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6592 from pp_c_abstract_declarator. Adjust.
6593 (c_pretty_printer::direct_abstract_declarator): Rename from
6594 pp_c_direct_abstract_declarator. Adjust.
6595 (c_pretty_printer::function_specifier): Rename from
6596 pp_c_function_specifier. Adjust.
6597 (c_pretty_printer::declaration_specifiers): Rename from
6598 pp_c_declaration_specifiers. Adjust.
6599 (c_pretty_printer::direct_declarator): Rename from
6600 pp_c_direct_declarator. Adjust.
6601 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6602 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6603 (c_pretty_printer::c_pretty_printer): Do not assign to
6604 declaration, declaration_specifiers, declarator,
6605 direct_declarator, direct_abstract_declarator, function_specifier.
6606
6607 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6608
6609 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6610 virtual member function.
6611 (c_pretty_printer::multiplicative_expression): Likewise.
6612 (c_pretty_printer::conditional_expression): Likewise.
6613 (c_pretty_printer::assignment_expression): Likewise.
6614 (c_pretty_printer::expression): Likewise.
6615 (pp_unary_expression): Adjust.
6616 (pp_multiplicative_expression): Likewise.
6617 (pp_assignment_expression): Likewise.
6618 (pp_conditional_expression): Likewise.
6619 (pp_expression): Likewise.
6620 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6621 from pp_c_unary_expression. Adjust.
6622 (c_pretty_printer::multiplicative_expression): Rename from
6623 pp_c_multiplicative_expression. Adjust.
6624 (c_pretty_printer::conditional_expression): Rename from
6625 pp_c_conditional_expression. Adjust.
6626 (c_pretty_printer::assignment_expression): Rename from
6627 pp_c_assignment_expression. Adjust.
6628 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6629 (c_pretty_printer::c_pretty_printer): Do not assign to
6630 unary_expression, multiplicative_expression,
6631 conditional_expression, expression.
6632
6633 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6634
6635 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6636 virtual member function.
6637 (pp_postfix_expression): Adjust.
6638 (pp_c_postfix_expression): Remove.
6639 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6640 from pp_c_postfix_expression. Adjust.
6641 (c_pretty_printer::c_pretty_printer): Do not assign to
6642 postfix_expression.
6643
6644 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6645
6646 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6647 virtua member function.
6648 (pp_primary_expression): Adjust.
6649 (pp_c_primary_expression): Remove.
6650 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6651 from pp_c_primary_expression. Adjust.
6652 (pp_c_initializer_list): Use pp_primary_expression.
6653 (c_pretty_printer::c_pretty_printer): Do not assign to
6654 primary_expression.
6655
6656 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6657
6658 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6659 * c-pretty-print.c (M_): Remove.
6660 (c_pretty_printer::translate_string): Define.
6661 (pp_c_type_specifier): Use it.
6662 (pp_c_primary_expression): Likewise.
6663 (pp_c_expression): Likewise.
6664
6665 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6666
6667 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6668 virtual function.
6669 (pp_c_id_expression): Remove.
6670 (pp_id_expression): Adjust.
6671 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6672 pp_c_id_expression. Adjust.
6673 (pp_c_postfix_expression): Use pp_id_expression.
6674 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6675
6676 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6677
6678 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6679 member function.
6680 (pp_constant): Adjust.
6681 (pp_c_constant): Remove.
6682 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6683 pp_c_constant. Adjust.
6684 (pp_c_constant)
6685 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6686 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6687
6688 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6689
6690 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6691 (c_pretty_printer::c_pretty_printer): Declare.
6692 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6693 c_pretty_printer_init. Adjust.
6694 (print_c_tree): Do not call c_pretty_printer_init.
6695 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6696
6697 2013-08-09 Arnaud Charlet <charlet@adacore.com>
6698
6699 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6700
6701 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6702
6703 PR c++/58080
6704 * c-common.c (pointer_int_sum): Add bool parameter.
6705 * c-common.h (pointer_int_sum): Adjust declaration.
6706
6707 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6708
6709 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6710 c_pretty_printer variable.
6711
6712 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6713
6714 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6715 (pp_base): Remove.
6716 (pp_c_base): Likewise. Adjust users.
6717 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6718 (pp_c_whitespace): Do not call pp_base.
6719 (pp_c_left_paren): Likewise.
6720 (pp_c_right_paren): Likewise.
6721 (pp_c_left_brace): Likewise.
6722 (pp_c_right_brace): Likewise.
6723 (pp_c_left_bracket): Likewise.
6724 (pp_c_right_bracket): Likewise.
6725 (pp_c_dot): Likewise.
6726 (pp_c_ampersand): Likewise.
6727 (pp_c_star): Likewise.
6728 (pp_c_arrow): Likewise.
6729 (pp_c_semicolon): Likewise.
6730 (pp_c_complement): Likewise.
6731 (pp_c_exclamation): Likewise.
6732 (pp_c_direct_declarator): Likewise.
6733 (pp_c_ws_string): Likewise.
6734 (pp_c_identifier): Likewise.
6735 (pp_c_statement): Likewise.
6736 (print_c_tree): Likewise.
6737
6738 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6739
6740 PR c++/58072
6741 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6742 provide useful error strings.
6743
6744 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6745
6746 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6747 printer functions instead of pp_string or operators and punctuators.
6748 (dump_generic_ada_node): Likewise.
6749 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6750 (pp_c_relational_expression): Likewise.
6751 (pp_c_logical_or_expression): Likewise.
6752
6753 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6754
6755 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6756 functions instead of pp_character.
6757 (pp_ada_tree_identifier): Likewise.
6758 (dump_ada_double_name): Likewise.
6759 (dump_ada_function_declaration): Likewise.
6760 (dump_ada_array_domains): Likewise.
6761 (dump_template_types): Likewise.
6762 (dump_generic_ada_node): Likewise.
6763 (print_ada_declaration): Likewise.
6764 (print_ada_struct_decl): Likewise.
6765 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6766
6767 2013-07-23 Tom Tromey <tromey@redhat.com>
6768
6769 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6770 * c-common.c (c_common_reswords): Add _Generic.
6771
6772 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
6773
6774 * c-common.c: Fix typos.
6775 * c-common.h: Likewise.
6776
6777 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
6778
6779 PR c++/55203
6780 * c-common.c (c_common_attribute_table): Add warn_unused.
6781 (handle_warn_unused_attribute): New.
6782
6783 2013-07-10 Jakub Jelinek <jakub@redhat.com>
6784
6785 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6786 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6787
6788 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6789
6790 PR c++/57869
6791 * c.opt: Add Wconditionally-supported.
6792
6793 2013-07-08 Graham Stott <graham.stott@btinternet.com>
6794
6795 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6796 unused variables l_length and l_node.
6797
6798 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
6799
6800 PR c/57821
6801 * c-common.c (complete_array_type): Delay folding first index
6802 like other indices. When folding, check for index overflow.
6803
6804 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
6805
6806 PR c++/57509
6807 * c-common.h (c_build_vec_perm_expr): New complain argument.
6808 * c-common.c (c_build_vec_perm_expr): Likewise.
6809 Use save_expr also in C++.
6810
6811 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6812
6813 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6814 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6815 * c-opts.c (c_common_post_options): Likewise.
6816
6817 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6818
6819 * array-notation-common.c (length_mismatch_in_expr): Changed the
6820 parameter type's from a dynamic array to a vec_tree. Also removed
6821 the size parameters.
6822 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6823 the change above.
6824
6825 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6826
6827 * c-common.h (struct cilkplus_an_parts): New structure.
6828 (struct cilkplus_an_loop_parts): Likewise.
6829 (cilkplus_extract_an_triplets): New prototype.
6830 (fix_sec_implicit_args): Likewise.
6831 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6832 (fix_sec_implicit_args): Likewise.
6833
6834 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6835
6836 * array-notation-common.c (find_inv_trees): Removed an unwanted
6837 typecasting.
6838 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6839 enum rid to enum tree_code.
6840
6841 2013-06-11 Jan Hubicka <jh@suse.cz>
6842
6843 * c-common.c (handle_alias_ifunc_attribute): Do not set
6844 DECL_EXTERNAL for weakref variables.
6845 * c-pragma.c (handle_pragma_weak): Make sure aliases
6846 are not declared as external.
6847
6848 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6849
6850 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6851 function from c/c-array-notation.c.
6852 (is_cilkplus_reduce_builtin): Likewise.
6853 (find_rank): Likewise.
6854 (extract_array_notation_exprs): Likewise.
6855 (replace_array_notations): Likewise.
6856 (find_inv_trees): Likewise.
6857 (replace_inv_trees): Likewise.
6858 (contains_array_notation_expr): Likewise.
6859 (find_correct_array_notation_type): Likewise.
6860 * c-common.h (struct inv_list): Moved this struct from the file
6861 c/c-array-notation.c and added a new field called additional tcodes.
6862 (length_mismatch_in_expr_p): New prototype.
6863 (is_cilkplus_reduce_builtin): Likewise.
6864 (find_rank): Likewise.
6865 (extract_array_notation_exprs): Likewise.
6866 (replace_array_notation): Likewise.
6867 (find_inv_trees): Likewise.
6868 (replace_inv_trees): Likewise.
6869 (find_correct_array_notation_type): Likewise.
6870
6871 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6872
6873 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6874 function array_notation_init_builtins is called.
6875 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6876 * c-common.def (ARRAY_NOTATION_REF): New tree.
6877 * c-common.h (build_array_notation_expr): New function declaration.
6878 (build_array_notation_ref): Likewise.
6879 (extract_sec_implicit_index_arg): New extern declaration.
6880 (is_sec_implicit_index_fn): Likewise.
6881 (ARRAY_NOTATION_CHECK): New define.
6882 (ARRAY_NOTATION_ARRAY): Likewise.
6883 (ARRAY_NOTATION_START): Likewise.
6884 (ARRAY_NOTATION_LENGTH): Likewise.
6885 (ARRAY_NOTATION_STRIDE): Likewise.
6886 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6887 ARRAY_NOTATION_REF.
6888 (pp_c_expression): Likewise.
6889 * c.opt (flag_enable_cilkplus): New flag.
6890 * array-notation-common.c: New file.
6891
6892 2013-05-14 Jakub Jelinek <jakub@redhat.com>
6893
6894 PR c++/57274
6895 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6896
6897 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
6898
6899 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6900 vectors.
6901
6902 2013-05-07 Han Shen <shenhan@google.com>
6903
6904 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6905
6906 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6907
6908 * c-common.c (check_user_alignment): Emit error for negative values.
6909
6910 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6911
6912 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6913
6914 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6915
6916 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6917 __GXX_EXPERIMENTAL_CXX1Y__.
6918
6919 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6920 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
6921
6922 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6923 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6924 to simply use OPT_Wpointer_arith.
6925 (c_sizeof_or_alignof_type): Likewise.
6926
6927 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6928
6929 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6930
6931 2013-04-12 Jakub Jelinek <jakub@redhat.com>
6932
6933 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6934 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6935 specifiers.
6936
6937 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6938
6939 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6940
6941 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6942
6943 * c-common.c (pointer_int_sum): Remove dead code.
6944
6945 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6946
6947 PR middle-end/56524
6948 * c-common.c (handle_optimize_attribute): Don't call
6949 save_optabs_if_changed.
6950
6951 2013-03-05 Jakub Jelinek <jakub@redhat.com>
6952
6953 PR middle-end/56461
6954 * c-pch.c (pch_init): Free target_validity at the end.
6955
6956 2013-03-04 Jakub Jelinek <jakub@redhat.com>
6957
6958 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6959
6960 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6961 Jakub Jelinek <jakub@redhat.com>
6962
6963 PR sanitizer/56454
6964 * c-common.c (handle_no_sanitize_address_attribute): New function.
6965 (c_common_attribute_table): Add no_sanitize_address attribute.
6966 (handle_no_address_safety_analysis_attribute): Add
6967 no_sanitize_address attribute, not no_address_safety_analysis
6968 attribute.
6969
6970 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
6971
6972 PR target/52555
6973 * c-common.c (handle_optimize_attribute): Call
6974 save_optabs_if_changed.
6975
6976 2013-02-18 Jakub Jelinek <jakub@redhat.com>
6977 Steven Bosscher <steven@gcc.gnu.org>
6978
6979 PR pch/54117
6980 * c-opts.c (c_common_post_options): If debug info is enabled
6981 and non-dwarf*, refuse to load PCH files and when writing PCH
6982 file warn.
6983
6984 2013-02-05 Jakub Jelinek <jakub@redhat.com>
6985
6986 PR middle-end/56167
6987 * c-common.c (handle_error_attribute): Fix condition.
6988
6989 2013-01-30 Jakub Jelinek <jakub@redhat.com>
6990
6991 PR c++/55742
6992 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6993
6994 2013-01-18 Jason Merrill <jason@redhat.com>
6995
6996 PR target/54908
6997 * c.opt (-fextern-tls-init): New.
6998 * c-opts.c (c_common_post_options): Handle it.
6999
7000 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7001
7002 PR c/48418
7003 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7004 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7005 and is either negative or bigger or equal to type precision
7006 of the first operand.
7007
7008 2012-12-03 Marek Polacek <polacek@redhat.com>
7009
7010 PR c/55570
7011 * c-common.c (check_user_alignment): Swap order of tests,
7012 check TREE_CODE first.
7013
7014 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7015
7016 PR c++/52654
7017 * c-common.h (overflow_type): New enum.
7018 (build_userdef_literal): Add overflow_type argument.
7019 (tree_userdef_literal): Add overflow_type.
7020 (USERDEF_LITERAL_OVERFLOW): New access macro.
7021 * c-common.c (build_userdef_literal): Add overflow_type
7022 argument.
7023 * c-lex.c (c_lex_with_flags): Add overflow_type to
7024 build_userdef_literal calls.
7025 (interpret_integer, interpret_float): Add overflow_type argument.
7026
7027 2012-11-28 Richard Biener <rguenther@suse.de>
7028
7029 PR c/35634
7030 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7031 here and use a type with proper overflow behavior for types that would
7032 need to be promoted for the arithmetic.
7033
7034 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7035
7036 PR sanitizer/55435
7037 * c-common.c (handle_no_address_safety_analysis_attribute): New
7038 function.
7039 (c_common_attribute_table): Add no_address_safety_analysis.
7040
7041 2012-11-16 Simon Baldwin <simonb@google.com>
7042
7043 * c.opt: Add f[no-]canonical-system-headers.
7044 * c-opts.c (c_common_handle_option): Handle
7045 OPT_fcanonical_system_headers.
7046
7047 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7048
7049 PR c++/54413
7050 * c-opts.c (c_common_handle_option): Set new flags.
7051 * c.opt: Describe new flags.
7052
7053 2012-11-09 Jason Merrill <jason@redhat.com>
7054
7055 * c.opt (Wabi-tag): New.
7056
7057 2012-11-09 Andi Kleen <ak@linux.intel.com>
7058
7059 PR 55139
7060 * c-common.c (get_atomic_generic_size): Mask with
7061 MEMMODEL_MASK
7062
7063 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7064
7065 PR c/53063
7066 * c.opt (Wformat): Make it Alias Wformat=1.
7067 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7068 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7069 LangEnabledBy.
7070 (Wformat=): RejectNegative. Use LangEnabledBy.
7071 (Wnonnull): Use LangEnabledBy.
7072 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7073 * c-format.c (set_Wformat): Delete.
7074 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7075 (maybe_read_dollar_number): Likewise.
7076 (avoid_dollar_number): Likewise.
7077 (finish_dollar_format_checking): Likewise.
7078 (check_format_info): Likewise.
7079 (check_format_info_main): Likewise.
7080 (check_format_types): Likewise.
7081 (format_type_warning): Likewise.
7082 * c-common.c (int): Likewise.
7083 (check_function_sentinel): Likewise.
7084 * c-common.h (warn_format,set_Wformat): Do not declare here.
7085
7086 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7087
7088 PR c/53063
7089 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7090 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7091 Use LangEnabledBy.
7092 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7093 common.opt.
7094 (Wvariadic-macros): Init(1).
7095 * c-opts.c (c_common_handle_option): Do not handle them
7096 explicitly.
7097 (c_common_post_options): Likewise.
7098 (sanitize_cpp_opts): warn_unused_macros is now
7099 cpp_warn_unused_macros.
7100 (push_command_line_include): Likewise.
7101 * c-common.c (warn_unknown_pragmas): Do not define.
7102 * c-common.h (warn_unknown_pragmas): Do not declare.
7103
7104 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7105
7106 PR c/51294
7107 * c-common.c (conversion_warning): Handle conditional expressions.
7108
7109 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7110
7111 PR c++/54930
7112 * c.opt (Wreturn_local_addr): Define new option.
7113
7114 2012-10-25 Jason Merrill <jason@redhat.com>
7115
7116 * c.opt (Wvirtual-move-assign): New.
7117
7118 * c.opt (Winherited-variadic-ctor): New.
7119
7120 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7121
7122 PR c++/54427
7123 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7124
7125 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7126
7127 * c-common.h (pch_cpp_save_state): Declare.
7128 * c-target.def (c_preinclude): New hook.
7129 * c-opts.c (done_preinclude): New.
7130 (push_command_line_include): Handle default preincluded header.
7131 (cb_file_change): Call pch_cpp_save_state when calling
7132 push_command_line_include.
7133 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7134 (pch_cpp_save_state): New.
7135 (pch_init): Call pch_cpp_save_state conditionally, instead of
7136 calling cpp_save_state.
7137
7138 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7139
7140 PR c/53063
7141 PR c/40989
7142 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7143 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7144 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7145 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7146 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7147 * c-opts.c (c_common_handle_option): Remove explicit handling from
7148 here.
7149 (c_common_post_options): Likewise.
7150
7151 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7152
7153 * c-ada-spec.c (LOCATION_COL): Delete.
7154 (compare_location): New function.
7155 (compare_node): Use it.
7156 (compare_comment): Likewise.
7157
7158 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7159
7160 PR c/53063
7161 PR c/40989
7162 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7163 * c-opts.c (c_common_handle_option): Do not set them here. Add
7164 comment.
7165 (c_common_post_options): Likewise.
7166
7167 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7168
7169 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7170 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7171 Remove POINTER_TYPE handling, add large unsigned handling and use
7172 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7173
7174 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7175
7176 PR c/54381
7177 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7178 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7179 locs and array of 3 trees instead of just single loc and single
7180 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7181 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7182 For *cmp* builtins that take two sources strings report warnings
7183 about first and second source, not about destination and source.
7184
7185 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7186
7187 PR c++/53055
7188 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7189
7190 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7191
7192 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7193 declaring something coming from another file.
7194
7195 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7196
7197 PR ada/54845
7198 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7199
7200 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7201
7202 PR c++/54194
7203 * c-common.c (warn_about_parentheses): Add location_t parameter;
7204 use EXPR_LOC_OR_LOC.
7205 * c-common.h: Update declaration.
7206
7207 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7208
7209 PR c++/54427
7210 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7211 more operations. Make error messages optional.
7212 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7213 (scalar_to_vector): Declare.
7214
7215 2012-10-08 Jason Merrill <jason@redhat.com>
7216
7217 * c-common.c (c_common_reswords): Add thread_local.
7218
7219 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7220
7221 PR c++/53528 C++11 attribute support
7222 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7223 new functions.
7224 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7225 static function.
7226 (handle_aligned_attribute): In choose strictest alignment
7227 among many. Use new check_cxx_fundamental_alignment_constraints.
7228 (handle_transparent_union_attribute): In c++11 attribute syntax,
7229 don't look through typedefs.
7230
7231 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7232
7233 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7234 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7235 out of dumpfile.h.
7236
7237 2012-09-25 Dehao Chen <dehao@google.com>
7238
7239 PR middle-end/54645
7240 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7241 map when read in the pch.
7242
7243 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7244
7245 * c-ada-spec.c: Style fixes.
7246
7247 2012-09-18 Thomas Quinot <quinot@adacore.com>
7248
7249 * c.opt (-fada-spec-parent): Define new command line switch.
7250 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7251 is specified, generate binding spec as a child of the specified unit.
7252
7253 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7254 Manuel López-Ibáñez <manu@gcc.gnu.org>
7255
7256 PR c++/53210
7257 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7258
7259 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7260
7261 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7262 for pointers, and add missing Convention C pragma.
7263 (print_ada_struct_decl): Add missing aliased keyword.
7264 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7265
7266 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7267
7268 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7269 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7270 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7271 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7272 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7273
7274 2012-08-10 Richard Guenther <rguenther@suse.de>
7275
7276 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7277
7278 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7279
7280 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7281 instead of separate pp_newline and pp_flush.
7282 (print_c_tree): Likewise.
7283
7284 2012-07-26 Richard Henderson <rth@redhat.com>
7285
7286 * c-common.c (handle_hot_attribute): Allow labels.
7287 (handle_cold_attribute): Likewise.
7288
7289 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7290
7291 PR c++/28656
7292 * c-common.c (check_function_nonnull): Handle multiple nonnull
7293 attributes properly.
7294
7295 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7296
7297 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7298 * c-ada-spec.c: Likewise.
7299 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7300
7301 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7302
7303 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7304 Remove code conditional on it.
7305
7306 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7307
7308 * c-gimplify.c: Do not include basic-block.h.
7309 * c-common.c: Do not include linfuncs.h.
7310
7311 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7312
7313 * c-common.h: Include tree.h.
7314
7315 2012-07-02 Jason Merrill <jason@redhat.com>
7316
7317 PR c++/53524
7318 * c-common.c (get_priority): Call default_conversion.
7319
7320 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7321
7322 * c-pch.c (c_common_write_pch): Remove unused variables.
7323
7324 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7325
7326 * cppspec.c: Moved from gcc/ to here.
7327
7328 2012-06-27 Kai Tietz <ktietz@redhat.com>
7329
7330 PR preprocessor/37215
7331 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7332
7333 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7334
7335 * c-common.h (c_common_print_pch_checksum): Remove.
7336 * c-pch.c: Do not include output.h.
7337 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7338 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7339 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7340 (struct c_pch_header): Remove.
7341 (get_ident): Update gpch version.
7342 (pch_init): Do not print executable_checksum to asm_out_file.
7343 Do not fail if there is no asm_out_file to read back from. Set
7344 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7345 (c_common_write_pch): Verify that nothing was written to asm_out_file
7346 since pch_init was called. Do not write a c_pch_header, and do not
7347 copy from asm_out_file to the PCH.
7348 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7349 the content of asm_out_file from the PCH.
7350 (c_common_print_pch_checksum): Remove.
7351 * c-opts.c (c_common_init): Print out executable_checksum directly.
7352
7353 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7354
7355 * c-target.def (objc_declare_unresolved_class_reference,
7356 objc_declare_class_definition): Add new hooks.
7357
7358 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7359
7360 * c-lex.c: Do not include output.h.
7361 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7362 Remove uses of ASM_OUTPUT_IDENT.
7363
7364 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7365
7366 PR c++/51033
7367 * c-common.h (c_build_vec_perm_expr): Move decl here.
7368 * c-common.c (c_build_vec_perm_expr): Move definition
7369 here.
7370
7371 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7372
7373 * c.opt (fconserve-space): Turn into a no-op.
7374
7375 2012-06-04 Sterling Augustine <saugustine@google.com>
7376
7377 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7378 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7379 both the start and end of the function.
7380
7381 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7382
7383 * c-common.c: Do not include output.h.
7384 * c-pragma.c: Likewise.
7385
7386 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7387
7388 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7389 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7390 (lang_decl_name): Handle namespace decls.
7391
7392 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7393
7394 * c-ada-spec.c: Do not include output.h.
7395 * c-semantics.c: Likewise.
7396
7397 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7398
7399 * c-common.c: Fix typo.
7400
7401 2012-05-29 Michael Matz <matz@suse.de>
7402
7403 * c-common.h (c_expand_decl): Remove prototype.
7404
7405 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7406
7407 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7408 * c-opts.c (c_common_handle_option): Remove code handling
7409 warn_missing_braces.
7410
7411 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7412
7413 PR c++/25137
7414 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7415 -Wmissing_braces.
7416
7417 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7418
7419 PR c++/53322
7420 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7421
7422 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7423
7424 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7425 * c-opts.c (c_common_handle_option): Do not handle explicitly
7426 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7427
7428 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7429
7430 PR preprocessor/7263
7431 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7432 to cpp_classify_number. For diagnostics, use the precise location
7433 instead of the global input_location.
7434
7435 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7436
7437 PR c++/11856
7438 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7439
7440 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7441
7442 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7443
7444 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7445
7446 PR 53063
7447 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7448 Wreorder): Use LangEnabledBy.
7449 * c-opts.c (c_common_handle_option): Do not enable them
7450 explicitly. Call lang-specific generated functions.
7451 (c_common_post_options): Do not set them here.
7452
7453 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7454
7455 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7456 Wmissing-field-initializers,Wmissing-parameter-type,
7457 Wold-style-declaration,Woverride-init): Use EnabledBy.
7458 * c-opts.c (c_common_post_options): Do not set here explicitly.
7459
7460 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7461
7462 PR 53063
7463 * c-opts.c (c_common_handle_option): Use handle_generated_option
7464 to enable sub-options.
7465
7466 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7467
7468 PR c++/53158
7469 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7470
7471 2012-05-10 Richard Guenther <rguenther@suse.de>
7472
7473 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7474 adjust commentary about TYPE_IS_SIZETYPE types.
7475
7476 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7477
7478 PR c++/53261
7479 * c-common.c (warn_logical_operator): Check that argument of
7480 integer_zerop is not NULL.
7481
7482 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7483
7484 PR c/43772
7485 * c-common.c (warn_logical_operator): Do not warn if either side
7486 is already true or false.
7487
7488 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7489
7490 PR c/51712
7491 * c-common.c (expr_original_type): New.
7492 (shorten_compare): Do not warn for enumeration types.
7493
7494 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7495
7496 * c.opt (fpermissive): Add Var(flag_permissive).
7497
7498 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
7499
7500 PR c++/51033
7501 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7502 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7503
7504 2012-04-30 Dodji Seketeli <dodji@redhat.com>
7505
7506 Add -Wvarargs option
7507 * c.opt (Wvarargs): Define new option.
7508
7509 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7510
7511 * c-common.c (check_function_arguments): Replace
7512 Wmissing-format-attribute with Wsuggest-attribute=format.
7513
7514 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7515
7516 * c.opt (Wsuggest-attribute=format): New. Alias of
7517 Wmissing-format-attribute.
7518 * c-format.c (decode_format_type): Replace
7519 Wmissing-format-attribute with Wsuggest-attribute=format.
7520 (check_function_format): Likewise.
7521
7522 2012-04-27 Ollie Wild <aaw@google.com>
7523
7524 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7525 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7526 * c.opt: Add Wliteral-suffix.
7527
7528 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7529
7530 PR c/44774
7531 * c.opt (Wpedantic): New.
7532 (pedantic): Alias Wpedantic.
7533 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7534 (c_common_post_options): Likewise.
7535 (sanitize_cpp_opts): Likewise.
7536 * c-lex.c (interpret_float): Likewise.
7537 * c-format.c (check_format_types): Likewise.
7538 * c-common.c (pointer_int_sum): Likewise.
7539 (c_sizeof_or_alignof_type): Likewise.
7540 (c_add_case_label): Likewise.
7541 (c_do_switch_warnings): Likewise.
7542 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7543
7544 2012-04-15 Jason Merrill <jason@redhat.com>
7545
7546 PR c++/52818
7547 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7548 (C_STD_NAME): Distinguish between C++98 and C++11.
7549
7550 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7551
7552 PR target/52624
7553 * c-common.h (uint16_type_node): Rename into...
7554 (c_uint16_type_node): ...this.
7555 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7556 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7557
7558 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7559
7560 * c-common.c (warn_if_unused_value): Move definition to here.
7561 * c-common.h (warn_if_unused_value): Move declaration to here.
7562
7563 2012-03-23 William Bader <williambader@hotmail.com>
7564
7565 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7566
7567 2012-03-20 Jason Merrill <jason@redhat.com>
7568
7569 * c-common.h (enum cxx_dialect): Add cxx1y.
7570 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7571 test.
7572 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7573 * c-opts.c (c_common_post_options): Likewise.
7574 (set_std_cxx1y): New.
7575 (c_common_handle_option): Call it.
7576 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7577
7578 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7579
7580 PR c++/14710
7581 * c.opt ([Wuseless-cast]): Add.
7582
7583 2012-03-16 Richard Guenther <rguenther@suse.de>
7584
7585 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7586
7587 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7588
7589 PR c++/44783
7590 * c.opt (ftemplate-backtrace-limit) Add.
7591
7592 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7593
7594 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7595 handling.
7596 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7597 (init_pragma): Don't register extern_prefix.
7598
7599 2012-03-12 Richard Guenther <rguenther@suse.de>
7600
7601 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7602 (builtin_type_for_size): Likewise.
7603
7604 2012-02-13 Jakub Jelinek <jakub@redhat.com>
7605
7606 PR c++/52215
7607 * c-common.c (sync_resolve_params): Don't decide whether to convert
7608 or not based on TYPE_SIZE comparison, convert whenever arg_type
7609 is unsigned INTEGER_TYPE.
7610
7611 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7612
7613 PR c/52118
7614 * c.opt ([Wunused-local-typedefs]): Fix description.
7615
7616 2012-01-24 Mike Stump <mikestump@comcast.net>
7617
7618 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7619 exactly.
7620
7621 2012-01-18 Richard Guenther <rguenther@suse.de>
7622
7623 * c-opts.c (c_common_post_options): Reset LTO flags if
7624 we are about to generate a PCH.
7625
7626 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7627
7628 PR c++/51777
7629 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7630 use pp_unsigned_wide_integer.
7631
7632 2012-01-10 Richard Guenther <rguenther@suse.de>
7633
7634 PR middle-end/51806
7635 * c-opts.c (c_common_handle_option): Move -Werror handling
7636 to language independent code.
7637
7638 2012-01-05 Richard Guenther <rguenther@suse.de>
7639
7640 PR middle-end/51764
7641 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7642 from common.opt.
7643
7644 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7645
7646 PR c++/51316
7647 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7648 of array types with an unknown bound.
7649
7650 2011-12-20 Joseph Myers <joseph@codesourcery.com>
7651
7652 * c-common.c (flag_isoc99): Update comment to refer to C11.
7653 (flag_isoc1x): Change to flag_isoc11.
7654 * c-common.h (flag_isoc99): Update comment to refer to C11.
7655 (flag_isoc1x): Change to flag_isoc11.
7656 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7657 C11.
7658 * c-opts.c (set_std_c1x): Change to set_std_c11.
7659 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7660 Call set_std_c11.
7661 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7662 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7663 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7664 standard.
7665 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7666 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7667 (std=gnu1x): Make alias of std=gnu11.
7668
7669 2011-12-19 Jason Merrill <jason@redhat.com>
7670
7671 PR c++/51228
7672 * c-common.c (handle_transparent_union_attribute): Check the first
7673 field if the type is complete.
7674
7675 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7676
7677 PR libstdc++/51365
7678 * c-common.c (RID_IS_FINAL): Add.
7679 * c-common.h (RID_IS_FINAL): Add.
7680
7681 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7682
7683 * c.opt (fgnu-runtime): Provide full description.
7684 (fnext-runtime): Likewise.
7685 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7686
7687 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
7688
7689 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7690 predefines in one place. Add LOCK_FREE predefines.
7691 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7692 new func.
7693
7694 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
7695
7696 PR c/51256
7697 * c-common.c (get_atomic_generic_size): Check for various error
7698 conditions
7699 (resolve_overloaded_atomic_exchange,
7700 resolve_overloaded_atomic_compare_exchange,
7701 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7702 error_mark_node for error conditions.
7703
7704 2011-11-08 Richard Guenther <rguenther@suse.de>
7705
7706 PR middle-end/51010
7707 c-family/
7708
7709 2011-11-07 Richard Henderson <rth@redhat.com>
7710 Aldy Hernandez <aldyh@redhat.com>
7711 Torvald Riegel <triegel@redhat.com>
7712
7713 Merged from transactional-memory.
7714
7715 * c-common.c (handle_tm_wrap_attribute,
7716 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7717 (struct c_common_reswords): Added __transaction* keywords.
7718 (struct c_common_attribute_table): Added transaction* and tm_regparm
7719 attributes.
7720 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7721 masks.
7722 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7723 find_tm_attribute): Declare.
7724
7725 2011-11-07 Jason Merrill <jason@redhat.com>
7726
7727 PR c++/35688
7728 * c-common.c, c-common.h: Revert yesterday's changes.
7729
7730 2011-11-06 Jason Merrill <jason@redhat.com>
7731
7732 PR c++/35688
7733 * c-common.c (decl_has_visibility_attr): Split out from...
7734 (c_determine_visibility): ...here.
7735 * c-common.h: Declare it.
7736
7737 2011-11-06 Joseph Myers <joseph@codesourcery.com>
7738
7739 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7740 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7741 type.
7742 (check_user_alignment): New. Split out of
7743 handle_aligned_attribute. Disallow integer constants with
7744 noninteger types. Conditionally allow zero.
7745 (handle_aligned_attribute): Use check_user_alignment.
7746 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7747
7748 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
7749 Richard Henderson <rth@redhat.com>
7750
7751 Merged from cxx-mem-model.
7752
7753 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
7754 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
7755 parameters that are the same type size.
7756 (get_atomic_generic_size): New. Find size of generic
7757 atomic function parameters and do typechecking.
7758 (add_atomic_size_parameter): New. Insert size into parameter list.
7759 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7760 either __atomic_exchange_n or external library call.
7761 (resolve_overloaded_atomic_compare_exchange): Restructure
7762 __atomic_compare_exchange to either _n variant or external library call.
7763 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
7764 __atomic_load_n or an external library call.
7765 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7766 __atomic_store_n or an external library call.
7767 (resolve_overloaded_builtin): Handle new __atomic builtins.
7768
7769 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7770
7771 PR c++/50608
7772 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7773 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7774 <INDIRECT_REF>: Return the argument.
7775 <ARRAY_REF>: Remove special code for negative offset.
7776 Call fold_build_pointer_plus instead of size_binop.
7777 (fold_offsetof): Remove STOP_REF argument and adjust.
7778 * c-common.h (fold_offsetof_1): Declare.
7779 (fold_offsetof): Remove STOP_REF argument.
7780
7781 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7782
7783 PR c++/50810
7784 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7785 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7786 Wnarrowing for C++0x and C++98.
7787 * c.opt ([Wnarrowing]): Update.
7788
7789 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7790
7791 PR c++/44277
7792 * c.opt: Add Wzero-as-null-pointer-constant.
7793
7794 2011-10-31 Jason Merrill <jason@redhat.com>
7795
7796 * c.opt (-fdeduce-init-list): Off by default.
7797
7798 PR c++/50920
7799 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7800 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7801 and -Wc++11-compat.
7802 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7803
7804 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7805
7806 PR c++/30066
7807 * c.opt (fvisibility-inlines-hidden): Description change.
7808
7809 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7810
7811 Implement C++11 user-defined literals.
7812 * c-common.c (build_userdef_literal): New.
7813 * c-common.def: New tree code.
7814 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7815 * c-lex.c (interpret_float): Add suffix parm.
7816 (c_lex_with_flags): Build literal tokens.
7817
7818 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7819
7820 PR c++/50841
7821 Revert:
7822 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7823
7824 PR c++/50810
7825 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7826 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7827 Wnarrowing for C++0x and C++98.
7828 * c.opt ([Wnarrowing]): Update.
7829
7830 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7831
7832 PR c++/50810
7833 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7834 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7835 Wnarrowing for C++0x and C++98.
7836 * c.opt ([Wnarrowing]): Update.
7837
7838 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7839
7840 PR c++/45385
7841 * c-common.c (conversion_warning): Remove code looking for
7842 artificial operands.
7843
7844 2011-10-18 Dodji Seketeli <dodji@redhat.com>
7845
7846 PR bootstrap/50760
7847 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
7848 !NO_IMPLICIT_EXTERN_C.
7849
7850 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
7851
7852 * c-common.c (c_common_reswords): Add __bases,
7853 __direct_bases.
7854 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7855
7856 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7857
7858 PR c++/50757
7859 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7860
7861 2011-10-15 Tom Tromey <tromey@redhat.com>
7862 Dodji Seketeli <dodji@redhat.com>
7863
7864 * c.opt (fdebug-cpp): New option.
7865 * c-opts.c (c_common_handle_option): Handle the option.
7866 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7867 output stream in parameter. Factorized from ...
7868 (maybe_print_line): ... this. Dump location debug information when
7869 -fdebug-cpp is in effect.
7870 (print_line_1): New static function. Takes an output stream in
7871 parameter. Factorized from ...
7872 (print_line): ... here. Dump location information when -fdebug-cpp
7873 is in effect.
7874 (scan_translation_unit): Dump location information when
7875 -fdebug-cpp is in effect.
7876
7877 2011-10-15 Tom Tromey <tromey@redhat.com>
7878 Dodji Seketeli <dodji@redhat.com>
7879
7880 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7881 without argument.
7882 * c-opts.c (c_common_handle_option)<case
7883 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7884 cases. Handle -ftrack-macro-expansion with and without argument.
7885
7886 2011-10-15 Tom Tromey <tromey@redhat.com>
7887 Dodji Seketeli <dodji@redhat.com>
7888
7889 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7890 (print_line, cb_define, do_line_change): Adjust to avoid touching
7891 the internals of struct line_map. Use the public API instead.
7892 * c-pch.c (c_common_read_pch): Likewise.
7893 * c-lex.c (fe_file_change): Likewise.
7894
7895 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7896
7897 PR c++/17212
7898 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7899
7900 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7901
7902 PR c++/33067
7903 * c-pretty-print.c (pp_c_floating_constant): Output
7904 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7905
7906 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7907
7908 * c-common.c (def_builtin_1): Delete old interface with two
7909 parallel arrays to hold standard builtin declarations, and replace
7910 it with a function based interface that can support creating
7911 builtins on the fly in the future. Change all uses, and poison
7912 the old names. Make sure 0 is not a legitimate builtin index.
7913 * c-omp.c (c_finish_omp_barrier): Ditto.
7914 (c_finish_omp_taskwait): Ditto.
7915 (c_finish_omp_flush): Ditto.
7916
7917 2011-10-11 Tristan Gingold <gingold@adacore.com>
7918
7919 * c.opt: (fallow-parameterless-variadic-functions): New.
7920
7921 2011-09-08 Dodji Seketeli <dodji@redhat.com>
7922
7923 PR c++/33255 - Support -Wunused-local-typedefs warning
7924 * c-common.h (struct c_language_function::local_typedefs): New
7925 field.
7926 (record_locally_defined_typedef, maybe_record_typedef_use)
7927 (maybe_warn_unused_local_typedefs): Declare new functions.
7928 * c-common.c (record_locally_defined_typedef)
7929 (maybe_record_typedef_use)
7930 (maybe_warn_unused_local_typedefs): Define new functions.
7931 * c.opt: Declare new -Wunused-local-typedefs flag.
7932
7933 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7934
7935 PR middle-end/50266
7936 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7937 computations.
7938
7939 2011-09-05 Richard Guenther <rguenther@suse.de>
7940
7941 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7942 of integer_minus_one_node for empty array upper bounds.
7943
7944 2011-08-28 Dodji Seketeli <dodji@redhat.com>
7945
7946 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7947 it's the first time it's being called on this main TU.
7948
7949 2011-08-24 Richard Guenther <rguenther@suse.de>
7950
7951 PR c/49396
7952 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7953
7954 2011-08-22 Gabriel Charette <gchare@google.com>
7955
7956 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7957 defined in cpp_init_builtins and c_cpp_builtins.
7958
7959 2011-08-19 Joseph Myers <joseph@codesourcery.com>
7960
7961 * c-common.c (c_common_reswords): Add __builtin_complex.
7962 * c-common.h (RID_BUILTIN_COMPLEX): New.
7963
7964 2011-08-18 Joseph Myers <joseph@codesourcery.com>
7965
7966 * c-common.c (c_common_reswords): Add _Noreturn.
7967 (keyword_is_function_specifier): Handle RID_NORETURN.
7968 * c-common.h (RID_NORETURN): New.
7969
7970 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7971
7972 * c-common.c (unsafe_conversion_p): New function. Check if it is
7973 unsafe to convert an expression to the type.
7974 (conversion_warning): Adjust, use unsafe_conversion_p.
7975 * c-common.h (unsafe_conversion_p): New function declaration.
7976
7977 2011-08-02 Jakub Jelinek <jakub@redhat.com>
7978
7979 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7980 (c_finish_omp_taskyield): New prototype.
7981 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7982 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7983 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7984 or RHS1 have side-effects, evaluate those too in the right spot,
7985 if it is a decl and LHS is also a decl, error out if they
7986 aren't the same.
7987 (c_finish_omp_taskyield): New function.
7988 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7989 * c-pragma.c (omp_pragmas): Add taskyield.
7990 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7991 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7992 PRAGMA_OMP_CLAUSE_MERGEABLE.
7993
7994 2011-07-25 Dodji Seketeli <dodji@redhat.com>
7995
7996 * c-common.h (set_underlying_type): Remove parm name from
7997 declaration.
7998
7999 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8000
8001 * c-pretty-print.h: Search c-common.h in c-family.
8002
8003 2011-07-22 Jason Merrill <jason@redhat.com>
8004
8005 PR c++/49793
8006 * c.opt (Wnarrowing): New.
8007
8008 PR c++/30112
8009 * c-common.h: Declare c_linkage_bindings.
8010 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8011
8012 PR c++/49813
8013 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8014 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8015 as flag_isoc99 for 'restrict'.
8016 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8017
8018 2011-07-21 Ian Lance Taylor <iant@google.com>
8019
8020 PR middle-end/49705
8021 * c-common.c (c_disable_warnings): New static function.
8022 (c_enable_warnings): New static function.
8023 (c_fully_fold_internal): Change local unused_p to bool. Call
8024 c_disable_warnings and c_enable_warnings rather than change
8025 c_inhibit_evaluation_warnings.
8026
8027 2011-07-20 Jason Merrill <jason@redhat.com>
8028
8029 PR c++/6709 (DR 743)
8030 PR c++/42603 (DR 950)
8031 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8032 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8033 (CPP_DECLTYPE): New.
8034 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8035
8036 2011-07-19 Richard Guenther <rguenther@suse.de>
8037
8038 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8039 * c-omp.c (c_finish_omp_for): Likewise.
8040
8041 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8042
8043 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8044 body on the next line.
8045
8046 2011-07-08 Jason Merrill <jason@redhat.com>
8047
8048 PR c++/45437
8049 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8050
8051 PR c++/49673
8052 * c-common.c (c_apply_type_quals_to_decl): Don't check
8053 TYPE_NEEDS_CONSTRUCTING.
8054
8055 2011-07-06 Richard Guenther <rguenther@suse.de>
8056
8057 * c-common.c (c_common_nodes_and_builtins):
8058 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8059
8060 2011-07-05 Richard Guenther <rguenther@suse.de>
8061
8062 * c-common.c (c_common_nodes_and_builtins): Build all common
8063 tree nodes first.
8064
8065 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8066
8067 * c-common.h (c_tree_chain_next): New static inline function.
8068
8069 * c-common.c (check_builtin_function_arguments): Handle
8070 BUILT_IN_ASSUME_ALIGNED.
8071
8072 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8073
8074 * c-common.c: Add sync_ or SYNC__ to builtin names.
8075 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8076
8077 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8078
8079 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8080 handler.
8081 (gen_pragma_handler): New union.
8082 (internal_pragma_handler): New type.
8083 (c_register_pragma_with_data)
8084 (c_register_pragma_with_expansion_and_data): New functions.
8085
8086 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8087 (c_register_pragma, c_register_pragma_with_expansion)
8088 (c_invoke_pragma_handler): Changed to work with
8089 internal_pragma_handler.
8090 (c_register_pragma_with_data)
8091 (c_register_pragma_with_expansion_and_data): New functions.
8092
8093 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8094
8095 * c-common.c: Include common/common-target.h.
8096 (handle_section_attribute): Use
8097 targetm_common.have_named_sections.
8098 * c-cppbuiltin.c: Include common/common-target.h.
8099 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8100
8101 2011-06-10 Richard Guenther <rguenther@suse.de>
8102
8103 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8104 to print a IDENTIFIER_NODE.
8105
8106 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8107 Joseph Myers <joseph@codesourcery.com>
8108
8109 * c.opt (fbuilding-libgcc): New option.
8110 * c-cppbuiltin.c (c_cpp_builtins): Define
8111 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8112
8113 2011-06-07 Jason Merrill <jason@redhat.com>
8114
8115 * c-common.c (max_tinst_depth): Lower default to 900.
8116
8117 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8118
8119 2011-06-07 Richard Guenther <rguenther@suse.de>
8120
8121 * c-common.c (c_common_nodes_and_builtins): Do not set
8122 size_type_node or call set_sizetype.
8123
8124 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8125
8126 PR debug/49130
8127 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8128 type when using pointer comparison to compare types.
8129
8130 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8131
8132 * c.opt: Add -Wdelete-non-virtual-dtor.
8133 * c-opts.c (c_common_handle_option): Include it in -Wall.
8134
8135 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8136
8137 PR bootstrap/49190
8138
8139 Revert:
8140 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8141
8142 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8143 not tree_common.
8144
8145 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8146
8147 PR c++/49165
8148 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8149 C++ don't call c_common_truthvalue_conversion on void type arms.
8150
8151 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8152
8153 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8154 (stmt_list_stack): Define.
8155 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8156 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8157
8158 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8159
8160 * c-common.c (warning_candidate_p): Check for BLOCKs.
8161
8162 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8163
8164 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8165 not tree_common.
8166
8167 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8168
8169 * c-common.c (def_fn_type): Remove extra va_end.
8170
8171 2011-05-23 Jason Merrill <jason@redhat.com>
8172
8173 PR c++/48106
8174 * c-common.c (c_common_get_narrower): New.
8175 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8176
8177 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8178
8179 * c-common.h (check_function_arguments): Tweak prototype of
8180 check_function_arguments.
8181 * c-common.c (check_function_arguments): Likewise. Adjust
8182 calls to check_function_nonnull, check_function_format, and
8183 check_function_sentinel.
8184 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8185 separate attributes and typelist arguments. Use
8186 FOREACH_FUNCTION_ARGS to iterate over argument types.
8187
8188 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8189
8190 * c-common.c (c_common_reswords): Reorder.
8191 * c-common.h (rid): Likewise.
8192
8193 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8194
8195 * c-common.c (def_fn_type): Don't call build_function_type, call
8196 build_function_type_array or build_varargs_function_type_array
8197 instead.
8198 (c_common_nodes_and_builtins): Likewise.
8199
8200 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8201
8202 * c-common.c (c_add_case_label): Omit the loc argument to
8203 build_case_label.
8204 * c-common.h (build_case_label): Remove.
8205 * c-semantics.c (build_case_label): Remove.
8206
8207 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8208
8209 * c-objc.h (objc_start_method_definition): Update prototype.
8210 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8211
8212 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8213
8214 * c-common.c (check_main_parameter_types): Reindent. Don't use
8215 TYPE_ARG_TYPES directly.
8216 (handle_nonnull_attribute): Likewise.
8217 (sync_resolve_params): Likewise.
8218 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8219 to check_format_string.
8220 (handle_format_attribute): Likewise.
8221 (check_format_string): Take a function type to examine instead of
8222 a type list. Use a function_arg_iterator to step through argument
8223 types.
8224
8225 2011-05-04 Richard Guenther <rguenther@suse.de>
8226
8227 * c-common.c (fix_string_type): Use size_int for index type bounds.
8228 (start_fname_decls): Do not pass NULL to build_int_cst.
8229 (c_init_attributes): Likewise.
8230 * c-lex.c (c_lex_with_flags): Likewise.
8231
8232 2011-04-27 Jason Merrill <jason@redhat.com>
8233
8234 * c-common.c (make_tree_vector_from_list): New.
8235 * c-common.h: Declare it.
8236
8237 2011-04-26 Richard Guenther <rguenther@suse.de>
8238
8239 PR preprocessor/48248
8240 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8241 for output size with -P.
8242
8243 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8244
8245 * c-common.c (struct c_common_resword): Add __underlying_type.
8246 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8247
8248 2011-04-20 Jim Meyering <meyering@redhat.com>
8249
8250 * c-format.c (init_dollar_format_checking): Remove useless
8251 if-before-free.
8252
8253 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8254
8255 * c-objc.h (objc_get_interface_ivars): Removed.
8256 (objc_detect_field_duplicates): New.
8257 * stub-objc.c: Likewise.
8258
8259 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8260
8261 * stub-objc.c (objc_declare_protocols): Renamed to
8262 objc_declare_protocol.
8263 * c-objc.h: Likewise.
8264
8265 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8266
8267 * stub-objc.c (objc_declare_class): Updated argument name.
8268
8269 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8270
8271 * c-common.h (c_common_init_ts): Declare.
8272 * c-common.c (c_common_init_ts): Define.
8273
8274 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8275
8276 * c-objc.h (objc_build_message_expr): Updated prototype.
8277 * stub-objc.c (objc_build_message_expr): Likewise.
8278
8279 2011-04-12 Martin Jambor <mjambor@suse.cz>
8280
8281 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8282 of cgraph_node.
8283
8284 2011-04-11 Richard Guenther <rguenther@suse.de>
8285
8286 * c-common.c (complete_array_type): Build a range type of
8287 proper type.
8288
8289 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8290
8291 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8292 (handle_type_generic_attribute): Likewise.
8293
8294 2011-04-07 Jason Merrill <jason@redhat.com>
8295
8296 PR c++/48450
8297 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8298 conversion from C++0x scoped enum.
8299
8300 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8301
8302 * c-target-def.h: New file.
8303 * c-target.def: New file.
8304 * c-target.h: New file.
8305 * c-common.c (targetcm): Don't define here.
8306 * c-common.h (default_handle_c_option): Declare.
8307 * c-format.c: Include c-target.h instead of target.h.
8308 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8309 include tm.h.
8310 (default_handle_c_option): Move from targhooks.c.
8311
8312 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8313
8314 PR preprocessor/48248
8315 * c-ppoutput.c (print): Add src_file field.
8316 (init_pp_output): Initialize it.
8317 (maybe_print_line): Don't optimize by adding up to 8 newlines
8318 if map->to_file and print.src_file are different file.
8319 (print_line): Update print.src_file.
8320
8321 2011-03-25 Kai Tietz <ktietz@redhat.com>
8322
8323 * c-ada-spec.c (compare_comment): Use filename_cmp
8324 instead of strcmp for filename.
8325
8326 2011-03-25 Jeff Law <law@redhat.com>
8327
8328 * c-common.c (def_fn_type): Add missing va_end.
8329
8330 2011-03-25 Jason Merrill <jason@redhat.com>
8331
8332 * c.opt: Add -std=c++03.
8333
8334 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8335
8336 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8337
8338 2011-03-17 Kai Tietz <ktietz@redhat.com>
8339
8340 PR target/12171
8341 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8342 Display allowed attributes for function pointer types.
8343 (pp_c_attributes_display): New function to display
8344 attributes having affects_type_identity flag set to true.
8345 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8346
8347 * c-common.c (c_common_attribute_table):
8348 Add new element.
8349 (c_common_format_attribute_table): Likewise.
8350
8351 2011-03-18 Jason Merrill <jason@redhat.com>
8352
8353 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8354 * c-common.h: Don't declare it here.
8355 * c-common.c: Or define it here.
8356 * c-opts.c (c_common_handle_option): Or set it here.
8357
8358 PR c++/35315
8359 * c-common.c (handle_transparent_union_attribute): Don't
8360 make a duplicate type in C++.
8361
8362 2011-03-15 Jason Merrill <jason@redhat.com>
8363
8364 * c-common.c (max_constexpr_depth): New.
8365 * c-common.h: Declare it.
8366 * c-opts.c (c_common_handle_option): Set it.
8367 * c.opt (fconstexpr-depth): New option.
8368
8369 2011-03-11 Jason Merrill <jason@redhat.com>
8370
8371 * c-common.c (attribute_takes_identifier_p): Add missing const.
8372
8373 PR c++/46803
8374 * c-common.c (attribute_takes_identifier_p): Assume that an
8375 unknown attribute takes an identifier.
8376
8377 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8378
8379 PR c/47786
8380 * c-common.c (c_type_hash): Call list_length instead of iterating
8381 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8382
8383 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8384
8385 PR c/47809
8386 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8387
8388 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8389
8390 * c.opt (fobjc-abi-version=) New.
8391 (fobjc-nilcheck): New.
8392
8393 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8394
8395 PR c++/46890
8396 * c-common.h (keyword_is_decl_specifier): Declare.
8397 * c-common.c (keyword_is_decl_specifier): Define.
8398 (keyword_is_function_specifier): New function.
8399
8400 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8401
8402 PR c/47473
8403 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8404 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8405 REAL_TYPE.
8406
8407 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8408
8409 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8410
8411 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8412
8413 PR pch/47430
8414 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8415 after init_c_lex if pch_file is set.
8416
8417 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8418
8419 PR c++/43601
8420 * c.opt (-fkeep-inline-dllexport): New switch.
8421
8422 2011-01-12 Richard Guenther <rguenther@suse.de>
8423
8424 PR middle-end/32511
8425 * c-common.c (handle_weak_attribute): Warn instead of error
8426 on declaring an inline function weak.
8427
8428 2011-01-05 Tom Tromey <tromey@redhat.com>
8429
8430 * c-common.h (lvalue_error): Update.
8431 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8432 not error.
8433
8434 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8435
8436 PR objc/47075
8437 * c-objc.h (objc_finish_message_expr): Added argument to
8438 prototype.
8439
8440 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8441
8442 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8443 Use prototype_p.
8444
8445 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8446
8447 * c-objc.h (objc_maybe_warn_exceptions): New.
8448 * stub-objc.c (objc_maybe_warn_exceptions): New.
8449
8450 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8451
8452 * c-common.h (readonly_error): Declare.
8453 * c-common.c (readonly_error): Define.
8454
8455 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8456
8457 * c-common.h (invalid_indirection_error): Declare.
8458 * c-common.c (invalid_indirection_error): Define.
8459
8460 2010-12-03 Richard Guenther <rguenther@suse.de>
8461
8462 PR c/46745
8463 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8464 (pp_c_unary_expression): Likewise.
8465 (pp_c_expression): Likewise.
8466
8467 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8468
8469 * c-common.h (objc_finish_function): New.
8470 (objc_non_volatilized_type): Removed.
8471 (objc_type_quals_match): Removed.
8472 * stub-objc.c (objc_finish_function): New.
8473 (objc_non_volatilized_type): Removed.
8474 (objc_type_quals_match): Removed.
8475
8476 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8477
8478 * c-common.h (parse_optimize_options): Declare.
8479 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8480 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8481
8482 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8483
8484 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8485 GET_ENVIRONMENT.
8486 * c-pch.c (O_BINARY): Don't define here.
8487 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8488
8489 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8490
8491 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8492 targetm.except_unwind_info.
8493
8494 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8495
8496 * c-opts.c (c_common_handle_option): Pass location to
8497 set_struct_debug_option.
8498
8499 2010-11-23 Joseph Myers <joseph@codesourcery.com>
8500
8501 * c-common.c (visibility_options): Move from ../opts.c.
8502 * c-common.h (struct visibility_flags, visibility_options):
8503 Declare here.
8504 * c-opts.c (finish_options): Rename to c_finish_options.
8505 (c_common_init): Update call to finish_options.
8506
8507 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8508
8509 PR objc/34033
8510 * c-lex.c (lex_string): Check that each string in an Objective-C
8511 string concat sequence starts with either one or zero '@', and
8512 that there are no spurious '@' signs at the end.
8513
8514 2010-11-20 Joseph Myers <joseph@codesourcery.com>
8515
8516 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8517 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8518 HANDLE_PRAGMA_VISIBILITY.
8519 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8520 HANDLE_PRAGMA_VISIBILITY): Don't define.
8521 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8522
8523 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8524
8525 PR c++/16189
8526 PR c++/36888
8527 PR c++/45331
8528 * c-common.h (keyword_begins_type_specifier): Declare.
8529 (keyword_is_storage_class_specifier): Declare.
8530 (keyword_is_type_qualifier): Declare.
8531 * c-common.c (keyword_begins_type_specifier): New function.
8532 (keyword_is_storage_class_specifier): New function.
8533 (keyword_is_type_qualifier): Declare.
8534
8535 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8536
8537 PR c/46547
8538 * c-common.c (in_late_binary_op): Define.
8539 (c_common_truthvalue_conversion): Check in_late_binary_op before
8540 calling c_save_expr.
8541 * c-common.h (in_late_binary_op): Declare.
8542
8543 2010-11-19 Joseph Myers <joseph@codesourcery.com>
8544
8545 * c-opts.c (c_common_handle_option): Update calls to
8546 set_struct_debug_option.
8547
8548 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8549
8550 * c-common.h (objc_declare_protocols): Added additional argument.
8551 * stub-objc.c (objc_declare_protocol): Same change.
8552
8553 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8554
8555 PR c/33193
8556 * c-common.h (build_real_imag_expr): Declare.
8557 * c-semantics.c (build_real_imag_expr): Define.
8558
8559 2010-11-17 Joseph Myers <joseph@codesourcery.com>
8560
8561 * c-opts.c (c_common_parse_file): Take no arguments.
8562 * c-common.h (c_common_parse_file): Update prototype.
8563
8564 2010-11-16 Jakub Jelinek <jakub@redhat.com>
8565
8566 PR c++/46401
8567 * c-common.c (warning_candidate_p): Don't track non-const calls
8568 or STRING_CSTs.
8569
8570 2010-11-15 Ian Lance Taylor <iant@google.com>
8571
8572 * c-lex.c (init_c_lex): Set macro debug callbacks if
8573 flag_dump_go_spec is set.
8574
8575 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8576
8577 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8578 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8579
8580 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8581
8582 PR preprocessor/45038
8583 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8584 dialects.
8585
8586 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8587
8588 * c-common.h (c_family_lang_mask): Declare.
8589 * c-opts.c (c_family_lang_mask): Make extern.
8590 * c-pragma.c (handle_pragma_diagnostic): Use
8591 control_warning_option.
8592
8593 2010-11-12 Joseph Myers <joseph@codesourcery.com>
8594
8595 * c-common.c (parse_optimize_options): Update call to
8596 decode_options.
8597 * c-common.h (c_common_handle_option): Update prototype.
8598 * c-opts.c (c_common_handle_option): Take location_t parameter and
8599 pass it to other functions.
8600
8601 2010-11-11 Joseph Myers <joseph@codesourcery.com>
8602
8603 * c-opts.c (warning_as_error_callback): Remove.
8604 (c_common_initialize_diagnostics): Don't call
8605 register_warning_as_error_callback.
8606 (c_common_handle_option): Handle -Werror=normalized= here.
8607
8608 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8609
8610 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8611 in diagnostic.
8612 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8613 letter.
8614 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8615 Remove trailing '.' from diagnostics.
8616 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8617
8618 2010-11-10 Joseph Myers <joseph@codesourcery.com>
8619
8620 * c-common.c (parse_optimize_options): Pass global_dc to
8621 decode_options.
8622 * c-opts.c (c_common_handle_option): Pass &global_options to
8623 set_Wstrict_aliasing.
8624 * c.opt (v): Don't mark Common or document here.
8625
8626 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8627
8628 PR target/44981
8629 * c-format.c (format_type): New type gcc_objc_string_format_type.
8630 (valid_stringptr_type_p): New.
8631 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
8632 (check_format_string): Pass expected type, use
8633 valid_stringptr_type_p (), check that the format string types are
8634 consistent with the format specification.
8635 (decode_format_attr): Warn if NSString is used outside objective-c.
8636 (format_types_orig): Add NSString.
8637 (format_name): New.
8638 (format_flags): New.
8639 (check_format_arg): Handle format strings requiring an external parser.
8640 first_target_format_type: New variable.
8641 (handle_format_attribute): Set up first_target_format_type, pass the
8642 expected format arg string type to check_format_string().
8643 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8644 * stub-objc.c (objc_string_ref_type_p): New.
8645 (objc_check_format_arg): New.
8646
8647 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8648
8649 Fixed using the Objective-C 2.0 dot-syntax with class names.
8650 * c-common.h (objc_build_class_component_ref): New.
8651 * stub-objc.c (objc_build_class_component_ref): New.
8652
8653 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8654
8655 * c.opt (Wproperty-assign-default): New option.
8656
8657 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8658
8659 Implemented -fobjc-std=objc1 flag.
8660 * c.opt (fobjc-std=objc1): New option.
8661
8662 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8663
8664 Implemented format and noreturn attributes for Objective-C methods.
8665 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8666 attribute for Objective-C methods.
8667
8668 2010-10-31 Jason Merrill <jason@redhat.com>
8669
8670 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8671 EXPR_LOC_OR_HERE.
8672
8673 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8674
8675 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8676 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8677 (objc_add_property_declaration): Removed arguments for copies and
8678 ivar.
8679 (objc_build_getter_call): Renamed to
8680 objc_maybe_build_component_ref.
8681 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8682 (objc_is_property_ref): New.
8683 * c-common.c (c_common_reswords): Removed copies and ivar.
8684 * stub-objc.c (objc_add_property_declaration): Removed arguments
8685 for copies and ivar.
8686 (objc_build_getter_call): Renamed to
8687 objc_maybe_build_component_ref.
8688 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8689 (objc_is_property_ref): New.
8690
8691 2010-10-29 Arnaud Charlet <charlet@adacore.com>
8692 Matthew Gingell <gingell@adacore.com>
8693
8694 * c-ada-spec.c (separate_class_package): New function.
8695 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8696 name of their enclosing package.
8697 (print_ada_declaration): Use separate_class_package.
8698
8699 2010-10-27 Jason Merrill <jason@redhat.com>
8700
8701 * c-common.c (c_common_reswords): Add __is_literal_type.
8702 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8703
8704 * c-common.c (check_case_value): Remove special C++ code.
8705
8706 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8707
8708 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8709 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8710 and RID_LAST_PATTR.
8711 (objc_add_property_declaration): Added additional arguments.
8712 (objc_property_attribute_kind): Removed.
8713 (objc_set_property_attr): Removed.
8714 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8715 copy and nonatomic.
8716 * stub-objc.c (objc_add_property_declaration): Added additional
8717 arguments.
8718 (objc_set_property_attr): Removed.
8719
8720 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8721
8722 * c-common.h (objc_add_property_variable): Renamed to
8723 objc_add_property_declaration. Added location argument.
8724 * stub-objc.c (objc_add_property_variable): Same change.
8725
8726 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8727
8728 * c-common.h (objc_maybe_printable_name): New.
8729 * stub-objc.c (objc_maybe_printable_name): New.
8730
8731 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8732 Andrew Pinski <pinskia@gmail.com>
8733
8734 * c-common.h (c_common_mark_addressable_vec): Declare.
8735 * c-common.c (c_common_mark_addressable_vec): New function.
8736
8737 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8738
8739 * c-common.h (objc_set_method_type): Removed.
8740 (objc_add_method_declaration): Added boolean argument.
8741 (objc_start_method_definition): Same change.
8742 (objc_build_method_signature): Same change.
8743 * stub-objc.c (objc_set_method_type): Removed.
8744 (objc_add_method_declaration): Added boolean argument.
8745 (objc_start_method_definition): Same change.
8746 (objc_build_method_signature): Same change.
8747
8748 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8749
8750 * c-common.h (finish_file): Removed.
8751 (objc_write_global_declarations): New.
8752 * c-opts.c (c_common_parse_file): Do not call finish_file.
8753 * stub-objc.c (objc_write_global_declarations): New.
8754
8755 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8756
8757 Implemented parsing @synthesize and @dynamic for
8758 Objective-C/Objective-C++.
8759 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8760 (objc_add_synthesize_declaration): New.
8761 (objc_add_dynamic_declaration): New.
8762 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8763 * stub-objc.c (objc_add_synthesize_declaration): New.
8764 (objc_add_dynamic_declaration): New.
8765
8766 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8767
8768 PR target/46041
8769 * c-cppbuiltin.c (mode_has_fma): Move function here from
8770 builtins.c. Don't use the fma optab, instead just use the
8771 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8772 using -save-temps.
8773
8774 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8775
8776 Merge from 'apple/trunk' branch on FSF servers.
8777
8778 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
8779
8780 Radar 4330422
8781 * c-common.h (objc_non_volatilized_type): New declaration
8782 * stub-objc.c (objc_non_volatilized_type): New stub.
8783
8784 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8785
8786 Merge from 'apple/trunk' branch on FSF servers.
8787
8788 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
8789
8790 Radar 4133425
8791 * c-common.h (objc_diagnose_private_ivar): New decl.
8792 * stub-objc.c (objc_diagnose_private_ivar): New stub.
8793
8794 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8795
8796 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8797 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8798 (objc_ivar_visibility_kind): New enum.
8799 (objc_set_visibility): Adjust prototype to use visibility enum.
8800 * stub-objc.c (objc_set_visibility): Adjust stub to use
8801 visibility enum.
8802
8803 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8804
8805 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8806 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8807 has the appropriate fma builtins.
8808 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8809
8810 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8811
8812 merge from FSF apple 'trunk' branch.
8813 2006 Fariborz Jahanian <fjahanian@apple.com>
8814
8815 Radars 4436866, 4505126, 4506903, 4517826
8816 * c-common.c (c_common_resword): Define @property and its attributes.
8817 * c-common.h: Define property attribute enum entries.
8818 (OBJC_IS_PATTR_KEYWORD): New.
8819 (objc_property_attribute_kind): New enum.
8820 Declare objc_set_property_attr (), objc_add_property_variable (),
8821 objc_build_getter_call () and objc_build_setter_call ().
8822 * stub-objc.c (objc_set_property_attr): New stub.
8823 (objc_add_property_variable): Likewise.
8824 (objc_build_getter_call): Likewise.
8825 (objc_build_setter_call) Likewise.
8826
8827 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8828
8829 merge from FSF apple 'trunk' branch.
8830 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
8831
8832 Radar 3803157 (method attributes)
8833 * c-common.c (handle_deprecated_attribute): Recognize
8834 objc methods as valid declarations.
8835 * c-common.h: Declare objc_method_decl ().
8836 * stub-objc.c (objc_method_decl): New stub.
8837
8838 2010-10-08 Joseph Myers <joseph@codesourcery.com>
8839
8840 * c-common.c (parse_optimize_options): Call
8841 decode_cmdline_options_to_array_default_mask before
8842 decode_options. Update arguments to decode_options.
8843 * c-common.h (c_common_init_options_struct): Declare.
8844 * c-opts.c (c_common_init_options_struct): New. Split out from
8845 c_common_init_options.
8846
8847 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8848
8849 Implemented fast enumeration for Objective-C.
8850 * c-common.h (objc_finish_foreach_loop): New.
8851 * stub-objc.c (objc_finish_foreach_loop): New.
8852
8853 2010-10-05 Joseph Myers <joseph@codesourcery.com>
8854
8855 * c-common.h (struct diagnostic_context): Don't declare here.
8856 (c_common_initialize_diagnostics): Declare using
8857 diagnostic_context typedef.
8858 * c-opts.c (c_common_handle_option): Pass global_dc to
8859 handle_generated_option.
8860
8861 2010-10-04 Joseph Myers <joseph@codesourcery.com>
8862
8863 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8864 handle_generated_option.
8865
8866 2010-10-03 Ian Lance Taylor <iant@google.com>
8867
8868 * c.opt (-fplan9-extensions): New option.
8869
8870 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8871
8872 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8873 Remove.
8874 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8875 of duplicating code.
8876
8877 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8878
8879 * c-common.c: Add two new entries for @optional
8880 and @required keywords.
8881
8882 merge from FSF 'apple/trunk' branch.
8883 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
8884
8885 Radar 4386773
8886 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8887 objective-c keywords.
8888 (objc_set_method_opt): New declaration.
8889 * stub-objc.c (objc_set_method_opt): New stub.
8890
8891 2010-09-30 Joseph Myers <joseph@codesourcery.com>
8892
8893 * c-common.c (handle_optimize_attribute): Pass &global_options to
8894 cl_optimization_save and cl_optimization_restore.
8895 * c-opts.c (c_common_handle_option): Pass &global_options to
8896 handle_generated_option.
8897 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8898 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8899 &global_options to cl_optimization_restore.
8900
8901 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8902
8903 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8904 Objective-C/Objective-C++ keywords.
8905
8906 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8907
8908 Merge from 'apple/trunk' branch on FSF servers.
8909
8910 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
8911
8912 Radar 4281748
8913 * c-common.h (objc_check_global_decl): New declaration.
8914 * stub-objc.c (objc_check_global_decl): New stub.
8915
8916 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8917
8918 * c.opt: Don't use VarExists.
8919
8920 2010-09-29 Joseph Myers <joseph@codesourcery.com>
8921
8922 * c-common.c (c_cpp_error): Update names of diagnostic_context
8923 members.
8924 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8925 cl_optimization members.
8926 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8927 sanitize_cpp_opts, finish_options): Update names of cpp_options
8928 members.
8929
8930 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8931
8932 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8933 (objc_is_reserved_word): Removed.
8934 * c-common.c: Updated comments.
8935 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8936 objc_is_reserved_word.
8937 * stub-objc.c (objc_is_reserved_word): Removed.
8938
8939 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8940
8941 * c-common.h (objc_add_method_declaration): Adjust prototype to
8942 include attributes.
8943 (objc_start_method_definition): Likewise.
8944 (objc_build_keyword_decl): Likewise.
8945 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8946 (objc_start_method_definition): Likewise.
8947 (objc_build_keyword_decl): Likewise.
8948
8949 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8950
8951 * c-common.h (objc_start_class_interface): Adjust prototype.
8952 (objc_start_category_interface): Likewise.
8953 (objc_start_protocol): Likewise.
8954 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8955 (objc_start_class_interface): Likewise.
8956 (objc_start_category_interface): Likewise.
8957
8958 2010-09-27 Ian Lance Taylor <iant@google.com>
8959
8960 * c-common.c (c_common_attribute_table): Add no_split_stack.
8961 (handle_no_split_stack_attribute): New static function.
8962
8963 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8964
8965 Merge from 'apple/trunk' branch on FSF servers.
8966
8967 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
8968
8969 Radar 4229905
8970 * c-common.h (objc_have_common_type): New declaration.
8971 * stub-objc.c (objc_have_common_type): New stub.
8972
8973 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8974
8975 Radar 4154928
8976 * c-common.h (objc_common_type): New prototype.
8977 * stub-objc.c (objc_common_type): New stub.
8978
8979 2010-09-24 Jan Hubicka <jh@suse.cz>
8980
8981 * c-common.c (handle_leaf_attribute): New function.
8982 (struct attribute_spec c_common_att): Add leaf.
8983
8984 2010-09-22 Joseph Myers <joseph@codesourcery.com>
8985
8986 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8987 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8988 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8989 -include-barrier, -include-directory, -include-directory=,
8990 -include-directory-after, -include-directory-after=,
8991 -include-prefix, -include-prefix=, -include-with-prefix,
8992 -include-with-prefix=, -include-with-prefix-after,
8993 -include-with-prefix-after=, -include-with-prefix-before,
8994 -include-with-prefix-before=, -no-integrated-cpp,
8995 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8996 -output=, -pedantic, -pedantic-errors, -preprocess,
8997 -print-missing-file-dependencies, -trace-includes, -traditional,
8998 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8999 -user-dependencies, -verbose, -write-dependencies,
9000 -write-user-dependencies, no-integrated-cpp, traditional): New.
9001
9002 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9003
9004 PR objc/23710
9005 * c-common.h (objc_start_method_definition): Return bool instead
9006 of void.
9007 * stub-objc.c (objc_start_method_definition): Return bool instead
9008 of void.
9009
9010 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9011
9012 PR objc/25965
9013 * c-common.h (objc_get_interface_ivars): New declaration.
9014 * stub-objc.c (objc_get_interface_ivars): New stub.
9015
9016 2010-09-15 Ian Lance Taylor <iant@google.com>
9017
9018 * c-common.c (parse_optimize_options): Do not capitalize warning
9019 messages. Remove period at end of warning message.
9020
9021 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9022
9023 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9024 (handle_alias_attribute): ... here.
9025 (handle_ifunc_attribute): New.
9026
9027 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9028
9029 * c-common.h (do_warn_double_promotion): Declare.
9030 * c-common.c (do_warn_double_promotion): Define.
9031
9032 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9033
9034 * c.opt (Wdouble-promotion): New.
9035
9036 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9037
9038 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9039 fvtable-thunks, fxref): Mark no longer supported in help text.
9040
9041 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9042
9043 * c.opt (Wimport, fall-virtual, falt-external-templates,
9044 fdefault-inline, fenum-int-equiv, fexternal-templates,
9045 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9046 fname-mangling-version-, fnew-abi, fnonnull-objects,
9047 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9048 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9049 applicable.
9050 (fhandle-exceptions): Mark with Alias and Warn.
9051 * c-opts.c (c_common_handle_option): Don't handle options marked
9052 as ignored.
9053
9054 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9055
9056 * c.opt (Wcomments, Werror-implicit-function-declaration,
9057 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9058 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9059 aliases.
9060 * c-common.c (option_codes): Use OPT_Wcomment instead of
9061 OPT_Wcomments.
9062 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9063 Don't handle options marked as aliases.
9064
9065 2010-08-25 Richard Guenther <rguenther@suse.de>
9066
9067 * c-common.c (c_common_get_alias_set): Remove special
9068 handling for pointers.
9069
9070 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9071
9072 * c-common.c: Use FOR_EACH_VEC_ELT.
9073 * c-gimplify.c: Likewise.
9074 * c-pragma.c: Likewise.
9075
9076 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9077
9078 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9079 RejectDriver.
9080 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9081 RejectDriver.
9082 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9083 instead of OPT_MDX and OPT_MMDX.
9084
9085 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9086
9087 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9088
9089 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9090
9091 * c.opt (MD, MMD): Change to MDX and MMDX.
9092 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9093
9094 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9095
9096 * c-opts.c (c_common_handle_option): Call handle_generated_option
9097 instead of handle_option.
9098
9099 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9100
9101 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9102 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9103
9104 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9105
9106 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9107 (pending_redefine_extname): Change type to a VEC.
9108 (add_to_renaming_pragma_list): Update for new type of
9109 pending_redefine_extname.
9110 (maybe_apply_renaming_pragma): Likewise.
9111
9112 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9113
9114 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9115 visited.
9116 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9117 decide whether a type has already been declared/seen.
9118 Do not go to the original type.
9119 (dump_nested_types): New parameter forward.
9120 Generate forward declaration if needed and mark type as visited.
9121 (print_ada_declaration): Call dump_nested_types if not already done.
9122 Mark types as visited.
9123
9124 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9125
9126 * c.opt (-print-pch-checksum): Remove option.
9127 * c-opts.c (c_common_handle_option): Don't handle
9128 OPT_print_pch_checksum.
9129
9130 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9131
9132 * c-common.h (c_common_handle_option): Update prototype and return
9133 value type.
9134 * c-opts.c (c_common_handle_option): Update prototype and return
9135 value type. Update calls to handle_option and
9136 enable_warning_as_error.
9137
9138 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9139
9140 PR c/45079
9141 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9142
9143 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9144
9145 * c-common.h (c_common_missing_argument): Remove.
9146 * c-opts.c (c_common_missing_argument): Remove.
9147 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9148 idirafter, imacros, include, isysroot, isystem, iquote): Add
9149 MissingArgError.
9150 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9151
9152 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9153
9154 * c-common.h (c_common_option_lang_mask,
9155 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9156 New.
9157 (c_common_init_options): Update prototype.
9158 * c-opts.c (c_common_option_lang_mask): New.
9159 (c_common_initialize_diagnostics): Split out of
9160 c_common_init_options.
9161 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9162 New.
9163 (c_common_init_options): Update prototype. Use decoded options in
9164 search for -lang-asm.
9165
9166 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9167
9168 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9169 * c-format.c: Likewise.
9170
9171 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9172
9173 * c-common.h: Include diagnostic-core.h. Error if already
9174 included.
9175 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9176
9177 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9178
9179 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9180 Do not include expr.h
9181 (vector_mode_valid_p): Move here.
9182
9183 2010-06-21 DJ Delorie <dj@redhat.com>
9184
9185 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9186 allow these pragmas anywhere.
9187
9188 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9189
9190 PR bootstrap/44509
9191 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9192 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9193 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9194 ggc_strdup instead of xstrdup.
9195
9196 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9197
9198 * c-cppbuiltin.c: Include cpp-id-data.h.
9199 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9200 (lazy_hex_fp_value): New function.
9201 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9202
9203 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9204
9205 * c-gimplify.c: Do not include tree-flow.h
9206
9207 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9208
9209 PR other/44034
9210 * c-common.c: Rename targetm member:
9211 targetm.enum_va_list -> targetm.enum_va_list_p
9212
9213 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9214
9215 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9216
9217 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9218
9219 * c-cppbuiltin.c: Do not include except.h.
9220
9221 2010-06-24 Andi Kleen <ak@linux.intel.com>
9222
9223 * c-common.c (warn_for_omitted_condop): New.
9224 * c-common.h (warn_for_omitted_condop): Add prototype.
9225
9226 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9227
9228 * c.opt (lang-objc): Remove.
9229 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9230
9231 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9232
9233 * c-opts.c: Include "tm_p.h".
9234
9235 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9236
9237 * c-common.c (parse_optimize_options): Update call to
9238 decode_options.
9239
9240 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9241
9242 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9243 new type of types_used_by_cur_var_decl.
9244
9245 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9246
9247 PR bootstrap/44512
9248 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9249 for C++ standard compliance.
9250
9251 2010-06-16 Jason Merrill <jason@redhat.com>
9252
9253 * c.opt: Add -Wnoexcept.
9254
9255 2010-06-16 Richard Guenther <rguenther@suse.de>
9256
9257 PR c/44555
9258 * c-common.c (c_common_truthvalue_conversion): Remove
9259 premature and wrong optimization concering ADDR_EXPRs.
9260
9261 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9262
9263 * c-ada-spec.c (dump_sloc): Remove column info.
9264 (is_simple_enum): New function.
9265 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9266 enum types when relevant.
9267
9268 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9269
9270 * c-common.c (conversion_warning): Warn at expression
9271 location.
9272
9273 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9274
9275 * c-opts.c (c_common_handle_option): Don't handle
9276 OPT_fshow_column.
9277
9278 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9279
9280 * c-pragma.c (push_alignment): Use typed GC allocation.
9281 (handle_pragma_push_options): Likewise.
9282
9283 * c-common.c (parse_optimize_options): Likewise.
9284
9285 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9286 option.
9287
9288 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9289
9290 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9291 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9292 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9293 flag_signed_bitfields, warn_strict_null_sentinel,
9294 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9295 flag_gen_declaration, flag_no_gnu_keywords,
9296 flag_implement_inlines, flag_implicit_templates,
9297 flag_implicit_inline_templates, flag_optional_diags,
9298 flag_elide_constructors, flag_default_inline, flag_rtti,
9299 flag_conserve_space, flag_access_control, flag_check_new,
9300 flag_new_for_scope, flag_weak, flag_working_directory,
9301 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9302 flag_enforce_eh_specs, flag_threadsafe_statics,
9303 flag_pretty_templates): Remove.
9304 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9305 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9306 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9307 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9308 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9309 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9310 flag_no_gnu_keywords, flag_implement_inlines,
9311 flag_implicit_templates, flag_implicit_inline_templates,
9312 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9313 flag_rtti, flag_conserve_space, flag_access_control,
9314 flag_check_new, flag_new_for_scope, flag_weak,
9315 flag_working_directory, flag_use_cxa_atexit,
9316 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9317 flag_threadsafe_statics, flag_pretty_templates,
9318 warn_strict_null_sentinel): Remove.
9319 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9320 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9321 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9322 fimplicit-inline-templates, fimplicit-templates,
9323 flax-vector-conversions, fms-extensions, fnil-receivers,
9324 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9325 frtti, fshort-double, fshort-enums, fshort-wchar,
9326 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9327 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9328 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9329 gen-decls, undef): Use Var.
9330 (fdefault-inline, foptional-diags): Document as doing nothing.
9331 * c-opts.c (c_common_handle_option): Remove cases for options now
9332 using Var. Mark ignored options as such.
9333
9334 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9335
9336 * c-common.c: Moved to here from parent directory.
9337 * c-common.def: Likewise.
9338 * c-common.h: Likewise.
9339 * c-cppbuiltin.c: Likewise.
9340 * c-dump.c: Likewise.
9341 * c-format.c: Likewise.
9342 * c-format.h : Likewise.
9343 * c-gimplify.c: Likewise.
9344 * c-lex.c: Likewise.
9345 * c-omp.c: Likewise.
9346 * c.opt: Likewise.
9347 * c-opts.c: Likewise.
9348 * c-pch.c: Likewise.
9349 * c-ppoutput.c: Likewise.
9350 * c-pragma.c: Likewise.
9351 * c-pragma.h: Likewise.
9352 * c-pretty-print.c: Likewise.
9353 * c-pretty-print.h: Likewise.
9354 * c-semantics.c: Likewise.
9355 * stub-objc.c: Likewise.
9356
9357 * c-common.c: Include gt-c-family-c-common.h.
9358 * c-pragma.c: Include gt-c-family-c-pragma.h.
9359 \f
9360 Copyright (C) 2010-2018 Free Software Foundation, Inc.
9361
9362 Copying and distribution of this file, with or without modification,
9363 are permitted in any medium without royalty provided the copyright
9364 notice and this notice are preserved.