]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Fix warning for simple-object-elf.c.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
8aec1ebb 12017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2 Alan Hayward <alan.hayward@arm.com>
3 David Sherwood <david.sherwood@arm.com>
4
5 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
6 into scalar_mode_supported_p call.
7 (handle_mode_attribute): Update call to scalar_mode_supported_p.
8
2b8f5b8a 92017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
10 Alan Hayward <alan.hayward@arm.com>
11 David Sherwood <david.sherwood@arm.com>
12
13 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
14 for the mode iterator.
15
3d2b0034 162017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
17 Alan Hayward <alan.hayward@arm.com>
18 David Sherwood <david.sherwood@arm.com>
19
20 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
21 * c-common.c (c_build_vec_perm_expr): Likewise.
22
d082dc6e 232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
24 Alan Hayward <alan.hayward@arm.com>
25 David Sherwood <david.sherwood@arm.com>
26
27 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
28
659fb061 292017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
30 Alan Hayward <alan.hayward@arm.com>
31 David Sherwood <david.sherwood@arm.com>
32
33 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
34 before calling targetm.addr_space.valid_pointer_mode.
35
2b8f2d97 362017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
37 Alan Hayward <alan.hayward@arm.com>
38 David Sherwood <david.sherwood@arm.com>
39
40 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
41
19a4dce4 422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
43 Alan Hayward <alan.hayward@arm.com>
44 David Sherwood <david.sherwood@arm.com>
45
46 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
47 iterators.
48 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
49
916ace94 502017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
51 Alan Hayward <alan.hayward@arm.com>
52 David Sherwood <david.sherwood@arm.com>
53
54 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
55 case statements.
56
98102386 572017-08-29 Martin Liska <mliska@suse.cz>
58
59 PR other/39851
60 * c-common.c (parse_optimize_options): Add argument to function
61 call.
62 * c-pragma.c (handle_pragma_diagnostic): Likewise.
63
0bdd7941 642017-08-24 David Malcolm <dmalcolm@redhat.com>
65
66 * c-lex.c (interpret_float): Use token location
67 when building an EXCESS_PRECISION_EXPR.
68
a115c319 692017-08-21 David Malcolm <dmalcolm@redhat.com>
70
71 * c-common.c (check_function_arguments): Add "arglogs" param; pass
72 it to check_function_format.
73 * c-common.h (check_function_arguments): Add vec<location_t> *
74 param.
75 (check_function_format): Likewise.
76 * c-format.c (struct format_check_context): Add field "arglocs".
77 (check_function_format): Add param "arglocs"; pass it to
78 check_format_info.
79 (check_format_info): Add param "arglocs"; use it to initialize
80 new field of format_ctx.
81 (check_format_arg): Pass format_ctx->arglocs to new param of
82 check_format_info_main.
83 (class argument_parser): New field "arglocs".
84 (argument_parser::argument_parser): Add "arglocs_" param and use
85 it to initialize new field.
86 (argument_parser::check_argument_type): Pass new arglocs field to
87 check_format_types.
88 (check_format_info_main): Add param "arglocs", and use it when
89 constructing arg_parser.
90 (check_format_types): Add param "arglocs"; use it if non-NULL when
91 !EXPR_HAS_LOCATION (cur_param) to get at location information.
92
4bec7283 932017-08-18 H.J. Lu <hongjiu.lu@intel.com>
94
95 PR c/53037
96 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
97 (c_common_attribute_table): Add warn_if_not_aligned.
98 (handle_aligned_attribute): Renamed to ...
99 (common_handle_aligned_attribute): Remove argument, name, and add
100 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
101 (handle_aligned_attribute): New.
102 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
103
9d3c24b9 1042017-08-14 Martin Sebor <msebor@redhat.com>
105
106 PR c/81117
107 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
108 (handle_nonstring_attribute): New function.
109
c8616982 1102017-08-14 Martin Sebor <msebor@redhat.com>
111
112 PR c/81117
113 * c-format.h (T89_G): New macro.
114 * c-format.c (local_gcall_ptr_node): New variable.
115 (init_dynamic_diag_info): Initialize it.
116
07b8a412 1172017-08-11 Martin Liska <mliska@suse.cz>
118
119 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
120 TARGET_SUPPORTS_ALIASES.
121
3fe34694 1222017-08-10 David Malcolm <dmalcolm@redhat.com>
123
124 * c-common.c (c_parse_error): Add rich_location * param, using it
125 rather implicitly using input_location.
126 * c-common.h (c_parse_error): Add rich_location * param.
127
623ee358 1282017-08-09 Marek Polacek <polacek@redhat.com>
129
130 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
131 (c_common_truthvalue_conversion): Likewise.
132 * c-omp.c (c_finish_omp_atomic): Likewise.
133 * c-common.h (build_binary_op): Update declaration.
134
30a86690 1352017-08-08 Martin Liska <mliska@suse.cz>
136
137 * c-ada-spec.c: Include header files.
138 * c-ubsan.c: Likewise.
139 * c-warn.c: Likewise.
140
b4ae034c 1412017-08-07 Jakub Jelinek <jakub@redhat.com>
142
143 PR c/69389
144 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
145
22dadfd6 1462017-08-07 Eric Botcazou <ebotcazou@adacore.com>
147
148 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
149 (print_ada_methods): Likewise.
150 (print_ada_declaration): Likewise.
151
1610e7fb 1522017-08-07 Martin Liska <mliska@suse.cz>
153
154 * array-notation-common.c: Add new includes.
155 * c-format.c( handle_format_attribute): Canonicalize a format
156 function name.
157 * c-lex.c (c_common_has_attribute): Canonicalize name of an
158 attribute.
159 * c-pretty-print.c: Add new include.
160
5ddd2306 1612017-08-05 Eric Botcazou <ebotcazou@adacore.com>
162
163 * c-ada-spec.c (has_static_fields): Look only into variables.
164 (print_constructor): Add TYPE parameter and use it for the name.
165 (print_destructor): Likewise.
166 (print_ada_declaration): Adjust to new constructor/destructor names.
167 Adjust calls to print_constructor and print_destructor.
168 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
169 Look only into variables in the final loop.
170
e2252c91 1712017-08-01 Eric Botcazou <ebotcazou@adacore.com>
172
173 * c-ada-spec.c (has_static_fields): Look only into fields.
174 (dump_generic_ada_node): Small tweak.
175 (dump_nested_types): Look only into fields.
176 (print_ada_declaration): Look only into methods. Small tweak.
177 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
178
636174dc 1792017-08-01 Eric Botcazou <ebotcazou@adacore.com>
180
181 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
182 (dump_ada_function_declaration): Likewise.
183 (dump_generic_ada_node): Likewise.
184 (print_ada_declaration): Add support for const-qualified variables.
185
dadc219c 1862017-07-31 Martin Liska <mliska@suse.cz>
187
188 PR sanitize/81530
189 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
190 Guard condition with flag_sanitize_p also with current_function_decl
191 non-null equality.
192 (ubsan_maybe_instrument_reference_or_call): Likewise.
193
5eb639c2 1942017-07-30 Uros Bizjak <ubizjak@gmail.com>
195
196 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
197
934a9503 1982017-07-29 Eric Botcazou <ebotcazou@adacore.com>
199
200 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
201 for enumeral types.
202 (print_ada_declaration): Add missing guard for record types.
203
df930a61 2042017-07-27 Jakub Jelinek <jakub@redhat.com>
205
206 PR c/45784
207 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
208 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
209 new COMPOUND_EXPRs around the rhs of the comparison.
210
7d4d7ecb 2112017-07-27 Marek Polacek <polacek@redhat.com>
212
213 PR c/81417
214 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
215 the types.
216
280ce47d 2172017-07-27 Jakub Jelinek <jakub@redhat.com>
218
219 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
220 (handle_noipa_attribute): New function.
221
e6c4532a 2222017-07-07 Torsten Duwe <duwe@suse.de>
223
224 * c-attribs.c (c_common_attribute_table): Add entry for
225 "patchable_function_entry".
226
ab87ee8f 2272017-07-20 Nathan Sidwell <nathan@acm.org>
228
229 Remove TYPE_METHODS.
230 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
231 dump_ada_template, print_ada_methods,
232 print_ada_declaration): Member fns are on TYPE_FIELDS.
233
a8de6c92 2342017-07-18 Nathan Sidwell <nathan@acm.org>
235
236 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
237
7f9c8569 2382017-07-14 David Malcolm <dmalcolm@redhat.com>
239
240 * c-common.c (try_to_locate_new_include_insertion_point): New
241 function.
242 (per_file_includes_t): New typedef.
243 (added_includes_t): New typedef.
244 (added_includes): New variable.
245 (maybe_add_include_fixit): New function.
246 * c-common.h (maybe_add_include_fixit): New decl.
247
b1b5fc9c 2482017-07-10 Martin Sebor <msebor@redhat.com>
249
250 PR other/81345
251 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
252
7051d239 2532017-07-06 David Malcolm <dmalcolm@redhat.com>
254
255 * c-common.c (selftest::c_family_tests): New.
256 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
257 (selftest::c_family_tests): New decl.
258
c18b3f9b 2592017-07-04 Marek Polacek <polacek@redhat.com>
260
261 PR c/81231
262 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
263 types.
264
a2de34d4 2652017-07-04 Marek Polacek <polacek@redhat.com>
266
267 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
268
72db0954 2692017-06-28 Martin Liska <mliska@suse.cz>
270
271 PR ipa/81128
272 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
273 to a function declaration.
274
52368c34 2752017-06-28 Martin Liska <mliska@suse.cz>
276
277 PR driver/79659
278 * c.opt: Add IntegerRange to various options.
279
2bfb0686 2802017-06-26 Marek Polacek <polacek@redhat.com>
281
282 PR c/80116
283 * c-common.h (warn_for_multistatement_macros): Declare.
284 * c-warn.c: Include "c-family/c-indentation.h".
285 (warn_for_multistatement_macros): New function.
286 * c.opt (Wmultistatement-macros): New option.
287 * c-indentation.c (guard_tinfo_to_string): No longer static.
288 Change the parameter type to "enum rid". Handle RID_SWITCH.
289 * c-indentation.h (guard_tinfo_to_string): Declare.
290
4e551c7d 2912017-06-23 Marc Glisse <marc.glisse@inria.fr>
292
293 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
294
a324786b 2952017-06-15 Martin Sebor <msebor@redhat.com>
296
297 PR c++/80560
298 * c.opt (-Wclass-memaccess): New option.
299
b4bbadc1 3002017-06-14 Boris Kolpackov <boris@codesynthesis.com>
301
302 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
303
314b4196 3042017-06-13 Marek Polacek <polacek@redhat.com>
305
306 PR objc/80949
307 * c-warn.c (do_warn_duplicated_branches): Return if any of the
308 branches is null.
309
9917317a 3102017-06-13 Martin Liska <mliska@suse.cz>
311
312 PR sanitize/78204
313 * c-attribs.c (add_no_sanitize_value): New function.
314 (handle_no_sanitize_attribute): Likewise.
315 (handle_no_sanitize_address_attribute): Use the function.
316 (handle_no_sanitize_thread_attribute): New function.
317 (handle_no_address_safety_analysis_attribute): Use
318 add_no_sanitize_value.
319 (handle_no_sanitize_undefined_attribute): Likewise.
320 * c-common.h: Declare new functions.
321 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
322 (ubsan_instrument_shift): Likewise.
323 (ubsan_instrument_bounds): Likewise.
324 (ubsan_maybe_instrument_array_ref): Likewise.
325 (ubsan_maybe_instrument_reference_or_call): Likewise.
326
e34c848a 3272017-06-11 Jason Merrill <jason@redhat.com>
328
329 * c-ada-spec.c, c-pragma.c: Use id_equal.
330
f8897e74 3312017-06-04 Marek Polacek <polacek@redhat.com>
332
333 PR c/80919
334 * c-format.c (matching_type_p): Return false if any of the types
335 requires structural equality.
336
a977cac9 3372017-06-02 Martin Sebor <msebor@redhat.com>
338
339 PR c/80892
340 * c-warn.c (conversion_warning): Use -Wconversion for integer
341 conversion and -Wfloat-conversion for floating one.
342
0ca70bfd 3432017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
344
345 * c.opt (Wsizeof-pointer-div): New warning option.
346
6cf2f0b6 3472017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
348
349 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
350 (Wcatch-value=1): Enable by -Wall.
351
4d1eda3a 3522017-05-30 David Malcolm <dmalcolm@redhat.com>
353
354 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
355 format_chars.
356 * c.opt (fdiagnostics-show-template-tree): New option.
357 (felide-type): New option.
358
6c547211 3592017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
360
361 * c.opt (Wcatch-value=): New C++ warning flag.
362
5570d275 3632017-05-24 Nathan Sidwell <nathan@acm.org>
364
365 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
366 const casts to avoid warning.
367
645b0f8d 3682017-05-24 Martin Sebor <msebor@redhat.com>
369
370 PR c/80731
371 * c-common.h (unsafe_conversion_p): Add a function argument.
372 * c-common.c (unsafe_conversion_p): Same.
373 Add type names and values to diagnostics.
374 (scalar_to_vector): Adjust.
375 * c-warn.c (constant_expression_error): Add a function argument.
376 Add type names and values to diagnostics.
377 (conversion_warning): Add a function argument.
378 Add type names and values to diagnostics.
379 (warnings_for_convert_and_check): Same.
380
65fb3b5b 3812017-05-19 Jason Merrill <jason@redhat.com>
382
383 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
384 enumerators.
385
5407f1e9 3862017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
387
388 * c-format.c (locus): Move out of function scope,
389 add GTY attribute.
390
0fa326f5 3912017-05-19 Nathan Sidwell <nathan@acm.org>
392
393 * c-opts.c (class_dump_file, class_dump_flags): Delete.
394 (c_common_parse_file): Remove class dump handling.
395 (get_dump_info): Likewise.
396
195b31a0 3972017-05-19 Richard Biener <rguenther@suse.de>
398
399 PR c++/80593
400 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
401 to alias-set zero memory.
402
1bccae6b 4032017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
404
405 * c-format.c (local_tree_type_node): Add GTY attribute.
406
78173203 4072017-05-18 Marek Polacek <polacek@redhat.com>
408
409 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
410 (c_common_fixed_point_type_for_size): Likewise.
411 (c_common_type_for_mode): Likewise.
412 (shorten_compare): Likewise.
413 (c_promoting_integer_type_p): Use false/true instead of 0/1.
414 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
415
2823920b 4162017-05-18 Marek Polacek <polacek@redhat.com>
417
418 * c-common.c (self_promoting_args_p): Change the return type to bool.
419 Use false/true instead of 0/1.
420 * c-common.h (self_promoting_args_p): Update.
421
72749341 4222017-05-17 Marek Polacek <polacek@redhat.com>
423
424 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
425 * c-warn.c: Likewise.
426
b4d90ee2 4272017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
428
429 Implement new C++ intrinsics __is_assignable and __is_constructible.
430 * c-common.c (__is_assignable, __is_constructible): New.
431 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
432
3f6e5ced 4332017-05-17 Martin Liska <mliska@suse.cz>
434
435 * c-common.h: Introduce dump_flags_t type and
436 use it instead of int type.
437 * c-gimplify.c (c_genericize): Likewise.
438 * c-opts.c: Likewise.
439
d0869ea4 4402017-05-17 Marek Polacek <polacek@redhat.com>
441
442 * c-common.c (c_save_expr): Remove.
443 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
444 * c-common.h (c_save_expr): Remove declaration.
445
0d7b4486 4462017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
447
448 PR c/35441
449 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
450 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
451 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
452 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
453 RDIV_EXPR.
454 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
455
1a2d3e8e 4562017-05-09 Marek Polacek <polacek@redhat.com>
457
458 PR c/80525
459 * c-warn.c (unwrap_c_maybe_const): New.
460 (warn_logical_operator): Call it.
461
cdf05a3f 4622017-05-09 Nathan Sidwell <nathan@acm.org>
463
464 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
465 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
466
554efdbb 4672017-05-08 Martin Sebor <msebor@redhat.com>
468
469 PR translation/80280
470 * c-format.h (struct format_flag_spec): Add new member.
471 (T89_T): New macro.
472 * c-format.c (local_tree_type_node): New global.
473 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
474 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
475 (strfmon_flag_specs): Likewise.
476 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
477 with distinct quoting properties.
478 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
479 (flag_chars_t::validate): Add argument and handle bad quoting.
480 (check_format_info_main): Handle quoting problems.
481 (init_dynamic_diag_info): Simplify.
482
7344fb00 4832017-05-08 Jason Merrill <jason@redhat.com>
484
485 * c-opts.c (c_common_post_options): Update defaults for
486 flag_abi_version and flag_abi_compat_version.
487
56b8400f 4882017-05-05 David Malcolm <dmalcolm@redhat.com>
489
490 * c-common.c (c_cpp_error): Replace report_diagnostic
491 with diagnostic_report_diagnostic.
492
8c41abe8 4932017-05-04 Martin Sebor <msebor@redhat.com>
494
495 PR translation/80280
496 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
497 (handle_weakref_attribute): Same.
498
a06321ef 4992017-05-03 Nathan Sidwell <nathan@acm.org>
500
501 Canonicalize canonical type hashing
502 * c-common.c (complete_array_type): Use type_hash_canon.
503
92bc38e7 5042017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
505
506 PR c++/80038
507 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
508 prototype.
509 (cilk_install_body_pedigree_operations): Likewise.
510 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
511 detatched.
512 (cilk_gimplify_call_params_in_spawned_fn): Remove.
513 (cilk_install_body_pedigree_operations): Likewise.
514 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
515 unwrapping.
516
fb8ab1f8 5172017-04-27 Jakub Jelinek <jakub@redhat.com>
518
519 PR c++/80534
520 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
521 flag on non-aggregate element types.
522
31af80fe 5232017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
524
525 * c-common.c (c_type_hasher, type_hash_table): Remove.
526 (c_common_get_alias_set): Remove unreachable code.
527 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
528
dc993150 5292017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
530
531 * c.opt (Wextra-semi): New C++ warning flag.
532
6bac87c3 5332017-04-20 Jakub Jelinek <jakub@redhat.com>
534
535 PR middle-end/80423
536 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
537
7ec2cbc9 5382017-04-18 Jakub Jelinek <jakub@redhat.com>
539
540 PR middle-end/79788
541 PR middle-end/80375
542 * c-common.c (c_common_type_for_mode): Don't handle
543 widest_*_literal_type_node here.
544 c_common_signed_or_unsigned_type): Likewise.
545 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
546 to *intTI_type_node or *intDI_type_node depending on whether
547 TImode is supported by the target or not.
548
65b66772 5492017-04-10 Martin Liska <mliska@suse.cz>
550
551 PR sanitizer/80350
552 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
553 doing an UBSAN check.
554
2fbe7a32 5552017-04-03 Jonathan Wakely <jwakely@redhat.com>
556
557 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
558
3ddb3278 5592017-03-31 Jakub Jelinek <jakub@redhat.com>
560
561 PR c++/79572
562 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
563 tree *.
564 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
565 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
566 REFERENCE_TYPE.
567
9511b9de 5682017-03-31 David Malcolm <dmalcolm@redhat.com>
569
570 PR documentation/78732
571 * c.opt (Wendif-labels): Fix description to refer to
572 #else rather than #elif.
573
ca2af7df 5742017-03-31 Jakub Jelinek <jakub@redhat.com>
575
576 PR libstdc++/80251
577 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
578 * c-common.c (c_common_reswords): Add __is_aggregate trait.
579
3385a573 5802017-03-27 Jakub Jelinek <jakub@redhat.com>
581
582 PR middle-end/80162
583 * c-common.c (c_common_mark_addressable_vec): Don't set
584 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
585
da7a26fc 5862017-03-21 Martin Sebor <msebor@redhat.com>
587
588 PR c++/79548
589 * c-common.c (set_underlying_type): Mark type used only when
590 original del is declared unused.
591
ca1f4c7a 5922017-03-10 David Malcolm <dmalcolm@redhat.com>
593
594 PR translation/79848
595 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
596 "%qs".
597
3b496eb9 5982017-03-10 David Malcolm <dmalcolm@redhat.com>
599
600 PR c/79921
601 * c-indentation.c (warn_for_misleading_indentation): Remove parens
602 from inform's message, so that xgettext can locate it.
603
6a9c24a0 6042017-03-09 Marek Polacek <polacek@redhat.com>
605
606 PR c++/79962
607 PR c++/79984
608 * c-attribs.c (handle_nonnull_attribute): Save the result of default
609 conversion to the attribute list.
610
5383272d 6112017-03-09 Martin Liska <mliska@suse.cz>
612
613 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
614
957a727b 6152017-03-03 Jason Merrill <jason@redhat.com>
616
617 * c.opt (Wnoexcept-type): New.
618
b977a7e3 6192017-03-02 Richard Biener <rguenther@suse.de>
620
621 PR c/79756
622 * c-common.c (c_common_mark_addressable_vec): Look through
623 C_MAYBE_CONST_EXPR.
624
78adba87 6252017-02-28 Martin Liska <mliska@suse.cz>
626
627 * c.opt: Replace space with tabular for options of <number>
628 type.
629
6ac368bb 6302017-02-28 Martin Liska <mliska@suse.cz>
631
632 * c.opt: Fix --help=option -Q for options which are of
633 an enum type.
634
bbd5521e 6352017-02-24 Jakub Jelinek <jakub@redhat.com>
636
637 PR c++/79588
638 * c-common.c (check_function_restrict): New function.
639 (check_function_arguments): Add FNDECL argument. Call
640 check_function_restrict if -Wrestrict.
641 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
642 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
643 * c-common.h (check_function_arguments): Add FNDECL argument.
644 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
645
e967bbfd 6462017-02-24 Eric Botcazou <ebotcazou@adacore.com>
647
648 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
649 treatment of parameters with pointer-to-tagged type and tidy up.
650 (print_ada_methods): Remove the special treatment of C++ static member
651 functions.
652
52ccf715 6532017-02-22 Martin Liska <mliska@suse.cz>
654
655 * c.opt: Replace inequality signs with square brackets
656 for -Wnornalized.
657
a42e4e13 6582017-02-21 Jakub Jelinek <jakub@redhat.com>
659
660 PR c++/79641
661 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
662 preserve quals.
663
f6202e1a 6642017-02-17 Joseph Myers <joseph@codesourcery.com>
665
666 * c-cppbuiltin.c (builtin_define_float_constants): Define
667 __DECIMAL_DIG__ to the value for long double.
668
0396f790 6692017-02-15 Marek Polacek <polacek@redhat.com>
670
671 PR c/79515
672 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
673 conversion has occured.
674
175e0d6b 6752017-01-24 David Malcolm <dmalcolm@redhat.com>
676
677 * c-common.c (c_common_reswords): Add "__RTL".
678 * c-common.h (enum rid): Add RID_RTL.
679
3ef7eab1 6802017-01-20 Marek Polacek <polacek@redhat.com>
681
682 PR c/64279
683 * c-common.h (do_warn_duplicated_branches_r): Declare.
684 * c-gimplify.c (c_genericize): Walk the function tree calling
685 do_warn_duplicated_branches_r.
686 * c-warn.c (expr_from_macro_expansion_r): New.
687 (do_warn_duplicated_branches): New.
688 (do_warn_duplicated_branches_r): New.
689 * c.opt (Wduplicated-branches): New option.
690
32641de7 6912017-01-17 David Malcolm <dmalcolm@redhat.com>
692
693 PR c++/71497
694 * c-indentation.c (warn_for_misleading_indentation): Use the past
695 subjunctive in the note.
696
7e66f344 6972017-01-17 Aldy Hernandez <aldyh@redhat.com>
698
699 PR c/79116
700 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
701 start type to integer_type.
702
14234f77 7032017-01-16 Jakub Jelinek <jakub@redhat.com>
704
705 PR driver/49726
706 * c.opt (gen-decls): Add Driver flag.
707
ba5a0dd7 7082017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
709
710 Revert:
711 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
712
713 PR c++/71737
714 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
715
231589de 7162017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
717
718 PR c++/71737
719 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
720
78cf39ca 7212017-01-12 Martin Sebor <msebor@redhat.com>
722
723 (-Wformat-overflow): ...to this.
724
1a1ce9a6 7252017-01-11 Martin Sebor <msebor@redhat.com>
726
727 PR c/78768
728 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
729 Also enable for LTO.
730
3386344d 7312017-01-10 Jason Merrill <jason@redhat.com>
732
733 Implement P0195R2, C++17 variadic using.
734 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
735
d0abd9e0 7362017-01-09 Jakub Jelinek <jakub@redhat.com>
737
738 PR translation/79019
739 PR translation/79020
740 * c.opt (Wnormalized=): Fix typo in description.
741
aba01341 7422017-01-08 Martin Sebor <msebor@redhat.com>
743
744 PR middle-end/77708
745 * c.opt (-Wformat-truncation): New option.
746
2792c2c7 7472017-01-06 Alexandre Oliva <aoliva@redhat.com>
748
749 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
750 value to unsigned short to fit in 4 hex digits without
751 warnings.
752
3389a464 7532017-01-05 Eric Botcazou <ebotcazou@adacore.com>
754
755 * c.opt (fsso-struct): Add 'native' value.
756
f6deeb21 7572017-01-05 Martin Liska <mliska@suse.cz>
758
759 PR pch/78970
760 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
761 header.
762
6124217c 7632017-01-04 Marek Polacek <polacek@redhat.com>
764
765 PR c++/64767
766 * c.opt (Wpointer-compare): New option.
767
48284845 7682017-01-04 Jakub Jelinek <jakub@redhat.com>
769
770 PR driver/78957
771 * c.opt (fsso-struct=): Add RejectNegative.
772
aad93da1 7732017-01-01 Jakub Jelinek <jakub@redhat.com>
774
775 Update copyright years.
776
7dbe2449 7772016-12-29 Martin Liska <mliska@suse.cz>
778
779 PR c/78933
780 * c.opt (strong-eval-order): Add RejectNegative keyword.
781
23ea3d01 7822016-12-22 Jason Merrill <jason@redhat.com>
783
784 Implement P0522R0, matching of template template arguments.
785 * c-cppbuiltin.c (c_cpp_builtins): Define
786 __cpp_template_template_args.
787
184fac50 7882016-12-21 Jakub Jelinek <jakub@redhat.com>
789
790 PR bootstrap/78817
791 * c-common.c (struct nonnull_arg_ctx): New type.
792 (check_function_nonnull): Return bool instead of void. Use
793 nonnull_arg_ctx as context rather than just location_t.
794 (check_nonnull_arg): Adjust for the new context type, set
795 warned_p to true if a warning has been diagnosed.
796 (check_function_arguments): Return bool instead of void.
797 * c-common.h (check_function_arguments): Adjust prototype.
798
7806e079 7992016-12-21 Jason Merrill <jason@redhat.com>
800
801 * c.opt (-fnew-ttp-matching): New flag.
802 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
803
4954efd4 8042016-12-14 Martin Jambor <mjambor@suse.cz>
805
806 * c-omp.c: Include omp-general.h instead of omp-low.h.
807 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
808 name.
809
5cfa3fc8 8102016-12-14 Martin Sebor <msebor@redhat.com>
811
812 PR c/17308
813 * c-common.c (check_nonnull_arg): Disable when optimization
814 is enabled.
815
bbdce47f 8162016-12-12 Marek Polacek <polacek@redhat.com>
817
818 PR c++/78647
819 * c-common.c (attribute_fallthrough_p): Return false for
820 error_mark_node.
821
370e45b9 8222016-12-08 Martin Sebor <msebor@redhat.com>
823
824 PR c/78284
825 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
826
3bb246b3 8272016-12-08 Martin Sebor <msebor@redhat.com>
828
829 PR c/78165
3199a7fa 830 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
831 suffix.
3bb246b3 832
5aef8938 8332016-12-07 Martin Sebor <msebor@redhat.com>
834
835 PR c/53562
836 PR middle-end/77784
837 PR middle-end/78149
838 PR middle-end/78138
839 * c.opt (-Wstringop-overflow): New option.
840
47c3d0de 8412016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
842
843 * c-attribs.c (asan odr indicator): New attribute.
844 (handle_asan_odr_indicator_attribute): New function.
845
c932c990 8462016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
847
848 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
849 ptrdiff_type_node;
850
c39beb8a 8512016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
852
853 * c-common.c (excess_precision_mode_join): New.
854 (c_ts18661_flt_eval_method): New.
855 (c_c11_flt_eval_method): Likewise.
856 (c_flt_eval_method): Likewise.
857 * c-common.h (excess_precision_mode_join): New.
858 (c_flt_eval_method): Likewise.
859 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
860 (cpp_iec_559_value): Call it.
861 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
862 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
863 __FLT_EVAL_METHOD_TS_18661_3__.
864
a998ac00 8652016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
866
867 * c-opts.c (c_common_post_options): Add logic to handle the default
868 case for -fpermitted-flt-eval-methods.
869
6e47b422 8702016-11-23 Paolo Bonzini <bonzini@gnu.org>
871
872 * c.opt (Wexpansion-to-defined): New.
873
0d65cc6c 8742016-11-23 Jakub Jelinek <jakub@redhat.com>
875
876 PR target/78451
877 * c-pragma.c (handle_pragma_target): Don't replace
878 current_target_pragma, but chainon the new args to the current one.
879
ff6497a3 8802016-11-22 Nathan Sidwell <nathan@acm.org>
881
882 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
bacc5324 883 indentation and formatting.
ff6497a3 884
13341287 8852016-11-21 Martin Sebor <msebor@redhat.com>
886
887 * c.opt (-fprintf-return-value): Enable by default.
888
f1b3e1c9 8892016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
890
891 PR c++/71973
892 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
893 * c-common.c (c_common_nodes_and_builtins): Initialize
894 const_tm_ptr_type_node.
895
6c1f90ee 8962016-11-16 Marek Polacek <polacek@redhat.com>
897
898 PR c/78285
899 * c-common.c (c_add_case_label): Turn error_at calls into inform.
900
a49621cf 9012016-11-14 Jakub Jelinek <jakub@redhat.com>
902
903 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
904
b1f04d34 9052016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
a49621cf 906 Richard Biener <rguenther@suse.de>
907
908 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
909 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
910 * c.opt (fgimple): New option.
b1f04d34 911
9b8f3aa1 9122016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
913
914 PR c/35503
915 * c-common.h (warn_for_restrict): Declare.
916 * c-warn.c: Include gcc-rich-location.h.
917 (warn_for_restrict): New function.
918 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
919 (gcc_cdiag_char_table): Likewise.
920 (gcc_cxxdiag_char_table): Likewise.
921 * c.opt (Wrestrict): New option.
922
7907d43b 9232016-11-13 Eric Botcazou <ebotcazou@adacore.com>
924
925 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
926 for nested types only if the type is a record or union and dump SLOC.
927
b1363399 9282016-11-09 Jason Merrill <jason@redhat.com>
929
930 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
931
58721d0c 9322016-11-09 Jakub Jelinek <jakub@redhat.com>
933
934 * c-ubsan.c (ubsan_instrument_shift): Handle split
935 -fsanitize=shift-base and -fsanitize=shift-exponent.
936
2e9e9363 9372016-11-07 Jason Merrill <jason@redhat.com>
938
939 * c.opt (Wc++1z-compat): New.
940 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
941
629b6abc 9422016-11-07 Martin Liska <mliska@suse.cz>
943
944 * c-warn.c (warn_for_unused_label): Save all labels used
945 in goto or in &label.
946
2f1c4c07 9472016-11-03 Jason Merrill <jason@redhat.com>
948
949 * c-cppbuiltin.c (c_cpp_builtins): Correct
950 __cpp_inheriting_constructors.
951
7896267d 9522016-11-01 Jason Merrill <jason@redhat.com>
953
02a9e65f 954 * c-cppbuiltin.c (c_cpp_builtins): Update
955 __cpp_inheriting_constructors.
956
7896267d 957 * c.opt (-fnew-inheriting-ctors): New.
958 * c-opts.c: Default to on for ABI 11+.
959
f6f44a1d 9602016-10-31 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/77948
963 * c.opt (fext-numeric-literals): Add Var and Init.
964 * c-opts.c (c_common_handle_option): Don't clear
965 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
966 (c_common_post_options): Clear it here if not set
967 explicitly.
968
d24c4079 9692016-10-28 Aldy Hernandez <aldyh@redhat.com>
970
971 PR debug/77773
972 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
973 if NULL.
974
6e1b2ffb 9752016-10-25 Jakub Jelinek <jakub@redhat.com>
976
977 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
978 * c-common.c (c_common_reswords): Add __builtin_launder.
979
5f64e688 9802016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
981
982 * c-common.c (c_common_truthvalue_conversion): Warn for
983 multiplications in boolean context. Fix the quoting of '<<' and '<'
984 in the shift warning.
985
3645e924 9862016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
987
988 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
989
146cbd63 9902016-10-20 Jason Merrill <jason@redhat.com>
991
992 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
993
5c2ba578 9942016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
995
996 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
997 integer shift ops in boolean context.
998
9992016-10-18 Aldy Hernandez <aldyh@redhat.com>
da6cf191 1000
1001 * c.opt (Walloca): New.
1002 (Walloca-larger-than=): New.
1003 (Wvla-larger-than=): New.
1004
876d4bc9 10052016-10-17 Marek Polacek <polacek@redhat.com>
1006
1007 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
1008 Return immediately when finding a match.
1009 (warn_tautological_cmp): Remove a boolean variable that is no longer
1010 needed.
1011
b0c98c23 10122016-10-17 Marek Polacek <polacek@redhat.com>
1013
1014 * c-attribs.c: New file.
1015 * c-common.c: Move attributes handling to c-attribs.c.
1016 (get_nonnull_operand): No longer static.
1017 * c-common.h: Move the declarations from c-attribs.c to its own section.
1018
2ab6420c 10192016-10-14 Jason Merrill <jason@redhat.com>
1020
1021 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
1022 and __cpp_deduction_guides.
1023
81f19d90 10242016-10-13 Jason Merrill <jason@redhat.com>
1025
1026 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
1027
ad7b10a2 10282016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1029
1030 * c-cppbuiltin.c: Include memmodel.h.
1031 * c-opts.c: Likewise.
1032 * c-pragma.c: Likewise.
1033 * c-warn.c: Likewise.
1034
12663602 10352016-10-12 Jakub Jelinek <jakub@redhat.com>
1036
1037 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
1038 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
1039 * c-opts.c (sanitize_cpp_opts): Initialize
1040 cpp_opts->cpp_warn_implicit_fallthrough.
1041
424b2d7d 10422016-10-11 Marek Polacek <polacek@redhat.com>
1043
1044 * c-common.c (warning_candidate_p): Change the return type to bool
1045 and return true/false instead of 1/0.
1046 (vector_mode_valid_p): Likewise.
1047
0f4cea33 10482016-10-11 Marek Polacek <polacek@redhat.com>
1049
1050 * c-common.c (fold_for_warn): No longer static.
1051 (bool_promoted_to_int_p): Likewise.
1052 (c_common_get_narrower): Likewise.
1053 (constant_expression_warning): Move to c-warn.c.
1054 (constant_expression_error): Likewise.
1055 (overflow_warning): Likewise.
1056 (warn_logical_operator): Likewise.
1057 (find_array_ref_with_const_idx_r): Likewise.
1058 (warn_tautological_cmp): Likewise.
1059 (expr_has_boolean_operands_p): Likewise.
1060 (warn_logical_not_parentheses): Likewise.
1061 (warn_if_unused_value): Likewise.
1062 (strict_aliasing_warning): Likewise.
1063 (sizeof_pointer_memaccess_warning): Likewise.
1064 (check_main_parameter_types): Likewise.
1065 (conversion_warning): Likewise.
1066 (warnings_for_convert_and_check): Likewise.
1067 (match_case_to_enum_1): Likewise.
1068 (match_case_to_enum): Likewise.
1069 (c_do_switch_warnings): Likewise.
1070 (warn_for_omitted_condop): Likewise.
1071 (readonly_error): Likewise.
1072 (lvalue_error): Likewise.
1073 (invalid_indirection_error): Likewise.
1074 (warn_array_subscript_with_type_char): Likewise.
1075 (warn_about_parentheses): Likewise.
1076 (warn_for_unused_label): Likewise.
1077 (warn_for_div_by_zero): Likewise.
1078 (warn_for_memset): Likewise.
1079 (warn_for_sign_compare): Likewise.
1080 (do_warn_double_promotion): Likewise.
1081 (do_warn_unused_parameter): Likewise.
1082 (record_locally_defined_typedef): Likewise.
1083 (maybe_record_typedef_use): Likewise.
1084 (maybe_warn_unused_local_typedefs): Likewise.
1085 (maybe_warn_bool_compare): Likewise.
1086 (maybe_warn_shift_overflow): Likewise.
1087 (warn_duplicated_cond_add_or_warn): Likewise.
1088 (diagnose_mismatched_attributes): Likewise.
1089 * c-common.h: Move the declarations from c-warn.c to its own section.
1090 * c-warn.c: New file.
1091
7a7ca07c 10922016-10-08 Jason Merrill <jason@redhat.com>
1093
1094 * c-common.c (c_common_truthvalue_conversion): Don't distribute
1095 into COND_EXPR in C++.
1096
ad0c1dec 10972016-10-08 Jakub Jelinek <jakub@redhat.com>
1098
1099 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
1100 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
1101 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
1102
cd45162d 11032016-10-07 Jakub Jelinek <jakub@redhat.com>
1104
1105 Implement LWG2296 helper intrinsic
1106 * c-common.h (enum rid): Add RID_ADDRESSOF.
1107 * c-common.c (c_common_reswords): Add __builtin_addressof.
1108
0365bfa8 11092016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
1110
1111 PR c++/77700
1112 * c-common.c (c_common_truthvalue_conversion): Warn also for
1113 suspicious enum values in boolean context.
1114
adeca879 11152016-10-06 Jakub Jelinek <jakub@redhat.com>
1116
1117 Implement P0258R2 - helper for C++17
1118 std::has_unique_object_representations trait
1119 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
1120 * c-common.c (c_common_reswords): Add
1121 __has_unique_object_representations.
1122
c6958264 11232016-10-05 Jakub Jelinek <jakub@redhat.com>
1124
1125 PR sanitizer/66343
1126 * c-ubsan.c (ubsan_instrument_return): Don't call
1127 initialize_sanitizer_builtins here.
1128
2b6903a5 11292016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1130
1131 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
1132 conditional expression in boolean context when only one arm is
1133 non-boolean.
1134
5c176ebe 11352016-10-05 Jakub Jelinek <jakub@redhat.com>
1136
c7b01e77 1137 PR sanitizer/77823
1138 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
1139 is not integral.
1140
5c176ebe 1141 * c-common.c (c_common_reswords): Update comment for C++11.
1142
492ab670 11432016-10-04 Jason Merrill <jason@redhat.com>
1144
1145 * c-common.c (make_tree_vector_from_ctor): New.
1146 * c-common.h: Declare it.
1147
bc6b11a7 11482016-10-04 Jakub Jelinek <jakub@redhat.com>
1149
1150 * c-cppbuiltin.c (c_cpp_builtins): Don't define
1151 __LIBGCC_JCR_SECTION_NAME__.
1152
255beb07 11532016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
1154
1155 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
1156 left shift in boolean context.
1157
c5d89bae 11582016-09-29 Jakub Jelinek <jakub@redhat.com>
1159
1160 Implement P0001R1 - C++17 removal of register storage class specifier
1161 * c.opt (Wregister): New warning.
1162 * c-opts.c (c_common_post_options): Enable -Wregister by
1163 default for C++17.
1164
4267ed07 11652016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
1166
1167 * c-opts.c (c_common_post_options): Remove special case for
1168 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
1169 in C++.
1170
0b72b025 11712016-09-27 Jakub Jelinek <jakub@redhat.com>
1172
4fd4e9e0 1173 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
1174 -std=c++1z.
1175
0b72b025 1176 * c-ada-spec.c (print_ada_declaration): Remove break after return.
1177
ea36272b 11782016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
1179
1180 * c-common.c: Include memmodel.h.
1181
e997bd3a 11822016-09-26 Marek Polacek <polacek@redhat.com>
1183
1184 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
1185
3c77f69c 11862016-09-26 Marek Polacek <polacek@redhat.com>
1187
1188 PR c/7652
1189 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
1190 (handle_fallthrough_attribute): New function.
1191 (attribute_fallthrough_p): New function.
1192 * c-common.h (attribute_fallthrough_p): Declare.
1193
481ce481 11942016-09-24 Marek Polacek <polacek@redhat.com>
1195
1196 PR c/77490
1197 * c.opt (Wbool-operation): New.
1198
a5fe0b37 11992016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1200
1201 * c-common.c (c_common_truthvalue_conversion): Inhibit
1202 Wint-in-bool-context warning with from_macro_definition_at.
1203 Mention the expression will always evaluate to true.
1204
90f40f08 12052016-09-21 Martin Sebor <msebor@redhat.com>
1206
1207 PR bootstrap/77676
1208 * c.opt (fprintf-return-value): Temporarily initialize to zero
1209 to unblock bootstrap failures.
1210
98aa0f57 12112016-09-21 Jakub Jelinek <jakub@redhat.com>
1212
1213 PR c++/77651
1214 * c.opt (Waligned-new=): Add RejectNegative.
1215 (faligned-new=): Likewise. Spelling fix - change
1216 aligned_new_threshhold to aligned_new_threshold.
1217 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
1218 to aligned_new_threshold.
1219
b9833bfd 12202016-09-20 Martin Sebor <msebor@redhat.com>
1221
1222 PR middle-end/49905
1223 * c.opt: Add -Wformat-length and -fprintf-return-value.
1224
bed03df1 12252016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1226
1227 PR c++/77434
1228 * c.opt (Wint-in-bool-context): New warning.
1229 * c-common.c (c_common_truthvalue_conversion): Warn on integer
1230 constants in boolean context.
1231
9b5c49ef 12322016-09-19 Joseph Myers <joseph@codesourcery.com>
1233
1234 * c-common.c (max_align_t_align): Also consider alignment of
1235 float128_type_node.
1236
cc4b5c58 12372016-09-15 Jason Merrill <jason@redhat.com>
1238
1239 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
1240 DECL_EXTERNAL.
1241
ef45c4c0 12422016-09-14 Jason Merrill <jason@redhat.com>
1243
1244 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1245 limit FIELD_DECL, either.
1246
b99cc6da 12472016-09-14 Marek Polacek <polacek@redhat.com>
1248
1249 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
1250 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
1251 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
1252
68ef907c 12532016-09-13 David Malcolm <dmalcolm@redhat.com>
1254
1255 * c-common.c (warn_logical_not_parentheses): Replace
1256 rich_location::add_fixit_insert calls with add_fixit_insert_before
1257 and add_fixit_insert_after, eliminating the "next_loc" calculation.
1258
2c24fd5e 12592016-09-13 Jason Merrill <jason@redhat.com>
1260 Tom de Vries <tom@codesourcery.com>
1261
1262 PR c++/77427
1263 * c-common.c (set_underlying_type): Don't treat array as builtin type.
1264
005248bc 12652016-09-13 Jason Merrill <jason@redhat.com>
1266
1267 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1268 limit types at all.
1269
0c893604 12702016-09-12 Jason Merrill <jason@redhat.com>
1271
1272 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
1273 bit/byte confusion, allow large alignment for types.
1274
7a21b590 12752016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1276
1277 PR c++/77496
1278 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
1279
00434032 12802016-09-12 David Malcolm <dmalcolm@redhat.com>
1281
1282 PR c/72858
1283 * c-format.c (argument_parser::check_argument_type): Add params
1284 "type_start" and "conversion_char". Use the former to generate
1285 offset_to_type_start and pass it and conversion_char to
1286 check_format_types.
1287 (check_format_info_main): Capture the start of the type
1288 information as "type_start", and pass it an format_char
1289 to arg_parser.check_argument_type.
1290 (check_format_types): Provide an example in the leading comment.
1291 Add params "offset_to_type_start" and "conversion_char"; pass
1292 them to format_type_warning calls.
1293 (test_get_modifier_for_format_len): Likewise.
1294 (matching_type_p): New function.
1295 (get_format_for_type): Add param "conversion_char" and move
1296 implementation into...
1297 (get_format_for_type_1): ...new function, called twice.
1298 Use new function matching_type_p rather than checking for
1299 TYPE_CANONICAL equality.
1300 (get_corrected_substring): New function.
1301 (format_type_warning): Provide an example in the leading comment.
1302 Add params "offset_to_type_start" and "conversion_char". Replace
1303 call to get_format_for_type with call to get_corrected_substring
1304 and move rejection of hints for widths/precisions there.
1305 (assert_format_for_type_streq): Add param "conversion_char".
1306 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
1307 (test_get_format_for_type_printf): Add conversion chars to the
1308 tests, adding coverage for various combinations of integer
1309 vs double conversions, and for preserving octal and hexadecimal
1310 conversions.
1311 (test_get_format_for_type_scanf): Add conversion chars to the
1312 tests.
1313
3bb45f76 13142016-09-10 Tom de Vries <tom@codesourcery.com>
1315
1316 PR C/71602
1317 * c-common.c (build_va_arg): Handle more strict
1318 targetm.canonical_va_list_type. Replace first argument type error with
1319 assert.
1320
911ea34a 13212016-09-09 Martin Sebor <msebor@redhat.com>
1322
1323 PR c/77520
1324 PR c/77521
1325 * c-format.c (argument_parser::find_format_char_info): Use %qc
1326 format directive unconditionally.
1327
db8ffb40 13282016-09-09 Jason Merrill <jason@redhat.com>
1329
1330 Implement C++17 new of over-aligned types.
1331 * c.opt: Add -faligned-new and -Waligned-new.
1332 * c-common.c (max_align_t_align): Split out from...
1333 (cxx_fundamental_alignment_p): ...here.
1334 * c-common.h: Declare it.
1335 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
1336
c5eddaf9 13372016-09-09 Joseph Myers <joseph@codesourcery.com>
1338
1339 * c-cppbuiltin.c (builtin_define_type_width): New function.
1340 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
1341 macros.
1342
3da97ff7 13432016-09-07 David Malcolm <dmalcolm@redhat.com>
1344
1345 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
1346 a POINTER_TYPE.
1347 (substring_loc::get_location): Move to substring-locations.c,
1348 keeping implementation as...
1349 (c_get_substring_location): New function, from the above, reworked
1350 to use accessors rather than member lookup.
1351 * c-common.h (class substring_loc): Move to substring-locations.h,
1352 replacing with a forward decl.
1353 (c_get_substring_location): New decl.
1354 * c-format.c: Include "substring-locations.h".
1355 (format_warning_va): Move to substring-locations.c.
1356 (format_warning_at_substring): Likewise.
1357
f9b3f702 13582016-09-06 Martin Sebor <msebor@redhat.com>
1359
1360 PR c/77336
1361 * c-format.c (check_function_format): Avoid issuing warnings for
1362 functions unless they call format functions with non-constant
1363 format strings.
1364
4c04bcce 13652016-09-06 Richard Biener <rguenther@suse.de>
1366
1367 PR c/77450
1368 * c-common.c (c_common_mark_addressable_vec): Handle
1369 COMPOUND_LITERAL_EXPR.
1370
8f8828ba 13712016-09-05 Marek Polacek <polacek@redhat.com>
1372
1373 PR c/77423
1374 * c-common.c (bool_promoted_to_int_p): New function.
1375 (expr_has_boolean_operands_p): New function.
1376 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
1377 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
1378
8ff61e58 13792016-09-04 Tom de Vries <tom@codesourcery.com>
1380
1381 revert:
1382 2016-08-29 Tom de Vries <tom@codesourcery.com>
1383
1384 * c-common.c (build_va_arg): Replace first argument type error
1385 with assert.
1386
0b80c4b2 13872016-09-02 Jakub Jelinek <jakub@redhat.com>
1388
1389 PR c/65467
1390 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
1391 (c_finish_omp_for): Reject _Atomic qualified iterators.
1392
13932016-09-01 Martin Sebor <msebor@redhat.com>
b18dea91 1394
1395 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
1396 size to guarantee it fits the output of the formatted function
1397 regardless of its arguments.
1398
c7afb782 13992016-09-01 Marek Polacek <polacek@redhat.com>
1400
1401 PR c/7652
1402 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
1403 FALLTHRU comments.
1404
f293b7f2 14052016-08-29 Marek Polacek <polacek@redhat.com>
1406
1407 PR c/77292
1408 * c-common.c (warn_logical_not_parentheses): Don't warn for
1409 a comparison or a logical operator.
1410
839e4d28 14112016-08-29 Tom de Vries <tom@codesourcery.com>
1412
1413 * c-common.c (build_va_arg): Fix type comparison assert.
1414
0acb92b8 14152016-08-29 Tom de Vries <tom@codesourcery.com>
1416
1417 * c-common.c (build_va_arg): Replace first argument type error
1418 with assert.
1419
ea2ec8f6 14202016-08-29 Tom de Vries <tom@codesourcery.com>
1421
1422 PR c/77398
1423 * c-common.c (build_va_arg): Add first argument error. Build va_arg
1424 with error_mark_node as va_list instead of with illegal va_list.
1425
c4963714 14262016-08-25 Marek Polacek <polacek@redhat.com>
1427 David Malcolm <dmalcolm@redhat.com>
1428
1429 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
1430 * c-common.h (warn_logical_not_parentheses): Update declaration.
1431
364743f3 14322016-08-22 Marek Polacek <polacek@redhat.com>
1433
1434 PR c++/77321
1435 * c-common.c (warn_for_memset): Check type for null.
1436
012f068a 14372016-08-22 Joseph Myers <joseph@codesourcery.com>
1438
1439 * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
1440 _FloatNx types for suffixes for built-in functions.
1441
82c85aba 14422016-08-19 Joseph Myers <joseph@codesourcery.com>
1443
1444 PR c/32187
1445 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
1446 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
1447 (RID_FLOAT128X): New enum rid values.
1448 (CASE_RID_FLOATN_NX): New macro.
1449 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
1450 keywords.
1451 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
1452 corresponding complex types.
1453 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
1454 _FloatNx and corresponding complex types.
1455 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
1456 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
1457 and _FloatNx types for the widest type for determining
1458 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
1459 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
1460 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
1461 and _FloatNx types.
1462 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
1463 constants.
1464 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
1465 _FloatNx types.
1466
48a7392b 14672016-08-18 David Malcolm <dmalcolm@redhat.com>
1468
1469 * c-opts.c (c_diagnostic_finalizer): Update for change to
1470 diagnostic_show_locus.
1471
5c8151fa 14722016-08-18 David Malcolm <dmalcolm@redhat.com>
1473
1474 * c-common.c: Include "spellcheck.h".
1475 (cb_get_suggestion): New function.
1476 * c-common.h (cb_get_suggestion): New decl.
1477 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
1478 cb_get_suggestion.
1479
26040f06 14802016-08-18 Marek Polacek <polacek@redhat.com>
1481
1482 PR c/71514
1483 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
1484 and pointer-to-VLA.
1485
5927e78e 14862016-08-16 David Malcolm <dmalcolm@redhat.com>
1487
1488 PR c/72857
1489 * c-common.c (substring_loc::get_range): Rename to...
1490 (substring_loc::get_location): ...this, converting param from a
1491 source_range * to a location_t *. Call
1492 get_source_location_for_substring rather than
1493 get_source_range_for_substring, and pass in m_caret_idx.
1494 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
1495 (substring_loc::get_range): Replace with...
1496 (substring_loc::get_location): ...this.
1497 (substring_loc::set_caret_index): New method.
1498 (substring_loc): Add field m_caret_idx.
1499 * c-format.c (format_warning_va): Update for above changes.
1500 Rename local "substring_loc" to "fmt_substring_loc" to avoid
1501 clashing with type name.
1502 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
1503 (check_argument_type): Likewise.
1504 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
1505 Use a copy when emitting warnings, setting the caret index from TYPE.
1506
6ce66d38 15072016-08-16 Eric Botcazou <ebotcazou@adacore.com>
a49621cf 1508 Arnaud Charlet <charlet@adacore.com>
6ce66d38 1509
1510 * c-ada-spec.c (dump_number): New function.
1511 (handle_escape_character): Likewise.
1512 (print_ada_macros): Add handling of constant integers and strings.
1513
e3533433 15142016-08-12 Marek Polacek <polacek@redhat.com>
1515
1516 PR c/7652
1517 * c-common.c (scalar_to_vector): Adjust fall through comment.
1518 * c-opts.c (c_common_handle_option): Likewise.
1519 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
1520 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
1521 fall through comment.
1522 * cilk.c (extract_free_variables): Add FALLTHRU.
1523
0f463aec 15242016-08-10 Jason Merrill <jason@redhat.com>
1525
1526 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
1527
80488e20 15282016-08-09 Jason Merrill <jason@redhat.com>
1529
1530 * c-common.c (c_common_attribute_table): vector_size affects type
1531 identity.
1532
a319e7f4 15332016-08-09 Marek Polacek <polacek@redhat.com>
1534
1535 PR c/7652
1536 * c-ada-spec.c (dump_generic_ada_node): Add return.
1537
33603066 15382016-08-09 Jason Merrill <jason@redhat.com>
1539
1540 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
1541 C++17 constexpr lambdas.
1542
7af4d06b 15432016-08-08 David Malcolm <dmalcolm@redhat.com>
1544
1545 PR c/64955
1546 * c-common.h (selftest::c_format_c_tests): New declaration.
1547 (selftest::run_c_tests): New declaration.
1548 * c-format.c: Include "selftest.h.
1549 (format_warning_va): Add param "corrected_substring" and use
1550 it to add a replacement fix-it hint.
1551 (format_warning_at_substring): Likewise.
1552 (format_warning_at_char): Update for new param of
1553 format_warning_va.
1554 (argument_parser::check_argument_type): Pass "fki" to
1555 check_format_types.
1556 (check_format_types): Add param "fki" and pass it to
1557 format_type_warning.
1558 (deref_n_times): New function.
1559 (get_modifier_for_format_len): New function.
1560 (selftest::test_get_modifier_for_format_len): New function.
1561 (get_format_for_type): New function.
1562 (format_type_warning): Add param "fki" and use it to attempt
1563 to provide hints for argument types when calling
1564 format_warning_at_substring.
1565 (selftest::get_info): New function.
1566 (selftest::assert_format_for_type_streq): New function.
1567 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
1568 (selftest::test_get_format_for_type_printf): New function.
1569 (selftest::test_get_format_for_type_scanf): New function.
1570 (selftest::c_format_c_tests): New function.
1571
d189b094 15722016-08-08 David Malcolm <dmalcolm@redhat.com>
1573
1574 PR c/52952
1575 * c-format.c: Include "diagnostic.h".
1576 (location_column_from_byte_offset): Delete.
1577 (location_from_offset): Delete.
1578 (format_warning_va): New function.
1579 (format_warning_at_substring): New function.
1580 (format_warning_at_char): New function.
1581 (check_format_arg): Capture location of format_tree and pass to
1582 check_format_info_main.
1583 (argument_parser): Add fields "start_of_this_format" and
1584 "format_string_cst".
1585 (flag_chars_t::validate): Add param "format_string_cst". Convert
1586 warning_at call using location_from_offset to call to
1587 format_warning_at_char.
1588 (argument_parser::argument_parser): Add param "format_string_cst_"
1589 and use use it to initialize field "format_string_cst".
1590 Initialize new field "start_of_this_format".
1591 (argument_parser::read_format_flags): Convert warning_at call
1592 using location_from_offset to a call to format_warning_at_char.
1593 (argument_parser::read_any_format_left_precision): Likewise.
1594 (argument_parser::read_any_format_precision): Likewise.
1595 (argument_parser::read_any_other_modifier): Likewise.
1596 (argument_parser::find_format_char_info): Likewise, in three places.
1597 (argument_parser::parse_any_scan_set): Likewise, in one place.
1598 (argument_parser::handle_conversions): Likewise, in two places.
1599 (argument_parser::check_argument_type): Add param "fmt_param_loc"
1600 and use it to make a substring_loc. Pass the latter to
1601 check_format_types.
1602 (check_format_info_main): Add params "fmt_param_loc" and
1603 "format_string_cst". Convert warning_at calls using
1604 location_from_offset to calls to format_warning_at_char. Pass the
1605 new params to the arg_parser ctor. Pass "format_string_cst" to
1606 flag_chars.validate. Pass "fmt_param_loc" to
1607 arg_parser.check_argument_type.
1608 (check_format_types): Convert first param from a location_t
1609 to a const substring_loc & and rename to "fmt_loc". Attempt
1610 to extract the range of the relevant parameter and pass it
1611 to format_type_warning.
1612 (format_type_warning): Convert first param from a location_t
1613 to a const substring_loc & and rename to "fmt_loc". Add
1614 params "param_range" and "type". Replace calls to warning_at
1615 with calls to format_warning_at_substring.
1616
0dae5fef 16172016-08-08 David Malcolm <dmalcolm@redhat.com>
1618
1619 * c-format.c (class flag_chars_t): New class.
1620 (struct length_modifier): New struct.
1621 (class argument_parser): New class.
1622 (flag_chars_t::flag_chars_t): New ctor.
1623 (flag_chars_t::has_char_p): New method.
1624 (flag_chars_t::add_char): New method.
1625 (flag_chars_t::validate): New method.
1626 (flag_chars_t::get_alloc_flag): New method.
1627 (flag_chars_t::assignment_suppression_p): New method.
1628 (argument_parser::argument_parser): New ctor.
1629 (argument_parser::read_any_dollar): New method.
1630 (argument_parser::read_format_flags): New method.
1631 (argument_parser::read_any_format_width): New method.
1632 (argument_parser::read_any_format_left_precision): New method.
1633 (argument_parser::read_any_format_precision): New method.
1634 (argument_parser::handle_alloc_chars): New method.
1635 (argument_parser::read_any_length_modifier): New method.
1636 (argument_parser::read_any_other_modifier): New method.
1637 (argument_parser::find_format_char_info): New method.
1638 (argument_parser::validate_flag_pairs): New method.
1639 (argument_parser::give_y2k_warnings): New method.
1640 (argument_parser::parse_any_scan_set): New method.
1641 (argument_parser::handle_conversions): New method.
1642 (argument_parser::check_argument_type): New method.
1643 (check_format_info_main): Introduce classes argument_parser
1644 and flag_chars_t, moving the code within the loop into methods
1645 of these classes. Make various locals "const".
1646
d4166bdc 16472016-08-05 David Malcolm <dmalcolm@redhat.com>
1648
1649 * c-common.c: Include "substring-locations.h".
1650 (get_cpp_ttype_from_string_type): New function.
1651 (g_string_concat_db): New global.
1652 (substring_loc::get_range): New method.
1653 * c-common.h (g_string_concat_db): New declaration.
1654 (class substring_loc): New class.
1655 * c-lex.c (lex_string): When concatenating strings, capture the
1656 locations of all tokens using a new obstack, and record the
1657 concatenation locations within g_string_concat_db.
1658 * c-opts.c (c_common_init_options): Construct g_string_concat_db
1659 on the ggc-heap.
1660
7648c9c7 16612016-07-29 Marek Polacek <polacek@redhat.com>
1662
8ae70602 1663 PR c/71926
1664 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
1665 parentheses warning.
1666
7648c9c7 1667 PR c/71574
1668 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
1669
595e387a 16702016-07-28 Martin Liska <mliska@suse.cz>
1671
1672 PR gcov-profile/68025
1673 * c-common.c (handle_no_profile_instrument_function_attribute):
1674
296103aa 16752016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1676
1677 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
1678 BITS_PER_UNIT_LOG.
1679
21483ab7 16802016-07-25 Jason Merrill <jason@redhat.com>
1681
1682 PR c++/65970
1683 * c.opt (fconstexpr-loop-limit): New.
1684
0b80c4b2 16852016-07-22 Martin Sebor <msebor@redhat.com>
efa8e86e 1686
1687 PR c++/71675
1688 * c-common.c (resolve_overloaded_builtin): Avoid converting
1689 __atomic_compare_exchange_n return type to that of what its
1690 first argument points to.
1691
59c1507a 16922016-07-22 Uros Bizjak <ubizjak@gmail.com>
1693
1694 * c-common.c: Use HOST_WIDE_INT_M1U instead of
1695 ~(unsigned HOST_WIDE_INT) 0.
1696
45648efe 16972016-07-22 Martin Liska <mliska@suse.cz>
1698
1699 PR gcov-profile/69028
1700 PR gcov-profile/62047
1701 * cilk.c (create_cilk_helper_decl): Set location of a new decl
1702 to the current_function_decl.
1703
0c0f63cb 17042016-07-21 Jason Merrill <jason@redhat.com>
1705
1706 PR c++/65168
1707 * c-common.c (c_common_truthvalue_conversion): Check
1708 c_inhibit_evaluation_warnings for warning about address of
1709 reference.
1710
d208f6e6 17112016-07-20 David Malcolm <dmalcolm@redhat.com>
1712
1713 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
1714 const char *.
1715
0238e35e 17162016-07-15 Jason Merrill <jason@redhat.com>
1717
1718 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
1719
0dd7db3b 17202016-07-15 Jakub Jelinek <jakub@redhat.com>
1721
1722 PR c/71858
1723 * c-common.h (enum lookup_name_fuzzy_kind): Add
1724 FUZZY_LOOKUP_FUNCTION_NAME.
1725
e59cff35 17262016-07-08 Jason Merrill <jason@redhat.com>
1727
1728 P0145: Refining Expression Order for C++.
1729 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
1730 * c-opts.c: Adjust.
1731
faee03ad 17322016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
1733
1734 PR c++/71214
1735 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
1736
a4dd89cb 17372016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1738
1739 * c-pragma.h (enum pragma_kind): Rename
1740 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
1741 users.
1742
b6a4a0f5 17432016-06-29 Richard Biener <rguenther@suse.de>
1744
1745 PR middle-end/71002
1746 * c-common.c (c_common_get_alias_set): Remove union type punning case.
1747
176aa551 17482016-06-24 Jason Merrill <jason@redhat.com>
1749
1750 P0145R2: Refining Expression Order for C++.
1751 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
1752 MODIFY_EXPR.
1753
77104764 17542016-06-24 Jakub Jelinek <jakub@redhat.com>
1755
1756 * c-common.c (check_builtin_function_arguments): Require last
1757 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
1758 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
1759 if the last argument is pointer to enumerated or boolean type.
1760
8469aece 17612016-06-22 David Malcolm <dmalcolm@redhat.com>
1762
1763 PR c/70339
1764 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
1765 (lookup_name_fuzzy): New prototype.
1766
bd08c370 17672016-06-21 John David Anglin <danglin@gcc.gnu.org>
1768
1769 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
1770
06c75b9a 17712016-06-14 Jason Merrill <jason@redhat.com>
1772
1773 P0145R2: Refining Expression Order for C++.
1774 * c.opt (fargs-in-order): New.
1775 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
1776
9720103d 17772016-06-13 Jakub Jelinek <jakub@redhat.com>
1778
12cb8367 1779 PR sanitizer/71498
1780 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
1781 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
1782
9720103d 1783 PR preprocessor/71183
1784 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
1785 to cb_get_source_date_epoch.
1786
8ec29807 17872016-06-10 Jakub Jelinek <jakub@redhat.com>
1788
1789 PR c/68657
1790 * c.opt (Wpsabi): Add Warning flag.
1791
1dc4d519 17922016-06-10 Martin Sebor <msebor@redhat.com>
1793
1794 PR c/71392
1795 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
1796 the nonnull attribute in type-generic builtins.
1797
23b101c5 17982016-06-09 Martin Sebor <msebor@redhat.com>
1799
1800 PR c/70883
1801 * c-common.c (builtin_function_validate_nargs): Make text of error
1802 message consistent with others like it.
1803
732905bb 18042016-06-08 Martin Sebor <msebor@redhat.com>
1805 Jakub Jelinek <jakub@redhat.com>
1806
1807 PR c++/70507
1808 PR c/68120
1809 * c-common.c (check_builtin_function_arguments): Handle
1810 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
1811
86a5f91c 18122016-06-08 Richard Biener <rguenther@suse.de>
1813
1814 * c-common.c (parse_optimize_options): Improve diagnostic messages.
1815
b032c4dd 18162016-06-07 Richard Biener <rguenther@suse.de>
1817
1818 PR c/61564
1819 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
1820 options and warn about others.
1821
dfa5c0d3 18222016-06-01 Eduard Sanou <dhole@openmailbox.org>
1823
1824 * c-common.c (get_source_date_epoch): Rename to
1825 cb_get_source_date_epoch.
1826 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
1827 message when the parsing fails. Use error_at instead of fatal_error.
1828 * c-common.h (get_source_date_epoch): Rename to
1829 cb_get_source_date_epoch.
1830 * c-common.h (cb_get_source_date_epoch): Prototype.
1831 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
1832 * c-common.h (c_omp_region_type): Remove trailing comma.
1833 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
1834 * c-lex.c (c_lex_with_flags): Remove initialization of
1835 pfile->source_date_epoch.
1836
b6431756 18372016-05-30 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c++/71349
1840 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
1841 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
1842 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
1843 instead of C_OMP_CLAUSE_SPLIT_FOR.
1844
7345b977 18452016-05-24 Richard Biener <rguenther@suse.de>
1846
1847 PR middle-end/70434
1848 PR c/69504
1849 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
1850 (convert_vector_to_array_for_subscript): ... this.
1851 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
1852 VIEW_CONVERT_EXPR to an array type. Rename to ...
1853 (convert_vector_to_array_for_subscript): ... this.
1854
22a3f7bd 18552016-05-12 Marek Polacek <polacek@redhat.com>
1856
1857 PR c/70756
1858 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
1859 size_in_bytes and pass LOC to it.
1860
54c4d22e 18612016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
1862
1863 PR c/43651
1864 * c.opt (Wduplicate-decl-specifier): New option.
1865
7f8012a5 18662016-05-11 Marek Polacek <polacek@redhat.com>
1867
1868 PR c++/71024
1869 * c-common.c (diagnose_mismatched_attributes): New function.
1870 * c-common.h (diagnose_mismatched_attributes): Declare.
1871
1d52c456 18722016-05-04 Marek Polacek <polacek@redhat.com>
1873
1874 * c.opt (Wdangling-else): New option.
1875
5d4db8ef 18762016-05-03 Marek Polacek <polacek@redhat.com>
1877
1878 PR c/70859
1879 * c-common.c (builtin_function_validate_nargs): Add location
1880 parameter. Use it.
1881 (check_builtin_function_arguments): Add location and arguments
1882 parameters. Use them.
1883 * c-common.h (check_builtin_function_arguments): Update declaration.
1884
9ae1b28a 18852016-05-03 Richard Biener <rguenther@suse.de>
1886
1887 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
1888 allow call args to gimplify to SSA names.
1889
4341e093 18902016-05-03 Marek Polacek <polacek@redhat.com>
1891
1892 * c-common.h (enum c_omp_region_type): Remove stray comma.
1893
b5e88f74 18942016-05-02 Cesar Philippidis <cesar@codesourcery.com>
1895
1896 * c-common.h (enum c_omp_region_type): Define.
1897
ee31dd3d 18982016-05-02 Richard Sandiford <richard.sandiford@arm.com>
1899
1900 * c-common.c (shorten_compare): Use wi::to_wide.
1901
4d0a8bac 19022016-04-29 Cesar Philippidis <cesar@codesourcery.com>
1903
1904 PR middle-end/70626
1905 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
1906 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
1907 reduction clauses in acc parallel loops.
1908
025dd1e0 19092016-04-29 Marek Polacek <polacek@redhat.com>
1910
1911 PR c/70852
1912 * c-common.c (warn_for_memset): Check domain before accessing it.
1913
eb16928e 19142016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
1915
1916 PR/69089
1917 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
1918 "aligned" attribute.
1919
ddd2a3d4 19202016-04-28 Jason Merrill <jason@redhat.com>
1921
1922 * c-lex.c (c_common_has_attribute): Handle nodiscard.
1923
e3e8c48c 19242016-04-28 Eduard Sanou <dhole@openmailbox.org>
1925 Matthias Klose <doko@debian.org>
1926
1927 * c-common.c (get_source_date_epoch): New function, gets the environment
1928 variable SOURCE_DATE_EPOCH and parses it as long long with error
1929 handling.
1930 * c-common.h (get_source_date_epoch): Prototype.
1931 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
1932
605a4556 19332015-04-27 Ryan Burn <contact@rnburn.com>
1934
1935 PR c++/69024
1936 PR c++/68997
1937 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
1938 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
1939 external linkage.
1940 (cilk_detect_and_unwrap): Corresponding changes.
1941 (extract_free_variables): Don't extract free variables from
1942 AGGR_INIT_EXPR slot.
1943 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
1944 (cilk_recognize_spawn): Likewise.
1945
40385231 19462016-04-27 Bernd Schmidt <bschmidt@redhat.com>
1947
1948 * c.opt (Wmemset-elt-size): New option.
1949 * c-common.c (warn_for_memset): New function.
1950 * c-common.h (warn_for_memset): Declare.
1951
f5d49c14 19522016-04-25 Jason Merrill <jason@redhat.com>
1953
1954 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
1955 No longer static.
1956 * c-common.h: Declare it.
1957 * c-lex.c (c_common_has_attribute): Add maybe_unused.
1958
9c980ab5 19592016-04-22 Jason Merrill <jason@redhat.com>
1960
1961 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
1962
70574e60 19632016-04-20 Ilya Verbin <ilya.verbin@intel.com>
1964
1965 PR c++/69363
1966 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
1967 * c-common.h (c_finish_cilk_clauses): Remove declaration.
1968
5d4b30ea 19692016-04-18 Michael Matz <matz@suse.de>
1970
1971 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
1972 and SET_DECL_ALIGN.
1973
021ad2f3 19742016-04-17 Eric Botcazou <ebotcazou@adacore.com>
1975
1976 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
1977 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
1978 to incomplete types.
1979 (dump_nested_type): Remove redundant tests and tidy up.
1980 (print_ada_declaration): Also set TREE_VISITED on the declaration of
1981 a type which is the typedef of an original type.
1982
926f9422 19832016-04-15 Marek Polacek <polacek@redhat.com>
1984
1985 PR c/70651
1986 * c-common.c (build_va_arg): Change two asserts into errors and return
1987 error_mark_node.
1988
92c53257 19892016-04-13 Marek Polacek <polacek@redhat.com>
1990
1991 PR c++/70639
1992 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
1993 for switch statements, too.
1994
a3ae889f 19952016-03-28 Jason Merrill <jason@redhat.com>
1996
1997 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
1998
62d2a6dc 19992016-03-23 Marek Polacek <polacek@redhat.com>
2000
2001 PR c++/69884
2002 * c.opt (Wignored-attributes): New option.
2003
4baec9f2 20042016-03-22 David Malcolm <dmalcolm@redhat.com>
2005
2006 PR c/69993
2007 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
2008 diagnostic text, reversing the order of the warning and note so
2009 that they appear in source order.
2010
92e7ab1e 20112016-03-17 Marek Polacek <polacek@redhat.com>
2012
2013 PR c/69407
2014 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
2015 operations.
2016
6f895832 20172016-03-14 Jason Merrill <jason@redhat.com>
2018
14c36b14 2019 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
2020
6f895832 2021 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2022
42bb3bfb 20232016-03-09 Richard Biener <rguenther@suse.de>
2024
2025 PR c/70143
2026 * c-common.c (strict_aliasing_warning): Add back
2027 alias_sets_conflict_p check.
2028
3556aa80 20292016-03-08 Jason Merrill <jason@redhat.com>
2030
2031 * c-opts.c (set_std_cxx1z): Don't enable concepts.
2032
0060768a 20332016-03-04 David Malcolm <dmalcolm@redhat.com>
2034
2035 PR c/68187
2036 * c-indentation.c (get_visual_column): Move code to determine next
2037 tab stop to...
2038 (next_tab_stop): ...this new function.
2039 (line_contains_hash_if): Delete function.
2040 (detect_preprocessor_logic): Delete function.
2041 (get_first_nws_vis_column): New function.
2042 (detect_intervening_unindent): New function.
2043 (should_warn_for_misleading_indentation): Replace call to
2044 detect_preprocessor_logic with a call to
2045 detect_intervening_unindent.
2046
74c6fd40 20472016-03-04 David Malcolm <dmalcolm@redhat.com>
2048
2049 PR c/68187
2050 * c-indentation.c (should_warn_for_misleading_indentation): When
2051 suppressing warnings about cases where the guard and body are on
2052 the same column, only use the first non-whitespace column in place
2053 of the guard token column when dealing with "else" clauses.
2054 When rejecting aligned BODY and NEXT, loosen the requirement
2055 from equality with the first non-whitespace of guard to simply
2056 that they not be indented relative to it.
2057
e692d332 20582016-03-04 Richard Biener <rguenther@suse.de>
2059
2060 PR c++/70054
2061 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
2062 instead of alias_sets_conflict_p.
2063
12cc1225 20642016-03-01 Marek Polacek <polacek@redhat.com>
2065
2066 PR c++/69795
2067 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
2068 any DECL.
2069
8c38d887 20702016-02-22 Martin Sebor <msebor@redhat.com>
2071
2072 PR middle-end/69780
2073 * c-common.c (check_builtin_function_arguments): Validate and
2074 reject invalid arguments to __builtin_alloca_with_align.
2075
e53f41d5 20762016-02-20 Mark Wielaard <mjw@redhat.com>
2077
2078 PR c/28901
2079 * c.opt (Wunused-const-variable): Turn into Alias for...
2080 (Wunused-const-variable=): New option.
2081
9cce8384 20822016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2083
2084 PR c++/69865
2085 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
2086 here...
2087 (c_common_init_options): ...to here.
2088 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2089
563d5cb8 20902016-02-19 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR c++/69826
2093 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
2094 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
2095 flag_preprocess_only.
2096
7675e968 20972016-02-16 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR c/69835
2100 * c.opt (Wnonnull-compare): Enable for -Wall.
2101
77454e6e 21022016-02-15 Jakub Jelinek <jakub@redhat.com>
2103
2104 PR c++/69797
2105 * c-common.c (sync_resolve_size): Diagnose too few arguments
2106 even when params is non-NULL empty vector.
2107
600695e0 21082016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2109
2110 PR target/60410
2111 * c.opt (fshort-double): Remove.
2112
a7cc1f94 21132016-02-05 Martin Sebor <msebor@redhat.com>
2114
2115 PR c++/69662
2116 * c.opt (Warning options): Update -Wplacement-new to take
2117 an optional argument.
2118
6f13b088 21192016-02-01 Jakub Jelinek <jakub@redhat.com>
2120
2121 PR preprocessor/69543
2122 PR c/69558
2123 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
2124 instead of loc to control_warning_option.
2125
948eee2f 21262016-02-01 Nathan Sidwell <nathan@codesourcery.com>
2127
2128 * c.opt (fopenacc-dim=): New option.
2129
5fa82c11 21302016-01-27 Ryan Burn <contact@rnburn.com>
2131
2132 PR cilkplus/69267
2133 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
2134 gimplify_arg. Removed superfluous post_p argument.
2135 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
2136 superfluous post_p argument.
2137 * c-gimplify.c (c_gimplify_expr): Likewise.
2138
3752e5b1 21392016-01-26 David Malcolm <dmalcolm@redhat.com>
2140
2141 PR other/69006
2142 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
2143 pp_newline_and_flush with pp_flush.
2144
bbbbe8ab 21452016-01-20 Martin Sebor <msebor@redhat.com>
2146
2147 PR c/69405
2148 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
2149 an incompatible argument when the argument isn't a valid tree node.
2150
f6dfb86a 21512016-01-18 Jason Merrill <jason@redhat.com>
2152
2153 PR c++/68767
2154 * c-common.c (check_function_arguments_recurse): Fold the whole
2155 COND_EXPR, not just the condition.
2156
f672c103 21572016-01-18 Tom de Vries <tom@codesourcery.com>
2158
2159 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
2160 classify as loop clause.
2161
c8ef893c 21622016-01-15 Jakub Jelinek <jakub@redhat.com>
2163
2164 PR bootstrap/68271
2165 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
2166 C++ FE no longer has limit on number of pragmas.
2167
21682015-01-14 Ryan Burn <contact@rnburn.com>
7d600da5 2169
2170 PR c++/69048
2171 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
580357e7 2172 to add missing cleanup point.
7d600da5 2173
a7ed4583 21742016-01-14 David Malcolm <dmalcolm@redhat.com>
2175
2176 PR c++/68819
2177 * c-indentation.c (get_visual_column): Add location_t param.
2178 Handle the column number being zero by effectively disabling the
2179 warning, with an "inform".
2180 (should_warn_for_misleading_indentation): Add location_t argument
2181 for all uses of get_visual_column.
2182
b933e511 21832016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
2184
2185 PR c++/69029
2186 * c-indentation.c (should_warn_for_misleading_indentation):
2187 Don't warn about do-while statements.
2188
517906ff 21892016-01-07 Martin Sebor <msebor@redhat.com>
2190
2191 PR c/68966
2192 * c-common.c (sync_resolve_size): Reject first argument when it's
2193 a pointer to _Bool.
2194
d42aa619 21952016-01-05 David Malcolm <dmalcolm@redhat.com>
2196
2197 PR c/69122
2198 * c-indentation.c (get_visual_column): Remove default argument.
2199 (should_warn_for_misleading_indentation): For the multiline case,
2200 update call to get_visual_column for next_stmt_exploc so that it
2201 captures the location of the first non-whitespace character in the
2202 relevant line. Don't issue warnings if there is non-whitespace
2203 before the next statement.
2204
f1717362 22052016-01-04 Jakub Jelinek <jakub@redhat.com>
2206
2207 Update copyright years.
2208
c0bf500c 22092015-12-21 David Malcolm <dmalcolm@redhat.com>
2210
2211 * c-common.c (binary_op_error): Convert first param from
2212 location_t to rich_location * and use it when emitting an error.
2213 * c-common.h (binary_op_error): Convert first param from
2214 location_t to rich_location *.
2215
dbd79382 22162015-12-16 David Malcolm <dmalcolm@redhat.com>
2217
2218 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
2219 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
2220
c0998828 22212015-12-15 Ilya Verbin <ilya.verbin@intel.com>
2222
2223 * c-common.c (c_common_attribute_table): Handle "omp declare target
2224 link" attribute.
2225
7ca909c6 22262015-12-14 Jakub Jelinek <jakub@redhat.com>
2227
2228 PR c/68833
2229 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2230
d9102cbe 22312014-12-12 Tobias Burnus <burnus@net-b.de>
2232
2233 PR fortran/68815
2234 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
2235 specifiers (%d, %i,%u and %c).
2236
a515ebdf 22372015-12-10 David Malcolm <dmalcolm@redhat.com>
2238
2239 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2240
31ba81bd 22412015-12-08 Jakub Jelinek <jakub@redhat.com>
2242
2243 PR c/48088
2244 PR c/68657
2245 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
2246 * c-pragma.c (handle_pragma_diagnostic): Adjust
2247 control_warning_option caller.
2248
d0f713f4 22492015-12-07 David Malcolm <dmalcolm@redhat.com>
2250
2251 * c-common.c (c_cpp_error): Update for change to
2252 rich_location::set_range.
2253
32d050b5 22542015-12-04 Paolo Bonzini <bonzini@gnu.org>
2255
2256 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
2257 shifting 1 out of the sign bit.
2258
22592015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
2260
2261 * c-common.c (c_common_attribute_table[]): Update max arguments
2262 count for "simd" attribute.
2263 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2264
6a8fbd7a 22652015-12-03 Jakub Jelinek <jakub@redhat.com>
2266
2267 PR preprocessor/57580
2268 * c-ppoutput.c (print): Change printed field to bool.
2269 Move src_file last for smaller padding.
2270 (init_pp_output): Set print.printed to false instead of 0.
2271 (scan_translation_unit): Fix up formatting. Set print.printed
2272 to true after printing something other than newline.
2273 (scan_translation_unit_trad): Set print.printed to true instead of 1.
2274 (maybe_print_line_1): Set print.printed to false instead of 0.
2275 (print_line_1): Likewise.
2276 (do_line_change): Set print.printed to true instead of 1.
2277 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
2278 dump_macro): Set print.printed to false after printing newline.
2279
da562e32 22802015-12-02 Jason Merrill <jason@redhat.com>
2281
9c691dbd 2282 * c-common.c (fold_for_warn): New.
2283 (warn_logical_operator, warn_tautological_cmp)
2284 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
2285
da562e32 2286 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2287 (c_fully_fold_internal, decl_constant_value_for_optimization):
2288 Move to c/c-fold.c.
2289 * c-common.h: Don't declare decl_constant_value_for_optimization.
2290
89f16034 22912015-12-02 Joseph Myers <joseph@codesourcery.com>
2292
2293 PR c/68162
2294 * c-common.h (c_build_qualified_type): Add extra default
2295 arguments.
2296
571b3486 22972015-12-01 Julian Brown <julian@codesourcery.com>
2298 Cesar Philippidis <cesar@codesourcery.com>
2299 James Norris <James_Norris@mentor.com>
2300
2301 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
2302 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
2303 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2304
ed92a461 23052015-11-30 Eric Botcazou <ebotcazou@adacore.com>
2306
2307 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
2308 (decl_sloc_common): Delete and move bulk of processing to...
2309 (decl_sloc): ...here.
2310 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
2311 (dump_ada_double_name): Remove S parameter and compute the suffix.
2312 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
2313 element type and deal with an anonymous one.
2314 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
2315 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
2316 and remove reference to QUAL_UNION_TYPE.
2317 (dump_nested_types): Make 2 passes on the fields and move bulk to...
2318 (dump_nested_type): ...here. New function extracted from above.
2319 Generate a full declaration for anonymous element type of arrays.
2320 (print_ada_declaration): Really skip anonymous declarations. Remove
2321 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
2322 Clean up processing of declarations of array types and objects.
2323 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
2324 Remove obsolete code and tidy up.
2325
c25b3e3f 23262015-11-29 Jan Hubicka <hubicka@ucw.cz>
2327
2328 PR c/67581
2329 * c-common.c (handle_transparent_union_attribute): Update
2330 also type variants.
2331
d4e328e9 23322015-11-27 Martin Liska <mliska@suse.cz>
2333
2334 PR c++/68312
2335 * array-notation-common.c (cilkplus_extract_an_triplets):
2336 Release vector of vectors.
2337 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
2338
f63d9c4e 23392015-11-26 Eric Botcazou <ebotcazou@adacore.com>
2340
2341 PR c++/68527
2342 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
2343 (print_ada_struct_decl): Likewise.
2344
8d63c601 23452015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
2346
2347 PR c++/68001
2348 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
2349 * cilk.c (recognize_spawn): Determine location in a more precise
2350 way.
2351
01f11119 23522015-11-19 Jason Merrill <jason@redhat.com>
2353
2354 * c-common.c (shorten_compare): But look through macros from
2355 system headers.
2356
2d3d3af7 23572015-11-18 Jason Merrill <jason@redhat.com>
2358
2359 * c-common.c (shorten_compare): Don't -Wtype-limits if the
2360 non-constant operand comes from a macro.
2361
7991eeee 23622015-11-17 Jason Merrill <jason@redhat.com>
2363
2364 PR bootstrap/68346
2365 * c-common.c (warn_tautological_cmp): Fold before checking for
2366 constants.
2367
73f67931 23682015-11-16 Marek Polacek <polacek@redhat.com>
2369
2370 PR c++/68362
2371 * c-common.c (check_case_bounds): Fold low and high cases.
2372
8e539fdc 23732015-11-16 Marek Polacek <polacek@redhat.com>
2374
2375 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
2376 * c-common.c (c_common_get_alias_set): Likewise.
2377 (handle_visibility_attribute): Likewise.
2378
c58a4cfd 23792015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2380
2381 * c-common.c (handle_simd_attribute): New.
2382 (struct attribute_spec): Add entry for "simd".
2383 (handle_simd_attribute): New.
2384
bb036391 23852015-11-13 Kai Tietz <ktietz70@googlemail.com>
2386
2387 * c-lex.c (interpret_float): Use fold_convert.
2388
a96cefb2 23892015-11-13 David Malcolm <dmalcolm@redhat.com>
2390
2391 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
2392 and store it on the result.
2393 * c-opts.c (c_common_init_options): Set
2394 global_dc->colorize_source_p.
2395
2fc5e987 23962015-11-12 James Norris <jnorris@codesourcery.com>
2397 Joseph Myers <joseph@codesourcery.com>
2398
2399 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
2400 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
2401 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
2402 PRAGMA_OACC_CLAUSE_LINK.
2403
81b1b2a8 24042015-11-11 Marek Polacek <polacek@redhat.com>
2405
2406 PR c/68107
2407 PR c++/68266
2408 * c-common.c (valid_array_size_p): New function.
2409 * c-common.h (valid_array_size_p): Declare.
2410
92a44a68 24112015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4f3707ca 2412
2413 PR bootstrap/68271
2414 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
2415
6e803544 24162015-11-11 Andrew MacLeod <amacleod@redhat.com>
2417
2418 * array-notation-common.c: Remove unused header files.
2419 * c-ada-spec.c: Likewise.
2420 * c-cilkplus.c: Likewise.
2421 * c-common.c: Likewise.
2422 * c-cppbuiltin.c: Likewise.
2423 * c-dump.c: Likewise.
2424 * c-format.c: Likewise.
2425 * c-gimplify.c: Likewise.
2426 * c-indentation.c: Likewise.
2427 * c-lex.c: Likewise.
2428 * c-omp.c: Likewise.
2429 * c-opts.c: Likewise.
2430 * c-pch.c: Likewise.
2431 * c-ppoutput.c: Likewise.
2432 * c-pragma.c: Likewise.
2433 * c-pretty-print.c: Likewise.
2434 * c-semantics.c: Likewise.
2435 * c-ubsan.c: Likewise.
2436 * cilk.c: Likewise.
2437 * stub-objc.c: Likewise.
2438
a1b7fe4b 24392015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2440 Cesar Philippidis <cesar@codesourcery.com>
2441 James Norris <jnorris@codesourcery.com>
2442 Julian Brown <julian@codesourcery.com>
2443 Nathan Sidwell <nathan@codesourcery.com>
2444
2445 * c-pragma.c (oacc_pragmas): Add "routine".
2446 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
2447
292237f3 24482015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2449
2450 * c-common.c (c_common_attributes): Add scalar_storage_order.
2451 (handle_scalar_storage_order_attribute): New function.
2452 * c-pragma.c (global_sso): New variable.
2453 (maybe_apply_pragma_scalar_storage_order): New function.
2454 (handle_pragma_scalar_storage_order): Likewise.
2455 (init_pragma): Register scalar_storage_order.
2456 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
2457 * c.opt (Wscalar-storage-order): New warning.
2458 (fsso-struct=): New option.
2459
b4a4c5fa 24602015-11-08 Martin Sebor <msebor@redhat.com>
2461
2462 * c.opt (Wplacement-new): Add a period to the end of a sentence.
2463
ac677063 24642015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2465
2466 * c-common.c: Don't undef DEF_BUILTIN.
2467
f0479000 24682015-11-06 David Malcolm <dmalcolm@redhat.com>
2469
2470 * c-common.c (c_cpp_error): Convert parameter from location_t to
2471 rich_location *. Eliminate the "column_override" parameter and
2472 the call to diagnostic_override_column.
2473 Update the "done_lexing" clause to set range 0
2474 on the rich_location, rather than overwriting a location_t.
2475 * c-common.h (c_cpp_error): Convert parameter from location_t to
2476 rich_location *. Eliminate the "column_override" parameter.
2477
ef014f95 24782015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2479 Thomas Schwinge <thomas@codesourcery.com>
2480 James Norris <jnorris@codesourcery.com>
2481
2482 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
2483 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
2484 clauses with parallel and kernels and loops.
2485 * c-pragma.h (enum pragma_omp_clause): Add entries for
2486 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
2487 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
2488 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
2489 INDEPENDENT,SEQ}.
2490 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
2491
e520488c 24922015-11-05 Martin Sebor <msebor@redhat.com>
2493
2494 PR c++/67942
2495 * c.opt (-Wplacement-new): New option.
2496
9561765e 24972015-11-05 Jakub Jelinek <jakub@redhat.com>
2498
2499 * c-common.h (c_finish_omp_atomic): Add TEST argument.
2500 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
2501 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
2502 save_expr or create_tmp_var* if TEST is true.
2503 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
2504 Don't call add_stmt here.
2505 (struct c_omp_check_loop_iv_data): New type.
2506 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
2507 c_omp_check_loop_iv_exprs): New functions.
2508 (c_omp_split_clauses): Adjust for lastprivate being allowed on
2509 distribute.
2510 (c_omp_declare_simd_clauses_to_numbers): Change
2511 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
2512 (c_omp_declare_simd_clauses_to_decls): Similarly change those
2513 from numbers to PARM_DECLs.
2514
5e8689fb 25152015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
2516
2517 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
2518 flag_checking.
2519
92a44a68 25202015-11-03 Bernd Schmidt <bschmidt@redhat.com>
aeaccb75 2521
2522 PR c++-common/67882
32d050b5 2523 * c-common.h (fold_offsetof_1): Add argument.
2524 * c-common.c (fold_offsetof_1): Diagnose more invalid
aeaccb75 2525 offsetof expressions that reference elements past the end of
2526 an array.
2527
9e10bfb7 25282015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2529 Chung-Lin Tang <cltang@codesourcery.com>
2530
2531 * c-pragma.c (oacc_pragmas): Add "atomic".
2532 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
2533
ab50af2a 25342015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
2535
2536 * c-common.c (handle_target_clones_attribute): New.
2537 (c_common_attribute_table): Add handle_target_clones_attribute.
2538 (handle_always_inline_attribute): Add check on target_clones attribute.
2539 (handle_target_attribute): Ditto.
2540
4cba6f60 25412015-10-29 Andrew MacLeod <amacleod@redhat.com>
2542
2543 * array-notation-common.c: Reorder #include's and remove duplicates.
2544 * c-ada-spec.c: Likewise.
2545 * c-cilkplus.c: Likewise.
2546 * c-common.c: Likewise.
2547 * c-cppbuiltin.c: Likewise.
2548 * c-dump.c: Likewise.
2549 * c-format.c: Likewise.
2550 * c-gimplify.c: Likewise.
2551 * c-indentation.c: Likewise.
2552 * c-lex.c: Likewise.
2553 * c-omp.c: Likewise.
2554 * c-opts.c: Likewise.
2555 * c-pch.c: Likewise.
2556 * c-ppoutput.c: Likewise.
2557 * c-pragma.c: Likewise.
2558 * c-pretty-print.c: Likewise.
2559 * c-semantics.c: Likewise.
2560 * c-ubsan.c: Likewise.
2561 * cilk.c: Likewise.
2562 * stub-objc.c: Likewise.
2563
f576a2e4 25642015-10-28 Jason Merrill <jason@redhat.com>
2565
2566 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
2567
2c4c8725 25682015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2569 James Norris <jnorris@codesourcery.com>
2570 Cesar Philippidis <cesar@codesourcery.com>
2571
2572 PR c/64765
2573 PR c/64880
2574 * c-common.h (c_oacc_split_loop_clauses): Declare function.
2575 * c-omp.c (c_oacc_split_loop_clauses): New function.
2576
8204c077 25772015-10-21 Martin Sebor <msebor@redhat.com>
2578
2579 PR driver/68043
2580 * c.opt: End each sentence that describes an option with a period.
2581
8523243e 25822015-10-20 Marek Polacek <polacek@redhat.com>
2583
2584 * array-notation-common.c (is_cilkplus_vector_p): Define.
2585 * c-common.h (is_cilkplus_vector_p): Declare.
2586
08881cb8 25872015-10-20 Marek Polacek <polacek@redhat.com>
2588
2589 * c.opt (std=gnu++11): Do not describe as experimental.
2590 (std=gnu++14): Likewise.
2591
a36e5e5e 25922015-10-19 Jason Merrill <jason@redhat.com>
2593
2594 * c-cppbuiltin.c (c_cpp_builtins): Define
2595 __cpp_nontype_template_args.
2596
a349de0a 25972015-10-19 Jason Merrill <jason@redhat.com>
2598
2599 * c-cppbuiltin.c (c_cpp_builtins): Define
2600 __cpp_enumerator_attributes, __cpp_fold_expressions,
2601 __cpp_unicode_characters.
2602
43895be5 26032015-10-13 Jakub Jelinek <jakub@redhat.com>
2604 Aldy Hernandez <aldyh@redhat.com>
2605
2606 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
2607 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
2608 (c_define_builtins): Likewise.
2609 * c-common.h (enum c_omp_clause_split): Add
2610 C_OMP_CLAUSE_SPLIT_TASKLOOP.
2611 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
2612 (c_finish_omp_for): Add ORIG_DECLV argument.
2613 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
2614 201511 instead of 201307.
2615 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
2616 OMP_CRITICAL_CLAUSES to it.
2617 (c_finish_omp_ordered): Add CLAUSES argument, set
2618 OMP_ORDERED_CLAUSES to it.
2619 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
2620 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
2621 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
2622 constructs and new OpenMP 4.5 clauses. Clear
2623 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
2624 verification code.
2625 * c-pragma.c (omp_pragmas_simd): Add taskloop.
2626 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
2627 (enum pragma_omp_clause): Add
2628 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
2629 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
2630
20cb53c9 26312015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2632
2633 * c-lex.c (interpret_float): Use real_equal instead of
2634 REAL_VALUES_EQUAL.
2635
6d02e6b2 26362015-10-04 Jason Merrill <jason@redhat.com>
2637
2638 Implement N4514, C++ Extensions for Transactional Memory.
2639 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
2640 (c_common_attribute_table): Add transaction_safe_dynamic.
2641 transaction_safe now affects type identity.
2642 (handle_tm_attribute): Handle transaction_safe_dynamic.
2643 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
2644 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
2645 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
2646 (D_TRANSMEM): New.
2647 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
2648 * c-pretty-print.c (pp_c_attributes_display): Don't print
2649 transaction_safe in C++.
2650
c0999a5d 26512015-10-02 Marek Polacek <polacek@redhat.com>
2652
2653 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
2654
ef17a71a 26552015-10-02 Marek Polacek <polacek@redhat.com>
2656
2657 PR c/64249
2658 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
2659 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
2660 * c.opt (Wduplicated-cond): New option.
2661
05b84e7b 26622015-10-01 Joseph Myers <joseph@codesourcery.com>
2663
2664 * c.opt (std=c11): Do not describe as experimental.
2665 (std=gnu11): Likewise.
2666 (std=iso9899:2011): Likewise.
2667
e561d5e1 26682015-09-28 Nathan Sidwell <nathan@codesourcery.com>
2669
2670 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
2671 (DEF_FUNCTION_TYPE_VAR_11): Delete.
2672
bd4b90d2 26732015-09-25 Marek Polacek <polacek@redhat.com>
2674
2675 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
2676 (ubsan_instrument_shift): Likewise.
2677
ac13b2b2 26782015-09-25 Marek Polacek <polacek@redhat.com>
2679
2680 PR sanitizer/64906
2681 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
2682
a3c82f4c 26832015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
2684
2685 * c-indentation.c (should_warn_for_misleading_indentation):
2686 Compare next_stmt_vis_column with guard_line_first_nws instead
2687 of with guard_line_vis_column.
2688
5eef101d 26892015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
2690
2691 PR c/49654
2692 PR c/49655
2693 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
2694 options and options not valid for the current language.
2695
60897493 26962015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
2697
2698 * c-indentation.c (should_warn_for_misleading_indentation):
2699 Float out and consolidate the calls to get_visual_column that
2700 are passed guard_exploc as an argument. Compare
2701 next_stmt_vis_column with guard_line_first_nws instead of with
2702 body_line_first_nws.
2703
85c93154 27042015-09-22 Nathan Sidwell <nathan@codesourcery.com>
2705
2706 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
2707 Wnamespaces): New C++ warnings.
2708
229a58b1 27092015-09-22 Jason Merrill <jason@redhat.com>
2710
2711 * c-common.h (abi_compat_version_crosses): New.
2712 (warn_abi_version): Declare.
2713 * c-common.c: Define it.
2714 * c-opts.c (c_common_post_options): Handle it.
2715 flag_abi_compat_version defaults to 8.
2716
2d2de569 27172015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2718
2719 Complete the implementation of N4230, Nested namespace definition.
2720 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
2721 __cpp_nested_namespace_definitions.
2722
2b897e68 27232015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2724
2725 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
2726
ed536208 27272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2728
2729 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
2730 when warning.
2731 * c-pragma.h (pragma_lex): Add optional loc argument.
2732
1dc6c44d 27332015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
2734
2735 * c-format.c (check_format_arg): Adjust to use common block size in all
2736 object pools.
2737
be812248 27382015-09-15 David Malcolm <dmalcolm@redhat.com>
2739
2740 * c-format.c (location_from_offset): Update for change in
2741 signature of location_get_source_line.
2742 * c-indentation.c (get_visual_column): Likewise.
2743 (line_contains_hash_if): Likewise.
2744
e4cc057f 27452015-09-14 Marek Polacek <polacek@redhat.com>
2746
2747 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
2748 setting various warnings.
2749
85f5e2ee 27502015-09-14 Marek Polacek <polacek@redhat.com>
2751
2752 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
2753 a negative value.
2754
1bca8cbd 27552015-09-11 Mark Wielaard <mjw@redhat.com>
2756
2757 PR c/28901
2758 * c.opt (Wunused-variable): Option from common.opt.
2759 (Wunused-const-variable): New option.
2760
ee48893a 27612015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
2762
2763 PR c++/53184
2764 * c.opt ([Wsubobject-linkage]): Add.
2765
547c6b1f 27662015-09-03 Martin Sebor <msebor@redhat.com>
2767
2768 PR c/66516
2769 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
2770 functions.
2771 * c-common.c (reject_gcc_builtin): Define.
2772
7e976b10 27732015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
2774
2775 PR middle-end/60586
2776 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
2777 prototype.
2778 * c-gimplify.c (c_gimplify_expr): Added a call to the function
2779 cilk_gimplify_call_params_in_spawned_fn.
2780 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
2781 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
2782 unwrapping.
2783
9e6bcade 27842015-08-25 Marek Polacek <polacek@redhat.com>
2785
2786 PR middle-end/67330
2787 * c-common.c (handle_weak_attribute): Don't check whether the
2788 visibility can be changed here.
2789
af9de21d 27902015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
2791
2792 * c-lex.c (c_lex_with_flags): Use explicit locations.
2793
6dc50383 27942015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
2795
2796 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
2797 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
2798
10902624 27992015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
2800
2801 PR middle-end/36757
2802 * c-common.c (check_builtin_function_arguments): Add check
2803 for BUILT_IN_SIGNBIT argument.
2804
a03a71ab 28052015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
2806
2807 PR c++/67160
2808 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
2809 in c++1z mode.
2810
22723c26 28112015-08-17 Marek Polacek <polacek@redhat.com>
2812
2813 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
2814 with whitespaces before qualifier names.
2815
f4809955 28162015-08-12 Marek Polacek <polacek@redhat.com>
2817
2818 PR c++/55095
2819 * c-common.c (maybe_warn_shift_overflow): Properly handle
2820 left-shifting 1 into the sign bit.
2821
5463f502 28222015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
2823
2824 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
2825
56c12fd4 28262015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
2827 Braden Obrzut <admin@maniacsvault.net>
2828 Jason Merrill <jason@redhat.com>
2829
2830 Add C++ Concepts TS support.
2831 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
2832 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
2833 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
2834 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
2835 * c-opts.c (set_std_cxx1z): Set flag_concepts.
2836 * c.opt (fconcepts): New.
2837
32d050b5 28382015-08-02 Martin Sebor <msebor@redhat.com>
2839
2840 * c.opt (-Wframe-address): New warning option.
2841
17afcef6 28422015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2843
2844 * c-indentation.c (should_warn_for_misleading_indentation):
2845 Improve heuristics.
2846
f95bfdd4 28472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2848
2849 * c-indentation.c (get_visual_column): Add parameter first_nws,
2850 use it. Update comment documenting the function.
2851 (is_first_nonwhitespace_on_line): Remove.
2852 (should_warn_for_misleading_indentation): Replace usage of
2853 of is_first_nonwhitespace_on_line with get_visual_column.
2854
9255be07 28552015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
2856
2857 * c-indentation.h (struct token_indent_info): Define.
2858 (get_token_indent_info): Define.
2859 (warn_for_misleading_information): Declare.
2860 * c-common.h (warn_for_misleading_information): Remove.
2861 * c-identation.c (warn_for_misleading_indentation):
2862 Change declaration to take three token_indent_infos. Adjust
2863 accordingly.
2864 * c-identation.c (should_warn_for_misleading_indentation):
2865 Likewise. Bail out early if the body is a compound statement.
2866 (guard_tinfo_to_string): Define.
2867
e880695c 28682015-07-30 Jason Merrill <jason@redhat.com>
2869
2870 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
2871 '*' for reference decay.
2872
f58dd84b 28732015-07-30 Marek Polacek <polacek@redhat.com>
2874
2875 * c-common.c (warn_tautological_cmp): Bail for float types.
2876
d9e4fe27 28772015-07-27 Marek Polacek <polacek@redhat.com>
2878
2879 PR bootstrap/67030
2880 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
2881
6784a472 28822015-07-27 Marek Polacek <polacek@redhat.com>
2883
2884 PR c++/66555
2885 PR c/54979
2886 * c-common.c (find_array_ref_with_const_idx_r): New function.
2887 (warn_tautological_cmp): New function.
2888 * c-common.h (warn_tautological_cmp): Declare.
2889 * c.opt (Wtautological-compare): New option.
2890
08034975 28912015-07-23 Marek Polacek <polacek@redhat.com>
2892
2893 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
2894 (ubsan_instrument_shift): Likewise.
2895
f6f5e49b 28962015-07-23 Marek Polacek <polacek@redhat.com>
2897
2898 PR sanitizer/66908
2899 * c-ubsan.c: Include gimplify.h.
2900 (ubsan_instrument_division): Unshare OP0 and OP1.
2901 (ubsan_instrument_shift): Likewise.
2902
8d669e79 29032015-07-20 Marek Polacek <polacek@redhat.com>
2904 Richard Sandiford <richard.sandiford@arm.com>
2905
2906 PR c++/55095
2907 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
2908 Use EXPR_LOC_OR_LOC.
2909 (maybe_warn_shift_overflow): New function.
2910 * c-common.h (maybe_warn_shift_overflow): Declare.
2911 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
2912 * c.opt (Wshift-overflow): New option.
2913
e16712b1 29142015-07-16 Martin Liska <mliska@suse.cz>
2915
2916 * c-format.c (static void check_format_info_main): Use
2917 object_allocator instead of pool_allocator.
2918 (check_format_arg): Likewise.
2919 (check_format_info_main): Likewise.
2920
e51764ad 29212015-07-15 Andrew MacLeod <amacleod@redhat.com>
2922
2923 * c-opts.c: Remove multiline #include comment.
2924
47ae02b7 29252015-07-12 Aldy Hernandez <aldyh@redhat.com>
2926
2927 * c-common.c: Fix double word typos.
2928
ed2b2eb2 29292015-07-10 Eric Botcazou <ebotcazou@adacore.com>
2930
2931 * c-ada-spec.h (cpp_operation): Revert latest change.
2932 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
2933 constructors and destructors.
2934
1eacc14a 29352015-07-09 Andrew MacLeod <amacleod@redhat.com>
2936
2937 * c-common.h: Adjust includes for flags.h changes.
2938 * stub-objc.c: Likewise.
47ae02b7 2939
0124237f 29402015-07-08 Eric Botcazou <ebotcazou@adacore.com>
2941
2942 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
2943 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
2944
386ef929 29452015-07-08 Jakub Jelinek <jakub@redhat.com>
2946
2947 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
2948 are to be removed, return NULL rather than original clauses list.
2949
9ef16211 29502015-07-07 Andrew MacLeod <amacleod@redhat.com>
2951
2952 * array-notation-common.c: Adjust includes.
2953 * c-ada-spec.c: Likewise.
2954 * c-cilkplus.c: Likewise.
2955 * c-common.h: Likewise.
2956 * c-cppbuiltin.c: Likewise.
2957 * c-dump.c: Likewise.
2958 * c-format.c: Likewise.
2959 * c-gimplify.c: Likewise.
2960 * c-indentation.c: Likewise.
2961 * c-lex.c: Likewise.
2962 * c-omp.c: Likewise.
2963 * c-opts.c: Likewise.
2964 * c-pch.c: Likewise.
2965 * c-ppoutput.c: Likewise.
2966 * c-pragma.c: Likewise.
2967 * c-pretty-print.c: Likewise.
2968 * c-semantics.c: Likewise.
2969 * c-ubsan.c: Likewise.
2970 * cilk.c: Likewise.
2971 * stub-objc.c: Likewise.
2972
67ede3e4 29732015-07-07 Eric Botcazou <ebotcazou@adacore.com>
2974
2975 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
2976 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
2977
42af8c2a 29782015-07-01 Jason Merrill <jason@redhat.com>
2979
fa769cc5 2980 * c-common.h (D_CXX11): Rename from D_CXX0X.
2981 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
2982 * c-common.c: Adjust.
2983
97e9c847 2984 * c-opts.c (c_common_post_options): Default to C++14.
2985
42af8c2a 2986 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
2987
30b1ba42 29882015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
2989
2990 Implement N4197 - Adding u8 character literals
32d050b5 2991 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
95858835 2992 CPP_CHAR.
32d050b5 2993 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
95858835 2994 CPP_UTF8CHAR_USERDEF tokens.
32d050b5 2995 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
95858835 2996 and CPP_UTF8CHAR tokens.
2997 (lex_charconst): Treat CPP_UTF8CHAR token.
30b1ba42 2998
0949f227 29992015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3000
3001 PR fortran/66605
3002 * c-common.c (do_warn_unused_parameter): Move here.
3003 * c-common.h (do_warn_unused_parameter): Declare.
3004
be23b16f 30052015-06-29 Marek Polacek <polacek@redhat.com>
3006
3007 PR c/66322
3008 * c-common.c (check_case_bounds): Add bool * parameter. Set
3009 OUTSIDE_RANGE_P.
3010 (c_add_case_label): Add bool * parameter. Pass it down to
3011 check_case_bounds.
3012 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
3013 warning here.
3014 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
3015 declarations.
3016
6290f0db 30172015-06-27 Marek Polacek <polacek@redhat.com>
3018
3019 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
3020 or VECTOR_INTEGER_TYPE_P throughout.
3021 * c-gimplify.c: Likewise.
3022
aa3e402e 30232015-06-26 Marek Polacek <polacek@redhat.com>
3024
3025 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
3026 * c-common.c (c_fully_fold_internal): Likewise.
3027 (c_alignof_expr): Likewise.
3028 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
3029 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8204c077 3030 * cilk.c (create_parm_list): Likewise.
aa3e402e 3031
4e81b384 30322015-06-26 Marek Polacek <polacek@redhat.com>
3033
3034 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
3035
ec2e0095 30362015-06-25 Andrew MacLeod <amacleod@redhat.com>
3037
3038 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
3039 * c-gimplify.c: Likewise.
3040 * c-pragma.c: Likewise.
3041 * c-ubsan.c: Likewise.
3042 * cilk.c: Likewise.
3043
b594087e 30442015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3045
3046 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
3047 ggc_hasher.
3048
a3c76fda 30492015-06-25 Andrew MacLeod <amacleod@redhat.com>
3050
3051 * cilk.c: Move calls.h after tm.h in the include chain.
3052
f48c7f4a 30532015-06-25 Marek Polacek <polacek@redhat.com>
3054
3055 * array-notation-common.c: Use VAR_P throughout.
3056 * c-ada-spec.c: Likewise.
3057 * c-common.c: Likewise.
3058 * c-format.c: Likewise.
3059 * c-gimplify.c: Likewise.
3060 * c-omp.c: Likewise.
3061 * c-pragma.c: Likewise.
3062 * c-pretty-print.c: Likewise.
3063 * cilk.c: Likewise.
3064
ce41e81a 30652015-06-25 Marek Polacek <polacek@redhat.com>
3066
3067 * cilk.c (extract_free_variables): Use is_global_var.
3068
de231ec2 30692015-06-23 Richard Sandiford <richard.sandiford@arm.com>
3070
3071 * c-common.c: Don't include target-def.h.
3072
0200602e 30732015-06-23 Marek Polacek <polacek@redhat.com>
3074
3075 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
3076 when comparing INTEGER_CSTs.
3077
99838ed7 30782015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
3079
3080 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
3081 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
3082 (dump_ada_template): Skip partially specialized types.
3083
a4f59596 30842015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
3085
3086 * c-common.c (scalar_to_vector): Use std::swap instead of manually
3087 swapping.
3088
f2ab3bac 30892015-06-17 Andrew MacLeod <amacleod@redhat.com>
3090
3091 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
3092 * c-ada-spec.c: Likewise.
3093 * c-cilkplus.c: Likewise.
3094 * c-common.c: Likewise.
3095 * c-common.h: Likewise.
3096 * c-cppbuiltin.c: Likewise.
3097 * c-dump.c: Likewise.
3098 * c-format.c: Likewise.
3099 * c-gimplify.c: Likewise.
3100 * c-indentation.c: Likewise.
3101 * c-lex.c: Likewise.
3102 * c-omp.c: Likewise.
3103 * c-opts.c: Likewise.
3104 * c-pch.c: Likewise.
3105 * c-ppoutput.c: Likewise.
3106 * c-pragma.c: Likewise.
3107 * c-pretty-print.c: Likewise.
3108 * c-semantics.c: Likewise.
3109 * c-ubsan.c: Likewise.
3110 * cilk.c: Likewise.
3111 * stub-objc.c: Likewise.
3112
db3d1ffc 31132015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
3114
3115 PR c++/65168
3116 * c-common.c (c_common_truthvalue_conversion): Warn when
3117 converting an address of a reference to a truth value.
3118
64486212 31192015-06-08 Andrew MacLeod <amacleod@redhat.com>
3120
3121 * array-notation-common.c : Adjust include files.
3122 * c-ada-spec.c : Likewise.
3123 * c-cilkplus.c : Likewise.
3124 * c-common.c : Likewise.
3125 * c-common.h : Likewise.
3126 * c-cppbuiltin.c : Likewise.
3127 * c-dump.c : Likewise.
3128 * c-format.c : Likewise.
3129 * c-gimplify.c : Likewise.
3130 * c-indentation.c : Likewise.
3131 * c-lex.c : Likewise.
3132 * c-omp.c : Likewise.
3133 * c-opts.c : Likewise.
3134 * c-pch.c : Likewise.
3135 * c-ppoutput.c : Likewise.
3136 * c-pragma.c : Likewise.
3137 * c-pretty-print.c : Likewise.
3138 * c-semantics.c : Likewise.
3139 * c-ubsan.c : Likewise.
3140 * cilk.c : Likewise.
3141 * stub-objc.c : Likewise.
3142
6e84ccad 31432015-06-08 Marek Polacek <polacek@redhat.com>
3144
3145 PR c/66415
3146 * c-format.c (location_from_offset): Return LOC if LINE is null.
3147
3a1c9df2 31482015-06-05 Aldy Hernandez <aldyh@redhat.com>
3149
3150 * c-common.h (c_parse_final_cleanups): New prototype.
3151 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
3152
32d050b5 31532015-06-04 Sriraman Tallam <tmsriram@google.com>
3154
3155 * c-common.c (noplt): New attribute.
3156 (handle_noplt_attribute): New handler.
3157
f77c0292 31582015-06-04 Andrew MacLeod <amacleod@redhat.com>
3159
3160 * array-notation-common.c: Adjust includes for restructured coretypes.h.
3161 * c-ada-spec.c: Likewise.
3162 * c-cilkplus.c: Likewise.
3163 * c-common.c: Likewise.
3164 * c-common.h: Likewise.
3165 * c-cppbuiltin.c: Likewise.
3166 * c-dump.c: Likewise.
3167 * c-format.c: Likewise.
3168 * c-gimplify.c: Likewise.
3169 * c-indentation.c: Likewise.
3170 * c-lex.c: Likewise.
3171 * c-omp.c: Likewise.
3172 * c-opts.c: Likewise.
3173 * c-pch.c: Likewise.
3174 * c-ppoutput.c: Likewise.
3175 * c-pragma.c: Likewise.
3176 * c-pretty-print.c: Likewise.
3177 * c-semantics.c: Likewise.
3178 * c-ubsan.c: Likewise.
3179 * cilk.c: Likewise.
3180 * stub-objc.c: Likewise.
3181
7c62dfbb 31822015-06-02 David Malcolm <dmalcolm@redhat.com>
3183
3184 PR c/66220:
3185 * c-indentation.c (should_warn_for_misleading_indentation): Use
3186 expand_location rather than expand_location_to_spelling_point.
3187 Don't warn if the guarding statement is more indented than the
3188 next/body stmts.
3189
9af7c176 31902015-06-02 David Malcolm <dmalcolm@redhat.com>
3191
3192 * c-indentation.c (warn_for_misleading_indentation): Bail out
3193 immediately if -Wmisleading-indentation isn't enabled.
3194
eebcf436 31952015-06-01 Martin Liska <mliska@suse.cz>
3196
3197 * c-format.c (check_format_arg):Use new type-based pool allocator.
3198 (check_format_info_main) Likewise.
3199
b0a23e2f 32002015-05-31 Eric Botcazou <ebotcazou@adacore.com>
3201
3202 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
3203 (has_nontrivial_methods): Likewise.
3204
63dc1330 32052015-05-25 Marek Polacek <polacek@redhat.com>
3206
3207 * c-ubsan.c (ubsan_instrument_shift): Use type0.
3208
5a4c69dd 32092015-05-22 Marek Polacek <polacek@redhat.com>
3210
3211 PR c/47043
3212 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
3213
044580bb 32142015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3764c94e 3215
3216 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
3217 STACK_GROWS_DOWNWARD.
3218
044580bb 32192015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2b785411 3220
3221 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
3222 STACK_GROWS_DOWNWARD rather than if it is defined.
3223
d5a2ddc7 32242015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8204c077 3225
d5a2ddc7 3226 PR c/52952
3227 * c-format.c (location_column_from_byte_offset): New.
3228 (location_from_offset): New.
3229 (struct format_wanted_type): Add offset_loc field.
3230 (check_format_info): Move handling of location for extra arguments
3231 closer to the point of warning.
3232 (check_format_info_main): Pass the result of location_from_offset
3233 to warning_at.
3234 (format_type_warning): Pass the result of location_from_offset
3235 to warning_at.
3236
72f8014e 32372015-05-20 Marek Polacek <polacek@redhat.com>
3238
3239 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
3240
74efe522 32412015-05-20 Marek Polacek <polacek@redhat.com>
3242
3243 * c-ada-spec.c (dump_sloc): Use DECL_P.
3244
b443c459 32452015-05-20 Marek Polacek <polacek@redhat.com>
3246
3247 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3248 * c-common.c: Likewise.
3249
551e34da 32502015-05-19 David Malcolm <dmalcolm@redhat.com>
3251
3252 * c-common.h (fe_file_change): Strengthen param from
3253 const line_map * to const line_map_ordinary *.
3254 (pp_file_change): Likewise.
3255 * c-lex.c (fe_file_change): Likewise.
3256 (cb_define): Use linemap_check_ordinary when invoking
3257 SOURCE_LINE.
3258 (cb_undef): Likewise.
3259 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
3260 invoking cb_file_change.
3261 (c_finish_options): Likewise.
3262 (push_command_line_include): Likewise.
3263 (cb_file_change): Strengthen param "new_map" from
3264 const line_map * to const line_map_ordinary *.
3265 * c-ppoutput.c (cb_define): Likewise for local "map".
3266 (pp_file_change): Likewise for param "map" and local "from".
3267
dfcf26a5 32682015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3269
3270 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
3271
2e474820 32722015-05-18 Tom de Vries <tom@codesourcery.com>
3273
3274 * c-common.c (build_va_arg_1): New function.
3275 (build_va_arg): Add address operator to va_list operand if necessary.
3276
e53013a8 32772015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
3278
3279 PR c/48956
3280 * c-common.c (int_safely_convertible_to_real_p): Define.
3281 (unsafe_conversion_p): Check conversions involving complex types.
3282 (conversion_warning): Add new warning message for conversions which
3283 discard imaginary component.
3284 * c-common.h: (enum conversion_safety): Add new enumerator for such
3285 conversions.
3286
aac24642 32872015-05-14 Marek Polacek <polacek@redhat.com>
3288
3289 PR c/66066
3290 PR c/66127
3291 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
3292 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
3293 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
3294 use it. If FOR_INT_CONST, require that all evaluated operands be
3295 INTEGER_CSTs.
3296
e5f01cba 32972015-05-12 David Malcolm <dmalcolm@redhat.com>
3298
3299 * c-common.h (warn_for_misleading_indentation): New prototype.
3300 * c-indentation.c: New file.
3301 * c.opt (Wmisleading-indentation): New option.
3302
c37be9ec 33032015-05-12 Tom de Vries <tom@codesourcery.com>
3304
3305 PR tree-optimization/66010
3306 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
3307
7290114b 33082015-05-09 Jason Merrill <jason@redhat.com>
3309
3c665566 3310 * c-opts.c (c_common_post_options): Also clear
3311 cpp_opts->cpp_warn_cxx11_compat.
3312
d875b9d2 3313 * c-common.h (enum cxx_dialect): Add cxx_unset.
3314 * c-common.c (cxx_dialect): Initialize to cxx_unset.
3315 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
3316
7290114b 3317 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
3318 (std=gnu++0x): Mark as Undocumented.
3319 (std=gnu++1y): Add deprecated message.
3320
1b03cc89 33212015-05-08 Jason Merrill <jason@redhat.com>
3322
1c5f7aba 3323 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
3324 * c-opts.c: Adjust.
3325
1b03cc89 3326 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
3327
dc5945dc 33282015-05-08 Marek Polacek <polacek@redhat.com>
3329
3330 PR c/64918
3331 * c.opt (Woverride-init-side-effects): New option.
3332
cdc64059 33332015-05-07 Marek Polacek <polacek@redhat.com>
3334
3335 PR c/65179
3336 * c-common.c (c_fully_fold_internal): Warn when left shifting a
3337 negative value.
3338 * c.opt (Wshift-negative-value): New option.
3339 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
3340 when -Wextra and C99/C++11 mode.
3341
8cafe283 33422015-05-07 Marek Polacek <polacek@redhat.com>
3343 Martin Uecker <uecker@eecs.berkeley.edu>
3344
3345 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
3346 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
3347
cb40a6f7 33482015-05-05 Jason Merrill <jason@redhat.com>
3349
3350 * c.opt (Wterminate): New.
3351
14744a16 33522015-04-30 Marek Polacek <polacek@redhat.com>
3353
3354 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
3355 require that the non-constant be of a boolean type.
3356
9866562d 33572015-04-29 Josh Triplett <josh@joshtriplett.org>
3358
8cafe283 3359 * c-common.c (handle_section_attribute): Refactor to reduce
3360 nesting and distinguish between error cases.
9866562d 3361
a720ab1c 33622015-04-29 Marek Polacek <polacek@redhat.com>
3363
3364 PR c/64610
3365 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
3366 with 0/1.
3367
8c072e52 33682015-04-29 Jakub Jelinek <jakub@redhat.com>
3369
3370 * c-common.h (omp_clause_mask): Unconditionally define as a class.
3371 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
3372 HOST_BITS_PER_WIDE_INT.
3373
f7fec1c7 33742015-04-28 Tom de Vries <tom@codesourcery.com>
3375
3376 PR tree-optimization/65887
3377 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
3378
483b3d26 33792015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8cafe283 3380 Pierre-Marie de Rodat <derodat@adacore.com>
483b3d26 3381
3382 * c-ada-spec.c (in_function): Delete.
3383 (dump_generic_ada_node): Do not change in_function and remove the
3384 redundant code dealing with it.
3385 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
3386 (print_ada_methods): Output the static member functions in a nested
3387 package after the regular methods as well as associated renamings.
3388
f11bdffb 33892015-04-24 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/65830
3392 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
3393 and OPT_Wshift_count_overflow.
3394
485f6b9c 3395 PR c/63357
3396 * c-common.c (warn_logical_operator): Warn if the operands have the
3397 same expressions.
3398
439606a9 33992015-04-24 Marek Polacek <polacek@redhat.com>
3400
3401 PR c/61534
3402 * c-common.c (warn_logical_operator): Bail if either operand comes
3403 from a macro expansion.
3404
de801c28 34052015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3406
3407 PR target/55143
3408 * c-common.c (c_default_pointer_mode): Add definition.
3409 * c-common.h (c_default_pointer_mode): Add declaration.
3410
76738f56 34112015-03-11 Jakub Jelinek <jakub@redhat.com>
3412
3413 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
3414 on record_builtin_type argument.
3415
16f958b3 34162015-03-10 Jakub Jelinek <jakub@redhat.com>
3417
3418 PR c/65120
3419 * c-common.c (warn_logical_not_parentheses): Don't warn for
3420 !x == 0 or !x != 0.
3421
9b22f73f 34222015-03-07 Marek Polacek <polacek@redhat.com>
3423
3424 PR sanitizer/65280
3425 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
3426 before trying to figure out whether we have a flexible array member.
3427
a864b7d4 34282015-03-06 Eric Botcazou <ebotcazou@adacore.com>
a49621cf 3429 Jonathan Wakely <jwakely.gcc@gmail.com>
a864b7d4 3430
3431 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
3432
9bf8c90b 34332015-03-05 Eric Botcazou <ebotcazou@adacore.com>
3434
3435 PR ada/65319
3436 * c-ada-spec.c (print_destructor): Remove obsolete code.
3437
037ac54f 34382015-03-01 Eric Botcazou <ebotcazou@adacore.com>
3439
3440 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
3441 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
3442 DECL_TEMPLATE_RESULT emulations.
3443 (dump_ada_template)): Add guard for TYPE_METHODS.
3444
495cbfb8 34452015-02-27 Marek Polacek <polacek@redhat.com>
3446
3447 PR c/65040
3448 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
3449
688a864e 34502015-02-27 Kai Tietz <ktietz@redhat.com>
3451
3452 PR c/35330
3453 * c-pragma.c (handle_pragma_weak): Do not try to create
3454 weak/alias of declarations not being function, or variable
3455 declarations.
3456
6349b8cc 34572015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3458
3459 PR libgomp/64625
3460 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3461 Remove macros.
3462 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3463
3afd5369 34642015-02-16 Marek Polacek <polacek@redhat.com>
3465
3466 PR c/65066
3467 * c-format.c (check_format_types): Handle null param.
3468
46173d1b 34692015-02-13 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/65040
3472 * c-format.c (check_format_types): Don't warn about different
3473 signedness if the original value is in the range of WANTED_TYPE.
3474
1d524ff7 34752015-02-12 Jason Merrill <jason@redhat.com>
3476
3477 PR c++/64956
3478 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
3479 to the current highest version.
3480 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
3481
bbf8fbec 34822015-02-04 Jakub Jelinek <jakub@redhat.com>
3483
3484 PR c/64824
3485 PR c/64868
3486 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
3487 instead of RDIV_EXPR. Use build_binary_op instead of
3488 build2_loc.
3489
c05be867 34902015-01-30 Joseph Myers <joseph@codesourcery.com>
3491
3492 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
3493 to pass input_location as first argument.
3494
85977647 34952015-01-23 Tom de Vries <tom@codesourcery.com>
3496
3497 PR libgomp/64672
3498 * c.opt (fopenacc): Mark as LTO option.
3499
fa175926 35002015-01-23 Tom de Vries <tom@codesourcery.com>
3501
3502 PR libgomp/64707
3503 * c.opt (fopenmp): Mark as LTO option.
3504
20aad5ba 35052015-01-21 Jakub Jelinek <jakub@redhat.com>
3506
3507 PR c/63307
8204c077 3508 * cilk.c (fill_decls_vec): Only put decls into vector v.
20aad5ba 3509 (compare_decls): Fix up formatting.
3510
35112015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
3512
3513 PR c/63307
3514 * cilk.c: Include vec.h.
3515 (struct cilk_decls): New structure.
3516 (wrapper_parm_cb): Split this function to...
3517 (fill_decls_vec): ...this...
3518 (create_parm_list): ...and this.
3519 (compare_decls): New function.
3520 (for_local_cb): Remove.
3521 (wrapper_local_cb): Ditto.
3522 (build_wrapper_type): For now first traverse and fill vector of
3523 declarations then sort it and then deal with sorted vector.
3524 (cilk_outline): Ditto.
3525 (declare_one_free_variable): Ditto.
3526
60b77e28 35272015-01-21 Jason Merrill <jason@redhat.com>
3528
3529 PR c++/64629
3530 * c-format.c (check_format_arg): Call decl_constant_value.
3531
85fbea97 35322015-01-19 Martin Liska <mliska@suse.cz>
3533
3534 * c-common.c (handle_noicf_attribute): New function.
3535
ca4c3545 35362015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3537 Bernd Schmidt <bernds@codesourcery.com>
3538 James Norris <jnorris@codesourcery.com>
3539 Cesar Philippidis <cesar@codesourcery.com>
3540 Ilmir Usmanov <i.usmanov@samsung.com>
3541 Jakub Jelinek <jakub@redhat.com>
3542
3543 * c.opt (fopenacc): New option.
3544 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
3545 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3546 New macros.
3547 * c-common.h (c_finish_oacc_wait): New prototype.
3548 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
3549 (c_finish_oacc_wait): New function.
3550 * c-pragma.c (oacc_pragmas): New variable.
3551 (c_pp_lookup_pragma, init_pragma): Handle it.
3552 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
3553 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
3554 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
3555 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3556 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
3557 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
3558 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
3559 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
3560 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
3561 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
3562 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
3563 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
3564 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
3565 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
3566 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
3567 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
3568 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
3569 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
3570 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
3571 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
3572 PRAGMA_OACC_CLAUSE_WORKER.
3573
92a44a68 35742015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
947aa916 3575
3576 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
3577 for the new option fstack-protector_explicit.
3578 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
3579 (handle_stack_protect_attribute): New function.
3580
92a44a68 35812015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
e4fd7af1 3582
3583 * c.opt: New option -Warray-bounds=.
3584
1f78217c 35852015-01-09 Michael Collison <michael.collison@linaro.org>
3586
3587 * array-notation-common.c: Include hash-set.h, machmode.h,
3588 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3589 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3590 * c-ada-spec.c: Ditto.
3591 * c-cilkplus.c: Ditto.
3592 * c-common.c: Include input.h due to flattening of tree.h.
3593 Define macro GCC_C_COMMON_C.
3594 * c-common.h: Flatten tree.h header files into c-common.h.
3595 Remove include of tree-core.h.
3596 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3597 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3598 fold-const.h, wide-int.h, and inchash.h due to
3599 flattening of tree.h.
3600 * c-dump.c: Ditto.
3601 * c-format.c: Flatten tree.h header files into c-common.h.
3602 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3603 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3604 fold-const.h, wide-int.h, and inchash.h due to
3605 flattening of tree.h.
3606 * c-dump.c: Include hash-set.h, machmode.h,
3607 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3608 fold-const.h, wide-int.h, and inchash.h due to
3609 flattening of tree.h.
3610 * c-format.c: Include hash-set.h, machmode.h,
3611 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3612 fold-const.h, wide-int.h, inchash.h and real.h due to
3613 flattening of tree.h.
3614 * c-gimplify.c: Include hash-set.h, machmode.h,
3615 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3616 fold-const.h, wide-int.h, and inchash.h due to
3617 flattening of tree.h.
3618 * cilk.c: Ditto.
3619 * c-lex.c: Ditto.
3620 * c-omp.c: Ditto.
3621 * c-opts.c: Ditto.
3622 * c-pch.c: Ditto.
3623 * c-ppoutput.c: Ditto.
3624 * c-pragma.c: Ditto.
3625 * c-pretty-print.c: Ditto.
3626 * c-semantics.c: Ditto.
3627 * c-ubsan.c: Ditto.
3628 * stub-objc.c: Ditto.
3629
411b7663 36302015-01-08 Jason Merrill <jason@redhat.com>
3631
3632 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
3633 do_ubsan_in_current_function.
3634 (ubsan_maybe_instrument_reference_or_call): Likewise.
3635 * c-ubsan.h: Declare it.
3636
d1e96383 36372015-01-08 Mike Stump <mikestump@comcast.net>
3638
3639 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
3640
b57910fa 36412015-01-07 Marek Polacek <polacek@redhat.com>
3642
3643 PR c/64440
3644 * c-common.c (c_fully_fold_internal): Warn for division and modulo
3645 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
3646
678a4e3e 36472015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3648
3649 PR c++/31397
3650 * c.opt (Wsuggest-override): New option.
3651
d353bf18 36522015-01-05 Jakub Jelinek <jakub@redhat.com>
3653
3654 Update copyright years.
3655
92b63884 36562015-01-05 Marek Polacek <polacek@redhat.com>
3657
3658 PR c/64423
3659 * c-common.c (warn_array_subscript_with_type_char): Add location_t
3660 parameter. Use it.
3661 * c-common.h (warn_array_subscript_with_type_char): Update
3662 declaration.
3663
83715bc4 36642014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
3665
3666 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
3667 Control macro with flag_sized_deallocation.
3668
92a44a68 36692014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8a8211df 3670
3671 * c.opt (Wdiscarded-array-qualifiers): New option.
3672
33058239 36732014-12-19 Jakub Jelinek <jakub@redhat.com>
3674
3675 PR preprocessor/63831
3676 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
3677 and __has_cpp_attribute here.
3678 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
3679 c_common_has_attribute.
3680 * c-common.h (c_common_has_attribute): New prototype.
3681 * c-lex.c (init_c_lex): Set cb->has_attribute to
3682 c_common_has_attribute instead of cb_has_attribute.
3683 (get_token_no_padding): New function.
3684 (cb_has_attribute): Renamed to ...
3685 (c_common_has_attribute): ... this. No longer static. Use
3686 get_token_no_padding, require ()s, don't build TREE_LIST
3687 unnecessarily, fix up formatting, adjust diagnostics, call
3688 init_attributes.
3689
d1856d2c 36902014-12-15 Jason Merrill <jason@redhat.com>
3691
3692 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
3693 (-Wsized-deallocation): New.
3694 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
3695 to on in C++14 and up.
3696
4972ed5d 36972014-12-11 Jason Merrill <jason@redhat.com>
3698
7d7fa964 3699 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
3700
4972ed5d 3701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
3702 we aren't complaining about VLAs.
3703
5ebccf71 37042014-12-06 Marek Polacek <polacek@redhat.com>
3705
3706 PR tree-optimization/64183
3707 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
3708 shift-expression if it is integer_type_node. Use types_compatible_p.
3709
f9e245b2 37102014-11-29 Jakub Jelinek <jakub@redhat.com>
3711
3712 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
3713 last argument from create_tmp_var_raw and create_tmp_var calls.
3714 * cilk.c (gimplify_cilk_spawn): Likewise.
3715 * c-omp.c (c_finish_omp_atomic): Likewise.
3716
d2f60593 37172014-11-28 Marek Polacek <polacek@redhat.com>
3718
3719 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
3720 instead of unsigned_type_node.
3721
fce2dbd1 37222014-11-28 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/63862
3725 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
3726 to op1_utype.
3727 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
3728 expression to unsigned_type_node.
3729
3a4a2292 37302014-11-20 Mark Wielaard <mjw@redhat.com>
3731
3732 PR debug/38757
3733 * c-opts.c (set_std_c89): Set lang_hooks.name.
3734 (set_std_c99): Likewise.
3735 (set_std_c11): Likewise.
3736 (set_std_cxx98): Likewise.
3737 (set_std_cxx11): Likewise.
3738 (set_std_cxx14): Likewise.
3739 (set_std_cxx1z): Likewise.
3740
c61ef207 37412014-11-21 Jakub Jelinek <jakub@redhat.com>
3742
3743 PR target/63764
3744 * c-common.h (convert_vector_to_pointer_for_subscript): Change
3745 return type to bool.
c9ed79de 3746 * c-common.c: Include gimple-expr.h.
c61ef207 3747 (convert_vector_to_pointer_for_subscript): Change return type to
3748 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
3749 and copy it into a TARGET_EXPR and use that instead of *vecp
3750 directly.
3751
1a91d914 37522014-11-19 David Malcolm <dmalcolm@redhat.com>
3753
3754 Merger of git branch "gimple-classes-v2-option-3".
3755 * ChangeLog.gimple-classes: New.
3756 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
3757 from being just a vec<gimple> to a vec<gbind *>.
3758
f8fc8b8e 37592014-11-18 Jakub Jelinek <jakub@redhat.com>
3760
3761 PR sanitizer/63813
3762 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
3763 argument to ptype, set type to TREE_TYPE (ptype). Don't call
3764 get_pointer_alignment for non-pointers. Use ptype, or if it is
3765 reference type, corresponding pointer type, as type of kind
3766 argument.
3767 (ubsan_maybe_instrument_reference,
3768 ubsan_maybe_instrument_member_call): Adjust callers.
3769
8315e35e 37702014-11-15 Marek Polacek <polacek@redhat.com>
3771
3772 PR middle-end/63884
3773 * array-notation-common.c (is_sec_implicit_index_fn): Return false
3774 for NULL fndecl.
3775 (extract_array_notation_exprs): Return for NULL node.
3776
86b9f14b 37772014-11-12 Joseph Myers <joseph@codesourcery.com>
3778
3779 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
3780 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
3781
0c93c8a9 37822014-11-12 Jakub Jelinek <jakub@redhat.com>
3783
3784 PR c/59708
3785 * c-common.c (check_builtin_function_arguments): Handle
3786 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
3787
fdd735a7 37882014-11-10 Andi Kleen <ak@linux.intel.com>
3789
3790 PR c/60804
3791 * c-common.h (check_no_cilk): Declare.
3792 * cilk.c (get_error_location): New function.
3793 (check_no_cilk): Dito.
3794
5cb678b4 37952014-11-10 Andi Kleen <ak@linux.intel.com>
3796
3797 * cilk.c (recognize_spawn): Use expression location
3798 for error message.
3799
0feb4de1 38002014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
3801
3802 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
3803
3aa2fa44 38042014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
3805
3806 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
3807 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
3808 (__cpp_range_based_for, __cpp_initializer_lists,
3809 __cpp_delegating_constructors, __cpp_nsdmi,
3810 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
3811 for C++11; (__cpp_attribute_deprecated): Remove in favor of
3812 __has_cpp_attribute.
3813 * c-lex.c (cb_has_attribute): New callback CPP function;
3814 (init_c_lex): Set has_attribute callback.
3815
7fd22aae 38162014-11-04 Richard Biener <rguenther@suse.de>
3817
3818 * c-common.c (shorten_compare): Do not shorten mixed
3819 DFP and non-DFP compares.
3820
4af203ac 38212014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
3822
3823 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
3824 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
3825 Commentary and rearrangement of tests.
3826 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
3827 Commentary and rearrangement of tests.
3828 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
3829 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
3830
3754d046 38312014-10-29 Richard Sandiford <richard.sandiford@arm.com>
3832
3833 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
3834 enum from machine_mode.
3835
1140c305 38362014-10-28 Andrew MacLeod <amacleod@redhat.com>
3837
1f78217c 3838 * c-common.c: Adjust include files.
3839 * c-gimplify.c: Ditto.
3840 * cilk.c: Ditto.
3841 * c-pragma.c: Ditto.
3842 * c-ubsan.c: Ditto.
1140c305 3843
94ea8568 38442014-10-27 Andrew MacLeod <amacleod@redhat.com>
3845
3846 * c-gimplify.c: Adjust include files.
3847
32ecf960 38482014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
3849
3850 PR c++/53061
3851 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
3852 c_common_initialize_diagnostics.
3853 * c-common.h: Likewise.
3854
85fecbe2 38552014-10-24 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/56980
3858 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
3859 print "struct"/"union"/"enum" for typedefed names.
3860
e7ec033a 38612014-10-23 Marek Polacek <polacek@redhat.com>
3862
3863 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
3864 in unsigned type.
3865
c2598081 38662014-10-22 Jakub Jelinek <jakub@redhat.com>
3867 Yury Gribov <y.gribov@samsung.com>
3868
3869 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
3870 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
3871 instead of flag_sanitize_recover as bool flag.
3872
acebb7e2 38732014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
3874
3875 * cilk.c: Revert previous change.
3876
6115016c 38772014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
3878
3879 PR c/63307
3880 * cilk.c: Include vec.h.
3881 (struct cilk_decls): New structure.
3882 (wrapper_parm_cb): Split this function to...
3883 (fill_decls_vec): ...this...
3884 (create_parm_list): ...and this.
3885 (compare_decls): New function.
3886 (for_local_cb): Remove.
3887 (wrapper_local_cb): Ditto.
3888 (build_wrapper_type): For now first traverse and fill vector of
3889 declarations then sort it and then deal with sorted vector.
3890 (cilk_outline): Ditto.
3891 (declare_one_free_variable): Ditto.
3892
e610d2b2 38932014-10-17 Marek Polacek <polacek@redhat.com>
3894
3895 * c-opts.c (c_common_post_options): Set warn_implicit_int.
3896 * c.opt (Wimplicit-int): Initialize to -1.
3897
a3020f2f 38982014-10-16 Andrew MacLeod <amacleod@redhat.com>
3899
3900 * c-pragma.c: Adjust include files.
3901 * c-semantics.c: Likewise.
3902
926ddd2c 39032014-10-16 DJ Delorie <dj@redhat.com>
3904
3905 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
3906 multiples of bytes.
3907
b0542e7c 39082014-10-14 Jason Merrill <jason@redhat.com>
3909
3910 PR c++/63455
3911 * c-common.h (CPP_PREPARSED_EXPR): New.
3912 (N_CP_TTYPES): Adjust.
3913
b2601928 39142014-10-15 Marek Polacek <polacek@redhat.com>
3915
3916 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
3917
9f75f026 39182014-10-14 DJ Delorie <dj@redhat.com>
3919
3920 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
3921 types, not just __int128.
3922 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
3923 types, not just __int128.
3924 (cpp_atomic_builtins): Round pointer sizes up.
3925 (type_suffix): Use type precision, not specific types.
3926 * c-common.c (c_common_reswords): Remove __int128 special case.
3927 (c_common_type_for_size): Check for all __intN types, not just
3928 __int128.
3929 (c_common_type_for_mode): Likewise.
3930 (c_common_signed_or_unsigned_type): Likewise.
3931 (c_build_bitfield_integer_type): Likewise.
3932 (c_common_nodes_and_builtins): Likewise.
3933 (keyword_begins_type_specifier): Likewise.
3934 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
3935 __intN variants.
3936
2ef51f0e 39372014-10-12 Trevor Saunders <tsaunders@mozilla.com>
3938
3939 * c-common.c: Use hash_table instead of hashtab.
3940
5b8257e3 39412014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
3942
1f78217c 3943 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5b8257e3 3944 C++11 section.
3945
5e84569c 39462014-10-03 Marc Glisse <marc.glisse@inria.fr>
3947
3948 PR c++/54427
3949 PR c++/57198
3950 PR c++/58845
3951 * c-common.c (warn_logical_operator): Punt for vectors.
3952
f6751ff2 39532014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
3954
3955 Implement SD-6: SG10 Feature Test Recommendations
3956 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
3957 macros and the __has_header macro.
3958
c33e051d 39592014-09-30 Jason Merrill <jason@redhat.com>
3960
f76a9aa8 3961 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
3962 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
3963 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
3964
717e52f9 3965 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
3966 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
3967
c33e051d 3968 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
3969 * c-common.c (c_common_reswords): Remove __is_convertible_to.
3970
5213d6c9 39712014-09-24 Marek Polacek <polacek@redhat.com>
3972
3973 PR c/61405
3974 PR c/53874
3975 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
3976
6b722052 39772014-09-23 Andi Kleen <ak@linux.intel.com>
3978
3979 * c-common.c (handle_no_reorder_attribute): New function.
3980 (c_common_attribute_table): Add no_reorder attribute.
3981
0cb69d12 39822014-09-22 Joseph Myers <joseph@codesourcery.com>
3983
3984 * c-cppbuiltin.c (c_cpp_builtins): Define
3985 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
3986 modes.
3987
168dfbf0 39882014-09-18 Joseph Myers <joseph@codesourcery.com>
3989
3990 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
3991 for supported floating-point modes.
3992
b83705f4 39932014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
3994
3995 * c.opt (Wpsabi): Use LangEnabledBy.
3996 * c-opts.c (c_common_handle_option): Do not handle here.
3997
d5957f0d 39982014-09-12 Joseph Myers <joseph@codesourcery.com>
3999
4000 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
4001 macros for floating-point modes.
4002
bae6edff 40032014-09-11 Marc Glisse <marc.glisse@inria.fr>
4004
4005 PR target/58757
4006 * c-cppbuiltin.c (builtin_define_float_constants): Correct
4007 __*_DENORM_MIN__ without denormals.
4008
73a69d02 40092014-09-10 Jakub Jelinek <jakub@redhat.com>
4010
4011 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4012 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4013 ubsan_create_data callers.
4014 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
4015 index is constant or BIT_AND_EXPR with constant mask and is
4016 small enough for the bound.
4017 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
4018 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
4019
7ff8db31 40202014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4021
4022 * c.opt: Add CppReason to various flags.
4023 (Wdate-time): Re-sort.
4024 * c-common.c: Include c-common.h earlier.
4025 (struct reason_option_codes_t): Delete.
4026 (c_option_controlling_cpp_error): Prefix global type and struct
4027 with cpp_.
4028
bcc1f37e 40292014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4030
4031 * c.opt (Wnormalized): New.
4032 (Wnormalized=): Use Enum and Reject Negative.
4033 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
4034
b660d3c6 40352014-09-08 Joseph Myers <joseph@codesourcery.com>
4036
4037 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
4038 digits of floating-point modes if -fbuilding-libgcc.
4039
325b8c3c 40402014-09-05 Joseph Myers <joseph@codesourcery.com>
4041
4042 * c-cppbuiltin.c (c_cpp_builtins): Also define
4043 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
4044 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
4045 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
4046 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
4047 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
4048 __LIBGCC_STACK_GROWS_DOWNWARD__,
4049 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
4050 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
4051 __LIBGCC_DWARF_FRAME_REGISTERS__,
4052 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
4053 __LIBGCC_STACK_POINTER_REGNUM__ and
4054 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
4055 (builtin_define_with_value): Handle backslash-escaping in string
4056 macro values.
4057
1e074e77 40582014-09-05 Richard Biener <rguenther@suse.de>
4059
4060 PR middle-end/63148
4061 * c-format.c (check_format_arg): Properly handle
4062 effectively signed POINTER_PLUS_EXPR offset.
4063
04afd878 40642014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
4065
4066 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
4067 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
4068 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
4069 and Init.
4070 * c-opts.c (c_common_handle_option): Do not handle here.
4071 (sanitize_cpp_opts): Likewise.
4072 * c-common.c (struct reason_option_codes_t): Handle
4073 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
4074
a3f448f0 40752014-09-03 Marek Polacek <polacek@redhat.com>
4076
4077 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
4078
40750995 40792014-09-02 Jakub Jelinek <jakub@redhat.com>
4080 Balaji V. Iyer <balaji.v.iyer@intel.com>
4081 Igor Zamyatin <igor.zamyatin@intel.com>
4082
4083 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
4084 * c-common.c (c_common_reswords): Added _Cilk_for.
4085 * c-common.h (enum rid): Added RID_CILK_FOR.
4086 (cilk_for_number_of_iterations): Add declaration.
4087 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
4088 CILK_FOR.
4089 * c-pragma.c (init_pragma): Register "grainsize" pragma.
4090 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
4091
f0fbe519 40922014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4093
4094 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
4095 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
4096 Wundef): Use CPP, Var and Init.
4097 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
4098
a7d2e480 40992014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4100
4101 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
4102 * c-opts.c (c_common_handle_option): Do not handle here.
4103
c35e53f1 41042014-08-25 Jason Merrill <jason@redhat.com>
4105
4106 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
4107 -std=c++14 and -std=gnu++14, rather than the reverse.
4108 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
4109 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
4110 * c-common.h (cxx_dialect): Remove cxx1y.
4111
4e454776 41122014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
4113
4114 * c-common.h (enum cxx_dialect): Add cxx14.
4115 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
4116 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
4117 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
4118
af1a80f2 41192014-08-22 Jason Merrill <jason@redhat.com>
4120
4121 * c.opt (std=gnu++17): Fix alias.
4122
dc6229e8 41232014-08-22 Marek Polacek <polacek@redhat.com>
4124
4125 PR c++/62199
4126 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
4127 check for vector types. Drop LHS argument.
4128 * c-common.h (warn_logical_not_parentheses): Adjust.
4129
ba7f7c88 41302014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4131
4132 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
4133 (Wmultichar): Likewise.
4134 (Wdate-time): Use C-family languages instead of Common. Use CPP
4135 and Var.
4136 * c-opts.c (c_common_handle_option): Do not handle the above
4137 options here.
4138 (sanitize_cpp_opts): Likewise.
4139
399d4f80 41402014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4141
4142 PR fortran/44054
4143 * c-opts.c: Include tree-diagnostics.h.
4144 (c_diagnostic_finalizer): New.
4145 (c_common_initialize_diagnostics): Use it.
4146
1babed5f 41472014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4148
4149 PR preprocessor/51303
4150 * c-common.c (struct reason_option_codes_t option_codes):
4151 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
4152
3636964b 41532014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4154
4155 PR c/60975
4156 PR c/53063
4157 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
4158 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
4159 (c_common_post_options): Call init_global_opts_from_cpp.
4160 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
4161
78bf4156 41622014-08-19 Marek Polacek <polacek@redhat.com>
4163
4164 PR c++/62153
4165 * c-common.c (maybe_warn_bool_compare): New function.
4166 * c-common.h (maybe_warn_bool_compare): Declare.
4167 * c.opt (Wbool-compare): New option.
4168
508ea33a 41692014-08-19 Marek Polacek <polacek@redhat.com>
4170
4171 * c.opt (Wc99-c11-compat): New option.
4172
806fe15e 41732014-08-19 Marek Polacek <polacek@redhat.com>
4174
4175 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
4176 to warn_c90_c99_compat.
4177 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
4178 to -1.
4179
6c867de1 41802014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
4181 Steven Bosscher <steven@gcc.gnu.org>
4182
4183 PR c/52952
4184 * c-format.c: Add extra_arg_loc and format_string_loc to struct
4185 format_check_results.
4186 (check_function_format): Use true and add comment for boolean
4187 argument.
4188 (finish_dollar_format_checking): Use explicit location when warning.
4189 (check_format_info): Likewise.
4190 (check_format_arg): Set extra_arg_loc and format_string_loc.
4191 (check_format_info_main): Use explicit location when warning.
4192 (check_format_types): Pass explicit location.
4193 (format_type_warning): Likewise.
4194
dc8078a3 41952014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4196
4197 PR fortran/44054
4198 * c-format.c: Handle Fortran flags.
4199
d271ec7e 42002014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
4201
4202 PR other/61962
4203 * array-notation-common.c (find_rank): Added handling for other
4204 types of references.
4205
890c2e2f 42062014-08-10 Marek Polacek <polacek@redhat.com>
4207
4208 PR c/51849
4209 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
4210 * c.opt (Wc90-c99-compat): Add option.
4211
7149db5f 42122014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4213
4214 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
4215
2d2f6a15 42162014-08-03 Marek Polacek <polacek@redhat.com>
4217
4218 * c-common.c (check_case_value): Add location_t parameter. Use it.
4219 (c_add_case_label): Pass loc to check_case_value.
4220
06ecf488 42212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4222
4223 * cilk.c: Use hash_map instead of pointer_map.
4224
431205b7 42252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4226
4227 * c-gimplify.c: Use hash_set instead of pointer_set.
4228
3394c80c 42292014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4230
4231 PR middle-end/61455
4232 * array-notation-common.c (extract_array_notation_exprs): Handling
4233 of DECL_EXPR added.
4234
392dee1e 42352014-08-01 Jakub Jelinek <jakub@redhat.com>
4236
4237 * c-common.h (min_align_of_type): Removed prototype.
4238 * c-common.c (min_align_of_type): Removed.
4239 * c-ubsan.h (ubsan_maybe_instrument_reference,
4240 ubsan_maybe_instrument_member_call): New prototypes.
4241 * c-ubsan.c: Include stor-layout.h and builtins.h.
4242 (ubsan_maybe_instrument_reference_or_call,
4243 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
4244 functions.
4245
f22a2cb7 42462014-07-31 Marc Glisse <marc.glisse@inria.fr>
4247
4248 PR c++/60517
4249 * c.opt (-Wreturn-local-addr): Move to common.opt.
4250
87b0198f 42512014-07-30 Jason Merrill <jason@redhat.com>
4252
4253 PR c++/61659
4254 PR c++/61687
4255 Revert:
4256 * c.opt (-fuse-all-virtuals): New.
4257
74691f46 42582014-07-30 Tom Tromey <tromey@redhat.com>
4259
4260 PR c/59855
4261 * c.opt (Wdesignated-init): New option.
4262 * c-common.c (c_common_attribute_table): Add "designated_init".
4263 (handle_designated_init): New function.
4264
9140d56f 42652014-07-24 Marek Polacek <polacek@redhat.com>
4266
4267 PR c/57653
4268 * c-opts.c (c_finish_options): If -imacros is in effect, return.
4269
a09c5cc2 42702014-07-16 Dodji Seketeli <dodji@redhat.com>
4271
4272 PR preprocessor/60723 - missing system-ness marks for macro tokens
4273 * c-ppoutput.c (struct print::prev_was_system_token): New data
4274 member.
4275 (init_pp_output): Initialize it.
4276 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
4277 (do_line_change): Return a flag saying if a line marker was
4278 emitted or not.
4279 (scan_translation_unit): Detect if the system-ness of the token we
4280 are about to emit is different from the one of the previously
4281 emitted token. If so, emit a line marker. Avoid emitting useless
4282 adjacent line markers. Avoid emitting line markers for tokens
4283 originating from the expansion of built-in macros.
4284 (scan_translation_unit_directives_only): Adjust.
4285
2b25b62f 42862014-07-15 Marek Polacek <polacek@redhat.com>
4287
4288 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
4289 TYPE_MAX_VALUE is NULL.
4290
305d96bc 42912014-07-14 Jakub Jelinek <jakub@redhat.com>
4292
4293 PR middle-end/61294
4294 * c.opt (Wmemset-transposed-args): New warning.
4295
8ea4660d 42962014-07-10 Jason Merrill <jason@redhat.com>
4297
4298 PR c++/61659
4299 PR c++/61687
4300 * c.opt (-fuse-all-virtuals): New.
4301
cd480f3d 43022014-07-09 Richard Biener <rguenther@suse.de>
4303
4304 PR c-family/61741
4305 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
4306 using unsigned arithmetic if overflow does not wrap instead of
4307 if overflow is undefined.
4308
87d59e72 43092014-07-06 Marek Polacek <polacek@redhat.com>
4310
4311 PR c/6940
4312 * c.opt (Wsizeof-array-argument): New option.
4313
d69521d8 43142014-07-03 Jakub Jelinek <jakub@redhat.com>
4315
8204c077 4316 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
d69521d8 4317 comments->count <= 1, as comments->entries might be NULL.
4318
1207866e 43192014-07-01 Marek Polacek <polacek@redhat.com>
4320
4321 * c.opt (Wint-conversion): New option.
4322
7a6bbb76 43232014-07-01 Marek Polacek <polacek@redhat.com>
4324
4325 PR c/58286
4326 * c.opt (Wincompatible-pointer-types): New option.
4327
9d4eeb52 43282014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
4329
4330 PR c++/51400
4331 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
4332 Do not discard TYPE_QUALS of type.
4333
4b53bc0f 43342014-06-26 Jason Merrill <jason@redhat.com>
4335
4336 * c-common.h (enum cxx_dialect): Add cxx1z.
4337 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
4338 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
4339
a8a8d4ea 43402014-06-26 Teresa Johnson <tejohnson@google.com>
4341
4342 * c-common.h (get_dump_info): Declare.
4343 * c-gimplify.c (c_genericize): Use saved dump files.
4344 * c-opts.c (c_common_parse_file): Begin and end dumps
4345 once around parsing invocation.
4346 (get_dump_info): New function.
4347
1f6be080 43482014-06-23 Marek Polacek <polacek@redhat.com>
4349 Andrew MacLeod <amacleod@redhat.com>
4350
4351 PR c/61553
4352 * c-common.c (get_atomic_generic_size): Don't segfault if the
4353 type doesn't have a size.
4354
5ef6b660 43552014-06-20 Marek Polacek <polacek@redhat.com>
4356
4357 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
4358 (ubsan_walk_array_refs_r): New function.
4359 (c_genericize): Instrument array bounds.
4360 * c-ubsan.c: Include "internal-fn.h".
4361 (ubsan_instrument_division): Mark instrumented arrays as having
4362 side effects. Adjust ubsan_type_descriptor call.
4363 (ubsan_instrument_shift): Likewise.
4364 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
4365 (ubsan_instrument_bounds): New function.
4366 (ubsan_array_ref_instrumented_p): New function.
4367 (ubsan_maybe_instrument_array_ref): New function.
4368 * c-ubsan.h (ubsan_instrument_bounds): Declare.
4369 (ubsan_array_ref_instrumented_p): Declare.
4370 (ubsan_maybe_instrument_array_ref): Declare.
4371
43722014-06-20 Hale Wang <hale.wang@arm.com>
3ccd1e6e 4373
4374 PR lto/61123
4375 * c.opt (fshort-enums): Add to LTO.
4376 * c.opt (fshort-wchar): Likewise.
4377
78438f31 43782014-06-16 Marek Polacek <polacek@redhat.com>
4379
4380 PR c/60439
4381 * c.opt (Wswitch-bool): Add Var.
4382
5fddcf34 43832014-06-12 Jakub Jelinek <jakub@redhat.com>
4384
4385 PR middle-end/61486
4386 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
4387 #pragma omp target teams or
4388 #pragma omp {,target }teams distribute simd.
4389
74b777e5 43902014-06-12 Jason Merrill <jason@redhat.com>
4391
4392 * c.opt (Wabi=, fabi-compat-version): New.
4393 * c-opts.c (c_common_handle_option): Handle -Wabi=.
4394 (c_common_post_options): Handle flag_abi_compat_version default.
4395 Disallow -fabi-compat-version=1.
4396 * c-common.h (abi_version_crosses): New.
4397
738a6bda 43982014-06-11 Jan Hubicka <hubicka@ucw.cz>
4399
1f78217c 4400 * c-common.c (handle_section_attribute): Update handling for
738a6bda 4401 section names that are no longer trees.
4402
cf5f881f 44032014-06-10 Jakub Jelinek <jakub@redhat.com>
4404
4405 PR fortran/60928
4406 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
4407 (omp_pragmas): ... back here.
4408
32dc1512 44092014-06-05 Marek Polacek <polacek@redhat.com>
4410
4411 PR c/49706
4412 * c-common.c (warn_logical_not_parentheses): New function.
4413 * c-common.h (warn_logical_not_parentheses): Declare.
4414 * c.opt (Wlogical-not-parentheses): New option.
4415
f61a9bc2 44162014-06-04 Marek Polacek <polacek@redhat.com>
4417
4418 PR c/30020
4419 * c-common.c (check_case_bounds): Add location parameter.
4420 Use it.
4421 (c_add_case_label): Pass loc to check_case_bounds.
4422
c69ec07d 44232014-06-03 Marek Polacek <polacek@redhat.com>
4424
4425 PR c/60439
4426 * c.opt (Wswitch-bool): New option.
4427
3c77ca67 44282014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4429
68a2c870 4430 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
4431 Remove prototypes.
4432 (record_types_used_by_current_var_decl): Move prototype to where
4433 it belongs.
4434
3c77ca67 4435 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
4436 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
4437 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
4438
3ab4693e 44392014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4440
4441 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
4442 * c-common.c (c_common_nodes_and_builtins): Don't initialize
4443 void_zero_node.
4444 * c-pretty-print.c (pp_c_void_constant): New function.
4445 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
4446 (c_pretty_printer::expression): Handle VOID_CST.
4447 * cilk.c (extract_free_variables): Likewise.
4448 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
4449 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
4450
25a27413 44512014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4452
4453 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
4454 * c-pragma.c (push_alignment): Adjust.
4455 (handle_pragma_push_options): Likewise.
4456
3e5a8b00 44572014-05-09 Marek Polacek <polacek@redhat.com>
4458
4459 PR c/50459
4460 * c-common.c (check_user_alignment): Return -1 if alignment is error
4461 node.
4462 (handle_aligned_attribute): Don't call default_conversion on
4463 FUNCTION_DECLs.
4464 (handle_vector_size_attribute): Likewise.
4465 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
4466 (handle_sentinel_attribute): Call default_conversion and allow even
4467 integral types as an argument.
4468
c2c4ae8d 44692014-05-08 Marek Polacek <polacek@redhat.com>
4470
4471 PR c/61053
4472 * c-common.c (min_align_of_type): New function factored out from...
4473 (c_sizeof_or_alignof_type): ...here.
4474 * c-common.h (min_align_of_type): Declare.
4475
2026249a 44762014-05-08 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/61077
4479 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
4480 parameter type of main.
4481
33c8dcfe 44822014-05-07 DJ Delorie <dj@redhat.com>
4483
4484 * c-cppbuiltin.c (print_bits_of_hex): New.
4485 (builtin_define_type_minmax): Print values using hex so as not to
4486 require a pre-computed list of string values.
4487
960d5a55 44882014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4489 Mike Stump <mikestump@comcast.net>
4490 Richard Sandiford <rdsandiford@googlemail.com>
4491
4492 * c-ada-spec.c: Include wide-int.h.
4493 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
4494 (dump_generic_ada_node): Use wide-int interfaces.
4495 * c-common.c: Include wide-int-print.h.
4496 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
4497 (pointer_int_sum): Use wide-int interfaces.
4498 (c_common_nodes_and_builtins): Use make_int_cst.
4499 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
4500 (handle_alloc_size_attribute): Use wide-int interfaces.
4501 (get_nonnull_operand): Likewise.
4502 * c-format.c (get_constant): Use tree_fits_uhwi_p.
4503 * c-lex.c: Include wide-int.h.
4504 (narrowest_unsigned_type): Take a widest_int rather than two
4505 HOST_WIDE_INTs.
4506 (narrowest_signed_type): Likewise.
4507 (interpret_integer): Update accordingly. Use wide-int interfaces.
4508 (lex_charconst): Use wide-int interfaces.
4509 * c-pretty-print.c: Include wide-int.h.
4510 (pp_c_integer_constant): Use wide-int interfaces.
4511 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
4512 INT_CST_LT_UNSIGNED.
4513
bbb88b31 45142014-05-06 Richard Biener <rguenther@suse.de>
4515
4516 * c-opts.c (c_common_post_options): For -freestanding,
4517 -fno-hosted and -fno-builtin disable pattern recognition
4518 if not enabled explicitely.
4519
022d4718 45202014-05-02 Marek Polacek <polacek@redhat.com>
4521
4522 * c.opt (Wsizeof-pointer-memaccess): Describe option.
4523
e4ab2ef3 45242014-05-01 Marek Polacek <polacek@redhat.com>
4525
4526 PR c/43245
4527 * c.opt (Wdiscarded-qualifiers): Add.
4528
52cc0072 45292014-04-30 Marek Polacek <polacek@redhat.com>
4530
4531 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
4532 INT_MIN / -1 sanitization only for integer types.
4533
4a026b48 45342014-04-25 Marek Polacek <polacek@redhat.com>
4535
4536 PR c/18079
4537 * c-common.c (handle_noinline_attribute): Warn if the attribute
4538 conflicts with always_inline attribute.
4539 (handle_always_inline_attribute): Warn if the attribute conflicts
4540 with noinline attribute.
4541
90e645fa 45422014-04-25 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/60156
4545 * c-common.c (check_main_parameter_types): Warn about variadic main.
4546
db103ea4 45472014-04-24 Mike Stump <mikestump@comcast.net>
4548
4549 * c.opt (Wshadow-ivar): Default to on.
4550
06511efd 45512014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
4552
4553 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
4554
cdf34fca 45552014-04-23 Marek Polacek <polacek@redhat.com>
4556
4557 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
4558
7311d7c1 45592014-04-22 Jakub Jelinek <jakub@redhat.com>
4560
4561 PR sanitizer/60275
4562 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
4563 if flag_sanitize_undefined_trap_on_error.
4564 (ubsan_instrument_division, ubsan_instrument_shift,
4565 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
4566 if !flag_sanitize_recover.
4567
c1917557 45682014-04-22 Marc Glisse <marc.glisse@inria.fr>
4569
4570 PR libstdc++/43622
4571 * c-common.c (registered_builtin_types): Make non-static.
4572 * c-common.h (registered_builtin_types): Declare.
4573
b2ca6510 45742014-04-14 Richard Biener <rguenther@suse.de>
4575 Marc Glisse <marc.glisse@inria.fr>
4576
4577 PR c/60819
4578 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
4579 apply may-alias the scalar pointer type when applicable.
4580
855372a3 45812014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4582
4583 PR middle-end/60467
4584 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
4585 as possible argument for Cilk_spawn.
4586
4012a986 45872014-04-11 Tobias Burnus <burnus@net-b.de>
4588
4589 PR c/60194
4590 * c.opt (Wformat-signedness): Add
4591 * c-format.c(check_format_types): Use it.
4592
0d284870 45932014-04-11 Jason Merrill <jason@redhat.com>
4594
4595 PR c++/57926
4596 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
4597 default_conversion for an array argument.
4598
a34c1231 45992014-04-08 Marek Polacek <polacek@redhat.com>
4600
4601 PR sanitizer/60745
4602 * c-ubsan.c: Include asan.h.
4603 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
4604
a35a8e18 46052014-04-03 Nathan Sidwell <nathan@codesourcery.com>
4606
4607 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
4608
b23e42b6 46092014-04-02 Marek Polacek <polacek@redhat.com>
4610
4611 * c-common.h (c_expand_expr): Remove declaration.
4612
5a672e62 46132014-03-28 Jakub Jelinek <jakub@redhat.com>
4614
4615 PR c++/60689
4616 * c-common.c (add_atomic_size_parameter): When creating new
4617 params vector, push the size argument first.
4618
d4d068c0 46192014-03-26 Jakub Jelinek <jakub@redhat.com>
4620
4621 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4622 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4623 ubsan_create_data callers.
4624
446bdf5f 46252014-03-22 Jakub Jelinek <jakub@redhat.com>
4626
4627 PR debug/60603
4628 * c-opts.c (c_finish_options): Restore cb_file_change call to
4629 <built-in>.
4630
8895f0a3 46312014-03-13 Jakub Jelinek <jakub@redhat.com>
4632
4633 PR middle-end/36282
4634 * c-pragma.c (apply_pragma_weak): Only look at
4635 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
4636 DECL_ASSEMBLER_NAME_SET_P (decl).
4637 (maybe_apply_pending_pragma_weaks): Exit early if
4638 vec_safe_is_empty (pending_weaks) rather than only when
4639 !pending_weaks.
4640 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
4641 set assembler name back to NULL afterwards.
4642
7a5da2cd 46432014-03-11 Jason Merrill <jason@redhat.com>
4644
4645 * c.opt: Add -std=gnu++14.
4646
95093889 46472014-03-11 Ian Bolton <ian.bolton@arm.com>
4648
4649 * c-opts.c (c_common_post_options): Don't override
4650 -ffp-contract=fast if unsafe-math-optimizations is on.
4651
c9a24b37 46522014-03-08 Paulo Matos <paulo@matos-sorge.com>
4653
9b8f3aa1 4654 * c.opt: Enable LTO FE for fshort-double.
c9a24b37 4655
3f6dba6e 46562014-03-07 Jason Merrill <jason@redhat.com>
4657
4658 * c.opt: Add -std=c++14.
4659
3bfdc94f 46602014-03-06 Marek Polacek <polacek@redhat.com>
4661
4662 PR c/60197
4663 * cilk.c (contains_cilk_spawn_stmt): New function.
4664 (contains_cilk_spawn_stmt_walker): Likewise.
4665 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
4666 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
4667
8b3a6a4c 46682014-03-03 Jakub Jelinek <jakub@redhat.com>
4669
4670 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
4671 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
4672 even when flag_preprocess_only.
4673
734ec290 46742014-02-26 Jason Merrill <jason@redhat.com>
4675
4676 PR c++/59231
4677 PR c++/11586
4678 * c-common.c (shorten_compare): Don't check
4679 c_inhibit_evaluation_warnings.
4680
81aec8b8 46812014-02-19 Jakub Jelinek <jakub@redhat.com>
4682
d1081017 4683 PR c/37743
4684 * c-common.c (c_common_nodes_and_builtins): When initializing
4685 c_uint{16,32,64}_type_node, also set corresponding
4686 uint{16,32,64}_type_node to the same value.
4687
81aec8b8 4688 PR c++/60267
4689 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
4690 for PRAGMA_IVDEP if flag_preprocess_only.
4691
312243bb 46922014-02-12 Jakub Jelinek <jakub@redhat.com>
4693
4694 PR c/60101
4695 * c-common.c (merge_tlist): If copy is true, call new_tlist,
4696 if false, add ADD itself, rather than vice versa.
4697 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
4698 copy. For SAVE_EXPR, only call merge_tlist once.
4699
237e78b1 47002014-02-08 Jakub Jelinek <jakub@redhat.com>
4701
4702 PR middle-end/60092
4703 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
4704 and tree_to_uhwi.
4705 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
4706 functions.
4707 (c_common_attribute_table): Add alloc_align and assume_aligned
4708 attributes.
4709
76fdceeb 47102014-02-06 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/60087
4713 * c-common.c (warn_for_sign_compare): Call warning_at with location
4714 instead of warning.
4715
4a4dea42 47162014-02-05 Marek Polacek <polacek@redhat.com>
4717
4718 PR c/53123
4719 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
4720 statement.
4721
ec704957 47222014-02-04 Marek Polacek <polacek@redhat.com>
4723
4724 PR c/60036
4725 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
4726 SAVE_EXPR.
4727
caf62483 47282014-02-03 Marc Glisse <marc.glisse@inria.fr>
4729
4730 PR c++/53017
4731 PR c++/59211
4732 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
4733 handle_vector_size_attribute, handle_nonnull_attribute): Call
4734 default_conversion on the attribute argument.
4735 (handle_nonnull_attribute): Increment the argument number.
4736
ec761d5a 47372014-01-31 Marek Polacek <polacek@redhat.com>
4738
4739 PR c/59963
4740 * c-common.c (add_atomic_size_parameter): Pass vNULL to
4741 build_function_call_vec.
4742 (resolve_overloaded_builtin): Likewise.
4743 * c-common.h (build_function_call_vec): Adjust declaration.
4744
22a75734 47452014-01-30 Marek Polacek <polacek@redhat.com>
4746
4747 PR c/59940
4748 * c-common.h (unsafe_conversion_p): Adjust declaration.
4749 (warnings_for_convert_and_check): Likewise.
4750 (convert_and_check): Likewise.
4751 * c-common.c (unsafe_conversion_p): Add location parameter. Call
4752 expansion_point_location_if_in_system_header on it.
4753 (warnings_for_convert_and_check): Add location parameter. Call
4754 expansion_point_location_if_in_system_header on it. Use it.
4755 (convert_and_check): Add location parameter. Use it.
4756 (conversion_warning): Likewise.
4757 (c_add_case_label): Adjust convert_and_check calls.
4758 (scalar_to_vector): Adjust unsafe_conversion_p calls.
4759
a89e6c15 47602014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4761
4762 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
4763 flag_cilkplus.
4764 * c-pragma.c (init_pragma): Likewise.
4765 * c.opt: Likewise.
4766
2623625f 47672014-01-23 Marek Polacek <polacek@redhat.com>
4768
4769 PR c/59846
4770 * c-common.c (shorten_compare): Add location_t parameter.
4771 * c-common.h (shorten_binary_op): Adjust declaration.
4772
46da3601 47732014-01-23 Marek Polacek <polacek@redhat.com>
4774
4775 PR c/58346
4776 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
4777 * c-common.h: Declare it.
4778
c9743c6a 47792014-01-20 Eric Botcazou <ebotcazou@adacore.com>
4780
4781 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
4782 * c-ada-spec.c (dump_ads): Likewise.
4783 (cpp_check): Likewise.
4784 (dump_ada_specs): Likewise.
4785
47862014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
36e33c6a 4787
4788 PR c++/49718
4789 * c-common.c (handle_no_instrument_function_attribute): Allow
4790 no_instrument_function attribute in class member
4791 definition/declaration.
4792
1248c663 47932014-01-15 Jakub Jelinek <jakub@redhat.com>
4794
4795 PR c/58943
4796 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
4797 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
4798 being COMPOUND_EXPR.
4799 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
4800 operand a SAVE_EXPR and second MODIFY_EXPR.
4801
6e5c480b 48022014-01-09 Jakub Jelinek <jakub@redhat.com>
4803
4804 PR target/58115
4805 * c-pch.c (c_common_write_pch): Call
4806 prepare_target_option_nodes_for_pch.
4807
3aea1f79 48082014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4809
4810 Update copyright years
4811
e4f22041 48122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
4813
4814 * array-notation-common.c, c-cilkplus.c: Use the standard form for
4815 the copyright notice.
4816
7fb0fe24 48172013-12-28 Eric Botcazou <ebotcazou@adacore.com>
4818
4819 * c-ada-spec.c (print_constructor): New function.
4820 (print_destructor): Retrieve the origin of the destructor.
4821 (print_ada_declaration): Revamp handling of constructors/destructors.
4822
92a44a68 48232013-12-23 Stuart Hastings <stuart@apple.com>
468088ac 4824 Bill Maddox <maddox@google.com>
4825 Jason Merrill <jason@redhat.com>
4826
4827 * c.opt: Add -fdeclone-ctor-dtor.
4828 * c-opts.c (c_common_post_options): Default to on iff -Os.
4829
74acc703 48302013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
4831
4832 * c-common.c (c_common_attribute_table): Added "cilk simd function"
4833 attribute.
4834 * c-pragma.h (enum pragma_cilk_clause): Remove.
4835 (enum pragma_omp_clause): Added the following fields:
4836 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
4837 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
4838 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
4839 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
4840 PRAGMA_CILK_CLAUSE_UNIFORM.
4841
8204c077 4842
433e804e 48432013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
4844
4845 * cilk.c (cilk_outline): Made this function non-static.
4846 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
4847 (create_cilk_wrapper): Added a new parameter: a function pointer.
4848 (c_install_body_w_frame_cleanup): Remove
4849 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
4850 * c-common.h (cilk_outline): New prototype.
4851 (gimplify_cilk_spawn): Removed two parameters.
4852 (cilk_install_body_with_frame_cleanup): New prototype.
4853 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
4854 CILK_SPAWN_STMT case.
4855
5bcc7e60 48562013-12-11 Bernd Schmidt <bernds@codesourcery.com>
4857
e66325ea 4858 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
4859
5bcc7e60 4860 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
4861 (int_array_type_node): Remove.
4862 * c-common.c (c_common_nodes_and_builtins): Don't build it.
4863
0b26ec77 48642013-12-05 Marek Polacek <polacek@redhat.com>
4865
4866 PR c/52023
4867 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
4868 [ADJUST_FIELD_ALIGN].
4869
a179a7dc 48702013-12-04 Joseph Myers <joseph@codesourcery.com>
4871
4872 PR c/52023
4873 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
4874 and check field alignment if set.
4875 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
4876 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
4877
8204c077 48782013-12-04 Jakub Jelinek <jakub@redhat.com>
137559b2 4879 Marek Polacek <polacek@redhat.com>
4880
4881 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
4882 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
4883
648fd348 48842013-11-29 H.J. Lu <hongjiu.lu@intel.com>
4885
4886 PR c/59309
4887 * cilk.c (gimplify_cilk_spawn): Properly handle function without
4888 arguments.
4889
253e1cae 48902013-11-29 Jakub Jelinek <jakub@redhat.com>
4891
4892 PR c/59280
4893 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
4894 goto invalid. If it is error_mark_node, don't issue further
4895 diagnostics.
4896
3e398f5b 48972013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
4898
4899 * c.opt (Wopenmp-simd): New.
4900
020bc656 49012013-11-22 Jakub Jelinek <jakub@redhat.com>
4902
4903 * c-ubsan.h (ubsan_instrument_return): New prototype.
4904 * c-ubsan.c (ubsan_instrument_return): New function.
4905
bc61cadb 49062013-11-22 Andrew MacLeod <amacleod@redhat.com>
4907
4908 * c-common.c: Add required include files from gimple.h.
4909 * c-gimplify.c: Likewise
4910 * cilk.c: Likewise
4911
3df42822 49122013-11-22 David Malcolm <dmalcolm@redhat.com>
4913
4914 * c-common.c (unsafe_conversion_p): Remove use of
4915 EXPR_LOC_OR_HERE macro.
4916 (conversion_warning): Likewise.
4917 (warnings_for_convert_and_check): Likewise.
4918 (warn_for_collisions_1): Likewise.
4919 (shorten_compare): Likewise, and remove use of in_system_header
4920 macro, using the location from the former.
4921 * c-lex.c (dump_one_header): Remove use of input_filename macro.
4922 (cb_def_pragma): Remove use of in_system_header macro.
4923 (lex_string): Likewise.
4924 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
4925
8c53c46c 49262013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4927 Mike Stump <mikestump@comcast.net>
4928 Richard Sandiford <rdsandiford@googlemail.com>
4929
4930 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
4931 instead of TREE_INT_CST_LOW, in cases where there is a protecting
4932 tree_fits_shwi_p or tree_fits_uhwi_p.
4933 (dump_generic_ada_node): Likewise.
4934 * c-format.c (check_format_arg): Likewise.
4935 * c-pretty-print.c (pp_c_integer_constant): Likewise.
4936
5200ef07 49372013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
4938
4939 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
4940
ca9d7d74 49412013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
4942
4943 PR c/53001
4944 * c-common.c (unsafe_conversion_p): Make this function
4945 return an enumeration with more detail.
4946 (conversion_warning): Use the new return type of
4947 unsafe_conversion_p to separately warn either about conversions
4948 that lower floating point number precision or about the other
4949 kinds of conversions.
4950 * c-common.h (enum conversion_safety): New enumeration.
a49621cf 4951 (unsafe_conversion_p): switching return type to
4952 conversion_safety enumeration.
ca9d7d74 4953 * c.opt: Adding new warning -Wfloat-conversion and
4954 enabling it with -Wconversion.
4955
0391a567 49562013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
4957
a49621cf 4958 * c-opts.c: Include plugin.h.
4959 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
0391a567 4960
19b928d9 49612013-11-19 Marek Polacek <polacek@redhat.com>
4962
4963 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
4964 call.
4965 (ubsan_instrument_shift): Likewise.
4966 (ubsan_instrument_vla): Likewise.
4967
aa59f000 49682013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4969
4970 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
4971 cast to unsigned type.
4972
08f817b3 49732013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4974
4975 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
4976 tree_low_cst.
4977 (complete_array_type): Update comment to refer to tree_to_[su]hwi
4978 rather than tree_low_cst.
4979
6a0712d4 49802013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4981
4982 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
4983 tree_to_uhwi throughout.
4984
fcb97e84 49852013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4986
4987 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
4988 tree_low_cst (..., 0) with tree_to_shwi throughout.
4989
cd4547bf 49902013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4991
4992 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
4993 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
4994
35ec552a 49952013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
4996
4997 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
4998 host_integerp (..., 0) with tree_fits_shwi_p throughout.
4999
f2697631 50002013-11-15 Aldy Hernandez <aldyh@redhat.com>
5001
5002 * c-cilkplus.c: New file.
5003 * c-common.c (readonly_error): Add location argument.
5004 * c-common.h (readonly_error): Same.
5005 (c_finish_cilk_clauses): Protoize.
5006 (c_check_cilk_loop): Same.
5007 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
5008 Do not fail on error_mark_node.
5009 Abstract increment canonicalization to here...
5010 (c_omp_for_incr_canonicalize_ptr): New.
5011 c-pragma.c (init_pragma): Register "simd" pragma.
5012 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
5013 (enum pragma_cilk_clause): New.
5014
0aa8c34e 50152013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
5016
5017 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
5018 wchar_type and host_integerp checks.
5019
e795d6e1 50202013-11-14 Andrew MacLeod <amacleod@redhat.com>
5021
5022 * c-common.c: Likewise.
5023 * c-gimplify.c: Likewise.
5024 * cilk.c: Likewise.
5025
9ed99284 50262013-11-14 Diego Novillo <dnovillo@google.com>
5027
5028 * c-common.c: Include fold-const.h.
5029 Include stor-layout.h.
5030 Include calls.h.
5031 Include stringpool.h.
5032 Include attribs.h.
5033 Include varasm.h.
5034 Include trans-mem.h.
5035 * c-cppbuiltin.c: Include stor-layout.h.
5036 Include stringpool.h.
5037 * c-format.c: Include stringpool.h.
5038 * c-lex.c: Include stringpool.h.
5039 Include stor-layout.h.
5040 * c-pragma.c: Include stringpool.h.
5041 Include attribs.h.
5042 Include varasm.h.
5043 Include gcc-symtab.h.
5044 * c-pretty-print.c: Include stor-layout.h.
5045 Include attribs.h.
5046 * cilk.c: Include stringpool.h.
5047 Include calls.h.
5048
4fba5eb9 50492013-11-13 Joseph Myers <joseph@codesourcery.com>
5050
5051 * c-common.h (enum rid): Add RID_AUTO_TYPE.
5052 * c-common.c (c_common_reswords): Add __auto_type.
5053 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
5054
a8783bee 50552013-11-12 Andrew MacLeod <amacleod@redhat.com>
5056
e795d6e1 5057 * c-common.c: Include gimplify.h.
5058 * c-gimplify.c: Likewise.
5059 * cilk.c: Likewise.
5060 * c-omp.c: Include gimple-expr.h instead of gimple.h.
5061 * c-ubsan.c: Don't include gimple.h.
a8783bee 5062
d184e0c0 50632013-11-12 Joseph Myers <joseph@codesourcery.com>
5064
5065 * c-common.c (c_common_reswords): Add _Thread_local.
5066
a056826c 50672013-11-09 Joseph Myers <joseph@codesourcery.com>
5068
5069 * c-common.c (atomic_size_supported_p): New function.
5070 (resolve_overloaded_atomic_exchange)
5071 (resolve_overloaded_atomic_compare_exchange)
5072 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
5073 Use it instead of comparing size with a local list of sizes.
5074
b560fabd 50752013-11-07 Andrew MacLeod <amacleod@redhat.com>
5076 Joseph Myers <joseph@codesourcery.com>
5077
5078 * c-common.h (enum rid): Add RID_ATOMIC.
5079 * c-common.c (c_common_reswords): Add _Atomic.
5080 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
5081 (keyword_is_type_qualifier): Accept RID_ATOMIC.
5082 * c-format.c (check_format_types): Check for extra _Atomic
5083 qualifiers in format argument.
5084 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
5085 (pp_c_type_qualifier_list): Mention _Atomic in comment.
5086
5b1a0622 50872013-11-06 Tobias Burnus <burnus@net-b.de>
5088
5089 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
5090
4f8f4cb8 50912013-11-06 Joseph Myers <joseph@codesourcery.com>
5092
5093 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
5094 standards modes.
5095 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
5096 to mean lack of IEEE 754 support.
5097
9148bda3 50982013-11-05 Tobias Burnus <burnus@net-b.de>
5099
5100 * c.opt (-Wdate-time): New option
5101 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
5102
08c5f4d5 51032013-11-05 Joseph Myers <joseph@codesourcery.com>
5104
5105 * c-cppbuiltin.c (cpp_iec_559_value): Test
5106 flag_excess_precision_cmdline not flag_excess_precision.
5107
c630ef93 51082013-11-05 Tobias Burnus <burnus@net-b.de>
5109
5110 * c.opt (fopenmp-simd): New option.
5111 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
5112 (omp_pragmas): ... this new struct.
5113 (c_pp_lookup_pragma): Also walk omp_pragmas.
5114 (init_pragma): Init pragmas for -fopenmp-simd.
5115
7354a89b 51162013-11-04 Marek Polacek <polacek@redhat.com>
5117
5118 PR c++/58979
5119 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
5120
4c866b9b 51212013-11-04 Joseph Myers <joseph@codesourcery.com>
5122
5123 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
5124 New functions.
5125 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
5126
e2a6a333 51272013-11-04 Eric Botcazou <ebotcazou@adacore.com>
5128
5129 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
5130 (dump_ada_specs): Adjust prototype of second callback.
5131 * c-ada-spec.c (cpp_check): New global variable.
5132 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
5133 (print_generic_ada_decl): Likewise.
5134 (has_static_fields): Change return type to bool and add guard.
5135 (has_nontrivial_methods): New predicate.
5136 (is_tagged_type): Change return type to bool.
5137 (separate_class_package): Call has_nontrivial_methods.
5138 (pp_ada_tree_identifier): Minor tweaks.
5139 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
5140 (dump_ada_array_domains): Likewise.
5141 (dump_ada_array_type): Likewise.
5142 (dump_template_types): Remove cpp_check parameter and do not pass it to
5143 dump_generic_ada_node.
5144 (dump_ada_template): Likewise.
5145 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
5146 recursively.
5147 (print_ada_methods): Change return type to integer. Remove cpp_check
5148 parameter and do not pass it down.
5149 (dump_nested_types): Remove cpp_check parameter and do not pass it to
5150 dump_generic_ada_node.
5151 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
5152 accessing methods.
5153 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
5154 down. Use has_nontrivial_methods to recognize C++ classes. Use return
5155 value of print_ada_methods.
5156 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
5157 Set cpp_check to it before invoking dump_ada_nodes.
5158 (dump_ada_specs): Likewise.
5159
2c4c3477 51602013-11-03 Marek Polacek <polacek@redhat.com>
5161
5162 * c-ubsan.c: Don't include hash-table.h.
5163 (ubsan_instrument_vla): New function.
5164 * c-ubsan.h: Declare it.
5165
452659af 51662013-10-31 David Malcolm <dmalcolm@redhat.com>
5167
5168 Automated part of renaming of symtab_node_base to symtab_node.
5169
5170 Patch autogenerated by rename_symtab.py from
5171 https://github.com/davidmalcolm/gcc-refactoring-scripts
5172 revision 58bb219cc090b2f4516a9297d868c245495ee622
5173
5174 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
5175 symtab_node_base to symtab_node.
5176
4d6f7dd4 51772013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
5178
a49621cf 5179 Implement C++14 digit separators.
4d6f7dd4 5180 * c-lex.c (interpret_float): Remove digit separators from scratch string
5181 before building real literal.
5182
06cfe805 51832013-10-30 Jakub Jelinek <jakub@redhat.com>
5184
5185 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
5186
d037099f 51872013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5188
5189 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
5190 fields.
5191 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
5192 enabled.
5193 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
5194 (insert_cilk_frame): New prototype.
5195 (cilk_init_builtins): Likewise.
5196 (gimplify_cilk_spawn): Likewise.
5197 (c_cilk_install_body_w_frame_cleanup): Likewise.
5198 (cilk_detect_spawn_and_unwrap): Likewise.
5199 (cilk_set_spawn_marker): Likewise.
5200 (build_cilk_sync): Likewise.
5201 (build_cilk_spawn): Likewise.
5202 * cilk.c: New file.
5203
02774f2d 52042013-10-29 David Malcolm <dmalcolm@redhat.com>
5205
5206 Patch autogenerated by refactor_symtab.py from
5207 https://github.com/davidmalcolm/gcc-refactoring-scripts
5208 revision 58bb219cc090b2f4516a9297d868c245495ee622
5209
5210 * c-gimplify.c (c_genericize): Update for conversion of symtab types
5211 to a true class hierarchy.
5212 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
5213
31fe10fd 52142013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
5215
5216 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
5217
b1c06ff9 52182013-10-26 Jeff Law <law@redhat.com>
5219
1f78217c 5220 * c-common.c (c_define_builtins): Remove mudflap support.
5221 * c.opt: Ignore and warn for mudflap options.
b1c06ff9 5222
48a972c8 52232013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 5224
5225 PR other/33426
5226 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
5227 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
5228
546a04b1 52292013-10-23 Jason Merrill <jason@redhat.com>
5230
5231 * c-format.c (gcc_cxxdiag_char_table): Add %X.
5232
bc7bff74 52332013-10-11 Jakub Jelinek <jakub@redhat.com>
5234
d62c713e 5235 * c-common.h (omp_clause_mask::operator !=): New method.
5236 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
5237 instead of if (mask & something) tests everywhere.
5238
bc7bff74 5239 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
5240 201307 instead of 201107.
5241 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
5242 (c_common_attribute_table): Add "omp declare target" and
5243 "omp declare simd" attributes.
5244 (handle_omp_declare_target_attribute,
5245 handle_omp_declare_simd_attribute): New functions.
5246 * c-omp.c: Include c-pragma.h.
5247 (c_finish_omp_taskgroup): New function.
5248 (c_finish_omp_atomic): Add swapped argument, if true,
5249 build the operation first with rhs, lhs arguments and use NOP_EXPR
5250 build_modify_expr.
5251 (c_finish_omp_for): Add code argument, pass it down to make_code.
5252 (c_omp_split_clauses): New function.
5253 (c_split_parallel_clauses): Removed.
5254 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
5255 c_omp_declare_simd_clauses_to_decls): New functions.
5256 * c-common.h (omp_clause_mask): New type.
5257 (OMP_CLAUSE_MASK_1): Define.
5258 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
5259 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
5260 omp_clause_mask::operator |, omp_clause_mask::operator &,
5261 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
5262 omp_clause_mask::operator ==): New methods.
5263 (enum c_omp_clause_split): New.
5264 (c_finish_omp_taskgroup): New prototype.
5265 (c_finish_omp_atomic): Add swapped argument.
5266 (c_finish_omp_for): Add code argument.
5267 (c_omp_split_clauses): New prototype.
5268 (c_split_parallel_clauses): Removed.
5269 (c_omp_declare_simd_clauses_to_numbers,
5270 c_omp_declare_simd_clauses_to_decls): New prototypes.
5271 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
5272 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
5273 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
5274 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
5275 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
5276 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
5277 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
5278 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
5279 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
5280 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
5281 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
5282 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
5283 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
5284 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
5285 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
5286 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
5287 PRAGMA_OMP_CLAUSE_UNIFORM.
5288
d7dcba40 52892013-10-09 Marc Glisse <marc.glisse@inria.fr>
5290
5291 PR tree-optimization/20318
5292 * c-common.c (handle_returns_nonnull_attribute): New function.
5293 (c_common_attribute_table): Add returns_nonnull.
5294
0b7282f1 52952013-10-03 Marc Glisse <marc.glisse@inria.fr>
5296
5297 PR c++/19476
5298 * c.opt (fcheck-new): Move to common.opt.
5299
51f553af 53002013-09-25 Marek Polacek <polacek@redhat.com>
5301 Jakub Jelinek <jakub@redhat.com>
5302
5303 PR sanitizer/58413
5304 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
5305 an expression if we can prove it is correct.
5306 (ubsan_instrument_division): Likewise. Remove unnecessary
5307 check.
5308
05f893e1 53092013-09-18 Marek Polacek <polacek@redhat.com>
5310
5311 PR sanitizer/58411
5312 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
5313 Declare it.
5314 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
5315
236ce1d1 53162013-09-14 Iain Sandoe <iain@codesourcery.com>
5317
5318 PR target/48094
5319 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
5320 fobjc-gc, freplace-objc-classes): Accept for LTO.
5321
f9f68d35 53222013-09-13 Jacek Caban <jacek@codeweavers.com>
5323
5324 * c-target.def: New hook
5325
ba2f764e 53262013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5327
5328 PR c++/43452
5329 * c.opt (Wdelete-incomplete): Add.
5330
73437615 53312013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5332
5333 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
5334 (vector_types_compatible_elements_p): New function.
5335 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
5336 declaration.
5337 (vector_types_compatible_elements_p): Declare.
5338
95af4c75 53392013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5340
5341 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
5342 a virtual member function.
5343 (pp_simple_type_specifier): Remove.
5344 (pp_c_type_specifier): Likewise.
5345 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
5346 Rename from pp_c_type_specifier. Adjust.
5347 (c_pretty_printer::c_pretty_printer): Do not assign to
5348 simple_type_specifier.
5349
eaab24b9 53502013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5351
5352 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
5353 member function.
5354 (c_pretty_printer::storage_class_specifier): Likewise.
5355 (c_pretty_printer::initializer): Likewise.
5356 (pp_declaration): Remove.
5357 (pp_declaration_specifiers): Likewise.
5358 (pp_abstract_declarator): Likewise.
5359 (pp_declarator): Likewise.
5360 (pp_type_id): Likewise.
5361 (pp_statement): Likewise.
5362 (pp_constant): Likewise.
5363 (pp_id_expression): Likewise.
5364 (pp_primary_expression): Likewise.
5365 (pp_unary_expression): Likewise.
5366 (pp_multiplicative_expression): Likewise.
5367 (pp_conditional_expression): Likewise.
5368 (pp_assignment_expression): Likewise.
5369 (pp_expression): Likewise.
5370 (pp_c_type_id): Likewise.
5371 (pp_c_storage_class_specifier): Likewise.
5372 * c-pretty-print.c (pp_c_type_cast): Tidy.
5373 (pp_c_pointer): Likewise.
5374 (pp_c_type_specifier): Likewise.
5375 (pp_c_parameter_type_list): Likewise.
5376 (pp_c_function_definition): Likewise.
5377 (pp_c_init_declarator): Likewise.
5378 (pp_c_initializer_list): Likewise.
5379 (pp_c_constructor_elts): Likewise.
5380 (c_pretty_printer::direct_abstract_declarator): Likewise.
5381 (c_pretty_printer::declaration_specifiers): Likewise.
5382 (c_pretty_printer::primary_expression): Likewise.
5383 (c_pretty_printer::postfix_expression): Likewise.
5384 (c_pretty_printer::type_id): Rename from pp_c_type_id.
5385 (c_pretty_printer::storage_class_specifier): Rename from
5386 pp_c_storage_class_specifier.
5387 (c_pretty_printer::initializer): Rename from pp_c_initializer.
5388 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
5389 storage_class_specifier, initializer, offset_list, flags.
5390
9e46467d 53912013-08-30 Marek Polacek <polacek@redhat.com>
5392
5393 * c-ubsan.c: New file.
5394 * c-ubsan.h: New file.
5395
36a8d9b9 53962013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
5397
5398 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
5399 member function.
5400 (c_pretty_printer::declaration_specifiers): Likewise.
5401 (c_pretty_printer::declarator): Likewise.
5402 (c_pretty_printer::abstract_declarator): Likewise.
5403 (c_pretty_printer::direct_abstract_declarator): Likewise.
5404 (c_pretty_printer::direct_declarator): Likewise.
5405 (c_pretty_printer::function_specifier): Likewise.
5406 (pp_declaration): Adjust.
5407 (pp_declaration_specifiers): Likewise.
5408 (pp_abstract_declarator): Likewise.
5409 (pp_direct_declarator): Likewise.
5410 (pp_function_specifier): Likewise.
5411 (pp_direct_abstract_declarator): Remove as unused.
5412 (pp_c_declaration): Remove.
5413 (pp_c_declaration_specifiers): Likewise.
5414 (pp_c_declarator): Likewise.
5415 (pp_c_direct_declarator): Likewise.
5416 (pp_c_function_specifier): Likewise.
5417 (pp_c_direct_abstract_declarator): Likewise.
5418 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
5419 from pp_c_abstract_declarator. Adjust.
5420 (c_pretty_printer::direct_abstract_declarator): Rename from
5421 pp_c_direct_abstract_declarator. Adjust.
5422 (c_pretty_printer::function_specifier): Rename from
5423 pp_c_function_specifier. Adjust.
5424 (c_pretty_printer::declaration_specifiers): Rename from
5425 pp_c_declaration_specifiers. Adjust.
5426 (c_pretty_printer::direct_declarator): Rename from
5427 pp_c_direct_declarator. Adjust.
5428 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
5429 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
5430 (c_pretty_printer::c_pretty_printer): Do not assign to
5431 declaration, declaration_specifiers, declarator,
5432 direct_declarator, direct_abstract_declarator, function_specifier.
5433
30635c2e 54342013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
5435
5436 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
5437 virtual member function.
5438 (c_pretty_printer::multiplicative_expression): Likewise.
5439 (c_pretty_printer::conditional_expression): Likewise.
5440 (c_pretty_printer::assignment_expression): Likewise.
5441 (c_pretty_printer::expression): Likewise.
5442 (pp_unary_expression): Adjust.
5443 (pp_multiplicative_expression): Likewise.
5444 (pp_assignment_expression): Likewise.
5445 (pp_conditional_expression): Likewise.
5446 (pp_expression): Likewise.
5447 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
5448 from pp_c_unary_expression. Adjust.
5449 (c_pretty_printer::multiplicative_expression): Rename from
5450 pp_c_multiplicative_expression. Adjust.
5451 (c_pretty_printer::conditional_expression): Rename from
5452 pp_c_conditional_expression. Adjust.
5453 (c_pretty_printer::assignment_expression): Rename from
5454 pp_c_assignment_expression. Adjust.
5455 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
5456 (c_pretty_printer::c_pretty_printer): Do not assign to
5457 unary_expression, multiplicative_expression,
5458 conditional_expression, expression.
5459
027d08ed 54602013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5461
5462 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
5463 virtual member function.
5464 (pp_postfix_expression): Adjust.
5465 (pp_c_postfix_expression): Remove.
5466 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
5467 from pp_c_postfix_expression. Adjust.
5468 (c_pretty_printer::c_pretty_printer): Do not assign to
5469 postfix_expression.
5470
f873303a 54712013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5472
5473 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
5474 virtua member function.
5475 (pp_primary_expression): Adjust.
5476 (pp_c_primary_expression): Remove.
5477 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
5478 from pp_c_primary_expression. Adjust.
5479 (pp_c_initializer_list): Use pp_primary_expression.
5480 (c_pretty_printer::c_pretty_printer): Do not assign to
5481 primary_expression.
5482
08e3e481 54832013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5484
5485 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
5486 * c-pretty-print.c (M_): Remove.
5487 (c_pretty_printer::translate_string): Define.
5488 (pp_c_type_specifier): Use it.
5489 (pp_c_primary_expression): Likewise.
5490 (pp_c_expression): Likewise.
5491
1fc4a87f 54922013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5493
5494 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
5495 virtual function.
5496 (pp_c_id_expression): Remove.
5497 (pp_id_expression): Adjust.
5498 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
5499 pp_c_id_expression. Adjust.
5500 (pp_c_postfix_expression): Use pp_id_expression.
5501 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
5502
a6cb161b 55032013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5504
5505 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
5506 member function.
5507 (pp_constant): Adjust.
5508 (pp_c_constant): Remove.
5509 * c-pretty-print.c (c_pretty_printer::constant): Rename from
5510 pp_c_constant. Adjust.
5511 (pp_c_constant)
5512 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
5513 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
5514
eed6bc21 55152013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5516
5517 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
5518 (c_pretty_printer::c_pretty_printer): Declare.
5519 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
5520 c_pretty_printer_init. Adjust.
5521 (print_c_tree): Do not call c_pretty_printer_init.
5522 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
5523
df558d2e 55242013-08-09 Arnaud Charlet <charlet@adacore.com>
5525
5526 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
5527
42f9a786 55282013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
5529
5530 PR c++/58080
5531 * c-common.c (pointer_int_sum): Add bool parameter.
5532 * c-common.h (pointer_int_sum): Adjust declaration.
5533
f874ddad 55342013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
5535
5536 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
5537 c_pretty_printer variable.
5538
a94db6b0 55392013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5540
5541 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
5542 (pp_base): Remove.
5543 (pp_c_base): Likewise. Adjust users.
5544 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
5545 (pp_c_whitespace): Do not call pp_base.
5546 (pp_c_left_paren): Likewise.
5547 (pp_c_right_paren): Likewise.
5548 (pp_c_left_brace): Likewise.
5549 (pp_c_right_brace): Likewise.
5550 (pp_c_left_bracket): Likewise.
5551 (pp_c_right_bracket): Likewise.
5552 (pp_c_dot): Likewise.
5553 (pp_c_ampersand): Likewise.
5554 (pp_c_star): Likewise.
5555 (pp_c_arrow): Likewise.
5556 (pp_c_semicolon): Likewise.
5557 (pp_c_complement): Likewise.
5558 (pp_c_exclamation): Likewise.
5559 (pp_c_direct_declarator): Likewise.
5560 (pp_c_ws_string): Likewise.
5561 (pp_c_identifier): Likewise.
5562 (pp_c_statement): Likewise.
5563 (print_c_tree): Likewise.
5564
1898176c 55652013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
5566
5567 PR c++/58072
5568 * c-common.c (c_parse_error): Catch user-defined literal tokens and
5569 provide useful error strings.
5570
70d60d1d 55712013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5572
5573 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
5574 printer functions instead of pp_string or operators and punctuators.
5575 (dump_generic_ada_node): Likewise.
5576 * c-pretty-print.c (pp_c_type_specifier): Likewise.
5577 (pp_c_relational_expression): Likewise.
5578 (pp_c_logical_or_expression): Likewise.
5579
dda4f0ec 55802013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5581
5582 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
5583 functions instead of pp_character.
5584 (pp_ada_tree_identifier): Likewise.
5585 (dump_ada_double_name): Likewise.
5586 (dump_ada_function_declaration): Likewise.
5587 (dump_ada_array_domains): Likewise.
5588 (dump_template_types): Likewise.
5589 (dump_generic_ada_node): Likewise.
5590 (print_ada_declaration): Likewise.
5591 (print_ada_struct_decl): Likewise.
5592 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5593
7aa04c8d 55942013-07-23 Tom Tromey <tromey@redhat.com>
5595
5596 * c-common.h (enum rid) <RID_GENERIC>: New constant.
5597 * c-common.c (c_common_reswords): Add _Generic.
5598
a04e8d62 55992013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
5600
5601 * c-common.c: Fix typos.
5602 * c-common.h: Likewise.
5603
a96c3cc1 56042013-07-13 Lubos Lunak <l.lunak@suse.cz>
5605
5606 PR c++/55203
5607 * c-common.c (c_common_attribute_table): Add warn_unused.
5608 (handle_warn_unused_attribute): New.
5609
da31536d 56102013-07-10 Jakub Jelinek <jakub@redhat.com>
5611
5612 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
5613 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
5614
839f2f70 56152013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
5616
5617 PR c++/57869
5618 * c.opt: Add Wconditionally-supported.
5619
73f353d0 56202013-07-08 Graham Stott <graham.stott@btinternet.com>
5621
1f78217c 5622 * array-notation-common.c (length_mismatch_in_expr_p): Delete
73f353d0 5623 unused variables l_length and l_node.
5624
21ebaa24 56252013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 5626
5627 PR c/57821
5628 * c-common.c (complete_array_type): Delay folding first index
5629 like other indices. When folding, check for index overflow.
5630
68ea4406 56312013-06-27 Marc Glisse <marc.glisse@inria.fr>
5632
5633 PR c++/57509
5634 * c-common.h (c_build_vec_perm_expr): New complain argument.
5635 * c-common.c (c_build_vec_perm_expr): Likewise.
5636 Use save_expr also in C++.
5637
60777f69 56382013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5639
5640 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
5641 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5642 * c-opts.c (c_common_post_options): Likewise.
5643
839f2f70 56442013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
50acebe0 5645
5646 * array-notation-common.c (length_mismatch_in_expr): Changed the
5647 parameter type's from a dynamic array to a vec_tree. Also removed
5648 the size parameters.
5649 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
5650 the change above.
5651
e9331eab 56522013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5653
5654 * c-common.h (struct cilkplus_an_parts): New structure.
5655 (struct cilkplus_an_loop_parts): Likewise.
5656 (cilkplus_extract_an_triplets): New prototype.
5657 (fix_sec_implicit_args): Likewise.
5658 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
5659 (fix_sec_implicit_args): Likewise.
60777f69 5660
a9c99fc4 56612013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
5662
5663 * array-notation-common.c (find_inv_trees): Removed an unwanted
5664 typecasting.
5665 * c-common.h (struct inv_list::additional_tcodes): Changed type from
5666 enum rid to enum tree_code.
5667
f2526cce 56682013-06-11 Jan Hubicka <jh@suse.cz>
5669
5670 * c-common.c (handle_alias_ifunc_attribute): Do not set
5671 DECL_EXTERNAL for weakref variables.
5672 * c-pragma.c (handle_pragma_weak): Make sure aliases
5673 are not declared as external.
5674
09970d67 56752013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5676
5677 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
5678 function from c/c-array-notation.c.
5679 (is_cilkplus_reduce_builtin): Likewise.
5680 (find_rank): Likewise.
5681 (extract_array_notation_exprs): Likewise.
5682 (replace_array_notations): Likewise.
5683 (find_inv_trees): Likewise.
5684 (replace_inv_trees): Likewise.
5685 (contains_array_notation_expr): Likewise.
5686 (find_correct_array_notation_type): Likewise.
5687 * c-common.h (struct inv_list): Moved this struct from the file
5688 c/c-array-notation.c and added a new field called additional tcodes.
5689 (length_mismatch_in_expr_p): New prototype.
5690 (is_cilkplus_reduce_builtin): Likewise.
5691 (find_rank): Likewise.
5692 (extract_array_notation_exprs): Likewise.
5693 (replace_array_notation): Likewise.
5694 (find_inv_trees): Likewise.
5695 (replace_inv_trees): Likewise.
5696 (find_correct_array_notation_type): Likewise.
839f2f70 5697
3c6d4197 56982013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5699
5700 * c-common.c (c_define_builtins): When cilkplus is enabled, the
5701 function array_notation_init_builtins is called.
5702 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
5703 * c-common.def (ARRAY_NOTATION_REF): New tree.
5704 * c-common.h (build_array_notation_expr): New function declaration.
5705 (build_array_notation_ref): Likewise.
5706 (extract_sec_implicit_index_arg): New extern declaration.
5707 (is_sec_implicit_index_fn): Likewise.
5708 (ARRAY_NOTATION_CHECK): New define.
5709 (ARRAY_NOTATION_ARRAY): Likewise.
5710 (ARRAY_NOTATION_START): Likewise.
5711 (ARRAY_NOTATION_LENGTH): Likewise.
5712 (ARRAY_NOTATION_STRIDE): Likewise.
5713 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
5714 ARRAY_NOTATION_REF.
5715 (pp_c_expression): Likewise.
5716 * c.opt (flag_enable_cilkplus): New flag.
5717 * array-notation-common.c: New file.
5718
8e71dad2 57192013-05-14 Jakub Jelinek <jakub@redhat.com>
5720
5721 PR c++/57274
5722 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
5723
432dd330 57242013-05-10 Marc Glisse <marc.glisse@inria.fr>
5725
5726 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
5727 vectors.
5728
b156ec37 57292013-05-07 Han Shen <shenhan@google.com>
5730
5731 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
5732
1a087624 57332013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
5734
5735 * c-common.c (check_user_alignment): Emit error for negative values.
5736
1638c736 57372013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5738
5739 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
5740
949dbf93 57412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5742
5743 * c-cppbuiltin.c (c_cpp_builtins): Do not define
5744 __GXX_EXPERIMENTAL_CXX1Y__.
5745
9205a6cc 57462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
a49621cf 5747 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9205a6cc 5748
5749 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
5750 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
5751 to simply use OPT_Wpointer_arith.
5752 (c_sizeof_or_alignof_type): Likewise.
5753
05d0bce1 57542013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5755
5756 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
5757
41609f8b 57582013-04-12 Jakub Jelinek <jakub@redhat.com>
5759
5760 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
5761 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
5762 specifiers.
5763
c671dc4f 57642013-04-07 Steven Bosscher <steven@gcc.gnu.org>
5765
5766 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
5767
ba125576 57682013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
5769
5770 * c-common.c (pointer_int_sum): Remove dead code.
5771
9d3fa937 57722013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
5773
5774 PR middle-end/56524
5775 * c-common.c (handle_optimize_attribute): Don't call
5776 save_optabs_if_changed.
5777
5ceebb21 57782013-03-05 Jakub Jelinek <jakub@redhat.com>
5779
5780 PR middle-end/56461
5781 * c-pch.c (pch_init): Free target_validity at the end.
5782
18eeed2b 57832013-03-04 Jakub Jelinek <jakub@redhat.com>
5784
5785 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
5786
a9196da9 57872013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
5788 Jakub Jelinek <jakub@redhat.com>
5789
5790 PR sanitizer/56454
5791 * c-common.c (handle_no_sanitize_address_attribute): New function.
5792 (c_common_attribute_table): Add no_sanitize_address attribute.
5793 (handle_no_address_safety_analysis_attribute): Add
5794 no_sanitize_address attribute, not no_address_safety_analysis
5795 attribute.
5796
15c27dda 57972013-02-18 Aldy Hernandez <aldyh@redhat.com>
08c7d04b 5798
5799 PR target/52555
5800 * c-common.c (handle_optimize_attribute): Call
5801 save_optabs_if_changed.
5802
19426fe1 58032013-02-18 Jakub Jelinek <jakub@redhat.com>
5804 Steven Bosscher <steven@gcc.gnu.org>
5805
5806 PR pch/54117
5807 * c-opts.c (c_common_post_options): If debug info is enabled
5808 and non-dwarf*, refuse to load PCH files and when writing PCH
5809 file warn.
5810
df936998 58112013-02-05 Jakub Jelinek <jakub@redhat.com>
5812
5813 PR middle-end/56167
5814 * c-common.c (handle_error_attribute): Fix condition.
5815
ae0c3984 58162013-01-30 Jakub Jelinek <jakub@redhat.com>
5817
5818 PR c++/55742
5819 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
5820
1c4973d7 58212013-01-18 Jason Merrill <jason@redhat.com>
5822
5823 PR target/54908
5824 * c.opt (-fextern-tls-init): New.
5825 * c-opts.c (c_common_post_options): Handle it.
5826
7c834436 58272013-01-09 Jakub Jelinek <jakub@redhat.com>
5828
5829 PR c/48418
5830 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
5831 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
5832 and is either negative or bigger or equal to type precision
5833 of the first operand.
5834
5abaa10a 58352012-12-03 Marek Polacek <polacek@redhat.com>
5836
5837 PR c/55570
5838 * c-common.c (check_user_alignment): Swap order of tests,
5839 check TREE_CODE first.
5840
324ca377 58412012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
5842
5843 PR c++/52654
5844 * c-common.h (overflow_type): New enum.
5845 (build_userdef_literal): Add overflow_type argument.
5846 (tree_userdef_literal): Add overflow_type.
5847 (USERDEF_LITERAL_OVERFLOW): New access macro.
5848 * c-common.c (build_userdef_literal): Add overflow_type
5849 argument.
5850 * c-lex.c (c_lex_with_flags): Add overflow_type to
5851 build_userdef_literal calls.
5852 (interpret_integer, interpret_float): Add overflow_type argument.
5853
b4c4a429 58542012-11-28 Richard Biener <rguenther@suse.de>
5855
5856 PR c/35634
5857 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5858 here and use a type with proper overflow behavior for types that would
5859 need to be promoted for the arithmetic.
5860
d413ffdd 58612012-11-23 Jakub Jelinek <jakub@redhat.com>
5862
5863 PR sanitizer/55435
5864 * c-common.c (handle_no_address_safety_analysis_attribute): New
5865 function.
5866 (c_common_attribute_table): Add no_address_safety_analysis.
5867
52bc861d 58682012-11-16 Simon Baldwin <simonb@google.com>
5869
5870 * c.opt: Add f[no-]canonical-system-headers.
5871 * c-opts.c (c_common_handle_option): Handle
5872 OPT_fcanonical_system_headers.
5873
2dd00636 58742012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
5875
5876 PR c++/54413
5877 * c-opts.c (c_common_handle_option): Set new flags.
5878 * c.opt: Describe new flags.
5879
d4701f6c 58802012-11-09 Jason Merrill <jason@redhat.com>
5881
5882 * c.opt (Wabi-tag): New.
5883
72d65da9 58842012-11-09 Andi Kleen <ak@linux.intel.com>
5885
5886 PR 55139
5887 * c-common.c (get_atomic_generic_size): Mask with
a49621cf 5888 MEMMODEL_MASK
72d65da9 5889
77a357e3 58902012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5891
5892 PR c/53063
5893 * c.opt (Wformat): Make it Alias Wformat=1.
5894 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
5895 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
5896 LangEnabledBy.
5897 (Wformat=): RejectNegative. Use LangEnabledBy.
5898 (Wnonnull): Use LangEnabledBy.
5899 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
5900 * c-format.c (set_Wformat): Delete.
5901 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
a49621cf 5902 (maybe_read_dollar_number): Likewise.
5903 (avoid_dollar_number): Likewise.
5904 (finish_dollar_format_checking): Likewise.
5905 (check_format_info): Likewise.
5906 (check_format_info_main): Likewise.
5907 (check_format_types): Likewise.
5908 (format_type_warning): Likewise.
5909 * c-common.c (int): Likewise.
5910 (check_function_sentinel): Likewise.
5911 * c-common.h (warn_format,set_Wformat): Do not declare here.
77a357e3 5912
45efa6b9 59132012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5914
5915 PR c/53063
5916 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
5917 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
5918 Use LangEnabledBy.
5919 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
5920 common.opt.
5921 (Wvariadic-macros): Init(1).
5922 * c-opts.c (c_common_handle_option): Do not handle them
5923 explicitly.
5924 (c_common_post_options): Likewise.
5925 (sanitize_cpp_opts): warn_unused_macros is now
5926 cpp_warn_unused_macros.
5927 (push_command_line_include): Likewise.
5928 * c-common.c (warn_unknown_pragmas): Do not define.
5929 * c-common.h (warn_unknown_pragmas): Do not declare.
5930
0e4e775a 59312012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
5932
5933 PR c/51294
5934 * c-common.c (conversion_warning): Handle conditional expressions.
5935
8b447d3f 59362012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
5937
5938 PR c++/54930
5939 * c.opt (Wreturn_local_addr): Define new option.
5940
f4a61754 59412012-10-25 Jason Merrill <jason@redhat.com>
5942
ecb10e6a 5943 * c.opt (Wvirtual-move-assign): New.
5944
f4a61754 5945 * c.opt (Winherited-variadic-ctor): New.
5946
7b463b19 59472012-10-25 Marc Glisse <marc.glisse@inria.fr>
5948
5949 PR c++/54427
5950 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
5951
6adc88f8 59522012-10-23 Joseph Myers <joseph@codesourcery.com>
5953
5954 * c-common.h (pch_cpp_save_state): Declare.
5955 * c-target.def (c_preinclude): New hook.
5956 * c-opts.c (done_preinclude): New.
5957 (push_command_line_include): Handle default preincluded header.
5958 (cb_file_change): Call pch_cpp_save_state when calling
5959 push_command_line_include.
5960 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
5961 (pch_cpp_save_state): New.
5962 (pch_init): Call pch_cpp_save_state conditionally, instead of
5963 calling cpp_save_state.
5964
fa816b0b 59652012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5966
5967 PR c/53063
5968 PR c/40989
5969 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
5970 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
5971 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
5972 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
5973 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
5974 * c-opts.c (c_common_handle_option): Remove explicit handling from
5975 here.
5976 (c_common_post_options): Likewise.
5977
d214ccee 59782012-10-18 Eric Botcazou <ebotcazou@adacore.com>
5979
5980 * c-ada-spec.c (LOCATION_COL): Delete.
5981 (compare_location): New function.
5982 (compare_node): Use it.
5983 (compare_comment): Likewise.
5984
77b27208 59852012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
5986
5987 PR c/53063
5988 PR c/40989
5989 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
5990 * c-opts.c (c_common_handle_option): Do not set them here. Add
5991 comment.
5992 (c_common_post_options): Likewise.
5993
cc02ca4d 59942012-10-16 Eric Botcazou <ebotcazou@adacore.com>
5995
5996 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
5997 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
5998 Remove POINTER_TYPE handling, add large unsigned handling and use
5999 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
6000
57f872a2 60012012-10-12 Jakub Jelinek <jakub@redhat.com>
6002
6003 PR c/54381
6004 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
6005 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
6006 locs and array of 3 trees instead of just single loc and single
6007 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
6008 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
6009 For *cmp* builtins that take two sources strings report warnings
6010 about first and second source, not about destination and source.
6011
7354ad2e 60122012-10-12 Marc Glisse <marc.glisse@inria.fr>
6013
6014 PR c++/53055
6015 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
6016
1ac7f120 60172012-10-11 Eric Botcazou <ebotcazou@adacore.com>
6018
6019 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
6020 declaring something coming from another file.
6021
1e0cc9e3 60222012-10-10 Arnaud Charlet <charlet@adacore.com>
6023
1ac7f120 6024 PR ada/54845
1e0cc9e3 6025 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
6026
b0e7825e 60272012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6028
6029 PR c++/54194
6030 * c-common.c (warn_about_parentheses): Add location_t parameter;
6031 use EXPR_LOC_OR_LOC.
6032 * c-common.h: Update declaration.
6033
41ed701a 60342012-10-09 Marc Glisse <marc.glisse@inria.fr>
6035
6036 PR c++/54427
6037 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
6038 more operations. Make error messages optional.
6039 * c-common.h (enum stv_conv): Moved from c-typeck.c.
6040 (scalar_to_vector): Declare.
6041
3740094c 60422012-10-08 Jason Merrill <jason@redhat.com>
6043
6044 * c-common.c (c_common_reswords): Add thread_local.
6045
ffcdbf9c 60462012-10-08 Dodji Seketeli <dodji@redhat.com>
6047
6048 PR c++/53528 C++11 attribute support
6049 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
6050 new functions.
6051 * c-common.c (check_cxx_fundamental_alignment_constraints): New
6052 static function.
6053 (handle_aligned_attribute): In choose strictest alignment
6054 among many. Use new check_cxx_fundamental_alignment_constraints.
6055 (handle_transparent_union_attribute): In c++11 attribute syntax,
6056 don't look through typedefs.
6057
ef34afc1 60582012-10-04 Arnaud Charlet <charlet@adacore.com>
6059
6060 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
6061 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
6062 out of dumpfile.h.
6063
f1ff4562 60642012-09-25 Dehao Chen <dehao@google.com>
6065
6066 PR middle-end/54645
ef34afc1 6067 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
f1ff4562 6068 map when read in the pch.
6069
92a44a68 60702012-09-18 Arnaud Charlet <charlet@adacore.com>
735538a1 6071
6072 * c-ada-spec.c: Style fixes.
6073
92a44a68 60742012-09-18 Thomas Quinot <quinot@adacore.com>
9120cdc8 6075
6076 * c.opt (-fada-spec-parent): Define new command line switch.
6077 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
6078 is specified, generate binding spec as a child of the specified unit.
6079
8eba82c2 60802012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
6081 Manuel López-Ibáñez <manu@gcc.gnu.org>
6082
6083 PR c++/53210
6084 * c.opt ([Winit-self]): Enabled by -Wall in C++.
6085
38682990 60862012-08-23 Arnaud Charlet <charlet@adacore.com>
6087
6088 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
6089 for pointers, and add missing Convention C pragma.
6090 (print_ada_struct_decl): Add missing aliased keyword.
6091 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
6092
f003f5dc 60932012-08-17 Jakub Jelinek <jakub@redhat.com>
6094
6095 * c-common.c (sizeof_pointer_memaccess_warning): New function.
6096 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
6097 * c-opts.c (c_common_handle_option): Enable it for -Wall.
6098 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
6099 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
6100
ec11736b 61012012-08-10 Richard Guenther <rguenther@suse.de>
6102
6103 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
6104
5f7f600e 61052012-08-07 Steven Bosscher <steven@gcc.gnu.org>
6106
6107 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
6108 instead of separate pp_newline and pp_flush.
6109 (print_c_tree): Likewise.
6110
758a38ab 61112012-07-26 Richard Henderson <rth@redhat.com>
6112
6113 * c-common.c (handle_hot_attribute): Allow labels.
6114 (handle_cold_attribute): Likewise.
6115
9ca77b08 61162012-07-20 Jakub Jelinek <jakub@redhat.com>
6117
6118 PR c++/28656
6119 * c-common.c (check_function_nonnull): Handle multiple nonnull
6120 attributes properly.
6121
b9ed1410 61222012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6123
6124 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
6125 * c-ada-spec.c: Likewise.
6126 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
6127
c2a65b90 61282012-07-14 Steven Bosscher <steven@gcc.gnu.org>
6129
6130 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
6131 Remove code conditional on it.
6132
88c5a1d1 61332012-07-11 Steven Bosscher <steven@gcc.gnu.org>
6134
6135 * c-gimplify.c: Do not include basic-block.h.
6136 * c-common.c: Do not include linfuncs.h.
6137
4a020a8c 61382012-07-08 Steven Bosscher <steven@gcc.gnu.org>
6139
6140 * c-common.h: Include tree.h.
6141
c28ddc97 61422012-07-02 Jason Merrill <jason@redhat.com>
6143
6144 PR c++/53524
6145 * c-common.c (get_priority): Call default_conversion.
6146
405ed67f 61472012-07-01 Uros Bizjak <ubizjak@gmail.com>
6148
6149 * c-pch.c (c_common_write_pch): Remove unused variables.
6150
e53d55e7 61512012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6152
6153 * cppspec.c: Moved from gcc/ to here.
6154
3d9c25ec 61552012-06-27 Kai Tietz <ktietz@redhat.com>
6156
6157 PR preprocessor/37215
6158 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
6159
3169c57a 61602012-06-21 Steven Bosscher <steven@gcc.gnu.org>
6161
6162 * c-common.h (c_common_print_pch_checksum): Remove.
6163 * c-pch.c: Do not include output.h.
6164 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
6165 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
6166 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
6167 (struct c_pch_header): Remove.
6168 (get_ident): Update gpch version.
6169 (pch_init): Do not print executable_checksum to asm_out_file.
6170 Do not fail if there is no asm_out_file to read back from. Set
6171 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
6172 (c_common_write_pch): Verify that nothing was written to asm_out_file
6173 since pch_init was called. Do not write a c_pch_header, and do not
6174 copy from asm_out_file to the PCH.
6175 (c_common_read_pch): Do not read a c_pch_header, and do not restore
6176 the content of asm_out_file from the PCH.
6177 (c_common_print_pch_checksum): Remove.
6178 * c-opts.c (c_common_init): Print out executable_checksum directly.
6179
ff6624bc 61802012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6181
6182 * c-target.def (objc_declare_unresolved_class_reference,
6183 objc_declare_class_definition): Add new hooks.
6184
367b1459 61852012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6186
6187 * c-lex.c: Do not include output.h.
6188 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
6189 Remove uses of ASM_OUTPUT_IDENT.
6190
bf0cb017 61912012-06-15 Marc Glisse <marc.glisse@inria.fr>
6192
6193 PR c++/51033
6194 * c-common.h (c_build_vec_perm_expr): Move decl here.
6195 * c-common.c (c_build_vec_perm_expr): Move definition
6196 here.
6197
b37a3600 61982012-06-06 Steven Bosscher <steven@gcc.gnu.org>
6199
6200 * c.opt (fconserve-space): Turn into a no-op.
6201
19931eea 62022012-06-04 Sterling Augustine <saugustine@google.com>
5f9e7dd5 6203
6204 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
6205 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
6206 both the start and end of the function.
6207
dff12c10 62082012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6209
6210 * c-common.c: Do not include output.h.
6211 * c-pragma.c: Likewise.
6212
5f9e7dd5 62132012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6214
6215 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
6216 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
6217 (lang_decl_name): Handle namespace decls.
6218
b5369b7d 62192012-05-31 Steven Bosscher <steven@gcc.gnu.org>
6220
6221 * c-ada-spec.c: Do not include output.h.
6222 * c-semantics.c: Likewise.
6223
8032877c 62242012-05-29 Joseph Myers <joseph@codesourcery.com>
6225
6226 * c-common.c: Fix typo.
6227
7843e4bc 62282012-05-29 Michael Matz <matz@suse.de>
6229
6230 * c-common.h (c_expand_decl): Remove prototype.
6231
8cf857d4 62322012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6233
6234 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
6235 * c-opts.c (c_common_handle_option): Remove code handling
6236 warn_missing_braces.
6237
8b64dc3c 62382012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
6239
6240 PR c++/25137
6241 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
6242 -Wmissing_braces.
6243
43cbde16 62442012-05-22 Dodji Seketeli <dodji@redhat.com>
6245
6246 PR c++/53322
6247 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
6248
db490cb6 62492012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
6250
6251 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
6252 * c-opts.c (c_common_handle_option): Do not handle explicitly
6253 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
6254
a60f3e81 62552012-05-16 Dodji Seketeli <dodji@redhat.com>
6256
6257 PR preprocessor/7263
6258 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
6259 to cpp_classify_number. For diagnostics, use the precise location
6260 instead of the global input_location.
6261
82e6ef7c 62622012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
6263
cd4797ff 6264 PR c++/11856
82e6ef7c 6265 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
6266
258a168d 62672012-05-14 Bernd Schmidt <bernds@codesourcery.com>
6268
82e6ef7c 6269 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
258a168d 6270
d3b7ee7c 62712012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
6272
6273 PR 53063
6274 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
6275 Wreorder): Use LangEnabledBy.
6276 * c-opts.c (c_common_handle_option): Do not enable them
6277 explicitly. Call lang-specific generated functions.
6278 (c_common_post_options): Do not set them here.
6279
70059cea 62802012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
6281
6282 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
6283 Wmissing-field-initializers,Wmissing-parameter-type,
6284 Wold-style-declaration,Woverride-init): Use EnabledBy.
6285 * c-opts.c (c_common_post_options): Do not set here explicitly.
6286
fbb6fbd8 62872012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
6288
6289 PR 53063
6290 * c-opts.c (c_common_handle_option): Use handle_generated_option
6291 to enable sub-options.
6292
61f69bc9 62932012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
6294
6295 PR c++/53158
6296 * c-common.c (warnings_for_convert_and_check): Use warning_at.
6297
5a1fe2db 62982012-05-10 Richard Guenther <rguenther@suse.de>
6299
6300 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
6301 adjust commentary about TYPE_IS_SIZETYPE types.
6302
d42e7c5a 63032012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6304
6305 PR c++/53261
6306 * c-common.c (warn_logical_operator): Check that argument of
6307 integer_zerop is not NULL.
6308
686369e8 63092012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
6310
6311 PR c/43772
6312 * c-common.c (warn_logical_operator): Do not warn if either side
6313 is already true or false.
6314
03fe1dc2 63152012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6316
6317 PR c/51712
6318 * c-common.c (expr_original_type): New.
6319 (shorten_compare): Do not warn for enumeration types.
6320
bba5a206 63212012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
6322
6323 * c.opt (fpermissive): Add Var(flag_permissive).
6324
7059d45d 63252012-04-30 Marc Glisse <marc.glisse@inria.fr>
6326
6327 PR c++/51033
6328 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
6329 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
6330
7edb1062 63312012-04-30 Dodji Seketeli <dodji@redhat.com>
6332
6333 Add -Wvarargs option
6334 * c.opt (Wvarargs): Define new option.
6335
068bea1e 63362012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6337
6338 * c-common.c (check_function_arguments): Replace
6339 Wmissing-format-attribute with Wsuggest-attribute=format.
6340
b86527d8 63412012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6342
6343 * c.opt (Wsuggest-attribute=format): New. Alias of
6344 Wmissing-format-attribute.
6345 * c-format.c (decode_format_type): Replace
6346 Wmissing-format-attribute with Wsuggest-attribute=format.
6347 (check_function_format): Likewise.
6348
19931eea 63492012-04-27 Ollie Wild <aaw@google.com>
76d340ac 6350
6351 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
6352 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
6353 * c.opt: Add Wliteral-suffix.
6354
29438999 63552012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6356
6357 PR c/44774
6358 * c.opt (Wpedantic): New.
6359 (pedantic): Alias Wpedantic.
6360 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
6361 (c_common_post_options): Likewise.
6362 (sanitize_cpp_opts): Likewise.
6363 * c-lex.c (interpret_float): Likewise.
6364 * c-format.c (check_format_types): Likewise.
6365 * c-common.c (pointer_int_sum): Likewise.
6366 (c_sizeof_or_alignof_type): Likewise.
6367 (c_add_case_label): Likewise.
6368 (c_do_switch_warnings): Likewise.
6369 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6370
4f9d6b8b 63712012-04-15 Jason Merrill <jason@redhat.com>
6372
6373 PR c++/52818
6374 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
6375 (C_STD_NAME): Distinguish between C++98 and C++11.
6376
74bdbe96 63772012-04-11 Eric Botcazou <ebotcazou@adacore.com>
6378
6379 PR target/52624
6380 * c-common.h (uint16_type_node): Rename into...
6381 (c_uint16_type_node): ...this.
6382 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
6383 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
6384
3d177e8c 63852012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
6386
6387 * c-common.c (warn_if_unused_value): Move definition to here.
6388 * c-common.h (warn_if_unused_value): Move declaration to here.
6389
6a9a958f 63902012-03-23 William Bader <williambader@hotmail.com>
6391
6392 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
6393
543efdbe 63942012-03-20 Jason Merrill <jason@redhat.com>
6395
6396 * c-common.h (enum cxx_dialect): Add cxx1y.
6397 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
6398 test.
6399 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6400 * c-opts.c (c_common_post_options): Likewise.
6401 (set_std_cxx1y): New.
6402 (c_common_handle_option): Call it.
6403 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
6404
62206d34 64052012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
6406
6407 PR c++/14710
6408 * c.opt ([Wuseless-cast]): Add.
6409
fadf62f4 64102012-03-16 Richard Guenther <rguenther@suse.de>
6411
6412 * c-pretty-print.c (pp_c_initializer_list): Adjust.
6413
249faa35 64142012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6415
6416 PR c++/44783
6417 * c.opt (ftemplate-backtrace-limit) Add.
6418
126b6848 64192012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6420
6421 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
6422 handling.
6423 * c-pragma.c (handle_pragma_extern_prefix): Remove.
6424 (init_pragma): Don't register extern_prefix.
6425
a51edb4c 64262012-03-12 Richard Guenther <rguenther@suse.de>
6427
6428 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
6429 (builtin_type_for_size): Likewise.
6430
0f6a7cb7 64312012-02-13 Jakub Jelinek <jakub@redhat.com>
6432
6433 PR c++/52215
6434 * c-common.c (sync_resolve_params): Don't decide whether to convert
6435 or not based on TYPE_SIZE comparison, convert whenever arg_type
6436 is unsigned INTEGER_TYPE.
6437
0779e32c 64382012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
6439
6440 PR c/52118
6441 * c.opt ([Wunused-local-typedefs]): Fix description.
6442
baec58e1 64432012-01-24 Mike Stump <mikestump@comcast.net>
6444
6445 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
6446 exactly.
6447
c779d8cc 64482012-01-18 Richard Guenther <rguenther@suse.de>
6449
6450 * c-opts.c (c_common_post_options): Reset LTO flags if
6451 we are about to generate a PCH.
6452
ee917d24 64532012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
6454
6455 PR c++/51777
6456 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
6457 use pp_unsigned_wide_integer.
6458
90e2341f 64592012-01-10 Richard Guenther <rguenther@suse.de>
6460
6461 PR middle-end/51806
6462 * c-opts.c (c_common_handle_option): Move -Werror handling
6463 to language independent code.
6464
9ea022ce 64652012-01-05 Richard Guenther <rguenther@suse.de>
6466
6467 PR middle-end/51764
6468 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
6469 from common.opt.
6470
3df19e1b 64712011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
6472
6473 PR c++/51316
6474 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
6475 of array types with an unknown bound.
6476
32074525 64772011-12-20 Joseph Myers <joseph@codesourcery.com>
6478
6479 * c-common.c (flag_isoc99): Update comment to refer to C11.
6480 (flag_isoc1x): Change to flag_isoc11.
6481 * c-common.h (flag_isoc99): Update comment to refer to C11.
6482 (flag_isoc1x): Change to flag_isoc11.
6483 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
6484 C11.
6485 * c-opts.c (set_std_c1x): Change to set_std_c11.
6486 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
6487 Call set_std_c11.
6488 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
6489 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
6490 * c.opt (std=c1x): Change to std=c11. Document as non-draft
6491 standard.
6492 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
6493 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
6494 (std=gnu1x): Make alias of std=gnu11.
6495
fca86134 64962011-12-19 Jason Merrill <jason@redhat.com>
6497
6498 PR c++/51228
6499 * c-common.c (handle_transparent_union_attribute): Check the first
6500 field if the type is complete.
6501
aa4313eb 65022011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
6503
6504 PR libstdc++/51365
6505 * c-common.c (RID_IS_FINAL): Add.
6506 * c-common.h (RID_IS_FINAL): Add.
6507
3f3d5ad4 65082011-11-30 Iain Sandoe <iains@gcc.gnu.org>
6509
6510 * c.opt (fgnu-runtime): Provide full description.
6511 (fnext-runtime): Likewise.
6512 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
6513
c4606d19 65142011-11-28 Andrew MacLeod <amacleod@redhat.com>
6515
6516 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
6517 predefines in one place. Add LOCK_FREE predefines.
6518 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
6519 new func.
6520
1d581089 65212011-11-24 Andrew MacLeod <amacleod@redhat.com>
6522
6523 PR c/51256
19931eea 6524 * c-common.c (get_atomic_generic_size): Check for various error
1d581089 6525 conditions
19931eea 6526 (resolve_overloaded_atomic_exchange,
6527 resolve_overloaded_atomic_compare_exchange,
1d581089 6528 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
6529 error_mark_node for error conditions.
19931eea 6530
6aa221fa 65312011-11-08 Richard Guenther <rguenther@suse.de>
6532
6533 PR middle-end/51010
6534 c-family/
6535
4c0315d0 65362011-11-07 Richard Henderson <rth@redhat.com>
6537 Aldy Hernandez <aldyh@redhat.com>
6538 Torvald Riegel <triegel@redhat.com>
6539
6540 Merged from transactional-memory.
6541
6542 * c-common.c (handle_tm_wrap_attribute,
6543 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
6544 (struct c_common_reswords): Added __transaction* keywords.
6545 (struct c_common_attribute_table): Added transaction* and tm_regparm
6546 attributes.
6547 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
6548 masks.
6549 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
6550 find_tm_attribute): Declare.
6551
920f5a70 65522011-11-07 Jason Merrill <jason@redhat.com>
6553
6554 PR c++/35688
6555 * c-common.c, c-common.h: Revert yesterday's changes.
6556
b4f861b4 65572011-11-06 Jason Merrill <jason@redhat.com>
6558
6559 PR c++/35688
6560 * c-common.c (decl_has_visibility_attr): Split out from...
6561 (c_determine_visibility): ...here.
6562 * c-common.h: Declare it.
6563
83e25171 65642011-11-06 Joseph Myers <joseph@codesourcery.com>
6565
6566 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
6567 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
6568 type.
6569 (check_user_alignment): New. Split out of
6570 handle_aligned_attribute. Disallow integer constants with
6571 noninteger types. Conditionally allow zero.
6572 (handle_aligned_attribute): Use check_user_alignment.
6573 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
6574
1cd6e20d 65752011-11-06 Andrew MacLeod <amacleod@redhat.com>
6576 Richard Henderson <rth@redhat.com>
6577
6578 Merged from cxx-mem-model.
6579
6580 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
19931eea 6581 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
1cd6e20d 6582 parameters that are the same type size.
6583 (get_atomic_generic_size): New. Find size of generic
6584 atomic function parameters and do typechecking.
6585 (add_atomic_size_parameter): New. Insert size into parameter list.
6586 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
6587 either __atomic_exchange_n or external library call.
19931eea 6588 (resolve_overloaded_atomic_compare_exchange): Restructure
1cd6e20d 6589 __atomic_compare_exchange to either _n variant or external library call.
19931eea 6590 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
1cd6e20d 6591 __atomic_load_n or an external library call.
6592 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
6593 __atomic_store_n or an external library call.
6594 (resolve_overloaded_builtin): Handle new __atomic builtins.
6595
7549df0d 65962011-11-04 Eric Botcazou <ebotcazou@adacore.com>
6597
6598 PR c++/50608
6599 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
6600 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
6601 <INDIRECT_REF>: Return the argument.
6602 <ARRAY_REF>: Remove special code for negative offset.
6603 Call fold_build_pointer_plus instead of size_binop.
6604 (fold_offsetof): Remove STOP_REF argument and adjust.
6605 * c-common.h (fold_offsetof_1): Declare.
6606 (fold_offsetof): Remove STOP_REF argument.
6607
7e783eb3 66082011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
6609
6610 PR c++/50810
6611 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6612 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6613 Wnarrowing for C++0x and C++98.
6614 * c.opt ([Wnarrowing]): Update.
6615
8fe701f5 66162011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
6617
6618 PR c++/44277
6619 * c.opt: Add Wzero-as-null-pointer-constant.
6620
0d84dc2d 66212011-10-31 Jason Merrill <jason@redhat.com>
6622
67031f52 6623 * c.opt (-fdeduce-init-list): Off by default.
6624
0d84dc2d 6625 PR c++/50920
6626 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
6627 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
6628 and -Wc++11-compat.
6629 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
6630
66f24c41 66312011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
6632
6633 PR c++/30066
6634 * c.opt (fvisibility-inlines-hidden): Description change.
6635
244db24d 66362011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
6637
6638 Implement C++11 user-defined literals.
6639 * c-common.c (build_userdef_literal): New.
6640 * c-common.def: New tree code.
6641 * c-common.h (tree_userdef_literal): New tree struct and accessors.
6642 * c-lex.c (interpret_float): Add suffix parm.
6643 (c_lex_with_flags): Build literal tokens.
6644
235be70f 66452011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6646
6647 PR c++/50841
6648 Revert:
6649 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6650
6651 PR c++/50810
6652 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6653 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6654 Wnarrowing for C++0x and C++98.
6655 * c.opt ([Wnarrowing]): Update.
6656
4fe0fb1c 66572011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6658
6659 PR c++/50810
6660 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6661 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6662 Wnarrowing for C++0x and C++98.
6663 * c.opt ([Wnarrowing]): Update.
6664
5f7504f9 66652011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
6666
6667 PR c++/45385
6668 * c-common.c (conversion_warning): Remove code looking for
6669 artificial operands.
6670
2a688977 66712011-10-18 Dodji Seketeli <dodji@redhat.com>
6672
6673 PR bootstrap/50760
6674 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
19931eea 6675 !NO_IMPLICIT_EXTERN_C.
2a688977 6676
326e3391 66772011-10-17 Michael Spertus <mike_spertus@symantec.com>
6678
6679 * c-common.c (c_common_reswords): Add __bases,
6680 __direct_bases.
6681 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
6682
66832011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
6684
6685 PR c++/50757
6686 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
6687
62db153a 66882011-10-15 Tom Tromey <tromey@redhat.com>
6689 Dodji Seketeli <dodji@redhat.com>
6690
6691 * c.opt (fdebug-cpp): New option.
6692 * c-opts.c (c_common_handle_option): Handle the option.
6693 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
6694 output stream in parameter. Factorized from ...
6695 (maybe_print_line): ... this. Dump location debug information when
6696 -fdebug-cpp is in effect.
6697 (print_line_1): New static function. Takes an output stream in
6698 parameter. Factorized from ...
6699 (print_line): ... here. Dump location information when -fdebug-cpp
6700 is in effect.
6701 (scan_translation_unit): Dump location information when
6702 -fdebug-cpp is in effect.
6703
ce70f433 67042011-10-15 Tom Tromey <tromey@redhat.com>
6705 Dodji Seketeli <dodji@redhat.com>
6706
6707 * c.opt (ftrack-macro-expansion): New option. Handle it with and
6708 without argument.
6709 * c-opts.c (c_common_handle_option)<case
6710 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
6711 cases. Handle -ftrack-macro-expansion with and without argument.
6712
97bfb9ef 67132011-10-15 Tom Tromey <tromey@redhat.com>
6714 Dodji Seketeli <dodji@redhat.com>
6715
6716 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
6717 (print_line, cb_define, do_line_change): Adjust to avoid touching
6718 the internals of struct line_map. Use the public API instead.
6719 * c-pch.c (c_common_read_pch): Likewise.
6720 * c-lex.c (fe_file_change): Likewise.
6721
326e3391 67222011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
6723
6724 PR c++/17212
6725 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
6726
67272011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
6728
6729 PR c++/33067
6730 * c-pretty-print.c (pp_c_floating_constant): Output
6731 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
6732
b9a16870 67332011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6734
6735 * c-common.c (def_builtin_1): Delete old interface with two
6736 parallel arrays to hold standard builtin declarations, and replace
6737 it with a function based interface that can support creating
6738 builtins on the fly in the future. Change all uses, and poison
6739 the old names. Make sure 0 is not a legitimate builtin index.
6740 * c-omp.c (c_finish_omp_barrier): Ditto.
6741 (c_finish_omp_taskwait): Ditto.
6742 (c_finish_omp_flush): Ditto.
6743
c7964868 67442011-10-11 Tristan Gingold <gingold@adacore.com>
6745
6746 * c.opt: (fallow-parameterless-variadic-functions): New.
6747
a4e3ffad 67482011-09-08 Dodji Seketeli <dodji@redhat.com>
6749
6750 PR c++/33255 - Support -Wunused-local-typedefs warning
6751 * c-common.h (struct c_language_function::local_typedefs): New
6752 field.
19931eea 6753 (record_locally_defined_typedef, maybe_record_typedef_use)
6754 (maybe_warn_unused_local_typedefs): Declare new functions.
a4e3ffad 6755 * c-common.c (record_locally_defined_typedef)
19931eea 6756 (maybe_record_typedef_use)
6757 (maybe_warn_unused_local_typedefs): Define new functions.
a4e3ffad 6758 * c.opt: Declare new -Wunused-local-typedefs flag.
6759
737a23cc 67602011-09-06 Eric Botcazou <ebotcazou@adacore.com>
6761
6762 PR middle-end/50266
6763 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
6764 computations.
6765
7542c3b4 67662011-09-05 Richard Guenther <rguenther@suse.de>
6767
6768 * c-common.c (complete_array_type): Use ssize_int (-1) instead
6769 of integer_minus_one_node for empty array upper bounds.
6770
1dc92c59 67712011-08-28 Dodji Seketeli <dodji@redhat.com>
6772
6773 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
6774 it's the first time it's being called on this main TU.
6775
2bdf2b6e 67762011-08-24 Richard Guenther <rguenther@suse.de>
6777
6778 PR c/49396
6779 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
6780
67812011-08-22 Gabriel Charette <gchare@google.com>
6ea2c7a3 6782
6783 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
6784 defined in cpp_init_builtins and c_cpp_builtins.
6785
bff4ad11 67862011-08-19 Joseph Myers <joseph@codesourcery.com>
6787
6788 * c-common.c (c_common_reswords): Add __builtin_complex.
6789 * c-common.h (RID_BUILTIN_COMPLEX): New.
6790
985c6e3a 67912011-08-18 Joseph Myers <joseph@codesourcery.com>
6792
6793 * c-common.c (c_common_reswords): Add _Noreturn.
6794 (keyword_is_function_specifier): Handle RID_NORETURN.
6795 * c-common.h (RID_NORETURN): New.
6796
92a44a68 67972011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7dfa155b 6798
6799 * c-common.c (unsafe_conversion_p): New function. Check if it is
6800 unsafe to convert an expression to the type.
6801 (conversion_warning): Adjust, use unsafe_conversion_p.
6802 * c-common.h (unsafe_conversion_p): New function declaration.
6803
2169f33b 68042011-08-02 Jakub Jelinek <jakub@redhat.com>
6805
6806 * c-common.h (c_finish_omp_atomic): Adjust prototype.
6807 (c_finish_omp_taskyield): New prototype.
6808 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
6809 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
6810 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
6811 or RHS1 have side-effects, evaluate those too in the right spot,
6812 if it is a decl and LHS is also a decl, error out if they
6813 aren't the same.
6814 (c_finish_omp_taskyield): New function.
6815 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
6816 * c-pragma.c (omp_pragmas): Add taskyield.
6817 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
6818 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
6819 PRAGMA_OMP_CLAUSE_MERGEABLE.
6820
ab77850e 68212011-07-25 Dodji Seketeli <dodji@redhat.com>
6822
6823 * c-common.h (set_underlying_type): Remove parm name from
6824 declaration.
6825
6ee97920 68262011-07-25 Romain Geissler <romain.geissler@gmail.com>
6827
6828 * c-pretty-print.h: Search c-common.h in c-family.
19931eea 6829
dc251364 68302011-07-22 Jason Merrill <jason@redhat.com>
6831
1a2a35f0 6832 PR c++/49793
6833 * c.opt (Wnarrowing): New.
6834
27282252 6835 PR c++/30112
6836 * c-common.h: Declare c_linkage_bindings.
6837 * c-pragma.c (handle_pragma_redefine_extname): Use it.
6838
dc251364 6839 PR c++/49813
6840 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
6841 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
6842 as flag_isoc99 for 'restrict'.
6843 (pp_c_specifier_qualifier_list): Likewise for _Complex.
6844
fc501191 68452011-07-21 Ian Lance Taylor <iant@google.com>
6846
6847 PR middle-end/49705
6848 * c-common.c (c_disable_warnings): New static function.
6849 (c_enable_warnings): New static function.
6850 (c_fully_fold_internal): Change local unused_p to bool. Call
6851 c_disable_warnings and c_enable_warnings rather than change
6852 c_inhibit_evaluation_warnings.
6853
07b8f133 68542011-07-20 Jason Merrill <jason@redhat.com>
6855
6856 PR c++/6709 (DR 743)
6857 PR c++/42603 (DR 950)
6858 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
6859 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
6860 (CPP_DECLTYPE): New.
6861 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
6862
2cc66f2a 68632011-07-19 Richard Guenther <rguenther@suse.de>
6864
6865 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
6866 * c-omp.c (c_finish_omp_for): Likewise.
6867
3c802a1e 68682011-07-12 Eric Botcazou <ebotcazou@adacore.com>
6869
6870 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
6871 body on the next line.
6872
98a33d9f 68732011-07-08 Jason Merrill <jason@redhat.com>
6874
3115bda0 6875 PR c++/45437
6876 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
6877
98a33d9f 6878 PR c++/49673
6879 * c-common.c (c_apply_type_quals_to_decl): Don't check
6880 TYPE_NEEDS_CONSTRUCTING.
6881
c38a75b7 68822011-07-06 Richard Guenther <rguenther@suse.de>
6883
6884 * c-common.c (c_common_nodes_and_builtins):
6885 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
6886
e593356b 68872011-07-05 Richard Guenther <rguenther@suse.de>
6888
6889 * c-common.c (c_common_nodes_and_builtins): Build all common
6890 tree nodes first.
6891
fca0886c 68922011-06-27 Jakub Jelinek <jakub@redhat.com>
6893
a68f7a8d 6894 * c-common.h (c_tree_chain_next): New static inline function.
6895
fca0886c 6896 * c-common.c (check_builtin_function_arguments): Handle
6897 BUILT_IN_ASSUME_ALIGNED.
6898
2797f13a 68992011-06-21 Andrew MacLeod <amacleod@redhat.com>
6900
6901 * c-common.c: Add sync_ or SYNC__ to builtin names.
6902 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9cad95b7 6903
69042011-06-20 Pierre Vittet <piervit@pvittet.com>
6905
6906 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
6907 handler.
6908 (gen_pragma_handler): New union.
6909 (internal_pragma_handler): New type.
6910 (c_register_pragma_with_data)
6911 (c_register_pragma_with_expansion_and_data): New functions.
6912
6913 * c-pragma.c (registered_pragmas, c_register_pragma_1)
6914 (c_register_pragma, c_register_pragma_with_expansion)
6915 (c_invoke_pragma_handler): Changed to work with
6916 internal_pragma_handler.
6917 (c_register_pragma_with_data)
6918 (c_register_pragma_with_expansion_and_data): New functions.
6919
218e3e4e 69202011-06-14 Joseph Myers <joseph@codesourcery.com>
6921
6922 * c-common.c: Include common/common-target.h.
6923 (handle_section_attribute): Use
6924 targetm_common.have_named_sections.
6925 * c-cppbuiltin.c: Include common/common-target.h.
6926 (c_cpp_builtins): Use targetm_common.except_unwind_info.
6927
41e53ed2 69282011-06-10 Richard Guenther <rguenther@suse.de>
6929
6930 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
6931 to print a IDENTIFIER_NODE.
6932
a6f06169 69332011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6934 Joseph Myers <joseph@codesourcery.com>
6935
6936 * c.opt (fbuilding-libgcc): New option.
6937 * c-cppbuiltin.c (c_cpp_builtins): Define
6938 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
6939
1ea9269b 69402011-06-07 Jason Merrill <jason@redhat.com>
6941
8ce59854 6942 * c-common.c (max_tinst_depth): Lower default to 900.
6943
1ea9269b 6944 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
6945
1af0124d 69462011-06-07 Richard Guenther <rguenther@suse.de>
6947
6948 * c-common.c (c_common_nodes_and_builtins): Do not set
6949 size_type_node or call set_sizetype.
6950
0e9a4c01 69512011-06-07 Dodji Seketeli <dodji@redhat.com>
6952
6953 PR debug/49130
6954 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
19931eea 6955 type when using pointer comparison to compare types.
0e9a4c01 6956
90b40725 69572011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
6958
6959 * c.opt: Add -Wdelete-non-virtual-dtor.
6960 * c-opts.c (c_common_handle_option): Include it in -Wall.
6961
fc9c9e87 69622011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
6963
6964 PR bootstrap/49190
6965
6966 Revert:
6967 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6968
6969 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
6970 not tree_common.
6971
d0389adc 69722011-05-27 Jakub Jelinek <jakub@redhat.com>
6973
6974 PR c++/49165
6975 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
6976 C++ don't call c_common_truthvalue_conversion on void type arms.
6977
cacfdc02 69782011-05-27 Nathan Froyd <froydnj@codesourcery.com>
6979
6980 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
6981 (stmt_list_stack): Define.
6982 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
6983 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
6984
027fc6ef 69852011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6986
6987 * c-common.c (warning_candidate_p): Check for BLOCKs.
6988
f21317a1 69892011-05-26 Nathan Froyd <froydnj@codesourcery.com>
6990
6991 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
6992 not tree_common.
6993
789e953d 69942011-05-25 Jakub Jelinek <jakub@redhat.com>
6995
6996 * c-common.c (def_fn_type): Remove extra va_end.
6997
7f506bca 69982011-05-23 Jason Merrill <jason@redhat.com>
6999
7000 PR c++/48106
7001 * c-common.c (c_common_get_narrower): New.
7002 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
7003
774e9d58 70042011-05-23 Nathan Froyd <froydnj@codesourcery.com>
7005
7006 * c-common.h (check_function_arguments): Tweak prototype of
7007 check_function_arguments.
7008 * c-common.c (check_function_arguments): Likewise. Adjust
7009 calls to check_function_nonnull, check_function_format, and
7010 check_function_sentinel.
7011 (check_function_sentinel): Take a FUNCTION_TYPE rather than
7012 separate attributes and typelist arguments. Use
7013 FOREACH_FUNCTION_ARGS to iterate over argument types.
7014
23407dc9 70152011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7016
7017 * c-common.c (c_common_reswords): Reorder.
7018 * c-common.h (rid): Likewise.
7019
3a939d12 70202011-05-10 Nathan Froyd <froydnj@codesourcery.com>
7021
7022 * c-common.c (def_fn_type): Don't call build_function_type, call
7023 build_function_type_array or build_varargs_function_type_array
7024 instead.
7025 (c_common_nodes_and_builtins): Likewise.
7026
b6e3dd65 70272011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7028
7029 * c-common.c (c_add_case_label): Omit the loc argument to
7030 build_case_label.
7031 * c-common.h (build_case_label): Remove.
7032 * c-semantics.c (build_case_label): Remove.
7033
4232a958 70342011-05-05 Joseph Myers <joseph@codesourcery.com>
7035
7036 * c-objc.h (objc_start_method_definition): Update prototype.
7037 * stub-objc.c (objc_start_method_definition): Add extra parameter.
7038
d0af78c5 70392011-05-04 Nathan Froyd <froydnj@codesourcery.com>
7040
7041 * c-common.c (check_main_parameter_types): Reindent. Don't use
7042 TYPE_ARG_TYPES directly.
7043 (handle_nonnull_attribute): Likewise.
7044 (sync_resolve_params): Likewise.
7045 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
7046 to check_format_string.
7047 (handle_format_attribute): Likewise.
7048 (check_format_string): Take a function type to examine instead of
7049 a type list. Use a function_arg_iterator to step through argument
7050 types.
7051
ceb7b692 70522011-05-04 Richard Guenther <rguenther@suse.de>
7053
7054 * c-common.c (fix_string_type): Use size_int for index type bounds.
7055 (start_fname_decls): Do not pass NULL to build_int_cst.
7056 (c_init_attributes): Likewise.
7057 * c-lex.c (c_lex_with_flags): Likewise.
7058
c66c81be 70592011-04-27 Jason Merrill <jason@redhat.com>
7060
7061 * c-common.c (make_tree_vector_from_list): New.
7062 * c-common.h: Declare it.
7063
16930c72 70642011-04-26 Richard Guenther <rguenther@suse.de>
7065
7066 PR preprocessor/48248
7067 * c-ppoutput.c (maybe_print_line): Always optimize newlines
7068 for output size with -P.
7069
23407dc9 70702011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
7071
7072 * c-common.c (struct c_common_resword): Add __underlying_type.
7073 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
7074
dd045aee 70752011-04-20 Jim Meyering <meyering@redhat.com>
7076
7077 * c-format.c (init_dollar_format_checking): Remove useless
7078 if-before-free.
7079
394dd737 70802011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
7081
7082 * c-objc.h (objc_get_interface_ivars): Removed.
23407dc9 7083 (objc_detect_field_duplicates): New.
394dd737 7084 * stub-objc.c: Likewise.
23407dc9 7085
a758bf7d 70862011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7087
7088 * stub-objc.c (objc_declare_protocols): Renamed to
7089 objc_declare_protocol.
7090 * c-objc.h: Likewise.
23407dc9 7091
29d7200d 70922011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7093
7094 * stub-objc.c (objc_declare_class): Updated argument name.
7095
9b88d08d 70962011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7097
7098 * c-common.h (c_common_init_ts): Declare.
7099 * c-common.c (c_common_init_ts): Define.
7100
4185cf58 71012011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
7102
7103 * c-objc.h (objc_build_message_expr): Updated prototype.
7104 * stub-objc.c (objc_build_message_expr): Likewise.
19931eea 7105
5a90471f 71062011-04-12 Martin Jambor <mjambor@suse.cz>
7107
7108 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
7109 of cgraph_node.
7110
783bb57e 71112011-04-11 Richard Guenther <rguenther@suse.de>
7112
7113 * c-common.c (complete_array_type): Build a range type of
7114 proper type.
7115
c33080b9 71162011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7117
7118 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
7119 (handle_type_generic_attribute): Likewise.
7120
f8913d47 71212011-04-07 Jason Merrill <jason@redhat.com>
7122
7123 PR c++/48450
7124 * c-common.c (c_common_truthvalue_conversion): Don't ignore
7125 conversion from C++0x scoped enum.
7126
c94b1d0e 71272011-04-06 Joseph Myers <joseph@codesourcery.com>
7128
7129 * c-target-def.h: New file.
7130 * c-target.def: New file.
7131 * c-target.h: New file.
7132 * c-common.c (targetcm): Don't define here.
7133 * c-common.h (default_handle_c_option): Declare.
7134 * c-format.c: Include c-target.h instead of target.h.
7135 * c-opts.c: Include c-target.h instead of target.h. Explicitly
7136 include tm.h.
7137 (default_handle_c_option): Move from targhooks.c.
7138
acb10f41 71392011-03-29 Jakub Jelinek <jakub@redhat.com>
7140
7141 PR preprocessor/48248
7142 * c-ppoutput.c (print): Add src_file field.
7143 (init_pp_output): Initialize it.
7144 (maybe_print_line): Don't optimize by adding up to 8 newlines
7145 if map->to_file and print.src_file are different file.
7146 (print_line): Update print.src_file.
7147
82715bcd 71482011-03-25 Kai Tietz <ktietz@redhat.com>
7149
7150 * c-ada-spec.c (compare_comment): Use filename_cmp
7151 instead of strcmp for filename.
7152
451c8e2f 71532011-03-25 Jeff Law <law@redhat.com>
7154
1f78217c 7155 * c-common.c (def_fn_type): Add missing va_end.
451c8e2f 7156
3c47771c 71572011-03-25 Jason Merrill <jason@redhat.com>
7158
7159 * c.opt: Add -std=c++03.
7160
97e6200f 71612011-03-22 Eric Botcazou <ebotcazou@adacore.com>
7162
7163 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
7164
92a44a68 71652011-03-17 Kai Tietz <ktietz@redhat.com>
ac86af5d 7166
7167 PR target/12171
ee212425 7168 * c-pretty-print.c (pp_c_specifier_qualifier_list):
7169 Display allowed attributes for function pointer types.
7170 (pp_c_attributes_display): New function to display
7171 attributes having affects_type_identity flag set to true.
7172 * c-pretty-print.h (pp_c_attributes_display): New prototype.
7173
ac86af5d 7174 * c-common.c (c_common_attribute_table):
7175 Add new element.
7176 (c_common_format_attribute_table): Likewise.
7177
914d1151 71782011-03-18 Jason Merrill <jason@redhat.com>
7179
69788bdf 7180 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
7181 * c-common.h: Don't declare it here.
7182 * c-common.c: Or define it here.
7183 * c-opts.c (c_common_handle_option): Or set it here.
7184
914d1151 7185 PR c++/35315
7186 * c-common.c (handle_transparent_union_attribute): Don't
7187 make a duplicate type in C++.
7188
54cf6eed 71892011-03-15 Jason Merrill <jason@redhat.com>
7190
7191 * c-common.c (max_constexpr_depth): New.
7192 * c-common.h: Declare it.
7193 * c-opts.c (c_common_handle_option): Set it.
7194 * c.opt (fconstexpr-depth): New option.
7195
02cb1060 71962011-03-11 Jason Merrill <jason@redhat.com>
7197
9bf1c74e 7198 * c-common.c (attribute_takes_identifier_p): Add missing const.
7199
02cb1060 7200 PR c++/46803
7201 * c-common.c (attribute_takes_identifier_p): Assume that an
7202 unknown attribute takes an identifier.
7203
ecf2703d 72042011-03-07 Nathan Froyd <froydnj@codesourcery.com>
7205
7206 PR c/47786
7207 * c-common.c (c_type_hash): Call list_length instead of iterating
7208 through DECL_CHAIN. Rename 'i' to 'n_elements'.
7209
2b19dfe4 72102011-02-19 Jakub Jelinek <jakub@redhat.com>
7211
7212 PR c/47809
7213 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
7214
29cf2335 72152011-02-17 Iain Sandoe <iains@gcc.gnu.org>
7216
7217 * c.opt (fobjc-abi-version=) New.
7218 (fobjc-nilcheck): New.
7219
fad3f658 72202011-02-03 Nathan Froyd <froydnj@codesourcery.com>
7221
7222 PR c++/46890
7223 * c-common.h (keyword_is_decl_specifier): Declare.
7224 * c-common.c (keyword_is_decl_specifier): Define.
7225 (keyword_is_function_specifier): New function.
7226
a12319b3 72272011-01-26 Jakub Jelinek <jakub@redhat.com>
7228
7229 PR c/47473
7230 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
7231 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
7232 REAL_TYPE.
7233
5c128dc8 72342011-01-26 Arnaud Charlet <charlet@adacore.com>
7235
7236 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
7237
8d67b0c7 72382011-01-26 Jakub Jelinek <jakub@redhat.com>
7239
7240 PR pch/47430
7241 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
7242 after init_c_lex if pch_file is set.
7243
0675168d 72442011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
7245
e8911163 7246 PR c++/43601
0675168d 7247 * c.opt (-fkeep-inline-dllexport): New switch.
7248
0725e25c 72492011-01-12 Richard Guenther <rguenther@suse.de>
7250
7251 PR middle-end/32511
7252 * c-common.c (handle_weak_attribute): Warn instead of error
7253 on declaring an inline function weak.
7254
fdd84b77 72552011-01-05 Tom Tromey <tromey@redhat.com>
7256
7257 * c-common.h (lvalue_error): Update.
7258 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
7259 not error.
7260
e6e73d14 72612010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
19931eea 7262
d67e8485 7263 PR objc/47075
7264 * c-objc.h (objc_finish_message_expr): Added argument to
7265 prototype.
7266
a36cf284 72672010-12-22 Nathan Froyd <froydnj@codesourcery.com>
7268
7269 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
7270 Use prototype_p.
7271
33b3681f 72722010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
7273
7274 * c-objc.h (objc_maybe_warn_exceptions): New.
19931eea 7275 * stub-objc.c (objc_maybe_warn_exceptions): New.
33b3681f 7276
a1f90215 72772010-12-10 Nathan Froyd <froydnj@codesourcery.com>
7278
7279 * c-common.h (readonly_error): Declare.
7280 * c-common.c (readonly_error): Define.
7281
b1bbc8e5 72822010-12-09 Nathan Froyd <froydnj@codesourcery.com>
7283
7284 * c-common.h (invalid_indirection_error): Declare.
7285 * c-common.c (invalid_indirection_error): Define.
7286
b0d55af9 72872010-12-03 Richard Guenther <rguenther@suse.de>
7288
7289 PR c/46745
7290 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
7291 (pp_c_unary_expression): Likewise.
7292 (pp_c_expression): Likewise.
7293
d7489d8d 72942010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
7295
7296 * c-common.h (objc_finish_function): New.
7297 (objc_non_volatilized_type): Removed.
7298 (objc_type_quals_match): Removed.
7299 * stub-objc.c (objc_finish_function): New.
7300 (objc_non_volatilized_type): Removed.
7301 (objc_type_quals_match): Removed.
19931eea 7302
92468061 73032010-11-30 Joseph Myers <joseph@codesourcery.com>
7304
7305 * c-common.h (parse_optimize_options): Declare.
7306 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
7307 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
7308
967958e4 73092010-11-29 Joseph Myers <joseph@codesourcery.com>
7310
7311 * c-opts.c (check_deps_environment_vars): Use getenv instead of
7312 GET_ENVIRONMENT.
7313 * c-pch.c (O_BINARY): Don't define here.
7314 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
7315
b213bf24 73162010-11-25 Joseph Myers <joseph@codesourcery.com>
7317
7318 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
7319 targetm.except_unwind_info.
7320
9faf44d6 73212010-11-23 Joseph Myers <joseph@codesourcery.com>
7322
7323 * c-opts.c (c_common_handle_option): Pass location to
7324 set_struct_debug_option.
7325
79396169 73262010-11-23 Joseph Myers <joseph@codesourcery.com>
7327
7328 * c-common.c (visibility_options): Move from ../opts.c.
7329 * c-common.h (struct visibility_flags, visibility_options):
7330 Declare here.
7331 * c-opts.c (finish_options): Rename to c_finish_options.
7332 (c_common_init): Update call to finish_options.
7333
b4aa4123 73342010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
7335
7336 PR objc/34033
7337 * c-lex.c (lex_string): Check that each string in an Objective-C
7338 string concat sequence starts with either one or zero '@', and
7339 that there are no spurious '@' signs at the end.
7340
3e0e49f2 73412010-11-20 Joseph Myers <joseph@codesourcery.com>
7342
7343 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
7344 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
7345 HANDLE_PRAGMA_VISIBILITY.
7346 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
7347 HANDLE_PRAGMA_VISIBILITY): Don't define.
7348 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
7349
a9ffdd35 73502010-11-20 Nathan Froyd <froydnj@codesourcery.com>
7351
7352 PR c++/16189
7353 PR c++/36888
7354 PR c++/45331
7355 * c-common.h (keyword_begins_type_specifier): Declare.
7356 (keyword_is_storage_class_specifier): Declare.
7357 (keyword_is_type_qualifier): Declare.
7358 * c-common.c (keyword_begins_type_specifier): New function.
7359 (keyword_is_storage_class_specifier): New function.
7360 (keyword_is_type_qualifier): Declare.
7361
93be21c0 73622010-11-19 Joseph Myers <joseph@codesourcery.com>
7363
7364 PR c/46547
7365 * c-common.c (in_late_binary_op): Define.
7366 (c_common_truthvalue_conversion): Check in_late_binary_op before
7367 calling c_save_expr.
7368 * c-common.h (in_late_binary_op): Declare.
7369
d7175aef 73702010-11-19 Joseph Myers <joseph@codesourcery.com>
7371
7372 * c-opts.c (c_common_handle_option): Update calls to
7373 set_struct_debug_option.
7374
c213e196 73752010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
7376
7377 * c-common.h (objc_declare_protocols): Added additional argument.
7378 * stub-objc.c (objc_declare_protocol): Same change.
19931eea 7379
0b5fc5d6 73802010-11-18 Nathan Froyd <froydnj@codesourcery.com>
7381
7382 PR c/33193
7383 * c-common.h (build_real_imag_expr): Declare.
7384 * c-semantics.c (build_real_imag_expr): Define.
7385
b8ba44e7 73862010-11-17 Joseph Myers <joseph@codesourcery.com>
7387
7388 * c-opts.c (c_common_parse_file): Take no arguments.
7389 * c-common.h (c_common_parse_file): Update prototype.
7390
6ef8d12f 73912010-11-16 Jakub Jelinek <jakub@redhat.com>
7392
7393 PR c++/46401
7394 * c-common.c (warning_candidate_p): Don't track non-const calls
7395 or STRING_CSTs.
7396
929d2a90 73972010-11-15 Ian Lance Taylor <iant@google.com>
7398
7399 * c-lex.c (init_c_lex): Set macro debug callbacks if
7400 flag_dump_go_spec is set.
7401
e4a7640a 74022010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
7403
7404 * c-common.h (objc_build_incr_expr_for_property_ref): New.
7405 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
7406
597d2d81 74072010-11-15 Nathan Froyd <froydnj@codesourcery.com>
7408
7409 PR preprocessor/45038
7410 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
7411 dialects.
7412
c123f04d 74132010-11-12 Joseph Myers <joseph@codesourcery.com>
7414
7415 * c-common.h (c_family_lang_mask): Declare.
7416 * c-opts.c (c_family_lang_mask): Make extern.
7417 * c-pragma.c (handle_pragma_diagnostic): Use
7418 control_warning_option.
7419
3c6c0e40 74202010-11-12 Joseph Myers <joseph@codesourcery.com>
7421
7422 * c-common.c (parse_optimize_options): Update call to
7423 decode_options.
7424 * c-common.h (c_common_handle_option): Update prototype.
7425 * c-opts.c (c_common_handle_option): Take location_t parameter and
7426 pass it to other functions.
7427
19ec5c9e 74282010-11-11 Joseph Myers <joseph@codesourcery.com>
7429
7430 * c-opts.c (warning_as_error_callback): Remove.
7431 (c_common_initialize_diagnostics): Don't call
7432 register_warning_as_error_callback.
7433 (c_common_handle_option): Handle -Werror=normalized= here.
7434
bf776685 74352010-11-10 Joseph Myers <joseph@codesourcery.com>
7436
7437 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
7438 in diagnostic.
7439 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
7440 letter.
7441 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
7442 Remove trailing '.' from diagnostics.
7443 * c.opt (Wwrite-strings_: Avoid '`' in help text.
7444
6bd9d862 74452010-11-10 Joseph Myers <joseph@codesourcery.com>
7446
7447 * c-common.c (parse_optimize_options): Pass global_dc to
7448 decode_options.
7449 * c-opts.c (c_common_handle_option): Pass &global_options to
7450 set_Wstrict_aliasing.
7451 * c.opt (v): Don't mark Common or document here.
7452
1f6616ee 74532010-11-06 Iain Sandoe <iains@gcc.gnu.org>
7454
7455 PR target/44981
7456 * c-format.c (format_type): New type gcc_objc_string_format_type.
7457 (valid_stringptr_type_p): New.
7458 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
19931eea 7459 (check_format_string): Pass expected type, use
1f6616ee 7460 valid_stringptr_type_p (), check that the format string types are
7461 consistent with the format specification.
7462 (decode_format_attr): Warn if NSString is used outside objective-c.
7463 (format_types_orig): Add NSString.
7464 (format_name): New.
7465 (format_flags): New.
7466 (check_format_arg): Handle format strings requiring an external parser.
7467 first_target_format_type: New variable.
7468 (handle_format_attribute): Set up first_target_format_type, pass the
7469 expected format arg string type to check_format_string().
7470 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
7471 * stub-objc.c (objc_string_ref_type_p): New.
7472 (objc_check_format_arg): New.
7473
b0d0931f 74742010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
7475
19931eea 7476 Fixed using the Objective-C 2.0 dot-syntax with class names.
b0d0931f 7477 * c-common.h (objc_build_class_component_ref): New.
7478 * stub-objc.c (objc_build_class_component_ref): New.
7479
f26877d5 74802010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7481
7482 * c.opt (Wproperty-assign-default): New option.
7483
1ef143b6 74842010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7485
7486 Implemented -fobjc-std=objc1 flag.
7487 * c.opt (fobjc-std=objc1): New option.
7488
8c582e4f 74892010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
7490
7491 Implemented format and noreturn attributes for Objective-C methods.
7492 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
7493 attribute for Objective-C methods.
7494
8637f1db 74952010-10-31 Jason Merrill <jason@redhat.com>
7496
7497 * c-common.c (conversion_warning, warn_for_collisions_1): Use
7498 EXPR_LOC_OR_HERE.
7499
9d9f5bb3 75002010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
7501
7502 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
7503 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
7504 (objc_add_property_declaration): Removed arguments for copies and
7505 ivar.
7506 (objc_build_getter_call): Renamed to
7507 objc_maybe_build_component_ref.
7508 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7509 (objc_is_property_ref): New.
7510 * c-common.c (c_common_reswords): Removed copies and ivar.
7511 * stub-objc.c (objc_add_property_declaration): Removed arguments
7512 for copies and ivar.
7513 (objc_build_getter_call): Renamed to
7514 objc_maybe_build_component_ref.
7515 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7516 (objc_is_property_ref): New.
19931eea 7517
56f907a0 75182010-10-29 Arnaud Charlet <charlet@adacore.com>
7519 Matthew Gingell <gingell@adacore.com>
7520
7521 * c-ada-spec.c (separate_class_package): New function.
7522 (pp_ada_tree_identifier): Prefix references to C++ classes with the
7523 name of their enclosing package.
7524 (print_ada_declaration): Use separate_class_package.
7525
b5fa273e 75262010-10-27 Jason Merrill <jason@redhat.com>
7527
5290e253 7528 * c-common.c (c_common_reswords): Add __is_literal_type.
7529 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
7530
b5fa273e 7531 * c-common.c (check_case_value): Remove special C++ code.
7532
7590f0e5 75332010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7534
7535 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
7536 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
7537 and RID_LAST_PATTR.
7538 (objc_add_property_declaration): Added additional arguments.
7539 (objc_property_attribute_kind): Removed.
7540 (objc_set_property_attr): Removed.
7541 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
7542 copy and nonatomic.
7543 * stub-objc.c (objc_add_property_declaration): Added additional
7544 arguments.
7545 (objc_set_property_attr): Removed.
19931eea 7546
1d894bcf 75472010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7548
7549 * c-common.h (objc_add_property_variable): Renamed to
7550 objc_add_property_declaration. Added location argument.
7551 * stub-objc.c (objc_add_property_variable): Same change.
8204c077 7552
e23bf1fb 75532010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
7554
7555 * c-common.h (objc_maybe_printable_name): New.
7556 * stub-objc.c (objc_maybe_printable_name): New.
7557
92a44a68 75582010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7559 Andrew Pinski <pinskia@gmail.com>
93426222 7560
7561 * c-common.h (c_common_mark_addressable_vec): Declare.
7562 * c-common.c (c_common_mark_addressable_vec): New function.
7563
45b2b110 75642010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7565
7566 * c-common.h (objc_set_method_type): Removed.
7567 (objc_add_method_declaration): Added boolean argument.
7568 (objc_start_method_definition): Same change.
7569 (objc_build_method_signature): Same change.
7570 * stub-objc.c (objc_set_method_type): Removed.
7571 (objc_add_method_declaration): Added boolean argument.
7572 (objc_start_method_definition): Same change.
7573 (objc_build_method_signature): Same change.
7574
64cd9619 75752010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7576
7577 * c-common.h (finish_file): Removed.
7578 (objc_write_global_declarations): New.
7579 * c-opts.c (c_common_parse_file): Do not call finish_file.
7580 * stub-objc.c (objc_write_global_declarations): New.
19931eea 7581
e1f293c0 75822010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7583
7584 Implemented parsing @synthesize and @dynamic for
7585 Objective-C/Objective-C++.
7586 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
7587 (objc_add_synthesize_declaration): New.
7588 (objc_add_dynamic_declaration): New.
7589 * c-common.c (c_common_reswords): Add synthesize and dynamic.
7590 * stub-objc.c (objc_add_synthesize_declaration): New.
7591 (objc_add_dynamic_declaration): New.
19931eea 7592
ef97a312 75932010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
7594
7595 PR target/46041
7596 * c-cppbuiltin.c (mode_has_fma): Move function here from
7597 builtins.c. Don't use the fma optab, instead just use the
7598 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
7599 using -save-temps.
7600
69b07042 76012010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7602
7603 Merge from 'apple/trunk' branch on FSF servers.
ef97a312 7604
92a44a68 7605 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
69b07042 7606
19931eea 7607 Radar 4330422
69b07042 7608 * c-common.h (objc_non_volatilized_type): New declaration
7609 * stub-objc.c (objc_non_volatilized_type): New stub.
7610
f15f2e56 76112010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
7612
69b07042 7613 Merge from 'apple/trunk' branch on FSF servers.
f15f2e56 7614
92a44a68 7615 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
f15f2e56 7616
19931eea 7617 Radar 4133425
f15f2e56 7618 * c-common.h (objc_diagnose_private_ivar): New decl.
ef97a312 7619 * stub-objc.c (objc_diagnose_private_ivar): New stub.
f15f2e56 7620
4a8875ed 76212010-10-17 Iain Sandoe <iains@gcc.gnu.org>
7622
7623 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
7624 * c-common.h (enum rid): Add RID_AT_PACKAGE.
7625 (objc_ivar_visibility_kind): New enum.
7626 (objc_set_visibility): Adjust prototype to use visibility enum.
ef97a312 7627 * stub-objc.c (objc_set_visibility): Adjust stub to use
4a8875ed 7628 visibility enum.
7629
7e0713b1 76302010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
7631
7632 * c-cppbuiltin.c (builtin_define_float_constants): Emit
7633 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
7634 has the appropriate fma builtins.
7635 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
7636
86c110ac 76372010-10-14 Iain Sandoe <iains@gcc.gnu.org>
7638
7e0713b1 7639 merge from FSF apple 'trunk' branch.
92a44a68 7640 2006 Fariborz Jahanian <fjahanian@apple.com>
7e0713b1 7641
86c110ac 7642 Radars 4436866, 4505126, 4506903, 4517826
7643 * c-common.c (c_common_resword): Define @property and its attributes.
7644 * c-common.h: Define property attribute enum entries.
7645 (OBJC_IS_PATTR_KEYWORD): New.
7646 (objc_property_attribute_kind): New enum.
7647 Declare objc_set_property_attr (), objc_add_property_variable (),
7648 objc_build_getter_call () and objc_build_setter_call ().
7649 * stub-objc.c (objc_set_property_attr): New stub.
7650 (objc_add_property_variable): Likewise.
7651 (objc_build_getter_call): Likewise.
7652 (objc_build_setter_call) Likewise.
7e0713b1 7653
40c8d1dd 76542010-10-13 Iain Sandoe <iains@gcc.gnu.org>
7655
7e0713b1 7656 merge from FSF apple 'trunk' branch.
92a44a68 7657 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
40c8d1dd 7658
7659 Radar 3803157 (method attributes)
7660 * c-common.c (handle_deprecated_attribute): Recognize
7661 objc methods as valid declarations.
7662 * c-common.h: Declare objc_method_decl ().
7e0713b1 7663 * stub-objc.c (objc_method_decl): New stub.
40c8d1dd 7664
f3f006ad 76652010-10-08 Joseph Myers <joseph@codesourcery.com>
7666
7667 * c-common.c (parse_optimize_options): Call
7668 decode_cmdline_options_to_array_default_mask before
7669 decode_options. Update arguments to decode_options.
7670 * c-common.h (c_common_init_options_struct): Declare.
7671 * c-opts.c (c_common_init_options_struct): New. Split out from
7672 c_common_init_options.
7673
0a65c3bb 76742010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
7675
7676 Implemented fast enumeration for Objective-C.
7677 * c-common.h (objc_finish_foreach_loop): New.
7678 * stub-objc.c (objc_finish_foreach_loop): New.
7679
24ca3b4e 76802010-10-05 Joseph Myers <joseph@codesourcery.com>
7681
7682 * c-common.h (struct diagnostic_context): Don't declare here.
7683 (c_common_initialize_diagnostics): Declare using
7684 diagnostic_context typedef.
7685 * c-opts.c (c_common_handle_option): Pass global_dc to
7686 handle_generated_option.
7687
f83b64ca 76882010-10-04 Joseph Myers <joseph@codesourcery.com>
7689
7690 * c-opts.c (c_common_handle_option): Pass &global_options_set to
7691 handle_generated_option.
7692
2fdec027 76932010-10-03 Ian Lance Taylor <iant@google.com>
7694
7695 * c.opt (-fplan9-extensions): New option.
7696
41acdfa4 76972010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7698
7699 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
7700 Remove.
7701 (c_cpp_builtins): Call functions from cppbuiltin.c instead
7702 of duplicating code.
7703
069761fb 77042010-09-30 Iain Sandoe <iains@gcc.gnu.org>
7705
7706 * c-common.c: Add two new entries for @optional
7707 and @required keywords.
7708
7709 merge from FSF 'apple/trunk' branch.
92a44a68 7710 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
069761fb 7711
7712 Radar 4386773
7713 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
7714 objective-c keywords.
7715 (objc_set_method_opt): New declaration.
7716 * stub-objc.c (objc_set_method_opt): New stub.
19931eea 7717
2c5d2e39 77182010-09-30 Joseph Myers <joseph@codesourcery.com>
7719
7720 * c-common.c (handle_optimize_attribute): Pass &global_options to
7721 cl_optimization_save and cl_optimization_restore.
7722 * c-opts.c (c_common_handle_option): Pass &global_options to
7723 handle_generated_option.
7724 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
7725 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
7726 &global_options to cl_optimization_restore.
7727
e5c75ac3 77282010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
7729
7730 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
7731 Objective-C/Objective-C++ keywords.
7732
3511333e 77332010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
e147d6aa 7734
19931eea 7735 Merge from 'apple/trunk' branch on FSF servers.
7736
92a44a68 7737 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
e147d6aa 7738
7739 Radar 4281748
7740 * c-common.h (objc_check_global_decl): New declaration.
7741 * stub-objc.c (objc_check_global_decl): New stub.
7742
5461e683 77432010-09-29 Joseph Myers <joseph@codesourcery.com>
7744
7745 * c.opt: Don't use VarExists.
7746
5ae82d58 77472010-09-29 Joseph Myers <joseph@codesourcery.com>
7748
7749 * c-common.c (c_cpp_error): Update names of diagnostic_context
7750 members.
7751 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
7752 cl_optimization members.
7753 * c-opts.c (warning_as_error_callback, c_common_handle_option,
7754 sanitize_cpp_opts, finish_options): Update names of cpp_options
7755 members.
7756
b27e241e 77572010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
7758
7759 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
7760 (objc_is_reserved_word): Removed.
7761 * c-common.c: Updated comments.
7762 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
7763 objc_is_reserved_word.
7764 * stub-objc.c (objc_is_reserved_word): Removed.
7765
03fc2271 77662010-09-28 Iain Sandoe <iains@gcc.gnu.org>
7767
19931eea 7768 * c-common.h (objc_add_method_declaration): Adjust prototype to
03fc2271 7769 include attributes.
7770 (objc_start_method_definition): Likewise.
7771 (objc_build_keyword_decl): Likewise.
7772 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
7773 (objc_start_method_definition): Likewise.
7774 (objc_build_keyword_decl): Likewise.
7775
a336eb4b 77762010-09-28 Iain Sandoe <iains@gcc.gnu.org>
7777
7778 * c-common.h (objc_start_class_interface): Adjust prototype.
7779 (objc_start_category_interface): Likewise.
7780 (objc_start_protocol): Likewise.
7781 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
7782 (objc_start_class_interface): Likewise.
7783 (objc_start_category_interface): Likewise.
7784
48b14f50 77852010-09-27 Ian Lance Taylor <iant@google.com>
7786
7787 * c-common.c (c_common_attribute_table): Add no_split_stack.
7788 (handle_no_split_stack_attribute): New static function.
7789
4abfc532 77902010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
7791
19931eea 7792 Merge from 'apple/trunk' branch on FSF servers.
4abfc532 7793
92a44a68 7794 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
4abfc532 7795
19931eea 7796 Radar 4229905
4abfc532 7797 * c-common.h (objc_have_common_type): New declaration.
7798 * stub-objc.c (objc_have_common_type): New stub.
7799
7800 2005-06-22 Ziemowit Laski <zlaski@apple.com>
7801
7802 Radar 4154928
7803 * c-common.h (objc_common_type): New prototype.
19931eea 7804 * stub-objc.c (objc_common_type): New stub.
4abfc532 7805
7bd95dfd 78062010-09-24 Jan Hubicka <jh@suse.cz>
7807
7808 * c-common.c (handle_leaf_attribute): New function.
7809 (struct attribute_spec c_common_att): Add leaf.
7810
5789e05b 78112010-09-22 Joseph Myers <joseph@codesourcery.com>
7812
7813 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
7814 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
7815 -dump, -dump=, -imacros, -imacros=, -include, -include=,
7816 -include-barrier, -include-directory, -include-directory=,
7817 -include-directory-after, -include-directory-after=,
7818 -include-prefix, -include-prefix=, -include-with-prefix,
7819 -include-with-prefix=, -include-with-prefix-after,
7820 -include-with-prefix-after=, -include-with-prefix-before,
7821 -include-with-prefix-before=, -no-integrated-cpp,
7822 -no-line-commands, -no-standard-includes, -no-warnings, -output,
7823 -output=, -pedantic, -pedantic-errors, -preprocess,
7824 -print-missing-file-dependencies, -trace-includes, -traditional,
7825 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
7826 -user-dependencies, -verbose, -write-dependencies,
7827 -write-user-dependencies, no-integrated-cpp, traditional): New.
7828
e6fb54ba 78292010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
7830
7831 PR objc/23710
9b60f3b0 7832 * c-common.h (objc_start_method_definition): Return bool instead
7833 of void.
7834 * stub-objc.c (objc_start_method_definition): Return bool instead
7835 of void.
7836
78372010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
7838
7839 PR objc/25965
7840 * c-common.h (objc_get_interface_ivars): New declaration.
7841 * stub-objc.c (objc_get_interface_ivars): New stub.
e6fb54ba 7842
e44b0a1f 78432010-09-15 Ian Lance Taylor <iant@google.com>
7844
7845 * c-common.c (parse_optimize_options): Do not capitalize warning
ebd7c4c1 7846 messages. Remove period at end of warning message.
e44b0a1f 7847
85c0a25c 78482010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7849
7850 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
7851 (handle_alias_attribute): ... here.
7852 (handle_ifunc_attribute): New.
7853
5ba33bf4 78542010-09-06 Mark Mitchell <mark@codesourcery.com>
7855
7856 * c-common.h (do_warn_double_promotion): Declare.
7857 * c-common.c (do_warn_double_promotion): Define.
7858
c920faa3 78592010-09-05 Mark Mitchell <mark@codesourcery.com>
7860
7861 * c.opt (Wdouble-promotion): New.
7862
9604e070 78632010-09-02 Joseph Myers <joseph@codesourcery.com>
7864
7865 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
7866 fvtable-thunks, fxref): Mark no longer supported in help text.
7867
3b0273a1 78682010-09-02 Joseph Myers <joseph@codesourcery.com>
7869
7870 * c.opt (Wimport, fall-virtual, falt-external-templates,
7871 fdefault-inline, fenum-int-equiv, fexternal-templates,
7872 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
7873 fname-mangling-version-, fnew-abi, fnonnull-objects,
7874 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
7875 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
7876 applicable.
7877 (fhandle-exceptions): Mark with Alias and Warn.
7878 * c-opts.c (c_common_handle_option): Don't handle options marked
7879 as ignored.
7880
67089c6b 78812010-09-02 Joseph Myers <joseph@codesourcery.com>
7882
7883 * c.opt (Wcomments, Werror-implicit-function-declaration,
7884 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
7885 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
7886 aliases.
7887 * c-common.c (option_codes): Use OPT_Wcomment instead of
7888 OPT_Wcomments.
7889 * c-opts.c (warning_as_error_callback, c_common_handle_option):
7890 Don't handle options marked as aliases.
7891
2af087f2 78922010-08-25 Richard Guenther <rguenther@suse.de>
7893
7894 * c-common.c (c_common_get_alias_set): Remove special
7895 handling for pointers.
7896
48148244 78972010-08-20 Nathan Froyd <froydnj@codesourcery.com>
7898
7899 * c-common.c: Use FOR_EACH_VEC_ELT.
7900 * c-gimplify.c: Likewise.
7901 * c-pragma.c: Likewise.
7902
89c69892 79032010-08-16 Joseph Myers <joseph@codesourcery.com>
7904
7905 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
7906 RejectDriver.
7907 (MMDX): Change back to MMD. Mark NoDriverArg instead of
7908 RejectDriver.
7909 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
7910 instead of OPT_MDX and OPT_MMDX.
7911
e28aa114 79122010-08-16 Joseph Myers <joseph@codesourcery.com>
7913
7914 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
7915
99b66d21 79162010-08-12 Joseph Myers <joseph@codesourcery.com>
7917
7918 * c.opt (MD, MMD): Change to MDX and MMDX.
7919 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
7920
666f4bf0 79212010-08-11 Joseph Myers <joseph@codesourcery.com>
7922
7923 * c-opts.c (c_common_handle_option): Call handle_generated_option
7924 instead of handle_option.
7925
5ec815f6 79262010-08-08 Nathan Froyd <froydnj@codesourcery.com>
7927
7928 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
7929 (maybe_apply_renaming_pragma): Delete unneeded declarations.
7930
d13143cf 79312010-08-08 Nathan Froyd <froydnj@codesourcery.com>
7932
7933 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
7934 (pending_redefine_extname): Change type to a VEC.
7935 (add_to_renaming_pragma_list): Update for new type of
7936 pending_redefine_extname.
5ec815f6 7937 (maybe_apply_renaming_pragma): Likewise.
d13143cf 7938
2008c983 79392010-08-04 Arnaud Charlet <charlet@adacore.com>
7940
7941 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
7942 visited.
7943 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
7944 decide whether a type has already been declared/seen.
7945 Do not go to the original type.
7946 (dump_nested_types): New parameter forward.
7947 Generate forward declaration if needed and mark type as visited.
7948 (print_ada_declaration): Call dump_nested_types if not already done.
7949 Mark types as visited.
7950
9b091a73 79512010-08-03 Joseph Myers <joseph@codesourcery.com>
7952
7953 * c.opt (-print-pch-checksum): Remove option.
7954 * c-opts.c (c_common_handle_option): Don't handle
7955 OPT_print_pch_checksum.
7956
b78351e5 79572010-07-27 Joseph Myers <joseph@codesourcery.com>
7958
7959 * c-common.h (c_common_handle_option): Update prototype and return
7960 value type.
7961 * c-opts.c (c_common_handle_option): Update prototype and return
7962 value type. Update calls to handle_option and
7963 enable_warning_as_error.
7964
34416a90 79652010-07-27 Jakub Jelinek <jakub@redhat.com>
7966
7967 PR c/45079
7968 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
7969
fecf9011 79702010-07-27 Joseph Myers <joseph@codesourcery.com>
7971
7972 * c-common.h (c_common_missing_argument): Remove.
7973 * c-opts.c (c_common_missing_argument): Remove.
7974 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
7975 idirafter, imacros, include, isysroot, isystem, iquote): Add
7976 MissingArgError.
7977 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
7978
e88d34f6 79792010-07-27 Joseph Myers <joseph@codesourcery.com>
7980
7981 * c-common.h (c_common_option_lang_mask,
7982 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
7983 New.
7984 (c_common_init_options): Update prototype.
7985 * c-opts.c (c_common_option_lang_mask): New.
7986 (c_common_initialize_diagnostics): Split out of
7987 c_common_init_options.
7988 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
7989 New.
7990 (c_common_init_options): Update prototype. Use decoded options in
7991 search for -lang-asm.
7992
1767a056 79932010-07-15 Nathan Froyd <froydnj@codesourcery.com>
7994
7995 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
7996 * c-format.c: Likewise.
7997
0b205f4c 79982010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
7999
8000 * c-common.h: Include diagnostic-core.h. Error if already
8001 included.
8002 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
8003
1c58e3f1 80042010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8005
1f78217c 8006 * c-common.c (IN_GCC_FRONTEND): Do not undef.
1c58e3f1 8007 Do not include expr.h
8008 (vector_mode_valid_p): Move here.
8009
33cc157c 80102010-06-21 DJ Delorie <dj@redhat.com>
8011
8012 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
8013 allow these pragmas anywhere.
8014
80152010-06-14 Jakub Jelinek <jakub@redhat.com>
8016
8017 PR bootstrap/44509
8018 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
8019 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
8020 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
8021 ggc_strdup instead of xstrdup.
8022
80232010-06-10 Jakub Jelinek <jakub@redhat.com>
8024
8025 * c-cppbuiltin.c: Include cpp-id-data.h.
8026 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
8027 (lazy_hex_fp_value): New function.
8028 (builtin_define_with_hex_fp_value): Provide definitions lazily.
8029
9b40bfbf 80302010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8031
8032 * c-gimplify.c: Do not include tree-flow.h
8033
202d6e5f 80342010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
8035
8036 PR other/44034
8037 * c-common.c: Rename targetm member:
8038 targetm.enum_va_list -> targetm.enum_va_list_p
8039
d3237426 80402010-06-28 Anatoly Sokolov <aesok@post.ru>
8041
8042 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
8043
596981c8 80442010-06-28 Steven Bosscher <steven@gcc.gnu.org>
8045
8046 * c-cppbuiltin.c: Do not include except.h.
8047
b9bdfa0b 80482010-06-24 Andi Kleen <ak@linux.intel.com>
8049
19931eea 8050 * c-common.c (warn_for_omitted_condop): New.
8051 * c-common.h (warn_for_omitted_condop): Add prototype.
b9bdfa0b 8052
55ad092d 80532010-06-21 Joseph Myers <joseph@codesourcery.com>
8054
8055 * c.opt (lang-objc): Remove.
8056 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
8057
9e7c2572 80582010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
8059
8060 * c-opts.c: Include "tm_p.h".
8061
615ef0bb 80622010-06-20 Joseph Myers <joseph@codesourcery.com>
8063
8064 * c-common.c (parse_optimize_options): Update call to
8065 decode_options.
8066
aef48c9a 80672010-06-18 Nathan Froyd <froydnj@codesourcery.com>
8068
8069 * c-common.c (record_types_used_by_current_var_decl): Adjust for
8070 new type of types_used_by_cur_var_decl.
8071
d74003b4 80722010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
8073
8074 PR bootstrap/44512
8075 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
8076 for C++ standard compliance.
8077
1194d077 80782010-06-16 Jason Merrill <jason@redhat.com>
8079
8080 * c.opt: Add -Wnoexcept.
8081
d473d901 80822010-06-16 Richard Guenther <rguenther@suse.de>
8083
8084 PR c/44555
8085 * c-common.c (c_common_truthvalue_conversion): Remove
8086 premature and wrong optimization concering ADDR_EXPRs.
8087
b62dbfd3 80882010-06-15 Arnaud Charlet <charlet@adacore.com>
8089
8090 * c-ada-spec.c (dump_sloc): Remove column info.
8091 (is_simple_enum): New function.
8092 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
8093 enum types when relevant.
8094
200dd99c 80952010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8096
19931eea 8097 * c-common.c (conversion_warning): Warn at expression
200dd99c 8098 location.
8099
abf6a617 81002010-06-10 Joseph Myers <joseph@codesourcery.com>
8101
8102 * c-opts.c (c_common_handle_option): Don't handle
8103 OPT_fshow_column.
8104
ba72912a 81052010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
8106
8107 * c-pragma.c (push_alignment): Use typed GC allocation.
8108 (handle_pragma_push_options): Likewise.
8109
8110 * c-common.c (parse_optimize_options): Likewise.
8111
8112 * c-common.h (struct sorted_fields_type): Add variable_size GTY
8113 option.
8114
4aafe913 81152010-06-07 Joseph Myers <joseph@codesourcery.com>
8116
8117 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
8118 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8119 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8120 flag_signed_bitfields, warn_strict_null_sentinel,
8121 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
8122 flag_gen_declaration, flag_no_gnu_keywords,
8123 flag_implement_inlines, flag_implicit_templates,
8124 flag_implicit_inline_templates, flag_optional_diags,
8125 flag_elide_constructors, flag_default_inline, flag_rtti,
8126 flag_conserve_space, flag_access_control, flag_check_new,
8127 flag_new_for_scope, flag_weak, flag_working_directory,
8128 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
8129 flag_enforce_eh_specs, flag_threadsafe_statics,
8130 flag_pretty_templates): Remove.
8131 * c-common.h (flag_preprocess_only, flag_nil_receivers,
8132 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
8133 flag_replace_objc_classes, flag_undef, flag_no_builtin,
8134 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8135 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8136 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
8137 flag_no_gnu_keywords, flag_implement_inlines,
8138 flag_implicit_templates, flag_implicit_inline_templates,
8139 flag_optional_diags, flag_elide_constructors, flag_default_inline,
8140 flag_rtti, flag_conserve_space, flag_access_control,
8141 flag_check_new, flag_new_for_scope, flag_weak,
8142 flag_working_directory, flag_use_cxa_atexit,
8143 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
8144 flag_threadsafe_statics, flag_pretty_templates,
8145 warn_strict_null_sentinel): Remove.
8146 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
8147 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
8148 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
8149 fimplicit-inline-templates, fimplicit-templates,
8150 flax-vector-conversions, fms-extensions, fnil-receivers,
8151 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
8152 frtti, fshort-double, fshort-enums, fshort-wchar,
8153 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
8154 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
8155 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
8156 gen-decls, undef): Use Var.
8157 (fdefault-inline, foptional-diags): Document as doing nothing.
8158 * c-opts.c (c_common_handle_option): Remove cases for options now
8159 using Var. Mark ignored options as such.
8160
7bedc3a0 81612010-06-05 Steven Bosscher <steven@gcc.gnu.org>
8162
19931eea 8163 * c-common.c: Moved to here from parent directory.
7bedc3a0 8164 * c-common.def: Likewise.
8165 * c-common.h: Likewise.
8166 * c-cppbuiltin.c: Likewise.
8167 * c-dump.c: Likewise.
8168 * c-format.c: Likewise.
8169 * c-format.h : Likewise.
8170 * c-gimplify.c: Likewise.
8171 * c-lex.c: Likewise.
8172 * c-omp.c: Likewise.
8173 * c.opt: Likewise.
8174 * c-opts.c: Likewise.
8175 * c-pch.c: Likewise.
8176 * c-ppoutput.c: Likewise.
8177 * c-pragma.c: Likewise.
8178 * c-pragma.h: Likewise.
8179 * c-pretty-print.c: Likewise.
8180 * c-pretty-print.h: Likewise.
8181 * c-semantics.c: Likewise.
8182 * stub-objc.c: Likewise.
8183
8184 * c-common.c: Include gt-c-family-c-common.h.
8185 * c-pragma.c: Include gt-c-family-c-pragma.h.
8186\f
aad93da1 8187Copyright (C) 2010-2017 Free Software Foundation, Inc.
7bedc3a0 8188
8189Copying and distribution of this file, with or without modification,
8190are permitted in any medium without royalty provided the copyright
8191notice and this notice are preserved.