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