]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
diagnostics: show an extra line of context in line-insertion fix-it hints (PR 87091)
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
3d78e008
ML
12018-08-27 Martin Liska <mliska@suse.cz>
2
3 * c-common.c (check_function_restrict): Use new function
4 fndecl_built_in_p and remove check for FUNCTION_DECL if
5 possible.
6 (check_builtin_function_arguments): Likewise.
7 (reject_gcc_builtin): Likewise.
8 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
9
b5be6d0c
MP
102018-08-26 Marek Polacek <polacek@redhat.com>
11
12 PR c++/87029, Implement -Wredundant-move.
13 * c.opt (Wredundant-move): New option.
14
79ca9c35
MP
152018-08-21 Marek Polacek <polacek@redhat.com>
16
17 PR c++/86981, Implement -Wpessimizing-move.
18 * c.opt (Wpessimizing-move): New option.
19
097f82ec
DM
202018-08-20 David Malcolm <dmalcolm@redhat.com>
21
22 PR other/84889
23 * c-attribs.c (common_handle_aligned_attribute): Add
24 auto_diagnostic_group instance.
25 * c-indentation.c (warn_for_misleading_indentation): Likewise.
26 * c-opts.c (c_common_post_options): Likewise.
27 * c-warn.c (warn_logical_not_parentheses): Likewise.
28 (warn_duplicated_cond_add_or_warn): Likewise.
29 (warn_for_multistatement_macros): Likewise.
30
3fb558b1
NS
312018-08-20 Nathan Sidwell <nathan@acm.org>
32
33 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
34 access.
35
800c0e98
NS
362018-08-17 Nathan Sidwell <nathan@acm.org>
37
38 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
39 field.
40 (laxy_hex_fp_value_count): Make unsigned.
41 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
42 manipulate the macro.
43 (builtin_defin_with_hex_fp_value): Adjust callback name, use
44 cpp_define_lazily.
45
6f795a92
DM
462018-08-17 David Malcolm <dmalcolm@redhat.com>
47
48 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
49 (gcc_dump_printf_length_specs): New.
50 (gcc_dump_printf_flag_pairs): New.
51 (gcc_dump_printf_flag_specs): New.
52 (gcc_dump_printf_char_table): New.
53 (format_types_orig): Add entry for "gcc_dump_printf".
54 (init_dynamic_diag_info): Set up length_char_specs and
55 conversion_specs for gcc_dump_printf_format_type.
56 (handle_format_attribute): Handle gcc_dump_printf_format_type.
57
c5d725c0
NS
582018-08-17 Nathan Sidwell <nathan@acm.org>
59
10f04917
NS
60 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
61
c5d725c0
NS
62 * c-ada-spec.c: Don't #include "cpp-id-data.h"
63 * c-cppbuiltin.c: Likewise.
64
c0c12356
ML
652018-08-17 Martin Liska <mliska@suse.cz>
66
67 * c.opt: Remove Warn, Init and Report for options with
68 Ignore/Deprecated flag. Warning is done automatically for
69 Deprecated flags.
70
10fcc142
DM
712018-08-16 David Malcolm <dmalcolm@redhat.com>
72
73 PR c++/70693
74 * c-common.c (selftest::c_family_tests): Call
75 selftest::c_indentation_c_tests.
76 * c-common.h (selftest::c_indentation_c_tests): New decl.
77 * c-indentation.c: Include "selftest.h".
78 (next_tab_stop): Add "tab_width" param, rather than accessing
79 cpp_opts.
80 (get_visual_column): Likewise. Clarify comment. Bulletproof
81 against reading past the end of the line.
82 (get_first_nws_vis_column): Add "tab_width" param.
83 (detect_intervening_unindent): Likewise.
84 (should_warn_for_misleading_indentation): Read tab width from
85 cpp_opts and pass around.
86 (selftest::test_next_tab_stop): New test.
87 (selftest::assert_get_visual_column_succeeds): New function.
88 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
89 (selftest::assert_get_visual_column_fails): New function.
90 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
91 (selftest::test_get_visual_column): New test.
92 (selftest::c_indentation_c_tests): New function.
93
3f6677f4
NS
942018-08-16 Nathan Sidwell <nathan@acm.org>
95
96 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
97 (store_ada_macro): Likewise.
98 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
99 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
100
96e6ae57
DM
1012018-08-15 David Malcolm <dmalcolm@redhat.com>
102
103 * c-format.c: Include "selftest-diagnostic.h" and
104 "gcc-rich-location.h".
105 (format_warning_at_char): Pass NULL for new label params of
106 format_warning_va.
107 (class indirection_suffix): New class.
108 (class range_label_for_format_type_mismatch): New class.
109 (format_type_warning): Move logic for generating "*" suffix to
110 class indirection_suffix. Create "fmt_label" and "param_label"
111 to show their types, and pass them to the
112 format_warning_at_substring calls.
113 (selftest::test_type_mismatch_range_labels): New test.
114 (selftest::c_format_c_tests): Call it.
115
23aa9f7c
MS
1162018-08-13 Martin Sebor <msebor@redhat.com>
117
118 PR tree-optimization/71625
119 * c-common.c (braced_list_to_string): New function.
120 * c-common.h (braced_list_to_string): Declare it.
121
f10a9135
NS
1222018-08-08 Nathan Sidwell <nathan@acm.org>
123
124 * c-common.c (try_to_locate_new_include_inertion_point): Use
125 linemap_included_from_linemap.
126 * c-lex.c (fe_file_change): Use linemap_included_from.
127 * c-ppoutput.c (pp_file_change): Likewise.
128
8a45b051
MS
1292018-08-01 Martin Sebor <msebor@redhat.com>
130
131 PR tree-optimization/86650
132 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
133 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
134 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
135 * c-format.h (T89_G): Update to be "gimple *" rather than
136 "gcall *".
137 (local_gcall_ptr_node): Rename...
138 (local_gimple_ptr_node): ...to this.
139
e540ccc0
DM
1402018-07-31 David Malcolm <dmalcolm@redhat.com>
141
142 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
143 table entries for gcc_diag_char_table, and the 'Z' entry from
144 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
145 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
146 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
147 adding missing "Z" for this table. Remove erroneous "G" and "K"
148 entries.
149 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
150 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
151 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
152
425fc685
RE
1532018-07-31 Richard Earnshaw <rearnsha@arm.com>
154
155 * c-common.c (speculation_safe_resolve_call): New function.
156 (speculation_safe_resolve_params): New function.
157 (speculation_safe_resolve_return): New function.
158 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
159 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
160 __HAVE_SPECULATION_SAFE_VALUE.
161
181463c2
DM
1622018-07-20 David Malcolm <dmalcolm@redhat.com>
163
164 * c-common.c (c_cpp_error): Remove redundant "line_table"
165 parameter from call to rich_location::set_range.
166 (maybe_suggest_missing_token_insertion): Likewise.
167
0d7f9065
MS
1682018-07-20 Martin Sebor <msebor@redhat.com>
169
170 PR middle-end/82063
171 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
172
00abf86c
MS
1732018-07-20 Martin Sebor <msebor@redhat.com>
174
175 PR middle-end/82063
176 * c-common.h (c_common_handle_option): Change function argument
177 to HOST_WIDE_INT.
178 * c-opts.c (c_common_init_options): Same.
179 (c_common_handle_option): Same. Remove special handling of
180 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
181 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
182 options to take a HOST_WIDE_INT argument and accept a byte-size
183 suffix. Initialize.
184 (-Wvla-larger-than): Same.
185 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
186 (-Wno-vla-larger-than): Same.
187
9b452033
JJ
1882018-07-12 Jakub Jelinek <jakub@redhat.com>
189
190 * c-attribs.c (c_common_attribute_table): Add
191 "omp declare target implicit" attribute.
192
cd0762f3
RB
1932018-07-12 Richard Biener <rguenther@suse.de>
194
195 PR c/86453
196 * c-attribs.c (handle_packed_attribute): Do not build a variant
197 type with TYPE_PACKED, instead ignore the attribute if we may
198 not apply to the original type.
199
0b27c3ed
JJ
2002018-07-10 Jakub Jelinek <jakub@redhat.com>
201
202 PR c++/86443
203 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
204 to contain TREE_LIST for both the original class iterator and the
205 "last" helper var.
206
e730a0ef
EB
2072018-07-07 Eric Botcazou <ebotcazou@adacore.com>
208
209 * c-ada-spec.c (to_ada_name): Remove index parameter.
210 (pp_ada_tree_identifier): Likewise.
211 (dump_ada_macros): Adjust call to to_ada_name.
212 (struct overloaded_name_hash): Delete.
213 (struct overloaded_name_hasher): Likewise.
214 (overloaded_names): Likewise.
215 (compute_overloading_index): Likewise.
216 (dump_ada_decl_name): Do not call compute_overloading_index and
217 adjust calls to pp_ada_tree_identifier.
218 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
219 (dump_ada_import): Add spc parameter and switch to aspect syntax.
220 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
221 (dump_ada_enum_type): Remove type and display_convention parameters.
222 Adjust calls to pp_ada_tree_identifier.
223 (dump_ada_node): Likewise and for dump_ada_structure.
224 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
225 and tidy up.
226 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
227 syntax.
228 (print_constructor): Adjust call to pp_ada_tree_identifier.
229 (print_destructor): Likewise.
230 (dump_ada_declaration): Switch to aspect syntax.
231 (dump_ada_structure): Likewise and tidy up. Replace display_convention
232 parameter with nested parameter.
233 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
234 (dump_ada_specs): Do not delete overloaded_names table.
235
8de583fc
PB
2362018-07-06 Peter Bergner <bergner@linux.ibm.com>
237
238 PR target/86324
e730a0ef 239 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
240 target hook.
241
09cff37b
NS
2422018-07-05 Nathan Sidwell <nathan@acm.org>
243
244 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
245 NO_IMPLICIT_EXTERN_C.
246
98086b2b
ML
2472018-06-28 Martin Liska <mliska@suse.cz>
248
249 * cppspec.c: Include opt-suggestions.h.
250
829c6349
CLT
2512018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
252 Thomas Schwinge <thomas@codesourcery.com>
253 Cesar Philippidis <cesar@codesourcery.com>
254
255 * c-pragma.h (enum pragma_omp_clause): Add
256 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
257 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
258
f41b7612
JJ
2592018-06-20 Jakub Jelinek <jakub@redhat.com>
260
261 PR c++/86210
262 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
263 comment.
264
4252ccd7
MS
2652018-06-18 Martin Sebor <msebor@redhat.com>
266
267 PR middle-end/85602
268 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
269 nonstring.
270
e197e64e
KV
2712018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
272
273 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
274
34a7a230
JM
2752018-06-13 Jason Merrill <jason@redhat.com>
276
5cef3733
JM
277 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
278 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
279 handling.
280
34a7a230
JM
281 PR c++/86094 - wrong code with defaulted move ctor.
282 * c-opts.c (c_common_post_options): Bump the current ABI version to
283 13. Set warn_abi_version and flag_abi_compat_version to the current
284 version rather than 0. Fix defaulting flag_abi_compat_version from
285 warn_abi_version.
286
bb0f14ae
MS
2872018-06-12 Martin Sebor <msebor@redhat.com>
288
289 PR c/85931
290 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
291 sizeof source and destination yields the same value.
292
3713f2e2
ML
2932018-06-12 Martin Liska <mliska@suse.cz>
294
295 * c.opt: Make MPX-related options as Deprecated.
296
4af78ef8
DM
2972018-06-08 David Malcolm <dmalcolm@redhat.com>
298
299 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
300 rather than 0.
301
31db0fe0
ML
3022018-06-08 Martin Liska <mliska@suse.cz>
303
304 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
305 for MPX (macros, related functions, fields in cgraph_node, ...).
306 (handle_bnd_legacy): Likewise.
307 (handle_bnd_instrument): Likewise.
308 * c.opt: Likewise.
309
fe16acf2
JJ
3102018-06-06 Jakub Jelinek <jakub@redhat.com>
311
312 PR c++/86068
313 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
314 __cpp_transactional_memory to 201500 instead of 210500.
315
4dbdb49b
JM
3162018-06-06 Jason Merrill <jason@redhat.com>
317
318 PR c++/85710 - ICE with -Wmemset-elt-size.
319 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
320
f8ad043f
JM
3212018-06-01 Jason Merrill <jason@redhat.com>
322
323 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
324 201703.
325
abc24d93
EB
3262018-06-01 Eric Botcazou <ebotcazou@adacore.com>
327
328 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
329 declaration for a typedef independently of whether the declaration of
330 the subtype is generated.
331
d258f4aa
MS
3322018-05-31 Martin Sebor <msebor@redhat.com>
333
334 PR c/82063
335 * c.opt (-Wno-alloc-size-larger-than): New option.
336
b67b9225
DP
3372018-04-22 David Pagan <dave.pagan@oracle.com>
338
339 PR c/55976
340 * c-opts.c (c_common_post_options): Set default for warn_return_type
341 for C++/C++ with ObjC extensions only. For C, makes it possible to
342 differentiate between default (no option), -Wreturn-type, and
343 -Wno-return-type.
344
04eb9c55
JM
3452018-05-29 Jason Merrill <jason@redhat.com>
346
347 * c.opt (Winit-list-lifetime): New flag.
348
b0c31bc6
BE
3492018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
350
351 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
352 splay_tree_delete_pointers.
353
44284983
JJ
3542018-05-26 Jakub Jelinek <jakub@redhat.com>
355
356 PR bootstrap/85921
357 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
358 noinline variable to workaround broken kernel headers.
359
b46b715d
JM
3602018-05-18 Jason Merrill <jason@redhat.com>
361
362 * c.opt (Wdeprecated-copy): New flag.
363
40659769
ML
3642018-05-17 Martin Liska <mliska@suse.cz>
365
366 * c-warn.c (overflow_warning): Do not use
367 space in between 'G_' and '('.
368
403962ea
JM
3692018-05-09 Jason Merrill <jason@redhat.com>
370
371 * c-common.c (valid_array_size_p): Add complain parameter.
372 * c-common.h: ...which defaults to true.
373
1c9ee609
JJ
3742018-05-11 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/85696
377 * c-omp.c (c_omp_predetermined_sharing): Return
378 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
379
19916065
ML
3802018-05-11 Martin Liska <mliska@suse.cz>
381
382 PR sanitizer/85556
383 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
384 TREE_LIST values.
385
79e7b1fe
JJ
3862018-05-10 Jakub Jelinek <jakub@redhat.com>
387
388 PR c++/85662
389 * c-common.h (fold_offsetof_1): Removed.
390 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
391 CTX argument defaulted to ERROR_MARK.
392 * c-common.c (fold_offsetof_1): Renamed to ...
393 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
394 argument, convert the pointer constant to TYPE and use size_binop
395 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
396 a pointer type. Adjust recursive calls.
397
86c12f76
EB
3982018-05-10 Eric Botcazou <ebotcazou@adacore.com>
399
400 PR c++/85400
401 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
402
ee336e84
NS
4032018-05-07 Nathan Sidwell <nathan@acm.org>
404
405 * c.opt (ffor-scope): Remove functionality, issue warning.
406
6c072e21
NS
4072018-05-03 Nathan Sidwell <nathan@acm.org>
408
409 * c.opt (ffriend-injection): Remove functionality, issue warning.
410
2cc7d3a7
DM
4112018-05-01 David Malcolm <dmalcolm@redhat.com>
412
413 PR c/84258
414 * c-format.c (struct format_check_results): Add field
415 "number_non_char".
416 (check_format_info): Initialize it, and warn if encountered.
417 (check_format_arg): Distinguish between wide char and
418 everything else when detecting arrays of non-char.
419
7761dfbe
DM
4202018-04-30 David Malcolm <dmalcolm@redhat.com>
421
422 * c-format.c (get_corrected_substring): Update for
423 location_get_source_line returning a char_span. Use a char_span
424 when handling the prefix of the correction.
425 * c-indentation.c (get_visual_column): Update for
426 location_get_source_line returning a char_span.
427 (get_first_nws_vis_column): Likewise.
428
62e98ef1
DM
4292018-03-29 David Malcolm <dmalcolm@redhat.com>
430
431 PR c++/84269
432 * known-headers.cc (get_stdlib_header_for_name): Add various names
433 from <assert.h>, <string.h>, and <memory.h>; add more names from
434 <stdio.h>.
435
a7dea617
JJ
4362018-03-27 Jakub Jelinek <jakub@redhat.com>
437
438 PR c++/85061
439 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
440 get_base_address of the second operand is a VAR_P, rather than the
441 operand itself, and use gcc_checking_assert instead of gcc_assert.
442
889a3a30
MP
4432018-03-23 Marek Polacek <polacek@redhat.com>
444
445 PR c++/85045
446 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
447 <case RDIV_EXPR>: Tweak condition.
448
452154b9
EB
4492018-03-20 Eric Botcazou <ebotcazou@adacore.com>
450
451 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
452
63ecb626
JJ
4532018-03-16 Jakub Jelinek <jakub@redhat.com>
454
ce811fc4
JJ
455 PR c/84909
456 * c-warn.c (conversion_warning): Replace "to to" with "to" in
457 diagnostics.
458
63ecb626
JJ
459 PR c/84910
460 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
461 diagnostics.
462
a1295eec
RB
4632018-03-16 Richard Biener <rguenther@suse.de>
464
465 PR c/84873
466 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
467 unshare the possibly folded expression.
468
919674fb
RB
4692018-03-15 Richard Biener <rguenther@suse.de>
470
471 PR c/84873
472 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
473
f99309b2
MS
4742018-03-13 Martin Sebor <msebor@redhat.com>
475
476 PR tree-optimization/84725
477 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
478 with all three narrow character types, including their qualified forms.
479
e9b9fa4c
MS
4802018-03-12 Martin Sebor <msebor@redhat.com>
481
482 PR tree-optimization/83456
483 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
484 Restore checking of bounded built-in functions.
485 (check_function_arguments): Also return the result
486 of warn_for_restrict.
487 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
488 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
489
0805d020
MP
4902018-03-02 Marek Polacek <polacek@redhat.com>
491
492 PR c++/84171
493 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
494 is erroneous.
495
ed2a2f08
TS
4962018-03-02 Thomas Schwinge <thomas@codesourcery.com>
497
498 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
499 function".
500
90abdde0
MP
5012018-03-01 Marek Polacek <polacek@redhat.com>
502
503 PR c++/84639
504 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
505 alignment in computation.
506
c6db43fa
EB
5072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
508
509 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
510 <REAL_TYPE>: Deal specifically with _Float128/__float128.
511
9e25c7ed
EB
5122018-02-28 Eric Botcazou <ebotcazou@adacore.com>
513
514 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
515 (is_char_array): Take a type instead of a declaration.
516 (dump_ada_array_type): Likewise.
517 (is_simple_enum): Minor tweak.
518 (dump_ada_enum_type): New function extracted from...
519 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
520 <INTEGER_TYPE>: Remove unreachable code.
521 <RECORD_TYPE>: Likewise. Minor tweaks.
522 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
523 <ENUMERAL_TYPE>: New case.
524 <RECORD_TYPE>: Factor out common code.
525 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
526 Minor tweaks. Deal with enumeral types.
527 (dump_ada_structure): Minor tweaks.
528
09de3550
EB
5292018-02-28 Eric Botcazou <ebotcazou@adacore.com>
530
531 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
532 address for incomplete structures.
533 (dump_forward_type): Do not bail out for incomplete structures.
534 (dump_ada_declaration): Do not special-case incomplete structures
535 for subtypes. Dump them as null records for types.
536
095d8d4b
EB
5372018-02-28 Eric Botcazou <ebotcazou@adacore.com>
538
539 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
540 (is_char_array): Fix formatting.
541 (dump_template_types): Likewise.
542 (dump_generic_ada_node): Rename into...
543 (dump_ada_node): ...this.
544 <POINTER_TYPE>: Remove superfluous space. Use generic address for
545 incomplete structures and not for empty structures. Do not use it
546 when forward declarations are needed.
547 (dump_forward_type): New function.
548 (dump_nested_types): Remove FORWARD parameter. Do not consider
549 TREE_VISITED and do not generate a forward declaration. Only dump
550 original nested types for nested declaration.
551 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
552 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
553 <RECORD_TYPE>: Do not consider TREE_VISITED.
554 (dump_ada_declaration): Use booleans and fix formatting throughout.
555 <TYPE_DECL>: Skip incomplete structures and not empty structures.
556 Call dump_forward_type instead of dump_nested_types for a typedef.
557 Remove superfluous check and adjust call to dump_nested_types.
558 <POINTER_TYPE>: Call dump_forward_type and fall through.
559 (dump_ada_struct_decl): Rename into...
560 (dump_ada_structure): ...this. Do not special-case empty structures.
561
d4cfd486
MS
5622018-02-27 Martin Sebor <msebor@redhat.com>
563
564 PR c++/83871
565 * c.opt (-Wmissing-attributes): New option.
566
b22dbd03
ML
5672018-02-21 Martin Liska <mliska@suse.cz>
568
569 * c.opt (Wcatch-value=): Add IntegerRange.
570
883dfe2a
JM
5712018-02-15 Jason Merrill <jason@redhat.com>
572
573 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
574
0444aa9c
NS
5752018-02-09 Nathan Sidwell <nathan@acm.org>
576
577 PR c/84293
578 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
579 arg.
580 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
581 arg. Adjust.
582
cea71f0a
MS
5832018-02-09 Martin Sebor <msebor@redhat.com>
584
585 PR lto/84212
586 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
587 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
588 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
589 (-Wstrict-overflow, -Wsuggest-attribute): Same.
590 (-Wuninitialized): Same.
591
8c8b7be5
EB
5922018-02-09 Eric Botcazou <ebotcazou@adacore.com>
593
594 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
595 keyword for components.
596
7c30b12a
PC
5972018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
598
599 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
600
eece7fe5
JK
6012018-02-02 Julia Koval <julia.koval@intel.com>
602
603 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
604
7d07a93a
MP
6052018-01-29 Marek Polacek <polacek@redhat.com>
606
607 PR c/83966
608 * c-format.c (check_function_format): Check current_function_decl.
609
53723269
JJ
6102018-01-27 Jakub Jelinek <jakub@redhat.com>
611
612 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
613 argument.
614 (LAZY_HEX_FP_VALUES_CNT): Define.
615 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
616 values rather than just 12.
617 (builtin_define_with_hex_fp_value): Likewise.
618
7365279f
BK
6192018-01-18 Boris Kolpackov <boris@codesynthesis.com>
620
621 PR other/70268
53723269
JJ
622 * c.opt (-fmacro-prefix-map): New option.
623 * c-opts.c (c_common_handle_option): Handle it.
624 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
625 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 626
bb9869d5
DM
6272018-01-17 David Malcolm <dmalcolm@redhat.com>
628
629 PR c++/83814
630 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
631
68dc87c3
EB
6322018-01-10 Eric Botcazou <ebotcazou@adacore.com>
633
634 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
635 Skip 'f' and 'F' characters if it is true.
636 (store_ada_macro): Minor tweak.
637 (dump_ada_macros) <CPP_COMMENT>: Likewise.
638 <CPP_WSTRING>: Likewise.
639 <CPP_STRING>: Output '&' in the buffer if not the first string.
640 <CPP_NUMBER>: Adjust calls to dump_number.
641
9a004410
DM
6422018-01-10 David Malcolm <dmalcolm@redhat.com>
643
644 PR c++/43486
645 * c-common.c: Include "selftest.h".
646 (get_atomic_generic_size): Perform the test for integral type
647 before the range test for any integer constant, fixing indentation
648 of braces. Call fold_for_warn before testing for an INTEGER_CST.
649 (reject_gcc_builtin): Strip any location wrapper from EXPR.
650 (selftest::test_fold_for_warn): New function.
651 (selftest::c_common_c_tests): New function.
652 (selftest::c_family_tests): Call it, and
653 selftest::c_pretty_print_c_tests.
654 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
655 * c-format.c (check_format_arg): Convert VAR_P check to a
656 fold_for_warn.
657 * c-pretty-print.c: Include "selftest.h".
658 (pp_c_cast_expression): Don't print casts for location wrappers.
659 (selftest::assert_c_pretty_printer_output): New function.
660 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
661 (selftest::test_location_wrappers): New function.
662 (selftest::c_pretty_print_c_tests): New function.
663 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
664
5c0caeb3
RS
6652018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
666 Alan Hayward <alan.hayward@arm.com>
667 David Sherwood <david.sherwood@arm.com>
668
669 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
670
73a699ae
RS
6712018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
672 Alan Hayward <alan.hayward@arm.com>
673 David Sherwood <david.sherwood@arm.com>
674
675 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
676 as polynomial.
677
928686b1
RS
6782018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
679 Alan Hayward <alan.hayward@arm.com>
680 David Sherwood <david.sherwood@arm.com>
681
682 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
683 (convert_vector_to_array_for_subscript): Handle polynomial
684 TYPE_VECTOR_SUBPARTS.
685 (c_common_type_for_mode): Check valid_vector_subparts_p.
686 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
687 VECTOR_CST_NELTS.
688
85ec4feb
JJ
6892018-01-03 Jakub Jelinek <jakub@redhat.com>
690
691 Update copyright years.
692
170a8bd6
EB
6932017-12-22 Mike Stump <mikestump@comcast.net>
694 Eric Botcazou <ebotcazou@adacore.com>
695
696 * c-pragma.c (init_pragma): Register pragma GCC unroll.
697 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
698
18408e96
AO
6992017-12-22 Alexandre Oliva <aoliva@redhat.com>
700
701 PR debug/83527
702 PR debug/83419
703 * c-semantics.c (only_debug_stmts_after_p): New.
704 (pop_stmt_list): Clear side effects in debug-only stmt list.
705 Check for single nondebug stmt followed by debug stmts only.
706
c12d20d4
AO
7072017-12-21 Alexandre Oliva <aoliva@redhat.com>
708
709 PR debug/83419
710 * c-semantics.c (pop_stmt_list): Propagate side effects from
711 single nondebug stmt to container list.
712
01512446
JJ
7132017-12-19 Jakub Jelinek <jakub@redhat.com>
714
715 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
716 conditions with typical order conditions.
717
82cfbd01
MP
7182017-12-18 Marek Polacek <polacek@redhat.com>
719
720 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
721 not in effect.
722
99da11ec
MS
7232017-12-17 Martin Sebor <msebor@redhat.com>
724
725 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
726 an error for attribute warn_if_not_aligned.
727
cc8bea0a
MS
7282017-12-16 Martin Sebor <msebor@redhat.com>
729
730 PR tree-optimization/78918
731 * c-common.c (check_function_restrict): Avoid checking built-ins.
732 * c.opt (-Wrestrict): Include in -Wall.
733
4849deb1
JJ
7342017-12-15 Jakub Jelinek <jakub@redhat.com>
735
736 * c-attribs.c (c_common_attribute_table,
737 c_common_format_attribute_table): Swap affects_type_identity
738 and handler fields, adjust comments.
739
c65e18d3
BE
7402017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
741
742 * c.opt (Wcast-function-type): New warning option.
743 * c-lex.c (get_fileinfo): Avoid warning.
744 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
745
2004617a
QZ
7462017-12-14 Qing Zhao <qing.zhao@oracle.com>
747
7365279f 748 PR middle_end/79538
2004617a
QZ
749 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
750 Adjust the size of buf1 and buf2, add a new buf to avoid
751 format-overflow warning.
752
96a95ac1
AO
7532017-12-12 Alexandre Oliva <aoliva@redhat.com>
754
755 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
756 subsequent statement list.
757
5d9ae53d
MS
7582017-12-07 Martin Sebor <msebor@redhat.com>
759
760 PR c/81544
761 PR c/81566
762 * c-attribs.c (attr_aligned_exclusions): New array.
763 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
764 (attr_common_exclusions, attr_const_pure_exclusions): Same.
765 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
766 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
767 (attr_warn_unused_result_exclusions): Same.
768 (handle_hot_attribute, handle_cold_attribute): Simplify.
769 (handle_const_attribute): Warn on function returning void.
770 (handle_pure_attribute): Same.
771 (handle_aligned_attribute): Diagnose conflicting attribute
772 specifications.
773 * c-warn.c (diagnose_mismatched_attributes): Simplify.
774
c79144f8
DM
7752017-12-06 David Malcolm <dmalcolm@redhat.com>
776
777 PR c/83236
778 * c-common.c (selftest::c_family_tests): Call
779 selftest::c_spellcheck_cc_tests.
780 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
781 * c-spellcheck.cc: Include "selftest.h".
782 (name_reserved_for_implementation_p): New function.
783 (should_suggest_as_macro_p): New function.
784 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
785 should_suggest_as_macro_p and call it.
786 (selftest::test_name_reserved_for_implementation_p): New function.
787 (selftest::c_spellcheck_cc_tests): New function.
788 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
789
613bc14f
DM
7902017-12-06 David Malcolm <dmalcolm@redhat.com>
791
792 * c-spellcheck.cc: New file, taken from macro-handling code in
793 spellcheck-tree.c.
794 * c-spellcheck.h: New file, taken from macro-handling code in
795 spellcheck-tree.h.
796
e76c7157
JJ
7972017-12-01 Jakub Jelinek <jakub@redhat.com>
798
799 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
800 attribute.
801 (handle_simd_attribute): Don't check for "cilk simd function"
802 attribute. Reindent, formatting changes.
803
b0da4034
JK
8042017-11-30 Julia Koval <julia.koval@intel.com>
805
806 * c-common.h (inv_list): Remove.
807
058f0b9e
JJ
8082017-11-28 Jakub Jelinek <jakub@redhat.com>
809
810 PR sanitizer/81275
811 * c-common.c (c_switch_covers_all_cases_p_1,
812 c_switch_covers_all_cases_p): New functions.
813 * c-common.h (c_switch_covers_all_cases_p): Declare.
814
5e9d6aa4
JK
8152017-11-28 Julia Koval <julia.koval@intel.com>
816 Sebastian Peryt <sebastian.peryt@intel.com>
817
818 * array-notation-common.c: Delete.
819 * c-cilkplus.c: Ditto.
820 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
821 * c-common.def (ARRAY_NOTATION_REF): Remove.
822 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
823 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
824 c_validate_cilk_plus_loop, cilkplus_an_parts,
825 cilk_ignorable_spawn_rhs_op,
826 cilk_recognize_spawn): Remove.
827 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
828 * c-omp.c: Remove CILK_SIMD check.
829 * c-pragma.c: Ditto.
830 * c-pragma.h: Remove CILK related pragmas.
831 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
832 ARRAY_NOTATION_REF condition.
833 (c_pretty_printer::expression): Ditto.
834 * c.opt (fcilkplus): Remove.
835 * cilk.c: Delete.
836
1af4ebf5
MG
8372017-11-21 Marc Glisse <marc.glisse@inria.fr>
838
839 * c-pretty-print.c (pp_c_additive_expression,
840 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
841
d44ed508
JJ
8422017-11-21 Jakub Jelinek <jakub@redhat.com>
843
7d2f0f9b
JJ
844 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
845
d44ed508
JJ
846 PR c++/83059
847 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
848 instead of tree_to_uhwi, formatting fix.
849
26edace6
DM
8502017-11-20 David Malcolm <dmalcolm@redhat.com>
851
852 PR c/81404
853 * known-headers.cc: New file, based on material from c/c-decl.c.
854 (suggest_missing_header): Copied as-is.
855 (get_stdlib_header_for_name): New, based on get_c_name_hint but
856 heavily edited to add C++ support. Add some knowledge about
857 <limits.h>, <stdint.h>, and <wchar.h>.
858 * known-headers.h: Likewise.
859
6c7a259b
DM
8602017-11-20 David Malcolm <dmalcolm@redhat.com>
861
862 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
863 (lookup_name_fuzzy): Likewise. Convert return type from
864 const char * to name_hint. Add location_t param.
865 * name-hint.h: New header.
866
f9c59f7e
JJ
8672017-11-19 Jakub Jelinek <jakub@redhat.com>
868
869 PR c/66618
870 PR c/69960
871 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
872
1e39313a
JM
8732017-11-16 Joseph Myers <joseph@codesourcery.com>
874
875 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
876 expected publication date of C17.
877 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
878
3ca0dc60
JM
8792017-11-15 Joseph Myers <joseph@codesourcery.com>
880
881 PR c/81156
882 * c-common.c (c_common_reswords): Add __builtin_tgmath.
883 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
884
025d57f0
MS
8852017-11-10 Martin Sebor <msebor@redhat.com>
886
887 PR c/81117
888 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
889 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
890 * c.opt (-Wstringop-truncation): New option.
891
1b6fa695
ML
8922017-11-06 Martin Liska <mliska@suse.cz>
893
894 PR middle-end/82404
895 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
896 FE.
897 * c.opt: Set default value of warn_return_type.
898
64a5912c
DM
8992017-10-31 David Malcolm <dmalcolm@redhat.com>
900
901 * c-common.c (binary_op_error): Update for renaming of
902 error_at_rich_loc.
903 (c_parse_error): Likewise.
904 * c-warn.c (warn_logical_not_parentheses): Likewise for
905 renaming of inform_at_rich_loc.
906 (warn_for_restrict): Likewise for renaming of
907 warning_at_rich_loc_n.
908
c76dc9c3
JM
9092017-10-30 Joseph Myers <joseph@codesourcery.com>
910
911 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
912 * c-opts.c (set_std_c17): New function.
913 (c_common_init_options): Use gnu17 as default C version.
914 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
915
ee5fd23a
MM
9162017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
917
918 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
919 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
920 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
921 __FP_FAST_FMA<N>X.
922
d1047465
MP
9232017-10-23 Marek Polacek <polacek@redhat.com>
924
925 PR c/82681
926 * c-warn.c (warnings_for_convert_and_check): Fix typos.
927
9e878cf1
EB
9282017-10-19 Eric Botcazou <ebotcazou@adacore.com>
929
930 * c-common.c (check_builtin_function_arguments): Also check arguments
931 of __builtin_alloca_with_align_and_max.
932
89b6abbb
DM
9332017-10-17 David Malcolm <dmalcolm@redhat.com>
934
935 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
936 rather than NULL to format_warning_va.
937 (check_format_types): Likewise when calling format_type_warning.
938 Remove code to extract source_ranges and source_range * in favor
939 of just a location_t.
940 (format_type_warning): Convert source_range * param to a
941 location_t.
942
39382c09
JJ
9432017-10-13 Jakub Jelinek <jakub@redhat.com>
944
945 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
946 [LR]SHIFT_EXPR.
947
62e1c678
DM
9482017-10-12 David Malcolm <dmalcolm@redhat.com>
949
950 * c-common.c (enum missing_token_insertion_kind): New enum.
951 (get_missing_token_insertion_kind): New function.
952 (maybe_suggest_missing_token_insertion): New function.
953 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
954
b90c9338
NS
9552017-10-11 Nathan Sidwell <nathan@acm.org>
956
957 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
958 (c_common_handle_option): Update incpath_kind names.
959
3a266bcd
ML
9602017-10-11 Martin Liska <mliska@suse.cz>
961
962 PR sanitizer/82490
963 * c-attribs.c (handle_no_sanitize_attribute): Report directly
964 Wattributes warning.
965
8e6cdc90
RS
9662017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
967
968 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
969 operating on trees as wide_ints.
970 * c-common.c (pointer_int_sum): Likewise.
971 * c-pretty-print.c (pp_c_integer_constant): Likewise.
972 * c-warn.c (match_case_to_enum_1): Likewise.
973 (c_do_switch_warnings): Likewise.
974 (maybe_warn_shift_overflow): Likewise.
975
802b38c9
JJ
9762017-10-10 Jakub Jelinek <jakub@redhat.com>
977
978 PR c/82437
979 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
980 instead of wide_int::from.
981
4e34b338
JJ
9822017-10-06 Jakub Jelinek <jakub@redhat.com>
983
984 PR c/82437
985 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
986 using to_widest use wide_int with the larger of the two precisions.
987
4bc4b2b4
BE
9882017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
989
990 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
991 functions.
992
a1488398
RS
9932017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
994
995 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
996 when combining the original unconverted comparison operands.
997
01c9fb68
JJ
9982017-09-29 Jakub Jelinek <jakub@redhat.com>
999
1000 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1001 attribute.
1002
6e3e8419
EB
10032017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1004
1005 * c-ada-spec.c (to_ada_name): Add index parameter.
1006 (pp_ada_tree_identifier): Likewise.
1007 (dump_ada_macros): Adjust call to to_ada_name.
1008 (struct overloaded_name_hash): New type.
1009 (struct overloaded_name_hasher): Likewise.
1010 (overloaded_names): New hash table.
1011 (compute_overloading_index): New function.
1012 (dump_ada_decl_name): Call it and pass the result to
1013 pp_ada_tree_identifier.
1014 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1015 (dump_ada_function_declaration): Likewise.
1016 (dump_generic_ada_node): Likewise.
1017 (print_constructor): Likewise.
1018 (print_destructor): Likewise.
1019 (dump_ada_specs): Delete overloaded_names table.
1020
79310774
EB
10212017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1022
1023 * c-ada-spec.c (max_ada_macros): Move around.
1024 (store_ada_macro_index): Likewise.
1025 (source_file): Rename into...
1026 (macro_source_file): ...this.
1027 (count_ada_macro): Move around.
1028 (store_ada_macro): Likewise.
1029 (compare_macro): Likewise.
1030 (print_ada_macros): Merge in...
1031 (dump_ada_macros): ...this.
1032 (source_file_base): Rename into...
1033 (current_source_file): ...this.
1034 (print_comment): Move around.
1035 (dump_ada_nodes): Call dump_ada_declaration directly.
1036 (struct with): Change type of limited field to bool.
1037 (append_withs): Change type of limited_access parameter to bool.
1038 (pp_ada_tree_identifie): Likewise.
1039 (dump_ada_decl_nam): Likewise.
1040 (dump_generic_ada_node): Likewise. Do not print the return type.
1041 (to_ada_name): Change type of space_found parameter to bool.
1042 (dump_ada_function_declaration): Return void and change type of
1043 parameters to bool. Also print the return type for a function.
1044 (print_ada_methods): Rename into...
1045 (dump_ada_methods): ...this.
1046 (print_ada_declaration): Rename into ...
1047 (dump_ada_declaration): ...this. Do not print the return type.
1048 (print_ada_struct_decl): Rename into...
1049 (dump_ada_struct_decl): ...this.
1050
7d386d45
JJ
10512017-09-29 Jakub Jelinek <jakub@redhat.com>
1052
1053 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1054 rather than DECL_INITIAL.
1055 (common_handle_aligned_attribute): Likewise.
1056
9ed32e27
AO
10572017-09-20 Alexandre Oliva <aoliva@redhat.com>
1058
1059 * c.opt (gen-decls): Add RejectNegative.
1060
026a79f7
AS
10612017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1062 Jakub Jelinek <jakub@redhat.com>
1063
1064 Add support for -std=c++2a.
1065 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1066 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1067 * c-opts.c (set_std_cxx2a): New.
1068 (c_common_handle_option): Set options when -std=c++2a is enabled.
1069 (c_common_post_options): Adjust comments.
1070 (set_std_cxx14, set_std_cxx17): Likewise.
1071
4a8ca690
EB
10722017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1073
1074 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1075 message for non-uniform endianness and issue a warning in C++.
1076
7b936140
JJ
10772017-09-15 Jakub Jelinek <jakub@redhat.com>
1078
1079 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1080 (Wc++17-compat): Change from undocumented alias to option.
1081 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1082 change C++1z to C++17 in description.
1083 (std=c++1z, std=gnu++1z): Change from option to undocumented
1084 deprecated alias.
1085 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1086 Adjust description.
1087 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1088 * c-opts.c (set_std_cxx1z): Rename to ...
1089 (set_std_cxx17): ... this.
1090 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1091 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1092 caller.
7b936140
JJ
1093 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1094 comments.
1095
12263f13
L
10962017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1097
1098 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1099 function alignment if warn_if_not_aligned_p is true.
1100
6836632e
NS
11012017-09-12 Nathan Sidwell <nathan@acm.org>
1102
1103 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1104 resort_sorted_fields): Move to c/c-decl.c.
1105 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1106 (struct sorted_fields_type): Move to c/c-lang.h.
1107
019bf9ad
JW
11082017-09-09 Jonathan Wakely <jwakely@redhat.com>
1109
1110 PR c++/81852
1111 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1112
bc7fe952
MP
11132017-09-04 Marek Polacek <polacek@redhat.com>
1114
1115 PR c/81783
1116 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1117 (warn_tautological_cmp): Call it.
1118
de7c2c6a
BK
11192017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1120
1121 * c-opts.c (c_common_finish): Write dependency information even if
1122 there are errors.
1123
d2e05fcb
JJ
11242017-09-01 Jakub Jelinek <jakub@redhat.com>
1125
1126 PR c/81887
1127 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1128 (omp_pragmas_simd): ... here.
1129 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1130 create new clauses list containing just simd clause.
1131
18e2a8b8
RS
11322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1133 Alan Hayward <alan.hayward@arm.com>
1134 David Sherwood <david.sherwood@arm.com>
1135
1136 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1137 into scalar_mode_supported_p call.
1138 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1139
16d22000
RS
11402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1141 Alan Hayward <alan.hayward@arm.com>
1142 David Sherwood <david.sherwood@arm.com>
1143
1144 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1145 for the mode iterator.
1146
b397965c
RS
11472017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1148 Alan Hayward <alan.hayward@arm.com>
1149 David Sherwood <david.sherwood@arm.com>
1150
1151 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1152 * c-common.c (c_build_vec_perm_expr): Likewise.
1153
357b7604
RS
11542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1155 Alan Hayward <alan.hayward@arm.com>
1156 David Sherwood <david.sherwood@arm.com>
1157
1158 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1159
e05c94ba
RS
11602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1161 Alan Hayward <alan.hayward@arm.com>
1162 David Sherwood <david.sherwood@arm.com>
1163
1164 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1165 before calling targetm.addr_space.valid_pointer_mode.
1166
5c20c4af
RS
11672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1168 Alan Hayward <alan.hayward@arm.com>
1169 David Sherwood <david.sherwood@arm.com>
1170
1171 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1172
c94843d2
RS
11732017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1174 Alan Hayward <alan.hayward@arm.com>
1175 David Sherwood <david.sherwood@arm.com>
1176
1177 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1178 iterators.
1179 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1180
4e10a5a7
RS
11812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1182 Alan Hayward <alan.hayward@arm.com>
1183 David Sherwood <david.sherwood@arm.com>
1184
1185 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1186 case statements.
1187
130fcab0
ML
11882017-08-29 Martin Liska <mliska@suse.cz>
1189
1190 PR other/39851
1191 * c-common.c (parse_optimize_options): Add argument to function
1192 call.
1193 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1194
14e18d71
DM
11952017-08-24 David Malcolm <dmalcolm@redhat.com>
1196
1197 * c-lex.c (interpret_float): Use token location
1198 when building an EXCESS_PRECISION_EXPR.
1199
2f687306
DM
12002017-08-21 David Malcolm <dmalcolm@redhat.com>
1201
1202 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1203 it to check_function_format.
1204 * c-common.h (check_function_arguments): Add vec<location_t> *
1205 param.
1206 (check_function_format): Likewise.
1207 * c-format.c (struct format_check_context): Add field "arglocs".
1208 (check_function_format): Add param "arglocs"; pass it to
1209 check_format_info.
1210 (check_format_info): Add param "arglocs"; use it to initialize
1211 new field of format_ctx.
1212 (check_format_arg): Pass format_ctx->arglocs to new param of
1213 check_format_info_main.
1214 (class argument_parser): New field "arglocs".
1215 (argument_parser::argument_parser): Add "arglocs_" param and use
1216 it to initialize new field.
1217 (argument_parser::check_argument_type): Pass new arglocs field to
1218 check_format_types.
1219 (check_format_info_main): Add param "arglocs", and use it when
1220 constructing arg_parser.
1221 (check_format_types): Add param "arglocs"; use it if non-NULL when
1222 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1223
00aa1fa2
L
12242017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1225
1226 PR c/53037
1227 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1228 (c_common_attribute_table): Add warn_if_not_aligned.
1229 (handle_aligned_attribute): Renamed to ...
1230 (common_handle_aligned_attribute): Remove argument, name, and add
1231 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1232 (handle_aligned_attribute): New.
1233 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1234
27be025d
MS
12352017-08-14 Martin Sebor <msebor@redhat.com>
1236
1237 PR c/81117
1238 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1239 (handle_nonstring_attribute): New function.
1240
da67acb9
MS
12412017-08-14 Martin Sebor <msebor@redhat.com>
1242
1243 PR c/81117
1244 * c-format.h (T89_G): New macro.
1245 * c-format.c (local_gcall_ptr_node): New variable.
1246 (init_dynamic_diag_info): Initialize it.
1247
a8b522b4
ML
12482017-08-11 Martin Liska <mliska@suse.cz>
1249
1250 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1251 TARGET_SUPPORTS_ALIASES.
1252
32129a17
DM
12532017-08-10 David Malcolm <dmalcolm@redhat.com>
1254
1255 * c-common.c (c_parse_error): Add rich_location * param, using it
1256 rather implicitly using input_location.
1257 * c-common.h (c_parse_error): Add rich_location * param.
1258
30af3a2b
MP
12592017-08-09 Marek Polacek <polacek@redhat.com>
1260
1261 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1262 (c_common_truthvalue_conversion): Likewise.
1263 * c-omp.c (c_finish_omp_atomic): Likewise.
1264 * c-common.h (build_binary_op): Update declaration.
1265
314e6352
ML
12662017-08-08 Martin Liska <mliska@suse.cz>
1267
1268 * c-ada-spec.c: Include header files.
1269 * c-ubsan.c: Likewise.
1270 * c-warn.c: Likewise.
1271
56b5041c
JJ
12722017-08-07 Jakub Jelinek <jakub@redhat.com>
1273
1274 PR c/69389
1275 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1276
db440138
EB
12772017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1278
1279 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1280 (print_ada_methods): Likewise.
1281 (print_ada_declaration): Likewise.
1282
577eec56
ML
12832017-08-07 Martin Liska <mliska@suse.cz>
1284
1285 * array-notation-common.c: Add new includes.
1286 * c-format.c( handle_format_attribute): Canonicalize a format
1287 function name.
1288 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1289 attribute.
1290 * c-pretty-print.c: Add new include.
1291
b854df3c
EB
12922017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1293
1294 * c-ada-spec.c (has_static_fields): Look only into variables.
1295 (print_constructor): Add TYPE parameter and use it for the name.
1296 (print_destructor): Likewise.
1297 (print_ada_declaration): Adjust to new constructor/destructor names.
1298 Adjust calls to print_constructor and print_destructor.
1299 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1300 Look only into variables in the final loop.
1301
9f2cb25e
EB
13022017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1303
1304 * c-ada-spec.c (has_static_fields): Look only into fields.
1305 (dump_generic_ada_node): Small tweak.
1306 (dump_nested_types): Look only into fields.
1307 (print_ada_declaration): Look only into methods. Small tweak.
1308 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1309
f4bcd9eb
EB
13102017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1311
1312 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1313 (dump_ada_function_declaration): Likewise.
1314 (dump_generic_ada_node): Likewise.
1315 (print_ada_declaration): Add support for const-qualified variables.
1316
f34ebeb2
ML
13172017-07-31 Martin Liska <mliska@suse.cz>
1318
1319 PR sanitize/81530
1320 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1321 Guard condition with flag_sanitize_p also with current_function_decl
1322 non-null equality.
1323 (ubsan_maybe_instrument_reference_or_call): Likewise.
1324
218e5d04
UB
13252017-07-30 Uros Bizjak <ubizjak@gmail.com>
1326
1327 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1328
942047f2
EB
13292017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1330
1331 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1332 for enumeral types.
1333 (print_ada_declaration): Add missing guard for record types.
1334
a40ff0ae
JJ
13352017-07-27 Jakub Jelinek <jakub@redhat.com>
1336
1337 PR c/45784
1338 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1339 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1340 new COMPOUND_EXPRs around the rhs of the comparison.
1341
06bd22f6
MP
13422017-07-27 Marek Polacek <polacek@redhat.com>
1343
1344 PR c/81417
1345 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1346 the types.
1347
036ea399
JJ
13482017-07-27 Jakub Jelinek <jakub@redhat.com>
1349
1350 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1351 (handle_noipa_attribute): New function.
1352
417ca011
TD
13532017-07-07 Torsten Duwe <duwe@suse.de>
1354
1355 * c-attribs.c (c_common_attribute_table): Add entry for
1356 "patchable_function_entry".
1357
5aaa8fb4
NS
13582017-07-20 Nathan Sidwell <nathan@acm.org>
1359
1360 Remove TYPE_METHODS.
1361 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1362 dump_ada_template, print_ada_methods,
1363 print_ada_declaration): Member fns are on TYPE_FIELDS.
1364
ff22eb12
NS
13652017-07-18 Nathan Sidwell <nathan@acm.org>
1366
1367 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1368
eea77d1f
DM
13692017-07-14 David Malcolm <dmalcolm@redhat.com>
1370
1371 * c-common.c (try_to_locate_new_include_insertion_point): New
1372 function.
1373 (per_file_includes_t): New typedef.
1374 (added_includes_t): New typedef.
1375 (added_includes): New variable.
1376 (maybe_add_include_fixit): New function.
1377 * c-common.h (maybe_add_include_fixit): New decl.
1378
281ac396
MS
13792017-07-10 Martin Sebor <msebor@redhat.com>
1380
1381 PR other/81345
1382 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1383
b6f43128
DM
13842017-07-06 David Malcolm <dmalcolm@redhat.com>
1385
1386 * c-common.c (selftest::c_family_tests): New.
1387 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1388 (selftest::c_family_tests): New decl.
1389
efbf55b0
MP
13902017-07-04 Marek Polacek <polacek@redhat.com>
1391
1392 PR c/81231
1393 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1394 types.
1395
6c86bd88
MP
13962017-07-04 Marek Polacek <polacek@redhat.com>
1397
1398 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1399
17a7218b
ML
14002017-06-28 Martin Liska <mliska@suse.cz>
1401
1402 PR ipa/81128
1403 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1404 to a function declaration.
1405
63010089
ML
14062017-06-28 Martin Liska <mliska@suse.cz>
1407
1408 PR driver/79659
1409 * c.opt: Add IntegerRange to various options.
1410
3e2becc4
MP
14112017-06-26 Marek Polacek <polacek@redhat.com>
1412
1413 PR c/80116
1414 * c-common.h (warn_for_multistatement_macros): Declare.
1415 * c-warn.c: Include "c-family/c-indentation.h".
1416 (warn_for_multistatement_macros): New function.
1417 * c.opt (Wmultistatement-macros): New option.
1418 * c-indentation.c (guard_tinfo_to_string): No longer static.
1419 Change the parameter type to "enum rid". Handle RID_SWITCH.
1420 * c-indentation.h (guard_tinfo_to_string): Declare.
1421
2db9b7cd
MG
14222017-06-23 Marc Glisse <marc.glisse@inria.fr>
1423
1424 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1425
c3684b7b
MS
14262017-06-15 Martin Sebor <msebor@redhat.com>
1427
1428 PR c++/80560
1429 * c.opt (-Wclass-memaccess): New option.
1430
e72c4afd
BK
14312017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1432
1433 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1434
8a516588
MP
14352017-06-13 Marek Polacek <polacek@redhat.com>
1436
1437 PR objc/80949
1438 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1439 branches is null.
1440
45b2222a
ML
14412017-06-13 Martin Liska <mliska@suse.cz>
1442
1443 PR sanitize/78204
1444 * c-attribs.c (add_no_sanitize_value): New function.
1445 (handle_no_sanitize_attribute): Likewise.
1446 (handle_no_sanitize_address_attribute): Use the function.
1447 (handle_no_sanitize_thread_attribute): New function.
1448 (handle_no_address_safety_analysis_attribute): Use
1449 add_no_sanitize_value.
1450 (handle_no_sanitize_undefined_attribute): Likewise.
1451 * c-common.h: Declare new functions.
1452 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1453 (ubsan_instrument_shift): Likewise.
1454 (ubsan_instrument_bounds): Likewise.
1455 (ubsan_maybe_instrument_array_ref): Likewise.
1456 (ubsan_maybe_instrument_reference_or_call): Likewise.
1457
a01f151f
JM
14582017-06-11 Jason Merrill <jason@redhat.com>
1459
1460 * c-ada-spec.c, c-pragma.c: Use id_equal.
1461
3de4ac6d
MP
14622017-06-04 Marek Polacek <polacek@redhat.com>
1463
1464 PR c/80919
1465 * c-format.c (matching_type_p): Return false if any of the types
1466 requires structural equality.
1467
2474f48f
MS
14682017-06-02 Martin Sebor <msebor@redhat.com>
1469
1470 PR c/80892
1471 * c-warn.c (conversion_warning): Use -Wconversion for integer
1472 conversion and -Wfloat-conversion for floating one.
1473
40ffd95f
BE
14742017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1475
1476 * c.opt (Wsizeof-pointer-div): New warning option.
1477
3fa4634c
VR
14782017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1479
1480 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1481 (Wcatch-value=1): Enable by -Wall.
1482
f012c8ef
DM
14832017-05-30 David Malcolm <dmalcolm@redhat.com>
1484
1485 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1486 format_chars.
1487 * c.opt (fdiagnostics-show-template-tree): New option.
1488 (felide-type): New option.
1489
63dbcd13
VR
14902017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1491
1492 * c.opt (Wcatch-value=): New C++ warning flag.
1493
be136b5c
NS
14942017-05-24 Nathan Sidwell <nathan@acm.org>
1495
1496 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1497 const casts to avoid warning.
1498
3cd211af
MS
14992017-05-24 Martin Sebor <msebor@redhat.com>
1500
1501 PR c/80731
1502 * c-common.h (unsafe_conversion_p): Add a function argument.
1503 * c-common.c (unsafe_conversion_p): Same.
1504 Add type names and values to diagnostics.
1505 (scalar_to_vector): Adjust.
1506 * c-warn.c (constant_expression_error): Add a function argument.
1507 Add type names and values to diagnostics.
1508 (conversion_warning): Add a function argument.
1509 Add type names and values to diagnostics.
1510 (warnings_for_convert_and_check): Same.
1511
1ff7be5a
JM
15122017-05-19 Jason Merrill <jason@redhat.com>
1513
1514 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1515 enumerators.
1516
ff502317
BE
15172017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1518
1519 * c-format.c (locus): Move out of function scope,
1520 add GTY attribute.
1521
2a8a8d7b
NS
15222017-05-19 Nathan Sidwell <nathan@acm.org>
1523
1524 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1525 (c_common_parse_file): Remove class dump handling.
1526 (get_dump_info): Likewise.
1527
39aac208
RB
15282017-05-19 Richard Biener <rguenther@suse.de>
1529
1530 PR c++/80593
1531 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1532 to alias-set zero memory.
1533
6ecd2339
BE
15342017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1535
1536 * c-format.c (local_tree_type_node): Add GTY attribute.
1537
6574d78e
MP
15382017-05-18 Marek Polacek <polacek@redhat.com>
1539
1540 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1541 (c_common_fixed_point_type_for_size): Likewise.
1542 (c_common_type_for_mode): Likewise.
1543 (shorten_compare): Likewise.
1544 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1545 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1546
e3455240
MP
15472017-05-18 Marek Polacek <polacek@redhat.com>
1548
1549 * c-common.c (self_promoting_args_p): Change the return type to bool.
1550 Use false/true instead of 0/1.
1551 * c-common.h (self_promoting_args_p): Update.
1552
3fa8871b
MP
15532017-05-17 Marek Polacek <polacek@redhat.com>
1554
1555 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1556 * c-warn.c: Likewise.
1557
b42cc3ca
VV
15582017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1559
1560 Implement new C++ intrinsics __is_assignable and __is_constructible.
1561 * c-common.c (__is_assignable, __is_constructible): New.
1562 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1563
1a817418
ML
15642017-05-17 Martin Liska <mliska@suse.cz>
1565
1566 * c-common.h: Introduce dump_flags_t type and
1567 use it instead of int type.
1568 * c-gimplify.c (c_genericize): Likewise.
1569 * c-opts.c: Likewise.
1570
b2fa0a8b
MP
15712017-05-17 Marek Polacek <polacek@redhat.com>
1572
1573 * c-common.c (c_save_expr): Remove.
1574 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1575 * c-common.h (c_save_expr): Remove declaration.
1576
31c2d57d
VR
15772017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1578
1579 PR c/35441
1580 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1581 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1582 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1583 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1584 RDIV_EXPR.
1585 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1586
684f84de
MP
15872017-05-09 Marek Polacek <polacek@redhat.com>
1588
1589 PR c/80525
1590 * c-warn.c (unwrap_c_maybe_const): New.
1591 (warn_logical_operator): Call it.
1592
641da50a
NS
15932017-05-09 Nathan Sidwell <nathan@acm.org>
1594
1595 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1596 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1597
631238ac
MS
15982017-05-08 Martin Sebor <msebor@redhat.com>
1599
1600 PR translation/80280
1601 * c-format.h (struct format_flag_spec): Add new member.
1602 (T89_T): New macro.
1603 * c-format.c (local_tree_type_node): New global.
1604 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1605 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1606 (strfmon_flag_specs): Likewise.
1607 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1608 with distinct quoting properties.
1609 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1610 (flag_chars_t::validate): Add argument and handle bad quoting.
1611 (check_format_info_main): Handle quoting problems.
1612 (init_dynamic_diag_info): Simplify.
1613
49f0c04c
JM
16142017-05-08 Jason Merrill <jason@redhat.com>
1615
1616 * c-opts.c (c_common_post_options): Update defaults for
1617 flag_abi_version and flag_abi_compat_version.
1618
56d35585
DM
16192017-05-05 David Malcolm <dmalcolm@redhat.com>
1620
1621 * c-common.c (c_cpp_error): Replace report_diagnostic
1622 with diagnostic_report_diagnostic.
1623
0f2c4a8f
MS
16242017-05-04 Martin Sebor <msebor@redhat.com>
1625
1626 PR translation/80280
1627 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1628 (handle_weakref_attribute): Same.
1629
6fe63fb4
NS
16302017-05-03 Nathan Sidwell <nathan@acm.org>
1631
1632 Canonicalize canonical type hashing
1633 * c-common.c (complete_array_type): Use type_hash_canon.
1634
815d9cc6
XR
16352017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1636
1637 PR c++/80038
1638 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1639 prototype.
1640 (cilk_install_body_pedigree_operations): Likewise.
1641 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1642 detatched.
1643 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1644 (cilk_install_body_pedigree_operations): Likewise.
1645 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1646 unwrapping.
1647
f8a36447
JJ
16482017-04-27 Jakub Jelinek <jakub@redhat.com>
1649
1650 PR c++/80534
1651 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1652 flag on non-aggregate element types.
1653
7c145456
BE
16542017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1655
1656 * c-common.c (c_type_hasher, type_hash_table): Remove.
1657 (c_common_get_alias_set): Remove unreachable code.
1658 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1659
c3cbcd45
VR
16602017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1661
1662 * c.opt (Wextra-semi): New C++ warning flag.
1663
8a59d466
JJ
16642017-04-20 Jakub Jelinek <jakub@redhat.com>
1665
1666 PR middle-end/80423
1667 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1668
8487c9a5
JJ
16692017-04-18 Jakub Jelinek <jakub@redhat.com>
1670
1671 PR middle-end/79788
1672 PR middle-end/80375
1673 * c-common.c (c_common_type_for_mode): Don't handle
1674 widest_*_literal_type_node here.
1675 c_common_signed_or_unsigned_type): Likewise.
1676 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1677 to *intTI_type_node or *intDI_type_node depending on whether
1678 TImode is supported by the target or not.
1679
3ee0fb02
ML
16802017-04-10 Martin Liska <mliska@suse.cz>
1681
1682 PR sanitizer/80350
1683 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1684 doing an UBSAN check.
1685
5764ee3c
JW
16862017-04-03 Jonathan Wakely <jwakely@redhat.com>
1687
1688 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1689
6f3af356
JJ
16902017-03-31 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR c++/79572
1693 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1694 tree *.
1695 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1696 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1697 REFERENCE_TYPE.
1698
f6a7a9d5
DM
16992017-03-31 David Malcolm <dmalcolm@redhat.com>
1700
1701 PR documentation/78732
1702 * c.opt (Wendif-labels): Fix description to refer to
1703 #else rather than #elif.
1704
af88f557
JJ
17052017-03-31 Jakub Jelinek <jakub@redhat.com>
1706
1707 PR libstdc++/80251
1708 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1709 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1710
a9e4a1a5
JJ
17112017-03-27 Jakub Jelinek <jakub@redhat.com>
1712
1713 PR middle-end/80162
1714 * c-common.c (c_common_mark_addressable_vec): Don't set
1715 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1716
3f01b620
MS
17172017-03-21 Martin Sebor <msebor@redhat.com>
1718
1719 PR c++/79548
1720 * c-common.c (set_underlying_type): Mark type used only when
1721 original del is declared unused.
1722
2f6f187a
DM
17232017-03-10 David Malcolm <dmalcolm@redhat.com>
1724
1725 PR translation/79848
1726 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1727 "%qs".
1728
a02fa805
DM
17292017-03-10 David Malcolm <dmalcolm@redhat.com>
1730
1731 PR c/79921
1732 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1733 from inform's message, so that xgettext can locate it.
1734
822a132c
MP
17352017-03-09 Marek Polacek <polacek@redhat.com>
1736
1737 PR c++/79962
1738 PR c++/79984
1739 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1740 conversion to the attribute list.
1741
bba81f1c
ML
17422017-03-09 Martin Liska <mliska@suse.cz>
1743
1744 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1745
108154ff
JM
17462017-03-03 Jason Merrill <jason@redhat.com>
1747
1748 * c.opt (Wnoexcept-type): New.
1749
eb0e7c34
RB
17502017-03-02 Richard Biener <rguenther@suse.de>
1751
1752 PR c/79756
1753 * c-common.c (c_common_mark_addressable_vec): Look through
1754 C_MAYBE_CONST_EXPR.
1755
9453ba0a
ML
17562017-02-28 Martin Liska <mliska@suse.cz>
1757
1758 * c.opt: Replace space with tabular for options of <number>
1759 type.
1760
6a825afe
ML
17612017-02-28 Martin Liska <mliska@suse.cz>
1762
1763 * c.opt: Fix --help=option -Q for options which are of
1764 an enum type.
1765
4227c9ad
JJ
17662017-02-24 Jakub Jelinek <jakub@redhat.com>
1767
1768 PR c++/79588
1769 * c-common.c (check_function_restrict): New function.
1770 (check_function_arguments): Add FNDECL argument. Call
1771 check_function_restrict if -Wrestrict.
1772 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1773 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1774 * c-common.h (check_function_arguments): Add FNDECL argument.
1775 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1776
59909673
EB
17772017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1778
1779 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1780 treatment of parameters with pointer-to-tagged type and tidy up.
1781 (print_ada_methods): Remove the special treatment of C++ static member
1782 functions.
1783
54dcd526
ML
17842017-02-22 Martin Liska <mliska@suse.cz>
1785
1786 * c.opt: Replace inequality signs with square brackets
1787 for -Wnornalized.
1788
00bc9de3
JJ
17892017-02-21 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR c++/79641
1792 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1793 preserve quals.
1794
97fcf744
JM
17952017-02-17 Joseph Myers <joseph@codesourcery.com>
1796
1797 * c-cppbuiltin.c (builtin_define_float_constants): Define
1798 __DECIMAL_DIG__ to the value for long double.
1799
c7545f1c
MP
18002017-02-15 Marek Polacek <polacek@redhat.com>
1801
1802 PR c/79515
1803 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1804 conversion has occured.
1805
c2e84327
DM
18062017-01-24 David Malcolm <dmalcolm@redhat.com>
1807
1808 * c-common.c (c_common_reswords): Add "__RTL".
1809 * c-common.h (enum rid): Add RID_RTL.
1810
2ebd93e1
MP
18112017-01-20 Marek Polacek <polacek@redhat.com>
1812
1813 PR c/64279
1814 * c-common.h (do_warn_duplicated_branches_r): Declare.
1815 * c-gimplify.c (c_genericize): Walk the function tree calling
1816 do_warn_duplicated_branches_r.
1817 * c-warn.c (expr_from_macro_expansion_r): New.
1818 (do_warn_duplicated_branches): New.
1819 (do_warn_duplicated_branches_r): New.
1820 * c.opt (Wduplicated-branches): New option.
1821
0d80ab91
DM
18222017-01-17 David Malcolm <dmalcolm@redhat.com>
1823
1824 PR c++/71497
1825 * c-indentation.c (warn_for_misleading_indentation): Use the past
1826 subjunctive in the note.
1827
7f991c36
AH
18282017-01-17 Aldy Hernandez <aldyh@redhat.com>
1829
1830 PR c/79116
1831 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1832 start type to integer_type.
1833
1c70261c
JJ
18342017-01-16 Jakub Jelinek <jakub@redhat.com>
1835
1836 PR driver/49726
1837 * c.opt (gen-decls): Add Driver flag.
1838
1ddca3f3
PC
18392017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1840
1841 Revert:
1842 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1843
1844 PR c++/71737
1845 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1846
7d2f3f1d
PC
18472017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1848
1849 PR c++/71737
1850 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1851
bce6f760
MS
18522017-01-12 Martin Sebor <msebor@redhat.com>
1853
1854 (-Wformat-overflow): ...to this.
1855
bf5fbf46
MS
18562017-01-11 Martin Sebor <msebor@redhat.com>
1857
1858 PR c/78768
1859 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1860 Also enable for LTO.
1861
e363df3f
JM
18622017-01-10 Jason Merrill <jason@redhat.com>
1863
1864 Implement P0195R2, C++17 variadic using.
1865 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1866
bd2c6270
JJ
18672017-01-09 Jakub Jelinek <jakub@redhat.com>
1868
1869 PR translation/79019
1870 PR translation/79020
1871 * c.opt (Wnormalized=): Fix typo in description.
1872
efcc8d38
MS
18732017-01-08 Martin Sebor <msebor@redhat.com>
1874
1875 PR middle-end/77708
1876 * c.opt (-Wformat-truncation): New option.
1877
435f3f7a
AO
18782017-01-06 Alexandre Oliva <aoliva@redhat.com>
1879
1880 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1881 value to unsigned short to fit in 4 hex digits without
1882 warnings.
1883
4e89adf9
EB
18842017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1885
1886 * c.opt (fsso-struct): Add 'native' value.
1887
cd445b54
ML
18882017-01-05 Martin Liska <mliska@suse.cz>
1889
1890 PR pch/78970
1891 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1892 header.
1893
a9342885
MP
18942017-01-04 Marek Polacek <polacek@redhat.com>
1895
1896 PR c++/64767
1897 * c.opt (Wpointer-compare): New option.
1898
fc73e60c
JJ
18992017-01-04 Jakub Jelinek <jakub@redhat.com>
1900
1901 PR driver/78957
1902 * c.opt (fsso-struct=): Add RejectNegative.
1903
cbe34bb5
JJ
19042017-01-01 Jakub Jelinek <jakub@redhat.com>
1905
1906 Update copyright years.
1907
d4a6c0ea
ML
19082016-12-29 Martin Liska <mliska@suse.cz>
1909
1910 PR c/78933
1911 * c.opt (strong-eval-order): Add RejectNegative keyword.
1912
67a5ad7c
JM
19132016-12-22 Jason Merrill <jason@redhat.com>
1914
1915 Implement P0522R0, matching of template template arguments.
1916 * c-cppbuiltin.c (c_cpp_builtins): Define
1917 __cpp_template_template_args.
1918
0dba7960
JJ
19192016-12-21 Jakub Jelinek <jakub@redhat.com>
1920
1921 PR bootstrap/78817
1922 * c-common.c (struct nonnull_arg_ctx): New type.
1923 (check_function_nonnull): Return bool instead of void. Use
1924 nonnull_arg_ctx as context rather than just location_t.
1925 (check_nonnull_arg): Adjust for the new context type, set
1926 warned_p to true if a warning has been diagnosed.
1927 (check_function_arguments): Return bool instead of void.
1928 * c-common.h (check_function_arguments): Adjust prototype.
1929
31bfc9b9
JM
19302016-12-21 Jason Merrill <jason@redhat.com>
1931
1932 * c.opt (-fnew-ttp-matching): New flag.
1933 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1934
629b3d75
MJ
19352016-12-14 Martin Jambor <mjambor@suse.cz>
1936
1937 * c-omp.c: Include omp-general.h instead of omp-low.h.
1938 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1939 name.
1940
474da67e
MS
19412016-12-14 Martin Sebor <msebor@redhat.com>
1942
1943 PR c/17308
1944 * c-common.c (check_nonnull_arg): Disable when optimization
1945 is enabled.
1946
fe366b87
MP
19472016-12-12 Marek Polacek <polacek@redhat.com>
1948
1949 PR c++/78647
1950 * c-common.c (attribute_fallthrough_p): Return false for
1951 error_mark_node.
1952
8bd9f164
MS
19532016-12-08 Martin Sebor <msebor@redhat.com>
1954
1955 PR c/78284
1956 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1957
060162e0
MS
19582016-12-08 Martin Sebor <msebor@redhat.com>
1959
1960 PR c/78165
1d0cf89a
MS
1961 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1962 suffix.
060162e0 1963
ee92e7ba
MS
19642016-12-07 Martin Sebor <msebor@redhat.com>
1965
1966 PR c/53562
1967 PR middle-end/77784
1968 PR middle-end/78149
1969 PR middle-end/78138
1970 * c.opt (-Wstringop-overflow): New option.
1971
84b0769e
MO
19722016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
1973
1974 * c-attribs.c (asan odr indicator): New attribute.
1975 (handle_asan_odr_indicator_attribute): New function.
1976
7fa6a965
PK
19772016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1978
1979 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
1980 ptrdiff_type_node;
1981
56d8ffc1
JG
19822016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1983
1984 * c-common.c (excess_precision_mode_join): New.
1985 (c_ts18661_flt_eval_method): New.
1986 (c_c11_flt_eval_method): Likewise.
1987 (c_flt_eval_method): Likewise.
1988 * c-common.h (excess_precision_mode_join): New.
1989 (c_flt_eval_method): Likewise.
1990 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
1991 (cpp_iec_559_value): Call it.
1992 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
1993 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
1994 __FLT_EVAL_METHOD_TS_18661_3__.
1995
04f0fcf7
JG
19962016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1997
1998 * c-opts.c (c_common_post_options): Add logic to handle the default
1999 case for -fpermitted-flt-eval-methods.
2000
fb2675cb
PB
20012016-11-23 Paolo Bonzini <bonzini@gnu.org>
2002
2003 * c.opt (Wexpansion-to-defined): New.
2004
ec1c5694
JJ
20052016-11-23 Jakub Jelinek <jakub@redhat.com>
2006
2007 PR target/78451
2008 * c-pragma.c (handle_pragma_target): Don't replace
2009 current_target_pragma, but chainon the new args to the current one.
2010
730c9e75
NS
20112016-11-22 Nathan Sidwell <nathan@acm.org>
2012
2013 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2014 indentation and formatting.
730c9e75 2015
89990732
MS
20162016-11-21 Martin Sebor <msebor@redhat.com>
2017
2018 * c.opt (-fprintf-return-value): Enable by default.
2019
48330c93
BE
20202016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2021
2022 PR c++/71973
2023 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2024 * c-common.c (c_common_nodes_and_builtins): Initialize
2025 const_tm_ptr_type_node.
2026
0d939c95
MP
20272016-11-16 Marek Polacek <polacek@redhat.com>
2028
2029 PR c/78285
2030 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2031
8e745a17
JJ
20322016-11-14 Jakub Jelinek <jakub@redhat.com>
2033
2034 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2035
1ee62b92 20362016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2037 Richard Biener <rguenther@suse.de>
2038
2039 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2040 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2041 * c.opt (fgimple): New option.
1ee62b92 2042
22b15758
UB
20432016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2044
2045 PR c/35503
2046 * c-common.h (warn_for_restrict): Declare.
2047 * c-warn.c: Include gcc-rich-location.h.
2048 (warn_for_restrict): New function.
2049 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2050 (gcc_cdiag_char_table): Likewise.
2051 (gcc_cxxdiag_char_table): Likewise.
2052 * c.opt (Wrestrict): New option.
2053
4be719cd
EB
20542016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2055
2056 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2057 for nested types only if the type is a record or union and dump SLOC.
2058
4a826ca6
JM
20592016-11-09 Jason Merrill <jason@redhat.com>
2060
2061 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2062
2e955d50
JJ
20632016-11-09 Jakub Jelinek <jakub@redhat.com>
2064
2065 * c-ubsan.c (ubsan_instrument_shift): Handle split
2066 -fsanitize=shift-base and -fsanitize=shift-exponent.
2067
51dc6603
JM
20682016-11-07 Jason Merrill <jason@redhat.com>
2069
2070 * c.opt (Wc++1z-compat): New.
2071 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2072
6dc4a604
ML
20732016-11-07 Martin Liska <mliska@suse.cz>
2074
2075 * c-warn.c (warn_for_unused_label): Save all labels used
2076 in goto or in &label.
2077
b302001e
JM
20782016-11-03 Jason Merrill <jason@redhat.com>
2079
2080 * c-cppbuiltin.c (c_cpp_builtins): Correct
2081 __cpp_inheriting_constructors.
2082
31f7f784
JM
20832016-11-01 Jason Merrill <jason@redhat.com>
2084
2bc78e3c
JM
2085 * c-cppbuiltin.c (c_cpp_builtins): Update
2086 __cpp_inheriting_constructors.
2087
31f7f784
JM
2088 * c.opt (-fnew-inheriting-ctors): New.
2089 * c-opts.c: Default to on for ABI 11+.
2090
dcb466ec
JJ
20912016-10-31 Jakub Jelinek <jakub@redhat.com>
2092
2093 PR c++/77948
2094 * c.opt (fext-numeric-literals): Add Var and Init.
2095 * c-opts.c (c_common_handle_option): Don't clear
2096 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2097 (c_common_post_options): Clear it here if not set
2098 explicitly.
2099
52e1b91e
AH
21002016-10-28 Aldy Hernandez <aldyh@redhat.com>
2101
2102 PR debug/77773
2103 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2104 if NULL.
2105
e16f1cc7
JJ
21062016-10-25 Jakub Jelinek <jakub@redhat.com>
2107
2108 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2109 * c-common.c (c_common_reswords): Add __builtin_launder.
2110
f8348061
BE
21112016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2112
2113 * c-common.c (c_common_truthvalue_conversion): Warn for
2114 multiplications in boolean context. Fix the quoting of '<<' and '<'
2115 in the shift warning.
2116
eff89e01
BE
21172016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2118
2119 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2120
24bc7bf4
JM
21212016-10-20 Jason Merrill <jason@redhat.com>
2122
2123 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2124
4c712374
BE
21252016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2126
2127 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2128 integer shift ops in boolean context.
2129
21302016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2131
2132 * c.opt (Walloca): New.
2133 (Walloca-larger-than=): New.
2134 (Wvla-larger-than=): New.
2135
8fa18c06
MP
21362016-10-17 Marek Polacek <polacek@redhat.com>
2137
2138 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2139 Return immediately when finding a match.
2140 (warn_tautological_cmp): Remove a boolean variable that is no longer
2141 needed.
2142
b12b1915
MP
21432016-10-17 Marek Polacek <polacek@redhat.com>
2144
2145 * c-attribs.c: New file.
2146 * c-common.c: Move attributes handling to c-attribs.c.
2147 (get_nonnull_operand): No longer static.
2148 * c-common.h: Move the declarations from c-attribs.c to its own section.
2149
2045acd9
JM
21502016-10-14 Jason Merrill <jason@redhat.com>
2151
2152 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2153 and __cpp_deduction_guides.
2154
14a2c9aa
JM
21552016-10-13 Jason Merrill <jason@redhat.com>
2156
2157 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2158
4d0cdd0c
TP
21592016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2160
2161 * c-cppbuiltin.c: Include memmodel.h.
2162 * c-opts.c: Likewise.
2163 * c-pragma.c: Likewise.
2164 * c-warn.c: Likewise.
2165
70f6d5e1
JJ
21662016-10-12 Jakub Jelinek <jakub@redhat.com>
2167
2168 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2169 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2170 * c-opts.c (sanitize_cpp_opts): Initialize
2171 cpp_opts->cpp_warn_implicit_fallthrough.
2172
78f61294
MP
21732016-10-11 Marek Polacek <polacek@redhat.com>
2174
2175 * c-common.c (warning_candidate_p): Change the return type to bool
2176 and return true/false instead of 1/0.
2177 (vector_mode_valid_p): Likewise.
2178
038b5cc0
MP
21792016-10-11 Marek Polacek <polacek@redhat.com>
2180
2181 * c-common.c (fold_for_warn): No longer static.
2182 (bool_promoted_to_int_p): Likewise.
2183 (c_common_get_narrower): Likewise.
2184 (constant_expression_warning): Move to c-warn.c.
2185 (constant_expression_error): Likewise.
2186 (overflow_warning): Likewise.
2187 (warn_logical_operator): Likewise.
2188 (find_array_ref_with_const_idx_r): Likewise.
2189 (warn_tautological_cmp): Likewise.
2190 (expr_has_boolean_operands_p): Likewise.
2191 (warn_logical_not_parentheses): Likewise.
2192 (warn_if_unused_value): Likewise.
2193 (strict_aliasing_warning): Likewise.
2194 (sizeof_pointer_memaccess_warning): Likewise.
2195 (check_main_parameter_types): Likewise.
2196 (conversion_warning): Likewise.
2197 (warnings_for_convert_and_check): Likewise.
2198 (match_case_to_enum_1): Likewise.
2199 (match_case_to_enum): Likewise.
2200 (c_do_switch_warnings): Likewise.
2201 (warn_for_omitted_condop): Likewise.
2202 (readonly_error): Likewise.
2203 (lvalue_error): Likewise.
2204 (invalid_indirection_error): Likewise.
2205 (warn_array_subscript_with_type_char): Likewise.
2206 (warn_about_parentheses): Likewise.
2207 (warn_for_unused_label): Likewise.
2208 (warn_for_div_by_zero): Likewise.
2209 (warn_for_memset): Likewise.
2210 (warn_for_sign_compare): Likewise.
2211 (do_warn_double_promotion): Likewise.
2212 (do_warn_unused_parameter): Likewise.
2213 (record_locally_defined_typedef): Likewise.
2214 (maybe_record_typedef_use): Likewise.
2215 (maybe_warn_unused_local_typedefs): Likewise.
2216 (maybe_warn_bool_compare): Likewise.
2217 (maybe_warn_shift_overflow): Likewise.
2218 (warn_duplicated_cond_add_or_warn): Likewise.
2219 (diagnose_mismatched_attributes): Likewise.
2220 * c-common.h: Move the declarations from c-warn.c to its own section.
2221 * c-warn.c: New file.
2222
627be19f
JM
22232016-10-08 Jason Merrill <jason@redhat.com>
2224
2225 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2226 into COND_EXPR in C++.
2227
7bad794a
JJ
22282016-10-08 Jakub Jelinek <jakub@redhat.com>
2229
2230 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2231 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2232 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2233
be845b04
JJ
22342016-10-07 Jakub Jelinek <jakub@redhat.com>
2235
2236 Implement LWG2296 helper intrinsic
2237 * c-common.h (enum rid): Add RID_ADDRESSOF.
2238 * c-common.c (c_common_reswords): Add __builtin_addressof.
2239
c09c4992
BE
22402016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2241
2242 PR c++/77700
2243 * c-common.c (c_common_truthvalue_conversion): Warn also for
2244 suspicious enum values in boolean context.
2245
342cfb3e
JJ
22462016-10-06 Jakub Jelinek <jakub@redhat.com>
2247
2248 Implement P0258R2 - helper for C++17
2249 std::has_unique_object_representations trait
2250 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2251 * c-common.c (c_common_reswords): Add
2252 __has_unique_object_representations.
2253
2e69f143
JJ
22542016-10-05 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR sanitizer/66343
2257 * c-ubsan.c (ubsan_instrument_return): Don't call
2258 initialize_sanitizer_builtins here.
2259
700fff34
BE
22602016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2261
2262 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2263 conditional expression in boolean context when only one arm is
2264 non-boolean.
2265
9563bfcd
JJ
22662016-10-05 Jakub Jelinek <jakub@redhat.com>
2267
04a32443
JJ
2268 PR sanitizer/77823
2269 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2270 is not integral.
2271
9563bfcd
JJ
2272 * c-common.c (c_common_reswords): Update comment for C++11.
2273
f1644724
JM
22742016-10-04 Jason Merrill <jason@redhat.com>
2275
2276 * c-common.c (make_tree_vector_from_ctor): New.
2277 * c-common.h: Declare it.
2278
5a79befb
JJ
22792016-10-04 Jakub Jelinek <jakub@redhat.com>
2280
2281 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2282 __LIBGCC_JCR_SECTION_NAME__.
2283
1633d3b9
BE
22842016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2285
2286 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2287 left shift in boolean context.
2288
a2c6e7f2
JJ
22892016-09-29 Jakub Jelinek <jakub@redhat.com>
2290
2291 Implement P0001R1 - C++17 removal of register storage class specifier
2292 * c.opt (Wregister): New warning.
2293 * c-opts.c (c_common_post_options): Enable -Wregister by
2294 default for C++17.
2295
75304c87
JG
22962016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2297
2298 * c-opts.c (c_common_post_options): Remove special case for
2299 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2300 in C++.
2301
bbfac6da
JJ
23022016-09-27 Jakub Jelinek <jakub@redhat.com>
2303
6e39060a
JJ
2304 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2305 -std=c++1z.
2306
bbfac6da
JJ
2307 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2308
e73cf9a2
TP
23092016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2310
2311 * c-common.c: Include memmodel.h.
2312
c6147dc4
MP
23132016-09-26 Marek Polacek <polacek@redhat.com>
2314
2315 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2316
81fea426
MP
23172016-09-26 Marek Polacek <polacek@redhat.com>
2318
2319 PR c/7652
2320 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2321 (handle_fallthrough_attribute): New function.
2322 (attribute_fallthrough_p): New function.
2323 * c-common.h (attribute_fallthrough_p): Declare.
2324
9a2300e9
MP
23252016-09-24 Marek Polacek <polacek@redhat.com>
2326
2327 PR c/77490
2328 * c.opt (Wbool-operation): New.
2329
a09e9e35
BE
23302016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2331
2332 * c-common.c (c_common_truthvalue_conversion): Inhibit
2333 Wint-in-bool-context warning with from_macro_definition_at.
2334 Mention the expression will always evaluate to true.
2335
d43b4ccc
MS
23362016-09-21 Martin Sebor <msebor@redhat.com>
2337
2338 PR bootstrap/77676
2339 * c.opt (fprintf-return-value): Temporarily initialize to zero
2340 to unblock bootstrap failures.
2341
2e1c20b1
JJ
23422016-09-21 Jakub Jelinek <jakub@redhat.com>
2343
2344 PR c++/77651
2345 * c.opt (Waligned-new=): Add RejectNegative.
2346 (faligned-new=): Likewise. Spelling fix - change
2347 aligned_new_threshhold to aligned_new_threshold.
2348 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2349 to aligned_new_threshold.
2350
88d0c3f0
MS
23512016-09-20 Martin Sebor <msebor@redhat.com>
2352
2353 PR middle-end/49905
2354 * c.opt: Add -Wformat-length and -fprintf-return-value.
2355
144a96e4
BE
23562016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2357
2358 PR c++/77434
2359 * c.opt (Wint-in-bool-context): New warning.
2360 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2361 constants in boolean context.
2362
63012d9a
JM
23632016-09-19 Joseph Myers <joseph@codesourcery.com>
2364
2365 * c-common.c (max_align_t_align): Also consider alignment of
2366 float128_type_node.
2367
931388ce
JM
23682016-09-15 Jason Merrill <jason@redhat.com>
2369
2370 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2371 DECL_EXTERNAL.
2372
38711381
JM
23732016-09-14 Jason Merrill <jason@redhat.com>
2374
2375 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2376 limit FIELD_DECL, either.
2377
e51fbec3
MP
23782016-09-14 Marek Polacek <polacek@redhat.com>
2379
2380 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2381 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2382 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2383
254830ba
DM
23842016-09-13 David Malcolm <dmalcolm@redhat.com>
2385
2386 * c-common.c (warn_logical_not_parentheses): Replace
2387 rich_location::add_fixit_insert calls with add_fixit_insert_before
2388 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2389
42763690
JM
23902016-09-13 Jason Merrill <jason@redhat.com>
2391 Tom de Vries <tom@codesourcery.com>
2392
2393 PR c++/77427
2394 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2395
9453eee9
JM
23962016-09-13 Jason Merrill <jason@redhat.com>
2397
2398 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2399 limit types at all.
2400
e96809e3
JM
24012016-09-12 Jason Merrill <jason@redhat.com>
2402
2403 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2404 bit/byte confusion, allow large alignment for types.
2405
54dcdb88
BE
24062016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2407
2408 PR c++/77496
2409 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2410
d1463eb9
DM
24112016-09-12 David Malcolm <dmalcolm@redhat.com>
2412
2413 PR c/72858
2414 * c-format.c (argument_parser::check_argument_type): Add params
2415 "type_start" and "conversion_char". Use the former to generate
2416 offset_to_type_start and pass it and conversion_char to
2417 check_format_types.
2418 (check_format_info_main): Capture the start of the type
2419 information as "type_start", and pass it an format_char
2420 to arg_parser.check_argument_type.
2421 (check_format_types): Provide an example in the leading comment.
2422 Add params "offset_to_type_start" and "conversion_char"; pass
2423 them to format_type_warning calls.
2424 (test_get_modifier_for_format_len): Likewise.
2425 (matching_type_p): New function.
2426 (get_format_for_type): Add param "conversion_char" and move
2427 implementation into...
2428 (get_format_for_type_1): ...new function, called twice.
2429 Use new function matching_type_p rather than checking for
2430 TYPE_CANONICAL equality.
2431 (get_corrected_substring): New function.
2432 (format_type_warning): Provide an example in the leading comment.
2433 Add params "offset_to_type_start" and "conversion_char". Replace
2434 call to get_format_for_type with call to get_corrected_substring
2435 and move rejection of hints for widths/precisions there.
2436 (assert_format_for_type_streq): Add param "conversion_char".
2437 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2438 (test_get_format_for_type_printf): Add conversion chars to the
2439 tests, adding coverage for various combinations of integer
2440 vs double conversions, and for preserving octal and hexadecimal
2441 conversions.
2442 (test_get_format_for_type_scanf): Add conversion chars to the
2443 tests.
2444
5b28efbb
TV
24452016-09-10 Tom de Vries <tom@codesourcery.com>
2446
2447 PR C/71602
2448 * c-common.c (build_va_arg): Handle more strict
2449 targetm.canonical_va_list_type. Replace first argument type error with
2450 assert.
2451
3f0177e7
MS
24522016-09-09 Martin Sebor <msebor@redhat.com>
2453
2454 PR c/77520
2455 PR c/77521
2456 * c-format.c (argument_parser::find_format_char_info): Use %qc
2457 format directive unconditionally.
2458
af63ba4b
JM
24592016-09-09 Jason Merrill <jason@redhat.com>
2460
2461 Implement C++17 new of over-aligned types.
2462 * c.opt: Add -faligned-new and -Waligned-new.
2463 * c-common.c (max_align_t_align): Split out from...
2464 (cxx_fundamental_alignment_p): ...here.
2465 * c-common.h: Declare it.
2466 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2467
c65248cb
JM
24682016-09-09 Joseph Myers <joseph@codesourcery.com>
2469
2470 * c-cppbuiltin.c (builtin_define_type_width): New function.
2471 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2472 macros.
2473
e5106e27
DM
24742016-09-07 David Malcolm <dmalcolm@redhat.com>
2475
2476 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2477 a POINTER_TYPE.
2478 (substring_loc::get_location): Move to substring-locations.c,
2479 keeping implementation as...
2480 (c_get_substring_location): New function, from the above, reworked
2481 to use accessors rather than member lookup.
2482 * c-common.h (class substring_loc): Move to substring-locations.h,
2483 replacing with a forward decl.
2484 (c_get_substring_location): New decl.
2485 * c-format.c: Include "substring-locations.h".
2486 (format_warning_va): Move to substring-locations.c.
2487 (format_warning_at_substring): Likewise.
2488
a42e7952
MS
24892016-09-06 Martin Sebor <msebor@redhat.com>
2490
2491 PR c/77336
2492 * c-format.c (check_function_format): Avoid issuing warnings for
2493 functions unless they call format functions with non-constant
2494 format strings.
2495
b772a565
RB
24962016-09-06 Richard Biener <rguenther@suse.de>
2497
2498 PR c/77450
2499 * c-common.c (c_common_mark_addressable_vec): Handle
2500 COMPOUND_LITERAL_EXPR.
2501
25ff5dd3
MP
25022016-09-05 Marek Polacek <polacek@redhat.com>
2503
2504 PR c/77423
2505 * c-common.c (bool_promoted_to_int_p): New function.
2506 (expr_has_boolean_operands_p): New function.
2507 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2508 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2509
21234eb5
TV
25102016-09-04 Tom de Vries <tom@codesourcery.com>
2511
2512 revert:
2513 2016-08-29 Tom de Vries <tom@codesourcery.com>
2514
2515 * c-common.c (build_va_arg): Replace first argument type error
2516 with assert.
2517
9dc5773f
JJ
25182016-09-02 Jakub Jelinek <jakub@redhat.com>
2519
2520 PR c/65467
2521 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2522 (c_finish_omp_for): Reject _Atomic qualified iterators.
2523
25242016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
2525
2526 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2527 size to guarantee it fits the output of the formatted function
2528 regardless of its arguments.
2529
295844f6
MP
25302016-09-01 Marek Polacek <polacek@redhat.com>
2531
2532 PR c/7652
2533 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2534 FALLTHRU comments.
2535
3d06b6f2
MP
25362016-08-29 Marek Polacek <polacek@redhat.com>
2537
2538 PR c/77292
2539 * c-common.c (warn_logical_not_parentheses): Don't warn for
2540 a comparison or a logical operator.
2541
34cedad5
TV
25422016-08-29 Tom de Vries <tom@codesourcery.com>
2543
2544 * c-common.c (build_va_arg): Fix type comparison assert.
2545
f162d717
TV
25462016-08-29 Tom de Vries <tom@codesourcery.com>
2547
2548 * c-common.c (build_va_arg): Replace first argument type error
2549 with assert.
2550
ba9bbd6f
TV
25512016-08-29 Tom de Vries <tom@codesourcery.com>
2552
2553 PR c/77398
2554 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2555 with error_mark_node as va_list instead of with illegal va_list.
2556
ebef225f
MP
25572016-08-25 Marek Polacek <polacek@redhat.com>
2558 David Malcolm <dmalcolm@redhat.com>
2559
2560 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2561 * c-common.h (warn_logical_not_parentheses): Update declaration.
2562
b00e6e75
MP
25632016-08-22 Marek Polacek <polacek@redhat.com>
2564
2565 PR c++/77321
2566 * c-common.c (warn_for_memset): Check type for null.
2567
6dc198e3
JM
25682016-08-22 Joseph Myers <joseph@codesourcery.com>
2569
14ec014e 2570 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
2571 _FloatNx types for suffixes for built-in functions.
2572
c65699ef
JM
25732016-08-19 Joseph Myers <joseph@codesourcery.com>
2574
2575 PR c/32187
2576 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2577 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2578 (RID_FLOAT128X): New enum rid values.
2579 (CASE_RID_FLOATN_NX): New macro.
2580 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2581 keywords.
2582 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2583 corresponding complex types.
2584 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2585 _FloatNx and corresponding complex types.
2586 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2587 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2588 and _FloatNx types for the widest type for determining
2589 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2590 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2591 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2592 and _FloatNx types.
2593 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2594 constants.
2595 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2596 _FloatNx types.
2597
cc015f3a
DM
25982016-08-18 David Malcolm <dmalcolm@redhat.com>
2599
2600 * c-opts.c (c_diagnostic_finalizer): Update for change to
2601 diagnostic_show_locus.
2602
cb18fd07
DM
26032016-08-18 David Malcolm <dmalcolm@redhat.com>
2604
2605 * c-common.c: Include "spellcheck.h".
2606 (cb_get_suggestion): New function.
2607 * c-common.h (cb_get_suggestion): New decl.
2608 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2609 cb_get_suggestion.
2610
a76989dc
MP
26112016-08-18 Marek Polacek <polacek@redhat.com>
2612
2613 PR c/71514
2614 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2615 and pointer-to-VLA.
2616
65e736c0
DM
26172016-08-16 David Malcolm <dmalcolm@redhat.com>
2618
2619 PR c/72857
2620 * c-common.c (substring_loc::get_range): Rename to...
2621 (substring_loc::get_location): ...this, converting param from a
2622 source_range * to a location_t *. Call
2623 get_source_location_for_substring rather than
2624 get_source_range_for_substring, and pass in m_caret_idx.
2625 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2626 (substring_loc::get_range): Replace with...
2627 (substring_loc::get_location): ...this.
2628 (substring_loc::set_caret_index): New method.
2629 (substring_loc): Add field m_caret_idx.
2630 * c-format.c (format_warning_va): Update for above changes.
2631 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2632 clashing with type name.
2633 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2634 (check_argument_type): Likewise.
2635 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2636 Use a copy when emitting warnings, setting the caret index from TYPE.
2637
7e1dde14 26382016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 2639 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
2640
2641 * c-ada-spec.c (dump_number): New function.
2642 (handle_escape_character): Likewise.
2643 (print_ada_macros): Add handling of constant integers and strings.
2644
191816a3
MP
26452016-08-12 Marek Polacek <polacek@redhat.com>
2646
2647 PR c/7652
2648 * c-common.c (scalar_to_vector): Adjust fall through comment.
2649 * c-opts.c (c_common_handle_option): Likewise.
2650 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2651 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2652 fall through comment.
2653 * cilk.c (extract_free_variables): Add FALLTHRU.
2654
452df4a4
JM
26552016-08-10 Jason Merrill <jason@redhat.com>
2656
2657 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2658
f3365c12
JM
26592016-08-09 Jason Merrill <jason@redhat.com>
2660
2661 * c-common.c (c_common_attribute_table): vector_size affects type
2662 identity.
2663
f0bc3323
MP
26642016-08-09 Marek Polacek <polacek@redhat.com>
2665
2666 PR c/7652
2667 * c-ada-spec.c (dump_generic_ada_node): Add return.
2668
98e5a19a
JM
26692016-08-09 Jason Merrill <jason@redhat.com>
2670
2671 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2672 C++17 constexpr lambdas.
2673
895aa8e1
DM
26742016-08-08 David Malcolm <dmalcolm@redhat.com>
2675
2676 PR c/64955
2677 * c-common.h (selftest::c_format_c_tests): New declaration.
2678 (selftest::run_c_tests): New declaration.
2679 * c-format.c: Include "selftest.h.
2680 (format_warning_va): Add param "corrected_substring" and use
2681 it to add a replacement fix-it hint.
2682 (format_warning_at_substring): Likewise.
2683 (format_warning_at_char): Update for new param of
2684 format_warning_va.
2685 (argument_parser::check_argument_type): Pass "fki" to
2686 check_format_types.
2687 (check_format_types): Add param "fki" and pass it to
2688 format_type_warning.
2689 (deref_n_times): New function.
2690 (get_modifier_for_format_len): New function.
2691 (selftest::test_get_modifier_for_format_len): New function.
2692 (get_format_for_type): New function.
2693 (format_type_warning): Add param "fki" and use it to attempt
2694 to provide hints for argument types when calling
2695 format_warning_at_substring.
2696 (selftest::get_info): New function.
2697 (selftest::assert_format_for_type_streq): New function.
2698 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2699 (selftest::test_get_format_for_type_printf): New function.
2700 (selftest::test_get_format_for_type_scanf): New function.
2701 (selftest::c_format_c_tests): New function.
2702
e52ed3fe
DM
27032016-08-08 David Malcolm <dmalcolm@redhat.com>
2704
2705 PR c/52952
2706 * c-format.c: Include "diagnostic.h".
2707 (location_column_from_byte_offset): Delete.
2708 (location_from_offset): Delete.
2709 (format_warning_va): New function.
2710 (format_warning_at_substring): New function.
2711 (format_warning_at_char): New function.
2712 (check_format_arg): Capture location of format_tree and pass to
2713 check_format_info_main.
2714 (argument_parser): Add fields "start_of_this_format" and
2715 "format_string_cst".
2716 (flag_chars_t::validate): Add param "format_string_cst". Convert
2717 warning_at call using location_from_offset to call to
2718 format_warning_at_char.
2719 (argument_parser::argument_parser): Add param "format_string_cst_"
2720 and use use it to initialize field "format_string_cst".
2721 Initialize new field "start_of_this_format".
2722 (argument_parser::read_format_flags): Convert warning_at call
2723 using location_from_offset to a call to format_warning_at_char.
2724 (argument_parser::read_any_format_left_precision): Likewise.
2725 (argument_parser::read_any_format_precision): Likewise.
2726 (argument_parser::read_any_other_modifier): Likewise.
2727 (argument_parser::find_format_char_info): Likewise, in three places.
2728 (argument_parser::parse_any_scan_set): Likewise, in one place.
2729 (argument_parser::handle_conversions): Likewise, in two places.
2730 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2731 and use it to make a substring_loc. Pass the latter to
2732 check_format_types.
2733 (check_format_info_main): Add params "fmt_param_loc" and
2734 "format_string_cst". Convert warning_at calls using
2735 location_from_offset to calls to format_warning_at_char. Pass the
2736 new params to the arg_parser ctor. Pass "format_string_cst" to
2737 flag_chars.validate. Pass "fmt_param_loc" to
2738 arg_parser.check_argument_type.
2739 (check_format_types): Convert first param from a location_t
2740 to a const substring_loc & and rename to "fmt_loc". Attempt
2741 to extract the range of the relevant parameter and pass it
2742 to format_type_warning.
2743 (format_type_warning): Convert first param from a location_t
2744 to a const substring_loc & and rename to "fmt_loc". Add
2745 params "param_range" and "type". Replace calls to warning_at
2746 with calls to format_warning_at_substring.
2747
1c4d457e
DM
27482016-08-08 David Malcolm <dmalcolm@redhat.com>
2749
2750 * c-format.c (class flag_chars_t): New class.
2751 (struct length_modifier): New struct.
2752 (class argument_parser): New class.
2753 (flag_chars_t::flag_chars_t): New ctor.
2754 (flag_chars_t::has_char_p): New method.
2755 (flag_chars_t::add_char): New method.
2756 (flag_chars_t::validate): New method.
2757 (flag_chars_t::get_alloc_flag): New method.
2758 (flag_chars_t::assignment_suppression_p): New method.
2759 (argument_parser::argument_parser): New ctor.
2760 (argument_parser::read_any_dollar): New method.
2761 (argument_parser::read_format_flags): New method.
2762 (argument_parser::read_any_format_width): New method.
2763 (argument_parser::read_any_format_left_precision): New method.
2764 (argument_parser::read_any_format_precision): New method.
2765 (argument_parser::handle_alloc_chars): New method.
2766 (argument_parser::read_any_length_modifier): New method.
2767 (argument_parser::read_any_other_modifier): New method.
2768 (argument_parser::find_format_char_info): New method.
2769 (argument_parser::validate_flag_pairs): New method.
2770 (argument_parser::give_y2k_warnings): New method.
2771 (argument_parser::parse_any_scan_set): New method.
2772 (argument_parser::handle_conversions): New method.
2773 (argument_parser::check_argument_type): New method.
2774 (check_format_info_main): Introduce classes argument_parser
2775 and flag_chars_t, moving the code within the loop into methods
2776 of these classes. Make various locals "const".
2777
88fa5555
DM
27782016-08-05 David Malcolm <dmalcolm@redhat.com>
2779
2780 * c-common.c: Include "substring-locations.h".
2781 (get_cpp_ttype_from_string_type): New function.
2782 (g_string_concat_db): New global.
2783 (substring_loc::get_range): New method.
2784 * c-common.h (g_string_concat_db): New declaration.
2785 (class substring_loc): New class.
2786 * c-lex.c (lex_string): When concatenating strings, capture the
2787 locations of all tokens using a new obstack, and record the
2788 concatenation locations within g_string_concat_db.
2789 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2790 on the ggc-heap.
2791
78169471
MP
27922016-07-29 Marek Polacek <polacek@redhat.com>
2793
638fc14f
MP
2794 PR c/71926
2795 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2796 parentheses warning.
2797
78169471
MP
2798 PR c/71574
2799 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2800
1225d6b1
ML
28012016-07-28 Martin Liska <mliska@suse.cz>
2802
2803 PR gcov-profile/68025
2804 * c-common.c (handle_no_profile_instrument_function_attribute):
2805
ec1e2a40
BE
28062016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2807
2808 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2809 BITS_PER_UNIT_LOG.
2810
5ec2cd9f
JM
28112016-07-25 Jason Merrill <jason@redhat.com>
2812
2813 PR c++/65970
2814 * c.opt (fconstexpr-loop-limit): New.
2815
9dc5773f 28162016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
2817
2818 PR c++/71675
2819 * c-common.c (resolve_overloaded_builtin): Avoid converting
2820 __atomic_compare_exchange_n return type to that of what its
2821 first argument points to.
2822
e3fe09c1
UB
28232016-07-22 Uros Bizjak <ubizjak@gmail.com>
2824
2825 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2826 ~(unsigned HOST_WIDE_INT) 0.
2827
bc91c436
ML
28282016-07-22 Martin Liska <mliska@suse.cz>
2829
2830 PR gcov-profile/69028
2831 PR gcov-profile/62047
2832 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2833 to the current_function_decl.
2834
451dcc66
JM
28352016-07-21 Jason Merrill <jason@redhat.com>
2836
2837 PR c++/65168
2838 * c-common.c (c_common_truthvalue_conversion): Check
2839 c_inhibit_evaluation_warnings for warning about address of
2840 reference.
2841
de6a69ee
DM
28422016-07-20 David Malcolm <dmalcolm@redhat.com>
2843
2844 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2845 const char *.
2846
d022c55a
JM
28472016-07-15 Jason Merrill <jason@redhat.com>
2848
2849 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2850
ddbbcb19
JJ
28512016-07-15 Jakub Jelinek <jakub@redhat.com>
2852
2853 PR c/71858
2854 * c-common.h (enum lookup_name_fuzzy_kind): Add
2855 FUZZY_LOOKUP_FUNCTION_NAME.
2856
d0cf395a
JM
28572016-07-08 Jason Merrill <jason@redhat.com>
2858
2859 P0145: Refining Expression Order for C++.
2860 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2861 * c-opts.c: Adjust.
2862
98d44e93
MT
28632016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2864
2865 PR c++/71214
2866 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2867
f9d8d994
TS
28682016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2869
2870 * c-pragma.h (enum pragma_kind): Rename
2871 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2872 users.
2873
4aa83879
RB
28742016-06-29 Richard Biener <rguenther@suse.de>
2875
2876 PR middle-end/71002
2877 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2878
a25bd9e6
JM
28792016-06-24 Jason Merrill <jason@redhat.com>
2880
2881 P0145R2: Refining Expression Order for C++.
2882 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2883 MODIFY_EXPR.
2884
a86451b9
JJ
28852016-06-24 Jakub Jelinek <jakub@redhat.com>
2886
2887 * c-common.c (check_builtin_function_arguments): Require last
2888 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2889 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2890 if the last argument is pointer to enumerated or boolean type.
2891
1a4f11c8
DM
28922016-06-22 David Malcolm <dmalcolm@redhat.com>
2893
2894 PR c/70339
2895 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2896 (lookup_name_fuzzy): New prototype.
2897
fe55692c
JDA
28982016-06-21 John David Anglin <danglin@gcc.gnu.org>
2899
2900 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2901
4eb24e01
JM
29022016-06-14 Jason Merrill <jason@redhat.com>
2903
2904 P0145R2: Refining Expression Order for C++.
2905 * c.opt (fargs-in-order): New.
2906 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2907
ef7cf206
JJ
29082016-06-13 Jakub Jelinek <jakub@redhat.com>
2909
0dda258b
JJ
2910 PR sanitizer/71498
2911 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2912 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2913
ef7cf206
JJ
2914 PR preprocessor/71183
2915 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2916 to cb_get_source_date_epoch.
2917
50b15873
JJ
29182016-06-10 Jakub Jelinek <jakub@redhat.com>
2919
2920 PR c/68657
2921 * c.opt (Wpsabi): Add Warning flag.
2922
4d926e34
MS
29232016-06-10 Martin Sebor <msebor@redhat.com>
2924
2925 PR c/71392
14ec014e 2926 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
2927 the nonnull attribute in type-generic builtins.
2928
e01b4e16
MS
29292016-06-09 Martin Sebor <msebor@redhat.com>
2930
2931 PR c/70883
2932 * c-common.c (builtin_function_validate_nargs): Make text of error
2933 message consistent with others like it.
2934
44a845ca
MS
29352016-06-08 Martin Sebor <msebor@redhat.com>
2936 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR c++/70507
2939 PR c/68120
2940 * c-common.c (check_builtin_function_arguments): Handle
2941 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2942
a80a7051
RB
29432016-06-08 Richard Biener <rguenther@suse.de>
2944
2945 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2946
bfd67b47
RB
29472016-06-07 Richard Biener <rguenther@suse.de>
2948
2949 PR c/61564
2950 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2951 options and warn about others.
2952
15c98b2e
ES
29532016-06-01 Eduard Sanou <dhole@openmailbox.org>
2954
2955 * c-common.c (get_source_date_epoch): Rename to
2956 cb_get_source_date_epoch.
2957 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2958 message when the parsing fails. Use error_at instead of fatal_error.
2959 * c-common.h (get_source_date_epoch): Rename to
2960 cb_get_source_date_epoch.
2961 * c-common.h (cb_get_source_date_epoch): Prototype.
2962 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2963 * c-common.h (c_omp_region_type): Remove trailing comma.
2964 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2965 * c-lex.c (c_lex_with_flags): Remove initialization of
2966 pfile->source_date_epoch.
2967
00631022
JJ
29682016-05-30 Jakub Jelinek <jakub@redhat.com>
2969
2970 PR c++/71349
2971 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2972 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
2973 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
2974 instead of C_OMP_CLAUSE_SPLIT_FOR.
2975
f17a223d
RB
29762016-05-24 Richard Biener <rguenther@suse.de>
2977
2978 PR middle-end/70434
2979 PR c/69504
2980 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
2981 (convert_vector_to_array_for_subscript): ... this.
2982 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
2983 VIEW_CONVERT_EXPR to an array type. Rename to ...
2984 (convert_vector_to_array_for_subscript): ... this.
2985
4f2e1536
MP
29862016-05-12 Marek Polacek <polacek@redhat.com>
2987
2988 PR c/70756
2989 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
2990 size_in_bytes and pass LOC to it.
2991
d6e83a8d
MM
29922016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2993
2994 PR c/43651
2995 * c.opt (Wduplicate-decl-specifier): New option.
2996
5c3a10fb
MP
29972016-05-11 Marek Polacek <polacek@redhat.com>
2998
2999 PR c++/71024
3000 * c-common.c (diagnose_mismatched_attributes): New function.
3001 * c-common.h (diagnose_mismatched_attributes): Declare.
3002
deef7113
MP
30032016-05-04 Marek Polacek <polacek@redhat.com>
3004
3005 * c.opt (Wdangling-else): New option.
3006
79ce98bc
MP
30072016-05-03 Marek Polacek <polacek@redhat.com>
3008
3009 PR c/70859
3010 * c-common.c (builtin_function_validate_nargs): Add location
3011 parameter. Use it.
3012 (check_builtin_function_arguments): Add location and arguments
3013 parameters. Use them.
3014 * c-common.h (check_builtin_function_arguments): Update declaration.
3015
381cdae4
RB
30162016-05-03 Richard Biener <rguenther@suse.de>
3017
3018 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3019 allow call args to gimplify to SSA names.
3020
1d793c34
MP
30212016-05-03 Marek Polacek <polacek@redhat.com>
3022
3023 * c-common.h (enum c_omp_region_type): Remove stray comma.
3024
77886428
CP
30252016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3026
3027 * c-common.h (enum c_omp_region_type): Define.
3028
697e0b28
RS
30292016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3030
3031 * c-common.c (shorten_compare): Use wi::to_wide.
3032
e7ff0319
CP
30332016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3034
3035 PR middle-end/70626
3036 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3037 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3038 reduction clauses in acc parallel loops.
3039
2fff3db8
MP
30402016-04-29 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/70852
3043 * c-common.c (warn_for_memset): Check domain before accessing it.
3044
509063eb
DV
30452016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3046
3047 PR/69089
3048 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3049 "aligned" attribute.
3050
b632761d
JM
30512016-04-28 Jason Merrill <jason@redhat.com>
3052
3053 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3054
174f6622
ES
30552016-04-28 Eduard Sanou <dhole@openmailbox.org>
3056 Matthias Klose <doko@debian.org>
3057
3058 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3059 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3060 handling.
3061 * c-common.h (get_source_date_epoch): Prototype.
3062 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3063
6bc2bb18
RB
30642015-04-27 Ryan Burn <contact@rnburn.com>
3065
3066 PR c++/69024
3067 PR c++/68997
3068 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3069 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3070 external linkage.
3071 (cilk_detect_and_unwrap): Corresponding changes.
3072 (extract_free_variables): Don't extract free variables from
3073 AGGR_INIT_EXPR slot.
3074 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3075 (cilk_recognize_spawn): Likewise.
3076
c1e1f433
BS
30772016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3078
3079 * c.opt (Wmemset-elt-size): New option.
3080 * c-common.c (warn_for_memset): New function.
3081 * c-common.h (warn_for_memset): Declare.
3082
d067e05f
JM
30832016-04-25 Jason Merrill <jason@redhat.com>
3084
3085 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3086 No longer static.
3087 * c-common.h: Declare it.
3088 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3089
9aa36ae5
JM
30902016-04-22 Jason Merrill <jason@redhat.com>
3091
3092 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3093
477d4906
IV
30942016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3095
3096 PR c++/69363
3097 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3098 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3099
fe37c7af
MM
31002016-04-18 Michael Matz <matz@suse.de>
3101
3102 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3103 and SET_DECL_ALIGN.
3104
23f2660f
EB
31052016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3106
3107 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3108 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3109 to incomplete types.
3110 (dump_nested_type): Remove redundant tests and tidy up.
3111 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3112 a type which is the typedef of an original type.
3113
1e77281b
MP
31142016-04-15 Marek Polacek <polacek@redhat.com>
3115
3116 PR c/70651
3117 * c-common.c (build_va_arg): Change two asserts into errors and return
3118 error_mark_node.
3119
b3a77f21
MP
31202016-04-13 Marek Polacek <polacek@redhat.com>
3121
3122 PR c++/70639
3123 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3124 for switch statements, too.
3125
322b8466
JM
31262016-03-28 Jason Merrill <jason@redhat.com>
3127
3128 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3129
fbdb6baf
MP
31302016-03-23 Marek Polacek <polacek@redhat.com>
3131
3132 PR c++/69884
3133 * c.opt (Wignored-attributes): New option.
3134
5c240f4d
DM
31352016-03-22 David Malcolm <dmalcolm@redhat.com>
3136
3137 PR c/69993
3138 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3139 diagnostic text, reversing the order of the warning and note so
3140 that they appear in source order.
3141
14ba7b28
MP
31422016-03-17 Marek Polacek <polacek@redhat.com>
3143
3144 PR c/69407
3145 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3146 operations.
3147
08a1cadc
JM
31482016-03-14 Jason Merrill <jason@redhat.com>
3149
2aaeea19
JM
3150 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3151
08a1cadc
JM
3152 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3153
c06d25bb
RB
31542016-03-09 Richard Biener <rguenther@suse.de>
3155
3156 PR c/70143
3157 * c-common.c (strict_aliasing_warning): Add back
3158 alias_sets_conflict_p check.
3159
80aac5c8
JM
31602016-03-08 Jason Merrill <jason@redhat.com>
3161
3162 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3163
64b23c13
DM
31642016-03-04 David Malcolm <dmalcolm@redhat.com>
3165
3166 PR c/68187
3167 * c-indentation.c (get_visual_column): Move code to determine next
3168 tab stop to...
3169 (next_tab_stop): ...this new function.
3170 (line_contains_hash_if): Delete function.
3171 (detect_preprocessor_logic): Delete function.
3172 (get_first_nws_vis_column): New function.
3173 (detect_intervening_unindent): New function.
3174 (should_warn_for_misleading_indentation): Replace call to
3175 detect_preprocessor_logic with a call to
3176 detect_intervening_unindent.
3177
729526f5
DM
31782016-03-04 David Malcolm <dmalcolm@redhat.com>
3179
3180 PR c/68187
3181 * c-indentation.c (should_warn_for_misleading_indentation): When
3182 suppressing warnings about cases where the guard and body are on
3183 the same column, only use the first non-whitespace column in place
3184 of the guard token column when dealing with "else" clauses.
3185 When rejecting aligned BODY and NEXT, loosen the requirement
3186 from equality with the first non-whitespace of guard to simply
3187 that they not be indented relative to it.
3188
e9a35493
RB
31892016-03-04 Richard Biener <rguenther@suse.de>
3190
3191 PR c++/70054
3192 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3193 instead of alias_sets_conflict_p.
3194
1be56bc5
MP
31952016-03-01 Marek Polacek <polacek@redhat.com>
3196
3197 PR c++/69795
3198 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3199 any DECL.
3200
35886f0b
MS
32012016-02-22 Martin Sebor <msebor@redhat.com>
3202
3203 PR middle-end/69780
3204 * c-common.c (check_builtin_function_arguments): Validate and
3205 reject invalid arguments to __builtin_alloca_with_align.
3206
4246c8da
MW
32072016-02-20 Mark Wielaard <mjw@redhat.com>
3208
3209 PR c/28901
3210 * c.opt (Wunused-const-variable): Turn into Alias for...
3211 (Wunused-const-variable=): New option.
3212
268be88c
BE
32132016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3214
3215 PR c++/69865
3216 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3217 here...
3218 (c_common_init_options): ...to here.
3219 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3220
871b3f47
JJ
32212016-02-19 Jakub Jelinek <jakub@redhat.com>
3222
3223 PR c++/69826
3224 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3225 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3226 flag_preprocess_only.
3227
bf14eba2
JJ
32282016-02-16 Jakub Jelinek <jakub@redhat.com>
3229
3230 PR c/69835
3231 * c.opt (Wnonnull-compare): Enable for -Wall.
3232
ba6b3795
JJ
32332016-02-15 Jakub Jelinek <jakub@redhat.com>
3234
3235 PR c++/69797
3236 * c-common.c (sync_resolve_size): Diagnose too few arguments
3237 even when params is non-NULL empty vector.
3238
a011cd92
BS
32392016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3240
3241 PR target/60410
3242 * c.opt (fshort-double): Remove.
3243
46cb9332
MS
32442016-02-05 Martin Sebor <msebor@redhat.com>
3245
3246 PR c++/69662
3247 * c.opt (Warning options): Update -Wplacement-new to take
3248 an optional argument.
3249
e1b81f2b
JJ
32502016-02-01 Jakub Jelinek <jakub@redhat.com>
3251
3252 PR preprocessor/69543
3253 PR c/69558
3254 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3255 instead of loc to control_warning_option.
3256
b6adbb9f
NS
32572016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3258
3259 * c.opt (fopenacc-dim=): New option.
3260
5d70666e
RB
32612016-01-27 Ryan Burn <contact@rnburn.com>
3262
3263 PR cilkplus/69267
3264 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3265 gimplify_arg. Removed superfluous post_p argument.
3266 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3267 superfluous post_p argument.
3268 * c-gimplify.c (c_gimplify_expr): Likewise.
3269
01e1dea3
DM
32702016-01-26 David Malcolm <dmalcolm@redhat.com>
3271
3272 PR other/69006
3273 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3274 pp_newline_and_flush with pp_flush.
3275
9f04a53e
MS
32762016-01-20 Martin Sebor <msebor@redhat.com>
3277
3278 PR c/69405
3279 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3280 an incompatible argument when the argument isn't a valid tree node.
3281
7f26f7df
JM
32822016-01-18 Jason Merrill <jason@redhat.com>
3283
3284 PR c++/68767
3285 * c-common.c (check_function_arguments_recurse): Fold the whole
3286 COND_EXPR, not just the condition.
3287
f62bf092
TV
32882016-01-18 Tom de Vries <tom@codesourcery.com>
3289
3290 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3291 classify as loop clause.
3292
e0a575ff
JJ
32932016-01-15 Jakub Jelinek <jakub@redhat.com>
3294
3295 PR bootstrap/68271
3296 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3297 C++ FE no longer has limit on number of pragmas.
3298
32992015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
3300
3301 PR c++/69048
3302 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 3303 to add missing cleanup point.
b6e3db06 3304
c7df95d8
DM
33052016-01-14 David Malcolm <dmalcolm@redhat.com>
3306
3307 PR c++/68819
3308 * c-indentation.c (get_visual_column): Add location_t param.
3309 Handle the column number being zero by effectively disabling the
3310 warning, with an "inform".
3311 (should_warn_for_misleading_indentation): Add location_t argument
3312 for all uses of get_visual_column.
3313
21efdd80
PP
33142016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3315
3316 PR c++/69029
3317 * c-indentation.c (should_warn_for_misleading_indentation):
3318 Don't warn about do-while statements.
3319
7a127fa7
MS
33202016-01-07 Martin Sebor <msebor@redhat.com>
3321
3322 PR c/68966
3323 * c-common.c (sync_resolve_size): Reject first argument when it's
3324 a pointer to _Bool.
3325
c589e975
DM
33262016-01-05 David Malcolm <dmalcolm@redhat.com>
3327
3328 PR c/69122
3329 * c-indentation.c (get_visual_column): Remove default argument.
3330 (should_warn_for_misleading_indentation): For the multiline case,
3331 update call to get_visual_column for next_stmt_exploc so that it
3332 captures the location of the first non-whitespace character in the
3333 relevant line. Don't issue warnings if there is non-whitespace
3334 before the next statement.
3335
818ab71a
JJ
33362016-01-04 Jakub Jelinek <jakub@redhat.com>
3337
3338 Update copyright years.
3339
745e411d
DM
33402015-12-21 David Malcolm <dmalcolm@redhat.com>
3341
3342 * c-common.c (binary_op_error): Convert first param from
3343 location_t to rich_location * and use it when emitting an error.
3344 * c-common.h (binary_op_error): Convert first param from
3345 location_t to rich_location *.
3346
de67c4c3
DM
33472015-12-16 David Malcolm <dmalcolm@redhat.com>
3348
3349 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3350 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3351
4a38b02b
IV
33522015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3353
3354 * c-common.c (c_common_attribute_table): Handle "omp declare target
3355 link" attribute.
3356
54d62f51
JJ
33572015-12-14 Jakub Jelinek <jakub@redhat.com>
3358
3359 PR c/68833
3360 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3361
8d4227c8
TB
33622014-12-12 Tobias Burnus <burnus@net-b.de>
3363
3364 PR fortran/68815
3365 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3366 specifiers (%d, %i,%u and %c).
3367
f6069ccc
DM
33682015-12-10 David Malcolm <dmalcolm@redhat.com>
3369
3370 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3371
63bbf46d
JJ
33722015-12-08 Jakub Jelinek <jakub@redhat.com>
3373
3374 PR c/48088
3375 PR c/68657
3376 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3377 * c-pragma.c (handle_pragma_diagnostic): Adjust
3378 control_warning_option caller.
3379
f79520bb
DM
33802015-12-07 David Malcolm <dmalcolm@redhat.com>
3381
3382 * c-common.c (c_cpp_error): Update for change to
3383 rich_location::set_range.
3384
b3d5bc62
JJ
33852015-12-04 Paolo Bonzini <bonzini@gnu.org>
3386
3387 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3388 shifting 1 out of the sign bit.
3389
33902015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3391
3392 * c-common.c (c_common_attribute_table[]): Update max arguments
3393 count for "simd" attribute.
3394 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3395
6eb4a537
JJ
33962015-12-03 Jakub Jelinek <jakub@redhat.com>
3397
3398 PR preprocessor/57580
3399 * c-ppoutput.c (print): Change printed field to bool.
3400 Move src_file last for smaller padding.
3401 (init_pp_output): Set print.printed to false instead of 0.
3402 (scan_translation_unit): Fix up formatting. Set print.printed
3403 to true after printing something other than newline.
3404 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3405 (maybe_print_line_1): Set print.printed to false instead of 0.
3406 (print_line_1): Likewise.
3407 (do_line_change): Set print.printed to true instead of 1.
3408 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3409 dump_macro): Set print.printed to false after printing newline.
3410
4250754e
JM
34112015-12-02 Jason Merrill <jason@redhat.com>
3412
f479b43d
JM
3413 * c-common.c (fold_for_warn): New.
3414 (warn_logical_operator, warn_tautological_cmp)
3415 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3416
4250754e
JM
3417 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3418 (c_fully_fold_internal, decl_constant_value_for_optimization):
3419 Move to c/c-fold.c.
3420 * c-common.h: Don't declare decl_constant_value_for_optimization.
3421
e9e32ee6
JM
34222015-12-02 Joseph Myers <joseph@codesourcery.com>
3423
3424 PR c/68162
3425 * c-common.h (c_build_qualified_type): Add extra default
3426 arguments.
3427
37d5ad46
JB
34282015-12-01 Julian Brown <julian@codesourcery.com>
3429 Cesar Philippidis <cesar@codesourcery.com>
3430 James Norris <James_Norris@mentor.com>
3431
3432 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3433 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3434 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3435
f07862c7
EB
34362015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3437
3438 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3439 (decl_sloc_common): Delete and move bulk of processing to...
3440 (decl_sloc): ...here.
3441 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3442 (dump_ada_double_name): Remove S parameter and compute the suffix.
3443 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3444 element type and deal with an anonymous one.
3445 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3446 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3447 and remove reference to QUAL_UNION_TYPE.
3448 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3449 (dump_nested_type): ...here. New function extracted from above.
3450 Generate a full declaration for anonymous element type of arrays.
3451 (print_ada_declaration): Really skip anonymous declarations. Remove
3452 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3453 Clean up processing of declarations of array types and objects.
3454 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3455 Remove obsolete code and tidy up.
3456
75c8aac3
JH
34572015-11-29 Jan Hubicka <hubicka@ucw.cz>
3458
3459 PR c/67581
3460 * c-common.c (handle_transparent_union_attribute): Update
3461 also type variants.
3462
b58d3df2
ML
34632015-11-27 Martin Liska <mliska@suse.cz>
3464
3465 PR c++/68312
3466 * array-notation-common.c (cilkplus_extract_an_triplets):
3467 Release vector of vectors.
3468 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3469
89a01fcf
EB
34702015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3471
3472 PR c++/68527
3473 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3474 (print_ada_struct_decl): Likewise.
3475
cc5c5226
IZ
34762015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3477
3478 PR c++/68001
3479 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3480 * cilk.c (recognize_spawn): Determine location in a more precise
3481 way.
3482
269adb9d
JM
34832015-11-19 Jason Merrill <jason@redhat.com>
3484
3485 * c-common.c (shorten_compare): But look through macros from
3486 system headers.
3487
d0eccfcd
JM
34882015-11-18 Jason Merrill <jason@redhat.com>
3489
3490 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3491 non-constant operand comes from a macro.
3492
3e44547c
JM
34932015-11-17 Jason Merrill <jason@redhat.com>
3494
3495 PR bootstrap/68346
3496 * c-common.c (warn_tautological_cmp): Fold before checking for
3497 constants.
3498
0f62c7a0
MP
34992015-11-16 Marek Polacek <polacek@redhat.com>
3500
3501 PR c++/68362
3502 * c-common.c (check_case_bounds): Fold low and high cases.
3503
a868811e
MP
35042015-11-16 Marek Polacek <polacek@redhat.com>
3505
3506 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3507 * c-common.c (c_common_get_alias_set): Likewise.
3508 (handle_visibility_attribute): Likewise.
3509
fff77217
KY
35102015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3511
3512 * c-common.c (handle_simd_attribute): New.
3513 (struct attribute_spec): Add entry for "simd".
3514 (handle_simd_attribute): New.
3515
269e63b7
KT
35162015-11-13 Kai Tietz <ktietz70@googlemail.com>
3517
3518 * c-lex.c (interpret_float): Use fold_convert.
3519
ebedc9a3
DM
35202015-11-13 David Malcolm <dmalcolm@redhat.com>
3521
3522 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3523 and store it on the result.
3524 * c-opts.c (c_common_init_options): Set
3525 global_dc->colorize_source_p.
3526
6e232ba4
JN
35272015-11-12 James Norris <jnorris@codesourcery.com>
3528 Joseph Myers <joseph@codesourcery.com>
3529
7365279f 3530 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
3531 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3532 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3533 PRAGMA_OACC_CLAUSE_LINK.
3534
e78bede6
MP
35352015-11-11 Marek Polacek <polacek@redhat.com>
3536
3537 PR c/68107
3538 PR c++/68266
3539 * c-common.c (valid_array_size_p): New function.
3540 * c-common.h (valid_array_size_p): Declare.
3541
3f8257db 35422015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
3543
3544 PR bootstrap/68271
3545 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3546
69f293c9
AM
35472015-11-11 Andrew MacLeod <amacleod@redhat.com>
3548
3549 * array-notation-common.c: Remove unused header files.
3550 * c-ada-spec.c: Likewise.
3551 * c-cilkplus.c: Likewise.
3552 * c-common.c: Likewise.
3553 * c-cppbuiltin.c: Likewise.
3554 * c-dump.c: Likewise.
3555 * c-format.c: Likewise.
3556 * c-gimplify.c: Likewise.
3557 * c-indentation.c: Likewise.
3558 * c-lex.c: Likewise.
3559 * c-omp.c: Likewise.
3560 * c-opts.c: Likewise.
3561 * c-pch.c: Likewise.
3562 * c-ppoutput.c: Likewise.
3563 * c-pragma.c: Likewise.
3564 * c-pretty-print.c: Likewise.
3565 * c-semantics.c: Likewise.
3566 * c-ubsan.c: Likewise.
3567 * cilk.c: Likewise.
3568 * stub-objc.c: Likewise.
3569
3a40d81d
NS
35702015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3571 Cesar Philippidis <cesar@codesourcery.com>
3572 James Norris <jnorris@codesourcery.com>
3573 Julian Brown <julian@codesourcery.com>
3574 Nathan Sidwell <nathan@codesourcery.com>
3575
3576 * c-pragma.c (oacc_pragmas): Add "routine".
3577 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3578
ee45a32d
EB
35792015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3580
3581 * c-common.c (c_common_attributes): Add scalar_storage_order.
3582 (handle_scalar_storage_order_attribute): New function.
3583 * c-pragma.c (global_sso): New variable.
3584 (maybe_apply_pragma_scalar_storage_order): New function.
3585 (handle_pragma_scalar_storage_order): Likewise.
3586 (init_pragma): Register scalar_storage_order.
3587 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3588 * c.opt (Wscalar-storage-order): New warning.
3589 (fsso-struct=): New option.
3590
eb11eb15
MS
35912015-11-08 Martin Sebor <msebor@redhat.com>
3592
3593 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3594
0aad0198
RS
35952015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3596
3597 * c-common.c: Don't undef DEF_BUILTIN.
3598
8a645150
DM
35992015-11-06 David Malcolm <dmalcolm@redhat.com>
3600
3601 * c-common.c (c_cpp_error): Convert parameter from location_t to
3602 rich_location *. Eliminate the "column_override" parameter and
3603 the call to diagnostic_override_column.
3604 Update the "done_lexing" clause to set range 0
3605 on the rich_location, rather than overwriting a location_t.
3606 * c-common.h (c_cpp_error): Convert parameter from location_t to
3607 rich_location *. Eliminate the "column_override" parameter.
3608
7a5e4956
CP
36092015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3610 Thomas Schwinge <thomas@codesourcery.com>
3611 James Norris <jnorris@codesourcery.com>
3612
3613 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3614 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3615 clauses with parallel and kernels and loops.
3616 * c-pragma.h (enum pragma_omp_clause): Add entries for
3617 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3618 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3619 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3620 INDEPENDENT,SEQ}.
3621 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3622
e2f5cc96
MS
36232015-11-05 Martin Sebor <msebor@redhat.com>
3624
3625 PR c++/67942
3626 * c.opt (-Wplacement-new): New option.
3627
e01d41e5
JJ
36282015-11-05 Jakub Jelinek <jakub@redhat.com>
3629
3630 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3631 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3632 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3633 save_expr or create_tmp_var* if TEST is true.
3634 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3635 Don't call add_stmt here.
3636 (struct c_omp_check_loop_iv_data): New type.
3637 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3638 c_omp_check_loop_iv_exprs): New functions.
3639 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3640 distribute.
3641 (c_omp_declare_simd_clauses_to_numbers): Change
3642 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3643 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3644 from numbers to PARM_DECLs.
3645
595278be
MM
36462015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3647
3648 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3649 flag_checking.
3650
3f8257db 36512015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
3652
3653 PR c++-common/67882
b3d5bc62
JJ
3654 * c-common.h (fold_offsetof_1): Add argument.
3655 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
3656 offsetof expressions that reference elements past the end of
3657 an array.
3658
4bf9e5a8
TS
36592015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3660 Chung-Lin Tang <cltang@codesourcery.com>
3661
3662 * c-pragma.c (oacc_pragmas): Add "atomic".
3663 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3664
3b1661a9
ES
36652015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3666
3667 * c-common.c (handle_target_clones_attribute): New.
3668 (c_common_attribute_table): Add handle_target_clones_attribute.
3669 (handle_always_inline_attribute): Add check on target_clones attribute.
3670 (handle_target_attribute): Ditto.
3671
2adfab87
AM
36722015-10-29 Andrew MacLeod <amacleod@redhat.com>
3673
3674 * array-notation-common.c: Reorder #include's and remove duplicates.
3675 * c-ada-spec.c: Likewise.
3676 * c-cilkplus.c: Likewise.
3677 * c-common.c: Likewise.
3678 * c-cppbuiltin.c: Likewise.
3679 * c-dump.c: Likewise.
3680 * c-format.c: Likewise.
3681 * c-gimplify.c: Likewise.
3682 * c-indentation.c: Likewise.
3683 * c-lex.c: Likewise.
3684 * c-omp.c: Likewise.
3685 * c-opts.c: Likewise.
3686 * c-pch.c: Likewise.
3687 * c-ppoutput.c: Likewise.
3688 * c-pragma.c: Likewise.
3689 * c-pretty-print.c: Likewise.
3690 * c-semantics.c: Likewise.
3691 * c-ubsan.c: Likewise.
3692 * cilk.c: Likewise.
3693 * stub-objc.c: Likewise.
3694
d90ec4f2
JM
36952015-10-28 Jason Merrill <jason@redhat.com>
3696
3697 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3698
88bae6f4
TS
36992015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3700 James Norris <jnorris@codesourcery.com>
3701 Cesar Philippidis <cesar@codesourcery.com>
3702
3703 PR c/64765
3704 PR c/64880
3705 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3706 * c-omp.c (c_oacc_split_loop_clauses): New function.
3707
b1726d6c
MS
37082015-10-21 Martin Sebor <msebor@redhat.com>
3709
3710 PR driver/68043
3711 * c.opt: End each sentence that describes an option with a period.
3712
fa60eeb9
MP
37132015-10-20 Marek Polacek <polacek@redhat.com>
3714
3715 * array-notation-common.c (is_cilkplus_vector_p): Define.
3716 * c-common.h (is_cilkplus_vector_p): Declare.
3717
95979049
MP
37182015-10-20 Marek Polacek <polacek@redhat.com>
3719
3720 * c.opt (std=gnu++11): Do not describe as experimental.
3721 (std=gnu++14): Likewise.
3722
2a9fb712
JM
37232015-10-19 Jason Merrill <jason@redhat.com>
3724
3725 * c-cppbuiltin.c (c_cpp_builtins): Define
3726 __cpp_nontype_template_args.
3727
13b380a3
JM
37282015-10-19 Jason Merrill <jason@redhat.com>
3729
3730 * c-cppbuiltin.c (c_cpp_builtins): Define
3731 __cpp_enumerator_attributes, __cpp_fold_expressions,
3732 __cpp_unicode_characters.
3733
d9a6bd32
JJ
37342015-10-13 Jakub Jelinek <jakub@redhat.com>
3735 Aldy Hernandez <aldyh@redhat.com>
3736
3737 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3738 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3739 (c_define_builtins): Likewise.
3740 * c-common.h (enum c_omp_clause_split): Add
3741 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3742 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3743 (c_finish_omp_for): Add ORIG_DECLV argument.
3744 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3745 201511 instead of 201307.
3746 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3747 OMP_CRITICAL_CLAUSES to it.
3748 (c_finish_omp_ordered): Add CLAUSES argument, set
3749 OMP_ORDERED_CLAUSES to it.
3750 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3751 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3752 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3753 constructs and new OpenMP 4.5 clauses. Clear
3754 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3755 verification code.
3756 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3757 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3758 (enum pragma_omp_clause): Add
3759 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3760 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3761
624d31fe
RS
37622015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3763
3764 * c-lex.c (interpret_float): Use real_equal instead of
3765 REAL_VALUES_EQUAL.
3766
b8fd7909
JM
37672015-10-04 Jason Merrill <jason@redhat.com>
3768
3769 Implement N4514, C++ Extensions for Transactional Memory.
3770 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3771 (c_common_attribute_table): Add transaction_safe_dynamic.
3772 transaction_safe now affects type identity.
3773 (handle_tm_attribute): Handle transaction_safe_dynamic.
3774 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3775 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3776 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3777 (D_TRANSMEM): New.
3778 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3779 * c-pretty-print.c (pp_c_attributes_display): Don't print
3780 transaction_safe in C++.
3781
12651878
MP
37822015-10-02 Marek Polacek <polacek@redhat.com>
3783
3784 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3785
3e3b8d63
MP
37862015-10-02 Marek Polacek <polacek@redhat.com>
3787
3788 PR c/64249
3789 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3790 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3791 * c.opt (Wduplicated-cond): New option.
3792
0d1a8f75
JM
37932015-10-01 Joseph Myers <joseph@codesourcery.com>
3794
3795 * c.opt (std=c11): Do not describe as experimental.
3796 (std=gnu11): Likewise.
3797 (std=iso9899:2011): Likewise.
3798
3e32ee19
NS
37992015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3800
3801 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3802 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3803
974348ee
MP
38042015-09-25 Marek Polacek <polacek@redhat.com>
3805
3806 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3807 (ubsan_instrument_shift): Likewise.
3808
15dbc1a6
MP
38092015-09-25 Marek Polacek <polacek@redhat.com>
3810
3811 PR sanitizer/64906
3812 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3813
6b95d7cc
PP
38142015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3815
3816 * c-indentation.c (should_warn_for_misleading_indentation):
3817 Compare next_stmt_vis_column with guard_line_first_nws instead
3818 of with guard_line_vis_column.
3819
c1822f9c
MLI
38202015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3821
3822 PR c/49654
3823 PR c/49655
3824 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3825 options and options not valid for the current language.
3826
d5398058
PP
38272015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3828
3829 * c-indentation.c (should_warn_for_misleading_indentation):
3830 Float out and consolidate the calls to get_visual_column that
3831 are passed guard_exploc as an argument. Compare
3832 next_stmt_vis_column with guard_line_first_nws instead of with
3833 body_line_first_nws.
3834
6b333269
NS
38352015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3836
3837 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3838 Wnamespaces): New C++ warnings.
3839
a75f1574
JM
38402015-09-22 Jason Merrill <jason@redhat.com>
3841
3842 * c-common.h (abi_compat_version_crosses): New.
3843 (warn_abi_version): Declare.
3844 * c-common.c: Define it.
3845 * c-opts.c (c_common_post_options): Handle it.
3846 flag_abi_compat_version defaults to 8.
3847
bdaaa8b7
VV
38482015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3849
3850 Complete the implementation of N4230, Nested namespace definition.
3851 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3852 __cpp_nested_namespace_definitions.
3853
eaa797e8
MLI
38542015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3855
3856 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3857
c4914de6
MLI
38582015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3859
3860 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3861 when warning.
3862 * c-pragma.h (pragma_lex): Add optional loc argument.
3863
fcb87c50
MM
38642015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3865
3866 * c-format.c (check_format_arg): Adjust to use common block size in all
3867 object pools.
3868
31bdd08a
DM
38692015-09-15 David Malcolm <dmalcolm@redhat.com>
3870
3871 * c-format.c (location_from_offset): Update for change in
3872 signature of location_get_source_line.
3873 * c-indentation.c (get_visual_column): Likewise.
3874 (line_contains_hash_if): Likewise.
3875
aa9f4b4c
MP
38762015-09-14 Marek Polacek <polacek@redhat.com>
3877
3878 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3879 setting various warnings.
3880
aa256c4a
MP
38812015-09-14 Marek Polacek <polacek@redhat.com>
3882
3883 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3884 a negative value.
3885
0f876f22
MW
38862015-09-11 Mark Wielaard <mjw@redhat.com>
3887
3888 PR c/28901
3889 * c.opt (Wunused-variable): Option from common.opt.
3890 (Wunused-const-variable): New option.
3891
273aa49e
PC
38922015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3893
3894 PR c++/53184
3895 * c.opt ([Wsubobject-linkage]): Add.
3896
1807ffc1
MS
38972015-09-03 Martin Sebor <msebor@redhat.com>
3898
3899 PR c/66516
3900 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3901 functions.
3902 * c-common.c (reject_gcc_builtin): Define.
3903
38942840
BI
39042015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3905
3906 PR middle-end/60586
3907 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3908 prototype.
3909 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3910 cilk_gimplify_call_params_in_spawned_fn.
3911 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3912 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3913 unwrapping.
3914
c316b5e4
MP
39152015-08-25 Marek Polacek <polacek@redhat.com>
3916
3917 PR middle-end/67330
3918 * c-common.c (handle_weak_attribute): Don't check whether the
3919 visibility can be changed here.
3920
584a7c46
MLI
39212015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3922
3923 * c-lex.c (c_lex_with_flags): Use explicit locations.
3924
a79683d5
TS
39252015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3926
3927 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3928 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3929
61717a45
FXC
39302015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3931
3932 PR middle-end/36757
3933 * c-common.c (check_builtin_function_arguments): Add check
3934 for BUILT_IN_SIGNBIT argument.
3935
329524f5
PC
39362015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3937
3938 PR c++/67160
3939 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3940 in c++1z mode.
3941
4ee55665
MP
39422015-08-17 Marek Polacek <polacek@redhat.com>
3943
3944 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3945 with whitespaces before qualifier names.
3946
b893e375
MP
39472015-08-12 Marek Polacek <polacek@redhat.com>
3948
3949 PR c++/55095
3950 * c-common.c (maybe_warn_shift_overflow): Properly handle
3951 left-shifting 1 into the sign bit.
3952
c2d89095
MLI
39532015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3954
3955 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3956
971e17ff
AS
39572015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
3958 Braden Obrzut <admin@maniacsvault.net>
3959 Jason Merrill <jason@redhat.com>
3960
3961 Add C++ Concepts TS support.
3962 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3963 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3964 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3965 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3966 * c-opts.c (set_std_cxx1z): Set flag_concepts.
3967 * c.opt (fconcepts): New.
3968
b3d5bc62
JJ
39692015-08-02 Martin Sebor <msebor@redhat.com>
3970
3971 * c.opt (-Wframe-address): New warning option.
3972
8ebca419
PP
39732015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3974
3975 * c-indentation.c (should_warn_for_misleading_indentation):
3976 Improve heuristics.
3977
1a1e101f
PP
39782015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3979
3980 * c-indentation.c (get_visual_column): Add parameter first_nws,
3981 use it. Update comment documenting the function.
3982 (is_first_nonwhitespace_on_line): Remove.
3983 (should_warn_for_misleading_indentation): Replace usage of
3984 of is_first_nonwhitespace_on_line with get_visual_column.
3985
992118a1
PP
39862015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3987
3988 * c-indentation.h (struct token_indent_info): Define.
3989 (get_token_indent_info): Define.
3990 (warn_for_misleading_information): Declare.
3991 * c-common.h (warn_for_misleading_information): Remove.
3992 * c-identation.c (warn_for_misleading_indentation):
3993 Change declaration to take three token_indent_infos. Adjust
3994 accordingly.
3995 * c-identation.c (should_warn_for_misleading_indentation):
3996 Likewise. Bail out early if the body is a compound statement.
3997 (guard_tinfo_to_string): Define.
3998
e8fa3817
JM
39992015-07-30 Jason Merrill <jason@redhat.com>
4000
4001 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4002 '*' for reference decay.
4003
173864e8
MP
40042015-07-30 Marek Polacek <polacek@redhat.com>
4005
4006 * c-common.c (warn_tautological_cmp): Bail for float types.
4007
f2afe6dd
MP
40082015-07-27 Marek Polacek <polacek@redhat.com>
4009
4010 PR bootstrap/67030
4011 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4012
05b28fd6
MP
40132015-07-27 Marek Polacek <polacek@redhat.com>
4014
4015 PR c++/66555
4016 PR c/54979
4017 * c-common.c (find_array_ref_with_const_idx_r): New function.
4018 (warn_tautological_cmp): New function.
4019 * c-common.h (warn_tautological_cmp): Declare.
4020 * c.opt (Wtautological-compare): New option.
4021
5a5062b8
MP
40222015-07-23 Marek Polacek <polacek@redhat.com>
4023
4024 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4025 (ubsan_instrument_shift): Likewise.
4026
dc891fe7
MP
40272015-07-23 Marek Polacek <polacek@redhat.com>
4028
4029 PR sanitizer/66908
4030 * c-ubsan.c: Include gimplify.h.
4031 (ubsan_instrument_division): Unshare OP0 and OP1.
4032 (ubsan_instrument_shift): Likewise.
4033
451b5e48
MP
40342015-07-20 Marek Polacek <polacek@redhat.com>
4035 Richard Sandiford <richard.sandiford@arm.com>
4036
4037 PR c++/55095
4038 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4039 Use EXPR_LOC_OR_LOC.
4040 (maybe_warn_shift_overflow): New function.
4041 * c-common.h (maybe_warn_shift_overflow): Declare.
4042 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4043 * c.opt (Wshift-overflow): New option.
4044
fb0b2914
ML
40452015-07-16 Martin Liska <mliska@suse.cz>
4046
4047 * c-format.c (static void check_format_info_main): Use
4048 object_allocator instead of pool_allocator.
4049 (check_format_arg): Likewise.
4050 (check_format_info_main): Likewise.
4051
903f5c23
AM
40522015-07-15 Andrew MacLeod <amacleod@redhat.com>
4053
4054 * c-opts.c: Remove multiline #include comment.
4055
026c3cfd
AH
40562015-07-12 Aldy Hernandez <aldyh@redhat.com>
4057
4058 * c-common.c: Fix double word typos.
4059
bb49ee66
EB
40602015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4061
4062 * c-ada-spec.h (cpp_operation): Revert latest change.
4063 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4064 constructors and destructors.
4065
1916bcb5
AM
40662015-07-09 Andrew MacLeod <amacleod@redhat.com>
4067
4068 * c-common.h: Adjust includes for flags.h changes.
4069 * stub-objc.c: Likewise.
026c3cfd 4070
a9dcd529
EB
40712015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4072
4073 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4074 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4075
b03b462f
JJ
40762015-07-08 Jakub Jelinek <jakub@redhat.com>
4077
4078 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4079 are to be removed, return NULL rather than original clauses list.
4080
c7131fb2
AM
40812015-07-07 Andrew MacLeod <amacleod@redhat.com>
4082
4083 * array-notation-common.c: Adjust includes.
4084 * c-ada-spec.c: Likewise.
4085 * c-cilkplus.c: Likewise.
4086 * c-common.h: Likewise.
4087 * c-cppbuiltin.c: Likewise.
4088 * c-dump.c: Likewise.
4089 * c-format.c: Likewise.
4090 * c-gimplify.c: Likewise.
4091 * c-indentation.c: Likewise.
4092 * c-lex.c: Likewise.
4093 * c-omp.c: Likewise.
4094 * c-opts.c: Likewise.
4095 * c-pch.c: Likewise.
4096 * c-ppoutput.c: Likewise.
4097 * c-pragma.c: Likewise.
4098 * c-pretty-print.c: Likewise.
4099 * c-semantics.c: Likewise.
4100 * c-ubsan.c: Likewise.
4101 * cilk.c: Likewise.
4102 * stub-objc.c: Likewise.
4103
2a7fb83f
EB
41042015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4105
4106 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4107 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4108
a03c9bf1
JM
41092015-07-01 Jason Merrill <jason@redhat.com>
4110
36a85135
JM
4111 * c-common.h (D_CXX11): Rename from D_CXX0X.
4112 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4113 * c-common.c: Adjust.
4114
e7fa68d5
JM
4115 * c-opts.c (c_common_post_options): Default to C++14.
4116
a03c9bf1
JM
4117 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4118
fe95b036
ESR
41192015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4120
4121 Implement N4197 - Adding u8 character literals
b3d5bc62 4122 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4123 CPP_CHAR.
b3d5bc62 4124 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4125 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4126 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4127 and CPP_UTF8CHAR tokens.
4128 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4129
da2e71c9
MLI
41302015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4131
4132 PR fortran/66605
4133 * c-common.c (do_warn_unused_parameter): Move here.
4134 * c-common.h (do_warn_unused_parameter): Declare.
4135
b155cfd9
MP
41362015-06-29 Marek Polacek <polacek@redhat.com>
4137
4138 PR c/66322
4139 * c-common.c (check_case_bounds): Add bool * parameter. Set
4140 OUTSIDE_RANGE_P.
4141 (c_add_case_label): Add bool * parameter. Pass it down to
4142 check_case_bounds.
4143 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4144 warning here.
4145 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4146 declarations.
4147
31521951
MP
41482015-06-27 Marek Polacek <polacek@redhat.com>
4149
4150 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4151 or VECTOR_INTEGER_TYPE_P throughout.
4152 * c-gimplify.c: Likewise.
4153
22d03525
MP
41542015-06-26 Marek Polacek <polacek@redhat.com>
4155
4156 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4157 * c-common.c (c_fully_fold_internal): Likewise.
4158 (c_alignof_expr): Likewise.
4159 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4160 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4161 * cilk.c (create_parm_list): Likewise.
22d03525 4162
af05e6e5
MP
41632015-06-26 Marek Polacek <polacek@redhat.com>
4164
4165 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4166
f0889939
AM
41672015-06-25 Andrew MacLeod <amacleod@redhat.com>
4168
4169 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4170 * c-gimplify.c: Likewise.
4171 * c-pragma.c: Likewise.
4172 * c-ubsan.c: Likewise.
4173 * cilk.c: Likewise.
4174
ca752f39
RS
41752015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4176
4177 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4178 ggc_hasher.
4179
16a16ec7
AM
41802015-06-25 Andrew MacLeod <amacleod@redhat.com>
4181
4182 * cilk.c: Move calls.h after tm.h in the include chain.
4183
0ae9bd27
MP
41842015-06-25 Marek Polacek <polacek@redhat.com>
4185
4186 * array-notation-common.c: Use VAR_P throughout.
4187 * c-ada-spec.c: Likewise.
4188 * c-common.c: Likewise.
4189 * c-format.c: Likewise.
4190 * c-gimplify.c: Likewise.
4191 * c-omp.c: Likewise.
4192 * c-pragma.c: Likewise.
4193 * c-pretty-print.c: Likewise.
4194 * cilk.c: Likewise.
4195
62f9079a
MP
41962015-06-25 Marek Polacek <polacek@redhat.com>
4197
4198 * cilk.c (extract_free_variables): Use is_global_var.
4199
0fa16060
RS
42002015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4201
4202 * c-common.c: Don't include target-def.h.
4203
a68ae2e1
MP
42042015-06-23 Marek Polacek <polacek@redhat.com>
4205
4206 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4207 when comparing INTEGER_CSTs.
4208
c6a2f2d9
PMR
42092015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4210
4211 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4212 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4213 (dump_ada_template): Skip partially specialized types.
4214
6b4db501
MM
42152015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4216
4217 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4218 swapping.
4219
abb226c9
AM
42202015-06-17 Andrew MacLeod <amacleod@redhat.com>
4221
4222 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4223 * c-ada-spec.c: Likewise.
4224 * c-cilkplus.c: Likewise.
4225 * c-common.c: Likewise.
4226 * c-common.h: Likewise.
4227 * c-cppbuiltin.c: Likewise.
4228 * c-dump.c: Likewise.
4229 * c-format.c: Likewise.
4230 * c-gimplify.c: Likewise.
4231 * c-indentation.c: Likewise.
4232 * c-lex.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-opts.c: Likewise.
4235 * c-pch.c: Likewise.
4236 * c-ppoutput.c: Likewise.
4237 * c-pragma.c: Likewise.
4238 * c-pretty-print.c: Likewise.
4239 * c-semantics.c: Likewise.
4240 * c-ubsan.c: Likewise.
4241 * cilk.c: Likewise.
4242 * stub-objc.c: Likewise.
4243
076fecad
PP
42442015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4245
4246 PR c++/65168
4247 * c-common.c (c_common_truthvalue_conversion): Warn when
4248 converting an address of a reference to a truth value.
4249
13fdf2e2
AM
42502015-06-08 Andrew MacLeod <amacleod@redhat.com>
4251
4252 * array-notation-common.c : Adjust include files.
4253 * c-ada-spec.c : Likewise.
4254 * c-cilkplus.c : Likewise.
4255 * c-common.c : Likewise.
4256 * c-common.h : Likewise.
4257 * c-cppbuiltin.c : Likewise.
4258 * c-dump.c : Likewise.
4259 * c-format.c : Likewise.
4260 * c-gimplify.c : Likewise.
4261 * c-indentation.c : Likewise.
4262 * c-lex.c : Likewise.
4263 * c-omp.c : Likewise.
4264 * c-opts.c : Likewise.
4265 * c-pch.c : Likewise.
4266 * c-ppoutput.c : Likewise.
4267 * c-pragma.c : Likewise.
4268 * c-pretty-print.c : Likewise.
4269 * c-semantics.c : Likewise.
4270 * c-ubsan.c : Likewise.
4271 * cilk.c : Likewise.
4272 * stub-objc.c : Likewise.
4273
a1661b90
MP
42742015-06-08 Marek Polacek <polacek@redhat.com>
4275
4276 PR c/66415
4277 * c-format.c (location_from_offset): Return LOC if LINE is null.
4278
d7438551
AH
42792015-06-05 Aldy Hernandez <aldyh@redhat.com>
4280
4281 * c-common.h (c_parse_final_cleanups): New prototype.
4282 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4283
b3d5bc62
JJ
42842015-06-04 Sriraman Tallam <tmsriram@google.com>
4285
4286 * c-common.c (noplt): New attribute.
4287 (handle_noplt_attribute): New handler.
4288
ecb9f223
AM
42892015-06-04 Andrew MacLeod <amacleod@redhat.com>
4290
4291 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4292 * c-ada-spec.c: Likewise.
4293 * c-cilkplus.c: Likewise.
4294 * c-common.c: Likewise.
4295 * c-common.h: Likewise.
4296 * c-cppbuiltin.c: Likewise.
4297 * c-dump.c: Likewise.
4298 * c-format.c: Likewise.
4299 * c-gimplify.c: Likewise.
4300 * c-indentation.c: Likewise.
4301 * c-lex.c: Likewise.
4302 * c-omp.c: Likewise.
4303 * c-opts.c: Likewise.
4304 * c-pch.c: Likewise.
4305 * c-ppoutput.c: Likewise.
4306 * c-pragma.c: Likewise.
4307 * c-pretty-print.c: Likewise.
4308 * c-semantics.c: Likewise.
4309 * c-ubsan.c: Likewise.
4310 * cilk.c: Likewise.
4311 * stub-objc.c: Likewise.
4312
6ac48155
DM
43132015-06-02 David Malcolm <dmalcolm@redhat.com>
4314
4315 PR c/66220:
4316 * c-indentation.c (should_warn_for_misleading_indentation): Use
4317 expand_location rather than expand_location_to_spelling_point.
4318 Don't warn if the guarding statement is more indented than the
4319 next/body stmts.
4320
773ce42e
DM
43212015-06-02 David Malcolm <dmalcolm@redhat.com>
4322
4323 * c-indentation.c (warn_for_misleading_indentation): Bail out
4324 immediately if -Wmisleading-indentation isn't enabled.
4325
4fef8379
ML
43262015-06-01 Martin Liska <mliska@suse.cz>
4327
4328 * c-format.c (check_format_arg):Use new type-based pool allocator.
4329 (check_format_info_main) Likewise.
4330
1edfb384
EB
43312015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4332
4333 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4334 (has_nontrivial_methods): Likewise.
4335
9677ef52
MP
43362015-05-25 Marek Polacek <polacek@redhat.com>
4337
4338 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4339
fd5c817a
MP
43402015-05-22 Marek Polacek <polacek@redhat.com>
4341
4342 PR c/47043
4343 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4344
a2f45fe6 43452015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
4346
4347 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4348 STACK_GROWS_DOWNWARD.
4349
a2f45fe6 43502015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
4351
4352 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4353 STACK_GROWS_DOWNWARD rather than if it is defined.
4354
0fee2ac2 43552015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 4356
0fee2ac2
MLI
4357 PR c/52952
4358 * c-format.c (location_column_from_byte_offset): New.
4359 (location_from_offset): New.
4360 (struct format_wanted_type): Add offset_loc field.
4361 (check_format_info): Move handling of location for extra arguments
4362 closer to the point of warning.
4363 (check_format_info_main): Pass the result of location_from_offset
4364 to warning_at.
4365 (format_type_warning): Pass the result of location_from_offset
4366 to warning_at.
4367
cf4ef6f7
MP
43682015-05-20 Marek Polacek <polacek@redhat.com>
4369
4370 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4371
3a65ee74
MP
43722015-05-20 Marek Polacek <polacek@redhat.com>
4373
4374 * c-ada-spec.c (dump_sloc): Use DECL_P.
4375
21b634ae
MP
43762015-05-20 Marek Polacek <polacek@redhat.com>
4377
4378 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4379 * c-common.c: Likewise.
4380
0e50b624
DM
43812015-05-19 David Malcolm <dmalcolm@redhat.com>
4382
4383 * c-common.h (fe_file_change): Strengthen param from
4384 const line_map * to const line_map_ordinary *.
4385 (pp_file_change): Likewise.
4386 * c-lex.c (fe_file_change): Likewise.
4387 (cb_define): Use linemap_check_ordinary when invoking
4388 SOURCE_LINE.
4389 (cb_undef): Likewise.
4390 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4391 invoking cb_file_change.
4392 (c_finish_options): Likewise.
4393 (push_command_line_include): Likewise.
4394 (cb_file_change): Strengthen param "new_map" from
4395 const line_map * to const line_map_ordinary *.
4396 * c-ppoutput.c (cb_define): Likewise for local "map".
4397 (pp_file_change): Likewise for param "map" and local "from".
4398
fab27f52
MM
43992015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4400
4401 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4402
2fe1d762
TV
44032015-05-18 Tom de Vries <tom@codesourcery.com>
4404
4405 * c-common.c (build_va_arg_1): New function.
4406 (build_va_arg): Add address operator to va_list operand if necessary.
4407
7a37fa90
MM
44082015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4409
4410 PR c/48956
4411 * c-common.c (int_safely_convertible_to_real_p): Define.
4412 (unsafe_conversion_p): Check conversions involving complex types.
4413 (conversion_warning): Add new warning message for conversions which
4414 discard imaginary component.
4415 * c-common.h: (enum conversion_safety): Add new enumerator for such
4416 conversions.
4417
3aa3c9fc
MP
44182015-05-14 Marek Polacek <polacek@redhat.com>
4419
4420 PR c/66066
4421 PR c/66127
4422 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4423 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4424 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4425 use it. If FOR_INT_CONST, require that all evaluated operands be
4426 INTEGER_CSTs.
4427
c3388e62
DM
44282015-05-12 David Malcolm <dmalcolm@redhat.com>
4429
4430 * c-common.h (warn_for_misleading_indentation): New prototype.
4431 * c-indentation.c: New file.
4432 * c.opt (Wmisleading-indentation): New option.
4433
c7b38fd5
TV
44342015-05-12 Tom de Vries <tom@codesourcery.com>
4435
4436 PR tree-optimization/66010
4437 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4438
381bf11e
JM
44392015-05-09 Jason Merrill <jason@redhat.com>
4440
edff0c06
JM
4441 * c-opts.c (c_common_post_options): Also clear
4442 cpp_opts->cpp_warn_cxx11_compat.
4443
129211bc
JM
4444 * c-common.h (enum cxx_dialect): Add cxx_unset.
4445 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4446 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4447
381bf11e
JM
4448 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4449 (std=gnu++0x): Mark as Undocumented.
4450 (std=gnu++1y): Add deprecated message.
4451
fe191308
JM
44522015-05-08 Jason Merrill <jason@redhat.com>
4453
765189ff
JM
4454 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4455 * c-opts.c: Adjust.
4456
fe191308
JM
4457 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4458
755e528f
MP
44592015-05-08 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/64918
4462 * c.opt (Woverride-init-side-effects): New option.
4463
0173bd2a
MP
44642015-05-07 Marek Polacek <polacek@redhat.com>
4465
4466 PR c/65179
4467 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4468 negative value.
4469 * c.opt (Wshift-negative-value): New option.
4470 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4471 when -Wextra and C99/C++11 mode.
4472
e0f0d3b9
MP
44732015-05-07 Marek Polacek <polacek@redhat.com>
4474 Martin Uecker <uecker@eecs.berkeley.edu>
4475
4476 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4477 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4478
8243e2a9
JM
44792015-05-05 Jason Merrill <jason@redhat.com>
4480
4481 * c.opt (Wterminate): New.
4482
577cd070
MP
44832015-04-30 Marek Polacek <polacek@redhat.com>
4484
4485 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4486 require that the non-constant be of a boolean type.
4487
0373796b
JT
44882015-04-29 Josh Triplett <josh@joshtriplett.org>
4489
e0f0d3b9
MP
4490 * c-common.c (handle_section_attribute): Refactor to reduce
4491 nesting and distinguish between error cases.
0373796b 4492
716c0ba6
MP
44932015-04-29 Marek Polacek <polacek@redhat.com>
4494
4495 PR c/64610
4496 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4497 with 0/1.
4498
8848828b
JJ
44992015-04-29 Jakub Jelinek <jakub@redhat.com>
4500
4501 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4502 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4503 HOST_BITS_PER_WIDE_INT.
4504
ecd0e562
TV
45052015-04-28 Tom de Vries <tom@codesourcery.com>
4506
4507 PR tree-optimization/65887
4508 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4509
2a877204 45102015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 4511 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
4512
4513 * c-ada-spec.c (in_function): Delete.
4514 (dump_generic_ada_node): Do not change in_function and remove the
4515 redundant code dealing with it.
4516 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4517 (print_ada_methods): Output the static member functions in a nested
4518 package after the regular methods as well as associated renamings.
4519
4853031e
MP
45202015-04-24 Marek Polacek <polacek@redhat.com>
4521
4522 PR c/65830
4523 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4524 and OPT_Wshift_count_overflow.
4525
8c2b7f79
MP
4526 PR c/63357
4527 * c-common.c (warn_logical_operator): Warn if the operands have the
4528 same expressions.
4529
b8787813
MP
45302015-04-24 Marek Polacek <polacek@redhat.com>
4531
4532 PR c/61534
4533 * c-common.c (warn_logical_operator): Bail if either operand comes
4534 from a macro expansion.
4535
8fba1830
BRF
45362015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4537
4538 PR target/55143
4539 * c-common.c (c_default_pointer_mode): Add definition.
4540 * c-common.h (c_default_pointer_mode): Add declaration.
4541
17958621
JJ
45422015-03-11 Jakub Jelinek <jakub@redhat.com>
4543
4544 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4545 on record_builtin_type argument.
4546
7ccb1a11
JJ
45472015-03-10 Jakub Jelinek <jakub@redhat.com>
4548
4549 PR c/65120
4550 * c-common.c (warn_logical_not_parentheses): Don't warn for
4551 !x == 0 or !x != 0.
4552
04fd785e
MP
45532015-03-07 Marek Polacek <polacek@redhat.com>
4554
4555 PR sanitizer/65280
4556 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4557 before trying to figure out whether we have a flexible array member.
4558
a4e26206 45592015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4560 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
4561
4562 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4563
0d2489f4
EB
45642015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4565
4566 PR ada/65319
4567 * c-ada-spec.c (print_destructor): Remove obsolete code.
4568
83ed54d7
EB
45692015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4570
4571 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4572 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4573 DECL_TEMPLATE_RESULT emulations.
4574 (dump_ada_template)): Add guard for TYPE_METHODS.
4575
7631f0e2
MP
45762015-02-27 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/65040
4579 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4580
d1783ae5
KT
45812015-02-27 Kai Tietz <ktietz@redhat.com>
4582
4583 PR c/35330
4584 * c-pragma.c (handle_pragma_weak): Do not try to create
4585 weak/alias of declarations not being function, or variable
4586 declarations.
4587
56a9f6bc
TS
45882015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4589
4590 PR libgomp/64625
4591 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4592 Remove macros.
4593 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4594
3d5cb23d
MP
45952015-02-16 Marek Polacek <polacek@redhat.com>
4596
4597 PR c/65066
4598 * c-format.c (check_format_types): Handle null param.
4599
fa008882
MP
46002015-02-13 Marek Polacek <polacek@redhat.com>
4601
4602 PR c/65040
4603 * c-format.c (check_format_types): Don't warn about different
4604 signedness if the original value is in the range of WANTED_TYPE.
4605
785f21af
JM
46062015-02-12 Jason Merrill <jason@redhat.com>
4607
4608 PR c++/64956
4609 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4610 to the current highest version.
4611 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4612
4886ec8e
JJ
46132015-02-04 Jakub Jelinek <jakub@redhat.com>
4614
4615 PR c/64824
4616 PR c/64868
4617 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4618 instead of RDIV_EXPR. Use build_binary_op instead of
4619 build2_loc.
4620
40fecdd6
JM
46212015-01-30 Joseph Myers <joseph@codesourcery.com>
4622
4623 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4624 to pass input_location as first argument.
4625
a0c88d06
TV
46262015-01-23 Tom de Vries <tom@codesourcery.com>
4627
4628 PR libgomp/64672
4629 * c.opt (fopenacc): Mark as LTO option.
4630
1506ae0e
TV
46312015-01-23 Tom de Vries <tom@codesourcery.com>
4632
4633 PR libgomp/64707
4634 * c.opt (fopenmp): Mark as LTO option.
4635
31be63ab
JJ
46362015-01-21 Jakub Jelinek <jakub@redhat.com>
4637
4638 PR c/63307
b1726d6c 4639 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
4640 (compare_decls): Fix up formatting.
4641
46422015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4643
4644 PR c/63307
4645 * cilk.c: Include vec.h.
4646 (struct cilk_decls): New structure.
4647 (wrapper_parm_cb): Split this function to...
4648 (fill_decls_vec): ...this...
4649 (create_parm_list): ...and this.
4650 (compare_decls): New function.
4651 (for_local_cb): Remove.
4652 (wrapper_local_cb): Ditto.
4653 (build_wrapper_type): For now first traverse and fill vector of
4654 declarations then sort it and then deal with sorted vector.
4655 (cilk_outline): Ditto.
4656 (declare_one_free_variable): Ditto.
4657
6875457f
JM
46582015-01-21 Jason Merrill <jason@redhat.com>
4659
4660 PR c++/64629
4661 * c-format.c (check_format_arg): Call decl_constant_value.
4662
185c9e56
ML
46632015-01-19 Martin Liska <mliska@suse.cz>
4664
4665 * c-common.c (handle_noicf_attribute): New function.
4666
41dbbb37
TS
46672015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4668 Bernd Schmidt <bernds@codesourcery.com>
4669 James Norris <jnorris@codesourcery.com>
4670 Cesar Philippidis <cesar@codesourcery.com>
4671 Ilmir Usmanov <i.usmanov@samsung.com>
4672 Jakub Jelinek <jakub@redhat.com>
4673
4674 * c.opt (fopenacc): New option.
4675 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4676 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4677 New macros.
4678 * c-common.h (c_finish_oacc_wait): New prototype.
4679 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4680 (c_finish_oacc_wait): New function.
4681 * c-pragma.c (oacc_pragmas): New variable.
4682 (c_pp_lookup_pragma, init_pragma): Handle it.
4683 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4684 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4685 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4686 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4687 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4688 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4689 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4690 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4691 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4692 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4693 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4694 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4695 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4696 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4697 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4698 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4699 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4700 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4701 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4702 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4703 PRAGMA_OACC_CLAUSE_WORKER.
4704
3f8257db 47052015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
4706
4707 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4708 for the new option fstack-protector_explicit.
4709 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4710 (handle_stack_protect_attribute): New function.
4711
3f8257db 47122015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
4713
4714 * c.opt: New option -Warray-bounds=.
4715
adfac8df
JJ
47162015-01-09 Michael Collison <michael.collison@linaro.org>
4717
4718 * array-notation-common.c: Include hash-set.h, machmode.h,
4719 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4720 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4721 * c-ada-spec.c: Ditto.
4722 * c-cilkplus.c: Ditto.
4723 * c-common.c: Include input.h due to flattening of tree.h.
4724 Define macro GCC_C_COMMON_C.
4725 * c-common.h: Flatten tree.h header files into c-common.h.
4726 Remove include of tree-core.h.
4727 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4728 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4729 fold-const.h, wide-int.h, and inchash.h due to
4730 flattening of tree.h.
4731 * c-dump.c: Ditto.
4732 * c-format.c: Flatten tree.h header files into c-common.h.
4733 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4734 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4735 fold-const.h, wide-int.h, and inchash.h due to
4736 flattening of tree.h.
4737 * c-dump.c: Include hash-set.h, machmode.h,
4738 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4739 fold-const.h, wide-int.h, and inchash.h due to
4740 flattening of tree.h.
4741 * c-format.c: Include hash-set.h, machmode.h,
4742 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4743 fold-const.h, wide-int.h, inchash.h and real.h due to
4744 flattening of tree.h.
4745 * c-gimplify.c: Include hash-set.h, machmode.h,
4746 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4747 fold-const.h, wide-int.h, and inchash.h due to
4748 flattening of tree.h.
4749 * cilk.c: Ditto.
4750 * c-lex.c: Ditto.
4751 * c-omp.c: Ditto.
4752 * c-opts.c: Ditto.
4753 * c-pch.c: Ditto.
4754 * c-ppoutput.c: Ditto.
4755 * c-pragma.c: Ditto.
4756 * c-pretty-print.c: Ditto.
4757 * c-semantics.c: Ditto.
4758 * c-ubsan.c: Ditto.
4759 * stub-objc.c: Ditto.
4760
f5481fc4
JM
47612015-01-08 Jason Merrill <jason@redhat.com>
4762
4763 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4764 do_ubsan_in_current_function.
4765 (ubsan_maybe_instrument_reference_or_call): Likewise.
4766 * c-ubsan.h: Declare it.
4767
de35aa66
MS
47682015-01-08 Mike Stump <mikestump@comcast.net>
4769
4770 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4771
4a9a42ab
MP
47722015-01-07 Marek Polacek <polacek@redhat.com>
4773
4774 PR c/64440
4775 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4776 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4777
2f42e5de
TS
47782015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4779
4780 PR c++/31397
4781 * c.opt (Wsuggest-override): New option.
4782
5624e564
JJ
47832015-01-05 Jakub Jelinek <jakub@redhat.com>
4784
4785 Update copyright years.
4786
5bd012f8
MP
47872015-01-05 Marek Polacek <polacek@redhat.com>
4788
4789 PR c/64423
4790 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4791 parameter. Use it.
4792 * c-common.h (warn_array_subscript_with_type_char): Update
4793 declaration.
4794
a7fa8d18
ESR
47952014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4796
4797 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4798 Control macro with flag_sized_deallocation.
4799
3f8257db 48002014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4801
4802 * c.opt (Wdiscarded-array-qualifiers): New option.
4803
1f8d3e84
JJ
48042014-12-19 Jakub Jelinek <jakub@redhat.com>
4805
4806 PR preprocessor/63831
4807 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4808 and __has_cpp_attribute here.
4809 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4810 c_common_has_attribute.
4811 * c-common.h (c_common_has_attribute): New prototype.
4812 * c-lex.c (init_c_lex): Set cb->has_attribute to
4813 c_common_has_attribute instead of cb_has_attribute.
4814 (get_token_no_padding): New function.
4815 (cb_has_attribute): Renamed to ...
4816 (c_common_has_attribute): ... this. No longer static. Use
4817 get_token_no_padding, require ()s, don't build TREE_LIST
4818 unnecessarily, fix up formatting, adjust diagnostics, call
4819 init_attributes.
4820
20b06add
JM
48212014-12-15 Jason Merrill <jason@redhat.com>
4822
4823 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4824 (-Wsized-deallocation): New.
4825 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4826 to on in C++14 and up.
4827
94a073b2
JM
48282014-12-11 Jason Merrill <jason@redhat.com>
4829
acaa5911
JM
4830 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4831
94a073b2
JM
4832 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4833 we aren't complaining about VLAs.
4834
7fb66c15
MP
48352014-12-06 Marek Polacek <polacek@redhat.com>
4836
4837 PR tree-optimization/64183
4838 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4839 shift-expression if it is integer_type_node. Use types_compatible_p.
4840
b731b390
JJ
48412014-11-29 Jakub Jelinek <jakub@redhat.com>
4842
4843 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4844 last argument from create_tmp_var_raw and create_tmp_var calls.
4845 * cilk.c (gimplify_cilk_spawn): Likewise.
4846 * c-omp.c (c_finish_omp_atomic): Likewise.
4847
6a4da643
MP
48482014-11-28 Marek Polacek <polacek@redhat.com>
4849
4850 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4851 instead of unsigned_type_node.
4852
541e35a6
MP
48532014-11-28 Marek Polacek <polacek@redhat.com>
4854
4855 PR c/63862
4856 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4857 to op1_utype.
4858 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4859 expression to unsigned_type_node.
4860
dcc97066
MW
48612014-11-20 Mark Wielaard <mjw@redhat.com>
4862
4863 PR debug/38757
4864 * c-opts.c (set_std_c89): Set lang_hooks.name.
4865 (set_std_c99): Likewise.
4866 (set_std_c11): Likewise.
4867 (set_std_cxx98): Likewise.
4868 (set_std_cxx11): Likewise.
4869 (set_std_cxx14): Likewise.
4870 (set_std_cxx1z): Likewise.
4871
aa7da51a
JJ
48722014-11-21 Jakub Jelinek <jakub@redhat.com>
4873
4874 PR target/63764
4875 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4876 return type to bool.
009a3480 4877 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
4878 (convert_vector_to_pointer_for_subscript): Change return type to
4879 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4880 and copy it into a TARGET_EXPR and use that instead of *vecp
4881 directly.
4882
538dd0b7
DM
48832014-11-19 David Malcolm <dmalcolm@redhat.com>
4884
4885 Merger of git branch "gimple-classes-v2-option-3".
4886 * ChangeLog.gimple-classes: New.
4887 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4888 from being just a vec<gimple> to a vec<gbind *>.
4889
c39a5e99
JJ
48902014-11-18 Jakub Jelinek <jakub@redhat.com>
4891
4892 PR sanitizer/63813
4893 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4894 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4895 get_pointer_alignment for non-pointers. Use ptype, or if it is
4896 reference type, corresponding pointer type, as type of kind
4897 argument.
4898 (ubsan_maybe_instrument_reference,
4899 ubsan_maybe_instrument_member_call): Adjust callers.
4900
8537a4a9
MP
49012014-11-15 Marek Polacek <polacek@redhat.com>
4902
4903 PR middle-end/63884
4904 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4905 for NULL fndecl.
4906 (extract_array_notation_exprs): Return for NULL node.
4907
2079956a
JM
49082014-11-12 Joseph Myers <joseph@codesourcery.com>
4909
4910 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4911 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4912
1304953e
JJ
49132014-11-12 Jakub Jelinek <jakub@redhat.com>
4914
4915 PR c/59708
4916 * c-common.c (check_builtin_function_arguments): Handle
4917 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4918
e5e44252
AK
49192014-11-10 Andi Kleen <ak@linux.intel.com>
4920
4921 PR c/60804
4922 * c-common.h (check_no_cilk): Declare.
4923 * cilk.c (get_error_location): New function.
4924 (check_no_cilk): Dito.
4925
e64b984d
AK
49262014-11-10 Andi Kleen <ak@linux.intel.com>
4927
4928 * cilk.c (recognize_spawn): Use expression location
4929 for error message.
4930
13c21655
PC
49312014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4932
4933 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4934
42fd12b1
ESR
49352014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4936
4937 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4938 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4939 (__cpp_range_based_for, __cpp_initializer_lists,
4940 __cpp_delegating_constructors, __cpp_nsdmi,
4941 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4942 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4943 __has_cpp_attribute.
4944 * c-lex.c (cb_has_attribute): New callback CPP function;
4945 (init_c_lex): Set has_attribute callback.
4946
6f450181
RB
49472014-11-04 Richard Biener <rguenther@suse.de>
4948
4949 * c-common.c (shorten_compare): Do not shorten mixed
4950 DFP and non-DFP compares.
4951
26f0e1d6
ESR
49522014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4953
4954 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4955 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4956 Commentary and rearrangement of tests.
4957 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4958 Commentary and rearrangement of tests.
4959 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4960 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4961
ef4bddc2
RS
49622014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4963
4964 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4965 enum from machine_mode.
4966
c582198b
AM
49672014-10-28 Andrew MacLeod <amacleod@redhat.com>
4968
adfac8df
JJ
4969 * c-common.c: Adjust include files.
4970 * c-gimplify.c: Ditto.
4971 * cilk.c: Ditto.
4972 * c-pragma.c: Ditto.
4973 * c-ubsan.c: Ditto.
c582198b 4974
60393bbc
AM
49752014-10-27 Andrew MacLeod <amacleod@redhat.com>
4976
4977 * c-gimplify.c: Adjust include files.
4978
d723bb7c
MLI
49792014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4980
4981 PR c++/53061
4982 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
4983 c_common_initialize_diagnostics.
4984 * c-common.h: Likewise.
4985
90f3520e
MP
49862014-10-24 Marek Polacek <polacek@redhat.com>
4987
4988 PR c/56980
4989 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
4990 print "struct"/"union"/"enum" for typedefed names.
4991
59d7607a
MP
49922014-10-23 Marek Polacek <polacek@redhat.com>
4993
4994 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
4995 in unsigned type.
4996
d95a2703
JJ
49972014-10-22 Jakub Jelinek <jakub@redhat.com>
4998 Yury Gribov <y.gribov@samsung.com>
4999
5000 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5001 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5002 instead of flag_sanitize_recover as bool flag.
5003
8e6ef852
KY
50042014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5005
5006 * cilk.c: Revert previous change.
5007
948cf550
IZ
50082014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5009
5010 PR c/63307
5011 * cilk.c: Include vec.h.
5012 (struct cilk_decls): New structure.
5013 (wrapper_parm_cb): Split this function to...
5014 (fill_decls_vec): ...this...
5015 (create_parm_list): ...and this.
5016 (compare_decls): New function.
5017 (for_local_cb): Remove.
5018 (wrapper_local_cb): Ditto.
5019 (build_wrapper_type): For now first traverse and fill vector of
5020 declarations then sort it and then deal with sorted vector.
5021 (cilk_outline): Ditto.
5022 (declare_one_free_variable): Ditto.
5023
92574c7c
MP
50242014-10-17 Marek Polacek <polacek@redhat.com>
5025
5026 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5027 * c.opt (Wimplicit-int): Initialize to -1.
5028
83685514
AM
50292014-10-16 Andrew MacLeod <amacleod@redhat.com>
5030
5031 * c-pragma.c: Adjust include files.
5032 * c-semantics.c: Likewise.
5033
5b8300ea
DD
50342014-10-16 DJ Delorie <dj@redhat.com>
5035
5036 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5037 multiples of bytes.
5038
5f83e90b
JM
50392014-10-14 Jason Merrill <jason@redhat.com>
5040
5041 PR c++/63455
5042 * c-common.h (CPP_PREPARSED_EXPR): New.
5043 (N_CP_TTYPES): Adjust.
5044
d73326ca
MP
50452014-10-15 Marek Polacek <polacek@redhat.com>
5046
5047 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5048
78a7c317
DD
50492014-10-14 DJ Delorie <dj@redhat.com>
5050
5051 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5052 types, not just __int128.
5053 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5054 types, not just __int128.
5055 (cpp_atomic_builtins): Round pointer sizes up.
5056 (type_suffix): Use type precision, not specific types.
5057 * c-common.c (c_common_reswords): Remove __int128 special case.
5058 (c_common_type_for_size): Check for all __intN types, not just
5059 __int128.
5060 (c_common_type_for_mode): Likewise.
5061 (c_common_signed_or_unsigned_type): Likewise.
5062 (c_build_bitfield_integer_type): Likewise.
5063 (c_common_nodes_and_builtins): Likewise.
5064 (keyword_begins_type_specifier): Likewise.
5065 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5066 __intN variants.
5067
2a22f99c
TS
50682014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5069
5070 * c-common.c: Use hash_table instead of hashtab.
5071
2a8ef767
ESR
50722014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5073
adfac8df 5074 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5075 C++11 section.
5076
3c9aabbd
MG
50772014-10-03 Marc Glisse <marc.glisse@inria.fr>
5078
5079 PR c++/54427
5080 PR c++/57198
5081 PR c++/58845
5082 * c-common.c (warn_logical_operator): Punt for vectors.
5083
a15f7cb8
ESR
50842014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5085
5086 Implement SD-6: SG10 Feature Test Recommendations
5087 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5088 macros and the __has_header macro.
5089
8d0cf15e
JM
50902014-09-30 Jason Merrill <jason@redhat.com>
5091
dd5d5481
JM
5092 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5093 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5094 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5095
b752325e
JM
5096 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5097 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5098
8d0cf15e
JM
5099 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5100 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5101
083e891e
MP
51022014-09-24 Marek Polacek <polacek@redhat.com>
5103
5104 PR c/61405
5105 PR c/53874
5106 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5107
7861b648
AK
51082014-09-23 Andi Kleen <ak@linux.intel.com>
5109
5110 * c-common.c (handle_no_reorder_attribute): New function.
5111 (c_common_attribute_table): Add no_reorder attribute.
5112
9a79452d
JM
51132014-09-22 Joseph Myers <joseph@codesourcery.com>
5114
5115 * c-cppbuiltin.c (c_cpp_builtins): Define
5116 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5117 modes.
5118
dd69f047
JM
51192014-09-18 Joseph Myers <joseph@codesourcery.com>
5120
5121 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5122 for supported floating-point modes.
5123
737a4826
MLI
51242014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5125
5126 * c.opt (Wpsabi): Use LangEnabledBy.
5127 * c-opts.c (c_common_handle_option): Do not handle here.
5128
8cc4b7a2
JM
51292014-09-12 Joseph Myers <joseph@codesourcery.com>
5130
5131 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5132 macros for floating-point modes.
5133
179b5a55
MG
51342014-09-11 Marc Glisse <marc.glisse@inria.fr>
5135
5136 PR target/58757
5137 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5138 __*_DENORM_MIN__ without denormals.
5139
570a11fe
JJ
51402014-09-10 Jakub Jelinek <jakub@redhat.com>
5141
5142 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5143 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5144 ubsan_create_data callers.
5145 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5146 index is constant or BIT_AND_EXPR with constant mask and is
5147 small enough for the bound.
5148 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5149 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5150
b559c810
MLI
51512014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5152
5153 * c.opt: Add CppReason to various flags.
5154 (Wdate-time): Re-sort.
5155 * c-common.c: Include c-common.h earlier.
5156 (struct reason_option_codes_t): Delete.
5157 (c_option_controlling_cpp_error): Prefix global type and struct
5158 with cpp_.
5159
1ef33fd4
MLI
51602014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5161
5162 * c.opt (Wnormalized): New.
5163 (Wnormalized=): Use Enum and Reject Negative.
5164 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5165
66bb34c0
JM
51662014-09-08 Joseph Myers <joseph@codesourcery.com>
5167
5168 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5169 digits of floating-point modes if -fbuilding-libgcc.
5170
53d68b9f
JM
51712014-09-05 Joseph Myers <joseph@codesourcery.com>
5172
5173 * c-cppbuiltin.c (c_cpp_builtins): Also define
5174 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5175 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5176 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5177 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5178 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5179 __LIBGCC_STACK_GROWS_DOWNWARD__,
5180 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5181 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5182 __LIBGCC_DWARF_FRAME_REGISTERS__,
5183 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5184 __LIBGCC_STACK_POINTER_REGNUM__ and
5185 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5186 (builtin_define_with_value): Handle backslash-escaping in string
5187 macro values.
5188
f65586dc
RB
51892014-09-05 Richard Biener <rguenther@suse.de>
5190
5191 PR middle-end/63148
5192 * c-format.c (check_format_arg): Properly handle
5193 effectively signed POINTER_PLUS_EXPR offset.
5194
2b71f4a4
MLI
51952014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5196
5197 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5198 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5199 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5200 and Init.
5201 * c-opts.c (c_common_handle_option): Do not handle here.
5202 (sanitize_cpp_opts): Likewise.
5203 * c-common.c (struct reason_option_codes_t): Handle
5204 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5205
d2e4feca
MP
52062014-09-03 Marek Polacek <polacek@redhat.com>
5207
5208 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5209
9a771876
JJ
52102014-09-02 Jakub Jelinek <jakub@redhat.com>
5211 Balaji V. Iyer <balaji.v.iyer@intel.com>
5212 Igor Zamyatin <igor.zamyatin@intel.com>
5213
5214 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5215 * c-common.c (c_common_reswords): Added _Cilk_for.
5216 * c-common.h (enum rid): Added RID_CILK_FOR.
5217 (cilk_for_number_of_iterations): Add declaration.
5218 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5219 CILK_FOR.
5220 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5221 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5222
81b5d104
MLI
52232014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5224
5225 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5226 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5227 Wundef): Use CPP, Var and Init.
5228 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5229
b753b37b
MLI
52302014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5231
5232 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5233 * c-opts.c (c_common_handle_option): Do not handle here.
5234
028aee17
JM
52352014-08-25 Jason Merrill <jason@redhat.com>
5236
5237 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5238 -std=c++14 and -std=gnu++14, rather than the reverse.
5239 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5240 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5241 * c-common.h (cxx_dialect): Remove cxx1y.
5242
e4276ba5
ESR
52432014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5244
5245 * c-common.h (enum cxx_dialect): Add cxx14.
5246 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5247 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5248 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5249
a545cacd
JM
52502014-08-22 Jason Merrill <jason@redhat.com>
5251
5252 * c.opt (std=gnu++17): Fix alias.
5253
59ea0364
MP
52542014-08-22 Marek Polacek <polacek@redhat.com>
5255
5256 PR c++/62199
5257 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5258 check for vector types. Drop LHS argument.
5259 * c-common.h (warn_logical_not_parentheses): Adjust.
5260
596e808c
MLI
52612014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5262
5263 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5264 (Wmultichar): Likewise.
5265 (Wdate-time): Use C-family languages instead of Common. Use CPP
5266 and Var.
5267 * c-opts.c (c_common_handle_option): Do not handle the above
5268 options here.
5269 (sanitize_cpp_opts): Likewise.
5270
18767f65
MLI
52712014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5272
5273 PR fortran/44054
5274 * c-opts.c: Include tree-diagnostics.h.
5275 (c_diagnostic_finalizer): New.
5276 (c_common_initialize_diagnostics): Use it.
5277
b4413594
MLI
52782014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5279
5280 PR preprocessor/51303
5281 * c-common.c (struct reason_option_codes_t option_codes):
5282 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5283
43f9a13c
MLI
52842014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5285
5286 PR c/60975
5287 PR c/53063
5288 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5289 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5290 (c_common_post_options): Call init_global_opts_from_cpp.
5291 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5292
04159acf
MP
52932014-08-19 Marek Polacek <polacek@redhat.com>
5294
5295 PR c++/62153
5296 * c-common.c (maybe_warn_bool_compare): New function.
5297 * c-common.h (maybe_warn_bool_compare): Declare.
5298 * c.opt (Wbool-compare): New option.
5299
35aff4fb
MP
53002014-08-19 Marek Polacek <polacek@redhat.com>
5301
5302 * c.opt (Wc99-c11-compat): New option.
5303
177cce46
MP
53042014-08-19 Marek Polacek <polacek@redhat.com>
5305
5306 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5307 to warn_c90_c99_compat.
5308 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5309 to -1.
5310
6ae9194f
MLI
53112014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5312 Steven Bosscher <steven@gcc.gnu.org>
5313
5314 PR c/52952
5315 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5316 format_check_results.
5317 (check_function_format): Use true and add comment for boolean
5318 argument.
5319 (finish_dollar_format_checking): Use explicit location when warning.
5320 (check_format_info): Likewise.
5321 (check_format_arg): Set extra_arg_loc and format_string_loc.
5322 (check_format_info_main): Use explicit location when warning.
5323 (check_format_types): Pass explicit location.
5324 (format_type_warning): Likewise.
5325
8e54f6d3
MLI
53262014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5327
5328 PR fortran/44054
5329 * c-format.c: Handle Fortran flags.
5330
cd4e76fc
IZ
53312014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5332
5333 PR other/61962
5334 * array-notation-common.c (find_rank): Added handling for other
5335 types of references.
5336
f3bede71
MP
53372014-08-10 Marek Polacek <polacek@redhat.com>
5338
5339 PR c/51849
5340 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5341 * c.opt (Wc90-c99-compat): Add option.
5342
9f25a338
TS
53432014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5344
5345 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5346
62e4eb35
MP
53472014-08-03 Marek Polacek <polacek@redhat.com>
5348
5349 * c-common.c (check_case_value): Add location_t parameter. Use it.
5350 (c_add_case_label): Pass loc to check_case_value.
5351
b787e7a2
TS
53522014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5353
5354 * cilk.c: Use hash_map instead of pointer_map.
5355
6e2830c3
TS
53562014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5357
5358 * c-gimplify.c: Use hash_set instead of pointer_set.
5359
a7ee52fb
IZ
53602014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5361
5362 PR middle-end/61455
5363 * array-notation-common.c (extract_array_notation_exprs): Handling
5364 of DECL_EXPR added.
5365
944fa280
JJ
53662014-08-01 Jakub Jelinek <jakub@redhat.com>
5367
5368 * c-common.h (min_align_of_type): Removed prototype.
5369 * c-common.c (min_align_of_type): Removed.
5370 * c-ubsan.h (ubsan_maybe_instrument_reference,
5371 ubsan_maybe_instrument_member_call): New prototypes.
5372 * c-ubsan.c: Include stor-layout.h and builtins.h.
5373 (ubsan_maybe_instrument_reference_or_call,
5374 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5375 functions.
5376
b4dfdc11
MG
53772014-07-31 Marc Glisse <marc.glisse@inria.fr>
5378
5379 PR c++/60517
5380 * c.opt (-Wreturn-local-addr): Move to common.opt.
5381
a41844e5
JM
53822014-07-30 Jason Merrill <jason@redhat.com>
5383
5384 PR c++/61659
5385 PR c++/61687
5386 Revert:
5387 * c.opt (-fuse-all-virtuals): New.
5388
976d5a22
TT
53892014-07-30 Tom Tromey <tromey@redhat.com>
5390
5391 PR c/59855
5392 * c.opt (Wdesignated-init): New option.
5393 * c-common.c (c_common_attribute_table): Add "designated_init".
5394 (handle_designated_init): New function.
5395
cdc94aca
MP
53962014-07-24 Marek Polacek <polacek@redhat.com>
5397
5398 PR c/57653
5399 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5400
f41373b6
DS
54012014-07-16 Dodji Seketeli <dodji@redhat.com>
5402
5403 PR preprocessor/60723 - missing system-ness marks for macro tokens
5404 * c-ppoutput.c (struct print::prev_was_system_token): New data
5405 member.
5406 (init_pp_output): Initialize it.
5407 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5408 (do_line_change): Return a flag saying if a line marker was
5409 emitted or not.
5410 (scan_translation_unit): Detect if the system-ness of the token we
5411 are about to emit is different from the one of the previously
5412 emitted token. If so, emit a line marker. Avoid emitting useless
5413 adjacent line markers. Avoid emitting line markers for tokens
5414 originating from the expansion of built-in macros.
5415 (scan_translation_unit_directives_only): Adjust.
5416
4d661eaa
MP
54172014-07-15 Marek Polacek <polacek@redhat.com>
5418
5419 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5420 TYPE_MAX_VALUE is NULL.
5421
b108f48f
JJ
54222014-07-14 Jakub Jelinek <jakub@redhat.com>
5423
5424 PR middle-end/61294
5425 * c.opt (Wmemset-transposed-args): New warning.
5426
c0221884
JM
54272014-07-10 Jason Merrill <jason@redhat.com>
5428
5429 PR c++/61659
5430 PR c++/61687
5431 * c.opt (-fuse-all-virtuals): New.
5432
63dfbb95
RB
54332014-07-09 Richard Biener <rguenther@suse.de>
5434
5435 PR c-family/61741
5436 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5437 using unsigned arithmetic if overflow does not wrap instead of
5438 if overflow is undefined.
5439
773ec47f
MP
54402014-07-06 Marek Polacek <polacek@redhat.com>
5441
5442 PR c/6940
5443 * c.opt (Wsizeof-array-argument): New option.
5444
00a7ba58
JJ
54452014-07-03 Jakub Jelinek <jakub@redhat.com>
5446
b1726d6c 5447 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
5448 comments->count <= 1, as comments->entries might be NULL.
5449
52ec0ea3
MP
54502014-07-01 Marek Polacek <polacek@redhat.com>
5451
5452 * c.opt (Wint-conversion): New option.
5453
d5c3d343
MP
54542014-07-01 Marek Polacek <polacek@redhat.com>
5455
5456 PR c/58286
5457 * c.opt (Wincompatible-pointer-types): New option.
5458
6e7ceb17
PC
54592014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5460
5461 PR c++/51400
5462 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5463 Do not discard TYPE_QUALS of type.
5464
da73100b
JM
54652014-06-26 Jason Merrill <jason@redhat.com>
5466
5467 * c-common.h (enum cxx_dialect): Add cxx1z.
5468 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5469 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5470
08eedf75
TJ
54712014-06-26 Teresa Johnson <tejohnson@google.com>
5472
5473 * c-common.h (get_dump_info): Declare.
5474 * c-gimplify.c (c_genericize): Use saved dump files.
5475 * c-opts.c (c_common_parse_file): Begin and end dumps
5476 once around parsing invocation.
5477 (get_dump_info): New function.
5478
7b56b2f8
MP
54792014-06-23 Marek Polacek <polacek@redhat.com>
5480 Andrew MacLeod <amacleod@redhat.com>
5481
5482 PR c/61553
5483 * c-common.c (get_atomic_generic_size): Don't segfault if the
5484 type doesn't have a size.
5485
0e37a2f3
MP
54862014-06-20 Marek Polacek <polacek@redhat.com>
5487
5488 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5489 (ubsan_walk_array_refs_r): New function.
5490 (c_genericize): Instrument array bounds.
5491 * c-ubsan.c: Include "internal-fn.h".
5492 (ubsan_instrument_division): Mark instrumented arrays as having
5493 side effects. Adjust ubsan_type_descriptor call.
5494 (ubsan_instrument_shift): Likewise.
5495 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5496 (ubsan_instrument_bounds): New function.
5497 (ubsan_array_ref_instrumented_p): New function.
5498 (ubsan_maybe_instrument_array_ref): New function.
5499 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5500 (ubsan_array_ref_instrumented_p): Declare.
5501 (ubsan_maybe_instrument_array_ref): Declare.
5502
55032014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
5504
5505 PR lto/61123
5506 * c.opt (fshort-enums): Add to LTO.
5507 * c.opt (fshort-wchar): Likewise.
5508
5c3d09f7
MP
55092014-06-16 Marek Polacek <polacek@redhat.com>
5510
5511 PR c/60439
5512 * c.opt (Wswitch-bool): Add Var.
5513
9cf32741
JJ
55142014-06-12 Jakub Jelinek <jakub@redhat.com>
5515
5516 PR middle-end/61486
5517 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5518 #pragma omp target teams or
5519 #pragma omp {,target }teams distribute simd.
5520
62984918
JM
55212014-06-12 Jason Merrill <jason@redhat.com>
5522
5523 * c.opt (Wabi=, fabi-compat-version): New.
5524 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5525 (c_common_post_options): Handle flag_abi_compat_version default.
5526 Disallow -fabi-compat-version=1.
5527 * c-common.h (abi_version_crosses): New.
5528
f961457f
JH
55292014-06-11 Jan Hubicka <hubicka@ucw.cz>
5530
adfac8df 5531 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
5532 section names that are no longer trees.
5533
92d28cbb
JJ
55342014-06-10 Jakub Jelinek <jakub@redhat.com>
5535
5536 PR fortran/60928
5537 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5538 (omp_pragmas): ... back here.
5539
742938c9
MP
55402014-06-05 Marek Polacek <polacek@redhat.com>
5541
5542 PR c/49706
5543 * c-common.c (warn_logical_not_parentheses): New function.
5544 * c-common.h (warn_logical_not_parentheses): Declare.
5545 * c.opt (Wlogical-not-parentheses): New option.
5546
9d548dfb
MP
55472014-06-04 Marek Polacek <polacek@redhat.com>
5548
5549 PR c/30020
5550 * c-common.c (check_case_bounds): Add location parameter.
5551 Use it.
5552 (c_add_case_label): Pass loc to check_case_bounds.
5553
fedfecef
MP
55542014-06-03 Marek Polacek <polacek@redhat.com>
5555
5556 PR c/60439
5557 * c.opt (Wswitch-bool): New option.
5558
f6a7cffc
TS
55592014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5560
040d18b6
TS
5561 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5562 Remove prototypes.
5563 (record_types_used_by_current_var_decl): Move prototype to where
5564 it belongs.
5565
f6a7cffc
TS
5566 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5567 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5568 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5569
632f2871
RS
55702014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5571
5572 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5573 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5574 void_zero_node.
5575 * c-pretty-print.c (pp_c_void_constant): New function.
5576 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5577 (c_pretty_printer::expression): Handle VOID_CST.
5578 * cilk.c (extract_free_variables): Likewise.
5579 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5580 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5581
766090c2
TS
55822014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5583
5584 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5585 * c-pragma.c (push_alignment): Adjust.
5586 (handle_pragma_push_options): Likewise.
5587
661a0813
MP
55882014-05-09 Marek Polacek <polacek@redhat.com>
5589
5590 PR c/50459
5591 * c-common.c (check_user_alignment): Return -1 if alignment is error
5592 node.
5593 (handle_aligned_attribute): Don't call default_conversion on
5594 FUNCTION_DECLs.
5595 (handle_vector_size_attribute): Likewise.
5596 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5597 (handle_sentinel_attribute): Call default_conversion and allow even
5598 integral types as an argument.
5599
2793eeab
MP
56002014-05-08 Marek Polacek <polacek@redhat.com>
5601
5602 PR c/61053
5603 * c-common.c (min_align_of_type): New function factored out from...
5604 (c_sizeof_or_alignof_type): ...here.
5605 * c-common.h (min_align_of_type): Declare.
5606
f827930a
MP
56072014-05-08 Marek Polacek <polacek@redhat.com>
5608
5609 PR c/61077
5610 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5611 parameter type of main.
5612
ca49b74e
DD
56132014-05-07 DJ Delorie <dj@redhat.com>
5614
5615 * c-cppbuiltin.c (print_bits_of_hex): New.
5616 (builtin_define_type_minmax): Print values using hex so as not to
5617 require a pre-computed list of string values.
5618
1d60af08
KZ
56192014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5620 Mike Stump <mikestump@comcast.net>
5621 Richard Sandiford <rdsandiford@googlemail.com>
5622
5623 * c-ada-spec.c: Include wide-int.h.
5624 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5625 (dump_generic_ada_node): Use wide-int interfaces.
5626 * c-common.c: Include wide-int-print.h.
5627 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5628 (pointer_int_sum): Use wide-int interfaces.
5629 (c_common_nodes_and_builtins): Use make_int_cst.
5630 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5631 (handle_alloc_size_attribute): Use wide-int interfaces.
5632 (get_nonnull_operand): Likewise.
5633 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5634 * c-lex.c: Include wide-int.h.
5635 (narrowest_unsigned_type): Take a widest_int rather than two
5636 HOST_WIDE_INTs.
5637 (narrowest_signed_type): Likewise.
5638 (interpret_integer): Update accordingly. Use wide-int interfaces.
5639 (lex_charconst): Use wide-int interfaces.
5640 * c-pretty-print.c: Include wide-int.h.
5641 (pp_c_integer_constant): Use wide-int interfaces.
5642 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5643 INT_CST_LT_UNSIGNED.
5644
b15458be
RB
56452014-05-06 Richard Biener <rguenther@suse.de>
5646
5647 * c-opts.c (c_common_post_options): For -freestanding,
5648 -fno-hosted and -fno-builtin disable pattern recognition
5649 if not enabled explicitely.
5650
6577374e
MP
56512014-05-02 Marek Polacek <polacek@redhat.com>
5652
5653 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5654
d00887e8
MP
56552014-05-01 Marek Polacek <polacek@redhat.com>
5656
5657 PR c/43245
5658 * c.opt (Wdiscarded-qualifiers): Add.
5659
f8ed5150
MP
56602014-04-30 Marek Polacek <polacek@redhat.com>
5661
5662 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5663 INT_MIN / -1 sanitization only for integer types.
5664
45484dcf
MP
56652014-04-25 Marek Polacek <polacek@redhat.com>
5666
5667 PR c/18079
5668 * c-common.c (handle_noinline_attribute): Warn if the attribute
5669 conflicts with always_inline attribute.
5670 (handle_always_inline_attribute): Warn if the attribute conflicts
5671 with noinline attribute.
5672
38e514c0
MP
56732014-04-25 Marek Polacek <polacek@redhat.com>
5674
5675 PR c/60156
5676 * c-common.c (check_main_parameter_types): Warn about variadic main.
5677
44875f92
MS
56782014-04-24 Mike Stump <mikestump@comcast.net>
5679
5680 * c.opt (Wshadow-ivar): Default to on.
5681
dcaaa5a0
DP
56822014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5683
5684 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5685
c07d7c02
MP
56862014-04-23 Marek Polacek <polacek@redhat.com>
5687
5688 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5689
1c33c9b7
JJ
56902014-04-22 Jakub Jelinek <jakub@redhat.com>
5691
5692 PR sanitizer/60275
5693 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5694 if flag_sanitize_undefined_trap_on_error.
5695 (ubsan_instrument_division, ubsan_instrument_shift,
5696 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5697 if !flag_sanitize_recover.
5698
793c625f
MG
56992014-04-22 Marc Glisse <marc.glisse@inria.fr>
5700
5701 PR libstdc++/43622
5702 * c-common.c (registered_builtin_types): Make non-static.
5703 * c-common.h (registered_builtin_types): Declare.
5704
b0f1bf36
RB
57052014-04-14 Richard Biener <rguenther@suse.de>
5706 Marc Glisse <marc.glisse@inria.fr>
5707
5708 PR c/60819
5709 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5710 apply may-alias the scalar pointer type when applicable.
5711
3b07fa4a
IZ
57122014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5713
5714 PR middle-end/60467
5715 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5716 as possible argument for Cilk_spawn.
5717
cbbd2b1c
TB
57182014-04-11 Tobias Burnus <burnus@net-b.de>
5719
5720 PR c/60194
5721 * c.opt (Wformat-signedness): Add
5722 * c-format.c(check_format_types): Use it.
5723
6415bd5d
JM
57242014-04-11 Jason Merrill <jason@redhat.com>
5725
5726 PR c++/57926
5727 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5728 default_conversion for an array argument.
5729
6525783a
MP
57302014-04-08 Marek Polacek <polacek@redhat.com>
5731
5732 PR sanitizer/60745
5733 * c-ubsan.c: Include asan.h.
5734 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5735
880a467b
NS
57362014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5737
5738 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5739
7b59ff2d
MP
57402014-04-02 Marek Polacek <polacek@redhat.com>
5741
5742 * c-common.h (c_expand_expr): Remove declaration.
5743
8edbfaa6
JJ
57442014-03-28 Jakub Jelinek <jakub@redhat.com>
5745
5746 PR c++/60689
5747 * c-common.c (add_atomic_size_parameter): When creating new
5748 params vector, push the size argument first.
5749
07d72e1d
JJ
57502014-03-26 Jakub Jelinek <jakub@redhat.com>
5751
5752 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5753 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5754 ubsan_create_data callers.
5755
b35e0fa0
JJ
57562014-03-22 Jakub Jelinek <jakub@redhat.com>
5757
5758 PR debug/60603
5759 * c-opts.c (c_finish_options): Restore cb_file_change call to
5760 <built-in>.
5761
39a1ebb3
JJ
57622014-03-13 Jakub Jelinek <jakub@redhat.com>
5763
5764 PR middle-end/36282
5765 * c-pragma.c (apply_pragma_weak): Only look at
5766 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5767 DECL_ASSEMBLER_NAME_SET_P (decl).
5768 (maybe_apply_pending_pragma_weaks): Exit early if
5769 vec_safe_is_empty (pending_weaks) rather than only when
5770 !pending_weaks.
5771 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5772 set assembler name back to NULL afterwards.
5773
a07f6ed2
JM
57742014-03-11 Jason Merrill <jason@redhat.com>
5775
5776 * c.opt: Add -std=gnu++14.
5777
75b107f5
IB
57782014-03-11 Ian Bolton <ian.bolton@arm.com>
5779
5780 * c-opts.c (c_common_post_options): Don't override
5781 -ffp-contract=fast if unsafe-math-optimizations is on.
5782
f42c637e
PM
57832014-03-08 Paulo Matos <paulo@matos-sorge.com>
5784
22b15758 5785 * c.opt: Enable LTO FE for fshort-double.
f42c637e 5786
70e24808
JM
57872014-03-07 Jason Merrill <jason@redhat.com>
5788
5789 * c.opt: Add -std=c++14.
5790
3af9c5e9
MP
57912014-03-06 Marek Polacek <polacek@redhat.com>
5792
5793 PR c/60197
5794 * cilk.c (contains_cilk_spawn_stmt): New function.
5795 (contains_cilk_spawn_stmt_walker): Likewise.
5796 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5797 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5798
b3bdf019
JJ
57992014-03-03 Jakub Jelinek <jakub@redhat.com>
5800
5801 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5802 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5803 even when flag_preprocess_only.
5804
ca7e759d
JM
58052014-02-26 Jason Merrill <jason@redhat.com>
5806
5807 PR c++/59231
5808 PR c++/11586
5809 * c-common.c (shorten_compare): Don't check
5810 c_inhibit_evaluation_warnings.
5811
28e41874
JJ
58122014-02-19 Jakub Jelinek <jakub@redhat.com>
5813
cca615af
JJ
5814 PR c/37743
5815 * c-common.c (c_common_nodes_and_builtins): When initializing
5816 c_uint{16,32,64}_type_node, also set corresponding
5817 uint{16,32,64}_type_node to the same value.
5818
28e41874
JJ
5819 PR c++/60267
5820 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5821 for PRAGMA_IVDEP if flag_preprocess_only.
5822
c2bf53a1
JJ
58232014-02-12 Jakub Jelinek <jakub@redhat.com>
5824
5825 PR c/60101
5826 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5827 if false, add ADD itself, rather than vice versa.
5828 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5829 copy. For SAVE_EXPR, only call merge_tlist once.
5830
8fcbce72
JJ
58312014-02-08 Jakub Jelinek <jakub@redhat.com>
5832
5833 PR middle-end/60092
5834 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5835 and tree_to_uhwi.
5836 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5837 functions.
5838 (c_common_attribute_table): Add alloc_align and assume_aligned
5839 attributes.
5840
0a756a3f
MP
58412014-02-06 Marek Polacek <polacek@redhat.com>
5842
5843 PR c/60087
5844 * c-common.c (warn_for_sign_compare): Call warning_at with location
5845 instead of warning.
5846
7ec4847a
MP
58472014-02-05 Marek Polacek <polacek@redhat.com>
5848
5849 PR c/53123
5850 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5851 statement.
5852
66f20604
MP
58532014-02-04 Marek Polacek <polacek@redhat.com>
5854
5855 PR c/60036
5856 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5857 SAVE_EXPR.
5858
5d77fb19
MG
58592014-02-03 Marc Glisse <marc.glisse@inria.fr>
5860
5861 PR c++/53017
5862 PR c++/59211
5863 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5864 handle_vector_size_attribute, handle_nonnull_attribute): Call
5865 default_conversion on the attribute argument.
5866 (handle_nonnull_attribute): Increment the argument number.
5867
81e5eca8
MP
58682014-01-31 Marek Polacek <polacek@redhat.com>
5869
5870 PR c/59963
5871 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5872 build_function_call_vec.
5873 (resolve_overloaded_builtin): Likewise.
5874 * c-common.h (build_function_call_vec): Adjust declaration.
5875
68fca595
MP
58762014-01-30 Marek Polacek <polacek@redhat.com>
5877
5878 PR c/59940
5879 * c-common.h (unsafe_conversion_p): Adjust declaration.
5880 (warnings_for_convert_and_check): Likewise.
5881 (convert_and_check): Likewise.
5882 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5883 expansion_point_location_if_in_system_header on it.
5884 (warnings_for_convert_and_check): Add location parameter. Call
5885 expansion_point_location_if_in_system_header on it. Use it.
5886 (convert_and_check): Add location parameter. Use it.
5887 (conversion_warning): Likewise.
5888 (c_add_case_label): Adjust convert_and_check calls.
5889 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5890
b72271b9
BI
58912014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5892
5893 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5894 flag_cilkplus.
5895 * c-pragma.c (init_pragma): Likewise.
5896 * c.opt: Likewise.
5897
393e8e8b
MP
58982014-01-23 Marek Polacek <polacek@redhat.com>
5899
5900 PR c/59846
5901 * c-common.c (shorten_compare): Add location_t parameter.
5902 * c-common.h (shorten_binary_op): Adjust declaration.
5903
f04dda30
MP
59042014-01-23 Marek Polacek <polacek@redhat.com>
5905
5906 PR c/58346
5907 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5908 * c-common.h: Declare it.
5909
621955cb
EB
59102014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5911
5912 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5913 * c-ada-spec.c (dump_ads): Likewise.
5914 (cpp_check): Likewise.
5915 (dump_ada_specs): Likewise.
5916
59172014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
5918
5919 PR c++/49718
5920 * c-common.c (handle_no_instrument_function_attribute): Allow
5921 no_instrument_function attribute in class member
5922 definition/declaration.
5923
241f845a
JJ
59242014-01-15 Jakub Jelinek <jakub@redhat.com>
5925
5926 PR c/58943
5927 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5928 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5929 being COMPOUND_EXPR.
5930 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5931 operand a SAVE_EXPR and second MODIFY_EXPR.
5932
e83b8e2e
JJ
59332014-01-09 Jakub Jelinek <jakub@redhat.com>
5934
5935 PR target/58115
5936 * c-pch.c (c_common_write_pch): Call
5937 prepare_target_option_nodes_for_pch.
5938
23a5b65a
RS
59392014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5940
5941 Update copyright years
5942
f9030485
RS
59432014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5944
5945 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5946 the copyright notice.
5947
f2aa696b
EB
59482013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5949
5950 * c-ada-spec.c (print_constructor): New function.
5951 (print_destructor): Retrieve the origin of the destructor.
5952 (print_ada_declaration): Revamp handling of constructors/destructors.
5953
3f8257db 59542013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
5955 Bill Maddox <maddox@google.com>
5956 Jason Merrill <jason@redhat.com>
5957
5958 * c.opt: Add -fdeclone-ctor-dtor.
5959 * c-opts.c (c_common_post_options): Default to on iff -Os.
5960
41958c28
BI
59612013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5962
5963 * c-common.c (c_common_attribute_table): Added "cilk simd function"
5964 attribute.
5965 * c-pragma.h (enum pragma_cilk_clause): Remove.
5966 (enum pragma_omp_clause): Added the following fields:
5967 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5968 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5969 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5970 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5971 PRAGMA_CILK_CLAUSE_UNIFORM.
5972
b1726d6c 5973
12893402
BI
59742013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5975
5976 * cilk.c (cilk_outline): Made this function non-static.
5977 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
5978 (create_cilk_wrapper): Added a new parameter: a function pointer.
5979 (c_install_body_w_frame_cleanup): Remove
5980 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
5981 * c-common.h (cilk_outline): New prototype.
5982 (gimplify_cilk_spawn): Removed two parameters.
5983 (cilk_install_body_with_frame_cleanup): New prototype.
5984 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
5985 CILK_SPAWN_STMT case.
5986
085b42ed
BS
59872013-12-11 Bernd Schmidt <bernds@codesourcery.com>
5988
2ce064c3
BS
5989 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
5990
085b42ed
BS
5991 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
5992 (int_array_type_node): Remove.
5993 * c-common.c (c_common_nodes_and_builtins): Don't build it.
5994
9e36c9ed
MP
59952013-12-05 Marek Polacek <polacek@redhat.com>
5996
5997 PR c/52023
5998 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
5999 [ADJUST_FIELD_ALIGN].
6000
296674db
JM
60012013-12-04 Joseph Myers <joseph@codesourcery.com>
6002
6003 PR c/52023
6004 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6005 and check field alignment if set.
6006 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6007 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6008
b1726d6c 60092013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6010 Marek Polacek <polacek@redhat.com>
6011
6012 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6013 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6014
d7947e19
L
60152013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6016
6017 PR c/59309
6018 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6019 arguments.
6020
fad7652e
JJ
60212013-11-29 Jakub Jelinek <jakub@redhat.com>
6022
6023 PR c/59280
6024 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6025 goto invalid. If it is error_mark_node, don't issue further
6026 diagnostics.
6027
8b5e1202
SO
60282013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6029
6030 * c.opt (Wopenmp-simd): New.
6031
0a508bb6
JJ
60322013-11-22 Jakub Jelinek <jakub@redhat.com>
6033
6034 * c-ubsan.h (ubsan_instrument_return): New prototype.
6035 * c-ubsan.c (ubsan_instrument_return): New function.
6036
2fb9a547
AM
60372013-11-22 Andrew MacLeod <amacleod@redhat.com>
6038
6039 * c-common.c: Add required include files from gimple.h.
6040 * c-gimplify.c: Likewise
6041 * cilk.c: Likewise
6042
8400e75e
DM
60432013-11-22 David Malcolm <dmalcolm@redhat.com>
6044
6045 * c-common.c (unsafe_conversion_p): Remove use of
6046 EXPR_LOC_OR_HERE macro.
6047 (conversion_warning): Likewise.
6048 (warnings_for_convert_and_check): Likewise.
6049 (warn_for_collisions_1): Likewise.
6050 (shorten_compare): Likewise, and remove use of in_system_header
6051 macro, using the location from the former.
6052 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6053 (cb_def_pragma): Remove use of in_system_header macro.
6054 (lex_string): Likewise.
6055 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6056
eb1ce453
KZ
60572013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6058 Mike Stump <mikestump@comcast.net>
6059 Richard Sandiford <rdsandiford@googlemail.com>
6060
6061 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6062 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6063 tree_fits_shwi_p or tree_fits_uhwi_p.
6064 (dump_generic_ada_node): Likewise.
6065 * c-format.c (check_format_arg): Likewise.
6066 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6067
6b3b8c27
KZ
60682013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6069
6070 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6071
49b0aa18
JC
60722013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6073
6074 PR c/53001
6075 * c-common.c (unsafe_conversion_p): Make this function
6076 return an enumeration with more detail.
6077 (conversion_warning): Use the new return type of
6078 unsafe_conversion_p to separately warn either about conversions
6079 that lower floating point number precision or about the other
6080 kinds of conversions.
6081 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6082 (unsafe_conversion_p): switching return type to
6083 conversion_safety enumeration.
49b0aa18
JC
6084 * c.opt: Adding new warning -Wfloat-conversion and
6085 enabling it with -Wconversion.
6086
b826515a
BS
60872013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6088
8e745a17
JJ
6089 * c-opts.c: Include plugin.h.
6090 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6091
b9a55b13
MP
60922013-11-19 Marek Polacek <polacek@redhat.com>
6093
6094 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6095 call.
6096 (ubsan_instrument_shift): Likewise.
6097 (ubsan_instrument_vla): Likewise.
6098
7d362f6c
RS
60992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6100
6101 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6102 cast to unsigned type.
6103
386b1f1f
RS
61042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6105
6106 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6107 tree_low_cst.
6108 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6109 rather than tree_low_cst.
6110
ae7e9ddd
RS
61112013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6112
6113 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6114 tree_to_uhwi throughout.
6115
9439e9a1
RS
61162013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6117
6118 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6119 tree_low_cst (..., 0) with tree_to_shwi throughout.
6120
cc269bb6
RS
61212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6122
6123 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6124 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6125
9541ffee
RS
61262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6127
6128 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6129 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6130
c02065fc
AH
61312013-11-15 Aldy Hernandez <aldyh@redhat.com>
6132
6133 * c-cilkplus.c: New file.
6134 * c-common.c (readonly_error): Add location argument.
6135 * c-common.h (readonly_error): Same.
6136 (c_finish_cilk_clauses): Protoize.
6137 (c_check_cilk_loop): Same.
6138 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6139 Do not fail on error_mark_node.
6140 Abstract increment canonicalization to here...
6141 (c_omp_for_incr_canonicalize_ptr): New.
6142 c-pragma.c (init_pragma): Register "simd" pragma.
6143 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6144 (enum pragma_cilk_clause): New.
6145
9cc65f15
RS
61462013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6147
6148 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6149 wchar_type and host_integerp checks.
6150
18f429e2
AM
61512013-11-14 Andrew MacLeod <amacleod@redhat.com>
6152
6153 * c-common.c: Likewise.
6154 * c-gimplify.c: Likewise.
6155 * cilk.c: Likewise.
6156
d8a2d370
DN
61572013-11-14 Diego Novillo <dnovillo@google.com>
6158
6159 * c-common.c: Include fold-const.h.
6160 Include stor-layout.h.
6161 Include calls.h.
6162 Include stringpool.h.
6163 Include attribs.h.
6164 Include varasm.h.
6165 Include trans-mem.h.
6166 * c-cppbuiltin.c: Include stor-layout.h.
6167 Include stringpool.h.
6168 * c-format.c: Include stringpool.h.
6169 * c-lex.c: Include stringpool.h.
6170 Include stor-layout.h.
6171 * c-pragma.c: Include stringpool.h.
6172 Include attribs.h.
6173 Include varasm.h.
6174 Include gcc-symtab.h.
6175 * c-pretty-print.c: Include stor-layout.h.
6176 Include attribs.h.
6177 * cilk.c: Include stringpool.h.
6178 Include calls.h.
6179
38b7bc7f
JM
61802013-11-13 Joseph Myers <joseph@codesourcery.com>
6181
6182 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6183 * c-common.c (c_common_reswords): Add __auto_type.
6184 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6185
45b0be94
AM
61862013-11-12 Andrew MacLeod <amacleod@redhat.com>
6187
18f429e2
AM
6188 * c-common.c: Include gimplify.h.
6189 * c-gimplify.c: Likewise.
6190 * cilk.c: Likewise.
6191 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6192 * c-ubsan.c: Don't include gimple.h.
45b0be94 6193
582d9b50
JM
61942013-11-12 Joseph Myers <joseph@codesourcery.com>
6195
6196 * c-common.c (c_common_reswords): Add _Thread_local.
6197
6b28e197
JM
61982013-11-09 Joseph Myers <joseph@codesourcery.com>
6199
6200 * c-common.c (atomic_size_supported_p): New function.
6201 (resolve_overloaded_atomic_exchange)
6202 (resolve_overloaded_atomic_compare_exchange)
6203 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6204 Use it instead of comparing size with a local list of sizes.
6205
267bac10
JM
62062013-11-07 Andrew MacLeod <amacleod@redhat.com>
6207 Joseph Myers <joseph@codesourcery.com>
6208
6209 * c-common.h (enum rid): Add RID_ATOMIC.
6210 * c-common.c (c_common_reswords): Add _Atomic.
6211 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6212 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6213 * c-format.c (check_format_types): Check for extra _Atomic
6214 qualifiers in format argument.
6215 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6216 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6217
5157b91e
TB
62182013-11-06 Tobias Burnus <burnus@net-b.de>
6219
6220 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6221
6dbe0958
JM
62222013-11-06 Joseph Myers <joseph@codesourcery.com>
6223
6224 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6225 standards modes.
6226 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6227 to mean lack of IEEE 754 support.
6228
e8ff5196
TB
62292013-11-05 Tobias Burnus <burnus@net-b.de>
6230
6231 * c.opt (-Wdate-time): New option
6232 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6233
254a0760
JM
62342013-11-05 Joseph Myers <joseph@codesourcery.com>
6235
6236 * c-cppbuiltin.c (cpp_iec_559_value): Test
6237 flag_excess_precision_cmdline not flag_excess_precision.
6238
6d7f7e0a
TB
62392013-11-05 Tobias Burnus <burnus@net-b.de>
6240
6241 * c.opt (fopenmp-simd): New option.
6242 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6243 (omp_pragmas): ... this new struct.
6244 (c_pp_lookup_pragma): Also walk omp_pragmas.
6245 (init_pragma): Init pragmas for -fopenmp-simd.
6246
55a7f02f
MP
62472013-11-04 Marek Polacek <polacek@redhat.com>
6248
6249 PR c++/58979
6250 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6251
9193fb05
JM
62522013-11-04 Joseph Myers <joseph@codesourcery.com>
6253
6254 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6255 New functions.
6256 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6257
94159ecf
EB
62582013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6259
6260 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6261 (dump_ada_specs): Adjust prototype of second callback.
6262 * c-ada-spec.c (cpp_check): New global variable.
6263 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6264 (print_generic_ada_decl): Likewise.
6265 (has_static_fields): Change return type to bool and add guard.
6266 (has_nontrivial_methods): New predicate.
6267 (is_tagged_type): Change return type to bool.
6268 (separate_class_package): Call has_nontrivial_methods.
6269 (pp_ada_tree_identifier): Minor tweaks.
6270 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6271 (dump_ada_array_domains): Likewise.
6272 (dump_ada_array_type): Likewise.
6273 (dump_template_types): Remove cpp_check parameter and do not pass it to
6274 dump_generic_ada_node.
6275 (dump_ada_template): Likewise.
6276 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6277 recursively.
6278 (print_ada_methods): Change return type to integer. Remove cpp_check
6279 parameter and do not pass it down.
6280 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6281 dump_generic_ada_node.
6282 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6283 accessing methods.
6284 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6285 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6286 value of print_ada_methods.
6287 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6288 Set cpp_check to it before invoking dump_ada_nodes.
6289 (dump_ada_specs): Likewise.
6290
b906f4ca
MP
62912013-11-03 Marek Polacek <polacek@redhat.com>
6292
6293 * c-ubsan.c: Don't include hash-table.h.
6294 (ubsan_instrument_vla): New function.
6295 * c-ubsan.h: Declare it.
6296
5e20cdc9
DM
62972013-10-31 David Malcolm <dmalcolm@redhat.com>
6298
6299 Automated part of renaming of symtab_node_base to symtab_node.
6300
6301 Patch autogenerated by rename_symtab.py from
6302 https://github.com/davidmalcolm/gcc-refactoring-scripts
6303 revision 58bb219cc090b2f4516a9297d868c245495ee622
6304
6305 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6306 symtab_node_base to symtab_node.
6307
7057e645
ESR
63082013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6309
8e745a17 6310 Implement C++14 digit separators.
7057e645
ESR
6311 * c-lex.c (interpret_float): Remove digit separators from scratch string
6312 before building real literal.
6313
193ea7bc
JJ
63142013-10-30 Jakub Jelinek <jakub@redhat.com>
6315
6316 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6317
939b37da
BI
63182013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6319
6320 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6321 fields.
6322 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6323 enabled.
6324 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6325 (insert_cilk_frame): New prototype.
6326 (cilk_init_builtins): Likewise.
6327 (gimplify_cilk_spawn): Likewise.
6328 (c_cilk_install_body_w_frame_cleanup): Likewise.
6329 (cilk_detect_spawn_and_unwrap): Likewise.
6330 (cilk_set_spawn_marker): Likewise.
6331 (build_cilk_sync): Likewise.
6332 (build_cilk_spawn): Likewise.
6333 * cilk.c: New file.
6334
67348ccc
DM
63352013-10-29 David Malcolm <dmalcolm@redhat.com>
6336
6337 Patch autogenerated by refactor_symtab.py from
6338 https://github.com/davidmalcolm/gcc-refactoring-scripts
6339 revision 58bb219cc090b2f4516a9297d868c245495ee622
6340
6341 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6342 to a true class hierarchy.
6343 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6344
d570872d
RS
63452013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6346
6347 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6348
98906124
JL
63492013-10-26 Jeff Law <law@redhat.com>
6350
adfac8df
JJ
6351 * c-common.c (c_define_builtins): Remove mudflap support.
6352 * c.opt: Ignore and warn for mudflap options.
98906124 6353
d73749df 63542013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6355
6356 PR other/33426
6357 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6358 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6359
3f04b1bb
JM
63602013-10-23 Jason Merrill <jason@redhat.com>
6361
6362 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6363
acf0174b
JJ
63642013-10-11 Jakub Jelinek <jakub@redhat.com>
6365
acd15a28
JJ
6366 * c-common.h (omp_clause_mask::operator !=): New method.
6367 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6368 instead of if (mask & something) tests everywhere.
6369
acf0174b
JJ
6370 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6371 201307 instead of 201107.
6372 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6373 (c_common_attribute_table): Add "omp declare target" and
6374 "omp declare simd" attributes.
6375 (handle_omp_declare_target_attribute,
6376 handle_omp_declare_simd_attribute): New functions.
6377 * c-omp.c: Include c-pragma.h.
6378 (c_finish_omp_taskgroup): New function.
6379 (c_finish_omp_atomic): Add swapped argument, if true,
6380 build the operation first with rhs, lhs arguments and use NOP_EXPR
6381 build_modify_expr.
6382 (c_finish_omp_for): Add code argument, pass it down to make_code.
6383 (c_omp_split_clauses): New function.
6384 (c_split_parallel_clauses): Removed.
6385 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6386 c_omp_declare_simd_clauses_to_decls): New functions.
6387 * c-common.h (omp_clause_mask): New type.
6388 (OMP_CLAUSE_MASK_1): Define.
6389 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6390 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6391 omp_clause_mask::operator |, omp_clause_mask::operator &,
6392 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6393 omp_clause_mask::operator ==): New methods.
6394 (enum c_omp_clause_split): New.
6395 (c_finish_omp_taskgroup): New prototype.
6396 (c_finish_omp_atomic): Add swapped argument.
6397 (c_finish_omp_for): Add code argument.
6398 (c_omp_split_clauses): New prototype.
6399 (c_split_parallel_clauses): Removed.
6400 (c_omp_declare_simd_clauses_to_numbers,
6401 c_omp_declare_simd_clauses_to_decls): New prototypes.
6402 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6403 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6404 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6405 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6406 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6407 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6408 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6409 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6410 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6411 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6412 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6413 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6414 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6415 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6416 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6417 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6418 PRAGMA_OMP_CLAUSE_UNIFORM.
6419
826cacfe
MG
64202013-10-09 Marc Glisse <marc.glisse@inria.fr>
6421
6422 PR tree-optimization/20318
6423 * c-common.c (handle_returns_nonnull_attribute): New function.
6424 (c_common_attribute_table): Add returns_nonnull.
6425
2284b034
MG
64262013-10-03 Marc Glisse <marc.glisse@inria.fr>
6427
6428 PR c++/19476
6429 * c.opt (fcheck-new): Move to common.opt.
6430
b56e9788
MP
64312013-09-25 Marek Polacek <polacek@redhat.com>
6432 Jakub Jelinek <jakub@redhat.com>
6433
6434 PR sanitizer/58413
6435 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6436 an expression if we can prove it is correct.
6437 (ubsan_instrument_division): Likewise. Remove unnecessary
6438 check.
6439
ce6923c5
MP
64402013-09-18 Marek Polacek <polacek@redhat.com>
6441
6442 PR sanitizer/58411
6443 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6444 Declare it.
6445 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6446
fb5610fb
IS
64472013-09-14 Iain Sandoe <iain@codesourcery.com>
6448
6449 PR target/48094
6450 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6451 fobjc-gc, freplace-objc-classes): Accept for LTO.
6452
88b0e79e
JC
64532013-09-13 Jacek Caban <jacek@codeweavers.com>
6454
6455 * c-target.def: New hook
6456
c9b0866a
PC
64572013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6458
6459 PR c++/43452
6460 * c.opt (Wdelete-incomplete): Add.
6461
0af94e6f
JR
64622013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6463
6464 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6465 (vector_types_compatible_elements_p): New function.
6466 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6467 declaration.
6468 (vector_types_compatible_elements_p): Declare.
6469
7c26172c
GDR
64702013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6471
6472 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6473 a virtual member function.
6474 (pp_simple_type_specifier): Remove.
6475 (pp_c_type_specifier): Likewise.
6476 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6477 Rename from pp_c_type_specifier. Adjust.
6478 (c_pretty_printer::c_pretty_printer): Do not assign to
6479 simple_type_specifier.
6480
20059c8b
GDR
64812013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6482
6483 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6484 member function.
6485 (c_pretty_printer::storage_class_specifier): Likewise.
6486 (c_pretty_printer::initializer): Likewise.
6487 (pp_declaration): Remove.
6488 (pp_declaration_specifiers): Likewise.
6489 (pp_abstract_declarator): Likewise.
6490 (pp_declarator): Likewise.
6491 (pp_type_id): Likewise.
6492 (pp_statement): Likewise.
6493 (pp_constant): Likewise.
6494 (pp_id_expression): Likewise.
6495 (pp_primary_expression): Likewise.
6496 (pp_unary_expression): Likewise.
6497 (pp_multiplicative_expression): Likewise.
6498 (pp_conditional_expression): Likewise.
6499 (pp_assignment_expression): Likewise.
6500 (pp_expression): Likewise.
6501 (pp_c_type_id): Likewise.
6502 (pp_c_storage_class_specifier): Likewise.
6503 * c-pretty-print.c (pp_c_type_cast): Tidy.
6504 (pp_c_pointer): Likewise.
6505 (pp_c_type_specifier): Likewise.
6506 (pp_c_parameter_type_list): Likewise.
6507 (pp_c_function_definition): Likewise.
6508 (pp_c_init_declarator): Likewise.
6509 (pp_c_initializer_list): Likewise.
6510 (pp_c_constructor_elts): Likewise.
6511 (c_pretty_printer::direct_abstract_declarator): Likewise.
6512 (c_pretty_printer::declaration_specifiers): Likewise.
6513 (c_pretty_printer::primary_expression): Likewise.
6514 (c_pretty_printer::postfix_expression): Likewise.
6515 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6516 (c_pretty_printer::storage_class_specifier): Rename from
6517 pp_c_storage_class_specifier.
6518 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6519 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6520 storage_class_specifier, initializer, offset_list, flags.
6521
de5a5fa1
MP
65222013-08-30 Marek Polacek <polacek@redhat.com>
6523
6524 * c-ubsan.c: New file.
6525 * c-ubsan.h: New file.
6526
8f0e4d72
GDR
65272013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6528
6529 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6530 member function.
6531 (c_pretty_printer::declaration_specifiers): Likewise.
6532 (c_pretty_printer::declarator): Likewise.
6533 (c_pretty_printer::abstract_declarator): Likewise.
6534 (c_pretty_printer::direct_abstract_declarator): Likewise.
6535 (c_pretty_printer::direct_declarator): Likewise.
6536 (c_pretty_printer::function_specifier): Likewise.
6537 (pp_declaration): Adjust.
6538 (pp_declaration_specifiers): Likewise.
6539 (pp_abstract_declarator): Likewise.
6540 (pp_direct_declarator): Likewise.
6541 (pp_function_specifier): Likewise.
6542 (pp_direct_abstract_declarator): Remove as unused.
6543 (pp_c_declaration): Remove.
6544 (pp_c_declaration_specifiers): Likewise.
6545 (pp_c_declarator): Likewise.
6546 (pp_c_direct_declarator): Likewise.
6547 (pp_c_function_specifier): Likewise.
6548 (pp_c_direct_abstract_declarator): Likewise.
6549 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6550 from pp_c_abstract_declarator. Adjust.
6551 (c_pretty_printer::direct_abstract_declarator): Rename from
6552 pp_c_direct_abstract_declarator. Adjust.
6553 (c_pretty_printer::function_specifier): Rename from
6554 pp_c_function_specifier. Adjust.
6555 (c_pretty_printer::declaration_specifiers): Rename from
6556 pp_c_declaration_specifiers. Adjust.
6557 (c_pretty_printer::direct_declarator): Rename from
6558 pp_c_direct_declarator. Adjust.
6559 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6560 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6561 (c_pretty_printer::c_pretty_printer): Do not assign to
6562 declaration, declaration_specifiers, declarator,
6563 direct_declarator, direct_abstract_declarator, function_specifier.
6564
00d34d3a
GDR
65652013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6566
6567 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6568 virtual member function.
6569 (c_pretty_printer::multiplicative_expression): Likewise.
6570 (c_pretty_printer::conditional_expression): Likewise.
6571 (c_pretty_printer::assignment_expression): Likewise.
6572 (c_pretty_printer::expression): Likewise.
6573 (pp_unary_expression): Adjust.
6574 (pp_multiplicative_expression): Likewise.
6575 (pp_assignment_expression): Likewise.
6576 (pp_conditional_expression): Likewise.
6577 (pp_expression): Likewise.
6578 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6579 from pp_c_unary_expression. Adjust.
6580 (c_pretty_printer::multiplicative_expression): Rename from
6581 pp_c_multiplicative_expression. Adjust.
6582 (c_pretty_printer::conditional_expression): Rename from
6583 pp_c_conditional_expression. Adjust.
6584 (c_pretty_printer::assignment_expression): Rename from
6585 pp_c_assignment_expression. Adjust.
6586 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6587 (c_pretty_printer::c_pretty_printer): Do not assign to
6588 unary_expression, multiplicative_expression,
6589 conditional_expression, expression.
6590
fb22178f
GDR
65912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6592
6593 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6594 virtual member function.
6595 (pp_postfix_expression): Adjust.
6596 (pp_c_postfix_expression): Remove.
6597 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6598 from pp_c_postfix_expression. Adjust.
6599 (c_pretty_printer::c_pretty_printer): Do not assign to
6600 postfix_expression.
6601
7ecc2600
GDR
66022013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6603
6604 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6605 virtua member function.
6606 (pp_primary_expression): Adjust.
6607 (pp_c_primary_expression): Remove.
6608 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6609 from pp_c_primary_expression. Adjust.
6610 (pp_c_initializer_list): Use pp_primary_expression.
6611 (c_pretty_printer::c_pretty_printer): Do not assign to
6612 primary_expression.
6613
0691175f
GDR
66142013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6615
6616 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6617 * c-pretty-print.c (M_): Remove.
6618 (c_pretty_printer::translate_string): Define.
6619 (pp_c_type_specifier): Use it.
6620 (pp_c_primary_expression): Likewise.
6621 (pp_c_expression): Likewise.
6622
66dfe4c4
GDR
66232013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6624
6625 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6626 virtual function.
6627 (pp_c_id_expression): Remove.
6628 (pp_id_expression): Adjust.
6629 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6630 pp_c_id_expression. Adjust.
6631 (pp_c_postfix_expression): Use pp_id_expression.
6632 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6633
ca43e9d5
GDR
66342013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6635
6636 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6637 member function.
6638 (pp_constant): Adjust.
6639 (pp_c_constant): Remove.
6640 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6641 pp_c_constant. Adjust.
6642 (pp_c_constant)
6643 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6644 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6645
da6ca2b5
GDR
66462013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6647
6648 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6649 (c_pretty_printer::c_pretty_printer): Declare.
6650 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6651 c_pretty_printer_init. Adjust.
6652 (print_c_tree): Do not call c_pretty_printer_init.
6653 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6654
65a372f4
AC
66552013-08-09 Arnaud Charlet <charlet@adacore.com>
6656
6657 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6658
fd9b0f32
PC
66592013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6660
6661 PR c++/58080
6662 * c-common.c (pointer_int_sum): Add bool parameter.
6663 * c-common.h (pointer_int_sum): Adjust declaration.
6664
e0aec1e9
GDR
66652013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6666
6667 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6668 c_pretty_printer variable.
6669
b066401f
GDR
66702013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6671
6672 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6673 (pp_base): Remove.
6674 (pp_c_base): Likewise. Adjust users.
6675 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6676 (pp_c_whitespace): Do not call pp_base.
6677 (pp_c_left_paren): Likewise.
6678 (pp_c_right_paren): Likewise.
6679 (pp_c_left_brace): Likewise.
6680 (pp_c_right_brace): Likewise.
6681 (pp_c_left_bracket): Likewise.
6682 (pp_c_right_bracket): Likewise.
6683 (pp_c_dot): Likewise.
6684 (pp_c_ampersand): Likewise.
6685 (pp_c_star): Likewise.
6686 (pp_c_arrow): Likewise.
6687 (pp_c_semicolon): Likewise.
6688 (pp_c_complement): Likewise.
6689 (pp_c_exclamation): Likewise.
6690 (pp_c_direct_declarator): Likewise.
6691 (pp_c_ws_string): Likewise.
6692 (pp_c_identifier): Likewise.
6693 (pp_c_statement): Likewise.
6694 (print_c_tree): Likewise.
6695
65e5a578
ESR
66962013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6697
6698 PR c++/58072
6699 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6700 provide useful error strings.
6701
137a1a27
GDR
67022013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6703
6704 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6705 printer functions instead of pp_string or operators and punctuators.
6706 (dump_generic_ada_node): Likewise.
6707 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6708 (pp_c_relational_expression): Likewise.
6709 (pp_c_logical_or_expression): Likewise.
6710
07838b13
GDR
67112013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6712
6713 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6714 functions instead of pp_character.
6715 (pp_ada_tree_identifier): Likewise.
6716 (dump_ada_double_name): Likewise.
6717 (dump_ada_function_declaration): Likewise.
6718 (dump_ada_array_domains): Likewise.
6719 (dump_template_types): Likewise.
6720 (dump_generic_ada_node): Likewise.
6721 (print_ada_declaration): Likewise.
6722 (print_ada_struct_decl): Likewise.
6723 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6724
433cc7b0
TT
67252013-07-23 Tom Tromey <tromey@redhat.com>
6726
6727 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6728 * c-common.c (c_common_reswords): Add _Generic.
6729
688010ba
OB
67302013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
6731
6732 * c-common.c: Fix typos.
6733 * c-common.h: Likewise.
6734
2a99e5e6
LL
67352013-07-13 Lubos Lunak <l.lunak@suse.cz>
6736
6737 PR c++/55203
6738 * c-common.c (c_common_attribute_table): Add warn_unused.
6739 (handle_warn_unused_attribute): New.
6740
c26302d5
JJ
67412013-07-10 Jakub Jelinek <jakub@redhat.com>
6742
6743 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6744 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6745
dfeadaa0
PC
67462013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6747
6748 PR c++/57869
6749 * c.opt: Add Wconditionally-supported.
6750
6a2fa4b2
GS
67512013-07-08 Graham Stott <graham.stott@btinternet.com>
6752
adfac8df 6753 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
6754 unused variables l_length and l_node.
6755
ecdbd01a 67562013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6757
6758 PR c/57821
6759 * c-common.c (complete_array_type): Delay folding first index
6760 like other indices. When folding, check for index overflow.
6761
bedc293e
MG
67622013-06-27 Marc Glisse <marc.glisse@inria.fr>
6763
6764 PR c++/57509
6765 * c-common.h (c_build_vec_perm_expr): New complain argument.
6766 * c-common.c (c_build_vec_perm_expr): Likewise.
6767 Use save_expr also in C++.
6768
604b2bfc
GDR
67692013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6770
6771 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6772 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6773 * c-opts.c (c_common_post_options): Likewise.
6774
dfeadaa0 67752013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
6776
6777 * array-notation-common.c (length_mismatch_in_expr): Changed the
6778 parameter type's from a dynamic array to a vec_tree. Also removed
6779 the size parameters.
6780 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6781 the change above.
6782
2ce86d2e
BI
67832013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6784
6785 * c-common.h (struct cilkplus_an_parts): New structure.
6786 (struct cilkplus_an_loop_parts): Likewise.
6787 (cilkplus_extract_an_triplets): New prototype.
6788 (fix_sec_implicit_args): Likewise.
6789 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6790 (fix_sec_implicit_args): Likewise.
604b2bfc 6791
07a6825b
BI
67922013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6793
6794 * array-notation-common.c (find_inv_trees): Removed an unwanted
6795 typecasting.
6796 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6797 enum rid to enum tree_code.
6798
08346abd
JH
67992013-06-11 Jan Hubicka <jh@suse.cz>
6800
6801 * c-common.c (handle_alias_ifunc_attribute): Do not set
6802 DECL_EXTERNAL for weakref variables.
6803 * c-pragma.c (handle_pragma_weak): Make sure aliases
6804 are not declared as external.
6805
d60f1706
BI
68062013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6807
6808 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6809 function from c/c-array-notation.c.
6810 (is_cilkplus_reduce_builtin): Likewise.
6811 (find_rank): Likewise.
6812 (extract_array_notation_exprs): Likewise.
6813 (replace_array_notations): Likewise.
6814 (find_inv_trees): Likewise.
6815 (replace_inv_trees): Likewise.
6816 (contains_array_notation_expr): Likewise.
6817 (find_correct_array_notation_type): Likewise.
6818 * c-common.h (struct inv_list): Moved this struct from the file
6819 c/c-array-notation.c and added a new field called additional tcodes.
6820 (length_mismatch_in_expr_p): New prototype.
6821 (is_cilkplus_reduce_builtin): Likewise.
6822 (find_rank): Likewise.
6823 (extract_array_notation_exprs): Likewise.
6824 (replace_array_notation): Likewise.
6825 (find_inv_trees): Likewise.
6826 (replace_inv_trees): Likewise.
6827 (find_correct_array_notation_type): Likewise.
dfeadaa0 6828
36536d79
BI
68292013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6830
6831 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6832 function array_notation_init_builtins is called.
6833 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6834 * c-common.def (ARRAY_NOTATION_REF): New tree.
6835 * c-common.h (build_array_notation_expr): New function declaration.
6836 (build_array_notation_ref): Likewise.
6837 (extract_sec_implicit_index_arg): New extern declaration.
6838 (is_sec_implicit_index_fn): Likewise.
6839 (ARRAY_NOTATION_CHECK): New define.
6840 (ARRAY_NOTATION_ARRAY): Likewise.
6841 (ARRAY_NOTATION_START): Likewise.
6842 (ARRAY_NOTATION_LENGTH): Likewise.
6843 (ARRAY_NOTATION_STRIDE): Likewise.
6844 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6845 ARRAY_NOTATION_REF.
6846 (pp_c_expression): Likewise.
6847 * c.opt (flag_enable_cilkplus): New flag.
6848 * array-notation-common.c: New file.
6849
f7716d57
JJ
68502013-05-14 Jakub Jelinek <jakub@redhat.com>
6851
6852 PR c++/57274
6853 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6854
a5e0cd1d
MG
68552013-05-10 Marc Glisse <marc.glisse@inria.fr>
6856
6857 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6858 vectors.
6859
f6bc1c4a
HS
68602013-05-07 Han Shen <shenhan@google.com>
6861
6862 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6863
3f12f6e9
SKS
68642013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6865
6866 * c-common.c (check_user_alignment): Emit error for negative values.
6867
61949153
PC
68682013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6869
6870 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6871
e93e18e9
PC
68722013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6873
6874 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6875 __GXX_EXPERIMENTAL_CXX1Y__.
6876
44d90fe1 68772013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 6878 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
6879
6880 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6881 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6882 to simply use OPT_Wpointer_arith.
6883 (c_sizeof_or_alignof_type): Likewise.
6884
13f39b2e
PC
68852013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6886
6887 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6888
4b84d650
JJ
68892013-04-12 Jakub Jelinek <jakub@redhat.com>
6890
6891 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6892 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6893 specifiers.
6894
fb037b5d
SB
68952013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6896
6897 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6898
4e856798
PC
68992013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6900
6901 * c-common.c (pointer_int_sum): Remove dead code.
6902
4b1baac8
RS
69032013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6904
6905 PR middle-end/56524
6906 * c-common.c (handle_optimize_attribute): Don't call
6907 save_optabs_if_changed.
6908
0b50e654
JJ
69092013-03-05 Jakub Jelinek <jakub@redhat.com>
6910
6911 PR middle-end/56461
6912 * c-pch.c (pch_init): Free target_validity at the end.
6913
48c41403
JJ
69142013-03-04 Jakub Jelinek <jakub@redhat.com>
6915
6916 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6917
e664c61c
KS
69182013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6919 Jakub Jelinek <jakub@redhat.com>
6920
6921 PR sanitizer/56454
6922 * c-common.c (handle_no_sanitize_address_attribute): New function.
6923 (c_common_attribute_table): Add no_sanitize_address attribute.
6924 (handle_no_address_safety_analysis_attribute): Add
6925 no_sanitize_address attribute, not no_address_safety_analysis
6926 attribute.
6927
a475fd3d 69282013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
6929
6930 PR target/52555
6931 * c-common.c (handle_optimize_attribute): Call
6932 save_optabs_if_changed.
6933
f6007d99
JJ
69342013-02-18 Jakub Jelinek <jakub@redhat.com>
6935 Steven Bosscher <steven@gcc.gnu.org>
6936
6937 PR pch/54117
6938 * c-opts.c (c_common_post_options): If debug info is enabled
6939 and non-dwarf*, refuse to load PCH files and when writing PCH
6940 file warn.
6941
cf35e2b1
JJ
69422013-02-05 Jakub Jelinek <jakub@redhat.com>
6943
6944 PR middle-end/56167
6945 * c-common.c (handle_error_attribute): Fix condition.
6946
32887460
JJ
69472013-01-30 Jakub Jelinek <jakub@redhat.com>
6948
6949 PR c++/55742
6950 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6951
5af057d8
JM
69522013-01-18 Jason Merrill <jason@redhat.com>
6953
6954 PR target/54908
6955 * c.opt (-fextern-tls-init): New.
6956 * c-opts.c (c_common_post_options): Handle it.
6957
cc83c823
JJ
69582013-01-09 Jakub Jelinek <jakub@redhat.com>
6959
6960 PR c/48418
6961 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6962 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6963 and is either negative or bigger or equal to type precision
6964 of the first operand.
6965
a859517f
MP
69662012-12-03 Marek Polacek <polacek@redhat.com>
6967
6968 PR c/55570
6969 * c-common.c (check_user_alignment): Swap order of tests,
6970 check TREE_CODE first.
6971
2d7aa578
ESR
69722012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
6973
6974 PR c++/52654
6975 * c-common.h (overflow_type): New enum.
6976 (build_userdef_literal): Add overflow_type argument.
6977 (tree_userdef_literal): Add overflow_type.
6978 (USERDEF_LITERAL_OVERFLOW): New access macro.
6979 * c-common.c (build_userdef_literal): Add overflow_type
6980 argument.
6981 * c-lex.c (c_lex_with_flags): Add overflow_type to
6982 build_userdef_literal calls.
6983 (interpret_integer, interpret_float): Add overflow_type argument.
6984
cc3c4f62
RB
69852012-11-28 Richard Biener <rguenther@suse.de>
6986
6987 PR c/35634
6988 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6989 here and use a type with proper overflow behavior for types that would
6990 need to be promoted for the arithmetic.
6991
77bc5132
JJ
69922012-11-23 Jakub Jelinek <jakub@redhat.com>
6993
6994 PR sanitizer/55435
6995 * c-common.c (handle_no_address_safety_analysis_attribute): New
6996 function.
6997 (c_common_attribute_table): Add no_address_safety_analysis.
6998
5dc99c46
SB
69992012-11-16 Simon Baldwin <simonb@google.com>
7000
7001 * c.opt: Add f[no-]canonical-system-headers.
7002 * c-opts.c (c_common_handle_option): Handle
7003 OPT_fcanonical_system_headers.
7004
a4a0016d
ESR
70052012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7006
7007 PR c++/54413
7008 * c-opts.c (c_common_handle_option): Set new flags.
7009 * c.opt: Describe new flags.
7010
7dbb85a7
JM
70112012-11-09 Jason Merrill <jason@redhat.com>
7012
7013 * c.opt (Wabi-tag): New.
7014
ad7bac31
AK
70152012-11-09 Andi Kleen <ak@linux.intel.com>
7016
7017 PR 55139
7018 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7019 MEMMODEL_MASK
ad7bac31 7020
7332899a
MLI
70212012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7022
7023 PR c/53063
7024 * c.opt (Wformat): Make it Alias Wformat=1.
7025 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7026 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7027 LangEnabledBy.
7028 (Wformat=): RejectNegative. Use LangEnabledBy.
7029 (Wnonnull): Use LangEnabledBy.
7030 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7031 * c-format.c (set_Wformat): Delete.
7032 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7033 (maybe_read_dollar_number): Likewise.
7034 (avoid_dollar_number): Likewise.
7035 (finish_dollar_format_checking): Likewise.
7036 (check_format_info): Likewise.
7037 (check_format_info_main): Likewise.
7038 (check_format_types): Likewise.
7039 (format_type_warning): Likewise.
7040 * c-common.c (int): Likewise.
7041 (check_function_sentinel): Likewise.
7042 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7043
34a180a6
MLI
70442012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7045
7046 PR c/53063
7047 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7048 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7049 Use LangEnabledBy.
7050 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7051 common.opt.
7052 (Wvariadic-macros): Init(1).
7053 * c-opts.c (c_common_handle_option): Do not handle them
7054 explicitly.
7055 (c_common_post_options): Likewise.
7056 (sanitize_cpp_opts): warn_unused_macros is now
7057 cpp_warn_unused_macros.
7058 (push_command_line_include): Likewise.
7059 * c-common.c (warn_unknown_pragmas): Do not define.
7060 * c-common.h (warn_unknown_pragmas): Do not declare.
7061
3f46d6a5
MLI
70622012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7063
7064 PR c/51294
7065 * c-common.c (conversion_warning): Handle conditional expressions.
7066
880661a4
JW
70672012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7068
7069 PR c++/54930
7070 * c.opt (Wreturn_local_addr): Define new option.
7071
4514a96b
JM
70722012-10-25 Jason Merrill <jason@redhat.com>
7073
f14edc1a
JM
7074 * c.opt (Wvirtual-move-assign): New.
7075
4514a96b
JM
7076 * c.opt (Winherited-variadic-ctor): New.
7077
93100c6b
MG
70782012-10-25 Marc Glisse <marc.glisse@inria.fr>
7079
7080 PR c++/54427
7081 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7082
1efcb8c6
JM
70832012-10-23 Joseph Myers <joseph@codesourcery.com>
7084
7085 * c-common.h (pch_cpp_save_state): Declare.
7086 * c-target.def (c_preinclude): New hook.
7087 * c-opts.c (done_preinclude): New.
7088 (push_command_line_include): Handle default preincluded header.
7089 (cb_file_change): Call pch_cpp_save_state when calling
7090 push_command_line_include.
7091 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7092 (pch_cpp_save_state): New.
7093 (pch_init): Call pch_cpp_save_state conditionally, instead of
7094 calling cpp_save_state.
7095
4a0ae68e
MLI
70962012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7097
7098 PR c/53063
7099 PR c/40989
7100 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7101 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7102 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7103 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7104 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7105 * c-opts.c (c_common_handle_option): Remove explicit handling from
7106 here.
7107 (c_common_post_options): Likewise.
7108
67e4210b
EB
71092012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7110
7111 * c-ada-spec.c (LOCATION_COL): Delete.
7112 (compare_location): New function.
7113 (compare_node): Use it.
7114 (compare_comment): Likewise.
7115
65d4f2cd
MLI
71162012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7117
7118 PR c/53063
7119 PR c/40989
7120 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7121 * c-opts.c (c_common_handle_option): Do not set them here. Add
7122 comment.
7123 (c_common_post_options): Likewise.
7124
909881cb
EB
71252012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7126
7127 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7128 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7129 Remove POINTER_TYPE handling, add large unsigned handling and use
7130 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7131
3a785c97
JJ
71322012-10-12 Jakub Jelinek <jakub@redhat.com>
7133
7134 PR c/54381
7135 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7136 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7137 locs and array of 3 trees instead of just single loc and single
7138 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7139 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7140 For *cmp* builtins that take two sources strings report warnings
7141 about first and second source, not about destination and source.
7142
5e54f81d
MG
71432012-10-12 Marc Glisse <marc.glisse@inria.fr>
7144
7145 PR c++/53055
7146 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7147
f5b02f1e
EB
71482012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7149
7150 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7151 declaring something coming from another file.
7152
b46dbc6c
AC
71532012-10-10 Arnaud Charlet <charlet@adacore.com>
7154
f5b02f1e 7155 PR ada/54845
b46dbc6c
AC
7156 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7157
5d9de0d0
PC
71582012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7159
7160 PR c++/54194
7161 * c-common.c (warn_about_parentheses): Add location_t parameter;
7162 use EXPR_LOC_OR_LOC.
7163 * c-common.h: Update declaration.
7164
a212e43f
MG
71652012-10-09 Marc Glisse <marc.glisse@inria.fr>
7166
7167 PR c++/54427
7168 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7169 more operations. Make error messages optional.
7170 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7171 (scalar_to_vector): Declare.
7172
b1db7f91
JM
71732012-10-08 Jason Merrill <jason@redhat.com>
7174
7175 * c-common.c (c_common_reswords): Add thread_local.
7176
e28d52cf
DS
71772012-10-08 Dodji Seketeli <dodji@redhat.com>
7178
7179 PR c++/53528 C++11 attribute support
7180 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7181 new functions.
7182 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7183 static function.
7184 (handle_aligned_attribute): In choose strictest alignment
7185 among many. Use new check_cxx_fundamental_alignment_constraints.
7186 (handle_transparent_union_attribute): In c++11 attribute syntax,
7187 don't look through typedefs.
7188
3b78de56
AC
71892012-10-04 Arnaud Charlet <charlet@adacore.com>
7190
7191 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7192 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7193 out of dumpfile.h.
7194
6040bb5f
DC
71952012-09-25 Dehao Chen <dehao@google.com>
7196
7197 PR middle-end/54645
3b78de56 7198 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7199 map when read in the pch.
7200
3f8257db 72012012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7202
7203 * c-ada-spec.c: Style fixes.
7204
3f8257db 72052012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7206
7207 * c.opt (-fada-spec-parent): Define new command line switch.
7208 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7209 is specified, generate binding spec as a child of the specified unit.
7210
0ccb505d
PC
72112012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7212 Manuel López-Ibáñez <manu@gcc.gnu.org>
7213
7214 PR c++/53210
7215 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7216
c583af79
AC
72172012-08-23 Arnaud Charlet <charlet@adacore.com>
7218
7219 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7220 for pointers, and add missing Convention C pragma.
7221 (print_ada_struct_decl): Add missing aliased keyword.
7222 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7223
1a4049e7
JJ
72242012-08-17 Jakub Jelinek <jakub@redhat.com>
7225
7226 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7227 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7228 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7229 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7230 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7231
70b5e7dc
RG
72322012-08-10 Richard Guenther <rguenther@suse.de>
7233
7234 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7235
f8923f7e
SB
72362012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7237
7238 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7239 instead of separate pp_newline and pp_flush.
7240 (print_c_tree): Likewise.
7241
e45abe1f
RH
72422012-07-26 Richard Henderson <rth@redhat.com>
7243
7244 * c-common.c (handle_hot_attribute): Allow labels.
7245 (handle_cold_attribute): Likewise.
7246
332f1d24
JJ
72472012-07-20 Jakub Jelinek <jakub@redhat.com>
7248
7249 PR c++/28656
7250 * c-common.c (check_function_nonnull): Handle multiple nonnull
7251 attributes properly.
7252
7ee2468b
SB
72532012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7254
7255 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7256 * c-ada-spec.c: Likewise.
7257 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7258
ee7b28eb
SB
72592012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7260
7261 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7262 Remove code conditional on it.
7263
6bdf3519
SB
72642012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7265
7266 * c-gimplify.c: Do not include basic-block.h.
7267 * c-common.c: Do not include linfuncs.h.
7268
532aafad
SB
72692012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7270
7271 * c-common.h: Include tree.h.
7272
8d0d1915
JM
72732012-07-02 Jason Merrill <jason@redhat.com>
7274
7275 PR c++/53524
7276 * c-common.c (get_priority): Call default_conversion.
7277
fbc873ad
UB
72782012-07-01 Uros Bizjak <ubizjak@gmail.com>
7279
7280 * c-pch.c (c_common_write_pch): Remove unused variables.
7281
d4a10d0a
SB
72822012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7283
7284 * cppspec.c: Moved from gcc/ to here.
7285
6f3a2e23
KT
72862012-06-27 Kai Tietz <ktietz@redhat.com>
7287
7288 PR preprocessor/37215
7289 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7290
8ca92d04
SB
72912012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7292
7293 * c-common.h (c_common_print_pch_checksum): Remove.
7294 * c-pch.c: Do not include output.h.
7295 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7296 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7297 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7298 (struct c_pch_header): Remove.
7299 (get_ident): Update gpch version.
7300 (pch_init): Do not print executable_checksum to asm_out_file.
7301 Do not fail if there is no asm_out_file to read back from. Set
7302 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7303 (c_common_write_pch): Verify that nothing was written to asm_out_file
7304 since pch_init was called. Do not write a c_pch_header, and do not
7305 copy from asm_out_file to the PCH.
7306 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7307 the content of asm_out_file from the PCH.
7308 (c_common_print_pch_checksum): Remove.
7309 * c-opts.c (c_common_init): Print out executable_checksum directly.
7310
70f42967
SB
73112012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7312
7313 * c-target.def (objc_declare_unresolved_class_reference,
7314 objc_declare_class_definition): Add new hooks.
7315
a8781821
SB
73162012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7317
7318 * c-lex.c: Do not include output.h.
7319 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7320 Remove uses of ASM_OUTPUT_IDENT.
7321
9e1a8dd1
RR
73222012-06-15 Marc Glisse <marc.glisse@inria.fr>
7323
7324 PR c++/51033
7325 * c-common.h (c_build_vec_perm_expr): Move decl here.
7326 * c-common.c (c_build_vec_perm_expr): Move definition
7327 here.
7328
6f07a821
SB
73292012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7330
7331 * c.opt (fconserve-space): Turn into a no-op.
7332
9faeb493 73332012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
7334
7335 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7336 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7337 both the start and end of the function.
7338
a4b7d13c
SB
73392012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7340
7341 * c-common.c: Do not include output.h.
7342 * c-pragma.c: Likewise.
7343
c265f413
SA
73442012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7345
7346 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7347 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7348 (lang_decl_name): Handle namespace decls.
7349
be7a421e
SB
73502012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7351
7352 * c-ada-spec.c: Do not include output.h.
7353 * c-semantics.c: Likewise.
7354
65de6659
JM
73552012-05-29 Joseph Myers <joseph@codesourcery.com>
7356
7357 * c-common.c: Fix typo.
7358
ca5f4331
MM
73592012-05-29 Michael Matz <matz@suse.de>
7360
7361 * c-common.h (c_expand_decl): Remove prototype.
7362
4f7f7aca
MLI
73632012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7364
7365 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7366 * c-opts.c (c_common_handle_option): Remove code handling
7367 warn_missing_braces.
7368
4a792f9b
PC
73692012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7370
7371 PR c++/25137
7372 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7373 -Wmissing_braces.
7374
650dc14a
DS
73752012-05-22 Dodji Seketeli <dodji@redhat.com>
7376
7377 PR c++/53322
7378 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7379
9b095bf1
MLI
73802012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7381
7382 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7383 * c-opts.c (c_common_handle_option): Do not handle explicitly
7384 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7385
0b2c4be5
DS
73862012-05-16 Dodji Seketeli <dodji@redhat.com>
7387
7388 PR preprocessor/7263
7389 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7390 to cpp_classify_number. For diagnostics, use the precise location
7391 instead of the global input_location.
7392
a1bde5af
PC
73932012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7394
d02924ef 7395 PR c++/11856
a1bde5af
PC
7396 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7397
d1ede5f4
BS
73982012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7399
a1bde5af 7400 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 7401
f2bc201f
MLI
74022012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7403
7404 PR 53063
7405 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7406 Wreorder): Use LangEnabledBy.
7407 * c-opts.c (c_common_handle_option): Do not enable them
7408 explicitly. Call lang-specific generated functions.
7409 (c_common_post_options): Do not set them here.
7410
95744782
MLI
74112012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7412
7413 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7414 Wmissing-field-initializers,Wmissing-parameter-type,
7415 Wold-style-declaration,Woverride-init): Use EnabledBy.
7416 * c-opts.c (c_common_post_options): Do not set here explicitly.
7417
7d5a5747
MLI
74182012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7419
7420 PR 53063
7421 * c-opts.c (c_common_handle_option): Use handle_generated_option
7422 to enable sub-options.
7423
5a3c9cf2
PC
74242012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7425
7426 PR c++/53158
7427 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7428
3ac8781c
RG
74292012-05-10 Richard Guenther <rguenther@suse.de>
7430
7431 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7432 adjust commentary about TYPE_IS_SIZETYPE types.
7433
1e537948
MLI
74342012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7435
7436 PR c++/53261
7437 * c-common.c (warn_logical_operator): Check that argument of
7438 integer_zerop is not NULL.
7439
f2c4a785
MLI
74402012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7441
7442 PR c/43772
7443 * c-common.c (warn_logical_operator): Do not warn if either side
7444 is already true or false.
7445
50f305ca
MLI
74462012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7447
7448 PR c/51712
7449 * c-common.c (expr_original_type): New.
7450 (shorten_compare): Do not warn for enumeration types.
7451
0c3641b0
MLI
74522012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7453
7454 * c.opt (fpermissive): Add Var(flag_permissive).
7455
7edaa4d2
MG
74562012-04-30 Marc Glisse <marc.glisse@inria.fr>
7457
7458 PR c++/51033
7459 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7460 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7461
b9c8da34
DS
74622012-04-30 Dodji Seketeli <dodji@redhat.com>
7463
7464 Add -Wvarargs option
7465 * c.opt (Wvarargs): Define new option.
7466
e6c69da0
MLI
74672012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7468
7469 * c-common.c (check_function_arguments): Replace
7470 Wmissing-format-attribute with Wsuggest-attribute=format.
7471
90137d8f
MLI
74722012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7473
7474 * c.opt (Wsuggest-attribute=format): New. Alias of
7475 Wmissing-format-attribute.
7476 * c-format.c (decode_format_type): Replace
7477 Wmissing-format-attribute with Wsuggest-attribute=format.
7478 (check_function_format): Likewise.
7479
9faeb493 74802012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
7481
7482 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7483 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7484 * c.opt: Add Wliteral-suffix.
7485
c1771a20
MLI
74862012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7487
7488 PR c/44774
7489 * c.opt (Wpedantic): New.
7490 (pedantic): Alias Wpedantic.
7491 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7492 (c_common_post_options): Likewise.
7493 (sanitize_cpp_opts): Likewise.
7494 * c-lex.c (interpret_float): Likewise.
7495 * c-format.c (check_format_types): Likewise.
7496 * c-common.c (pointer_int_sum): Likewise.
7497 (c_sizeof_or_alignof_type): Likewise.
7498 (c_add_case_label): Likewise.
7499 (c_do_switch_warnings): Likewise.
7500 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7501
04b391c1
JM
75022012-04-15 Jason Merrill <jason@redhat.com>
7503
7504 PR c++/52818
7505 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7506 (C_STD_NAME): Distinguish between C++98 and C++11.
7507
ac868f29
EB
75082012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7509
7510 PR target/52624
7511 * c-common.h (uint16_type_node): Rename into...
7512 (c_uint16_type_node): ...this.
7513 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7514 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7515
fd4116f4
MLI
75162012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7517
7518 * c-common.c (warn_if_unused_value): Move definition to here.
7519 * c-common.h (warn_if_unused_value): Move declaration to here.
7520
573ac65e
WB
75212012-03-23 William Bader <williambader@hotmail.com>
7522
7523 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7524
552b8185
JM
75252012-03-20 Jason Merrill <jason@redhat.com>
7526
7527 * c-common.h (enum cxx_dialect): Add cxx1y.
7528 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7529 test.
7530 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7531 * c-opts.c (c_common_post_options): Likewise.
7532 (set_std_cxx1y): New.
7533 (c_common_handle_option): Call it.
7534 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7535
04398fa8
PC
75362012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7537
7538 PR c++/14710
7539 * c.opt ([Wuseless-cast]): Add.
7540
d2a12ae7
RG
75412012-03-16 Richard Guenther <rguenther@suse.de>
7542
7543 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7544
a12bf402
MLI
75452012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7546
7547 PR c++/44783
7548 * c.opt (ftemplate-backtrace-limit) Add.
7549
5c30094f
RO
75502012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7551
7552 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7553 handling.
7554 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7555 (init_pragma): Don't register extern_prefix.
7556
21fa2faf
RG
75572012-03-12 Richard Guenther <rguenther@suse.de>
7558
7559 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7560 (builtin_type_for_size): Likewise.
7561
e3793c6f
JJ
75622012-02-13 Jakub Jelinek <jakub@redhat.com>
7563
7564 PR c++/52215
7565 * c-common.c (sync_resolve_params): Don't decide whether to convert
7566 or not based on TYPE_SIZE comparison, convert whenever arg_type
7567 is unsigned INTEGER_TYPE.
7568
93286335
PC
75692012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7570
7571 PR c/52118
7572 * c.opt ([Wunused-local-typedefs]): Fix description.
7573
7a421706
MS
75742012-01-24 Mike Stump <mikestump@comcast.net>
7575
7576 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7577 exactly.
7578
ba9b1f11
RG
75792012-01-18 Richard Guenther <rguenther@suse.de>
7580
7581 * c-opts.c (c_common_post_options): Reset LTO flags if
7582 we are about to generate a PCH.
7583
465406be
PC
75842012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7585
7586 PR c++/51777
7587 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7588 use pp_unsigned_wide_integer.
7589
aee15221
RG
75902012-01-10 Richard Guenther <rguenther@suse.de>
7591
7592 PR middle-end/51806
7593 * c-opts.c (c_common_handle_option): Move -Werror handling
7594 to language independent code.
7595
5720c0dc
RG
75962012-01-05 Richard Guenther <rguenther@suse.de>
7597
7598 PR middle-end/51764
7599 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7600 from common.opt.
7601
73ac190a
PC
76022011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7603
7604 PR c++/51316
7605 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7606 of array types with an unknown bound.
7607
48b0b196
JM
76082011-12-20 Joseph Myers <joseph@codesourcery.com>
7609
7610 * c-common.c (flag_isoc99): Update comment to refer to C11.
7611 (flag_isoc1x): Change to flag_isoc11.
7612 * c-common.h (flag_isoc99): Update comment to refer to C11.
7613 (flag_isoc1x): Change to flag_isoc11.
7614 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7615 C11.
7616 * c-opts.c (set_std_c1x): Change to set_std_c11.
7617 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7618 Call set_std_c11.
7619 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7620 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7621 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7622 standard.
7623 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7624 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7625 (std=gnu1x): Make alias of std=gnu11.
7626
d58d6eb5
JM
76272011-12-19 Jason Merrill <jason@redhat.com>
7628
7629 PR c++/51228
7630 * c-common.c (handle_transparent_union_attribute): Check the first
7631 field if the type is complete.
7632
b3908fcc
JW
76332011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7634
7635 PR libstdc++/51365
7636 * c-common.c (RID_IS_FINAL): Add.
7637 * c-common.h (RID_IS_FINAL): Add.
7638
fea3ca91
IS
76392011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7640
7641 * c.opt (fgnu-runtime): Provide full description.
7642 (fnext-runtime): Likewise.
7643 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7644
62bad7cd
AM
76452011-11-28 Andrew MacLeod <amacleod@redhat.com>
7646
7647 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7648 predefines in one place. Add LOCK_FREE predefines.
7649 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7650 new func.
7651
c466c4ff
AM
76522011-11-24 Andrew MacLeod <amacleod@redhat.com>
7653
7654 PR c/51256
9faeb493 7655 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 7656 conditions
9faeb493
UB
7657 (resolve_overloaded_atomic_exchange,
7658 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
7659 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7660 error_mark_node for error conditions.
9faeb493 7661
a5952633
RG
76622011-11-08 Richard Guenther <rguenther@suse.de>
7663
7664 PR middle-end/51010
7665 c-family/
7666
0a35513e
AH
76672011-11-07 Richard Henderson <rth@redhat.com>
7668 Aldy Hernandez <aldyh@redhat.com>
7669 Torvald Riegel <triegel@redhat.com>
7670
7671 Merged from transactional-memory.
7672
7673 * c-common.c (handle_tm_wrap_attribute,
7674 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7675 (struct c_common_reswords): Added __transaction* keywords.
7676 (struct c_common_attribute_table): Added transaction* and tm_regparm
7677 attributes.
7678 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7679 masks.
7680 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7681 find_tm_attribute): Declare.
7682
6d87092d
JM
76832011-11-07 Jason Merrill <jason@redhat.com>
7684
7685 PR c++/35688
7686 * c-common.c, c-common.h: Revert yesterday's changes.
7687
8e7860a1
JM
76882011-11-06 Jason Merrill <jason@redhat.com>
7689
7690 PR c++/35688
7691 * c-common.c (decl_has_visibility_attr): Split out from...
7692 (c_determine_visibility): ...here.
7693 * c-common.h: Declare it.
7694
d19fa6b5
JM
76952011-11-06 Joseph Myers <joseph@codesourcery.com>
7696
7697 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7698 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7699 type.
7700 (check_user_alignment): New. Split out of
7701 handle_aligned_attribute. Disallow integer constants with
7702 noninteger types. Conditionally allow zero.
7703 (handle_aligned_attribute): Use check_user_alignment.
7704 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7705
86951993
AM
77062011-11-06 Andrew MacLeod <amacleod@redhat.com>
7707 Richard Henderson <rth@redhat.com>
7708
7709 Merged from cxx-mem-model.
7710
7711 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 7712 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
7713 parameters that are the same type size.
7714 (get_atomic_generic_size): New. Find size of generic
7715 atomic function parameters and do typechecking.
7716 (add_atomic_size_parameter): New. Insert size into parameter list.
7717 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7718 either __atomic_exchange_n or external library call.
9faeb493 7719 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 7720 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 7721 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
7722 __atomic_load_n or an external library call.
7723 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7724 __atomic_store_n or an external library call.
7725 (resolve_overloaded_builtin): Handle new __atomic builtins.
7726
cf9e9959
EB
77272011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7728
7729 PR c++/50608
7730 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7731 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7732 <INDIRECT_REF>: Return the argument.
7733 <ARRAY_REF>: Remove special code for negative offset.
7734 Call fold_build_pointer_plus instead of size_binop.
7735 (fold_offsetof): Remove STOP_REF argument and adjust.
7736 * c-common.h (fold_offsetof_1): Declare.
7737 (fold_offsetof): Remove STOP_REF argument.
7738
25339f10
JM
77392011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7740
7741 PR c++/50810
7742 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7743 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7744 Wnarrowing for C++0x and C++98.
7745 * c.opt ([Wnarrowing]): Update.
7746
89401152
PC
77472011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7748
7749 PR c++/44277
7750 * c.opt: Add Wzero-as-null-pointer-constant.
7751
97e3ad20
JM
77522011-10-31 Jason Merrill <jason@redhat.com>
7753
15694fdd
JM
7754 * c.opt (-fdeduce-init-list): Off by default.
7755
97e3ad20
JM
7756 PR c++/50920
7757 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7758 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7759 and -Wc++11-compat.
7760 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7761
fb9120e3
RAV
77622011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7763
7764 PR c++/30066
7765 * c.opt (fvisibility-inlines-hidden): Description change.
7766
3ce4f9e4
ESR
77672011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7768
7769 Implement C++11 user-defined literals.
7770 * c-common.c (build_userdef_literal): New.
7771 * c-common.def: New tree code.
7772 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7773 * c-lex.c (interpret_float): Add suffix parm.
7774 (c_lex_with_flags): Build literal tokens.
7775
5f53c243
PC
77762011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7777
7778 PR c++/50841
7779 Revert:
7780 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7781
7782 PR c++/50810
7783 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7784 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7785 Wnarrowing for C++0x and C++98.
7786 * c.opt ([Wnarrowing]): Update.
7787
263734e1
PC
77882011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7789
7790 PR c++/50810
7791 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7792 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7793 Wnarrowing for C++0x and C++98.
7794 * c.opt ([Wnarrowing]): Update.
7795
d2e312d7
PC
77962011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7797
7798 PR c++/45385
7799 * c-common.c (conversion_warning): Remove code looking for
7800 artificial operands.
7801
d17687f6
DS
78022011-10-18 Dodji Seketeli <dodji@redhat.com>
7803
7804 PR bootstrap/50760
7805 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 7806 !NO_IMPLICIT_EXTERN_C.
d17687f6 7807
fc8396e9
PC
78082011-10-17 Michael Spertus <mike_spertus@symantec.com>
7809
7810 * c-common.c (c_common_reswords): Add __bases,
7811 __direct_bases.
7812 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7813
78142011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7815
7816 PR c++/50757
7817 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7818
847e697a
TT
78192011-10-15 Tom Tromey <tromey@redhat.com>
7820 Dodji Seketeli <dodji@redhat.com>
7821
7822 * c.opt (fdebug-cpp): New option.
7823 * c-opts.c (c_common_handle_option): Handle the option.
7824 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7825 output stream in parameter. Factorized from ...
7826 (maybe_print_line): ... this. Dump location debug information when
7827 -fdebug-cpp is in effect.
7828 (print_line_1): New static function. Takes an output stream in
7829 parameter. Factorized from ...
7830 (print_line): ... here. Dump location information when -fdebug-cpp
7831 is in effect.
7832 (scan_translation_unit): Dump location information when
7833 -fdebug-cpp is in effect.
7834
92582b75
TT
78352011-10-15 Tom Tromey <tromey@redhat.com>
7836 Dodji Seketeli <dodji@redhat.com>
7837
7838 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7839 without argument.
7840 * c-opts.c (c_common_handle_option)<case
7841 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7842 cases. Handle -ftrack-macro-expansion with and without argument.
7843
46427374
TT
78442011-10-15 Tom Tromey <tromey@redhat.com>
7845 Dodji Seketeli <dodji@redhat.com>
7846
7847 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7848 (print_line, cb_define, do_line_change): Adjust to avoid touching
7849 the internals of struct line_map. Use the public API instead.
7850 * c-pch.c (c_common_read_pch): Likewise.
7851 * c-lex.c (fe_file_change): Likewise.
7852
fc8396e9
PC
78532011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7854
7855 PR c++/17212
7856 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7857
78582011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7859
7860 PR c++/33067
7861 * c-pretty-print.c (pp_c_floating_constant): Output
7862 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7863
e79983f4
MM
78642011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7865
7866 * c-common.c (def_builtin_1): Delete old interface with two
7867 parallel arrays to hold standard builtin declarations, and replace
7868 it with a function based interface that can support creating
7869 builtins on the fly in the future. Change all uses, and poison
7870 the old names. Make sure 0 is not a legitimate builtin index.
7871 * c-omp.c (c_finish_omp_barrier): Ditto.
7872 (c_finish_omp_taskwait): Ditto.
7873 (c_finish_omp_flush): Ditto.
7874
6637388f
TG
78752011-10-11 Tristan Gingold <gingold@adacore.com>
7876
7877 * c.opt: (fallow-parameterless-variadic-functions): New.
7878
3797cb21
DS
78792011-09-08 Dodji Seketeli <dodji@redhat.com>
7880
7881 PR c++/33255 - Support -Wunused-local-typedefs warning
7882 * c-common.h (struct c_language_function::local_typedefs): New
7883 field.
9faeb493
UB
7884 (record_locally_defined_typedef, maybe_record_typedef_use)
7885 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 7886 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
7887 (maybe_record_typedef_use)
7888 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
7889 * c.opt: Declare new -Wunused-local-typedefs flag.
7890
693ddb1b
EB
78912011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7892
7893 PR middle-end/50266
7894 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7895 computations.
7896
830c740f
RG
78972011-09-05 Richard Guenther <rguenther@suse.de>
7898
7899 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7900 of integer_minus_one_node for empty array upper bounds.
7901
892a371f
DS
79022011-08-28 Dodji Seketeli <dodji@redhat.com>
7903
7904 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7905 it's the first time it's being called on this main TU.
7906
0e3fdb48
RB
79072011-08-24 Richard Guenther <rguenther@suse.de>
7908
7909 PR c/49396
7910 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7911
79122011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
7913
7914 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7915 defined in cpp_init_builtins and c_cpp_builtins.
7916
d4a83c10
JM
79172011-08-19 Joseph Myers <joseph@codesourcery.com>
7918
7919 * c-common.c (c_common_reswords): Add __builtin_complex.
7920 * c-common.h (RID_BUILTIN_COMPLEX): New.
7921
bbceee64
JM
79222011-08-18 Joseph Myers <joseph@codesourcery.com>
7923
7924 * c-common.c (c_common_reswords): Add _Noreturn.
7925 (keyword_is_function_specifier): Handle RID_NORETURN.
7926 * c-common.h (RID_NORETURN): New.
7927
3f8257db 79282011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
7929
7930 * c-common.c (unsafe_conversion_p): New function. Check if it is
7931 unsafe to convert an expression to the type.
7932 (conversion_warning): Adjust, use unsafe_conversion_p.
7933 * c-common.h (unsafe_conversion_p): New function declaration.
7934
20906c66
JJ
79352011-08-02 Jakub Jelinek <jakub@redhat.com>
7936
7937 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7938 (c_finish_omp_taskyield): New prototype.
7939 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7940 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7941 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7942 or RHS1 have side-effects, evaluate those too in the right spot,
7943 if it is a decl and LHS is also a decl, error out if they
7944 aren't the same.
7945 (c_finish_omp_taskyield): New function.
7946 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7947 * c-pragma.c (omp_pragmas): Add taskyield.
7948 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7949 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7950 PRAGMA_OMP_CLAUSE_MERGEABLE.
7951
770e5a2e
DS
79522011-07-25 Dodji Seketeli <dodji@redhat.com>
7953
7954 * c-common.h (set_underlying_type): Remove parm name from
7955 declaration.
7956
1baae426
RG
79572011-07-25 Romain Geissler <romain.geissler@gmail.com>
7958
7959 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 7960
fcb21722
JM
79612011-07-22 Jason Merrill <jason@redhat.com>
7962
76f86d00
JM
7963 PR c++/49793
7964 * c.opt (Wnarrowing): New.
7965
3a636414
JM
7966 PR c++/30112
7967 * c-common.h: Declare c_linkage_bindings.
7968 * c-pragma.c (handle_pragma_redefine_extname): Use it.
7969
fcb21722
JM
7970 PR c++/49813
7971 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7972 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7973 as flag_isoc99 for 'restrict'.
7974 (pp_c_specifier_qualifier_list): Likewise for _Complex.
7975
02614448
ILT
79762011-07-21 Ian Lance Taylor <iant@google.com>
7977
7978 PR middle-end/49705
7979 * c-common.c (c_disable_warnings): New static function.
7980 (c_enable_warnings): New static function.
7981 (c_fully_fold_internal): Change local unused_p to bool. Call
7982 c_disable_warnings and c_enable_warnings rather than change
7983 c_inhibit_evaluation_warnings.
7984
34429675
JM
79852011-07-20 Jason Merrill <jason@redhat.com>
7986
7987 PR c++/6709 (DR 743)
7988 PR c++/42603 (DR 950)
7989 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
7990 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
7991 (CPP_DECLTYPE): New.
7992 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
7993
5d49b6a7
RG
79942011-07-19 Richard Guenther <rguenther@suse.de>
7995
7996 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
7997 * c-omp.c (c_finish_omp_for): Likewise.
7998
e84a58ff
EB
79992011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8000
8001 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8002 body on the next line.
8003
329af3c7
JM
80042011-07-08 Jason Merrill <jason@redhat.com>
8005
4063e61b
JM
8006 PR c++/45437
8007 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8008
329af3c7
JM
8009 PR c++/49673
8010 * c-common.c (c_apply_type_quals_to_decl): Don't check
8011 TYPE_NEEDS_CONSTRUCTING.
8012
1a072294
RG
80132011-07-06 Richard Guenther <rguenther@suse.de>
8014
8015 * c-common.c (c_common_nodes_and_builtins):
8016 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8017
fce5dddd
RG
80182011-07-05 Richard Guenther <rguenther@suse.de>
8019
8020 * c-common.c (c_common_nodes_and_builtins): Build all common
8021 tree nodes first.
8022
45d439ac
JJ
80232011-06-27 Jakub Jelinek <jakub@redhat.com>
8024
56300785
JJ
8025 * c-common.h (c_tree_chain_next): New static inline function.
8026
45d439ac
JJ
8027 * c-common.c (check_builtin_function_arguments): Handle
8028 BUILT_IN_ASSUME_ALIGNED.
8029
e0a8ecf2
AM
80302011-06-21 Andrew MacLeod <amacleod@redhat.com>
8031
8032 * c-common.c: Add sync_ or SYNC__ to builtin names.
8033 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8034
80352011-06-20 Pierre Vittet <piervit@pvittet.com>
8036
8037 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8038 handler.
8039 (gen_pragma_handler): New union.
8040 (internal_pragma_handler): New type.
8041 (c_register_pragma_with_data)
8042 (c_register_pragma_with_expansion_and_data): New functions.
8043
8044 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8045 (c_register_pragma, c_register_pragma_with_expansion)
8046 (c_invoke_pragma_handler): Changed to work with
8047 internal_pragma_handler.
8048 (c_register_pragma_with_data)
8049 (c_register_pragma_with_expansion_and_data): New functions.
8050
677f3fa8
JM
80512011-06-14 Joseph Myers <joseph@codesourcery.com>
8052
8053 * c-common.c: Include common/common-target.h.
8054 (handle_section_attribute): Use
8055 targetm_common.have_named_sections.
8056 * c-cppbuiltin.c: Include common/common-target.h.
8057 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8058
d7fc8c14
RG
80592011-06-10 Richard Guenther <rguenther@suse.de>
8060
8061 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8062 to print a IDENTIFIER_NODE.
8063
10e48e39
RO
80642011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8065 Joseph Myers <joseph@codesourcery.com>
8066
8067 * c.opt (fbuilding-libgcc): New option.
8068 * c-cppbuiltin.c (c_cpp_builtins): Define
8069 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8070
6976ae51
JM
80712011-06-07 Jason Merrill <jason@redhat.com>
8072
3ff60975
JM
8073 * c-common.c (max_tinst_depth): Lower default to 900.
8074
6976ae51
JM
8075 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8076
009db074
RG
80772011-06-07 Richard Guenther <rguenther@suse.de>
8078
8079 * c-common.c (c_common_nodes_and_builtins): Do not set
8080 size_type_node or call set_sizetype.
8081
b4592b92
DS
80822011-06-07 Dodji Seketeli <dodji@redhat.com>
8083
8084 PR debug/49130
8085 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8086 type when using pointer comparison to compare types.
b4592b92 8087
014ab419
JW
80882011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8089
8090 * c.opt: Add -Wdelete-non-virtual-dtor.
8091 * c-opts.c (c_common_handle_option): Include it in -Wall.
8092
4f60111f
NF
80932011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8094
8095 PR bootstrap/49190
8096
8097 Revert:
8098 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8099
8100 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8101 not tree_common.
8102
4cc4f2f4
JJ
81032011-05-27 Jakub Jelinek <jakub@redhat.com>
8104
8105 PR c++/49165
8106 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8107 C++ don't call c_common_truthvalue_conversion on void type arms.
8108
38e01f9e
NF
81092011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8110
8111 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8112 (stmt_list_stack): Define.
8113 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8114 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8115
92e948a8
NF
81162011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8117
8118 * c-common.c (warning_candidate_p): Check for BLOCKs.
8119
a2fc3e63
NF
81202011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8121
8122 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8123 not tree_common.
8124
0957c029
JJ
81252011-05-25 Jakub Jelinek <jakub@redhat.com>
8126
8127 * c-common.c (def_fn_type): Remove extra va_end.
8128
828fb3ba
JM
81292011-05-23 Jason Merrill <jason@redhat.com>
8130
8131 PR c++/48106
8132 * c-common.c (c_common_get_narrower): New.
8133 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8134
dde05067
NF
81352011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8136
8137 * c-common.h (check_function_arguments): Tweak prototype of
8138 check_function_arguments.
8139 * c-common.c (check_function_arguments): Likewise. Adjust
8140 calls to check_function_nonnull, check_function_format, and
8141 check_function_sentinel.
8142 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8143 separate attributes and typelist arguments. Use
8144 FOREACH_FUNCTION_ARGS to iterate over argument types.
8145
3c0d13bf
PC
81462011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8147
8148 * c-common.c (c_common_reswords): Reorder.
8149 * c-common.h (rid): Likewise.
8150
8242dd04
NF
81512011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8152
8153 * c-common.c (def_fn_type): Don't call build_function_type, call
8154 build_function_type_array or build_varargs_function_type_array
8155 instead.
8156 (c_common_nodes_and_builtins): Likewise.
8157
3d528853
NF
81582011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8159
8160 * c-common.c (c_add_case_label): Omit the loc argument to
8161 build_case_label.
8162 * c-common.h (build_case_label): Remove.
8163 * c-semantics.c (build_case_label): Remove.
8164
a04a722b
JM
81652011-05-05 Joseph Myers <joseph@codesourcery.com>
8166
8167 * c-objc.h (objc_start_method_definition): Update prototype.
8168 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8169
e19a18d4
NF
81702011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8171
8172 * c-common.c (check_main_parameter_types): Reindent. Don't use
8173 TYPE_ARG_TYPES directly.
8174 (handle_nonnull_attribute): Likewise.
8175 (sync_resolve_params): Likewise.
8176 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8177 to check_format_string.
8178 (handle_format_attribute): Likewise.
8179 (check_format_string): Take a function type to examine instead of
8180 a type list. Use a function_arg_iterator to step through argument
8181 types.
8182
c62c040f
RG
81832011-05-04 Richard Guenther <rguenther@suse.de>
8184
8185 * c-common.c (fix_string_type): Use size_int for index type bounds.
8186 (start_fname_decls): Do not pass NULL to build_int_cst.
8187 (c_init_attributes): Likewise.
8188 * c-lex.c (c_lex_with_flags): Likewise.
8189
c12ff9d8
JM
81902011-04-27 Jason Merrill <jason@redhat.com>
8191
8192 * c-common.c (make_tree_vector_from_list): New.
8193 * c-common.h: Declare it.
8194
304dfbe3
RG
81952011-04-26 Richard Guenther <rguenther@suse.de>
8196
8197 PR preprocessor/48248
8198 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8199 for output size with -P.
8200
3c0d13bf
PC
82012011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8202
8203 * c-common.c (struct c_common_resword): Add __underlying_type.
8204 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8205
04695783
JM
82062011-04-20 Jim Meyering <meyering@redhat.com>
8207
8208 * c-format.c (init_dollar_format_checking): Remove useless
8209 if-before-free.
8210
0dc33c3c
NP
82112011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8212
8213 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8214 (objc_detect_field_duplicates): New.
0dc33c3c 8215 * stub-objc.c: Likewise.
3c0d13bf 8216
c59633d9
NP
82172011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8218
8219 * stub-objc.c (objc_declare_protocols): Renamed to
8220 objc_declare_protocol.
8221 * c-objc.h: Likewise.
3c0d13bf 8222
32dabdaf
NP
82232011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8224
8225 * stub-objc.c (objc_declare_class): Updated argument name.
8226
81f653d6
NF
82272011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8228
8229 * c-common.h (c_common_init_ts): Declare.
8230 * c-common.c (c_common_init_ts): Define.
8231
eb345401
NP
82322011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8233
8234 * c-objc.h (objc_build_message_expr): Updated prototype.
8235 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8236
a358e188
MJ
82372011-04-12 Martin Jambor <mjambor@suse.cz>
8238
8239 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8240 of cgraph_node.
8241
e6313a78
RG
82422011-04-11 Richard Guenther <rguenther@suse.de>
8243
8244 * c-common.c (complete_array_type): Build a range type of
8245 proper type.
8246
dcf0c47e
NF
82472011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8248
8249 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8250 (handle_type_generic_attribute): Likewise.
8251
1ee44b26
JM
82522011-04-07 Jason Merrill <jason@redhat.com>
8253
8254 PR c++/48450
8255 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8256 conversion from C++0x scoped enum.
8257
acce4e77
JM
82582011-04-06 Joseph Myers <joseph@codesourcery.com>
8259
8260 * c-target-def.h: New file.
8261 * c-target.def: New file.
8262 * c-target.h: New file.
8263 * c-common.c (targetcm): Don't define here.
8264 * c-common.h (default_handle_c_option): Declare.
8265 * c-format.c: Include c-target.h instead of target.h.
8266 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8267 include tm.h.
8268 (default_handle_c_option): Move from targhooks.c.
8269
e2eefb55
JJ
82702011-03-29 Jakub Jelinek <jakub@redhat.com>
8271
8272 PR preprocessor/48248
8273 * c-ppoutput.c (print): Add src_file field.
8274 (init_pp_output): Initialize it.
8275 (maybe_print_line): Don't optimize by adding up to 8 newlines
8276 if map->to_file and print.src_file are different file.
8277 (print_line): Update print.src_file.
8278
ba78087b
KT
82792011-03-25 Kai Tietz <ktietz@redhat.com>
8280
8281 * c-ada-spec.c (compare_comment): Use filename_cmp
8282 instead of strcmp for filename.
8283
0edf1bb2
JL
82842011-03-25 Jeff Law <law@redhat.com>
8285
adfac8df 8286 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8287
c7dc8804
JM
82882011-03-25 Jason Merrill <jason@redhat.com>
8289
8290 * c.opt: Add -std=c++03.
8291
d1d879b1
EB
82922011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8293
8294 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8295
3f8257db 82962011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
8297
8298 PR target/12171
5050afdf
KT
8299 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8300 Display allowed attributes for function pointer types.
8301 (pp_c_attributes_display): New function to display
8302 attributes having affects_type_identity flag set to true.
8303 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8304
62d784f7
KT
8305 * c-common.c (c_common_attribute_table):
8306 Add new element.
8307 (c_common_format_attribute_table): Likewise.
8308
82d37118
JM
83092011-03-18 Jason Merrill <jason@redhat.com>
8310
49a000c3
JM
8311 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8312 * c-common.h: Don't declare it here.
8313 * c-common.c: Or define it here.
8314 * c-opts.c (c_common_handle_option): Or set it here.
8315
82d37118
JM
8316 PR c++/35315
8317 * c-common.c (handle_transparent_union_attribute): Don't
8318 make a duplicate type in C++.
8319
17bc631c
JM
83202011-03-15 Jason Merrill <jason@redhat.com>
8321
8322 * c-common.c (max_constexpr_depth): New.
8323 * c-common.h: Declare it.
8324 * c-opts.c (c_common_handle_option): Set it.
8325 * c.opt (fconstexpr-depth): New option.
8326
1b9b91a6
JM
83272011-03-11 Jason Merrill <jason@redhat.com>
8328
f231b5ff
JM
8329 * c-common.c (attribute_takes_identifier_p): Add missing const.
8330
1b9b91a6
JM
8331 PR c++/46803
8332 * c-common.c (attribute_takes_identifier_p): Assume that an
8333 unknown attribute takes an identifier.
8334
a19e4d44
NF
83352011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8336
8337 PR c/47786
8338 * c-common.c (c_type_hash): Call list_length instead of iterating
8339 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8340
982d62f6
JJ
83412011-02-19 Jakub Jelinek <jakub@redhat.com>
8342
8343 PR c/47809
8344 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8345
0a256240
NP
83462011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8347
8348 * c.opt (fobjc-abi-version=) New.
8349 (fobjc-nilcheck): New.
8350
ba9e6dd5
NF
83512011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8352
8353 PR c++/46890
8354 * c-common.h (keyword_is_decl_specifier): Declare.
8355 * c-common.c (keyword_is_decl_specifier): Define.
8356 (keyword_is_function_specifier): New function.
8357
7273813a
JJ
83582011-01-26 Jakub Jelinek <jakub@redhat.com>
8359
8360 PR c/47473
8361 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8362 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8363 REAL_TYPE.
8364
908ef79b
AC
83652011-01-26 Arnaud Charlet <charlet@adacore.com>
8366
8367 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8368
237e9384
JJ
83692011-01-26 Jakub Jelinek <jakub@redhat.com>
8370
8371 PR pch/47430
8372 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8373 after init_c_lex if pch_file is set.
8374
47ea1edf
DK
83752011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8376
d4dba752 8377 PR c++/43601
47ea1edf
DK
8378 * c.opt (-fkeep-inline-dllexport): New switch.
8379
2aa9c6ae
RG
83802011-01-12 Richard Guenther <rguenther@suse.de>
8381
8382 PR middle-end/32511
8383 * c-common.c (handle_weak_attribute): Warn instead of error
8384 on declaring an inline function weak.
8385
7bd11157
TT
83862011-01-05 Tom Tromey <tromey@redhat.com>
8387
8388 * c-common.h (lvalue_error): Update.
8389 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8390 not error.
8391
0e66e494 83922010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 8393
b4f588c4
NP
8394 PR objc/47075
8395 * c-objc.h (objc_finish_message_expr): Added argument to
8396 prototype.
8397
f4da8dce
NF
83982010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8399
8400 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8401 Use prototype_p.
8402
46270f14
NP
84032010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8404
8405 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 8406 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 8407
4816c593
NF
84082010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8409
8410 * c-common.h (readonly_error): Declare.
8411 * c-common.c (readonly_error): Define.
8412
7a6daeb0
NF
84132010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8414
8415 * c-common.h (invalid_indirection_error): Declare.
8416 * c-common.c (invalid_indirection_error): Define.
8417
892f6119
RG
84182010-12-03 Richard Guenther <rguenther@suse.de>
8419
8420 PR c/46745
8421 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8422 (pp_c_unary_expression): Likewise.
8423 (pp_c_expression): Likewise.
8424
6c39e757
NP
84252010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8426
8427 * c-common.h (objc_finish_function): New.
8428 (objc_non_volatilized_type): Removed.
8429 (objc_type_quals_match): Removed.
8430 * stub-objc.c (objc_finish_function): New.
8431 (objc_non_volatilized_type): Removed.
8432 (objc_type_quals_match): Removed.
9faeb493 8433
7c475d11
JM
84342010-11-30 Joseph Myers <joseph@codesourcery.com>
8435
8436 * c-common.h (parse_optimize_options): Declare.
8437 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8438 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8439
71f3e391
JM
84402010-11-29 Joseph Myers <joseph@codesourcery.com>
8441
8442 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8443 GET_ENVIRONMENT.
8444 * c-pch.c (O_BINARY): Don't define here.
8445 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8446
d5fabb58
JM
84472010-11-25 Joseph Myers <joseph@codesourcery.com>
8448
8449 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8450 targetm.except_unwind_info.
8451
299404a1
JM
84522010-11-23 Joseph Myers <joseph@codesourcery.com>
8453
8454 * c-opts.c (c_common_handle_option): Pass location to
8455 set_struct_debug_option.
8456
c98cd5bf
JM
84572010-11-23 Joseph Myers <joseph@codesourcery.com>
8458
8459 * c-common.c (visibility_options): Move from ../opts.c.
8460 * c-common.h (struct visibility_flags, visibility_options):
8461 Declare here.
8462 * c-opts.c (finish_options): Rename to c_finish_options.
8463 (c_common_init): Update call to finish_options.
8464
a9546771
NP
84652010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8466
8467 PR objc/34033
8468 * c-lex.c (lex_string): Check that each string in an Objective-C
8469 string concat sequence starts with either one or zero '@', and
8470 that there are no spurious '@' signs at the end.
8471
24a57808
JM
84722010-11-20 Joseph Myers <joseph@codesourcery.com>
8473
8474 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8475 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8476 HANDLE_PRAGMA_VISIBILITY.
8477 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8478 HANDLE_PRAGMA_VISIBILITY): Don't define.
8479 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8480
a9aa2c3a
NF
84812010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8482
8483 PR c++/16189
8484 PR c++/36888
8485 PR c++/45331
8486 * c-common.h (keyword_begins_type_specifier): Declare.
8487 (keyword_is_storage_class_specifier): Declare.
8488 (keyword_is_type_qualifier): Declare.
8489 * c-common.c (keyword_begins_type_specifier): New function.
8490 (keyword_is_storage_class_specifier): New function.
8491 (keyword_is_type_qualifier): Declare.
8492
5386338c
JM
84932010-11-19 Joseph Myers <joseph@codesourcery.com>
8494
8495 PR c/46547
8496 * c-common.c (in_late_binary_op): Define.
8497 (c_common_truthvalue_conversion): Check in_late_binary_op before
8498 calling c_save_expr.
8499 * c-common.h (in_late_binary_op): Declare.
8500
69ccdddb
JM
85012010-11-19 Joseph Myers <joseph@codesourcery.com>
8502
8503 * c-opts.c (c_common_handle_option): Update calls to
8504 set_struct_debug_option.
8505
6b192a09
NP
85062010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8507
8508 * c-common.h (objc_declare_protocols): Added additional argument.
8509 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 8510
fb52b50a
NF
85112010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8512
8513 PR c/33193
8514 * c-common.h (build_real_imag_expr): Declare.
8515 * c-semantics.c (build_real_imag_expr): Define.
8516
b37421c6
JM
85172010-11-17 Joseph Myers <joseph@codesourcery.com>
8518
8519 * c-opts.c (c_common_parse_file): Take no arguments.
8520 * c-common.h (c_common_parse_file): Update prototype.
8521
07078664
JJ
85222010-11-16 Jakub Jelinek <jakub@redhat.com>
8523
8524 PR c++/46401
8525 * c-common.c (warning_candidate_p): Don't track non-const calls
8526 or STRING_CSTs.
8527
c6a13190
ILT
85282010-11-15 Ian Lance Taylor <iant@google.com>
8529
8530 * c-lex.c (init_c_lex): Set macro debug callbacks if
8531 flag_dump_go_spec is set.
8532
925e8657
NP
85332010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8534
8535 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8536 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8537
bb0a9581
NF
85382010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8539
8540 PR preprocessor/45038
8541 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8542 dialects.
8543
c5fa0890
JM
85442010-11-12 Joseph Myers <joseph@codesourcery.com>
8545
8546 * c-common.h (c_family_lang_mask): Declare.
8547 * c-opts.c (c_family_lang_mask): Make extern.
8548 * c-pragma.c (handle_pragma_diagnostic): Use
8549 control_warning_option.
8550
a4d8c676
JM
85512010-11-12 Joseph Myers <joseph@codesourcery.com>
8552
8553 * c-common.c (parse_optimize_options): Update call to
8554 decode_options.
8555 * c-common.h (c_common_handle_option): Update prototype.
8556 * c-opts.c (c_common_handle_option): Take location_t parameter and
8557 pass it to other functions.
8558
f954bd2c
JM
85592010-11-11 Joseph Myers <joseph@codesourcery.com>
8560
8561 * c-opts.c (warning_as_error_callback): Remove.
8562 (c_common_initialize_diagnostics): Don't call
8563 register_warning_as_error_callback.
8564 (c_common_handle_option): Handle -Werror=normalized= here.
8565
d8a07487
JM
85662010-11-10 Joseph Myers <joseph@codesourcery.com>
8567
8568 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8569 in diagnostic.
8570 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8571 letter.
8572 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8573 Remove trailing '.' from diagnostics.
8574 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8575
d5478783
JM
85762010-11-10 Joseph Myers <joseph@codesourcery.com>
8577
8578 * c-common.c (parse_optimize_options): Pass global_dc to
8579 decode_options.
8580 * c-opts.c (c_common_handle_option): Pass &global_options to
8581 set_Wstrict_aliasing.
8582 * c.opt (v): Don't mark Common or document here.
8583
91ebb981
IS
85842010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8585
8586 PR target/44981
8587 * c-format.c (format_type): New type gcc_objc_string_format_type.
8588 (valid_stringptr_type_p): New.
8589 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 8590 (check_format_string): Pass expected type, use
91ebb981
IS
8591 valid_stringptr_type_p (), check that the format string types are
8592 consistent with the format specification.
8593 (decode_format_attr): Warn if NSString is used outside objective-c.
8594 (format_types_orig): Add NSString.
8595 (format_name): New.
8596 (format_flags): New.
8597 (check_format_arg): Handle format strings requiring an external parser.
8598 first_target_format_type: New variable.
8599 (handle_format_attribute): Set up first_target_format_type, pass the
8600 expected format arg string type to check_format_string().
8601 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8602 * stub-objc.c (objc_string_ref_type_p): New.
8603 (objc_check_format_arg): New.
8604
bede2adc
NP
86052010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8606
9faeb493 8607 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
8608 * c-common.h (objc_build_class_component_ref): New.
8609 * stub-objc.c (objc_build_class_component_ref): New.
8610
9a179d01
NP
86112010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8612
8613 * c.opt (Wproperty-assign-default): New option.
8614
22d8d616
NP
86152010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8616
8617 Implemented -fobjc-std=objc1 flag.
8618 * c.opt (fobjc-std=objc1): New option.
8619
2debdb4f
NP
86202010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8621
8622 Implemented format and noreturn attributes for Objective-C methods.
8623 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8624 attribute for Objective-C methods.
8625
ec52b111
JM
86262010-10-31 Jason Merrill <jason@redhat.com>
8627
8628 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8629 EXPR_LOC_OR_HERE.
8630
46a88c12
NP
86312010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8632
8633 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8634 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8635 (objc_add_property_declaration): Removed arguments for copies and
8636 ivar.
8637 (objc_build_getter_call): Renamed to
8638 objc_maybe_build_component_ref.
8639 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8640 (objc_is_property_ref): New.
8641 * c-common.c (c_common_reswords): Removed copies and ivar.
8642 * stub-objc.c (objc_add_property_declaration): Removed arguments
8643 for copies and ivar.
8644 (objc_build_getter_call): Renamed to
8645 objc_maybe_build_component_ref.
8646 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8647 (objc_is_property_ref): New.
9faeb493 8648
1e4bf85b
AC
86492010-10-29 Arnaud Charlet <charlet@adacore.com>
8650 Matthew Gingell <gingell@adacore.com>
8651
8652 * c-ada-spec.c (separate_class_package): New function.
8653 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8654 name of their enclosing package.
8655 (print_ada_declaration): Use separate_class_package.
8656
81f0bab2
JM
86572010-10-27 Jason Merrill <jason@redhat.com>
8658
2b08f2c5
JM
8659 * c-common.c (c_common_reswords): Add __is_literal_type.
8660 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8661
81f0bab2
JM
8662 * c-common.c (check_case_value): Remove special C++ code.
8663
200290f2
NP
86642010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8665
8666 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8667 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8668 and RID_LAST_PATTR.
8669 (objc_add_property_declaration): Added additional arguments.
8670 (objc_property_attribute_kind): Removed.
8671 (objc_set_property_attr): Removed.
8672 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8673 copy and nonatomic.
8674 * stub-objc.c (objc_add_property_declaration): Added additional
8675 arguments.
8676 (objc_set_property_attr): Removed.
9faeb493 8677
f614132b
NP
86782010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8679
8680 * c-common.h (objc_add_property_variable): Renamed to
8681 objc_add_property_declaration. Added location argument.
8682 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 8683
b8a18805
NP
86842010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8685
8686 * c-common.h (objc_maybe_printable_name): New.
8687 * stub-objc.c (objc_maybe_printable_name): New.
8688
3f8257db
JJ
86892010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8690 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
8691
8692 * c-common.h (c_common_mark_addressable_vec): Declare.
8693 * c-common.c (c_common_mark_addressable_vec): New function.
8694
249a82c4
NP
86952010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8696
8697 * c-common.h (objc_set_method_type): Removed.
8698 (objc_add_method_declaration): Added boolean argument.
8699 (objc_start_method_definition): Same change.
8700 (objc_build_method_signature): Same change.
8701 * stub-objc.c (objc_set_method_type): Removed.
8702 (objc_add_method_declaration): Added boolean argument.
8703 (objc_start_method_definition): Same change.
8704 (objc_build_method_signature): Same change.
8705
977e30bc
NP
87062010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8707
8708 * c-common.h (finish_file): Removed.
8709 (objc_write_global_declarations): New.
8710 * c-opts.c (c_common_parse_file): Do not call finish_file.
8711 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 8712
da57d1b9
NP
87132010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8714
8715 Implemented parsing @synthesize and @dynamic for
8716 Objective-C/Objective-C++.
8717 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8718 (objc_add_synthesize_declaration): New.
8719 (objc_add_dynamic_declaration): New.
8720 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8721 * stub-objc.c (objc_add_synthesize_declaration): New.
8722 (objc_add_dynamic_declaration): New.
9faeb493 8723
0069111f
MM
87242010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8725
8726 PR target/46041
8727 * c-cppbuiltin.c (mode_has_fma): Move function here from
8728 builtins.c. Don't use the fma optab, instead just use the
8729 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8730 using -save-temps.
8731
e426b47b
NP
87322010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8733
8734 Merge from 'apple/trunk' branch on FSF servers.
0069111f 8735
3f8257db 8736 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 8737
9faeb493 8738 Radar 4330422
e426b47b
NP
8739 * c-common.h (objc_non_volatilized_type): New declaration
8740 * stub-objc.c (objc_non_volatilized_type): New stub.
8741
90fbfdc3
NP
87422010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8743
e426b47b 8744 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 8745
3f8257db 8746 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 8747
9faeb493 8748 Radar 4133425
90fbfdc3 8749 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 8750 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 8751
c37d8c30
IS
87522010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8753
8754 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8755 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8756 (objc_ivar_visibility_kind): New enum.
8757 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 8758 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
8759 visibility enum.
8760
1b1562a5
MM
87612010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8762
8763 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8764 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8765 has the appropriate fma builtins.
8766 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8767
668ea4b1
IS
87682010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8769
1b1562a5 8770 merge from FSF apple 'trunk' branch.
3f8257db 8771 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 8772
668ea4b1
IS
8773 Radars 4436866, 4505126, 4506903, 4517826
8774 * c-common.c (c_common_resword): Define @property and its attributes.
8775 * c-common.h: Define property attribute enum entries.
8776 (OBJC_IS_PATTR_KEYWORD): New.
8777 (objc_property_attribute_kind): New enum.
8778 Declare objc_set_property_attr (), objc_add_property_variable (),
8779 objc_build_getter_call () and objc_build_setter_call ().
8780 * stub-objc.c (objc_set_property_attr): New stub.
8781 (objc_add_property_variable): Likewise.
8782 (objc_build_getter_call): Likewise.
8783 (objc_build_setter_call) Likewise.
1b1562a5 8784
a1178b30
IS
87852010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8786
1b1562a5 8787 merge from FSF apple 'trunk' branch.
3f8257db 8788 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
8789
8790 Radar 3803157 (method attributes)
8791 * c-common.c (handle_deprecated_attribute): Recognize
8792 objc methods as valid declarations.
8793 * c-common.h: Declare objc_method_decl ().
1b1562a5 8794 * stub-objc.c (objc_method_decl): New stub.
a1178b30 8795
a75bfaa6
JM
87962010-10-08 Joseph Myers <joseph@codesourcery.com>
8797
8798 * c-common.c (parse_optimize_options): Call
8799 decode_cmdline_options_to_array_default_mask before
8800 decode_options. Update arguments to decode_options.
8801 * c-common.h (c_common_init_options_struct): Declare.
8802 * c-opts.c (c_common_init_options_struct): New. Split out from
8803 c_common_init_options.
8804
f05b9d93
NP
88052010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8806
8807 Implemented fast enumeration for Objective-C.
8808 * c-common.h (objc_finish_foreach_loop): New.
8809 * stub-objc.c (objc_finish_foreach_loop): New.
8810
1ebe4b4f
JM
88112010-10-05 Joseph Myers <joseph@codesourcery.com>
8812
8813 * c-common.h (struct diagnostic_context): Don't declare here.
8814 (c_common_initialize_diagnostics): Declare using
8815 diagnostic_context typedef.
8816 * c-opts.c (c_common_handle_option): Pass global_dc to
8817 handle_generated_option.
8818
d4d24ba4
JM
88192010-10-04 Joseph Myers <joseph@codesourcery.com>
8820
8821 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8822 handle_generated_option.
8823
478a1c5b
ILT
88242010-10-03 Ian Lance Taylor <iant@google.com>
8825
8826 * c.opt (-fplan9-extensions): New option.
8827
82a1c2fe
FXC
88282010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8829
8830 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8831 Remove.
8832 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8833 of duplicating code.
8834
92902b1b
IS
88352010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8836
8837 * c-common.c: Add two new entries for @optional
8838 and @required keywords.
8839
8840 merge from FSF 'apple/trunk' branch.
3f8257db 8841 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
8842
8843 Radar 4386773
8844 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8845 objective-c keywords.
8846 (objc_set_method_opt): New declaration.
8847 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 8848
46625112
JM
88492010-09-30 Joseph Myers <joseph@codesourcery.com>
8850
8851 * c-common.c (handle_optimize_attribute): Pass &global_options to
8852 cl_optimization_save and cl_optimization_restore.
8853 * c-opts.c (c_common_handle_option): Pass &global_options to
8854 handle_generated_option.
8855 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8856 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8857 &global_options to cl_optimization_restore.
8858
49b91f05
NP
88592010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8860
8861 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8862 Objective-C/Objective-C++ keywords.
8863
13ed556f 88642010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 8865
9faeb493
UB
8866 Merge from 'apple/trunk' branch on FSF servers.
8867
3f8257db 8868 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
8869
8870 Radar 4281748
8871 * c-common.h (objc_check_global_decl): New declaration.
8872 * stub-objc.c (objc_check_global_decl): New stub.
8873
f0036cca
JM
88742010-09-29 Joseph Myers <joseph@codesourcery.com>
8875
8876 * c.opt: Don't use VarExists.
8877
e3339d0f
JM
88782010-09-29 Joseph Myers <joseph@codesourcery.com>
8879
8880 * c-common.c (c_cpp_error): Update names of diagnostic_context
8881 members.
8882 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8883 cl_optimization members.
8884 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8885 sanitize_cpp_opts, finish_options): Update names of cpp_options
8886 members.
8887
1973201f
NP
88882010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8889
8890 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8891 (objc_is_reserved_word): Removed.
8892 * c-common.c: Updated comments.
8893 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8894 objc_is_reserved_word.
8895 * stub-objc.c (objc_is_reserved_word): Removed.
8896
f7e71da5
IS
88972010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8898
9faeb493 8899 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
8900 include attributes.
8901 (objc_start_method_definition): Likewise.
8902 (objc_build_keyword_decl): Likewise.
8903 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8904 (objc_start_method_definition): Likewise.
8905 (objc_build_keyword_decl): Likewise.
8906
c165dca7
IS
89072010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8908
8909 * c-common.h (objc_start_class_interface): Adjust prototype.
8910 (objc_start_category_interface): Likewise.
8911 (objc_start_protocol): Likewise.
8912 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8913 (objc_start_class_interface): Likewise.
8914 (objc_start_category_interface): Likewise.
8915
7458026b
ILT
89162010-09-27 Ian Lance Taylor <iant@google.com>
8917
8918 * c-common.c (c_common_attribute_table): Add no_split_stack.
8919 (handle_no_split_stack_attribute): New static function.
8920
b581b85b
NP
89212010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8922
9faeb493 8923 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 8924
3f8257db 8925 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 8926
9faeb493 8927 Radar 4229905
b581b85b
NP
8928 * c-common.h (objc_have_common_type): New declaration.
8929 * stub-objc.c (objc_have_common_type): New stub.
8930
8931 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8932
8933 Radar 4154928
8934 * c-common.h (objc_common_type): New prototype.
9faeb493 8935 * stub-objc.c (objc_common_type): New stub.
b581b85b 8936
46a4da10
JH
89372010-09-24 Jan Hubicka <jh@suse.cz>
8938
8939 * c-common.c (handle_leaf_attribute): New function.
8940 (struct attribute_spec c_common_att): Add leaf.
8941
e200444e
JM
89422010-09-22 Joseph Myers <joseph@codesourcery.com>
8943
8944 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8945 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8946 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8947 -include-barrier, -include-directory, -include-directory=,
8948 -include-directory-after, -include-directory-after=,
8949 -include-prefix, -include-prefix=, -include-with-prefix,
8950 -include-with-prefix=, -include-with-prefix-after,
8951 -include-with-prefix-after=, -include-with-prefix-before,
8952 -include-with-prefix-before=, -no-integrated-cpp,
8953 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8954 -output=, -pedantic, -pedantic-errors, -preprocess,
8955 -print-missing-file-dependencies, -trace-includes, -traditional,
8956 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8957 -user-dependencies, -verbose, -write-dependencies,
8958 -write-user-dependencies, no-integrated-cpp, traditional): New.
8959
29a80ea6
NP
89602010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8961
8962 PR objc/23710
ac1fc2fc
NP
8963 * c-common.h (objc_start_method_definition): Return bool instead
8964 of void.
8965 * stub-objc.c (objc_start_method_definition): Return bool instead
8966 of void.
8967
89682010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8969
8970 PR objc/25965
8971 * c-common.h (objc_get_interface_ivars): New declaration.
8972 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 8973
de621752
ILT
89742010-09-15 Ian Lance Taylor <iant@google.com>
8975
8976 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 8977 messages. Remove period at end of warning message.
de621752 8978
ba885ec5
NS
89792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8980
8981 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
8982 (handle_alias_attribute): ... here.
8983 (handle_ifunc_attribute): New.
8984
c5ee1358
MM
89852010-09-06 Mark Mitchell <mark@codesourcery.com>
8986
8987 * c-common.h (do_warn_double_promotion): Declare.
8988 * c-common.c (do_warn_double_promotion): Define.
8989
0a0b3574
MM
89902010-09-05 Mark Mitchell <mark@codesourcery.com>
8991
8992 * c.opt (Wdouble-promotion): New.
8993
d1779886
JM
89942010-09-02 Joseph Myers <joseph@codesourcery.com>
8995
8996 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
8997 fvtable-thunks, fxref): Mark no longer supported in help text.
8998
2d2bd949
JM
89992010-09-02 Joseph Myers <joseph@codesourcery.com>
9000
9001 * c.opt (Wimport, fall-virtual, falt-external-templates,
9002 fdefault-inline, fenum-int-equiv, fexternal-templates,
9003 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9004 fname-mangling-version-, fnew-abi, fnonnull-objects,
9005 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9006 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9007 applicable.
9008 (fhandle-exceptions): Mark with Alias and Warn.
9009 * c-opts.c (c_common_handle_option): Don't handle options marked
9010 as ignored.
9011
5de8299c
JM
90122010-09-02 Joseph Myers <joseph@codesourcery.com>
9013
9014 * c.opt (Wcomments, Werror-implicit-function-declaration,
9015 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9016 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9017 aliases.
9018 * c-common.c (option_codes): Use OPT_Wcomment instead of
9019 OPT_Wcomments.
9020 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9021 Don't handle options marked as aliases.
9022
0ceb0201
RG
90232010-08-25 Richard Guenther <rguenther@suse.de>
9024
9025 * c-common.c (c_common_get_alias_set): Remove special
9026 handling for pointers.
9027
ac47786e
NF
90282010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9029
9030 * c-common.c: Use FOR_EACH_VEC_ELT.
9031 * c-gimplify.c: Likewise.
9032 * c-pragma.c: Likewise.
9033
c878765b
JM
90342010-08-16 Joseph Myers <joseph@codesourcery.com>
9035
9036 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9037 RejectDriver.
9038 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9039 RejectDriver.
9040 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9041 instead of OPT_MDX and OPT_MMDX.
9042
603349bf
JM
90432010-08-16 Joseph Myers <joseph@codesourcery.com>
9044
9045 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9046
644fa7ac
JM
90472010-08-12 Joseph Myers <joseph@codesourcery.com>
9048
9049 * c.opt (MD, MMD): Change to MDX and MMDX.
9050 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9051
481e1176
JM
90522010-08-11 Joseph Myers <joseph@codesourcery.com>
9053
9054 * c-opts.c (c_common_handle_option): Call handle_generated_option
9055 instead of handle_option.
9056
ac8dc9f7
NF
90572010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9058
9059 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9060 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9061
4f8c876d
NF
90622010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9063
9064 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9065 (pending_redefine_extname): Change type to a VEC.
9066 (add_to_renaming_pragma_list): Update for new type of
9067 pending_redefine_extname.
ac8dc9f7 9068 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9069
3b0c690e
AC
90702010-08-04 Arnaud Charlet <charlet@adacore.com>
9071
9072 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9073 visited.
9074 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9075 decide whether a type has already been declared/seen.
9076 Do not go to the original type.
9077 (dump_nested_types): New parameter forward.
9078 Generate forward declaration if needed and mark type as visited.
9079 (print_ada_declaration): Call dump_nested_types if not already done.
9080 Mark types as visited.
9081
1890bccc
JM
90822010-08-03 Joseph Myers <joseph@codesourcery.com>
9083
9084 * c.opt (-print-pch-checksum): Remove option.
9085 * c-opts.c (c_common_handle_option): Don't handle
9086 OPT_print_pch_checksum.
9087
5f20c657
JM
90882010-07-27 Joseph Myers <joseph@codesourcery.com>
9089
9090 * c-common.h (c_common_handle_option): Update prototype and return
9091 value type.
9092 * c-opts.c (c_common_handle_option): Update prototype and return
9093 value type. Update calls to handle_option and
9094 enable_warning_as_error.
9095
f551f80c
JJ
90962010-07-27 Jakub Jelinek <jakub@redhat.com>
9097
9098 PR c/45079
9099 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9100
61ff2bdc
JM
91012010-07-27 Joseph Myers <joseph@codesourcery.com>
9102
9103 * c-common.h (c_common_missing_argument): Remove.
9104 * c-opts.c (c_common_missing_argument): Remove.
9105 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9106 idirafter, imacros, include, isysroot, isystem, iquote): Add
9107 MissingArgError.
9108 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9109
7a9bf9a4
JM
91102010-07-27 Joseph Myers <joseph@codesourcery.com>
9111
9112 * c-common.h (c_common_option_lang_mask,
9113 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9114 New.
9115 (c_common_init_options): Update prototype.
9116 * c-opts.c (c_common_option_lang_mask): New.
9117 (c_common_initialize_diagnostics): Split out of
9118 c_common_init_options.
9119 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9120 New.
9121 (c_common_init_options): Update prototype. Use decoded options in
9122 search for -lang-asm.
9123
910ad8de
NF
91242010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9125
9126 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9127 * c-format.c: Likewise.
9128
718f9c0f
MLI
91292010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9130
9131 * c-common.h: Include diagnostic-core.h. Error if already
9132 included.
9133 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9134
4d451982
MLI
91352010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9136
adfac8df 9137 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9138 Do not include expr.h
9139 (vector_mode_valid_p): Move here.
9140
119fe915
SB
91412010-06-21 DJ Delorie <dj@redhat.com>
9142
9143 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9144 allow these pragmas anywhere.
9145
91462010-06-14 Jakub Jelinek <jakub@redhat.com>
9147
9148 PR bootstrap/44509
9149 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9150 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9151 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9152 ggc_strdup instead of xstrdup.
9153
91542010-06-10 Jakub Jelinek <jakub@redhat.com>
9155
9156 * c-cppbuiltin.c: Include cpp-id-data.h.
9157 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9158 (lazy_hex_fp_value): New function.
9159 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9160
6662d794
MLI
91612010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9162
9163 * c-gimplify.c: Do not include tree-flow.h
9164
38f8b050
JR
91652010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9166
9167 PR other/44034
9168 * c-common.c: Rename targetm member:
9169 targetm.enum_va_list -> targetm.enum_va_list_p
9170
9589f23e
AS
91712010-06-28 Anatoly Sokolov <aesok@post.ru>
9172
9173 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9174
3b06d379
SB
91752010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9176
9177 * c-cppbuiltin.c: Do not include except.h.
9178
d166d4c3
AK
91792010-06-24 Andi Kleen <ak@linux.intel.com>
9180
9faeb493
UB
9181 * c-common.c (warn_for_omitted_condop): New.
9182 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9183
70cb8be6
JM
91842010-06-21 Joseph Myers <joseph@codesourcery.com>
9185
9186 * c.opt (lang-objc): Remove.
9187 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9188
a4c97feb
JR
91892010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9190
9191 * c-opts.c: Include "tm_p.h".
9192
6e2f1956
JM
91932010-06-20 Joseph Myers <joseph@codesourcery.com>
9194
9195 * c-common.c (parse_optimize_options): Update call to
9196 decode_options.
9197
bc87224e
NF
91982010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9199
9200 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9201 new type of types_used_by_cur_var_decl.
9202
b49cf425
JR
92032010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9204
9205 PR bootstrap/44512
9206 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9207 for C++ standard compliance.
9208
59f9c2ed
JM
92092010-06-16 Jason Merrill <jason@redhat.com>
9210
9211 * c.opt: Add -Wnoexcept.
9212
33766b66
RG
92132010-06-16 Richard Guenther <rguenther@suse.de>
9214
9215 PR c/44555
9216 * c-common.c (c_common_truthvalue_conversion): Remove
9217 premature and wrong optimization concering ADDR_EXPRs.
9218
eff7e30c
AC
92192010-06-15 Arnaud Charlet <charlet@adacore.com>
9220
9221 * c-ada-spec.c (dump_sloc): Remove column info.
9222 (is_simple_enum): New function.
9223 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9224 enum types when relevant.
9225
6312e84d
MLI
92262010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9227
9faeb493 9228 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9229 location.
9230
1cb42611
JM
92312010-06-10 Joseph Myers <joseph@codesourcery.com>
9232
9233 * c-opts.c (c_common_handle_option): Don't handle
9234 OPT_fshow_column.
9235
a9429e29
LB
92362010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9237
9238 * c-pragma.c (push_alignment): Use typed GC allocation.
9239 (handle_pragma_push_options): Likewise.
9240
9241 * c-common.c (parse_optimize_options): Likewise.
9242
9243 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9244 option.
9245
5498f011
JM
92462010-06-07 Joseph Myers <joseph@codesourcery.com>
9247
9248 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9249 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9250 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9251 flag_signed_bitfields, warn_strict_null_sentinel,
9252 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9253 flag_gen_declaration, flag_no_gnu_keywords,
9254 flag_implement_inlines, flag_implicit_templates,
9255 flag_implicit_inline_templates, flag_optional_diags,
9256 flag_elide_constructors, flag_default_inline, flag_rtti,
9257 flag_conserve_space, flag_access_control, flag_check_new,
9258 flag_new_for_scope, flag_weak, flag_working_directory,
9259 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9260 flag_enforce_eh_specs, flag_threadsafe_statics,
9261 flag_pretty_templates): Remove.
9262 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9263 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9264 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9265 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9266 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9267 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9268 flag_no_gnu_keywords, flag_implement_inlines,
9269 flag_implicit_templates, flag_implicit_inline_templates,
9270 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9271 flag_rtti, flag_conserve_space, flag_access_control,
9272 flag_check_new, flag_new_for_scope, flag_weak,
9273 flag_working_directory, flag_use_cxa_atexit,
9274 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9275 flag_threadsafe_statics, flag_pretty_templates,
9276 warn_strict_null_sentinel): Remove.
9277 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9278 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9279 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9280 fimplicit-inline-templates, fimplicit-templates,
9281 flax-vector-conversions, fms-extensions, fnil-receivers,
9282 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9283 frtti, fshort-double, fshort-enums, fshort-wchar,
9284 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9285 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9286 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9287 gen-decls, undef): Use Var.
9288 (fdefault-inline, foptional-diags): Document as doing nothing.
9289 * c-opts.c (c_common_handle_option): Remove cases for options now
9290 using Var. Mark ignored options as such.
9291
39dabefd
SB
92922010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9293
9faeb493 9294 * c-common.c: Moved to here from parent directory.
39dabefd
SB
9295 * c-common.def: Likewise.
9296 * c-common.h: Likewise.
9297 * c-cppbuiltin.c: Likewise.
9298 * c-dump.c: Likewise.
9299 * c-format.c: Likewise.
9300 * c-format.h : Likewise.
9301 * c-gimplify.c: Likewise.
9302 * c-lex.c: Likewise.
9303 * c-omp.c: Likewise.
9304 * c.opt: Likewise.
9305 * c-opts.c: Likewise.
9306 * c-pch.c: Likewise.
9307 * c-ppoutput.c: Likewise.
9308 * c-pragma.c: Likewise.
9309 * c-pragma.h: Likewise.
9310 * c-pretty-print.c: Likewise.
9311 * c-pretty-print.h: Likewise.
9312 * c-semantics.c: Likewise.
9313 * stub-objc.c: Likewise.
9314
9315 * c-common.c: Include gt-c-family-c-common.h.
9316 * c-pragma.c: Include gt-c-family-c-pragma.h.
9317\f
85ec4feb 9318Copyright (C) 2010-2018 Free Software Foundation, Inc.
39dabefd
SB
9319
9320Copying and distribution of this file, with or without modification,
9321are permitted in any medium without royalty provided the copyright
9322notice and this notice are preserved.