]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
rs6000.c (rs6000_gimple_fold_builtin): Add support for early gimple folding of vec_sp...
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
b5764229
BE
12018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2
3 * c-common.c (braced_list_to_string): Remove eval parameter.
4 Add some more checks. Always create zero-terminated STRING_CST.
5 * c-common.h (braced_list_to_string): Adjust prototype.
6
85204e23
DM
72018-08-27 David Malcolm <dmalcolm@redhat.com>
8
9 PR 87091
10 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
11 to a tri-state.
12 (maybe_suggest_missing_token_insertion): Likewise.
13 (maybe_add_include_fixit): Add param "override_location". If set,
14 and source-printing is enabled, then override the rich_location's
15 primary location with that of the insertion point for the fix-it
16 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
17 * c-common.h (extern void maybe_add_include_fixit): Add bool
18 param.
19 * c-format.c (selftest::test_type_mismatch_range_labels): Update
20 for conversion of show_caret_p to a tri-state.
21 * c-warn.c (warn_for_restrict): Likewise.
22 * known-headers.cc
23 (suggest_missing_header::~suggest_missing_header): Update call to
24 maybe_add_include_fixit to suggest overriding the location, as it
25 is for a note.
26
3d78e008
ML
272018-08-27 Martin Liska <mliska@suse.cz>
28
29 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
30 fndecl_built_in_p and remove check for FUNCTION_DECL if
31 possible.
3d78e008
ML
32 (check_builtin_function_arguments): Likewise.
33 (reject_gcc_builtin): Likewise.
34 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
35
b5be6d0c
MP
362018-08-26 Marek Polacek <polacek@redhat.com>
37
38 PR c++/87029, Implement -Wredundant-move.
39 * c.opt (Wredundant-move): New option.
40
79ca9c35
MP
412018-08-21 Marek Polacek <polacek@redhat.com>
42
43 PR c++/86981, Implement -Wpessimizing-move.
44 * c.opt (Wpessimizing-move): New option.
45
097f82ec
DM
462018-08-20 David Malcolm <dmalcolm@redhat.com>
47
48 PR other/84889
49 * c-attribs.c (common_handle_aligned_attribute): Add
50 auto_diagnostic_group instance.
51 * c-indentation.c (warn_for_misleading_indentation): Likewise.
52 * c-opts.c (c_common_post_options): Likewise.
53 * c-warn.c (warn_logical_not_parentheses): Likewise.
54 (warn_duplicated_cond_add_or_warn): Likewise.
55 (warn_for_multistatement_macros): Likewise.
56
3fb558b1
NS
572018-08-20 Nathan Sidwell <nathan@acm.org>
58
59 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
60 access.
61
800c0e98
NS
622018-08-17 Nathan Sidwell <nathan@acm.org>
63
64 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
65 field.
66 (laxy_hex_fp_value_count): Make unsigned.
67 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
68 manipulate the macro.
69 (builtin_defin_with_hex_fp_value): Adjust callback name, use
70 cpp_define_lazily.
71
6f795a92
DM
722018-08-17 David Malcolm <dmalcolm@redhat.com>
73
74 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
75 (gcc_dump_printf_length_specs): New.
76 (gcc_dump_printf_flag_pairs): New.
77 (gcc_dump_printf_flag_specs): New.
78 (gcc_dump_printf_char_table): New.
79 (format_types_orig): Add entry for "gcc_dump_printf".
80 (init_dynamic_diag_info): Set up length_char_specs and
81 conversion_specs for gcc_dump_printf_format_type.
82 (handle_format_attribute): Handle gcc_dump_printf_format_type.
83
c5d725c0
NS
842018-08-17 Nathan Sidwell <nathan@acm.org>
85
10f04917
NS
86 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
87
c5d725c0
NS
88 * c-ada-spec.c: Don't #include "cpp-id-data.h"
89 * c-cppbuiltin.c: Likewise.
90
c0c12356
ML
912018-08-17 Martin Liska <mliska@suse.cz>
92
93 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
94 Ignore/Deprecated flag. Warning is done automatically for
95 Deprecated flags.
c0c12356 96
10fcc142
DM
972018-08-16 David Malcolm <dmalcolm@redhat.com>
98
99 PR c++/70693
100 * c-common.c (selftest::c_family_tests): Call
101 selftest::c_indentation_c_tests.
102 * c-common.h (selftest::c_indentation_c_tests): New decl.
103 * c-indentation.c: Include "selftest.h".
104 (next_tab_stop): Add "tab_width" param, rather than accessing
105 cpp_opts.
106 (get_visual_column): Likewise. Clarify comment. Bulletproof
107 against reading past the end of the line.
108 (get_first_nws_vis_column): Add "tab_width" param.
109 (detect_intervening_unindent): Likewise.
110 (should_warn_for_misleading_indentation): Read tab width from
111 cpp_opts and pass around.
112 (selftest::test_next_tab_stop): New test.
113 (selftest::assert_get_visual_column_succeeds): New function.
114 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
115 (selftest::assert_get_visual_column_fails): New function.
116 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
117 (selftest::test_get_visual_column): New test.
118 (selftest::c_indentation_c_tests): New function.
119
3f6677f4
NS
1202018-08-16 Nathan Sidwell <nathan@acm.org>
121
122 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
123 (store_ada_macro): Likewise.
124 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
125 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
126
96e6ae57
DM
1272018-08-15 David Malcolm <dmalcolm@redhat.com>
128
129 * c-format.c: Include "selftest-diagnostic.h" and
130 "gcc-rich-location.h".
131 (format_warning_at_char): Pass NULL for new label params of
132 format_warning_va.
133 (class indirection_suffix): New class.
134 (class range_label_for_format_type_mismatch): New class.
135 (format_type_warning): Move logic for generating "*" suffix to
136 class indirection_suffix. Create "fmt_label" and "param_label"
137 to show their types, and pass them to the
138 format_warning_at_substring calls.
139 (selftest::test_type_mismatch_range_labels): New test.
140 (selftest::c_format_c_tests): Call it.
141
23aa9f7c
MS
1422018-08-13 Martin Sebor <msebor@redhat.com>
143
144 PR tree-optimization/71625
145 * c-common.c (braced_list_to_string): New function.
146 * c-common.h (braced_list_to_string): Declare it.
147
f10a9135
NS
1482018-08-08 Nathan Sidwell <nathan@acm.org>
149
150 * c-common.c (try_to_locate_new_include_inertion_point): Use
151 linemap_included_from_linemap.
152 * c-lex.c (fe_file_change): Use linemap_included_from.
153 * c-ppoutput.c (pp_file_change): Likewise.
154
8a45b051
MS
1552018-08-01 Martin Sebor <msebor@redhat.com>
156
157 PR tree-optimization/86650
158 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
159 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
160 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
161 * c-format.h (T89_G): Update to be "gimple *" rather than
162 "gcall *".
163 (local_gcall_ptr_node): Rename...
164 (local_gimple_ptr_node): ...to this.
165
e540ccc0
DM
1662018-07-31 David Malcolm <dmalcolm@redhat.com>
167
168 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
169 table entries for gcc_diag_char_table, and the 'Z' entry from
170 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
171 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
172 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
173 adding missing "Z" for this table. Remove erroneous "G" and "K"
174 entries.
175 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
176 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
177 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
178
425fc685
RE
1792018-07-31 Richard Earnshaw <rearnsha@arm.com>
180
181 * c-common.c (speculation_safe_resolve_call): New function.
182 (speculation_safe_resolve_params): New function.
183 (speculation_safe_resolve_return): New function.
184 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
185 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
186 __HAVE_SPECULATION_SAFE_VALUE.
187
181463c2
DM
1882018-07-20 David Malcolm <dmalcolm@redhat.com>
189
190 * c-common.c (c_cpp_error): Remove redundant "line_table"
191 parameter from call to rich_location::set_range.
192 (maybe_suggest_missing_token_insertion): Likewise.
193
0d7f9065
MS
1942018-07-20 Martin Sebor <msebor@redhat.com>
195
196 PR middle-end/82063
197 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
198
00abf86c
MS
1992018-07-20 Martin Sebor <msebor@redhat.com>
200
201 PR middle-end/82063
202 * c-common.h (c_common_handle_option): Change function argument
203 to HOST_WIDE_INT.
204 * c-opts.c (c_common_init_options): Same.
205 (c_common_handle_option): Same. Remove special handling of
206 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
207 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
208 options to take a HOST_WIDE_INT argument and accept a byte-size
209 suffix. Initialize.
210 (-Wvla-larger-than): Same.
211 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
212 (-Wno-vla-larger-than): Same.
213
9b452033
JJ
2142018-07-12 Jakub Jelinek <jakub@redhat.com>
215
216 * c-attribs.c (c_common_attribute_table): Add
217 "omp declare target implicit" attribute.
218
cd0762f3
RB
2192018-07-12 Richard Biener <rguenther@suse.de>
220
221 PR c/86453
222 * c-attribs.c (handle_packed_attribute): Do not build a variant
223 type with TYPE_PACKED, instead ignore the attribute if we may
224 not apply to the original type.
225
0b27c3ed
JJ
2262018-07-10 Jakub Jelinek <jakub@redhat.com>
227
228 PR c++/86443
229 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
230 to contain TREE_LIST for both the original class iterator and the
231 "last" helper var.
232
e730a0ef
EB
2332018-07-07 Eric Botcazou <ebotcazou@adacore.com>
234
235 * c-ada-spec.c (to_ada_name): Remove index parameter.
236 (pp_ada_tree_identifier): Likewise.
237 (dump_ada_macros): Adjust call to to_ada_name.
238 (struct overloaded_name_hash): Delete.
239 (struct overloaded_name_hasher): Likewise.
240 (overloaded_names): Likewise.
241 (compute_overloading_index): Likewise.
242 (dump_ada_decl_name): Do not call compute_overloading_index and
243 adjust calls to pp_ada_tree_identifier.
244 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
245 (dump_ada_import): Add spc parameter and switch to aspect syntax.
246 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
247 (dump_ada_enum_type): Remove type and display_convention parameters.
248 Adjust calls to pp_ada_tree_identifier.
249 (dump_ada_node): Likewise and for dump_ada_structure.
250 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
251 and tidy up.
252 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
253 syntax.
254 (print_constructor): Adjust call to pp_ada_tree_identifier.
255 (print_destructor): Likewise.
256 (dump_ada_declaration): Switch to aspect syntax.
257 (dump_ada_structure): Likewise and tidy up. Replace display_convention
258 parameter with nested parameter.
259 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
260 (dump_ada_specs): Do not delete overloaded_names table.
261
8de583fc
PB
2622018-07-06 Peter Bergner <bergner@linux.ibm.com>
263
264 PR target/86324
e730a0ef 265 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
266 target hook.
267
09cff37b
NS
2682018-07-05 Nathan Sidwell <nathan@acm.org>
269
270 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
271 NO_IMPLICIT_EXTERN_C.
272
98086b2b
ML
2732018-06-28 Martin Liska <mliska@suse.cz>
274
275 * cppspec.c: Include opt-suggestions.h.
276
829c6349
CLT
2772018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
278 Thomas Schwinge <thomas@codesourcery.com>
279 Cesar Philippidis <cesar@codesourcery.com>
280
281 * c-pragma.h (enum pragma_omp_clause): Add
282 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
283 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
284
f41b7612
JJ
2852018-06-20 Jakub Jelinek <jakub@redhat.com>
286
287 PR c++/86210
288 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
289 comment.
290
4252ccd7
MS
2912018-06-18 Martin Sebor <msebor@redhat.com>
292
293 PR middle-end/85602
294 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
295 nonstring.
296
e197e64e
KV
2972018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
298
299 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
300
34a7a230
JM
3012018-06-13 Jason Merrill <jason@redhat.com>
302
5cef3733
JM
303 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
304 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
305 handling.
306
34a7a230
JM
307 PR c++/86094 - wrong code with defaulted move ctor.
308 * c-opts.c (c_common_post_options): Bump the current ABI version to
309 13. Set warn_abi_version and flag_abi_compat_version to the current
310 version rather than 0. Fix defaulting flag_abi_compat_version from
311 warn_abi_version.
312
bb0f14ae
MS
3132018-06-12 Martin Sebor <msebor@redhat.com>
314
315 PR c/85931
316 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
317 sizeof source and destination yields the same value.
318
3713f2e2
ML
3192018-06-12 Martin Liska <mliska@suse.cz>
320
321 * c.opt: Make MPX-related options as Deprecated.
322
4af78ef8
DM
3232018-06-08 David Malcolm <dmalcolm@redhat.com>
324
325 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
326 rather than 0.
327
31db0fe0
ML
3282018-06-08 Martin Liska <mliska@suse.cz>
329
330 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
331 for MPX (macros, related functions, fields in cgraph_node, ...).
332 (handle_bnd_legacy): Likewise.
333 (handle_bnd_instrument): Likewise.
334 * c.opt: Likewise.
335
fe16acf2
JJ
3362018-06-06 Jakub Jelinek <jakub@redhat.com>
337
338 PR c++/86068
339 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
340 __cpp_transactional_memory to 201500 instead of 210500.
341
4dbdb49b
JM
3422018-06-06 Jason Merrill <jason@redhat.com>
343
344 PR c++/85710 - ICE with -Wmemset-elt-size.
345 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
346
f8ad043f
JM
3472018-06-01 Jason Merrill <jason@redhat.com>
348
349 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
350 201703.
351
abc24d93
EB
3522018-06-01 Eric Botcazou <ebotcazou@adacore.com>
353
354 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
355 declaration for a typedef independently of whether the declaration of
356 the subtype is generated.
357
d258f4aa
MS
3582018-05-31 Martin Sebor <msebor@redhat.com>
359
360 PR c/82063
361 * c.opt (-Wno-alloc-size-larger-than): New option.
362
b67b9225
DP
3632018-04-22 David Pagan <dave.pagan@oracle.com>
364
365 PR c/55976
366 * c-opts.c (c_common_post_options): Set default for warn_return_type
367 for C++/C++ with ObjC extensions only. For C, makes it possible to
368 differentiate between default (no option), -Wreturn-type, and
369 -Wno-return-type.
370
04eb9c55
JM
3712018-05-29 Jason Merrill <jason@redhat.com>
372
373 * c.opt (Winit-list-lifetime): New flag.
374
b0c31bc6
BE
3752018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
376
377 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
378 splay_tree_delete_pointers.
379
44284983
JJ
3802018-05-26 Jakub Jelinek <jakub@redhat.com>
381
382 PR bootstrap/85921
383 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
384 noinline variable to workaround broken kernel headers.
385
b46b715d
JM
3862018-05-18 Jason Merrill <jason@redhat.com>
387
388 * c.opt (Wdeprecated-copy): New flag.
389
40659769
ML
3902018-05-17 Martin Liska <mliska@suse.cz>
391
392 * c-warn.c (overflow_warning): Do not use
393 space in between 'G_' and '('.
394
403962ea
JM
3952018-05-09 Jason Merrill <jason@redhat.com>
396
397 * c-common.c (valid_array_size_p): Add complain parameter.
398 * c-common.h: ...which defaults to true.
399
1c9ee609
JJ
4002018-05-11 Jakub Jelinek <jakub@redhat.com>
401
402 PR c/85696
403 * c-omp.c (c_omp_predetermined_sharing): Return
404 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
405
19916065
ML
4062018-05-11 Martin Liska <mliska@suse.cz>
407
92a285c1 408 PR sanitizer/85556
19916065
ML
409 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
410 TREE_LIST values.
411
79e7b1fe
JJ
4122018-05-10 Jakub Jelinek <jakub@redhat.com>
413
414 PR c++/85662
415 * c-common.h (fold_offsetof_1): Removed.
416 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
417 CTX argument defaulted to ERROR_MARK.
418 * c-common.c (fold_offsetof_1): Renamed to ...
419 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
420 argument, convert the pointer constant to TYPE and use size_binop
421 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
422 a pointer type. Adjust recursive calls.
423
86c12f76
EB
4242018-05-10 Eric Botcazou <ebotcazou@adacore.com>
425
426 PR c++/85400
427 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
428
ee336e84
NS
4292018-05-07 Nathan Sidwell <nathan@acm.org>
430
431 * c.opt (ffor-scope): Remove functionality, issue warning.
432
6c072e21
NS
4332018-05-03 Nathan Sidwell <nathan@acm.org>
434
435 * c.opt (ffriend-injection): Remove functionality, issue warning.
436
2cc7d3a7
DM
4372018-05-01 David Malcolm <dmalcolm@redhat.com>
438
439 PR c/84258
440 * c-format.c (struct format_check_results): Add field
441 "number_non_char".
442 (check_format_info): Initialize it, and warn if encountered.
443 (check_format_arg): Distinguish between wide char and
444 everything else when detecting arrays of non-char.
445
7761dfbe
DM
4462018-04-30 David Malcolm <dmalcolm@redhat.com>
447
448 * c-format.c (get_corrected_substring): Update for
449 location_get_source_line returning a char_span. Use a char_span
450 when handling the prefix of the correction.
451 * c-indentation.c (get_visual_column): Update for
452 location_get_source_line returning a char_span.
453 (get_first_nws_vis_column): Likewise.
454
62e98ef1
DM
4552018-03-29 David Malcolm <dmalcolm@redhat.com>
456
457 PR c++/84269
458 * known-headers.cc (get_stdlib_header_for_name): Add various names
459 from <assert.h>, <string.h>, and <memory.h>; add more names from
460 <stdio.h>.
461
a7dea617
JJ
4622018-03-27 Jakub Jelinek <jakub@redhat.com>
463
464 PR c++/85061
465 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
466 get_base_address of the second operand is a VAR_P, rather than the
467 operand itself, and use gcc_checking_assert instead of gcc_assert.
468
889a3a30
MP
4692018-03-23 Marek Polacek <polacek@redhat.com>
470
471 PR c++/85045
472 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
473 <case RDIV_EXPR>: Tweak condition.
474
452154b9
EB
4752018-03-20 Eric Botcazou <ebotcazou@adacore.com>
476
477 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
478
63ecb626
JJ
4792018-03-16 Jakub Jelinek <jakub@redhat.com>
480
ce811fc4
JJ
481 PR c/84909
482 * c-warn.c (conversion_warning): Replace "to to" with "to" in
483 diagnostics.
484
63ecb626
JJ
485 PR c/84910
486 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
487 diagnostics.
488
a1295eec
RB
4892018-03-16 Richard Biener <rguenther@suse.de>
490
491 PR c/84873
492 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
493 unshare the possibly folded expression.
494
919674fb
RB
4952018-03-15 Richard Biener <rguenther@suse.de>
496
497 PR c/84873
498 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
499
f99309b2
MS
5002018-03-13 Martin Sebor <msebor@redhat.com>
501
502 PR tree-optimization/84725
503 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
504 with all three narrow character types, including their qualified forms.
505
e9b9fa4c
MS
5062018-03-12 Martin Sebor <msebor@redhat.com>
507
508 PR tree-optimization/83456
509 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
510 Restore checking of bounded built-in functions.
511 (check_function_arguments): Also return the result
512 of warn_for_restrict.
513 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
514 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
515
0805d020
MP
5162018-03-02 Marek Polacek <polacek@redhat.com>
517
518 PR c++/84171
519 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
520 is erroneous.
521
ed2a2f08
TS
5222018-03-02 Thomas Schwinge <thomas@codesourcery.com>
523
524 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
525 function".
526
90abdde0
MP
5272018-03-01 Marek Polacek <polacek@redhat.com>
528
529 PR c++/84639
530 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
531 alignment in computation.
532
c6db43fa
EB
5332018-02-28 Eric Botcazou <ebotcazou@adacore.com>
534
535 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
536 <REAL_TYPE>: Deal specifically with _Float128/__float128.
537
9e25c7ed
EB
5382018-02-28 Eric Botcazou <ebotcazou@adacore.com>
539
540 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
541 (is_char_array): Take a type instead of a declaration.
542 (dump_ada_array_type): Likewise.
543 (is_simple_enum): Minor tweak.
544 (dump_ada_enum_type): New function extracted from...
545 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
546 <INTEGER_TYPE>: Remove unreachable code.
547 <RECORD_TYPE>: Likewise. Minor tweaks.
548 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
549 <ENUMERAL_TYPE>: New case.
550 <RECORD_TYPE>: Factor out common code.
551 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
552 Minor tweaks. Deal with enumeral types.
553 (dump_ada_structure): Minor tweaks.
554
09de3550
EB
5552018-02-28 Eric Botcazou <ebotcazou@adacore.com>
556
557 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
558 address for incomplete structures.
559 (dump_forward_type): Do not bail out for incomplete structures.
560 (dump_ada_declaration): Do not special-case incomplete structures
561 for subtypes. Dump them as null records for types.
562
095d8d4b
EB
5632018-02-28 Eric Botcazou <ebotcazou@adacore.com>
564
565 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
566 (is_char_array): Fix formatting.
567 (dump_template_types): Likewise.
568 (dump_generic_ada_node): Rename into...
569 (dump_ada_node): ...this.
570 <POINTER_TYPE>: Remove superfluous space. Use generic address for
571 incomplete structures and not for empty structures. Do not use it
572 when forward declarations are needed.
573 (dump_forward_type): New function.
574 (dump_nested_types): Remove FORWARD parameter. Do not consider
575 TREE_VISITED and do not generate a forward declaration. Only dump
576 original nested types for nested declaration.
577 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
578 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
579 <RECORD_TYPE>: Do not consider TREE_VISITED.
580 (dump_ada_declaration): Use booleans and fix formatting throughout.
581 <TYPE_DECL>: Skip incomplete structures and not empty structures.
582 Call dump_forward_type instead of dump_nested_types for a typedef.
583 Remove superfluous check and adjust call to dump_nested_types.
584 <POINTER_TYPE>: Call dump_forward_type and fall through.
585 (dump_ada_struct_decl): Rename into...
586 (dump_ada_structure): ...this. Do not special-case empty structures.
587
d4cfd486
MS
5882018-02-27 Martin Sebor <msebor@redhat.com>
589
590 PR c++/83871
591 * c.opt (-Wmissing-attributes): New option.
592
b22dbd03
ML
5932018-02-21 Martin Liska <mliska@suse.cz>
594
595 * c.opt (Wcatch-value=): Add IntegerRange.
596
883dfe2a
JM
5972018-02-15 Jason Merrill <jason@redhat.com>
598
599 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
600
0444aa9c
NS
6012018-02-09 Nathan Sidwell <nathan@acm.org>
602
603 PR c/84293
604 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
605 arg.
606 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
607 arg. Adjust.
608
cea71f0a
MS
6092018-02-09 Martin Sebor <msebor@redhat.com>
610
611 PR lto/84212
612 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
613 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
614 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
615 (-Wstrict-overflow, -Wsuggest-attribute): Same.
616 (-Wuninitialized): Same.
617
8c8b7be5
EB
6182018-02-09 Eric Botcazou <ebotcazou@adacore.com>
619
620 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
621 keyword for components.
622
7c30b12a
PC
6232018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
624
625 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
626
eece7fe5
JK
6272018-02-02 Julia Koval <julia.koval@intel.com>
628
629 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
630
7d07a93a
MP
6312018-01-29 Marek Polacek <polacek@redhat.com>
632
633 PR c/83966
634 * c-format.c (check_function_format): Check current_function_decl.
635
53723269
JJ
6362018-01-27 Jakub Jelinek <jakub@redhat.com>
637
638 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
639 argument.
640 (LAZY_HEX_FP_VALUES_CNT): Define.
641 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
642 values rather than just 12.
643 (builtin_define_with_hex_fp_value): Likewise.
644
7365279f
BK
6452018-01-18 Boris Kolpackov <boris@codesynthesis.com>
646
92a285c1
ML
647 PR other/70268
648 * c.opt (-fmacro-prefix-map): New option.
649 * c-opts.c (c_common_handle_option): Handle it.
650 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
651 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 652
bb9869d5
DM
6532018-01-17 David Malcolm <dmalcolm@redhat.com>
654
655 PR c++/83814
656 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
657
68dc87c3
EB
6582018-01-10 Eric Botcazou <ebotcazou@adacore.com>
659
660 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
661 Skip 'f' and 'F' characters if it is true.
662 (store_ada_macro): Minor tweak.
663 (dump_ada_macros) <CPP_COMMENT>: Likewise.
664 <CPP_WSTRING>: Likewise.
665 <CPP_STRING>: Output '&' in the buffer if not the first string.
666 <CPP_NUMBER>: Adjust calls to dump_number.
667
9a004410
DM
6682018-01-10 David Malcolm <dmalcolm@redhat.com>
669
670 PR c++/43486
671 * c-common.c: Include "selftest.h".
672 (get_atomic_generic_size): Perform the test for integral type
673 before the range test for any integer constant, fixing indentation
674 of braces. Call fold_for_warn before testing for an INTEGER_CST.
675 (reject_gcc_builtin): Strip any location wrapper from EXPR.
676 (selftest::test_fold_for_warn): New function.
677 (selftest::c_common_c_tests): New function.
678 (selftest::c_family_tests): Call it, and
679 selftest::c_pretty_print_c_tests.
680 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
681 * c-format.c (check_format_arg): Convert VAR_P check to a
682 fold_for_warn.
683 * c-pretty-print.c: Include "selftest.h".
684 (pp_c_cast_expression): Don't print casts for location wrappers.
685 (selftest::assert_c_pretty_printer_output): New function.
686 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
687 (selftest::test_location_wrappers): New function.
688 (selftest::c_pretty_print_c_tests): New function.
689 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
690
5c0caeb3
RS
6912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
692 Alan Hayward <alan.hayward@arm.com>
693 David Sherwood <david.sherwood@arm.com>
694
695 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
696
73a699ae
RS
6972018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
698 Alan Hayward <alan.hayward@arm.com>
699 David Sherwood <david.sherwood@arm.com>
700
701 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
702 as polynomial.
703
928686b1
RS
7042018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
705 Alan Hayward <alan.hayward@arm.com>
706 David Sherwood <david.sherwood@arm.com>
707
708 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
709 (convert_vector_to_array_for_subscript): Handle polynomial
710 TYPE_VECTOR_SUBPARTS.
711 (c_common_type_for_mode): Check valid_vector_subparts_p.
712 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
713 VECTOR_CST_NELTS.
714
85ec4feb
JJ
7152018-01-03 Jakub Jelinek <jakub@redhat.com>
716
717 Update copyright years.
718
170a8bd6 7192017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 720 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
721
722 * c-pragma.c (init_pragma): Register pragma GCC unroll.
723 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
724
18408e96
AO
7252017-12-22 Alexandre Oliva <aoliva@redhat.com>
726
727 PR debug/83527
728 PR debug/83419
729 * c-semantics.c (only_debug_stmts_after_p): New.
730 (pop_stmt_list): Clear side effects in debug-only stmt list.
731 Check for single nondebug stmt followed by debug stmts only.
732
c12d20d4
AO
7332017-12-21 Alexandre Oliva <aoliva@redhat.com>
734
735 PR debug/83419
736 * c-semantics.c (pop_stmt_list): Propagate side effects from
737 single nondebug stmt to container list.
738
01512446
JJ
7392017-12-19 Jakub Jelinek <jakub@redhat.com>
740
741 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
742 conditions with typical order conditions.
743
82cfbd01
MP
7442017-12-18 Marek Polacek <polacek@redhat.com>
745
746 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
747 not in effect.
748
99da11ec
MS
7492017-12-17 Martin Sebor <msebor@redhat.com>
750
751 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
752 an error for attribute warn_if_not_aligned.
753
cc8bea0a
MS
7542017-12-16 Martin Sebor <msebor@redhat.com>
755
756 PR tree-optimization/78918
757 * c-common.c (check_function_restrict): Avoid checking built-ins.
758 * c.opt (-Wrestrict): Include in -Wall.
759
4849deb1
JJ
7602017-12-15 Jakub Jelinek <jakub@redhat.com>
761
762 * c-attribs.c (c_common_attribute_table,
763 c_common_format_attribute_table): Swap affects_type_identity
764 and handler fields, adjust comments.
765
c65e18d3
BE
7662017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
767
768 * c.opt (Wcast-function-type): New warning option.
769 * c-lex.c (get_fileinfo): Avoid warning.
770 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
771
2004617a
QZ
7722017-12-14 Qing Zhao <qing.zhao@oracle.com>
773
7365279f 774 PR middle_end/79538
2004617a
QZ
775 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
776 Adjust the size of buf1 and buf2, add a new buf to avoid
777 format-overflow warning.
778
96a95ac1
AO
7792017-12-12 Alexandre Oliva <aoliva@redhat.com>
780
781 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
782 subsequent statement list.
783
5d9ae53d
MS
7842017-12-07 Martin Sebor <msebor@redhat.com>
785
786 PR c/81544
787 PR c/81566
788 * c-attribs.c (attr_aligned_exclusions): New array.
789 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
790 (attr_common_exclusions, attr_const_pure_exclusions): Same.
791 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
792 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
793 (attr_warn_unused_result_exclusions): Same.
794 (handle_hot_attribute, handle_cold_attribute): Simplify.
795 (handle_const_attribute): Warn on function returning void.
796 (handle_pure_attribute): Same.
797 (handle_aligned_attribute): Diagnose conflicting attribute
798 specifications.
799 * c-warn.c (diagnose_mismatched_attributes): Simplify.
800
c79144f8
DM
8012017-12-06 David Malcolm <dmalcolm@redhat.com>
802
803 PR c/83236
804 * c-common.c (selftest::c_family_tests): Call
805 selftest::c_spellcheck_cc_tests.
806 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
807 * c-spellcheck.cc: Include "selftest.h".
808 (name_reserved_for_implementation_p): New function.
809 (should_suggest_as_macro_p): New function.
810 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
811 should_suggest_as_macro_p and call it.
812 (selftest::test_name_reserved_for_implementation_p): New function.
813 (selftest::c_spellcheck_cc_tests): New function.
814 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
815
613bc14f
DM
8162017-12-06 David Malcolm <dmalcolm@redhat.com>
817
818 * c-spellcheck.cc: New file, taken from macro-handling code in
819 spellcheck-tree.c.
820 * c-spellcheck.h: New file, taken from macro-handling code in
821 spellcheck-tree.h.
822
e76c7157
JJ
8232017-12-01 Jakub Jelinek <jakub@redhat.com>
824
825 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
826 attribute.
827 (handle_simd_attribute): Don't check for "cilk simd function"
828 attribute. Reindent, formatting changes.
829
b0da4034
JK
8302017-11-30 Julia Koval <julia.koval@intel.com>
831
832 * c-common.h (inv_list): Remove.
833
058f0b9e
JJ
8342017-11-28 Jakub Jelinek <jakub@redhat.com>
835
836 PR sanitizer/81275
837 * c-common.c (c_switch_covers_all_cases_p_1,
838 c_switch_covers_all_cases_p): New functions.
839 * c-common.h (c_switch_covers_all_cases_p): Declare.
840
5e9d6aa4 8412017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 842 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
843
844 * array-notation-common.c: Delete.
845 * c-cilkplus.c: Ditto.
846 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
847 * c-common.def (ARRAY_NOTATION_REF): Remove.
848 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
849 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
850 c_validate_cilk_plus_loop, cilkplus_an_parts,
851 cilk_ignorable_spawn_rhs_op,
852 cilk_recognize_spawn): Remove.
853 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
854 * c-omp.c: Remove CILK_SIMD check.
855 * c-pragma.c: Ditto.
856 * c-pragma.h: Remove CILK related pragmas.
857 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
858 ARRAY_NOTATION_REF condition.
859 (c_pretty_printer::expression): Ditto.
860 * c.opt (fcilkplus): Remove.
861 * cilk.c: Delete.
862
1af4ebf5
MG
8632017-11-21 Marc Glisse <marc.glisse@inria.fr>
864
865 * c-pretty-print.c (pp_c_additive_expression,
866 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
867
d44ed508
JJ
8682017-11-21 Jakub Jelinek <jakub@redhat.com>
869
7d2f0f9b
JJ
870 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
871
d44ed508
JJ
872 PR c++/83059
873 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
874 instead of tree_to_uhwi, formatting fix.
875
26edace6
DM
8762017-11-20 David Malcolm <dmalcolm@redhat.com>
877
878 PR c/81404
879 * known-headers.cc: New file, based on material from c/c-decl.c.
880 (suggest_missing_header): Copied as-is.
881 (get_stdlib_header_for_name): New, based on get_c_name_hint but
882 heavily edited to add C++ support. Add some knowledge about
883 <limits.h>, <stdint.h>, and <wchar.h>.
884 * known-headers.h: Likewise.
885
6c7a259b
DM
8862017-11-20 David Malcolm <dmalcolm@redhat.com>
887
888 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
889 (lookup_name_fuzzy): Likewise. Convert return type from
890 const char * to name_hint. Add location_t param.
891 * name-hint.h: New header.
892
f9c59f7e
JJ
8932017-11-19 Jakub Jelinek <jakub@redhat.com>
894
895 PR c/66618
896 PR c/69960
897 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
898
1e39313a
JM
8992017-11-16 Joseph Myers <joseph@codesourcery.com>
900
901 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
902 expected publication date of C17.
903 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
904
3ca0dc60
JM
9052017-11-15 Joseph Myers <joseph@codesourcery.com>
906
907 PR c/81156
908 * c-common.c (c_common_reswords): Add __builtin_tgmath.
909 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
910
025d57f0
MS
9112017-11-10 Martin Sebor <msebor@redhat.com>
912
913 PR c/81117
914 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
915 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
916 * c.opt (-Wstringop-truncation): New option.
917
1b6fa695
ML
9182017-11-06 Martin Liska <mliska@suse.cz>
919
920 PR middle-end/82404
921 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
922 FE.
923 * c.opt: Set default value of warn_return_type.
924
64a5912c
DM
9252017-10-31 David Malcolm <dmalcolm@redhat.com>
926
927 * c-common.c (binary_op_error): Update for renaming of
928 error_at_rich_loc.
929 (c_parse_error): Likewise.
930 * c-warn.c (warn_logical_not_parentheses): Likewise for
931 renaming of inform_at_rich_loc.
932 (warn_for_restrict): Likewise for renaming of
933 warning_at_rich_loc_n.
934
c76dc9c3
JM
9352017-10-30 Joseph Myers <joseph@codesourcery.com>
936
937 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
938 * c-opts.c (set_std_c17): New function.
939 (c_common_init_options): Use gnu17 as default C version.
940 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
941
ee5fd23a
MM
9422017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
943
944 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
945 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
946 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
947 __FP_FAST_FMA<N>X.
948
d1047465
MP
9492017-10-23 Marek Polacek <polacek@redhat.com>
950
951 PR c/82681
952 * c-warn.c (warnings_for_convert_and_check): Fix typos.
953
9e878cf1
EB
9542017-10-19 Eric Botcazou <ebotcazou@adacore.com>
955
956 * c-common.c (check_builtin_function_arguments): Also check arguments
957 of __builtin_alloca_with_align_and_max.
958
89b6abbb
DM
9592017-10-17 David Malcolm <dmalcolm@redhat.com>
960
961 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
962 rather than NULL to format_warning_va.
963 (check_format_types): Likewise when calling format_type_warning.
964 Remove code to extract source_ranges and source_range * in favor
965 of just a location_t.
966 (format_type_warning): Convert source_range * param to a
967 location_t.
968
39382c09
JJ
9692017-10-13 Jakub Jelinek <jakub@redhat.com>
970
971 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
972 [LR]SHIFT_EXPR.
973
62e1c678
DM
9742017-10-12 David Malcolm <dmalcolm@redhat.com>
975
976 * c-common.c (enum missing_token_insertion_kind): New enum.
977 (get_missing_token_insertion_kind): New function.
978 (maybe_suggest_missing_token_insertion): New function.
979 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
980
b90c9338
NS
9812017-10-11 Nathan Sidwell <nathan@acm.org>
982
983 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
984 (c_common_handle_option): Update incpath_kind names.
985
3a266bcd
ML
9862017-10-11 Martin Liska <mliska@suse.cz>
987
988 PR sanitizer/82490
989 * c-attribs.c (handle_no_sanitize_attribute): Report directly
990 Wattributes warning.
991
8e6cdc90
RS
9922017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
993
994 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
995 operating on trees as wide_ints.
996 * c-common.c (pointer_int_sum): Likewise.
997 * c-pretty-print.c (pp_c_integer_constant): Likewise.
998 * c-warn.c (match_case_to_enum_1): Likewise.
999 (c_do_switch_warnings): Likewise.
1000 (maybe_warn_shift_overflow): Likewise.
1001
802b38c9
JJ
10022017-10-10 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c/82437
1005 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1006 instead of wide_int::from.
1007
4e34b338
JJ
10082017-10-06 Jakub Jelinek <jakub@redhat.com>
1009
1010 PR c/82437
1011 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1012 using to_widest use wide_int with the larger of the two precisions.
1013
4bc4b2b4
BE
10142017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1015
1016 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1017 functions.
1018
a1488398
RS
10192017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1020
1021 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1022 when combining the original unconverted comparison operands.
1023
01c9fb68
JJ
10242017-09-29 Jakub Jelinek <jakub@redhat.com>
1025
1026 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1027 attribute.
1028
6e3e8419
EB
10292017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1030
1031 * c-ada-spec.c (to_ada_name): Add index parameter.
1032 (pp_ada_tree_identifier): Likewise.
1033 (dump_ada_macros): Adjust call to to_ada_name.
1034 (struct overloaded_name_hash): New type.
1035 (struct overloaded_name_hasher): Likewise.
1036 (overloaded_names): New hash table.
1037 (compute_overloading_index): New function.
1038 (dump_ada_decl_name): Call it and pass the result to
1039 pp_ada_tree_identifier.
1040 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1041 (dump_ada_function_declaration): Likewise.
1042 (dump_generic_ada_node): Likewise.
1043 (print_constructor): Likewise.
1044 (print_destructor): Likewise.
1045 (dump_ada_specs): Delete overloaded_names table.
1046
79310774
EB
10472017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1048
1049 * c-ada-spec.c (max_ada_macros): Move around.
1050 (store_ada_macro_index): Likewise.
1051 (source_file): Rename into...
1052 (macro_source_file): ...this.
1053 (count_ada_macro): Move around.
1054 (store_ada_macro): Likewise.
1055 (compare_macro): Likewise.
1056 (print_ada_macros): Merge in...
1057 (dump_ada_macros): ...this.
1058 (source_file_base): Rename into...
1059 (current_source_file): ...this.
1060 (print_comment): Move around.
1061 (dump_ada_nodes): Call dump_ada_declaration directly.
1062 (struct with): Change type of limited field to bool.
1063 (append_withs): Change type of limited_access parameter to bool.
1064 (pp_ada_tree_identifie): Likewise.
1065 (dump_ada_decl_nam): Likewise.
1066 (dump_generic_ada_node): Likewise. Do not print the return type.
1067 (to_ada_name): Change type of space_found parameter to bool.
1068 (dump_ada_function_declaration): Return void and change type of
1069 parameters to bool. Also print the return type for a function.
1070 (print_ada_methods): Rename into...
1071 (dump_ada_methods): ...this.
1072 (print_ada_declaration): Rename into ...
1073 (dump_ada_declaration): ...this. Do not print the return type.
1074 (print_ada_struct_decl): Rename into...
1075 (dump_ada_struct_decl): ...this.
1076
7d386d45
JJ
10772017-09-29 Jakub Jelinek <jakub@redhat.com>
1078
1079 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1080 rather than DECL_INITIAL.
1081 (common_handle_aligned_attribute): Likewise.
1082
9ed32e27
AO
10832017-09-20 Alexandre Oliva <aoliva@redhat.com>
1084
1085 * c.opt (gen-decls): Add RejectNegative.
1086
026a79f7
AS
10872017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1088 Jakub Jelinek <jakub@redhat.com>
1089
1090 Add support for -std=c++2a.
1091 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1092 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1093 * c-opts.c (set_std_cxx2a): New.
1094 (c_common_handle_option): Set options when -std=c++2a is enabled.
1095 (c_common_post_options): Adjust comments.
1096 (set_std_cxx14, set_std_cxx17): Likewise.
1097
4a8ca690
EB
10982017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1099
1100 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1101 message for non-uniform endianness and issue a warning in C++.
1102
7b936140
JJ
11032017-09-15 Jakub Jelinek <jakub@redhat.com>
1104
1105 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1106 (Wc++17-compat): Change from undocumented alias to option.
1107 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1108 change C++1z to C++17 in description.
1109 (std=c++1z, std=gnu++1z): Change from option to undocumented
1110 deprecated alias.
1111 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1112 Adjust description.
1113 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1114 * c-opts.c (set_std_cxx1z): Rename to ...
1115 (set_std_cxx17): ... this.
1116 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1117 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1118 caller.
7b936140
JJ
1119 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1120 comments.
1121
12263f13
L
11222017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1123
1124 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1125 function alignment if warn_if_not_aligned_p is true.
1126
6836632e
NS
11272017-09-12 Nathan Sidwell <nathan@acm.org>
1128
1129 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1130 resort_sorted_fields): Move to c/c-decl.c.
1131 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1132 (struct sorted_fields_type): Move to c/c-lang.h.
1133
019bf9ad
JW
11342017-09-09 Jonathan Wakely <jwakely@redhat.com>
1135
1136 PR c++/81852
1137 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1138
bc7fe952
MP
11392017-09-04 Marek Polacek <polacek@redhat.com>
1140
1141 PR c/81783
1142 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1143 (warn_tautological_cmp): Call it.
1144
de7c2c6a
BK
11452017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1146
1147 * c-opts.c (c_common_finish): Write dependency information even if
1148 there are errors.
1149
d2e05fcb
JJ
11502017-09-01 Jakub Jelinek <jakub@redhat.com>
1151
1152 PR c/81887
1153 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1154 (omp_pragmas_simd): ... here.
1155 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1156 create new clauses list containing just simd clause.
1157
18e2a8b8
RS
11582017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1159 Alan Hayward <alan.hayward@arm.com>
1160 David Sherwood <david.sherwood@arm.com>
1161
1162 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1163 into scalar_mode_supported_p call.
1164 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1165
16d22000
RS
11662017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1167 Alan Hayward <alan.hayward@arm.com>
1168 David Sherwood <david.sherwood@arm.com>
1169
1170 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1171 for the mode iterator.
1172
b397965c
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-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1178 * c-common.c (c_build_vec_perm_expr): Likewise.
1179
357b7604
RS
11802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1181 Alan Hayward <alan.hayward@arm.com>
1182 David Sherwood <david.sherwood@arm.com>
1183
1184 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1185
e05c94ba
RS
11862017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1187 Alan Hayward <alan.hayward@arm.com>
1188 David Sherwood <david.sherwood@arm.com>
1189
1190 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1191 before calling targetm.addr_space.valid_pointer_mode.
1192
5c20c4af
RS
11932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1194 Alan Hayward <alan.hayward@arm.com>
1195 David Sherwood <david.sherwood@arm.com>
1196
1197 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1198
c94843d2 11992017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
1200 Alan Hayward <alan.hayward@arm.com>
1201 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
1202
1203 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1204 iterators.
1205 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1206
4e10a5a7
RS
12072017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1208 Alan Hayward <alan.hayward@arm.com>
1209 David Sherwood <david.sherwood@arm.com>
1210
1211 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1212 case statements.
1213
130fcab0
ML
12142017-08-29 Martin Liska <mliska@suse.cz>
1215
1216 PR other/39851
1217 * c-common.c (parse_optimize_options): Add argument to function
1218 call.
1219 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1220
14e18d71
DM
12212017-08-24 David Malcolm <dmalcolm@redhat.com>
1222
1223 * c-lex.c (interpret_float): Use token location
1224 when building an EXCESS_PRECISION_EXPR.
1225
2f687306
DM
12262017-08-21 David Malcolm <dmalcolm@redhat.com>
1227
1228 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1229 it to check_function_format.
1230 * c-common.h (check_function_arguments): Add vec<location_t> *
1231 param.
1232 (check_function_format): Likewise.
1233 * c-format.c (struct format_check_context): Add field "arglocs".
1234 (check_function_format): Add param "arglocs"; pass it to
1235 check_format_info.
1236 (check_format_info): Add param "arglocs"; use it to initialize
1237 new field of format_ctx.
1238 (check_format_arg): Pass format_ctx->arglocs to new param of
1239 check_format_info_main.
1240 (class argument_parser): New field "arglocs".
1241 (argument_parser::argument_parser): Add "arglocs_" param and use
1242 it to initialize new field.
1243 (argument_parser::check_argument_type): Pass new arglocs field to
1244 check_format_types.
1245 (check_format_info_main): Add param "arglocs", and use it when
1246 constructing arg_parser.
1247 (check_format_types): Add param "arglocs"; use it if non-NULL when
1248 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1249
00aa1fa2
L
12502017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 PR c/53037
1253 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1254 (c_common_attribute_table): Add warn_if_not_aligned.
1255 (handle_aligned_attribute): Renamed to ...
1256 (common_handle_aligned_attribute): Remove argument, name, and add
1257 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1258 (handle_aligned_attribute): New.
1259 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1260
27be025d
MS
12612017-08-14 Martin Sebor <msebor@redhat.com>
1262
1263 PR c/81117
1264 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1265 (handle_nonstring_attribute): New function.
1266
da67acb9
MS
12672017-08-14 Martin Sebor <msebor@redhat.com>
1268
1269 PR c/81117
1270 * c-format.h (T89_G): New macro.
1271 * c-format.c (local_gcall_ptr_node): New variable.
1272 (init_dynamic_diag_info): Initialize it.
1273
a8b522b4
ML
12742017-08-11 Martin Liska <mliska@suse.cz>
1275
1276 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1277 TARGET_SUPPORTS_ALIASES.
1278
32129a17
DM
12792017-08-10 David Malcolm <dmalcolm@redhat.com>
1280
1281 * c-common.c (c_parse_error): Add rich_location * param, using it
1282 rather implicitly using input_location.
1283 * c-common.h (c_parse_error): Add rich_location * param.
1284
30af3a2b
MP
12852017-08-09 Marek Polacek <polacek@redhat.com>
1286
1287 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1288 (c_common_truthvalue_conversion): Likewise.
1289 * c-omp.c (c_finish_omp_atomic): Likewise.
1290 * c-common.h (build_binary_op): Update declaration.
1291
314e6352
ML
12922017-08-08 Martin Liska <mliska@suse.cz>
1293
1294 * c-ada-spec.c: Include header files.
1295 * c-ubsan.c: Likewise.
1296 * c-warn.c: Likewise.
1297
56b5041c
JJ
12982017-08-07 Jakub Jelinek <jakub@redhat.com>
1299
1300 PR c/69389
1301 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1302
db440138
EB
13032017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1304
1305 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1306 (print_ada_methods): Likewise.
1307 (print_ada_declaration): Likewise.
1308
577eec56
ML
13092017-08-07 Martin Liska <mliska@suse.cz>
1310
1311 * array-notation-common.c: Add new includes.
1312 * c-format.c( handle_format_attribute): Canonicalize a format
1313 function name.
1314 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1315 attribute.
1316 * c-pretty-print.c: Add new include.
1317
b854df3c
EB
13182017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1319
1320 * c-ada-spec.c (has_static_fields): Look only into variables.
1321 (print_constructor): Add TYPE parameter and use it for the name.
1322 (print_destructor): Likewise.
1323 (print_ada_declaration): Adjust to new constructor/destructor names.
1324 Adjust calls to print_constructor and print_destructor.
1325 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1326 Look only into variables in the final loop.
1327
9f2cb25e
EB
13282017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1329
1330 * c-ada-spec.c (has_static_fields): Look only into fields.
1331 (dump_generic_ada_node): Small tweak.
1332 (dump_nested_types): Look only into fields.
1333 (print_ada_declaration): Look only into methods. Small tweak.
1334 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1335
f4bcd9eb
EB
13362017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1337
1338 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1339 (dump_ada_function_declaration): Likewise.
1340 (dump_generic_ada_node): Likewise.
1341 (print_ada_declaration): Add support for const-qualified variables.
1342
f34ebeb2
ML
13432017-07-31 Martin Liska <mliska@suse.cz>
1344
1345 PR sanitize/81530
1346 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1347 Guard condition with flag_sanitize_p also with current_function_decl
1348 non-null equality.
1349 (ubsan_maybe_instrument_reference_or_call): Likewise.
1350
218e5d04
UB
13512017-07-30 Uros Bizjak <ubizjak@gmail.com>
1352
1353 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1354
942047f2
EB
13552017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1356
1357 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1358 for enumeral types.
1359 (print_ada_declaration): Add missing guard for record types.
1360
a40ff0ae
JJ
13612017-07-27 Jakub Jelinek <jakub@redhat.com>
1362
1363 PR c/45784
1364 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1365 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1366 new COMPOUND_EXPRs around the rhs of the comparison.
1367
06bd22f6
MP
13682017-07-27 Marek Polacek <polacek@redhat.com>
1369
1370 PR c/81417
1371 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1372 the types.
1373
036ea399
JJ
13742017-07-27 Jakub Jelinek <jakub@redhat.com>
1375
1376 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1377 (handle_noipa_attribute): New function.
1378
417ca011
TD
13792017-07-07 Torsten Duwe <duwe@suse.de>
1380
1381 * c-attribs.c (c_common_attribute_table): Add entry for
1382 "patchable_function_entry".
1383
5aaa8fb4
NS
13842017-07-20 Nathan Sidwell <nathan@acm.org>
1385
1386 Remove TYPE_METHODS.
1387 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1388 dump_ada_template, print_ada_methods,
1389 print_ada_declaration): Member fns are on TYPE_FIELDS.
1390
ff22eb12
NS
13912017-07-18 Nathan Sidwell <nathan@acm.org>
1392
1393 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1394
eea77d1f
DM
13952017-07-14 David Malcolm <dmalcolm@redhat.com>
1396
1397 * c-common.c (try_to_locate_new_include_insertion_point): New
1398 function.
1399 (per_file_includes_t): New typedef.
1400 (added_includes_t): New typedef.
1401 (added_includes): New variable.
1402 (maybe_add_include_fixit): New function.
1403 * c-common.h (maybe_add_include_fixit): New decl.
1404
281ac396
MS
14052017-07-10 Martin Sebor <msebor@redhat.com>
1406
1407 PR other/81345
1408 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1409
b6f43128
DM
14102017-07-06 David Malcolm <dmalcolm@redhat.com>
1411
1412 * c-common.c (selftest::c_family_tests): New.
1413 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1414 (selftest::c_family_tests): New decl.
1415
efbf55b0
MP
14162017-07-04 Marek Polacek <polacek@redhat.com>
1417
1418 PR c/81231
1419 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1420 types.
1421
6c86bd88
MP
14222017-07-04 Marek Polacek <polacek@redhat.com>
1423
1424 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1425
17a7218b
ML
14262017-06-28 Martin Liska <mliska@suse.cz>
1427
1428 PR ipa/81128
1429 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1430 to a function declaration.
1431
63010089
ML
14322017-06-28 Martin Liska <mliska@suse.cz>
1433
1434 PR driver/79659
1435 * c.opt: Add IntegerRange to various options.
1436
3e2becc4
MP
14372017-06-26 Marek Polacek <polacek@redhat.com>
1438
1439 PR c/80116
1440 * c-common.h (warn_for_multistatement_macros): Declare.
1441 * c-warn.c: Include "c-family/c-indentation.h".
1442 (warn_for_multistatement_macros): New function.
1443 * c.opt (Wmultistatement-macros): New option.
1444 * c-indentation.c (guard_tinfo_to_string): No longer static.
1445 Change the parameter type to "enum rid". Handle RID_SWITCH.
1446 * c-indentation.h (guard_tinfo_to_string): Declare.
1447
2db9b7cd
MG
14482017-06-23 Marc Glisse <marc.glisse@inria.fr>
1449
1450 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1451
c3684b7b
MS
14522017-06-15 Martin Sebor <msebor@redhat.com>
1453
1454 PR c++/80560
1455 * c.opt (-Wclass-memaccess): New option.
1456
e72c4afd
BK
14572017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1458
1459 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1460
8a516588
MP
14612017-06-13 Marek Polacek <polacek@redhat.com>
1462
1463 PR objc/80949
1464 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1465 branches is null.
1466
45b2222a
ML
14672017-06-13 Martin Liska <mliska@suse.cz>
1468
1469 PR sanitize/78204
1470 * c-attribs.c (add_no_sanitize_value): New function.
1471 (handle_no_sanitize_attribute): Likewise.
1472 (handle_no_sanitize_address_attribute): Use the function.
1473 (handle_no_sanitize_thread_attribute): New function.
1474 (handle_no_address_safety_analysis_attribute): Use
1475 add_no_sanitize_value.
1476 (handle_no_sanitize_undefined_attribute): Likewise.
1477 * c-common.h: Declare new functions.
1478 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1479 (ubsan_instrument_shift): Likewise.
1480 (ubsan_instrument_bounds): Likewise.
1481 (ubsan_maybe_instrument_array_ref): Likewise.
1482 (ubsan_maybe_instrument_reference_or_call): Likewise.
1483
a01f151f
JM
14842017-06-11 Jason Merrill <jason@redhat.com>
1485
1486 * c-ada-spec.c, c-pragma.c: Use id_equal.
1487
3de4ac6d
MP
14882017-06-04 Marek Polacek <polacek@redhat.com>
1489
1490 PR c/80919
1491 * c-format.c (matching_type_p): Return false if any of the types
1492 requires structural equality.
1493
2474f48f
MS
14942017-06-02 Martin Sebor <msebor@redhat.com>
1495
1496 PR c/80892
1497 * c-warn.c (conversion_warning): Use -Wconversion for integer
1498 conversion and -Wfloat-conversion for floating one.
1499
40ffd95f
BE
15002017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1501
1502 * c.opt (Wsizeof-pointer-div): New warning option.
1503
3fa4634c
VR
15042017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1505
1506 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1507 (Wcatch-value=1): Enable by -Wall.
1508
f012c8ef
DM
15092017-05-30 David Malcolm <dmalcolm@redhat.com>
1510
1511 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1512 format_chars.
1513 * c.opt (fdiagnostics-show-template-tree): New option.
1514 (felide-type): New option.
1515
63dbcd13
VR
15162017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1517
1518 * c.opt (Wcatch-value=): New C++ warning flag.
1519
be136b5c
NS
15202017-05-24 Nathan Sidwell <nathan@acm.org>
1521
1522 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1523 const casts to avoid warning.
1524
3cd211af
MS
15252017-05-24 Martin Sebor <msebor@redhat.com>
1526
1527 PR c/80731
1528 * c-common.h (unsafe_conversion_p): Add a function argument.
1529 * c-common.c (unsafe_conversion_p): Same.
1530 Add type names and values to diagnostics.
1531 (scalar_to_vector): Adjust.
1532 * c-warn.c (constant_expression_error): Add a function argument.
1533 Add type names and values to diagnostics.
1534 (conversion_warning): Add a function argument.
1535 Add type names and values to diagnostics.
1536 (warnings_for_convert_and_check): Same.
1537
1ff7be5a
JM
15382017-05-19 Jason Merrill <jason@redhat.com>
1539
1540 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
1541 enumerators.
1542
ff502317
BE
15432017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1544
1545 * c-format.c (locus): Move out of function scope,
1546 add GTY attribute.
1547
2a8a8d7b
NS
15482017-05-19 Nathan Sidwell <nathan@acm.org>
1549
1550 * c-opts.c (class_dump_file, class_dump_flags): Delete.
1551 (c_common_parse_file): Remove class dump handling.
1552 (get_dump_info): Likewise.
1553
39aac208
RB
15542017-05-19 Richard Biener <rguenther@suse.de>
1555
1556 PR c++/80593
1557 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
1558 to alias-set zero memory.
1559
6ecd2339
BE
15602017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
1561
1562 * c-format.c (local_tree_type_node): Add GTY attribute.
1563
6574d78e
MP
15642017-05-18 Marek Polacek <polacek@redhat.com>
1565
1566 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
1567 (c_common_fixed_point_type_for_size): Likewise.
1568 (c_common_type_for_mode): Likewise.
1569 (shorten_compare): Likewise.
1570 (c_promoting_integer_type_p): Use false/true instead of 0/1.
1571 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
1572
e3455240
MP
15732017-05-18 Marek Polacek <polacek@redhat.com>
1574
1575 * c-common.c (self_promoting_args_p): Change the return type to bool.
1576 Use false/true instead of 0/1.
1577 * c-common.h (self_promoting_args_p): Update.
1578
3fa8871b
MP
15792017-05-17 Marek Polacek <polacek@redhat.com>
1580
1581 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
1582 * c-warn.c: Likewise.
1583
b42cc3ca
VV
15842017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1585
1586 Implement new C++ intrinsics __is_assignable and __is_constructible.
1587 * c-common.c (__is_assignable, __is_constructible): New.
1588 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
1589
1a817418
ML
15902017-05-17 Martin Liska <mliska@suse.cz>
1591
1592 * c-common.h: Introduce dump_flags_t type and
1593 use it instead of int type.
1594 * c-gimplify.c (c_genericize): Likewise.
1595 * c-opts.c: Likewise.
1596
b2fa0a8b
MP
15972017-05-17 Marek Polacek <polacek@redhat.com>
1598
1599 * c-common.c (c_save_expr): Remove.
1600 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
1601 * c-common.h (c_save_expr): Remove declaration.
1602
31c2d57d
VR
16032017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
1604
1605 PR c/35441
1606 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
1607 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
1608 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
1609 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
1610 RDIV_EXPR.
1611 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
1612
684f84de
MP
16132017-05-09 Marek Polacek <polacek@redhat.com>
1614
1615 PR c/80525
1616 * c-warn.c (unwrap_c_maybe_const): New.
1617 (warn_logical_operator): Call it.
1618
641da50a
NS
16192017-05-09 Nathan Sidwell <nathan@acm.org>
1620
1621 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
1622 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
1623
631238ac
MS
16242017-05-08 Martin Sebor <msebor@redhat.com>
1625
1626 PR translation/80280
1627 * c-format.h (struct format_flag_spec): Add new member.
1628 (T89_T): New macro.
1629 * c-format.c (local_tree_type_node): New global.
1630 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
1631 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
1632 (strfmon_flag_specs): Likewise.
1633 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
1634 with distinct quoting properties.
1635 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
1636 (flag_chars_t::validate): Add argument and handle bad quoting.
1637 (check_format_info_main): Handle quoting problems.
1638 (init_dynamic_diag_info): Simplify.
1639
49f0c04c
JM
16402017-05-08 Jason Merrill <jason@redhat.com>
1641
1642 * c-opts.c (c_common_post_options): Update defaults for
1643 flag_abi_version and flag_abi_compat_version.
1644
56d35585
DM
16452017-05-05 David Malcolm <dmalcolm@redhat.com>
1646
1647 * c-common.c (c_cpp_error): Replace report_diagnostic
1648 with diagnostic_report_diagnostic.
1649
0f2c4a8f
MS
16502017-05-04 Martin Sebor <msebor@redhat.com>
1651
1652 PR translation/80280
1653 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
1654 (handle_weakref_attribute): Same.
1655
6fe63fb4
NS
16562017-05-03 Nathan Sidwell <nathan@acm.org>
1657
1658 Canonicalize canonical type hashing
1659 * c-common.c (complete_array_type): Use type_hash_canon.
1660
815d9cc6
XR
16612017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
1662
92a285c1 1663 PR c++/80038
815d9cc6
XR
1664 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
1665 prototype.
1666 (cilk_install_body_pedigree_operations): Likewise.
1667 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
1668 detatched.
1669 (cilk_gimplify_call_params_in_spawned_fn): Remove.
1670 (cilk_install_body_pedigree_operations): Likewise.
1671 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
1672 unwrapping.
1673
f8a36447
JJ
16742017-04-27 Jakub Jelinek <jakub@redhat.com>
1675
1676 PR c++/80534
1677 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
1678 flag on non-aggregate element types.
1679
7c145456
BE
16802017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
1681
1682 * c-common.c (c_type_hasher, type_hash_table): Remove.
1683 (c_common_get_alias_set): Remove unreachable code.
1684 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
1685
c3cbcd45
VR
16862017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
1687
1688 * c.opt (Wextra-semi): New C++ warning flag.
1689
8a59d466
JJ
16902017-04-20 Jakub Jelinek <jakub@redhat.com>
1691
1692 PR middle-end/80423
1693 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
1694
8487c9a5
JJ
16952017-04-18 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR middle-end/79788
1698 PR middle-end/80375
1699 * c-common.c (c_common_type_for_mode): Don't handle
1700 widest_*_literal_type_node here.
1701 c_common_signed_or_unsigned_type): Likewise.
1702 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
1703 to *intTI_type_node or *intDI_type_node depending on whether
1704 TImode is supported by the target or not.
1705
3ee0fb02
ML
17062017-04-10 Martin Liska <mliska@suse.cz>
1707
1708 PR sanitizer/80350
1709 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
1710 doing an UBSAN check.
1711
5764ee3c
JW
17122017-04-03 Jonathan Wakely <jwakely@redhat.com>
1713
1714 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
1715
6f3af356
JJ
17162017-03-31 Jakub Jelinek <jakub@redhat.com>
1717
1718 PR c++/79572
1719 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
1720 tree *.
1721 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
1722 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
1723 REFERENCE_TYPE.
1724
f6a7a9d5
DM
17252017-03-31 David Malcolm <dmalcolm@redhat.com>
1726
1727 PR documentation/78732
1728 * c.opt (Wendif-labels): Fix description to refer to
1729 #else rather than #elif.
1730
af88f557
JJ
17312017-03-31 Jakub Jelinek <jakub@redhat.com>
1732
1733 PR libstdc++/80251
1734 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
1735 * c-common.c (c_common_reswords): Add __is_aggregate trait.
1736
a9e4a1a5
JJ
17372017-03-27 Jakub Jelinek <jakub@redhat.com>
1738
1739 PR middle-end/80162
1740 * c-common.c (c_common_mark_addressable_vec): Don't set
1741 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
1742
3f01b620
MS
17432017-03-21 Martin Sebor <msebor@redhat.com>
1744
1745 PR c++/79548
1746 * c-common.c (set_underlying_type): Mark type used only when
1747 original del is declared unused.
1748
2f6f187a
DM
17492017-03-10 David Malcolm <dmalcolm@redhat.com>
1750
1751 PR translation/79848
1752 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
1753 "%qs".
1754
a02fa805
DM
17552017-03-10 David Malcolm <dmalcolm@redhat.com>
1756
1757 PR c/79921
1758 * c-indentation.c (warn_for_misleading_indentation): Remove parens
1759 from inform's message, so that xgettext can locate it.
1760
822a132c
MP
17612017-03-09 Marek Polacek <polacek@redhat.com>
1762
1763 PR c++/79962
1764 PR c++/79984
1765 * c-attribs.c (handle_nonnull_attribute): Save the result of default
1766 conversion to the attribute list.
1767
bba81f1c
ML
17682017-03-09 Martin Liska <mliska@suse.cz>
1769
1770 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
1771
108154ff
JM
17722017-03-03 Jason Merrill <jason@redhat.com>
1773
1774 * c.opt (Wnoexcept-type): New.
1775
eb0e7c34
RB
17762017-03-02 Richard Biener <rguenther@suse.de>
1777
1778 PR c/79756
1779 * c-common.c (c_common_mark_addressable_vec): Look through
1780 C_MAYBE_CONST_EXPR.
1781
9453ba0a
ML
17822017-02-28 Martin Liska <mliska@suse.cz>
1783
1784 * c.opt: Replace space with tabular for options of <number>
1785 type.
1786
6a825afe
ML
17872017-02-28 Martin Liska <mliska@suse.cz>
1788
1789 * c.opt: Fix --help=option -Q for options which are of
1790 an enum type.
1791
4227c9ad
JJ
17922017-02-24 Jakub Jelinek <jakub@redhat.com>
1793
1794 PR c++/79588
1795 * c-common.c (check_function_restrict): New function.
1796 (check_function_arguments): Add FNDECL argument. Call
1797 check_function_restrict if -Wrestrict.
1798 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
1799 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
1800 * c-common.h (check_function_arguments): Add FNDECL argument.
1801 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
1802
59909673
EB
18032017-02-24 Eric Botcazou <ebotcazou@adacore.com>
1804
1805 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
1806 treatment of parameters with pointer-to-tagged type and tidy up.
1807 (print_ada_methods): Remove the special treatment of C++ static member
1808 functions.
1809
54dcd526
ML
18102017-02-22 Martin Liska <mliska@suse.cz>
1811
1812 * c.opt: Replace inequality signs with square brackets
1813 for -Wnornalized.
1814
00bc9de3
JJ
18152017-02-21 Jakub Jelinek <jakub@redhat.com>
1816
1817 PR c++/79641
1818 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
1819 preserve quals.
1820
97fcf744
JM
18212017-02-17 Joseph Myers <joseph@codesourcery.com>
1822
1823 * c-cppbuiltin.c (builtin_define_float_constants): Define
1824 __DECIMAL_DIG__ to the value for long double.
1825
c7545f1c
MP
18262017-02-15 Marek Polacek <polacek@redhat.com>
1827
1828 PR c/79515
1829 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
1830 conversion has occured.
1831
c2e84327
DM
18322017-01-24 David Malcolm <dmalcolm@redhat.com>
1833
1834 * c-common.c (c_common_reswords): Add "__RTL".
1835 * c-common.h (enum rid): Add RID_RTL.
1836
2ebd93e1
MP
18372017-01-20 Marek Polacek <polacek@redhat.com>
1838
1839 PR c/64279
1840 * c-common.h (do_warn_duplicated_branches_r): Declare.
1841 * c-gimplify.c (c_genericize): Walk the function tree calling
1842 do_warn_duplicated_branches_r.
1843 * c-warn.c (expr_from_macro_expansion_r): New.
1844 (do_warn_duplicated_branches): New.
1845 (do_warn_duplicated_branches_r): New.
1846 * c.opt (Wduplicated-branches): New option.
1847
0d80ab91
DM
18482017-01-17 David Malcolm <dmalcolm@redhat.com>
1849
1850 PR c++/71497
1851 * c-indentation.c (warn_for_misleading_indentation): Use the past
1852 subjunctive in the note.
1853
7f991c36
AH
18542017-01-17 Aldy Hernandez <aldyh@redhat.com>
1855
1856 PR c/79116
1857 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
1858 start type to integer_type.
1859
1c70261c
JJ
18602017-01-16 Jakub Jelinek <jakub@redhat.com>
1861
1862 PR driver/49726
1863 * c.opt (gen-decls): Add Driver flag.
1864
1ddca3f3
PC
18652017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1866
1867 Revert:
1868 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1869
1870 PR c++/71737
1871 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1872
7d2f3f1d
PC
18732017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
1874
1875 PR c++/71737
1876 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
1877
bce6f760
MS
18782017-01-12 Martin Sebor <msebor@redhat.com>
1879
1880 (-Wformat-overflow): ...to this.
1881
bf5fbf46
MS
18822017-01-11 Martin Sebor <msebor@redhat.com>
1883
1884 PR c/78768
1885 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
1886 Also enable for LTO.
1887
e363df3f
JM
18882017-01-10 Jason Merrill <jason@redhat.com>
1889
1890 Implement P0195R2, C++17 variadic using.
1891 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
1892
bd2c6270
JJ
18932017-01-09 Jakub Jelinek <jakub@redhat.com>
1894
1895 PR translation/79019
1896 PR translation/79020
1897 * c.opt (Wnormalized=): Fix typo in description.
1898
efcc8d38
MS
18992017-01-08 Martin Sebor <msebor@redhat.com>
1900
1901 PR middle-end/77708
1902 * c.opt (-Wformat-truncation): New option.
1903
435f3f7a
AO
19042017-01-06 Alexandre Oliva <aoliva@redhat.com>
1905
1906 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1907 value to unsigned short to fit in 4 hex digits without
1908 warnings.
1909
4e89adf9
EB
19102017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1911
1912 * c.opt (fsso-struct): Add 'native' value.
1913
cd445b54
ML
19142017-01-05 Martin Liska <mliska@suse.cz>
1915
1916 PR pch/78970
1917 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1918 header.
1919
a9342885
MP
19202017-01-04 Marek Polacek <polacek@redhat.com>
1921
1922 PR c++/64767
1923 * c.opt (Wpointer-compare): New option.
1924
fc73e60c
JJ
19252017-01-04 Jakub Jelinek <jakub@redhat.com>
1926
1927 PR driver/78957
1928 * c.opt (fsso-struct=): Add RejectNegative.
1929
cbe34bb5
JJ
19302017-01-01 Jakub Jelinek <jakub@redhat.com>
1931
1932 Update copyright years.
1933
d4a6c0ea
ML
19342016-12-29 Martin Liska <mliska@suse.cz>
1935
1936 PR c/78933
1937 * c.opt (strong-eval-order): Add RejectNegative keyword.
1938
67a5ad7c
JM
19392016-12-22 Jason Merrill <jason@redhat.com>
1940
1941 Implement P0522R0, matching of template template arguments.
1942 * c-cppbuiltin.c (c_cpp_builtins): Define
1943 __cpp_template_template_args.
1944
0dba7960
JJ
19452016-12-21 Jakub Jelinek <jakub@redhat.com>
1946
1947 PR bootstrap/78817
1948 * c-common.c (struct nonnull_arg_ctx): New type.
1949 (check_function_nonnull): Return bool instead of void. Use
1950 nonnull_arg_ctx as context rather than just location_t.
1951 (check_nonnull_arg): Adjust for the new context type, set
1952 warned_p to true if a warning has been diagnosed.
1953 (check_function_arguments): Return bool instead of void.
1954 * c-common.h (check_function_arguments): Adjust prototype.
1955
31bfc9b9
JM
19562016-12-21 Jason Merrill <jason@redhat.com>
1957
1958 * c.opt (-fnew-ttp-matching): New flag.
1959 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1960
629b3d75
MJ
19612016-12-14 Martin Jambor <mjambor@suse.cz>
1962
1963 * c-omp.c: Include omp-general.h instead of omp-low.h.
1964 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1965 name.
1966
474da67e
MS
19672016-12-14 Martin Sebor <msebor@redhat.com>
1968
1969 PR c/17308
1970 * c-common.c (check_nonnull_arg): Disable when optimization
1971 is enabled.
1972
fe366b87
MP
19732016-12-12 Marek Polacek <polacek@redhat.com>
1974
1975 PR c++/78647
1976 * c-common.c (attribute_fallthrough_p): Return false for
1977 error_mark_node.
1978
8bd9f164
MS
19792016-12-08 Martin Sebor <msebor@redhat.com>
1980
1981 PR c/78284
1982 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1983
060162e0
MS
19842016-12-08 Martin Sebor <msebor@redhat.com>
1985
1986 PR c/78165
92a285c1
ML
1987 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1988 suffix.
060162e0 1989
ee92e7ba
MS
19902016-12-07 Martin Sebor <msebor@redhat.com>
1991
1992 PR c/53562
1993 PR middle-end/77784
1994 PR middle-end/78149
1995 PR middle-end/78138
1996 * c.opt (-Wstringop-overflow): New option.
1997
84b0769e
MO
19982016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
1999
2000 * c-attribs.c (asan odr indicator): New attribute.
2001 (handle_asan_odr_indicator_attribute): New function.
2002
7fa6a965
PK
20032016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2004
2005 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2006 ptrdiff_type_node;
2007
56d8ffc1
JG
20082016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2009
2010 * c-common.c (excess_precision_mode_join): New.
2011 (c_ts18661_flt_eval_method): New.
2012 (c_c11_flt_eval_method): Likewise.
2013 (c_flt_eval_method): Likewise.
2014 * c-common.h (excess_precision_mode_join): New.
2015 (c_flt_eval_method): Likewise.
2016 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2017 (cpp_iec_559_value): Call it.
2018 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2019 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2020 __FLT_EVAL_METHOD_TS_18661_3__.
2021
04f0fcf7
JG
20222016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2023
2024 * c-opts.c (c_common_post_options): Add logic to handle the default
2025 case for -fpermitted-flt-eval-methods.
2026
fb2675cb
PB
20272016-11-23 Paolo Bonzini <bonzini@gnu.org>
2028
2029 * c.opt (Wexpansion-to-defined): New.
2030
ec1c5694
JJ
20312016-11-23 Jakub Jelinek <jakub@redhat.com>
2032
2033 PR target/78451
2034 * c-pragma.c (handle_pragma_target): Don't replace
2035 current_target_pragma, but chainon the new args to the current one.
2036
730c9e75
NS
20372016-11-22 Nathan Sidwell <nathan@acm.org>
2038
2039 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2040 indentation and formatting.
730c9e75 2041
89990732
MS
20422016-11-21 Martin Sebor <msebor@redhat.com>
2043
2044 * c.opt (-fprintf-return-value): Enable by default.
2045
48330c93
BE
20462016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2047
2048 PR c++/71973
2049 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2050 * c-common.c (c_common_nodes_and_builtins): Initialize
2051 const_tm_ptr_type_node.
2052
0d939c95
MP
20532016-11-16 Marek Polacek <polacek@redhat.com>
2054
2055 PR c/78285
2056 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2057
8e745a17
JJ
20582016-11-14 Jakub Jelinek <jakub@redhat.com>
2059
2060 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2061
1ee62b92 20622016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2063 Richard Biener <rguenther@suse.de>
2064
2065 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2066 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2067 * c.opt (fgimple): New option.
1ee62b92 2068
22b15758
UB
20692016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2070
2071 PR c/35503
2072 * c-common.h (warn_for_restrict): Declare.
2073 * c-warn.c: Include gcc-rich-location.h.
2074 (warn_for_restrict): New function.
2075 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2076 (gcc_cdiag_char_table): Likewise.
2077 (gcc_cxxdiag_char_table): Likewise.
2078 * c.opt (Wrestrict): New option.
2079
4be719cd
EB
20802016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2081
2082 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2083 for nested types only if the type is a record or union and dump SLOC.
2084
4a826ca6
JM
20852016-11-09 Jason Merrill <jason@redhat.com>
2086
2087 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2088
2e955d50
JJ
20892016-11-09 Jakub Jelinek <jakub@redhat.com>
2090
2091 * c-ubsan.c (ubsan_instrument_shift): Handle split
2092 -fsanitize=shift-base and -fsanitize=shift-exponent.
2093
51dc6603
JM
20942016-11-07 Jason Merrill <jason@redhat.com>
2095
2096 * c.opt (Wc++1z-compat): New.
2097 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2098
6dc4a604
ML
20992016-11-07 Martin Liska <mliska@suse.cz>
2100
2101 * c-warn.c (warn_for_unused_label): Save all labels used
2102 in goto or in &label.
2103
b302001e
JM
21042016-11-03 Jason Merrill <jason@redhat.com>
2105
2106 * c-cppbuiltin.c (c_cpp_builtins): Correct
2107 __cpp_inheriting_constructors.
2108
31f7f784
JM
21092016-11-01 Jason Merrill <jason@redhat.com>
2110
2bc78e3c
JM
2111 * c-cppbuiltin.c (c_cpp_builtins): Update
2112 __cpp_inheriting_constructors.
2113
31f7f784
JM
2114 * c.opt (-fnew-inheriting-ctors): New.
2115 * c-opts.c: Default to on for ABI 11+.
2116
dcb466ec
JJ
21172016-10-31 Jakub Jelinek <jakub@redhat.com>
2118
2119 PR c++/77948
2120 * c.opt (fext-numeric-literals): Add Var and Init.
2121 * c-opts.c (c_common_handle_option): Don't clear
2122 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2123 (c_common_post_options): Clear it here if not set
2124 explicitly.
2125
52e1b91e
AH
21262016-10-28 Aldy Hernandez <aldyh@redhat.com>
2127
2128 PR debug/77773
2129 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2130 if NULL.
2131
e16f1cc7
JJ
21322016-10-25 Jakub Jelinek <jakub@redhat.com>
2133
2134 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2135 * c-common.c (c_common_reswords): Add __builtin_launder.
2136
f8348061
BE
21372016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2138
2139 * c-common.c (c_common_truthvalue_conversion): Warn for
2140 multiplications in boolean context. Fix the quoting of '<<' and '<'
2141 in the shift warning.
2142
eff89e01
BE
21432016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2144
2145 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2146
24bc7bf4
JM
21472016-10-20 Jason Merrill <jason@redhat.com>
2148
2149 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2150
4c712374
BE
21512016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2152
2153 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2154 integer shift ops in boolean context.
2155
21562016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2157
2158 * c.opt (Walloca): New.
2159 (Walloca-larger-than=): New.
2160 (Wvla-larger-than=): New.
2161
8fa18c06
MP
21622016-10-17 Marek Polacek <polacek@redhat.com>
2163
2164 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2165 Return immediately when finding a match.
2166 (warn_tautological_cmp): Remove a boolean variable that is no longer
2167 needed.
2168
b12b1915
MP
21692016-10-17 Marek Polacek <polacek@redhat.com>
2170
2171 * c-attribs.c: New file.
2172 * c-common.c: Move attributes handling to c-attribs.c.
2173 (get_nonnull_operand): No longer static.
2174 * c-common.h: Move the declarations from c-attribs.c to its own section.
2175
2045acd9
JM
21762016-10-14 Jason Merrill <jason@redhat.com>
2177
2178 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2179 and __cpp_deduction_guides.
2180
14a2c9aa
JM
21812016-10-13 Jason Merrill <jason@redhat.com>
2182
2183 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2184
4d0cdd0c
TP
21852016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2186
2187 * c-cppbuiltin.c: Include memmodel.h.
2188 * c-opts.c: Likewise.
2189 * c-pragma.c: Likewise.
2190 * c-warn.c: Likewise.
2191
70f6d5e1
JJ
21922016-10-12 Jakub Jelinek <jakub@redhat.com>
2193
2194 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2195 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2196 * c-opts.c (sanitize_cpp_opts): Initialize
2197 cpp_opts->cpp_warn_implicit_fallthrough.
2198
78f61294
MP
21992016-10-11 Marek Polacek <polacek@redhat.com>
2200
2201 * c-common.c (warning_candidate_p): Change the return type to bool
2202 and return true/false instead of 1/0.
2203 (vector_mode_valid_p): Likewise.
2204
038b5cc0
MP
22052016-10-11 Marek Polacek <polacek@redhat.com>
2206
2207 * c-common.c (fold_for_warn): No longer static.
2208 (bool_promoted_to_int_p): Likewise.
2209 (c_common_get_narrower): Likewise.
2210 (constant_expression_warning): Move to c-warn.c.
2211 (constant_expression_error): Likewise.
2212 (overflow_warning): Likewise.
2213 (warn_logical_operator): Likewise.
2214 (find_array_ref_with_const_idx_r): Likewise.
2215 (warn_tautological_cmp): Likewise.
2216 (expr_has_boolean_operands_p): Likewise.
2217 (warn_logical_not_parentheses): Likewise.
2218 (warn_if_unused_value): Likewise.
2219 (strict_aliasing_warning): Likewise.
2220 (sizeof_pointer_memaccess_warning): Likewise.
2221 (check_main_parameter_types): Likewise.
2222 (conversion_warning): Likewise.
2223 (warnings_for_convert_and_check): Likewise.
2224 (match_case_to_enum_1): Likewise.
2225 (match_case_to_enum): Likewise.
2226 (c_do_switch_warnings): Likewise.
2227 (warn_for_omitted_condop): Likewise.
2228 (readonly_error): Likewise.
2229 (lvalue_error): Likewise.
2230 (invalid_indirection_error): Likewise.
2231 (warn_array_subscript_with_type_char): Likewise.
2232 (warn_about_parentheses): Likewise.
2233 (warn_for_unused_label): Likewise.
2234 (warn_for_div_by_zero): Likewise.
2235 (warn_for_memset): Likewise.
2236 (warn_for_sign_compare): Likewise.
2237 (do_warn_double_promotion): Likewise.
2238 (do_warn_unused_parameter): Likewise.
2239 (record_locally_defined_typedef): Likewise.
2240 (maybe_record_typedef_use): Likewise.
2241 (maybe_warn_unused_local_typedefs): Likewise.
2242 (maybe_warn_bool_compare): Likewise.
2243 (maybe_warn_shift_overflow): Likewise.
2244 (warn_duplicated_cond_add_or_warn): Likewise.
2245 (diagnose_mismatched_attributes): Likewise.
2246 * c-common.h: Move the declarations from c-warn.c to its own section.
2247 * c-warn.c: New file.
2248
627be19f
JM
22492016-10-08 Jason Merrill <jason@redhat.com>
2250
2251 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2252 into COND_EXPR in C++.
2253
7bad794a
JJ
22542016-10-08 Jakub Jelinek <jakub@redhat.com>
2255
2256 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2257 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2258 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2259
be845b04
JJ
22602016-10-07 Jakub Jelinek <jakub@redhat.com>
2261
2262 Implement LWG2296 helper intrinsic
2263 * c-common.h (enum rid): Add RID_ADDRESSOF.
2264 * c-common.c (c_common_reswords): Add __builtin_addressof.
2265
c09c4992
BE
22662016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2267
2268 PR c++/77700
2269 * c-common.c (c_common_truthvalue_conversion): Warn also for
2270 suspicious enum values in boolean context.
2271
342cfb3e
JJ
22722016-10-06 Jakub Jelinek <jakub@redhat.com>
2273
2274 Implement P0258R2 - helper for C++17
2275 std::has_unique_object_representations trait
2276 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2277 * c-common.c (c_common_reswords): Add
2278 __has_unique_object_representations.
2279
2e69f143
JJ
22802016-10-05 Jakub Jelinek <jakub@redhat.com>
2281
2282 PR sanitizer/66343
2283 * c-ubsan.c (ubsan_instrument_return): Don't call
2284 initialize_sanitizer_builtins here.
2285
700fff34
BE
22862016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2287
2288 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2289 conditional expression in boolean context when only one arm is
2290 non-boolean.
2291
9563bfcd
JJ
22922016-10-05 Jakub Jelinek <jakub@redhat.com>
2293
04a32443
JJ
2294 PR sanitizer/77823
2295 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2296 is not integral.
2297
9563bfcd
JJ
2298 * c-common.c (c_common_reswords): Update comment for C++11.
2299
f1644724
JM
23002016-10-04 Jason Merrill <jason@redhat.com>
2301
2302 * c-common.c (make_tree_vector_from_ctor): New.
2303 * c-common.h: Declare it.
2304
5a79befb
JJ
23052016-10-04 Jakub Jelinek <jakub@redhat.com>
2306
2307 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2308 __LIBGCC_JCR_SECTION_NAME__.
2309
1633d3b9
BE
23102016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2311
2312 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2313 left shift in boolean context.
2314
a2c6e7f2
JJ
23152016-09-29 Jakub Jelinek <jakub@redhat.com>
2316
2317 Implement P0001R1 - C++17 removal of register storage class specifier
2318 * c.opt (Wregister): New warning.
2319 * c-opts.c (c_common_post_options): Enable -Wregister by
2320 default for C++17.
2321
75304c87
JG
23222016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2323
2324 * c-opts.c (c_common_post_options): Remove special case for
2325 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2326 in C++.
2327
bbfac6da
JJ
23282016-09-27 Jakub Jelinek <jakub@redhat.com>
2329
6e39060a
JJ
2330 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2331 -std=c++1z.
2332
bbfac6da
JJ
2333 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2334
e73cf9a2
TP
23352016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2336
2337 * c-common.c: Include memmodel.h.
2338
c6147dc4
MP
23392016-09-26 Marek Polacek <polacek@redhat.com>
2340
2341 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2342
81fea426
MP
23432016-09-26 Marek Polacek <polacek@redhat.com>
2344
2345 PR c/7652
2346 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2347 (handle_fallthrough_attribute): New function.
2348 (attribute_fallthrough_p): New function.
2349 * c-common.h (attribute_fallthrough_p): Declare.
2350
9a2300e9
MP
23512016-09-24 Marek Polacek <polacek@redhat.com>
2352
2353 PR c/77490
2354 * c.opt (Wbool-operation): New.
2355
a09e9e35
BE
23562016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2357
2358 * c-common.c (c_common_truthvalue_conversion): Inhibit
2359 Wint-in-bool-context warning with from_macro_definition_at.
2360 Mention the expression will always evaluate to true.
2361
d43b4ccc
MS
23622016-09-21 Martin Sebor <msebor@redhat.com>
2363
2364 PR bootstrap/77676
2365 * c.opt (fprintf-return-value): Temporarily initialize to zero
2366 to unblock bootstrap failures.
2367
2e1c20b1
JJ
23682016-09-21 Jakub Jelinek <jakub@redhat.com>
2369
2370 PR c++/77651
2371 * c.opt (Waligned-new=): Add RejectNegative.
2372 (faligned-new=): Likewise. Spelling fix - change
2373 aligned_new_threshhold to aligned_new_threshold.
2374 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2375 to aligned_new_threshold.
2376
88d0c3f0
MS
23772016-09-20 Martin Sebor <msebor@redhat.com>
2378
2379 PR middle-end/49905
2380 * c.opt: Add -Wformat-length and -fprintf-return-value.
2381
144a96e4
BE
23822016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2383
2384 PR c++/77434
2385 * c.opt (Wint-in-bool-context): New warning.
2386 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2387 constants in boolean context.
2388
63012d9a
JM
23892016-09-19 Joseph Myers <joseph@codesourcery.com>
2390
2391 * c-common.c (max_align_t_align): Also consider alignment of
2392 float128_type_node.
2393
931388ce
JM
23942016-09-15 Jason Merrill <jason@redhat.com>
2395
2396 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2397 DECL_EXTERNAL.
2398
38711381
JM
23992016-09-14 Jason Merrill <jason@redhat.com>
2400
2401 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2402 limit FIELD_DECL, either.
2403
e51fbec3
MP
24042016-09-14 Marek Polacek <polacek@redhat.com>
2405
2406 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2407 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2408 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2409
254830ba
DM
24102016-09-13 David Malcolm <dmalcolm@redhat.com>
2411
2412 * c-common.c (warn_logical_not_parentheses): Replace
2413 rich_location::add_fixit_insert calls with add_fixit_insert_before
2414 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2415
42763690
JM
24162016-09-13 Jason Merrill <jason@redhat.com>
2417 Tom de Vries <tom@codesourcery.com>
2418
2419 PR c++/77427
2420 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2421
9453eee9
JM
24222016-09-13 Jason Merrill <jason@redhat.com>
2423
2424 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2425 limit types at all.
2426
e96809e3
JM
24272016-09-12 Jason Merrill <jason@redhat.com>
2428
2429 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2430 bit/byte confusion, allow large alignment for types.
2431
54dcdb88
BE
24322016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2433
2434 PR c++/77496
2435 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2436
d1463eb9
DM
24372016-09-12 David Malcolm <dmalcolm@redhat.com>
2438
2439 PR c/72858
2440 * c-format.c (argument_parser::check_argument_type): Add params
2441 "type_start" and "conversion_char". Use the former to generate
2442 offset_to_type_start and pass it and conversion_char to
2443 check_format_types.
2444 (check_format_info_main): Capture the start of the type
2445 information as "type_start", and pass it an format_char
2446 to arg_parser.check_argument_type.
2447 (check_format_types): Provide an example in the leading comment.
2448 Add params "offset_to_type_start" and "conversion_char"; pass
2449 them to format_type_warning calls.
2450 (test_get_modifier_for_format_len): Likewise.
2451 (matching_type_p): New function.
2452 (get_format_for_type): Add param "conversion_char" and move
2453 implementation into...
2454 (get_format_for_type_1): ...new function, called twice.
2455 Use new function matching_type_p rather than checking for
2456 TYPE_CANONICAL equality.
2457 (get_corrected_substring): New function.
2458 (format_type_warning): Provide an example in the leading comment.
2459 Add params "offset_to_type_start" and "conversion_char". Replace
2460 call to get_format_for_type with call to get_corrected_substring
2461 and move rejection of hints for widths/precisions there.
2462 (assert_format_for_type_streq): Add param "conversion_char".
2463 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2464 (test_get_format_for_type_printf): Add conversion chars to the
2465 tests, adding coverage for various combinations of integer
2466 vs double conversions, and for preserving octal and hexadecimal
2467 conversions.
2468 (test_get_format_for_type_scanf): Add conversion chars to the
2469 tests.
2470
5b28efbb
TV
24712016-09-10 Tom de Vries <tom@codesourcery.com>
2472
2473 PR C/71602
2474 * c-common.c (build_va_arg): Handle more strict
2475 targetm.canonical_va_list_type. Replace first argument type error with
2476 assert.
2477
3f0177e7
MS
24782016-09-09 Martin Sebor <msebor@redhat.com>
2479
2480 PR c/77520
2481 PR c/77521
2482 * c-format.c (argument_parser::find_format_char_info): Use %qc
2483 format directive unconditionally.
2484
af63ba4b
JM
24852016-09-09 Jason Merrill <jason@redhat.com>
2486
2487 Implement C++17 new of over-aligned types.
2488 * c.opt: Add -faligned-new and -Waligned-new.
2489 * c-common.c (max_align_t_align): Split out from...
2490 (cxx_fundamental_alignment_p): ...here.
2491 * c-common.h: Declare it.
2492 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2493
c65248cb
JM
24942016-09-09 Joseph Myers <joseph@codesourcery.com>
2495
2496 * c-cppbuiltin.c (builtin_define_type_width): New function.
2497 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2498 macros.
2499
e5106e27
DM
25002016-09-07 David Malcolm <dmalcolm@redhat.com>
2501
2502 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2503 a POINTER_TYPE.
2504 (substring_loc::get_location): Move to substring-locations.c,
2505 keeping implementation as...
2506 (c_get_substring_location): New function, from the above, reworked
2507 to use accessors rather than member lookup.
2508 * c-common.h (class substring_loc): Move to substring-locations.h,
2509 replacing with a forward decl.
2510 (c_get_substring_location): New decl.
2511 * c-format.c: Include "substring-locations.h".
2512 (format_warning_va): Move to substring-locations.c.
2513 (format_warning_at_substring): Likewise.
2514
a42e7952
MS
25152016-09-06 Martin Sebor <msebor@redhat.com>
2516
2517 PR c/77336
2518 * c-format.c (check_function_format): Avoid issuing warnings for
2519 functions unless they call format functions with non-constant
2520 format strings.
2521
b772a565
RB
25222016-09-06 Richard Biener <rguenther@suse.de>
2523
2524 PR c/77450
2525 * c-common.c (c_common_mark_addressable_vec): Handle
2526 COMPOUND_LITERAL_EXPR.
2527
25ff5dd3
MP
25282016-09-05 Marek Polacek <polacek@redhat.com>
2529
2530 PR c/77423
2531 * c-common.c (bool_promoted_to_int_p): New function.
2532 (expr_has_boolean_operands_p): New function.
2533 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2534 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2535
21234eb5
TV
25362016-09-04 Tom de Vries <tom@codesourcery.com>
2537
2538 revert:
2539 2016-08-29 Tom de Vries <tom@codesourcery.com>
2540
2541 * c-common.c (build_va_arg): Replace first argument type error
2542 with assert.
2543
9dc5773f
JJ
25442016-09-02 Jakub Jelinek <jakub@redhat.com>
2545
2546 PR c/65467
2547 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
2548 (c_finish_omp_for): Reject _Atomic qualified iterators.
2549
25502016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
2551
2552 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
2553 size to guarantee it fits the output of the formatted function
2554 regardless of its arguments.
2555
295844f6
MP
25562016-09-01 Marek Polacek <polacek@redhat.com>
2557
2558 PR c/7652
2559 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
2560 FALLTHRU comments.
2561
3d06b6f2
MP
25622016-08-29 Marek Polacek <polacek@redhat.com>
2563
2564 PR c/77292
2565 * c-common.c (warn_logical_not_parentheses): Don't warn for
2566 a comparison or a logical operator.
2567
34cedad5
TV
25682016-08-29 Tom de Vries <tom@codesourcery.com>
2569
2570 * c-common.c (build_va_arg): Fix type comparison assert.
2571
f162d717
TV
25722016-08-29 Tom de Vries <tom@codesourcery.com>
2573
2574 * c-common.c (build_va_arg): Replace first argument type error
2575 with assert.
2576
ba9bbd6f
TV
25772016-08-29 Tom de Vries <tom@codesourcery.com>
2578
2579 PR c/77398
2580 * c-common.c (build_va_arg): Add first argument error. Build va_arg
2581 with error_mark_node as va_list instead of with illegal va_list.
2582
ebef225f
MP
25832016-08-25 Marek Polacek <polacek@redhat.com>
2584 David Malcolm <dmalcolm@redhat.com>
2585
2586 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
2587 * c-common.h (warn_logical_not_parentheses): Update declaration.
2588
b00e6e75
MP
25892016-08-22 Marek Polacek <polacek@redhat.com>
2590
2591 PR c++/77321
2592 * c-common.c (warn_for_memset): Check type for null.
2593
6dc198e3
JM
25942016-08-22 Joseph Myers <joseph@codesourcery.com>
2595
14ec014e 2596 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
2597 _FloatNx types for suffixes for built-in functions.
2598
c65699ef
JM
25992016-08-19 Joseph Myers <joseph@codesourcery.com>
2600
2601 PR c/32187
2602 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
2603 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
2604 (RID_FLOAT128X): New enum rid values.
2605 (CASE_RID_FLOATN_NX): New macro.
2606 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
2607 keywords.
2608 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
2609 corresponding complex types.
2610 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
2611 _FloatNx and corresponding complex types.
2612 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
2613 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
2614 and _FloatNx types for the widest type for determining
2615 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
2616 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
2617 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
2618 and _FloatNx types.
2619 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
2620 constants.
2621 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
2622 _FloatNx types.
2623
cc015f3a
DM
26242016-08-18 David Malcolm <dmalcolm@redhat.com>
2625
2626 * c-opts.c (c_diagnostic_finalizer): Update for change to
2627 diagnostic_show_locus.
2628
cb18fd07
DM
26292016-08-18 David Malcolm <dmalcolm@redhat.com>
2630
2631 * c-common.c: Include "spellcheck.h".
2632 (cb_get_suggestion): New function.
2633 * c-common.h (cb_get_suggestion): New decl.
2634 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
2635 cb_get_suggestion.
2636
a76989dc
MP
26372016-08-18 Marek Polacek <polacek@redhat.com>
2638
2639 PR c/71514
2640 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
2641 and pointer-to-VLA.
2642
65e736c0
DM
26432016-08-16 David Malcolm <dmalcolm@redhat.com>
2644
2645 PR c/72857
2646 * c-common.c (substring_loc::get_range): Rename to...
2647 (substring_loc::get_location): ...this, converting param from a
2648 source_range * to a location_t *. Call
2649 get_source_location_for_substring rather than
2650 get_source_range_for_substring, and pass in m_caret_idx.
2651 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
2652 (substring_loc::get_range): Replace with...
2653 (substring_loc::get_location): ...this.
2654 (substring_loc::set_caret_index): New method.
2655 (substring_loc): Add field m_caret_idx.
2656 * c-format.c (format_warning_va): Update for above changes.
2657 Rename local "substring_loc" to "fmt_substring_loc" to avoid
2658 clashing with type name.
2659 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
2660 (check_argument_type): Likewise.
2661 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
2662 Use a copy when emitting warnings, setting the caret index from TYPE.
2663
7e1dde14 26642016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 2665 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
2666
2667 * c-ada-spec.c (dump_number): New function.
2668 (handle_escape_character): Likewise.
2669 (print_ada_macros): Add handling of constant integers and strings.
2670
191816a3
MP
26712016-08-12 Marek Polacek <polacek@redhat.com>
2672
2673 PR c/7652
2674 * c-common.c (scalar_to_vector): Adjust fall through comment.
2675 * c-opts.c (c_common_handle_option): Likewise.
2676 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
2677 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
2678 fall through comment.
2679 * cilk.c (extract_free_variables): Add FALLTHRU.
2680
452df4a4
JM
26812016-08-10 Jason Merrill <jason@redhat.com>
2682
2683 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
2684
f3365c12
JM
26852016-08-09 Jason Merrill <jason@redhat.com>
2686
2687 * c-common.c (c_common_attribute_table): vector_size affects type
2688 identity.
2689
f0bc3323
MP
26902016-08-09 Marek Polacek <polacek@redhat.com>
2691
2692 PR c/7652
2693 * c-ada-spec.c (dump_generic_ada_node): Add return.
2694
98e5a19a
JM
26952016-08-09 Jason Merrill <jason@redhat.com>
2696
2697 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
2698 C++17 constexpr lambdas.
2699
895aa8e1
DM
27002016-08-08 David Malcolm <dmalcolm@redhat.com>
2701
2702 PR c/64955
2703 * c-common.h (selftest::c_format_c_tests): New declaration.
2704 (selftest::run_c_tests): New declaration.
2705 * c-format.c: Include "selftest.h.
2706 (format_warning_va): Add param "corrected_substring" and use
2707 it to add a replacement fix-it hint.
2708 (format_warning_at_substring): Likewise.
2709 (format_warning_at_char): Update for new param of
2710 format_warning_va.
2711 (argument_parser::check_argument_type): Pass "fki" to
2712 check_format_types.
2713 (check_format_types): Add param "fki" and pass it to
2714 format_type_warning.
2715 (deref_n_times): New function.
2716 (get_modifier_for_format_len): New function.
2717 (selftest::test_get_modifier_for_format_len): New function.
2718 (get_format_for_type): New function.
2719 (format_type_warning): Add param "fki" and use it to attempt
2720 to provide hints for argument types when calling
2721 format_warning_at_substring.
2722 (selftest::get_info): New function.
2723 (selftest::assert_format_for_type_streq): New function.
2724 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
2725 (selftest::test_get_format_for_type_printf): New function.
2726 (selftest::test_get_format_for_type_scanf): New function.
2727 (selftest::c_format_c_tests): New function.
2728
e52ed3fe
DM
27292016-08-08 David Malcolm <dmalcolm@redhat.com>
2730
2731 PR c/52952
2732 * c-format.c: Include "diagnostic.h".
2733 (location_column_from_byte_offset): Delete.
2734 (location_from_offset): Delete.
2735 (format_warning_va): New function.
2736 (format_warning_at_substring): New function.
2737 (format_warning_at_char): New function.
2738 (check_format_arg): Capture location of format_tree and pass to
2739 check_format_info_main.
2740 (argument_parser): Add fields "start_of_this_format" and
2741 "format_string_cst".
2742 (flag_chars_t::validate): Add param "format_string_cst". Convert
2743 warning_at call using location_from_offset to call to
2744 format_warning_at_char.
2745 (argument_parser::argument_parser): Add param "format_string_cst_"
2746 and use use it to initialize field "format_string_cst".
2747 Initialize new field "start_of_this_format".
2748 (argument_parser::read_format_flags): Convert warning_at call
2749 using location_from_offset to a call to format_warning_at_char.
2750 (argument_parser::read_any_format_left_precision): Likewise.
2751 (argument_parser::read_any_format_precision): Likewise.
2752 (argument_parser::read_any_other_modifier): Likewise.
2753 (argument_parser::find_format_char_info): Likewise, in three places.
2754 (argument_parser::parse_any_scan_set): Likewise, in one place.
2755 (argument_parser::handle_conversions): Likewise, in two places.
2756 (argument_parser::check_argument_type): Add param "fmt_param_loc"
2757 and use it to make a substring_loc. Pass the latter to
2758 check_format_types.
2759 (check_format_info_main): Add params "fmt_param_loc" and
2760 "format_string_cst". Convert warning_at calls using
2761 location_from_offset to calls to format_warning_at_char. Pass the
2762 new params to the arg_parser ctor. Pass "format_string_cst" to
2763 flag_chars.validate. Pass "fmt_param_loc" to
2764 arg_parser.check_argument_type.
2765 (check_format_types): Convert first param from a location_t
2766 to a const substring_loc & and rename to "fmt_loc". Attempt
2767 to extract the range of the relevant parameter and pass it
2768 to format_type_warning.
2769 (format_type_warning): Convert first param from a location_t
2770 to a const substring_loc & and rename to "fmt_loc". Add
2771 params "param_range" and "type". Replace calls to warning_at
2772 with calls to format_warning_at_substring.
2773
1c4d457e
DM
27742016-08-08 David Malcolm <dmalcolm@redhat.com>
2775
2776 * c-format.c (class flag_chars_t): New class.
2777 (struct length_modifier): New struct.
2778 (class argument_parser): New class.
2779 (flag_chars_t::flag_chars_t): New ctor.
2780 (flag_chars_t::has_char_p): New method.
2781 (flag_chars_t::add_char): New method.
2782 (flag_chars_t::validate): New method.
2783 (flag_chars_t::get_alloc_flag): New method.
2784 (flag_chars_t::assignment_suppression_p): New method.
2785 (argument_parser::argument_parser): New ctor.
2786 (argument_parser::read_any_dollar): New method.
2787 (argument_parser::read_format_flags): New method.
2788 (argument_parser::read_any_format_width): New method.
2789 (argument_parser::read_any_format_left_precision): New method.
2790 (argument_parser::read_any_format_precision): New method.
2791 (argument_parser::handle_alloc_chars): New method.
2792 (argument_parser::read_any_length_modifier): New method.
2793 (argument_parser::read_any_other_modifier): New method.
2794 (argument_parser::find_format_char_info): New method.
2795 (argument_parser::validate_flag_pairs): New method.
2796 (argument_parser::give_y2k_warnings): New method.
2797 (argument_parser::parse_any_scan_set): New method.
2798 (argument_parser::handle_conversions): New method.
2799 (argument_parser::check_argument_type): New method.
2800 (check_format_info_main): Introduce classes argument_parser
2801 and flag_chars_t, moving the code within the loop into methods
2802 of these classes. Make various locals "const".
2803
88fa5555
DM
28042016-08-05 David Malcolm <dmalcolm@redhat.com>
2805
2806 * c-common.c: Include "substring-locations.h".
2807 (get_cpp_ttype_from_string_type): New function.
2808 (g_string_concat_db): New global.
2809 (substring_loc::get_range): New method.
2810 * c-common.h (g_string_concat_db): New declaration.
2811 (class substring_loc): New class.
2812 * c-lex.c (lex_string): When concatenating strings, capture the
2813 locations of all tokens using a new obstack, and record the
2814 concatenation locations within g_string_concat_db.
2815 * c-opts.c (c_common_init_options): Construct g_string_concat_db
2816 on the ggc-heap.
2817
78169471
MP
28182016-07-29 Marek Polacek <polacek@redhat.com>
2819
638fc14f
MP
2820 PR c/71926
2821 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
2822 parentheses warning.
2823
78169471
MP
2824 PR c/71574
2825 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
2826
1225d6b1
ML
28272016-07-28 Martin Liska <mliska@suse.cz>
2828
2829 PR gcov-profile/68025
2830 * c-common.c (handle_no_profile_instrument_function_attribute):
2831
ec1e2a40
BE
28322016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
2833
2834 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
2835 BITS_PER_UNIT_LOG.
2836
5ec2cd9f
JM
28372016-07-25 Jason Merrill <jason@redhat.com>
2838
2839 PR c++/65970
2840 * c.opt (fconstexpr-loop-limit): New.
2841
9dc5773f 28422016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
2843
2844 PR c++/71675
2845 * c-common.c (resolve_overloaded_builtin): Avoid converting
2846 __atomic_compare_exchange_n return type to that of what its
2847 first argument points to.
2848
e3fe09c1
UB
28492016-07-22 Uros Bizjak <ubizjak@gmail.com>
2850
2851 * c-common.c: Use HOST_WIDE_INT_M1U instead of
2852 ~(unsigned HOST_WIDE_INT) 0.
2853
bc91c436
ML
28542016-07-22 Martin Liska <mliska@suse.cz>
2855
2856 PR gcov-profile/69028
2857 PR gcov-profile/62047
2858 * cilk.c (create_cilk_helper_decl): Set location of a new decl
2859 to the current_function_decl.
2860
451dcc66
JM
28612016-07-21 Jason Merrill <jason@redhat.com>
2862
2863 PR c++/65168
2864 * c-common.c (c_common_truthvalue_conversion): Check
2865 c_inhibit_evaluation_warnings for warning about address of
2866 reference.
2867
de6a69ee
DM
28682016-07-20 David Malcolm <dmalcolm@redhat.com>
2869
2870 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
2871 const char *.
2872
d022c55a
JM
28732016-07-15 Jason Merrill <jason@redhat.com>
2874
2875 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
2876
ddbbcb19
JJ
28772016-07-15 Jakub Jelinek <jakub@redhat.com>
2878
2879 PR c/71858
2880 * c-common.h (enum lookup_name_fuzzy_kind): Add
2881 FUZZY_LOOKUP_FUNCTION_NAME.
2882
d0cf395a
JM
28832016-07-08 Jason Merrill <jason@redhat.com>
2884
2885 P0145: Refining Expression Order for C++.
2886 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
2887 * c-opts.c: Adjust.
2888
98d44e93
MT
28892016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
2890
2891 PR c++/71214
2892 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
2893
f9d8d994
TS
28942016-06-29 Thomas Schwinge <thomas@codesourcery.com>
2895
2896 * c-pragma.h (enum pragma_kind): Rename
2897 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
2898 users.
2899
4aa83879
RB
29002016-06-29 Richard Biener <rguenther@suse.de>
2901
2902 PR middle-end/71002
2903 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2904
a25bd9e6
JM
29052016-06-24 Jason Merrill <jason@redhat.com>
2906
2907 P0145R2: Refining Expression Order for C++.
2908 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2909 MODIFY_EXPR.
2910
a86451b9
JJ
29112016-06-24 Jakub Jelinek <jakub@redhat.com>
2912
2913 * c-common.c (check_builtin_function_arguments): Require last
2914 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2915 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2916 if the last argument is pointer to enumerated or boolean type.
2917
1a4f11c8
DM
29182016-06-22 David Malcolm <dmalcolm@redhat.com>
2919
2920 PR c/70339
2921 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2922 (lookup_name_fuzzy): New prototype.
2923
fe55692c
JDA
29242016-06-21 John David Anglin <danglin@gcc.gnu.org>
2925
2926 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2927
4eb24e01
JM
29282016-06-14 Jason Merrill <jason@redhat.com>
2929
2930 P0145R2: Refining Expression Order for C++.
2931 * c.opt (fargs-in-order): New.
2932 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2933
ef7cf206
JJ
29342016-06-13 Jakub Jelinek <jakub@redhat.com>
2935
0dda258b
JJ
2936 PR sanitizer/71498
2937 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2938 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2939
ef7cf206
JJ
2940 PR preprocessor/71183
2941 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2942 to cb_get_source_date_epoch.
2943
50b15873
JJ
29442016-06-10 Jakub Jelinek <jakub@redhat.com>
2945
2946 PR c/68657
2947 * c.opt (Wpsabi): Add Warning flag.
2948
4d926e34
MS
29492016-06-10 Martin Sebor <msebor@redhat.com>
2950
2951 PR c/71392
14ec014e 2952 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
2953 the nonnull attribute in type-generic builtins.
2954
e01b4e16
MS
29552016-06-09 Martin Sebor <msebor@redhat.com>
2956
2957 PR c/70883
2958 * c-common.c (builtin_function_validate_nargs): Make text of error
2959 message consistent with others like it.
2960
44a845ca
MS
29612016-06-08 Martin Sebor <msebor@redhat.com>
2962 Jakub Jelinek <jakub@redhat.com>
2963
2964 PR c++/70507
2965 PR c/68120
2966 * c-common.c (check_builtin_function_arguments): Handle
2967 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2968
a80a7051
RB
29692016-06-08 Richard Biener <rguenther@suse.de>
2970
2971 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2972
bfd67b47
RB
29732016-06-07 Richard Biener <rguenther@suse.de>
2974
2975 PR c/61564
2976 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2977 options and warn about others.
2978
15c98b2e
ES
29792016-06-01 Eduard Sanou <dhole@openmailbox.org>
2980
2981 * c-common.c (get_source_date_epoch): Rename to
2982 cb_get_source_date_epoch.
2983 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2984 message when the parsing fails. Use error_at instead of fatal_error.
2985 * c-common.h (get_source_date_epoch): Rename to
2986 cb_get_source_date_epoch.
2987 * c-common.h (cb_get_source_date_epoch): Prototype.
2988 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2989 * c-common.h (c_omp_region_type): Remove trailing comma.
2990 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2991 * c-lex.c (c_lex_with_flags): Remove initialization of
2992 pfile->source_date_epoch.
2993
00631022
JJ
29942016-05-30 Jakub Jelinek <jakub@redhat.com>
2995
2996 PR c++/71349
2997 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2998 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
2999 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3000 instead of C_OMP_CLAUSE_SPLIT_FOR.
3001
f17a223d
RB
30022016-05-24 Richard Biener <rguenther@suse.de>
3003
3004 PR middle-end/70434
3005 PR c/69504
3006 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3007 (convert_vector_to_array_for_subscript): ... this.
3008 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3009 VIEW_CONVERT_EXPR to an array type. Rename to ...
3010 (convert_vector_to_array_for_subscript): ... this.
3011
4f2e1536
MP
30122016-05-12 Marek Polacek <polacek@redhat.com>
3013
3014 PR c/70756
3015 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3016 size_in_bytes and pass LOC to it.
3017
d6e83a8d
MM
30182016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3019
3020 PR c/43651
3021 * c.opt (Wduplicate-decl-specifier): New option.
3022
5c3a10fb
MP
30232016-05-11 Marek Polacek <polacek@redhat.com>
3024
3025 PR c++/71024
3026 * c-common.c (diagnose_mismatched_attributes): New function.
3027 * c-common.h (diagnose_mismatched_attributes): Declare.
3028
deef7113
MP
30292016-05-04 Marek Polacek <polacek@redhat.com>
3030
3031 * c.opt (Wdangling-else): New option.
3032
79ce98bc
MP
30332016-05-03 Marek Polacek <polacek@redhat.com>
3034
3035 PR c/70859
3036 * c-common.c (builtin_function_validate_nargs): Add location
3037 parameter. Use it.
3038 (check_builtin_function_arguments): Add location and arguments
3039 parameters. Use them.
3040 * c-common.h (check_builtin_function_arguments): Update declaration.
3041
381cdae4
RB
30422016-05-03 Richard Biener <rguenther@suse.de>
3043
3044 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3045 allow call args to gimplify to SSA names.
3046
1d793c34
MP
30472016-05-03 Marek Polacek <polacek@redhat.com>
3048
3049 * c-common.h (enum c_omp_region_type): Remove stray comma.
3050
77886428
CP
30512016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3052
3053 * c-common.h (enum c_omp_region_type): Define.
3054
697e0b28
RS
30552016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3056
3057 * c-common.c (shorten_compare): Use wi::to_wide.
3058
e7ff0319
CP
30592016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3060
3061 PR middle-end/70626
3062 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3063 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3064 reduction clauses in acc parallel loops.
3065
2fff3db8
MP
30662016-04-29 Marek Polacek <polacek@redhat.com>
3067
3068 PR c/70852
3069 * c-common.c (warn_for_memset): Check domain before accessing it.
3070
509063eb
DV
30712016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3072
3073 PR/69089
3074 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3075 "aligned" attribute.
3076
b632761d
JM
30772016-04-28 Jason Merrill <jason@redhat.com>
3078
3079 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3080
174f6622
ES
30812016-04-28 Eduard Sanou <dhole@openmailbox.org>
3082 Matthias Klose <doko@debian.org>
3083
3084 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3085 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3086 handling.
3087 * c-common.h (get_source_date_epoch): Prototype.
3088 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3089
6bc2bb18
RB
30902015-04-27 Ryan Burn <contact@rnburn.com>
3091
3092 PR c++/69024
3093 PR c++/68997
3094 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3095 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3096 external linkage.
3097 (cilk_detect_and_unwrap): Corresponding changes.
3098 (extract_free_variables): Don't extract free variables from
3099 AGGR_INIT_EXPR slot.
3100 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3101 (cilk_recognize_spawn): Likewise.
3102
c1e1f433
BS
31032016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3104
3105 * c.opt (Wmemset-elt-size): New option.
3106 * c-common.c (warn_for_memset): New function.
3107 * c-common.h (warn_for_memset): Declare.
3108
d067e05f
JM
31092016-04-25 Jason Merrill <jason@redhat.com>
3110
3111 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3112 No longer static.
3113 * c-common.h: Declare it.
3114 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3115
9aa36ae5
JM
31162016-04-22 Jason Merrill <jason@redhat.com>
3117
3118 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3119
477d4906
IV
31202016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3121
3122 PR c++/69363
3123 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3124 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3125
fe37c7af
MM
31262016-04-18 Michael Matz <matz@suse.de>
3127
3128 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3129 and SET_DECL_ALIGN.
3130
23f2660f
EB
31312016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3132
3133 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3134 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3135 to incomplete types.
3136 (dump_nested_type): Remove redundant tests and tidy up.
3137 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3138 a type which is the typedef of an original type.
3139
1e77281b
MP
31402016-04-15 Marek Polacek <polacek@redhat.com>
3141
3142 PR c/70651
3143 * c-common.c (build_va_arg): Change two asserts into errors and return
3144 error_mark_node.
3145
b3a77f21
MP
31462016-04-13 Marek Polacek <polacek@redhat.com>
3147
3148 PR c++/70639
3149 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3150 for switch statements, too.
3151
322b8466
JM
31522016-03-28 Jason Merrill <jason@redhat.com>
3153
3154 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3155
fbdb6baf
MP
31562016-03-23 Marek Polacek <polacek@redhat.com>
3157
3158 PR c++/69884
3159 * c.opt (Wignored-attributes): New option.
3160
5c240f4d
DM
31612016-03-22 David Malcolm <dmalcolm@redhat.com>
3162
3163 PR c/69993
3164 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3165 diagnostic text, reversing the order of the warning and note so
3166 that they appear in source order.
3167
14ba7b28
MP
31682016-03-17 Marek Polacek <polacek@redhat.com>
3169
3170 PR c/69407
3171 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3172 operations.
3173
08a1cadc
JM
31742016-03-14 Jason Merrill <jason@redhat.com>
3175
2aaeea19
JM
3176 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3177
08a1cadc
JM
3178 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3179
c06d25bb
RB
31802016-03-09 Richard Biener <rguenther@suse.de>
3181
3182 PR c/70143
3183 * c-common.c (strict_aliasing_warning): Add back
3184 alias_sets_conflict_p check.
3185
80aac5c8
JM
31862016-03-08 Jason Merrill <jason@redhat.com>
3187
3188 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3189
64b23c13
DM
31902016-03-04 David Malcolm <dmalcolm@redhat.com>
3191
3192 PR c/68187
3193 * c-indentation.c (get_visual_column): Move code to determine next
3194 tab stop to...
3195 (next_tab_stop): ...this new function.
3196 (line_contains_hash_if): Delete function.
3197 (detect_preprocessor_logic): Delete function.
3198 (get_first_nws_vis_column): New function.
3199 (detect_intervening_unindent): New function.
3200 (should_warn_for_misleading_indentation): Replace call to
3201 detect_preprocessor_logic with a call to
3202 detect_intervening_unindent.
3203
729526f5
DM
32042016-03-04 David Malcolm <dmalcolm@redhat.com>
3205
3206 PR c/68187
3207 * c-indentation.c (should_warn_for_misleading_indentation): When
3208 suppressing warnings about cases where the guard and body are on
3209 the same column, only use the first non-whitespace column in place
3210 of the guard token column when dealing with "else" clauses.
3211 When rejecting aligned BODY and NEXT, loosen the requirement
3212 from equality with the first non-whitespace of guard to simply
3213 that they not be indented relative to it.
3214
e9a35493
RB
32152016-03-04 Richard Biener <rguenther@suse.de>
3216
3217 PR c++/70054
3218 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3219 instead of alias_sets_conflict_p.
3220
1be56bc5
MP
32212016-03-01 Marek Polacek <polacek@redhat.com>
3222
3223 PR c++/69795
3224 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3225 any DECL.
3226
35886f0b
MS
32272016-02-22 Martin Sebor <msebor@redhat.com>
3228
3229 PR middle-end/69780
3230 * c-common.c (check_builtin_function_arguments): Validate and
3231 reject invalid arguments to __builtin_alloca_with_align.
3232
4246c8da
MW
32332016-02-20 Mark Wielaard <mjw@redhat.com>
3234
3235 PR c/28901
3236 * c.opt (Wunused-const-variable): Turn into Alias for...
3237 (Wunused-const-variable=): New option.
3238
268be88c
BE
32392016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3240
3241 PR c++/69865
3242 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3243 here...
3244 (c_common_init_options): ...to here.
3245 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3246
871b3f47
JJ
32472016-02-19 Jakub Jelinek <jakub@redhat.com>
3248
3249 PR c++/69826
3250 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3251 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3252 flag_preprocess_only.
3253
bf14eba2
JJ
32542016-02-16 Jakub Jelinek <jakub@redhat.com>
3255
3256 PR c/69835
3257 * c.opt (Wnonnull-compare): Enable for -Wall.
3258
ba6b3795
JJ
32592016-02-15 Jakub Jelinek <jakub@redhat.com>
3260
3261 PR c++/69797
3262 * c-common.c (sync_resolve_size): Diagnose too few arguments
3263 even when params is non-NULL empty vector.
3264
a011cd92
BS
32652016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3266
3267 PR target/60410
3268 * c.opt (fshort-double): Remove.
3269
46cb9332
MS
32702016-02-05 Martin Sebor <msebor@redhat.com>
3271
3272 PR c++/69662
3273 * c.opt (Warning options): Update -Wplacement-new to take
3274 an optional argument.
3275
e1b81f2b
JJ
32762016-02-01 Jakub Jelinek <jakub@redhat.com>
3277
3278 PR preprocessor/69543
3279 PR c/69558
3280 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3281 instead of loc to control_warning_option.
3282
b6adbb9f
NS
32832016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3284
3285 * c.opt (fopenacc-dim=): New option.
3286
5d70666e
RB
32872016-01-27 Ryan Burn <contact@rnburn.com>
3288
3289 PR cilkplus/69267
3290 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3291 gimplify_arg. Removed superfluous post_p argument.
3292 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3293 superfluous post_p argument.
3294 * c-gimplify.c (c_gimplify_expr): Likewise.
3295
01e1dea3
DM
32962016-01-26 David Malcolm <dmalcolm@redhat.com>
3297
3298 PR other/69006
3299 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3300 pp_newline_and_flush with pp_flush.
3301
9f04a53e
MS
33022016-01-20 Martin Sebor <msebor@redhat.com>
3303
3304 PR c/69405
3305 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3306 an incompatible argument when the argument isn't a valid tree node.
3307
7f26f7df
JM
33082016-01-18 Jason Merrill <jason@redhat.com>
3309
3310 PR c++/68767
3311 * c-common.c (check_function_arguments_recurse): Fold the whole
3312 COND_EXPR, not just the condition.
3313
f62bf092
TV
33142016-01-18 Tom de Vries <tom@codesourcery.com>
3315
3316 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3317 classify as loop clause.
3318
e0a575ff
JJ
33192016-01-15 Jakub Jelinek <jakub@redhat.com>
3320
3321 PR bootstrap/68271
3322 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3323 C++ FE no longer has limit on number of pragmas.
3324
33252015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
3326
3327 PR c++/69048
3328 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 3329 to add missing cleanup point.
b6e3db06 3330
c7df95d8
DM
33312016-01-14 David Malcolm <dmalcolm@redhat.com>
3332
3333 PR c++/68819
3334 * c-indentation.c (get_visual_column): Add location_t param.
3335 Handle the column number being zero by effectively disabling the
3336 warning, with an "inform".
3337 (should_warn_for_misleading_indentation): Add location_t argument
3338 for all uses of get_visual_column.
3339
21efdd80
PP
33402016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3341
3342 PR c++/69029
3343 * c-indentation.c (should_warn_for_misleading_indentation):
3344 Don't warn about do-while statements.
3345
7a127fa7
MS
33462016-01-07 Martin Sebor <msebor@redhat.com>
3347
3348 PR c/68966
3349 * c-common.c (sync_resolve_size): Reject first argument when it's
3350 a pointer to _Bool.
3351
c589e975
DM
33522016-01-05 David Malcolm <dmalcolm@redhat.com>
3353
3354 PR c/69122
3355 * c-indentation.c (get_visual_column): Remove default argument.
3356 (should_warn_for_misleading_indentation): For the multiline case,
3357 update call to get_visual_column for next_stmt_exploc so that it
3358 captures the location of the first non-whitespace character in the
3359 relevant line. Don't issue warnings if there is non-whitespace
3360 before the next statement.
3361
818ab71a
JJ
33622016-01-04 Jakub Jelinek <jakub@redhat.com>
3363
3364 Update copyright years.
3365
745e411d
DM
33662015-12-21 David Malcolm <dmalcolm@redhat.com>
3367
3368 * c-common.c (binary_op_error): Convert first param from
3369 location_t to rich_location * and use it when emitting an error.
3370 * c-common.h (binary_op_error): Convert first param from
3371 location_t to rich_location *.
3372
de67c4c3
DM
33732015-12-16 David Malcolm <dmalcolm@redhat.com>
3374
3375 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3376 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3377
4a38b02b
IV
33782015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3379
3380 * c-common.c (c_common_attribute_table): Handle "omp declare target
3381 link" attribute.
3382
54d62f51
JJ
33832015-12-14 Jakub Jelinek <jakub@redhat.com>
3384
3385 PR c/68833
3386 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3387
8d4227c8
TB
33882014-12-12 Tobias Burnus <burnus@net-b.de>
3389
3390 PR fortran/68815
3391 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3392 specifiers (%d, %i,%u and %c).
3393
f6069ccc
DM
33942015-12-10 David Malcolm <dmalcolm@redhat.com>
3395
3396 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3397
63bbf46d
JJ
33982015-12-08 Jakub Jelinek <jakub@redhat.com>
3399
3400 PR c/48088
3401 PR c/68657
3402 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3403 * c-pragma.c (handle_pragma_diagnostic): Adjust
3404 control_warning_option caller.
3405
f79520bb
DM
34062015-12-07 David Malcolm <dmalcolm@redhat.com>
3407
3408 * c-common.c (c_cpp_error): Update for change to
3409 rich_location::set_range.
3410
b3d5bc62
JJ
34112015-12-04 Paolo Bonzini <bonzini@gnu.org>
3412
3413 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3414 shifting 1 out of the sign bit.
3415
34162015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3417
3418 * c-common.c (c_common_attribute_table[]): Update max arguments
3419 count for "simd" attribute.
3420 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3421
6eb4a537
JJ
34222015-12-03 Jakub Jelinek <jakub@redhat.com>
3423
3424 PR preprocessor/57580
3425 * c-ppoutput.c (print): Change printed field to bool.
3426 Move src_file last for smaller padding.
3427 (init_pp_output): Set print.printed to false instead of 0.
3428 (scan_translation_unit): Fix up formatting. Set print.printed
3429 to true after printing something other than newline.
3430 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3431 (maybe_print_line_1): Set print.printed to false instead of 0.
3432 (print_line_1): Likewise.
3433 (do_line_change): Set print.printed to true instead of 1.
3434 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3435 dump_macro): Set print.printed to false after printing newline.
3436
4250754e
JM
34372015-12-02 Jason Merrill <jason@redhat.com>
3438
f479b43d
JM
3439 * c-common.c (fold_for_warn): New.
3440 (warn_logical_operator, warn_tautological_cmp)
3441 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3442
4250754e
JM
3443 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3444 (c_fully_fold_internal, decl_constant_value_for_optimization):
3445 Move to c/c-fold.c.
3446 * c-common.h: Don't declare decl_constant_value_for_optimization.
3447
e9e32ee6
JM
34482015-12-02 Joseph Myers <joseph@codesourcery.com>
3449
3450 PR c/68162
3451 * c-common.h (c_build_qualified_type): Add extra default
3452 arguments.
3453
37d5ad46
JB
34542015-12-01 Julian Brown <julian@codesourcery.com>
3455 Cesar Philippidis <cesar@codesourcery.com>
3456 James Norris <James_Norris@mentor.com>
3457
3458 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3459 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3460 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3461
f07862c7
EB
34622015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3463
3464 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3465 (decl_sloc_common): Delete and move bulk of processing to...
3466 (decl_sloc): ...here.
3467 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3468 (dump_ada_double_name): Remove S parameter and compute the suffix.
3469 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3470 element type and deal with an anonymous one.
3471 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3472 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3473 and remove reference to QUAL_UNION_TYPE.
3474 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3475 (dump_nested_type): ...here. New function extracted from above.
3476 Generate a full declaration for anonymous element type of arrays.
3477 (print_ada_declaration): Really skip anonymous declarations. Remove
3478 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3479 Clean up processing of declarations of array types and objects.
3480 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3481 Remove obsolete code and tidy up.
3482
75c8aac3
JH
34832015-11-29 Jan Hubicka <hubicka@ucw.cz>
3484
3485 PR c/67581
3486 * c-common.c (handle_transparent_union_attribute): Update
3487 also type variants.
3488
b58d3df2
ML
34892015-11-27 Martin Liska <mliska@suse.cz>
3490
3491 PR c++/68312
3492 * array-notation-common.c (cilkplus_extract_an_triplets):
3493 Release vector of vectors.
3494 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3495
89a01fcf
EB
34962015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3497
3498 PR c++/68527
3499 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3500 (print_ada_struct_decl): Likewise.
3501
cc5c5226
IZ
35022015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3503
3504 PR c++/68001
3505 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3506 * cilk.c (recognize_spawn): Determine location in a more precise
3507 way.
3508
269adb9d
JM
35092015-11-19 Jason Merrill <jason@redhat.com>
3510
3511 * c-common.c (shorten_compare): But look through macros from
3512 system headers.
3513
d0eccfcd
JM
35142015-11-18 Jason Merrill <jason@redhat.com>
3515
3516 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3517 non-constant operand comes from a macro.
3518
3e44547c
JM
35192015-11-17 Jason Merrill <jason@redhat.com>
3520
3521 PR bootstrap/68346
3522 * c-common.c (warn_tautological_cmp): Fold before checking for
3523 constants.
3524
0f62c7a0
MP
35252015-11-16 Marek Polacek <polacek@redhat.com>
3526
3527 PR c++/68362
3528 * c-common.c (check_case_bounds): Fold low and high cases.
3529
a868811e
MP
35302015-11-16 Marek Polacek <polacek@redhat.com>
3531
3532 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3533 * c-common.c (c_common_get_alias_set): Likewise.
3534 (handle_visibility_attribute): Likewise.
3535
fff77217
KY
35362015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
3537
3538 * c-common.c (handle_simd_attribute): New.
3539 (struct attribute_spec): Add entry for "simd".
3540 (handle_simd_attribute): New.
3541
269e63b7
KT
35422015-11-13 Kai Tietz <ktietz70@googlemail.com>
3543
3544 * c-lex.c (interpret_float): Use fold_convert.
3545
ebedc9a3
DM
35462015-11-13 David Malcolm <dmalcolm@redhat.com>
3547
3548 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
3549 and store it on the result.
3550 * c-opts.c (c_common_init_options): Set
3551 global_dc->colorize_source_p.
3552
6e232ba4
JN
35532015-11-12 James Norris <jnorris@codesourcery.com>
3554 Joseph Myers <joseph@codesourcery.com>
3555
7365279f 3556 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
3557 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
3558 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
3559 PRAGMA_OACC_CLAUSE_LINK.
3560
e78bede6
MP
35612015-11-11 Marek Polacek <polacek@redhat.com>
3562
3563 PR c/68107
3564 PR c++/68266
3565 * c-common.c (valid_array_size_p): New function.
3566 * c-common.h (valid_array_size_p): Declare.
3567
3f8257db 35682015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
3569
3570 PR bootstrap/68271
3571 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
3572
69f293c9
AM
35732015-11-11 Andrew MacLeod <amacleod@redhat.com>
3574
3575 * array-notation-common.c: Remove unused header files.
3576 * c-ada-spec.c: Likewise.
3577 * c-cilkplus.c: Likewise.
3578 * c-common.c: Likewise.
3579 * c-cppbuiltin.c: Likewise.
3580 * c-dump.c: Likewise.
3581 * c-format.c: Likewise.
3582 * c-gimplify.c: Likewise.
3583 * c-indentation.c: Likewise.
3584 * c-lex.c: Likewise.
3585 * c-omp.c: Likewise.
3586 * c-opts.c: Likewise.
3587 * c-pch.c: Likewise.
3588 * c-ppoutput.c: Likewise.
3589 * c-pragma.c: Likewise.
3590 * c-pretty-print.c: Likewise.
3591 * c-semantics.c: Likewise.
3592 * c-ubsan.c: Likewise.
3593 * cilk.c: Likewise.
3594 * stub-objc.c: Likewise.
3595
3a40d81d
NS
35962015-11-09 Thomas Schwinge <thomas@codesourcery.com>
3597 Cesar Philippidis <cesar@codesourcery.com>
3598 James Norris <jnorris@codesourcery.com>
3599 Julian Brown <julian@codesourcery.com>
3600 Nathan Sidwell <nathan@codesourcery.com>
3601
3602 * c-pragma.c (oacc_pragmas): Add "routine".
3603 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
3604
ee45a32d
EB
36052015-11-08 Eric Botcazou <ebotcazou@adacore.com>
3606
3607 * c-common.c (c_common_attributes): Add scalar_storage_order.
3608 (handle_scalar_storage_order_attribute): New function.
3609 * c-pragma.c (global_sso): New variable.
3610 (maybe_apply_pragma_scalar_storage_order): New function.
3611 (handle_pragma_scalar_storage_order): Likewise.
3612 (init_pragma): Register scalar_storage_order.
3613 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
3614 * c.opt (Wscalar-storage-order): New warning.
3615 (fsso-struct=): New option.
3616
eb11eb15
MS
36172015-11-08 Martin Sebor <msebor@redhat.com>
3618
3619 * c.opt (Wplacement-new): Add a period to the end of a sentence.
3620
0aad0198
RS
36212015-11-07 Richard Sandiford <richard.sandiford@arm.com>
3622
3623 * c-common.c: Don't undef DEF_BUILTIN.
3624
8a645150
DM
36252015-11-06 David Malcolm <dmalcolm@redhat.com>
3626
3627 * c-common.c (c_cpp_error): Convert parameter from location_t to
3628 rich_location *. Eliminate the "column_override" parameter and
3629 the call to diagnostic_override_column.
3630 Update the "done_lexing" clause to set range 0
3631 on the rich_location, rather than overwriting a location_t.
3632 * c-common.h (c_cpp_error): Convert parameter from location_t to
3633 rich_location *. Eliminate the "column_override" parameter.
3634
7a5e4956
CP
36352015-11-05 Cesar Philippidis <cesar@codesourcery.com>
3636 Thomas Schwinge <thomas@codesourcery.com>
3637 James Norris <jnorris@codesourcery.com>
3638
3639 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
3640 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
3641 clauses with parallel and kernels and loops.
3642 * c-pragma.h (enum pragma_omp_clause): Add entries for
3643 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
3644 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
3645 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
3646 INDEPENDENT,SEQ}.
3647 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
3648
e2f5cc96
MS
36492015-11-05 Martin Sebor <msebor@redhat.com>
3650
3651 PR c++/67942
3652 * c.opt (-Wplacement-new): New option.
3653
e01d41e5
JJ
36542015-11-05 Jakub Jelinek <jakub@redhat.com>
3655
3656 * c-common.h (c_finish_omp_atomic): Add TEST argument.
3657 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
3658 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
3659 save_expr or create_tmp_var* if TEST is true.
3660 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
3661 Don't call add_stmt here.
3662 (struct c_omp_check_loop_iv_data): New type.
3663 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
3664 c_omp_check_loop_iv_exprs): New functions.
3665 (c_omp_split_clauses): Adjust for lastprivate being allowed on
3666 distribute.
3667 (c_omp_declare_simd_clauses_to_numbers): Change
3668 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
3669 (c_omp_declare_simd_clauses_to_decls): Similarly change those
3670 from numbers to PARM_DECLs.
3671
595278be
MM
36722015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
3673
3674 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
3675 flag_checking.
3676
3f8257db 36772015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
3678
3679 PR c++-common/67882
b3d5bc62
JJ
3680 * c-common.h (fold_offsetof_1): Add argument.
3681 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
3682 offsetof expressions that reference elements past the end of
3683 an array.
3684
4bf9e5a8
TS
36852015-11-03 Thomas Schwinge <thomas@codesourcery.com>
3686 Chung-Lin Tang <cltang@codesourcery.com>
3687
3688 * c-pragma.c (oacc_pragmas): Add "atomic".
3689 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
3690
3b1661a9
ES
36912015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
3692
3693 * c-common.c (handle_target_clones_attribute): New.
3694 (c_common_attribute_table): Add handle_target_clones_attribute.
3695 (handle_always_inline_attribute): Add check on target_clones attribute.
3696 (handle_target_attribute): Ditto.
3697
2adfab87
AM
36982015-10-29 Andrew MacLeod <amacleod@redhat.com>
3699
3700 * array-notation-common.c: Reorder #include's and remove duplicates.
3701 * c-ada-spec.c: Likewise.
3702 * c-cilkplus.c: Likewise.
3703 * c-common.c: Likewise.
3704 * c-cppbuiltin.c: Likewise.
3705 * c-dump.c: Likewise.
3706 * c-format.c: Likewise.
3707 * c-gimplify.c: Likewise.
3708 * c-indentation.c: Likewise.
3709 * c-lex.c: Likewise.
3710 * c-omp.c: Likewise.
3711 * c-opts.c: Likewise.
3712 * c-pch.c: Likewise.
3713 * c-ppoutput.c: Likewise.
3714 * c-pragma.c: Likewise.
3715 * c-pretty-print.c: Likewise.
3716 * c-semantics.c: Likewise.
3717 * c-ubsan.c: Likewise.
3718 * cilk.c: Likewise.
3719 * stub-objc.c: Likewise.
3720
d90ec4f2
JM
37212015-10-28 Jason Merrill <jason@redhat.com>
3722
3723 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
3724
88bae6f4
TS
37252015-10-27 Thomas Schwinge <thomas@codesourcery.com>
3726 James Norris <jnorris@codesourcery.com>
3727 Cesar Philippidis <cesar@codesourcery.com>
3728
3729 PR c/64765
3730 PR c/64880
3731 * c-common.h (c_oacc_split_loop_clauses): Declare function.
3732 * c-omp.c (c_oacc_split_loop_clauses): New function.
3733
b1726d6c
MS
37342015-10-21 Martin Sebor <msebor@redhat.com>
3735
3736 PR driver/68043
3737 * c.opt: End each sentence that describes an option with a period.
3738
fa60eeb9
MP
37392015-10-20 Marek Polacek <polacek@redhat.com>
3740
3741 * array-notation-common.c (is_cilkplus_vector_p): Define.
3742 * c-common.h (is_cilkplus_vector_p): Declare.
3743
95979049
MP
37442015-10-20 Marek Polacek <polacek@redhat.com>
3745
3746 * c.opt (std=gnu++11): Do not describe as experimental.
3747 (std=gnu++14): Likewise.
3748
2a9fb712
JM
37492015-10-19 Jason Merrill <jason@redhat.com>
3750
3751 * c-cppbuiltin.c (c_cpp_builtins): Define
3752 __cpp_nontype_template_args.
3753
13b380a3
JM
37542015-10-19 Jason Merrill <jason@redhat.com>
3755
3756 * c-cppbuiltin.c (c_cpp_builtins): Define
3757 __cpp_enumerator_attributes, __cpp_fold_expressions,
3758 __cpp_unicode_characters.
3759
d9a6bd32
JJ
37602015-10-13 Jakub Jelinek <jakub@redhat.com>
3761 Aldy Hernandez <aldyh@redhat.com>
3762
3763 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
3764 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
3765 (c_define_builtins): Likewise.
3766 * c-common.h (enum c_omp_clause_split): Add
3767 C_OMP_CLAUSE_SPLIT_TASKLOOP.
3768 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
3769 (c_finish_omp_for): Add ORIG_DECLV argument.
3770 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
3771 201511 instead of 201307.
3772 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
3773 OMP_CRITICAL_CLAUSES to it.
3774 (c_finish_omp_ordered): Add CLAUSES argument, set
3775 OMP_ORDERED_CLAUSES to it.
3776 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
3777 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
3778 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
3779 constructs and new OpenMP 4.5 clauses. Clear
3780 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
3781 verification code.
3782 * c-pragma.c (omp_pragmas_simd): Add taskloop.
3783 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
3784 (enum pragma_omp_clause): Add
3785 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
3786 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
3787
624d31fe
RS
37882015-10-05 Richard Sandiford <richard.sandiford@arm.com>
3789
3790 * c-lex.c (interpret_float): Use real_equal instead of
3791 REAL_VALUES_EQUAL.
3792
b8fd7909
JM
37932015-10-04 Jason Merrill <jason@redhat.com>
3794
3795 Implement N4514, C++ Extensions for Transactional Memory.
3796 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
3797 (c_common_attribute_table): Add transaction_safe_dynamic.
3798 transaction_safe now affects type identity.
3799 (handle_tm_attribute): Handle transaction_safe_dynamic.
3800 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
3801 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
3802 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
3803 (D_TRANSMEM): New.
3804 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
3805 * c-pretty-print.c (pp_c_attributes_display): Don't print
3806 transaction_safe in C++.
3807
12651878
MP
38082015-10-02 Marek Polacek <polacek@redhat.com>
3809
3810 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
3811
3e3b8d63
MP
38122015-10-02 Marek Polacek <polacek@redhat.com>
3813
3814 PR c/64249
3815 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
3816 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
3817 * c.opt (Wduplicated-cond): New option.
3818
0d1a8f75
JM
38192015-10-01 Joseph Myers <joseph@codesourcery.com>
3820
3821 * c.opt (std=c11): Do not describe as experimental.
3822 (std=gnu11): Likewise.
3823 (std=iso9899:2011): Likewise.
3824
3e32ee19
NS
38252015-09-28 Nathan Sidwell <nathan@codesourcery.com>
3826
3827 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
3828 (DEF_FUNCTION_TYPE_VAR_11): Delete.
3829
974348ee
MP
38302015-09-25 Marek Polacek <polacek@redhat.com>
3831
3832 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
3833 (ubsan_instrument_shift): Likewise.
3834
15dbc1a6
MP
38352015-09-25 Marek Polacek <polacek@redhat.com>
3836
3837 PR sanitizer/64906
3838 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
3839
6b95d7cc
PP
38402015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
3841
3842 * c-indentation.c (should_warn_for_misleading_indentation):
3843 Compare next_stmt_vis_column with guard_line_first_nws instead
3844 of with guard_line_vis_column.
3845
c1822f9c
MLI
38462015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
3847
3848 PR c/49654
3849 PR c/49655
3850 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
3851 options and options not valid for the current language.
3852
d5398058
PP
38532015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
3854
3855 * c-indentation.c (should_warn_for_misleading_indentation):
3856 Float out and consolidate the calls to get_visual_column that
3857 are passed guard_exploc as an argument. Compare
3858 next_stmt_vis_column with guard_line_first_nws instead of with
3859 body_line_first_nws.
3860
6b333269
NS
38612015-09-22 Nathan Sidwell <nathan@codesourcery.com>
3862
3863 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
3864 Wnamespaces): New C++ warnings.
3865
a75f1574
JM
38662015-09-22 Jason Merrill <jason@redhat.com>
3867
3868 * c-common.h (abi_compat_version_crosses): New.
3869 (warn_abi_version): Declare.
3870 * c-common.c: Define it.
3871 * c-opts.c (c_common_post_options): Handle it.
3872 flag_abi_compat_version defaults to 8.
3873
bdaaa8b7
VV
38742015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
3875
3876 Complete the implementation of N4230, Nested namespace definition.
3877 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
3878 __cpp_nested_namespace_definitions.
3879
eaa797e8
MLI
38802015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3881
3882 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
3883
c4914de6
MLI
38842015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
3885
3886 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
3887 when warning.
3888 * c-pragma.h (pragma_lex): Add optional loc argument.
3889
fcb87c50
MM
38902015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
3891
3892 * c-format.c (check_format_arg): Adjust to use common block size in all
3893 object pools.
3894
31bdd08a
DM
38952015-09-15 David Malcolm <dmalcolm@redhat.com>
3896
3897 * c-format.c (location_from_offset): Update for change in
3898 signature of location_get_source_line.
3899 * c-indentation.c (get_visual_column): Likewise.
3900 (line_contains_hash_if): Likewise.
3901
aa9f4b4c
MP
39022015-09-14 Marek Polacek <polacek@redhat.com>
3903
3904 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3905 setting various warnings.
3906
aa256c4a
MP
39072015-09-14 Marek Polacek <polacek@redhat.com>
3908
3909 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3910 a negative value.
3911
0f876f22
MW
39122015-09-11 Mark Wielaard <mjw@redhat.com>
3913
3914 PR c/28901
3915 * c.opt (Wunused-variable): Option from common.opt.
3916 (Wunused-const-variable): New option.
3917
273aa49e
PC
39182015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3919
3920 PR c++/53184
3921 * c.opt ([Wsubobject-linkage]): Add.
3922
1807ffc1
MS
39232015-09-03 Martin Sebor <msebor@redhat.com>
3924
3925 PR c/66516
3926 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3927 functions.
3928 * c-common.c (reject_gcc_builtin): Define.
3929
38942840
BI
39302015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3931
3932 PR middle-end/60586
3933 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3934 prototype.
3935 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3936 cilk_gimplify_call_params_in_spawned_fn.
3937 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3938 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3939 unwrapping.
3940
c316b5e4
MP
39412015-08-25 Marek Polacek <polacek@redhat.com>
3942
3943 PR middle-end/67330
3944 * c-common.c (handle_weak_attribute): Don't check whether the
3945 visibility can be changed here.
3946
584a7c46
MLI
39472015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3948
3949 * c-lex.c (c_lex_with_flags): Use explicit locations.
3950
a79683d5
TS
39512015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3952
3953 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3954 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3955
61717a45
FXC
39562015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3957
3958 PR middle-end/36757
3959 * c-common.c (check_builtin_function_arguments): Add check
3960 for BUILT_IN_SIGNBIT argument.
3961
329524f5
PC
39622015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3963
3964 PR c++/67160
3965 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3966 in c++1z mode.
3967
4ee55665
MP
39682015-08-17 Marek Polacek <polacek@redhat.com>
3969
3970 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3971 with whitespaces before qualifier names.
3972
b893e375
MP
39732015-08-12 Marek Polacek <polacek@redhat.com>
3974
3975 PR c++/55095
3976 * c-common.c (maybe_warn_shift_overflow): Properly handle
3977 left-shifting 1 into the sign bit.
3978
c2d89095
MLI
39792015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3980
3981 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3982
971e17ff
AS
39832015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
3984 Braden Obrzut <admin@maniacsvault.net>
3985 Jason Merrill <jason@redhat.com>
3986
3987 Add C++ Concepts TS support.
3988 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3989 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3990 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3991 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3992 * c-opts.c (set_std_cxx1z): Set flag_concepts.
3993 * c.opt (fconcepts): New.
3994
b3d5bc62
JJ
39952015-08-02 Martin Sebor <msebor@redhat.com>
3996
3997 * c.opt (-Wframe-address): New warning option.
3998
8ebca419
PP
39992015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4000
4001 * c-indentation.c (should_warn_for_misleading_indentation):
4002 Improve heuristics.
4003
1a1e101f
PP
40042015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4005
4006 * c-indentation.c (get_visual_column): Add parameter first_nws,
4007 use it. Update comment documenting the function.
4008 (is_first_nonwhitespace_on_line): Remove.
4009 (should_warn_for_misleading_indentation): Replace usage of
4010 of is_first_nonwhitespace_on_line with get_visual_column.
4011
992118a1
PP
40122015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4013
4014 * c-indentation.h (struct token_indent_info): Define.
4015 (get_token_indent_info): Define.
4016 (warn_for_misleading_information): Declare.
4017 * c-common.h (warn_for_misleading_information): Remove.
4018 * c-identation.c (warn_for_misleading_indentation):
4019 Change declaration to take three token_indent_infos. Adjust
4020 accordingly.
4021 * c-identation.c (should_warn_for_misleading_indentation):
4022 Likewise. Bail out early if the body is a compound statement.
4023 (guard_tinfo_to_string): Define.
4024
e8fa3817
JM
40252015-07-30 Jason Merrill <jason@redhat.com>
4026
4027 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4028 '*' for reference decay.
4029
173864e8
MP
40302015-07-30 Marek Polacek <polacek@redhat.com>
4031
4032 * c-common.c (warn_tautological_cmp): Bail for float types.
4033
f2afe6dd
MP
40342015-07-27 Marek Polacek <polacek@redhat.com>
4035
4036 PR bootstrap/67030
4037 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4038
05b28fd6
MP
40392015-07-27 Marek Polacek <polacek@redhat.com>
4040
4041 PR c++/66555
4042 PR c/54979
4043 * c-common.c (find_array_ref_with_const_idx_r): New function.
4044 (warn_tautological_cmp): New function.
4045 * c-common.h (warn_tautological_cmp): Declare.
4046 * c.opt (Wtautological-compare): New option.
4047
5a5062b8
MP
40482015-07-23 Marek Polacek <polacek@redhat.com>
4049
4050 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4051 (ubsan_instrument_shift): Likewise.
4052
dc891fe7
MP
40532015-07-23 Marek Polacek <polacek@redhat.com>
4054
4055 PR sanitizer/66908
4056 * c-ubsan.c: Include gimplify.h.
4057 (ubsan_instrument_division): Unshare OP0 and OP1.
4058 (ubsan_instrument_shift): Likewise.
4059
451b5e48
MP
40602015-07-20 Marek Polacek <polacek@redhat.com>
4061 Richard Sandiford <richard.sandiford@arm.com>
4062
4063 PR c++/55095
4064 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4065 Use EXPR_LOC_OR_LOC.
4066 (maybe_warn_shift_overflow): New function.
4067 * c-common.h (maybe_warn_shift_overflow): Declare.
4068 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4069 * c.opt (Wshift-overflow): New option.
4070
fb0b2914
ML
40712015-07-16 Martin Liska <mliska@suse.cz>
4072
4073 * c-format.c (static void check_format_info_main): Use
4074 object_allocator instead of pool_allocator.
4075 (check_format_arg): Likewise.
4076 (check_format_info_main): Likewise.
4077
903f5c23
AM
40782015-07-15 Andrew MacLeod <amacleod@redhat.com>
4079
4080 * c-opts.c: Remove multiline #include comment.
4081
026c3cfd
AH
40822015-07-12 Aldy Hernandez <aldyh@redhat.com>
4083
4084 * c-common.c: Fix double word typos.
4085
bb49ee66
EB
40862015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4087
4088 * c-ada-spec.h (cpp_operation): Revert latest change.
4089 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4090 constructors and destructors.
4091
1916bcb5
AM
40922015-07-09 Andrew MacLeod <amacleod@redhat.com>
4093
4094 * c-common.h: Adjust includes for flags.h changes.
4095 * stub-objc.c: Likewise.
026c3cfd 4096
a9dcd529
EB
40972015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4098
4099 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4100 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4101
b03b462f
JJ
41022015-07-08 Jakub Jelinek <jakub@redhat.com>
4103
4104 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4105 are to be removed, return NULL rather than original clauses list.
4106
c7131fb2
AM
41072015-07-07 Andrew MacLeod <amacleod@redhat.com>
4108
4109 * array-notation-common.c: Adjust includes.
4110 * c-ada-spec.c: Likewise.
4111 * c-cilkplus.c: Likewise.
4112 * c-common.h: Likewise.
4113 * c-cppbuiltin.c: Likewise.
4114 * c-dump.c: Likewise.
4115 * c-format.c: Likewise.
4116 * c-gimplify.c: Likewise.
4117 * c-indentation.c: Likewise.
4118 * c-lex.c: Likewise.
4119 * c-omp.c: Likewise.
4120 * c-opts.c: Likewise.
4121 * c-pch.c: Likewise.
4122 * c-ppoutput.c: Likewise.
4123 * c-pragma.c: Likewise.
4124 * c-pretty-print.c: Likewise.
4125 * c-semantics.c: Likewise.
4126 * c-ubsan.c: Likewise.
4127 * cilk.c: Likewise.
4128 * stub-objc.c: Likewise.
4129
2a7fb83f
EB
41302015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4131
4132 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4133 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4134
a03c9bf1
JM
41352015-07-01 Jason Merrill <jason@redhat.com>
4136
36a85135
JM
4137 * c-common.h (D_CXX11): Rename from D_CXX0X.
4138 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4139 * c-common.c: Adjust.
4140
e7fa68d5
JM
4141 * c-opts.c (c_common_post_options): Default to C++14.
4142
a03c9bf1
JM
4143 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4144
fe95b036
ESR
41452015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4146
4147 Implement N4197 - Adding u8 character literals
b3d5bc62 4148 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4149 CPP_CHAR.
b3d5bc62 4150 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4151 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4152 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4153 and CPP_UTF8CHAR tokens.
4154 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4155
da2e71c9
MLI
41562015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4157
4158 PR fortran/66605
4159 * c-common.c (do_warn_unused_parameter): Move here.
4160 * c-common.h (do_warn_unused_parameter): Declare.
4161
b155cfd9
MP
41622015-06-29 Marek Polacek <polacek@redhat.com>
4163
4164 PR c/66322
4165 * c-common.c (check_case_bounds): Add bool * parameter. Set
4166 OUTSIDE_RANGE_P.
4167 (c_add_case_label): Add bool * parameter. Pass it down to
4168 check_case_bounds.
4169 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4170 warning here.
4171 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4172 declarations.
4173
31521951
MP
41742015-06-27 Marek Polacek <polacek@redhat.com>
4175
4176 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4177 or VECTOR_INTEGER_TYPE_P throughout.
4178 * c-gimplify.c: Likewise.
4179
22d03525
MP
41802015-06-26 Marek Polacek <polacek@redhat.com>
4181
4182 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4183 * c-common.c (c_fully_fold_internal): Likewise.
4184 (c_alignof_expr): Likewise.
4185 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4186 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4187 * cilk.c (create_parm_list): Likewise.
22d03525 4188
af05e6e5
MP
41892015-06-26 Marek Polacek <polacek@redhat.com>
4190
4191 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4192
f0889939
AM
41932015-06-25 Andrew MacLeod <amacleod@redhat.com>
4194
4195 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4196 * c-gimplify.c: Likewise.
4197 * c-pragma.c: Likewise.
4198 * c-ubsan.c: Likewise.
4199 * cilk.c: Likewise.
4200
ca752f39
RS
42012015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4202
4203 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4204 ggc_hasher.
4205
16a16ec7
AM
42062015-06-25 Andrew MacLeod <amacleod@redhat.com>
4207
4208 * cilk.c: Move calls.h after tm.h in the include chain.
4209
0ae9bd27
MP
42102015-06-25 Marek Polacek <polacek@redhat.com>
4211
4212 * array-notation-common.c: Use VAR_P throughout.
4213 * c-ada-spec.c: Likewise.
4214 * c-common.c: Likewise.
4215 * c-format.c: Likewise.
4216 * c-gimplify.c: Likewise.
4217 * c-omp.c: Likewise.
4218 * c-pragma.c: Likewise.
4219 * c-pretty-print.c: Likewise.
4220 * cilk.c: Likewise.
4221
62f9079a
MP
42222015-06-25 Marek Polacek <polacek@redhat.com>
4223
4224 * cilk.c (extract_free_variables): Use is_global_var.
4225
0fa16060
RS
42262015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4227
4228 * c-common.c: Don't include target-def.h.
4229
a68ae2e1
MP
42302015-06-23 Marek Polacek <polacek@redhat.com>
4231
4232 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4233 when comparing INTEGER_CSTs.
4234
c6a2f2d9
PMR
42352015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4236
4237 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4238 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4239 (dump_ada_template): Skip partially specialized types.
4240
6b4db501
MM
42412015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4242
4243 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4244 swapping.
4245
abb226c9
AM
42462015-06-17 Andrew MacLeod <amacleod@redhat.com>
4247
4248 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4249 * c-ada-spec.c: Likewise.
4250 * c-cilkplus.c: Likewise.
4251 * c-common.c: Likewise.
4252 * c-common.h: Likewise.
4253 * c-cppbuiltin.c: Likewise.
4254 * c-dump.c: Likewise.
4255 * c-format.c: Likewise.
4256 * c-gimplify.c: Likewise.
4257 * c-indentation.c: Likewise.
4258 * c-lex.c: Likewise.
4259 * c-omp.c: Likewise.
4260 * c-opts.c: Likewise.
4261 * c-pch.c: Likewise.
4262 * c-ppoutput.c: Likewise.
4263 * c-pragma.c: Likewise.
4264 * c-pretty-print.c: Likewise.
4265 * c-semantics.c: Likewise.
4266 * c-ubsan.c: Likewise.
4267 * cilk.c: Likewise.
4268 * stub-objc.c: Likewise.
4269
076fecad
PP
42702015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4271
4272 PR c++/65168
4273 * c-common.c (c_common_truthvalue_conversion): Warn when
4274 converting an address of a reference to a truth value.
4275
13fdf2e2
AM
42762015-06-08 Andrew MacLeod <amacleod@redhat.com>
4277
4278 * array-notation-common.c : Adjust include files.
4279 * c-ada-spec.c : Likewise.
4280 * c-cilkplus.c : Likewise.
4281 * c-common.c : Likewise.
4282 * c-common.h : Likewise.
4283 * c-cppbuiltin.c : Likewise.
4284 * c-dump.c : Likewise.
4285 * c-format.c : Likewise.
4286 * c-gimplify.c : Likewise.
4287 * c-indentation.c : Likewise.
4288 * c-lex.c : Likewise.
4289 * c-omp.c : Likewise.
4290 * c-opts.c : Likewise.
4291 * c-pch.c : Likewise.
4292 * c-ppoutput.c : Likewise.
4293 * c-pragma.c : Likewise.
4294 * c-pretty-print.c : Likewise.
4295 * c-semantics.c : Likewise.
4296 * c-ubsan.c : Likewise.
4297 * cilk.c : Likewise.
4298 * stub-objc.c : Likewise.
4299
a1661b90
MP
43002015-06-08 Marek Polacek <polacek@redhat.com>
4301
4302 PR c/66415
4303 * c-format.c (location_from_offset): Return LOC if LINE is null.
4304
d7438551
AH
43052015-06-05 Aldy Hernandez <aldyh@redhat.com>
4306
4307 * c-common.h (c_parse_final_cleanups): New prototype.
4308 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4309
b3d5bc62
JJ
43102015-06-04 Sriraman Tallam <tmsriram@google.com>
4311
4312 * c-common.c (noplt): New attribute.
4313 (handle_noplt_attribute): New handler.
4314
ecb9f223
AM
43152015-06-04 Andrew MacLeod <amacleod@redhat.com>
4316
4317 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4318 * c-ada-spec.c: Likewise.
4319 * c-cilkplus.c: Likewise.
4320 * c-common.c: Likewise.
4321 * c-common.h: Likewise.
4322 * c-cppbuiltin.c: Likewise.
4323 * c-dump.c: Likewise.
4324 * c-format.c: Likewise.
4325 * c-gimplify.c: Likewise.
4326 * c-indentation.c: Likewise.
4327 * c-lex.c: Likewise.
4328 * c-omp.c: Likewise.
4329 * c-opts.c: Likewise.
4330 * c-pch.c: Likewise.
4331 * c-ppoutput.c: Likewise.
4332 * c-pragma.c: Likewise.
4333 * c-pretty-print.c: Likewise.
4334 * c-semantics.c: Likewise.
4335 * c-ubsan.c: Likewise.
4336 * cilk.c: Likewise.
4337 * stub-objc.c: Likewise.
4338
6ac48155
DM
43392015-06-02 David Malcolm <dmalcolm@redhat.com>
4340
4341 PR c/66220:
4342 * c-indentation.c (should_warn_for_misleading_indentation): Use
4343 expand_location rather than expand_location_to_spelling_point.
4344 Don't warn if the guarding statement is more indented than the
4345 next/body stmts.
4346
773ce42e
DM
43472015-06-02 David Malcolm <dmalcolm@redhat.com>
4348
4349 * c-indentation.c (warn_for_misleading_indentation): Bail out
4350 immediately if -Wmisleading-indentation isn't enabled.
4351
4fef8379
ML
43522015-06-01 Martin Liska <mliska@suse.cz>
4353
4354 * c-format.c (check_format_arg):Use new type-based pool allocator.
4355 (check_format_info_main) Likewise.
4356
1edfb384
EB
43572015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4358
4359 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4360 (has_nontrivial_methods): Likewise.
4361
9677ef52
MP
43622015-05-25 Marek Polacek <polacek@redhat.com>
4363
4364 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4365
fd5c817a
MP
43662015-05-22 Marek Polacek <polacek@redhat.com>
4367
4368 PR c/47043
4369 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4370
a2f45fe6 43712015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
4372
4373 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4374 STACK_GROWS_DOWNWARD.
4375
a2f45fe6 43762015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
4377
4378 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4379 STACK_GROWS_DOWNWARD rather than if it is defined.
4380
0fee2ac2 43812015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 4382
0fee2ac2
MLI
4383 PR c/52952
4384 * c-format.c (location_column_from_byte_offset): New.
4385 (location_from_offset): New.
4386 (struct format_wanted_type): Add offset_loc field.
4387 (check_format_info): Move handling of location for extra arguments
4388 closer to the point of warning.
4389 (check_format_info_main): Pass the result of location_from_offset
4390 to warning_at.
4391 (format_type_warning): Pass the result of location_from_offset
4392 to warning_at.
4393
cf4ef6f7
MP
43942015-05-20 Marek Polacek <polacek@redhat.com>
4395
4396 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4397
3a65ee74
MP
43982015-05-20 Marek Polacek <polacek@redhat.com>
4399
4400 * c-ada-spec.c (dump_sloc): Use DECL_P.
4401
21b634ae
MP
44022015-05-20 Marek Polacek <polacek@redhat.com>
4403
4404 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4405 * c-common.c: Likewise.
4406
0e50b624
DM
44072015-05-19 David Malcolm <dmalcolm@redhat.com>
4408
4409 * c-common.h (fe_file_change): Strengthen param from
4410 const line_map * to const line_map_ordinary *.
4411 (pp_file_change): Likewise.
4412 * c-lex.c (fe_file_change): Likewise.
4413 (cb_define): Use linemap_check_ordinary when invoking
4414 SOURCE_LINE.
4415 (cb_undef): Likewise.
4416 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4417 invoking cb_file_change.
4418 (c_finish_options): Likewise.
4419 (push_command_line_include): Likewise.
4420 (cb_file_change): Strengthen param "new_map" from
4421 const line_map * to const line_map_ordinary *.
4422 * c-ppoutput.c (cb_define): Likewise for local "map".
4423 (pp_file_change): Likewise for param "map" and local "from".
4424
fab27f52
MM
44252015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4426
4427 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4428
2fe1d762
TV
44292015-05-18 Tom de Vries <tom@codesourcery.com>
4430
4431 * c-common.c (build_va_arg_1): New function.
4432 (build_va_arg): Add address operator to va_list operand if necessary.
4433
7a37fa90
MM
44342015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4435
4436 PR c/48956
4437 * c-common.c (int_safely_convertible_to_real_p): Define.
4438 (unsafe_conversion_p): Check conversions involving complex types.
4439 (conversion_warning): Add new warning message for conversions which
4440 discard imaginary component.
4441 * c-common.h: (enum conversion_safety): Add new enumerator for such
4442 conversions.
4443
3aa3c9fc
MP
44442015-05-14 Marek Polacek <polacek@redhat.com>
4445
4446 PR c/66066
4447 PR c/66127
4448 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4449 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4450 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4451 use it. If FOR_INT_CONST, require that all evaluated operands be
4452 INTEGER_CSTs.
4453
c3388e62
DM
44542015-05-12 David Malcolm <dmalcolm@redhat.com>
4455
4456 * c-common.h (warn_for_misleading_indentation): New prototype.
4457 * c-indentation.c: New file.
4458 * c.opt (Wmisleading-indentation): New option.
4459
c7b38fd5
TV
44602015-05-12 Tom de Vries <tom@codesourcery.com>
4461
4462 PR tree-optimization/66010
4463 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4464
381bf11e
JM
44652015-05-09 Jason Merrill <jason@redhat.com>
4466
edff0c06
JM
4467 * c-opts.c (c_common_post_options): Also clear
4468 cpp_opts->cpp_warn_cxx11_compat.
4469
129211bc
JM
4470 * c-common.h (enum cxx_dialect): Add cxx_unset.
4471 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4472 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4473
381bf11e
JM
4474 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4475 (std=gnu++0x): Mark as Undocumented.
4476 (std=gnu++1y): Add deprecated message.
4477
fe191308
JM
44782015-05-08 Jason Merrill <jason@redhat.com>
4479
765189ff
JM
4480 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4481 * c-opts.c: Adjust.
4482
fe191308
JM
4483 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4484
755e528f
MP
44852015-05-08 Marek Polacek <polacek@redhat.com>
4486
4487 PR c/64918
4488 * c.opt (Woverride-init-side-effects): New option.
4489
0173bd2a
MP
44902015-05-07 Marek Polacek <polacek@redhat.com>
4491
4492 PR c/65179
4493 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4494 negative value.
4495 * c.opt (Wshift-negative-value): New option.
4496 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4497 when -Wextra and C99/C++11 mode.
4498
e0f0d3b9
MP
44992015-05-07 Marek Polacek <polacek@redhat.com>
4500 Martin Uecker <uecker@eecs.berkeley.edu>
4501
4502 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4503 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4504
8243e2a9
JM
45052015-05-05 Jason Merrill <jason@redhat.com>
4506
4507 * c.opt (Wterminate): New.
4508
577cd070
MP
45092015-04-30 Marek Polacek <polacek@redhat.com>
4510
4511 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4512 require that the non-constant be of a boolean type.
4513
0373796b
JT
45142015-04-29 Josh Triplett <josh@joshtriplett.org>
4515
e0f0d3b9
MP
4516 * c-common.c (handle_section_attribute): Refactor to reduce
4517 nesting and distinguish between error cases.
0373796b 4518
716c0ba6
MP
45192015-04-29 Marek Polacek <polacek@redhat.com>
4520
4521 PR c/64610
4522 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4523 with 0/1.
4524
8848828b
JJ
45252015-04-29 Jakub Jelinek <jakub@redhat.com>
4526
4527 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4528 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4529 HOST_BITS_PER_WIDE_INT.
4530
ecd0e562
TV
45312015-04-28 Tom de Vries <tom@codesourcery.com>
4532
4533 PR tree-optimization/65887
4534 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4535
2a877204 45362015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 4537 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
4538
4539 * c-ada-spec.c (in_function): Delete.
4540 (dump_generic_ada_node): Do not change in_function and remove the
4541 redundant code dealing with it.
4542 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
4543 (print_ada_methods): Output the static member functions in a nested
4544 package after the regular methods as well as associated renamings.
4545
4853031e
MP
45462015-04-24 Marek Polacek <polacek@redhat.com>
4547
4548 PR c/65830
4549 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
4550 and OPT_Wshift_count_overflow.
4551
8c2b7f79
MP
4552 PR c/63357
4553 * c-common.c (warn_logical_operator): Warn if the operands have the
4554 same expressions.
4555
b8787813
MP
45562015-04-24 Marek Polacek <polacek@redhat.com>
4557
4558 PR c/61534
4559 * c-common.c (warn_logical_operator): Bail if either operand comes
4560 from a macro expansion.
4561
8fba1830
BRF
45622015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
4563
4564 PR target/55143
4565 * c-common.c (c_default_pointer_mode): Add definition.
4566 * c-common.h (c_default_pointer_mode): Add declaration.
4567
17958621
JJ
45682015-03-11 Jakub Jelinek <jakub@redhat.com>
4569
4570 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
4571 on record_builtin_type argument.
4572
7ccb1a11
JJ
45732015-03-10 Jakub Jelinek <jakub@redhat.com>
4574
4575 PR c/65120
4576 * c-common.c (warn_logical_not_parentheses): Don't warn for
4577 !x == 0 or !x != 0.
4578
04fd785e
MP
45792015-03-07 Marek Polacek <polacek@redhat.com>
4580
4581 PR sanitizer/65280
4582 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
4583 before trying to figure out whether we have a flexible array member.
4584
a4e26206 45852015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4586 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
4587
4588 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
4589
0d2489f4
EB
45902015-03-05 Eric Botcazou <ebotcazou@adacore.com>
4591
4592 PR ada/65319
4593 * c-ada-spec.c (print_destructor): Remove obsolete code.
4594
83ed54d7
EB
45952015-03-01 Eric Botcazou <ebotcazou@adacore.com>
4596
4597 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
4598 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
4599 DECL_TEMPLATE_RESULT emulations.
4600 (dump_ada_template)): Add guard for TYPE_METHODS.
4601
7631f0e2
MP
46022015-02-27 Marek Polacek <polacek@redhat.com>
4603
4604 PR c/65040
4605 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
4606
d1783ae5
KT
46072015-02-27 Kai Tietz <ktietz@redhat.com>
4608
4609 PR c/35330
4610 * c-pragma.c (handle_pragma_weak): Do not try to create
4611 weak/alias of declarations not being function, or variable
4612 declarations.
4613
56a9f6bc
TS
46142015-02-24 Thomas Schwinge <thomas@codesourcery.com>
4615
4616 PR libgomp/64625
4617 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4618 Remove macros.
4619 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
4620
3d5cb23d
MP
46212015-02-16 Marek Polacek <polacek@redhat.com>
4622
4623 PR c/65066
4624 * c-format.c (check_format_types): Handle null param.
4625
fa008882
MP
46262015-02-13 Marek Polacek <polacek@redhat.com>
4627
4628 PR c/65040
4629 * c-format.c (check_format_types): Don't warn about different
4630 signedness if the original value is in the range of WANTED_TYPE.
4631
785f21af
JM
46322015-02-12 Jason Merrill <jason@redhat.com>
4633
4634 PR c++/64956
4635 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
4636 to the current highest version.
4637 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
4638
4886ec8e
JJ
46392015-02-04 Jakub Jelinek <jakub@redhat.com>
4640
4641 PR c/64824
4642 PR c/64868
4643 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
4644 instead of RDIV_EXPR. Use build_binary_op instead of
4645 build2_loc.
4646
40fecdd6
JM
46472015-01-30 Joseph Myers <joseph@codesourcery.com>
4648
4649 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
4650 to pass input_location as first argument.
4651
a0c88d06
TV
46522015-01-23 Tom de Vries <tom@codesourcery.com>
4653
4654 PR libgomp/64672
4655 * c.opt (fopenacc): Mark as LTO option.
4656
1506ae0e
TV
46572015-01-23 Tom de Vries <tom@codesourcery.com>
4658
4659 PR libgomp/64707
4660 * c.opt (fopenmp): Mark as LTO option.
4661
31be63ab
JJ
46622015-01-21 Jakub Jelinek <jakub@redhat.com>
4663
4664 PR c/63307
b1726d6c 4665 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
4666 (compare_decls): Fix up formatting.
4667
46682015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
4669
4670 PR c/63307
4671 * cilk.c: Include vec.h.
4672 (struct cilk_decls): New structure.
4673 (wrapper_parm_cb): Split this function to...
4674 (fill_decls_vec): ...this...
4675 (create_parm_list): ...and this.
4676 (compare_decls): New function.
4677 (for_local_cb): Remove.
4678 (wrapper_local_cb): Ditto.
4679 (build_wrapper_type): For now first traverse and fill vector of
4680 declarations then sort it and then deal with sorted vector.
4681 (cilk_outline): Ditto.
4682 (declare_one_free_variable): Ditto.
4683
6875457f
JM
46842015-01-21 Jason Merrill <jason@redhat.com>
4685
4686 PR c++/64629
4687 * c-format.c (check_format_arg): Call decl_constant_value.
4688
185c9e56
ML
46892015-01-19 Martin Liska <mliska@suse.cz>
4690
4691 * c-common.c (handle_noicf_attribute): New function.
4692
41dbbb37
TS
46932015-01-15 Thomas Schwinge <thomas@codesourcery.com>
4694 Bernd Schmidt <bernds@codesourcery.com>
4695 James Norris <jnorris@codesourcery.com>
4696 Cesar Philippidis <cesar@codesourcery.com>
4697 Ilmir Usmanov <i.usmanov@samsung.com>
4698 Jakub Jelinek <jakub@redhat.com>
4699
4700 * c.opt (fopenacc): New option.
4701 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
4702 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
4703 New macros.
4704 * c-common.h (c_finish_oacc_wait): New prototype.
4705 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
4706 (c_finish_oacc_wait): New function.
4707 * c-pragma.c (oacc_pragmas): New variable.
4708 (c_pp_lookup_pragma, init_pragma): Handle it.
4709 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
4710 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
4711 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
4712 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
4713 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
4714 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
4715 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
4716 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
4717 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
4718 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
4719 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
4720 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
4721 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
4722 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
4723 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
4724 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
4725 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
4726 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
4727 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
4728 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
4729 PRAGMA_OACC_CLAUSE_WORKER.
4730
3f8257db 47312015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
4732
4733 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
4734 for the new option fstack-protector_explicit.
4735 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
4736 (handle_stack_protect_attribute): New function.
4737
3f8257db 47382015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
4739
4740 * c.opt: New option -Warray-bounds=.
4741
adfac8df
JJ
47422015-01-09 Michael Collison <michael.collison@linaro.org>
4743
4744 * array-notation-common.c: Include hash-set.h, machmode.h,
4745 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4746 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
4747 * c-ada-spec.c: Ditto.
4748 * c-cilkplus.c: Ditto.
4749 * c-common.c: Include input.h due to flattening of tree.h.
4750 Define macro GCC_C_COMMON_C.
4751 * c-common.h: Flatten tree.h header files into c-common.h.
4752 Remove include of tree-core.h.
4753 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4754 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4755 fold-const.h, wide-int.h, and inchash.h due to
4756 flattening of tree.h.
4757 * c-dump.c: Ditto.
4758 * c-format.c: Flatten tree.h header files into c-common.h.
4759 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
4760 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4761 fold-const.h, wide-int.h, and inchash.h due to
4762 flattening of tree.h.
4763 * c-dump.c: Include hash-set.h, machmode.h,
4764 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4765 fold-const.h, wide-int.h, and inchash.h due to
4766 flattening of tree.h.
4767 * c-format.c: Include hash-set.h, machmode.h,
4768 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4769 fold-const.h, wide-int.h, inchash.h and real.h due to
4770 flattening of tree.h.
4771 * c-gimplify.c: Include hash-set.h, machmode.h,
4772 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
4773 fold-const.h, wide-int.h, and inchash.h due to
4774 flattening of tree.h.
4775 * cilk.c: Ditto.
4776 * c-lex.c: Ditto.
4777 * c-omp.c: Ditto.
4778 * c-opts.c: Ditto.
4779 * c-pch.c: Ditto.
4780 * c-ppoutput.c: Ditto.
4781 * c-pragma.c: Ditto.
4782 * c-pretty-print.c: Ditto.
4783 * c-semantics.c: Ditto.
4784 * c-ubsan.c: Ditto.
4785 * stub-objc.c: Ditto.
4786
f5481fc4
JM
47872015-01-08 Jason Merrill <jason@redhat.com>
4788
4789 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
4790 do_ubsan_in_current_function.
4791 (ubsan_maybe_instrument_reference_or_call): Likewise.
4792 * c-ubsan.h: Declare it.
4793
de35aa66
MS
47942015-01-08 Mike Stump <mikestump@comcast.net>
4795
4796 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
4797
4a9a42ab
MP
47982015-01-07 Marek Polacek <polacek@redhat.com>
4799
4800 PR c/64440
4801 * c-common.c (c_fully_fold_internal): Warn for division and modulo
4802 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
4803
2f42e5de
TS
48042015-01-05 Trevor Saunders <tsaunders@mozilla.com>
4805
4806 PR c++/31397
4807 * c.opt (Wsuggest-override): New option.
4808
5624e564
JJ
48092015-01-05 Jakub Jelinek <jakub@redhat.com>
4810
4811 Update copyright years.
4812
5bd012f8
MP
48132015-01-05 Marek Polacek <polacek@redhat.com>
4814
4815 PR c/64423
4816 * c-common.c (warn_array_subscript_with_type_char): Add location_t
4817 parameter. Use it.
4818 * c-common.h (warn_array_subscript_with_type_char): Update
4819 declaration.
4820
a7fa8d18
ESR
48212014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
4822
4823 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
4824 Control macro with flag_sized_deallocation.
4825
3f8257db 48262014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
4827
4828 * c.opt (Wdiscarded-array-qualifiers): New option.
4829
1f8d3e84
JJ
48302014-12-19 Jakub Jelinek <jakub@redhat.com>
4831
4832 PR preprocessor/63831
4833 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
4834 and __has_cpp_attribute here.
4835 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
4836 c_common_has_attribute.
4837 * c-common.h (c_common_has_attribute): New prototype.
4838 * c-lex.c (init_c_lex): Set cb->has_attribute to
4839 c_common_has_attribute instead of cb_has_attribute.
4840 (get_token_no_padding): New function.
4841 (cb_has_attribute): Renamed to ...
4842 (c_common_has_attribute): ... this. No longer static. Use
4843 get_token_no_padding, require ()s, don't build TREE_LIST
4844 unnecessarily, fix up formatting, adjust diagnostics, call
4845 init_attributes.
4846
20b06add
JM
48472014-12-15 Jason Merrill <jason@redhat.com>
4848
4849 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
4850 (-Wsized-deallocation): New.
4851 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
4852 to on in C++14 and up.
4853
94a073b2
JM
48542014-12-11 Jason Merrill <jason@redhat.com>
4855
acaa5911
JM
4856 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
4857
94a073b2
JM
4858 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
4859 we aren't complaining about VLAs.
4860
7fb66c15
MP
48612014-12-06 Marek Polacek <polacek@redhat.com>
4862
4863 PR tree-optimization/64183
4864 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
4865 shift-expression if it is integer_type_node. Use types_compatible_p.
4866
b731b390
JJ
48672014-11-29 Jakub Jelinek <jakub@redhat.com>
4868
4869 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
4870 last argument from create_tmp_var_raw and create_tmp_var calls.
4871 * cilk.c (gimplify_cilk_spawn): Likewise.
4872 * c-omp.c (c_finish_omp_atomic): Likewise.
4873
6a4da643
MP
48742014-11-28 Marek Polacek <polacek@redhat.com>
4875
4876 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
4877 instead of unsigned_type_node.
4878
541e35a6
MP
48792014-11-28 Marek Polacek <polacek@redhat.com>
4880
4881 PR c/63862
4882 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
4883 to op1_utype.
4884 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
4885 expression to unsigned_type_node.
4886
dcc97066
MW
48872014-11-20 Mark Wielaard <mjw@redhat.com>
4888
4889 PR debug/38757
4890 * c-opts.c (set_std_c89): Set lang_hooks.name.
4891 (set_std_c99): Likewise.
4892 (set_std_c11): Likewise.
4893 (set_std_cxx98): Likewise.
4894 (set_std_cxx11): Likewise.
4895 (set_std_cxx14): Likewise.
4896 (set_std_cxx1z): Likewise.
4897
aa7da51a
JJ
48982014-11-21 Jakub Jelinek <jakub@redhat.com>
4899
4900 PR target/63764
4901 * c-common.h (convert_vector_to_pointer_for_subscript): Change
4902 return type to bool.
009a3480 4903 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
4904 (convert_vector_to_pointer_for_subscript): Change return type to
4905 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4906 and copy it into a TARGET_EXPR and use that instead of *vecp
4907 directly.
4908
538dd0b7
DM
49092014-11-19 David Malcolm <dmalcolm@redhat.com>
4910
4911 Merger of git branch "gimple-classes-v2-option-3".
4912 * ChangeLog.gimple-classes: New.
4913 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4914 from being just a vec<gimple> to a vec<gbind *>.
4915
c39a5e99
JJ
49162014-11-18 Jakub Jelinek <jakub@redhat.com>
4917
4918 PR sanitizer/63813
4919 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4920 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4921 get_pointer_alignment for non-pointers. Use ptype, or if it is
4922 reference type, corresponding pointer type, as type of kind
4923 argument.
4924 (ubsan_maybe_instrument_reference,
4925 ubsan_maybe_instrument_member_call): Adjust callers.
4926
8537a4a9
MP
49272014-11-15 Marek Polacek <polacek@redhat.com>
4928
4929 PR middle-end/63884
4930 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4931 for NULL fndecl.
4932 (extract_array_notation_exprs): Return for NULL node.
4933
2079956a
JM
49342014-11-12 Joseph Myers <joseph@codesourcery.com>
4935
4936 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4937 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4938
1304953e
JJ
49392014-11-12 Jakub Jelinek <jakub@redhat.com>
4940
4941 PR c/59708
4942 * c-common.c (check_builtin_function_arguments): Handle
4943 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4944
e5e44252
AK
49452014-11-10 Andi Kleen <ak@linux.intel.com>
4946
4947 PR c/60804
4948 * c-common.h (check_no_cilk): Declare.
4949 * cilk.c (get_error_location): New function.
4950 (check_no_cilk): Dito.
4951
e64b984d
AK
49522014-11-10 Andi Kleen <ak@linux.intel.com>
4953
4954 * cilk.c (recognize_spawn): Use expression location
4955 for error message.
4956
13c21655
PC
49572014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4958
4959 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4960
42fd12b1
ESR
49612014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4962
4963 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4964 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4965 (__cpp_range_based_for, __cpp_initializer_lists,
4966 __cpp_delegating_constructors, __cpp_nsdmi,
4967 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4968 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4969 __has_cpp_attribute.
4970 * c-lex.c (cb_has_attribute): New callback CPP function;
4971 (init_c_lex): Set has_attribute callback.
4972
6f450181
RB
49732014-11-04 Richard Biener <rguenther@suse.de>
4974
4975 * c-common.c (shorten_compare): Do not shorten mixed
4976 DFP and non-DFP compares.
4977
26f0e1d6
ESR
49782014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4979
4980 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4981 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4982 Commentary and rearrangement of tests.
4983 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4984 Commentary and rearrangement of tests.
4985 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4986 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4987
ef4bddc2
RS
49882014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4989
4990 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4991 enum from machine_mode.
4992
c582198b
AM
49932014-10-28 Andrew MacLeod <amacleod@redhat.com>
4994
adfac8df
JJ
4995 * c-common.c: Adjust include files.
4996 * c-gimplify.c: Ditto.
4997 * cilk.c: Ditto.
4998 * c-pragma.c: Ditto.
4999 * c-ubsan.c: Ditto.
c582198b 5000
60393bbc
AM
50012014-10-27 Andrew MacLeod <amacleod@redhat.com>
5002
5003 * c-gimplify.c: Adjust include files.
5004
d723bb7c
MLI
50052014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5006
5007 PR c++/53061
5008 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5009 c_common_initialize_diagnostics.
5010 * c-common.h: Likewise.
5011
90f3520e
MP
50122014-10-24 Marek Polacek <polacek@redhat.com>
5013
5014 PR c/56980
5015 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5016 print "struct"/"union"/"enum" for typedefed names.
5017
59d7607a
MP
50182014-10-23 Marek Polacek <polacek@redhat.com>
5019
5020 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5021 in unsigned type.
5022
d95a2703
JJ
50232014-10-22 Jakub Jelinek <jakub@redhat.com>
5024 Yury Gribov <y.gribov@samsung.com>
5025
5026 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5027 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5028 instead of flag_sanitize_recover as bool flag.
5029
8e6ef852
KY
50302014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5031
5032 * cilk.c: Revert previous change.
5033
948cf550
IZ
50342014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5035
5036 PR c/63307
5037 * cilk.c: Include vec.h.
5038 (struct cilk_decls): New structure.
5039 (wrapper_parm_cb): Split this function to...
5040 (fill_decls_vec): ...this...
5041 (create_parm_list): ...and this.
5042 (compare_decls): New function.
5043 (for_local_cb): Remove.
5044 (wrapper_local_cb): Ditto.
5045 (build_wrapper_type): For now first traverse and fill vector of
5046 declarations then sort it and then deal with sorted vector.
5047 (cilk_outline): Ditto.
5048 (declare_one_free_variable): Ditto.
5049
92574c7c
MP
50502014-10-17 Marek Polacek <polacek@redhat.com>
5051
5052 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5053 * c.opt (Wimplicit-int): Initialize to -1.
5054
83685514
AM
50552014-10-16 Andrew MacLeod <amacleod@redhat.com>
5056
5057 * c-pragma.c: Adjust include files.
5058 * c-semantics.c: Likewise.
5059
5b8300ea
DD
50602014-10-16 DJ Delorie <dj@redhat.com>
5061
5062 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5063 multiples of bytes.
5064
5f83e90b
JM
50652014-10-14 Jason Merrill <jason@redhat.com>
5066
5067 PR c++/63455
5068 * c-common.h (CPP_PREPARSED_EXPR): New.
5069 (N_CP_TTYPES): Adjust.
5070
d73326ca
MP
50712014-10-15 Marek Polacek <polacek@redhat.com>
5072
5073 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5074
78a7c317
DD
50752014-10-14 DJ Delorie <dj@redhat.com>
5076
5077 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5078 types, not just __int128.
5079 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5080 types, not just __int128.
5081 (cpp_atomic_builtins): Round pointer sizes up.
5082 (type_suffix): Use type precision, not specific types.
5083 * c-common.c (c_common_reswords): Remove __int128 special case.
5084 (c_common_type_for_size): Check for all __intN types, not just
5085 __int128.
5086 (c_common_type_for_mode): Likewise.
5087 (c_common_signed_or_unsigned_type): Likewise.
5088 (c_build_bitfield_integer_type): Likewise.
5089 (c_common_nodes_and_builtins): Likewise.
5090 (keyword_begins_type_specifier): Likewise.
5091 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5092 __intN variants.
5093
2a22f99c
TS
50942014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5095
5096 * c-common.c: Use hash_table instead of hashtab.
5097
2a8ef767
ESR
50982014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5099
adfac8df 5100 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5101 C++11 section.
5102
3c9aabbd
MG
51032014-10-03 Marc Glisse <marc.glisse@inria.fr>
5104
5105 PR c++/54427
5106 PR c++/57198
5107 PR c++/58845
5108 * c-common.c (warn_logical_operator): Punt for vectors.
5109
a15f7cb8
ESR
51102014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5111
5112 Implement SD-6: SG10 Feature Test Recommendations
5113 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5114 macros and the __has_header macro.
5115
8d0cf15e
JM
51162014-09-30 Jason Merrill <jason@redhat.com>
5117
dd5d5481
JM
5118 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5119 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5120 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5121
b752325e
JM
5122 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5123 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5124
8d0cf15e
JM
5125 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5126 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5127
083e891e
MP
51282014-09-24 Marek Polacek <polacek@redhat.com>
5129
5130 PR c/61405
5131 PR c/53874
5132 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5133
7861b648
AK
51342014-09-23 Andi Kleen <ak@linux.intel.com>
5135
5136 * c-common.c (handle_no_reorder_attribute): New function.
5137 (c_common_attribute_table): Add no_reorder attribute.
5138
9a79452d
JM
51392014-09-22 Joseph Myers <joseph@codesourcery.com>
5140
5141 * c-cppbuiltin.c (c_cpp_builtins): Define
5142 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5143 modes.
5144
dd69f047
JM
51452014-09-18 Joseph Myers <joseph@codesourcery.com>
5146
5147 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5148 for supported floating-point modes.
5149
737a4826
MLI
51502014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5151
5152 * c.opt (Wpsabi): Use LangEnabledBy.
5153 * c-opts.c (c_common_handle_option): Do not handle here.
5154
8cc4b7a2
JM
51552014-09-12 Joseph Myers <joseph@codesourcery.com>
5156
5157 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5158 macros for floating-point modes.
5159
179b5a55
MG
51602014-09-11 Marc Glisse <marc.glisse@inria.fr>
5161
5162 PR target/58757
5163 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5164 __*_DENORM_MIN__ without denormals.
5165
570a11fe
JJ
51662014-09-10 Jakub Jelinek <jakub@redhat.com>
5167
5168 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5169 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5170 ubsan_create_data callers.
5171 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5172 index is constant or BIT_AND_EXPR with constant mask and is
5173 small enough for the bound.
5174 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5175 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5176
b559c810
MLI
51772014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5178
5179 * c.opt: Add CppReason to various flags.
5180 (Wdate-time): Re-sort.
5181 * c-common.c: Include c-common.h earlier.
5182 (struct reason_option_codes_t): Delete.
5183 (c_option_controlling_cpp_error): Prefix global type and struct
5184 with cpp_.
5185
1ef33fd4
MLI
51862014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5187
5188 * c.opt (Wnormalized): New.
5189 (Wnormalized=): Use Enum and Reject Negative.
5190 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5191
66bb34c0
JM
51922014-09-08 Joseph Myers <joseph@codesourcery.com>
5193
5194 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5195 digits of floating-point modes if -fbuilding-libgcc.
5196
53d68b9f
JM
51972014-09-05 Joseph Myers <joseph@codesourcery.com>
5198
5199 * c-cppbuiltin.c (c_cpp_builtins): Also define
5200 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5201 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5202 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5203 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5204 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5205 __LIBGCC_STACK_GROWS_DOWNWARD__,
5206 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5207 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5208 __LIBGCC_DWARF_FRAME_REGISTERS__,
5209 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5210 __LIBGCC_STACK_POINTER_REGNUM__ and
5211 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5212 (builtin_define_with_value): Handle backslash-escaping in string
5213 macro values.
5214
f65586dc
RB
52152014-09-05 Richard Biener <rguenther@suse.de>
5216
5217 PR middle-end/63148
5218 * c-format.c (check_format_arg): Properly handle
5219 effectively signed POINTER_PLUS_EXPR offset.
5220
2b71f4a4
MLI
52212014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5222
5223 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5224 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5225 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5226 and Init.
5227 * c-opts.c (c_common_handle_option): Do not handle here.
5228 (sanitize_cpp_opts): Likewise.
5229 * c-common.c (struct reason_option_codes_t): Handle
5230 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5231
d2e4feca
MP
52322014-09-03 Marek Polacek <polacek@redhat.com>
5233
5234 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5235
9a771876
JJ
52362014-09-02 Jakub Jelinek <jakub@redhat.com>
5237 Balaji V. Iyer <balaji.v.iyer@intel.com>
5238 Igor Zamyatin <igor.zamyatin@intel.com>
5239
5240 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5241 * c-common.c (c_common_reswords): Added _Cilk_for.
5242 * c-common.h (enum rid): Added RID_CILK_FOR.
5243 (cilk_for_number_of_iterations): Add declaration.
5244 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5245 CILK_FOR.
5246 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5247 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5248
81b5d104
MLI
52492014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5250
5251 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5252 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5253 Wundef): Use CPP, Var and Init.
5254 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5255
b753b37b
MLI
52562014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5257
5258 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5259 * c-opts.c (c_common_handle_option): Do not handle here.
5260
028aee17
JM
52612014-08-25 Jason Merrill <jason@redhat.com>
5262
5263 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5264 -std=c++14 and -std=gnu++14, rather than the reverse.
5265 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5266 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5267 * c-common.h (cxx_dialect): Remove cxx1y.
5268
e4276ba5
ESR
52692014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5270
5271 * c-common.h (enum cxx_dialect): Add cxx14.
5272 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5273 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5274 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5275
a545cacd
JM
52762014-08-22 Jason Merrill <jason@redhat.com>
5277
5278 * c.opt (std=gnu++17): Fix alias.
5279
59ea0364
MP
52802014-08-22 Marek Polacek <polacek@redhat.com>
5281
5282 PR c++/62199
5283 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5284 check for vector types. Drop LHS argument.
5285 * c-common.h (warn_logical_not_parentheses): Adjust.
5286
596e808c
MLI
52872014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5288
5289 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5290 (Wmultichar): Likewise.
5291 (Wdate-time): Use C-family languages instead of Common. Use CPP
5292 and Var.
5293 * c-opts.c (c_common_handle_option): Do not handle the above
5294 options here.
5295 (sanitize_cpp_opts): Likewise.
5296
18767f65
MLI
52972014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5298
5299 PR fortran/44054
5300 * c-opts.c: Include tree-diagnostics.h.
5301 (c_diagnostic_finalizer): New.
5302 (c_common_initialize_diagnostics): Use it.
5303
b4413594
MLI
53042014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5305
5306 PR preprocessor/51303
5307 * c-common.c (struct reason_option_codes_t option_codes):
5308 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5309
43f9a13c
MLI
53102014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5311
5312 PR c/60975
5313 PR c/53063
5314 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5315 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5316 (c_common_post_options): Call init_global_opts_from_cpp.
5317 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5318
04159acf
MP
53192014-08-19 Marek Polacek <polacek@redhat.com>
5320
5321 PR c++/62153
5322 * c-common.c (maybe_warn_bool_compare): New function.
5323 * c-common.h (maybe_warn_bool_compare): Declare.
5324 * c.opt (Wbool-compare): New option.
5325
35aff4fb
MP
53262014-08-19 Marek Polacek <polacek@redhat.com>
5327
5328 * c.opt (Wc99-c11-compat): New option.
5329
177cce46
MP
53302014-08-19 Marek Polacek <polacek@redhat.com>
5331
5332 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5333 to warn_c90_c99_compat.
5334 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5335 to -1.
5336
6ae9194f
MLI
53372014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5338 Steven Bosscher <steven@gcc.gnu.org>
5339
5340 PR c/52952
5341 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5342 format_check_results.
5343 (check_function_format): Use true and add comment for boolean
5344 argument.
5345 (finish_dollar_format_checking): Use explicit location when warning.
5346 (check_format_info): Likewise.
5347 (check_format_arg): Set extra_arg_loc and format_string_loc.
5348 (check_format_info_main): Use explicit location when warning.
5349 (check_format_types): Pass explicit location.
5350 (format_type_warning): Likewise.
5351
8e54f6d3
MLI
53522014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5353
5354 PR fortran/44054
5355 * c-format.c: Handle Fortran flags.
5356
cd4e76fc
IZ
53572014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5358
5359 PR other/61962
5360 * array-notation-common.c (find_rank): Added handling for other
5361 types of references.
5362
f3bede71
MP
53632014-08-10 Marek Polacek <polacek@redhat.com>
5364
5365 PR c/51849
5366 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5367 * c.opt (Wc90-c99-compat): Add option.
5368
9f25a338
TS
53692014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5370
5371 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5372
62e4eb35
MP
53732014-08-03 Marek Polacek <polacek@redhat.com>
5374
5375 * c-common.c (check_case_value): Add location_t parameter. Use it.
5376 (c_add_case_label): Pass loc to check_case_value.
5377
b787e7a2
TS
53782014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5379
5380 * cilk.c: Use hash_map instead of pointer_map.
5381
6e2830c3
TS
53822014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5383
5384 * c-gimplify.c: Use hash_set instead of pointer_set.
5385
a7ee52fb
IZ
53862014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5387
5388 PR middle-end/61455
5389 * array-notation-common.c (extract_array_notation_exprs): Handling
5390 of DECL_EXPR added.
5391
944fa280
JJ
53922014-08-01 Jakub Jelinek <jakub@redhat.com>
5393
5394 * c-common.h (min_align_of_type): Removed prototype.
5395 * c-common.c (min_align_of_type): Removed.
5396 * c-ubsan.h (ubsan_maybe_instrument_reference,
5397 ubsan_maybe_instrument_member_call): New prototypes.
5398 * c-ubsan.c: Include stor-layout.h and builtins.h.
5399 (ubsan_maybe_instrument_reference_or_call,
5400 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5401 functions.
5402
b4dfdc11
MG
54032014-07-31 Marc Glisse <marc.glisse@inria.fr>
5404
5405 PR c++/60517
5406 * c.opt (-Wreturn-local-addr): Move to common.opt.
5407
a41844e5
JM
54082014-07-30 Jason Merrill <jason@redhat.com>
5409
5410 PR c++/61659
5411 PR c++/61687
5412 Revert:
5413 * c.opt (-fuse-all-virtuals): New.
5414
976d5a22
TT
54152014-07-30 Tom Tromey <tromey@redhat.com>
5416
5417 PR c/59855
5418 * c.opt (Wdesignated-init): New option.
5419 * c-common.c (c_common_attribute_table): Add "designated_init".
5420 (handle_designated_init): New function.
5421
cdc94aca
MP
54222014-07-24 Marek Polacek <polacek@redhat.com>
5423
5424 PR c/57653
5425 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5426
f41373b6
DS
54272014-07-16 Dodji Seketeli <dodji@redhat.com>
5428
5429 PR preprocessor/60723 - missing system-ness marks for macro tokens
5430 * c-ppoutput.c (struct print::prev_was_system_token): New data
5431 member.
5432 (init_pp_output): Initialize it.
5433 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5434 (do_line_change): Return a flag saying if a line marker was
5435 emitted or not.
5436 (scan_translation_unit): Detect if the system-ness of the token we
5437 are about to emit is different from the one of the previously
5438 emitted token. If so, emit a line marker. Avoid emitting useless
5439 adjacent line markers. Avoid emitting line markers for tokens
5440 originating from the expansion of built-in macros.
5441 (scan_translation_unit_directives_only): Adjust.
5442
4d661eaa
MP
54432014-07-15 Marek Polacek <polacek@redhat.com>
5444
5445 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5446 TYPE_MAX_VALUE is NULL.
5447
b108f48f
JJ
54482014-07-14 Jakub Jelinek <jakub@redhat.com>
5449
5450 PR middle-end/61294
5451 * c.opt (Wmemset-transposed-args): New warning.
5452
c0221884
JM
54532014-07-10 Jason Merrill <jason@redhat.com>
5454
5455 PR c++/61659
5456 PR c++/61687
5457 * c.opt (-fuse-all-virtuals): New.
5458
63dfbb95
RB
54592014-07-09 Richard Biener <rguenther@suse.de>
5460
5461 PR c-family/61741
5462 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5463 using unsigned arithmetic if overflow does not wrap instead of
5464 if overflow is undefined.
5465
773ec47f
MP
54662014-07-06 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/6940
5469 * c.opt (Wsizeof-array-argument): New option.
5470
00a7ba58
JJ
54712014-07-03 Jakub Jelinek <jakub@redhat.com>
5472
b1726d6c 5473 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
5474 comments->count <= 1, as comments->entries might be NULL.
5475
52ec0ea3
MP
54762014-07-01 Marek Polacek <polacek@redhat.com>
5477
5478 * c.opt (Wint-conversion): New option.
5479
d5c3d343
MP
54802014-07-01 Marek Polacek <polacek@redhat.com>
5481
5482 PR c/58286
5483 * c.opt (Wincompatible-pointer-types): New option.
5484
6e7ceb17
PC
54852014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5486
5487 PR c++/51400
5488 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5489 Do not discard TYPE_QUALS of type.
5490
da73100b
JM
54912014-06-26 Jason Merrill <jason@redhat.com>
5492
5493 * c-common.h (enum cxx_dialect): Add cxx1z.
5494 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5495 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5496
08eedf75
TJ
54972014-06-26 Teresa Johnson <tejohnson@google.com>
5498
5499 * c-common.h (get_dump_info): Declare.
5500 * c-gimplify.c (c_genericize): Use saved dump files.
5501 * c-opts.c (c_common_parse_file): Begin and end dumps
5502 once around parsing invocation.
5503 (get_dump_info): New function.
5504
7b56b2f8
MP
55052014-06-23 Marek Polacek <polacek@redhat.com>
5506 Andrew MacLeod <amacleod@redhat.com>
5507
5508 PR c/61553
5509 * c-common.c (get_atomic_generic_size): Don't segfault if the
5510 type doesn't have a size.
5511
0e37a2f3
MP
55122014-06-20 Marek Polacek <polacek@redhat.com>
5513
5514 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5515 (ubsan_walk_array_refs_r): New function.
5516 (c_genericize): Instrument array bounds.
5517 * c-ubsan.c: Include "internal-fn.h".
5518 (ubsan_instrument_division): Mark instrumented arrays as having
5519 side effects. Adjust ubsan_type_descriptor call.
5520 (ubsan_instrument_shift): Likewise.
5521 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5522 (ubsan_instrument_bounds): New function.
5523 (ubsan_array_ref_instrumented_p): New function.
5524 (ubsan_maybe_instrument_array_ref): New function.
5525 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5526 (ubsan_array_ref_instrumented_p): Declare.
5527 (ubsan_maybe_instrument_array_ref): Declare.
5528
55292014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
5530
5531 PR lto/61123
5532 * c.opt (fshort-enums): Add to LTO.
5533 * c.opt (fshort-wchar): Likewise.
5534
5c3d09f7
MP
55352014-06-16 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/60439
5538 * c.opt (Wswitch-bool): Add Var.
5539
9cf32741
JJ
55402014-06-12 Jakub Jelinek <jakub@redhat.com>
5541
5542 PR middle-end/61486
5543 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
5544 #pragma omp target teams or
5545 #pragma omp {,target }teams distribute simd.
5546
62984918
JM
55472014-06-12 Jason Merrill <jason@redhat.com>
5548
5549 * c.opt (Wabi=, fabi-compat-version): New.
5550 * c-opts.c (c_common_handle_option): Handle -Wabi=.
5551 (c_common_post_options): Handle flag_abi_compat_version default.
5552 Disallow -fabi-compat-version=1.
5553 * c-common.h (abi_version_crosses): New.
5554
f961457f
JH
55552014-06-11 Jan Hubicka <hubicka@ucw.cz>
5556
adfac8df 5557 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
5558 section names that are no longer trees.
5559
92d28cbb
JJ
55602014-06-10 Jakub Jelinek <jakub@redhat.com>
5561
5562 PR fortran/60928
5563 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
5564 (omp_pragmas): ... back here.
5565
742938c9
MP
55662014-06-05 Marek Polacek <polacek@redhat.com>
5567
5568 PR c/49706
5569 * c-common.c (warn_logical_not_parentheses): New function.
5570 * c-common.h (warn_logical_not_parentheses): Declare.
5571 * c.opt (Wlogical-not-parentheses): New option.
5572
9d548dfb
MP
55732014-06-04 Marek Polacek <polacek@redhat.com>
5574
5575 PR c/30020
5576 * c-common.c (check_case_bounds): Add location parameter.
5577 Use it.
5578 (c_add_case_label): Pass loc to check_case_bounds.
5579
fedfecef
MP
55802014-06-03 Marek Polacek <polacek@redhat.com>
5581
5582 PR c/60439
5583 * c.opt (Wswitch-bool): New option.
5584
f6a7cffc
TS
55852014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5586
040d18b6
TS
5587 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
5588 Remove prototypes.
5589 (record_types_used_by_current_var_decl): Move prototype to where
5590 it belongs.
5591
f6a7cffc
TS
5592 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5593 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5594 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5595
632f2871
RS
55962014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
5597
5598 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
5599 * c-common.c (c_common_nodes_and_builtins): Don't initialize
5600 void_zero_node.
5601 * c-pretty-print.c (pp_c_void_constant): New function.
5602 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
5603 (c_pretty_printer::expression): Handle VOID_CST.
5604 * cilk.c (extract_free_variables): Likewise.
5605 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
5606 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
5607
766090c2
TS
56082014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5609
5610 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
5611 * c-pragma.c (push_alignment): Adjust.
5612 (handle_pragma_push_options): Likewise.
5613
661a0813
MP
56142014-05-09 Marek Polacek <polacek@redhat.com>
5615
5616 PR c/50459
5617 * c-common.c (check_user_alignment): Return -1 if alignment is error
5618 node.
5619 (handle_aligned_attribute): Don't call default_conversion on
5620 FUNCTION_DECLs.
5621 (handle_vector_size_attribute): Likewise.
5622 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
5623 (handle_sentinel_attribute): Call default_conversion and allow even
5624 integral types as an argument.
5625
2793eeab
MP
56262014-05-08 Marek Polacek <polacek@redhat.com>
5627
5628 PR c/61053
5629 * c-common.c (min_align_of_type): New function factored out from...
5630 (c_sizeof_or_alignof_type): ...here.
5631 * c-common.h (min_align_of_type): Declare.
5632
f827930a
MP
56332014-05-08 Marek Polacek <polacek@redhat.com>
5634
5635 PR c/61077
5636 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
5637 parameter type of main.
5638
ca49b74e
DD
56392014-05-07 DJ Delorie <dj@redhat.com>
5640
5641 * c-cppbuiltin.c (print_bits_of_hex): New.
5642 (builtin_define_type_minmax): Print values using hex so as not to
5643 require a pre-computed list of string values.
5644
1d60af08
KZ
56452014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5646 Mike Stump <mikestump@comcast.net>
5647 Richard Sandiford <rdsandiford@googlemail.com>
5648
5649 * c-ada-spec.c: Include wide-int.h.
5650 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
5651 (dump_generic_ada_node): Use wide-int interfaces.
5652 * c-common.c: Include wide-int-print.h.
5653 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
5654 (pointer_int_sum): Use wide-int interfaces.
5655 (c_common_nodes_and_builtins): Use make_int_cst.
5656 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
5657 (handle_alloc_size_attribute): Use wide-int interfaces.
5658 (get_nonnull_operand): Likewise.
5659 * c-format.c (get_constant): Use tree_fits_uhwi_p.
5660 * c-lex.c: Include wide-int.h.
5661 (narrowest_unsigned_type): Take a widest_int rather than two
5662 HOST_WIDE_INTs.
5663 (narrowest_signed_type): Likewise.
5664 (interpret_integer): Update accordingly. Use wide-int interfaces.
5665 (lex_charconst): Use wide-int interfaces.
5666 * c-pretty-print.c: Include wide-int.h.
5667 (pp_c_integer_constant): Use wide-int interfaces.
5668 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
5669 INT_CST_LT_UNSIGNED.
5670
b15458be
RB
56712014-05-06 Richard Biener <rguenther@suse.de>
5672
5673 * c-opts.c (c_common_post_options): For -freestanding,
5674 -fno-hosted and -fno-builtin disable pattern recognition
5675 if not enabled explicitely.
5676
6577374e
MP
56772014-05-02 Marek Polacek <polacek@redhat.com>
5678
5679 * c.opt (Wsizeof-pointer-memaccess): Describe option.
5680
d00887e8
MP
56812014-05-01 Marek Polacek <polacek@redhat.com>
5682
5683 PR c/43245
5684 * c.opt (Wdiscarded-qualifiers): Add.
5685
f8ed5150
MP
56862014-04-30 Marek Polacek <polacek@redhat.com>
5687
5688 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
5689 INT_MIN / -1 sanitization only for integer types.
5690
45484dcf
MP
56912014-04-25 Marek Polacek <polacek@redhat.com>
5692
5693 PR c/18079
5694 * c-common.c (handle_noinline_attribute): Warn if the attribute
5695 conflicts with always_inline attribute.
5696 (handle_always_inline_attribute): Warn if the attribute conflicts
5697 with noinline attribute.
5698
38e514c0
MP
56992014-04-25 Marek Polacek <polacek@redhat.com>
5700
5701 PR c/60156
5702 * c-common.c (check_main_parameter_types): Warn about variadic main.
5703
44875f92
MS
57042014-04-24 Mike Stump <mikestump@comcast.net>
5705
5706 * c.opt (Wshadow-ivar): Default to on.
5707
dcaaa5a0
DP
57082014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
5709
5710 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
5711
c07d7c02
MP
57122014-04-23 Marek Polacek <polacek@redhat.com>
5713
5714 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
5715
1c33c9b7
JJ
57162014-04-22 Jakub Jelinek <jakub@redhat.com>
5717
5718 PR sanitizer/60275
5719 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
5720 if flag_sanitize_undefined_trap_on_error.
5721 (ubsan_instrument_division, ubsan_instrument_shift,
5722 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
5723 if !flag_sanitize_recover.
5724
793c625f
MG
57252014-04-22 Marc Glisse <marc.glisse@inria.fr>
5726
5727 PR libstdc++/43622
5728 * c-common.c (registered_builtin_types): Make non-static.
5729 * c-common.h (registered_builtin_types): Declare.
5730
b0f1bf36
RB
57312014-04-14 Richard Biener <rguenther@suse.de>
5732 Marc Glisse <marc.glisse@inria.fr>
5733
5734 PR c/60819
5735 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
5736 apply may-alias the scalar pointer type when applicable.
5737
3b07fa4a
IZ
57382014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
5739
5740 PR middle-end/60467
5741 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
5742 as possible argument for Cilk_spawn.
5743
cbbd2b1c
TB
57442014-04-11 Tobias Burnus <burnus@net-b.de>
5745
5746 PR c/60194
5747 * c.opt (Wformat-signedness): Add
5748 * c-format.c(check_format_types): Use it.
5749
6415bd5d
JM
57502014-04-11 Jason Merrill <jason@redhat.com>
5751
5752 PR c++/57926
5753 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
5754 default_conversion for an array argument.
5755
6525783a
MP
57562014-04-08 Marek Polacek <polacek@redhat.com>
5757
5758 PR sanitizer/60745
5759 * c-ubsan.c: Include asan.h.
5760 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
5761
880a467b
NS
57622014-04-03 Nathan Sidwell <nathan@codesourcery.com>
5763
5764 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
5765
7b59ff2d
MP
57662014-04-02 Marek Polacek <polacek@redhat.com>
5767
5768 * c-common.h (c_expand_expr): Remove declaration.
5769
8edbfaa6
JJ
57702014-03-28 Jakub Jelinek <jakub@redhat.com>
5771
5772 PR c++/60689
5773 * c-common.c (add_atomic_size_parameter): When creating new
5774 params vector, push the size argument first.
5775
07d72e1d
JJ
57762014-03-26 Jakub Jelinek <jakub@redhat.com>
5777
5778 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5779 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5780 ubsan_create_data callers.
5781
b35e0fa0
JJ
57822014-03-22 Jakub Jelinek <jakub@redhat.com>
5783
5784 PR debug/60603
5785 * c-opts.c (c_finish_options): Restore cb_file_change call to
5786 <built-in>.
5787
39a1ebb3
JJ
57882014-03-13 Jakub Jelinek <jakub@redhat.com>
5789
5790 PR middle-end/36282
5791 * c-pragma.c (apply_pragma_weak): Only look at
5792 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
5793 DECL_ASSEMBLER_NAME_SET_P (decl).
5794 (maybe_apply_pending_pragma_weaks): Exit early if
5795 vec_safe_is_empty (pending_weaks) rather than only when
5796 !pending_weaks.
5797 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
5798 set assembler name back to NULL afterwards.
5799
a07f6ed2
JM
58002014-03-11 Jason Merrill <jason@redhat.com>
5801
5802 * c.opt: Add -std=gnu++14.
5803
75b107f5
IB
58042014-03-11 Ian Bolton <ian.bolton@arm.com>
5805
5806 * c-opts.c (c_common_post_options): Don't override
5807 -ffp-contract=fast if unsafe-math-optimizations is on.
5808
f42c637e
PM
58092014-03-08 Paulo Matos <paulo@matos-sorge.com>
5810
22b15758 5811 * c.opt: Enable LTO FE for fshort-double.
f42c637e 5812
70e24808
JM
58132014-03-07 Jason Merrill <jason@redhat.com>
5814
5815 * c.opt: Add -std=c++14.
5816
3af9c5e9
MP
58172014-03-06 Marek Polacek <polacek@redhat.com>
5818
5819 PR c/60197
5820 * cilk.c (contains_cilk_spawn_stmt): New function.
5821 (contains_cilk_spawn_stmt_walker): Likewise.
5822 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
5823 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
5824
b3bdf019
JJ
58252014-03-03 Jakub Jelinek <jakub@redhat.com>
5826
5827 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
5828 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
5829 even when flag_preprocess_only.
5830
ca7e759d
JM
58312014-02-26 Jason Merrill <jason@redhat.com>
5832
5833 PR c++/59231
5834 PR c++/11586
5835 * c-common.c (shorten_compare): Don't check
5836 c_inhibit_evaluation_warnings.
5837
28e41874
JJ
58382014-02-19 Jakub Jelinek <jakub@redhat.com>
5839
cca615af
JJ
5840 PR c/37743
5841 * c-common.c (c_common_nodes_and_builtins): When initializing
5842 c_uint{16,32,64}_type_node, also set corresponding
5843 uint{16,32,64}_type_node to the same value.
5844
28e41874
JJ
5845 PR c++/60267
5846 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
5847 for PRAGMA_IVDEP if flag_preprocess_only.
5848
c2bf53a1
JJ
58492014-02-12 Jakub Jelinek <jakub@redhat.com>
5850
5851 PR c/60101
5852 * c-common.c (merge_tlist): If copy is true, call new_tlist,
5853 if false, add ADD itself, rather than vice versa.
5854 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
5855 copy. For SAVE_EXPR, only call merge_tlist once.
5856
8fcbce72
JJ
58572014-02-08 Jakub Jelinek <jakub@redhat.com>
5858
5859 PR middle-end/60092
5860 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
5861 and tree_to_uhwi.
5862 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
5863 functions.
5864 (c_common_attribute_table): Add alloc_align and assume_aligned
5865 attributes.
5866
0a756a3f
MP
58672014-02-06 Marek Polacek <polacek@redhat.com>
5868
5869 PR c/60087
5870 * c-common.c (warn_for_sign_compare): Call warning_at with location
5871 instead of warning.
5872
7ec4847a
MP
58732014-02-05 Marek Polacek <polacek@redhat.com>
5874
5875 PR c/53123
5876 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
5877 statement.
5878
66f20604
MP
58792014-02-04 Marek Polacek <polacek@redhat.com>
5880
5881 PR c/60036
5882 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
5883 SAVE_EXPR.
5884
5d77fb19
MG
58852014-02-03 Marc Glisse <marc.glisse@inria.fr>
5886
5887 PR c++/53017
5888 PR c++/59211
5889 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
5890 handle_vector_size_attribute, handle_nonnull_attribute): Call
5891 default_conversion on the attribute argument.
5892 (handle_nonnull_attribute): Increment the argument number.
5893
81e5eca8
MP
58942014-01-31 Marek Polacek <polacek@redhat.com>
5895
5896 PR c/59963
5897 * c-common.c (add_atomic_size_parameter): Pass vNULL to
5898 build_function_call_vec.
5899 (resolve_overloaded_builtin): Likewise.
5900 * c-common.h (build_function_call_vec): Adjust declaration.
5901
68fca595
MP
59022014-01-30 Marek Polacek <polacek@redhat.com>
5903
5904 PR c/59940
5905 * c-common.h (unsafe_conversion_p): Adjust declaration.
5906 (warnings_for_convert_and_check): Likewise.
5907 (convert_and_check): Likewise.
5908 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5909 expansion_point_location_if_in_system_header on it.
5910 (warnings_for_convert_and_check): Add location parameter. Call
5911 expansion_point_location_if_in_system_header on it. Use it.
5912 (convert_and_check): Add location parameter. Use it.
5913 (conversion_warning): Likewise.
5914 (c_add_case_label): Adjust convert_and_check calls.
5915 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5916
b72271b9
BI
59172014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5918
5919 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5920 flag_cilkplus.
5921 * c-pragma.c (init_pragma): Likewise.
5922 * c.opt: Likewise.
5923
393e8e8b
MP
59242014-01-23 Marek Polacek <polacek@redhat.com>
5925
5926 PR c/59846
5927 * c-common.c (shorten_compare): Add location_t parameter.
5928 * c-common.h (shorten_binary_op): Adjust declaration.
5929
f04dda30
MP
59302014-01-23 Marek Polacek <polacek@redhat.com>
5931
5932 PR c/58346
5933 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5934 * c-common.h: Declare it.
5935
621955cb
EB
59362014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5937
5938 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5939 * c-ada-spec.c (dump_ads): Likewise.
5940 (cpp_check): Likewise.
5941 (dump_ada_specs): Likewise.
5942
59432014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
5944
5945 PR c++/49718
5946 * c-common.c (handle_no_instrument_function_attribute): Allow
5947 no_instrument_function attribute in class member
5948 definition/declaration.
5949
241f845a
JJ
59502014-01-15 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR c/58943
5953 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5954 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5955 being COMPOUND_EXPR.
5956 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5957 operand a SAVE_EXPR and second MODIFY_EXPR.
5958
e83b8e2e
JJ
59592014-01-09 Jakub Jelinek <jakub@redhat.com>
5960
5961 PR target/58115
5962 * c-pch.c (c_common_write_pch): Call
5963 prepare_target_option_nodes_for_pch.
5964
23a5b65a
RS
59652014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5966
5967 Update copyright years
5968
f9030485
RS
59692014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5970
5971 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5972 the copyright notice.
5973
f2aa696b
EB
59742013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5975
5976 * c-ada-spec.c (print_constructor): New function.
5977 (print_destructor): Retrieve the origin of the destructor.
5978 (print_ada_declaration): Revamp handling of constructors/destructors.
5979
3f8257db 59802013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
5981 Bill Maddox <maddox@google.com>
5982 Jason Merrill <jason@redhat.com>
5983
5984 * c.opt: Add -fdeclone-ctor-dtor.
5985 * c-opts.c (c_common_post_options): Default to on iff -Os.
5986
41958c28
BI
59872013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5988
5989 * c-common.c (c_common_attribute_table): Added "cilk simd function"
5990 attribute.
5991 * c-pragma.h (enum pragma_cilk_clause): Remove.
5992 (enum pragma_omp_clause): Added the following fields:
5993 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5994 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5995 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5996 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5997 PRAGMA_CILK_CLAUSE_UNIFORM.
5998
b1726d6c 5999
12893402
BI
60002013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6001
6002 * cilk.c (cilk_outline): Made this function non-static.
6003 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6004 (create_cilk_wrapper): Added a new parameter: a function pointer.
6005 (c_install_body_w_frame_cleanup): Remove
6006 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6007 * c-common.h (cilk_outline): New prototype.
6008 (gimplify_cilk_spawn): Removed two parameters.
6009 (cilk_install_body_with_frame_cleanup): New prototype.
6010 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6011 CILK_SPAWN_STMT case.
6012
085b42ed
BS
60132013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6014
2ce064c3
BS
6015 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6016
085b42ed
BS
6017 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6018 (int_array_type_node): Remove.
6019 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6020
9e36c9ed
MP
60212013-12-05 Marek Polacek <polacek@redhat.com>
6022
6023 PR c/52023
6024 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6025 [ADJUST_FIELD_ALIGN].
6026
296674db
JM
60272013-12-04 Joseph Myers <joseph@codesourcery.com>
6028
6029 PR c/52023
6030 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6031 and check field alignment if set.
6032 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6033 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6034
b1726d6c 60352013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6036 Marek Polacek <polacek@redhat.com>
6037
6038 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6039 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6040
d7947e19
L
60412013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6042
6043 PR c/59309
6044 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6045 arguments.
6046
fad7652e
JJ
60472013-11-29 Jakub Jelinek <jakub@redhat.com>
6048
6049 PR c/59280
6050 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6051 goto invalid. If it is error_mark_node, don't issue further
6052 diagnostics.
6053
8b5e1202
SO
60542013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6055
6056 * c.opt (Wopenmp-simd): New.
6057
0a508bb6
JJ
60582013-11-22 Jakub Jelinek <jakub@redhat.com>
6059
6060 * c-ubsan.h (ubsan_instrument_return): New prototype.
6061 * c-ubsan.c (ubsan_instrument_return): New function.
6062
2fb9a547
AM
60632013-11-22 Andrew MacLeod <amacleod@redhat.com>
6064
6065 * c-common.c: Add required include files from gimple.h.
6066 * c-gimplify.c: Likewise
6067 * cilk.c: Likewise
6068
8400e75e
DM
60692013-11-22 David Malcolm <dmalcolm@redhat.com>
6070
6071 * c-common.c (unsafe_conversion_p): Remove use of
6072 EXPR_LOC_OR_HERE macro.
6073 (conversion_warning): Likewise.
6074 (warnings_for_convert_and_check): Likewise.
6075 (warn_for_collisions_1): Likewise.
6076 (shorten_compare): Likewise, and remove use of in_system_header
6077 macro, using the location from the former.
6078 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6079 (cb_def_pragma): Remove use of in_system_header macro.
6080 (lex_string): Likewise.
6081 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6082
eb1ce453
KZ
60832013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6084 Mike Stump <mikestump@comcast.net>
6085 Richard Sandiford <rdsandiford@googlemail.com>
6086
6087 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6088 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6089 tree_fits_shwi_p or tree_fits_uhwi_p.
6090 (dump_generic_ada_node): Likewise.
6091 * c-format.c (check_format_arg): Likewise.
6092 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6093
6b3b8c27
KZ
60942013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6095
6096 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6097
49b0aa18
JC
60982013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6099
6100 PR c/53001
6101 * c-common.c (unsafe_conversion_p): Make this function
6102 return an enumeration with more detail.
6103 (conversion_warning): Use the new return type of
6104 unsafe_conversion_p to separately warn either about conversions
6105 that lower floating point number precision or about the other
6106 kinds of conversions.
6107 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6108 (unsafe_conversion_p): switching return type to
6109 conversion_safety enumeration.
49b0aa18
JC
6110 * c.opt: Adding new warning -Wfloat-conversion and
6111 enabling it with -Wconversion.
6112
b826515a
BS
61132013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6114
8e745a17
JJ
6115 * c-opts.c: Include plugin.h.
6116 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6117
b9a55b13
MP
61182013-11-19 Marek Polacek <polacek@redhat.com>
6119
6120 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6121 call.
6122 (ubsan_instrument_shift): Likewise.
6123 (ubsan_instrument_vla): Likewise.
6124
7d362f6c
RS
61252013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6126
6127 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6128 cast to unsigned type.
6129
386b1f1f
RS
61302013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6131
6132 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6133 tree_low_cst.
6134 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6135 rather than tree_low_cst.
6136
ae7e9ddd
RS
61372013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6138
6139 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6140 tree_to_uhwi throughout.
6141
9439e9a1
RS
61422013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6143
6144 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6145 tree_low_cst (..., 0) with tree_to_shwi throughout.
6146
cc269bb6
RS
61472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6148
6149 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6150 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6151
9541ffee
RS
61522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6153
6154 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6155 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6156
c02065fc
AH
61572013-11-15 Aldy Hernandez <aldyh@redhat.com>
6158
6159 * c-cilkplus.c: New file.
6160 * c-common.c (readonly_error): Add location argument.
6161 * c-common.h (readonly_error): Same.
6162 (c_finish_cilk_clauses): Protoize.
6163 (c_check_cilk_loop): Same.
6164 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6165 Do not fail on error_mark_node.
6166 Abstract increment canonicalization to here...
6167 (c_omp_for_incr_canonicalize_ptr): New.
6168 c-pragma.c (init_pragma): Register "simd" pragma.
6169 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6170 (enum pragma_cilk_clause): New.
6171
9cc65f15
RS
61722013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6173
6174 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6175 wchar_type and host_integerp checks.
6176
18f429e2
AM
61772013-11-14 Andrew MacLeod <amacleod@redhat.com>
6178
6179 * c-common.c: Likewise.
6180 * c-gimplify.c: Likewise.
6181 * cilk.c: Likewise.
6182
d8a2d370
DN
61832013-11-14 Diego Novillo <dnovillo@google.com>
6184
6185 * c-common.c: Include fold-const.h.
6186 Include stor-layout.h.
6187 Include calls.h.
6188 Include stringpool.h.
6189 Include attribs.h.
6190 Include varasm.h.
6191 Include trans-mem.h.
6192 * c-cppbuiltin.c: Include stor-layout.h.
6193 Include stringpool.h.
6194 * c-format.c: Include stringpool.h.
6195 * c-lex.c: Include stringpool.h.
6196 Include stor-layout.h.
6197 * c-pragma.c: Include stringpool.h.
6198 Include attribs.h.
6199 Include varasm.h.
6200 Include gcc-symtab.h.
6201 * c-pretty-print.c: Include stor-layout.h.
6202 Include attribs.h.
6203 * cilk.c: Include stringpool.h.
6204 Include calls.h.
6205
38b7bc7f
JM
62062013-11-13 Joseph Myers <joseph@codesourcery.com>
6207
6208 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6209 * c-common.c (c_common_reswords): Add __auto_type.
6210 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6211
45b0be94
AM
62122013-11-12 Andrew MacLeod <amacleod@redhat.com>
6213
18f429e2
AM
6214 * c-common.c: Include gimplify.h.
6215 * c-gimplify.c: Likewise.
6216 * cilk.c: Likewise.
6217 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6218 * c-ubsan.c: Don't include gimple.h.
45b0be94 6219
582d9b50
JM
62202013-11-12 Joseph Myers <joseph@codesourcery.com>
6221
6222 * c-common.c (c_common_reswords): Add _Thread_local.
6223
6b28e197
JM
62242013-11-09 Joseph Myers <joseph@codesourcery.com>
6225
6226 * c-common.c (atomic_size_supported_p): New function.
6227 (resolve_overloaded_atomic_exchange)
6228 (resolve_overloaded_atomic_compare_exchange)
6229 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6230 Use it instead of comparing size with a local list of sizes.
6231
267bac10
JM
62322013-11-07 Andrew MacLeod <amacleod@redhat.com>
6233 Joseph Myers <joseph@codesourcery.com>
6234
6235 * c-common.h (enum rid): Add RID_ATOMIC.
6236 * c-common.c (c_common_reswords): Add _Atomic.
6237 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6238 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6239 * c-format.c (check_format_types): Check for extra _Atomic
6240 qualifiers in format argument.
6241 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6242 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6243
5157b91e
TB
62442013-11-06 Tobias Burnus <burnus@net-b.de>
6245
6246 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6247
6dbe0958
JM
62482013-11-06 Joseph Myers <joseph@codesourcery.com>
6249
6250 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6251 standards modes.
6252 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6253 to mean lack of IEEE 754 support.
6254
e8ff5196
TB
62552013-11-05 Tobias Burnus <burnus@net-b.de>
6256
6257 * c.opt (-Wdate-time): New option
6258 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6259
254a0760
JM
62602013-11-05 Joseph Myers <joseph@codesourcery.com>
6261
6262 * c-cppbuiltin.c (cpp_iec_559_value): Test
6263 flag_excess_precision_cmdline not flag_excess_precision.
6264
6d7f7e0a
TB
62652013-11-05 Tobias Burnus <burnus@net-b.de>
6266
6267 * c.opt (fopenmp-simd): New option.
6268 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6269 (omp_pragmas): ... this new struct.
6270 (c_pp_lookup_pragma): Also walk omp_pragmas.
6271 (init_pragma): Init pragmas for -fopenmp-simd.
6272
55a7f02f
MP
62732013-11-04 Marek Polacek <polacek@redhat.com>
6274
6275 PR c++/58979
6276 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6277
9193fb05
JM
62782013-11-04 Joseph Myers <joseph@codesourcery.com>
6279
6280 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6281 New functions.
6282 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6283
94159ecf
EB
62842013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6285
6286 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6287 (dump_ada_specs): Adjust prototype of second callback.
6288 * c-ada-spec.c (cpp_check): New global variable.
6289 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6290 (print_generic_ada_decl): Likewise.
6291 (has_static_fields): Change return type to bool and add guard.
6292 (has_nontrivial_methods): New predicate.
6293 (is_tagged_type): Change return type to bool.
6294 (separate_class_package): Call has_nontrivial_methods.
6295 (pp_ada_tree_identifier): Minor tweaks.
6296 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6297 (dump_ada_array_domains): Likewise.
6298 (dump_ada_array_type): Likewise.
6299 (dump_template_types): Remove cpp_check parameter and do not pass it to
6300 dump_generic_ada_node.
6301 (dump_ada_template): Likewise.
6302 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6303 recursively.
6304 (print_ada_methods): Change return type to integer. Remove cpp_check
6305 parameter and do not pass it down.
6306 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6307 dump_generic_ada_node.
6308 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6309 accessing methods.
6310 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6311 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6312 value of print_ada_methods.
6313 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6314 Set cpp_check to it before invoking dump_ada_nodes.
6315 (dump_ada_specs): Likewise.
6316
b906f4ca
MP
63172013-11-03 Marek Polacek <polacek@redhat.com>
6318
6319 * c-ubsan.c: Don't include hash-table.h.
6320 (ubsan_instrument_vla): New function.
6321 * c-ubsan.h: Declare it.
6322
5e20cdc9
DM
63232013-10-31 David Malcolm <dmalcolm@redhat.com>
6324
6325 Automated part of renaming of symtab_node_base to symtab_node.
6326
6327 Patch autogenerated by rename_symtab.py from
6328 https://github.com/davidmalcolm/gcc-refactoring-scripts
6329 revision 58bb219cc090b2f4516a9297d868c245495ee622
6330
6331 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6332 symtab_node_base to symtab_node.
6333
7057e645
ESR
63342013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6335
8e745a17 6336 Implement C++14 digit separators.
7057e645
ESR
6337 * c-lex.c (interpret_float): Remove digit separators from scratch string
6338 before building real literal.
6339
193ea7bc
JJ
63402013-10-30 Jakub Jelinek <jakub@redhat.com>
6341
6342 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6343
939b37da
BI
63442013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6345
6346 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6347 fields.
6348 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6349 enabled.
6350 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6351 (insert_cilk_frame): New prototype.
6352 (cilk_init_builtins): Likewise.
6353 (gimplify_cilk_spawn): Likewise.
6354 (c_cilk_install_body_w_frame_cleanup): Likewise.
6355 (cilk_detect_spawn_and_unwrap): Likewise.
6356 (cilk_set_spawn_marker): Likewise.
6357 (build_cilk_sync): Likewise.
6358 (build_cilk_spawn): Likewise.
6359 * cilk.c: New file.
6360
67348ccc
DM
63612013-10-29 David Malcolm <dmalcolm@redhat.com>
6362
6363 Patch autogenerated by refactor_symtab.py from
6364 https://github.com/davidmalcolm/gcc-refactoring-scripts
6365 revision 58bb219cc090b2f4516a9297d868c245495ee622
6366
6367 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6368 to a true class hierarchy.
6369 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6370
d570872d
RS
63712013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6372
6373 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6374
98906124
JL
63752013-10-26 Jeff Law <law@redhat.com>
6376
adfac8df
JJ
6377 * c-common.c (c_define_builtins): Remove mudflap support.
6378 * c.opt: Ignore and warn for mudflap options.
98906124 6379
d73749df 63802013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6381
6382 PR other/33426
6383 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6384 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6385
3f04b1bb
JM
63862013-10-23 Jason Merrill <jason@redhat.com>
6387
6388 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6389
acf0174b
JJ
63902013-10-11 Jakub Jelinek <jakub@redhat.com>
6391
acd15a28
JJ
6392 * c-common.h (omp_clause_mask::operator !=): New method.
6393 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6394 instead of if (mask & something) tests everywhere.
6395
acf0174b
JJ
6396 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6397 201307 instead of 201107.
6398 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6399 (c_common_attribute_table): Add "omp declare target" and
6400 "omp declare simd" attributes.
6401 (handle_omp_declare_target_attribute,
6402 handle_omp_declare_simd_attribute): New functions.
6403 * c-omp.c: Include c-pragma.h.
6404 (c_finish_omp_taskgroup): New function.
6405 (c_finish_omp_atomic): Add swapped argument, if true,
6406 build the operation first with rhs, lhs arguments and use NOP_EXPR
6407 build_modify_expr.
6408 (c_finish_omp_for): Add code argument, pass it down to make_code.
6409 (c_omp_split_clauses): New function.
6410 (c_split_parallel_clauses): Removed.
6411 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6412 c_omp_declare_simd_clauses_to_decls): New functions.
6413 * c-common.h (omp_clause_mask): New type.
6414 (OMP_CLAUSE_MASK_1): Define.
6415 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6416 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6417 omp_clause_mask::operator |, omp_clause_mask::operator &,
6418 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6419 omp_clause_mask::operator ==): New methods.
6420 (enum c_omp_clause_split): New.
6421 (c_finish_omp_taskgroup): New prototype.
6422 (c_finish_omp_atomic): Add swapped argument.
6423 (c_finish_omp_for): Add code argument.
6424 (c_omp_split_clauses): New prototype.
6425 (c_split_parallel_clauses): Removed.
6426 (c_omp_declare_simd_clauses_to_numbers,
6427 c_omp_declare_simd_clauses_to_decls): New prototypes.
6428 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6429 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6430 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6431 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6432 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6433 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6434 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6435 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6436 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6437 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6438 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6439 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6440 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6441 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6442 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6443 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6444 PRAGMA_OMP_CLAUSE_UNIFORM.
6445
826cacfe
MG
64462013-10-09 Marc Glisse <marc.glisse@inria.fr>
6447
6448 PR tree-optimization/20318
6449 * c-common.c (handle_returns_nonnull_attribute): New function.
6450 (c_common_attribute_table): Add returns_nonnull.
6451
2284b034
MG
64522013-10-03 Marc Glisse <marc.glisse@inria.fr>
6453
6454 PR c++/19476
6455 * c.opt (fcheck-new): Move to common.opt.
6456
b56e9788
MP
64572013-09-25 Marek Polacek <polacek@redhat.com>
6458 Jakub Jelinek <jakub@redhat.com>
6459
6460 PR sanitizer/58413
6461 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6462 an expression if we can prove it is correct.
6463 (ubsan_instrument_division): Likewise. Remove unnecessary
6464 check.
6465
ce6923c5
MP
64662013-09-18 Marek Polacek <polacek@redhat.com>
6467
6468 PR sanitizer/58411
6469 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6470 Declare it.
6471 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6472
fb5610fb
IS
64732013-09-14 Iain Sandoe <iain@codesourcery.com>
6474
6475 PR target/48094
6476 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6477 fobjc-gc, freplace-objc-classes): Accept for LTO.
6478
88b0e79e
JC
64792013-09-13 Jacek Caban <jacek@codeweavers.com>
6480
6481 * c-target.def: New hook
6482
c9b0866a
PC
64832013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6484
6485 PR c++/43452
6486 * c.opt (Wdelete-incomplete): Add.
6487
0af94e6f
JR
64882013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6489
6490 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6491 (vector_types_compatible_elements_p): New function.
6492 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6493 declaration.
6494 (vector_types_compatible_elements_p): Declare.
6495
7c26172c
GDR
64962013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6497
6498 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6499 a virtual member function.
6500 (pp_simple_type_specifier): Remove.
6501 (pp_c_type_specifier): Likewise.
6502 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6503 Rename from pp_c_type_specifier. Adjust.
6504 (c_pretty_printer::c_pretty_printer): Do not assign to
6505 simple_type_specifier.
6506
20059c8b
GDR
65072013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6508
6509 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6510 member function.
6511 (c_pretty_printer::storage_class_specifier): Likewise.
6512 (c_pretty_printer::initializer): Likewise.
6513 (pp_declaration): Remove.
6514 (pp_declaration_specifiers): Likewise.
6515 (pp_abstract_declarator): Likewise.
6516 (pp_declarator): Likewise.
6517 (pp_type_id): Likewise.
6518 (pp_statement): Likewise.
6519 (pp_constant): Likewise.
6520 (pp_id_expression): Likewise.
6521 (pp_primary_expression): Likewise.
6522 (pp_unary_expression): Likewise.
6523 (pp_multiplicative_expression): Likewise.
6524 (pp_conditional_expression): Likewise.
6525 (pp_assignment_expression): Likewise.
6526 (pp_expression): Likewise.
6527 (pp_c_type_id): Likewise.
6528 (pp_c_storage_class_specifier): Likewise.
6529 * c-pretty-print.c (pp_c_type_cast): Tidy.
6530 (pp_c_pointer): Likewise.
6531 (pp_c_type_specifier): Likewise.
6532 (pp_c_parameter_type_list): Likewise.
6533 (pp_c_function_definition): Likewise.
6534 (pp_c_init_declarator): Likewise.
6535 (pp_c_initializer_list): Likewise.
6536 (pp_c_constructor_elts): Likewise.
6537 (c_pretty_printer::direct_abstract_declarator): Likewise.
6538 (c_pretty_printer::declaration_specifiers): Likewise.
6539 (c_pretty_printer::primary_expression): Likewise.
6540 (c_pretty_printer::postfix_expression): Likewise.
6541 (c_pretty_printer::type_id): Rename from pp_c_type_id.
6542 (c_pretty_printer::storage_class_specifier): Rename from
6543 pp_c_storage_class_specifier.
6544 (c_pretty_printer::initializer): Rename from pp_c_initializer.
6545 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
6546 storage_class_specifier, initializer, offset_list, flags.
6547
de5a5fa1
MP
65482013-08-30 Marek Polacek <polacek@redhat.com>
6549
6550 * c-ubsan.c: New file.
6551 * c-ubsan.h: New file.
6552
8f0e4d72
GDR
65532013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
6554
6555 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
6556 member function.
6557 (c_pretty_printer::declaration_specifiers): Likewise.
6558 (c_pretty_printer::declarator): Likewise.
6559 (c_pretty_printer::abstract_declarator): Likewise.
6560 (c_pretty_printer::direct_abstract_declarator): Likewise.
6561 (c_pretty_printer::direct_declarator): Likewise.
6562 (c_pretty_printer::function_specifier): Likewise.
6563 (pp_declaration): Adjust.
6564 (pp_declaration_specifiers): Likewise.
6565 (pp_abstract_declarator): Likewise.
6566 (pp_direct_declarator): Likewise.
6567 (pp_function_specifier): Likewise.
6568 (pp_direct_abstract_declarator): Remove as unused.
6569 (pp_c_declaration): Remove.
6570 (pp_c_declaration_specifiers): Likewise.
6571 (pp_c_declarator): Likewise.
6572 (pp_c_direct_declarator): Likewise.
6573 (pp_c_function_specifier): Likewise.
6574 (pp_c_direct_abstract_declarator): Likewise.
6575 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
6576 from pp_c_abstract_declarator. Adjust.
6577 (c_pretty_printer::direct_abstract_declarator): Rename from
6578 pp_c_direct_abstract_declarator. Adjust.
6579 (c_pretty_printer::function_specifier): Rename from
6580 pp_c_function_specifier. Adjust.
6581 (c_pretty_printer::declaration_specifiers): Rename from
6582 pp_c_declaration_specifiers. Adjust.
6583 (c_pretty_printer::direct_declarator): Rename from
6584 pp_c_direct_declarator. Adjust.
6585 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
6586 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
6587 (c_pretty_printer::c_pretty_printer): Do not assign to
6588 declaration, declaration_specifiers, declarator,
6589 direct_declarator, direct_abstract_declarator, function_specifier.
6590
00d34d3a
GDR
65912013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
6592
6593 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
6594 virtual member function.
6595 (c_pretty_printer::multiplicative_expression): Likewise.
6596 (c_pretty_printer::conditional_expression): Likewise.
6597 (c_pretty_printer::assignment_expression): Likewise.
6598 (c_pretty_printer::expression): Likewise.
6599 (pp_unary_expression): Adjust.
6600 (pp_multiplicative_expression): Likewise.
6601 (pp_assignment_expression): Likewise.
6602 (pp_conditional_expression): Likewise.
6603 (pp_expression): Likewise.
6604 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
6605 from pp_c_unary_expression. Adjust.
6606 (c_pretty_printer::multiplicative_expression): Rename from
6607 pp_c_multiplicative_expression. Adjust.
6608 (c_pretty_printer::conditional_expression): Rename from
6609 pp_c_conditional_expression. Adjust.
6610 (c_pretty_printer::assignment_expression): Rename from
6611 pp_c_assignment_expression. Adjust.
6612 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
6613 (c_pretty_printer::c_pretty_printer): Do not assign to
6614 unary_expression, multiplicative_expression,
6615 conditional_expression, expression.
6616
fb22178f
GDR
66172013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6618
6619 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
6620 virtual member function.
6621 (pp_postfix_expression): Adjust.
6622 (pp_c_postfix_expression): Remove.
6623 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
6624 from pp_c_postfix_expression. Adjust.
6625 (c_pretty_printer::c_pretty_printer): Do not assign to
6626 postfix_expression.
6627
7ecc2600
GDR
66282013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6629
6630 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
6631 virtua member function.
6632 (pp_primary_expression): Adjust.
6633 (pp_c_primary_expression): Remove.
6634 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
6635 from pp_c_primary_expression. Adjust.
6636 (pp_c_initializer_list): Use pp_primary_expression.
6637 (c_pretty_printer::c_pretty_printer): Do not assign to
6638 primary_expression.
6639
0691175f
GDR
66402013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
6641
6642 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
6643 * c-pretty-print.c (M_): Remove.
6644 (c_pretty_printer::translate_string): Define.
6645 (pp_c_type_specifier): Use it.
6646 (pp_c_primary_expression): Likewise.
6647 (pp_c_expression): Likewise.
6648
66dfe4c4
GDR
66492013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6650
6651 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
6652 virtual function.
6653 (pp_c_id_expression): Remove.
6654 (pp_id_expression): Adjust.
6655 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
6656 pp_c_id_expression. Adjust.
6657 (pp_c_postfix_expression): Use pp_id_expression.
6658 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
6659
ca43e9d5
GDR
66602013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
6661
6662 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
6663 member function.
6664 (pp_constant): Adjust.
6665 (pp_c_constant): Remove.
6666 * c-pretty-print.c (c_pretty_printer::constant): Rename from
6667 pp_c_constant. Adjust.
6668 (pp_c_constant)
6669 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
6670 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
6671
da6ca2b5
GDR
66722013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6673
6674 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
6675 (c_pretty_printer::c_pretty_printer): Declare.
6676 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
6677 c_pretty_printer_init. Adjust.
6678 (print_c_tree): Do not call c_pretty_printer_init.
6679 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
6680
65a372f4
AC
66812013-08-09 Arnaud Charlet <charlet@adacore.com>
6682
6683 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
6684
fd9b0f32
PC
66852013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
6686
6687 PR c++/58080
6688 * c-common.c (pointer_int_sum): Add bool parameter.
6689 * c-common.h (pointer_int_sum): Adjust declaration.
6690
e0aec1e9
GDR
66912013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
6692
6693 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
6694 c_pretty_printer variable.
6695
b066401f
GDR
66962013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6697
6698 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
6699 (pp_base): Remove.
6700 (pp_c_base): Likewise. Adjust users.
6701 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
6702 (pp_c_whitespace): Do not call pp_base.
6703 (pp_c_left_paren): Likewise.
6704 (pp_c_right_paren): Likewise.
6705 (pp_c_left_brace): Likewise.
6706 (pp_c_right_brace): Likewise.
6707 (pp_c_left_bracket): Likewise.
6708 (pp_c_right_bracket): Likewise.
6709 (pp_c_dot): Likewise.
6710 (pp_c_ampersand): Likewise.
6711 (pp_c_star): Likewise.
6712 (pp_c_arrow): Likewise.
6713 (pp_c_semicolon): Likewise.
6714 (pp_c_complement): Likewise.
6715 (pp_c_exclamation): Likewise.
6716 (pp_c_direct_declarator): Likewise.
6717 (pp_c_ws_string): Likewise.
6718 (pp_c_identifier): Likewise.
6719 (pp_c_statement): Likewise.
6720 (print_c_tree): Likewise.
6721
65e5a578
ESR
67222013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
6723
6724 PR c++/58072
6725 * c-common.c (c_parse_error): Catch user-defined literal tokens and
6726 provide useful error strings.
6727
137a1a27
GDR
67282013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6729
6730 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
6731 printer functions instead of pp_string or operators and punctuators.
6732 (dump_generic_ada_node): Likewise.
6733 * c-pretty-print.c (pp_c_type_specifier): Likewise.
6734 (pp_c_relational_expression): Likewise.
6735 (pp_c_logical_or_expression): Likewise.
6736
07838b13
GDR
67372013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6738
6739 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
6740 functions instead of pp_character.
6741 (pp_ada_tree_identifier): Likewise.
6742 (dump_ada_double_name): Likewise.
6743 (dump_ada_function_declaration): Likewise.
6744 (dump_ada_array_domains): Likewise.
6745 (dump_template_types): Likewise.
6746 (dump_generic_ada_node): Likewise.
6747 (print_ada_declaration): Likewise.
6748 (print_ada_struct_decl): Likewise.
6749 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6750
433cc7b0
TT
67512013-07-23 Tom Tromey <tromey@redhat.com>
6752
6753 * c-common.h (enum rid) <RID_GENERIC>: New constant.
6754 * c-common.c (c_common_reswords): Add _Generic.
6755
688010ba
OB
67562013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
6757
6758 * c-common.c: Fix typos.
6759 * c-common.h: Likewise.
6760
2a99e5e6
LL
67612013-07-13 Lubos Lunak <l.lunak@suse.cz>
6762
6763 PR c++/55203
6764 * c-common.c (c_common_attribute_table): Add warn_unused.
6765 (handle_warn_unused_attribute): New.
6766
c26302d5
JJ
67672013-07-10 Jakub Jelinek <jakub@redhat.com>
6768
6769 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
6770 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
6771
dfeadaa0
PC
67722013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
6773
6774 PR c++/57869
6775 * c.opt: Add Wconditionally-supported.
6776
6a2fa4b2
GS
67772013-07-08 Graham Stott <graham.stott@btinternet.com>
6778
adfac8df 6779 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
6780 unused variables l_length and l_node.
6781
ecdbd01a 67822013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
6783
6784 PR c/57821
6785 * c-common.c (complete_array_type): Delay folding first index
6786 like other indices. When folding, check for index overflow.
6787
bedc293e
MG
67882013-06-27 Marc Glisse <marc.glisse@inria.fr>
6789
6790 PR c++/57509
6791 * c-common.h (c_build_vec_perm_expr): New complain argument.
6792 * c-common.c (c_build_vec_perm_expr): Likewise.
6793 Use save_expr also in C++.
6794
604b2bfc
GDR
67952013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
6796
6797 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
6798 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6799 * c-opts.c (c_common_post_options): Likewise.
6800
dfeadaa0 68012013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
6802
6803 * array-notation-common.c (length_mismatch_in_expr): Changed the
6804 parameter type's from a dynamic array to a vec_tree. Also removed
6805 the size parameters.
6806 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
6807 the change above.
6808
2ce86d2e
BI
68092013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
6810
6811 * c-common.h (struct cilkplus_an_parts): New structure.
6812 (struct cilkplus_an_loop_parts): Likewise.
6813 (cilkplus_extract_an_triplets): New prototype.
6814 (fix_sec_implicit_args): Likewise.
6815 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
6816 (fix_sec_implicit_args): Likewise.
604b2bfc 6817
07a6825b
BI
68182013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
6819
6820 * array-notation-common.c (find_inv_trees): Removed an unwanted
6821 typecasting.
6822 * c-common.h (struct inv_list::additional_tcodes): Changed type from
6823 enum rid to enum tree_code.
6824
08346abd
JH
68252013-06-11 Jan Hubicka <jh@suse.cz>
6826
6827 * c-common.c (handle_alias_ifunc_attribute): Do not set
6828 DECL_EXTERNAL for weakref variables.
6829 * c-pragma.c (handle_pragma_weak): Make sure aliases
6830 are not declared as external.
6831
d60f1706
BI
68322013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
6833
6834 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
6835 function from c/c-array-notation.c.
6836 (is_cilkplus_reduce_builtin): Likewise.
6837 (find_rank): Likewise.
6838 (extract_array_notation_exprs): Likewise.
6839 (replace_array_notations): Likewise.
6840 (find_inv_trees): Likewise.
6841 (replace_inv_trees): Likewise.
6842 (contains_array_notation_expr): Likewise.
6843 (find_correct_array_notation_type): Likewise.
6844 * c-common.h (struct inv_list): Moved this struct from the file
6845 c/c-array-notation.c and added a new field called additional tcodes.
6846 (length_mismatch_in_expr_p): New prototype.
6847 (is_cilkplus_reduce_builtin): Likewise.
6848 (find_rank): Likewise.
6849 (extract_array_notation_exprs): Likewise.
6850 (replace_array_notation): Likewise.
6851 (find_inv_trees): Likewise.
6852 (replace_inv_trees): Likewise.
6853 (find_correct_array_notation_type): Likewise.
dfeadaa0 6854
36536d79
BI
68552013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
6856
6857 * c-common.c (c_define_builtins): When cilkplus is enabled, the
6858 function array_notation_init_builtins is called.
6859 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
6860 * c-common.def (ARRAY_NOTATION_REF): New tree.
6861 * c-common.h (build_array_notation_expr): New function declaration.
6862 (build_array_notation_ref): Likewise.
6863 (extract_sec_implicit_index_arg): New extern declaration.
6864 (is_sec_implicit_index_fn): Likewise.
6865 (ARRAY_NOTATION_CHECK): New define.
6866 (ARRAY_NOTATION_ARRAY): Likewise.
6867 (ARRAY_NOTATION_START): Likewise.
6868 (ARRAY_NOTATION_LENGTH): Likewise.
6869 (ARRAY_NOTATION_STRIDE): Likewise.
6870 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
6871 ARRAY_NOTATION_REF.
6872 (pp_c_expression): Likewise.
6873 * c.opt (flag_enable_cilkplus): New flag.
6874 * array-notation-common.c: New file.
6875
f7716d57
JJ
68762013-05-14 Jakub Jelinek <jakub@redhat.com>
6877
6878 PR c++/57274
6879 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
6880
a5e0cd1d
MG
68812013-05-10 Marc Glisse <marc.glisse@inria.fr>
6882
6883 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
6884 vectors.
6885
f6bc1c4a
HS
68862013-05-07 Han Shen <shenhan@google.com>
6887
6888 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
6889
3f12f6e9
SKS
68902013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
6891
6892 * c-common.c (check_user_alignment): Emit error for negative values.
6893
61949153
PC
68942013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6895
6896 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
6897
e93e18e9
PC
68982013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6899
6900 * c-cppbuiltin.c (c_cpp_builtins): Do not define
6901 __GXX_EXPERIMENTAL_CXX1Y__.
6902
44d90fe1 69032013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 6904 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
6905
6906 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6907 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6908 to simply use OPT_Wpointer_arith.
6909 (c_sizeof_or_alignof_type): Likewise.
6910
13f39b2e
PC
69112013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6912
6913 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6914
4b84d650
JJ
69152013-04-12 Jakub Jelinek <jakub@redhat.com>
6916
6917 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6918 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6919 specifiers.
6920
fb037b5d
SB
69212013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6922
6923 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6924
4e856798
PC
69252013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6926
6927 * c-common.c (pointer_int_sum): Remove dead code.
6928
4b1baac8
RS
69292013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6930
6931 PR middle-end/56524
6932 * c-common.c (handle_optimize_attribute): Don't call
6933 save_optabs_if_changed.
6934
0b50e654
JJ
69352013-03-05 Jakub Jelinek <jakub@redhat.com>
6936
6937 PR middle-end/56461
6938 * c-pch.c (pch_init): Free target_validity at the end.
6939
48c41403
JJ
69402013-03-04 Jakub Jelinek <jakub@redhat.com>
6941
6942 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6943
e664c61c
KS
69442013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6945 Jakub Jelinek <jakub@redhat.com>
6946
6947 PR sanitizer/56454
6948 * c-common.c (handle_no_sanitize_address_attribute): New function.
6949 (c_common_attribute_table): Add no_sanitize_address attribute.
6950 (handle_no_address_safety_analysis_attribute): Add
6951 no_sanitize_address attribute, not no_address_safety_analysis
6952 attribute.
6953
a475fd3d 69542013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
6955
6956 PR target/52555
6957 * c-common.c (handle_optimize_attribute): Call
6958 save_optabs_if_changed.
6959
f6007d99
JJ
69602013-02-18 Jakub Jelinek <jakub@redhat.com>
6961 Steven Bosscher <steven@gcc.gnu.org>
6962
6963 PR pch/54117
6964 * c-opts.c (c_common_post_options): If debug info is enabled
6965 and non-dwarf*, refuse to load PCH files and when writing PCH
6966 file warn.
6967
cf35e2b1
JJ
69682013-02-05 Jakub Jelinek <jakub@redhat.com>
6969
6970 PR middle-end/56167
6971 * c-common.c (handle_error_attribute): Fix condition.
6972
32887460
JJ
69732013-01-30 Jakub Jelinek <jakub@redhat.com>
6974
6975 PR c++/55742
6976 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6977
5af057d8
JM
69782013-01-18 Jason Merrill <jason@redhat.com>
6979
6980 PR target/54908
6981 * c.opt (-fextern-tls-init): New.
6982 * c-opts.c (c_common_post_options): Handle it.
6983
cc83c823
JJ
69842013-01-09 Jakub Jelinek <jakub@redhat.com>
6985
6986 PR c/48418
6987 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6988 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6989 and is either negative or bigger or equal to type precision
6990 of the first operand.
6991
a859517f
MP
69922012-12-03 Marek Polacek <polacek@redhat.com>
6993
6994 PR c/55570
6995 * c-common.c (check_user_alignment): Swap order of tests,
6996 check TREE_CODE first.
6997
2d7aa578
ESR
69982012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
6999
7000 PR c++/52654
7001 * c-common.h (overflow_type): New enum.
7002 (build_userdef_literal): Add overflow_type argument.
7003 (tree_userdef_literal): Add overflow_type.
7004 (USERDEF_LITERAL_OVERFLOW): New access macro.
7005 * c-common.c (build_userdef_literal): Add overflow_type
7006 argument.
7007 * c-lex.c (c_lex_with_flags): Add overflow_type to
7008 build_userdef_literal calls.
7009 (interpret_integer, interpret_float): Add overflow_type argument.
7010
cc3c4f62
RB
70112012-11-28 Richard Biener <rguenther@suse.de>
7012
7013 PR c/35634
7014 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7015 here and use a type with proper overflow behavior for types that would
7016 need to be promoted for the arithmetic.
7017
77bc5132
JJ
70182012-11-23 Jakub Jelinek <jakub@redhat.com>
7019
7020 PR sanitizer/55435
7021 * c-common.c (handle_no_address_safety_analysis_attribute): New
7022 function.
7023 (c_common_attribute_table): Add no_address_safety_analysis.
7024
5dc99c46
SB
70252012-11-16 Simon Baldwin <simonb@google.com>
7026
7027 * c.opt: Add f[no-]canonical-system-headers.
7028 * c-opts.c (c_common_handle_option): Handle
7029 OPT_fcanonical_system_headers.
7030
a4a0016d
ESR
70312012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7032
7033 PR c++/54413
7034 * c-opts.c (c_common_handle_option): Set new flags.
7035 * c.opt: Describe new flags.
7036
7dbb85a7
JM
70372012-11-09 Jason Merrill <jason@redhat.com>
7038
7039 * c.opt (Wabi-tag): New.
7040
ad7bac31
AK
70412012-11-09 Andi Kleen <ak@linux.intel.com>
7042
7043 PR 55139
7044 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7045 MEMMODEL_MASK
ad7bac31 7046
7332899a
MLI
70472012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7048
7049 PR c/53063
7050 * c.opt (Wformat): Make it Alias Wformat=1.
7051 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7052 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7053 LangEnabledBy.
7054 (Wformat=): RejectNegative. Use LangEnabledBy.
7055 (Wnonnull): Use LangEnabledBy.
7056 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7057 * c-format.c (set_Wformat): Delete.
7058 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7059 (maybe_read_dollar_number): Likewise.
7060 (avoid_dollar_number): Likewise.
7061 (finish_dollar_format_checking): Likewise.
7062 (check_format_info): Likewise.
7063 (check_format_info_main): Likewise.
7064 (check_format_types): Likewise.
7065 (format_type_warning): Likewise.
7066 * c-common.c (int): Likewise.
7067 (check_function_sentinel): Likewise.
7068 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7069
34a180a6
MLI
70702012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7071
7072 PR c/53063
7073 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7074 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7075 Use LangEnabledBy.
7076 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7077 common.opt.
7078 (Wvariadic-macros): Init(1).
7079 * c-opts.c (c_common_handle_option): Do not handle them
7080 explicitly.
7081 (c_common_post_options): Likewise.
7082 (sanitize_cpp_opts): warn_unused_macros is now
7083 cpp_warn_unused_macros.
7084 (push_command_line_include): Likewise.
7085 * c-common.c (warn_unknown_pragmas): Do not define.
7086 * c-common.h (warn_unknown_pragmas): Do not declare.
7087
3f46d6a5
MLI
70882012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7089
7090 PR c/51294
7091 * c-common.c (conversion_warning): Handle conditional expressions.
7092
880661a4
JW
70932012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7094
7095 PR c++/54930
7096 * c.opt (Wreturn_local_addr): Define new option.
7097
4514a96b
JM
70982012-10-25 Jason Merrill <jason@redhat.com>
7099
f14edc1a
JM
7100 * c.opt (Wvirtual-move-assign): New.
7101
4514a96b
JM
7102 * c.opt (Winherited-variadic-ctor): New.
7103
93100c6b
MG
71042012-10-25 Marc Glisse <marc.glisse@inria.fr>
7105
7106 PR c++/54427
7107 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7108
1efcb8c6
JM
71092012-10-23 Joseph Myers <joseph@codesourcery.com>
7110
7111 * c-common.h (pch_cpp_save_state): Declare.
7112 * c-target.def (c_preinclude): New hook.
7113 * c-opts.c (done_preinclude): New.
7114 (push_command_line_include): Handle default preincluded header.
7115 (cb_file_change): Call pch_cpp_save_state when calling
7116 push_command_line_include.
7117 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7118 (pch_cpp_save_state): New.
7119 (pch_init): Call pch_cpp_save_state conditionally, instead of
7120 calling cpp_save_state.
7121
4a0ae68e
MLI
71222012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7123
7124 PR c/53063
7125 PR c/40989
7126 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7127 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7128 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7129 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7130 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7131 * c-opts.c (c_common_handle_option): Remove explicit handling from
7132 here.
7133 (c_common_post_options): Likewise.
7134
67e4210b
EB
71352012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7136
7137 * c-ada-spec.c (LOCATION_COL): Delete.
7138 (compare_location): New function.
7139 (compare_node): Use it.
7140 (compare_comment): Likewise.
7141
65d4f2cd
MLI
71422012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7143
7144 PR c/53063
7145 PR c/40989
7146 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7147 * c-opts.c (c_common_handle_option): Do not set them here. Add
7148 comment.
7149 (c_common_post_options): Likewise.
7150
909881cb
EB
71512012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7152
7153 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7154 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7155 Remove POINTER_TYPE handling, add large unsigned handling and use
7156 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7157
3a785c97
JJ
71582012-10-12 Jakub Jelinek <jakub@redhat.com>
7159
7160 PR c/54381
7161 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7162 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7163 locs and array of 3 trees instead of just single loc and single
7164 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7165 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7166 For *cmp* builtins that take two sources strings report warnings
7167 about first and second source, not about destination and source.
7168
5e54f81d
MG
71692012-10-12 Marc Glisse <marc.glisse@inria.fr>
7170
7171 PR c++/53055
7172 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7173
f5b02f1e
EB
71742012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7175
7176 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7177 declaring something coming from another file.
7178
b46dbc6c
AC
71792012-10-10 Arnaud Charlet <charlet@adacore.com>
7180
f5b02f1e 7181 PR ada/54845
b46dbc6c
AC
7182 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7183
5d9de0d0
PC
71842012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7185
7186 PR c++/54194
7187 * c-common.c (warn_about_parentheses): Add location_t parameter;
7188 use EXPR_LOC_OR_LOC.
7189 * c-common.h: Update declaration.
7190
a212e43f
MG
71912012-10-09 Marc Glisse <marc.glisse@inria.fr>
7192
7193 PR c++/54427
7194 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7195 more operations. Make error messages optional.
7196 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7197 (scalar_to_vector): Declare.
7198
b1db7f91
JM
71992012-10-08 Jason Merrill <jason@redhat.com>
7200
7201 * c-common.c (c_common_reswords): Add thread_local.
7202
e28d52cf
DS
72032012-10-08 Dodji Seketeli <dodji@redhat.com>
7204
7205 PR c++/53528 C++11 attribute support
7206 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7207 new functions.
7208 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7209 static function.
7210 (handle_aligned_attribute): In choose strictest alignment
7211 among many. Use new check_cxx_fundamental_alignment_constraints.
7212 (handle_transparent_union_attribute): In c++11 attribute syntax,
7213 don't look through typedefs.
7214
3b78de56
AC
72152012-10-04 Arnaud Charlet <charlet@adacore.com>
7216
7217 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7218 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7219 out of dumpfile.h.
7220
6040bb5f
DC
72212012-09-25 Dehao Chen <dehao@google.com>
7222
7223 PR middle-end/54645
3b78de56 7224 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7225 map when read in the pch.
7226
3f8257db 72272012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7228
7229 * c-ada-spec.c: Style fixes.
7230
3f8257db 72312012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7232
7233 * c.opt (-fada-spec-parent): Define new command line switch.
7234 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7235 is specified, generate binding spec as a child of the specified unit.
7236
0ccb505d
PC
72372012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7238 Manuel López-Ibáñez <manu@gcc.gnu.org>
7239
7240 PR c++/53210
7241 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7242
c583af79
AC
72432012-08-23 Arnaud Charlet <charlet@adacore.com>
7244
7245 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7246 for pointers, and add missing Convention C pragma.
7247 (print_ada_struct_decl): Add missing aliased keyword.
7248 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7249
1a4049e7
JJ
72502012-08-17 Jakub Jelinek <jakub@redhat.com>
7251
7252 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7253 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7254 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7255 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7256 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7257
70b5e7dc
RG
72582012-08-10 Richard Guenther <rguenther@suse.de>
7259
7260 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7261
f8923f7e
SB
72622012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7263
7264 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7265 instead of separate pp_newline and pp_flush.
7266 (print_c_tree): Likewise.
7267
e45abe1f
RH
72682012-07-26 Richard Henderson <rth@redhat.com>
7269
7270 * c-common.c (handle_hot_attribute): Allow labels.
7271 (handle_cold_attribute): Likewise.
7272
332f1d24
JJ
72732012-07-20 Jakub Jelinek <jakub@redhat.com>
7274
7275 PR c++/28656
7276 * c-common.c (check_function_nonnull): Handle multiple nonnull
7277 attributes properly.
7278
7ee2468b
SB
72792012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7280
7281 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7282 * c-ada-spec.c: Likewise.
7283 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7284
ee7b28eb
SB
72852012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7286
7287 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7288 Remove code conditional on it.
7289
6bdf3519
SB
72902012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7291
7292 * c-gimplify.c: Do not include basic-block.h.
7293 * c-common.c: Do not include linfuncs.h.
7294
532aafad
SB
72952012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7296
7297 * c-common.h: Include tree.h.
7298
8d0d1915
JM
72992012-07-02 Jason Merrill <jason@redhat.com>
7300
7301 PR c++/53524
7302 * c-common.c (get_priority): Call default_conversion.
7303
fbc873ad
UB
73042012-07-01 Uros Bizjak <ubizjak@gmail.com>
7305
7306 * c-pch.c (c_common_write_pch): Remove unused variables.
7307
d4a10d0a
SB
73082012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7309
7310 * cppspec.c: Moved from gcc/ to here.
7311
6f3a2e23
KT
73122012-06-27 Kai Tietz <ktietz@redhat.com>
7313
7314 PR preprocessor/37215
7315 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7316
8ca92d04
SB
73172012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7318
7319 * c-common.h (c_common_print_pch_checksum): Remove.
7320 * c-pch.c: Do not include output.h.
7321 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7322 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7323 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7324 (struct c_pch_header): Remove.
7325 (get_ident): Update gpch version.
7326 (pch_init): Do not print executable_checksum to asm_out_file.
7327 Do not fail if there is no asm_out_file to read back from. Set
7328 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7329 (c_common_write_pch): Verify that nothing was written to asm_out_file
7330 since pch_init was called. Do not write a c_pch_header, and do not
7331 copy from asm_out_file to the PCH.
7332 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7333 the content of asm_out_file from the PCH.
7334 (c_common_print_pch_checksum): Remove.
7335 * c-opts.c (c_common_init): Print out executable_checksum directly.
7336
70f42967
SB
73372012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7338
7339 * c-target.def (objc_declare_unresolved_class_reference,
7340 objc_declare_class_definition): Add new hooks.
7341
a8781821
SB
73422012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7343
7344 * c-lex.c: Do not include output.h.
7345 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7346 Remove uses of ASM_OUTPUT_IDENT.
7347
9e1a8dd1
RR
73482012-06-15 Marc Glisse <marc.glisse@inria.fr>
7349
7350 PR c++/51033
7351 * c-common.h (c_build_vec_perm_expr): Move decl here.
7352 * c-common.c (c_build_vec_perm_expr): Move definition
7353 here.
7354
6f07a821
SB
73552012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7356
7357 * c.opt (fconserve-space): Turn into a no-op.
7358
9faeb493 73592012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
7360
7361 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7362 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7363 both the start and end of the function.
7364
a4b7d13c
SB
73652012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7366
7367 * c-common.c: Do not include output.h.
7368 * c-pragma.c: Likewise.
7369
c265f413
SA
73702012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7371
7372 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7373 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7374 (lang_decl_name): Handle namespace decls.
7375
be7a421e
SB
73762012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7377
7378 * c-ada-spec.c: Do not include output.h.
7379 * c-semantics.c: Likewise.
7380
65de6659
JM
73812012-05-29 Joseph Myers <joseph@codesourcery.com>
7382
7383 * c-common.c: Fix typo.
7384
ca5f4331
MM
73852012-05-29 Michael Matz <matz@suse.de>
7386
7387 * c-common.h (c_expand_decl): Remove prototype.
7388
4f7f7aca
MLI
73892012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7390
7391 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7392 * c-opts.c (c_common_handle_option): Remove code handling
7393 warn_missing_braces.
7394
4a792f9b
PC
73952012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7396
7397 PR c++/25137
7398 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7399 -Wmissing_braces.
7400
650dc14a
DS
74012012-05-22 Dodji Seketeli <dodji@redhat.com>
7402
7403 PR c++/53322
7404 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7405
9b095bf1
MLI
74062012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7407
7408 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7409 * c-opts.c (c_common_handle_option): Do not handle explicitly
7410 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7411
0b2c4be5
DS
74122012-05-16 Dodji Seketeli <dodji@redhat.com>
7413
7414 PR preprocessor/7263
7415 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7416 to cpp_classify_number. For diagnostics, use the precise location
7417 instead of the global input_location.
7418
a1bde5af
PC
74192012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7420
d02924ef 7421 PR c++/11856
a1bde5af
PC
7422 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7423
d1ede5f4
BS
74242012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7425
a1bde5af 7426 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 7427
f2bc201f
MLI
74282012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7429
7430 PR 53063
7431 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7432 Wreorder): Use LangEnabledBy.
7433 * c-opts.c (c_common_handle_option): Do not enable them
7434 explicitly. Call lang-specific generated functions.
7435 (c_common_post_options): Do not set them here.
7436
95744782
MLI
74372012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7438
7439 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7440 Wmissing-field-initializers,Wmissing-parameter-type,
7441 Wold-style-declaration,Woverride-init): Use EnabledBy.
7442 * c-opts.c (c_common_post_options): Do not set here explicitly.
7443
7d5a5747
MLI
74442012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7445
7446 PR 53063
7447 * c-opts.c (c_common_handle_option): Use handle_generated_option
7448 to enable sub-options.
7449
5a3c9cf2
PC
74502012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7451
7452 PR c++/53158
7453 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7454
3ac8781c
RG
74552012-05-10 Richard Guenther <rguenther@suse.de>
7456
7457 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7458 adjust commentary about TYPE_IS_SIZETYPE types.
7459
1e537948
MLI
74602012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7461
7462 PR c++/53261
7463 * c-common.c (warn_logical_operator): Check that argument of
7464 integer_zerop is not NULL.
7465
f2c4a785
MLI
74662012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7467
7468 PR c/43772
7469 * c-common.c (warn_logical_operator): Do not warn if either side
7470 is already true or false.
7471
50f305ca
MLI
74722012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7473
7474 PR c/51712
7475 * c-common.c (expr_original_type): New.
7476 (shorten_compare): Do not warn for enumeration types.
7477
0c3641b0
MLI
74782012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7479
7480 * c.opt (fpermissive): Add Var(flag_permissive).
7481
7edaa4d2
MG
74822012-04-30 Marc Glisse <marc.glisse@inria.fr>
7483
7484 PR c++/51033
7485 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7486 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7487
b9c8da34
DS
74882012-04-30 Dodji Seketeli <dodji@redhat.com>
7489
7490 Add -Wvarargs option
7491 * c.opt (Wvarargs): Define new option.
7492
e6c69da0
MLI
74932012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7494
7495 * c-common.c (check_function_arguments): Replace
7496 Wmissing-format-attribute with Wsuggest-attribute=format.
7497
90137d8f
MLI
74982012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7499
7500 * c.opt (Wsuggest-attribute=format): New. Alias of
7501 Wmissing-format-attribute.
7502 * c-format.c (decode_format_type): Replace
7503 Wmissing-format-attribute with Wsuggest-attribute=format.
7504 (check_function_format): Likewise.
7505
9faeb493 75062012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
7507
7508 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7509 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7510 * c.opt: Add Wliteral-suffix.
7511
c1771a20
MLI
75122012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7513
7514 PR c/44774
7515 * c.opt (Wpedantic): New.
7516 (pedantic): Alias Wpedantic.
7517 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7518 (c_common_post_options): Likewise.
7519 (sanitize_cpp_opts): Likewise.
7520 * c-lex.c (interpret_float): Likewise.
7521 * c-format.c (check_format_types): Likewise.
7522 * c-common.c (pointer_int_sum): Likewise.
7523 (c_sizeof_or_alignof_type): Likewise.
7524 (c_add_case_label): Likewise.
7525 (c_do_switch_warnings): Likewise.
7526 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7527
04b391c1
JM
75282012-04-15 Jason Merrill <jason@redhat.com>
7529
7530 PR c++/52818
7531 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7532 (C_STD_NAME): Distinguish between C++98 and C++11.
7533
ac868f29
EB
75342012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7535
7536 PR target/52624
7537 * c-common.h (uint16_type_node): Rename into...
7538 (c_uint16_type_node): ...this.
7539 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
7540 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
7541
fd4116f4
MLI
75422012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
7543
7544 * c-common.c (warn_if_unused_value): Move definition to here.
7545 * c-common.h (warn_if_unused_value): Move declaration to here.
7546
573ac65e
WB
75472012-03-23 William Bader <williambader@hotmail.com>
7548
7549 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
7550
552b8185
JM
75512012-03-20 Jason Merrill <jason@redhat.com>
7552
7553 * c-common.h (enum cxx_dialect): Add cxx1y.
7554 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
7555 test.
7556 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7557 * c-opts.c (c_common_post_options): Likewise.
7558 (set_std_cxx1y): New.
7559 (c_common_handle_option): Call it.
7560 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
7561
04398fa8
PC
75622012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
7563
7564 PR c++/14710
7565 * c.opt ([Wuseless-cast]): Add.
7566
d2a12ae7
RG
75672012-03-16 Richard Guenther <rguenther@suse.de>
7568
7569 * c-pretty-print.c (pp_c_initializer_list): Adjust.
7570
a12bf402
MLI
75712012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
7572
7573 PR c++/44783
7574 * c.opt (ftemplate-backtrace-limit) Add.
7575
5c30094f
RO
75762012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7577
7578 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
7579 handling.
7580 * c-pragma.c (handle_pragma_extern_prefix): Remove.
7581 (init_pragma): Don't register extern_prefix.
7582
21fa2faf
RG
75832012-03-12 Richard Guenther <rguenther@suse.de>
7584
7585 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
7586 (builtin_type_for_size): Likewise.
7587
e3793c6f
JJ
75882012-02-13 Jakub Jelinek <jakub@redhat.com>
7589
7590 PR c++/52215
7591 * c-common.c (sync_resolve_params): Don't decide whether to convert
7592 or not based on TYPE_SIZE comparison, convert whenever arg_type
7593 is unsigned INTEGER_TYPE.
7594
93286335
PC
75952012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
7596
7597 PR c/52118
7598 * c.opt ([Wunused-local-typedefs]): Fix description.
7599
7a421706
MS
76002012-01-24 Mike Stump <mikestump@comcast.net>
7601
7602 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
7603 exactly.
7604
ba9b1f11
RG
76052012-01-18 Richard Guenther <rguenther@suse.de>
7606
7607 * c-opts.c (c_common_post_options): Reset LTO flags if
7608 we are about to generate a PCH.
7609
465406be
PC
76102012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
7611
7612 PR c++/51777
7613 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
7614 use pp_unsigned_wide_integer.
7615
aee15221
RG
76162012-01-10 Richard Guenther <rguenther@suse.de>
7617
7618 PR middle-end/51806
7619 * c-opts.c (c_common_handle_option): Move -Werror handling
7620 to language independent code.
7621
5720c0dc
RG
76222012-01-05 Richard Guenther <rguenther@suse.de>
7623
7624 PR middle-end/51764
7625 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
7626 from common.opt.
7627
73ac190a
PC
76282011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
7629
7630 PR c++/51316
7631 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
7632 of array types with an unknown bound.
7633
48b0b196
JM
76342011-12-20 Joseph Myers <joseph@codesourcery.com>
7635
7636 * c-common.c (flag_isoc99): Update comment to refer to C11.
7637 (flag_isoc1x): Change to flag_isoc11.
7638 * c-common.h (flag_isoc99): Update comment to refer to C11.
7639 (flag_isoc1x): Change to flag_isoc11.
7640 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
7641 C11.
7642 * c-opts.c (set_std_c1x): Change to set_std_c11.
7643 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
7644 Call set_std_c11.
7645 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
7646 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
7647 * c.opt (std=c1x): Change to std=c11. Document as non-draft
7648 standard.
7649 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
7650 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
7651 (std=gnu1x): Make alias of std=gnu11.
7652
d58d6eb5
JM
76532011-12-19 Jason Merrill <jason@redhat.com>
7654
7655 PR c++/51228
7656 * c-common.c (handle_transparent_union_attribute): Check the first
7657 field if the type is complete.
7658
b3908fcc
JW
76592011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
7660
7661 PR libstdc++/51365
7662 * c-common.c (RID_IS_FINAL): Add.
7663 * c-common.h (RID_IS_FINAL): Add.
7664
fea3ca91
IS
76652011-11-30 Iain Sandoe <iains@gcc.gnu.org>
7666
7667 * c.opt (fgnu-runtime): Provide full description.
7668 (fnext-runtime): Likewise.
7669 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
7670
62bad7cd
AM
76712011-11-28 Andrew MacLeod <amacleod@redhat.com>
7672
7673 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
7674 predefines in one place. Add LOCK_FREE predefines.
7675 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
7676 new func.
7677
c466c4ff
AM
76782011-11-24 Andrew MacLeod <amacleod@redhat.com>
7679
7680 PR c/51256
9faeb493 7681 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 7682 conditions
9faeb493
UB
7683 (resolve_overloaded_atomic_exchange,
7684 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
7685 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
7686 error_mark_node for error conditions.
9faeb493 7687
a5952633
RG
76882011-11-08 Richard Guenther <rguenther@suse.de>
7689
7690 PR middle-end/51010
7691 c-family/
7692
0a35513e
AH
76932011-11-07 Richard Henderson <rth@redhat.com>
7694 Aldy Hernandez <aldyh@redhat.com>
7695 Torvald Riegel <triegel@redhat.com>
7696
7697 Merged from transactional-memory.
7698
7699 * c-common.c (handle_tm_wrap_attribute,
7700 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
7701 (struct c_common_reswords): Added __transaction* keywords.
7702 (struct c_common_attribute_table): Added transaction* and tm_regparm
7703 attributes.
7704 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
7705 masks.
7706 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
7707 find_tm_attribute): Declare.
7708
6d87092d
JM
77092011-11-07 Jason Merrill <jason@redhat.com>
7710
7711 PR c++/35688
7712 * c-common.c, c-common.h: Revert yesterday's changes.
7713
8e7860a1
JM
77142011-11-06 Jason Merrill <jason@redhat.com>
7715
7716 PR c++/35688
7717 * c-common.c (decl_has_visibility_attr): Split out from...
7718 (c_determine_visibility): ...here.
7719 * c-common.h: Declare it.
7720
d19fa6b5
JM
77212011-11-06 Joseph Myers <joseph@codesourcery.com>
7722
7723 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
7724 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
7725 type.
7726 (check_user_alignment): New. Split out of
7727 handle_aligned_attribute. Disallow integer constants with
7728 noninteger types. Conditionally allow zero.
7729 (handle_aligned_attribute): Use check_user_alignment.
7730 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
7731
86951993
AM
77322011-11-06 Andrew MacLeod <amacleod@redhat.com>
7733 Richard Henderson <rth@redhat.com>
7734
7735 Merged from cxx-mem-model.
7736
7737 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 7738 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
7739 parameters that are the same type size.
7740 (get_atomic_generic_size): New. Find size of generic
7741 atomic function parameters and do typechecking.
7742 (add_atomic_size_parameter): New. Insert size into parameter list.
7743 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
7744 either __atomic_exchange_n or external library call.
9faeb493 7745 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 7746 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 7747 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
7748 __atomic_load_n or an external library call.
7749 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
7750 __atomic_store_n or an external library call.
7751 (resolve_overloaded_builtin): Handle new __atomic builtins.
7752
cf9e9959
EB
77532011-11-04 Eric Botcazou <ebotcazou@adacore.com>
7754
7755 PR c++/50608
7756 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
7757 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
7758 <INDIRECT_REF>: Return the argument.
7759 <ARRAY_REF>: Remove special code for negative offset.
7760 Call fold_build_pointer_plus instead of size_binop.
7761 (fold_offsetof): Remove STOP_REF argument and adjust.
7762 * c-common.h (fold_offsetof_1): Declare.
7763 (fold_offsetof): Remove STOP_REF argument.
7764
25339f10
JM
77652011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
7766
7767 PR c++/50810
7768 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7769 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7770 Wnarrowing for C++0x and C++98.
7771 * c.opt ([Wnarrowing]): Update.
7772
89401152
PC
77732011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
7774
7775 PR c++/44277
7776 * c.opt: Add Wzero-as-null-pointer-constant.
7777
97e3ad20
JM
77782011-10-31 Jason Merrill <jason@redhat.com>
7779
15694fdd
JM
7780 * c.opt (-fdeduce-init-list): Off by default.
7781
97e3ad20
JM
7782 PR c++/50920
7783 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
7784 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
7785 and -Wc++11-compat.
7786 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
7787
fb9120e3
RAV
77882011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
7789
7790 PR c++/30066
7791 * c.opt (fvisibility-inlines-hidden): Description change.
7792
3ce4f9e4
ESR
77932011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
7794
7795 Implement C++11 user-defined literals.
7796 * c-common.c (build_userdef_literal): New.
7797 * c-common.def: New tree code.
7798 * c-common.h (tree_userdef_literal): New tree struct and accessors.
7799 * c-lex.c (interpret_float): Add suffix parm.
7800 (c_lex_with_flags): Build literal tokens.
7801
5f53c243
PC
78022011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7803
7804 PR c++/50841
7805 Revert:
7806 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7807
7808 PR c++/50810
7809 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7810 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7811 Wnarrowing for C++0x and C++98.
7812 * c.opt ([Wnarrowing]): Update.
7813
263734e1
PC
78142011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
7815
7816 PR c++/50810
7817 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
7818 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
7819 Wnarrowing for C++0x and C++98.
7820 * c.opt ([Wnarrowing]): Update.
7821
d2e312d7
PC
78222011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
7823
7824 PR c++/45385
7825 * c-common.c (conversion_warning): Remove code looking for
7826 artificial operands.
7827
d17687f6
DS
78282011-10-18 Dodji Seketeli <dodji@redhat.com>
7829
7830 PR bootstrap/50760
7831 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 7832 !NO_IMPLICIT_EXTERN_C.
d17687f6 7833
fc8396e9
PC
78342011-10-17 Michael Spertus <mike_spertus@symantec.com>
7835
7836 * c-common.c (c_common_reswords): Add __bases,
7837 __direct_bases.
7838 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
7839
78402011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
7841
7842 PR c++/50757
7843 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
7844
847e697a
TT
78452011-10-15 Tom Tromey <tromey@redhat.com>
7846 Dodji Seketeli <dodji@redhat.com>
7847
7848 * c.opt (fdebug-cpp): New option.
7849 * c-opts.c (c_common_handle_option): Handle the option.
7850 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
7851 output stream in parameter. Factorized from ...
7852 (maybe_print_line): ... this. Dump location debug information when
7853 -fdebug-cpp is in effect.
7854 (print_line_1): New static function. Takes an output stream in
7855 parameter. Factorized from ...
7856 (print_line): ... here. Dump location information when -fdebug-cpp
7857 is in effect.
7858 (scan_translation_unit): Dump location information when
7859 -fdebug-cpp is in effect.
7860
92582b75
TT
78612011-10-15 Tom Tromey <tromey@redhat.com>
7862 Dodji Seketeli <dodji@redhat.com>
7863
7864 * c.opt (ftrack-macro-expansion): New option. Handle it with and
7865 without argument.
7866 * c-opts.c (c_common_handle_option)<case
7867 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
7868 cases. Handle -ftrack-macro-expansion with and without argument.
7869
46427374
TT
78702011-10-15 Tom Tromey <tromey@redhat.com>
7871 Dodji Seketeli <dodji@redhat.com>
7872
7873 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
7874 (print_line, cb_define, do_line_change): Adjust to avoid touching
7875 the internals of struct line_map. Use the public API instead.
7876 * c-pch.c (c_common_read_pch): Likewise.
7877 * c-lex.c (fe_file_change): Likewise.
7878
fc8396e9
PC
78792011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
7880
7881 PR c++/17212
7882 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
7883
78842011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
7885
7886 PR c++/33067
7887 * c-pretty-print.c (pp_c_floating_constant): Output
7888 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
7889
e79983f4
MM
78902011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
7891
7892 * c-common.c (def_builtin_1): Delete old interface with two
7893 parallel arrays to hold standard builtin declarations, and replace
7894 it with a function based interface that can support creating
7895 builtins on the fly in the future. Change all uses, and poison
7896 the old names. Make sure 0 is not a legitimate builtin index.
7897 * c-omp.c (c_finish_omp_barrier): Ditto.
7898 (c_finish_omp_taskwait): Ditto.
7899 (c_finish_omp_flush): Ditto.
7900
6637388f
TG
79012011-10-11 Tristan Gingold <gingold@adacore.com>
7902
7903 * c.opt: (fallow-parameterless-variadic-functions): New.
7904
3797cb21
DS
79052011-09-08 Dodji Seketeli <dodji@redhat.com>
7906
7907 PR c++/33255 - Support -Wunused-local-typedefs warning
7908 * c-common.h (struct c_language_function::local_typedefs): New
7909 field.
9faeb493
UB
7910 (record_locally_defined_typedef, maybe_record_typedef_use)
7911 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 7912 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
7913 (maybe_record_typedef_use)
7914 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
7915 * c.opt: Declare new -Wunused-local-typedefs flag.
7916
693ddb1b
EB
79172011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7918
7919 PR middle-end/50266
7920 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7921 computations.
7922
830c740f
RG
79232011-09-05 Richard Guenther <rguenther@suse.de>
7924
7925 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7926 of integer_minus_one_node for empty array upper bounds.
7927
892a371f
DS
79282011-08-28 Dodji Seketeli <dodji@redhat.com>
7929
7930 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7931 it's the first time it's being called on this main TU.
7932
0e3fdb48
RB
79332011-08-24 Richard Guenther <rguenther@suse.de>
7934
7935 PR c/49396
7936 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7937
79382011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
7939
7940 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7941 defined in cpp_init_builtins and c_cpp_builtins.
7942
d4a83c10
JM
79432011-08-19 Joseph Myers <joseph@codesourcery.com>
7944
7945 * c-common.c (c_common_reswords): Add __builtin_complex.
7946 * c-common.h (RID_BUILTIN_COMPLEX): New.
7947
bbceee64
JM
79482011-08-18 Joseph Myers <joseph@codesourcery.com>
7949
7950 * c-common.c (c_common_reswords): Add _Noreturn.
7951 (keyword_is_function_specifier): Handle RID_NORETURN.
7952 * c-common.h (RID_NORETURN): New.
7953
3f8257db 79542011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
7955
7956 * c-common.c (unsafe_conversion_p): New function. Check if it is
7957 unsafe to convert an expression to the type.
7958 (conversion_warning): Adjust, use unsafe_conversion_p.
7959 * c-common.h (unsafe_conversion_p): New function declaration.
7960
20906c66
JJ
79612011-08-02 Jakub Jelinek <jakub@redhat.com>
7962
7963 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7964 (c_finish_omp_taskyield): New prototype.
7965 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7966 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7967 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7968 or RHS1 have side-effects, evaluate those too in the right spot,
7969 if it is a decl and LHS is also a decl, error out if they
7970 aren't the same.
7971 (c_finish_omp_taskyield): New function.
7972 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7973 * c-pragma.c (omp_pragmas): Add taskyield.
7974 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7975 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7976 PRAGMA_OMP_CLAUSE_MERGEABLE.
7977
770e5a2e
DS
79782011-07-25 Dodji Seketeli <dodji@redhat.com>
7979
7980 * c-common.h (set_underlying_type): Remove parm name from
7981 declaration.
7982
1baae426
RG
79832011-07-25 Romain Geissler <romain.geissler@gmail.com>
7984
7985 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 7986
fcb21722
JM
79872011-07-22 Jason Merrill <jason@redhat.com>
7988
76f86d00
JM
7989 PR c++/49793
7990 * c.opt (Wnarrowing): New.
7991
3a636414
JM
7992 PR c++/30112
7993 * c-common.h: Declare c_linkage_bindings.
7994 * c-pragma.c (handle_pragma_redefine_extname): Use it.
7995
fcb21722
JM
7996 PR c++/49813
7997 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7998 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7999 as flag_isoc99 for 'restrict'.
8000 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8001
02614448
ILT
80022011-07-21 Ian Lance Taylor <iant@google.com>
8003
8004 PR middle-end/49705
8005 * c-common.c (c_disable_warnings): New static function.
8006 (c_enable_warnings): New static function.
8007 (c_fully_fold_internal): Change local unused_p to bool. Call
8008 c_disable_warnings and c_enable_warnings rather than change
8009 c_inhibit_evaluation_warnings.
8010
34429675
JM
80112011-07-20 Jason Merrill <jason@redhat.com>
8012
8013 PR c++/6709 (DR 743)
8014 PR c++/42603 (DR 950)
8015 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8016 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8017 (CPP_DECLTYPE): New.
8018 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8019
5d49b6a7
RG
80202011-07-19 Richard Guenther <rguenther@suse.de>
8021
8022 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8023 * c-omp.c (c_finish_omp_for): Likewise.
8024
e84a58ff
EB
80252011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8026
8027 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8028 body on the next line.
8029
329af3c7
JM
80302011-07-08 Jason Merrill <jason@redhat.com>
8031
4063e61b
JM
8032 PR c++/45437
8033 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8034
329af3c7
JM
8035 PR c++/49673
8036 * c-common.c (c_apply_type_quals_to_decl): Don't check
8037 TYPE_NEEDS_CONSTRUCTING.
8038
1a072294
RG
80392011-07-06 Richard Guenther <rguenther@suse.de>
8040
8041 * c-common.c (c_common_nodes_and_builtins):
8042 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8043
fce5dddd
RG
80442011-07-05 Richard Guenther <rguenther@suse.de>
8045
8046 * c-common.c (c_common_nodes_and_builtins): Build all common
8047 tree nodes first.
8048
45d439ac
JJ
80492011-06-27 Jakub Jelinek <jakub@redhat.com>
8050
56300785
JJ
8051 * c-common.h (c_tree_chain_next): New static inline function.
8052
45d439ac
JJ
8053 * c-common.c (check_builtin_function_arguments): Handle
8054 BUILT_IN_ASSUME_ALIGNED.
8055
e0a8ecf2
AM
80562011-06-21 Andrew MacLeod <amacleod@redhat.com>
8057
8058 * c-common.c: Add sync_ or SYNC__ to builtin names.
8059 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8060
80612011-06-20 Pierre Vittet <piervit@pvittet.com>
8062
8063 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8064 handler.
8065 (gen_pragma_handler): New union.
8066 (internal_pragma_handler): New type.
8067 (c_register_pragma_with_data)
8068 (c_register_pragma_with_expansion_and_data): New functions.
8069
8070 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8071 (c_register_pragma, c_register_pragma_with_expansion)
8072 (c_invoke_pragma_handler): Changed to work with
8073 internal_pragma_handler.
8074 (c_register_pragma_with_data)
8075 (c_register_pragma_with_expansion_and_data): New functions.
8076
677f3fa8
JM
80772011-06-14 Joseph Myers <joseph@codesourcery.com>
8078
8079 * c-common.c: Include common/common-target.h.
8080 (handle_section_attribute): Use
8081 targetm_common.have_named_sections.
8082 * c-cppbuiltin.c: Include common/common-target.h.
8083 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8084
d7fc8c14
RG
80852011-06-10 Richard Guenther <rguenther@suse.de>
8086
8087 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8088 to print a IDENTIFIER_NODE.
8089
10e48e39
RO
80902011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8091 Joseph Myers <joseph@codesourcery.com>
8092
8093 * c.opt (fbuilding-libgcc): New option.
8094 * c-cppbuiltin.c (c_cpp_builtins): Define
8095 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8096
6976ae51
JM
80972011-06-07 Jason Merrill <jason@redhat.com>
8098
3ff60975
JM
8099 * c-common.c (max_tinst_depth): Lower default to 900.
8100
6976ae51
JM
8101 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8102
009db074
RG
81032011-06-07 Richard Guenther <rguenther@suse.de>
8104
8105 * c-common.c (c_common_nodes_and_builtins): Do not set
8106 size_type_node or call set_sizetype.
8107
b4592b92
DS
81082011-06-07 Dodji Seketeli <dodji@redhat.com>
8109
8110 PR debug/49130
8111 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8112 type when using pointer comparison to compare types.
b4592b92 8113
014ab419
JW
81142011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8115
8116 * c.opt: Add -Wdelete-non-virtual-dtor.
8117 * c-opts.c (c_common_handle_option): Include it in -Wall.
8118
4f60111f
NF
81192011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8120
8121 PR bootstrap/49190
8122
8123 Revert:
8124 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8125
8126 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8127 not tree_common.
8128
4cc4f2f4
JJ
81292011-05-27 Jakub Jelinek <jakub@redhat.com>
8130
8131 PR c++/49165
8132 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8133 C++ don't call c_common_truthvalue_conversion on void type arms.
8134
38e01f9e
NF
81352011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8136
8137 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8138 (stmt_list_stack): Define.
8139 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8140 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8141
92e948a8
NF
81422011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8143
8144 * c-common.c (warning_candidate_p): Check for BLOCKs.
8145
a2fc3e63
NF
81462011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8147
8148 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8149 not tree_common.
8150
0957c029
JJ
81512011-05-25 Jakub Jelinek <jakub@redhat.com>
8152
8153 * c-common.c (def_fn_type): Remove extra va_end.
8154
828fb3ba
JM
81552011-05-23 Jason Merrill <jason@redhat.com>
8156
8157 PR c++/48106
8158 * c-common.c (c_common_get_narrower): New.
8159 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8160
dde05067
NF
81612011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8162
8163 * c-common.h (check_function_arguments): Tweak prototype of
8164 check_function_arguments.
8165 * c-common.c (check_function_arguments): Likewise. Adjust
8166 calls to check_function_nonnull, check_function_format, and
8167 check_function_sentinel.
8168 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8169 separate attributes and typelist arguments. Use
8170 FOREACH_FUNCTION_ARGS to iterate over argument types.
8171
3c0d13bf
PC
81722011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8173
8174 * c-common.c (c_common_reswords): Reorder.
8175 * c-common.h (rid): Likewise.
8176
8242dd04
NF
81772011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8178
8179 * c-common.c (def_fn_type): Don't call build_function_type, call
8180 build_function_type_array or build_varargs_function_type_array
8181 instead.
8182 (c_common_nodes_and_builtins): Likewise.
8183
3d528853
NF
81842011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8185
8186 * c-common.c (c_add_case_label): Omit the loc argument to
8187 build_case_label.
8188 * c-common.h (build_case_label): Remove.
8189 * c-semantics.c (build_case_label): Remove.
8190
a04a722b
JM
81912011-05-05 Joseph Myers <joseph@codesourcery.com>
8192
8193 * c-objc.h (objc_start_method_definition): Update prototype.
8194 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8195
e19a18d4
NF
81962011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8197
8198 * c-common.c (check_main_parameter_types): Reindent. Don't use
8199 TYPE_ARG_TYPES directly.
8200 (handle_nonnull_attribute): Likewise.
8201 (sync_resolve_params): Likewise.
8202 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8203 to check_format_string.
8204 (handle_format_attribute): Likewise.
8205 (check_format_string): Take a function type to examine instead of
8206 a type list. Use a function_arg_iterator to step through argument
8207 types.
8208
c62c040f
RG
82092011-05-04 Richard Guenther <rguenther@suse.de>
8210
8211 * c-common.c (fix_string_type): Use size_int for index type bounds.
8212 (start_fname_decls): Do not pass NULL to build_int_cst.
8213 (c_init_attributes): Likewise.
8214 * c-lex.c (c_lex_with_flags): Likewise.
8215
c12ff9d8
JM
82162011-04-27 Jason Merrill <jason@redhat.com>
8217
8218 * c-common.c (make_tree_vector_from_list): New.
8219 * c-common.h: Declare it.
8220
304dfbe3
RG
82212011-04-26 Richard Guenther <rguenther@suse.de>
8222
8223 PR preprocessor/48248
8224 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8225 for output size with -P.
8226
3c0d13bf
PC
82272011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8228
8229 * c-common.c (struct c_common_resword): Add __underlying_type.
8230 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8231
04695783
JM
82322011-04-20 Jim Meyering <meyering@redhat.com>
8233
8234 * c-format.c (init_dollar_format_checking): Remove useless
8235 if-before-free.
8236
0dc33c3c
NP
82372011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8238
8239 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8240 (objc_detect_field_duplicates): New.
0dc33c3c 8241 * stub-objc.c: Likewise.
3c0d13bf 8242
c59633d9
NP
82432011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8244
8245 * stub-objc.c (objc_declare_protocols): Renamed to
8246 objc_declare_protocol.
8247 * c-objc.h: Likewise.
3c0d13bf 8248
32dabdaf
NP
82492011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8250
8251 * stub-objc.c (objc_declare_class): Updated argument name.
8252
81f653d6
NF
82532011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8254
8255 * c-common.h (c_common_init_ts): Declare.
8256 * c-common.c (c_common_init_ts): Define.
8257
eb345401
NP
82582011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8259
8260 * c-objc.h (objc_build_message_expr): Updated prototype.
8261 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8262
a358e188
MJ
82632011-04-12 Martin Jambor <mjambor@suse.cz>
8264
8265 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8266 of cgraph_node.
8267
e6313a78
RG
82682011-04-11 Richard Guenther <rguenther@suse.de>
8269
8270 * c-common.c (complete_array_type): Build a range type of
8271 proper type.
8272
dcf0c47e
NF
82732011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8274
8275 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8276 (handle_type_generic_attribute): Likewise.
8277
1ee44b26
JM
82782011-04-07 Jason Merrill <jason@redhat.com>
8279
8280 PR c++/48450
8281 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8282 conversion from C++0x scoped enum.
8283
acce4e77
JM
82842011-04-06 Joseph Myers <joseph@codesourcery.com>
8285
8286 * c-target-def.h: New file.
8287 * c-target.def: New file.
8288 * c-target.h: New file.
8289 * c-common.c (targetcm): Don't define here.
8290 * c-common.h (default_handle_c_option): Declare.
8291 * c-format.c: Include c-target.h instead of target.h.
8292 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8293 include tm.h.
8294 (default_handle_c_option): Move from targhooks.c.
8295
e2eefb55
JJ
82962011-03-29 Jakub Jelinek <jakub@redhat.com>
8297
8298 PR preprocessor/48248
8299 * c-ppoutput.c (print): Add src_file field.
8300 (init_pp_output): Initialize it.
8301 (maybe_print_line): Don't optimize by adding up to 8 newlines
8302 if map->to_file and print.src_file are different file.
8303 (print_line): Update print.src_file.
8304
ba78087b
KT
83052011-03-25 Kai Tietz <ktietz@redhat.com>
8306
8307 * c-ada-spec.c (compare_comment): Use filename_cmp
8308 instead of strcmp for filename.
8309
0edf1bb2
JL
83102011-03-25 Jeff Law <law@redhat.com>
8311
adfac8df 8312 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8313
c7dc8804
JM
83142011-03-25 Jason Merrill <jason@redhat.com>
8315
8316 * c.opt: Add -std=c++03.
8317
d1d879b1
EB
83182011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8319
8320 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8321
3f8257db 83222011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
8323
8324 PR target/12171
5050afdf
KT
8325 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8326 Display allowed attributes for function pointer types.
8327 (pp_c_attributes_display): New function to display
8328 attributes having affects_type_identity flag set to true.
8329 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8330
62d784f7
KT
8331 * c-common.c (c_common_attribute_table):
8332 Add new element.
8333 (c_common_format_attribute_table): Likewise.
8334
82d37118
JM
83352011-03-18 Jason Merrill <jason@redhat.com>
8336
49a000c3
JM
8337 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8338 * c-common.h: Don't declare it here.
8339 * c-common.c: Or define it here.
8340 * c-opts.c (c_common_handle_option): Or set it here.
8341
82d37118
JM
8342 PR c++/35315
8343 * c-common.c (handle_transparent_union_attribute): Don't
8344 make a duplicate type in C++.
8345
17bc631c
JM
83462011-03-15 Jason Merrill <jason@redhat.com>
8347
8348 * c-common.c (max_constexpr_depth): New.
8349 * c-common.h: Declare it.
8350 * c-opts.c (c_common_handle_option): Set it.
8351 * c.opt (fconstexpr-depth): New option.
8352
1b9b91a6
JM
83532011-03-11 Jason Merrill <jason@redhat.com>
8354
f231b5ff
JM
8355 * c-common.c (attribute_takes_identifier_p): Add missing const.
8356
1b9b91a6
JM
8357 PR c++/46803
8358 * c-common.c (attribute_takes_identifier_p): Assume that an
8359 unknown attribute takes an identifier.
8360
a19e4d44
NF
83612011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8362
8363 PR c/47786
8364 * c-common.c (c_type_hash): Call list_length instead of iterating
8365 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8366
982d62f6
JJ
83672011-02-19 Jakub Jelinek <jakub@redhat.com>
8368
8369 PR c/47809
8370 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8371
0a256240
NP
83722011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8373
8374 * c.opt (fobjc-abi-version=) New.
8375 (fobjc-nilcheck): New.
8376
ba9e6dd5
NF
83772011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8378
8379 PR c++/46890
8380 * c-common.h (keyword_is_decl_specifier): Declare.
8381 * c-common.c (keyword_is_decl_specifier): Define.
8382 (keyword_is_function_specifier): New function.
8383
7273813a
JJ
83842011-01-26 Jakub Jelinek <jakub@redhat.com>
8385
8386 PR c/47473
8387 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8388 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8389 REAL_TYPE.
8390
908ef79b
AC
83912011-01-26 Arnaud Charlet <charlet@adacore.com>
8392
8393 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8394
237e9384
JJ
83952011-01-26 Jakub Jelinek <jakub@redhat.com>
8396
8397 PR pch/47430
8398 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8399 after init_c_lex if pch_file is set.
8400
47ea1edf
DK
84012011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8402
d4dba752 8403 PR c++/43601
47ea1edf
DK
8404 * c.opt (-fkeep-inline-dllexport): New switch.
8405
2aa9c6ae
RG
84062011-01-12 Richard Guenther <rguenther@suse.de>
8407
8408 PR middle-end/32511
8409 * c-common.c (handle_weak_attribute): Warn instead of error
8410 on declaring an inline function weak.
8411
7bd11157
TT
84122011-01-05 Tom Tromey <tromey@redhat.com>
8413
8414 * c-common.h (lvalue_error): Update.
8415 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8416 not error.
8417
0e66e494 84182010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 8419
b4f588c4
NP
8420 PR objc/47075
8421 * c-objc.h (objc_finish_message_expr): Added argument to
8422 prototype.
8423
f4da8dce
NF
84242010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8425
8426 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8427 Use prototype_p.
8428
46270f14
NP
84292010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8430
8431 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 8432 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 8433
4816c593
NF
84342010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8435
8436 * c-common.h (readonly_error): Declare.
8437 * c-common.c (readonly_error): Define.
8438
7a6daeb0
NF
84392010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8440
8441 * c-common.h (invalid_indirection_error): Declare.
8442 * c-common.c (invalid_indirection_error): Define.
8443
892f6119
RG
84442010-12-03 Richard Guenther <rguenther@suse.de>
8445
8446 PR c/46745
8447 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8448 (pp_c_unary_expression): Likewise.
8449 (pp_c_expression): Likewise.
8450
6c39e757
NP
84512010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8452
8453 * c-common.h (objc_finish_function): New.
8454 (objc_non_volatilized_type): Removed.
8455 (objc_type_quals_match): Removed.
8456 * stub-objc.c (objc_finish_function): New.
8457 (objc_non_volatilized_type): Removed.
8458 (objc_type_quals_match): Removed.
9faeb493 8459
7c475d11
JM
84602010-11-30 Joseph Myers <joseph@codesourcery.com>
8461
8462 * c-common.h (parse_optimize_options): Declare.
8463 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8464 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8465
71f3e391
JM
84662010-11-29 Joseph Myers <joseph@codesourcery.com>
8467
8468 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8469 GET_ENVIRONMENT.
8470 * c-pch.c (O_BINARY): Don't define here.
8471 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8472
d5fabb58
JM
84732010-11-25 Joseph Myers <joseph@codesourcery.com>
8474
8475 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8476 targetm.except_unwind_info.
8477
299404a1
JM
84782010-11-23 Joseph Myers <joseph@codesourcery.com>
8479
8480 * c-opts.c (c_common_handle_option): Pass location to
8481 set_struct_debug_option.
8482
c98cd5bf
JM
84832010-11-23 Joseph Myers <joseph@codesourcery.com>
8484
8485 * c-common.c (visibility_options): Move from ../opts.c.
8486 * c-common.h (struct visibility_flags, visibility_options):
8487 Declare here.
8488 * c-opts.c (finish_options): Rename to c_finish_options.
8489 (c_common_init): Update call to finish_options.
8490
a9546771
NP
84912010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8492
8493 PR objc/34033
8494 * c-lex.c (lex_string): Check that each string in an Objective-C
8495 string concat sequence starts with either one or zero '@', and
8496 that there are no spurious '@' signs at the end.
8497
24a57808
JM
84982010-11-20 Joseph Myers <joseph@codesourcery.com>
8499
8500 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8501 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8502 HANDLE_PRAGMA_VISIBILITY.
8503 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8504 HANDLE_PRAGMA_VISIBILITY): Don't define.
8505 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8506
a9aa2c3a
NF
85072010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8508
8509 PR c++/16189
8510 PR c++/36888
8511 PR c++/45331
8512 * c-common.h (keyword_begins_type_specifier): Declare.
8513 (keyword_is_storage_class_specifier): Declare.
8514 (keyword_is_type_qualifier): Declare.
8515 * c-common.c (keyword_begins_type_specifier): New function.
8516 (keyword_is_storage_class_specifier): New function.
8517 (keyword_is_type_qualifier): Declare.
8518
5386338c
JM
85192010-11-19 Joseph Myers <joseph@codesourcery.com>
8520
8521 PR c/46547
8522 * c-common.c (in_late_binary_op): Define.
8523 (c_common_truthvalue_conversion): Check in_late_binary_op before
8524 calling c_save_expr.
8525 * c-common.h (in_late_binary_op): Declare.
8526
69ccdddb
JM
85272010-11-19 Joseph Myers <joseph@codesourcery.com>
8528
8529 * c-opts.c (c_common_handle_option): Update calls to
8530 set_struct_debug_option.
8531
6b192a09
NP
85322010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8533
8534 * c-common.h (objc_declare_protocols): Added additional argument.
8535 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 8536
fb52b50a
NF
85372010-11-18 Nathan Froyd <froydnj@codesourcery.com>
8538
8539 PR c/33193
8540 * c-common.h (build_real_imag_expr): Declare.
8541 * c-semantics.c (build_real_imag_expr): Define.
8542
b37421c6
JM
85432010-11-17 Joseph Myers <joseph@codesourcery.com>
8544
8545 * c-opts.c (c_common_parse_file): Take no arguments.
8546 * c-common.h (c_common_parse_file): Update prototype.
8547
07078664
JJ
85482010-11-16 Jakub Jelinek <jakub@redhat.com>
8549
8550 PR c++/46401
8551 * c-common.c (warning_candidate_p): Don't track non-const calls
8552 or STRING_CSTs.
8553
c6a13190
ILT
85542010-11-15 Ian Lance Taylor <iant@google.com>
8555
8556 * c-lex.c (init_c_lex): Set macro debug callbacks if
8557 flag_dump_go_spec is set.
8558
925e8657
NP
85592010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
8560
8561 * c-common.h (objc_build_incr_expr_for_property_ref): New.
8562 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
8563
bb0a9581
NF
85642010-11-15 Nathan Froyd <froydnj@codesourcery.com>
8565
8566 PR preprocessor/45038
8567 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
8568 dialects.
8569
c5fa0890
JM
85702010-11-12 Joseph Myers <joseph@codesourcery.com>
8571
8572 * c-common.h (c_family_lang_mask): Declare.
8573 * c-opts.c (c_family_lang_mask): Make extern.
8574 * c-pragma.c (handle_pragma_diagnostic): Use
8575 control_warning_option.
8576
a4d8c676
JM
85772010-11-12 Joseph Myers <joseph@codesourcery.com>
8578
8579 * c-common.c (parse_optimize_options): Update call to
8580 decode_options.
8581 * c-common.h (c_common_handle_option): Update prototype.
8582 * c-opts.c (c_common_handle_option): Take location_t parameter and
8583 pass it to other functions.
8584
f954bd2c
JM
85852010-11-11 Joseph Myers <joseph@codesourcery.com>
8586
8587 * c-opts.c (warning_as_error_callback): Remove.
8588 (c_common_initialize_diagnostics): Don't call
8589 register_warning_as_error_callback.
8590 (c_common_handle_option): Handle -Werror=normalized= here.
8591
d8a07487
JM
85922010-11-10 Joseph Myers <joseph@codesourcery.com>
8593
8594 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
8595 in diagnostic.
8596 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
8597 letter.
8598 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
8599 Remove trailing '.' from diagnostics.
8600 * c.opt (Wwrite-strings_: Avoid '`' in help text.
8601
d5478783
JM
86022010-11-10 Joseph Myers <joseph@codesourcery.com>
8603
8604 * c-common.c (parse_optimize_options): Pass global_dc to
8605 decode_options.
8606 * c-opts.c (c_common_handle_option): Pass &global_options to
8607 set_Wstrict_aliasing.
8608 * c.opt (v): Don't mark Common or document here.
8609
91ebb981
IS
86102010-11-06 Iain Sandoe <iains@gcc.gnu.org>
8611
8612 PR target/44981
8613 * c-format.c (format_type): New type gcc_objc_string_format_type.
8614 (valid_stringptr_type_p): New.
8615 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 8616 (check_format_string): Pass expected type, use
91ebb981
IS
8617 valid_stringptr_type_p (), check that the format string types are
8618 consistent with the format specification.
8619 (decode_format_attr): Warn if NSString is used outside objective-c.
8620 (format_types_orig): Add NSString.
8621 (format_name): New.
8622 (format_flags): New.
8623 (check_format_arg): Handle format strings requiring an external parser.
8624 first_target_format_type: New variable.
8625 (handle_format_attribute): Set up first_target_format_type, pass the
8626 expected format arg string type to check_format_string().
8627 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
8628 * stub-objc.c (objc_string_ref_type_p): New.
8629 (objc_check_format_arg): New.
8630
bede2adc
NP
86312010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
8632
9faeb493 8633 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
8634 * c-common.h (objc_build_class_component_ref): New.
8635 * stub-objc.c (objc_build_class_component_ref): New.
8636
9a179d01
NP
86372010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8638
8639 * c.opt (Wproperty-assign-default): New option.
8640
22d8d616
NP
86412010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
8642
8643 Implemented -fobjc-std=objc1 flag.
8644 * c.opt (fobjc-std=objc1): New option.
8645
2debdb4f
NP
86462010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
8647
8648 Implemented format and noreturn attributes for Objective-C methods.
8649 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
8650 attribute for Objective-C methods.
8651
ec52b111
JM
86522010-10-31 Jason Merrill <jason@redhat.com>
8653
8654 * c-common.c (conversion_warning, warn_for_collisions_1): Use
8655 EXPR_LOC_OR_HERE.
8656
46a88c12
NP
86572010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
8658
8659 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
8660 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
8661 (objc_add_property_declaration): Removed arguments for copies and
8662 ivar.
8663 (objc_build_getter_call): Renamed to
8664 objc_maybe_build_component_ref.
8665 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8666 (objc_is_property_ref): New.
8667 * c-common.c (c_common_reswords): Removed copies and ivar.
8668 * stub-objc.c (objc_add_property_declaration): Removed arguments
8669 for copies and ivar.
8670 (objc_build_getter_call): Renamed to
8671 objc_maybe_build_component_ref.
8672 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
8673 (objc_is_property_ref): New.
9faeb493 8674
1e4bf85b
AC
86752010-10-29 Arnaud Charlet <charlet@adacore.com>
8676 Matthew Gingell <gingell@adacore.com>
8677
8678 * c-ada-spec.c (separate_class_package): New function.
8679 (pp_ada_tree_identifier): Prefix references to C++ classes with the
8680 name of their enclosing package.
8681 (print_ada_declaration): Use separate_class_package.
8682
81f0bab2
JM
86832010-10-27 Jason Merrill <jason@redhat.com>
8684
2b08f2c5
JM
8685 * c-common.c (c_common_reswords): Add __is_literal_type.
8686 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
8687
81f0bab2
JM
8688 * c-common.c (check_case_value): Remove special C++ code.
8689
200290f2
NP
86902010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8691
8692 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
8693 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
8694 and RID_LAST_PATTR.
8695 (objc_add_property_declaration): Added additional arguments.
8696 (objc_property_attribute_kind): Removed.
8697 (objc_set_property_attr): Removed.
8698 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
8699 copy and nonatomic.
8700 * stub-objc.c (objc_add_property_declaration): Added additional
8701 arguments.
8702 (objc_set_property_attr): Removed.
9faeb493 8703
f614132b
NP
87042010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
8705
8706 * c-common.h (objc_add_property_variable): Renamed to
8707 objc_add_property_declaration. Added location argument.
8708 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 8709
b8a18805
NP
87102010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
8711
8712 * c-common.h (objc_maybe_printable_name): New.
8713 * stub-objc.c (objc_maybe_printable_name): New.
8714
3f8257db
JJ
87152010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8716 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
8717
8718 * c-common.h (c_common_mark_addressable_vec): Declare.
8719 * c-common.c (c_common_mark_addressable_vec): New function.
8720
249a82c4
NP
87212010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8722
8723 * c-common.h (objc_set_method_type): Removed.
8724 (objc_add_method_declaration): Added boolean argument.
8725 (objc_start_method_definition): Same change.
8726 (objc_build_method_signature): Same change.
8727 * stub-objc.c (objc_set_method_type): Removed.
8728 (objc_add_method_declaration): Added boolean argument.
8729 (objc_start_method_definition): Same change.
8730 (objc_build_method_signature): Same change.
8731
977e30bc
NP
87322010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
8733
8734 * c-common.h (finish_file): Removed.
8735 (objc_write_global_declarations): New.
8736 * c-opts.c (c_common_parse_file): Do not call finish_file.
8737 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 8738
da57d1b9
NP
87392010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8740
8741 Implemented parsing @synthesize and @dynamic for
8742 Objective-C/Objective-C++.
8743 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
8744 (objc_add_synthesize_declaration): New.
8745 (objc_add_dynamic_declaration): New.
8746 * c-common.c (c_common_reswords): Add synthesize and dynamic.
8747 * stub-objc.c (objc_add_synthesize_declaration): New.
8748 (objc_add_dynamic_declaration): New.
9faeb493 8749
0069111f
MM
87502010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
8751
8752 PR target/46041
8753 * c-cppbuiltin.c (mode_has_fma): Move function here from
8754 builtins.c. Don't use the fma optab, instead just use the
8755 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
8756 using -save-temps.
8757
e426b47b
NP
87582010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
8759
8760 Merge from 'apple/trunk' branch on FSF servers.
0069111f 8761
3f8257db 8762 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 8763
9faeb493 8764 Radar 4330422
e426b47b
NP
8765 * c-common.h (objc_non_volatilized_type): New declaration
8766 * stub-objc.c (objc_non_volatilized_type): New stub.
8767
90fbfdc3
NP
87682010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
8769
e426b47b 8770 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 8771
3f8257db 8772 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 8773
9faeb493 8774 Radar 4133425
90fbfdc3 8775 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 8776 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 8777
c37d8c30
IS
87782010-10-17 Iain Sandoe <iains@gcc.gnu.org>
8779
8780 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
8781 * c-common.h (enum rid): Add RID_AT_PACKAGE.
8782 (objc_ivar_visibility_kind): New enum.
8783 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 8784 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
8785 visibility enum.
8786
1b1562a5
MM
87872010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
8788
8789 * c-cppbuiltin.c (builtin_define_float_constants): Emit
8790 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
8791 has the appropriate fma builtins.
8792 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
8793
668ea4b1
IS
87942010-10-14 Iain Sandoe <iains@gcc.gnu.org>
8795
1b1562a5 8796 merge from FSF apple 'trunk' branch.
3f8257db 8797 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 8798
668ea4b1
IS
8799 Radars 4436866, 4505126, 4506903, 4517826
8800 * c-common.c (c_common_resword): Define @property and its attributes.
8801 * c-common.h: Define property attribute enum entries.
8802 (OBJC_IS_PATTR_KEYWORD): New.
8803 (objc_property_attribute_kind): New enum.
8804 Declare objc_set_property_attr (), objc_add_property_variable (),
8805 objc_build_getter_call () and objc_build_setter_call ().
8806 * stub-objc.c (objc_set_property_attr): New stub.
8807 (objc_add_property_variable): Likewise.
8808 (objc_build_getter_call): Likewise.
8809 (objc_build_setter_call) Likewise.
1b1562a5 8810
a1178b30
IS
88112010-10-13 Iain Sandoe <iains@gcc.gnu.org>
8812
1b1562a5 8813 merge from FSF apple 'trunk' branch.
3f8257db 8814 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
8815
8816 Radar 3803157 (method attributes)
8817 * c-common.c (handle_deprecated_attribute): Recognize
8818 objc methods as valid declarations.
8819 * c-common.h: Declare objc_method_decl ().
1b1562a5 8820 * stub-objc.c (objc_method_decl): New stub.
a1178b30 8821
a75bfaa6
JM
88222010-10-08 Joseph Myers <joseph@codesourcery.com>
8823
8824 * c-common.c (parse_optimize_options): Call
8825 decode_cmdline_options_to_array_default_mask before
8826 decode_options. Update arguments to decode_options.
8827 * c-common.h (c_common_init_options_struct): Declare.
8828 * c-opts.c (c_common_init_options_struct): New. Split out from
8829 c_common_init_options.
8830
f05b9d93
NP
88312010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
8832
8833 Implemented fast enumeration for Objective-C.
8834 * c-common.h (objc_finish_foreach_loop): New.
8835 * stub-objc.c (objc_finish_foreach_loop): New.
8836
1ebe4b4f
JM
88372010-10-05 Joseph Myers <joseph@codesourcery.com>
8838
8839 * c-common.h (struct diagnostic_context): Don't declare here.
8840 (c_common_initialize_diagnostics): Declare using
8841 diagnostic_context typedef.
8842 * c-opts.c (c_common_handle_option): Pass global_dc to
8843 handle_generated_option.
8844
d4d24ba4
JM
88452010-10-04 Joseph Myers <joseph@codesourcery.com>
8846
8847 * c-opts.c (c_common_handle_option): Pass &global_options_set to
8848 handle_generated_option.
8849
478a1c5b
ILT
88502010-10-03 Ian Lance Taylor <iant@google.com>
8851
8852 * c.opt (-fplan9-extensions): New option.
8853
82a1c2fe
FXC
88542010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
8855
8856 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
8857 Remove.
8858 (c_cpp_builtins): Call functions from cppbuiltin.c instead
8859 of duplicating code.
8860
92902b1b
IS
88612010-09-30 Iain Sandoe <iains@gcc.gnu.org>
8862
8863 * c-common.c: Add two new entries for @optional
8864 and @required keywords.
8865
8866 merge from FSF 'apple/trunk' branch.
3f8257db 8867 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
8868
8869 Radar 4386773
8870 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
8871 objective-c keywords.
8872 (objc_set_method_opt): New declaration.
8873 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 8874
46625112
JM
88752010-09-30 Joseph Myers <joseph@codesourcery.com>
8876
8877 * c-common.c (handle_optimize_attribute): Pass &global_options to
8878 cl_optimization_save and cl_optimization_restore.
8879 * c-opts.c (c_common_handle_option): Pass &global_options to
8880 handle_generated_option.
8881 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
8882 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
8883 &global_options to cl_optimization_restore.
8884
49b91f05
NP
88852010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
8886
8887 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
8888 Objective-C/Objective-C++ keywords.
8889
13ed556f 88902010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 8891
9faeb493
UB
8892 Merge from 'apple/trunk' branch on FSF servers.
8893
3f8257db 8894 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
8895
8896 Radar 4281748
8897 * c-common.h (objc_check_global_decl): New declaration.
8898 * stub-objc.c (objc_check_global_decl): New stub.
8899
f0036cca
JM
89002010-09-29 Joseph Myers <joseph@codesourcery.com>
8901
8902 * c.opt: Don't use VarExists.
8903
e3339d0f
JM
89042010-09-29 Joseph Myers <joseph@codesourcery.com>
8905
8906 * c-common.c (c_cpp_error): Update names of diagnostic_context
8907 members.
8908 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8909 cl_optimization members.
8910 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8911 sanitize_cpp_opts, finish_options): Update names of cpp_options
8912 members.
8913
1973201f
NP
89142010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8915
8916 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8917 (objc_is_reserved_word): Removed.
8918 * c-common.c: Updated comments.
8919 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8920 objc_is_reserved_word.
8921 * stub-objc.c (objc_is_reserved_word): Removed.
8922
f7e71da5
IS
89232010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8924
9faeb493 8925 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
8926 include attributes.
8927 (objc_start_method_definition): Likewise.
8928 (objc_build_keyword_decl): Likewise.
8929 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8930 (objc_start_method_definition): Likewise.
8931 (objc_build_keyword_decl): Likewise.
8932
c165dca7
IS
89332010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8934
8935 * c-common.h (objc_start_class_interface): Adjust prototype.
8936 (objc_start_category_interface): Likewise.
8937 (objc_start_protocol): Likewise.
8938 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8939 (objc_start_class_interface): Likewise.
8940 (objc_start_category_interface): Likewise.
8941
7458026b
ILT
89422010-09-27 Ian Lance Taylor <iant@google.com>
8943
8944 * c-common.c (c_common_attribute_table): Add no_split_stack.
8945 (handle_no_split_stack_attribute): New static function.
8946
b581b85b
NP
89472010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8948
9faeb493 8949 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 8950
3f8257db 8951 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 8952
9faeb493 8953 Radar 4229905
b581b85b
NP
8954 * c-common.h (objc_have_common_type): New declaration.
8955 * stub-objc.c (objc_have_common_type): New stub.
8956
8957 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8958
8959 Radar 4154928
8960 * c-common.h (objc_common_type): New prototype.
9faeb493 8961 * stub-objc.c (objc_common_type): New stub.
b581b85b 8962
46a4da10
JH
89632010-09-24 Jan Hubicka <jh@suse.cz>
8964
8965 * c-common.c (handle_leaf_attribute): New function.
8966 (struct attribute_spec c_common_att): Add leaf.
8967
e200444e
JM
89682010-09-22 Joseph Myers <joseph@codesourcery.com>
8969
8970 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8971 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8972 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8973 -include-barrier, -include-directory, -include-directory=,
8974 -include-directory-after, -include-directory-after=,
8975 -include-prefix, -include-prefix=, -include-with-prefix,
8976 -include-with-prefix=, -include-with-prefix-after,
8977 -include-with-prefix-after=, -include-with-prefix-before,
8978 -include-with-prefix-before=, -no-integrated-cpp,
8979 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8980 -output=, -pedantic, -pedantic-errors, -preprocess,
8981 -print-missing-file-dependencies, -trace-includes, -traditional,
8982 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8983 -user-dependencies, -verbose, -write-dependencies,
8984 -write-user-dependencies, no-integrated-cpp, traditional): New.
8985
29a80ea6
NP
89862010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8987
8988 PR objc/23710
ac1fc2fc
NP
8989 * c-common.h (objc_start_method_definition): Return bool instead
8990 of void.
8991 * stub-objc.c (objc_start_method_definition): Return bool instead
8992 of void.
8993
89942010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8995
8996 PR objc/25965
8997 * c-common.h (objc_get_interface_ivars): New declaration.
8998 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 8999
de621752
ILT
90002010-09-15 Ian Lance Taylor <iant@google.com>
9001
9002 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9003 messages. Remove period at end of warning message.
de621752 9004
ba885ec5
NS
90052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9006
9007 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9008 (handle_alias_attribute): ... here.
9009 (handle_ifunc_attribute): New.
9010
c5ee1358
MM
90112010-09-06 Mark Mitchell <mark@codesourcery.com>
9012
9013 * c-common.h (do_warn_double_promotion): Declare.
9014 * c-common.c (do_warn_double_promotion): Define.
9015
0a0b3574
MM
90162010-09-05 Mark Mitchell <mark@codesourcery.com>
9017
9018 * c.opt (Wdouble-promotion): New.
9019
d1779886
JM
90202010-09-02 Joseph Myers <joseph@codesourcery.com>
9021
9022 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9023 fvtable-thunks, fxref): Mark no longer supported in help text.
9024
2d2bd949
JM
90252010-09-02 Joseph Myers <joseph@codesourcery.com>
9026
9027 * c.opt (Wimport, fall-virtual, falt-external-templates,
9028 fdefault-inline, fenum-int-equiv, fexternal-templates,
9029 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9030 fname-mangling-version-, fnew-abi, fnonnull-objects,
9031 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9032 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9033 applicable.
9034 (fhandle-exceptions): Mark with Alias and Warn.
9035 * c-opts.c (c_common_handle_option): Don't handle options marked
9036 as ignored.
9037
5de8299c
JM
90382010-09-02 Joseph Myers <joseph@codesourcery.com>
9039
9040 * c.opt (Wcomments, Werror-implicit-function-declaration,
9041 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9042 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9043 aliases.
9044 * c-common.c (option_codes): Use OPT_Wcomment instead of
9045 OPT_Wcomments.
9046 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9047 Don't handle options marked as aliases.
9048
0ceb0201
RG
90492010-08-25 Richard Guenther <rguenther@suse.de>
9050
9051 * c-common.c (c_common_get_alias_set): Remove special
9052 handling for pointers.
9053
ac47786e
NF
90542010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9055
9056 * c-common.c: Use FOR_EACH_VEC_ELT.
9057 * c-gimplify.c: Likewise.
9058 * c-pragma.c: Likewise.
9059
c878765b
JM
90602010-08-16 Joseph Myers <joseph@codesourcery.com>
9061
9062 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9063 RejectDriver.
9064 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9065 RejectDriver.
9066 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9067 instead of OPT_MDX and OPT_MMDX.
9068
603349bf
JM
90692010-08-16 Joseph Myers <joseph@codesourcery.com>
9070
9071 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9072
644fa7ac
JM
90732010-08-12 Joseph Myers <joseph@codesourcery.com>
9074
9075 * c.opt (MD, MMD): Change to MDX and MMDX.
9076 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9077
481e1176
JM
90782010-08-11 Joseph Myers <joseph@codesourcery.com>
9079
9080 * c-opts.c (c_common_handle_option): Call handle_generated_option
9081 instead of handle_option.
9082
ac8dc9f7
NF
90832010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9084
9085 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9086 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9087
4f8c876d
NF
90882010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9089
9090 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9091 (pending_redefine_extname): Change type to a VEC.
9092 (add_to_renaming_pragma_list): Update for new type of
9093 pending_redefine_extname.
ac8dc9f7 9094 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9095
3b0c690e
AC
90962010-08-04 Arnaud Charlet <charlet@adacore.com>
9097
9098 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9099 visited.
9100 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9101 decide whether a type has already been declared/seen.
9102 Do not go to the original type.
9103 (dump_nested_types): New parameter forward.
9104 Generate forward declaration if needed and mark type as visited.
9105 (print_ada_declaration): Call dump_nested_types if not already done.
9106 Mark types as visited.
9107
1890bccc
JM
91082010-08-03 Joseph Myers <joseph@codesourcery.com>
9109
9110 * c.opt (-print-pch-checksum): Remove option.
9111 * c-opts.c (c_common_handle_option): Don't handle
9112 OPT_print_pch_checksum.
9113
5f20c657
JM
91142010-07-27 Joseph Myers <joseph@codesourcery.com>
9115
9116 * c-common.h (c_common_handle_option): Update prototype and return
9117 value type.
9118 * c-opts.c (c_common_handle_option): Update prototype and return
9119 value type. Update calls to handle_option and
9120 enable_warning_as_error.
9121
f551f80c
JJ
91222010-07-27 Jakub Jelinek <jakub@redhat.com>
9123
9124 PR c/45079
9125 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9126
61ff2bdc
JM
91272010-07-27 Joseph Myers <joseph@codesourcery.com>
9128
9129 * c-common.h (c_common_missing_argument): Remove.
9130 * c-opts.c (c_common_missing_argument): Remove.
9131 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9132 idirafter, imacros, include, isysroot, isystem, iquote): Add
9133 MissingArgError.
9134 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9135
7a9bf9a4
JM
91362010-07-27 Joseph Myers <joseph@codesourcery.com>
9137
9138 * c-common.h (c_common_option_lang_mask,
9139 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9140 New.
9141 (c_common_init_options): Update prototype.
9142 * c-opts.c (c_common_option_lang_mask): New.
9143 (c_common_initialize_diagnostics): Split out of
9144 c_common_init_options.
9145 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9146 New.
9147 (c_common_init_options): Update prototype. Use decoded options in
9148 search for -lang-asm.
9149
910ad8de
NF
91502010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9151
9152 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9153 * c-format.c: Likewise.
9154
718f9c0f
MLI
91552010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9156
9157 * c-common.h: Include diagnostic-core.h. Error if already
9158 included.
9159 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9160
4d451982
MLI
91612010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9162
adfac8df 9163 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9164 Do not include expr.h
9165 (vector_mode_valid_p): Move here.
9166
119fe915
SB
91672010-06-21 DJ Delorie <dj@redhat.com>
9168
9169 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9170 allow these pragmas anywhere.
9171
91722010-06-14 Jakub Jelinek <jakub@redhat.com>
9173
9174 PR bootstrap/44509
9175 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9176 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9177 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9178 ggc_strdup instead of xstrdup.
9179
91802010-06-10 Jakub Jelinek <jakub@redhat.com>
9181
9182 * c-cppbuiltin.c: Include cpp-id-data.h.
9183 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9184 (lazy_hex_fp_value): New function.
9185 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9186
6662d794
MLI
91872010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9188
9189 * c-gimplify.c: Do not include tree-flow.h
9190
38f8b050
JR
91912010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9192
9193 PR other/44034
9194 * c-common.c: Rename targetm member:
9195 targetm.enum_va_list -> targetm.enum_va_list_p
9196
9589f23e
AS
91972010-06-28 Anatoly Sokolov <aesok@post.ru>
9198
9199 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9200
3b06d379
SB
92012010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9202
9203 * c-cppbuiltin.c: Do not include except.h.
9204
d166d4c3
AK
92052010-06-24 Andi Kleen <ak@linux.intel.com>
9206
9faeb493
UB
9207 * c-common.c (warn_for_omitted_condop): New.
9208 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9209
70cb8be6
JM
92102010-06-21 Joseph Myers <joseph@codesourcery.com>
9211
9212 * c.opt (lang-objc): Remove.
9213 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9214
a4c97feb
JR
92152010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9216
9217 * c-opts.c: Include "tm_p.h".
9218
6e2f1956
JM
92192010-06-20 Joseph Myers <joseph@codesourcery.com>
9220
9221 * c-common.c (parse_optimize_options): Update call to
9222 decode_options.
9223
bc87224e
NF
92242010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9225
9226 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9227 new type of types_used_by_cur_var_decl.
9228
b49cf425
JR
92292010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9230
9231 PR bootstrap/44512
9232 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9233 for C++ standard compliance.
9234
59f9c2ed
JM
92352010-06-16 Jason Merrill <jason@redhat.com>
9236
9237 * c.opt: Add -Wnoexcept.
9238
33766b66
RG
92392010-06-16 Richard Guenther <rguenther@suse.de>
9240
9241 PR c/44555
9242 * c-common.c (c_common_truthvalue_conversion): Remove
9243 premature and wrong optimization concering ADDR_EXPRs.
9244
eff7e30c
AC
92452010-06-15 Arnaud Charlet <charlet@adacore.com>
9246
9247 * c-ada-spec.c (dump_sloc): Remove column info.
9248 (is_simple_enum): New function.
9249 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9250 enum types when relevant.
9251
6312e84d
MLI
92522010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9253
9faeb493 9254 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9255 location.
9256
1cb42611
JM
92572010-06-10 Joseph Myers <joseph@codesourcery.com>
9258
9259 * c-opts.c (c_common_handle_option): Don't handle
9260 OPT_fshow_column.
9261
a9429e29
LB
92622010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9263
9264 * c-pragma.c (push_alignment): Use typed GC allocation.
9265 (handle_pragma_push_options): Likewise.
9266
9267 * c-common.c (parse_optimize_options): Likewise.
9268
9269 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9270 option.
9271
5498f011
JM
92722010-06-07 Joseph Myers <joseph@codesourcery.com>
9273
9274 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9275 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9276 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9277 flag_signed_bitfields, warn_strict_null_sentinel,
9278 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9279 flag_gen_declaration, flag_no_gnu_keywords,
9280 flag_implement_inlines, flag_implicit_templates,
9281 flag_implicit_inline_templates, flag_optional_diags,
9282 flag_elide_constructors, flag_default_inline, flag_rtti,
9283 flag_conserve_space, flag_access_control, flag_check_new,
9284 flag_new_for_scope, flag_weak, flag_working_directory,
9285 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9286 flag_enforce_eh_specs, flag_threadsafe_statics,
9287 flag_pretty_templates): Remove.
9288 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9289 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9290 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9291 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9292 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9293 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9294 flag_no_gnu_keywords, flag_implement_inlines,
9295 flag_implicit_templates, flag_implicit_inline_templates,
9296 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9297 flag_rtti, flag_conserve_space, flag_access_control,
9298 flag_check_new, flag_new_for_scope, flag_weak,
9299 flag_working_directory, flag_use_cxa_atexit,
9300 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9301 flag_threadsafe_statics, flag_pretty_templates,
9302 warn_strict_null_sentinel): Remove.
9303 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9304 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9305 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9306 fimplicit-inline-templates, fimplicit-templates,
9307 flax-vector-conversions, fms-extensions, fnil-receivers,
9308 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9309 frtti, fshort-double, fshort-enums, fshort-wchar,
9310 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9311 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9312 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9313 gen-decls, undef): Use Var.
9314 (fdefault-inline, foptional-diags): Document as doing nothing.
9315 * c-opts.c (c_common_handle_option): Remove cases for options now
9316 using Var. Mark ignored options as such.
9317
39dabefd
SB
93182010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9319
9faeb493 9320 * c-common.c: Moved to here from parent directory.
39dabefd
SB
9321 * c-common.def: Likewise.
9322 * c-common.h: Likewise.
9323 * c-cppbuiltin.c: Likewise.
9324 * c-dump.c: Likewise.
9325 * c-format.c: Likewise.
9326 * c-format.h : Likewise.
9327 * c-gimplify.c: Likewise.
9328 * c-lex.c: Likewise.
9329 * c-omp.c: Likewise.
9330 * c.opt: Likewise.
9331 * c-opts.c: Likewise.
9332 * c-pch.c: Likewise.
9333 * c-ppoutput.c: Likewise.
9334 * c-pragma.c: Likewise.
9335 * c-pragma.h: Likewise.
9336 * c-pretty-print.c: Likewise.
9337 * c-pretty-print.h: Likewise.
9338 * c-semantics.c: Likewise.
9339 * stub-objc.c: Likewise.
9340
9341 * c-common.c: Include gt-c-family-c-common.h.
9342 * c-pragma.c: Include gt-c-family-c-pragma.h.
9343\f
85ec4feb 9344Copyright (C) 2010-2018 Free Software Foundation, Inc.
39dabefd
SB
9345
9346Copying and distribution of this file, with or without modification,
9347are permitted in any medium without royalty provided the copyright
9348notice and this notice are preserved.