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