]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
Rework vrp_int_const_binop interface
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
64a5912c
DM
12017-10-31 David Malcolm <dmalcolm@redhat.com>
2
3 * c-common.c (binary_op_error): Update for renaming of
4 error_at_rich_loc.
5 (c_parse_error): Likewise.
6 * c-warn.c (warn_logical_not_parentheses): Likewise for
7 renaming of inform_at_rich_loc.
8 (warn_for_restrict): Likewise for renaming of
9 warning_at_rich_loc_n.
10
c76dc9c3
JM
112017-10-30 Joseph Myers <joseph@codesourcery.com>
12
13 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
14 * c-opts.c (set_std_c17): New function.
15 (c_common_init_options): Use gnu17 as default C version.
16 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
17
ee5fd23a
MM
182017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
19
20 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
21 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
22 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
23 __FP_FAST_FMA<N>X.
24
d1047465
MP
252017-10-23 Marek Polacek <polacek@redhat.com>
26
27 PR c/82681
28 * c-warn.c (warnings_for_convert_and_check): Fix typos.
29
9e878cf1
EB
302017-10-19 Eric Botcazou <ebotcazou@adacore.com>
31
32 * c-common.c (check_builtin_function_arguments): Also check arguments
33 of __builtin_alloca_with_align_and_max.
34
89b6abbb
DM
352017-10-17 David Malcolm <dmalcolm@redhat.com>
36
37 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
38 rather than NULL to format_warning_va.
39 (check_format_types): Likewise when calling format_type_warning.
40 Remove code to extract source_ranges and source_range * in favor
41 of just a location_t.
42 (format_type_warning): Convert source_range * param to a
43 location_t.
44
39382c09
JJ
452017-10-13 Jakub Jelinek <jakub@redhat.com>
46
47 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
48 [LR]SHIFT_EXPR.
49
62e1c678
DM
502017-10-12 David Malcolm <dmalcolm@redhat.com>
51
52 * c-common.c (enum missing_token_insertion_kind): New enum.
53 (get_missing_token_insertion_kind): New function.
54 (maybe_suggest_missing_token_insertion): New function.
55 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
56
b90c9338
NS
572017-10-11 Nathan Sidwell <nathan@acm.org>
58
59 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
60 (c_common_handle_option): Update incpath_kind names.
61
3a266bcd
ML
622017-10-11 Martin Liska <mliska@suse.cz>
63
64 PR sanitizer/82490
65 * c-attribs.c (handle_no_sanitize_attribute): Report directly
66 Wattributes warning.
67
8e6cdc90
RS
682017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
69
70 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
71 operating on trees as wide_ints.
72 * c-common.c (pointer_int_sum): Likewise.
73 * c-pretty-print.c (pp_c_integer_constant): Likewise.
74 * c-warn.c (match_case_to_enum_1): Likewise.
75 (c_do_switch_warnings): Likewise.
76 (maybe_warn_shift_overflow): Likewise.
77
802b38c9
JJ
782017-10-10 Jakub Jelinek <jakub@redhat.com>
79
80 PR c/82437
81 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
82 instead of wide_int::from.
83
4e34b338
JJ
842017-10-06 Jakub Jelinek <jakub@redhat.com>
85
86 PR c/82437
87 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
88 using to_widest use wide_int with the larger of the two precisions.
89
4bc4b2b4
BE
902017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
91
92 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
93 functions.
94
a1488398
RS
952017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
96
97 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
98 when combining the original unconverted comparison operands.
99
01c9fb68
JJ
1002017-09-29 Jakub Jelinek <jakub@redhat.com>
101
102 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
103 attribute.
104
6e3e8419
EB
1052017-09-29 Eric Botcazou <ebotcazou@adacore.com>
106
107 * c-ada-spec.c (to_ada_name): Add index parameter.
108 (pp_ada_tree_identifier): Likewise.
109 (dump_ada_macros): Adjust call to to_ada_name.
110 (struct overloaded_name_hash): New type.
111 (struct overloaded_name_hasher): Likewise.
112 (overloaded_names): New hash table.
113 (compute_overloading_index): New function.
114 (dump_ada_decl_name): Call it and pass the result to
115 pp_ada_tree_identifier.
116 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
117 (dump_ada_function_declaration): Likewise.
118 (dump_generic_ada_node): Likewise.
119 (print_constructor): Likewise.
120 (print_destructor): Likewise.
121 (dump_ada_specs): Delete overloaded_names table.
122
79310774
EB
1232017-09-29 Eric Botcazou <ebotcazou@adacore.com>
124
125 * c-ada-spec.c (max_ada_macros): Move around.
126 (store_ada_macro_index): Likewise.
127 (source_file): Rename into...
128 (macro_source_file): ...this.
129 (count_ada_macro): Move around.
130 (store_ada_macro): Likewise.
131 (compare_macro): Likewise.
132 (print_ada_macros): Merge in...
133 (dump_ada_macros): ...this.
134 (source_file_base): Rename into...
135 (current_source_file): ...this.
136 (print_comment): Move around.
137 (dump_ada_nodes): Call dump_ada_declaration directly.
138 (struct with): Change type of limited field to bool.
139 (append_withs): Change type of limited_access parameter to bool.
140 (pp_ada_tree_identifie): Likewise.
141 (dump_ada_decl_nam): Likewise.
142 (dump_generic_ada_node): Likewise. Do not print the return type.
143 (to_ada_name): Change type of space_found parameter to bool.
144 (dump_ada_function_declaration): Return void and change type of
145 parameters to bool. Also print the return type for a function.
146 (print_ada_methods): Rename into...
147 (dump_ada_methods): ...this.
148 (print_ada_declaration): Rename into ...
149 (dump_ada_declaration): ...this. Do not print the return type.
150 (print_ada_struct_decl): Rename into...
151 (dump_ada_struct_decl): ...this.
152
7d386d45
JJ
1532017-09-29 Jakub Jelinek <jakub@redhat.com>
154
155 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
156 rather than DECL_INITIAL.
157 (common_handle_aligned_attribute): Likewise.
158
9ed32e27
AO
1592017-09-20 Alexandre Oliva <aoliva@redhat.com>
160
161 * c.opt (gen-decls): Add RejectNegative.
162
026a79f7
AS
1632017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
164 Jakub Jelinek <jakub@redhat.com>
165
166 Add support for -std=c++2a.
167 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
168 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
169 * c-opts.c (set_std_cxx2a): New.
170 (c_common_handle_option): Set options when -std=c++2a is enabled.
171 (c_common_post_options): Adjust comments.
172 (set_std_cxx14, set_std_cxx17): Likewise.
173
4a8ca690
EB
1742017-09-15 Eric Botcazou <ebotcazou@adacore.com>
175
176 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
177 message for non-uniform endianness and issue a warning in C++.
178
7b936140
JJ
1792017-09-15 Jakub Jelinek <jakub@redhat.com>
180
181 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
182 (Wc++17-compat): Change from undocumented alias to option.
183 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
184 change C++1z to C++17 in description.
185 (std=c++1z, std=gnu++1z): Change from option to undocumented
186 deprecated alias.
187 (std=c++17, std=gnu++17): Change from undocumented alias to option.
188 Adjust description.
189 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
190 * c-opts.c (set_std_cxx1z): Rename to ...
191 (set_std_cxx17): ... this.
192 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
193 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
194 caller.
195 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
196 comments.
197
12263f13
L
1982017-09-12 H.J. Lu <hongjiu.lu@intel.com>
199
200 * c-attribs.c (common_handle_aligned_attribute): Don't warn
201 function alignment if warn_if_not_aligned_p is true.
202
6836632e
NS
2032017-09-12 Nathan Sidwell <nathan@acm.org>
204
205 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
206 resort_sorted_fields): Move to c/c-decl.c.
207 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
208 (struct sorted_fields_type): Move to c/c-lang.h.
209
019bf9ad
JW
2102017-09-09 Jonathan Wakely <jwakely@redhat.com>
211
212 PR c++/81852
213 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
214
bc7fe952
MP
2152017-09-04 Marek Polacek <polacek@redhat.com>
216
217 PR c/81783
218 * c-warn.c (warn_tautological_bitwise_comparison): New function.
219 (warn_tautological_cmp): Call it.
220
de7c2c6a
BK
2212017-09-01 Boris Kolpackov <boris@codesynthesis.com>
222
223 * c-opts.c (c_common_finish): Write dependency information even if
224 there are errors.
225
d2e05fcb
JJ
2262017-09-01 Jakub Jelinek <jakub@redhat.com>
227
228 PR c/81887
229 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
230 (omp_pragmas_simd): ... here.
231 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
232 create new clauses list containing just simd clause.
233
18e2a8b8
RS
2342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
235 Alan Hayward <alan.hayward@arm.com>
236 David Sherwood <david.sherwood@arm.com>
237
238 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
239 into scalar_mode_supported_p call.
240 (handle_mode_attribute): Update call to scalar_mode_supported_p.
241
16d22000
RS
2422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
243 Alan Hayward <alan.hayward@arm.com>
244 David Sherwood <david.sherwood@arm.com>
245
246 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
247 for the mode iterator.
248
b397965c
RS
2492017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
250 Alan Hayward <alan.hayward@arm.com>
251 David Sherwood <david.sherwood@arm.com>
252
253 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
254 * c-common.c (c_build_vec_perm_expr): Likewise.
255
357b7604
RS
2562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
257 Alan Hayward <alan.hayward@arm.com>
258 David Sherwood <david.sherwood@arm.com>
259
260 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
261
e05c94ba
RS
2622017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
263 Alan Hayward <alan.hayward@arm.com>
264 David Sherwood <david.sherwood@arm.com>
265
266 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
267 before calling targetm.addr_space.valid_pointer_mode.
268
5c20c4af
RS
2692017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
270 Alan Hayward <alan.hayward@arm.com>
271 David Sherwood <david.sherwood@arm.com>
272
273 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
274
c94843d2
RS
2752017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
276 Alan Hayward <alan.hayward@arm.com>
277 David Sherwood <david.sherwood@arm.com>
278
279 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
280 iterators.
281 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
282
4e10a5a7
RS
2832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
284 Alan Hayward <alan.hayward@arm.com>
285 David Sherwood <david.sherwood@arm.com>
286
287 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
288 case statements.
289
130fcab0
ML
2902017-08-29 Martin Liska <mliska@suse.cz>
291
292 PR other/39851
293 * c-common.c (parse_optimize_options): Add argument to function
294 call.
295 * c-pragma.c (handle_pragma_diagnostic): Likewise.
296
14e18d71
DM
2972017-08-24 David Malcolm <dmalcolm@redhat.com>
298
299 * c-lex.c (interpret_float): Use token location
300 when building an EXCESS_PRECISION_EXPR.
301
2f687306
DM
3022017-08-21 David Malcolm <dmalcolm@redhat.com>
303
304 * c-common.c (check_function_arguments): Add "arglogs" param; pass
305 it to check_function_format.
306 * c-common.h (check_function_arguments): Add vec<location_t> *
307 param.
308 (check_function_format): Likewise.
309 * c-format.c (struct format_check_context): Add field "arglocs".
310 (check_function_format): Add param "arglocs"; pass it to
311 check_format_info.
312 (check_format_info): Add param "arglocs"; use it to initialize
313 new field of format_ctx.
314 (check_format_arg): Pass format_ctx->arglocs to new param of
315 check_format_info_main.
316 (class argument_parser): New field "arglocs".
317 (argument_parser::argument_parser): Add "arglocs_" param and use
318 it to initialize new field.
319 (argument_parser::check_argument_type): Pass new arglocs field to
320 check_format_types.
321 (check_format_info_main): Add param "arglocs", and use it when
322 constructing arg_parser.
323 (check_format_types): Add param "arglocs"; use it if non-NULL when
324 !EXPR_HAS_LOCATION (cur_param) to get at location information.
325
00aa1fa2
L
3262017-08-18 H.J. Lu <hongjiu.lu@intel.com>
327
328 PR c/53037
329 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
330 (c_common_attribute_table): Add warn_if_not_aligned.
331 (handle_aligned_attribute): Renamed to ...
332 (common_handle_aligned_attribute): Remove argument, name, and add
333 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
334 (handle_aligned_attribute): New.
335 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
336
27be025d
MS
3372017-08-14 Martin Sebor <msebor@redhat.com>
338
339 PR c/81117
340 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
341 (handle_nonstring_attribute): New function.
342
da67acb9
MS
3432017-08-14 Martin Sebor <msebor@redhat.com>
344
345 PR c/81117
346 * c-format.h (T89_G): New macro.
347 * c-format.c (local_gcall_ptr_node): New variable.
348 (init_dynamic_diag_info): Initialize it.
349
a8b522b4
ML
3502017-08-11 Martin Liska <mliska@suse.cz>
351
352 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
353 TARGET_SUPPORTS_ALIASES.
354
32129a17
DM
3552017-08-10 David Malcolm <dmalcolm@redhat.com>
356
357 * c-common.c (c_parse_error): Add rich_location * param, using it
358 rather implicitly using input_location.
359 * c-common.h (c_parse_error): Add rich_location * param.
360
30af3a2b
MP
3612017-08-09 Marek Polacek <polacek@redhat.com>
362
363 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
364 (c_common_truthvalue_conversion): Likewise.
365 * c-omp.c (c_finish_omp_atomic): Likewise.
366 * c-common.h (build_binary_op): Update declaration.
367
314e6352
ML
3682017-08-08 Martin Liska <mliska@suse.cz>
369
370 * c-ada-spec.c: Include header files.
371 * c-ubsan.c: Likewise.
372 * c-warn.c: Likewise.
373
56b5041c
JJ
3742017-08-07 Jakub Jelinek <jakub@redhat.com>
375
376 PR c/69389
377 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
378
db440138
EB
3792017-08-07 Eric Botcazou <ebotcazou@adacore.com>
380
381 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
382 (print_ada_methods): Likewise.
383 (print_ada_declaration): Likewise.
384
577eec56
ML
3852017-08-07 Martin Liska <mliska@suse.cz>
386
387 * array-notation-common.c: Add new includes.
388 * c-format.c( handle_format_attribute): Canonicalize a format
389 function name.
390 * c-lex.c (c_common_has_attribute): Canonicalize name of an
391 attribute.
392 * c-pretty-print.c: Add new include.
393
b854df3c
EB
3942017-08-05 Eric Botcazou <ebotcazou@adacore.com>
395
396 * c-ada-spec.c (has_static_fields): Look only into variables.
397 (print_constructor): Add TYPE parameter and use it for the name.
398 (print_destructor): Likewise.
399 (print_ada_declaration): Adjust to new constructor/destructor names.
400 Adjust calls to print_constructor and print_destructor.
401 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
402 Look only into variables in the final loop.
403
9f2cb25e
EB
4042017-08-01 Eric Botcazou <ebotcazou@adacore.com>
405
406 * c-ada-spec.c (has_static_fields): Look only into fields.
407 (dump_generic_ada_node): Small tweak.
408 (dump_nested_types): Look only into fields.
409 (print_ada_declaration): Look only into methods. Small tweak.
410 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
411
f4bcd9eb
EB
4122017-08-01 Eric Botcazou <ebotcazou@adacore.com>
413
414 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
415 (dump_ada_function_declaration): Likewise.
416 (dump_generic_ada_node): Likewise.
417 (print_ada_declaration): Add support for const-qualified variables.
418
f34ebeb2
ML
4192017-07-31 Martin Liska <mliska@suse.cz>
420
421 PR sanitize/81530
422 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
423 Guard condition with flag_sanitize_p also with current_function_decl
424 non-null equality.
425 (ubsan_maybe_instrument_reference_or_call): Likewise.
426
218e5d04
UB
4272017-07-30 Uros Bizjak <ubizjak@gmail.com>
428
429 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
430
942047f2
EB
4312017-07-29 Eric Botcazou <ebotcazou@adacore.com>
432
433 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
434 for enumeral types.
435 (print_ada_declaration): Add missing guard for record types.
436
a40ff0ae
JJ
4372017-07-27 Jakub Jelinek <jakub@redhat.com>
438
439 PR c/45784
440 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
441 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
442 new COMPOUND_EXPRs around the rhs of the comparison.
443
06bd22f6
MP
4442017-07-27 Marek Polacek <polacek@redhat.com>
445
446 PR c/81417
447 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
448 the types.
449
036ea399
JJ
4502017-07-27 Jakub Jelinek <jakub@redhat.com>
451
452 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
453 (handle_noipa_attribute): New function.
454
417ca011
TD
4552017-07-07 Torsten Duwe <duwe@suse.de>
456
457 * c-attribs.c (c_common_attribute_table): Add entry for
458 "patchable_function_entry".
459
5aaa8fb4
NS
4602017-07-20 Nathan Sidwell <nathan@acm.org>
461
462 Remove TYPE_METHODS.
463 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
464 dump_ada_template, print_ada_methods,
465 print_ada_declaration): Member fns are on TYPE_FIELDS.
466
ff22eb12
NS
4672017-07-18 Nathan Sidwell <nathan@acm.org>
468
469 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
470
eea77d1f
DM
4712017-07-14 David Malcolm <dmalcolm@redhat.com>
472
473 * c-common.c (try_to_locate_new_include_insertion_point): New
474 function.
475 (per_file_includes_t): New typedef.
476 (added_includes_t): New typedef.
477 (added_includes): New variable.
478 (maybe_add_include_fixit): New function.
479 * c-common.h (maybe_add_include_fixit): New decl.
480
281ac396
MS
4812017-07-10 Martin Sebor <msebor@redhat.com>
482
483 PR other/81345
484 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
485
b6f43128
DM
4862017-07-06 David Malcolm <dmalcolm@redhat.com>
487
488 * c-common.c (selftest::c_family_tests): New.
489 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
490 (selftest::c_family_tests): New decl.
491
efbf55b0
MP
4922017-07-04 Marek Polacek <polacek@redhat.com>
493
494 PR c/81231
495 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
496 types.
497
6c86bd88
MP
4982017-07-04 Marek Polacek <polacek@redhat.com>
499
500 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
501
17a7218b
ML
5022017-06-28 Martin Liska <mliska@suse.cz>
503
504 PR ipa/81128
505 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
506 to a function declaration.
507
63010089
ML
5082017-06-28 Martin Liska <mliska@suse.cz>
509
510 PR driver/79659
511 * c.opt: Add IntegerRange to various options.
512
3e2becc4
MP
5132017-06-26 Marek Polacek <polacek@redhat.com>
514
515 PR c/80116
516 * c-common.h (warn_for_multistatement_macros): Declare.
517 * c-warn.c: Include "c-family/c-indentation.h".
518 (warn_for_multistatement_macros): New function.
519 * c.opt (Wmultistatement-macros): New option.
520 * c-indentation.c (guard_tinfo_to_string): No longer static.
521 Change the parameter type to "enum rid". Handle RID_SWITCH.
522 * c-indentation.h (guard_tinfo_to_string): Declare.
523
2db9b7cd
MG
5242017-06-23 Marc Glisse <marc.glisse@inria.fr>
525
526 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
527
c3684b7b
MS
5282017-06-15 Martin Sebor <msebor@redhat.com>
529
530 PR c++/80560
531 * c.opt (-Wclass-memaccess): New option.
532
e72c4afd
BK
5332017-06-14 Boris Kolpackov <boris@codesynthesis.com>
534
535 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
536
8a516588
MP
5372017-06-13 Marek Polacek <polacek@redhat.com>
538
539 PR objc/80949
540 * c-warn.c (do_warn_duplicated_branches): Return if any of the
541 branches is null.
542
45b2222a
ML
5432017-06-13 Martin Liska <mliska@suse.cz>
544
545 PR sanitize/78204
546 * c-attribs.c (add_no_sanitize_value): New function.
547 (handle_no_sanitize_attribute): Likewise.
548 (handle_no_sanitize_address_attribute): Use the function.
549 (handle_no_sanitize_thread_attribute): New function.
550 (handle_no_address_safety_analysis_attribute): Use
551 add_no_sanitize_value.
552 (handle_no_sanitize_undefined_attribute): Likewise.
553 * c-common.h: Declare new functions.
554 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
555 (ubsan_instrument_shift): Likewise.
556 (ubsan_instrument_bounds): Likewise.
557 (ubsan_maybe_instrument_array_ref): Likewise.
558 (ubsan_maybe_instrument_reference_or_call): Likewise.
559
a01f151f
JM
5602017-06-11 Jason Merrill <jason@redhat.com>
561
562 * c-ada-spec.c, c-pragma.c: Use id_equal.
563
3de4ac6d
MP
5642017-06-04 Marek Polacek <polacek@redhat.com>
565
566 PR c/80919
567 * c-format.c (matching_type_p): Return false if any of the types
568 requires structural equality.
569
2474f48f
MS
5702017-06-02 Martin Sebor <msebor@redhat.com>
571
572 PR c/80892
573 * c-warn.c (conversion_warning): Use -Wconversion for integer
574 conversion and -Wfloat-conversion for floating one.
575
40ffd95f
BE
5762017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
577
578 * c.opt (Wsizeof-pointer-div): New warning option.
579
3fa4634c
VR
5802017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
581
582 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
583 (Wcatch-value=1): Enable by -Wall.
584
f012c8ef
DM
5852017-05-30 David Malcolm <dmalcolm@redhat.com>
586
587 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
588 format_chars.
589 * c.opt (fdiagnostics-show-template-tree): New option.
590 (felide-type): New option.
591
63dbcd13
VR
5922017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
593
594 * c.opt (Wcatch-value=): New C++ warning flag.
595
be136b5c
NS
5962017-05-24 Nathan Sidwell <nathan@acm.org>
597
598 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
599 const casts to avoid warning.
600
3cd211af
MS
6012017-05-24 Martin Sebor <msebor@redhat.com>
602
603 PR c/80731
604 * c-common.h (unsafe_conversion_p): Add a function argument.
605 * c-common.c (unsafe_conversion_p): Same.
606 Add type names and values to diagnostics.
607 (scalar_to_vector): Adjust.
608 * c-warn.c (constant_expression_error): Add a function argument.
609 Add type names and values to diagnostics.
610 (conversion_warning): Add a function argument.
611 Add type names and values to diagnostics.
612 (warnings_for_convert_and_check): Same.
613
1ff7be5a
JM
6142017-05-19 Jason Merrill <jason@redhat.com>
615
616 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
617 enumerators.
618
ff502317
BE
6192017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
620
621 * c-format.c (locus): Move out of function scope,
622 add GTY attribute.
623
2a8a8d7b
NS
6242017-05-19 Nathan Sidwell <nathan@acm.org>
625
626 * c-opts.c (class_dump_file, class_dump_flags): Delete.
627 (c_common_parse_file): Remove class dump handling.
628 (get_dump_info): Likewise.
629
39aac208
RB
6302017-05-19 Richard Biener <rguenther@suse.de>
631
632 PR c++/80593
633 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
634 to alias-set zero memory.
635
6ecd2339
BE
6362017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
637
638 * c-format.c (local_tree_type_node): Add GTY attribute.
639
6574d78e
MP
6402017-05-18 Marek Polacek <polacek@redhat.com>
641
642 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
643 (c_common_fixed_point_type_for_size): Likewise.
644 (c_common_type_for_mode): Likewise.
645 (shorten_compare): Likewise.
646 (c_promoting_integer_type_p): Use false/true instead of 0/1.
647 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
648
e3455240
MP
6492017-05-18 Marek Polacek <polacek@redhat.com>
650
651 * c-common.c (self_promoting_args_p): Change the return type to bool.
652 Use false/true instead of 0/1.
653 * c-common.h (self_promoting_args_p): Update.
654
3fa8871b
MP
6552017-05-17 Marek Polacek <polacek@redhat.com>
656
657 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
658 * c-warn.c: Likewise.
659
b42cc3ca
VV
6602017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
661
662 Implement new C++ intrinsics __is_assignable and __is_constructible.
663 * c-common.c (__is_assignable, __is_constructible): New.
664 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
665
1a817418
ML
6662017-05-17 Martin Liska <mliska@suse.cz>
667
668 * c-common.h: Introduce dump_flags_t type and
669 use it instead of int type.
670 * c-gimplify.c (c_genericize): Likewise.
671 * c-opts.c: Likewise.
672
b2fa0a8b
MP
6732017-05-17 Marek Polacek <polacek@redhat.com>
674
675 * c-common.c (c_save_expr): Remove.
676 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
677 * c-common.h (c_save_expr): Remove declaration.
678
31c2d57d
VR
6792017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
680
681 PR c/35441
682 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
683 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
684 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
685 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
686 RDIV_EXPR.
687 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
688
684f84de
MP
6892017-05-09 Marek Polacek <polacek@redhat.com>
690
691 PR c/80525
692 * c-warn.c (unwrap_c_maybe_const): New.
693 (warn_logical_operator): Call it.
694
641da50a
NS
6952017-05-09 Nathan Sidwell <nathan@acm.org>
696
697 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
698 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
699
631238ac
MS
7002017-05-08 Martin Sebor <msebor@redhat.com>
701
702 PR translation/80280
703 * c-format.h (struct format_flag_spec): Add new member.
704 (T89_T): New macro.
705 * c-format.c (local_tree_type_node): New global.
706 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
707 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
708 (strfmon_flag_specs): Likewise.
709 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
710 with distinct quoting properties.
711 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
712 (flag_chars_t::validate): Add argument and handle bad quoting.
713 (check_format_info_main): Handle quoting problems.
714 (init_dynamic_diag_info): Simplify.
715
49f0c04c
JM
7162017-05-08 Jason Merrill <jason@redhat.com>
717
718 * c-opts.c (c_common_post_options): Update defaults for
719 flag_abi_version and flag_abi_compat_version.
720
56d35585
DM
7212017-05-05 David Malcolm <dmalcolm@redhat.com>
722
723 * c-common.c (c_cpp_error): Replace report_diagnostic
724 with diagnostic_report_diagnostic.
725
0f2c4a8f
MS
7262017-05-04 Martin Sebor <msebor@redhat.com>
727
728 PR translation/80280
729 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
730 (handle_weakref_attribute): Same.
731
6fe63fb4
NS
7322017-05-03 Nathan Sidwell <nathan@acm.org>
733
734 Canonicalize canonical type hashing
735 * c-common.c (complete_array_type): Use type_hash_canon.
736
815d9cc6
XR
7372017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
738
739 PR c++/80038
740 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
741 prototype.
742 (cilk_install_body_pedigree_operations): Likewise.
743 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
744 detatched.
745 (cilk_gimplify_call_params_in_spawned_fn): Remove.
746 (cilk_install_body_pedigree_operations): Likewise.
747 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
748 unwrapping.
749
f8a36447
JJ
7502017-04-27 Jakub Jelinek <jakub@redhat.com>
751
752 PR c++/80534
753 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
754 flag on non-aggregate element types.
755
7c145456
BE
7562017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
757
758 * c-common.c (c_type_hasher, type_hash_table): Remove.
759 (c_common_get_alias_set): Remove unreachable code.
760 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
761
c3cbcd45
VR
7622017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
763
764 * c.opt (Wextra-semi): New C++ warning flag.
765
8a59d466
JJ
7662017-04-20 Jakub Jelinek <jakub@redhat.com>
767
768 PR middle-end/80423
769 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
770
8487c9a5
JJ
7712017-04-18 Jakub Jelinek <jakub@redhat.com>
772
773 PR middle-end/79788
774 PR middle-end/80375
775 * c-common.c (c_common_type_for_mode): Don't handle
776 widest_*_literal_type_node here.
777 c_common_signed_or_unsigned_type): Likewise.
778 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
779 to *intTI_type_node or *intDI_type_node depending on whether
780 TImode is supported by the target or not.
781
3ee0fb02
ML
7822017-04-10 Martin Liska <mliska@suse.cz>
783
784 PR sanitizer/80350
785 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
786 doing an UBSAN check.
787
5764ee3c
JW
7882017-04-03 Jonathan Wakely <jwakely@redhat.com>
789
790 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
791
6f3af356
JJ
7922017-03-31 Jakub Jelinek <jakub@redhat.com>
793
794 PR c++/79572
795 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
796 tree *.
797 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
798 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
799 REFERENCE_TYPE.
800
f6a7a9d5
DM
8012017-03-31 David Malcolm <dmalcolm@redhat.com>
802
803 PR documentation/78732
804 * c.opt (Wendif-labels): Fix description to refer to
805 #else rather than #elif.
806
af88f557
JJ
8072017-03-31 Jakub Jelinek <jakub@redhat.com>
808
809 PR libstdc++/80251
810 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
811 * c-common.c (c_common_reswords): Add __is_aggregate trait.
812
a9e4a1a5
JJ
8132017-03-27 Jakub Jelinek <jakub@redhat.com>
814
815 PR middle-end/80162
816 * c-common.c (c_common_mark_addressable_vec): Don't set
817 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
818
3f01b620
MS
8192017-03-21 Martin Sebor <msebor@redhat.com>
820
821 PR c++/79548
822 * c-common.c (set_underlying_type): Mark type used only when
823 original del is declared unused.
824
2f6f187a
DM
8252017-03-10 David Malcolm <dmalcolm@redhat.com>
826
827 PR translation/79848
828 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
829 "%qs".
830
a02fa805
DM
8312017-03-10 David Malcolm <dmalcolm@redhat.com>
832
833 PR c/79921
834 * c-indentation.c (warn_for_misleading_indentation): Remove parens
835 from inform's message, so that xgettext can locate it.
836
822a132c
MP
8372017-03-09 Marek Polacek <polacek@redhat.com>
838
839 PR c++/79962
840 PR c++/79984
841 * c-attribs.c (handle_nonnull_attribute): Save the result of default
842 conversion to the attribute list.
843
bba81f1c
ML
8442017-03-09 Martin Liska <mliska@suse.cz>
845
846 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
847
108154ff
JM
8482017-03-03 Jason Merrill <jason@redhat.com>
849
850 * c.opt (Wnoexcept-type): New.
851
eb0e7c34
RB
8522017-03-02 Richard Biener <rguenther@suse.de>
853
854 PR c/79756
855 * c-common.c (c_common_mark_addressable_vec): Look through
856 C_MAYBE_CONST_EXPR.
857
9453ba0a
ML
8582017-02-28 Martin Liska <mliska@suse.cz>
859
860 * c.opt: Replace space with tabular for options of <number>
861 type.
862
6a825afe
ML
8632017-02-28 Martin Liska <mliska@suse.cz>
864
865 * c.opt: Fix --help=option -Q for options which are of
866 an enum type.
867
4227c9ad
JJ
8682017-02-24 Jakub Jelinek <jakub@redhat.com>
869
870 PR c++/79588
871 * c-common.c (check_function_restrict): New function.
872 (check_function_arguments): Add FNDECL argument. Call
873 check_function_restrict if -Wrestrict.
874 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
875 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
876 * c-common.h (check_function_arguments): Add FNDECL argument.
877 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
878
59909673
EB
8792017-02-24 Eric Botcazou <ebotcazou@adacore.com>
880
881 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
882 treatment of parameters with pointer-to-tagged type and tidy up.
883 (print_ada_methods): Remove the special treatment of C++ static member
884 functions.
885
54dcd526
ML
8862017-02-22 Martin Liska <mliska@suse.cz>
887
888 * c.opt: Replace inequality signs with square brackets
889 for -Wnornalized.
890
00bc9de3
JJ
8912017-02-21 Jakub Jelinek <jakub@redhat.com>
892
893 PR c++/79641
894 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
895 preserve quals.
896
97fcf744
JM
8972017-02-17 Joseph Myers <joseph@codesourcery.com>
898
899 * c-cppbuiltin.c (builtin_define_float_constants): Define
900 __DECIMAL_DIG__ to the value for long double.
901
c7545f1c
MP
9022017-02-15 Marek Polacek <polacek@redhat.com>
903
904 PR c/79515
905 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
906 conversion has occured.
907
c2e84327
DM
9082017-01-24 David Malcolm <dmalcolm@redhat.com>
909
910 * c-common.c (c_common_reswords): Add "__RTL".
911 * c-common.h (enum rid): Add RID_RTL.
912
2ebd93e1
MP
9132017-01-20 Marek Polacek <polacek@redhat.com>
914
915 PR c/64279
916 * c-common.h (do_warn_duplicated_branches_r): Declare.
917 * c-gimplify.c (c_genericize): Walk the function tree calling
918 do_warn_duplicated_branches_r.
919 * c-warn.c (expr_from_macro_expansion_r): New.
920 (do_warn_duplicated_branches): New.
921 (do_warn_duplicated_branches_r): New.
922 * c.opt (Wduplicated-branches): New option.
923
0d80ab91
DM
9242017-01-17 David Malcolm <dmalcolm@redhat.com>
925
926 PR c++/71497
927 * c-indentation.c (warn_for_misleading_indentation): Use the past
928 subjunctive in the note.
929
7f991c36
AH
9302017-01-17 Aldy Hernandez <aldyh@redhat.com>
931
932 PR c/79116
933 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
934 start type to integer_type.
935
1c70261c
JJ
9362017-01-16 Jakub Jelinek <jakub@redhat.com>
937
938 PR driver/49726
939 * c.opt (gen-decls): Add Driver flag.
940
1ddca3f3
PC
9412017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
942
943 Revert:
944 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
945
946 PR c++/71737
947 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
948
7d2f3f1d
PC
9492017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
950
951 PR c++/71737
952 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
953
bce6f760
MS
9542017-01-12 Martin Sebor <msebor@redhat.com>
955
956 (-Wformat-overflow): ...to this.
957
bf5fbf46
MS
9582017-01-11 Martin Sebor <msebor@redhat.com>
959
960 PR c/78768
961 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
962 Also enable for LTO.
963
e363df3f
JM
9642017-01-10 Jason Merrill <jason@redhat.com>
965
966 Implement P0195R2, C++17 variadic using.
967 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
968
bd2c6270
JJ
9692017-01-09 Jakub Jelinek <jakub@redhat.com>
970
971 PR translation/79019
972 PR translation/79020
973 * c.opt (Wnormalized=): Fix typo in description.
974
efcc8d38
MS
9752017-01-08 Martin Sebor <msebor@redhat.com>
976
977 PR middle-end/77708
978 * c.opt (-Wformat-truncation): New option.
979
435f3f7a
AO
9802017-01-06 Alexandre Oliva <aoliva@redhat.com>
981
982 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
983 value to unsigned short to fit in 4 hex digits without
984 warnings.
985
4e89adf9
EB
9862017-01-05 Eric Botcazou <ebotcazou@adacore.com>
987
988 * c.opt (fsso-struct): Add 'native' value.
989
cd445b54
ML
9902017-01-05 Martin Liska <mliska@suse.cz>
991
992 PR pch/78970
993 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
994 header.
995
a9342885
MP
9962017-01-04 Marek Polacek <polacek@redhat.com>
997
998 PR c++/64767
999 * c.opt (Wpointer-compare): New option.
1000
fc73e60c
JJ
10012017-01-04 Jakub Jelinek <jakub@redhat.com>
1002
1003 PR driver/78957
1004 * c.opt (fsso-struct=): Add RejectNegative.
1005
cbe34bb5
JJ
10062017-01-01 Jakub Jelinek <jakub@redhat.com>
1007
1008 Update copyright years.
1009
d4a6c0ea
ML
10102016-12-29 Martin Liska <mliska@suse.cz>
1011
1012 PR c/78933
1013 * c.opt (strong-eval-order): Add RejectNegative keyword.
1014
67a5ad7c
JM
10152016-12-22 Jason Merrill <jason@redhat.com>
1016
1017 Implement P0522R0, matching of template template arguments.
1018 * c-cppbuiltin.c (c_cpp_builtins): Define
1019 __cpp_template_template_args.
1020
0dba7960
JJ
10212016-12-21 Jakub Jelinek <jakub@redhat.com>
1022
1023 PR bootstrap/78817
1024 * c-common.c (struct nonnull_arg_ctx): New type.
1025 (check_function_nonnull): Return bool instead of void. Use
1026 nonnull_arg_ctx as context rather than just location_t.
1027 (check_nonnull_arg): Adjust for the new context type, set
1028 warned_p to true if a warning has been diagnosed.
1029 (check_function_arguments): Return bool instead of void.
1030 * c-common.h (check_function_arguments): Adjust prototype.
1031
31bfc9b9
JM
10322016-12-21 Jason Merrill <jason@redhat.com>
1033
1034 * c.opt (-fnew-ttp-matching): New flag.
1035 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1036
629b3d75
MJ
10372016-12-14 Martin Jambor <mjambor@suse.cz>
1038
1039 * c-omp.c: Include omp-general.h instead of omp-low.h.
1040 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1041 name.
1042
474da67e
MS
10432016-12-14 Martin Sebor <msebor@redhat.com>
1044
1045 PR c/17308
1046 * c-common.c (check_nonnull_arg): Disable when optimization
1047 is enabled.
1048
fe366b87
MP
10492016-12-12 Marek Polacek <polacek@redhat.com>
1050
1051 PR c++/78647
1052 * c-common.c (attribute_fallthrough_p): Return false for
1053 error_mark_node.
1054
8bd9f164
MS
10552016-12-08 Martin Sebor <msebor@redhat.com>
1056
1057 PR c/78284
1058 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1059
060162e0
MS
10602016-12-08 Martin Sebor <msebor@redhat.com>
1061
1062 PR c/78165
1d0cf89a
MS
1063 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1064 suffix.
060162e0 1065
ee92e7ba
MS
10662016-12-07 Martin Sebor <msebor@redhat.com>
1067
1068 PR c/53562
1069 PR middle-end/77784
1070 PR middle-end/78149
1071 PR middle-end/78138
1072 * c.opt (-Wstringop-overflow): New option.
1073
84b0769e
MO
10742016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
1075
1076 * c-attribs.c (asan odr indicator): New attribute.
1077 (handle_asan_odr_indicator_attribute): New function.
1078
7fa6a965
PK
10792016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1080
1081 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
1082 ptrdiff_type_node;
1083
56d8ffc1
JG
10842016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1085
1086 * c-common.c (excess_precision_mode_join): New.
1087 (c_ts18661_flt_eval_method): New.
1088 (c_c11_flt_eval_method): Likewise.
1089 (c_flt_eval_method): Likewise.
1090 * c-common.h (excess_precision_mode_join): New.
1091 (c_flt_eval_method): Likewise.
1092 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
1093 (cpp_iec_559_value): Call it.
1094 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
1095 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
1096 __FLT_EVAL_METHOD_TS_18661_3__.
1097
04f0fcf7
JG
10982016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1099
1100 * c-opts.c (c_common_post_options): Add logic to handle the default
1101 case for -fpermitted-flt-eval-methods.
1102
fb2675cb
PB
11032016-11-23 Paolo Bonzini <bonzini@gnu.org>
1104
1105 * c.opt (Wexpansion-to-defined): New.
1106
ec1c5694
JJ
11072016-11-23 Jakub Jelinek <jakub@redhat.com>
1108
1109 PR target/78451
1110 * c-pragma.c (handle_pragma_target): Don't replace
1111 current_target_pragma, but chainon the new args to the current one.
1112
730c9e75
NS
11132016-11-22 Nathan Sidwell <nathan@acm.org>
1114
1115 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 1116 indentation and formatting.
730c9e75 1117
89990732
MS
11182016-11-21 Martin Sebor <msebor@redhat.com>
1119
1120 * c.opt (-fprintf-return-value): Enable by default.
1121
48330c93
BE
11222016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1123
1124 PR c++/71973
1125 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
1126 * c-common.c (c_common_nodes_and_builtins): Initialize
1127 const_tm_ptr_type_node.
1128
0d939c95
MP
11292016-11-16 Marek Polacek <polacek@redhat.com>
1130
1131 PR c/78285
1132 * c-common.c (c_add_case_label): Turn error_at calls into inform.
1133
8e745a17
JJ
11342016-11-14 Jakub Jelinek <jakub@redhat.com>
1135
1136 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
1137
1ee62b92 11382016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
1139 Richard Biener <rguenther@suse.de>
1140
1141 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
1142 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
1143 * c.opt (fgimple): New option.
1ee62b92 1144
22b15758
UB
11452016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1146
1147 PR c/35503
1148 * c-common.h (warn_for_restrict): Declare.
1149 * c-warn.c: Include gcc-rich-location.h.
1150 (warn_for_restrict): New function.
1151 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
1152 (gcc_cdiag_char_table): Likewise.
1153 (gcc_cxxdiag_char_table): Likewise.
1154 * c.opt (Wrestrict): New option.
1155
4be719cd
EB
11562016-11-13 Eric Botcazou <ebotcazou@adacore.com>
1157
1158 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
1159 for nested types only if the type is a record or union and dump SLOC.
1160
4a826ca6
JM
11612016-11-09 Jason Merrill <jason@redhat.com>
1162
1163 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
1164
2e955d50
JJ
11652016-11-09 Jakub Jelinek <jakub@redhat.com>
1166
1167 * c-ubsan.c (ubsan_instrument_shift): Handle split
1168 -fsanitize=shift-base and -fsanitize=shift-exponent.
1169
51dc6603
JM
11702016-11-07 Jason Merrill <jason@redhat.com>
1171
1172 * c.opt (Wc++1z-compat): New.
1173 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
1174
6dc4a604
ML
11752016-11-07 Martin Liska <mliska@suse.cz>
1176
1177 * c-warn.c (warn_for_unused_label): Save all labels used
1178 in goto or in &label.
1179
b302001e
JM
11802016-11-03 Jason Merrill <jason@redhat.com>
1181
1182 * c-cppbuiltin.c (c_cpp_builtins): Correct
1183 __cpp_inheriting_constructors.
1184
31f7f784
JM
11852016-11-01 Jason Merrill <jason@redhat.com>
1186
2bc78e3c
JM
1187 * c-cppbuiltin.c (c_cpp_builtins): Update
1188 __cpp_inheriting_constructors.
1189
31f7f784
JM
1190 * c.opt (-fnew-inheriting-ctors): New.
1191 * c-opts.c: Default to on for ABI 11+.
1192
dcb466ec
JJ
11932016-10-31 Jakub Jelinek <jakub@redhat.com>
1194
1195 PR c++/77948
1196 * c.opt (fext-numeric-literals): Add Var and Init.
1197 * c-opts.c (c_common_handle_option): Don't clear
1198 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
1199 (c_common_post_options): Clear it here if not set
1200 explicitly.
1201
52e1b91e
AH
12022016-10-28 Aldy Hernandez <aldyh@redhat.com>
1203
1204 PR debug/77773
1205 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
1206 if NULL.
1207
e16f1cc7
JJ
12082016-10-25 Jakub Jelinek <jakub@redhat.com>
1209
1210 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
1211 * c-common.c (c_common_reswords): Add __builtin_launder.
1212
f8348061
BE
12132016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
1214
1215 * c-common.c (c_common_truthvalue_conversion): Warn for
1216 multiplications in boolean context. Fix the quoting of '<<' and '<'
1217 in the shift warning.
1218
eff89e01
BE
12192016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1220
1221 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
1222
24bc7bf4
JM
12232016-10-20 Jason Merrill <jason@redhat.com>
1224
1225 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
1226
4c712374
BE
12272016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1228
1229 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
1230 integer shift ops in boolean context.
1231
12322016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
1233
1234 * c.opt (Walloca): New.
1235 (Walloca-larger-than=): New.
1236 (Wvla-larger-than=): New.
1237
8fa18c06
MP
12382016-10-17 Marek Polacek <polacek@redhat.com>
1239
1240 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
1241 Return immediately when finding a match.
1242 (warn_tautological_cmp): Remove a boolean variable that is no longer
1243 needed.
1244
b12b1915
MP
12452016-10-17 Marek Polacek <polacek@redhat.com>
1246
1247 * c-attribs.c: New file.
1248 * c-common.c: Move attributes handling to c-attribs.c.
1249 (get_nonnull_operand): No longer static.
1250 * c-common.h: Move the declarations from c-attribs.c to its own section.
1251
2045acd9
JM
12522016-10-14 Jason Merrill <jason@redhat.com>
1253
1254 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
1255 and __cpp_deduction_guides.
1256
14a2c9aa
JM
12572016-10-13 Jason Merrill <jason@redhat.com>
1258
1259 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
1260
4d0cdd0c
TP
12612016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1262
1263 * c-cppbuiltin.c: Include memmodel.h.
1264 * c-opts.c: Likewise.
1265 * c-pragma.c: Likewise.
1266 * c-warn.c: Likewise.
1267
70f6d5e1
JJ
12682016-10-12 Jakub Jelinek <jakub@redhat.com>
1269
1270 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
1271 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
1272 * c-opts.c (sanitize_cpp_opts): Initialize
1273 cpp_opts->cpp_warn_implicit_fallthrough.
1274
78f61294
MP
12752016-10-11 Marek Polacek <polacek@redhat.com>
1276
1277 * c-common.c (warning_candidate_p): Change the return type to bool
1278 and return true/false instead of 1/0.
1279 (vector_mode_valid_p): Likewise.
1280
038b5cc0
MP
12812016-10-11 Marek Polacek <polacek@redhat.com>
1282
1283 * c-common.c (fold_for_warn): No longer static.
1284 (bool_promoted_to_int_p): Likewise.
1285 (c_common_get_narrower): Likewise.
1286 (constant_expression_warning): Move to c-warn.c.
1287 (constant_expression_error): Likewise.
1288 (overflow_warning): Likewise.
1289 (warn_logical_operator): Likewise.
1290 (find_array_ref_with_const_idx_r): Likewise.
1291 (warn_tautological_cmp): Likewise.
1292 (expr_has_boolean_operands_p): Likewise.
1293 (warn_logical_not_parentheses): Likewise.
1294 (warn_if_unused_value): Likewise.
1295 (strict_aliasing_warning): Likewise.
1296 (sizeof_pointer_memaccess_warning): Likewise.
1297 (check_main_parameter_types): Likewise.
1298 (conversion_warning): Likewise.
1299 (warnings_for_convert_and_check): Likewise.
1300 (match_case_to_enum_1): Likewise.
1301 (match_case_to_enum): Likewise.
1302 (c_do_switch_warnings): Likewise.
1303 (warn_for_omitted_condop): Likewise.
1304 (readonly_error): Likewise.
1305 (lvalue_error): Likewise.
1306 (invalid_indirection_error): Likewise.
1307 (warn_array_subscript_with_type_char): Likewise.
1308 (warn_about_parentheses): Likewise.
1309 (warn_for_unused_label): Likewise.
1310 (warn_for_div_by_zero): Likewise.
1311 (warn_for_memset): Likewise.
1312 (warn_for_sign_compare): Likewise.
1313 (do_warn_double_promotion): Likewise.
1314 (do_warn_unused_parameter): Likewise.
1315 (record_locally_defined_typedef): Likewise.
1316 (maybe_record_typedef_use): Likewise.
1317 (maybe_warn_unused_local_typedefs): Likewise.
1318 (maybe_warn_bool_compare): Likewise.
1319 (maybe_warn_shift_overflow): Likewise.
1320 (warn_duplicated_cond_add_or_warn): Likewise.
1321 (diagnose_mismatched_attributes): Likewise.
1322 * c-common.h: Move the declarations from c-warn.c to its own section.
1323 * c-warn.c: New file.
1324
627be19f
JM
13252016-10-08 Jason Merrill <jason@redhat.com>
1326
1327 * c-common.c (c_common_truthvalue_conversion): Don't distribute
1328 into COND_EXPR in C++.
1329
7bad794a
JJ
13302016-10-08 Jakub Jelinek <jakub@redhat.com>
1331
1332 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
1333 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
1334 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
1335
be845b04
JJ
13362016-10-07 Jakub Jelinek <jakub@redhat.com>
1337
1338 Implement LWG2296 helper intrinsic
1339 * c-common.h (enum rid): Add RID_ADDRESSOF.
1340 * c-common.c (c_common_reswords): Add __builtin_addressof.
1341
c09c4992
BE
13422016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
1343
1344 PR c++/77700
1345 * c-common.c (c_common_truthvalue_conversion): Warn also for
1346 suspicious enum values in boolean context.
1347
342cfb3e
JJ
13482016-10-06 Jakub Jelinek <jakub@redhat.com>
1349
1350 Implement P0258R2 - helper for C++17
1351 std::has_unique_object_representations trait
1352 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
1353 * c-common.c (c_common_reswords): Add
1354 __has_unique_object_representations.
1355
2e69f143
JJ
13562016-10-05 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR sanitizer/66343
1359 * c-ubsan.c (ubsan_instrument_return): Don't call
1360 initialize_sanitizer_builtins here.
1361
700fff34
BE
13622016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1363
1364 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
1365 conditional expression in boolean context when only one arm is
1366 non-boolean.
1367
9563bfcd
JJ
13682016-10-05 Jakub Jelinek <jakub@redhat.com>
1369
04a32443
JJ
1370 PR sanitizer/77823
1371 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
1372 is not integral.
1373
9563bfcd
JJ
1374 * c-common.c (c_common_reswords): Update comment for C++11.
1375
f1644724
JM
13762016-10-04 Jason Merrill <jason@redhat.com>
1377
1378 * c-common.c (make_tree_vector_from_ctor): New.
1379 * c-common.h: Declare it.
1380
5a79befb
JJ
13812016-10-04 Jakub Jelinek <jakub@redhat.com>
1382
1383 * c-cppbuiltin.c (c_cpp_builtins): Don't define
1384 __LIBGCC_JCR_SECTION_NAME__.
1385
1633d3b9
BE
13862016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
1387
1388 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
1389 left shift in boolean context.
1390
a2c6e7f2
JJ
13912016-09-29 Jakub Jelinek <jakub@redhat.com>
1392
1393 Implement P0001R1 - C++17 removal of register storage class specifier
1394 * c.opt (Wregister): New warning.
1395 * c-opts.c (c_common_post_options): Enable -Wregister by
1396 default for C++17.
1397
75304c87
JG
13982016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
1399
1400 * c-opts.c (c_common_post_options): Remove special case for
1401 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
1402 in C++.
1403
bbfac6da
JJ
14042016-09-27 Jakub Jelinek <jakub@redhat.com>
1405
6e39060a
JJ
1406 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
1407 -std=c++1z.
1408
bbfac6da
JJ
1409 * c-ada-spec.c (print_ada_declaration): Remove break after return.
1410
e73cf9a2
TP
14112016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
1412
1413 * c-common.c: Include memmodel.h.
1414
c6147dc4
MP
14152016-09-26 Marek Polacek <polacek@redhat.com>
1416
1417 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
1418
81fea426
MP
14192016-09-26 Marek Polacek <polacek@redhat.com>
1420
1421 PR c/7652
1422 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
1423 (handle_fallthrough_attribute): New function.
1424 (attribute_fallthrough_p): New function.
1425 * c-common.h (attribute_fallthrough_p): Declare.
1426
9a2300e9
MP
14272016-09-24 Marek Polacek <polacek@redhat.com>
1428
1429 PR c/77490
1430 * c.opt (Wbool-operation): New.
1431
a09e9e35
BE
14322016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1433
1434 * c-common.c (c_common_truthvalue_conversion): Inhibit
1435 Wint-in-bool-context warning with from_macro_definition_at.
1436 Mention the expression will always evaluate to true.
1437
d43b4ccc
MS
14382016-09-21 Martin Sebor <msebor@redhat.com>
1439
1440 PR bootstrap/77676
1441 * c.opt (fprintf-return-value): Temporarily initialize to zero
1442 to unblock bootstrap failures.
1443
2e1c20b1
JJ
14442016-09-21 Jakub Jelinek <jakub@redhat.com>
1445
1446 PR c++/77651
1447 * c.opt (Waligned-new=): Add RejectNegative.
1448 (faligned-new=): Likewise. Spelling fix - change
1449 aligned_new_threshhold to aligned_new_threshold.
1450 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
1451 to aligned_new_threshold.
1452
88d0c3f0
MS
14532016-09-20 Martin Sebor <msebor@redhat.com>
1454
1455 PR middle-end/49905
1456 * c.opt: Add -Wformat-length and -fprintf-return-value.
1457
144a96e4
BE
14582016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1459
1460 PR c++/77434
1461 * c.opt (Wint-in-bool-context): New warning.
1462 * c-common.c (c_common_truthvalue_conversion): Warn on integer
1463 constants in boolean context.
1464
63012d9a
JM
14652016-09-19 Joseph Myers <joseph@codesourcery.com>
1466
1467 * c-common.c (max_align_t_align): Also consider alignment of
1468 float128_type_node.
1469
931388ce
JM
14702016-09-15 Jason Merrill <jason@redhat.com>
1471
1472 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
1473 DECL_EXTERNAL.
1474
38711381
JM
14752016-09-14 Jason Merrill <jason@redhat.com>
1476
1477 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1478 limit FIELD_DECL, either.
1479
e51fbec3
MP
14802016-09-14 Marek Polacek <polacek@redhat.com>
1481
1482 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
1483 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
1484 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
1485
254830ba
DM
14862016-09-13 David Malcolm <dmalcolm@redhat.com>
1487
1488 * c-common.c (warn_logical_not_parentheses): Replace
1489 rich_location::add_fixit_insert calls with add_fixit_insert_before
1490 and add_fixit_insert_after, eliminating the "next_loc" calculation.
1491
42763690
JM
14922016-09-13 Jason Merrill <jason@redhat.com>
1493 Tom de Vries <tom@codesourcery.com>
1494
1495 PR c++/77427
1496 * c-common.c (set_underlying_type): Don't treat array as builtin type.
1497
9453eee9
JM
14982016-09-13 Jason Merrill <jason@redhat.com>
1499
1500 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1501 limit types at all.
1502
e96809e3
JM
15032016-09-12 Jason Merrill <jason@redhat.com>
1504
1505 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
1506 bit/byte confusion, allow large alignment for types.
1507
54dcdb88
BE
15082016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1509
1510 PR c++/77496
1511 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
1512
d1463eb9
DM
15132016-09-12 David Malcolm <dmalcolm@redhat.com>
1514
1515 PR c/72858
1516 * c-format.c (argument_parser::check_argument_type): Add params
1517 "type_start" and "conversion_char". Use the former to generate
1518 offset_to_type_start and pass it and conversion_char to
1519 check_format_types.
1520 (check_format_info_main): Capture the start of the type
1521 information as "type_start", and pass it an format_char
1522 to arg_parser.check_argument_type.
1523 (check_format_types): Provide an example in the leading comment.
1524 Add params "offset_to_type_start" and "conversion_char"; pass
1525 them to format_type_warning calls.
1526 (test_get_modifier_for_format_len): Likewise.
1527 (matching_type_p): New function.
1528 (get_format_for_type): Add param "conversion_char" and move
1529 implementation into...
1530 (get_format_for_type_1): ...new function, called twice.
1531 Use new function matching_type_p rather than checking for
1532 TYPE_CANONICAL equality.
1533 (get_corrected_substring): New function.
1534 (format_type_warning): Provide an example in the leading comment.
1535 Add params "offset_to_type_start" and "conversion_char". Replace
1536 call to get_format_for_type with call to get_corrected_substring
1537 and move rejection of hints for widths/precisions there.
1538 (assert_format_for_type_streq): Add param "conversion_char".
1539 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
1540 (test_get_format_for_type_printf): Add conversion chars to the
1541 tests, adding coverage for various combinations of integer
1542 vs double conversions, and for preserving octal and hexadecimal
1543 conversions.
1544 (test_get_format_for_type_scanf): Add conversion chars to the
1545 tests.
1546
5b28efbb
TV
15472016-09-10 Tom de Vries <tom@codesourcery.com>
1548
1549 PR C/71602
1550 * c-common.c (build_va_arg): Handle more strict
1551 targetm.canonical_va_list_type. Replace first argument type error with
1552 assert.
1553
3f0177e7
MS
15542016-09-09 Martin Sebor <msebor@redhat.com>
1555
1556 PR c/77520
1557 PR c/77521
1558 * c-format.c (argument_parser::find_format_char_info): Use %qc
1559 format directive unconditionally.
1560
af63ba4b
JM
15612016-09-09 Jason Merrill <jason@redhat.com>
1562
1563 Implement C++17 new of over-aligned types.
1564 * c.opt: Add -faligned-new and -Waligned-new.
1565 * c-common.c (max_align_t_align): Split out from...
1566 (cxx_fundamental_alignment_p): ...here.
1567 * c-common.h: Declare it.
1568 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
1569
c65248cb
JM
15702016-09-09 Joseph Myers <joseph@codesourcery.com>
1571
1572 * c-cppbuiltin.c (builtin_define_type_width): New function.
1573 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
1574 macros.
1575
e5106e27
DM
15762016-09-07 David Malcolm <dmalcolm@redhat.com>
1577
1578 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
1579 a POINTER_TYPE.
1580 (substring_loc::get_location): Move to substring-locations.c,
1581 keeping implementation as...
1582 (c_get_substring_location): New function, from the above, reworked
1583 to use accessors rather than member lookup.
1584 * c-common.h (class substring_loc): Move to substring-locations.h,
1585 replacing with a forward decl.
1586 (c_get_substring_location): New decl.
1587 * c-format.c: Include "substring-locations.h".
1588 (format_warning_va): Move to substring-locations.c.
1589 (format_warning_at_substring): Likewise.
1590
a42e7952
MS
15912016-09-06 Martin Sebor <msebor@redhat.com>
1592
1593 PR c/77336
1594 * c-format.c (check_function_format): Avoid issuing warnings for
1595 functions unless they call format functions with non-constant
1596 format strings.
1597
b772a565
RB
15982016-09-06 Richard Biener <rguenther@suse.de>
1599
1600 PR c/77450
1601 * c-common.c (c_common_mark_addressable_vec): Handle
1602 COMPOUND_LITERAL_EXPR.
1603
25ff5dd3
MP
16042016-09-05 Marek Polacek <polacek@redhat.com>
1605
1606 PR c/77423
1607 * c-common.c (bool_promoted_to_int_p): New function.
1608 (expr_has_boolean_operands_p): New function.
1609 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
1610 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
1611
21234eb5
TV
16122016-09-04 Tom de Vries <tom@codesourcery.com>
1613
1614 revert:
1615 2016-08-29 Tom de Vries <tom@codesourcery.com>
1616
1617 * c-common.c (build_va_arg): Replace first argument type error
1618 with assert.
1619
9dc5773f
JJ
16202016-09-02 Jakub Jelinek <jakub@redhat.com>
1621
1622 PR c/65467
1623 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
1624 (c_finish_omp_for): Reject _Atomic qualified iterators.
1625
16262016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
1627
1628 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
1629 size to guarantee it fits the output of the formatted function
1630 regardless of its arguments.
1631
295844f6
MP
16322016-09-01 Marek Polacek <polacek@redhat.com>
1633
1634 PR c/7652
1635 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
1636 FALLTHRU comments.
1637
3d06b6f2
MP
16382016-08-29 Marek Polacek <polacek@redhat.com>
1639
1640 PR c/77292
1641 * c-common.c (warn_logical_not_parentheses): Don't warn for
1642 a comparison or a logical operator.
1643
34cedad5
TV
16442016-08-29 Tom de Vries <tom@codesourcery.com>
1645
1646 * c-common.c (build_va_arg): Fix type comparison assert.
1647
f162d717
TV
16482016-08-29 Tom de Vries <tom@codesourcery.com>
1649
1650 * c-common.c (build_va_arg): Replace first argument type error
1651 with assert.
1652
ba9bbd6f
TV
16532016-08-29 Tom de Vries <tom@codesourcery.com>
1654
1655 PR c/77398
1656 * c-common.c (build_va_arg): Add first argument error. Build va_arg
1657 with error_mark_node as va_list instead of with illegal va_list.
1658
ebef225f
MP
16592016-08-25 Marek Polacek <polacek@redhat.com>
1660 David Malcolm <dmalcolm@redhat.com>
1661
1662 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
1663 * c-common.h (warn_logical_not_parentheses): Update declaration.
1664
b00e6e75
MP
16652016-08-22 Marek Polacek <polacek@redhat.com>
1666
1667 PR c++/77321
1668 * c-common.c (warn_for_memset): Check type for null.
1669
6dc198e3
JM
16702016-08-22 Joseph Myers <joseph@codesourcery.com>
1671
1672 * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
1673 _FloatNx types for suffixes for built-in functions.
1674
c65699ef
JM
16752016-08-19 Joseph Myers <joseph@codesourcery.com>
1676
1677 PR c/32187
1678 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
1679 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
1680 (RID_FLOAT128X): New enum rid values.
1681 (CASE_RID_FLOATN_NX): New macro.
1682 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
1683 keywords.
1684 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
1685 corresponding complex types.
1686 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
1687 _FloatNx and corresponding complex types.
1688 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
1689 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
1690 and _FloatNx types for the widest type for determining
1691 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
1692 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
1693 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
1694 and _FloatNx types.
1695 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
1696 constants.
1697 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
1698 _FloatNx types.
1699
cc015f3a
DM
17002016-08-18 David Malcolm <dmalcolm@redhat.com>
1701
1702 * c-opts.c (c_diagnostic_finalizer): Update for change to
1703 diagnostic_show_locus.
1704
cb18fd07
DM
17052016-08-18 David Malcolm <dmalcolm@redhat.com>
1706
1707 * c-common.c: Include "spellcheck.h".
1708 (cb_get_suggestion): New function.
1709 * c-common.h (cb_get_suggestion): New decl.
1710 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
1711 cb_get_suggestion.
1712
a76989dc
MP
17132016-08-18 Marek Polacek <polacek@redhat.com>
1714
1715 PR c/71514
1716 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
1717 and pointer-to-VLA.
1718
65e736c0
DM
17192016-08-16 David Malcolm <dmalcolm@redhat.com>
1720
1721 PR c/72857
1722 * c-common.c (substring_loc::get_range): Rename to...
1723 (substring_loc::get_location): ...this, converting param from a
1724 source_range * to a location_t *. Call
1725 get_source_location_for_substring rather than
1726 get_source_range_for_substring, and pass in m_caret_idx.
1727 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
1728 (substring_loc::get_range): Replace with...
1729 (substring_loc::get_location): ...this.
1730 (substring_loc::set_caret_index): New method.
1731 (substring_loc): Add field m_caret_idx.
1732 * c-format.c (format_warning_va): Update for above changes.
1733 Rename local "substring_loc" to "fmt_substring_loc" to avoid
1734 clashing with type name.
1735 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
1736 (check_argument_type): Likewise.
1737 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
1738 Use a copy when emitting warnings, setting the caret index from TYPE.
1739
7e1dde14 17402016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 1741 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
1742
1743 * c-ada-spec.c (dump_number): New function.
1744 (handle_escape_character): Likewise.
1745 (print_ada_macros): Add handling of constant integers and strings.
1746
191816a3
MP
17472016-08-12 Marek Polacek <polacek@redhat.com>
1748
1749 PR c/7652
1750 * c-common.c (scalar_to_vector): Adjust fall through comment.
1751 * c-opts.c (c_common_handle_option): Likewise.
1752 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
1753 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
1754 fall through comment.
1755 * cilk.c (extract_free_variables): Add FALLTHRU.
1756
452df4a4
JM
17572016-08-10 Jason Merrill <jason@redhat.com>
1758
1759 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
1760
f3365c12
JM
17612016-08-09 Jason Merrill <jason@redhat.com>
1762
1763 * c-common.c (c_common_attribute_table): vector_size affects type
1764 identity.
1765
f0bc3323
MP
17662016-08-09 Marek Polacek <polacek@redhat.com>
1767
1768 PR c/7652
1769 * c-ada-spec.c (dump_generic_ada_node): Add return.
1770
98e5a19a
JM
17712016-08-09 Jason Merrill <jason@redhat.com>
1772
1773 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
1774 C++17 constexpr lambdas.
1775
895aa8e1
DM
17762016-08-08 David Malcolm <dmalcolm@redhat.com>
1777
1778 PR c/64955
1779 * c-common.h (selftest::c_format_c_tests): New declaration.
1780 (selftest::run_c_tests): New declaration.
1781 * c-format.c: Include "selftest.h.
1782 (format_warning_va): Add param "corrected_substring" and use
1783 it to add a replacement fix-it hint.
1784 (format_warning_at_substring): Likewise.
1785 (format_warning_at_char): Update for new param of
1786 format_warning_va.
1787 (argument_parser::check_argument_type): Pass "fki" to
1788 check_format_types.
1789 (check_format_types): Add param "fki" and pass it to
1790 format_type_warning.
1791 (deref_n_times): New function.
1792 (get_modifier_for_format_len): New function.
1793 (selftest::test_get_modifier_for_format_len): New function.
1794 (get_format_for_type): New function.
1795 (format_type_warning): Add param "fki" and use it to attempt
1796 to provide hints for argument types when calling
1797 format_warning_at_substring.
1798 (selftest::get_info): New function.
1799 (selftest::assert_format_for_type_streq): New function.
1800 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
1801 (selftest::test_get_format_for_type_printf): New function.
1802 (selftest::test_get_format_for_type_scanf): New function.
1803 (selftest::c_format_c_tests): New function.
1804
e52ed3fe
DM
18052016-08-08 David Malcolm <dmalcolm@redhat.com>
1806
1807 PR c/52952
1808 * c-format.c: Include "diagnostic.h".
1809 (location_column_from_byte_offset): Delete.
1810 (location_from_offset): Delete.
1811 (format_warning_va): New function.
1812 (format_warning_at_substring): New function.
1813 (format_warning_at_char): New function.
1814 (check_format_arg): Capture location of format_tree and pass to
1815 check_format_info_main.
1816 (argument_parser): Add fields "start_of_this_format" and
1817 "format_string_cst".
1818 (flag_chars_t::validate): Add param "format_string_cst". Convert
1819 warning_at call using location_from_offset to call to
1820 format_warning_at_char.
1821 (argument_parser::argument_parser): Add param "format_string_cst_"
1822 and use use it to initialize field "format_string_cst".
1823 Initialize new field "start_of_this_format".
1824 (argument_parser::read_format_flags): Convert warning_at call
1825 using location_from_offset to a call to format_warning_at_char.
1826 (argument_parser::read_any_format_left_precision): Likewise.
1827 (argument_parser::read_any_format_precision): Likewise.
1828 (argument_parser::read_any_other_modifier): Likewise.
1829 (argument_parser::find_format_char_info): Likewise, in three places.
1830 (argument_parser::parse_any_scan_set): Likewise, in one place.
1831 (argument_parser::handle_conversions): Likewise, in two places.
1832 (argument_parser::check_argument_type): Add param "fmt_param_loc"
1833 and use it to make a substring_loc. Pass the latter to
1834 check_format_types.
1835 (check_format_info_main): Add params "fmt_param_loc" and
1836 "format_string_cst". Convert warning_at calls using
1837 location_from_offset to calls to format_warning_at_char. Pass the
1838 new params to the arg_parser ctor. Pass "format_string_cst" to
1839 flag_chars.validate. Pass "fmt_param_loc" to
1840 arg_parser.check_argument_type.
1841 (check_format_types): Convert first param from a location_t
1842 to a const substring_loc & and rename to "fmt_loc". Attempt
1843 to extract the range of the relevant parameter and pass it
1844 to format_type_warning.
1845 (format_type_warning): Convert first param from a location_t
1846 to a const substring_loc & and rename to "fmt_loc". Add
1847 params "param_range" and "type". Replace calls to warning_at
1848 with calls to format_warning_at_substring.
1849
1c4d457e
DM
18502016-08-08 David Malcolm <dmalcolm@redhat.com>
1851
1852 * c-format.c (class flag_chars_t): New class.
1853 (struct length_modifier): New struct.
1854 (class argument_parser): New class.
1855 (flag_chars_t::flag_chars_t): New ctor.
1856 (flag_chars_t::has_char_p): New method.
1857 (flag_chars_t::add_char): New method.
1858 (flag_chars_t::validate): New method.
1859 (flag_chars_t::get_alloc_flag): New method.
1860 (flag_chars_t::assignment_suppression_p): New method.
1861 (argument_parser::argument_parser): New ctor.
1862 (argument_parser::read_any_dollar): New method.
1863 (argument_parser::read_format_flags): New method.
1864 (argument_parser::read_any_format_width): New method.
1865 (argument_parser::read_any_format_left_precision): New method.
1866 (argument_parser::read_any_format_precision): New method.
1867 (argument_parser::handle_alloc_chars): New method.
1868 (argument_parser::read_any_length_modifier): New method.
1869 (argument_parser::read_any_other_modifier): New method.
1870 (argument_parser::find_format_char_info): New method.
1871 (argument_parser::validate_flag_pairs): New method.
1872 (argument_parser::give_y2k_warnings): New method.
1873 (argument_parser::parse_any_scan_set): New method.
1874 (argument_parser::handle_conversions): New method.
1875 (argument_parser::check_argument_type): New method.
1876 (check_format_info_main): Introduce classes argument_parser
1877 and flag_chars_t, moving the code within the loop into methods
1878 of these classes. Make various locals "const".
1879
88fa5555
DM
18802016-08-05 David Malcolm <dmalcolm@redhat.com>
1881
1882 * c-common.c: Include "substring-locations.h".
1883 (get_cpp_ttype_from_string_type): New function.
1884 (g_string_concat_db): New global.
1885 (substring_loc::get_range): New method.
1886 * c-common.h (g_string_concat_db): New declaration.
1887 (class substring_loc): New class.
1888 * c-lex.c (lex_string): When concatenating strings, capture the
1889 locations of all tokens using a new obstack, and record the
1890 concatenation locations within g_string_concat_db.
1891 * c-opts.c (c_common_init_options): Construct g_string_concat_db
1892 on the ggc-heap.
1893
78169471
MP
18942016-07-29 Marek Polacek <polacek@redhat.com>
1895
638fc14f
MP
1896 PR c/71926
1897 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
1898 parentheses warning.
1899
78169471
MP
1900 PR c/71574
1901 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
1902
1225d6b1
ML
19032016-07-28 Martin Liska <mliska@suse.cz>
1904
1905 PR gcov-profile/68025
1906 * c-common.c (handle_no_profile_instrument_function_attribute):
1907
ec1e2a40
BE
19082016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1909
1910 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
1911 BITS_PER_UNIT_LOG.
1912
5ec2cd9f
JM
19132016-07-25 Jason Merrill <jason@redhat.com>
1914
1915 PR c++/65970
1916 * c.opt (fconstexpr-loop-limit): New.
1917
9dc5773f 19182016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
1919
1920 PR c++/71675
1921 * c-common.c (resolve_overloaded_builtin): Avoid converting
1922 __atomic_compare_exchange_n return type to that of what its
1923 first argument points to.
1924
e3fe09c1
UB
19252016-07-22 Uros Bizjak <ubizjak@gmail.com>
1926
1927 * c-common.c: Use HOST_WIDE_INT_M1U instead of
1928 ~(unsigned HOST_WIDE_INT) 0.
1929
bc91c436
ML
19302016-07-22 Martin Liska <mliska@suse.cz>
1931
1932 PR gcov-profile/69028
1933 PR gcov-profile/62047
1934 * cilk.c (create_cilk_helper_decl): Set location of a new decl
1935 to the current_function_decl.
1936
451dcc66
JM
19372016-07-21 Jason Merrill <jason@redhat.com>
1938
1939 PR c++/65168
1940 * c-common.c (c_common_truthvalue_conversion): Check
1941 c_inhibit_evaluation_warnings for warning about address of
1942 reference.
1943
de6a69ee
DM
19442016-07-20 David Malcolm <dmalcolm@redhat.com>
1945
1946 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
1947 const char *.
1948
d022c55a
JM
19492016-07-15 Jason Merrill <jason@redhat.com>
1950
1951 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
1952
ddbbcb19
JJ
19532016-07-15 Jakub Jelinek <jakub@redhat.com>
1954
1955 PR c/71858
1956 * c-common.h (enum lookup_name_fuzzy_kind): Add
1957 FUZZY_LOOKUP_FUNCTION_NAME.
1958
d0cf395a
JM
19592016-07-08 Jason Merrill <jason@redhat.com>
1960
1961 P0145: Refining Expression Order for C++.
1962 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
1963 * c-opts.c: Adjust.
1964
98d44e93
MT
19652016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
1966
1967 PR c++/71214
1968 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
1969
f9d8d994
TS
19702016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1971
1972 * c-pragma.h (enum pragma_kind): Rename
1973 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
1974 users.
1975
4aa83879
RB
19762016-06-29 Richard Biener <rguenther@suse.de>
1977
1978 PR middle-end/71002
1979 * c-common.c (c_common_get_alias_set): Remove union type punning case.
1980
a25bd9e6
JM
19812016-06-24 Jason Merrill <jason@redhat.com>
1982
1983 P0145R2: Refining Expression Order for C++.
1984 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
1985 MODIFY_EXPR.
1986
a86451b9
JJ
19872016-06-24 Jakub Jelinek <jakub@redhat.com>
1988
1989 * c-common.c (check_builtin_function_arguments): Require last
1990 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
1991 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
1992 if the last argument is pointer to enumerated or boolean type.
1993
1a4f11c8
DM
19942016-06-22 David Malcolm <dmalcolm@redhat.com>
1995
1996 PR c/70339
1997 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
1998 (lookup_name_fuzzy): New prototype.
1999
fe55692c
JDA
20002016-06-21 John David Anglin <danglin@gcc.gnu.org>
2001
2002 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2003
4eb24e01
JM
20042016-06-14 Jason Merrill <jason@redhat.com>
2005
2006 P0145R2: Refining Expression Order for C++.
2007 * c.opt (fargs-in-order): New.
2008 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2009
ef7cf206
JJ
20102016-06-13 Jakub Jelinek <jakub@redhat.com>
2011
0dda258b
JJ
2012 PR sanitizer/71498
2013 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2014 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2015
ef7cf206
JJ
2016 PR preprocessor/71183
2017 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2018 to cb_get_source_date_epoch.
2019
50b15873
JJ
20202016-06-10 Jakub Jelinek <jakub@redhat.com>
2021
2022 PR c/68657
2023 * c.opt (Wpsabi): Add Warning flag.
2024
4d926e34
MS
20252016-06-10 Martin Sebor <msebor@redhat.com>
2026
2027 PR c/71392
2028 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
2029 the nonnull attribute in type-generic builtins.
2030
e01b4e16
MS
20312016-06-09 Martin Sebor <msebor@redhat.com>
2032
2033 PR c/70883
2034 * c-common.c (builtin_function_validate_nargs): Make text of error
2035 message consistent with others like it.
2036
44a845ca
MS
20372016-06-08 Martin Sebor <msebor@redhat.com>
2038 Jakub Jelinek <jakub@redhat.com>
2039
2040 PR c++/70507
2041 PR c/68120
2042 * c-common.c (check_builtin_function_arguments): Handle
2043 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2044
a80a7051
RB
20452016-06-08 Richard Biener <rguenther@suse.de>
2046
2047 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2048
bfd67b47
RB
20492016-06-07 Richard Biener <rguenther@suse.de>
2050
2051 PR c/61564
2052 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2053 options and warn about others.
2054
15c98b2e
ES
20552016-06-01 Eduard Sanou <dhole@openmailbox.org>
2056
2057 * c-common.c (get_source_date_epoch): Rename to
2058 cb_get_source_date_epoch.
2059 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2060 message when the parsing fails. Use error_at instead of fatal_error.
2061 * c-common.h (get_source_date_epoch): Rename to
2062 cb_get_source_date_epoch.
2063 * c-common.h (cb_get_source_date_epoch): Prototype.
2064 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2065 * c-common.h (c_omp_region_type): Remove trailing comma.
2066 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2067 * c-lex.c (c_lex_with_flags): Remove initialization of
2068 pfile->source_date_epoch.
2069
00631022
JJ
20702016-05-30 Jakub Jelinek <jakub@redhat.com>
2071
2072 PR c++/71349
2073 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2074 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
2075 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
2076 instead of C_OMP_CLAUSE_SPLIT_FOR.
2077
f17a223d
RB
20782016-05-24 Richard Biener <rguenther@suse.de>
2079
2080 PR middle-end/70434
2081 PR c/69504
2082 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
2083 (convert_vector_to_array_for_subscript): ... this.
2084 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
2085 VIEW_CONVERT_EXPR to an array type. Rename to ...
2086 (convert_vector_to_array_for_subscript): ... this.
2087
4f2e1536
MP
20882016-05-12 Marek Polacek <polacek@redhat.com>
2089
2090 PR c/70756
2091 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
2092 size_in_bytes and pass LOC to it.
2093
d6e83a8d
MM
20942016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2095
2096 PR c/43651
2097 * c.opt (Wduplicate-decl-specifier): New option.
2098
5c3a10fb
MP
20992016-05-11 Marek Polacek <polacek@redhat.com>
2100
2101 PR c++/71024
2102 * c-common.c (diagnose_mismatched_attributes): New function.
2103 * c-common.h (diagnose_mismatched_attributes): Declare.
2104
deef7113
MP
21052016-05-04 Marek Polacek <polacek@redhat.com>
2106
2107 * c.opt (Wdangling-else): New option.
2108
79ce98bc
MP
21092016-05-03 Marek Polacek <polacek@redhat.com>
2110
2111 PR c/70859
2112 * c-common.c (builtin_function_validate_nargs): Add location
2113 parameter. Use it.
2114 (check_builtin_function_arguments): Add location and arguments
2115 parameters. Use them.
2116 * c-common.h (check_builtin_function_arguments): Update declaration.
2117
381cdae4
RB
21182016-05-03 Richard Biener <rguenther@suse.de>
2119
2120 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
2121 allow call args to gimplify to SSA names.
2122
1d793c34
MP
21232016-05-03 Marek Polacek <polacek@redhat.com>
2124
2125 * c-common.h (enum c_omp_region_type): Remove stray comma.
2126
77886428
CP
21272016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2128
2129 * c-common.h (enum c_omp_region_type): Define.
2130
697e0b28
RS
21312016-05-02 Richard Sandiford <richard.sandiford@arm.com>
2132
2133 * c-common.c (shorten_compare): Use wi::to_wide.
2134
e7ff0319
CP
21352016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2136
2137 PR middle-end/70626
2138 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
2139 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
2140 reduction clauses in acc parallel loops.
2141
2fff3db8
MP
21422016-04-29 Marek Polacek <polacek@redhat.com>
2143
2144 PR c/70852
2145 * c-common.c (warn_for_memset): Check domain before accessing it.
2146
509063eb
DV
21472016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
2148
2149 PR/69089
2150 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
2151 "aligned" attribute.
2152
b632761d
JM
21532016-04-28 Jason Merrill <jason@redhat.com>
2154
2155 * c-lex.c (c_common_has_attribute): Handle nodiscard.
2156
174f6622
ES
21572016-04-28 Eduard Sanou <dhole@openmailbox.org>
2158 Matthias Klose <doko@debian.org>
2159
2160 * c-common.c (get_source_date_epoch): New function, gets the environment
2161 variable SOURCE_DATE_EPOCH and parses it as long long with error
2162 handling.
2163 * c-common.h (get_source_date_epoch): Prototype.
2164 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2165
6bc2bb18
RB
21662015-04-27 Ryan Burn <contact@rnburn.com>
2167
2168 PR c++/69024
2169 PR c++/68997
2170 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
2171 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
2172 external linkage.
2173 (cilk_detect_and_unwrap): Corresponding changes.
2174 (extract_free_variables): Don't extract free variables from
2175 AGGR_INIT_EXPR slot.
2176 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
2177 (cilk_recognize_spawn): Likewise.
2178
c1e1f433
BS
21792016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2180
2181 * c.opt (Wmemset-elt-size): New option.
2182 * c-common.c (warn_for_memset): New function.
2183 * c-common.h (warn_for_memset): Declare.
2184
d067e05f
JM
21852016-04-25 Jason Merrill <jason@redhat.com>
2186
2187 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
2188 No longer static.
2189 * c-common.h: Declare it.
2190 * c-lex.c (c_common_has_attribute): Add maybe_unused.
2191
9aa36ae5
JM
21922016-04-22 Jason Merrill <jason@redhat.com>
2193
2194 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2195
477d4906
IV
21962016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2197
2198 PR c++/69363
2199 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
2200 * c-common.h (c_finish_cilk_clauses): Remove declaration.
2201
fe37c7af
MM
22022016-04-18 Michael Matz <matz@suse.de>
2203
2204 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
2205 and SET_DECL_ALIGN.
2206
23f2660f
EB
22072016-04-17 Eric Botcazou <ebotcazou@adacore.com>
2208
2209 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
2210 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
2211 to incomplete types.
2212 (dump_nested_type): Remove redundant tests and tidy up.
2213 (print_ada_declaration): Also set TREE_VISITED on the declaration of
2214 a type which is the typedef of an original type.
2215
1e77281b
MP
22162016-04-15 Marek Polacek <polacek@redhat.com>
2217
2218 PR c/70651
2219 * c-common.c (build_va_arg): Change two asserts into errors and return
2220 error_mark_node.
2221
b3a77f21
MP
22222016-04-13 Marek Polacek <polacek@redhat.com>
2223
2224 PR c++/70639
2225 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
2226 for switch statements, too.
2227
322b8466
JM
22282016-03-28 Jason Merrill <jason@redhat.com>
2229
2230 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2231
fbdb6baf
MP
22322016-03-23 Marek Polacek <polacek@redhat.com>
2233
2234 PR c++/69884
2235 * c.opt (Wignored-attributes): New option.
2236
5c240f4d
DM
22372016-03-22 David Malcolm <dmalcolm@redhat.com>
2238
2239 PR c/69993
2240 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
2241 diagnostic text, reversing the order of the warning and note so
2242 that they appear in source order.
2243
14ba7b28
MP
22442016-03-17 Marek Polacek <polacek@redhat.com>
2245
2246 PR c/69407
2247 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
2248 operations.
2249
08a1cadc
JM
22502016-03-14 Jason Merrill <jason@redhat.com>
2251
2aaeea19
JM
2252 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
2253
08a1cadc
JM
2254 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2255
c06d25bb
RB
22562016-03-09 Richard Biener <rguenther@suse.de>
2257
2258 PR c/70143
2259 * c-common.c (strict_aliasing_warning): Add back
2260 alias_sets_conflict_p check.
2261
80aac5c8
JM
22622016-03-08 Jason Merrill <jason@redhat.com>
2263
2264 * c-opts.c (set_std_cxx1z): Don't enable concepts.
2265
64b23c13
DM
22662016-03-04 David Malcolm <dmalcolm@redhat.com>
2267
2268 PR c/68187
2269 * c-indentation.c (get_visual_column): Move code to determine next
2270 tab stop to...
2271 (next_tab_stop): ...this new function.
2272 (line_contains_hash_if): Delete function.
2273 (detect_preprocessor_logic): Delete function.
2274 (get_first_nws_vis_column): New function.
2275 (detect_intervening_unindent): New function.
2276 (should_warn_for_misleading_indentation): Replace call to
2277 detect_preprocessor_logic with a call to
2278 detect_intervening_unindent.
2279
729526f5
DM
22802016-03-04 David Malcolm <dmalcolm@redhat.com>
2281
2282 PR c/68187
2283 * c-indentation.c (should_warn_for_misleading_indentation): When
2284 suppressing warnings about cases where the guard and body are on
2285 the same column, only use the first non-whitespace column in place
2286 of the guard token column when dealing with "else" clauses.
2287 When rejecting aligned BODY and NEXT, loosen the requirement
2288 from equality with the first non-whitespace of guard to simply
2289 that they not be indented relative to it.
2290
e9a35493
RB
22912016-03-04 Richard Biener <rguenther@suse.de>
2292
2293 PR c++/70054
2294 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
2295 instead of alias_sets_conflict_p.
2296
1be56bc5
MP
22972016-03-01 Marek Polacek <polacek@redhat.com>
2298
2299 PR c++/69795
2300 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
2301 any DECL.
2302
35886f0b
MS
23032016-02-22 Martin Sebor <msebor@redhat.com>
2304
2305 PR middle-end/69780
2306 * c-common.c (check_builtin_function_arguments): Validate and
2307 reject invalid arguments to __builtin_alloca_with_align.
2308
4246c8da
MW
23092016-02-20 Mark Wielaard <mjw@redhat.com>
2310
2311 PR c/28901
2312 * c.opt (Wunused-const-variable): Turn into Alias for...
2313 (Wunused-const-variable=): New option.
2314
268be88c
BE
23152016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2316
2317 PR c++/69865
2318 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
2319 here...
2320 (c_common_init_options): ...to here.
2321 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2322
871b3f47
JJ
23232016-02-19 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR c++/69826
2326 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
2327 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
2328 flag_preprocess_only.
2329
bf14eba2
JJ
23302016-02-16 Jakub Jelinek <jakub@redhat.com>
2331
2332 PR c/69835
2333 * c.opt (Wnonnull-compare): Enable for -Wall.
2334
ba6b3795
JJ
23352016-02-15 Jakub Jelinek <jakub@redhat.com>
2336
2337 PR c++/69797
2338 * c-common.c (sync_resolve_size): Diagnose too few arguments
2339 even when params is non-NULL empty vector.
2340
a011cd92
BS
23412016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2342
2343 PR target/60410
2344 * c.opt (fshort-double): Remove.
2345
46cb9332
MS
23462016-02-05 Martin Sebor <msebor@redhat.com>
2347
2348 PR c++/69662
2349 * c.opt (Warning options): Update -Wplacement-new to take
2350 an optional argument.
2351
e1b81f2b
JJ
23522016-02-01 Jakub Jelinek <jakub@redhat.com>
2353
2354 PR preprocessor/69543
2355 PR c/69558
2356 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
2357 instead of loc to control_warning_option.
2358
b6adbb9f
NS
23592016-02-01 Nathan Sidwell <nathan@codesourcery.com>
2360
2361 * c.opt (fopenacc-dim=): New option.
2362
5d70666e
RB
23632016-01-27 Ryan Burn <contact@rnburn.com>
2364
2365 PR cilkplus/69267
2366 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
2367 gimplify_arg. Removed superfluous post_p argument.
2368 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
2369 superfluous post_p argument.
2370 * c-gimplify.c (c_gimplify_expr): Likewise.
2371
01e1dea3
DM
23722016-01-26 David Malcolm <dmalcolm@redhat.com>
2373
2374 PR other/69006
2375 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
2376 pp_newline_and_flush with pp_flush.
2377
9f04a53e
MS
23782016-01-20 Martin Sebor <msebor@redhat.com>
2379
2380 PR c/69405
2381 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
2382 an incompatible argument when the argument isn't a valid tree node.
2383
7f26f7df
JM
23842016-01-18 Jason Merrill <jason@redhat.com>
2385
2386 PR c++/68767
2387 * c-common.c (check_function_arguments_recurse): Fold the whole
2388 COND_EXPR, not just the condition.
2389
f62bf092
TV
23902016-01-18 Tom de Vries <tom@codesourcery.com>
2391
2392 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
2393 classify as loop clause.
2394
e0a575ff
JJ
23952016-01-15 Jakub Jelinek <jakub@redhat.com>
2396
2397 PR bootstrap/68271
2398 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
2399 C++ FE no longer has limit on number of pragmas.
2400
24012015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
2402
2403 PR c++/69048
2404 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 2405 to add missing cleanup point.
b6e3db06 2406
c7df95d8
DM
24072016-01-14 David Malcolm <dmalcolm@redhat.com>
2408
2409 PR c++/68819
2410 * c-indentation.c (get_visual_column): Add location_t param.
2411 Handle the column number being zero by effectively disabling the
2412 warning, with an "inform".
2413 (should_warn_for_misleading_indentation): Add location_t argument
2414 for all uses of get_visual_column.
2415
21efdd80
PP
24162016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
2417
2418 PR c++/69029
2419 * c-indentation.c (should_warn_for_misleading_indentation):
2420 Don't warn about do-while statements.
2421
7a127fa7
MS
24222016-01-07 Martin Sebor <msebor@redhat.com>
2423
2424 PR c/68966
2425 * c-common.c (sync_resolve_size): Reject first argument when it's
2426 a pointer to _Bool.
2427
c589e975
DM
24282016-01-05 David Malcolm <dmalcolm@redhat.com>
2429
2430 PR c/69122
2431 * c-indentation.c (get_visual_column): Remove default argument.
2432 (should_warn_for_misleading_indentation): For the multiline case,
2433 update call to get_visual_column for next_stmt_exploc so that it
2434 captures the location of the first non-whitespace character in the
2435 relevant line. Don't issue warnings if there is non-whitespace
2436 before the next statement.
2437
818ab71a
JJ
24382016-01-04 Jakub Jelinek <jakub@redhat.com>
2439
2440 Update copyright years.
2441
745e411d
DM
24422015-12-21 David Malcolm <dmalcolm@redhat.com>
2443
2444 * c-common.c (binary_op_error): Convert first param from
2445 location_t to rich_location * and use it when emitting an error.
2446 * c-common.h (binary_op_error): Convert first param from
2447 location_t to rich_location *.
2448
de67c4c3
DM
24492015-12-16 David Malcolm <dmalcolm@redhat.com>
2450
2451 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
2452 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
2453
4a38b02b
IV
24542015-12-15 Ilya Verbin <ilya.verbin@intel.com>
2455
2456 * c-common.c (c_common_attribute_table): Handle "omp declare target
2457 link" attribute.
2458
54d62f51
JJ
24592015-12-14 Jakub Jelinek <jakub@redhat.com>
2460
2461 PR c/68833
2462 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2463
8d4227c8
TB
24642014-12-12 Tobias Burnus <burnus@net-b.de>
2465
2466 PR fortran/68815
2467 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
2468 specifiers (%d, %i,%u and %c).
2469
f6069ccc
DM
24702015-12-10 David Malcolm <dmalcolm@redhat.com>
2471
2472 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2473
63bbf46d
JJ
24742015-12-08 Jakub Jelinek <jakub@redhat.com>
2475
2476 PR c/48088
2477 PR c/68657
2478 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
2479 * c-pragma.c (handle_pragma_diagnostic): Adjust
2480 control_warning_option caller.
2481
f79520bb
DM
24822015-12-07 David Malcolm <dmalcolm@redhat.com>
2483
2484 * c-common.c (c_cpp_error): Update for change to
2485 rich_location::set_range.
2486
b3d5bc62
JJ
24872015-12-04 Paolo Bonzini <bonzini@gnu.org>
2488
2489 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
2490 shifting 1 out of the sign bit.
2491
24922015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
2493
2494 * c-common.c (c_common_attribute_table[]): Update max arguments
2495 count for "simd" attribute.
2496 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2497
6eb4a537
JJ
24982015-12-03 Jakub Jelinek <jakub@redhat.com>
2499
2500 PR preprocessor/57580
2501 * c-ppoutput.c (print): Change printed field to bool.
2502 Move src_file last for smaller padding.
2503 (init_pp_output): Set print.printed to false instead of 0.
2504 (scan_translation_unit): Fix up formatting. Set print.printed
2505 to true after printing something other than newline.
2506 (scan_translation_unit_trad): Set print.printed to true instead of 1.
2507 (maybe_print_line_1): Set print.printed to false instead of 0.
2508 (print_line_1): Likewise.
2509 (do_line_change): Set print.printed to true instead of 1.
2510 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
2511 dump_macro): Set print.printed to false after printing newline.
2512
4250754e
JM
25132015-12-02 Jason Merrill <jason@redhat.com>
2514
f479b43d
JM
2515 * c-common.c (fold_for_warn): New.
2516 (warn_logical_operator, warn_tautological_cmp)
2517 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
2518
4250754e
JM
2519 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2520 (c_fully_fold_internal, decl_constant_value_for_optimization):
2521 Move to c/c-fold.c.
2522 * c-common.h: Don't declare decl_constant_value_for_optimization.
2523
e9e32ee6
JM
25242015-12-02 Joseph Myers <joseph@codesourcery.com>
2525
2526 PR c/68162
2527 * c-common.h (c_build_qualified_type): Add extra default
2528 arguments.
2529
37d5ad46
JB
25302015-12-01 Julian Brown <julian@codesourcery.com>
2531 Cesar Philippidis <cesar@codesourcery.com>
2532 James Norris <James_Norris@mentor.com>
2533
2534 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
2535 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
2536 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2537
f07862c7
EB
25382015-11-30 Eric Botcazou <ebotcazou@adacore.com>
2539
2540 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
2541 (decl_sloc_common): Delete and move bulk of processing to...
2542 (decl_sloc): ...here.
2543 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
2544 (dump_ada_double_name): Remove S parameter and compute the suffix.
2545 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
2546 element type and deal with an anonymous one.
2547 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
2548 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
2549 and remove reference to QUAL_UNION_TYPE.
2550 (dump_nested_types): Make 2 passes on the fields and move bulk to...
2551 (dump_nested_type): ...here. New function extracted from above.
2552 Generate a full declaration for anonymous element type of arrays.
2553 (print_ada_declaration): Really skip anonymous declarations. Remove
2554 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
2555 Clean up processing of declarations of array types and objects.
2556 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
2557 Remove obsolete code and tidy up.
2558
75c8aac3
JH
25592015-11-29 Jan Hubicka <hubicka@ucw.cz>
2560
2561 PR c/67581
2562 * c-common.c (handle_transparent_union_attribute): Update
2563 also type variants.
2564
b58d3df2
ML
25652015-11-27 Martin Liska <mliska@suse.cz>
2566
2567 PR c++/68312
2568 * array-notation-common.c (cilkplus_extract_an_triplets):
2569 Release vector of vectors.
2570 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
2571
89a01fcf
EB
25722015-11-26 Eric Botcazou <ebotcazou@adacore.com>
2573
2574 PR c++/68527
2575 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
2576 (print_ada_struct_decl): Likewise.
2577
cc5c5226
IZ
25782015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
2579
2580 PR c++/68001
2581 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
2582 * cilk.c (recognize_spawn): Determine location in a more precise
2583 way.
2584
269adb9d
JM
25852015-11-19 Jason Merrill <jason@redhat.com>
2586
2587 * c-common.c (shorten_compare): But look through macros from
2588 system headers.
2589
d0eccfcd
JM
25902015-11-18 Jason Merrill <jason@redhat.com>
2591
2592 * c-common.c (shorten_compare): Don't -Wtype-limits if the
2593 non-constant operand comes from a macro.
2594
3e44547c
JM
25952015-11-17 Jason Merrill <jason@redhat.com>
2596
2597 PR bootstrap/68346
2598 * c-common.c (warn_tautological_cmp): Fold before checking for
2599 constants.
2600
0f62c7a0
MP
26012015-11-16 Marek Polacek <polacek@redhat.com>
2602
2603 PR c++/68362
2604 * c-common.c (check_case_bounds): Fold low and high cases.
2605
a868811e
MP
26062015-11-16 Marek Polacek <polacek@redhat.com>
2607
2608 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
2609 * c-common.c (c_common_get_alias_set): Likewise.
2610 (handle_visibility_attribute): Likewise.
2611
fff77217
KY
26122015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2613
2614 * c-common.c (handle_simd_attribute): New.
2615 (struct attribute_spec): Add entry for "simd".
2616 (handle_simd_attribute): New.
2617
269e63b7
KT
26182015-11-13 Kai Tietz <ktietz70@googlemail.com>
2619
2620 * c-lex.c (interpret_float): Use fold_convert.
2621
ebedc9a3
DM
26222015-11-13 David Malcolm <dmalcolm@redhat.com>
2623
2624 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
2625 and store it on the result.
2626 * c-opts.c (c_common_init_options): Set
2627 global_dc->colorize_source_p.
2628
6e232ba4
JN
26292015-11-12 James Norris <jnorris@codesourcery.com>
2630 Joseph Myers <joseph@codesourcery.com>
2631
2632 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
2633 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
2634 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
2635 PRAGMA_OACC_CLAUSE_LINK.
2636
e78bede6
MP
26372015-11-11 Marek Polacek <polacek@redhat.com>
2638
2639 PR c/68107
2640 PR c++/68266
2641 * c-common.c (valid_array_size_p): New function.
2642 * c-common.h (valid_array_size_p): Declare.
2643
3f8257db 26442015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
2645
2646 PR bootstrap/68271
2647 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
2648
69f293c9
AM
26492015-11-11 Andrew MacLeod <amacleod@redhat.com>
2650
2651 * array-notation-common.c: Remove unused header files.
2652 * c-ada-spec.c: Likewise.
2653 * c-cilkplus.c: Likewise.
2654 * c-common.c: Likewise.
2655 * c-cppbuiltin.c: Likewise.
2656 * c-dump.c: Likewise.
2657 * c-format.c: Likewise.
2658 * c-gimplify.c: Likewise.
2659 * c-indentation.c: Likewise.
2660 * c-lex.c: Likewise.
2661 * c-omp.c: Likewise.
2662 * c-opts.c: Likewise.
2663 * c-pch.c: Likewise.
2664 * c-ppoutput.c: Likewise.
2665 * c-pragma.c: Likewise.
2666 * c-pretty-print.c: Likewise.
2667 * c-semantics.c: Likewise.
2668 * c-ubsan.c: Likewise.
2669 * cilk.c: Likewise.
2670 * stub-objc.c: Likewise.
2671
3a40d81d
NS
26722015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2673 Cesar Philippidis <cesar@codesourcery.com>
2674 James Norris <jnorris@codesourcery.com>
2675 Julian Brown <julian@codesourcery.com>
2676 Nathan Sidwell <nathan@codesourcery.com>
2677
2678 * c-pragma.c (oacc_pragmas): Add "routine".
2679 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
2680
ee45a32d
EB
26812015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2682
2683 * c-common.c (c_common_attributes): Add scalar_storage_order.
2684 (handle_scalar_storage_order_attribute): New function.
2685 * c-pragma.c (global_sso): New variable.
2686 (maybe_apply_pragma_scalar_storage_order): New function.
2687 (handle_pragma_scalar_storage_order): Likewise.
2688 (init_pragma): Register scalar_storage_order.
2689 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
2690 * c.opt (Wscalar-storage-order): New warning.
2691 (fsso-struct=): New option.
2692
eb11eb15
MS
26932015-11-08 Martin Sebor <msebor@redhat.com>
2694
2695 * c.opt (Wplacement-new): Add a period to the end of a sentence.
2696
0aad0198
RS
26972015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2698
2699 * c-common.c: Don't undef DEF_BUILTIN.
2700
8a645150
DM
27012015-11-06 David Malcolm <dmalcolm@redhat.com>
2702
2703 * c-common.c (c_cpp_error): Convert parameter from location_t to
2704 rich_location *. Eliminate the "column_override" parameter and
2705 the call to diagnostic_override_column.
2706 Update the "done_lexing" clause to set range 0
2707 on the rich_location, rather than overwriting a location_t.
2708 * c-common.h (c_cpp_error): Convert parameter from location_t to
2709 rich_location *. Eliminate the "column_override" parameter.
2710
7a5e4956
CP
27112015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2712 Thomas Schwinge <thomas@codesourcery.com>
2713 James Norris <jnorris@codesourcery.com>
2714
2715 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
2716 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
2717 clauses with parallel and kernels and loops.
2718 * c-pragma.h (enum pragma_omp_clause): Add entries for
2719 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
2720 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
2721 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
2722 INDEPENDENT,SEQ}.
2723 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
2724
e2f5cc96
MS
27252015-11-05 Martin Sebor <msebor@redhat.com>
2726
2727 PR c++/67942
2728 * c.opt (-Wplacement-new): New option.
2729
e01d41e5
JJ
27302015-11-05 Jakub Jelinek <jakub@redhat.com>
2731
2732 * c-common.h (c_finish_omp_atomic): Add TEST argument.
2733 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
2734 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
2735 save_expr or create_tmp_var* if TEST is true.
2736 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
2737 Don't call add_stmt here.
2738 (struct c_omp_check_loop_iv_data): New type.
2739 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
2740 c_omp_check_loop_iv_exprs): New functions.
2741 (c_omp_split_clauses): Adjust for lastprivate being allowed on
2742 distribute.
2743 (c_omp_declare_simd_clauses_to_numbers): Change
2744 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
2745 (c_omp_declare_simd_clauses_to_decls): Similarly change those
2746 from numbers to PARM_DECLs.
2747
595278be
MM
27482015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
2749
2750 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
2751 flag_checking.
2752
3f8257db 27532015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
2754
2755 PR c++-common/67882
b3d5bc62
JJ
2756 * c-common.h (fold_offsetof_1): Add argument.
2757 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
2758 offsetof expressions that reference elements past the end of
2759 an array.
2760
4bf9e5a8
TS
27612015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2762 Chung-Lin Tang <cltang@codesourcery.com>
2763
2764 * c-pragma.c (oacc_pragmas): Add "atomic".
2765 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
2766
3b1661a9
ES
27672015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
2768
2769 * c-common.c (handle_target_clones_attribute): New.
2770 (c_common_attribute_table): Add handle_target_clones_attribute.
2771 (handle_always_inline_attribute): Add check on target_clones attribute.
2772 (handle_target_attribute): Ditto.
2773
2adfab87
AM
27742015-10-29 Andrew MacLeod <amacleod@redhat.com>
2775
2776 * array-notation-common.c: Reorder #include's and remove duplicates.
2777 * c-ada-spec.c: Likewise.
2778 * c-cilkplus.c: Likewise.
2779 * c-common.c: Likewise.
2780 * c-cppbuiltin.c: Likewise.
2781 * c-dump.c: Likewise.
2782 * c-format.c: Likewise.
2783 * c-gimplify.c: Likewise.
2784 * c-indentation.c: Likewise.
2785 * c-lex.c: Likewise.
2786 * c-omp.c: Likewise.
2787 * c-opts.c: Likewise.
2788 * c-pch.c: Likewise.
2789 * c-ppoutput.c: Likewise.
2790 * c-pragma.c: Likewise.
2791 * c-pretty-print.c: Likewise.
2792 * c-semantics.c: Likewise.
2793 * c-ubsan.c: Likewise.
2794 * cilk.c: Likewise.
2795 * stub-objc.c: Likewise.
2796
d90ec4f2
JM
27972015-10-28 Jason Merrill <jason@redhat.com>
2798
2799 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
2800
88bae6f4
TS
28012015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2802 James Norris <jnorris@codesourcery.com>
2803 Cesar Philippidis <cesar@codesourcery.com>
2804
2805 PR c/64765
2806 PR c/64880
2807 * c-common.h (c_oacc_split_loop_clauses): Declare function.
2808 * c-omp.c (c_oacc_split_loop_clauses): New function.
2809
b1726d6c
MS
28102015-10-21 Martin Sebor <msebor@redhat.com>
2811
2812 PR driver/68043
2813 * c.opt: End each sentence that describes an option with a period.
2814
fa60eeb9
MP
28152015-10-20 Marek Polacek <polacek@redhat.com>
2816
2817 * array-notation-common.c (is_cilkplus_vector_p): Define.
2818 * c-common.h (is_cilkplus_vector_p): Declare.
2819
95979049
MP
28202015-10-20 Marek Polacek <polacek@redhat.com>
2821
2822 * c.opt (std=gnu++11): Do not describe as experimental.
2823 (std=gnu++14): Likewise.
2824
2a9fb712
JM
28252015-10-19 Jason Merrill <jason@redhat.com>
2826
2827 * c-cppbuiltin.c (c_cpp_builtins): Define
2828 __cpp_nontype_template_args.
2829
13b380a3
JM
28302015-10-19 Jason Merrill <jason@redhat.com>
2831
2832 * c-cppbuiltin.c (c_cpp_builtins): Define
2833 __cpp_enumerator_attributes, __cpp_fold_expressions,
2834 __cpp_unicode_characters.
2835
d9a6bd32
JJ
28362015-10-13 Jakub Jelinek <jakub@redhat.com>
2837 Aldy Hernandez <aldyh@redhat.com>
2838
2839 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
2840 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
2841 (c_define_builtins): Likewise.
2842 * c-common.h (enum c_omp_clause_split): Add
2843 C_OMP_CLAUSE_SPLIT_TASKLOOP.
2844 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
2845 (c_finish_omp_for): Add ORIG_DECLV argument.
2846 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
2847 201511 instead of 201307.
2848 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
2849 OMP_CRITICAL_CLAUSES to it.
2850 (c_finish_omp_ordered): Add CLAUSES argument, set
2851 OMP_ORDERED_CLAUSES to it.
2852 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
2853 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
2854 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
2855 constructs and new OpenMP 4.5 clauses. Clear
2856 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
2857 verification code.
2858 * c-pragma.c (omp_pragmas_simd): Add taskloop.
2859 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
2860 (enum pragma_omp_clause): Add
2861 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
2862 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
2863
624d31fe
RS
28642015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2865
2866 * c-lex.c (interpret_float): Use real_equal instead of
2867 REAL_VALUES_EQUAL.
2868
b8fd7909
JM
28692015-10-04 Jason Merrill <jason@redhat.com>
2870
2871 Implement N4514, C++ Extensions for Transactional Memory.
2872 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
2873 (c_common_attribute_table): Add transaction_safe_dynamic.
2874 transaction_safe now affects type identity.
2875 (handle_tm_attribute): Handle transaction_safe_dynamic.
2876 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
2877 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
2878 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
2879 (D_TRANSMEM): New.
2880 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
2881 * c-pretty-print.c (pp_c_attributes_display): Don't print
2882 transaction_safe in C++.
2883
12651878
MP
28842015-10-02 Marek Polacek <polacek@redhat.com>
2885
2886 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
2887
3e3b8d63
MP
28882015-10-02 Marek Polacek <polacek@redhat.com>
2889
2890 PR c/64249
2891 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
2892 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
2893 * c.opt (Wduplicated-cond): New option.
2894
0d1a8f75
JM
28952015-10-01 Joseph Myers <joseph@codesourcery.com>
2896
2897 * c.opt (std=c11): Do not describe as experimental.
2898 (std=gnu11): Likewise.
2899 (std=iso9899:2011): Likewise.
2900
3e32ee19
NS
29012015-09-28 Nathan Sidwell <nathan@codesourcery.com>
2902
2903 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
2904 (DEF_FUNCTION_TYPE_VAR_11): Delete.
2905
974348ee
MP
29062015-09-25 Marek Polacek <polacek@redhat.com>
2907
2908 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
2909 (ubsan_instrument_shift): Likewise.
2910
15dbc1a6
MP
29112015-09-25 Marek Polacek <polacek@redhat.com>
2912
2913 PR sanitizer/64906
2914 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
2915
6b95d7cc
PP
29162015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
2917
2918 * c-indentation.c (should_warn_for_misleading_indentation):
2919 Compare next_stmt_vis_column with guard_line_first_nws instead
2920 of with guard_line_vis_column.
2921
c1822f9c
MLI
29222015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
2923
2924 PR c/49654
2925 PR c/49655
2926 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
2927 options and options not valid for the current language.
2928
d5398058
PP
29292015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
2930
2931 * c-indentation.c (should_warn_for_misleading_indentation):
2932 Float out and consolidate the calls to get_visual_column that
2933 are passed guard_exploc as an argument. Compare
2934 next_stmt_vis_column with guard_line_first_nws instead of with
2935 body_line_first_nws.
2936
6b333269
NS
29372015-09-22 Nathan Sidwell <nathan@codesourcery.com>
2938
2939 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
2940 Wnamespaces): New C++ warnings.
2941
a75f1574
JM
29422015-09-22 Jason Merrill <jason@redhat.com>
2943
2944 * c-common.h (abi_compat_version_crosses): New.
2945 (warn_abi_version): Declare.
2946 * c-common.c: Define it.
2947 * c-opts.c (c_common_post_options): Handle it.
2948 flag_abi_compat_version defaults to 8.
2949
bdaaa8b7
VV
29502015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2951
2952 Complete the implementation of N4230, Nested namespace definition.
2953 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
2954 __cpp_nested_namespace_definitions.
2955
eaa797e8
MLI
29562015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2957
2958 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
2959
c4914de6
MLI
29602015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2961
2962 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
2963 when warning.
2964 * c-pragma.h (pragma_lex): Add optional loc argument.
2965
fcb87c50
MM
29662015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
2967
2968 * c-format.c (check_format_arg): Adjust to use common block size in all
2969 object pools.
2970
31bdd08a
DM
29712015-09-15 David Malcolm <dmalcolm@redhat.com>
2972
2973 * c-format.c (location_from_offset): Update for change in
2974 signature of location_get_source_line.
2975 * c-indentation.c (get_visual_column): Likewise.
2976 (line_contains_hash_if): Likewise.
2977
aa9f4b4c
MP
29782015-09-14 Marek Polacek <polacek@redhat.com>
2979
2980 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
2981 setting various warnings.
2982
aa256c4a
MP
29832015-09-14 Marek Polacek <polacek@redhat.com>
2984
2985 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
2986 a negative value.
2987
0f876f22
MW
29882015-09-11 Mark Wielaard <mjw@redhat.com>
2989
2990 PR c/28901
2991 * c.opt (Wunused-variable): Option from common.opt.
2992 (Wunused-const-variable): New option.
2993
273aa49e
PC
29942015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
2995
2996 PR c++/53184
2997 * c.opt ([Wsubobject-linkage]): Add.
2998
1807ffc1
MS
29992015-09-03 Martin Sebor <msebor@redhat.com>
3000
3001 PR c/66516
3002 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3003 functions.
3004 * c-common.c (reject_gcc_builtin): Define.
3005
38942840
BI
30062015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3007
3008 PR middle-end/60586
3009 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3010 prototype.
3011 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3012 cilk_gimplify_call_params_in_spawned_fn.
3013 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3014 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3015 unwrapping.
3016
c316b5e4
MP
30172015-08-25 Marek Polacek <polacek@redhat.com>
3018
3019 PR middle-end/67330
3020 * c-common.c (handle_weak_attribute): Don't check whether the
3021 visibility can be changed here.
3022
584a7c46
MLI
30232015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3024
3025 * c-lex.c (c_lex_with_flags): Use explicit locations.
3026
a79683d5
TS
30272015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3028
3029 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3030 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3031
61717a45
FXC
30322015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3033
3034 PR middle-end/36757
3035 * c-common.c (check_builtin_function_arguments): Add check
3036 for BUILT_IN_SIGNBIT argument.
3037
329524f5
PC
30382015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3039
3040 PR c++/67160
3041 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3042 in c++1z mode.
3043
4ee55665
MP
30442015-08-17 Marek Polacek <polacek@redhat.com>
3045
3046 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3047 with whitespaces before qualifier names.
3048
b893e375
MP
30492015-08-12 Marek Polacek <polacek@redhat.com>
3050
3051 PR c++/55095
3052 * c-common.c (maybe_warn_shift_overflow): Properly handle
3053 left-shifting 1 into the sign bit.
3054
c2d89095
MLI
30552015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3056
3057 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3058
971e17ff
AS
30592015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
3060 Braden Obrzut <admin@maniacsvault.net>
3061 Jason Merrill <jason@redhat.com>
3062
3063 Add C++ Concepts TS support.
3064 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3065 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3066 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3067 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3068 * c-opts.c (set_std_cxx1z): Set flag_concepts.
3069 * c.opt (fconcepts): New.
3070
b3d5bc62
JJ
30712015-08-02 Martin Sebor <msebor@redhat.com>
3072
3073 * c.opt (-Wframe-address): New warning option.
3074
8ebca419
PP
30752015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3076
3077 * c-indentation.c (should_warn_for_misleading_indentation):
3078 Improve heuristics.
3079
1a1e101f
PP
30802015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3081
3082 * c-indentation.c (get_visual_column): Add parameter first_nws,
3083 use it. Update comment documenting the function.
3084 (is_first_nonwhitespace_on_line): Remove.
3085 (should_warn_for_misleading_indentation): Replace usage of
3086 of is_first_nonwhitespace_on_line with get_visual_column.
3087
992118a1
PP
30882015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3089
3090 * c-indentation.h (struct token_indent_info): Define.
3091 (get_token_indent_info): Define.
3092 (warn_for_misleading_information): Declare.
3093 * c-common.h (warn_for_misleading_information): Remove.
3094 * c-identation.c (warn_for_misleading_indentation):
3095 Change declaration to take three token_indent_infos. Adjust
3096 accordingly.
3097 * c-identation.c (should_warn_for_misleading_indentation):
3098 Likewise. Bail out early if the body is a compound statement.
3099 (guard_tinfo_to_string): Define.
3100
e8fa3817
JM
31012015-07-30 Jason Merrill <jason@redhat.com>
3102
3103 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
3104 '*' for reference decay.
3105
173864e8
MP
31062015-07-30 Marek Polacek <polacek@redhat.com>
3107
3108 * c-common.c (warn_tautological_cmp): Bail for float types.
3109
f2afe6dd
MP
31102015-07-27 Marek Polacek <polacek@redhat.com>
3111
3112 PR bootstrap/67030
3113 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
3114
05b28fd6
MP
31152015-07-27 Marek Polacek <polacek@redhat.com>
3116
3117 PR c++/66555
3118 PR c/54979
3119 * c-common.c (find_array_ref_with_const_idx_r): New function.
3120 (warn_tautological_cmp): New function.
3121 * c-common.h (warn_tautological_cmp): Declare.
3122 * c.opt (Wtautological-compare): New option.
3123
5a5062b8
MP
31242015-07-23 Marek Polacek <polacek@redhat.com>
3125
3126 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
3127 (ubsan_instrument_shift): Likewise.
3128
dc891fe7
MP
31292015-07-23 Marek Polacek <polacek@redhat.com>
3130
3131 PR sanitizer/66908
3132 * c-ubsan.c: Include gimplify.h.
3133 (ubsan_instrument_division): Unshare OP0 and OP1.
3134 (ubsan_instrument_shift): Likewise.
3135
451b5e48
MP
31362015-07-20 Marek Polacek <polacek@redhat.com>
3137 Richard Sandiford <richard.sandiford@arm.com>
3138
3139 PR c++/55095
3140 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
3141 Use EXPR_LOC_OR_LOC.
3142 (maybe_warn_shift_overflow): New function.
3143 * c-common.h (maybe_warn_shift_overflow): Declare.
3144 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
3145 * c.opt (Wshift-overflow): New option.
3146
fb0b2914
ML
31472015-07-16 Martin Liska <mliska@suse.cz>
3148
3149 * c-format.c (static void check_format_info_main): Use
3150 object_allocator instead of pool_allocator.
3151 (check_format_arg): Likewise.
3152 (check_format_info_main): Likewise.
3153
903f5c23
AM
31542015-07-15 Andrew MacLeod <amacleod@redhat.com>
3155
3156 * c-opts.c: Remove multiline #include comment.
3157
026c3cfd
AH
31582015-07-12 Aldy Hernandez <aldyh@redhat.com>
3159
3160 * c-common.c: Fix double word typos.
3161
bb49ee66
EB
31622015-07-10 Eric Botcazou <ebotcazou@adacore.com>
3163
3164 * c-ada-spec.h (cpp_operation): Revert latest change.
3165 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
3166 constructors and destructors.
3167
1916bcb5
AM
31682015-07-09 Andrew MacLeod <amacleod@redhat.com>
3169
3170 * c-common.h: Adjust includes for flags.h changes.
3171 * stub-objc.c: Likewise.
026c3cfd 3172
a9dcd529
EB
31732015-07-08 Eric Botcazou <ebotcazou@adacore.com>
3174
3175 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
3176 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
3177
b03b462f
JJ
31782015-07-08 Jakub Jelinek <jakub@redhat.com>
3179
3180 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
3181 are to be removed, return NULL rather than original clauses list.
3182
c7131fb2
AM
31832015-07-07 Andrew MacLeod <amacleod@redhat.com>
3184
3185 * array-notation-common.c: Adjust includes.
3186 * c-ada-spec.c: Likewise.
3187 * c-cilkplus.c: Likewise.
3188 * c-common.h: Likewise.
3189 * c-cppbuiltin.c: Likewise.
3190 * c-dump.c: Likewise.
3191 * c-format.c: Likewise.
3192 * c-gimplify.c: Likewise.
3193 * c-indentation.c: Likewise.
3194 * c-lex.c: Likewise.
3195 * c-omp.c: Likewise.
3196 * c-opts.c: Likewise.
3197 * c-pch.c: Likewise.
3198 * c-ppoutput.c: Likewise.
3199 * c-pragma.c: Likewise.
3200 * c-pretty-print.c: Likewise.
3201 * c-semantics.c: Likewise.
3202 * c-ubsan.c: Likewise.
3203 * cilk.c: Likewise.
3204 * stub-objc.c: Likewise.
3205
2a7fb83f
EB
32062015-07-07 Eric Botcazou <ebotcazou@adacore.com>
3207
3208 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
3209 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
3210
a03c9bf1
JM
32112015-07-01 Jason Merrill <jason@redhat.com>
3212
36a85135
JM
3213 * c-common.h (D_CXX11): Rename from D_CXX0X.
3214 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
3215 * c-common.c: Adjust.
3216
e7fa68d5
JM
3217 * c-opts.c (c_common_post_options): Default to C++14.
3218
a03c9bf1
JM
3219 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
3220
fe95b036
ESR
32212015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
3222
3223 Implement N4197 - Adding u8 character literals
b3d5bc62 3224 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 3225 CPP_CHAR.
b3d5bc62 3226 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 3227 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 3228 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
3229 and CPP_UTF8CHAR tokens.
3230 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 3231
da2e71c9
MLI
32322015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3233
3234 PR fortran/66605
3235 * c-common.c (do_warn_unused_parameter): Move here.
3236 * c-common.h (do_warn_unused_parameter): Declare.
3237
b155cfd9
MP
32382015-06-29 Marek Polacek <polacek@redhat.com>
3239
3240 PR c/66322
3241 * c-common.c (check_case_bounds): Add bool * parameter. Set
3242 OUTSIDE_RANGE_P.
3243 (c_add_case_label): Add bool * parameter. Pass it down to
3244 check_case_bounds.
3245 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
3246 warning here.
3247 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
3248 declarations.
3249
31521951
MP
32502015-06-27 Marek Polacek <polacek@redhat.com>
3251
3252 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
3253 or VECTOR_INTEGER_TYPE_P throughout.
3254 * c-gimplify.c: Likewise.
3255
22d03525
MP
32562015-06-26 Marek Polacek <polacek@redhat.com>
3257
3258 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
3259 * c-common.c (c_fully_fold_internal): Likewise.
3260 (c_alignof_expr): Likewise.
3261 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
3262 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 3263 * cilk.c (create_parm_list): Likewise.
22d03525 3264
af05e6e5
MP
32652015-06-26 Marek Polacek <polacek@redhat.com>
3266
3267 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
3268
f0889939
AM
32692015-06-25 Andrew MacLeod <amacleod@redhat.com>
3270
3271 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
3272 * c-gimplify.c: Likewise.
3273 * c-pragma.c: Likewise.
3274 * c-ubsan.c: Likewise.
3275 * cilk.c: Likewise.
3276
ca752f39
RS
32772015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3278
3279 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
3280 ggc_hasher.
3281
16a16ec7
AM
32822015-06-25 Andrew MacLeod <amacleod@redhat.com>
3283
3284 * cilk.c: Move calls.h after tm.h in the include chain.
3285
0ae9bd27
MP
32862015-06-25 Marek Polacek <polacek@redhat.com>
3287
3288 * array-notation-common.c: Use VAR_P throughout.
3289 * c-ada-spec.c: Likewise.
3290 * c-common.c: Likewise.
3291 * c-format.c: Likewise.
3292 * c-gimplify.c: Likewise.
3293 * c-omp.c: Likewise.
3294 * c-pragma.c: Likewise.
3295 * c-pretty-print.c: Likewise.
3296 * cilk.c: Likewise.
3297
62f9079a
MP
32982015-06-25 Marek Polacek <polacek@redhat.com>
3299
3300 * cilk.c (extract_free_variables): Use is_global_var.
3301
0fa16060
RS
33022015-06-23 Richard Sandiford <richard.sandiford@arm.com>
3303
3304 * c-common.c: Don't include target-def.h.
3305
a68ae2e1
MP
33062015-06-23 Marek Polacek <polacek@redhat.com>
3307
3308 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
3309 when comparing INTEGER_CSTs.
3310
c6a2f2d9
PMR
33112015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
3312
3313 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
3314 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
3315 (dump_ada_template): Skip partially specialized types.
3316
6b4db501
MM
33172015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
3318
3319 * c-common.c (scalar_to_vector): Use std::swap instead of manually
3320 swapping.
3321
abb226c9
AM
33222015-06-17 Andrew MacLeod <amacleod@redhat.com>
3323
3324 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
3325 * c-ada-spec.c: Likewise.
3326 * c-cilkplus.c: Likewise.
3327 * c-common.c: Likewise.
3328 * c-common.h: Likewise.
3329 * c-cppbuiltin.c: Likewise.
3330 * c-dump.c: Likewise.
3331 * c-format.c: Likewise.
3332 * c-gimplify.c: Likewise.
3333 * c-indentation.c: Likewise.
3334 * c-lex.c: Likewise.
3335 * c-omp.c: Likewise.
3336 * c-opts.c: Likewise.
3337 * c-pch.c: Likewise.
3338 * c-ppoutput.c: Likewise.
3339 * c-pragma.c: Likewise.
3340 * c-pretty-print.c: Likewise.
3341 * c-semantics.c: Likewise.
3342 * c-ubsan.c: Likewise.
3343 * cilk.c: Likewise.
3344 * stub-objc.c: Likewise.
3345
076fecad
PP
33462015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
3347
3348 PR c++/65168
3349 * c-common.c (c_common_truthvalue_conversion): Warn when
3350 converting an address of a reference to a truth value.
3351
13fdf2e2
AM
33522015-06-08 Andrew MacLeod <amacleod@redhat.com>
3353
3354 * array-notation-common.c : Adjust include files.
3355 * c-ada-spec.c : Likewise.
3356 * c-cilkplus.c : Likewise.
3357 * c-common.c : Likewise.
3358 * c-common.h : Likewise.
3359 * c-cppbuiltin.c : Likewise.
3360 * c-dump.c : Likewise.
3361 * c-format.c : Likewise.
3362 * c-gimplify.c : Likewise.
3363 * c-indentation.c : Likewise.
3364 * c-lex.c : Likewise.
3365 * c-omp.c : Likewise.
3366 * c-opts.c : Likewise.
3367 * c-pch.c : Likewise.
3368 * c-ppoutput.c : Likewise.
3369 * c-pragma.c : Likewise.
3370 * c-pretty-print.c : Likewise.
3371 * c-semantics.c : Likewise.
3372 * c-ubsan.c : Likewise.
3373 * cilk.c : Likewise.
3374 * stub-objc.c : Likewise.
3375
a1661b90
MP
33762015-06-08 Marek Polacek <polacek@redhat.com>
3377
3378 PR c/66415
3379 * c-format.c (location_from_offset): Return LOC if LINE is null.
3380
d7438551
AH
33812015-06-05 Aldy Hernandez <aldyh@redhat.com>
3382
3383 * c-common.h (c_parse_final_cleanups): New prototype.
3384 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
3385
b3d5bc62
JJ
33862015-06-04 Sriraman Tallam <tmsriram@google.com>
3387
3388 * c-common.c (noplt): New attribute.
3389 (handle_noplt_attribute): New handler.
3390
ecb9f223
AM
33912015-06-04 Andrew MacLeod <amacleod@redhat.com>
3392
3393 * array-notation-common.c: Adjust includes for restructured coretypes.h.
3394 * c-ada-spec.c: Likewise.
3395 * c-cilkplus.c: Likewise.
3396 * c-common.c: Likewise.
3397 * c-common.h: Likewise.
3398 * c-cppbuiltin.c: Likewise.
3399 * c-dump.c: Likewise.
3400 * c-format.c: Likewise.
3401 * c-gimplify.c: Likewise.
3402 * c-indentation.c: Likewise.
3403 * c-lex.c: Likewise.
3404 * c-omp.c: Likewise.
3405 * c-opts.c: Likewise.
3406 * c-pch.c: Likewise.
3407 * c-ppoutput.c: Likewise.
3408 * c-pragma.c: Likewise.
3409 * c-pretty-print.c: Likewise.
3410 * c-semantics.c: Likewise.
3411 * c-ubsan.c: Likewise.
3412 * cilk.c: Likewise.
3413 * stub-objc.c: Likewise.
3414
6ac48155
DM
34152015-06-02 David Malcolm <dmalcolm@redhat.com>
3416
3417 PR c/66220:
3418 * c-indentation.c (should_warn_for_misleading_indentation): Use
3419 expand_location rather than expand_location_to_spelling_point.
3420 Don't warn if the guarding statement is more indented than the
3421 next/body stmts.
3422
773ce42e
DM
34232015-06-02 David Malcolm <dmalcolm@redhat.com>
3424
3425 * c-indentation.c (warn_for_misleading_indentation): Bail out
3426 immediately if -Wmisleading-indentation isn't enabled.
3427
4fef8379
ML
34282015-06-01 Martin Liska <mliska@suse.cz>
3429
3430 * c-format.c (check_format_arg):Use new type-based pool allocator.
3431 (check_format_info_main) Likewise.
3432
1edfb384
EB
34332015-05-31 Eric Botcazou <ebotcazou@adacore.com>
3434
3435 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
3436 (has_nontrivial_methods): Likewise.
3437
9677ef52
MP
34382015-05-25 Marek Polacek <polacek@redhat.com>
3439
3440 * c-ubsan.c (ubsan_instrument_shift): Use type0.
3441
fd5c817a
MP
34422015-05-22 Marek Polacek <polacek@redhat.com>
3443
3444 PR c/47043
3445 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
3446
a2f45fe6 34472015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
3448
3449 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
3450 STACK_GROWS_DOWNWARD.
3451
a2f45fe6 34522015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
3453
3454 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
3455 STACK_GROWS_DOWNWARD rather than if it is defined.
3456
0fee2ac2 34572015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 3458
0fee2ac2
MLI
3459 PR c/52952
3460 * c-format.c (location_column_from_byte_offset): New.
3461 (location_from_offset): New.
3462 (struct format_wanted_type): Add offset_loc field.
3463 (check_format_info): Move handling of location for extra arguments
3464 closer to the point of warning.
3465 (check_format_info_main): Pass the result of location_from_offset
3466 to warning_at.
3467 (format_type_warning): Pass the result of location_from_offset
3468 to warning_at.
3469
cf4ef6f7
MP
34702015-05-20 Marek Polacek <polacek@redhat.com>
3471
3472 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
3473
3a65ee74
MP
34742015-05-20 Marek Polacek <polacek@redhat.com>
3475
3476 * c-ada-spec.c (dump_sloc): Use DECL_P.
3477
21b634ae
MP
34782015-05-20 Marek Polacek <polacek@redhat.com>
3479
3480 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3481 * c-common.c: Likewise.
3482
0e50b624
DM
34832015-05-19 David Malcolm <dmalcolm@redhat.com>
3484
3485 * c-common.h (fe_file_change): Strengthen param from
3486 const line_map * to const line_map_ordinary *.
3487 (pp_file_change): Likewise.
3488 * c-lex.c (fe_file_change): Likewise.
3489 (cb_define): Use linemap_check_ordinary when invoking
3490 SOURCE_LINE.
3491 (cb_undef): Likewise.
3492 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
3493 invoking cb_file_change.
3494 (c_finish_options): Likewise.
3495 (push_command_line_include): Likewise.
3496 (cb_file_change): Strengthen param "new_map" from
3497 const line_map * to const line_map_ordinary *.
3498 * c-ppoutput.c (cb_define): Likewise for local "map".
3499 (pp_file_change): Likewise for param "map" and local "from".
3500
fab27f52
MM
35012015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3502
3503 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
3504
2fe1d762
TV
35052015-05-18 Tom de Vries <tom@codesourcery.com>
3506
3507 * c-common.c (build_va_arg_1): New function.
3508 (build_va_arg): Add address operator to va_list operand if necessary.
3509
7a37fa90
MM
35102015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
3511
3512 PR c/48956
3513 * c-common.c (int_safely_convertible_to_real_p): Define.
3514 (unsafe_conversion_p): Check conversions involving complex types.
3515 (conversion_warning): Add new warning message for conversions which
3516 discard imaginary component.
3517 * c-common.h: (enum conversion_safety): Add new enumerator for such
3518 conversions.
3519
3aa3c9fc
MP
35202015-05-14 Marek Polacek <polacek@redhat.com>
3521
3522 PR c/66066
3523 PR c/66127
3524 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
3525 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
3526 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
3527 use it. If FOR_INT_CONST, require that all evaluated operands be
3528 INTEGER_CSTs.
3529
c3388e62
DM
35302015-05-12 David Malcolm <dmalcolm@redhat.com>
3531
3532 * c-common.h (warn_for_misleading_indentation): New prototype.
3533 * c-indentation.c: New file.
3534 * c.opt (Wmisleading-indentation): New option.
3535
c7b38fd5
TV
35362015-05-12 Tom de Vries <tom@codesourcery.com>
3537
3538 PR tree-optimization/66010
3539 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
3540
381bf11e
JM
35412015-05-09 Jason Merrill <jason@redhat.com>
3542
edff0c06
JM
3543 * c-opts.c (c_common_post_options): Also clear
3544 cpp_opts->cpp_warn_cxx11_compat.
3545
129211bc
JM
3546 * c-common.h (enum cxx_dialect): Add cxx_unset.
3547 * c-common.c (cxx_dialect): Initialize to cxx_unset.
3548 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
3549
381bf11e
JM
3550 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
3551 (std=gnu++0x): Mark as Undocumented.
3552 (std=gnu++1y): Add deprecated message.
3553
fe191308
JM
35542015-05-08 Jason Merrill <jason@redhat.com>
3555
765189ff
JM
3556 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
3557 * c-opts.c: Adjust.
3558
fe191308
JM
3559 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
3560
755e528f
MP
35612015-05-08 Marek Polacek <polacek@redhat.com>
3562
3563 PR c/64918
3564 * c.opt (Woverride-init-side-effects): New option.
3565
0173bd2a
MP
35662015-05-07 Marek Polacek <polacek@redhat.com>
3567
3568 PR c/65179
3569 * c-common.c (c_fully_fold_internal): Warn when left shifting a
3570 negative value.
3571 * c.opt (Wshift-negative-value): New option.
3572 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
3573 when -Wextra and C99/C++11 mode.
3574
e0f0d3b9
MP
35752015-05-07 Marek Polacek <polacek@redhat.com>
3576 Martin Uecker <uecker@eecs.berkeley.edu>
3577
3578 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
3579 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
3580
8243e2a9
JM
35812015-05-05 Jason Merrill <jason@redhat.com>
3582
3583 * c.opt (Wterminate): New.
3584
577cd070
MP
35852015-04-30 Marek Polacek <polacek@redhat.com>
3586
3587 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
3588 require that the non-constant be of a boolean type.
3589
0373796b
JT
35902015-04-29 Josh Triplett <josh@joshtriplett.org>
3591
e0f0d3b9
MP
3592 * c-common.c (handle_section_attribute): Refactor to reduce
3593 nesting and distinguish between error cases.
0373796b 3594
716c0ba6
MP
35952015-04-29 Marek Polacek <polacek@redhat.com>
3596
3597 PR c/64610
3598 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
3599 with 0/1.
3600
8848828b
JJ
36012015-04-29 Jakub Jelinek <jakub@redhat.com>
3602
3603 * c-common.h (omp_clause_mask): Unconditionally define as a class.
3604 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
3605 HOST_BITS_PER_WIDE_INT.
3606
ecd0e562
TV
36072015-04-28 Tom de Vries <tom@codesourcery.com>
3608
3609 PR tree-optimization/65887
3610 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
3611
2a877204 36122015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 3613 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
3614
3615 * c-ada-spec.c (in_function): Delete.
3616 (dump_generic_ada_node): Do not change in_function and remove the
3617 redundant code dealing with it.
3618 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
3619 (print_ada_methods): Output the static member functions in a nested
3620 package after the regular methods as well as associated renamings.
3621
4853031e
MP
36222015-04-24 Marek Polacek <polacek@redhat.com>
3623
3624 PR c/65830
3625 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
3626 and OPT_Wshift_count_overflow.
3627
8c2b7f79
MP
3628 PR c/63357
3629 * c-common.c (warn_logical_operator): Warn if the operands have the
3630 same expressions.
3631
b8787813
MP
36322015-04-24 Marek Polacek <polacek@redhat.com>
3633
3634 PR c/61534
3635 * c-common.c (warn_logical_operator): Bail if either operand comes
3636 from a macro expansion.
3637
8fba1830
BRF
36382015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3639
3640 PR target/55143
3641 * c-common.c (c_default_pointer_mode): Add definition.
3642 * c-common.h (c_default_pointer_mode): Add declaration.
3643
17958621
JJ
36442015-03-11 Jakub Jelinek <jakub@redhat.com>
3645
3646 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
3647 on record_builtin_type argument.
3648
7ccb1a11
JJ
36492015-03-10 Jakub Jelinek <jakub@redhat.com>
3650
3651 PR c/65120
3652 * c-common.c (warn_logical_not_parentheses): Don't warn for
3653 !x == 0 or !x != 0.
3654
04fd785e
MP
36552015-03-07 Marek Polacek <polacek@redhat.com>
3656
3657 PR sanitizer/65280
3658 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
3659 before trying to figure out whether we have a flexible array member.
3660
a4e26206 36612015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3662 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
3663
3664 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
3665
0d2489f4
EB
36662015-03-05 Eric Botcazou <ebotcazou@adacore.com>
3667
3668 PR ada/65319
3669 * c-ada-spec.c (print_destructor): Remove obsolete code.
3670
83ed54d7
EB
36712015-03-01 Eric Botcazou <ebotcazou@adacore.com>
3672
3673 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
3674 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
3675 DECL_TEMPLATE_RESULT emulations.
3676 (dump_ada_template)): Add guard for TYPE_METHODS.
3677
7631f0e2
MP
36782015-02-27 Marek Polacek <polacek@redhat.com>
3679
3680 PR c/65040
3681 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
3682
d1783ae5
KT
36832015-02-27 Kai Tietz <ktietz@redhat.com>
3684
3685 PR c/35330
3686 * c-pragma.c (handle_pragma_weak): Do not try to create
3687 weak/alias of declarations not being function, or variable
3688 declarations.
3689
56a9f6bc
TS
36902015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3691
3692 PR libgomp/64625
3693 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3694 Remove macros.
3695 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3696
3d5cb23d
MP
36972015-02-16 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/65066
3700 * c-format.c (check_format_types): Handle null param.
3701
fa008882
MP
37022015-02-13 Marek Polacek <polacek@redhat.com>
3703
3704 PR c/65040
3705 * c-format.c (check_format_types): Don't warn about different
3706 signedness if the original value is in the range of WANTED_TYPE.
3707
785f21af
JM
37082015-02-12 Jason Merrill <jason@redhat.com>
3709
3710 PR c++/64956
3711 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
3712 to the current highest version.
3713 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
3714
4886ec8e
JJ
37152015-02-04 Jakub Jelinek <jakub@redhat.com>
3716
3717 PR c/64824
3718 PR c/64868
3719 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
3720 instead of RDIV_EXPR. Use build_binary_op instead of
3721 build2_loc.
3722
40fecdd6
JM
37232015-01-30 Joseph Myers <joseph@codesourcery.com>
3724
3725 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
3726 to pass input_location as first argument.
3727
a0c88d06
TV
37282015-01-23 Tom de Vries <tom@codesourcery.com>
3729
3730 PR libgomp/64672
3731 * c.opt (fopenacc): Mark as LTO option.
3732
1506ae0e
TV
37332015-01-23 Tom de Vries <tom@codesourcery.com>
3734
3735 PR libgomp/64707
3736 * c.opt (fopenmp): Mark as LTO option.
3737
31be63ab
JJ
37382015-01-21 Jakub Jelinek <jakub@redhat.com>
3739
3740 PR c/63307
b1726d6c 3741 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
3742 (compare_decls): Fix up formatting.
3743
37442015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
3745
3746 PR c/63307
3747 * cilk.c: Include vec.h.
3748 (struct cilk_decls): New structure.
3749 (wrapper_parm_cb): Split this function to...
3750 (fill_decls_vec): ...this...
3751 (create_parm_list): ...and this.
3752 (compare_decls): New function.
3753 (for_local_cb): Remove.
3754 (wrapper_local_cb): Ditto.
3755 (build_wrapper_type): For now first traverse and fill vector of
3756 declarations then sort it and then deal with sorted vector.
3757 (cilk_outline): Ditto.
3758 (declare_one_free_variable): Ditto.
3759
6875457f
JM
37602015-01-21 Jason Merrill <jason@redhat.com>
3761
3762 PR c++/64629
3763 * c-format.c (check_format_arg): Call decl_constant_value.
3764
185c9e56
ML
37652015-01-19 Martin Liska <mliska@suse.cz>
3766
3767 * c-common.c (handle_noicf_attribute): New function.
3768
41dbbb37
TS
37692015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3770 Bernd Schmidt <bernds@codesourcery.com>
3771 James Norris <jnorris@codesourcery.com>
3772 Cesar Philippidis <cesar@codesourcery.com>
3773 Ilmir Usmanov <i.usmanov@samsung.com>
3774 Jakub Jelinek <jakub@redhat.com>
3775
3776 * c.opt (fopenacc): New option.
3777 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
3778 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3779 New macros.
3780 * c-common.h (c_finish_oacc_wait): New prototype.
3781 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
3782 (c_finish_oacc_wait): New function.
3783 * c-pragma.c (oacc_pragmas): New variable.
3784 (c_pp_lookup_pragma, init_pragma): Handle it.
3785 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
3786 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
3787 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
3788 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3789 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
3790 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
3791 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
3792 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
3793 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
3794 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
3795 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
3796 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
3797 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
3798 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
3799 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
3800 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
3801 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
3802 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
3803 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
3804 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
3805 PRAGMA_OACC_CLAUSE_WORKER.
3806
3f8257db 38072015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
3808
3809 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
3810 for the new option fstack-protector_explicit.
3811 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
3812 (handle_stack_protect_attribute): New function.
3813
3f8257db 38142015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
3815
3816 * c.opt: New option -Warray-bounds=.
3817
adfac8df
JJ
38182015-01-09 Michael Collison <michael.collison@linaro.org>
3819
3820 * array-notation-common.c: Include hash-set.h, machmode.h,
3821 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3822 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3823 * c-ada-spec.c: Ditto.
3824 * c-cilkplus.c: Ditto.
3825 * c-common.c: Include input.h due to flattening of tree.h.
3826 Define macro GCC_C_COMMON_C.
3827 * c-common.h: Flatten tree.h header files into c-common.h.
3828 Remove include of tree-core.h.
3829 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3830 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3831 fold-const.h, wide-int.h, and inchash.h due to
3832 flattening of tree.h.
3833 * c-dump.c: Ditto.
3834 * c-format.c: Flatten tree.h header files into c-common.h.
3835 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3836 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3837 fold-const.h, wide-int.h, and inchash.h due to
3838 flattening of tree.h.
3839 * c-dump.c: Include hash-set.h, machmode.h,
3840 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3841 fold-const.h, wide-int.h, and inchash.h due to
3842 flattening of tree.h.
3843 * c-format.c: Include hash-set.h, machmode.h,
3844 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3845 fold-const.h, wide-int.h, inchash.h and real.h due to
3846 flattening of tree.h.
3847 * c-gimplify.c: Include hash-set.h, machmode.h,
3848 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3849 fold-const.h, wide-int.h, and inchash.h due to
3850 flattening of tree.h.
3851 * cilk.c: Ditto.
3852 * c-lex.c: Ditto.
3853 * c-omp.c: Ditto.
3854 * c-opts.c: Ditto.
3855 * c-pch.c: Ditto.
3856 * c-ppoutput.c: Ditto.
3857 * c-pragma.c: Ditto.
3858 * c-pretty-print.c: Ditto.
3859 * c-semantics.c: Ditto.
3860 * c-ubsan.c: Ditto.
3861 * stub-objc.c: Ditto.
3862
f5481fc4
JM
38632015-01-08 Jason Merrill <jason@redhat.com>
3864
3865 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
3866 do_ubsan_in_current_function.
3867 (ubsan_maybe_instrument_reference_or_call): Likewise.
3868 * c-ubsan.h: Declare it.
3869
de35aa66
MS
38702015-01-08 Mike Stump <mikestump@comcast.net>
3871
3872 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
3873
4a9a42ab
MP
38742015-01-07 Marek Polacek <polacek@redhat.com>
3875
3876 PR c/64440
3877 * c-common.c (c_fully_fold_internal): Warn for division and modulo
3878 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
3879
2f42e5de
TS
38802015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3881
3882 PR c++/31397
3883 * c.opt (Wsuggest-override): New option.
3884
5624e564
JJ
38852015-01-05 Jakub Jelinek <jakub@redhat.com>
3886
3887 Update copyright years.
3888
5bd012f8
MP
38892015-01-05 Marek Polacek <polacek@redhat.com>
3890
3891 PR c/64423
3892 * c-common.c (warn_array_subscript_with_type_char): Add location_t
3893 parameter. Use it.
3894 * c-common.h (warn_array_subscript_with_type_char): Update
3895 declaration.
3896
a7fa8d18
ESR
38972014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
3898
3899 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
3900 Control macro with flag_sized_deallocation.
3901
3f8257db 39022014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3903
3904 * c.opt (Wdiscarded-array-qualifiers): New option.
3905
1f8d3e84
JJ
39062014-12-19 Jakub Jelinek <jakub@redhat.com>
3907
3908 PR preprocessor/63831
3909 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
3910 and __has_cpp_attribute here.
3911 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
3912 c_common_has_attribute.
3913 * c-common.h (c_common_has_attribute): New prototype.
3914 * c-lex.c (init_c_lex): Set cb->has_attribute to
3915 c_common_has_attribute instead of cb_has_attribute.
3916 (get_token_no_padding): New function.
3917 (cb_has_attribute): Renamed to ...
3918 (c_common_has_attribute): ... this. No longer static. Use
3919 get_token_no_padding, require ()s, don't build TREE_LIST
3920 unnecessarily, fix up formatting, adjust diagnostics, call
3921 init_attributes.
3922
20b06add
JM
39232014-12-15 Jason Merrill <jason@redhat.com>
3924
3925 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
3926 (-Wsized-deallocation): New.
3927 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
3928 to on in C++14 and up.
3929
94a073b2
JM
39302014-12-11 Jason Merrill <jason@redhat.com>
3931
acaa5911
JM
3932 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
3933
94a073b2
JM
3934 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
3935 we aren't complaining about VLAs.
3936
7fb66c15
MP
39372014-12-06 Marek Polacek <polacek@redhat.com>
3938
3939 PR tree-optimization/64183
3940 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
3941 shift-expression if it is integer_type_node. Use types_compatible_p.
3942
b731b390
JJ
39432014-11-29 Jakub Jelinek <jakub@redhat.com>
3944
3945 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
3946 last argument from create_tmp_var_raw and create_tmp_var calls.
3947 * cilk.c (gimplify_cilk_spawn): Likewise.
3948 * c-omp.c (c_finish_omp_atomic): Likewise.
3949
6a4da643
MP
39502014-11-28 Marek Polacek <polacek@redhat.com>
3951
3952 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
3953 instead of unsigned_type_node.
3954
541e35a6
MP
39552014-11-28 Marek Polacek <polacek@redhat.com>
3956
3957 PR c/63862
3958 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
3959 to op1_utype.
3960 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
3961 expression to unsigned_type_node.
3962
dcc97066
MW
39632014-11-20 Mark Wielaard <mjw@redhat.com>
3964
3965 PR debug/38757
3966 * c-opts.c (set_std_c89): Set lang_hooks.name.
3967 (set_std_c99): Likewise.
3968 (set_std_c11): Likewise.
3969 (set_std_cxx98): Likewise.
3970 (set_std_cxx11): Likewise.
3971 (set_std_cxx14): Likewise.
3972 (set_std_cxx1z): Likewise.
3973
aa7da51a
JJ
39742014-11-21 Jakub Jelinek <jakub@redhat.com>
3975
3976 PR target/63764
3977 * c-common.h (convert_vector_to_pointer_for_subscript): Change
3978 return type to bool.
009a3480 3979 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
3980 (convert_vector_to_pointer_for_subscript): Change return type to
3981 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
3982 and copy it into a TARGET_EXPR and use that instead of *vecp
3983 directly.
3984
538dd0b7
DM
39852014-11-19 David Malcolm <dmalcolm@redhat.com>
3986
3987 Merger of git branch "gimple-classes-v2-option-3".
3988 * ChangeLog.gimple-classes: New.
3989 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
3990 from being just a vec<gimple> to a vec<gbind *>.
3991
c39a5e99
JJ
39922014-11-18 Jakub Jelinek <jakub@redhat.com>
3993
3994 PR sanitizer/63813
3995 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
3996 argument to ptype, set type to TREE_TYPE (ptype). Don't call
3997 get_pointer_alignment for non-pointers. Use ptype, or if it is
3998 reference type, corresponding pointer type, as type of kind
3999 argument.
4000 (ubsan_maybe_instrument_reference,
4001 ubsan_maybe_instrument_member_call): Adjust callers.
4002
8537a4a9
MP
40032014-11-15 Marek Polacek <polacek@redhat.com>
4004
4005 PR middle-end/63884
4006 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4007 for NULL fndecl.
4008 (extract_array_notation_exprs): Return for NULL node.
4009
2079956a
JM
40102014-11-12 Joseph Myers <joseph@codesourcery.com>
4011
4012 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4013 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4014
1304953e
JJ
40152014-11-12 Jakub Jelinek <jakub@redhat.com>
4016
4017 PR c/59708
4018 * c-common.c (check_builtin_function_arguments): Handle
4019 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4020
e5e44252
AK
40212014-11-10 Andi Kleen <ak@linux.intel.com>
4022
4023 PR c/60804
4024 * c-common.h (check_no_cilk): Declare.
4025 * cilk.c (get_error_location): New function.
4026 (check_no_cilk): Dito.
4027
e64b984d
AK
40282014-11-10 Andi Kleen <ak@linux.intel.com>
4029
4030 * cilk.c (recognize_spawn): Use expression location
4031 for error message.
4032
13c21655
PC
40332014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4034
4035 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4036
42fd12b1
ESR
40372014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4038
4039 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4040 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4041 (__cpp_range_based_for, __cpp_initializer_lists,
4042 __cpp_delegating_constructors, __cpp_nsdmi,
4043 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4044 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4045 __has_cpp_attribute.
4046 * c-lex.c (cb_has_attribute): New callback CPP function;
4047 (init_c_lex): Set has_attribute callback.
4048
6f450181
RB
40492014-11-04 Richard Biener <rguenther@suse.de>
4050
4051 * c-common.c (shorten_compare): Do not shorten mixed
4052 DFP and non-DFP compares.
4053
26f0e1d6
ESR
40542014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4055
4056 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4057 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4058 Commentary and rearrangement of tests.
4059 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4060 Commentary and rearrangement of tests.
4061 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4062 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4063
ef4bddc2
RS
40642014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4065
4066 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4067 enum from machine_mode.
4068
c582198b
AM
40692014-10-28 Andrew MacLeod <amacleod@redhat.com>
4070
adfac8df
JJ
4071 * c-common.c: Adjust include files.
4072 * c-gimplify.c: Ditto.
4073 * cilk.c: Ditto.
4074 * c-pragma.c: Ditto.
4075 * c-ubsan.c: Ditto.
c582198b 4076
60393bbc
AM
40772014-10-27 Andrew MacLeod <amacleod@redhat.com>
4078
4079 * c-gimplify.c: Adjust include files.
4080
d723bb7c
MLI
40812014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4082
4083 PR c++/53061
4084 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
4085 c_common_initialize_diagnostics.
4086 * c-common.h: Likewise.
4087
90f3520e
MP
40882014-10-24 Marek Polacek <polacek@redhat.com>
4089
4090 PR c/56980
4091 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
4092 print "struct"/"union"/"enum" for typedefed names.
4093
59d7607a
MP
40942014-10-23 Marek Polacek <polacek@redhat.com>
4095
4096 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
4097 in unsigned type.
4098
d95a2703
JJ
40992014-10-22 Jakub Jelinek <jakub@redhat.com>
4100 Yury Gribov <y.gribov@samsung.com>
4101
4102 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4103 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
4104 instead of flag_sanitize_recover as bool flag.
4105
8e6ef852
KY
41062014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
4107
4108 * cilk.c: Revert previous change.
4109
948cf550
IZ
41102014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
4111
4112 PR c/63307
4113 * cilk.c: Include vec.h.
4114 (struct cilk_decls): New structure.
4115 (wrapper_parm_cb): Split this function to...
4116 (fill_decls_vec): ...this...
4117 (create_parm_list): ...and this.
4118 (compare_decls): New function.
4119 (for_local_cb): Remove.
4120 (wrapper_local_cb): Ditto.
4121 (build_wrapper_type): For now first traverse and fill vector of
4122 declarations then sort it and then deal with sorted vector.
4123 (cilk_outline): Ditto.
4124 (declare_one_free_variable): Ditto.
4125
92574c7c
MP
41262014-10-17 Marek Polacek <polacek@redhat.com>
4127
4128 * c-opts.c (c_common_post_options): Set warn_implicit_int.
4129 * c.opt (Wimplicit-int): Initialize to -1.
4130
83685514
AM
41312014-10-16 Andrew MacLeod <amacleod@redhat.com>
4132
4133 * c-pragma.c: Adjust include files.
4134 * c-semantics.c: Likewise.
4135
5b8300ea
DD
41362014-10-16 DJ Delorie <dj@redhat.com>
4137
4138 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
4139 multiples of bytes.
4140
5f83e90b
JM
41412014-10-14 Jason Merrill <jason@redhat.com>
4142
4143 PR c++/63455
4144 * c-common.h (CPP_PREPARSED_EXPR): New.
4145 (N_CP_TTYPES): Adjust.
4146
d73326ca
MP
41472014-10-15 Marek Polacek <polacek@redhat.com>
4148
4149 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
4150
78a7c317
DD
41512014-10-14 DJ Delorie <dj@redhat.com>
4152
4153 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
4154 types, not just __int128.
4155 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
4156 types, not just __int128.
4157 (cpp_atomic_builtins): Round pointer sizes up.
4158 (type_suffix): Use type precision, not specific types.
4159 * c-common.c (c_common_reswords): Remove __int128 special case.
4160 (c_common_type_for_size): Check for all __intN types, not just
4161 __int128.
4162 (c_common_type_for_mode): Likewise.
4163 (c_common_signed_or_unsigned_type): Likewise.
4164 (c_build_bitfield_integer_type): Likewise.
4165 (c_common_nodes_and_builtins): Likewise.
4166 (keyword_begins_type_specifier): Likewise.
4167 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
4168 __intN variants.
4169
2a22f99c
TS
41702014-10-12 Trevor Saunders <tsaunders@mozilla.com>
4171
4172 * c-common.c: Use hash_table instead of hashtab.
4173
2a8ef767
ESR
41742014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4175
adfac8df 4176 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
4177 C++11 section.
4178
3c9aabbd
MG
41792014-10-03 Marc Glisse <marc.glisse@inria.fr>
4180
4181 PR c++/54427
4182 PR c++/57198
4183 PR c++/58845
4184 * c-common.c (warn_logical_operator): Punt for vectors.
4185
a15f7cb8
ESR
41862014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4187
4188 Implement SD-6: SG10 Feature Test Recommendations
4189 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
4190 macros and the __has_header macro.
4191
8d0cf15e
JM
41922014-09-30 Jason Merrill <jason@redhat.com>
4193
dd5d5481
JM
4194 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
4195 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
4196 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4197
b752325e
JM
4198 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
4199 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4200
8d0cf15e
JM
4201 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
4202 * c-common.c (c_common_reswords): Remove __is_convertible_to.
4203
083e891e
MP
42042014-09-24 Marek Polacek <polacek@redhat.com>
4205
4206 PR c/61405
4207 PR c/53874
4208 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
4209
7861b648
AK
42102014-09-23 Andi Kleen <ak@linux.intel.com>
4211
4212 * c-common.c (handle_no_reorder_attribute): New function.
4213 (c_common_attribute_table): Add no_reorder attribute.
4214
9a79452d
JM
42152014-09-22 Joseph Myers <joseph@codesourcery.com>
4216
4217 * c-cppbuiltin.c (c_cpp_builtins): Define
4218 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
4219 modes.
4220
dd69f047
JM
42212014-09-18 Joseph Myers <joseph@codesourcery.com>
4222
4223 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
4224 for supported floating-point modes.
4225
737a4826
MLI
42262014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4227
4228 * c.opt (Wpsabi): Use LangEnabledBy.
4229 * c-opts.c (c_common_handle_option): Do not handle here.
4230
8cc4b7a2
JM
42312014-09-12 Joseph Myers <joseph@codesourcery.com>
4232
4233 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
4234 macros for floating-point modes.
4235
179b5a55
MG
42362014-09-11 Marc Glisse <marc.glisse@inria.fr>
4237
4238 PR target/58757
4239 * c-cppbuiltin.c (builtin_define_float_constants): Correct
4240 __*_DENORM_MIN__ without denormals.
4241
570a11fe
JJ
42422014-09-10 Jakub Jelinek <jakub@redhat.com>
4243
4244 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4245 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4246 ubsan_create_data callers.
4247 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
4248 index is constant or BIT_AND_EXPR with constant mask and is
4249 small enough for the bound.
4250 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
4251 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
4252
b559c810
MLI
42532014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4254
4255 * c.opt: Add CppReason to various flags.
4256 (Wdate-time): Re-sort.
4257 * c-common.c: Include c-common.h earlier.
4258 (struct reason_option_codes_t): Delete.
4259 (c_option_controlling_cpp_error): Prefix global type and struct
4260 with cpp_.
4261
1ef33fd4
MLI
42622014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4263
4264 * c.opt (Wnormalized): New.
4265 (Wnormalized=): Use Enum and Reject Negative.
4266 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
4267
66bb34c0
JM
42682014-09-08 Joseph Myers <joseph@codesourcery.com>
4269
4270 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
4271 digits of floating-point modes if -fbuilding-libgcc.
4272
53d68b9f
JM
42732014-09-05 Joseph Myers <joseph@codesourcery.com>
4274
4275 * c-cppbuiltin.c (c_cpp_builtins): Also define
4276 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
4277 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
4278 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
4279 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
4280 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
4281 __LIBGCC_STACK_GROWS_DOWNWARD__,
4282 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
4283 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
4284 __LIBGCC_DWARF_FRAME_REGISTERS__,
4285 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
4286 __LIBGCC_STACK_POINTER_REGNUM__ and
4287 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
4288 (builtin_define_with_value): Handle backslash-escaping in string
4289 macro values.
4290
f65586dc
RB
42912014-09-05 Richard Biener <rguenther@suse.de>
4292
4293 PR middle-end/63148
4294 * c-format.c (check_format_arg): Properly handle
4295 effectively signed POINTER_PLUS_EXPR offset.
4296
2b71f4a4
MLI
42972014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
4298
4299 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
4300 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
4301 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
4302 and Init.
4303 * c-opts.c (c_common_handle_option): Do not handle here.
4304 (sanitize_cpp_opts): Likewise.
4305 * c-common.c (struct reason_option_codes_t): Handle
4306 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
4307
d2e4feca
MP
43082014-09-03 Marek Polacek <polacek@redhat.com>
4309
4310 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
4311
9a771876
JJ
43122014-09-02 Jakub Jelinek <jakub@redhat.com>
4313 Balaji V. Iyer <balaji.v.iyer@intel.com>
4314 Igor Zamyatin <igor.zamyatin@intel.com>
4315
4316 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
4317 * c-common.c (c_common_reswords): Added _Cilk_for.
4318 * c-common.h (enum rid): Added RID_CILK_FOR.
4319 (cilk_for_number_of_iterations): Add declaration.
4320 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
4321 CILK_FOR.
4322 * c-pragma.c (init_pragma): Register "grainsize" pragma.
4323 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
4324
81b5d104
MLI
43252014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4326
4327 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
4328 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
4329 Wundef): Use CPP, Var and Init.
4330 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
4331
b753b37b
MLI
43322014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4333
4334 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
4335 * c-opts.c (c_common_handle_option): Do not handle here.
4336
028aee17
JM
43372014-08-25 Jason Merrill <jason@redhat.com>
4338
4339 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
4340 -std=c++14 and -std=gnu++14, rather than the reverse.
4341 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
4342 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
4343 * c-common.h (cxx_dialect): Remove cxx1y.
4344
e4276ba5
ESR
43452014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
4346
4347 * c-common.h (enum cxx_dialect): Add cxx14.
4348 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
4349 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
4350 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
4351
a545cacd
JM
43522014-08-22 Jason Merrill <jason@redhat.com>
4353
4354 * c.opt (std=gnu++17): Fix alias.
4355
59ea0364
MP
43562014-08-22 Marek Polacek <polacek@redhat.com>
4357
4358 PR c++/62199
4359 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
4360 check for vector types. Drop LHS argument.
4361 * c-common.h (warn_logical_not_parentheses): Adjust.
4362
596e808c
MLI
43632014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4364
4365 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
4366 (Wmultichar): Likewise.
4367 (Wdate-time): Use C-family languages instead of Common. Use CPP
4368 and Var.
4369 * c-opts.c (c_common_handle_option): Do not handle the above
4370 options here.
4371 (sanitize_cpp_opts): Likewise.
4372
18767f65
MLI
43732014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4374
4375 PR fortran/44054
4376 * c-opts.c: Include tree-diagnostics.h.
4377 (c_diagnostic_finalizer): New.
4378 (c_common_initialize_diagnostics): Use it.
4379
b4413594
MLI
43802014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4381
4382 PR preprocessor/51303
4383 * c-common.c (struct reason_option_codes_t option_codes):
4384 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
4385
43f9a13c
MLI
43862014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4387
4388 PR c/60975
4389 PR c/53063
4390 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
4391 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
4392 (c_common_post_options): Call init_global_opts_from_cpp.
4393 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
4394
04159acf
MP
43952014-08-19 Marek Polacek <polacek@redhat.com>
4396
4397 PR c++/62153
4398 * c-common.c (maybe_warn_bool_compare): New function.
4399 * c-common.h (maybe_warn_bool_compare): Declare.
4400 * c.opt (Wbool-compare): New option.
4401
35aff4fb
MP
44022014-08-19 Marek Polacek <polacek@redhat.com>
4403
4404 * c.opt (Wc99-c11-compat): New option.
4405
177cce46
MP
44062014-08-19 Marek Polacek <polacek@redhat.com>
4407
4408 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
4409 to warn_c90_c99_compat.
4410 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
4411 to -1.
4412
6ae9194f
MLI
44132014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
4414 Steven Bosscher <steven@gcc.gnu.org>
4415
4416 PR c/52952
4417 * c-format.c: Add extra_arg_loc and format_string_loc to struct
4418 format_check_results.
4419 (check_function_format): Use true and add comment for boolean
4420 argument.
4421 (finish_dollar_format_checking): Use explicit location when warning.
4422 (check_format_info): Likewise.
4423 (check_format_arg): Set extra_arg_loc and format_string_loc.
4424 (check_format_info_main): Use explicit location when warning.
4425 (check_format_types): Pass explicit location.
4426 (format_type_warning): Likewise.
4427
8e54f6d3
MLI
44282014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4429
4430 PR fortran/44054
4431 * c-format.c: Handle Fortran flags.
4432
cd4e76fc
IZ
44332014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
4434
4435 PR other/61962
4436 * array-notation-common.c (find_rank): Added handling for other
4437 types of references.
4438
f3bede71
MP
44392014-08-10 Marek Polacek <polacek@redhat.com>
4440
4441 PR c/51849
4442 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
4443 * c.opt (Wc90-c99-compat): Add option.
4444
9f25a338
TS
44452014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4446
4447 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
4448
62e4eb35
MP
44492014-08-03 Marek Polacek <polacek@redhat.com>
4450
4451 * c-common.c (check_case_value): Add location_t parameter. Use it.
4452 (c_add_case_label): Pass loc to check_case_value.
4453
b787e7a2
TS
44542014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4455
4456 * cilk.c: Use hash_map instead of pointer_map.
4457
6e2830c3
TS
44582014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4459
4460 * c-gimplify.c: Use hash_set instead of pointer_set.
4461
a7ee52fb
IZ
44622014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4463
4464 PR middle-end/61455
4465 * array-notation-common.c (extract_array_notation_exprs): Handling
4466 of DECL_EXPR added.
4467
944fa280
JJ
44682014-08-01 Jakub Jelinek <jakub@redhat.com>
4469
4470 * c-common.h (min_align_of_type): Removed prototype.
4471 * c-common.c (min_align_of_type): Removed.
4472 * c-ubsan.h (ubsan_maybe_instrument_reference,
4473 ubsan_maybe_instrument_member_call): New prototypes.
4474 * c-ubsan.c: Include stor-layout.h and builtins.h.
4475 (ubsan_maybe_instrument_reference_or_call,
4476 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
4477 functions.
4478
b4dfdc11
MG
44792014-07-31 Marc Glisse <marc.glisse@inria.fr>
4480
4481 PR c++/60517
4482 * c.opt (-Wreturn-local-addr): Move to common.opt.
4483
a41844e5
JM
44842014-07-30 Jason Merrill <jason@redhat.com>
4485
4486 PR c++/61659
4487 PR c++/61687
4488 Revert:
4489 * c.opt (-fuse-all-virtuals): New.
4490
976d5a22
TT
44912014-07-30 Tom Tromey <tromey@redhat.com>
4492
4493 PR c/59855
4494 * c.opt (Wdesignated-init): New option.
4495 * c-common.c (c_common_attribute_table): Add "designated_init".
4496 (handle_designated_init): New function.
4497
cdc94aca
MP
44982014-07-24 Marek Polacek <polacek@redhat.com>
4499
4500 PR c/57653
4501 * c-opts.c (c_finish_options): If -imacros is in effect, return.
4502
f41373b6
DS
45032014-07-16 Dodji Seketeli <dodji@redhat.com>
4504
4505 PR preprocessor/60723 - missing system-ness marks for macro tokens
4506 * c-ppoutput.c (struct print::prev_was_system_token): New data
4507 member.
4508 (init_pp_output): Initialize it.
4509 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
4510 (do_line_change): Return a flag saying if a line marker was
4511 emitted or not.
4512 (scan_translation_unit): Detect if the system-ness of the token we
4513 are about to emit is different from the one of the previously
4514 emitted token. If so, emit a line marker. Avoid emitting useless
4515 adjacent line markers. Avoid emitting line markers for tokens
4516 originating from the expansion of built-in macros.
4517 (scan_translation_unit_directives_only): Adjust.
4518
4d661eaa
MP
45192014-07-15 Marek Polacek <polacek@redhat.com>
4520
4521 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
4522 TYPE_MAX_VALUE is NULL.
4523
b108f48f
JJ
45242014-07-14 Jakub Jelinek <jakub@redhat.com>
4525
4526 PR middle-end/61294
4527 * c.opt (Wmemset-transposed-args): New warning.
4528
c0221884
JM
45292014-07-10 Jason Merrill <jason@redhat.com>
4530
4531 PR c++/61659
4532 PR c++/61687
4533 * c.opt (-fuse-all-virtuals): New.
4534
63dfbb95
RB
45352014-07-09 Richard Biener <rguenther@suse.de>
4536
4537 PR c-family/61741
4538 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
4539 using unsigned arithmetic if overflow does not wrap instead of
4540 if overflow is undefined.
4541
773ec47f
MP
45422014-07-06 Marek Polacek <polacek@redhat.com>
4543
4544 PR c/6940
4545 * c.opt (Wsizeof-array-argument): New option.
4546
00a7ba58
JJ
45472014-07-03 Jakub Jelinek <jakub@redhat.com>
4548
b1726d6c 4549 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
4550 comments->count <= 1, as comments->entries might be NULL.
4551
52ec0ea3
MP
45522014-07-01 Marek Polacek <polacek@redhat.com>
4553
4554 * c.opt (Wint-conversion): New option.
4555
d5c3d343
MP
45562014-07-01 Marek Polacek <polacek@redhat.com>
4557
4558 PR c/58286
4559 * c.opt (Wincompatible-pointer-types): New option.
4560
6e7ceb17
PC
45612014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
4562
4563 PR c++/51400
4564 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
4565 Do not discard TYPE_QUALS of type.
4566
da73100b
JM
45672014-06-26 Jason Merrill <jason@redhat.com>
4568
4569 * c-common.h (enum cxx_dialect): Add cxx1z.
4570 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
4571 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
4572
08eedf75
TJ
45732014-06-26 Teresa Johnson <tejohnson@google.com>
4574
4575 * c-common.h (get_dump_info): Declare.
4576 * c-gimplify.c (c_genericize): Use saved dump files.
4577 * c-opts.c (c_common_parse_file): Begin and end dumps
4578 once around parsing invocation.
4579 (get_dump_info): New function.
4580
7b56b2f8
MP
45812014-06-23 Marek Polacek <polacek@redhat.com>
4582 Andrew MacLeod <amacleod@redhat.com>
4583
4584 PR c/61553
4585 * c-common.c (get_atomic_generic_size): Don't segfault if the
4586 type doesn't have a size.
4587
0e37a2f3
MP
45882014-06-20 Marek Polacek <polacek@redhat.com>
4589
4590 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
4591 (ubsan_walk_array_refs_r): New function.
4592 (c_genericize): Instrument array bounds.
4593 * c-ubsan.c: Include "internal-fn.h".
4594 (ubsan_instrument_division): Mark instrumented arrays as having
4595 side effects. Adjust ubsan_type_descriptor call.
4596 (ubsan_instrument_shift): Likewise.
4597 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
4598 (ubsan_instrument_bounds): New function.
4599 (ubsan_array_ref_instrumented_p): New function.
4600 (ubsan_maybe_instrument_array_ref): New function.
4601 * c-ubsan.h (ubsan_instrument_bounds): Declare.
4602 (ubsan_array_ref_instrumented_p): Declare.
4603 (ubsan_maybe_instrument_array_ref): Declare.
4604
46052014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
4606
4607 PR lto/61123
4608 * c.opt (fshort-enums): Add to LTO.
4609 * c.opt (fshort-wchar): Likewise.
4610
5c3d09f7
MP
46112014-06-16 Marek Polacek <polacek@redhat.com>
4612
4613 PR c/60439
4614 * c.opt (Wswitch-bool): Add Var.
4615
9cf32741
JJ
46162014-06-12 Jakub Jelinek <jakub@redhat.com>
4617
4618 PR middle-end/61486
4619 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
4620 #pragma omp target teams or
4621 #pragma omp {,target }teams distribute simd.
4622
62984918
JM
46232014-06-12 Jason Merrill <jason@redhat.com>
4624
4625 * c.opt (Wabi=, fabi-compat-version): New.
4626 * c-opts.c (c_common_handle_option): Handle -Wabi=.
4627 (c_common_post_options): Handle flag_abi_compat_version default.
4628 Disallow -fabi-compat-version=1.
4629 * c-common.h (abi_version_crosses): New.
4630
f961457f
JH
46312014-06-11 Jan Hubicka <hubicka@ucw.cz>
4632
adfac8df 4633 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
4634 section names that are no longer trees.
4635
92d28cbb
JJ
46362014-06-10 Jakub Jelinek <jakub@redhat.com>
4637
4638 PR fortran/60928
4639 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
4640 (omp_pragmas): ... back here.
4641
742938c9
MP
46422014-06-05 Marek Polacek <polacek@redhat.com>
4643
4644 PR c/49706
4645 * c-common.c (warn_logical_not_parentheses): New function.
4646 * c-common.h (warn_logical_not_parentheses): Declare.
4647 * c.opt (Wlogical-not-parentheses): New option.
4648
9d548dfb
MP
46492014-06-04 Marek Polacek <polacek@redhat.com>
4650
4651 PR c/30020
4652 * c-common.c (check_case_bounds): Add location parameter.
4653 Use it.
4654 (c_add_case_label): Pass loc to check_case_bounds.
4655
fedfecef
MP
46562014-06-03 Marek Polacek <polacek@redhat.com>
4657
4658 PR c/60439
4659 * c.opt (Wswitch-bool): New option.
4660
f6a7cffc
TS
46612014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4662
040d18b6
TS
4663 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
4664 Remove prototypes.
4665 (record_types_used_by_current_var_decl): Move prototype to where
4666 it belongs.
4667
f6a7cffc
TS
4668 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
4669 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
4670 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
4671
632f2871
RS
46722014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4673
4674 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
4675 * c-common.c (c_common_nodes_and_builtins): Don't initialize
4676 void_zero_node.
4677 * c-pretty-print.c (pp_c_void_constant): New function.
4678 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
4679 (c_pretty_printer::expression): Handle VOID_CST.
4680 * cilk.c (extract_free_variables): Likewise.
4681 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
4682 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
4683
766090c2
TS
46842014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4685
4686 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
4687 * c-pragma.c (push_alignment): Adjust.
4688 (handle_pragma_push_options): Likewise.
4689
661a0813
MP
46902014-05-09 Marek Polacek <polacek@redhat.com>
4691
4692 PR c/50459
4693 * c-common.c (check_user_alignment): Return -1 if alignment is error
4694 node.
4695 (handle_aligned_attribute): Don't call default_conversion on
4696 FUNCTION_DECLs.
4697 (handle_vector_size_attribute): Likewise.
4698 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
4699 (handle_sentinel_attribute): Call default_conversion and allow even
4700 integral types as an argument.
4701
2793eeab
MP
47022014-05-08 Marek Polacek <polacek@redhat.com>
4703
4704 PR c/61053
4705 * c-common.c (min_align_of_type): New function factored out from...
4706 (c_sizeof_or_alignof_type): ...here.
4707 * c-common.h (min_align_of_type): Declare.
4708
f827930a
MP
47092014-05-08 Marek Polacek <polacek@redhat.com>
4710
4711 PR c/61077
4712 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
4713 parameter type of main.
4714
ca49b74e
DD
47152014-05-07 DJ Delorie <dj@redhat.com>
4716
4717 * c-cppbuiltin.c (print_bits_of_hex): New.
4718 (builtin_define_type_minmax): Print values using hex so as not to
4719 require a pre-computed list of string values.
4720
1d60af08
KZ
47212014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4722 Mike Stump <mikestump@comcast.net>
4723 Richard Sandiford <rdsandiford@googlemail.com>
4724
4725 * c-ada-spec.c: Include wide-int.h.
4726 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
4727 (dump_generic_ada_node): Use wide-int interfaces.
4728 * c-common.c: Include wide-int-print.h.
4729 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
4730 (pointer_int_sum): Use wide-int interfaces.
4731 (c_common_nodes_and_builtins): Use make_int_cst.
4732 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
4733 (handle_alloc_size_attribute): Use wide-int interfaces.
4734 (get_nonnull_operand): Likewise.
4735 * c-format.c (get_constant): Use tree_fits_uhwi_p.
4736 * c-lex.c: Include wide-int.h.
4737 (narrowest_unsigned_type): Take a widest_int rather than two
4738 HOST_WIDE_INTs.
4739 (narrowest_signed_type): Likewise.
4740 (interpret_integer): Update accordingly. Use wide-int interfaces.
4741 (lex_charconst): Use wide-int interfaces.
4742 * c-pretty-print.c: Include wide-int.h.
4743 (pp_c_integer_constant): Use wide-int interfaces.
4744 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
4745 INT_CST_LT_UNSIGNED.
4746
b15458be
RB
47472014-05-06 Richard Biener <rguenther@suse.de>
4748
4749 * c-opts.c (c_common_post_options): For -freestanding,
4750 -fno-hosted and -fno-builtin disable pattern recognition
4751 if not enabled explicitely.
4752
6577374e
MP
47532014-05-02 Marek Polacek <polacek@redhat.com>
4754
4755 * c.opt (Wsizeof-pointer-memaccess): Describe option.
4756
d00887e8
MP
47572014-05-01 Marek Polacek <polacek@redhat.com>
4758
4759 PR c/43245
4760 * c.opt (Wdiscarded-qualifiers): Add.
4761
f8ed5150
MP
47622014-04-30 Marek Polacek <polacek@redhat.com>
4763
4764 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
4765 INT_MIN / -1 sanitization only for integer types.
4766
45484dcf
MP
47672014-04-25 Marek Polacek <polacek@redhat.com>
4768
4769 PR c/18079
4770 * c-common.c (handle_noinline_attribute): Warn if the attribute
4771 conflicts with always_inline attribute.
4772 (handle_always_inline_attribute): Warn if the attribute conflicts
4773 with noinline attribute.
4774
38e514c0
MP
47752014-04-25 Marek Polacek <polacek@redhat.com>
4776
4777 PR c/60156
4778 * c-common.c (check_main_parameter_types): Warn about variadic main.
4779
44875f92
MS
47802014-04-24 Mike Stump <mikestump@comcast.net>
4781
4782 * c.opt (Wshadow-ivar): Default to on.
4783
dcaaa5a0
DP
47842014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
4785
4786 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
4787
c07d7c02
MP
47882014-04-23 Marek Polacek <polacek@redhat.com>
4789
4790 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
4791
1c33c9b7
JJ
47922014-04-22 Jakub Jelinek <jakub@redhat.com>
4793
4794 PR sanitizer/60275
4795 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
4796 if flag_sanitize_undefined_trap_on_error.
4797 (ubsan_instrument_division, ubsan_instrument_shift,
4798 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
4799 if !flag_sanitize_recover.
4800
793c625f
MG
48012014-04-22 Marc Glisse <marc.glisse@inria.fr>
4802
4803 PR libstdc++/43622
4804 * c-common.c (registered_builtin_types): Make non-static.
4805 * c-common.h (registered_builtin_types): Declare.
4806
b0f1bf36
RB
48072014-04-14 Richard Biener <rguenther@suse.de>
4808 Marc Glisse <marc.glisse@inria.fr>
4809
4810 PR c/60819
4811 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
4812 apply may-alias the scalar pointer type when applicable.
4813
3b07fa4a
IZ
48142014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4815
4816 PR middle-end/60467
4817 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
4818 as possible argument for Cilk_spawn.
4819
cbbd2b1c
TB
48202014-04-11 Tobias Burnus <burnus@net-b.de>
4821
4822 PR c/60194
4823 * c.opt (Wformat-signedness): Add
4824 * c-format.c(check_format_types): Use it.
4825
6415bd5d
JM
48262014-04-11 Jason Merrill <jason@redhat.com>
4827
4828 PR c++/57926
4829 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
4830 default_conversion for an array argument.
4831
6525783a
MP
48322014-04-08 Marek Polacek <polacek@redhat.com>
4833
4834 PR sanitizer/60745
4835 * c-ubsan.c: Include asan.h.
4836 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
4837
880a467b
NS
48382014-04-03 Nathan Sidwell <nathan@codesourcery.com>
4839
4840 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
4841
7b59ff2d
MP
48422014-04-02 Marek Polacek <polacek@redhat.com>
4843
4844 * c-common.h (c_expand_expr): Remove declaration.
4845
8edbfaa6
JJ
48462014-03-28 Jakub Jelinek <jakub@redhat.com>
4847
4848 PR c++/60689
4849 * c-common.c (add_atomic_size_parameter): When creating new
4850 params vector, push the size argument first.
4851
07d72e1d
JJ
48522014-03-26 Jakub Jelinek <jakub@redhat.com>
4853
4854 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4855 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4856 ubsan_create_data callers.
4857
b35e0fa0
JJ
48582014-03-22 Jakub Jelinek <jakub@redhat.com>
4859
4860 PR debug/60603
4861 * c-opts.c (c_finish_options): Restore cb_file_change call to
4862 <built-in>.
4863
39a1ebb3
JJ
48642014-03-13 Jakub Jelinek <jakub@redhat.com>
4865
4866 PR middle-end/36282
4867 * c-pragma.c (apply_pragma_weak): Only look at
4868 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
4869 DECL_ASSEMBLER_NAME_SET_P (decl).
4870 (maybe_apply_pending_pragma_weaks): Exit early if
4871 vec_safe_is_empty (pending_weaks) rather than only when
4872 !pending_weaks.
4873 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
4874 set assembler name back to NULL afterwards.
4875
a07f6ed2
JM
48762014-03-11 Jason Merrill <jason@redhat.com>
4877
4878 * c.opt: Add -std=gnu++14.
4879
75b107f5
IB
48802014-03-11 Ian Bolton <ian.bolton@arm.com>
4881
4882 * c-opts.c (c_common_post_options): Don't override
4883 -ffp-contract=fast if unsafe-math-optimizations is on.
4884
f42c637e
PM
48852014-03-08 Paulo Matos <paulo@matos-sorge.com>
4886
22b15758 4887 * c.opt: Enable LTO FE for fshort-double.
f42c637e 4888
70e24808
JM
48892014-03-07 Jason Merrill <jason@redhat.com>
4890
4891 * c.opt: Add -std=c++14.
4892
3af9c5e9
MP
48932014-03-06 Marek Polacek <polacek@redhat.com>
4894
4895 PR c/60197
4896 * cilk.c (contains_cilk_spawn_stmt): New function.
4897 (contains_cilk_spawn_stmt_walker): Likewise.
4898 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
4899 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
4900
b3bdf019
JJ
49012014-03-03 Jakub Jelinek <jakub@redhat.com>
4902
4903 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
4904 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
4905 even when flag_preprocess_only.
4906
ca7e759d
JM
49072014-02-26 Jason Merrill <jason@redhat.com>
4908
4909 PR c++/59231
4910 PR c++/11586
4911 * c-common.c (shorten_compare): Don't check
4912 c_inhibit_evaluation_warnings.
4913
28e41874
JJ
49142014-02-19 Jakub Jelinek <jakub@redhat.com>
4915
cca615af
JJ
4916 PR c/37743
4917 * c-common.c (c_common_nodes_and_builtins): When initializing
4918 c_uint{16,32,64}_type_node, also set corresponding
4919 uint{16,32,64}_type_node to the same value.
4920
28e41874
JJ
4921 PR c++/60267
4922 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
4923 for PRAGMA_IVDEP if flag_preprocess_only.
4924
c2bf53a1
JJ
49252014-02-12 Jakub Jelinek <jakub@redhat.com>
4926
4927 PR c/60101
4928 * c-common.c (merge_tlist): If copy is true, call new_tlist,
4929 if false, add ADD itself, rather than vice versa.
4930 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
4931 copy. For SAVE_EXPR, only call merge_tlist once.
4932
8fcbce72
JJ
49332014-02-08 Jakub Jelinek <jakub@redhat.com>
4934
4935 PR middle-end/60092
4936 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
4937 and tree_to_uhwi.
4938 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
4939 functions.
4940 (c_common_attribute_table): Add alloc_align and assume_aligned
4941 attributes.
4942
0a756a3f
MP
49432014-02-06 Marek Polacek <polacek@redhat.com>
4944
4945 PR c/60087
4946 * c-common.c (warn_for_sign_compare): Call warning_at with location
4947 instead of warning.
4948
7ec4847a
MP
49492014-02-05 Marek Polacek <polacek@redhat.com>
4950
4951 PR c/53123
4952 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
4953 statement.
4954
66f20604
MP
49552014-02-04 Marek Polacek <polacek@redhat.com>
4956
4957 PR c/60036
4958 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
4959 SAVE_EXPR.
4960
5d77fb19
MG
49612014-02-03 Marc Glisse <marc.glisse@inria.fr>
4962
4963 PR c++/53017
4964 PR c++/59211
4965 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
4966 handle_vector_size_attribute, handle_nonnull_attribute): Call
4967 default_conversion on the attribute argument.
4968 (handle_nonnull_attribute): Increment the argument number.
4969
81e5eca8
MP
49702014-01-31 Marek Polacek <polacek@redhat.com>
4971
4972 PR c/59963
4973 * c-common.c (add_atomic_size_parameter): Pass vNULL to
4974 build_function_call_vec.
4975 (resolve_overloaded_builtin): Likewise.
4976 * c-common.h (build_function_call_vec): Adjust declaration.
4977
68fca595
MP
49782014-01-30 Marek Polacek <polacek@redhat.com>
4979
4980 PR c/59940
4981 * c-common.h (unsafe_conversion_p): Adjust declaration.
4982 (warnings_for_convert_and_check): Likewise.
4983 (convert_and_check): Likewise.
4984 * c-common.c (unsafe_conversion_p): Add location parameter. Call
4985 expansion_point_location_if_in_system_header on it.
4986 (warnings_for_convert_and_check): Add location parameter. Call
4987 expansion_point_location_if_in_system_header on it. Use it.
4988 (convert_and_check): Add location parameter. Use it.
4989 (conversion_warning): Likewise.
4990 (c_add_case_label): Adjust convert_and_check calls.
4991 (scalar_to_vector): Adjust unsafe_conversion_p calls.
4992
b72271b9
BI
49932014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
4994
4995 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
4996 flag_cilkplus.
4997 * c-pragma.c (init_pragma): Likewise.
4998 * c.opt: Likewise.
4999
393e8e8b
MP
50002014-01-23 Marek Polacek <polacek@redhat.com>
5001
5002 PR c/59846
5003 * c-common.c (shorten_compare): Add location_t parameter.
5004 * c-common.h (shorten_binary_op): Adjust declaration.
5005
f04dda30
MP
50062014-01-23 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/58346
5009 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5010 * c-common.h: Declare it.
5011
621955cb
EB
50122014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5013
5014 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5015 * c-ada-spec.c (dump_ads): Likewise.
5016 (cpp_check): Likewise.
5017 (dump_ada_specs): Likewise.
5018
50192014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
5020
5021 PR c++/49718
5022 * c-common.c (handle_no_instrument_function_attribute): Allow
5023 no_instrument_function attribute in class member
5024 definition/declaration.
5025
241f845a
JJ
50262014-01-15 Jakub Jelinek <jakub@redhat.com>
5027
5028 PR c/58943
5029 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5030 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5031 being COMPOUND_EXPR.
5032 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5033 operand a SAVE_EXPR and second MODIFY_EXPR.
5034
e83b8e2e
JJ
50352014-01-09 Jakub Jelinek <jakub@redhat.com>
5036
5037 PR target/58115
5038 * c-pch.c (c_common_write_pch): Call
5039 prepare_target_option_nodes_for_pch.
5040
23a5b65a
RS
50412014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5042
5043 Update copyright years
5044
f9030485
RS
50452014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5046
5047 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5048 the copyright notice.
5049
f2aa696b
EB
50502013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5051
5052 * c-ada-spec.c (print_constructor): New function.
5053 (print_destructor): Retrieve the origin of the destructor.
5054 (print_ada_declaration): Revamp handling of constructors/destructors.
5055
3f8257db 50562013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
5057 Bill Maddox <maddox@google.com>
5058 Jason Merrill <jason@redhat.com>
5059
5060 * c.opt: Add -fdeclone-ctor-dtor.
5061 * c-opts.c (c_common_post_options): Default to on iff -Os.
5062
41958c28
BI
50632013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5064
5065 * c-common.c (c_common_attribute_table): Added "cilk simd function"
5066 attribute.
5067 * c-pragma.h (enum pragma_cilk_clause): Remove.
5068 (enum pragma_omp_clause): Added the following fields:
5069 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5070 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5071 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5072 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5073 PRAGMA_CILK_CLAUSE_UNIFORM.
5074
b1726d6c 5075
12893402
BI
50762013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5077
5078 * cilk.c (cilk_outline): Made this function non-static.
5079 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
5080 (create_cilk_wrapper): Added a new parameter: a function pointer.
5081 (c_install_body_w_frame_cleanup): Remove
5082 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
5083 * c-common.h (cilk_outline): New prototype.
5084 (gimplify_cilk_spawn): Removed two parameters.
5085 (cilk_install_body_with_frame_cleanup): New prototype.
5086 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
5087 CILK_SPAWN_STMT case.
5088
085b42ed
BS
50892013-12-11 Bernd Schmidt <bernds@codesourcery.com>
5090
2ce064c3
BS
5091 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
5092
085b42ed
BS
5093 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
5094 (int_array_type_node): Remove.
5095 * c-common.c (c_common_nodes_and_builtins): Don't build it.
5096
9e36c9ed
MP
50972013-12-05 Marek Polacek <polacek@redhat.com>
5098
5099 PR c/52023
5100 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
5101 [ADJUST_FIELD_ALIGN].
5102
296674db
JM
51032013-12-04 Joseph Myers <joseph@codesourcery.com>
5104
5105 PR c/52023
5106 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
5107 and check field alignment if set.
5108 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
5109 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
5110
b1726d6c 51112013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
5112 Marek Polacek <polacek@redhat.com>
5113
5114 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
5115 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
5116
d7947e19
L
51172013-11-29 H.J. Lu <hongjiu.lu@intel.com>
5118
5119 PR c/59309
5120 * cilk.c (gimplify_cilk_spawn): Properly handle function without
5121 arguments.
5122
fad7652e
JJ
51232013-11-29 Jakub Jelinek <jakub@redhat.com>
5124
5125 PR c/59280
5126 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
5127 goto invalid. If it is error_mark_node, don't issue further
5128 diagnostics.
5129
8b5e1202
SO
51302013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
5131
5132 * c.opt (Wopenmp-simd): New.
5133
0a508bb6
JJ
51342013-11-22 Jakub Jelinek <jakub@redhat.com>
5135
5136 * c-ubsan.h (ubsan_instrument_return): New prototype.
5137 * c-ubsan.c (ubsan_instrument_return): New function.
5138
2fb9a547
AM
51392013-11-22 Andrew MacLeod <amacleod@redhat.com>
5140
5141 * c-common.c: Add required include files from gimple.h.
5142 * c-gimplify.c: Likewise
5143 * cilk.c: Likewise
5144
8400e75e
DM
51452013-11-22 David Malcolm <dmalcolm@redhat.com>
5146
5147 * c-common.c (unsafe_conversion_p): Remove use of
5148 EXPR_LOC_OR_HERE macro.
5149 (conversion_warning): Likewise.
5150 (warnings_for_convert_and_check): Likewise.
5151 (warn_for_collisions_1): Likewise.
5152 (shorten_compare): Likewise, and remove use of in_system_header
5153 macro, using the location from the former.
5154 * c-lex.c (dump_one_header): Remove use of input_filename macro.
5155 (cb_def_pragma): Remove use of in_system_header macro.
5156 (lex_string): Likewise.
5157 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5158
eb1ce453
KZ
51592013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5160 Mike Stump <mikestump@comcast.net>
5161 Richard Sandiford <rdsandiford@googlemail.com>
5162
5163 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
5164 instead of TREE_INT_CST_LOW, in cases where there is a protecting
5165 tree_fits_shwi_p or tree_fits_uhwi_p.
5166 (dump_generic_ada_node): Likewise.
5167 * c-format.c (check_format_arg): Likewise.
5168 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5169
6b3b8c27
KZ
51702013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5171
5172 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
5173
49b0aa18
JC
51742013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
5175
5176 PR c/53001
5177 * c-common.c (unsafe_conversion_p): Make this function
5178 return an enumeration with more detail.
5179 (conversion_warning): Use the new return type of
5180 unsafe_conversion_p to separately warn either about conversions
5181 that lower floating point number precision or about the other
5182 kinds of conversions.
5183 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
5184 (unsafe_conversion_p): switching return type to
5185 conversion_safety enumeration.
49b0aa18
JC
5186 * c.opt: Adding new warning -Wfloat-conversion and
5187 enabling it with -Wconversion.
5188
b826515a
BS
51892013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
5190
8e745a17
JJ
5191 * c-opts.c: Include plugin.h.
5192 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 5193
b9a55b13
MP
51942013-11-19 Marek Polacek <polacek@redhat.com>
5195
5196 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
5197 call.
5198 (ubsan_instrument_shift): Likewise.
5199 (ubsan_instrument_vla): Likewise.
5200
7d362f6c
RS
52012013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5202
5203 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
5204 cast to unsigned type.
5205
386b1f1f
RS
52062013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5207
5208 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
5209 tree_low_cst.
5210 (complete_array_type): Update comment to refer to tree_to_[su]hwi
5211 rather than tree_low_cst.
5212
ae7e9ddd
RS
52132013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5214
5215 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
5216 tree_to_uhwi throughout.
5217
9439e9a1
RS
52182013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5219
5220 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
5221 tree_low_cst (..., 0) with tree_to_shwi throughout.
5222
cc269bb6
RS
52232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5224
5225 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
5226 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
5227
9541ffee
RS
52282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5229
5230 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
5231 host_integerp (..., 0) with tree_fits_shwi_p throughout.
5232
c02065fc
AH
52332013-11-15 Aldy Hernandez <aldyh@redhat.com>
5234
5235 * c-cilkplus.c: New file.
5236 * c-common.c (readonly_error): Add location argument.
5237 * c-common.h (readonly_error): Same.
5238 (c_finish_cilk_clauses): Protoize.
5239 (c_check_cilk_loop): Same.
5240 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
5241 Do not fail on error_mark_node.
5242 Abstract increment canonicalization to here...
5243 (c_omp_for_incr_canonicalize_ptr): New.
5244 c-pragma.c (init_pragma): Register "simd" pragma.
5245 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
5246 (enum pragma_cilk_clause): New.
5247
9cc65f15
RS
52482013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
5249
5250 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
5251 wchar_type and host_integerp checks.
5252
18f429e2
AM
52532013-11-14 Andrew MacLeod <amacleod@redhat.com>
5254
5255 * c-common.c: Likewise.
5256 * c-gimplify.c: Likewise.
5257 * cilk.c: Likewise.
5258
d8a2d370
DN
52592013-11-14 Diego Novillo <dnovillo@google.com>
5260
5261 * c-common.c: Include fold-const.h.
5262 Include stor-layout.h.
5263 Include calls.h.
5264 Include stringpool.h.
5265 Include attribs.h.
5266 Include varasm.h.
5267 Include trans-mem.h.
5268 * c-cppbuiltin.c: Include stor-layout.h.
5269 Include stringpool.h.
5270 * c-format.c: Include stringpool.h.
5271 * c-lex.c: Include stringpool.h.
5272 Include stor-layout.h.
5273 * c-pragma.c: Include stringpool.h.
5274 Include attribs.h.
5275 Include varasm.h.
5276 Include gcc-symtab.h.
5277 * c-pretty-print.c: Include stor-layout.h.
5278 Include attribs.h.
5279 * cilk.c: Include stringpool.h.
5280 Include calls.h.
5281
38b7bc7f
JM
52822013-11-13 Joseph Myers <joseph@codesourcery.com>
5283
5284 * c-common.h (enum rid): Add RID_AUTO_TYPE.
5285 * c-common.c (c_common_reswords): Add __auto_type.
5286 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
5287
45b0be94
AM
52882013-11-12 Andrew MacLeod <amacleod@redhat.com>
5289
18f429e2
AM
5290 * c-common.c: Include gimplify.h.
5291 * c-gimplify.c: Likewise.
5292 * cilk.c: Likewise.
5293 * c-omp.c: Include gimple-expr.h instead of gimple.h.
5294 * c-ubsan.c: Don't include gimple.h.
45b0be94 5295
582d9b50
JM
52962013-11-12 Joseph Myers <joseph@codesourcery.com>
5297
5298 * c-common.c (c_common_reswords): Add _Thread_local.
5299
6b28e197
JM
53002013-11-09 Joseph Myers <joseph@codesourcery.com>
5301
5302 * c-common.c (atomic_size_supported_p): New function.
5303 (resolve_overloaded_atomic_exchange)
5304 (resolve_overloaded_atomic_compare_exchange)
5305 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
5306 Use it instead of comparing size with a local list of sizes.
5307
267bac10
JM
53082013-11-07 Andrew MacLeod <amacleod@redhat.com>
5309 Joseph Myers <joseph@codesourcery.com>
5310
5311 * c-common.h (enum rid): Add RID_ATOMIC.
5312 * c-common.c (c_common_reswords): Add _Atomic.
5313 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
5314 (keyword_is_type_qualifier): Accept RID_ATOMIC.
5315 * c-format.c (check_format_types): Check for extra _Atomic
5316 qualifiers in format argument.
5317 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
5318 (pp_c_type_qualifier_list): Mention _Atomic in comment.
5319
5157b91e
TB
53202013-11-06 Tobias Burnus <burnus@net-b.de>
5321
5322 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
5323
6dbe0958
JM
53242013-11-06 Joseph Myers <joseph@codesourcery.com>
5325
5326 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
5327 standards modes.
5328 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
5329 to mean lack of IEEE 754 support.
5330
e8ff5196
TB
53312013-11-05 Tobias Burnus <burnus@net-b.de>
5332
5333 * c.opt (-Wdate-time): New option
5334 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
5335
254a0760
JM
53362013-11-05 Joseph Myers <joseph@codesourcery.com>
5337
5338 * c-cppbuiltin.c (cpp_iec_559_value): Test
5339 flag_excess_precision_cmdline not flag_excess_precision.
5340
6d7f7e0a
TB
53412013-11-05 Tobias Burnus <burnus@net-b.de>
5342
5343 * c.opt (fopenmp-simd): New option.
5344 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
5345 (omp_pragmas): ... this new struct.
5346 (c_pp_lookup_pragma): Also walk omp_pragmas.
5347 (init_pragma): Init pragmas for -fopenmp-simd.
5348
55a7f02f
MP
53492013-11-04 Marek Polacek <polacek@redhat.com>
5350
5351 PR c++/58979
5352 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
5353
9193fb05
JM
53542013-11-04 Joseph Myers <joseph@codesourcery.com>
5355
5356 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
5357 New functions.
5358 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
5359
94159ecf
EB
53602013-11-04 Eric Botcazou <ebotcazou@adacore.com>
5361
5362 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
5363 (dump_ada_specs): Adjust prototype of second callback.
5364 * c-ada-spec.c (cpp_check): New global variable.
5365 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
5366 (print_generic_ada_decl): Likewise.
5367 (has_static_fields): Change return type to bool and add guard.
5368 (has_nontrivial_methods): New predicate.
5369 (is_tagged_type): Change return type to bool.
5370 (separate_class_package): Call has_nontrivial_methods.
5371 (pp_ada_tree_identifier): Minor tweaks.
5372 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
5373 (dump_ada_array_domains): Likewise.
5374 (dump_ada_array_type): Likewise.
5375 (dump_template_types): Remove cpp_check parameter and do not pass it to
5376 dump_generic_ada_node.
5377 (dump_ada_template): Likewise.
5378 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
5379 recursively.
5380 (print_ada_methods): Change return type to integer. Remove cpp_check
5381 parameter and do not pass it down.
5382 (dump_nested_types): Remove cpp_check parameter and do not pass it to
5383 dump_generic_ada_node.
5384 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
5385 accessing methods.
5386 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
5387 down. Use has_nontrivial_methods to recognize C++ classes. Use return
5388 value of print_ada_methods.
5389 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
5390 Set cpp_check to it before invoking dump_ada_nodes.
5391 (dump_ada_specs): Likewise.
5392
b906f4ca
MP
53932013-11-03 Marek Polacek <polacek@redhat.com>
5394
5395 * c-ubsan.c: Don't include hash-table.h.
5396 (ubsan_instrument_vla): New function.
5397 * c-ubsan.h: Declare it.
5398
5e20cdc9
DM
53992013-10-31 David Malcolm <dmalcolm@redhat.com>
5400
5401 Automated part of renaming of symtab_node_base to symtab_node.
5402
5403 Patch autogenerated by rename_symtab.py from
5404 https://github.com/davidmalcolm/gcc-refactoring-scripts
5405 revision 58bb219cc090b2f4516a9297d868c245495ee622
5406
5407 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
5408 symtab_node_base to symtab_node.
5409
7057e645
ESR
54102013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
5411
8e745a17 5412 Implement C++14 digit separators.
7057e645
ESR
5413 * c-lex.c (interpret_float): Remove digit separators from scratch string
5414 before building real literal.
5415
193ea7bc
JJ
54162013-10-30 Jakub Jelinek <jakub@redhat.com>
5417
5418 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
5419
939b37da
BI
54202013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5421
5422 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
5423 fields.
5424 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
5425 enabled.
5426 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
5427 (insert_cilk_frame): New prototype.
5428 (cilk_init_builtins): Likewise.
5429 (gimplify_cilk_spawn): Likewise.
5430 (c_cilk_install_body_w_frame_cleanup): Likewise.
5431 (cilk_detect_spawn_and_unwrap): Likewise.
5432 (cilk_set_spawn_marker): Likewise.
5433 (build_cilk_sync): Likewise.
5434 (build_cilk_spawn): Likewise.
5435 * cilk.c: New file.
5436
67348ccc
DM
54372013-10-29 David Malcolm <dmalcolm@redhat.com>
5438
5439 Patch autogenerated by refactor_symtab.py from
5440 https://github.com/davidmalcolm/gcc-refactoring-scripts
5441 revision 58bb219cc090b2f4516a9297d868c245495ee622
5442
5443 * c-gimplify.c (c_genericize): Update for conversion of symtab types
5444 to a true class hierarchy.
5445 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
5446
d570872d
RS
54472013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
5448
5449 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
5450
98906124
JL
54512013-10-26 Jeff Law <law@redhat.com>
5452
adfac8df
JJ
5453 * c-common.c (c_define_builtins): Remove mudflap support.
5454 * c.opt: Ignore and warn for mudflap options.
98906124 5455
d73749df 54562013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5457
5458 PR other/33426
5459 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
5460 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
5461
3f04b1bb
JM
54622013-10-23 Jason Merrill <jason@redhat.com>
5463
5464 * c-format.c (gcc_cxxdiag_char_table): Add %X.
5465
acf0174b
JJ
54662013-10-11 Jakub Jelinek <jakub@redhat.com>
5467
acd15a28
JJ
5468 * c-common.h (omp_clause_mask::operator !=): New method.
5469 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
5470 instead of if (mask & something) tests everywhere.
5471
acf0174b
JJ
5472 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
5473 201307 instead of 201107.
5474 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
5475 (c_common_attribute_table): Add "omp declare target" and
5476 "omp declare simd" attributes.
5477 (handle_omp_declare_target_attribute,
5478 handle_omp_declare_simd_attribute): New functions.
5479 * c-omp.c: Include c-pragma.h.
5480 (c_finish_omp_taskgroup): New function.
5481 (c_finish_omp_atomic): Add swapped argument, if true,
5482 build the operation first with rhs, lhs arguments and use NOP_EXPR
5483 build_modify_expr.
5484 (c_finish_omp_for): Add code argument, pass it down to make_code.
5485 (c_omp_split_clauses): New function.
5486 (c_split_parallel_clauses): Removed.
5487 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
5488 c_omp_declare_simd_clauses_to_decls): New functions.
5489 * c-common.h (omp_clause_mask): New type.
5490 (OMP_CLAUSE_MASK_1): Define.
5491 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
5492 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
5493 omp_clause_mask::operator |, omp_clause_mask::operator &,
5494 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
5495 omp_clause_mask::operator ==): New methods.
5496 (enum c_omp_clause_split): New.
5497 (c_finish_omp_taskgroup): New prototype.
5498 (c_finish_omp_atomic): Add swapped argument.
5499 (c_finish_omp_for): Add code argument.
5500 (c_omp_split_clauses): New prototype.
5501 (c_split_parallel_clauses): Removed.
5502 (c_omp_declare_simd_clauses_to_numbers,
5503 c_omp_declare_simd_clauses_to_decls): New prototypes.
5504 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
5505 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
5506 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
5507 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
5508 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
5509 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
5510 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
5511 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
5512 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
5513 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
5514 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
5515 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
5516 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
5517 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
5518 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
5519 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
5520 PRAGMA_OMP_CLAUSE_UNIFORM.
5521
826cacfe
MG
55222013-10-09 Marc Glisse <marc.glisse@inria.fr>
5523
5524 PR tree-optimization/20318
5525 * c-common.c (handle_returns_nonnull_attribute): New function.
5526 (c_common_attribute_table): Add returns_nonnull.
5527
2284b034
MG
55282013-10-03 Marc Glisse <marc.glisse@inria.fr>
5529
5530 PR c++/19476
5531 * c.opt (fcheck-new): Move to common.opt.
5532
b56e9788
MP
55332013-09-25 Marek Polacek <polacek@redhat.com>
5534 Jakub Jelinek <jakub@redhat.com>
5535
5536 PR sanitizer/58413
5537 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
5538 an expression if we can prove it is correct.
5539 (ubsan_instrument_division): Likewise. Remove unnecessary
5540 check.
5541
ce6923c5
MP
55422013-09-18 Marek Polacek <polacek@redhat.com>
5543
5544 PR sanitizer/58411
5545 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
5546 Declare it.
5547 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
5548
fb5610fb
IS
55492013-09-14 Iain Sandoe <iain@codesourcery.com>
5550
5551 PR target/48094
5552 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
5553 fobjc-gc, freplace-objc-classes): Accept for LTO.
5554
88b0e79e
JC
55552013-09-13 Jacek Caban <jacek@codeweavers.com>
5556
5557 * c-target.def: New hook
5558
c9b0866a
PC
55592013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5560
5561 PR c++/43452
5562 * c.opt (Wdelete-incomplete): Add.
5563
0af94e6f
JR
55642013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5565
5566 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
5567 (vector_types_compatible_elements_p): New function.
5568 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
5569 declaration.
5570 (vector_types_compatible_elements_p): Declare.
5571
7c26172c
GDR
55722013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5573
5574 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
5575 a virtual member function.
5576 (pp_simple_type_specifier): Remove.
5577 (pp_c_type_specifier): Likewise.
5578 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
5579 Rename from pp_c_type_specifier. Adjust.
5580 (c_pretty_printer::c_pretty_printer): Do not assign to
5581 simple_type_specifier.
5582
20059c8b
GDR
55832013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5584
5585 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
5586 member function.
5587 (c_pretty_printer::storage_class_specifier): Likewise.
5588 (c_pretty_printer::initializer): Likewise.
5589 (pp_declaration): Remove.
5590 (pp_declaration_specifiers): Likewise.
5591 (pp_abstract_declarator): Likewise.
5592 (pp_declarator): Likewise.
5593 (pp_type_id): Likewise.
5594 (pp_statement): Likewise.
5595 (pp_constant): Likewise.
5596 (pp_id_expression): Likewise.
5597 (pp_primary_expression): Likewise.
5598 (pp_unary_expression): Likewise.
5599 (pp_multiplicative_expression): Likewise.
5600 (pp_conditional_expression): Likewise.
5601 (pp_assignment_expression): Likewise.
5602 (pp_expression): Likewise.
5603 (pp_c_type_id): Likewise.
5604 (pp_c_storage_class_specifier): Likewise.
5605 * c-pretty-print.c (pp_c_type_cast): Tidy.
5606 (pp_c_pointer): Likewise.
5607 (pp_c_type_specifier): Likewise.
5608 (pp_c_parameter_type_list): Likewise.
5609 (pp_c_function_definition): Likewise.
5610 (pp_c_init_declarator): Likewise.
5611 (pp_c_initializer_list): Likewise.
5612 (pp_c_constructor_elts): Likewise.
5613 (c_pretty_printer::direct_abstract_declarator): Likewise.
5614 (c_pretty_printer::declaration_specifiers): Likewise.
5615 (c_pretty_printer::primary_expression): Likewise.
5616 (c_pretty_printer::postfix_expression): Likewise.
5617 (c_pretty_printer::type_id): Rename from pp_c_type_id.
5618 (c_pretty_printer::storage_class_specifier): Rename from
5619 pp_c_storage_class_specifier.
5620 (c_pretty_printer::initializer): Rename from pp_c_initializer.
5621 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
5622 storage_class_specifier, initializer, offset_list, flags.
5623
de5a5fa1
MP
56242013-08-30 Marek Polacek <polacek@redhat.com>
5625
5626 * c-ubsan.c: New file.
5627 * c-ubsan.h: New file.
5628
8f0e4d72
GDR
56292013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
5630
5631 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
5632 member function.
5633 (c_pretty_printer::declaration_specifiers): Likewise.
5634 (c_pretty_printer::declarator): Likewise.
5635 (c_pretty_printer::abstract_declarator): Likewise.
5636 (c_pretty_printer::direct_abstract_declarator): Likewise.
5637 (c_pretty_printer::direct_declarator): Likewise.
5638 (c_pretty_printer::function_specifier): Likewise.
5639 (pp_declaration): Adjust.
5640 (pp_declaration_specifiers): Likewise.
5641 (pp_abstract_declarator): Likewise.
5642 (pp_direct_declarator): Likewise.
5643 (pp_function_specifier): Likewise.
5644 (pp_direct_abstract_declarator): Remove as unused.
5645 (pp_c_declaration): Remove.
5646 (pp_c_declaration_specifiers): Likewise.
5647 (pp_c_declarator): Likewise.
5648 (pp_c_direct_declarator): Likewise.
5649 (pp_c_function_specifier): Likewise.
5650 (pp_c_direct_abstract_declarator): Likewise.
5651 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
5652 from pp_c_abstract_declarator. Adjust.
5653 (c_pretty_printer::direct_abstract_declarator): Rename from
5654 pp_c_direct_abstract_declarator. Adjust.
5655 (c_pretty_printer::function_specifier): Rename from
5656 pp_c_function_specifier. Adjust.
5657 (c_pretty_printer::declaration_specifiers): Rename from
5658 pp_c_declaration_specifiers. Adjust.
5659 (c_pretty_printer::direct_declarator): Rename from
5660 pp_c_direct_declarator. Adjust.
5661 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
5662 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
5663 (c_pretty_printer::c_pretty_printer): Do not assign to
5664 declaration, declaration_specifiers, declarator,
5665 direct_declarator, direct_abstract_declarator, function_specifier.
5666
00d34d3a
GDR
56672013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
5668
5669 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
5670 virtual member function.
5671 (c_pretty_printer::multiplicative_expression): Likewise.
5672 (c_pretty_printer::conditional_expression): Likewise.
5673 (c_pretty_printer::assignment_expression): Likewise.
5674 (c_pretty_printer::expression): Likewise.
5675 (pp_unary_expression): Adjust.
5676 (pp_multiplicative_expression): Likewise.
5677 (pp_assignment_expression): Likewise.
5678 (pp_conditional_expression): Likewise.
5679 (pp_expression): Likewise.
5680 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
5681 from pp_c_unary_expression. Adjust.
5682 (c_pretty_printer::multiplicative_expression): Rename from
5683 pp_c_multiplicative_expression. Adjust.
5684 (c_pretty_printer::conditional_expression): Rename from
5685 pp_c_conditional_expression. Adjust.
5686 (c_pretty_printer::assignment_expression): Rename from
5687 pp_c_assignment_expression. Adjust.
5688 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
5689 (c_pretty_printer::c_pretty_printer): Do not assign to
5690 unary_expression, multiplicative_expression,
5691 conditional_expression, expression.
5692
fb22178f
GDR
56932013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5694
5695 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
5696 virtual member function.
5697 (pp_postfix_expression): Adjust.
5698 (pp_c_postfix_expression): Remove.
5699 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
5700 from pp_c_postfix_expression. Adjust.
5701 (c_pretty_printer::c_pretty_printer): Do not assign to
5702 postfix_expression.
5703
7ecc2600
GDR
57042013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5705
5706 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
5707 virtua member function.
5708 (pp_primary_expression): Adjust.
5709 (pp_c_primary_expression): Remove.
5710 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
5711 from pp_c_primary_expression. Adjust.
5712 (pp_c_initializer_list): Use pp_primary_expression.
5713 (c_pretty_printer::c_pretty_printer): Do not assign to
5714 primary_expression.
5715
0691175f
GDR
57162013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5717
5718 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
5719 * c-pretty-print.c (M_): Remove.
5720 (c_pretty_printer::translate_string): Define.
5721 (pp_c_type_specifier): Use it.
5722 (pp_c_primary_expression): Likewise.
5723 (pp_c_expression): Likewise.
5724
66dfe4c4
GDR
57252013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5726
5727 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
5728 virtual function.
5729 (pp_c_id_expression): Remove.
5730 (pp_id_expression): Adjust.
5731 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
5732 pp_c_id_expression. Adjust.
5733 (pp_c_postfix_expression): Use pp_id_expression.
5734 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
5735
ca43e9d5
GDR
57362013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5737
5738 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
5739 member function.
5740 (pp_constant): Adjust.
5741 (pp_c_constant): Remove.
5742 * c-pretty-print.c (c_pretty_printer::constant): Rename from
5743 pp_c_constant. Adjust.
5744 (pp_c_constant)
5745 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
5746 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
5747
da6ca2b5
GDR
57482013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5749
5750 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
5751 (c_pretty_printer::c_pretty_printer): Declare.
5752 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
5753 c_pretty_printer_init. Adjust.
5754 (print_c_tree): Do not call c_pretty_printer_init.
5755 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
5756
65a372f4
AC
57572013-08-09 Arnaud Charlet <charlet@adacore.com>
5758
5759 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
5760
fd9b0f32
PC
57612013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
5762
5763 PR c++/58080
5764 * c-common.c (pointer_int_sum): Add bool parameter.
5765 * c-common.h (pointer_int_sum): Adjust declaration.
5766
e0aec1e9
GDR
57672013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
5768
5769 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
5770 c_pretty_printer variable.
5771
b066401f
GDR
57722013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5773
5774 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
5775 (pp_base): Remove.
5776 (pp_c_base): Likewise. Adjust users.
5777 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
5778 (pp_c_whitespace): Do not call pp_base.
5779 (pp_c_left_paren): Likewise.
5780 (pp_c_right_paren): Likewise.
5781 (pp_c_left_brace): Likewise.
5782 (pp_c_right_brace): Likewise.
5783 (pp_c_left_bracket): Likewise.
5784 (pp_c_right_bracket): Likewise.
5785 (pp_c_dot): Likewise.
5786 (pp_c_ampersand): Likewise.
5787 (pp_c_star): Likewise.
5788 (pp_c_arrow): Likewise.
5789 (pp_c_semicolon): Likewise.
5790 (pp_c_complement): Likewise.
5791 (pp_c_exclamation): Likewise.
5792 (pp_c_direct_declarator): Likewise.
5793 (pp_c_ws_string): Likewise.
5794 (pp_c_identifier): Likewise.
5795 (pp_c_statement): Likewise.
5796 (print_c_tree): Likewise.
5797
65e5a578
ESR
57982013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
5799
5800 PR c++/58072
5801 * c-common.c (c_parse_error): Catch user-defined literal tokens and
5802 provide useful error strings.
5803
137a1a27
GDR
58042013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5805
5806 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
5807 printer functions instead of pp_string or operators and punctuators.
5808 (dump_generic_ada_node): Likewise.
5809 * c-pretty-print.c (pp_c_type_specifier): Likewise.
5810 (pp_c_relational_expression): Likewise.
5811 (pp_c_logical_or_expression): Likewise.
5812
07838b13
GDR
58132013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5814
5815 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
5816 functions instead of pp_character.
5817 (pp_ada_tree_identifier): Likewise.
5818 (dump_ada_double_name): Likewise.
5819 (dump_ada_function_declaration): Likewise.
5820 (dump_ada_array_domains): Likewise.
5821 (dump_template_types): Likewise.
5822 (dump_generic_ada_node): Likewise.
5823 (print_ada_declaration): Likewise.
5824 (print_ada_struct_decl): Likewise.
5825 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5826
433cc7b0
TT
58272013-07-23 Tom Tromey <tromey@redhat.com>
5828
5829 * c-common.h (enum rid) <RID_GENERIC>: New constant.
5830 * c-common.c (c_common_reswords): Add _Generic.
5831
688010ba
OB
58322013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
5833
5834 * c-common.c: Fix typos.
5835 * c-common.h: Likewise.
5836
2a99e5e6
LL
58372013-07-13 Lubos Lunak <l.lunak@suse.cz>
5838
5839 PR c++/55203
5840 * c-common.c (c_common_attribute_table): Add warn_unused.
5841 (handle_warn_unused_attribute): New.
5842
c26302d5
JJ
58432013-07-10 Jakub Jelinek <jakub@redhat.com>
5844
5845 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
5846 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
5847
dfeadaa0
PC
58482013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
5849
5850 PR c++/57869
5851 * c.opt: Add Wconditionally-supported.
5852
6a2fa4b2
GS
58532013-07-08 Graham Stott <graham.stott@btinternet.com>
5854
adfac8df 5855 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
5856 unused variables l_length and l_node.
5857
ecdbd01a 58582013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5859
5860 PR c/57821
5861 * c-common.c (complete_array_type): Delay folding first index
5862 like other indices. When folding, check for index overflow.
5863
bedc293e
MG
58642013-06-27 Marc Glisse <marc.glisse@inria.fr>
5865
5866 PR c++/57509
5867 * c-common.h (c_build_vec_perm_expr): New complain argument.
5868 * c-common.c (c_build_vec_perm_expr): Likewise.
5869 Use save_expr also in C++.
5870
604b2bfc
GDR
58712013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5872
5873 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
5874 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5875 * c-opts.c (c_common_post_options): Likewise.
5876
dfeadaa0 58772013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
5878
5879 * array-notation-common.c (length_mismatch_in_expr): Changed the
5880 parameter type's from a dynamic array to a vec_tree. Also removed
5881 the size parameters.
5882 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
5883 the change above.
5884
2ce86d2e
BI
58852013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5886
5887 * c-common.h (struct cilkplus_an_parts): New structure.
5888 (struct cilkplus_an_loop_parts): Likewise.
5889 (cilkplus_extract_an_triplets): New prototype.
5890 (fix_sec_implicit_args): Likewise.
5891 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
5892 (fix_sec_implicit_args): Likewise.
604b2bfc 5893
07a6825b
BI
58942013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
5895
5896 * array-notation-common.c (find_inv_trees): Removed an unwanted
5897 typecasting.
5898 * c-common.h (struct inv_list::additional_tcodes): Changed type from
5899 enum rid to enum tree_code.
5900
08346abd
JH
59012013-06-11 Jan Hubicka <jh@suse.cz>
5902
5903 * c-common.c (handle_alias_ifunc_attribute): Do not set
5904 DECL_EXTERNAL for weakref variables.
5905 * c-pragma.c (handle_pragma_weak): Make sure aliases
5906 are not declared as external.
5907
d60f1706
BI
59082013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5909
5910 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
5911 function from c/c-array-notation.c.
5912 (is_cilkplus_reduce_builtin): Likewise.
5913 (find_rank): Likewise.
5914 (extract_array_notation_exprs): Likewise.
5915 (replace_array_notations): Likewise.
5916 (find_inv_trees): Likewise.
5917 (replace_inv_trees): Likewise.
5918 (contains_array_notation_expr): Likewise.
5919 (find_correct_array_notation_type): Likewise.
5920 * c-common.h (struct inv_list): Moved this struct from the file
5921 c/c-array-notation.c and added a new field called additional tcodes.
5922 (length_mismatch_in_expr_p): New prototype.
5923 (is_cilkplus_reduce_builtin): Likewise.
5924 (find_rank): Likewise.
5925 (extract_array_notation_exprs): Likewise.
5926 (replace_array_notation): Likewise.
5927 (find_inv_trees): Likewise.
5928 (replace_inv_trees): Likewise.
5929 (find_correct_array_notation_type): Likewise.
dfeadaa0 5930
36536d79
BI
59312013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5932
5933 * c-common.c (c_define_builtins): When cilkplus is enabled, the
5934 function array_notation_init_builtins is called.
5935 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
5936 * c-common.def (ARRAY_NOTATION_REF): New tree.
5937 * c-common.h (build_array_notation_expr): New function declaration.
5938 (build_array_notation_ref): Likewise.
5939 (extract_sec_implicit_index_arg): New extern declaration.
5940 (is_sec_implicit_index_fn): Likewise.
5941 (ARRAY_NOTATION_CHECK): New define.
5942 (ARRAY_NOTATION_ARRAY): Likewise.
5943 (ARRAY_NOTATION_START): Likewise.
5944 (ARRAY_NOTATION_LENGTH): Likewise.
5945 (ARRAY_NOTATION_STRIDE): Likewise.
5946 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
5947 ARRAY_NOTATION_REF.
5948 (pp_c_expression): Likewise.
5949 * c.opt (flag_enable_cilkplus): New flag.
5950 * array-notation-common.c: New file.
5951
f7716d57
JJ
59522013-05-14 Jakub Jelinek <jakub@redhat.com>
5953
5954 PR c++/57274
5955 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
5956
a5e0cd1d
MG
59572013-05-10 Marc Glisse <marc.glisse@inria.fr>
5958
5959 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
5960 vectors.
5961
f6bc1c4a
HS
59622013-05-07 Han Shen <shenhan@google.com>
5963
5964 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
5965
3f12f6e9
SKS
59662013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
5967
5968 * c-common.c (check_user_alignment): Emit error for negative values.
5969
61949153
PC
59702013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5971
5972 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
5973
e93e18e9
PC
59742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5975
5976 * c-cppbuiltin.c (c_cpp_builtins): Do not define
5977 __GXX_EXPERIMENTAL_CXX1Y__.
5978
44d90fe1 59792013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 5980 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
5981
5982 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
5983 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
5984 to simply use OPT_Wpointer_arith.
5985 (c_sizeof_or_alignof_type): Likewise.
5986
13f39b2e
PC
59872013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5988
5989 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
5990
4b84d650
JJ
59912013-04-12 Jakub Jelinek <jakub@redhat.com>
5992
5993 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
5994 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
5995 specifiers.
5996
fb037b5d
SB
59972013-04-07 Steven Bosscher <steven@gcc.gnu.org>
5998
5999 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6000
4e856798
PC
60012013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6002
6003 * c-common.c (pointer_int_sum): Remove dead code.
6004
4b1baac8
RS
60052013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6006
6007 PR middle-end/56524
6008 * c-common.c (handle_optimize_attribute): Don't call
6009 save_optabs_if_changed.
6010
0b50e654
JJ
60112013-03-05 Jakub Jelinek <jakub@redhat.com>
6012
6013 PR middle-end/56461
6014 * c-pch.c (pch_init): Free target_validity at the end.
6015
48c41403
JJ
60162013-03-04 Jakub Jelinek <jakub@redhat.com>
6017
6018 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6019
e664c61c
KS
60202013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6021 Jakub Jelinek <jakub@redhat.com>
6022
6023 PR sanitizer/56454
6024 * c-common.c (handle_no_sanitize_address_attribute): New function.
6025 (c_common_attribute_table): Add no_sanitize_address attribute.
6026 (handle_no_address_safety_analysis_attribute): Add
6027 no_sanitize_address attribute, not no_address_safety_analysis
6028 attribute.
6029
a475fd3d 60302013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
6031
6032 PR target/52555
6033 * c-common.c (handle_optimize_attribute): Call
6034 save_optabs_if_changed.
6035
f6007d99
JJ
60362013-02-18 Jakub Jelinek <jakub@redhat.com>
6037 Steven Bosscher <steven@gcc.gnu.org>
6038
6039 PR pch/54117
6040 * c-opts.c (c_common_post_options): If debug info is enabled
6041 and non-dwarf*, refuse to load PCH files and when writing PCH
6042 file warn.
6043
cf35e2b1
JJ
60442013-02-05 Jakub Jelinek <jakub@redhat.com>
6045
6046 PR middle-end/56167
6047 * c-common.c (handle_error_attribute): Fix condition.
6048
32887460
JJ
60492013-01-30 Jakub Jelinek <jakub@redhat.com>
6050
6051 PR c++/55742
6052 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6053
5af057d8
JM
60542013-01-18 Jason Merrill <jason@redhat.com>
6055
6056 PR target/54908
6057 * c.opt (-fextern-tls-init): New.
6058 * c-opts.c (c_common_post_options): Handle it.
6059
cc83c823
JJ
60602013-01-09 Jakub Jelinek <jakub@redhat.com>
6061
6062 PR c/48418
6063 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6064 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6065 and is either negative or bigger or equal to type precision
6066 of the first operand.
6067
a859517f
MP
60682012-12-03 Marek Polacek <polacek@redhat.com>
6069
6070 PR c/55570
6071 * c-common.c (check_user_alignment): Swap order of tests,
6072 check TREE_CODE first.
6073
2d7aa578
ESR
60742012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
6075
6076 PR c++/52654
6077 * c-common.h (overflow_type): New enum.
6078 (build_userdef_literal): Add overflow_type argument.
6079 (tree_userdef_literal): Add overflow_type.
6080 (USERDEF_LITERAL_OVERFLOW): New access macro.
6081 * c-common.c (build_userdef_literal): Add overflow_type
6082 argument.
6083 * c-lex.c (c_lex_with_flags): Add overflow_type to
6084 build_userdef_literal calls.
6085 (interpret_integer, interpret_float): Add overflow_type argument.
6086
cc3c4f62
RB
60872012-11-28 Richard Biener <rguenther@suse.de>
6088
6089 PR c/35634
6090 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6091 here and use a type with proper overflow behavior for types that would
6092 need to be promoted for the arithmetic.
6093
77bc5132
JJ
60942012-11-23 Jakub Jelinek <jakub@redhat.com>
6095
6096 PR sanitizer/55435
6097 * c-common.c (handle_no_address_safety_analysis_attribute): New
6098 function.
6099 (c_common_attribute_table): Add no_address_safety_analysis.
6100
5dc99c46
SB
61012012-11-16 Simon Baldwin <simonb@google.com>
6102
6103 * c.opt: Add f[no-]canonical-system-headers.
6104 * c-opts.c (c_common_handle_option): Handle
6105 OPT_fcanonical_system_headers.
6106
a4a0016d
ESR
61072012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
6108
6109 PR c++/54413
6110 * c-opts.c (c_common_handle_option): Set new flags.
6111 * c.opt: Describe new flags.
6112
7dbb85a7
JM
61132012-11-09 Jason Merrill <jason@redhat.com>
6114
6115 * c.opt (Wabi-tag): New.
6116
ad7bac31
AK
61172012-11-09 Andi Kleen <ak@linux.intel.com>
6118
6119 PR 55139
6120 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 6121 MEMMODEL_MASK
ad7bac31 6122
7332899a
MLI
61232012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6124
6125 PR c/53063
6126 * c.opt (Wformat): Make it Alias Wformat=1.
6127 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
6128 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
6129 LangEnabledBy.
6130 (Wformat=): RejectNegative. Use LangEnabledBy.
6131 (Wnonnull): Use LangEnabledBy.
6132 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
6133 * c-format.c (set_Wformat): Delete.
6134 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
6135 (maybe_read_dollar_number): Likewise.
6136 (avoid_dollar_number): Likewise.
6137 (finish_dollar_format_checking): Likewise.
6138 (check_format_info): Likewise.
6139 (check_format_info_main): Likewise.
6140 (check_format_types): Likewise.
6141 (format_type_warning): Likewise.
6142 * c-common.c (int): Likewise.
6143 (check_function_sentinel): Likewise.
6144 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 6145
34a180a6
MLI
61462012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6147
6148 PR c/53063
6149 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
6150 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
6151 Use LangEnabledBy.
6152 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
6153 common.opt.
6154 (Wvariadic-macros): Init(1).
6155 * c-opts.c (c_common_handle_option): Do not handle them
6156 explicitly.
6157 (c_common_post_options): Likewise.
6158 (sanitize_cpp_opts): warn_unused_macros is now
6159 cpp_warn_unused_macros.
6160 (push_command_line_include): Likewise.
6161 * c-common.c (warn_unknown_pragmas): Do not define.
6162 * c-common.h (warn_unknown_pragmas): Do not declare.
6163
3f46d6a5
MLI
61642012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6165
6166 PR c/51294
6167 * c-common.c (conversion_warning): Handle conditional expressions.
6168
880661a4
JW
61692012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6170
6171 PR c++/54930
6172 * c.opt (Wreturn_local_addr): Define new option.
6173
4514a96b
JM
61742012-10-25 Jason Merrill <jason@redhat.com>
6175
f14edc1a
JM
6176 * c.opt (Wvirtual-move-assign): New.
6177
4514a96b
JM
6178 * c.opt (Winherited-variadic-ctor): New.
6179
93100c6b
MG
61802012-10-25 Marc Glisse <marc.glisse@inria.fr>
6181
6182 PR c++/54427
6183 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
6184
1efcb8c6
JM
61852012-10-23 Joseph Myers <joseph@codesourcery.com>
6186
6187 * c-common.h (pch_cpp_save_state): Declare.
6188 * c-target.def (c_preinclude): New hook.
6189 * c-opts.c (done_preinclude): New.
6190 (push_command_line_include): Handle default preincluded header.
6191 (cb_file_change): Call pch_cpp_save_state when calling
6192 push_command_line_include.
6193 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
6194 (pch_cpp_save_state): New.
6195 (pch_init): Call pch_cpp_save_state conditionally, instead of
6196 calling cpp_save_state.
6197
4a0ae68e
MLI
61982012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6199
6200 PR c/53063
6201 PR c/40989
6202 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
6203 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
6204 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
6205 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
6206 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
6207 * c-opts.c (c_common_handle_option): Remove explicit handling from
6208 here.
6209 (c_common_post_options): Likewise.
6210
67e4210b
EB
62112012-10-18 Eric Botcazou <ebotcazou@adacore.com>
6212
6213 * c-ada-spec.c (LOCATION_COL): Delete.
6214 (compare_location): New function.
6215 (compare_node): Use it.
6216 (compare_comment): Likewise.
6217
65d4f2cd
MLI
62182012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6219
6220 PR c/53063
6221 PR c/40989
6222 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
6223 * c-opts.c (c_common_handle_option): Do not set them here. Add
6224 comment.
6225 (c_common_post_options): Likewise.
6226
909881cb
EB
62272012-10-16 Eric Botcazou <ebotcazou@adacore.com>
6228
6229 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
6230 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
6231 Remove POINTER_TYPE handling, add large unsigned handling and use
6232 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
6233
3a785c97
JJ
62342012-10-12 Jakub Jelinek <jakub@redhat.com>
6235
6236 PR c/54381
6237 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
6238 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
6239 locs and array of 3 trees instead of just single loc and single
6240 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
6241 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
6242 For *cmp* builtins that take two sources strings report warnings
6243 about first and second source, not about destination and source.
6244
5e54f81d
MG
62452012-10-12 Marc Glisse <marc.glisse@inria.fr>
6246
6247 PR c++/53055
6248 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
6249
f5b02f1e
EB
62502012-10-11 Eric Botcazou <ebotcazou@adacore.com>
6251
6252 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
6253 declaring something coming from another file.
6254
b46dbc6c
AC
62552012-10-10 Arnaud Charlet <charlet@adacore.com>
6256
f5b02f1e 6257 PR ada/54845
b46dbc6c
AC
6258 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
6259
5d9de0d0
PC
62602012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6261
6262 PR c++/54194
6263 * c-common.c (warn_about_parentheses): Add location_t parameter;
6264 use EXPR_LOC_OR_LOC.
6265 * c-common.h: Update declaration.
6266
a212e43f
MG
62672012-10-09 Marc Glisse <marc.glisse@inria.fr>
6268
6269 PR c++/54427
6270 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
6271 more operations. Make error messages optional.
6272 * c-common.h (enum stv_conv): Moved from c-typeck.c.
6273 (scalar_to_vector): Declare.
6274
b1db7f91
JM
62752012-10-08 Jason Merrill <jason@redhat.com>
6276
6277 * c-common.c (c_common_reswords): Add thread_local.
6278
e28d52cf
DS
62792012-10-08 Dodji Seketeli <dodji@redhat.com>
6280
6281 PR c++/53528 C++11 attribute support
6282 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
6283 new functions.
6284 * c-common.c (check_cxx_fundamental_alignment_constraints): New
6285 static function.
6286 (handle_aligned_attribute): In choose strictest alignment
6287 among many. Use new check_cxx_fundamental_alignment_constraints.
6288 (handle_transparent_union_attribute): In c++11 attribute syntax,
6289 don't look through typedefs.
6290
3b78de56
AC
62912012-10-04 Arnaud Charlet <charlet@adacore.com>
6292
6293 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
6294 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
6295 out of dumpfile.h.
6296
6040bb5f
DC
62972012-09-25 Dehao Chen <dehao@google.com>
6298
6299 PR middle-end/54645
3b78de56 6300 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
6301 map when read in the pch.
6302
3f8257db 63032012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
6304
6305 * c-ada-spec.c: Style fixes.
6306
3f8257db 63072012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
6308
6309 * c.opt (-fada-spec-parent): Define new command line switch.
6310 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
6311 is specified, generate binding spec as a child of the specified unit.
6312
0ccb505d
PC
63132012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
6314 Manuel López-Ibáñez <manu@gcc.gnu.org>
6315
6316 PR c++/53210
6317 * c.opt ([Winit-self]): Enabled by -Wall in C++.
6318
c583af79
AC
63192012-08-23 Arnaud Charlet <charlet@adacore.com>
6320
6321 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
6322 for pointers, and add missing Convention C pragma.
6323 (print_ada_struct_decl): Add missing aliased keyword.
6324 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
6325
1a4049e7
JJ
63262012-08-17 Jakub Jelinek <jakub@redhat.com>
6327
6328 * c-common.c (sizeof_pointer_memaccess_warning): New function.
6329 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
6330 * c-opts.c (c_common_handle_option): Enable it for -Wall.
6331 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
6332 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
6333
70b5e7dc
RG
63342012-08-10 Richard Guenther <rguenther@suse.de>
6335
6336 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
6337
f8923f7e
SB
63382012-08-07 Steven Bosscher <steven@gcc.gnu.org>
6339
6340 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
6341 instead of separate pp_newline and pp_flush.
6342 (print_c_tree): Likewise.
6343
e45abe1f
RH
63442012-07-26 Richard Henderson <rth@redhat.com>
6345
6346 * c-common.c (handle_hot_attribute): Allow labels.
6347 (handle_cold_attribute): Likewise.
6348
332f1d24
JJ
63492012-07-20 Jakub Jelinek <jakub@redhat.com>
6350
6351 PR c++/28656
6352 * c-common.c (check_function_nonnull): Handle multiple nonnull
6353 attributes properly.
6354
7ee2468b
SB
63552012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6356
6357 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
6358 * c-ada-spec.c: Likewise.
6359 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
6360
ee7b28eb
SB
63612012-07-14 Steven Bosscher <steven@gcc.gnu.org>
6362
6363 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
6364 Remove code conditional on it.
6365
6bdf3519
SB
63662012-07-11 Steven Bosscher <steven@gcc.gnu.org>
6367
6368 * c-gimplify.c: Do not include basic-block.h.
6369 * c-common.c: Do not include linfuncs.h.
6370
532aafad
SB
63712012-07-08 Steven Bosscher <steven@gcc.gnu.org>
6372
6373 * c-common.h: Include tree.h.
6374
8d0d1915
JM
63752012-07-02 Jason Merrill <jason@redhat.com>
6376
6377 PR c++/53524
6378 * c-common.c (get_priority): Call default_conversion.
6379
fbc873ad
UB
63802012-07-01 Uros Bizjak <ubizjak@gmail.com>
6381
6382 * c-pch.c (c_common_write_pch): Remove unused variables.
6383
d4a10d0a
SB
63842012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6385
6386 * cppspec.c: Moved from gcc/ to here.
6387
6f3a2e23
KT
63882012-06-27 Kai Tietz <ktietz@redhat.com>
6389
6390 PR preprocessor/37215
6391 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
6392
8ca92d04
SB
63932012-06-21 Steven Bosscher <steven@gcc.gnu.org>
6394
6395 * c-common.h (c_common_print_pch_checksum): Remove.
6396 * c-pch.c: Do not include output.h.
6397 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
6398 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
6399 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
6400 (struct c_pch_header): Remove.
6401 (get_ident): Update gpch version.
6402 (pch_init): Do not print executable_checksum to asm_out_file.
6403 Do not fail if there is no asm_out_file to read back from. Set
6404 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
6405 (c_common_write_pch): Verify that nothing was written to asm_out_file
6406 since pch_init was called. Do not write a c_pch_header, and do not
6407 copy from asm_out_file to the PCH.
6408 (c_common_read_pch): Do not read a c_pch_header, and do not restore
6409 the content of asm_out_file from the PCH.
6410 (c_common_print_pch_checksum): Remove.
6411 * c-opts.c (c_common_init): Print out executable_checksum directly.
6412
70f42967
SB
64132012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6414
6415 * c-target.def (objc_declare_unresolved_class_reference,
6416 objc_declare_class_definition): Add new hooks.
6417
a8781821
SB
64182012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6419
6420 * c-lex.c: Do not include output.h.
6421 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
6422 Remove uses of ASM_OUTPUT_IDENT.
6423
9e1a8dd1
RR
64242012-06-15 Marc Glisse <marc.glisse@inria.fr>
6425
6426 PR c++/51033
6427 * c-common.h (c_build_vec_perm_expr): Move decl here.
6428 * c-common.c (c_build_vec_perm_expr): Move definition
6429 here.
6430
6f07a821
SB
64312012-06-06 Steven Bosscher <steven@gcc.gnu.org>
6432
6433 * c.opt (fconserve-space): Turn into a no-op.
6434
9faeb493 64352012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
6436
6437 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
6438 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
6439 both the start and end of the function.
6440
a4b7d13c
SB
64412012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6442
6443 * c-common.c: Do not include output.h.
6444 * c-pragma.c: Likewise.
6445
c265f413
SA
64462012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6447
6448 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
6449 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
6450 (lang_decl_name): Handle namespace decls.
6451
be7a421e
SB
64522012-05-31 Steven Bosscher <steven@gcc.gnu.org>
6453
6454 * c-ada-spec.c: Do not include output.h.
6455 * c-semantics.c: Likewise.
6456
65de6659
JM
64572012-05-29 Joseph Myers <joseph@codesourcery.com>
6458
6459 * c-common.c: Fix typo.
6460
ca5f4331
MM
64612012-05-29 Michael Matz <matz@suse.de>
6462
6463 * c-common.h (c_expand_decl): Remove prototype.
6464
4f7f7aca
MLI
64652012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6466
6467 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
6468 * c-opts.c (c_common_handle_option): Remove code handling
6469 warn_missing_braces.
6470
4a792f9b
PC
64712012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
6472
6473 PR c++/25137
6474 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
6475 -Wmissing_braces.
6476
650dc14a
DS
64772012-05-22 Dodji Seketeli <dodji@redhat.com>
6478
6479 PR c++/53322
6480 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
6481
9b095bf1
MLI
64822012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
6483
6484 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
6485 * c-opts.c (c_common_handle_option): Do not handle explicitly
6486 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
6487
0b2c4be5
DS
64882012-05-16 Dodji Seketeli <dodji@redhat.com>
6489
6490 PR preprocessor/7263
6491 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
6492 to cpp_classify_number. For diagnostics, use the precise location
6493 instead of the global input_location.
6494
a1bde5af
PC
64952012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
6496
d02924ef 6497 PR c++/11856
a1bde5af
PC
6498 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
6499
d1ede5f4
BS
65002012-05-14 Bernd Schmidt <bernds@codesourcery.com>
6501
a1bde5af 6502 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 6503
f2bc201f
MLI
65042012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
6505
6506 PR 53063
6507 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
6508 Wreorder): Use LangEnabledBy.
6509 * c-opts.c (c_common_handle_option): Do not enable them
6510 explicitly. Call lang-specific generated functions.
6511 (c_common_post_options): Do not set them here.
6512
95744782
MLI
65132012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
6514
6515 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
6516 Wmissing-field-initializers,Wmissing-parameter-type,
6517 Wold-style-declaration,Woverride-init): Use EnabledBy.
6518 * c-opts.c (c_common_post_options): Do not set here explicitly.
6519
7d5a5747
MLI
65202012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
6521
6522 PR 53063
6523 * c-opts.c (c_common_handle_option): Use handle_generated_option
6524 to enable sub-options.
6525
5a3c9cf2
PC
65262012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
6527
6528 PR c++/53158
6529 * c-common.c (warnings_for_convert_and_check): Use warning_at.
6530
3ac8781c
RG
65312012-05-10 Richard Guenther <rguenther@suse.de>
6532
6533 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
6534 adjust commentary about TYPE_IS_SIZETYPE types.
6535
1e537948
MLI
65362012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6537
6538 PR c++/53261
6539 * c-common.c (warn_logical_operator): Check that argument of
6540 integer_zerop is not NULL.
6541
f2c4a785
MLI
65422012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
6543
6544 PR c/43772
6545 * c-common.c (warn_logical_operator): Do not warn if either side
6546 is already true or false.
6547
50f305ca
MLI
65482012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6549
6550 PR c/51712
6551 * c-common.c (expr_original_type): New.
6552 (shorten_compare): Do not warn for enumeration types.
6553
0c3641b0
MLI
65542012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
6555
6556 * c.opt (fpermissive): Add Var(flag_permissive).
6557
7edaa4d2
MG
65582012-04-30 Marc Glisse <marc.glisse@inria.fr>
6559
6560 PR c++/51033
6561 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
6562 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
6563
b9c8da34
DS
65642012-04-30 Dodji Seketeli <dodji@redhat.com>
6565
6566 Add -Wvarargs option
6567 * c.opt (Wvarargs): Define new option.
6568
e6c69da0
MLI
65692012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6570
6571 * c-common.c (check_function_arguments): Replace
6572 Wmissing-format-attribute with Wsuggest-attribute=format.
6573
90137d8f
MLI
65742012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6575
6576 * c.opt (Wsuggest-attribute=format): New. Alias of
6577 Wmissing-format-attribute.
6578 * c-format.c (decode_format_type): Replace
6579 Wmissing-format-attribute with Wsuggest-attribute=format.
6580 (check_function_format): Likewise.
6581
9faeb493 65822012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
6583
6584 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
6585 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
6586 * c.opt: Add Wliteral-suffix.
6587
c1771a20
MLI
65882012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6589
6590 PR c/44774
6591 * c.opt (Wpedantic): New.
6592 (pedantic): Alias Wpedantic.
6593 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
6594 (c_common_post_options): Likewise.
6595 (sanitize_cpp_opts): Likewise.
6596 * c-lex.c (interpret_float): Likewise.
6597 * c-format.c (check_format_types): Likewise.
6598 * c-common.c (pointer_int_sum): Likewise.
6599 (c_sizeof_or_alignof_type): Likewise.
6600 (c_add_case_label): Likewise.
6601 (c_do_switch_warnings): Likewise.
6602 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6603
04b391c1
JM
66042012-04-15 Jason Merrill <jason@redhat.com>
6605
6606 PR c++/52818
6607 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
6608 (C_STD_NAME): Distinguish between C++98 and C++11.
6609
ac868f29
EB
66102012-04-11 Eric Botcazou <ebotcazou@adacore.com>
6611
6612 PR target/52624
6613 * c-common.h (uint16_type_node): Rename into...
6614 (c_uint16_type_node): ...this.
6615 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
6616 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
6617
fd4116f4
MLI
66182012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
6619
6620 * c-common.c (warn_if_unused_value): Move definition to here.
6621 * c-common.h (warn_if_unused_value): Move declaration to here.
6622
573ac65e
WB
66232012-03-23 William Bader <williambader@hotmail.com>
6624
6625 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
6626
552b8185
JM
66272012-03-20 Jason Merrill <jason@redhat.com>
6628
6629 * c-common.h (enum cxx_dialect): Add cxx1y.
6630 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
6631 test.
6632 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6633 * c-opts.c (c_common_post_options): Likewise.
6634 (set_std_cxx1y): New.
6635 (c_common_handle_option): Call it.
6636 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
6637
04398fa8
PC
66382012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
6639
6640 PR c++/14710
6641 * c.opt ([Wuseless-cast]): Add.
6642
d2a12ae7
RG
66432012-03-16 Richard Guenther <rguenther@suse.de>
6644
6645 * c-pretty-print.c (pp_c_initializer_list): Adjust.
6646
a12bf402
MLI
66472012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6648
6649 PR c++/44783
6650 * c.opt (ftemplate-backtrace-limit) Add.
6651
5c30094f
RO
66522012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6653
6654 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
6655 handling.
6656 * c-pragma.c (handle_pragma_extern_prefix): Remove.
6657 (init_pragma): Don't register extern_prefix.
6658
21fa2faf
RG
66592012-03-12 Richard Guenther <rguenther@suse.de>
6660
6661 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
6662 (builtin_type_for_size): Likewise.
6663
e3793c6f
JJ
66642012-02-13 Jakub Jelinek <jakub@redhat.com>
6665
6666 PR c++/52215
6667 * c-common.c (sync_resolve_params): Don't decide whether to convert
6668 or not based on TYPE_SIZE comparison, convert whenever arg_type
6669 is unsigned INTEGER_TYPE.
6670
93286335
PC
66712012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
6672
6673 PR c/52118
6674 * c.opt ([Wunused-local-typedefs]): Fix description.
6675
7a421706
MS
66762012-01-24 Mike Stump <mikestump@comcast.net>
6677
6678 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
6679 exactly.
6680
ba9b1f11
RG
66812012-01-18 Richard Guenther <rguenther@suse.de>
6682
6683 * c-opts.c (c_common_post_options): Reset LTO flags if
6684 we are about to generate a PCH.
6685
465406be
PC
66862012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
6687
6688 PR c++/51777
6689 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
6690 use pp_unsigned_wide_integer.
6691
aee15221
RG
66922012-01-10 Richard Guenther <rguenther@suse.de>
6693
6694 PR middle-end/51806
6695 * c-opts.c (c_common_handle_option): Move -Werror handling
6696 to language independent code.
6697
5720c0dc
RG
66982012-01-05 Richard Guenther <rguenther@suse.de>
6699
6700 PR middle-end/51764
6701 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
6702 from common.opt.
6703
73ac190a
PC
67042011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
6705
6706 PR c++/51316
6707 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
6708 of array types with an unknown bound.
6709
48b0b196
JM
67102011-12-20 Joseph Myers <joseph@codesourcery.com>
6711
6712 * c-common.c (flag_isoc99): Update comment to refer to C11.
6713 (flag_isoc1x): Change to flag_isoc11.
6714 * c-common.h (flag_isoc99): Update comment to refer to C11.
6715 (flag_isoc1x): Change to flag_isoc11.
6716 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
6717 C11.
6718 * c-opts.c (set_std_c1x): Change to set_std_c11.
6719 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
6720 Call set_std_c11.
6721 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
6722 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
6723 * c.opt (std=c1x): Change to std=c11. Document as non-draft
6724 standard.
6725 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
6726 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
6727 (std=gnu1x): Make alias of std=gnu11.
6728
d58d6eb5
JM
67292011-12-19 Jason Merrill <jason@redhat.com>
6730
6731 PR c++/51228
6732 * c-common.c (handle_transparent_union_attribute): Check the first
6733 field if the type is complete.
6734
b3908fcc
JW
67352011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
6736
6737 PR libstdc++/51365
6738 * c-common.c (RID_IS_FINAL): Add.
6739 * c-common.h (RID_IS_FINAL): Add.
6740
fea3ca91
IS
67412011-11-30 Iain Sandoe <iains@gcc.gnu.org>
6742
6743 * c.opt (fgnu-runtime): Provide full description.
6744 (fnext-runtime): Likewise.
6745 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
6746
62bad7cd
AM
67472011-11-28 Andrew MacLeod <amacleod@redhat.com>
6748
6749 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
6750 predefines in one place. Add LOCK_FREE predefines.
6751 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
6752 new func.
6753
c466c4ff
AM
67542011-11-24 Andrew MacLeod <amacleod@redhat.com>
6755
6756 PR c/51256
9faeb493 6757 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 6758 conditions
9faeb493
UB
6759 (resolve_overloaded_atomic_exchange,
6760 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
6761 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
6762 error_mark_node for error conditions.
9faeb493 6763
a5952633
RG
67642011-11-08 Richard Guenther <rguenther@suse.de>
6765
6766 PR middle-end/51010
6767 c-family/
6768
0a35513e
AH
67692011-11-07 Richard Henderson <rth@redhat.com>
6770 Aldy Hernandez <aldyh@redhat.com>
6771 Torvald Riegel <triegel@redhat.com>
6772
6773 Merged from transactional-memory.
6774
6775 * c-common.c (handle_tm_wrap_attribute,
6776 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
6777 (struct c_common_reswords): Added __transaction* keywords.
6778 (struct c_common_attribute_table): Added transaction* and tm_regparm
6779 attributes.
6780 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
6781 masks.
6782 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
6783 find_tm_attribute): Declare.
6784
6d87092d
JM
67852011-11-07 Jason Merrill <jason@redhat.com>
6786
6787 PR c++/35688
6788 * c-common.c, c-common.h: Revert yesterday's changes.
6789
8e7860a1
JM
67902011-11-06 Jason Merrill <jason@redhat.com>
6791
6792 PR c++/35688
6793 * c-common.c (decl_has_visibility_attr): Split out from...
6794 (c_determine_visibility): ...here.
6795 * c-common.h: Declare it.
6796
d19fa6b5
JM
67972011-11-06 Joseph Myers <joseph@codesourcery.com>
6798
6799 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
6800 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
6801 type.
6802 (check_user_alignment): New. Split out of
6803 handle_aligned_attribute. Disallow integer constants with
6804 noninteger types. Conditionally allow zero.
6805 (handle_aligned_attribute): Use check_user_alignment.
6806 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
6807
86951993
AM
68082011-11-06 Andrew MacLeod <amacleod@redhat.com>
6809 Richard Henderson <rth@redhat.com>
6810
6811 Merged from cxx-mem-model.
6812
6813 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 6814 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
6815 parameters that are the same type size.
6816 (get_atomic_generic_size): New. Find size of generic
6817 atomic function parameters and do typechecking.
6818 (add_atomic_size_parameter): New. Insert size into parameter list.
6819 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
6820 either __atomic_exchange_n or external library call.
9faeb493 6821 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 6822 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 6823 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
6824 __atomic_load_n or an external library call.
6825 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
6826 __atomic_store_n or an external library call.
6827 (resolve_overloaded_builtin): Handle new __atomic builtins.
6828
cf9e9959
EB
68292011-11-04 Eric Botcazou <ebotcazou@adacore.com>
6830
6831 PR c++/50608
6832 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
6833 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
6834 <INDIRECT_REF>: Return the argument.
6835 <ARRAY_REF>: Remove special code for negative offset.
6836 Call fold_build_pointer_plus instead of size_binop.
6837 (fold_offsetof): Remove STOP_REF argument and adjust.
6838 * c-common.h (fold_offsetof_1): Declare.
6839 (fold_offsetof): Remove STOP_REF argument.
6840
25339f10
JM
68412011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
6842
6843 PR c++/50810
6844 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6845 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6846 Wnarrowing for C++0x and C++98.
6847 * c.opt ([Wnarrowing]): Update.
6848
89401152
PC
68492011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
6850
6851 PR c++/44277
6852 * c.opt: Add Wzero-as-null-pointer-constant.
6853
97e3ad20
JM
68542011-10-31 Jason Merrill <jason@redhat.com>
6855
15694fdd
JM
6856 * c.opt (-fdeduce-init-list): Off by default.
6857
97e3ad20
JM
6858 PR c++/50920
6859 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
6860 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
6861 and -Wc++11-compat.
6862 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
6863
fb9120e3
RAV
68642011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
6865
6866 PR c++/30066
6867 * c.opt (fvisibility-inlines-hidden): Description change.
6868
3ce4f9e4
ESR
68692011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
6870
6871 Implement C++11 user-defined literals.
6872 * c-common.c (build_userdef_literal): New.
6873 * c-common.def: New tree code.
6874 * c-common.h (tree_userdef_literal): New tree struct and accessors.
6875 * c-lex.c (interpret_float): Add suffix parm.
6876 (c_lex_with_flags): Build literal tokens.
6877
5f53c243
PC
68782011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6879
6880 PR c++/50841
6881 Revert:
6882 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6883
6884 PR c++/50810
6885 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6886 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6887 Wnarrowing for C++0x and C++98.
6888 * c.opt ([Wnarrowing]): Update.
6889
263734e1
PC
68902011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6891
6892 PR c++/50810
6893 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6894 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6895 Wnarrowing for C++0x and C++98.
6896 * c.opt ([Wnarrowing]): Update.
6897
d2e312d7
PC
68982011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
6899
6900 PR c++/45385
6901 * c-common.c (conversion_warning): Remove code looking for
6902 artificial operands.
6903
d17687f6
DS
69042011-10-18 Dodji Seketeli <dodji@redhat.com>
6905
6906 PR bootstrap/50760
6907 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 6908 !NO_IMPLICIT_EXTERN_C.
d17687f6 6909
fc8396e9
PC
69102011-10-17 Michael Spertus <mike_spertus@symantec.com>
6911
6912 * c-common.c (c_common_reswords): Add __bases,
6913 __direct_bases.
6914 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
6915
69162011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
6917
6918 PR c++/50757
6919 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
6920
847e697a
TT
69212011-10-15 Tom Tromey <tromey@redhat.com>
6922 Dodji Seketeli <dodji@redhat.com>
6923
6924 * c.opt (fdebug-cpp): New option.
6925 * c-opts.c (c_common_handle_option): Handle the option.
6926 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
6927 output stream in parameter. Factorized from ...
6928 (maybe_print_line): ... this. Dump location debug information when
6929 -fdebug-cpp is in effect.
6930 (print_line_1): New static function. Takes an output stream in
6931 parameter. Factorized from ...
6932 (print_line): ... here. Dump location information when -fdebug-cpp
6933 is in effect.
6934 (scan_translation_unit): Dump location information when
6935 -fdebug-cpp is in effect.
6936
92582b75
TT
69372011-10-15 Tom Tromey <tromey@redhat.com>
6938 Dodji Seketeli <dodji@redhat.com>
6939
6940 * c.opt (ftrack-macro-expansion): New option. Handle it with and
6941 without argument.
6942 * c-opts.c (c_common_handle_option)<case
6943 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
6944 cases. Handle -ftrack-macro-expansion with and without argument.
6945
46427374
TT
69462011-10-15 Tom Tromey <tromey@redhat.com>
6947 Dodji Seketeli <dodji@redhat.com>
6948
6949 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
6950 (print_line, cb_define, do_line_change): Adjust to avoid touching
6951 the internals of struct line_map. Use the public API instead.
6952 * c-pch.c (c_common_read_pch): Likewise.
6953 * c-lex.c (fe_file_change): Likewise.
6954
fc8396e9
PC
69552011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
6956
6957 PR c++/17212
6958 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
6959
69602011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
6961
6962 PR c++/33067
6963 * c-pretty-print.c (pp_c_floating_constant): Output
6964 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
6965
e79983f4
MM
69662011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6967
6968 * c-common.c (def_builtin_1): Delete old interface with two
6969 parallel arrays to hold standard builtin declarations, and replace
6970 it with a function based interface that can support creating
6971 builtins on the fly in the future. Change all uses, and poison
6972 the old names. Make sure 0 is not a legitimate builtin index.
6973 * c-omp.c (c_finish_omp_barrier): Ditto.
6974 (c_finish_omp_taskwait): Ditto.
6975 (c_finish_omp_flush): Ditto.
6976
6637388f
TG
69772011-10-11 Tristan Gingold <gingold@adacore.com>
6978
6979 * c.opt: (fallow-parameterless-variadic-functions): New.
6980
3797cb21
DS
69812011-09-08 Dodji Seketeli <dodji@redhat.com>
6982
6983 PR c++/33255 - Support -Wunused-local-typedefs warning
6984 * c-common.h (struct c_language_function::local_typedefs): New
6985 field.
9faeb493
UB
6986 (record_locally_defined_typedef, maybe_record_typedef_use)
6987 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 6988 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
6989 (maybe_record_typedef_use)
6990 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
6991 * c.opt: Declare new -Wunused-local-typedefs flag.
6992
693ddb1b
EB
69932011-09-06 Eric Botcazou <ebotcazou@adacore.com>
6994
6995 PR middle-end/50266
6996 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
6997 computations.
6998
830c740f
RG
69992011-09-05 Richard Guenther <rguenther@suse.de>
7000
7001 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7002 of integer_minus_one_node for empty array upper bounds.
7003
892a371f
DS
70042011-08-28 Dodji Seketeli <dodji@redhat.com>
7005
7006 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7007 it's the first time it's being called on this main TU.
7008
0e3fdb48
RB
70092011-08-24 Richard Guenther <rguenther@suse.de>
7010
7011 PR c/49396
7012 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7013
70142011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
7015
7016 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7017 defined in cpp_init_builtins and c_cpp_builtins.
7018
d4a83c10
JM
70192011-08-19 Joseph Myers <joseph@codesourcery.com>
7020
7021 * c-common.c (c_common_reswords): Add __builtin_complex.
7022 * c-common.h (RID_BUILTIN_COMPLEX): New.
7023
bbceee64
JM
70242011-08-18 Joseph Myers <joseph@codesourcery.com>
7025
7026 * c-common.c (c_common_reswords): Add _Noreturn.
7027 (keyword_is_function_specifier): Handle RID_NORETURN.
7028 * c-common.h (RID_NORETURN): New.
7029
3f8257db 70302011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
7031
7032 * c-common.c (unsafe_conversion_p): New function. Check if it is
7033 unsafe to convert an expression to the type.
7034 (conversion_warning): Adjust, use unsafe_conversion_p.
7035 * c-common.h (unsafe_conversion_p): New function declaration.
7036
20906c66
JJ
70372011-08-02 Jakub Jelinek <jakub@redhat.com>
7038
7039 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7040 (c_finish_omp_taskyield): New prototype.
7041 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7042 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7043 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7044 or RHS1 have side-effects, evaluate those too in the right spot,
7045 if it is a decl and LHS is also a decl, error out if they
7046 aren't the same.
7047 (c_finish_omp_taskyield): New function.
7048 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7049 * c-pragma.c (omp_pragmas): Add taskyield.
7050 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7051 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7052 PRAGMA_OMP_CLAUSE_MERGEABLE.
7053
770e5a2e
DS
70542011-07-25 Dodji Seketeli <dodji@redhat.com>
7055
7056 * c-common.h (set_underlying_type): Remove parm name from
7057 declaration.
7058
1baae426
RG
70592011-07-25 Romain Geissler <romain.geissler@gmail.com>
7060
7061 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 7062
fcb21722
JM
70632011-07-22 Jason Merrill <jason@redhat.com>
7064
76f86d00
JM
7065 PR c++/49793
7066 * c.opt (Wnarrowing): New.
7067
3a636414
JM
7068 PR c++/30112
7069 * c-common.h: Declare c_linkage_bindings.
7070 * c-pragma.c (handle_pragma_redefine_extname): Use it.
7071
fcb21722
JM
7072 PR c++/49813
7073 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7074 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7075 as flag_isoc99 for 'restrict'.
7076 (pp_c_specifier_qualifier_list): Likewise for _Complex.
7077
02614448
ILT
70782011-07-21 Ian Lance Taylor <iant@google.com>
7079
7080 PR middle-end/49705
7081 * c-common.c (c_disable_warnings): New static function.
7082 (c_enable_warnings): New static function.
7083 (c_fully_fold_internal): Change local unused_p to bool. Call
7084 c_disable_warnings and c_enable_warnings rather than change
7085 c_inhibit_evaluation_warnings.
7086
34429675
JM
70872011-07-20 Jason Merrill <jason@redhat.com>
7088
7089 PR c++/6709 (DR 743)
7090 PR c++/42603 (DR 950)
7091 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
7092 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
7093 (CPP_DECLTYPE): New.
7094 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
7095
5d49b6a7
RG
70962011-07-19 Richard Guenther <rguenther@suse.de>
7097
7098 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
7099 * c-omp.c (c_finish_omp_for): Likewise.
7100
e84a58ff
EB
71012011-07-12 Eric Botcazou <ebotcazou@adacore.com>
7102
7103 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
7104 body on the next line.
7105
329af3c7
JM
71062011-07-08 Jason Merrill <jason@redhat.com>
7107
4063e61b
JM
7108 PR c++/45437
7109 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
7110
329af3c7
JM
7111 PR c++/49673
7112 * c-common.c (c_apply_type_quals_to_decl): Don't check
7113 TYPE_NEEDS_CONSTRUCTING.
7114
1a072294
RG
71152011-07-06 Richard Guenther <rguenther@suse.de>
7116
7117 * c-common.c (c_common_nodes_and_builtins):
7118 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
7119
fce5dddd
RG
71202011-07-05 Richard Guenther <rguenther@suse.de>
7121
7122 * c-common.c (c_common_nodes_and_builtins): Build all common
7123 tree nodes first.
7124
45d439ac
JJ
71252011-06-27 Jakub Jelinek <jakub@redhat.com>
7126
56300785
JJ
7127 * c-common.h (c_tree_chain_next): New static inline function.
7128
45d439ac
JJ
7129 * c-common.c (check_builtin_function_arguments): Handle
7130 BUILT_IN_ASSUME_ALIGNED.
7131
e0a8ecf2
AM
71322011-06-21 Andrew MacLeod <amacleod@redhat.com>
7133
7134 * c-common.c: Add sync_ or SYNC__ to builtin names.
7135 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
7136
71372011-06-20 Pierre Vittet <piervit@pvittet.com>
7138
7139 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
7140 handler.
7141 (gen_pragma_handler): New union.
7142 (internal_pragma_handler): New type.
7143 (c_register_pragma_with_data)
7144 (c_register_pragma_with_expansion_and_data): New functions.
7145
7146 * c-pragma.c (registered_pragmas, c_register_pragma_1)
7147 (c_register_pragma, c_register_pragma_with_expansion)
7148 (c_invoke_pragma_handler): Changed to work with
7149 internal_pragma_handler.
7150 (c_register_pragma_with_data)
7151 (c_register_pragma_with_expansion_and_data): New functions.
7152
677f3fa8
JM
71532011-06-14 Joseph Myers <joseph@codesourcery.com>
7154
7155 * c-common.c: Include common/common-target.h.
7156 (handle_section_attribute): Use
7157 targetm_common.have_named_sections.
7158 * c-cppbuiltin.c: Include common/common-target.h.
7159 (c_cpp_builtins): Use targetm_common.except_unwind_info.
7160
d7fc8c14
RG
71612011-06-10 Richard Guenther <rguenther@suse.de>
7162
7163 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
7164 to print a IDENTIFIER_NODE.
7165
10e48e39
RO
71662011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7167 Joseph Myers <joseph@codesourcery.com>
7168
7169 * c.opt (fbuilding-libgcc): New option.
7170 * c-cppbuiltin.c (c_cpp_builtins): Define
7171 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
7172
6976ae51
JM
71732011-06-07 Jason Merrill <jason@redhat.com>
7174
3ff60975
JM
7175 * c-common.c (max_tinst_depth): Lower default to 900.
7176
6976ae51
JM
7177 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
7178
009db074
RG
71792011-06-07 Richard Guenther <rguenther@suse.de>
7180
7181 * c-common.c (c_common_nodes_and_builtins): Do not set
7182 size_type_node or call set_sizetype.
7183
b4592b92
DS
71842011-06-07 Dodji Seketeli <dodji@redhat.com>
7185
7186 PR debug/49130
7187 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 7188 type when using pointer comparison to compare types.
b4592b92 7189
014ab419
JW
71902011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
7191
7192 * c.opt: Add -Wdelete-non-virtual-dtor.
7193 * c-opts.c (c_common_handle_option): Include it in -Wall.
7194
4f60111f
NF
71952011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
7196
7197 PR bootstrap/49190
7198
7199 Revert:
7200 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7201
7202 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7203 not tree_common.
7204
4cc4f2f4
JJ
72052011-05-27 Jakub Jelinek <jakub@redhat.com>
7206
7207 PR c++/49165
7208 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
7209 C++ don't call c_common_truthvalue_conversion on void type arms.
7210
38e01f9e
NF
72112011-05-27 Nathan Froyd <froydnj@codesourcery.com>
7212
7213 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
7214 (stmt_list_stack): Define.
7215 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
7216 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
7217
92e948a8
NF
72182011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7219
7220 * c-common.c (warning_candidate_p): Check for BLOCKs.
7221
a2fc3e63
NF
72222011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7223
7224 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7225 not tree_common.
7226
0957c029
JJ
72272011-05-25 Jakub Jelinek <jakub@redhat.com>
7228
7229 * c-common.c (def_fn_type): Remove extra va_end.
7230
828fb3ba
JM
72312011-05-23 Jason Merrill <jason@redhat.com>
7232
7233 PR c++/48106
7234 * c-common.c (c_common_get_narrower): New.
7235 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
7236
dde05067
NF
72372011-05-23 Nathan Froyd <froydnj@codesourcery.com>
7238
7239 * c-common.h (check_function_arguments): Tweak prototype of
7240 check_function_arguments.
7241 * c-common.c (check_function_arguments): Likewise. Adjust
7242 calls to check_function_nonnull, check_function_format, and
7243 check_function_sentinel.
7244 (check_function_sentinel): Take a FUNCTION_TYPE rather than
7245 separate attributes and typelist arguments. Use
7246 FOREACH_FUNCTION_ARGS to iterate over argument types.
7247
3c0d13bf
PC
72482011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7249
7250 * c-common.c (c_common_reswords): Reorder.
7251 * c-common.h (rid): Likewise.
7252
8242dd04
NF
72532011-05-10 Nathan Froyd <froydnj@codesourcery.com>
7254
7255 * c-common.c (def_fn_type): Don't call build_function_type, call
7256 build_function_type_array or build_varargs_function_type_array
7257 instead.
7258 (c_common_nodes_and_builtins): Likewise.
7259
3d528853
NF
72602011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7261
7262 * c-common.c (c_add_case_label): Omit the loc argument to
7263 build_case_label.
7264 * c-common.h (build_case_label): Remove.
7265 * c-semantics.c (build_case_label): Remove.
7266
a04a722b
JM
72672011-05-05 Joseph Myers <joseph@codesourcery.com>
7268
7269 * c-objc.h (objc_start_method_definition): Update prototype.
7270 * stub-objc.c (objc_start_method_definition): Add extra parameter.
7271
e19a18d4
NF
72722011-05-04 Nathan Froyd <froydnj@codesourcery.com>
7273
7274 * c-common.c (check_main_parameter_types): Reindent. Don't use
7275 TYPE_ARG_TYPES directly.
7276 (handle_nonnull_attribute): Likewise.
7277 (sync_resolve_params): Likewise.
7278 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
7279 to check_format_string.
7280 (handle_format_attribute): Likewise.
7281 (check_format_string): Take a function type to examine instead of
7282 a type list. Use a function_arg_iterator to step through argument
7283 types.
7284
c62c040f
RG
72852011-05-04 Richard Guenther <rguenther@suse.de>
7286
7287 * c-common.c (fix_string_type): Use size_int for index type bounds.
7288 (start_fname_decls): Do not pass NULL to build_int_cst.
7289 (c_init_attributes): Likewise.
7290 * c-lex.c (c_lex_with_flags): Likewise.
7291
c12ff9d8
JM
72922011-04-27 Jason Merrill <jason@redhat.com>
7293
7294 * c-common.c (make_tree_vector_from_list): New.
7295 * c-common.h: Declare it.
7296
304dfbe3
RG
72972011-04-26 Richard Guenther <rguenther@suse.de>
7298
7299 PR preprocessor/48248
7300 * c-ppoutput.c (maybe_print_line): Always optimize newlines
7301 for output size with -P.
7302
3c0d13bf
PC
73032011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
7304
7305 * c-common.c (struct c_common_resword): Add __underlying_type.
7306 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
7307
04695783
JM
73082011-04-20 Jim Meyering <meyering@redhat.com>
7309
7310 * c-format.c (init_dollar_format_checking): Remove useless
7311 if-before-free.
7312
0dc33c3c
NP
73132011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
7314
7315 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 7316 (objc_detect_field_duplicates): New.
0dc33c3c 7317 * stub-objc.c: Likewise.
3c0d13bf 7318
c59633d9
NP
73192011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7320
7321 * stub-objc.c (objc_declare_protocols): Renamed to
7322 objc_declare_protocol.
7323 * c-objc.h: Likewise.
3c0d13bf 7324
32dabdaf
NP
73252011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7326
7327 * stub-objc.c (objc_declare_class): Updated argument name.
7328
81f653d6
NF
73292011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7330
7331 * c-common.h (c_common_init_ts): Declare.
7332 * c-common.c (c_common_init_ts): Define.
7333
eb345401
NP
73342011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
7335
7336 * c-objc.h (objc_build_message_expr): Updated prototype.
7337 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 7338
a358e188
MJ
73392011-04-12 Martin Jambor <mjambor@suse.cz>
7340
7341 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
7342 of cgraph_node.
7343
e6313a78
RG
73442011-04-11 Richard Guenther <rguenther@suse.de>
7345
7346 * c-common.c (complete_array_type): Build a range type of
7347 proper type.
7348
dcf0c47e
NF
73492011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7350
7351 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
7352 (handle_type_generic_attribute): Likewise.
7353
1ee44b26
JM
73542011-04-07 Jason Merrill <jason@redhat.com>
7355
7356 PR c++/48450
7357 * c-common.c (c_common_truthvalue_conversion): Don't ignore
7358 conversion from C++0x scoped enum.
7359
acce4e77
JM
73602011-04-06 Joseph Myers <joseph@codesourcery.com>
7361
7362 * c-target-def.h: New file.
7363 * c-target.def: New file.
7364 * c-target.h: New file.
7365 * c-common.c (targetcm): Don't define here.
7366 * c-common.h (default_handle_c_option): Declare.
7367 * c-format.c: Include c-target.h instead of target.h.
7368 * c-opts.c: Include c-target.h instead of target.h. Explicitly
7369 include tm.h.
7370 (default_handle_c_option): Move from targhooks.c.
7371
e2eefb55
JJ
73722011-03-29 Jakub Jelinek <jakub@redhat.com>
7373
7374 PR preprocessor/48248
7375 * c-ppoutput.c (print): Add src_file field.
7376 (init_pp_output): Initialize it.
7377 (maybe_print_line): Don't optimize by adding up to 8 newlines
7378 if map->to_file and print.src_file are different file.
7379 (print_line): Update print.src_file.
7380
ba78087b
KT
73812011-03-25 Kai Tietz <ktietz@redhat.com>
7382
7383 * c-ada-spec.c (compare_comment): Use filename_cmp
7384 instead of strcmp for filename.
7385
0edf1bb2
JL
73862011-03-25 Jeff Law <law@redhat.com>
7387
adfac8df 7388 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 7389
c7dc8804
JM
73902011-03-25 Jason Merrill <jason@redhat.com>
7391
7392 * c.opt: Add -std=c++03.
7393
d1d879b1
EB
73942011-03-22 Eric Botcazou <ebotcazou@adacore.com>
7395
7396 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
7397
3f8257db 73982011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
7399
7400 PR target/12171
5050afdf
KT
7401 * c-pretty-print.c (pp_c_specifier_qualifier_list):
7402 Display allowed attributes for function pointer types.
7403 (pp_c_attributes_display): New function to display
7404 attributes having affects_type_identity flag set to true.
7405 * c-pretty-print.h (pp_c_attributes_display): New prototype.
7406
62d784f7
KT
7407 * c-common.c (c_common_attribute_table):
7408 Add new element.
7409 (c_common_format_attribute_table): Likewise.
7410
82d37118
JM
74112011-03-18 Jason Merrill <jason@redhat.com>
7412
49a000c3
JM
7413 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
7414 * c-common.h: Don't declare it here.
7415 * c-common.c: Or define it here.
7416 * c-opts.c (c_common_handle_option): Or set it here.
7417
82d37118
JM
7418 PR c++/35315
7419 * c-common.c (handle_transparent_union_attribute): Don't
7420 make a duplicate type in C++.
7421
17bc631c
JM
74222011-03-15 Jason Merrill <jason@redhat.com>
7423
7424 * c-common.c (max_constexpr_depth): New.
7425 * c-common.h: Declare it.
7426 * c-opts.c (c_common_handle_option): Set it.
7427 * c.opt (fconstexpr-depth): New option.
7428
1b9b91a6
JM
74292011-03-11 Jason Merrill <jason@redhat.com>
7430
f231b5ff
JM
7431 * c-common.c (attribute_takes_identifier_p): Add missing const.
7432
1b9b91a6
JM
7433 PR c++/46803
7434 * c-common.c (attribute_takes_identifier_p): Assume that an
7435 unknown attribute takes an identifier.
7436
a19e4d44
NF
74372011-03-07 Nathan Froyd <froydnj@codesourcery.com>
7438
7439 PR c/47786
7440 * c-common.c (c_type_hash): Call list_length instead of iterating
7441 through DECL_CHAIN. Rename 'i' to 'n_elements'.
7442
982d62f6
JJ
74432011-02-19 Jakub Jelinek <jakub@redhat.com>
7444
7445 PR c/47809
7446 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
7447
0a256240
NP
74482011-02-17 Iain Sandoe <iains@gcc.gnu.org>
7449
7450 * c.opt (fobjc-abi-version=) New.
7451 (fobjc-nilcheck): New.
7452
ba9e6dd5
NF
74532011-02-03 Nathan Froyd <froydnj@codesourcery.com>
7454
7455 PR c++/46890
7456 * c-common.h (keyword_is_decl_specifier): Declare.
7457 * c-common.c (keyword_is_decl_specifier): Define.
7458 (keyword_is_function_specifier): New function.
7459
7273813a
JJ
74602011-01-26 Jakub Jelinek <jakub@redhat.com>
7461
7462 PR c/47473
7463 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
7464 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
7465 REAL_TYPE.
7466
908ef79b
AC
74672011-01-26 Arnaud Charlet <charlet@adacore.com>
7468
7469 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
7470
237e9384
JJ
74712011-01-26 Jakub Jelinek <jakub@redhat.com>
7472
7473 PR pch/47430
7474 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
7475 after init_c_lex if pch_file is set.
7476
47ea1edf
DK
74772011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
7478
d4dba752 7479 PR c++/43601
47ea1edf
DK
7480 * c.opt (-fkeep-inline-dllexport): New switch.
7481
2aa9c6ae
RG
74822011-01-12 Richard Guenther <rguenther@suse.de>
7483
7484 PR middle-end/32511
7485 * c-common.c (handle_weak_attribute): Warn instead of error
7486 on declaring an inline function weak.
7487
7bd11157
TT
74882011-01-05 Tom Tromey <tromey@redhat.com>
7489
7490 * c-common.h (lvalue_error): Update.
7491 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
7492 not error.
7493
0e66e494 74942010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 7495
b4f588c4
NP
7496 PR objc/47075
7497 * c-objc.h (objc_finish_message_expr): Added argument to
7498 prototype.
7499
f4da8dce
NF
75002010-12-22 Nathan Froyd <froydnj@codesourcery.com>
7501
7502 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
7503 Use prototype_p.
7504
46270f14
NP
75052010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
7506
7507 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 7508 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 7509
4816c593
NF
75102010-12-10 Nathan Froyd <froydnj@codesourcery.com>
7511
7512 * c-common.h (readonly_error): Declare.
7513 * c-common.c (readonly_error): Define.
7514
7a6daeb0
NF
75152010-12-09 Nathan Froyd <froydnj@codesourcery.com>
7516
7517 * c-common.h (invalid_indirection_error): Declare.
7518 * c-common.c (invalid_indirection_error): Define.
7519
892f6119
RG
75202010-12-03 Richard Guenther <rguenther@suse.de>
7521
7522 PR c/46745
7523 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
7524 (pp_c_unary_expression): Likewise.
7525 (pp_c_expression): Likewise.
7526
6c39e757
NP
75272010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
7528
7529 * c-common.h (objc_finish_function): New.
7530 (objc_non_volatilized_type): Removed.
7531 (objc_type_quals_match): Removed.
7532 * stub-objc.c (objc_finish_function): New.
7533 (objc_non_volatilized_type): Removed.
7534 (objc_type_quals_match): Removed.
9faeb493 7535
7c475d11
JM
75362010-11-30 Joseph Myers <joseph@codesourcery.com>
7537
7538 * c-common.h (parse_optimize_options): Declare.
7539 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
7540 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
7541
71f3e391
JM
75422010-11-29 Joseph Myers <joseph@codesourcery.com>
7543
7544 * c-opts.c (check_deps_environment_vars): Use getenv instead of
7545 GET_ENVIRONMENT.
7546 * c-pch.c (O_BINARY): Don't define here.
7547 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
7548
d5fabb58
JM
75492010-11-25 Joseph Myers <joseph@codesourcery.com>
7550
7551 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
7552 targetm.except_unwind_info.
7553
299404a1
JM
75542010-11-23 Joseph Myers <joseph@codesourcery.com>
7555
7556 * c-opts.c (c_common_handle_option): Pass location to
7557 set_struct_debug_option.
7558
c98cd5bf
JM
75592010-11-23 Joseph Myers <joseph@codesourcery.com>
7560
7561 * c-common.c (visibility_options): Move from ../opts.c.
7562 * c-common.h (struct visibility_flags, visibility_options):
7563 Declare here.
7564 * c-opts.c (finish_options): Rename to c_finish_options.
7565 (c_common_init): Update call to finish_options.
7566
a9546771
NP
75672010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
7568
7569 PR objc/34033
7570 * c-lex.c (lex_string): Check that each string in an Objective-C
7571 string concat sequence starts with either one or zero '@', and
7572 that there are no spurious '@' signs at the end.
7573
24a57808
JM
75742010-11-20 Joseph Myers <joseph@codesourcery.com>
7575
7576 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
7577 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
7578 HANDLE_PRAGMA_VISIBILITY.
7579 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
7580 HANDLE_PRAGMA_VISIBILITY): Don't define.
7581 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
7582
a9aa2c3a
NF
75832010-11-20 Nathan Froyd <froydnj@codesourcery.com>
7584
7585 PR c++/16189
7586 PR c++/36888
7587 PR c++/45331
7588 * c-common.h (keyword_begins_type_specifier): Declare.
7589 (keyword_is_storage_class_specifier): Declare.
7590 (keyword_is_type_qualifier): Declare.
7591 * c-common.c (keyword_begins_type_specifier): New function.
7592 (keyword_is_storage_class_specifier): New function.
7593 (keyword_is_type_qualifier): Declare.
7594
5386338c
JM
75952010-11-19 Joseph Myers <joseph@codesourcery.com>
7596
7597 PR c/46547
7598 * c-common.c (in_late_binary_op): Define.
7599 (c_common_truthvalue_conversion): Check in_late_binary_op before
7600 calling c_save_expr.
7601 * c-common.h (in_late_binary_op): Declare.
7602
69ccdddb
JM
76032010-11-19 Joseph Myers <joseph@codesourcery.com>
7604
7605 * c-opts.c (c_common_handle_option): Update calls to
7606 set_struct_debug_option.
7607
6b192a09
NP
76082010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
7609
7610 * c-common.h (objc_declare_protocols): Added additional argument.
7611 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 7612
fb52b50a
NF
76132010-11-18 Nathan Froyd <froydnj@codesourcery.com>
7614
7615 PR c/33193
7616 * c-common.h (build_real_imag_expr): Declare.
7617 * c-semantics.c (build_real_imag_expr): Define.
7618
b37421c6
JM
76192010-11-17 Joseph Myers <joseph@codesourcery.com>
7620
7621 * c-opts.c (c_common_parse_file): Take no arguments.
7622 * c-common.h (c_common_parse_file): Update prototype.
7623
07078664
JJ
76242010-11-16 Jakub Jelinek <jakub@redhat.com>
7625
7626 PR c++/46401
7627 * c-common.c (warning_candidate_p): Don't track non-const calls
7628 or STRING_CSTs.
7629
c6a13190
ILT
76302010-11-15 Ian Lance Taylor <iant@google.com>
7631
7632 * c-lex.c (init_c_lex): Set macro debug callbacks if
7633 flag_dump_go_spec is set.
7634
925e8657
NP
76352010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
7636
7637 * c-common.h (objc_build_incr_expr_for_property_ref): New.
7638 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
7639
bb0a9581
NF
76402010-11-15 Nathan Froyd <froydnj@codesourcery.com>
7641
7642 PR preprocessor/45038
7643 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
7644 dialects.
7645
c5fa0890
JM
76462010-11-12 Joseph Myers <joseph@codesourcery.com>
7647
7648 * c-common.h (c_family_lang_mask): Declare.
7649 * c-opts.c (c_family_lang_mask): Make extern.
7650 * c-pragma.c (handle_pragma_diagnostic): Use
7651 control_warning_option.
7652
a4d8c676
JM
76532010-11-12 Joseph Myers <joseph@codesourcery.com>
7654
7655 * c-common.c (parse_optimize_options): Update call to
7656 decode_options.
7657 * c-common.h (c_common_handle_option): Update prototype.
7658 * c-opts.c (c_common_handle_option): Take location_t parameter and
7659 pass it to other functions.
7660
f954bd2c
JM
76612010-11-11 Joseph Myers <joseph@codesourcery.com>
7662
7663 * c-opts.c (warning_as_error_callback): Remove.
7664 (c_common_initialize_diagnostics): Don't call
7665 register_warning_as_error_callback.
7666 (c_common_handle_option): Handle -Werror=normalized= here.
7667
d8a07487
JM
76682010-11-10 Joseph Myers <joseph@codesourcery.com>
7669
7670 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
7671 in diagnostic.
7672 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
7673 letter.
7674 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
7675 Remove trailing '.' from diagnostics.
7676 * c.opt (Wwrite-strings_: Avoid '`' in help text.
7677
d5478783
JM
76782010-11-10 Joseph Myers <joseph@codesourcery.com>
7679
7680 * c-common.c (parse_optimize_options): Pass global_dc to
7681 decode_options.
7682 * c-opts.c (c_common_handle_option): Pass &global_options to
7683 set_Wstrict_aliasing.
7684 * c.opt (v): Don't mark Common or document here.
7685
91ebb981
IS
76862010-11-06 Iain Sandoe <iains@gcc.gnu.org>
7687
7688 PR target/44981
7689 * c-format.c (format_type): New type gcc_objc_string_format_type.
7690 (valid_stringptr_type_p): New.
7691 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 7692 (check_format_string): Pass expected type, use
91ebb981
IS
7693 valid_stringptr_type_p (), check that the format string types are
7694 consistent with the format specification.
7695 (decode_format_attr): Warn if NSString is used outside objective-c.
7696 (format_types_orig): Add NSString.
7697 (format_name): New.
7698 (format_flags): New.
7699 (check_format_arg): Handle format strings requiring an external parser.
7700 first_target_format_type: New variable.
7701 (handle_format_attribute): Set up first_target_format_type, pass the
7702 expected format arg string type to check_format_string().
7703 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
7704 * stub-objc.c (objc_string_ref_type_p): New.
7705 (objc_check_format_arg): New.
7706
bede2adc
NP
77072010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
7708
9faeb493 7709 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
7710 * c-common.h (objc_build_class_component_ref): New.
7711 * stub-objc.c (objc_build_class_component_ref): New.
7712
9a179d01
NP
77132010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7714
7715 * c.opt (Wproperty-assign-default): New option.
7716
22d8d616
NP
77172010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7718
7719 Implemented -fobjc-std=objc1 flag.
7720 * c.opt (fobjc-std=objc1): New option.
7721
2debdb4f
NP
77222010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
7723
7724 Implemented format and noreturn attributes for Objective-C methods.
7725 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
7726 attribute for Objective-C methods.
7727
ec52b111
JM
77282010-10-31 Jason Merrill <jason@redhat.com>
7729
7730 * c-common.c (conversion_warning, warn_for_collisions_1): Use
7731 EXPR_LOC_OR_HERE.
7732
46a88c12
NP
77332010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
7734
7735 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
7736 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
7737 (objc_add_property_declaration): Removed arguments for copies and
7738 ivar.
7739 (objc_build_getter_call): Renamed to
7740 objc_maybe_build_component_ref.
7741 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7742 (objc_is_property_ref): New.
7743 * c-common.c (c_common_reswords): Removed copies and ivar.
7744 * stub-objc.c (objc_add_property_declaration): Removed arguments
7745 for copies and ivar.
7746 (objc_build_getter_call): Renamed to
7747 objc_maybe_build_component_ref.
7748 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7749 (objc_is_property_ref): New.
9faeb493 7750
1e4bf85b
AC
77512010-10-29 Arnaud Charlet <charlet@adacore.com>
7752 Matthew Gingell <gingell@adacore.com>
7753
7754 * c-ada-spec.c (separate_class_package): New function.
7755 (pp_ada_tree_identifier): Prefix references to C++ classes with the
7756 name of their enclosing package.
7757 (print_ada_declaration): Use separate_class_package.
7758
81f0bab2
JM
77592010-10-27 Jason Merrill <jason@redhat.com>
7760
2b08f2c5
JM
7761 * c-common.c (c_common_reswords): Add __is_literal_type.
7762 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
7763
81f0bab2
JM
7764 * c-common.c (check_case_value): Remove special C++ code.
7765
200290f2
NP
77662010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7767
7768 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
7769 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
7770 and RID_LAST_PATTR.
7771 (objc_add_property_declaration): Added additional arguments.
7772 (objc_property_attribute_kind): Removed.
7773 (objc_set_property_attr): Removed.
7774 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
7775 copy and nonatomic.
7776 * stub-objc.c (objc_add_property_declaration): Added additional
7777 arguments.
7778 (objc_set_property_attr): Removed.
9faeb493 7779
f614132b
NP
77802010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7781
7782 * c-common.h (objc_add_property_variable): Renamed to
7783 objc_add_property_declaration. Added location argument.
7784 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 7785
b8a18805
NP
77862010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
7787
7788 * c-common.h (objc_maybe_printable_name): New.
7789 * stub-objc.c (objc_maybe_printable_name): New.
7790
3f8257db
JJ
77912010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7792 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
7793
7794 * c-common.h (c_common_mark_addressable_vec): Declare.
7795 * c-common.c (c_common_mark_addressable_vec): New function.
7796
249a82c4
NP
77972010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7798
7799 * c-common.h (objc_set_method_type): Removed.
7800 (objc_add_method_declaration): Added boolean argument.
7801 (objc_start_method_definition): Same change.
7802 (objc_build_method_signature): Same change.
7803 * stub-objc.c (objc_set_method_type): Removed.
7804 (objc_add_method_declaration): Added boolean argument.
7805 (objc_start_method_definition): Same change.
7806 (objc_build_method_signature): Same change.
7807
977e30bc
NP
78082010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7809
7810 * c-common.h (finish_file): Removed.
7811 (objc_write_global_declarations): New.
7812 * c-opts.c (c_common_parse_file): Do not call finish_file.
7813 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 7814
da57d1b9
NP
78152010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7816
7817 Implemented parsing @synthesize and @dynamic for
7818 Objective-C/Objective-C++.
7819 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
7820 (objc_add_synthesize_declaration): New.
7821 (objc_add_dynamic_declaration): New.
7822 * c-common.c (c_common_reswords): Add synthesize and dynamic.
7823 * stub-objc.c (objc_add_synthesize_declaration): New.
7824 (objc_add_dynamic_declaration): New.
9faeb493 7825
0069111f
MM
78262010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
7827
7828 PR target/46041
7829 * c-cppbuiltin.c (mode_has_fma): Move function here from
7830 builtins.c. Don't use the fma optab, instead just use the
7831 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
7832 using -save-temps.
7833
e426b47b
NP
78342010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7835
7836 Merge from 'apple/trunk' branch on FSF servers.
0069111f 7837
3f8257db 7838 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 7839
9faeb493 7840 Radar 4330422
e426b47b
NP
7841 * c-common.h (objc_non_volatilized_type): New declaration
7842 * stub-objc.c (objc_non_volatilized_type): New stub.
7843
90fbfdc3
NP
78442010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
7845
e426b47b 7846 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 7847
3f8257db 7848 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 7849
9faeb493 7850 Radar 4133425
90fbfdc3 7851 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 7852 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 7853
c37d8c30
IS
78542010-10-17 Iain Sandoe <iains@gcc.gnu.org>
7855
7856 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
7857 * c-common.h (enum rid): Add RID_AT_PACKAGE.
7858 (objc_ivar_visibility_kind): New enum.
7859 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 7860 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
7861 visibility enum.
7862
1b1562a5
MM
78632010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
7864
7865 * c-cppbuiltin.c (builtin_define_float_constants): Emit
7866 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
7867 has the appropriate fma builtins.
7868 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
7869
668ea4b1
IS
78702010-10-14 Iain Sandoe <iains@gcc.gnu.org>
7871
1b1562a5 7872 merge from FSF apple 'trunk' branch.
3f8257db 7873 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 7874
668ea4b1
IS
7875 Radars 4436866, 4505126, 4506903, 4517826
7876 * c-common.c (c_common_resword): Define @property and its attributes.
7877 * c-common.h: Define property attribute enum entries.
7878 (OBJC_IS_PATTR_KEYWORD): New.
7879 (objc_property_attribute_kind): New enum.
7880 Declare objc_set_property_attr (), objc_add_property_variable (),
7881 objc_build_getter_call () and objc_build_setter_call ().
7882 * stub-objc.c (objc_set_property_attr): New stub.
7883 (objc_add_property_variable): Likewise.
7884 (objc_build_getter_call): Likewise.
7885 (objc_build_setter_call) Likewise.
1b1562a5 7886
a1178b30
IS
78872010-10-13 Iain Sandoe <iains@gcc.gnu.org>
7888
1b1562a5 7889 merge from FSF apple 'trunk' branch.
3f8257db 7890 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
7891
7892 Radar 3803157 (method attributes)
7893 * c-common.c (handle_deprecated_attribute): Recognize
7894 objc methods as valid declarations.
7895 * c-common.h: Declare objc_method_decl ().
1b1562a5 7896 * stub-objc.c (objc_method_decl): New stub.
a1178b30 7897
a75bfaa6
JM
78982010-10-08 Joseph Myers <joseph@codesourcery.com>
7899
7900 * c-common.c (parse_optimize_options): Call
7901 decode_cmdline_options_to_array_default_mask before
7902 decode_options. Update arguments to decode_options.
7903 * c-common.h (c_common_init_options_struct): Declare.
7904 * c-opts.c (c_common_init_options_struct): New. Split out from
7905 c_common_init_options.
7906
f05b9d93
NP
79072010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
7908
7909 Implemented fast enumeration for Objective-C.
7910 * c-common.h (objc_finish_foreach_loop): New.
7911 * stub-objc.c (objc_finish_foreach_loop): New.
7912
1ebe4b4f
JM
79132010-10-05 Joseph Myers <joseph@codesourcery.com>
7914
7915 * c-common.h (struct diagnostic_context): Don't declare here.
7916 (c_common_initialize_diagnostics): Declare using
7917 diagnostic_context typedef.
7918 * c-opts.c (c_common_handle_option): Pass global_dc to
7919 handle_generated_option.
7920
d4d24ba4
JM
79212010-10-04 Joseph Myers <joseph@codesourcery.com>
7922
7923 * c-opts.c (c_common_handle_option): Pass &global_options_set to
7924 handle_generated_option.
7925
478a1c5b
ILT
79262010-10-03 Ian Lance Taylor <iant@google.com>
7927
7928 * c.opt (-fplan9-extensions): New option.
7929
82a1c2fe
FXC
79302010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7931
7932 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
7933 Remove.
7934 (c_cpp_builtins): Call functions from cppbuiltin.c instead
7935 of duplicating code.
7936
92902b1b
IS
79372010-09-30 Iain Sandoe <iains@gcc.gnu.org>
7938
7939 * c-common.c: Add two new entries for @optional
7940 and @required keywords.
7941
7942 merge from FSF 'apple/trunk' branch.
3f8257db 7943 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
7944
7945 Radar 4386773
7946 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
7947 objective-c keywords.
7948 (objc_set_method_opt): New declaration.
7949 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 7950
46625112
JM
79512010-09-30 Joseph Myers <joseph@codesourcery.com>
7952
7953 * c-common.c (handle_optimize_attribute): Pass &global_options to
7954 cl_optimization_save and cl_optimization_restore.
7955 * c-opts.c (c_common_handle_option): Pass &global_options to
7956 handle_generated_option.
7957 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
7958 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
7959 &global_options to cl_optimization_restore.
7960
49b91f05
NP
79612010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
7962
7963 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
7964 Objective-C/Objective-C++ keywords.
7965
13ed556f 79662010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 7967
9faeb493
UB
7968 Merge from 'apple/trunk' branch on FSF servers.
7969
3f8257db 7970 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
7971
7972 Radar 4281748
7973 * c-common.h (objc_check_global_decl): New declaration.
7974 * stub-objc.c (objc_check_global_decl): New stub.
7975
f0036cca
JM
79762010-09-29 Joseph Myers <joseph@codesourcery.com>
7977
7978 * c.opt: Don't use VarExists.
7979
e3339d0f
JM
79802010-09-29 Joseph Myers <joseph@codesourcery.com>
7981
7982 * c-common.c (c_cpp_error): Update names of diagnostic_context
7983 members.
7984 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
7985 cl_optimization members.
7986 * c-opts.c (warning_as_error_callback, c_common_handle_option,
7987 sanitize_cpp_opts, finish_options): Update names of cpp_options
7988 members.
7989
1973201f
NP
79902010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
7991
7992 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
7993 (objc_is_reserved_word): Removed.
7994 * c-common.c: Updated comments.
7995 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
7996 objc_is_reserved_word.
7997 * stub-objc.c (objc_is_reserved_word): Removed.
7998
f7e71da5
IS
79992010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8000
9faeb493 8001 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
8002 include attributes.
8003 (objc_start_method_definition): Likewise.
8004 (objc_build_keyword_decl): Likewise.
8005 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8006 (objc_start_method_definition): Likewise.
8007 (objc_build_keyword_decl): Likewise.
8008
c165dca7
IS
80092010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8010
8011 * c-common.h (objc_start_class_interface): Adjust prototype.
8012 (objc_start_category_interface): Likewise.
8013 (objc_start_protocol): Likewise.
8014 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8015 (objc_start_class_interface): Likewise.
8016 (objc_start_category_interface): Likewise.
8017
7458026b
ILT
80182010-09-27 Ian Lance Taylor <iant@google.com>
8019
8020 * c-common.c (c_common_attribute_table): Add no_split_stack.
8021 (handle_no_split_stack_attribute): New static function.
8022
b581b85b
NP
80232010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8024
9faeb493 8025 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 8026
3f8257db 8027 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 8028
9faeb493 8029 Radar 4229905
b581b85b
NP
8030 * c-common.h (objc_have_common_type): New declaration.
8031 * stub-objc.c (objc_have_common_type): New stub.
8032
8033 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8034
8035 Radar 4154928
8036 * c-common.h (objc_common_type): New prototype.
9faeb493 8037 * stub-objc.c (objc_common_type): New stub.
b581b85b 8038
46a4da10
JH
80392010-09-24 Jan Hubicka <jh@suse.cz>
8040
8041 * c-common.c (handle_leaf_attribute): New function.
8042 (struct attribute_spec c_common_att): Add leaf.
8043
e200444e
JM
80442010-09-22 Joseph Myers <joseph@codesourcery.com>
8045
8046 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8047 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8048 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8049 -include-barrier, -include-directory, -include-directory=,
8050 -include-directory-after, -include-directory-after=,
8051 -include-prefix, -include-prefix=, -include-with-prefix,
8052 -include-with-prefix=, -include-with-prefix-after,
8053 -include-with-prefix-after=, -include-with-prefix-before,
8054 -include-with-prefix-before=, -no-integrated-cpp,
8055 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8056 -output=, -pedantic, -pedantic-errors, -preprocess,
8057 -print-missing-file-dependencies, -trace-includes, -traditional,
8058 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8059 -user-dependencies, -verbose, -write-dependencies,
8060 -write-user-dependencies, no-integrated-cpp, traditional): New.
8061
29a80ea6
NP
80622010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8063
8064 PR objc/23710
ac1fc2fc
NP
8065 * c-common.h (objc_start_method_definition): Return bool instead
8066 of void.
8067 * stub-objc.c (objc_start_method_definition): Return bool instead
8068 of void.
8069
80702010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8071
8072 PR objc/25965
8073 * c-common.h (objc_get_interface_ivars): New declaration.
8074 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 8075
de621752
ILT
80762010-09-15 Ian Lance Taylor <iant@google.com>
8077
8078 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 8079 messages. Remove period at end of warning message.
de621752 8080
ba885ec5
NS
80812010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8082
8083 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
8084 (handle_alias_attribute): ... here.
8085 (handle_ifunc_attribute): New.
8086
c5ee1358
MM
80872010-09-06 Mark Mitchell <mark@codesourcery.com>
8088
8089 * c-common.h (do_warn_double_promotion): Declare.
8090 * c-common.c (do_warn_double_promotion): Define.
8091
0a0b3574
MM
80922010-09-05 Mark Mitchell <mark@codesourcery.com>
8093
8094 * c.opt (Wdouble-promotion): New.
8095
d1779886
JM
80962010-09-02 Joseph Myers <joseph@codesourcery.com>
8097
8098 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
8099 fvtable-thunks, fxref): Mark no longer supported in help text.
8100
2d2bd949
JM
81012010-09-02 Joseph Myers <joseph@codesourcery.com>
8102
8103 * c.opt (Wimport, fall-virtual, falt-external-templates,
8104 fdefault-inline, fenum-int-equiv, fexternal-templates,
8105 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
8106 fname-mangling-version-, fnew-abi, fnonnull-objects,
8107 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
8108 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
8109 applicable.
8110 (fhandle-exceptions): Mark with Alias and Warn.
8111 * c-opts.c (c_common_handle_option): Don't handle options marked
8112 as ignored.
8113
5de8299c
JM
81142010-09-02 Joseph Myers <joseph@codesourcery.com>
8115
8116 * c.opt (Wcomments, Werror-implicit-function-declaration,
8117 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
8118 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
8119 aliases.
8120 * c-common.c (option_codes): Use OPT_Wcomment instead of
8121 OPT_Wcomments.
8122 * c-opts.c (warning_as_error_callback, c_common_handle_option):
8123 Don't handle options marked as aliases.
8124
0ceb0201
RG
81252010-08-25 Richard Guenther <rguenther@suse.de>
8126
8127 * c-common.c (c_common_get_alias_set): Remove special
8128 handling for pointers.
8129
ac47786e
NF
81302010-08-20 Nathan Froyd <froydnj@codesourcery.com>
8131
8132 * c-common.c: Use FOR_EACH_VEC_ELT.
8133 * c-gimplify.c: Likewise.
8134 * c-pragma.c: Likewise.
8135
c878765b
JM
81362010-08-16 Joseph Myers <joseph@codesourcery.com>
8137
8138 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
8139 RejectDriver.
8140 (MMDX): Change back to MMD. Mark NoDriverArg instead of
8141 RejectDriver.
8142 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
8143 instead of OPT_MDX and OPT_MMDX.
8144
603349bf
JM
81452010-08-16 Joseph Myers <joseph@codesourcery.com>
8146
8147 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
8148
644fa7ac
JM
81492010-08-12 Joseph Myers <joseph@codesourcery.com>
8150
8151 * c.opt (MD, MMD): Change to MDX and MMDX.
8152 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
8153
481e1176
JM
81542010-08-11 Joseph Myers <joseph@codesourcery.com>
8155
8156 * c-opts.c (c_common_handle_option): Call handle_generated_option
8157 instead of handle_option.
8158
ac8dc9f7
NF
81592010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8160
8161 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
8162 (maybe_apply_renaming_pragma): Delete unneeded declarations.
8163
4f8c876d
NF
81642010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8165
8166 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
8167 (pending_redefine_extname): Change type to a VEC.
8168 (add_to_renaming_pragma_list): Update for new type of
8169 pending_redefine_extname.
ac8dc9f7 8170 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 8171
3b0c690e
AC
81722010-08-04 Arnaud Charlet <charlet@adacore.com>
8173
8174 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
8175 visited.
8176 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
8177 decide whether a type has already been declared/seen.
8178 Do not go to the original type.
8179 (dump_nested_types): New parameter forward.
8180 Generate forward declaration if needed and mark type as visited.
8181 (print_ada_declaration): Call dump_nested_types if not already done.
8182 Mark types as visited.
8183
1890bccc
JM
81842010-08-03 Joseph Myers <joseph@codesourcery.com>
8185
8186 * c.opt (-print-pch-checksum): Remove option.
8187 * c-opts.c (c_common_handle_option): Don't handle
8188 OPT_print_pch_checksum.
8189
5f20c657
JM
81902010-07-27 Joseph Myers <joseph@codesourcery.com>
8191
8192 * c-common.h (c_common_handle_option): Update prototype and return
8193 value type.
8194 * c-opts.c (c_common_handle_option): Update prototype and return
8195 value type. Update calls to handle_option and
8196 enable_warning_as_error.
8197
f551f80c
JJ
81982010-07-27 Jakub Jelinek <jakub@redhat.com>
8199
8200 PR c/45079
8201 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
8202
61ff2bdc
JM
82032010-07-27 Joseph Myers <joseph@codesourcery.com>
8204
8205 * c-common.h (c_common_missing_argument): Remove.
8206 * c-opts.c (c_common_missing_argument): Remove.
8207 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
8208 idirafter, imacros, include, isysroot, isystem, iquote): Add
8209 MissingArgError.
8210 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
8211
7a9bf9a4
JM
82122010-07-27 Joseph Myers <joseph@codesourcery.com>
8213
8214 * c-common.h (c_common_option_lang_mask,
8215 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
8216 New.
8217 (c_common_init_options): Update prototype.
8218 * c-opts.c (c_common_option_lang_mask): New.
8219 (c_common_initialize_diagnostics): Split out of
8220 c_common_init_options.
8221 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
8222 New.
8223 (c_common_init_options): Update prototype. Use decoded options in
8224 search for -lang-asm.
8225
910ad8de
NF
82262010-07-15 Nathan Froyd <froydnj@codesourcery.com>
8227
8228 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
8229 * c-format.c: Likewise.
8230
718f9c0f
MLI
82312010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
8232
8233 * c-common.h: Include diagnostic-core.h. Error if already
8234 included.
8235 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
8236
4d451982
MLI
82372010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8238
adfac8df 8239 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
8240 Do not include expr.h
8241 (vector_mode_valid_p): Move here.
8242
119fe915
SB
82432010-06-21 DJ Delorie <dj@redhat.com>
8244
8245 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
8246 allow these pragmas anywhere.
8247
82482010-06-14 Jakub Jelinek <jakub@redhat.com>
8249
8250 PR bootstrap/44509
8251 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
8252 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
8253 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
8254 ggc_strdup instead of xstrdup.
8255
82562010-06-10 Jakub Jelinek <jakub@redhat.com>
8257
8258 * c-cppbuiltin.c: Include cpp-id-data.h.
8259 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
8260 (lazy_hex_fp_value): New function.
8261 (builtin_define_with_hex_fp_value): Provide definitions lazily.
8262
6662d794
MLI
82632010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8264
8265 * c-gimplify.c: Do not include tree-flow.h
8266
38f8b050
JR
82672010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
8268
8269 PR other/44034
8270 * c-common.c: Rename targetm member:
8271 targetm.enum_va_list -> targetm.enum_va_list_p
8272
9589f23e
AS
82732010-06-28 Anatoly Sokolov <aesok@post.ru>
8274
8275 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
8276
3b06d379
SB
82772010-06-28 Steven Bosscher <steven@gcc.gnu.org>
8278
8279 * c-cppbuiltin.c: Do not include except.h.
8280
d166d4c3
AK
82812010-06-24 Andi Kleen <ak@linux.intel.com>
8282
9faeb493
UB
8283 * c-common.c (warn_for_omitted_condop): New.
8284 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 8285
70cb8be6
JM
82862010-06-21 Joseph Myers <joseph@codesourcery.com>
8287
8288 * c.opt (lang-objc): Remove.
8289 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
8290
a4c97feb
JR
82912010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
8292
8293 * c-opts.c: Include "tm_p.h".
8294
6e2f1956
JM
82952010-06-20 Joseph Myers <joseph@codesourcery.com>
8296
8297 * c-common.c (parse_optimize_options): Update call to
8298 decode_options.
8299
bc87224e
NF
83002010-06-18 Nathan Froyd <froydnj@codesourcery.com>
8301
8302 * c-common.c (record_types_used_by_current_var_decl): Adjust for
8303 new type of types_used_by_cur_var_decl.
8304
b49cf425
JR
83052010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
8306
8307 PR bootstrap/44512
8308 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
8309 for C++ standard compliance.
8310
59f9c2ed
JM
83112010-06-16 Jason Merrill <jason@redhat.com>
8312
8313 * c.opt: Add -Wnoexcept.
8314
33766b66
RG
83152010-06-16 Richard Guenther <rguenther@suse.de>
8316
8317 PR c/44555
8318 * c-common.c (c_common_truthvalue_conversion): Remove
8319 premature and wrong optimization concering ADDR_EXPRs.
8320
eff7e30c
AC
83212010-06-15 Arnaud Charlet <charlet@adacore.com>
8322
8323 * c-ada-spec.c (dump_sloc): Remove column info.
8324 (is_simple_enum): New function.
8325 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
8326 enum types when relevant.
8327
6312e84d
MLI
83282010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8329
9faeb493 8330 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
8331 location.
8332
1cb42611
JM
83332010-06-10 Joseph Myers <joseph@codesourcery.com>
8334
8335 * c-opts.c (c_common_handle_option): Don't handle
8336 OPT_fshow_column.
8337
a9429e29
LB
83382010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
8339
8340 * c-pragma.c (push_alignment): Use typed GC allocation.
8341 (handle_pragma_push_options): Likewise.
8342
8343 * c-common.c (parse_optimize_options): Likewise.
8344
8345 * c-common.h (struct sorted_fields_type): Add variable_size GTY
8346 option.
8347
5498f011
JM
83482010-06-07 Joseph Myers <joseph@codesourcery.com>
8349
8350 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
8351 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8352 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8353 flag_signed_bitfields, warn_strict_null_sentinel,
8354 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
8355 flag_gen_declaration, flag_no_gnu_keywords,
8356 flag_implement_inlines, flag_implicit_templates,
8357 flag_implicit_inline_templates, flag_optional_diags,
8358 flag_elide_constructors, flag_default_inline, flag_rtti,
8359 flag_conserve_space, flag_access_control, flag_check_new,
8360 flag_new_for_scope, flag_weak, flag_working_directory,
8361 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
8362 flag_enforce_eh_specs, flag_threadsafe_statics,
8363 flag_pretty_templates): Remove.
8364 * c-common.h (flag_preprocess_only, flag_nil_receivers,
8365 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
8366 flag_replace_objc_classes, flag_undef, flag_no_builtin,
8367 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8368 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8369 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
8370 flag_no_gnu_keywords, flag_implement_inlines,
8371 flag_implicit_templates, flag_implicit_inline_templates,
8372 flag_optional_diags, flag_elide_constructors, flag_default_inline,
8373 flag_rtti, flag_conserve_space, flag_access_control,
8374 flag_check_new, flag_new_for_scope, flag_weak,
8375 flag_working_directory, flag_use_cxa_atexit,
8376 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
8377 flag_threadsafe_statics, flag_pretty_templates,
8378 warn_strict_null_sentinel): Remove.
8379 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
8380 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
8381 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
8382 fimplicit-inline-templates, fimplicit-templates,
8383 flax-vector-conversions, fms-extensions, fnil-receivers,
8384 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
8385 frtti, fshort-double, fshort-enums, fshort-wchar,
8386 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
8387 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
8388 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
8389 gen-decls, undef): Use Var.
8390 (fdefault-inline, foptional-diags): Document as doing nothing.
8391 * c-opts.c (c_common_handle_option): Remove cases for options now
8392 using Var. Mark ignored options as such.
8393
39dabefd
SB
83942010-06-05 Steven Bosscher <steven@gcc.gnu.org>
8395
9faeb493 8396 * c-common.c: Moved to here from parent directory.
39dabefd
SB
8397 * c-common.def: Likewise.
8398 * c-common.h: Likewise.
8399 * c-cppbuiltin.c: Likewise.
8400 * c-dump.c: Likewise.
8401 * c-format.c: Likewise.
8402 * c-format.h : Likewise.
8403 * c-gimplify.c: Likewise.
8404 * c-lex.c: Likewise.
8405 * c-omp.c: Likewise.
8406 * c.opt: Likewise.
8407 * c-opts.c: Likewise.
8408 * c-pch.c: Likewise.
8409 * c-ppoutput.c: Likewise.
8410 * c-pragma.c: Likewise.
8411 * c-pragma.h: Likewise.
8412 * c-pretty-print.c: Likewise.
8413 * c-pretty-print.h: Likewise.
8414 * c-semantics.c: Likewise.
8415 * stub-objc.c: Likewise.
8416
8417 * c-common.c: Include gt-c-family-c-common.h.
8418 * c-pragma.c: Include gt-c-family-c-pragma.h.
8419\f
cbe34bb5 8420Copyright (C) 2010-2017 Free Software Foundation, Inc.
39dabefd
SB
8421
8422Copying and distribution of this file, with or without modification,
8423are permitted in any medium without royalty provided the copyright
8424notice and this notice are preserved.
This page took 2.951223 seconds and 5 git commands to generate.