]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
re PR bootstrap/82856 (--enable-maintainter-mode broken by incompatiblity of gcc...
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
3ca0dc60
JM
12017-11-15 Joseph Myers <joseph@codesourcery.com>
2
3 PR c/81156
4 * c-common.c (c_common_reswords): Add __builtin_tgmath.
5 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
6
025d57f0
MS
72017-11-10 Martin Sebor <msebor@redhat.com>
8
9 PR c/81117
10 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
11 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
12 * c.opt (-Wstringop-truncation): New option.
13
1b6fa695
ML
142017-11-06 Martin Liska <mliska@suse.cz>
15
16 PR middle-end/82404
17 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
18 FE.
19 * c.opt: Set default value of warn_return_type.
20
64a5912c
DM
212017-10-31 David Malcolm <dmalcolm@redhat.com>
22
23 * c-common.c (binary_op_error): Update for renaming of
24 error_at_rich_loc.
25 (c_parse_error): Likewise.
26 * c-warn.c (warn_logical_not_parentheses): Likewise for
27 renaming of inform_at_rich_loc.
28 (warn_for_restrict): Likewise for renaming of
29 warning_at_rich_loc_n.
30
c76dc9c3
JM
312017-10-30 Joseph Myers <joseph@codesourcery.com>
32
33 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
34 * c-opts.c (set_std_c17): New function.
35 (c_common_init_options): Use gnu17 as default C version.
36 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
37
ee5fd23a
MM
382017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
39
40 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
41 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
42 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
43 __FP_FAST_FMA<N>X.
44
d1047465
MP
452017-10-23 Marek Polacek <polacek@redhat.com>
46
47 PR c/82681
48 * c-warn.c (warnings_for_convert_and_check): Fix typos.
49
9e878cf1
EB
502017-10-19 Eric Botcazou <ebotcazou@adacore.com>
51
52 * c-common.c (check_builtin_function_arguments): Also check arguments
53 of __builtin_alloca_with_align_and_max.
54
89b6abbb
DM
552017-10-17 David Malcolm <dmalcolm@redhat.com>
56
57 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
58 rather than NULL to format_warning_va.
59 (check_format_types): Likewise when calling format_type_warning.
60 Remove code to extract source_ranges and source_range * in favor
61 of just a location_t.
62 (format_type_warning): Convert source_range * param to a
63 location_t.
64
39382c09
JJ
652017-10-13 Jakub Jelinek <jakub@redhat.com>
66
67 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
68 [LR]SHIFT_EXPR.
69
62e1c678
DM
702017-10-12 David Malcolm <dmalcolm@redhat.com>
71
72 * c-common.c (enum missing_token_insertion_kind): New enum.
73 (get_missing_token_insertion_kind): New function.
74 (maybe_suggest_missing_token_insertion): New function.
75 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
76
b90c9338
NS
772017-10-11 Nathan Sidwell <nathan@acm.org>
78
79 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
80 (c_common_handle_option): Update incpath_kind names.
81
3a266bcd
ML
822017-10-11 Martin Liska <mliska@suse.cz>
83
84 PR sanitizer/82490
85 * c-attribs.c (handle_no_sanitize_attribute): Report directly
86 Wattributes warning.
87
8e6cdc90
RS
882017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
89
90 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
91 operating on trees as wide_ints.
92 * c-common.c (pointer_int_sum): Likewise.
93 * c-pretty-print.c (pp_c_integer_constant): Likewise.
94 * c-warn.c (match_case_to_enum_1): Likewise.
95 (c_do_switch_warnings): Likewise.
96 (maybe_warn_shift_overflow): Likewise.
97
802b38c9
JJ
982017-10-10 Jakub Jelinek <jakub@redhat.com>
99
100 PR c/82437
101 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
102 instead of wide_int::from.
103
4e34b338
JJ
1042017-10-06 Jakub Jelinek <jakub@redhat.com>
105
106 PR c/82437
107 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
108 using to_widest use wide_int with the larger of the two precisions.
109
4bc4b2b4
BE
1102017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
111
112 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
113 functions.
114
a1488398
RS
1152017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
116
117 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
118 when combining the original unconverted comparison operands.
119
01c9fb68
JJ
1202017-09-29 Jakub Jelinek <jakub@redhat.com>
121
122 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
123 attribute.
124
6e3e8419
EB
1252017-09-29 Eric Botcazou <ebotcazou@adacore.com>
126
127 * c-ada-spec.c (to_ada_name): Add index parameter.
128 (pp_ada_tree_identifier): Likewise.
129 (dump_ada_macros): Adjust call to to_ada_name.
130 (struct overloaded_name_hash): New type.
131 (struct overloaded_name_hasher): Likewise.
132 (overloaded_names): New hash table.
133 (compute_overloading_index): New function.
134 (dump_ada_decl_name): Call it and pass the result to
135 pp_ada_tree_identifier.
136 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
137 (dump_ada_function_declaration): Likewise.
138 (dump_generic_ada_node): Likewise.
139 (print_constructor): Likewise.
140 (print_destructor): Likewise.
141 (dump_ada_specs): Delete overloaded_names table.
142
79310774
EB
1432017-09-29 Eric Botcazou <ebotcazou@adacore.com>
144
145 * c-ada-spec.c (max_ada_macros): Move around.
146 (store_ada_macro_index): Likewise.
147 (source_file): Rename into...
148 (macro_source_file): ...this.
149 (count_ada_macro): Move around.
150 (store_ada_macro): Likewise.
151 (compare_macro): Likewise.
152 (print_ada_macros): Merge in...
153 (dump_ada_macros): ...this.
154 (source_file_base): Rename into...
155 (current_source_file): ...this.
156 (print_comment): Move around.
157 (dump_ada_nodes): Call dump_ada_declaration directly.
158 (struct with): Change type of limited field to bool.
159 (append_withs): Change type of limited_access parameter to bool.
160 (pp_ada_tree_identifie): Likewise.
161 (dump_ada_decl_nam): Likewise.
162 (dump_generic_ada_node): Likewise. Do not print the return type.
163 (to_ada_name): Change type of space_found parameter to bool.
164 (dump_ada_function_declaration): Return void and change type of
165 parameters to bool. Also print the return type for a function.
166 (print_ada_methods): Rename into...
167 (dump_ada_methods): ...this.
168 (print_ada_declaration): Rename into ...
169 (dump_ada_declaration): ...this. Do not print the return type.
170 (print_ada_struct_decl): Rename into...
171 (dump_ada_struct_decl): ...this.
172
7d386d45
JJ
1732017-09-29 Jakub Jelinek <jakub@redhat.com>
174
175 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
176 rather than DECL_INITIAL.
177 (common_handle_aligned_attribute): Likewise.
178
9ed32e27
AO
1792017-09-20 Alexandre Oliva <aoliva@redhat.com>
180
181 * c.opt (gen-decls): Add RejectNegative.
182
026a79f7
AS
1832017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
184 Jakub Jelinek <jakub@redhat.com>
185
186 Add support for -std=c++2a.
187 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
188 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
189 * c-opts.c (set_std_cxx2a): New.
190 (c_common_handle_option): Set options when -std=c++2a is enabled.
191 (c_common_post_options): Adjust comments.
192 (set_std_cxx14, set_std_cxx17): Likewise.
193
4a8ca690
EB
1942017-09-15 Eric Botcazou <ebotcazou@adacore.com>
195
196 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
197 message for non-uniform endianness and issue a warning in C++.
198
7b936140
JJ
1992017-09-15 Jakub Jelinek <jakub@redhat.com>
200
201 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
202 (Wc++17-compat): Change from undocumented alias to option.
203 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
204 change C++1z to C++17 in description.
205 (std=c++1z, std=gnu++1z): Change from option to undocumented
206 deprecated alias.
207 (std=c++17, std=gnu++17): Change from undocumented alias to option.
208 Adjust description.
209 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
210 * c-opts.c (set_std_cxx1z): Rename to ...
211 (set_std_cxx17): ... this.
212 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
213 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
214 caller.
215 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
216 comments.
217
12263f13
L
2182017-09-12 H.J. Lu <hongjiu.lu@intel.com>
219
220 * c-attribs.c (common_handle_aligned_attribute): Don't warn
221 function alignment if warn_if_not_aligned_p is true.
222
6836632e
NS
2232017-09-12 Nathan Sidwell <nathan@acm.org>
224
225 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
226 resort_sorted_fields): Move to c/c-decl.c.
227 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
228 (struct sorted_fields_type): Move to c/c-lang.h.
229
019bf9ad
JW
2302017-09-09 Jonathan Wakely <jwakely@redhat.com>
231
232 PR c++/81852
233 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
234
bc7fe952
MP
2352017-09-04 Marek Polacek <polacek@redhat.com>
236
237 PR c/81783
238 * c-warn.c (warn_tautological_bitwise_comparison): New function.
239 (warn_tautological_cmp): Call it.
240
de7c2c6a
BK
2412017-09-01 Boris Kolpackov <boris@codesynthesis.com>
242
243 * c-opts.c (c_common_finish): Write dependency information even if
244 there are errors.
245
d2e05fcb
JJ
2462017-09-01 Jakub Jelinek <jakub@redhat.com>
247
248 PR c/81887
249 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
250 (omp_pragmas_simd): ... here.
251 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
252 create new clauses list containing just simd clause.
253
18e2a8b8
RS
2542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
255 Alan Hayward <alan.hayward@arm.com>
256 David Sherwood <david.sherwood@arm.com>
257
258 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
259 into scalar_mode_supported_p call.
260 (handle_mode_attribute): Update call to scalar_mode_supported_p.
261
16d22000
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-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
267 for the mode iterator.
268
b397965c
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-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
274 * c-common.c (c_build_vec_perm_expr): Likewise.
275
357b7604
RS
2762017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
277 Alan Hayward <alan.hayward@arm.com>
278 David Sherwood <david.sherwood@arm.com>
279
280 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
281
e05c94ba
RS
2822017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
283 Alan Hayward <alan.hayward@arm.com>
284 David Sherwood <david.sherwood@arm.com>
285
286 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
287 before calling targetm.addr_space.valid_pointer_mode.
288
5c20c4af
RS
2892017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
290 Alan Hayward <alan.hayward@arm.com>
291 David Sherwood <david.sherwood@arm.com>
292
293 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
294
c94843d2
RS
2952017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
296 Alan Hayward <alan.hayward@arm.com>
297 David Sherwood <david.sherwood@arm.com>
298
299 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
300 iterators.
301 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
302
4e10a5a7
RS
3032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
304 Alan Hayward <alan.hayward@arm.com>
305 David Sherwood <david.sherwood@arm.com>
306
307 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
308 case statements.
309
130fcab0
ML
3102017-08-29 Martin Liska <mliska@suse.cz>
311
312 PR other/39851
313 * c-common.c (parse_optimize_options): Add argument to function
314 call.
315 * c-pragma.c (handle_pragma_diagnostic): Likewise.
316
14e18d71
DM
3172017-08-24 David Malcolm <dmalcolm@redhat.com>
318
319 * c-lex.c (interpret_float): Use token location
320 when building an EXCESS_PRECISION_EXPR.
321
2f687306
DM
3222017-08-21 David Malcolm <dmalcolm@redhat.com>
323
324 * c-common.c (check_function_arguments): Add "arglogs" param; pass
325 it to check_function_format.
326 * c-common.h (check_function_arguments): Add vec<location_t> *
327 param.
328 (check_function_format): Likewise.
329 * c-format.c (struct format_check_context): Add field "arglocs".
330 (check_function_format): Add param "arglocs"; pass it to
331 check_format_info.
332 (check_format_info): Add param "arglocs"; use it to initialize
333 new field of format_ctx.
334 (check_format_arg): Pass format_ctx->arglocs to new param of
335 check_format_info_main.
336 (class argument_parser): New field "arglocs".
337 (argument_parser::argument_parser): Add "arglocs_" param and use
338 it to initialize new field.
339 (argument_parser::check_argument_type): Pass new arglocs field to
340 check_format_types.
341 (check_format_info_main): Add param "arglocs", and use it when
342 constructing arg_parser.
343 (check_format_types): Add param "arglocs"; use it if non-NULL when
344 !EXPR_HAS_LOCATION (cur_param) to get at location information.
345
00aa1fa2
L
3462017-08-18 H.J. Lu <hongjiu.lu@intel.com>
347
348 PR c/53037
349 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
350 (c_common_attribute_table): Add warn_if_not_aligned.
351 (handle_aligned_attribute): Renamed to ...
352 (common_handle_aligned_attribute): Remove argument, name, and add
353 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
354 (handle_aligned_attribute): New.
355 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
356
27be025d
MS
3572017-08-14 Martin Sebor <msebor@redhat.com>
358
359 PR c/81117
360 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
361 (handle_nonstring_attribute): New function.
362
da67acb9
MS
3632017-08-14 Martin Sebor <msebor@redhat.com>
364
365 PR c/81117
366 * c-format.h (T89_G): New macro.
367 * c-format.c (local_gcall_ptr_node): New variable.
368 (init_dynamic_diag_info): Initialize it.
369
a8b522b4
ML
3702017-08-11 Martin Liska <mliska@suse.cz>
371
372 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
373 TARGET_SUPPORTS_ALIASES.
374
32129a17
DM
3752017-08-10 David Malcolm <dmalcolm@redhat.com>
376
377 * c-common.c (c_parse_error): Add rich_location * param, using it
378 rather implicitly using input_location.
379 * c-common.h (c_parse_error): Add rich_location * param.
380
30af3a2b
MP
3812017-08-09 Marek Polacek <polacek@redhat.com>
382
383 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
384 (c_common_truthvalue_conversion): Likewise.
385 * c-omp.c (c_finish_omp_atomic): Likewise.
386 * c-common.h (build_binary_op): Update declaration.
387
314e6352
ML
3882017-08-08 Martin Liska <mliska@suse.cz>
389
390 * c-ada-spec.c: Include header files.
391 * c-ubsan.c: Likewise.
392 * c-warn.c: Likewise.
393
56b5041c
JJ
3942017-08-07 Jakub Jelinek <jakub@redhat.com>
395
396 PR c/69389
397 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
398
db440138
EB
3992017-08-07 Eric Botcazou <ebotcazou@adacore.com>
400
401 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
402 (print_ada_methods): Likewise.
403 (print_ada_declaration): Likewise.
404
577eec56
ML
4052017-08-07 Martin Liska <mliska@suse.cz>
406
407 * array-notation-common.c: Add new includes.
408 * c-format.c( handle_format_attribute): Canonicalize a format
409 function name.
410 * c-lex.c (c_common_has_attribute): Canonicalize name of an
411 attribute.
412 * c-pretty-print.c: Add new include.
413
b854df3c
EB
4142017-08-05 Eric Botcazou <ebotcazou@adacore.com>
415
416 * c-ada-spec.c (has_static_fields): Look only into variables.
417 (print_constructor): Add TYPE parameter and use it for the name.
418 (print_destructor): Likewise.
419 (print_ada_declaration): Adjust to new constructor/destructor names.
420 Adjust calls to print_constructor and print_destructor.
421 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
422 Look only into variables in the final loop.
423
9f2cb25e
EB
4242017-08-01 Eric Botcazou <ebotcazou@adacore.com>
425
426 * c-ada-spec.c (has_static_fields): Look only into fields.
427 (dump_generic_ada_node): Small tweak.
428 (dump_nested_types): Look only into fields.
429 (print_ada_declaration): Look only into methods. Small tweak.
430 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
431
f4bcd9eb
EB
4322017-08-01 Eric Botcazou <ebotcazou@adacore.com>
433
434 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
435 (dump_ada_function_declaration): Likewise.
436 (dump_generic_ada_node): Likewise.
437 (print_ada_declaration): Add support for const-qualified variables.
438
f34ebeb2
ML
4392017-07-31 Martin Liska <mliska@suse.cz>
440
441 PR sanitize/81530
442 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
443 Guard condition with flag_sanitize_p also with current_function_decl
444 non-null equality.
445 (ubsan_maybe_instrument_reference_or_call): Likewise.
446
218e5d04
UB
4472017-07-30 Uros Bizjak <ubizjak@gmail.com>
448
449 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
450
942047f2
EB
4512017-07-29 Eric Botcazou <ebotcazou@adacore.com>
452
453 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
454 for enumeral types.
455 (print_ada_declaration): Add missing guard for record types.
456
a40ff0ae
JJ
4572017-07-27 Jakub Jelinek <jakub@redhat.com>
458
459 PR c/45784
460 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
461 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
462 new COMPOUND_EXPRs around the rhs of the comparison.
463
06bd22f6
MP
4642017-07-27 Marek Polacek <polacek@redhat.com>
465
466 PR c/81417
467 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
468 the types.
469
036ea399
JJ
4702017-07-27 Jakub Jelinek <jakub@redhat.com>
471
472 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
473 (handle_noipa_attribute): New function.
474
417ca011
TD
4752017-07-07 Torsten Duwe <duwe@suse.de>
476
477 * c-attribs.c (c_common_attribute_table): Add entry for
478 "patchable_function_entry".
479
5aaa8fb4
NS
4802017-07-20 Nathan Sidwell <nathan@acm.org>
481
482 Remove TYPE_METHODS.
483 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
484 dump_ada_template, print_ada_methods,
485 print_ada_declaration): Member fns are on TYPE_FIELDS.
486
ff22eb12
NS
4872017-07-18 Nathan Sidwell <nathan@acm.org>
488
489 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
490
eea77d1f
DM
4912017-07-14 David Malcolm <dmalcolm@redhat.com>
492
493 * c-common.c (try_to_locate_new_include_insertion_point): New
494 function.
495 (per_file_includes_t): New typedef.
496 (added_includes_t): New typedef.
497 (added_includes): New variable.
498 (maybe_add_include_fixit): New function.
499 * c-common.h (maybe_add_include_fixit): New decl.
500
281ac396
MS
5012017-07-10 Martin Sebor <msebor@redhat.com>
502
503 PR other/81345
504 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
505
b6f43128
DM
5062017-07-06 David Malcolm <dmalcolm@redhat.com>
507
508 * c-common.c (selftest::c_family_tests): New.
509 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
510 (selftest::c_family_tests): New decl.
511
efbf55b0
MP
5122017-07-04 Marek Polacek <polacek@redhat.com>
513
514 PR c/81231
515 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
516 types.
517
6c86bd88
MP
5182017-07-04 Marek Polacek <polacek@redhat.com>
519
520 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
521
17a7218b
ML
5222017-06-28 Martin Liska <mliska@suse.cz>
523
524 PR ipa/81128
525 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
526 to a function declaration.
527
63010089
ML
5282017-06-28 Martin Liska <mliska@suse.cz>
529
530 PR driver/79659
531 * c.opt: Add IntegerRange to various options.
532
3e2becc4
MP
5332017-06-26 Marek Polacek <polacek@redhat.com>
534
535 PR c/80116
536 * c-common.h (warn_for_multistatement_macros): Declare.
537 * c-warn.c: Include "c-family/c-indentation.h".
538 (warn_for_multistatement_macros): New function.
539 * c.opt (Wmultistatement-macros): New option.
540 * c-indentation.c (guard_tinfo_to_string): No longer static.
541 Change the parameter type to "enum rid". Handle RID_SWITCH.
542 * c-indentation.h (guard_tinfo_to_string): Declare.
543
2db9b7cd
MG
5442017-06-23 Marc Glisse <marc.glisse@inria.fr>
545
546 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
547
c3684b7b
MS
5482017-06-15 Martin Sebor <msebor@redhat.com>
549
550 PR c++/80560
551 * c.opt (-Wclass-memaccess): New option.
552
e72c4afd
BK
5532017-06-14 Boris Kolpackov <boris@codesynthesis.com>
554
555 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
556
8a516588
MP
5572017-06-13 Marek Polacek <polacek@redhat.com>
558
559 PR objc/80949
560 * c-warn.c (do_warn_duplicated_branches): Return if any of the
561 branches is null.
562
45b2222a
ML
5632017-06-13 Martin Liska <mliska@suse.cz>
564
565 PR sanitize/78204
566 * c-attribs.c (add_no_sanitize_value): New function.
567 (handle_no_sanitize_attribute): Likewise.
568 (handle_no_sanitize_address_attribute): Use the function.
569 (handle_no_sanitize_thread_attribute): New function.
570 (handle_no_address_safety_analysis_attribute): Use
571 add_no_sanitize_value.
572 (handle_no_sanitize_undefined_attribute): Likewise.
573 * c-common.h: Declare new functions.
574 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
575 (ubsan_instrument_shift): Likewise.
576 (ubsan_instrument_bounds): Likewise.
577 (ubsan_maybe_instrument_array_ref): Likewise.
578 (ubsan_maybe_instrument_reference_or_call): Likewise.
579
a01f151f
JM
5802017-06-11 Jason Merrill <jason@redhat.com>
581
582 * c-ada-spec.c, c-pragma.c: Use id_equal.
583
3de4ac6d
MP
5842017-06-04 Marek Polacek <polacek@redhat.com>
585
586 PR c/80919
587 * c-format.c (matching_type_p): Return false if any of the types
588 requires structural equality.
589
2474f48f
MS
5902017-06-02 Martin Sebor <msebor@redhat.com>
591
592 PR c/80892
593 * c-warn.c (conversion_warning): Use -Wconversion for integer
594 conversion and -Wfloat-conversion for floating one.
595
40ffd95f
BE
5962017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
597
598 * c.opt (Wsizeof-pointer-div): New warning option.
599
3fa4634c
VR
6002017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
601
602 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
603 (Wcatch-value=1): Enable by -Wall.
604
f012c8ef
DM
6052017-05-30 David Malcolm <dmalcolm@redhat.com>
606
607 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
608 format_chars.
609 * c.opt (fdiagnostics-show-template-tree): New option.
610 (felide-type): New option.
611
63dbcd13
VR
6122017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
613
614 * c.opt (Wcatch-value=): New C++ warning flag.
615
be136b5c
NS
6162017-05-24 Nathan Sidwell <nathan@acm.org>
617
618 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
619 const casts to avoid warning.
620
3cd211af
MS
6212017-05-24 Martin Sebor <msebor@redhat.com>
622
623 PR c/80731
624 * c-common.h (unsafe_conversion_p): Add a function argument.
625 * c-common.c (unsafe_conversion_p): Same.
626 Add type names and values to diagnostics.
627 (scalar_to_vector): Adjust.
628 * c-warn.c (constant_expression_error): Add a function argument.
629 Add type names and values to diagnostics.
630 (conversion_warning): Add a function argument.
631 Add type names and values to diagnostics.
632 (warnings_for_convert_and_check): Same.
633
1ff7be5a
JM
6342017-05-19 Jason Merrill <jason@redhat.com>
635
636 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
637 enumerators.
638
ff502317
BE
6392017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
640
641 * c-format.c (locus): Move out of function scope,
642 add GTY attribute.
643
2a8a8d7b
NS
6442017-05-19 Nathan Sidwell <nathan@acm.org>
645
646 * c-opts.c (class_dump_file, class_dump_flags): Delete.
647 (c_common_parse_file): Remove class dump handling.
648 (get_dump_info): Likewise.
649
39aac208
RB
6502017-05-19 Richard Biener <rguenther@suse.de>
651
652 PR c++/80593
653 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
654 to alias-set zero memory.
655
6ecd2339
BE
6562017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
657
658 * c-format.c (local_tree_type_node): Add GTY attribute.
659
6574d78e
MP
6602017-05-18 Marek Polacek <polacek@redhat.com>
661
662 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
663 (c_common_fixed_point_type_for_size): Likewise.
664 (c_common_type_for_mode): Likewise.
665 (shorten_compare): Likewise.
666 (c_promoting_integer_type_p): Use false/true instead of 0/1.
667 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
668
e3455240
MP
6692017-05-18 Marek Polacek <polacek@redhat.com>
670
671 * c-common.c (self_promoting_args_p): Change the return type to bool.
672 Use false/true instead of 0/1.
673 * c-common.h (self_promoting_args_p): Update.
674
3fa8871b
MP
6752017-05-17 Marek Polacek <polacek@redhat.com>
676
677 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
678 * c-warn.c: Likewise.
679
b42cc3ca
VV
6802017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
681
682 Implement new C++ intrinsics __is_assignable and __is_constructible.
683 * c-common.c (__is_assignable, __is_constructible): New.
684 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
685
1a817418
ML
6862017-05-17 Martin Liska <mliska@suse.cz>
687
688 * c-common.h: Introduce dump_flags_t type and
689 use it instead of int type.
690 * c-gimplify.c (c_genericize): Likewise.
691 * c-opts.c: Likewise.
692
b2fa0a8b
MP
6932017-05-17 Marek Polacek <polacek@redhat.com>
694
695 * c-common.c (c_save_expr): Remove.
696 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
697 * c-common.h (c_save_expr): Remove declaration.
698
31c2d57d
VR
6992017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
700
701 PR c/35441
702 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
703 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
704 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
705 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
706 RDIV_EXPR.
707 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
708
684f84de
MP
7092017-05-09 Marek Polacek <polacek@redhat.com>
710
711 PR c/80525
712 * c-warn.c (unwrap_c_maybe_const): New.
713 (warn_logical_operator): Call it.
714
641da50a
NS
7152017-05-09 Nathan Sidwell <nathan@acm.org>
716
717 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
718 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
719
631238ac
MS
7202017-05-08 Martin Sebor <msebor@redhat.com>
721
722 PR translation/80280
723 * c-format.h (struct format_flag_spec): Add new member.
724 (T89_T): New macro.
725 * c-format.c (local_tree_type_node): New global.
726 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
727 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
728 (strfmon_flag_specs): Likewise.
729 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
730 with distinct quoting properties.
731 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
732 (flag_chars_t::validate): Add argument and handle bad quoting.
733 (check_format_info_main): Handle quoting problems.
734 (init_dynamic_diag_info): Simplify.
735
49f0c04c
JM
7362017-05-08 Jason Merrill <jason@redhat.com>
737
738 * c-opts.c (c_common_post_options): Update defaults for
739 flag_abi_version and flag_abi_compat_version.
740
56d35585
DM
7412017-05-05 David Malcolm <dmalcolm@redhat.com>
742
743 * c-common.c (c_cpp_error): Replace report_diagnostic
744 with diagnostic_report_diagnostic.
745
0f2c4a8f
MS
7462017-05-04 Martin Sebor <msebor@redhat.com>
747
748 PR translation/80280
749 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
750 (handle_weakref_attribute): Same.
751
6fe63fb4
NS
7522017-05-03 Nathan Sidwell <nathan@acm.org>
753
754 Canonicalize canonical type hashing
755 * c-common.c (complete_array_type): Use type_hash_canon.
756
815d9cc6
XR
7572017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
758
759 PR c++/80038
760 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
761 prototype.
762 (cilk_install_body_pedigree_operations): Likewise.
763 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
764 detatched.
765 (cilk_gimplify_call_params_in_spawned_fn): Remove.
766 (cilk_install_body_pedigree_operations): Likewise.
767 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
768 unwrapping.
769
f8a36447
JJ
7702017-04-27 Jakub Jelinek <jakub@redhat.com>
771
772 PR c++/80534
773 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
774 flag on non-aggregate element types.
775
7c145456
BE
7762017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
777
778 * c-common.c (c_type_hasher, type_hash_table): Remove.
779 (c_common_get_alias_set): Remove unreachable code.
780 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
781
c3cbcd45
VR
7822017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
783
784 * c.opt (Wextra-semi): New C++ warning flag.
785
8a59d466
JJ
7862017-04-20 Jakub Jelinek <jakub@redhat.com>
787
788 PR middle-end/80423
789 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
790
8487c9a5
JJ
7912017-04-18 Jakub Jelinek <jakub@redhat.com>
792
793 PR middle-end/79788
794 PR middle-end/80375
795 * c-common.c (c_common_type_for_mode): Don't handle
796 widest_*_literal_type_node here.
797 c_common_signed_or_unsigned_type): Likewise.
798 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
799 to *intTI_type_node or *intDI_type_node depending on whether
800 TImode is supported by the target or not.
801
3ee0fb02
ML
8022017-04-10 Martin Liska <mliska@suse.cz>
803
804 PR sanitizer/80350
805 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
806 doing an UBSAN check.
807
5764ee3c
JW
8082017-04-03 Jonathan Wakely <jwakely@redhat.com>
809
810 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
811
6f3af356
JJ
8122017-03-31 Jakub Jelinek <jakub@redhat.com>
813
814 PR c++/79572
815 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
816 tree *.
817 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
818 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
819 REFERENCE_TYPE.
820
f6a7a9d5
DM
8212017-03-31 David Malcolm <dmalcolm@redhat.com>
822
823 PR documentation/78732
824 * c.opt (Wendif-labels): Fix description to refer to
825 #else rather than #elif.
826
af88f557
JJ
8272017-03-31 Jakub Jelinek <jakub@redhat.com>
828
829 PR libstdc++/80251
830 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
831 * c-common.c (c_common_reswords): Add __is_aggregate trait.
832
a9e4a1a5
JJ
8332017-03-27 Jakub Jelinek <jakub@redhat.com>
834
835 PR middle-end/80162
836 * c-common.c (c_common_mark_addressable_vec): Don't set
837 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
838
3f01b620
MS
8392017-03-21 Martin Sebor <msebor@redhat.com>
840
841 PR c++/79548
842 * c-common.c (set_underlying_type): Mark type used only when
843 original del is declared unused.
844
2f6f187a
DM
8452017-03-10 David Malcolm <dmalcolm@redhat.com>
846
847 PR translation/79848
848 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
849 "%qs".
850
a02fa805
DM
8512017-03-10 David Malcolm <dmalcolm@redhat.com>
852
853 PR c/79921
854 * c-indentation.c (warn_for_misleading_indentation): Remove parens
855 from inform's message, so that xgettext can locate it.
856
822a132c
MP
8572017-03-09 Marek Polacek <polacek@redhat.com>
858
859 PR c++/79962
860 PR c++/79984
861 * c-attribs.c (handle_nonnull_attribute): Save the result of default
862 conversion to the attribute list.
863
bba81f1c
ML
8642017-03-09 Martin Liska <mliska@suse.cz>
865
866 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
867
108154ff
JM
8682017-03-03 Jason Merrill <jason@redhat.com>
869
870 * c.opt (Wnoexcept-type): New.
871
eb0e7c34
RB
8722017-03-02 Richard Biener <rguenther@suse.de>
873
874 PR c/79756
875 * c-common.c (c_common_mark_addressable_vec): Look through
876 C_MAYBE_CONST_EXPR.
877
9453ba0a
ML
8782017-02-28 Martin Liska <mliska@suse.cz>
879
880 * c.opt: Replace space with tabular for options of <number>
881 type.
882
6a825afe
ML
8832017-02-28 Martin Liska <mliska@suse.cz>
884
885 * c.opt: Fix --help=option -Q for options which are of
886 an enum type.
887
4227c9ad
JJ
8882017-02-24 Jakub Jelinek <jakub@redhat.com>
889
890 PR c++/79588
891 * c-common.c (check_function_restrict): New function.
892 (check_function_arguments): Add FNDECL argument. Call
893 check_function_restrict if -Wrestrict.
894 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
895 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
896 * c-common.h (check_function_arguments): Add FNDECL argument.
897 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
898
59909673
EB
8992017-02-24 Eric Botcazou <ebotcazou@adacore.com>
900
901 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
902 treatment of parameters with pointer-to-tagged type and tidy up.
903 (print_ada_methods): Remove the special treatment of C++ static member
904 functions.
905
54dcd526
ML
9062017-02-22 Martin Liska <mliska@suse.cz>
907
908 * c.opt: Replace inequality signs with square brackets
909 for -Wnornalized.
910
00bc9de3
JJ
9112017-02-21 Jakub Jelinek <jakub@redhat.com>
912
913 PR c++/79641
914 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
915 preserve quals.
916
97fcf744
JM
9172017-02-17 Joseph Myers <joseph@codesourcery.com>
918
919 * c-cppbuiltin.c (builtin_define_float_constants): Define
920 __DECIMAL_DIG__ to the value for long double.
921
c7545f1c
MP
9222017-02-15 Marek Polacek <polacek@redhat.com>
923
924 PR c/79515
925 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
926 conversion has occured.
927
c2e84327
DM
9282017-01-24 David Malcolm <dmalcolm@redhat.com>
929
930 * c-common.c (c_common_reswords): Add "__RTL".
931 * c-common.h (enum rid): Add RID_RTL.
932
2ebd93e1
MP
9332017-01-20 Marek Polacek <polacek@redhat.com>
934
935 PR c/64279
936 * c-common.h (do_warn_duplicated_branches_r): Declare.
937 * c-gimplify.c (c_genericize): Walk the function tree calling
938 do_warn_duplicated_branches_r.
939 * c-warn.c (expr_from_macro_expansion_r): New.
940 (do_warn_duplicated_branches): New.
941 (do_warn_duplicated_branches_r): New.
942 * c.opt (Wduplicated-branches): New option.
943
0d80ab91
DM
9442017-01-17 David Malcolm <dmalcolm@redhat.com>
945
946 PR c++/71497
947 * c-indentation.c (warn_for_misleading_indentation): Use the past
948 subjunctive in the note.
949
7f991c36
AH
9502017-01-17 Aldy Hernandez <aldyh@redhat.com>
951
952 PR c/79116
953 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
954 start type to integer_type.
955
1c70261c
JJ
9562017-01-16 Jakub Jelinek <jakub@redhat.com>
957
958 PR driver/49726
959 * c.opt (gen-decls): Add Driver flag.
960
1ddca3f3
PC
9612017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
962
963 Revert:
964 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
965
966 PR c++/71737
967 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
968
7d2f3f1d
PC
9692017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
970
971 PR c++/71737
972 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
973
bce6f760
MS
9742017-01-12 Martin Sebor <msebor@redhat.com>
975
976 (-Wformat-overflow): ...to this.
977
bf5fbf46
MS
9782017-01-11 Martin Sebor <msebor@redhat.com>
979
980 PR c/78768
981 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
982 Also enable for LTO.
983
e363df3f
JM
9842017-01-10 Jason Merrill <jason@redhat.com>
985
986 Implement P0195R2, C++17 variadic using.
987 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
988
bd2c6270
JJ
9892017-01-09 Jakub Jelinek <jakub@redhat.com>
990
991 PR translation/79019
992 PR translation/79020
993 * c.opt (Wnormalized=): Fix typo in description.
994
efcc8d38
MS
9952017-01-08 Martin Sebor <msebor@redhat.com>
996
997 PR middle-end/77708
998 * c.opt (-Wformat-truncation): New option.
999
435f3f7a
AO
10002017-01-06 Alexandre Oliva <aoliva@redhat.com>
1001
1002 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
1003 value to unsigned short to fit in 4 hex digits without
1004 warnings.
1005
4e89adf9
EB
10062017-01-05 Eric Botcazou <ebotcazou@adacore.com>
1007
1008 * c.opt (fsso-struct): Add 'native' value.
1009
cd445b54
ML
10102017-01-05 Martin Liska <mliska@suse.cz>
1011
1012 PR pch/78970
1013 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
1014 header.
1015
a9342885
MP
10162017-01-04 Marek Polacek <polacek@redhat.com>
1017
1018 PR c++/64767
1019 * c.opt (Wpointer-compare): New option.
1020
fc73e60c
JJ
10212017-01-04 Jakub Jelinek <jakub@redhat.com>
1022
1023 PR driver/78957
1024 * c.opt (fsso-struct=): Add RejectNegative.
1025
cbe34bb5
JJ
10262017-01-01 Jakub Jelinek <jakub@redhat.com>
1027
1028 Update copyright years.
1029
d4a6c0ea
ML
10302016-12-29 Martin Liska <mliska@suse.cz>
1031
1032 PR c/78933
1033 * c.opt (strong-eval-order): Add RejectNegative keyword.
1034
67a5ad7c
JM
10352016-12-22 Jason Merrill <jason@redhat.com>
1036
1037 Implement P0522R0, matching of template template arguments.
1038 * c-cppbuiltin.c (c_cpp_builtins): Define
1039 __cpp_template_template_args.
1040
0dba7960
JJ
10412016-12-21 Jakub Jelinek <jakub@redhat.com>
1042
1043 PR bootstrap/78817
1044 * c-common.c (struct nonnull_arg_ctx): New type.
1045 (check_function_nonnull): Return bool instead of void. Use
1046 nonnull_arg_ctx as context rather than just location_t.
1047 (check_nonnull_arg): Adjust for the new context type, set
1048 warned_p to true if a warning has been diagnosed.
1049 (check_function_arguments): Return bool instead of void.
1050 * c-common.h (check_function_arguments): Adjust prototype.
1051
31bfc9b9
JM
10522016-12-21 Jason Merrill <jason@redhat.com>
1053
1054 * c.opt (-fnew-ttp-matching): New flag.
1055 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
1056
629b3d75
MJ
10572016-12-14 Martin Jambor <mjambor@suse.cz>
1058
1059 * c-omp.c: Include omp-general.h instead of omp-low.h.
1060 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
1061 name.
1062
474da67e
MS
10632016-12-14 Martin Sebor <msebor@redhat.com>
1064
1065 PR c/17308
1066 * c-common.c (check_nonnull_arg): Disable when optimization
1067 is enabled.
1068
fe366b87
MP
10692016-12-12 Marek Polacek <polacek@redhat.com>
1070
1071 PR c++/78647
1072 * c-common.c (attribute_fallthrough_p): Return false for
1073 error_mark_node.
1074
8bd9f164
MS
10752016-12-08 Martin Sebor <msebor@redhat.com>
1076
1077 PR c/78284
1078 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
1079
060162e0
MS
10802016-12-08 Martin Sebor <msebor@redhat.com>
1081
1082 PR c/78165
1d0cf89a
MS
1083 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
1084 suffix.
060162e0 1085
ee92e7ba
MS
10862016-12-07 Martin Sebor <msebor@redhat.com>
1087
1088 PR c/53562
1089 PR middle-end/77784
1090 PR middle-end/78149
1091 PR middle-end/78138
1092 * c.opt (-Wstringop-overflow): New option.
1093
84b0769e
MO
10942016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
1095
1096 * c-attribs.c (asan odr indicator): New attribute.
1097 (handle_asan_odr_indicator_attribute): New function.
1098
7fa6a965
PK
10992016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1100
1101 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
1102 ptrdiff_type_node;
1103
56d8ffc1
JG
11042016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1105
1106 * c-common.c (excess_precision_mode_join): New.
1107 (c_ts18661_flt_eval_method): New.
1108 (c_c11_flt_eval_method): Likewise.
1109 (c_flt_eval_method): Likewise.
1110 * c-common.h (excess_precision_mode_join): New.
1111 (c_flt_eval_method): Likewise.
1112 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
1113 (cpp_iec_559_value): Call it.
1114 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
1115 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
1116 __FLT_EVAL_METHOD_TS_18661_3__.
1117
04f0fcf7
JG
11182016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
1119
1120 * c-opts.c (c_common_post_options): Add logic to handle the default
1121 case for -fpermitted-flt-eval-methods.
1122
fb2675cb
PB
11232016-11-23 Paolo Bonzini <bonzini@gnu.org>
1124
1125 * c.opt (Wexpansion-to-defined): New.
1126
ec1c5694
JJ
11272016-11-23 Jakub Jelinek <jakub@redhat.com>
1128
1129 PR target/78451
1130 * c-pragma.c (handle_pragma_target): Don't replace
1131 current_target_pragma, but chainon the new args to the current one.
1132
730c9e75
NS
11332016-11-22 Nathan Sidwell <nathan@acm.org>
1134
1135 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 1136 indentation and formatting.
730c9e75 1137
89990732
MS
11382016-11-21 Martin Sebor <msebor@redhat.com>
1139
1140 * c.opt (-fprintf-return-value): Enable by default.
1141
48330c93
BE
11422016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1143
1144 PR c++/71973
1145 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
1146 * c-common.c (c_common_nodes_and_builtins): Initialize
1147 const_tm_ptr_type_node.
1148
0d939c95
MP
11492016-11-16 Marek Polacek <polacek@redhat.com>
1150
1151 PR c/78285
1152 * c-common.c (c_add_case_label): Turn error_at calls into inform.
1153
8e745a17
JJ
11542016-11-14 Jakub Jelinek <jakub@redhat.com>
1155
1156 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
1157
1ee62b92 11582016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
1159 Richard Biener <rguenther@suse.de>
1160
1161 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
1162 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
1163 * c.opt (fgimple): New option.
1ee62b92 1164
22b15758
UB
11652016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1166
1167 PR c/35503
1168 * c-common.h (warn_for_restrict): Declare.
1169 * c-warn.c: Include gcc-rich-location.h.
1170 (warn_for_restrict): New function.
1171 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
1172 (gcc_cdiag_char_table): Likewise.
1173 (gcc_cxxdiag_char_table): Likewise.
1174 * c.opt (Wrestrict): New option.
1175
4be719cd
EB
11762016-11-13 Eric Botcazou <ebotcazou@adacore.com>
1177
1178 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
1179 for nested types only if the type is a record or union and dump SLOC.
1180
4a826ca6
JM
11812016-11-09 Jason Merrill <jason@redhat.com>
1182
1183 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
1184
2e955d50
JJ
11852016-11-09 Jakub Jelinek <jakub@redhat.com>
1186
1187 * c-ubsan.c (ubsan_instrument_shift): Handle split
1188 -fsanitize=shift-base and -fsanitize=shift-exponent.
1189
51dc6603
JM
11902016-11-07 Jason Merrill <jason@redhat.com>
1191
1192 * c.opt (Wc++1z-compat): New.
1193 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
1194
6dc4a604
ML
11952016-11-07 Martin Liska <mliska@suse.cz>
1196
1197 * c-warn.c (warn_for_unused_label): Save all labels used
1198 in goto or in &label.
1199
b302001e
JM
12002016-11-03 Jason Merrill <jason@redhat.com>
1201
1202 * c-cppbuiltin.c (c_cpp_builtins): Correct
1203 __cpp_inheriting_constructors.
1204
31f7f784
JM
12052016-11-01 Jason Merrill <jason@redhat.com>
1206
2bc78e3c
JM
1207 * c-cppbuiltin.c (c_cpp_builtins): Update
1208 __cpp_inheriting_constructors.
1209
31f7f784
JM
1210 * c.opt (-fnew-inheriting-ctors): New.
1211 * c-opts.c: Default to on for ABI 11+.
1212
dcb466ec
JJ
12132016-10-31 Jakub Jelinek <jakub@redhat.com>
1214
1215 PR c++/77948
1216 * c.opt (fext-numeric-literals): Add Var and Init.
1217 * c-opts.c (c_common_handle_option): Don't clear
1218 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
1219 (c_common_post_options): Clear it here if not set
1220 explicitly.
1221
52e1b91e
AH
12222016-10-28 Aldy Hernandez <aldyh@redhat.com>
1223
1224 PR debug/77773
1225 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
1226 if NULL.
1227
e16f1cc7
JJ
12282016-10-25 Jakub Jelinek <jakub@redhat.com>
1229
1230 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
1231 * c-common.c (c_common_reswords): Add __builtin_launder.
1232
f8348061
BE
12332016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
1234
1235 * c-common.c (c_common_truthvalue_conversion): Warn for
1236 multiplications in boolean context. Fix the quoting of '<<' and '<'
1237 in the shift warning.
1238
eff89e01
BE
12392016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
1240
1241 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
1242
24bc7bf4
JM
12432016-10-20 Jason Merrill <jason@redhat.com>
1244
1245 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
1246
4c712374
BE
12472016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1248
1249 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
1250 integer shift ops in boolean context.
1251
12522016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
1253
1254 * c.opt (Walloca): New.
1255 (Walloca-larger-than=): New.
1256 (Wvla-larger-than=): New.
1257
8fa18c06
MP
12582016-10-17 Marek Polacek <polacek@redhat.com>
1259
1260 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
1261 Return immediately when finding a match.
1262 (warn_tautological_cmp): Remove a boolean variable that is no longer
1263 needed.
1264
b12b1915
MP
12652016-10-17 Marek Polacek <polacek@redhat.com>
1266
1267 * c-attribs.c: New file.
1268 * c-common.c: Move attributes handling to c-attribs.c.
1269 (get_nonnull_operand): No longer static.
1270 * c-common.h: Move the declarations from c-attribs.c to its own section.
1271
2045acd9
JM
12722016-10-14 Jason Merrill <jason@redhat.com>
1273
1274 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
1275 and __cpp_deduction_guides.
1276
14a2c9aa
JM
12772016-10-13 Jason Merrill <jason@redhat.com>
1278
1279 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
1280
4d0cdd0c
TP
12812016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
1282
1283 * c-cppbuiltin.c: Include memmodel.h.
1284 * c-opts.c: Likewise.
1285 * c-pragma.c: Likewise.
1286 * c-warn.c: Likewise.
1287
70f6d5e1
JJ
12882016-10-12 Jakub Jelinek <jakub@redhat.com>
1289
1290 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
1291 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
1292 * c-opts.c (sanitize_cpp_opts): Initialize
1293 cpp_opts->cpp_warn_implicit_fallthrough.
1294
78f61294
MP
12952016-10-11 Marek Polacek <polacek@redhat.com>
1296
1297 * c-common.c (warning_candidate_p): Change the return type to bool
1298 and return true/false instead of 1/0.
1299 (vector_mode_valid_p): Likewise.
1300
038b5cc0
MP
13012016-10-11 Marek Polacek <polacek@redhat.com>
1302
1303 * c-common.c (fold_for_warn): No longer static.
1304 (bool_promoted_to_int_p): Likewise.
1305 (c_common_get_narrower): Likewise.
1306 (constant_expression_warning): Move to c-warn.c.
1307 (constant_expression_error): Likewise.
1308 (overflow_warning): Likewise.
1309 (warn_logical_operator): Likewise.
1310 (find_array_ref_with_const_idx_r): Likewise.
1311 (warn_tautological_cmp): Likewise.
1312 (expr_has_boolean_operands_p): Likewise.
1313 (warn_logical_not_parentheses): Likewise.
1314 (warn_if_unused_value): Likewise.
1315 (strict_aliasing_warning): Likewise.
1316 (sizeof_pointer_memaccess_warning): Likewise.
1317 (check_main_parameter_types): Likewise.
1318 (conversion_warning): Likewise.
1319 (warnings_for_convert_and_check): Likewise.
1320 (match_case_to_enum_1): Likewise.
1321 (match_case_to_enum): Likewise.
1322 (c_do_switch_warnings): Likewise.
1323 (warn_for_omitted_condop): Likewise.
1324 (readonly_error): Likewise.
1325 (lvalue_error): Likewise.
1326 (invalid_indirection_error): Likewise.
1327 (warn_array_subscript_with_type_char): Likewise.
1328 (warn_about_parentheses): Likewise.
1329 (warn_for_unused_label): Likewise.
1330 (warn_for_div_by_zero): Likewise.
1331 (warn_for_memset): Likewise.
1332 (warn_for_sign_compare): Likewise.
1333 (do_warn_double_promotion): Likewise.
1334 (do_warn_unused_parameter): Likewise.
1335 (record_locally_defined_typedef): Likewise.
1336 (maybe_record_typedef_use): Likewise.
1337 (maybe_warn_unused_local_typedefs): Likewise.
1338 (maybe_warn_bool_compare): Likewise.
1339 (maybe_warn_shift_overflow): Likewise.
1340 (warn_duplicated_cond_add_or_warn): Likewise.
1341 (diagnose_mismatched_attributes): Likewise.
1342 * c-common.h: Move the declarations from c-warn.c to its own section.
1343 * c-warn.c: New file.
1344
627be19f
JM
13452016-10-08 Jason Merrill <jason@redhat.com>
1346
1347 * c-common.c (c_common_truthvalue_conversion): Don't distribute
1348 into COND_EXPR in C++.
1349
7bad794a
JJ
13502016-10-08 Jakub Jelinek <jakub@redhat.com>
1351
1352 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
1353 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
1354 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
1355
be845b04
JJ
13562016-10-07 Jakub Jelinek <jakub@redhat.com>
1357
1358 Implement LWG2296 helper intrinsic
1359 * c-common.h (enum rid): Add RID_ADDRESSOF.
1360 * c-common.c (c_common_reswords): Add __builtin_addressof.
1361
c09c4992
BE
13622016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
1363
1364 PR c++/77700
1365 * c-common.c (c_common_truthvalue_conversion): Warn also for
1366 suspicious enum values in boolean context.
1367
342cfb3e
JJ
13682016-10-06 Jakub Jelinek <jakub@redhat.com>
1369
1370 Implement P0258R2 - helper for C++17
1371 std::has_unique_object_representations trait
1372 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
1373 * c-common.c (c_common_reswords): Add
1374 __has_unique_object_representations.
1375
2e69f143
JJ
13762016-10-05 Jakub Jelinek <jakub@redhat.com>
1377
1378 PR sanitizer/66343
1379 * c-ubsan.c (ubsan_instrument_return): Don't call
1380 initialize_sanitizer_builtins here.
1381
700fff34
BE
13822016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1383
1384 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
1385 conditional expression in boolean context when only one arm is
1386 non-boolean.
1387
9563bfcd
JJ
13882016-10-05 Jakub Jelinek <jakub@redhat.com>
1389
04a32443
JJ
1390 PR sanitizer/77823
1391 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
1392 is not integral.
1393
9563bfcd
JJ
1394 * c-common.c (c_common_reswords): Update comment for C++11.
1395
f1644724
JM
13962016-10-04 Jason Merrill <jason@redhat.com>
1397
1398 * c-common.c (make_tree_vector_from_ctor): New.
1399 * c-common.h: Declare it.
1400
5a79befb
JJ
14012016-10-04 Jakub Jelinek <jakub@redhat.com>
1402
1403 * c-cppbuiltin.c (c_cpp_builtins): Don't define
1404 __LIBGCC_JCR_SECTION_NAME__.
1405
1633d3b9
BE
14062016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
1407
1408 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
1409 left shift in boolean context.
1410
a2c6e7f2
JJ
14112016-09-29 Jakub Jelinek <jakub@redhat.com>
1412
1413 Implement P0001R1 - C++17 removal of register storage class specifier
1414 * c.opt (Wregister): New warning.
1415 * c-opts.c (c_common_post_options): Enable -Wregister by
1416 default for C++17.
1417
75304c87
JG
14182016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
1419
1420 * c-opts.c (c_common_post_options): Remove special case for
1421 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
1422 in C++.
1423
bbfac6da
JJ
14242016-09-27 Jakub Jelinek <jakub@redhat.com>
1425
6e39060a
JJ
1426 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
1427 -std=c++1z.
1428
bbfac6da
JJ
1429 * c-ada-spec.c (print_ada_declaration): Remove break after return.
1430
e73cf9a2
TP
14312016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
1432
1433 * c-common.c: Include memmodel.h.
1434
c6147dc4
MP
14352016-09-26 Marek Polacek <polacek@redhat.com>
1436
1437 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
1438
81fea426
MP
14392016-09-26 Marek Polacek <polacek@redhat.com>
1440
1441 PR c/7652
1442 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
1443 (handle_fallthrough_attribute): New function.
1444 (attribute_fallthrough_p): New function.
1445 * c-common.h (attribute_fallthrough_p): Declare.
1446
9a2300e9
MP
14472016-09-24 Marek Polacek <polacek@redhat.com>
1448
1449 PR c/77490
1450 * c.opt (Wbool-operation): New.
1451
a09e9e35
BE
14522016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
1453
1454 * c-common.c (c_common_truthvalue_conversion): Inhibit
1455 Wint-in-bool-context warning with from_macro_definition_at.
1456 Mention the expression will always evaluate to true.
1457
d43b4ccc
MS
14582016-09-21 Martin Sebor <msebor@redhat.com>
1459
1460 PR bootstrap/77676
1461 * c.opt (fprintf-return-value): Temporarily initialize to zero
1462 to unblock bootstrap failures.
1463
2e1c20b1
JJ
14642016-09-21 Jakub Jelinek <jakub@redhat.com>
1465
1466 PR c++/77651
1467 * c.opt (Waligned-new=): Add RejectNegative.
1468 (faligned-new=): Likewise. Spelling fix - change
1469 aligned_new_threshhold to aligned_new_threshold.
1470 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
1471 to aligned_new_threshold.
1472
88d0c3f0
MS
14732016-09-20 Martin Sebor <msebor@redhat.com>
1474
1475 PR middle-end/49905
1476 * c.opt: Add -Wformat-length and -fprintf-return-value.
1477
144a96e4
BE
14782016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
1479
1480 PR c++/77434
1481 * c.opt (Wint-in-bool-context): New warning.
1482 * c-common.c (c_common_truthvalue_conversion): Warn on integer
1483 constants in boolean context.
1484
63012d9a
JM
14852016-09-19 Joseph Myers <joseph@codesourcery.com>
1486
1487 * c-common.c (max_align_t_align): Also consider alignment of
1488 float128_type_node.
1489
931388ce
JM
14902016-09-15 Jason Merrill <jason@redhat.com>
1491
1492 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
1493 DECL_EXTERNAL.
1494
38711381
JM
14952016-09-14 Jason Merrill <jason@redhat.com>
1496
1497 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1498 limit FIELD_DECL, either.
1499
e51fbec3
MP
15002016-09-14 Marek Polacek <polacek@redhat.com>
1501
1502 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
1503 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
1504 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
1505
254830ba
DM
15062016-09-13 David Malcolm <dmalcolm@redhat.com>
1507
1508 * c-common.c (warn_logical_not_parentheses): Replace
1509 rich_location::add_fixit_insert calls with add_fixit_insert_before
1510 and add_fixit_insert_after, eliminating the "next_loc" calculation.
1511
42763690
JM
15122016-09-13 Jason Merrill <jason@redhat.com>
1513 Tom de Vries <tom@codesourcery.com>
1514
1515 PR c++/77427
1516 * c-common.c (set_underlying_type): Don't treat array as builtin type.
1517
9453eee9
JM
15182016-09-13 Jason Merrill <jason@redhat.com>
1519
1520 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
1521 limit types at all.
1522
e96809e3
JM
15232016-09-12 Jason Merrill <jason@redhat.com>
1524
1525 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
1526 bit/byte confusion, allow large alignment for types.
1527
54dcdb88
BE
15282016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
1529
1530 PR c++/77496
1531 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
1532
d1463eb9
DM
15332016-09-12 David Malcolm <dmalcolm@redhat.com>
1534
1535 PR c/72858
1536 * c-format.c (argument_parser::check_argument_type): Add params
1537 "type_start" and "conversion_char". Use the former to generate
1538 offset_to_type_start and pass it and conversion_char to
1539 check_format_types.
1540 (check_format_info_main): Capture the start of the type
1541 information as "type_start", and pass it an format_char
1542 to arg_parser.check_argument_type.
1543 (check_format_types): Provide an example in the leading comment.
1544 Add params "offset_to_type_start" and "conversion_char"; pass
1545 them to format_type_warning calls.
1546 (test_get_modifier_for_format_len): Likewise.
1547 (matching_type_p): New function.
1548 (get_format_for_type): Add param "conversion_char" and move
1549 implementation into...
1550 (get_format_for_type_1): ...new function, called twice.
1551 Use new function matching_type_p rather than checking for
1552 TYPE_CANONICAL equality.
1553 (get_corrected_substring): New function.
1554 (format_type_warning): Provide an example in the leading comment.
1555 Add params "offset_to_type_start" and "conversion_char". Replace
1556 call to get_format_for_type with call to get_corrected_substring
1557 and move rejection of hints for widths/precisions there.
1558 (assert_format_for_type_streq): Add param "conversion_char".
1559 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
1560 (test_get_format_for_type_printf): Add conversion chars to the
1561 tests, adding coverage for various combinations of integer
1562 vs double conversions, and for preserving octal and hexadecimal
1563 conversions.
1564 (test_get_format_for_type_scanf): Add conversion chars to the
1565 tests.
1566
5b28efbb
TV
15672016-09-10 Tom de Vries <tom@codesourcery.com>
1568
1569 PR C/71602
1570 * c-common.c (build_va_arg): Handle more strict
1571 targetm.canonical_va_list_type. Replace first argument type error with
1572 assert.
1573
3f0177e7
MS
15742016-09-09 Martin Sebor <msebor@redhat.com>
1575
1576 PR c/77520
1577 PR c/77521
1578 * c-format.c (argument_parser::find_format_char_info): Use %qc
1579 format directive unconditionally.
1580
af63ba4b
JM
15812016-09-09 Jason Merrill <jason@redhat.com>
1582
1583 Implement C++17 new of over-aligned types.
1584 * c.opt: Add -faligned-new and -Waligned-new.
1585 * c-common.c (max_align_t_align): Split out from...
1586 (cxx_fundamental_alignment_p): ...here.
1587 * c-common.h: Declare it.
1588 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
1589
c65248cb
JM
15902016-09-09 Joseph Myers <joseph@codesourcery.com>
1591
1592 * c-cppbuiltin.c (builtin_define_type_width): New function.
1593 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
1594 macros.
1595
e5106e27
DM
15962016-09-07 David Malcolm <dmalcolm@redhat.com>
1597
1598 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
1599 a POINTER_TYPE.
1600 (substring_loc::get_location): Move to substring-locations.c,
1601 keeping implementation as...
1602 (c_get_substring_location): New function, from the above, reworked
1603 to use accessors rather than member lookup.
1604 * c-common.h (class substring_loc): Move to substring-locations.h,
1605 replacing with a forward decl.
1606 (c_get_substring_location): New decl.
1607 * c-format.c: Include "substring-locations.h".
1608 (format_warning_va): Move to substring-locations.c.
1609 (format_warning_at_substring): Likewise.
1610
a42e7952
MS
16112016-09-06 Martin Sebor <msebor@redhat.com>
1612
1613 PR c/77336
1614 * c-format.c (check_function_format): Avoid issuing warnings for
1615 functions unless they call format functions with non-constant
1616 format strings.
1617
b772a565
RB
16182016-09-06 Richard Biener <rguenther@suse.de>
1619
1620 PR c/77450
1621 * c-common.c (c_common_mark_addressable_vec): Handle
1622 COMPOUND_LITERAL_EXPR.
1623
25ff5dd3
MP
16242016-09-05 Marek Polacek <polacek@redhat.com>
1625
1626 PR c/77423
1627 * c-common.c (bool_promoted_to_int_p): New function.
1628 (expr_has_boolean_operands_p): New function.
1629 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
1630 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
1631
21234eb5
TV
16322016-09-04 Tom de Vries <tom@codesourcery.com>
1633
1634 revert:
1635 2016-08-29 Tom de Vries <tom@codesourcery.com>
1636
1637 * c-common.c (build_va_arg): Replace first argument type error
1638 with assert.
1639
9dc5773f
JJ
16402016-09-02 Jakub Jelinek <jakub@redhat.com>
1641
1642 PR c/65467
1643 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
1644 (c_finish_omp_for): Reject _Atomic qualified iterators.
1645
16462016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
1647
1648 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
1649 size to guarantee it fits the output of the formatted function
1650 regardless of its arguments.
1651
295844f6
MP
16522016-09-01 Marek Polacek <polacek@redhat.com>
1653
1654 PR c/7652
1655 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
1656 FALLTHRU comments.
1657
3d06b6f2
MP
16582016-08-29 Marek Polacek <polacek@redhat.com>
1659
1660 PR c/77292
1661 * c-common.c (warn_logical_not_parentheses): Don't warn for
1662 a comparison or a logical operator.
1663
34cedad5
TV
16642016-08-29 Tom de Vries <tom@codesourcery.com>
1665
1666 * c-common.c (build_va_arg): Fix type comparison assert.
1667
f162d717
TV
16682016-08-29 Tom de Vries <tom@codesourcery.com>
1669
1670 * c-common.c (build_va_arg): Replace first argument type error
1671 with assert.
1672
ba9bbd6f
TV
16732016-08-29 Tom de Vries <tom@codesourcery.com>
1674
1675 PR c/77398
1676 * c-common.c (build_va_arg): Add first argument error. Build va_arg
1677 with error_mark_node as va_list instead of with illegal va_list.
1678
ebef225f
MP
16792016-08-25 Marek Polacek <polacek@redhat.com>
1680 David Malcolm <dmalcolm@redhat.com>
1681
1682 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
1683 * c-common.h (warn_logical_not_parentheses): Update declaration.
1684
b00e6e75
MP
16852016-08-22 Marek Polacek <polacek@redhat.com>
1686
1687 PR c++/77321
1688 * c-common.c (warn_for_memset): Check type for null.
1689
6dc198e3
JM
16902016-08-22 Joseph Myers <joseph@codesourcery.com>
1691
1692 * c-family/c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
1693 _FloatNx types for suffixes for built-in functions.
1694
c65699ef
JM
16952016-08-19 Joseph Myers <joseph@codesourcery.com>
1696
1697 PR c/32187
1698 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
1699 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
1700 (RID_FLOAT128X): New enum rid values.
1701 (CASE_RID_FLOATN_NX): New macro.
1702 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
1703 keywords.
1704 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
1705 corresponding complex types.
1706 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
1707 _FloatNx and corresponding complex types.
1708 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
1709 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
1710 and _FloatNx types for the widest type for determining
1711 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
1712 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
1713 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
1714 and _FloatNx types.
1715 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
1716 constants.
1717 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
1718 _FloatNx types.
1719
cc015f3a
DM
17202016-08-18 David Malcolm <dmalcolm@redhat.com>
1721
1722 * c-opts.c (c_diagnostic_finalizer): Update for change to
1723 diagnostic_show_locus.
1724
cb18fd07
DM
17252016-08-18 David Malcolm <dmalcolm@redhat.com>
1726
1727 * c-common.c: Include "spellcheck.h".
1728 (cb_get_suggestion): New function.
1729 * c-common.h (cb_get_suggestion): New decl.
1730 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
1731 cb_get_suggestion.
1732
a76989dc
MP
17332016-08-18 Marek Polacek <polacek@redhat.com>
1734
1735 PR c/71514
1736 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
1737 and pointer-to-VLA.
1738
65e736c0
DM
17392016-08-16 David Malcolm <dmalcolm@redhat.com>
1740
1741 PR c/72857
1742 * c-common.c (substring_loc::get_range): Rename to...
1743 (substring_loc::get_location): ...this, converting param from a
1744 source_range * to a location_t *. Call
1745 get_source_location_for_substring rather than
1746 get_source_range_for_substring, and pass in m_caret_idx.
1747 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
1748 (substring_loc::get_range): Replace with...
1749 (substring_loc::get_location): ...this.
1750 (substring_loc::set_caret_index): New method.
1751 (substring_loc): Add field m_caret_idx.
1752 * c-format.c (format_warning_va): Update for above changes.
1753 Rename local "substring_loc" to "fmt_substring_loc" to avoid
1754 clashing with type name.
1755 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
1756 (check_argument_type): Likewise.
1757 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
1758 Use a copy when emitting warnings, setting the caret index from TYPE.
1759
7e1dde14 17602016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 1761 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
1762
1763 * c-ada-spec.c (dump_number): New function.
1764 (handle_escape_character): Likewise.
1765 (print_ada_macros): Add handling of constant integers and strings.
1766
191816a3
MP
17672016-08-12 Marek Polacek <polacek@redhat.com>
1768
1769 PR c/7652
1770 * c-common.c (scalar_to_vector): Adjust fall through comment.
1771 * c-opts.c (c_common_handle_option): Likewise.
1772 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
1773 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
1774 fall through comment.
1775 * cilk.c (extract_free_variables): Add FALLTHRU.
1776
452df4a4
JM
17772016-08-10 Jason Merrill <jason@redhat.com>
1778
1779 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
1780
f3365c12
JM
17812016-08-09 Jason Merrill <jason@redhat.com>
1782
1783 * c-common.c (c_common_attribute_table): vector_size affects type
1784 identity.
1785
f0bc3323
MP
17862016-08-09 Marek Polacek <polacek@redhat.com>
1787
1788 PR c/7652
1789 * c-ada-spec.c (dump_generic_ada_node): Add return.
1790
98e5a19a
JM
17912016-08-09 Jason Merrill <jason@redhat.com>
1792
1793 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
1794 C++17 constexpr lambdas.
1795
895aa8e1
DM
17962016-08-08 David Malcolm <dmalcolm@redhat.com>
1797
1798 PR c/64955
1799 * c-common.h (selftest::c_format_c_tests): New declaration.
1800 (selftest::run_c_tests): New declaration.
1801 * c-format.c: Include "selftest.h.
1802 (format_warning_va): Add param "corrected_substring" and use
1803 it to add a replacement fix-it hint.
1804 (format_warning_at_substring): Likewise.
1805 (format_warning_at_char): Update for new param of
1806 format_warning_va.
1807 (argument_parser::check_argument_type): Pass "fki" to
1808 check_format_types.
1809 (check_format_types): Add param "fki" and pass it to
1810 format_type_warning.
1811 (deref_n_times): New function.
1812 (get_modifier_for_format_len): New function.
1813 (selftest::test_get_modifier_for_format_len): New function.
1814 (get_format_for_type): New function.
1815 (format_type_warning): Add param "fki" and use it to attempt
1816 to provide hints for argument types when calling
1817 format_warning_at_substring.
1818 (selftest::get_info): New function.
1819 (selftest::assert_format_for_type_streq): New function.
1820 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
1821 (selftest::test_get_format_for_type_printf): New function.
1822 (selftest::test_get_format_for_type_scanf): New function.
1823 (selftest::c_format_c_tests): New function.
1824
e52ed3fe
DM
18252016-08-08 David Malcolm <dmalcolm@redhat.com>
1826
1827 PR c/52952
1828 * c-format.c: Include "diagnostic.h".
1829 (location_column_from_byte_offset): Delete.
1830 (location_from_offset): Delete.
1831 (format_warning_va): New function.
1832 (format_warning_at_substring): New function.
1833 (format_warning_at_char): New function.
1834 (check_format_arg): Capture location of format_tree and pass to
1835 check_format_info_main.
1836 (argument_parser): Add fields "start_of_this_format" and
1837 "format_string_cst".
1838 (flag_chars_t::validate): Add param "format_string_cst". Convert
1839 warning_at call using location_from_offset to call to
1840 format_warning_at_char.
1841 (argument_parser::argument_parser): Add param "format_string_cst_"
1842 and use use it to initialize field "format_string_cst".
1843 Initialize new field "start_of_this_format".
1844 (argument_parser::read_format_flags): Convert warning_at call
1845 using location_from_offset to a call to format_warning_at_char.
1846 (argument_parser::read_any_format_left_precision): Likewise.
1847 (argument_parser::read_any_format_precision): Likewise.
1848 (argument_parser::read_any_other_modifier): Likewise.
1849 (argument_parser::find_format_char_info): Likewise, in three places.
1850 (argument_parser::parse_any_scan_set): Likewise, in one place.
1851 (argument_parser::handle_conversions): Likewise, in two places.
1852 (argument_parser::check_argument_type): Add param "fmt_param_loc"
1853 and use it to make a substring_loc. Pass the latter to
1854 check_format_types.
1855 (check_format_info_main): Add params "fmt_param_loc" and
1856 "format_string_cst". Convert warning_at calls using
1857 location_from_offset to calls to format_warning_at_char. Pass the
1858 new params to the arg_parser ctor. Pass "format_string_cst" to
1859 flag_chars.validate. Pass "fmt_param_loc" to
1860 arg_parser.check_argument_type.
1861 (check_format_types): Convert first param from a location_t
1862 to a const substring_loc & and rename to "fmt_loc". Attempt
1863 to extract the range of the relevant parameter and pass it
1864 to format_type_warning.
1865 (format_type_warning): Convert first param from a location_t
1866 to a const substring_loc & and rename to "fmt_loc". Add
1867 params "param_range" and "type". Replace calls to warning_at
1868 with calls to format_warning_at_substring.
1869
1c4d457e
DM
18702016-08-08 David Malcolm <dmalcolm@redhat.com>
1871
1872 * c-format.c (class flag_chars_t): New class.
1873 (struct length_modifier): New struct.
1874 (class argument_parser): New class.
1875 (flag_chars_t::flag_chars_t): New ctor.
1876 (flag_chars_t::has_char_p): New method.
1877 (flag_chars_t::add_char): New method.
1878 (flag_chars_t::validate): New method.
1879 (flag_chars_t::get_alloc_flag): New method.
1880 (flag_chars_t::assignment_suppression_p): New method.
1881 (argument_parser::argument_parser): New ctor.
1882 (argument_parser::read_any_dollar): New method.
1883 (argument_parser::read_format_flags): New method.
1884 (argument_parser::read_any_format_width): New method.
1885 (argument_parser::read_any_format_left_precision): New method.
1886 (argument_parser::read_any_format_precision): New method.
1887 (argument_parser::handle_alloc_chars): New method.
1888 (argument_parser::read_any_length_modifier): New method.
1889 (argument_parser::read_any_other_modifier): New method.
1890 (argument_parser::find_format_char_info): New method.
1891 (argument_parser::validate_flag_pairs): New method.
1892 (argument_parser::give_y2k_warnings): New method.
1893 (argument_parser::parse_any_scan_set): New method.
1894 (argument_parser::handle_conversions): New method.
1895 (argument_parser::check_argument_type): New method.
1896 (check_format_info_main): Introduce classes argument_parser
1897 and flag_chars_t, moving the code within the loop into methods
1898 of these classes. Make various locals "const".
1899
88fa5555
DM
19002016-08-05 David Malcolm <dmalcolm@redhat.com>
1901
1902 * c-common.c: Include "substring-locations.h".
1903 (get_cpp_ttype_from_string_type): New function.
1904 (g_string_concat_db): New global.
1905 (substring_loc::get_range): New method.
1906 * c-common.h (g_string_concat_db): New declaration.
1907 (class substring_loc): New class.
1908 * c-lex.c (lex_string): When concatenating strings, capture the
1909 locations of all tokens using a new obstack, and record the
1910 concatenation locations within g_string_concat_db.
1911 * c-opts.c (c_common_init_options): Construct g_string_concat_db
1912 on the ggc-heap.
1913
78169471
MP
19142016-07-29 Marek Polacek <polacek@redhat.com>
1915
638fc14f
MP
1916 PR c/71926
1917 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
1918 parentheses warning.
1919
78169471
MP
1920 PR c/71574
1921 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
1922
1225d6b1
ML
19232016-07-28 Martin Liska <mliska@suse.cz>
1924
1925 PR gcov-profile/68025
1926 * c-common.c (handle_no_profile_instrument_function_attribute):
1927
ec1e2a40
BE
19282016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
1929
1930 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
1931 BITS_PER_UNIT_LOG.
1932
5ec2cd9f
JM
19332016-07-25 Jason Merrill <jason@redhat.com>
1934
1935 PR c++/65970
1936 * c.opt (fconstexpr-loop-limit): New.
1937
9dc5773f 19382016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
1939
1940 PR c++/71675
1941 * c-common.c (resolve_overloaded_builtin): Avoid converting
1942 __atomic_compare_exchange_n return type to that of what its
1943 first argument points to.
1944
e3fe09c1
UB
19452016-07-22 Uros Bizjak <ubizjak@gmail.com>
1946
1947 * c-common.c: Use HOST_WIDE_INT_M1U instead of
1948 ~(unsigned HOST_WIDE_INT) 0.
1949
bc91c436
ML
19502016-07-22 Martin Liska <mliska@suse.cz>
1951
1952 PR gcov-profile/69028
1953 PR gcov-profile/62047
1954 * cilk.c (create_cilk_helper_decl): Set location of a new decl
1955 to the current_function_decl.
1956
451dcc66
JM
19572016-07-21 Jason Merrill <jason@redhat.com>
1958
1959 PR c++/65168
1960 * c-common.c (c_common_truthvalue_conversion): Check
1961 c_inhibit_evaluation_warnings for warning about address of
1962 reference.
1963
de6a69ee
DM
19642016-07-20 David Malcolm <dmalcolm@redhat.com>
1965
1966 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
1967 const char *.
1968
d022c55a
JM
19692016-07-15 Jason Merrill <jason@redhat.com>
1970
1971 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
1972
ddbbcb19
JJ
19732016-07-15 Jakub Jelinek <jakub@redhat.com>
1974
1975 PR c/71858
1976 * c-common.h (enum lookup_name_fuzzy_kind): Add
1977 FUZZY_LOOKUP_FUNCTION_NAME.
1978
d0cf395a
JM
19792016-07-08 Jason Merrill <jason@redhat.com>
1980
1981 P0145: Refining Expression Order for C++.
1982 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
1983 * c-opts.c: Adjust.
1984
98d44e93
MT
19852016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
1986
1987 PR c++/71214
1988 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
1989
f9d8d994
TS
19902016-06-29 Thomas Schwinge <thomas@codesourcery.com>
1991
1992 * c-pragma.h (enum pragma_kind): Rename
1993 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
1994 users.
1995
4aa83879
RB
19962016-06-29 Richard Biener <rguenther@suse.de>
1997
1998 PR middle-end/71002
1999 * c-common.c (c_common_get_alias_set): Remove union type punning case.
2000
a25bd9e6
JM
20012016-06-24 Jason Merrill <jason@redhat.com>
2002
2003 P0145R2: Refining Expression Order for C++.
2004 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
2005 MODIFY_EXPR.
2006
a86451b9
JJ
20072016-06-24 Jakub Jelinek <jakub@redhat.com>
2008
2009 * c-common.c (check_builtin_function_arguments): Require last
2010 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
2011 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
2012 if the last argument is pointer to enumerated or boolean type.
2013
1a4f11c8
DM
20142016-06-22 David Malcolm <dmalcolm@redhat.com>
2015
2016 PR c/70339
2017 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
2018 (lookup_name_fuzzy): New prototype.
2019
fe55692c
JDA
20202016-06-21 John David Anglin <danglin@gcc.gnu.org>
2021
2022 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
2023
4eb24e01
JM
20242016-06-14 Jason Merrill <jason@redhat.com>
2025
2026 P0145R2: Refining Expression Order for C++.
2027 * c.opt (fargs-in-order): New.
2028 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
2029
ef7cf206
JJ
20302016-06-13 Jakub Jelinek <jakub@redhat.com>
2031
0dda258b
JJ
2032 PR sanitizer/71498
2033 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
2034 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
2035
ef7cf206
JJ
2036 PR preprocessor/71183
2037 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
2038 to cb_get_source_date_epoch.
2039
50b15873
JJ
20402016-06-10 Jakub Jelinek <jakub@redhat.com>
2041
2042 PR c/68657
2043 * c.opt (Wpsabi): Add Warning flag.
2044
4d926e34
MS
20452016-06-10 Martin Sebor <msebor@redhat.com>
2046
2047 PR c/71392
2048 * gcc/c-family/c-common.c (handle_nonnull_attribute): Accept
2049 the nonnull attribute in type-generic builtins.
2050
e01b4e16
MS
20512016-06-09 Martin Sebor <msebor@redhat.com>
2052
2053 PR c/70883
2054 * c-common.c (builtin_function_validate_nargs): Make text of error
2055 message consistent with others like it.
2056
44a845ca
MS
20572016-06-08 Martin Sebor <msebor@redhat.com>
2058 Jakub Jelinek <jakub@redhat.com>
2059
2060 PR c++/70507
2061 PR c/68120
2062 * c-common.c (check_builtin_function_arguments): Handle
2063 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
2064
a80a7051
RB
20652016-06-08 Richard Biener <rguenther@suse.de>
2066
2067 * c-common.c (parse_optimize_options): Improve diagnostic messages.
2068
bfd67b47
RB
20692016-06-07 Richard Biener <rguenther@suse.de>
2070
2071 PR c/61564
2072 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
2073 options and warn about others.
2074
15c98b2e
ES
20752016-06-01 Eduard Sanou <dhole@openmailbox.org>
2076
2077 * c-common.c (get_source_date_epoch): Rename to
2078 cb_get_source_date_epoch.
2079 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
2080 message when the parsing fails. Use error_at instead of fatal_error.
2081 * c-common.h (get_source_date_epoch): Rename to
2082 cb_get_source_date_epoch.
2083 * c-common.h (cb_get_source_date_epoch): Prototype.
2084 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
2085 * c-common.h (c_omp_region_type): Remove trailing comma.
2086 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
2087 * c-lex.c (c_lex_with_flags): Remove initialization of
2088 pfile->source_date_epoch.
2089
00631022
JJ
20902016-05-30 Jakub Jelinek <jakub@redhat.com>
2091
2092 PR c++/71349
2093 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
2094 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
2095 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
2096 instead of C_OMP_CLAUSE_SPLIT_FOR.
2097
f17a223d
RB
20982016-05-24 Richard Biener <rguenther@suse.de>
2099
2100 PR middle-end/70434
2101 PR c/69504
2102 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
2103 (convert_vector_to_array_for_subscript): ... this.
2104 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
2105 VIEW_CONVERT_EXPR to an array type. Rename to ...
2106 (convert_vector_to_array_for_subscript): ... this.
2107
4f2e1536
MP
21082016-05-12 Marek Polacek <polacek@redhat.com>
2109
2110 PR c/70756
2111 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
2112 size_in_bytes and pass LOC to it.
2113
d6e83a8d
MM
21142016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
2115
2116 PR c/43651
2117 * c.opt (Wduplicate-decl-specifier): New option.
2118
5c3a10fb
MP
21192016-05-11 Marek Polacek <polacek@redhat.com>
2120
2121 PR c++/71024
2122 * c-common.c (diagnose_mismatched_attributes): New function.
2123 * c-common.h (diagnose_mismatched_attributes): Declare.
2124
deef7113
MP
21252016-05-04 Marek Polacek <polacek@redhat.com>
2126
2127 * c.opt (Wdangling-else): New option.
2128
79ce98bc
MP
21292016-05-03 Marek Polacek <polacek@redhat.com>
2130
2131 PR c/70859
2132 * c-common.c (builtin_function_validate_nargs): Add location
2133 parameter. Use it.
2134 (check_builtin_function_arguments): Add location and arguments
2135 parameters. Use them.
2136 * c-common.h (check_builtin_function_arguments): Update declaration.
2137
381cdae4
RB
21382016-05-03 Richard Biener <rguenther@suse.de>
2139
2140 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
2141 allow call args to gimplify to SSA names.
2142
1d793c34
MP
21432016-05-03 Marek Polacek <polacek@redhat.com>
2144
2145 * c-common.h (enum c_omp_region_type): Remove stray comma.
2146
77886428
CP
21472016-05-02 Cesar Philippidis <cesar@codesourcery.com>
2148
2149 * c-common.h (enum c_omp_region_type): Define.
2150
697e0b28
RS
21512016-05-02 Richard Sandiford <richard.sandiford@arm.com>
2152
2153 * c-common.c (shorten_compare): Use wi::to_wide.
2154
e7ff0319
CP
21552016-04-29 Cesar Philippidis <cesar@codesourcery.com>
2156
2157 PR middle-end/70626
2158 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
2159 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
2160 reduction clauses in acc parallel loops.
2161
2fff3db8
MP
21622016-04-29 Marek Polacek <polacek@redhat.com>
2163
2164 PR c/70852
2165 * c-common.c (warn_for_memset): Check domain before accessing it.
2166
509063eb
DV
21672016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
2168
2169 PR/69089
2170 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
2171 "aligned" attribute.
2172
b632761d
JM
21732016-04-28 Jason Merrill <jason@redhat.com>
2174
2175 * c-lex.c (c_common_has_attribute): Handle nodiscard.
2176
174f6622
ES
21772016-04-28 Eduard Sanou <dhole@openmailbox.org>
2178 Matthias Klose <doko@debian.org>
2179
2180 * c-common.c (get_source_date_epoch): New function, gets the environment
2181 variable SOURCE_DATE_EPOCH and parses it as long long with error
2182 handling.
2183 * c-common.h (get_source_date_epoch): Prototype.
2184 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
2185
6bc2bb18
RB
21862015-04-27 Ryan Burn <contact@rnburn.com>
2187
2188 PR c++/69024
2189 PR c++/68997
2190 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
2191 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
2192 external linkage.
2193 (cilk_detect_and_unwrap): Corresponding changes.
2194 (extract_free_variables): Don't extract free variables from
2195 AGGR_INIT_EXPR slot.
2196 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
2197 (cilk_recognize_spawn): Likewise.
2198
c1e1f433
BS
21992016-04-27 Bernd Schmidt <bschmidt@redhat.com>
2200
2201 * c.opt (Wmemset-elt-size): New option.
2202 * c-common.c (warn_for_memset): New function.
2203 * c-common.h (warn_for_memset): Declare.
2204
d067e05f
JM
22052016-04-25 Jason Merrill <jason@redhat.com>
2206
2207 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
2208 No longer static.
2209 * c-common.h: Declare it.
2210 * c-lex.c (c_common_has_attribute): Add maybe_unused.
2211
9aa36ae5
JM
22122016-04-22 Jason Merrill <jason@redhat.com>
2213
2214 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
2215
477d4906
IV
22162016-04-20 Ilya Verbin <ilya.verbin@intel.com>
2217
2218 PR c++/69363
2219 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
2220 * c-common.h (c_finish_cilk_clauses): Remove declaration.
2221
fe37c7af
MM
22222016-04-18 Michael Matz <matz@suse.de>
2223
2224 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
2225 and SET_DECL_ALIGN.
2226
23f2660f
EB
22272016-04-17 Eric Botcazou <ebotcazou@adacore.com>
2228
2229 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
2230 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
2231 to incomplete types.
2232 (dump_nested_type): Remove redundant tests and tidy up.
2233 (print_ada_declaration): Also set TREE_VISITED on the declaration of
2234 a type which is the typedef of an original type.
2235
1e77281b
MP
22362016-04-15 Marek Polacek <polacek@redhat.com>
2237
2238 PR c/70651
2239 * c-common.c (build_va_arg): Change two asserts into errors and return
2240 error_mark_node.
2241
b3a77f21
MP
22422016-04-13 Marek Polacek <polacek@redhat.com>
2243
2244 PR c++/70639
2245 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
2246 for switch statements, too.
2247
322b8466
JM
22482016-03-28 Jason Merrill <jason@redhat.com>
2249
2250 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
2251
fbdb6baf
MP
22522016-03-23 Marek Polacek <polacek@redhat.com>
2253
2254 PR c++/69884
2255 * c.opt (Wignored-attributes): New option.
2256
5c240f4d
DM
22572016-03-22 David Malcolm <dmalcolm@redhat.com>
2258
2259 PR c/69993
2260 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
2261 diagnostic text, reversing the order of the warning and note so
2262 that they appear in source order.
2263
14ba7b28
MP
22642016-03-17 Marek Polacek <polacek@redhat.com>
2265
2266 PR c/69407
2267 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
2268 operations.
2269
08a1cadc
JM
22702016-03-14 Jason Merrill <jason@redhat.com>
2271
2aaeea19
JM
2272 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
2273
08a1cadc
JM
2274 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
2275
c06d25bb
RB
22762016-03-09 Richard Biener <rguenther@suse.de>
2277
2278 PR c/70143
2279 * c-common.c (strict_aliasing_warning): Add back
2280 alias_sets_conflict_p check.
2281
80aac5c8
JM
22822016-03-08 Jason Merrill <jason@redhat.com>
2283
2284 * c-opts.c (set_std_cxx1z): Don't enable concepts.
2285
64b23c13
DM
22862016-03-04 David Malcolm <dmalcolm@redhat.com>
2287
2288 PR c/68187
2289 * c-indentation.c (get_visual_column): Move code to determine next
2290 tab stop to...
2291 (next_tab_stop): ...this new function.
2292 (line_contains_hash_if): Delete function.
2293 (detect_preprocessor_logic): Delete function.
2294 (get_first_nws_vis_column): New function.
2295 (detect_intervening_unindent): New function.
2296 (should_warn_for_misleading_indentation): Replace call to
2297 detect_preprocessor_logic with a call to
2298 detect_intervening_unindent.
2299
729526f5
DM
23002016-03-04 David Malcolm <dmalcolm@redhat.com>
2301
2302 PR c/68187
2303 * c-indentation.c (should_warn_for_misleading_indentation): When
2304 suppressing warnings about cases where the guard and body are on
2305 the same column, only use the first non-whitespace column in place
2306 of the guard token column when dealing with "else" clauses.
2307 When rejecting aligned BODY and NEXT, loosen the requirement
2308 from equality with the first non-whitespace of guard to simply
2309 that they not be indented relative to it.
2310
e9a35493
RB
23112016-03-04 Richard Biener <rguenther@suse.de>
2312
2313 PR c++/70054
2314 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
2315 instead of alias_sets_conflict_p.
2316
1be56bc5
MP
23172016-03-01 Marek Polacek <polacek@redhat.com>
2318
2319 PR c++/69795
2320 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
2321 any DECL.
2322
35886f0b
MS
23232016-02-22 Martin Sebor <msebor@redhat.com>
2324
2325 PR middle-end/69780
2326 * c-common.c (check_builtin_function_arguments): Validate and
2327 reject invalid arguments to __builtin_alloca_with_align.
2328
4246c8da
MW
23292016-02-20 Mark Wielaard <mjw@redhat.com>
2330
2331 PR c/28901
2332 * c.opt (Wunused-const-variable): Turn into Alias for...
2333 (Wunused-const-variable=): New option.
2334
268be88c
BE
23352016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2336
2337 PR c++/69865
2338 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
2339 here...
2340 (c_common_init_options): ...to here.
2341 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
2342
871b3f47
JJ
23432016-02-19 Jakub Jelinek <jakub@redhat.com>
2344
2345 PR c++/69826
2346 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
2347 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
2348 flag_preprocess_only.
2349
bf14eba2
JJ
23502016-02-16 Jakub Jelinek <jakub@redhat.com>
2351
2352 PR c/69835
2353 * c.opt (Wnonnull-compare): Enable for -Wall.
2354
ba6b3795
JJ
23552016-02-15 Jakub Jelinek <jakub@redhat.com>
2356
2357 PR c++/69797
2358 * c-common.c (sync_resolve_size): Diagnose too few arguments
2359 even when params is non-NULL empty vector.
2360
a011cd92
BS
23612016-02-08 Bernd Schmidt <bschmidt@redhat.com>
2362
2363 PR target/60410
2364 * c.opt (fshort-double): Remove.
2365
46cb9332
MS
23662016-02-05 Martin Sebor <msebor@redhat.com>
2367
2368 PR c++/69662
2369 * c.opt (Warning options): Update -Wplacement-new to take
2370 an optional argument.
2371
e1b81f2b
JJ
23722016-02-01 Jakub Jelinek <jakub@redhat.com>
2373
2374 PR preprocessor/69543
2375 PR c/69558
2376 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
2377 instead of loc to control_warning_option.
2378
b6adbb9f
NS
23792016-02-01 Nathan Sidwell <nathan@codesourcery.com>
2380
2381 * c.opt (fopenacc-dim=): New option.
2382
5d70666e
RB
23832016-01-27 Ryan Burn <contact@rnburn.com>
2384
2385 PR cilkplus/69267
2386 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
2387 gimplify_arg. Removed superfluous post_p argument.
2388 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
2389 superfluous post_p argument.
2390 * c-gimplify.c (c_gimplify_expr): Likewise.
2391
01e1dea3
DM
23922016-01-26 David Malcolm <dmalcolm@redhat.com>
2393
2394 PR other/69006
2395 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
2396 pp_newline_and_flush with pp_flush.
2397
9f04a53e
MS
23982016-01-20 Martin Sebor <msebor@redhat.com>
2399
2400 PR c/69405
2401 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
2402 an incompatible argument when the argument isn't a valid tree node.
2403
7f26f7df
JM
24042016-01-18 Jason Merrill <jason@redhat.com>
2405
2406 PR c++/68767
2407 * c-common.c (check_function_arguments_recurse): Fold the whole
2408 COND_EXPR, not just the condition.
2409
f62bf092
TV
24102016-01-18 Tom de Vries <tom@codesourcery.com>
2411
2412 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
2413 classify as loop clause.
2414
e0a575ff
JJ
24152016-01-15 Jakub Jelinek <jakub@redhat.com>
2416
2417 PR bootstrap/68271
2418 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
2419 C++ FE no longer has limit on number of pragmas.
2420
24212015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
2422
2423 PR c++/69048
2424 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 2425 to add missing cleanup point.
b6e3db06 2426
c7df95d8
DM
24272016-01-14 David Malcolm <dmalcolm@redhat.com>
2428
2429 PR c++/68819
2430 * c-indentation.c (get_visual_column): Add location_t param.
2431 Handle the column number being zero by effectively disabling the
2432 warning, with an "inform".
2433 (should_warn_for_misleading_indentation): Add location_t argument
2434 for all uses of get_visual_column.
2435
21efdd80
PP
24362016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
2437
2438 PR c++/69029
2439 * c-indentation.c (should_warn_for_misleading_indentation):
2440 Don't warn about do-while statements.
2441
7a127fa7
MS
24422016-01-07 Martin Sebor <msebor@redhat.com>
2443
2444 PR c/68966
2445 * c-common.c (sync_resolve_size): Reject first argument when it's
2446 a pointer to _Bool.
2447
c589e975
DM
24482016-01-05 David Malcolm <dmalcolm@redhat.com>
2449
2450 PR c/69122
2451 * c-indentation.c (get_visual_column): Remove default argument.
2452 (should_warn_for_misleading_indentation): For the multiline case,
2453 update call to get_visual_column for next_stmt_exploc so that it
2454 captures the location of the first non-whitespace character in the
2455 relevant line. Don't issue warnings if there is non-whitespace
2456 before the next statement.
2457
818ab71a
JJ
24582016-01-04 Jakub Jelinek <jakub@redhat.com>
2459
2460 Update copyright years.
2461
745e411d
DM
24622015-12-21 David Malcolm <dmalcolm@redhat.com>
2463
2464 * c-common.c (binary_op_error): Convert first param from
2465 location_t to rich_location * and use it when emitting an error.
2466 * c-common.h (binary_op_error): Convert first param from
2467 location_t to rich_location *.
2468
de67c4c3
DM
24692015-12-16 David Malcolm <dmalcolm@redhat.com>
2470
2471 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
2472 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
2473
4a38b02b
IV
24742015-12-15 Ilya Verbin <ilya.verbin@intel.com>
2475
2476 * c-common.c (c_common_attribute_table): Handle "omp declare target
2477 link" attribute.
2478
54d62f51
JJ
24792015-12-14 Jakub Jelinek <jakub@redhat.com>
2480
2481 PR c/68833
2482 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
2483
8d4227c8
TB
24842014-12-12 Tobias Burnus <burnus@net-b.de>
2485
2486 PR fortran/68815
2487 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
2488 specifiers (%d, %i,%u and %c).
2489
f6069ccc
DM
24902015-12-10 David Malcolm <dmalcolm@redhat.com>
2491
2492 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
2493
63bbf46d
JJ
24942015-12-08 Jakub Jelinek <jakub@redhat.com>
2495
2496 PR c/48088
2497 PR c/68657
2498 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
2499 * c-pragma.c (handle_pragma_diagnostic): Adjust
2500 control_warning_option caller.
2501
f79520bb
DM
25022015-12-07 David Malcolm <dmalcolm@redhat.com>
2503
2504 * c-common.c (c_cpp_error): Update for change to
2505 rich_location::set_range.
2506
b3d5bc62
JJ
25072015-12-04 Paolo Bonzini <bonzini@gnu.org>
2508
2509 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
2510 shifting 1 out of the sign bit.
2511
25122015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
2513
2514 * c-common.c (c_common_attribute_table[]): Update max arguments
2515 count for "simd" attribute.
2516 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
2517
6eb4a537
JJ
25182015-12-03 Jakub Jelinek <jakub@redhat.com>
2519
2520 PR preprocessor/57580
2521 * c-ppoutput.c (print): Change printed field to bool.
2522 Move src_file last for smaller padding.
2523 (init_pp_output): Set print.printed to false instead of 0.
2524 (scan_translation_unit): Fix up formatting. Set print.printed
2525 to true after printing something other than newline.
2526 (scan_translation_unit_trad): Set print.printed to true instead of 1.
2527 (maybe_print_line_1): Set print.printed to false instead of 0.
2528 (print_line_1): Likewise.
2529 (do_line_change): Set print.printed to true instead of 1.
2530 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
2531 dump_macro): Set print.printed to false after printing newline.
2532
4250754e
JM
25332015-12-02 Jason Merrill <jason@redhat.com>
2534
f479b43d
JM
2535 * c-common.c (fold_for_warn): New.
2536 (warn_logical_operator, warn_tautological_cmp)
2537 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
2538
4250754e
JM
2539 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
2540 (c_fully_fold_internal, decl_constant_value_for_optimization):
2541 Move to c/c-fold.c.
2542 * c-common.h: Don't declare decl_constant_value_for_optimization.
2543
e9e32ee6
JM
25442015-12-02 Joseph Myers <joseph@codesourcery.com>
2545
2546 PR c/68162
2547 * c-common.h (c_build_qualified_type): Add extra default
2548 arguments.
2549
37d5ad46
JB
25502015-12-01 Julian Brown <julian@codesourcery.com>
2551 Cesar Philippidis <cesar@codesourcery.com>
2552 James Norris <James_Norris@mentor.com>
2553
2554 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
2555 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
2556 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
2557
f07862c7
EB
25582015-11-30 Eric Botcazou <ebotcazou@adacore.com>
2559
2560 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
2561 (decl_sloc_common): Delete and move bulk of processing to...
2562 (decl_sloc): ...here.
2563 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
2564 (dump_ada_double_name): Remove S parameter and compute the suffix.
2565 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
2566 element type and deal with an anonymous one.
2567 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
2568 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
2569 and remove reference to QUAL_UNION_TYPE.
2570 (dump_nested_types): Make 2 passes on the fields and move bulk to...
2571 (dump_nested_type): ...here. New function extracted from above.
2572 Generate a full declaration for anonymous element type of arrays.
2573 (print_ada_declaration): Really skip anonymous declarations. Remove
2574 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
2575 Clean up processing of declarations of array types and objects.
2576 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
2577 Remove obsolete code and tidy up.
2578
75c8aac3
JH
25792015-11-29 Jan Hubicka <hubicka@ucw.cz>
2580
2581 PR c/67581
2582 * c-common.c (handle_transparent_union_attribute): Update
2583 also type variants.
2584
b58d3df2
ML
25852015-11-27 Martin Liska <mliska@suse.cz>
2586
2587 PR c++/68312
2588 * array-notation-common.c (cilkplus_extract_an_triplets):
2589 Release vector of vectors.
2590 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
2591
89a01fcf
EB
25922015-11-26 Eric Botcazou <ebotcazou@adacore.com>
2593
2594 PR c++/68527
2595 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
2596 (print_ada_struct_decl): Likewise.
2597
cc5c5226
IZ
25982015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
2599
2600 PR c++/68001
2601 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
2602 * cilk.c (recognize_spawn): Determine location in a more precise
2603 way.
2604
269adb9d
JM
26052015-11-19 Jason Merrill <jason@redhat.com>
2606
2607 * c-common.c (shorten_compare): But look through macros from
2608 system headers.
2609
d0eccfcd
JM
26102015-11-18 Jason Merrill <jason@redhat.com>
2611
2612 * c-common.c (shorten_compare): Don't -Wtype-limits if the
2613 non-constant operand comes from a macro.
2614
3e44547c
JM
26152015-11-17 Jason Merrill <jason@redhat.com>
2616
2617 PR bootstrap/68346
2618 * c-common.c (warn_tautological_cmp): Fold before checking for
2619 constants.
2620
0f62c7a0
MP
26212015-11-16 Marek Polacek <polacek@redhat.com>
2622
2623 PR c++/68362
2624 * c-common.c (check_case_bounds): Fold low and high cases.
2625
a868811e
MP
26262015-11-16 Marek Polacek <polacek@redhat.com>
2627
2628 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
2629 * c-common.c (c_common_get_alias_set): Likewise.
2630 (handle_visibility_attribute): Likewise.
2631
fff77217
KY
26322015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
2633
2634 * c-common.c (handle_simd_attribute): New.
2635 (struct attribute_spec): Add entry for "simd".
2636 (handle_simd_attribute): New.
2637
269e63b7
KT
26382015-11-13 Kai Tietz <ktietz70@googlemail.com>
2639
2640 * c-lex.c (interpret_float): Use fold_convert.
2641
ebedc9a3
DM
26422015-11-13 David Malcolm <dmalcolm@redhat.com>
2643
2644 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
2645 and store it on the result.
2646 * c-opts.c (c_common_init_options): Set
2647 global_dc->colorize_source_p.
2648
6e232ba4
JN
26492015-11-12 James Norris <jnorris@codesourcery.com>
2650 Joseph Myers <joseph@codesourcery.com>
2651
2652 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
2653 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
2654 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
2655 PRAGMA_OACC_CLAUSE_LINK.
2656
e78bede6
MP
26572015-11-11 Marek Polacek <polacek@redhat.com>
2658
2659 PR c/68107
2660 PR c++/68266
2661 * c-common.c (valid_array_size_p): New function.
2662 * c-common.h (valid_array_size_p): Declare.
2663
3f8257db 26642015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
2665
2666 PR bootstrap/68271
2667 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
2668
69f293c9
AM
26692015-11-11 Andrew MacLeod <amacleod@redhat.com>
2670
2671 * array-notation-common.c: Remove unused header files.
2672 * c-ada-spec.c: Likewise.
2673 * c-cilkplus.c: Likewise.
2674 * c-common.c: Likewise.
2675 * c-cppbuiltin.c: Likewise.
2676 * c-dump.c: Likewise.
2677 * c-format.c: Likewise.
2678 * c-gimplify.c: Likewise.
2679 * c-indentation.c: Likewise.
2680 * c-lex.c: Likewise.
2681 * c-omp.c: Likewise.
2682 * c-opts.c: Likewise.
2683 * c-pch.c: Likewise.
2684 * c-ppoutput.c: Likewise.
2685 * c-pragma.c: Likewise.
2686 * c-pretty-print.c: Likewise.
2687 * c-semantics.c: Likewise.
2688 * c-ubsan.c: Likewise.
2689 * cilk.c: Likewise.
2690 * stub-objc.c: Likewise.
2691
3a40d81d
NS
26922015-11-09 Thomas Schwinge <thomas@codesourcery.com>
2693 Cesar Philippidis <cesar@codesourcery.com>
2694 James Norris <jnorris@codesourcery.com>
2695 Julian Brown <julian@codesourcery.com>
2696 Nathan Sidwell <nathan@codesourcery.com>
2697
2698 * c-pragma.c (oacc_pragmas): Add "routine".
2699 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
2700
ee45a32d
EB
27012015-11-08 Eric Botcazou <ebotcazou@adacore.com>
2702
2703 * c-common.c (c_common_attributes): Add scalar_storage_order.
2704 (handle_scalar_storage_order_attribute): New function.
2705 * c-pragma.c (global_sso): New variable.
2706 (maybe_apply_pragma_scalar_storage_order): New function.
2707 (handle_pragma_scalar_storage_order): Likewise.
2708 (init_pragma): Register scalar_storage_order.
2709 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
2710 * c.opt (Wscalar-storage-order): New warning.
2711 (fsso-struct=): New option.
2712
eb11eb15
MS
27132015-11-08 Martin Sebor <msebor@redhat.com>
2714
2715 * c.opt (Wplacement-new): Add a period to the end of a sentence.
2716
0aad0198
RS
27172015-11-07 Richard Sandiford <richard.sandiford@arm.com>
2718
2719 * c-common.c: Don't undef DEF_BUILTIN.
2720
8a645150
DM
27212015-11-06 David Malcolm <dmalcolm@redhat.com>
2722
2723 * c-common.c (c_cpp_error): Convert parameter from location_t to
2724 rich_location *. Eliminate the "column_override" parameter and
2725 the call to diagnostic_override_column.
2726 Update the "done_lexing" clause to set range 0
2727 on the rich_location, rather than overwriting a location_t.
2728 * c-common.h (c_cpp_error): Convert parameter from location_t to
2729 rich_location *. Eliminate the "column_override" parameter.
2730
7a5e4956
CP
27312015-11-05 Cesar Philippidis <cesar@codesourcery.com>
2732 Thomas Schwinge <thomas@codesourcery.com>
2733 James Norris <jnorris@codesourcery.com>
2734
2735 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
2736 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
2737 clauses with parallel and kernels and loops.
2738 * c-pragma.h (enum pragma_omp_clause): Add entries for
2739 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
2740 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
2741 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
2742 INDEPENDENT,SEQ}.
2743 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
2744
e2f5cc96
MS
27452015-11-05 Martin Sebor <msebor@redhat.com>
2746
2747 PR c++/67942
2748 * c.opt (-Wplacement-new): New option.
2749
e01d41e5
JJ
27502015-11-05 Jakub Jelinek <jakub@redhat.com>
2751
2752 * c-common.h (c_finish_omp_atomic): Add TEST argument.
2753 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
2754 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
2755 save_expr or create_tmp_var* if TEST is true.
2756 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
2757 Don't call add_stmt here.
2758 (struct c_omp_check_loop_iv_data): New type.
2759 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
2760 c_omp_check_loop_iv_exprs): New functions.
2761 (c_omp_split_clauses): Adjust for lastprivate being allowed on
2762 distribute.
2763 (c_omp_declare_simd_clauses_to_numbers): Change
2764 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
2765 (c_omp_declare_simd_clauses_to_decls): Similarly change those
2766 from numbers to PARM_DECLs.
2767
595278be
MM
27682015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
2769
2770 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
2771 flag_checking.
2772
3f8257db 27732015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
2774
2775 PR c++-common/67882
b3d5bc62
JJ
2776 * c-common.h (fold_offsetof_1): Add argument.
2777 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
2778 offsetof expressions that reference elements past the end of
2779 an array.
2780
4bf9e5a8
TS
27812015-11-03 Thomas Schwinge <thomas@codesourcery.com>
2782 Chung-Lin Tang <cltang@codesourcery.com>
2783
2784 * c-pragma.c (oacc_pragmas): Add "atomic".
2785 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
2786
3b1661a9
ES
27872015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
2788
2789 * c-common.c (handle_target_clones_attribute): New.
2790 (c_common_attribute_table): Add handle_target_clones_attribute.
2791 (handle_always_inline_attribute): Add check on target_clones attribute.
2792 (handle_target_attribute): Ditto.
2793
2adfab87
AM
27942015-10-29 Andrew MacLeod <amacleod@redhat.com>
2795
2796 * array-notation-common.c: Reorder #include's and remove duplicates.
2797 * c-ada-spec.c: Likewise.
2798 * c-cilkplus.c: Likewise.
2799 * c-common.c: Likewise.
2800 * c-cppbuiltin.c: Likewise.
2801 * c-dump.c: Likewise.
2802 * c-format.c: Likewise.
2803 * c-gimplify.c: Likewise.
2804 * c-indentation.c: Likewise.
2805 * c-lex.c: Likewise.
2806 * c-omp.c: Likewise.
2807 * c-opts.c: Likewise.
2808 * c-pch.c: Likewise.
2809 * c-ppoutput.c: Likewise.
2810 * c-pragma.c: Likewise.
2811 * c-pretty-print.c: Likewise.
2812 * c-semantics.c: Likewise.
2813 * c-ubsan.c: Likewise.
2814 * cilk.c: Likewise.
2815 * stub-objc.c: Likewise.
2816
d90ec4f2
JM
28172015-10-28 Jason Merrill <jason@redhat.com>
2818
2819 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
2820
88bae6f4
TS
28212015-10-27 Thomas Schwinge <thomas@codesourcery.com>
2822 James Norris <jnorris@codesourcery.com>
2823 Cesar Philippidis <cesar@codesourcery.com>
2824
2825 PR c/64765
2826 PR c/64880
2827 * c-common.h (c_oacc_split_loop_clauses): Declare function.
2828 * c-omp.c (c_oacc_split_loop_clauses): New function.
2829
b1726d6c
MS
28302015-10-21 Martin Sebor <msebor@redhat.com>
2831
2832 PR driver/68043
2833 * c.opt: End each sentence that describes an option with a period.
2834
fa60eeb9
MP
28352015-10-20 Marek Polacek <polacek@redhat.com>
2836
2837 * array-notation-common.c (is_cilkplus_vector_p): Define.
2838 * c-common.h (is_cilkplus_vector_p): Declare.
2839
95979049
MP
28402015-10-20 Marek Polacek <polacek@redhat.com>
2841
2842 * c.opt (std=gnu++11): Do not describe as experimental.
2843 (std=gnu++14): Likewise.
2844
2a9fb712
JM
28452015-10-19 Jason Merrill <jason@redhat.com>
2846
2847 * c-cppbuiltin.c (c_cpp_builtins): Define
2848 __cpp_nontype_template_args.
2849
13b380a3
JM
28502015-10-19 Jason Merrill <jason@redhat.com>
2851
2852 * c-cppbuiltin.c (c_cpp_builtins): Define
2853 __cpp_enumerator_attributes, __cpp_fold_expressions,
2854 __cpp_unicode_characters.
2855
d9a6bd32
JJ
28562015-10-13 Jakub Jelinek <jakub@redhat.com>
2857 Aldy Hernandez <aldyh@redhat.com>
2858
2859 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
2860 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
2861 (c_define_builtins): Likewise.
2862 * c-common.h (enum c_omp_clause_split): Add
2863 C_OMP_CLAUSE_SPLIT_TASKLOOP.
2864 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
2865 (c_finish_omp_for): Add ORIG_DECLV argument.
2866 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
2867 201511 instead of 201307.
2868 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
2869 OMP_CRITICAL_CLAUSES to it.
2870 (c_finish_omp_ordered): Add CLAUSES argument, set
2871 OMP_ORDERED_CLAUSES to it.
2872 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
2873 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
2874 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
2875 constructs and new OpenMP 4.5 clauses. Clear
2876 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
2877 verification code.
2878 * c-pragma.c (omp_pragmas_simd): Add taskloop.
2879 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
2880 (enum pragma_omp_clause): Add
2881 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
2882 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
2883
624d31fe
RS
28842015-10-05 Richard Sandiford <richard.sandiford@arm.com>
2885
2886 * c-lex.c (interpret_float): Use real_equal instead of
2887 REAL_VALUES_EQUAL.
2888
b8fd7909
JM
28892015-10-04 Jason Merrill <jason@redhat.com>
2890
2891 Implement N4514, C++ Extensions for Transactional Memory.
2892 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
2893 (c_common_attribute_table): Add transaction_safe_dynamic.
2894 transaction_safe now affects type identity.
2895 (handle_tm_attribute): Handle transaction_safe_dynamic.
2896 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
2897 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
2898 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
2899 (D_TRANSMEM): New.
2900 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
2901 * c-pretty-print.c (pp_c_attributes_display): Don't print
2902 transaction_safe in C++.
2903
12651878
MP
29042015-10-02 Marek Polacek <polacek@redhat.com>
2905
2906 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
2907
3e3b8d63
MP
29082015-10-02 Marek Polacek <polacek@redhat.com>
2909
2910 PR c/64249
2911 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
2912 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
2913 * c.opt (Wduplicated-cond): New option.
2914
0d1a8f75
JM
29152015-10-01 Joseph Myers <joseph@codesourcery.com>
2916
2917 * c.opt (std=c11): Do not describe as experimental.
2918 (std=gnu11): Likewise.
2919 (std=iso9899:2011): Likewise.
2920
3e32ee19
NS
29212015-09-28 Nathan Sidwell <nathan@codesourcery.com>
2922
2923 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
2924 (DEF_FUNCTION_TYPE_VAR_11): Delete.
2925
974348ee
MP
29262015-09-25 Marek Polacek <polacek@redhat.com>
2927
2928 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
2929 (ubsan_instrument_shift): Likewise.
2930
15dbc1a6
MP
29312015-09-25 Marek Polacek <polacek@redhat.com>
2932
2933 PR sanitizer/64906
2934 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
2935
6b95d7cc
PP
29362015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
2937
2938 * c-indentation.c (should_warn_for_misleading_indentation):
2939 Compare next_stmt_vis_column with guard_line_first_nws instead
2940 of with guard_line_vis_column.
2941
c1822f9c
MLI
29422015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
2943
2944 PR c/49654
2945 PR c/49655
2946 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
2947 options and options not valid for the current language.
2948
d5398058
PP
29492015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
2950
2951 * c-indentation.c (should_warn_for_misleading_indentation):
2952 Float out and consolidate the calls to get_visual_column that
2953 are passed guard_exploc as an argument. Compare
2954 next_stmt_vis_column with guard_line_first_nws instead of with
2955 body_line_first_nws.
2956
6b333269
NS
29572015-09-22 Nathan Sidwell <nathan@codesourcery.com>
2958
2959 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
2960 Wnamespaces): New C++ warnings.
2961
a75f1574
JM
29622015-09-22 Jason Merrill <jason@redhat.com>
2963
2964 * c-common.h (abi_compat_version_crosses): New.
2965 (warn_abi_version): Declare.
2966 * c-common.c: Define it.
2967 * c-opts.c (c_common_post_options): Handle it.
2968 flag_abi_compat_version defaults to 8.
2969
bdaaa8b7
VV
29702015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
2971
2972 Complete the implementation of N4230, Nested namespace definition.
2973 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
2974 __cpp_nested_namespace_definitions.
2975
eaa797e8
MLI
29762015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2977
2978 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
2979
c4914de6
MLI
29802015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
2981
2982 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
2983 when warning.
2984 * c-pragma.h (pragma_lex): Add optional loc argument.
2985
fcb87c50
MM
29862015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
2987
2988 * c-format.c (check_format_arg): Adjust to use common block size in all
2989 object pools.
2990
31bdd08a
DM
29912015-09-15 David Malcolm <dmalcolm@redhat.com>
2992
2993 * c-format.c (location_from_offset): Update for change in
2994 signature of location_get_source_line.
2995 * c-indentation.c (get_visual_column): Likewise.
2996 (line_contains_hash_if): Likewise.
2997
aa9f4b4c
MP
29982015-09-14 Marek Polacek <polacek@redhat.com>
2999
3000 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
3001 setting various warnings.
3002
aa256c4a
MP
30032015-09-14 Marek Polacek <polacek@redhat.com>
3004
3005 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
3006 a negative value.
3007
0f876f22
MW
30082015-09-11 Mark Wielaard <mjw@redhat.com>
3009
3010 PR c/28901
3011 * c.opt (Wunused-variable): Option from common.opt.
3012 (Wunused-const-variable): New option.
3013
273aa49e
PC
30142015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
3015
3016 PR c++/53184
3017 * c.opt ([Wsubobject-linkage]): Add.
3018
1807ffc1
MS
30192015-09-03 Martin Sebor <msebor@redhat.com>
3020
3021 PR c/66516
3022 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
3023 functions.
3024 * c-common.c (reject_gcc_builtin): Define.
3025
38942840
BI
30262015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
3027
3028 PR middle-end/60586
3029 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
3030 prototype.
3031 * c-gimplify.c (c_gimplify_expr): Added a call to the function
3032 cilk_gimplify_call_params_in_spawned_fn.
3033 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
3034 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
3035 unwrapping.
3036
c316b5e4
MP
30372015-08-25 Marek Polacek <polacek@redhat.com>
3038
3039 PR middle-end/67330
3040 * c-common.c (handle_weak_attribute): Don't check whether the
3041 visibility can be changed here.
3042
584a7c46
MLI
30432015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
3044
3045 * c-lex.c (c_lex_with_flags): Use explicit locations.
3046
a79683d5
TS
30472015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
3048
3049 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
3050 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
3051
61717a45
FXC
30522015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
3053
3054 PR middle-end/36757
3055 * c-common.c (check_builtin_function_arguments): Add check
3056 for BUILT_IN_SIGNBIT argument.
3057
329524f5
PC
30582015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
3059
3060 PR c++/67160
3061 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
3062 in c++1z mode.
3063
4ee55665
MP
30642015-08-17 Marek Polacek <polacek@redhat.com>
3065
3066 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
3067 with whitespaces before qualifier names.
3068
b893e375
MP
30692015-08-12 Marek Polacek <polacek@redhat.com>
3070
3071 PR c++/55095
3072 * c-common.c (maybe_warn_shift_overflow): Properly handle
3073 left-shifting 1 into the sign bit.
3074
c2d89095
MLI
30752015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
3076
3077 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
3078
971e17ff
AS
30792015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
3080 Braden Obrzut <admin@maniacsvault.net>
3081 Jason Merrill <jason@redhat.com>
3082
3083 Add C++ Concepts TS support.
3084 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
3085 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
3086 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
3087 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
3088 * c-opts.c (set_std_cxx1z): Set flag_concepts.
3089 * c.opt (fconcepts): New.
3090
b3d5bc62
JJ
30912015-08-02 Martin Sebor <msebor@redhat.com>
3092
3093 * c.opt (-Wframe-address): New warning option.
3094
8ebca419
PP
30952015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3096
3097 * c-indentation.c (should_warn_for_misleading_indentation):
3098 Improve heuristics.
3099
1a1e101f
PP
31002015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3101
3102 * c-indentation.c (get_visual_column): Add parameter first_nws,
3103 use it. Update comment documenting the function.
3104 (is_first_nonwhitespace_on_line): Remove.
3105 (should_warn_for_misleading_indentation): Replace usage of
3106 of is_first_nonwhitespace_on_line with get_visual_column.
3107
992118a1
PP
31082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
3109
3110 * c-indentation.h (struct token_indent_info): Define.
3111 (get_token_indent_info): Define.
3112 (warn_for_misleading_information): Declare.
3113 * c-common.h (warn_for_misleading_information): Remove.
3114 * c-identation.c (warn_for_misleading_indentation):
3115 Change declaration to take three token_indent_infos. Adjust
3116 accordingly.
3117 * c-identation.c (should_warn_for_misleading_indentation):
3118 Likewise. Bail out early if the body is a compound statement.
3119 (guard_tinfo_to_string): Define.
3120
e8fa3817
JM
31212015-07-30 Jason Merrill <jason@redhat.com>
3122
3123 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
3124 '*' for reference decay.
3125
173864e8
MP
31262015-07-30 Marek Polacek <polacek@redhat.com>
3127
3128 * c-common.c (warn_tautological_cmp): Bail for float types.
3129
f2afe6dd
MP
31302015-07-27 Marek Polacek <polacek@redhat.com>
3131
3132 PR bootstrap/67030
3133 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
3134
05b28fd6
MP
31352015-07-27 Marek Polacek <polacek@redhat.com>
3136
3137 PR c++/66555
3138 PR c/54979
3139 * c-common.c (find_array_ref_with_const_idx_r): New function.
3140 (warn_tautological_cmp): New function.
3141 * c-common.h (warn_tautological_cmp): Declare.
3142 * c.opt (Wtautological-compare): New option.
3143
5a5062b8
MP
31442015-07-23 Marek Polacek <polacek@redhat.com>
3145
3146 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
3147 (ubsan_instrument_shift): Likewise.
3148
dc891fe7
MP
31492015-07-23 Marek Polacek <polacek@redhat.com>
3150
3151 PR sanitizer/66908
3152 * c-ubsan.c: Include gimplify.h.
3153 (ubsan_instrument_division): Unshare OP0 and OP1.
3154 (ubsan_instrument_shift): Likewise.
3155
451b5e48
MP
31562015-07-20 Marek Polacek <polacek@redhat.com>
3157 Richard Sandiford <richard.sandiford@arm.com>
3158
3159 PR c++/55095
3160 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
3161 Use EXPR_LOC_OR_LOC.
3162 (maybe_warn_shift_overflow): New function.
3163 * c-common.h (maybe_warn_shift_overflow): Declare.
3164 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
3165 * c.opt (Wshift-overflow): New option.
3166
fb0b2914
ML
31672015-07-16 Martin Liska <mliska@suse.cz>
3168
3169 * c-format.c (static void check_format_info_main): Use
3170 object_allocator instead of pool_allocator.
3171 (check_format_arg): Likewise.
3172 (check_format_info_main): Likewise.
3173
903f5c23
AM
31742015-07-15 Andrew MacLeod <amacleod@redhat.com>
3175
3176 * c-opts.c: Remove multiline #include comment.
3177
026c3cfd
AH
31782015-07-12 Aldy Hernandez <aldyh@redhat.com>
3179
3180 * c-common.c: Fix double word typos.
3181
bb49ee66
EB
31822015-07-10 Eric Botcazou <ebotcazou@adacore.com>
3183
3184 * c-ada-spec.h (cpp_operation): Revert latest change.
3185 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
3186 constructors and destructors.
3187
1916bcb5
AM
31882015-07-09 Andrew MacLeod <amacleod@redhat.com>
3189
3190 * c-common.h: Adjust includes for flags.h changes.
3191 * stub-objc.c: Likewise.
026c3cfd 3192
a9dcd529
EB
31932015-07-08 Eric Botcazou <ebotcazou@adacore.com>
3194
3195 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
3196 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
3197
b03b462f
JJ
31982015-07-08 Jakub Jelinek <jakub@redhat.com>
3199
3200 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
3201 are to be removed, return NULL rather than original clauses list.
3202
c7131fb2
AM
32032015-07-07 Andrew MacLeod <amacleod@redhat.com>
3204
3205 * array-notation-common.c: Adjust includes.
3206 * c-ada-spec.c: Likewise.
3207 * c-cilkplus.c: Likewise.
3208 * c-common.h: Likewise.
3209 * c-cppbuiltin.c: Likewise.
3210 * c-dump.c: Likewise.
3211 * c-format.c: Likewise.
3212 * c-gimplify.c: Likewise.
3213 * c-indentation.c: Likewise.
3214 * c-lex.c: Likewise.
3215 * c-omp.c: Likewise.
3216 * c-opts.c: Likewise.
3217 * c-pch.c: Likewise.
3218 * c-ppoutput.c: Likewise.
3219 * c-pragma.c: Likewise.
3220 * c-pretty-print.c: Likewise.
3221 * c-semantics.c: Likewise.
3222 * c-ubsan.c: Likewise.
3223 * cilk.c: Likewise.
3224 * stub-objc.c: Likewise.
3225
2a7fb83f
EB
32262015-07-07 Eric Botcazou <ebotcazou@adacore.com>
3227
3228 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
3229 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
3230
a03c9bf1
JM
32312015-07-01 Jason Merrill <jason@redhat.com>
3232
36a85135
JM
3233 * c-common.h (D_CXX11): Rename from D_CXX0X.
3234 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
3235 * c-common.c: Adjust.
3236
e7fa68d5
JM
3237 * c-opts.c (c_common_post_options): Default to C++14.
3238
a03c9bf1
JM
3239 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
3240
fe95b036
ESR
32412015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
3242
3243 Implement N4197 - Adding u8 character literals
b3d5bc62 3244 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 3245 CPP_CHAR.
b3d5bc62 3246 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 3247 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 3248 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
3249 and CPP_UTF8CHAR tokens.
3250 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 3251
da2e71c9
MLI
32522015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
3253
3254 PR fortran/66605
3255 * c-common.c (do_warn_unused_parameter): Move here.
3256 * c-common.h (do_warn_unused_parameter): Declare.
3257
b155cfd9
MP
32582015-06-29 Marek Polacek <polacek@redhat.com>
3259
3260 PR c/66322
3261 * c-common.c (check_case_bounds): Add bool * parameter. Set
3262 OUTSIDE_RANGE_P.
3263 (c_add_case_label): Add bool * parameter. Pass it down to
3264 check_case_bounds.
3265 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
3266 warning here.
3267 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
3268 declarations.
3269
31521951
MP
32702015-06-27 Marek Polacek <polacek@redhat.com>
3271
3272 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
3273 or VECTOR_INTEGER_TYPE_P throughout.
3274 * c-gimplify.c: Likewise.
3275
22d03525
MP
32762015-06-26 Marek Polacek <polacek@redhat.com>
3277
3278 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
3279 * c-common.c (c_fully_fold_internal): Likewise.
3280 (c_alignof_expr): Likewise.
3281 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
3282 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 3283 * cilk.c (create_parm_list): Likewise.
22d03525 3284
af05e6e5
MP
32852015-06-26 Marek Polacek <polacek@redhat.com>
3286
3287 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
3288
f0889939
AM
32892015-06-25 Andrew MacLeod <amacleod@redhat.com>
3290
3291 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
3292 * c-gimplify.c: Likewise.
3293 * c-pragma.c: Likewise.
3294 * c-ubsan.c: Likewise.
3295 * cilk.c: Likewise.
3296
ca752f39
RS
32972015-06-25 Richard Sandiford <richard.sandiford@arm.com>
3298
3299 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
3300 ggc_hasher.
3301
16a16ec7
AM
33022015-06-25 Andrew MacLeod <amacleod@redhat.com>
3303
3304 * cilk.c: Move calls.h after tm.h in the include chain.
3305
0ae9bd27
MP
33062015-06-25 Marek Polacek <polacek@redhat.com>
3307
3308 * array-notation-common.c: Use VAR_P throughout.
3309 * c-ada-spec.c: Likewise.
3310 * c-common.c: Likewise.
3311 * c-format.c: Likewise.
3312 * c-gimplify.c: Likewise.
3313 * c-omp.c: Likewise.
3314 * c-pragma.c: Likewise.
3315 * c-pretty-print.c: Likewise.
3316 * cilk.c: Likewise.
3317
62f9079a
MP
33182015-06-25 Marek Polacek <polacek@redhat.com>
3319
3320 * cilk.c (extract_free_variables): Use is_global_var.
3321
0fa16060
RS
33222015-06-23 Richard Sandiford <richard.sandiford@arm.com>
3323
3324 * c-common.c: Don't include target-def.h.
3325
a68ae2e1
MP
33262015-06-23 Marek Polacek <polacek@redhat.com>
3327
3328 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
3329 when comparing INTEGER_CSTs.
3330
c6a2f2d9
PMR
33312015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
3332
3333 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
3334 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
3335 (dump_ada_template): Skip partially specialized types.
3336
6b4db501
MM
33372015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
3338
3339 * c-common.c (scalar_to_vector): Use std::swap instead of manually
3340 swapping.
3341
abb226c9
AM
33422015-06-17 Andrew MacLeod <amacleod@redhat.com>
3343
3344 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
3345 * c-ada-spec.c: Likewise.
3346 * c-cilkplus.c: Likewise.
3347 * c-common.c: Likewise.
3348 * c-common.h: Likewise.
3349 * c-cppbuiltin.c: Likewise.
3350 * c-dump.c: Likewise.
3351 * c-format.c: Likewise.
3352 * c-gimplify.c: Likewise.
3353 * c-indentation.c: Likewise.
3354 * c-lex.c: Likewise.
3355 * c-omp.c: Likewise.
3356 * c-opts.c: Likewise.
3357 * c-pch.c: Likewise.
3358 * c-ppoutput.c: Likewise.
3359 * c-pragma.c: Likewise.
3360 * c-pretty-print.c: Likewise.
3361 * c-semantics.c: Likewise.
3362 * c-ubsan.c: Likewise.
3363 * cilk.c: Likewise.
3364 * stub-objc.c: Likewise.
3365
076fecad
PP
33662015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
3367
3368 PR c++/65168
3369 * c-common.c (c_common_truthvalue_conversion): Warn when
3370 converting an address of a reference to a truth value.
3371
13fdf2e2
AM
33722015-06-08 Andrew MacLeod <amacleod@redhat.com>
3373
3374 * array-notation-common.c : Adjust include files.
3375 * c-ada-spec.c : Likewise.
3376 * c-cilkplus.c : Likewise.
3377 * c-common.c : Likewise.
3378 * c-common.h : Likewise.
3379 * c-cppbuiltin.c : Likewise.
3380 * c-dump.c : Likewise.
3381 * c-format.c : Likewise.
3382 * c-gimplify.c : Likewise.
3383 * c-indentation.c : Likewise.
3384 * c-lex.c : Likewise.
3385 * c-omp.c : Likewise.
3386 * c-opts.c : Likewise.
3387 * c-pch.c : Likewise.
3388 * c-ppoutput.c : Likewise.
3389 * c-pragma.c : Likewise.
3390 * c-pretty-print.c : Likewise.
3391 * c-semantics.c : Likewise.
3392 * c-ubsan.c : Likewise.
3393 * cilk.c : Likewise.
3394 * stub-objc.c : Likewise.
3395
a1661b90
MP
33962015-06-08 Marek Polacek <polacek@redhat.com>
3397
3398 PR c/66415
3399 * c-format.c (location_from_offset): Return LOC if LINE is null.
3400
d7438551
AH
34012015-06-05 Aldy Hernandez <aldyh@redhat.com>
3402
3403 * c-common.h (c_parse_final_cleanups): New prototype.
3404 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
3405
b3d5bc62
JJ
34062015-06-04 Sriraman Tallam <tmsriram@google.com>
3407
3408 * c-common.c (noplt): New attribute.
3409 (handle_noplt_attribute): New handler.
3410
ecb9f223
AM
34112015-06-04 Andrew MacLeod <amacleod@redhat.com>
3412
3413 * array-notation-common.c: Adjust includes for restructured coretypes.h.
3414 * c-ada-spec.c: Likewise.
3415 * c-cilkplus.c: Likewise.
3416 * c-common.c: Likewise.
3417 * c-common.h: Likewise.
3418 * c-cppbuiltin.c: Likewise.
3419 * c-dump.c: Likewise.
3420 * c-format.c: Likewise.
3421 * c-gimplify.c: Likewise.
3422 * c-indentation.c: Likewise.
3423 * c-lex.c: Likewise.
3424 * c-omp.c: Likewise.
3425 * c-opts.c: Likewise.
3426 * c-pch.c: Likewise.
3427 * c-ppoutput.c: Likewise.
3428 * c-pragma.c: Likewise.
3429 * c-pretty-print.c: Likewise.
3430 * c-semantics.c: Likewise.
3431 * c-ubsan.c: Likewise.
3432 * cilk.c: Likewise.
3433 * stub-objc.c: Likewise.
3434
6ac48155
DM
34352015-06-02 David Malcolm <dmalcolm@redhat.com>
3436
3437 PR c/66220:
3438 * c-indentation.c (should_warn_for_misleading_indentation): Use
3439 expand_location rather than expand_location_to_spelling_point.
3440 Don't warn if the guarding statement is more indented than the
3441 next/body stmts.
3442
773ce42e
DM
34432015-06-02 David Malcolm <dmalcolm@redhat.com>
3444
3445 * c-indentation.c (warn_for_misleading_indentation): Bail out
3446 immediately if -Wmisleading-indentation isn't enabled.
3447
4fef8379
ML
34482015-06-01 Martin Liska <mliska@suse.cz>
3449
3450 * c-format.c (check_format_arg):Use new type-based pool allocator.
3451 (check_format_info_main) Likewise.
3452
1edfb384
EB
34532015-05-31 Eric Botcazou <ebotcazou@adacore.com>
3454
3455 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
3456 (has_nontrivial_methods): Likewise.
3457
9677ef52
MP
34582015-05-25 Marek Polacek <polacek@redhat.com>
3459
3460 * c-ubsan.c (ubsan_instrument_shift): Use type0.
3461
fd5c817a
MP
34622015-05-22 Marek Polacek <polacek@redhat.com>
3463
3464 PR c/47043
3465 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
3466
a2f45fe6 34672015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
3468
3469 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
3470 STACK_GROWS_DOWNWARD.
3471
a2f45fe6 34722015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
3473
3474 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
3475 STACK_GROWS_DOWNWARD rather than if it is defined.
3476
0fee2ac2 34772015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 3478
0fee2ac2
MLI
3479 PR c/52952
3480 * c-format.c (location_column_from_byte_offset): New.
3481 (location_from_offset): New.
3482 (struct format_wanted_type): Add offset_loc field.
3483 (check_format_info): Move handling of location for extra arguments
3484 closer to the point of warning.
3485 (check_format_info_main): Pass the result of location_from_offset
3486 to warning_at.
3487 (format_type_warning): Pass the result of location_from_offset
3488 to warning_at.
3489
cf4ef6f7
MP
34902015-05-20 Marek Polacek <polacek@redhat.com>
3491
3492 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
3493
3a65ee74
MP
34942015-05-20 Marek Polacek <polacek@redhat.com>
3495
3496 * c-ada-spec.c (dump_sloc): Use DECL_P.
3497
21b634ae
MP
34982015-05-20 Marek Polacek <polacek@redhat.com>
3499
3500 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
3501 * c-common.c: Likewise.
3502
0e50b624
DM
35032015-05-19 David Malcolm <dmalcolm@redhat.com>
3504
3505 * c-common.h (fe_file_change): Strengthen param from
3506 const line_map * to const line_map_ordinary *.
3507 (pp_file_change): Likewise.
3508 * c-lex.c (fe_file_change): Likewise.
3509 (cb_define): Use linemap_check_ordinary when invoking
3510 SOURCE_LINE.
3511 (cb_undef): Likewise.
3512 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
3513 invoking cb_file_change.
3514 (c_finish_options): Likewise.
3515 (push_command_line_include): Likewise.
3516 (cb_file_change): Strengthen param "new_map" from
3517 const line_map * to const line_map_ordinary *.
3518 * c-ppoutput.c (cb_define): Likewise for local "map".
3519 (pp_file_change): Likewise for param "map" and local "from".
3520
fab27f52
MM
35212015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
3522
3523 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
3524
2fe1d762
TV
35252015-05-18 Tom de Vries <tom@codesourcery.com>
3526
3527 * c-common.c (build_va_arg_1): New function.
3528 (build_va_arg): Add address operator to va_list operand if necessary.
3529
7a37fa90
MM
35302015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
3531
3532 PR c/48956
3533 * c-common.c (int_safely_convertible_to_real_p): Define.
3534 (unsafe_conversion_p): Check conversions involving complex types.
3535 (conversion_warning): Add new warning message for conversions which
3536 discard imaginary component.
3537 * c-common.h: (enum conversion_safety): Add new enumerator for such
3538 conversions.
3539
3aa3c9fc
MP
35402015-05-14 Marek Polacek <polacek@redhat.com>
3541
3542 PR c/66066
3543 PR c/66127
3544 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
3545 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
3546 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
3547 use it. If FOR_INT_CONST, require that all evaluated operands be
3548 INTEGER_CSTs.
3549
c3388e62
DM
35502015-05-12 David Malcolm <dmalcolm@redhat.com>
3551
3552 * c-common.h (warn_for_misleading_indentation): New prototype.
3553 * c-indentation.c: New file.
3554 * c.opt (Wmisleading-indentation): New option.
3555
c7b38fd5
TV
35562015-05-12 Tom de Vries <tom@codesourcery.com>
3557
3558 PR tree-optimization/66010
3559 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
3560
381bf11e
JM
35612015-05-09 Jason Merrill <jason@redhat.com>
3562
edff0c06
JM
3563 * c-opts.c (c_common_post_options): Also clear
3564 cpp_opts->cpp_warn_cxx11_compat.
3565
129211bc
JM
3566 * c-common.h (enum cxx_dialect): Add cxx_unset.
3567 * c-common.c (cxx_dialect): Initialize to cxx_unset.
3568 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
3569
381bf11e
JM
3570 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
3571 (std=gnu++0x): Mark as Undocumented.
3572 (std=gnu++1y): Add deprecated message.
3573
fe191308
JM
35742015-05-08 Jason Merrill <jason@redhat.com>
3575
765189ff
JM
3576 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
3577 * c-opts.c: Adjust.
3578
fe191308
JM
3579 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
3580
755e528f
MP
35812015-05-08 Marek Polacek <polacek@redhat.com>
3582
3583 PR c/64918
3584 * c.opt (Woverride-init-side-effects): New option.
3585
0173bd2a
MP
35862015-05-07 Marek Polacek <polacek@redhat.com>
3587
3588 PR c/65179
3589 * c-common.c (c_fully_fold_internal): Warn when left shifting a
3590 negative value.
3591 * c.opt (Wshift-negative-value): New option.
3592 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
3593 when -Wextra and C99/C++11 mode.
3594
e0f0d3b9
MP
35952015-05-07 Marek Polacek <polacek@redhat.com>
3596 Martin Uecker <uecker@eecs.berkeley.edu>
3597
3598 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
3599 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
3600
8243e2a9
JM
36012015-05-05 Jason Merrill <jason@redhat.com>
3602
3603 * c.opt (Wterminate): New.
3604
577cd070
MP
36052015-04-30 Marek Polacek <polacek@redhat.com>
3606
3607 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
3608 require that the non-constant be of a boolean type.
3609
0373796b
JT
36102015-04-29 Josh Triplett <josh@joshtriplett.org>
3611
e0f0d3b9
MP
3612 * c-common.c (handle_section_attribute): Refactor to reduce
3613 nesting and distinguish between error cases.
0373796b 3614
716c0ba6
MP
36152015-04-29 Marek Polacek <polacek@redhat.com>
3616
3617 PR c/64610
3618 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
3619 with 0/1.
3620
8848828b
JJ
36212015-04-29 Jakub Jelinek <jakub@redhat.com>
3622
3623 * c-common.h (omp_clause_mask): Unconditionally define as a class.
3624 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
3625 HOST_BITS_PER_WIDE_INT.
3626
ecd0e562
TV
36272015-04-28 Tom de Vries <tom@codesourcery.com>
3628
3629 PR tree-optimization/65887
3630 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
3631
2a877204 36322015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 3633 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
3634
3635 * c-ada-spec.c (in_function): Delete.
3636 (dump_generic_ada_node): Do not change in_function and remove the
3637 redundant code dealing with it.
3638 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
3639 (print_ada_methods): Output the static member functions in a nested
3640 package after the regular methods as well as associated renamings.
3641
4853031e
MP
36422015-04-24 Marek Polacek <polacek@redhat.com>
3643
3644 PR c/65830
3645 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
3646 and OPT_Wshift_count_overflow.
3647
8c2b7f79
MP
3648 PR c/63357
3649 * c-common.c (warn_logical_operator): Warn if the operands have the
3650 same expressions.
3651
b8787813
MP
36522015-04-24 Marek Polacek <polacek@redhat.com>
3653
3654 PR c/61534
3655 * c-common.c (warn_logical_operator): Bail if either operand comes
3656 from a macro expansion.
3657
8fba1830
BRF
36582015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
3659
3660 PR target/55143
3661 * c-common.c (c_default_pointer_mode): Add definition.
3662 * c-common.h (c_default_pointer_mode): Add declaration.
3663
17958621
JJ
36642015-03-11 Jakub Jelinek <jakub@redhat.com>
3665
3666 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
3667 on record_builtin_type argument.
3668
7ccb1a11
JJ
36692015-03-10 Jakub Jelinek <jakub@redhat.com>
3670
3671 PR c/65120
3672 * c-common.c (warn_logical_not_parentheses): Don't warn for
3673 !x == 0 or !x != 0.
3674
04fd785e
MP
36752015-03-07 Marek Polacek <polacek@redhat.com>
3676
3677 PR sanitizer/65280
3678 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
3679 before trying to figure out whether we have a flexible array member.
3680
a4e26206 36812015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3682 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
3683
3684 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
3685
0d2489f4
EB
36862015-03-05 Eric Botcazou <ebotcazou@adacore.com>
3687
3688 PR ada/65319
3689 * c-ada-spec.c (print_destructor): Remove obsolete code.
3690
83ed54d7
EB
36912015-03-01 Eric Botcazou <ebotcazou@adacore.com>
3692
3693 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
3694 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
3695 DECL_TEMPLATE_RESULT emulations.
3696 (dump_ada_template)): Add guard for TYPE_METHODS.
3697
7631f0e2
MP
36982015-02-27 Marek Polacek <polacek@redhat.com>
3699
3700 PR c/65040
3701 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
3702
d1783ae5
KT
37032015-02-27 Kai Tietz <ktietz@redhat.com>
3704
3705 PR c/35330
3706 * c-pragma.c (handle_pragma_weak): Do not try to create
3707 weak/alias of declarations not being function, or variable
3708 declarations.
3709
56a9f6bc
TS
37102015-02-24 Thomas Schwinge <thomas@codesourcery.com>
3711
3712 PR libgomp/64625
3713 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3714 Remove macros.
3715 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
3716
3d5cb23d
MP
37172015-02-16 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/65066
3720 * c-format.c (check_format_types): Handle null param.
3721
fa008882
MP
37222015-02-13 Marek Polacek <polacek@redhat.com>
3723
3724 PR c/65040
3725 * c-format.c (check_format_types): Don't warn about different
3726 signedness if the original value is in the range of WANTED_TYPE.
3727
785f21af
JM
37282015-02-12 Jason Merrill <jason@redhat.com>
3729
3730 PR c++/64956
3731 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
3732 to the current highest version.
3733 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
3734
4886ec8e
JJ
37352015-02-04 Jakub Jelinek <jakub@redhat.com>
3736
3737 PR c/64824
3738 PR c/64868
3739 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
3740 instead of RDIV_EXPR. Use build_binary_op instead of
3741 build2_loc.
3742
40fecdd6
JM
37432015-01-30 Joseph Myers <joseph@codesourcery.com>
3744
3745 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
3746 to pass input_location as first argument.
3747
a0c88d06
TV
37482015-01-23 Tom de Vries <tom@codesourcery.com>
3749
3750 PR libgomp/64672
3751 * c.opt (fopenacc): Mark as LTO option.
3752
1506ae0e
TV
37532015-01-23 Tom de Vries <tom@codesourcery.com>
3754
3755 PR libgomp/64707
3756 * c.opt (fopenmp): Mark as LTO option.
3757
31be63ab
JJ
37582015-01-21 Jakub Jelinek <jakub@redhat.com>
3759
3760 PR c/63307
b1726d6c 3761 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
3762 (compare_decls): Fix up formatting.
3763
37642015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
3765
3766 PR c/63307
3767 * cilk.c: Include vec.h.
3768 (struct cilk_decls): New structure.
3769 (wrapper_parm_cb): Split this function to...
3770 (fill_decls_vec): ...this...
3771 (create_parm_list): ...and this.
3772 (compare_decls): New function.
3773 (for_local_cb): Remove.
3774 (wrapper_local_cb): Ditto.
3775 (build_wrapper_type): For now first traverse and fill vector of
3776 declarations then sort it and then deal with sorted vector.
3777 (cilk_outline): Ditto.
3778 (declare_one_free_variable): Ditto.
3779
6875457f
JM
37802015-01-21 Jason Merrill <jason@redhat.com>
3781
3782 PR c++/64629
3783 * c-format.c (check_format_arg): Call decl_constant_value.
3784
185c9e56
ML
37852015-01-19 Martin Liska <mliska@suse.cz>
3786
3787 * c-common.c (handle_noicf_attribute): New function.
3788
41dbbb37
TS
37892015-01-15 Thomas Schwinge <thomas@codesourcery.com>
3790 Bernd Schmidt <bernds@codesourcery.com>
3791 James Norris <jnorris@codesourcery.com>
3792 Cesar Philippidis <cesar@codesourcery.com>
3793 Ilmir Usmanov <i.usmanov@samsung.com>
3794 Jakub Jelinek <jakub@redhat.com>
3795
3796 * c.opt (fopenacc): New option.
3797 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
3798 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
3799 New macros.
3800 * c-common.h (c_finish_oacc_wait): New prototype.
3801 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
3802 (c_finish_oacc_wait): New function.
3803 * c-pragma.c (oacc_pragmas): New variable.
3804 (c_pp_lookup_pragma, init_pragma): Handle it.
3805 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
3806 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
3807 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
3808 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
3809 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
3810 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
3811 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
3812 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
3813 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
3814 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
3815 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
3816 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
3817 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
3818 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
3819 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
3820 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
3821 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
3822 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
3823 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
3824 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
3825 PRAGMA_OACC_CLAUSE_WORKER.
3826
3f8257db 38272015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
3828
3829 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
3830 for the new option fstack-protector_explicit.
3831 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
3832 (handle_stack_protect_attribute): New function.
3833
3f8257db 38342015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
3835
3836 * c.opt: New option -Warray-bounds=.
3837
adfac8df
JJ
38382015-01-09 Michael Collison <michael.collison@linaro.org>
3839
3840 * array-notation-common.c: Include hash-set.h, machmode.h,
3841 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3842 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
3843 * c-ada-spec.c: Ditto.
3844 * c-cilkplus.c: Ditto.
3845 * c-common.c: Include input.h due to flattening of tree.h.
3846 Define macro GCC_C_COMMON_C.
3847 * c-common.h: Flatten tree.h header files into c-common.h.
3848 Remove include of tree-core.h.
3849 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3850 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3851 fold-const.h, wide-int.h, and inchash.h due to
3852 flattening of tree.h.
3853 * c-dump.c: Ditto.
3854 * c-format.c: Flatten tree.h header files into c-common.h.
3855 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
3856 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3857 fold-const.h, wide-int.h, and inchash.h due to
3858 flattening of tree.h.
3859 * c-dump.c: Include hash-set.h, machmode.h,
3860 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3861 fold-const.h, wide-int.h, and inchash.h due to
3862 flattening of tree.h.
3863 * c-format.c: Include hash-set.h, machmode.h,
3864 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3865 fold-const.h, wide-int.h, inchash.h and real.h due to
3866 flattening of tree.h.
3867 * c-gimplify.c: Include hash-set.h, machmode.h,
3868 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
3869 fold-const.h, wide-int.h, and inchash.h due to
3870 flattening of tree.h.
3871 * cilk.c: Ditto.
3872 * c-lex.c: Ditto.
3873 * c-omp.c: Ditto.
3874 * c-opts.c: Ditto.
3875 * c-pch.c: Ditto.
3876 * c-ppoutput.c: Ditto.
3877 * c-pragma.c: Ditto.
3878 * c-pretty-print.c: Ditto.
3879 * c-semantics.c: Ditto.
3880 * c-ubsan.c: Ditto.
3881 * stub-objc.c: Ditto.
3882
f5481fc4
JM
38832015-01-08 Jason Merrill <jason@redhat.com>
3884
3885 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
3886 do_ubsan_in_current_function.
3887 (ubsan_maybe_instrument_reference_or_call): Likewise.
3888 * c-ubsan.h: Declare it.
3889
de35aa66
MS
38902015-01-08 Mike Stump <mikestump@comcast.net>
3891
3892 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
3893
4a9a42ab
MP
38942015-01-07 Marek Polacek <polacek@redhat.com>
3895
3896 PR c/64440
3897 * c-common.c (c_fully_fold_internal): Warn for division and modulo
3898 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
3899
2f42e5de
TS
39002015-01-05 Trevor Saunders <tsaunders@mozilla.com>
3901
3902 PR c++/31397
3903 * c.opt (Wsuggest-override): New option.
3904
5624e564
JJ
39052015-01-05 Jakub Jelinek <jakub@redhat.com>
3906
3907 Update copyright years.
3908
5bd012f8
MP
39092015-01-05 Marek Polacek <polacek@redhat.com>
3910
3911 PR c/64423
3912 * c-common.c (warn_array_subscript_with_type_char): Add location_t
3913 parameter. Use it.
3914 * c-common.h (warn_array_subscript_with_type_char): Update
3915 declaration.
3916
a7fa8d18
ESR
39172014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
3918
3919 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
3920 Control macro with flag_sized_deallocation.
3921
3f8257db 39222014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
3923
3924 * c.opt (Wdiscarded-array-qualifiers): New option.
3925
1f8d3e84
JJ
39262014-12-19 Jakub Jelinek <jakub@redhat.com>
3927
3928 PR preprocessor/63831
3929 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
3930 and __has_cpp_attribute here.
3931 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
3932 c_common_has_attribute.
3933 * c-common.h (c_common_has_attribute): New prototype.
3934 * c-lex.c (init_c_lex): Set cb->has_attribute to
3935 c_common_has_attribute instead of cb_has_attribute.
3936 (get_token_no_padding): New function.
3937 (cb_has_attribute): Renamed to ...
3938 (c_common_has_attribute): ... this. No longer static. Use
3939 get_token_no_padding, require ()s, don't build TREE_LIST
3940 unnecessarily, fix up formatting, adjust diagnostics, call
3941 init_attributes.
3942
20b06add
JM
39432014-12-15 Jason Merrill <jason@redhat.com>
3944
3945 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
3946 (-Wsized-deallocation): New.
3947 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
3948 to on in C++14 and up.
3949
94a073b2
JM
39502014-12-11 Jason Merrill <jason@redhat.com>
3951
acaa5911
JM
3952 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
3953
94a073b2
JM
3954 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
3955 we aren't complaining about VLAs.
3956
7fb66c15
MP
39572014-12-06 Marek Polacek <polacek@redhat.com>
3958
3959 PR tree-optimization/64183
3960 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
3961 shift-expression if it is integer_type_node. Use types_compatible_p.
3962
b731b390
JJ
39632014-11-29 Jakub Jelinek <jakub@redhat.com>
3964
3965 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
3966 last argument from create_tmp_var_raw and create_tmp_var calls.
3967 * cilk.c (gimplify_cilk_spawn): Likewise.
3968 * c-omp.c (c_finish_omp_atomic): Likewise.
3969
6a4da643
MP
39702014-11-28 Marek Polacek <polacek@redhat.com>
3971
3972 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
3973 instead of unsigned_type_node.
3974
541e35a6
MP
39752014-11-28 Marek Polacek <polacek@redhat.com>
3976
3977 PR c/63862
3978 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
3979 to op1_utype.
3980 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
3981 expression to unsigned_type_node.
3982
dcc97066
MW
39832014-11-20 Mark Wielaard <mjw@redhat.com>
3984
3985 PR debug/38757
3986 * c-opts.c (set_std_c89): Set lang_hooks.name.
3987 (set_std_c99): Likewise.
3988 (set_std_c11): Likewise.
3989 (set_std_cxx98): Likewise.
3990 (set_std_cxx11): Likewise.
3991 (set_std_cxx14): Likewise.
3992 (set_std_cxx1z): Likewise.
3993
aa7da51a
JJ
39942014-11-21 Jakub Jelinek <jakub@redhat.com>
3995
3996 PR target/63764
3997 * c-common.h (convert_vector_to_pointer_for_subscript): Change
3998 return type to bool.
009a3480 3999 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
4000 (convert_vector_to_pointer_for_subscript): Change return type to
4001 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
4002 and copy it into a TARGET_EXPR and use that instead of *vecp
4003 directly.
4004
538dd0b7
DM
40052014-11-19 David Malcolm <dmalcolm@redhat.com>
4006
4007 Merger of git branch "gimple-classes-v2-option-3".
4008 * ChangeLog.gimple-classes: New.
4009 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
4010 from being just a vec<gimple> to a vec<gbind *>.
4011
c39a5e99
JJ
40122014-11-18 Jakub Jelinek <jakub@redhat.com>
4013
4014 PR sanitizer/63813
4015 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
4016 argument to ptype, set type to TREE_TYPE (ptype). Don't call
4017 get_pointer_alignment for non-pointers. Use ptype, or if it is
4018 reference type, corresponding pointer type, as type of kind
4019 argument.
4020 (ubsan_maybe_instrument_reference,
4021 ubsan_maybe_instrument_member_call): Adjust callers.
4022
8537a4a9
MP
40232014-11-15 Marek Polacek <polacek@redhat.com>
4024
4025 PR middle-end/63884
4026 * array-notation-common.c (is_sec_implicit_index_fn): Return false
4027 for NULL fndecl.
4028 (extract_array_notation_exprs): Return for NULL node.
4029
2079956a
JM
40302014-11-12 Joseph Myers <joseph@codesourcery.com>
4031
4032 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
4033 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
4034
1304953e
JJ
40352014-11-12 Jakub Jelinek <jakub@redhat.com>
4036
4037 PR c/59708
4038 * c-common.c (check_builtin_function_arguments): Handle
4039 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
4040
e5e44252
AK
40412014-11-10 Andi Kleen <ak@linux.intel.com>
4042
4043 PR c/60804
4044 * c-common.h (check_no_cilk): Declare.
4045 * cilk.c (get_error_location): New function.
4046 (check_no_cilk): Dito.
4047
e64b984d
AK
40482014-11-10 Andi Kleen <ak@linux.intel.com>
4049
4050 * cilk.c (recognize_spawn): Use expression location
4051 for error message.
4052
13c21655
PC
40532014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
4054
4055 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
4056
42fd12b1
ESR
40572014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
4058
4059 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
4060 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
4061 (__cpp_range_based_for, __cpp_initializer_lists,
4062 __cpp_delegating_constructors, __cpp_nsdmi,
4063 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
4064 for C++11; (__cpp_attribute_deprecated): Remove in favor of
4065 __has_cpp_attribute.
4066 * c-lex.c (cb_has_attribute): New callback CPP function;
4067 (init_c_lex): Set has_attribute callback.
4068
6f450181
RB
40692014-11-04 Richard Biener <rguenther@suse.de>
4070
4071 * c-common.c (shorten_compare): Do not shorten mixed
4072 DFP and non-DFP compares.
4073
26f0e1d6
ESR
40742014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4075
4076 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
4077 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
4078 Commentary and rearrangement of tests.
4079 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
4080 Commentary and rearrangement of tests.
4081 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
4082 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
4083
ef4bddc2
RS
40842014-10-29 Richard Sandiford <richard.sandiford@arm.com>
4085
4086 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
4087 enum from machine_mode.
4088
c582198b
AM
40892014-10-28 Andrew MacLeod <amacleod@redhat.com>
4090
adfac8df
JJ
4091 * c-common.c: Adjust include files.
4092 * c-gimplify.c: Ditto.
4093 * cilk.c: Ditto.
4094 * c-pragma.c: Ditto.
4095 * c-ubsan.c: Ditto.
c582198b 4096
60393bbc
AM
40972014-10-27 Andrew MacLeod <amacleod@redhat.com>
4098
4099 * c-gimplify.c: Adjust include files.
4100
d723bb7c
MLI
41012014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
4102
4103 PR c++/53061
4104 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
4105 c_common_initialize_diagnostics.
4106 * c-common.h: Likewise.
4107
90f3520e
MP
41082014-10-24 Marek Polacek <polacek@redhat.com>
4109
4110 PR c/56980
4111 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
4112 print "struct"/"union"/"enum" for typedefed names.
4113
59d7607a
MP
41142014-10-23 Marek Polacek <polacek@redhat.com>
4115
4116 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
4117 in unsigned type.
4118
d95a2703
JJ
41192014-10-22 Jakub Jelinek <jakub@redhat.com>
4120 Yury Gribov <y.gribov@samsung.com>
4121
4122 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4123 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
4124 instead of flag_sanitize_recover as bool flag.
4125
8e6ef852
KY
41262014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
4127
4128 * cilk.c: Revert previous change.
4129
948cf550
IZ
41302014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
4131
4132 PR c/63307
4133 * cilk.c: Include vec.h.
4134 (struct cilk_decls): New structure.
4135 (wrapper_parm_cb): Split this function to...
4136 (fill_decls_vec): ...this...
4137 (create_parm_list): ...and this.
4138 (compare_decls): New function.
4139 (for_local_cb): Remove.
4140 (wrapper_local_cb): Ditto.
4141 (build_wrapper_type): For now first traverse and fill vector of
4142 declarations then sort it and then deal with sorted vector.
4143 (cilk_outline): Ditto.
4144 (declare_one_free_variable): Ditto.
4145
92574c7c
MP
41462014-10-17 Marek Polacek <polacek@redhat.com>
4147
4148 * c-opts.c (c_common_post_options): Set warn_implicit_int.
4149 * c.opt (Wimplicit-int): Initialize to -1.
4150
83685514
AM
41512014-10-16 Andrew MacLeod <amacleod@redhat.com>
4152
4153 * c-pragma.c: Adjust include files.
4154 * c-semantics.c: Likewise.
4155
5b8300ea
DD
41562014-10-16 DJ Delorie <dj@redhat.com>
4157
4158 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
4159 multiples of bytes.
4160
5f83e90b
JM
41612014-10-14 Jason Merrill <jason@redhat.com>
4162
4163 PR c++/63455
4164 * c-common.h (CPP_PREPARSED_EXPR): New.
4165 (N_CP_TTYPES): Adjust.
4166
d73326ca
MP
41672014-10-15 Marek Polacek <polacek@redhat.com>
4168
4169 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
4170
78a7c317
DD
41712014-10-14 DJ Delorie <dj@redhat.com>
4172
4173 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
4174 types, not just __int128.
4175 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
4176 types, not just __int128.
4177 (cpp_atomic_builtins): Round pointer sizes up.
4178 (type_suffix): Use type precision, not specific types.
4179 * c-common.c (c_common_reswords): Remove __int128 special case.
4180 (c_common_type_for_size): Check for all __intN types, not just
4181 __int128.
4182 (c_common_type_for_mode): Likewise.
4183 (c_common_signed_or_unsigned_type): Likewise.
4184 (c_build_bitfield_integer_type): Likewise.
4185 (c_common_nodes_and_builtins): Likewise.
4186 (keyword_begins_type_specifier): Likewise.
4187 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
4188 __intN variants.
4189
2a22f99c
TS
41902014-10-12 Trevor Saunders <tsaunders@mozilla.com>
4191
4192 * c-common.c: Use hash_table instead of hashtab.
4193
2a8ef767
ESR
41942014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
4195
adfac8df 4196 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
4197 C++11 section.
4198
3c9aabbd
MG
41992014-10-03 Marc Glisse <marc.glisse@inria.fr>
4200
4201 PR c++/54427
4202 PR c++/57198
4203 PR c++/58845
4204 * c-common.c (warn_logical_operator): Punt for vectors.
4205
a15f7cb8
ESR
42062014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
4207
4208 Implement SD-6: SG10 Feature Test Recommendations
4209 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
4210 macros and the __has_header macro.
4211
8d0cf15e
JM
42122014-09-30 Jason Merrill <jason@redhat.com>
4213
dd5d5481
JM
4214 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
4215 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
4216 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4217
b752325e
JM
4218 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
4219 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
4220
8d0cf15e
JM
4221 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
4222 * c-common.c (c_common_reswords): Remove __is_convertible_to.
4223
083e891e
MP
42242014-09-24 Marek Polacek <polacek@redhat.com>
4225
4226 PR c/61405
4227 PR c/53874
4228 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
4229
7861b648
AK
42302014-09-23 Andi Kleen <ak@linux.intel.com>
4231
4232 * c-common.c (handle_no_reorder_attribute): New function.
4233 (c_common_attribute_table): Add no_reorder attribute.
4234
9a79452d
JM
42352014-09-22 Joseph Myers <joseph@codesourcery.com>
4236
4237 * c-cppbuiltin.c (c_cpp_builtins): Define
4238 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
4239 modes.
4240
dd69f047
JM
42412014-09-18 Joseph Myers <joseph@codesourcery.com>
4242
4243 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
4244 for supported floating-point modes.
4245
737a4826
MLI
42462014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4247
4248 * c.opt (Wpsabi): Use LangEnabledBy.
4249 * c-opts.c (c_common_handle_option): Do not handle here.
4250
8cc4b7a2
JM
42512014-09-12 Joseph Myers <joseph@codesourcery.com>
4252
4253 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
4254 macros for floating-point modes.
4255
179b5a55
MG
42562014-09-11 Marc Glisse <marc.glisse@inria.fr>
4257
4258 PR target/58757
4259 * c-cppbuiltin.c (builtin_define_float_constants): Correct
4260 __*_DENORM_MIN__ without denormals.
4261
570a11fe
JJ
42622014-09-10 Jakub Jelinek <jakub@redhat.com>
4263
4264 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4265 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4266 ubsan_create_data callers.
4267 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
4268 index is constant or BIT_AND_EXPR with constant mask and is
4269 small enough for the bound.
4270 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
4271 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
4272
b559c810
MLI
42732014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4274
4275 * c.opt: Add CppReason to various flags.
4276 (Wdate-time): Re-sort.
4277 * c-common.c: Include c-common.h earlier.
4278 (struct reason_option_codes_t): Delete.
4279 (c_option_controlling_cpp_error): Prefix global type and struct
4280 with cpp_.
4281
1ef33fd4
MLI
42822014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4283
4284 * c.opt (Wnormalized): New.
4285 (Wnormalized=): Use Enum and Reject Negative.
4286 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
4287
66bb34c0
JM
42882014-09-08 Joseph Myers <joseph@codesourcery.com>
4289
4290 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
4291 digits of floating-point modes if -fbuilding-libgcc.
4292
53d68b9f
JM
42932014-09-05 Joseph Myers <joseph@codesourcery.com>
4294
4295 * c-cppbuiltin.c (c_cpp_builtins): Also define
4296 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
4297 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
4298 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
4299 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
4300 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
4301 __LIBGCC_STACK_GROWS_DOWNWARD__,
4302 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
4303 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
4304 __LIBGCC_DWARF_FRAME_REGISTERS__,
4305 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
4306 __LIBGCC_STACK_POINTER_REGNUM__ and
4307 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
4308 (builtin_define_with_value): Handle backslash-escaping in string
4309 macro values.
4310
f65586dc
RB
43112014-09-05 Richard Biener <rguenther@suse.de>
4312
4313 PR middle-end/63148
4314 * c-format.c (check_format_arg): Properly handle
4315 effectively signed POINTER_PLUS_EXPR offset.
4316
2b71f4a4
MLI
43172014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
4318
4319 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
4320 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
4321 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
4322 and Init.
4323 * c-opts.c (c_common_handle_option): Do not handle here.
4324 (sanitize_cpp_opts): Likewise.
4325 * c-common.c (struct reason_option_codes_t): Handle
4326 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
4327
d2e4feca
MP
43282014-09-03 Marek Polacek <polacek@redhat.com>
4329
4330 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
4331
9a771876
JJ
43322014-09-02 Jakub Jelinek <jakub@redhat.com>
4333 Balaji V. Iyer <balaji.v.iyer@intel.com>
4334 Igor Zamyatin <igor.zamyatin@intel.com>
4335
4336 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
4337 * c-common.c (c_common_reswords): Added _Cilk_for.
4338 * c-common.h (enum rid): Added RID_CILK_FOR.
4339 (cilk_for_number_of_iterations): Add declaration.
4340 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
4341 CILK_FOR.
4342 * c-pragma.c (init_pragma): Register "grainsize" pragma.
4343 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
4344
81b5d104
MLI
43452014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4346
4347 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
4348 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
4349 Wundef): Use CPP, Var and Init.
4350 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
4351
b753b37b
MLI
43522014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4353
4354 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
4355 * c-opts.c (c_common_handle_option): Do not handle here.
4356
028aee17
JM
43572014-08-25 Jason Merrill <jason@redhat.com>
4358
4359 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
4360 -std=c++14 and -std=gnu++14, rather than the reverse.
4361 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
4362 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
4363 * c-common.h (cxx_dialect): Remove cxx1y.
4364
e4276ba5
ESR
43652014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
4366
4367 * c-common.h (enum cxx_dialect): Add cxx14.
4368 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
4369 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
4370 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
4371
a545cacd
JM
43722014-08-22 Jason Merrill <jason@redhat.com>
4373
4374 * c.opt (std=gnu++17): Fix alias.
4375
59ea0364
MP
43762014-08-22 Marek Polacek <polacek@redhat.com>
4377
4378 PR c++/62199
4379 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
4380 check for vector types. Drop LHS argument.
4381 * c-common.h (warn_logical_not_parentheses): Adjust.
4382
596e808c
MLI
43832014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4384
4385 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
4386 (Wmultichar): Likewise.
4387 (Wdate-time): Use C-family languages instead of Common. Use CPP
4388 and Var.
4389 * c-opts.c (c_common_handle_option): Do not handle the above
4390 options here.
4391 (sanitize_cpp_opts): Likewise.
4392
18767f65
MLI
43932014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4394
4395 PR fortran/44054
4396 * c-opts.c: Include tree-diagnostics.h.
4397 (c_diagnostic_finalizer): New.
4398 (c_common_initialize_diagnostics): Use it.
4399
b4413594
MLI
44002014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4401
4402 PR preprocessor/51303
4403 * c-common.c (struct reason_option_codes_t option_codes):
4404 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
4405
43f9a13c
MLI
44062014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
4407
4408 PR c/60975
4409 PR c/53063
4410 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
4411 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
4412 (c_common_post_options): Call init_global_opts_from_cpp.
4413 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
4414
04159acf
MP
44152014-08-19 Marek Polacek <polacek@redhat.com>
4416
4417 PR c++/62153
4418 * c-common.c (maybe_warn_bool_compare): New function.
4419 * c-common.h (maybe_warn_bool_compare): Declare.
4420 * c.opt (Wbool-compare): New option.
4421
35aff4fb
MP
44222014-08-19 Marek Polacek <polacek@redhat.com>
4423
4424 * c.opt (Wc99-c11-compat): New option.
4425
177cce46
MP
44262014-08-19 Marek Polacek <polacek@redhat.com>
4427
4428 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
4429 to warn_c90_c99_compat.
4430 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
4431 to -1.
4432
6ae9194f
MLI
44332014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
4434 Steven Bosscher <steven@gcc.gnu.org>
4435
4436 PR c/52952
4437 * c-format.c: Add extra_arg_loc and format_string_loc to struct
4438 format_check_results.
4439 (check_function_format): Use true and add comment for boolean
4440 argument.
4441 (finish_dollar_format_checking): Use explicit location when warning.
4442 (check_format_info): Likewise.
4443 (check_format_arg): Set extra_arg_loc and format_string_loc.
4444 (check_format_info_main): Use explicit location when warning.
4445 (check_format_types): Pass explicit location.
4446 (format_type_warning): Likewise.
4447
8e54f6d3
MLI
44482014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
4449
4450 PR fortran/44054
4451 * c-format.c: Handle Fortran flags.
4452
cd4e76fc
IZ
44532014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
4454
4455 PR other/61962
4456 * array-notation-common.c (find_rank): Added handling for other
4457 types of references.
4458
f3bede71
MP
44592014-08-10 Marek Polacek <polacek@redhat.com>
4460
4461 PR c/51849
4462 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
4463 * c.opt (Wc90-c99-compat): Add option.
4464
9f25a338
TS
44652014-08-07 Trevor Saunders <tsaunders@mozilla.com>
4466
4467 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
4468
62e4eb35
MP
44692014-08-03 Marek Polacek <polacek@redhat.com>
4470
4471 * c-common.c (check_case_value): Add location_t parameter. Use it.
4472 (c_add_case_label): Pass loc to check_case_value.
4473
b787e7a2
TS
44742014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4475
4476 * cilk.c: Use hash_map instead of pointer_map.
4477
6e2830c3
TS
44782014-08-02 Trevor Saunders <tsaunders@mozilla.com>
4479
4480 * c-gimplify.c: Use hash_set instead of pointer_set.
4481
a7ee52fb
IZ
44822014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
4483
4484 PR middle-end/61455
4485 * array-notation-common.c (extract_array_notation_exprs): Handling
4486 of DECL_EXPR added.
4487
944fa280
JJ
44882014-08-01 Jakub Jelinek <jakub@redhat.com>
4489
4490 * c-common.h (min_align_of_type): Removed prototype.
4491 * c-common.c (min_align_of_type): Removed.
4492 * c-ubsan.h (ubsan_maybe_instrument_reference,
4493 ubsan_maybe_instrument_member_call): New prototypes.
4494 * c-ubsan.c: Include stor-layout.h and builtins.h.
4495 (ubsan_maybe_instrument_reference_or_call,
4496 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
4497 functions.
4498
b4dfdc11
MG
44992014-07-31 Marc Glisse <marc.glisse@inria.fr>
4500
4501 PR c++/60517
4502 * c.opt (-Wreturn-local-addr): Move to common.opt.
4503
a41844e5
JM
45042014-07-30 Jason Merrill <jason@redhat.com>
4505
4506 PR c++/61659
4507 PR c++/61687
4508 Revert:
4509 * c.opt (-fuse-all-virtuals): New.
4510
976d5a22
TT
45112014-07-30 Tom Tromey <tromey@redhat.com>
4512
4513 PR c/59855
4514 * c.opt (Wdesignated-init): New option.
4515 * c-common.c (c_common_attribute_table): Add "designated_init".
4516 (handle_designated_init): New function.
4517
cdc94aca
MP
45182014-07-24 Marek Polacek <polacek@redhat.com>
4519
4520 PR c/57653
4521 * c-opts.c (c_finish_options): If -imacros is in effect, return.
4522
f41373b6
DS
45232014-07-16 Dodji Seketeli <dodji@redhat.com>
4524
4525 PR preprocessor/60723 - missing system-ness marks for macro tokens
4526 * c-ppoutput.c (struct print::prev_was_system_token): New data
4527 member.
4528 (init_pp_output): Initialize it.
4529 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
4530 (do_line_change): Return a flag saying if a line marker was
4531 emitted or not.
4532 (scan_translation_unit): Detect if the system-ness of the token we
4533 are about to emit is different from the one of the previously
4534 emitted token. If so, emit a line marker. Avoid emitting useless
4535 adjacent line markers. Avoid emitting line markers for tokens
4536 originating from the expansion of built-in macros.
4537 (scan_translation_unit_directives_only): Adjust.
4538
4d661eaa
MP
45392014-07-15 Marek Polacek <polacek@redhat.com>
4540
4541 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
4542 TYPE_MAX_VALUE is NULL.
4543
b108f48f
JJ
45442014-07-14 Jakub Jelinek <jakub@redhat.com>
4545
4546 PR middle-end/61294
4547 * c.opt (Wmemset-transposed-args): New warning.
4548
c0221884
JM
45492014-07-10 Jason Merrill <jason@redhat.com>
4550
4551 PR c++/61659
4552 PR c++/61687
4553 * c.opt (-fuse-all-virtuals): New.
4554
63dfbb95
RB
45552014-07-09 Richard Biener <rguenther@suse.de>
4556
4557 PR c-family/61741
4558 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
4559 using unsigned arithmetic if overflow does not wrap instead of
4560 if overflow is undefined.
4561
773ec47f
MP
45622014-07-06 Marek Polacek <polacek@redhat.com>
4563
4564 PR c/6940
4565 * c.opt (Wsizeof-array-argument): New option.
4566
00a7ba58
JJ
45672014-07-03 Jakub Jelinek <jakub@redhat.com>
4568
b1726d6c 4569 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
4570 comments->count <= 1, as comments->entries might be NULL.
4571
52ec0ea3
MP
45722014-07-01 Marek Polacek <polacek@redhat.com>
4573
4574 * c.opt (Wint-conversion): New option.
4575
d5c3d343
MP
45762014-07-01 Marek Polacek <polacek@redhat.com>
4577
4578 PR c/58286
4579 * c.opt (Wincompatible-pointer-types): New option.
4580
6e7ceb17
PC
45812014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
4582
4583 PR c++/51400
4584 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
4585 Do not discard TYPE_QUALS of type.
4586
da73100b
JM
45872014-06-26 Jason Merrill <jason@redhat.com>
4588
4589 * c-common.h (enum cxx_dialect): Add cxx1z.
4590 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
4591 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
4592
08eedf75
TJ
45932014-06-26 Teresa Johnson <tejohnson@google.com>
4594
4595 * c-common.h (get_dump_info): Declare.
4596 * c-gimplify.c (c_genericize): Use saved dump files.
4597 * c-opts.c (c_common_parse_file): Begin and end dumps
4598 once around parsing invocation.
4599 (get_dump_info): New function.
4600
7b56b2f8
MP
46012014-06-23 Marek Polacek <polacek@redhat.com>
4602 Andrew MacLeod <amacleod@redhat.com>
4603
4604 PR c/61553
4605 * c-common.c (get_atomic_generic_size): Don't segfault if the
4606 type doesn't have a size.
4607
0e37a2f3
MP
46082014-06-20 Marek Polacek <polacek@redhat.com>
4609
4610 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
4611 (ubsan_walk_array_refs_r): New function.
4612 (c_genericize): Instrument array bounds.
4613 * c-ubsan.c: Include "internal-fn.h".
4614 (ubsan_instrument_division): Mark instrumented arrays as having
4615 side effects. Adjust ubsan_type_descriptor call.
4616 (ubsan_instrument_shift): Likewise.
4617 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
4618 (ubsan_instrument_bounds): New function.
4619 (ubsan_array_ref_instrumented_p): New function.
4620 (ubsan_maybe_instrument_array_ref): New function.
4621 * c-ubsan.h (ubsan_instrument_bounds): Declare.
4622 (ubsan_array_ref_instrumented_p): Declare.
4623 (ubsan_maybe_instrument_array_ref): Declare.
4624
46252014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
4626
4627 PR lto/61123
4628 * c.opt (fshort-enums): Add to LTO.
4629 * c.opt (fshort-wchar): Likewise.
4630
5c3d09f7
MP
46312014-06-16 Marek Polacek <polacek@redhat.com>
4632
4633 PR c/60439
4634 * c.opt (Wswitch-bool): Add Var.
4635
9cf32741
JJ
46362014-06-12 Jakub Jelinek <jakub@redhat.com>
4637
4638 PR middle-end/61486
4639 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
4640 #pragma omp target teams or
4641 #pragma omp {,target }teams distribute simd.
4642
62984918
JM
46432014-06-12 Jason Merrill <jason@redhat.com>
4644
4645 * c.opt (Wabi=, fabi-compat-version): New.
4646 * c-opts.c (c_common_handle_option): Handle -Wabi=.
4647 (c_common_post_options): Handle flag_abi_compat_version default.
4648 Disallow -fabi-compat-version=1.
4649 * c-common.h (abi_version_crosses): New.
4650
f961457f
JH
46512014-06-11 Jan Hubicka <hubicka@ucw.cz>
4652
adfac8df 4653 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
4654 section names that are no longer trees.
4655
92d28cbb
JJ
46562014-06-10 Jakub Jelinek <jakub@redhat.com>
4657
4658 PR fortran/60928
4659 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
4660 (omp_pragmas): ... back here.
4661
742938c9
MP
46622014-06-05 Marek Polacek <polacek@redhat.com>
4663
4664 PR c/49706
4665 * c-common.c (warn_logical_not_parentheses): New function.
4666 * c-common.h (warn_logical_not_parentheses): Declare.
4667 * c.opt (Wlogical-not-parentheses): New option.
4668
9d548dfb
MP
46692014-06-04 Marek Polacek <polacek@redhat.com>
4670
4671 PR c/30020
4672 * c-common.c (check_case_bounds): Add location parameter.
4673 Use it.
4674 (c_add_case_label): Pass loc to check_case_bounds.
4675
fedfecef
MP
46762014-06-03 Marek Polacek <polacek@redhat.com>
4677
4678 PR c/60439
4679 * c.opt (Wswitch-bool): New option.
4680
f6a7cffc
TS
46812014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4682
040d18b6
TS
4683 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
4684 Remove prototypes.
4685 (record_types_used_by_current_var_decl): Move prototype to where
4686 it belongs.
4687
f6a7cffc
TS
4688 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
4689 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
4690 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
4691
632f2871
RS
46922014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
4693
4694 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
4695 * c-common.c (c_common_nodes_and_builtins): Don't initialize
4696 void_zero_node.
4697 * c-pretty-print.c (pp_c_void_constant): New function.
4698 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
4699 (c_pretty_printer::expression): Handle VOID_CST.
4700 * cilk.c (extract_free_variables): Likewise.
4701 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
4702 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
4703
766090c2
TS
47042014-05-17 Trevor Saunders <tsaunders@mozilla.com>
4705
4706 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
4707 * c-pragma.c (push_alignment): Adjust.
4708 (handle_pragma_push_options): Likewise.
4709
661a0813
MP
47102014-05-09 Marek Polacek <polacek@redhat.com>
4711
4712 PR c/50459
4713 * c-common.c (check_user_alignment): Return -1 if alignment is error
4714 node.
4715 (handle_aligned_attribute): Don't call default_conversion on
4716 FUNCTION_DECLs.
4717 (handle_vector_size_attribute): Likewise.
4718 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
4719 (handle_sentinel_attribute): Call default_conversion and allow even
4720 integral types as an argument.
4721
2793eeab
MP
47222014-05-08 Marek Polacek <polacek@redhat.com>
4723
4724 PR c/61053
4725 * c-common.c (min_align_of_type): New function factored out from...
4726 (c_sizeof_or_alignof_type): ...here.
4727 * c-common.h (min_align_of_type): Declare.
4728
f827930a
MP
47292014-05-08 Marek Polacek <polacek@redhat.com>
4730
4731 PR c/61077
4732 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
4733 parameter type of main.
4734
ca49b74e
DD
47352014-05-07 DJ Delorie <dj@redhat.com>
4736
4737 * c-cppbuiltin.c (print_bits_of_hex): New.
4738 (builtin_define_type_minmax): Print values using hex so as not to
4739 require a pre-computed list of string values.
4740
1d60af08
KZ
47412014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
4742 Mike Stump <mikestump@comcast.net>
4743 Richard Sandiford <rdsandiford@googlemail.com>
4744
4745 * c-ada-spec.c: Include wide-int.h.
4746 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
4747 (dump_generic_ada_node): Use wide-int interfaces.
4748 * c-common.c: Include wide-int-print.h.
4749 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
4750 (pointer_int_sum): Use wide-int interfaces.
4751 (c_common_nodes_and_builtins): Use make_int_cst.
4752 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
4753 (handle_alloc_size_attribute): Use wide-int interfaces.
4754 (get_nonnull_operand): Likewise.
4755 * c-format.c (get_constant): Use tree_fits_uhwi_p.
4756 * c-lex.c: Include wide-int.h.
4757 (narrowest_unsigned_type): Take a widest_int rather than two
4758 HOST_WIDE_INTs.
4759 (narrowest_signed_type): Likewise.
4760 (interpret_integer): Update accordingly. Use wide-int interfaces.
4761 (lex_charconst): Use wide-int interfaces.
4762 * c-pretty-print.c: Include wide-int.h.
4763 (pp_c_integer_constant): Use wide-int interfaces.
4764 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
4765 INT_CST_LT_UNSIGNED.
4766
b15458be
RB
47672014-05-06 Richard Biener <rguenther@suse.de>
4768
4769 * c-opts.c (c_common_post_options): For -freestanding,
4770 -fno-hosted and -fno-builtin disable pattern recognition
4771 if not enabled explicitely.
4772
6577374e
MP
47732014-05-02 Marek Polacek <polacek@redhat.com>
4774
4775 * c.opt (Wsizeof-pointer-memaccess): Describe option.
4776
d00887e8
MP
47772014-05-01 Marek Polacek <polacek@redhat.com>
4778
4779 PR c/43245
4780 * c.opt (Wdiscarded-qualifiers): Add.
4781
f8ed5150
MP
47822014-04-30 Marek Polacek <polacek@redhat.com>
4783
4784 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
4785 INT_MIN / -1 sanitization only for integer types.
4786
45484dcf
MP
47872014-04-25 Marek Polacek <polacek@redhat.com>
4788
4789 PR c/18079
4790 * c-common.c (handle_noinline_attribute): Warn if the attribute
4791 conflicts with always_inline attribute.
4792 (handle_always_inline_attribute): Warn if the attribute conflicts
4793 with noinline attribute.
4794
38e514c0
MP
47952014-04-25 Marek Polacek <polacek@redhat.com>
4796
4797 PR c/60156
4798 * c-common.c (check_main_parameter_types): Warn about variadic main.
4799
44875f92
MS
48002014-04-24 Mike Stump <mikestump@comcast.net>
4801
4802 * c.opt (Wshadow-ivar): Default to on.
4803
dcaaa5a0
DP
48042014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
4805
4806 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
4807
c07d7c02
MP
48082014-04-23 Marek Polacek <polacek@redhat.com>
4809
4810 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
4811
1c33c9b7
JJ
48122014-04-22 Jakub Jelinek <jakub@redhat.com>
4813
4814 PR sanitizer/60275
4815 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
4816 if flag_sanitize_undefined_trap_on_error.
4817 (ubsan_instrument_division, ubsan_instrument_shift,
4818 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
4819 if !flag_sanitize_recover.
4820
793c625f
MG
48212014-04-22 Marc Glisse <marc.glisse@inria.fr>
4822
4823 PR libstdc++/43622
4824 * c-common.c (registered_builtin_types): Make non-static.
4825 * c-common.h (registered_builtin_types): Declare.
4826
b0f1bf36
RB
48272014-04-14 Richard Biener <rguenther@suse.de>
4828 Marc Glisse <marc.glisse@inria.fr>
4829
4830 PR c/60819
4831 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
4832 apply may-alias the scalar pointer type when applicable.
4833
3b07fa4a
IZ
48342014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
4835
4836 PR middle-end/60467
4837 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
4838 as possible argument for Cilk_spawn.
4839
cbbd2b1c
TB
48402014-04-11 Tobias Burnus <burnus@net-b.de>
4841
4842 PR c/60194
4843 * c.opt (Wformat-signedness): Add
4844 * c-format.c(check_format_types): Use it.
4845
6415bd5d
JM
48462014-04-11 Jason Merrill <jason@redhat.com>
4847
4848 PR c++/57926
4849 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
4850 default_conversion for an array argument.
4851
6525783a
MP
48522014-04-08 Marek Polacek <polacek@redhat.com>
4853
4854 PR sanitizer/60745
4855 * c-ubsan.c: Include asan.h.
4856 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
4857
880a467b
NS
48582014-04-03 Nathan Sidwell <nathan@codesourcery.com>
4859
4860 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
4861
7b59ff2d
MP
48622014-04-02 Marek Polacek <polacek@redhat.com>
4863
4864 * c-common.h (c_expand_expr): Remove declaration.
4865
8edbfaa6
JJ
48662014-03-28 Jakub Jelinek <jakub@redhat.com>
4867
4868 PR c++/60689
4869 * c-common.c (add_atomic_size_parameter): When creating new
4870 params vector, push the size argument first.
4871
07d72e1d
JJ
48722014-03-26 Jakub Jelinek <jakub@redhat.com>
4873
4874 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
4875 ubsan_instrument_vla, ubsan_instrument_return): Adjust
4876 ubsan_create_data callers.
4877
b35e0fa0
JJ
48782014-03-22 Jakub Jelinek <jakub@redhat.com>
4879
4880 PR debug/60603
4881 * c-opts.c (c_finish_options): Restore cb_file_change call to
4882 <built-in>.
4883
39a1ebb3
JJ
48842014-03-13 Jakub Jelinek <jakub@redhat.com>
4885
4886 PR middle-end/36282
4887 * c-pragma.c (apply_pragma_weak): Only look at
4888 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
4889 DECL_ASSEMBLER_NAME_SET_P (decl).
4890 (maybe_apply_pending_pragma_weaks): Exit early if
4891 vec_safe_is_empty (pending_weaks) rather than only when
4892 !pending_weaks.
4893 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
4894 set assembler name back to NULL afterwards.
4895
a07f6ed2
JM
48962014-03-11 Jason Merrill <jason@redhat.com>
4897
4898 * c.opt: Add -std=gnu++14.
4899
75b107f5
IB
49002014-03-11 Ian Bolton <ian.bolton@arm.com>
4901
4902 * c-opts.c (c_common_post_options): Don't override
4903 -ffp-contract=fast if unsafe-math-optimizations is on.
4904
f42c637e
PM
49052014-03-08 Paulo Matos <paulo@matos-sorge.com>
4906
22b15758 4907 * c.opt: Enable LTO FE for fshort-double.
f42c637e 4908
70e24808
JM
49092014-03-07 Jason Merrill <jason@redhat.com>
4910
4911 * c.opt: Add -std=c++14.
4912
3af9c5e9
MP
49132014-03-06 Marek Polacek <polacek@redhat.com>
4914
4915 PR c/60197
4916 * cilk.c (contains_cilk_spawn_stmt): New function.
4917 (contains_cilk_spawn_stmt_walker): Likewise.
4918 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
4919 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
4920
b3bdf019
JJ
49212014-03-03 Jakub Jelinek <jakub@redhat.com>
4922
4923 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
4924 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
4925 even when flag_preprocess_only.
4926
ca7e759d
JM
49272014-02-26 Jason Merrill <jason@redhat.com>
4928
4929 PR c++/59231
4930 PR c++/11586
4931 * c-common.c (shorten_compare): Don't check
4932 c_inhibit_evaluation_warnings.
4933
28e41874
JJ
49342014-02-19 Jakub Jelinek <jakub@redhat.com>
4935
cca615af
JJ
4936 PR c/37743
4937 * c-common.c (c_common_nodes_and_builtins): When initializing
4938 c_uint{16,32,64}_type_node, also set corresponding
4939 uint{16,32,64}_type_node to the same value.
4940
28e41874
JJ
4941 PR c++/60267
4942 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
4943 for PRAGMA_IVDEP if flag_preprocess_only.
4944
c2bf53a1
JJ
49452014-02-12 Jakub Jelinek <jakub@redhat.com>
4946
4947 PR c/60101
4948 * c-common.c (merge_tlist): If copy is true, call new_tlist,
4949 if false, add ADD itself, rather than vice versa.
4950 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
4951 copy. For SAVE_EXPR, only call merge_tlist once.
4952
8fcbce72
JJ
49532014-02-08 Jakub Jelinek <jakub@redhat.com>
4954
4955 PR middle-end/60092
4956 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
4957 and tree_to_uhwi.
4958 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
4959 functions.
4960 (c_common_attribute_table): Add alloc_align and assume_aligned
4961 attributes.
4962
0a756a3f
MP
49632014-02-06 Marek Polacek <polacek@redhat.com>
4964
4965 PR c/60087
4966 * c-common.c (warn_for_sign_compare): Call warning_at with location
4967 instead of warning.
4968
7ec4847a
MP
49692014-02-05 Marek Polacek <polacek@redhat.com>
4970
4971 PR c/53123
4972 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
4973 statement.
4974
66f20604
MP
49752014-02-04 Marek Polacek <polacek@redhat.com>
4976
4977 PR c/60036
4978 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
4979 SAVE_EXPR.
4980
5d77fb19
MG
49812014-02-03 Marc Glisse <marc.glisse@inria.fr>
4982
4983 PR c++/53017
4984 PR c++/59211
4985 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
4986 handle_vector_size_attribute, handle_nonnull_attribute): Call
4987 default_conversion on the attribute argument.
4988 (handle_nonnull_attribute): Increment the argument number.
4989
81e5eca8
MP
49902014-01-31 Marek Polacek <polacek@redhat.com>
4991
4992 PR c/59963
4993 * c-common.c (add_atomic_size_parameter): Pass vNULL to
4994 build_function_call_vec.
4995 (resolve_overloaded_builtin): Likewise.
4996 * c-common.h (build_function_call_vec): Adjust declaration.
4997
68fca595
MP
49982014-01-30 Marek Polacek <polacek@redhat.com>
4999
5000 PR c/59940
5001 * c-common.h (unsafe_conversion_p): Adjust declaration.
5002 (warnings_for_convert_and_check): Likewise.
5003 (convert_and_check): Likewise.
5004 * c-common.c (unsafe_conversion_p): Add location parameter. Call
5005 expansion_point_location_if_in_system_header on it.
5006 (warnings_for_convert_and_check): Add location parameter. Call
5007 expansion_point_location_if_in_system_header on it. Use it.
5008 (convert_and_check): Add location parameter. Use it.
5009 (conversion_warning): Likewise.
5010 (c_add_case_label): Adjust convert_and_check calls.
5011 (scalar_to_vector): Adjust unsafe_conversion_p calls.
5012
b72271b9
BI
50132014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
5014
5015 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
5016 flag_cilkplus.
5017 * c-pragma.c (init_pragma): Likewise.
5018 * c.opt: Likewise.
5019
393e8e8b
MP
50202014-01-23 Marek Polacek <polacek@redhat.com>
5021
5022 PR c/59846
5023 * c-common.c (shorten_compare): Add location_t parameter.
5024 * c-common.h (shorten_binary_op): Adjust declaration.
5025
f04dda30
MP
50262014-01-23 Marek Polacek <polacek@redhat.com>
5027
5028 PR c/58346
5029 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
5030 * c-common.h: Declare it.
5031
621955cb
EB
50322014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5033
5034 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
5035 * c-ada-spec.c (dump_ads): Likewise.
5036 (cpp_check): Likewise.
5037 (dump_ada_specs): Likewise.
5038
50392014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
5040
5041 PR c++/49718
5042 * c-common.c (handle_no_instrument_function_attribute): Allow
5043 no_instrument_function attribute in class member
5044 definition/declaration.
5045
241f845a
JJ
50462014-01-15 Jakub Jelinek <jakub@redhat.com>
5047
5048 PR c/58943
5049 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
5050 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
5051 being COMPOUND_EXPR.
5052 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
5053 operand a SAVE_EXPR and second MODIFY_EXPR.
5054
e83b8e2e
JJ
50552014-01-09 Jakub Jelinek <jakub@redhat.com>
5056
5057 PR target/58115
5058 * c-pch.c (c_common_write_pch): Call
5059 prepare_target_option_nodes_for_pch.
5060
23a5b65a
RS
50612014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5062
5063 Update copyright years
5064
f9030485
RS
50652014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
5066
5067 * array-notation-common.c, c-cilkplus.c: Use the standard form for
5068 the copyright notice.
5069
f2aa696b
EB
50702013-12-28 Eric Botcazou <ebotcazou@adacore.com>
5071
5072 * c-ada-spec.c (print_constructor): New function.
5073 (print_destructor): Retrieve the origin of the destructor.
5074 (print_ada_declaration): Revamp handling of constructors/destructors.
5075
3f8257db 50762013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
5077 Bill Maddox <maddox@google.com>
5078 Jason Merrill <jason@redhat.com>
5079
5080 * c.opt: Add -fdeclone-ctor-dtor.
5081 * c-opts.c (c_common_post_options): Default to on iff -Os.
5082
41958c28
BI
50832013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
5084
5085 * c-common.c (c_common_attribute_table): Added "cilk simd function"
5086 attribute.
5087 * c-pragma.h (enum pragma_cilk_clause): Remove.
5088 (enum pragma_omp_clause): Added the following fields:
5089 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
5090 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
5091 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
5092 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
5093 PRAGMA_CILK_CLAUSE_UNIFORM.
5094
b1726d6c 5095
12893402
BI
50962013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
5097
5098 * cilk.c (cilk_outline): Made this function non-static.
5099 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
5100 (create_cilk_wrapper): Added a new parameter: a function pointer.
5101 (c_install_body_w_frame_cleanup): Remove
5102 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
5103 * c-common.h (cilk_outline): New prototype.
5104 (gimplify_cilk_spawn): Removed two parameters.
5105 (cilk_install_body_with_frame_cleanup): New prototype.
5106 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
5107 CILK_SPAWN_STMT case.
5108
085b42ed
BS
51092013-12-11 Bernd Schmidt <bernds@codesourcery.com>
5110
2ce064c3
BS
5111 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
5112
085b42ed
BS
5113 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
5114 (int_array_type_node): Remove.
5115 * c-common.c (c_common_nodes_and_builtins): Don't build it.
5116
9e36c9ed
MP
51172013-12-05 Marek Polacek <polacek@redhat.com>
5118
5119 PR c/52023
5120 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
5121 [ADJUST_FIELD_ALIGN].
5122
296674db
JM
51232013-12-04 Joseph Myers <joseph@codesourcery.com>
5124
5125 PR c/52023
5126 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
5127 and check field alignment if set.
5128 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
5129 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
5130
b1726d6c 51312013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
5132 Marek Polacek <polacek@redhat.com>
5133
5134 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
5135 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
5136
d7947e19
L
51372013-11-29 H.J. Lu <hongjiu.lu@intel.com>
5138
5139 PR c/59309
5140 * cilk.c (gimplify_cilk_spawn): Properly handle function without
5141 arguments.
5142
fad7652e
JJ
51432013-11-29 Jakub Jelinek <jakub@redhat.com>
5144
5145 PR c/59280
5146 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
5147 goto invalid. If it is error_mark_node, don't issue further
5148 diagnostics.
5149
8b5e1202
SO
51502013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
5151
5152 * c.opt (Wopenmp-simd): New.
5153
0a508bb6
JJ
51542013-11-22 Jakub Jelinek <jakub@redhat.com>
5155
5156 * c-ubsan.h (ubsan_instrument_return): New prototype.
5157 * c-ubsan.c (ubsan_instrument_return): New function.
5158
2fb9a547
AM
51592013-11-22 Andrew MacLeod <amacleod@redhat.com>
5160
5161 * c-common.c: Add required include files from gimple.h.
5162 * c-gimplify.c: Likewise
5163 * cilk.c: Likewise
5164
8400e75e
DM
51652013-11-22 David Malcolm <dmalcolm@redhat.com>
5166
5167 * c-common.c (unsafe_conversion_p): Remove use of
5168 EXPR_LOC_OR_HERE macro.
5169 (conversion_warning): Likewise.
5170 (warnings_for_convert_and_check): Likewise.
5171 (warn_for_collisions_1): Likewise.
5172 (shorten_compare): Likewise, and remove use of in_system_header
5173 macro, using the location from the former.
5174 * c-lex.c (dump_one_header): Remove use of input_filename macro.
5175 (cb_def_pragma): Remove use of in_system_header macro.
5176 (lex_string): Likewise.
5177 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
5178
eb1ce453
KZ
51792013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5180 Mike Stump <mikestump@comcast.net>
5181 Richard Sandiford <rdsandiford@googlemail.com>
5182
5183 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
5184 instead of TREE_INT_CST_LOW, in cases where there is a protecting
5185 tree_fits_shwi_p or tree_fits_uhwi_p.
5186 (dump_generic_ada_node): Likewise.
5187 * c-format.c (check_format_arg): Likewise.
5188 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5189
6b3b8c27
KZ
51902013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
5191
5192 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
5193
49b0aa18
JC
51942013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
5195
5196 PR c/53001
5197 * c-common.c (unsafe_conversion_p): Make this function
5198 return an enumeration with more detail.
5199 (conversion_warning): Use the new return type of
5200 unsafe_conversion_p to separately warn either about conversions
5201 that lower floating point number precision or about the other
5202 kinds of conversions.
5203 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
5204 (unsafe_conversion_p): switching return type to
5205 conversion_safety enumeration.
49b0aa18
JC
5206 * c.opt: Adding new warning -Wfloat-conversion and
5207 enabling it with -Wconversion.
5208
b826515a
BS
52092013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
5210
8e745a17
JJ
5211 * c-opts.c: Include plugin.h.
5212 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 5213
b9a55b13
MP
52142013-11-19 Marek Polacek <polacek@redhat.com>
5215
5216 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
5217 call.
5218 (ubsan_instrument_shift): Likewise.
5219 (ubsan_instrument_vla): Likewise.
5220
7d362f6c
RS
52212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5222
5223 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
5224 cast to unsigned type.
5225
386b1f1f
RS
52262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5227
5228 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
5229 tree_low_cst.
5230 (complete_array_type): Update comment to refer to tree_to_[su]hwi
5231 rather than tree_low_cst.
5232
ae7e9ddd
RS
52332013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5234
5235 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
5236 tree_to_uhwi throughout.
5237
9439e9a1
RS
52382013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5239
5240 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
5241 tree_low_cst (..., 0) with tree_to_shwi throughout.
5242
cc269bb6
RS
52432013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5244
5245 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
5246 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
5247
9541ffee
RS
52482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
5249
5250 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
5251 host_integerp (..., 0) with tree_fits_shwi_p throughout.
5252
c02065fc
AH
52532013-11-15 Aldy Hernandez <aldyh@redhat.com>
5254
5255 * c-cilkplus.c: New file.
5256 * c-common.c (readonly_error): Add location argument.
5257 * c-common.h (readonly_error): Same.
5258 (c_finish_cilk_clauses): Protoize.
5259 (c_check_cilk_loop): Same.
5260 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
5261 Do not fail on error_mark_node.
5262 Abstract increment canonicalization to here...
5263 (c_omp_for_incr_canonicalize_ptr): New.
5264 c-pragma.c (init_pragma): Register "simd" pragma.
5265 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
5266 (enum pragma_cilk_clause): New.
5267
9cc65f15
RS
52682013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
5269
5270 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
5271 wchar_type and host_integerp checks.
5272
18f429e2
AM
52732013-11-14 Andrew MacLeod <amacleod@redhat.com>
5274
5275 * c-common.c: Likewise.
5276 * c-gimplify.c: Likewise.
5277 * cilk.c: Likewise.
5278
d8a2d370
DN
52792013-11-14 Diego Novillo <dnovillo@google.com>
5280
5281 * c-common.c: Include fold-const.h.
5282 Include stor-layout.h.
5283 Include calls.h.
5284 Include stringpool.h.
5285 Include attribs.h.
5286 Include varasm.h.
5287 Include trans-mem.h.
5288 * c-cppbuiltin.c: Include stor-layout.h.
5289 Include stringpool.h.
5290 * c-format.c: Include stringpool.h.
5291 * c-lex.c: Include stringpool.h.
5292 Include stor-layout.h.
5293 * c-pragma.c: Include stringpool.h.
5294 Include attribs.h.
5295 Include varasm.h.
5296 Include gcc-symtab.h.
5297 * c-pretty-print.c: Include stor-layout.h.
5298 Include attribs.h.
5299 * cilk.c: Include stringpool.h.
5300 Include calls.h.
5301
38b7bc7f
JM
53022013-11-13 Joseph Myers <joseph@codesourcery.com>
5303
5304 * c-common.h (enum rid): Add RID_AUTO_TYPE.
5305 * c-common.c (c_common_reswords): Add __auto_type.
5306 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
5307
45b0be94
AM
53082013-11-12 Andrew MacLeod <amacleod@redhat.com>
5309
18f429e2
AM
5310 * c-common.c: Include gimplify.h.
5311 * c-gimplify.c: Likewise.
5312 * cilk.c: Likewise.
5313 * c-omp.c: Include gimple-expr.h instead of gimple.h.
5314 * c-ubsan.c: Don't include gimple.h.
45b0be94 5315
582d9b50
JM
53162013-11-12 Joseph Myers <joseph@codesourcery.com>
5317
5318 * c-common.c (c_common_reswords): Add _Thread_local.
5319
6b28e197
JM
53202013-11-09 Joseph Myers <joseph@codesourcery.com>
5321
5322 * c-common.c (atomic_size_supported_p): New function.
5323 (resolve_overloaded_atomic_exchange)
5324 (resolve_overloaded_atomic_compare_exchange)
5325 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
5326 Use it instead of comparing size with a local list of sizes.
5327
267bac10
JM
53282013-11-07 Andrew MacLeod <amacleod@redhat.com>
5329 Joseph Myers <joseph@codesourcery.com>
5330
5331 * c-common.h (enum rid): Add RID_ATOMIC.
5332 * c-common.c (c_common_reswords): Add _Atomic.
5333 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
5334 (keyword_is_type_qualifier): Accept RID_ATOMIC.
5335 * c-format.c (check_format_types): Check for extra _Atomic
5336 qualifiers in format argument.
5337 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
5338 (pp_c_type_qualifier_list): Mention _Atomic in comment.
5339
5157b91e
TB
53402013-11-06 Tobias Burnus <burnus@net-b.de>
5341
5342 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
5343
6dbe0958
JM
53442013-11-06 Joseph Myers <joseph@codesourcery.com>
5345
5346 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
5347 standards modes.
5348 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
5349 to mean lack of IEEE 754 support.
5350
e8ff5196
TB
53512013-11-05 Tobias Burnus <burnus@net-b.de>
5352
5353 * c.opt (-Wdate-time): New option
5354 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
5355
254a0760
JM
53562013-11-05 Joseph Myers <joseph@codesourcery.com>
5357
5358 * c-cppbuiltin.c (cpp_iec_559_value): Test
5359 flag_excess_precision_cmdline not flag_excess_precision.
5360
6d7f7e0a
TB
53612013-11-05 Tobias Burnus <burnus@net-b.de>
5362
5363 * c.opt (fopenmp-simd): New option.
5364 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
5365 (omp_pragmas): ... this new struct.
5366 (c_pp_lookup_pragma): Also walk omp_pragmas.
5367 (init_pragma): Init pragmas for -fopenmp-simd.
5368
55a7f02f
MP
53692013-11-04 Marek Polacek <polacek@redhat.com>
5370
5371 PR c++/58979
5372 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
5373
9193fb05
JM
53742013-11-04 Joseph Myers <joseph@codesourcery.com>
5375
5376 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
5377 New functions.
5378 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
5379
94159ecf
EB
53802013-11-04 Eric Botcazou <ebotcazou@adacore.com>
5381
5382 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
5383 (dump_ada_specs): Adjust prototype of second callback.
5384 * c-ada-spec.c (cpp_check): New global variable.
5385 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
5386 (print_generic_ada_decl): Likewise.
5387 (has_static_fields): Change return type to bool and add guard.
5388 (has_nontrivial_methods): New predicate.
5389 (is_tagged_type): Change return type to bool.
5390 (separate_class_package): Call has_nontrivial_methods.
5391 (pp_ada_tree_identifier): Minor tweaks.
5392 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
5393 (dump_ada_array_domains): Likewise.
5394 (dump_ada_array_type): Likewise.
5395 (dump_template_types): Remove cpp_check parameter and do not pass it to
5396 dump_generic_ada_node.
5397 (dump_ada_template): Likewise.
5398 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
5399 recursively.
5400 (print_ada_methods): Change return type to integer. Remove cpp_check
5401 parameter and do not pass it down.
5402 (dump_nested_types): Remove cpp_check parameter and do not pass it to
5403 dump_generic_ada_node.
5404 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
5405 accessing methods.
5406 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
5407 down. Use has_nontrivial_methods to recognize C++ classes. Use return
5408 value of print_ada_methods.
5409 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
5410 Set cpp_check to it before invoking dump_ada_nodes.
5411 (dump_ada_specs): Likewise.
5412
b906f4ca
MP
54132013-11-03 Marek Polacek <polacek@redhat.com>
5414
5415 * c-ubsan.c: Don't include hash-table.h.
5416 (ubsan_instrument_vla): New function.
5417 * c-ubsan.h: Declare it.
5418
5e20cdc9
DM
54192013-10-31 David Malcolm <dmalcolm@redhat.com>
5420
5421 Automated part of renaming of symtab_node_base to symtab_node.
5422
5423 Patch autogenerated by rename_symtab.py from
5424 https://github.com/davidmalcolm/gcc-refactoring-scripts
5425 revision 58bb219cc090b2f4516a9297d868c245495ee622
5426
5427 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
5428 symtab_node_base to symtab_node.
5429
7057e645
ESR
54302013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
5431
8e745a17 5432 Implement C++14 digit separators.
7057e645
ESR
5433 * c-lex.c (interpret_float): Remove digit separators from scratch string
5434 before building real literal.
5435
193ea7bc
JJ
54362013-10-30 Jakub Jelinek <jakub@redhat.com>
5437
5438 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
5439
939b37da
BI
54402013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
5441
5442 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
5443 fields.
5444 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
5445 enabled.
5446 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
5447 (insert_cilk_frame): New prototype.
5448 (cilk_init_builtins): Likewise.
5449 (gimplify_cilk_spawn): Likewise.
5450 (c_cilk_install_body_w_frame_cleanup): Likewise.
5451 (cilk_detect_spawn_and_unwrap): Likewise.
5452 (cilk_set_spawn_marker): Likewise.
5453 (build_cilk_sync): Likewise.
5454 (build_cilk_spawn): Likewise.
5455 * cilk.c: New file.
5456
67348ccc
DM
54572013-10-29 David Malcolm <dmalcolm@redhat.com>
5458
5459 Patch autogenerated by refactor_symtab.py from
5460 https://github.com/davidmalcolm/gcc-refactoring-scripts
5461 revision 58bb219cc090b2f4516a9297d868c245495ee622
5462
5463 * c-gimplify.c (c_genericize): Update for conversion of symtab types
5464 to a true class hierarchy.
5465 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
5466
d570872d
RS
54672013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
5468
5469 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
5470
98906124
JL
54712013-10-26 Jeff Law <law@redhat.com>
5472
adfac8df
JJ
5473 * c-common.c (c_define_builtins): Remove mudflap support.
5474 * c.opt: Ignore and warn for mudflap options.
98906124 5475
d73749df 54762013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
5477
5478 PR other/33426
5479 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
5480 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
5481
3f04b1bb
JM
54822013-10-23 Jason Merrill <jason@redhat.com>
5483
5484 * c-format.c (gcc_cxxdiag_char_table): Add %X.
5485
acf0174b
JJ
54862013-10-11 Jakub Jelinek <jakub@redhat.com>
5487
acd15a28
JJ
5488 * c-common.h (omp_clause_mask::operator !=): New method.
5489 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
5490 instead of if (mask & something) tests everywhere.
5491
acf0174b
JJ
5492 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
5493 201307 instead of 201107.
5494 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
5495 (c_common_attribute_table): Add "omp declare target" and
5496 "omp declare simd" attributes.
5497 (handle_omp_declare_target_attribute,
5498 handle_omp_declare_simd_attribute): New functions.
5499 * c-omp.c: Include c-pragma.h.
5500 (c_finish_omp_taskgroup): New function.
5501 (c_finish_omp_atomic): Add swapped argument, if true,
5502 build the operation first with rhs, lhs arguments and use NOP_EXPR
5503 build_modify_expr.
5504 (c_finish_omp_for): Add code argument, pass it down to make_code.
5505 (c_omp_split_clauses): New function.
5506 (c_split_parallel_clauses): Removed.
5507 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
5508 c_omp_declare_simd_clauses_to_decls): New functions.
5509 * c-common.h (omp_clause_mask): New type.
5510 (OMP_CLAUSE_MASK_1): Define.
5511 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
5512 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
5513 omp_clause_mask::operator |, omp_clause_mask::operator &,
5514 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
5515 omp_clause_mask::operator ==): New methods.
5516 (enum c_omp_clause_split): New.
5517 (c_finish_omp_taskgroup): New prototype.
5518 (c_finish_omp_atomic): Add swapped argument.
5519 (c_finish_omp_for): Add code argument.
5520 (c_omp_split_clauses): New prototype.
5521 (c_split_parallel_clauses): Removed.
5522 (c_omp_declare_simd_clauses_to_numbers,
5523 c_omp_declare_simd_clauses_to_decls): New prototypes.
5524 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
5525 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
5526 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
5527 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
5528 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
5529 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
5530 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
5531 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
5532 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
5533 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
5534 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
5535 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
5536 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
5537 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
5538 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
5539 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
5540 PRAGMA_OMP_CLAUSE_UNIFORM.
5541
826cacfe
MG
55422013-10-09 Marc Glisse <marc.glisse@inria.fr>
5543
5544 PR tree-optimization/20318
5545 * c-common.c (handle_returns_nonnull_attribute): New function.
5546 (c_common_attribute_table): Add returns_nonnull.
5547
2284b034
MG
55482013-10-03 Marc Glisse <marc.glisse@inria.fr>
5549
5550 PR c++/19476
5551 * c.opt (fcheck-new): Move to common.opt.
5552
b56e9788
MP
55532013-09-25 Marek Polacek <polacek@redhat.com>
5554 Jakub Jelinek <jakub@redhat.com>
5555
5556 PR sanitizer/58413
5557 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
5558 an expression if we can prove it is correct.
5559 (ubsan_instrument_division): Likewise. Remove unnecessary
5560 check.
5561
ce6923c5
MP
55622013-09-18 Marek Polacek <polacek@redhat.com>
5563
5564 PR sanitizer/58411
5565 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
5566 Declare it.
5567 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
5568
fb5610fb
IS
55692013-09-14 Iain Sandoe <iain@codesourcery.com>
5570
5571 PR target/48094
5572 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
5573 fobjc-gc, freplace-objc-classes): Accept for LTO.
5574
88b0e79e
JC
55752013-09-13 Jacek Caban <jacek@codeweavers.com>
5576
5577 * c-target.def: New hook
5578
c9b0866a
PC
55792013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5580
5581 PR c++/43452
5582 * c.opt (Wdelete-incomplete): Add.
5583
0af94e6f
JR
55842013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
5585
5586 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
5587 (vector_types_compatible_elements_p): New function.
5588 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
5589 declaration.
5590 (vector_types_compatible_elements_p): Declare.
5591
7c26172c
GDR
55922013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5593
5594 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
5595 a virtual member function.
5596 (pp_simple_type_specifier): Remove.
5597 (pp_c_type_specifier): Likewise.
5598 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
5599 Rename from pp_c_type_specifier. Adjust.
5600 (c_pretty_printer::c_pretty_printer): Do not assign to
5601 simple_type_specifier.
5602
20059c8b
GDR
56032013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5604
5605 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
5606 member function.
5607 (c_pretty_printer::storage_class_specifier): Likewise.
5608 (c_pretty_printer::initializer): Likewise.
5609 (pp_declaration): Remove.
5610 (pp_declaration_specifiers): Likewise.
5611 (pp_abstract_declarator): Likewise.
5612 (pp_declarator): Likewise.
5613 (pp_type_id): Likewise.
5614 (pp_statement): Likewise.
5615 (pp_constant): Likewise.
5616 (pp_id_expression): Likewise.
5617 (pp_primary_expression): Likewise.
5618 (pp_unary_expression): Likewise.
5619 (pp_multiplicative_expression): Likewise.
5620 (pp_conditional_expression): Likewise.
5621 (pp_assignment_expression): Likewise.
5622 (pp_expression): Likewise.
5623 (pp_c_type_id): Likewise.
5624 (pp_c_storage_class_specifier): Likewise.
5625 * c-pretty-print.c (pp_c_type_cast): Tidy.
5626 (pp_c_pointer): Likewise.
5627 (pp_c_type_specifier): Likewise.
5628 (pp_c_parameter_type_list): Likewise.
5629 (pp_c_function_definition): Likewise.
5630 (pp_c_init_declarator): Likewise.
5631 (pp_c_initializer_list): Likewise.
5632 (pp_c_constructor_elts): Likewise.
5633 (c_pretty_printer::direct_abstract_declarator): Likewise.
5634 (c_pretty_printer::declaration_specifiers): Likewise.
5635 (c_pretty_printer::primary_expression): Likewise.
5636 (c_pretty_printer::postfix_expression): Likewise.
5637 (c_pretty_printer::type_id): Rename from pp_c_type_id.
5638 (c_pretty_printer::storage_class_specifier): Rename from
5639 pp_c_storage_class_specifier.
5640 (c_pretty_printer::initializer): Rename from pp_c_initializer.
5641 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
5642 storage_class_specifier, initializer, offset_list, flags.
5643
de5a5fa1
MP
56442013-08-30 Marek Polacek <polacek@redhat.com>
5645
5646 * c-ubsan.c: New file.
5647 * c-ubsan.h: New file.
5648
8f0e4d72
GDR
56492013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
5650
5651 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
5652 member function.
5653 (c_pretty_printer::declaration_specifiers): Likewise.
5654 (c_pretty_printer::declarator): Likewise.
5655 (c_pretty_printer::abstract_declarator): Likewise.
5656 (c_pretty_printer::direct_abstract_declarator): Likewise.
5657 (c_pretty_printer::direct_declarator): Likewise.
5658 (c_pretty_printer::function_specifier): Likewise.
5659 (pp_declaration): Adjust.
5660 (pp_declaration_specifiers): Likewise.
5661 (pp_abstract_declarator): Likewise.
5662 (pp_direct_declarator): Likewise.
5663 (pp_function_specifier): Likewise.
5664 (pp_direct_abstract_declarator): Remove as unused.
5665 (pp_c_declaration): Remove.
5666 (pp_c_declaration_specifiers): Likewise.
5667 (pp_c_declarator): Likewise.
5668 (pp_c_direct_declarator): Likewise.
5669 (pp_c_function_specifier): Likewise.
5670 (pp_c_direct_abstract_declarator): Likewise.
5671 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
5672 from pp_c_abstract_declarator. Adjust.
5673 (c_pretty_printer::direct_abstract_declarator): Rename from
5674 pp_c_direct_abstract_declarator. Adjust.
5675 (c_pretty_printer::function_specifier): Rename from
5676 pp_c_function_specifier. Adjust.
5677 (c_pretty_printer::declaration_specifiers): Rename from
5678 pp_c_declaration_specifiers. Adjust.
5679 (c_pretty_printer::direct_declarator): Rename from
5680 pp_c_direct_declarator. Adjust.
5681 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
5682 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
5683 (c_pretty_printer::c_pretty_printer): Do not assign to
5684 declaration, declaration_specifiers, declarator,
5685 direct_declarator, direct_abstract_declarator, function_specifier.
5686
00d34d3a
GDR
56872013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
5688
5689 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
5690 virtual member function.
5691 (c_pretty_printer::multiplicative_expression): Likewise.
5692 (c_pretty_printer::conditional_expression): Likewise.
5693 (c_pretty_printer::assignment_expression): Likewise.
5694 (c_pretty_printer::expression): Likewise.
5695 (pp_unary_expression): Adjust.
5696 (pp_multiplicative_expression): Likewise.
5697 (pp_assignment_expression): Likewise.
5698 (pp_conditional_expression): Likewise.
5699 (pp_expression): Likewise.
5700 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
5701 from pp_c_unary_expression. Adjust.
5702 (c_pretty_printer::multiplicative_expression): Rename from
5703 pp_c_multiplicative_expression. Adjust.
5704 (c_pretty_printer::conditional_expression): Rename from
5705 pp_c_conditional_expression. Adjust.
5706 (c_pretty_printer::assignment_expression): Rename from
5707 pp_c_assignment_expression. Adjust.
5708 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
5709 (c_pretty_printer::c_pretty_printer): Do not assign to
5710 unary_expression, multiplicative_expression,
5711 conditional_expression, expression.
5712
fb22178f
GDR
57132013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5714
5715 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
5716 virtual member function.
5717 (pp_postfix_expression): Adjust.
5718 (pp_c_postfix_expression): Remove.
5719 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
5720 from pp_c_postfix_expression. Adjust.
5721 (c_pretty_printer::c_pretty_printer): Do not assign to
5722 postfix_expression.
5723
7ecc2600
GDR
57242013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5725
5726 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
5727 virtua member function.
5728 (pp_primary_expression): Adjust.
5729 (pp_c_primary_expression): Remove.
5730 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
5731 from pp_c_primary_expression. Adjust.
5732 (pp_c_initializer_list): Use pp_primary_expression.
5733 (c_pretty_printer::c_pretty_printer): Do not assign to
5734 primary_expression.
5735
0691175f
GDR
57362013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
5737
5738 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
5739 * c-pretty-print.c (M_): Remove.
5740 (c_pretty_printer::translate_string): Define.
5741 (pp_c_type_specifier): Use it.
5742 (pp_c_primary_expression): Likewise.
5743 (pp_c_expression): Likewise.
5744
66dfe4c4
GDR
57452013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5746
5747 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
5748 virtual function.
5749 (pp_c_id_expression): Remove.
5750 (pp_id_expression): Adjust.
5751 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
5752 pp_c_id_expression. Adjust.
5753 (pp_c_postfix_expression): Use pp_id_expression.
5754 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
5755
ca43e9d5
GDR
57562013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
5757
5758 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
5759 member function.
5760 (pp_constant): Adjust.
5761 (pp_c_constant): Remove.
5762 * c-pretty-print.c (c_pretty_printer::constant): Rename from
5763 pp_c_constant. Adjust.
5764 (pp_c_constant)
5765 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
5766 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
5767
da6ca2b5
GDR
57682013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5769
5770 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
5771 (c_pretty_printer::c_pretty_printer): Declare.
5772 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
5773 c_pretty_printer_init. Adjust.
5774 (print_c_tree): Do not call c_pretty_printer_init.
5775 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
5776
65a372f4
AC
57772013-08-09 Arnaud Charlet <charlet@adacore.com>
5778
5779 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
5780
fd9b0f32
PC
57812013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
5782
5783 PR c++/58080
5784 * c-common.c (pointer_int_sum): Add bool parameter.
5785 * c-common.h (pointer_int_sum): Adjust declaration.
5786
e0aec1e9
GDR
57872013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
5788
5789 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
5790 c_pretty_printer variable.
5791
b066401f
GDR
57922013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
5793
5794 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
5795 (pp_base): Remove.
5796 (pp_c_base): Likewise. Adjust users.
5797 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
5798 (pp_c_whitespace): Do not call pp_base.
5799 (pp_c_left_paren): Likewise.
5800 (pp_c_right_paren): Likewise.
5801 (pp_c_left_brace): Likewise.
5802 (pp_c_right_brace): Likewise.
5803 (pp_c_left_bracket): Likewise.
5804 (pp_c_right_bracket): Likewise.
5805 (pp_c_dot): Likewise.
5806 (pp_c_ampersand): Likewise.
5807 (pp_c_star): Likewise.
5808 (pp_c_arrow): Likewise.
5809 (pp_c_semicolon): Likewise.
5810 (pp_c_complement): Likewise.
5811 (pp_c_exclamation): Likewise.
5812 (pp_c_direct_declarator): Likewise.
5813 (pp_c_ws_string): Likewise.
5814 (pp_c_identifier): Likewise.
5815 (pp_c_statement): Likewise.
5816 (print_c_tree): Likewise.
5817
65e5a578
ESR
58182013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
5819
5820 PR c++/58072
5821 * c-common.c (c_parse_error): Catch user-defined literal tokens and
5822 provide useful error strings.
5823
137a1a27
GDR
58242013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5825
5826 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
5827 printer functions instead of pp_string or operators and punctuators.
5828 (dump_generic_ada_node): Likewise.
5829 * c-pretty-print.c (pp_c_type_specifier): Likewise.
5830 (pp_c_relational_expression): Likewise.
5831 (pp_c_logical_or_expression): Likewise.
5832
07838b13
GDR
58332013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
5834
5835 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
5836 functions instead of pp_character.
5837 (pp_ada_tree_identifier): Likewise.
5838 (dump_ada_double_name): Likewise.
5839 (dump_ada_function_declaration): Likewise.
5840 (dump_ada_array_domains): Likewise.
5841 (dump_template_types): Likewise.
5842 (dump_generic_ada_node): Likewise.
5843 (print_ada_declaration): Likewise.
5844 (print_ada_struct_decl): Likewise.
5845 * c-pretty-print.c (pp_c_integer_constant): Likewise.
5846
433cc7b0
TT
58472013-07-23 Tom Tromey <tromey@redhat.com>
5848
5849 * c-common.h (enum rid) <RID_GENERIC>: New constant.
5850 * c-common.c (c_common_reswords): Add _Generic.
5851
688010ba
OB
58522013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
5853
5854 * c-common.c: Fix typos.
5855 * c-common.h: Likewise.
5856
2a99e5e6
LL
58572013-07-13 Lubos Lunak <l.lunak@suse.cz>
5858
5859 PR c++/55203
5860 * c-common.c (c_common_attribute_table): Add warn_unused.
5861 (handle_warn_unused_attribute): New.
5862
c26302d5
JJ
58632013-07-10 Jakub Jelinek <jakub@redhat.com>
5864
5865 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
5866 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
5867
dfeadaa0
PC
58682013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
5869
5870 PR c++/57869
5871 * c.opt: Add Wconditionally-supported.
5872
6a2fa4b2
GS
58732013-07-08 Graham Stott <graham.stott@btinternet.com>
5874
adfac8df 5875 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
5876 unused variables l_length and l_node.
5877
ecdbd01a 58782013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
5879
5880 PR c/57821
5881 * c-common.c (complete_array_type): Delay folding first index
5882 like other indices. When folding, check for index overflow.
5883
bedc293e
MG
58842013-06-27 Marc Glisse <marc.glisse@inria.fr>
5885
5886 PR c++/57509
5887 * c-common.h (c_build_vec_perm_expr): New complain argument.
5888 * c-common.c (c_build_vec_perm_expr): Likewise.
5889 Use save_expr also in C++.
5890
604b2bfc
GDR
58912013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
5892
5893 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
5894 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
5895 * c-opts.c (c_common_post_options): Likewise.
5896
dfeadaa0 58972013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
5898
5899 * array-notation-common.c (length_mismatch_in_expr): Changed the
5900 parameter type's from a dynamic array to a vec_tree. Also removed
5901 the size parameters.
5902 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
5903 the change above.
5904
2ce86d2e
BI
59052013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
5906
5907 * c-common.h (struct cilkplus_an_parts): New structure.
5908 (struct cilkplus_an_loop_parts): Likewise.
5909 (cilkplus_extract_an_triplets): New prototype.
5910 (fix_sec_implicit_args): Likewise.
5911 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
5912 (fix_sec_implicit_args): Likewise.
604b2bfc 5913
07a6825b
BI
59142013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
5915
5916 * array-notation-common.c (find_inv_trees): Removed an unwanted
5917 typecasting.
5918 * c-common.h (struct inv_list::additional_tcodes): Changed type from
5919 enum rid to enum tree_code.
5920
08346abd
JH
59212013-06-11 Jan Hubicka <jh@suse.cz>
5922
5923 * c-common.c (handle_alias_ifunc_attribute): Do not set
5924 DECL_EXTERNAL for weakref variables.
5925 * c-pragma.c (handle_pragma_weak): Make sure aliases
5926 are not declared as external.
5927
d60f1706
BI
59282013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
5929
5930 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
5931 function from c/c-array-notation.c.
5932 (is_cilkplus_reduce_builtin): Likewise.
5933 (find_rank): Likewise.
5934 (extract_array_notation_exprs): Likewise.
5935 (replace_array_notations): Likewise.
5936 (find_inv_trees): Likewise.
5937 (replace_inv_trees): Likewise.
5938 (contains_array_notation_expr): Likewise.
5939 (find_correct_array_notation_type): Likewise.
5940 * c-common.h (struct inv_list): Moved this struct from the file
5941 c/c-array-notation.c and added a new field called additional tcodes.
5942 (length_mismatch_in_expr_p): New prototype.
5943 (is_cilkplus_reduce_builtin): Likewise.
5944 (find_rank): Likewise.
5945 (extract_array_notation_exprs): Likewise.
5946 (replace_array_notation): Likewise.
5947 (find_inv_trees): Likewise.
5948 (replace_inv_trees): Likewise.
5949 (find_correct_array_notation_type): Likewise.
dfeadaa0 5950
36536d79
BI
59512013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
5952
5953 * c-common.c (c_define_builtins): When cilkplus is enabled, the
5954 function array_notation_init_builtins is called.
5955 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
5956 * c-common.def (ARRAY_NOTATION_REF): New tree.
5957 * c-common.h (build_array_notation_expr): New function declaration.
5958 (build_array_notation_ref): Likewise.
5959 (extract_sec_implicit_index_arg): New extern declaration.
5960 (is_sec_implicit_index_fn): Likewise.
5961 (ARRAY_NOTATION_CHECK): New define.
5962 (ARRAY_NOTATION_ARRAY): Likewise.
5963 (ARRAY_NOTATION_START): Likewise.
5964 (ARRAY_NOTATION_LENGTH): Likewise.
5965 (ARRAY_NOTATION_STRIDE): Likewise.
5966 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
5967 ARRAY_NOTATION_REF.
5968 (pp_c_expression): Likewise.
5969 * c.opt (flag_enable_cilkplus): New flag.
5970 * array-notation-common.c: New file.
5971
f7716d57
JJ
59722013-05-14 Jakub Jelinek <jakub@redhat.com>
5973
5974 PR c++/57274
5975 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
5976
a5e0cd1d
MG
59772013-05-10 Marc Glisse <marc.glisse@inria.fr>
5978
5979 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
5980 vectors.
5981
f6bc1c4a
HS
59822013-05-07 Han Shen <shenhan@google.com>
5983
5984 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
5985
3f12f6e9
SKS
59862013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
5987
5988 * c-common.c (check_user_alignment): Emit error for negative values.
5989
61949153
PC
59902013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5991
5992 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
5993
e93e18e9
PC
59942013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
5995
5996 * c-cppbuiltin.c (c_cpp_builtins): Do not define
5997 __GXX_EXPERIMENTAL_CXX1Y__.
5998
44d90fe1 59992013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 6000 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
6001
6002 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
6003 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
6004 to simply use OPT_Wpointer_arith.
6005 (c_sizeof_or_alignof_type): Likewise.
6006
13f39b2e
PC
60072013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
6008
6009 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
6010
4b84d650
JJ
60112013-04-12 Jakub Jelinek <jakub@redhat.com>
6012
6013 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
6014 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
6015 specifiers.
6016
fb037b5d
SB
60172013-04-07 Steven Bosscher <steven@gcc.gnu.org>
6018
6019 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
6020
4e856798
PC
60212013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
6022
6023 * c-common.c (pointer_int_sum): Remove dead code.
6024
4b1baac8
RS
60252013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
6026
6027 PR middle-end/56524
6028 * c-common.c (handle_optimize_attribute): Don't call
6029 save_optabs_if_changed.
6030
0b50e654
JJ
60312013-03-05 Jakub Jelinek <jakub@redhat.com>
6032
6033 PR middle-end/56461
6034 * c-pch.c (pch_init): Free target_validity at the end.
6035
48c41403
JJ
60362013-03-04 Jakub Jelinek <jakub@redhat.com>
6037
6038 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
6039
e664c61c
KS
60402013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
6041 Jakub Jelinek <jakub@redhat.com>
6042
6043 PR sanitizer/56454
6044 * c-common.c (handle_no_sanitize_address_attribute): New function.
6045 (c_common_attribute_table): Add no_sanitize_address attribute.
6046 (handle_no_address_safety_analysis_attribute): Add
6047 no_sanitize_address attribute, not no_address_safety_analysis
6048 attribute.
6049
a475fd3d 60502013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
6051
6052 PR target/52555
6053 * c-common.c (handle_optimize_attribute): Call
6054 save_optabs_if_changed.
6055
f6007d99
JJ
60562013-02-18 Jakub Jelinek <jakub@redhat.com>
6057 Steven Bosscher <steven@gcc.gnu.org>
6058
6059 PR pch/54117
6060 * c-opts.c (c_common_post_options): If debug info is enabled
6061 and non-dwarf*, refuse to load PCH files and when writing PCH
6062 file warn.
6063
cf35e2b1
JJ
60642013-02-05 Jakub Jelinek <jakub@redhat.com>
6065
6066 PR middle-end/56167
6067 * c-common.c (handle_error_attribute): Fix condition.
6068
32887460
JJ
60692013-01-30 Jakub Jelinek <jakub@redhat.com>
6070
6071 PR c++/55742
6072 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
6073
5af057d8
JM
60742013-01-18 Jason Merrill <jason@redhat.com>
6075
6076 PR target/54908
6077 * c.opt (-fextern-tls-init): New.
6078 * c-opts.c (c_common_post_options): Handle it.
6079
cc83c823
JJ
60802013-01-09 Jakub Jelinek <jakub@redhat.com>
6081
6082 PR c/48418
6083 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
6084 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
6085 and is either negative or bigger or equal to type precision
6086 of the first operand.
6087
a859517f
MP
60882012-12-03 Marek Polacek <polacek@redhat.com>
6089
6090 PR c/55570
6091 * c-common.c (check_user_alignment): Swap order of tests,
6092 check TREE_CODE first.
6093
2d7aa578
ESR
60942012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
6095
6096 PR c++/52654
6097 * c-common.h (overflow_type): New enum.
6098 (build_userdef_literal): Add overflow_type argument.
6099 (tree_userdef_literal): Add overflow_type.
6100 (USERDEF_LITERAL_OVERFLOW): New access macro.
6101 * c-common.c (build_userdef_literal): Add overflow_type
6102 argument.
6103 * c-lex.c (c_lex_with_flags): Add overflow_type to
6104 build_userdef_literal calls.
6105 (interpret_integer, interpret_float): Add overflow_type argument.
6106
cc3c4f62
RB
61072012-11-28 Richard Biener <rguenther@suse.de>
6108
6109 PR c/35634
6110 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6111 here and use a type with proper overflow behavior for types that would
6112 need to be promoted for the arithmetic.
6113
77bc5132
JJ
61142012-11-23 Jakub Jelinek <jakub@redhat.com>
6115
6116 PR sanitizer/55435
6117 * c-common.c (handle_no_address_safety_analysis_attribute): New
6118 function.
6119 (c_common_attribute_table): Add no_address_safety_analysis.
6120
5dc99c46
SB
61212012-11-16 Simon Baldwin <simonb@google.com>
6122
6123 * c.opt: Add f[no-]canonical-system-headers.
6124 * c-opts.c (c_common_handle_option): Handle
6125 OPT_fcanonical_system_headers.
6126
a4a0016d
ESR
61272012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
6128
6129 PR c++/54413
6130 * c-opts.c (c_common_handle_option): Set new flags.
6131 * c.opt: Describe new flags.
6132
7dbb85a7
JM
61332012-11-09 Jason Merrill <jason@redhat.com>
6134
6135 * c.opt (Wabi-tag): New.
6136
ad7bac31
AK
61372012-11-09 Andi Kleen <ak@linux.intel.com>
6138
6139 PR 55139
6140 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 6141 MEMMODEL_MASK
ad7bac31 6142
7332899a
MLI
61432012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6144
6145 PR c/53063
6146 * c.opt (Wformat): Make it Alias Wformat=1.
6147 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
6148 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
6149 LangEnabledBy.
6150 (Wformat=): RejectNegative. Use LangEnabledBy.
6151 (Wnonnull): Use LangEnabledBy.
6152 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
6153 * c-format.c (set_Wformat): Delete.
6154 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
6155 (maybe_read_dollar_number): Likewise.
6156 (avoid_dollar_number): Likewise.
6157 (finish_dollar_format_checking): Likewise.
6158 (check_format_info): Likewise.
6159 (check_format_info_main): Likewise.
6160 (check_format_types): Likewise.
6161 (format_type_warning): Likewise.
6162 * c-common.c (int): Likewise.
6163 (check_function_sentinel): Likewise.
6164 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 6165
34a180a6
MLI
61662012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6167
6168 PR c/53063
6169 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
6170 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
6171 Use LangEnabledBy.
6172 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
6173 common.opt.
6174 (Wvariadic-macros): Init(1).
6175 * c-opts.c (c_common_handle_option): Do not handle them
6176 explicitly.
6177 (c_common_post_options): Likewise.
6178 (sanitize_cpp_opts): warn_unused_macros is now
6179 cpp_warn_unused_macros.
6180 (push_command_line_include): Likewise.
6181 * c-common.c (warn_unknown_pragmas): Do not define.
6182 * c-common.h (warn_unknown_pragmas): Do not declare.
6183
3f46d6a5
MLI
61842012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
6185
6186 PR c/51294
6187 * c-common.c (conversion_warning): Handle conditional expressions.
6188
880661a4
JW
61892012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
6190
6191 PR c++/54930
6192 * c.opt (Wreturn_local_addr): Define new option.
6193
4514a96b
JM
61942012-10-25 Jason Merrill <jason@redhat.com>
6195
f14edc1a
JM
6196 * c.opt (Wvirtual-move-assign): New.
6197
4514a96b
JM
6198 * c.opt (Winherited-variadic-ctor): New.
6199
93100c6b
MG
62002012-10-25 Marc Glisse <marc.glisse@inria.fr>
6201
6202 PR c++/54427
6203 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
6204
1efcb8c6
JM
62052012-10-23 Joseph Myers <joseph@codesourcery.com>
6206
6207 * c-common.h (pch_cpp_save_state): Declare.
6208 * c-target.def (c_preinclude): New hook.
6209 * c-opts.c (done_preinclude): New.
6210 (push_command_line_include): Handle default preincluded header.
6211 (cb_file_change): Call pch_cpp_save_state when calling
6212 push_command_line_include.
6213 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
6214 (pch_cpp_save_state): New.
6215 (pch_init): Call pch_cpp_save_state conditionally, instead of
6216 calling cpp_save_state.
6217
4a0ae68e
MLI
62182012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6219
6220 PR c/53063
6221 PR c/40989
6222 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
6223 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
6224 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
6225 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
6226 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
6227 * c-opts.c (c_common_handle_option): Remove explicit handling from
6228 here.
6229 (c_common_post_options): Likewise.
6230
67e4210b
EB
62312012-10-18 Eric Botcazou <ebotcazou@adacore.com>
6232
6233 * c-ada-spec.c (LOCATION_COL): Delete.
6234 (compare_location): New function.
6235 (compare_node): Use it.
6236 (compare_comment): Likewise.
6237
65d4f2cd
MLI
62382012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
6239
6240 PR c/53063
6241 PR c/40989
6242 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
6243 * c-opts.c (c_common_handle_option): Do not set them here. Add
6244 comment.
6245 (c_common_post_options): Likewise.
6246
909881cb
EB
62472012-10-16 Eric Botcazou <ebotcazou@adacore.com>
6248
6249 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
6250 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
6251 Remove POINTER_TYPE handling, add large unsigned handling and use
6252 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
6253
3a785c97
JJ
62542012-10-12 Jakub Jelinek <jakub@redhat.com>
6255
6256 PR c/54381
6257 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
6258 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
6259 locs and array of 3 trees instead of just single loc and single
6260 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
6261 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
6262 For *cmp* builtins that take two sources strings report warnings
6263 about first and second source, not about destination and source.
6264
5e54f81d
MG
62652012-10-12 Marc Glisse <marc.glisse@inria.fr>
6266
6267 PR c++/53055
6268 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
6269
f5b02f1e
EB
62702012-10-11 Eric Botcazou <ebotcazou@adacore.com>
6271
6272 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
6273 declaring something coming from another file.
6274
b46dbc6c
AC
62752012-10-10 Arnaud Charlet <charlet@adacore.com>
6276
f5b02f1e 6277 PR ada/54845
b46dbc6c
AC
6278 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
6279
5d9de0d0
PC
62802012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
6281
6282 PR c++/54194
6283 * c-common.c (warn_about_parentheses): Add location_t parameter;
6284 use EXPR_LOC_OR_LOC.
6285 * c-common.h: Update declaration.
6286
a212e43f
MG
62872012-10-09 Marc Glisse <marc.glisse@inria.fr>
6288
6289 PR c++/54427
6290 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
6291 more operations. Make error messages optional.
6292 * c-common.h (enum stv_conv): Moved from c-typeck.c.
6293 (scalar_to_vector): Declare.
6294
b1db7f91
JM
62952012-10-08 Jason Merrill <jason@redhat.com>
6296
6297 * c-common.c (c_common_reswords): Add thread_local.
6298
e28d52cf
DS
62992012-10-08 Dodji Seketeli <dodji@redhat.com>
6300
6301 PR c++/53528 C++11 attribute support
6302 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
6303 new functions.
6304 * c-common.c (check_cxx_fundamental_alignment_constraints): New
6305 static function.
6306 (handle_aligned_attribute): In choose strictest alignment
6307 among many. Use new check_cxx_fundamental_alignment_constraints.
6308 (handle_transparent_union_attribute): In c++11 attribute syntax,
6309 don't look through typedefs.
6310
3b78de56
AC
63112012-10-04 Arnaud Charlet <charlet@adacore.com>
6312
6313 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
6314 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
6315 out of dumpfile.h.
6316
6040bb5f
DC
63172012-09-25 Dehao Chen <dehao@google.com>
6318
6319 PR middle-end/54645
3b78de56 6320 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
6321 map when read in the pch.
6322
3f8257db 63232012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
6324
6325 * c-ada-spec.c: Style fixes.
6326
3f8257db 63272012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
6328
6329 * c.opt (-fada-spec-parent): Define new command line switch.
6330 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
6331 is specified, generate binding spec as a child of the specified unit.
6332
0ccb505d
PC
63332012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
6334 Manuel López-Ibáñez <manu@gcc.gnu.org>
6335
6336 PR c++/53210
6337 * c.opt ([Winit-self]): Enabled by -Wall in C++.
6338
c583af79
AC
63392012-08-23 Arnaud Charlet <charlet@adacore.com>
6340
6341 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
6342 for pointers, and add missing Convention C pragma.
6343 (print_ada_struct_decl): Add missing aliased keyword.
6344 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
6345
1a4049e7
JJ
63462012-08-17 Jakub Jelinek <jakub@redhat.com>
6347
6348 * c-common.c (sizeof_pointer_memaccess_warning): New function.
6349 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
6350 * c-opts.c (c_common_handle_option): Enable it for -Wall.
6351 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
6352 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
6353
70b5e7dc
RG
63542012-08-10 Richard Guenther <rguenther@suse.de>
6355
6356 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
6357
f8923f7e
SB
63582012-08-07 Steven Bosscher <steven@gcc.gnu.org>
6359
6360 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
6361 instead of separate pp_newline and pp_flush.
6362 (print_c_tree): Likewise.
6363
e45abe1f
RH
63642012-07-26 Richard Henderson <rth@redhat.com>
6365
6366 * c-common.c (handle_hot_attribute): Allow labels.
6367 (handle_cold_attribute): Likewise.
6368
332f1d24
JJ
63692012-07-20 Jakub Jelinek <jakub@redhat.com>
6370
6371 PR c++/28656
6372 * c-common.c (check_function_nonnull): Handle multiple nonnull
6373 attributes properly.
6374
7ee2468b
SB
63752012-07-16 Steven Bosscher <steven@gcc.gnu.org>
6376
6377 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
6378 * c-ada-spec.c: Likewise.
6379 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
6380
ee7b28eb
SB
63812012-07-14 Steven Bosscher <steven@gcc.gnu.org>
6382
6383 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
6384 Remove code conditional on it.
6385
6bdf3519
SB
63862012-07-11 Steven Bosscher <steven@gcc.gnu.org>
6387
6388 * c-gimplify.c: Do not include basic-block.h.
6389 * c-common.c: Do not include linfuncs.h.
6390
532aafad
SB
63912012-07-08 Steven Bosscher <steven@gcc.gnu.org>
6392
6393 * c-common.h: Include tree.h.
6394
8d0d1915
JM
63952012-07-02 Jason Merrill <jason@redhat.com>
6396
6397 PR c++/53524
6398 * c-common.c (get_priority): Call default_conversion.
6399
fbc873ad
UB
64002012-07-01 Uros Bizjak <ubizjak@gmail.com>
6401
6402 * c-pch.c (c_common_write_pch): Remove unused variables.
6403
d4a10d0a
SB
64042012-06-29 Steven Bosscher <steven@gcc.gnu.org>
6405
6406 * cppspec.c: Moved from gcc/ to here.
6407
6f3a2e23
KT
64082012-06-27 Kai Tietz <ktietz@redhat.com>
6409
6410 PR preprocessor/37215
6411 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
6412
8ca92d04
SB
64132012-06-21 Steven Bosscher <steven@gcc.gnu.org>
6414
6415 * c-common.h (c_common_print_pch_checksum): Remove.
6416 * c-pch.c: Do not include output.h.
6417 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
6418 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
6419 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
6420 (struct c_pch_header): Remove.
6421 (get_ident): Update gpch version.
6422 (pch_init): Do not print executable_checksum to asm_out_file.
6423 Do not fail if there is no asm_out_file to read back from. Set
6424 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
6425 (c_common_write_pch): Verify that nothing was written to asm_out_file
6426 since pch_init was called. Do not write a c_pch_header, and do not
6427 copy from asm_out_file to the PCH.
6428 (c_common_read_pch): Do not read a c_pch_header, and do not restore
6429 the content of asm_out_file from the PCH.
6430 (c_common_print_pch_checksum): Remove.
6431 * c-opts.c (c_common_init): Print out executable_checksum directly.
6432
70f42967
SB
64332012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6434
6435 * c-target.def (objc_declare_unresolved_class_reference,
6436 objc_declare_class_definition): Add new hooks.
6437
a8781821
SB
64382012-06-19 Steven Bosscher <steven@gcc.gnu.org>
6439
6440 * c-lex.c: Do not include output.h.
6441 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
6442 Remove uses of ASM_OUTPUT_IDENT.
6443
9e1a8dd1
RR
64442012-06-15 Marc Glisse <marc.glisse@inria.fr>
6445
6446 PR c++/51033
6447 * c-common.h (c_build_vec_perm_expr): Move decl here.
6448 * c-common.c (c_build_vec_perm_expr): Move definition
6449 here.
6450
6f07a821
SB
64512012-06-06 Steven Bosscher <steven@gcc.gnu.org>
6452
6453 * c.opt (fconserve-space): Turn into a no-op.
6454
9faeb493 64552012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
6456
6457 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
6458 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
6459 both the start and end of the function.
6460
a4b7d13c
SB
64612012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6462
6463 * c-common.c: Do not include output.h.
6464 * c-pragma.c: Likewise.
6465
c265f413
SA
64662012-06-04 Steven Bosscher <steven@gcc.gnu.org>
6467
6468 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
6469 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
6470 (lang_decl_name): Handle namespace decls.
6471
be7a421e
SB
64722012-05-31 Steven Bosscher <steven@gcc.gnu.org>
6473
6474 * c-ada-spec.c: Do not include output.h.
6475 * c-semantics.c: Likewise.
6476
65de6659
JM
64772012-05-29 Joseph Myers <joseph@codesourcery.com>
6478
6479 * c-common.c: Fix typo.
6480
ca5f4331
MM
64812012-05-29 Michael Matz <matz@suse.de>
6482
6483 * c-common.h (c_expand_decl): Remove prototype.
6484
4f7f7aca
MLI
64852012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6486
6487 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
6488 * c-opts.c (c_common_handle_option): Remove code handling
6489 warn_missing_braces.
6490
4a792f9b
PC
64912012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
6492
6493 PR c++/25137
6494 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
6495 -Wmissing_braces.
6496
650dc14a
DS
64972012-05-22 Dodji Seketeli <dodji@redhat.com>
6498
6499 PR c++/53322
6500 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
6501
9b095bf1
MLI
65022012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
6503
6504 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
6505 * c-opts.c (c_common_handle_option): Do not handle explicitly
6506 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
6507
0b2c4be5
DS
65082012-05-16 Dodji Seketeli <dodji@redhat.com>
6509
6510 PR preprocessor/7263
6511 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
6512 to cpp_classify_number. For diagnostics, use the precise location
6513 instead of the global input_location.
6514
a1bde5af
PC
65152012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
6516
d02924ef 6517 PR c++/11856
a1bde5af
PC
6518 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
6519
d1ede5f4
BS
65202012-05-14 Bernd Schmidt <bernds@codesourcery.com>
6521
a1bde5af 6522 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 6523
f2bc201f
MLI
65242012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
6525
6526 PR 53063
6527 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
6528 Wreorder): Use LangEnabledBy.
6529 * c-opts.c (c_common_handle_option): Do not enable them
6530 explicitly. Call lang-specific generated functions.
6531 (c_common_post_options): Do not set them here.
6532
95744782
MLI
65332012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
6534
6535 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
6536 Wmissing-field-initializers,Wmissing-parameter-type,
6537 Wold-style-declaration,Woverride-init): Use EnabledBy.
6538 * c-opts.c (c_common_post_options): Do not set here explicitly.
6539
7d5a5747
MLI
65402012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
6541
6542 PR 53063
6543 * c-opts.c (c_common_handle_option): Use handle_generated_option
6544 to enable sub-options.
6545
5a3c9cf2
PC
65462012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
6547
6548 PR c++/53158
6549 * c-common.c (warnings_for_convert_and_check): Use warning_at.
6550
3ac8781c
RG
65512012-05-10 Richard Guenther <rguenther@suse.de>
6552
6553 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
6554 adjust commentary about TYPE_IS_SIZETYPE types.
6555
1e537948
MLI
65562012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6557
6558 PR c++/53261
6559 * c-common.c (warn_logical_operator): Check that argument of
6560 integer_zerop is not NULL.
6561
f2c4a785
MLI
65622012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
6563
6564 PR c/43772
6565 * c-common.c (warn_logical_operator): Do not warn if either side
6566 is already true or false.
6567
50f305ca
MLI
65682012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6569
6570 PR c/51712
6571 * c-common.c (expr_original_type): New.
6572 (shorten_compare): Do not warn for enumeration types.
6573
0c3641b0
MLI
65742012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
6575
6576 * c.opt (fpermissive): Add Var(flag_permissive).
6577
7edaa4d2
MG
65782012-04-30 Marc Glisse <marc.glisse@inria.fr>
6579
6580 PR c++/51033
6581 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
6582 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
6583
b9c8da34
DS
65842012-04-30 Dodji Seketeli <dodji@redhat.com>
6585
6586 Add -Wvarargs option
6587 * c.opt (Wvarargs): Define new option.
6588
e6c69da0
MLI
65892012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6590
6591 * c-common.c (check_function_arguments): Replace
6592 Wmissing-format-attribute with Wsuggest-attribute=format.
6593
90137d8f
MLI
65942012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
6595
6596 * c.opt (Wsuggest-attribute=format): New. Alias of
6597 Wmissing-format-attribute.
6598 * c-format.c (decode_format_type): Replace
6599 Wmissing-format-attribute with Wsuggest-attribute=format.
6600 (check_function_format): Likewise.
6601
9faeb493 66022012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
6603
6604 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
6605 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
6606 * c.opt: Add Wliteral-suffix.
6607
c1771a20
MLI
66082012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6609
6610 PR c/44774
6611 * c.opt (Wpedantic): New.
6612 (pedantic): Alias Wpedantic.
6613 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
6614 (c_common_post_options): Likewise.
6615 (sanitize_cpp_opts): Likewise.
6616 * c-lex.c (interpret_float): Likewise.
6617 * c-format.c (check_format_types): Likewise.
6618 * c-common.c (pointer_int_sum): Likewise.
6619 (c_sizeof_or_alignof_type): Likewise.
6620 (c_add_case_label): Likewise.
6621 (c_do_switch_warnings): Likewise.
6622 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6623
04b391c1
JM
66242012-04-15 Jason Merrill <jason@redhat.com>
6625
6626 PR c++/52818
6627 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
6628 (C_STD_NAME): Distinguish between C++98 and C++11.
6629
ac868f29
EB
66302012-04-11 Eric Botcazou <ebotcazou@adacore.com>
6631
6632 PR target/52624
6633 * c-common.h (uint16_type_node): Rename into...
6634 (c_uint16_type_node): ...this.
6635 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
6636 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
6637
fd4116f4
MLI
66382012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
6639
6640 * c-common.c (warn_if_unused_value): Move definition to here.
6641 * c-common.h (warn_if_unused_value): Move declaration to here.
6642
573ac65e
WB
66432012-03-23 William Bader <williambader@hotmail.com>
6644
6645 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
6646
552b8185
JM
66472012-03-20 Jason Merrill <jason@redhat.com>
6648
6649 * c-common.h (enum cxx_dialect): Add cxx1y.
6650 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
6651 test.
6652 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
6653 * c-opts.c (c_common_post_options): Likewise.
6654 (set_std_cxx1y): New.
6655 (c_common_handle_option): Call it.
6656 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
6657
04398fa8
PC
66582012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
6659
6660 PR c++/14710
6661 * c.opt ([Wuseless-cast]): Add.
6662
d2a12ae7
RG
66632012-03-16 Richard Guenther <rguenther@suse.de>
6664
6665 * c-pretty-print.c (pp_c_initializer_list): Adjust.
6666
a12bf402
MLI
66672012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6668
6669 PR c++/44783
6670 * c.opt (ftemplate-backtrace-limit) Add.
6671
5c30094f
RO
66722012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6673
6674 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
6675 handling.
6676 * c-pragma.c (handle_pragma_extern_prefix): Remove.
6677 (init_pragma): Don't register extern_prefix.
6678
21fa2faf
RG
66792012-03-12 Richard Guenther <rguenther@suse.de>
6680
6681 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
6682 (builtin_type_for_size): Likewise.
6683
e3793c6f
JJ
66842012-02-13 Jakub Jelinek <jakub@redhat.com>
6685
6686 PR c++/52215
6687 * c-common.c (sync_resolve_params): Don't decide whether to convert
6688 or not based on TYPE_SIZE comparison, convert whenever arg_type
6689 is unsigned INTEGER_TYPE.
6690
93286335
PC
66912012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
6692
6693 PR c/52118
6694 * c.opt ([Wunused-local-typedefs]): Fix description.
6695
7a421706
MS
66962012-01-24 Mike Stump <mikestump@comcast.net>
6697
6698 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
6699 exactly.
6700
ba9b1f11
RG
67012012-01-18 Richard Guenther <rguenther@suse.de>
6702
6703 * c-opts.c (c_common_post_options): Reset LTO flags if
6704 we are about to generate a PCH.
6705
465406be
PC
67062012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
6707
6708 PR c++/51777
6709 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
6710 use pp_unsigned_wide_integer.
6711
aee15221
RG
67122012-01-10 Richard Guenther <rguenther@suse.de>
6713
6714 PR middle-end/51806
6715 * c-opts.c (c_common_handle_option): Move -Werror handling
6716 to language independent code.
6717
5720c0dc
RG
67182012-01-05 Richard Guenther <rguenther@suse.de>
6719
6720 PR middle-end/51764
6721 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
6722 from common.opt.
6723
73ac190a
PC
67242011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
6725
6726 PR c++/51316
6727 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
6728 of array types with an unknown bound.
6729
48b0b196
JM
67302011-12-20 Joseph Myers <joseph@codesourcery.com>
6731
6732 * c-common.c (flag_isoc99): Update comment to refer to C11.
6733 (flag_isoc1x): Change to flag_isoc11.
6734 * c-common.h (flag_isoc99): Update comment to refer to C11.
6735 (flag_isoc1x): Change to flag_isoc11.
6736 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
6737 C11.
6738 * c-opts.c (set_std_c1x): Change to set_std_c11.
6739 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
6740 Call set_std_c11.
6741 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
6742 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
6743 * c.opt (std=c1x): Change to std=c11. Document as non-draft
6744 standard.
6745 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
6746 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
6747 (std=gnu1x): Make alias of std=gnu11.
6748
d58d6eb5
JM
67492011-12-19 Jason Merrill <jason@redhat.com>
6750
6751 PR c++/51228
6752 * c-common.c (handle_transparent_union_attribute): Check the first
6753 field if the type is complete.
6754
b3908fcc
JW
67552011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
6756
6757 PR libstdc++/51365
6758 * c-common.c (RID_IS_FINAL): Add.
6759 * c-common.h (RID_IS_FINAL): Add.
6760
fea3ca91
IS
67612011-11-30 Iain Sandoe <iains@gcc.gnu.org>
6762
6763 * c.opt (fgnu-runtime): Provide full description.
6764 (fnext-runtime): Likewise.
6765 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
6766
62bad7cd
AM
67672011-11-28 Andrew MacLeod <amacleod@redhat.com>
6768
6769 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
6770 predefines in one place. Add LOCK_FREE predefines.
6771 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
6772 new func.
6773
c466c4ff
AM
67742011-11-24 Andrew MacLeod <amacleod@redhat.com>
6775
6776 PR c/51256
9faeb493 6777 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 6778 conditions
9faeb493
UB
6779 (resolve_overloaded_atomic_exchange,
6780 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
6781 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
6782 error_mark_node for error conditions.
9faeb493 6783
a5952633
RG
67842011-11-08 Richard Guenther <rguenther@suse.de>
6785
6786 PR middle-end/51010
6787 c-family/
6788
0a35513e
AH
67892011-11-07 Richard Henderson <rth@redhat.com>
6790 Aldy Hernandez <aldyh@redhat.com>
6791 Torvald Riegel <triegel@redhat.com>
6792
6793 Merged from transactional-memory.
6794
6795 * c-common.c (handle_tm_wrap_attribute,
6796 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
6797 (struct c_common_reswords): Added __transaction* keywords.
6798 (struct c_common_attribute_table): Added transaction* and tm_regparm
6799 attributes.
6800 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
6801 masks.
6802 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
6803 find_tm_attribute): Declare.
6804
6d87092d
JM
68052011-11-07 Jason Merrill <jason@redhat.com>
6806
6807 PR c++/35688
6808 * c-common.c, c-common.h: Revert yesterday's changes.
6809
8e7860a1
JM
68102011-11-06 Jason Merrill <jason@redhat.com>
6811
6812 PR c++/35688
6813 * c-common.c (decl_has_visibility_attr): Split out from...
6814 (c_determine_visibility): ...here.
6815 * c-common.h: Declare it.
6816
d19fa6b5
JM
68172011-11-06 Joseph Myers <joseph@codesourcery.com>
6818
6819 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
6820 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
6821 type.
6822 (check_user_alignment): New. Split out of
6823 handle_aligned_attribute. Disallow integer constants with
6824 noninteger types. Conditionally allow zero.
6825 (handle_aligned_attribute): Use check_user_alignment.
6826 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
6827
86951993
AM
68282011-11-06 Andrew MacLeod <amacleod@redhat.com>
6829 Richard Henderson <rth@redhat.com>
6830
6831 Merged from cxx-mem-model.
6832
6833 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 6834 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
6835 parameters that are the same type size.
6836 (get_atomic_generic_size): New. Find size of generic
6837 atomic function parameters and do typechecking.
6838 (add_atomic_size_parameter): New. Insert size into parameter list.
6839 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
6840 either __atomic_exchange_n or external library call.
9faeb493 6841 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 6842 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 6843 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
6844 __atomic_load_n or an external library call.
6845 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
6846 __atomic_store_n or an external library call.
6847 (resolve_overloaded_builtin): Handle new __atomic builtins.
6848
cf9e9959
EB
68492011-11-04 Eric Botcazou <ebotcazou@adacore.com>
6850
6851 PR c++/50608
6852 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
6853 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
6854 <INDIRECT_REF>: Return the argument.
6855 <ARRAY_REF>: Remove special code for negative offset.
6856 Call fold_build_pointer_plus instead of size_binop.
6857 (fold_offsetof): Remove STOP_REF argument and adjust.
6858 * c-common.h (fold_offsetof_1): Declare.
6859 (fold_offsetof): Remove STOP_REF argument.
6860
25339f10
JM
68612011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
6862
6863 PR c++/50810
6864 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6865 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6866 Wnarrowing for C++0x and C++98.
6867 * c.opt ([Wnarrowing]): Update.
6868
89401152
PC
68692011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
6870
6871 PR c++/44277
6872 * c.opt: Add Wzero-as-null-pointer-constant.
6873
97e3ad20
JM
68742011-10-31 Jason Merrill <jason@redhat.com>
6875
15694fdd
JM
6876 * c.opt (-fdeduce-init-list): Off by default.
6877
97e3ad20
JM
6878 PR c++/50920
6879 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
6880 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
6881 and -Wc++11-compat.
6882 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
6883
fb9120e3
RAV
68842011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
6885
6886 PR c++/30066
6887 * c.opt (fvisibility-inlines-hidden): Description change.
6888
3ce4f9e4
ESR
68892011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
6890
6891 Implement C++11 user-defined literals.
6892 * c-common.c (build_userdef_literal): New.
6893 * c-common.def: New tree code.
6894 * c-common.h (tree_userdef_literal): New tree struct and accessors.
6895 * c-lex.c (interpret_float): Add suffix parm.
6896 (c_lex_with_flags): Build literal tokens.
6897
5f53c243
PC
68982011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6899
6900 PR c++/50841
6901 Revert:
6902 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6903
6904 PR c++/50810
6905 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6906 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6907 Wnarrowing for C++0x and C++98.
6908 * c.opt ([Wnarrowing]): Update.
6909
263734e1
PC
69102011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
6911
6912 PR c++/50810
6913 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
6914 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
6915 Wnarrowing for C++0x and C++98.
6916 * c.opt ([Wnarrowing]): Update.
6917
d2e312d7
PC
69182011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
6919
6920 PR c++/45385
6921 * c-common.c (conversion_warning): Remove code looking for
6922 artificial operands.
6923
d17687f6
DS
69242011-10-18 Dodji Seketeli <dodji@redhat.com>
6925
6926 PR bootstrap/50760
6927 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 6928 !NO_IMPLICIT_EXTERN_C.
d17687f6 6929
fc8396e9
PC
69302011-10-17 Michael Spertus <mike_spertus@symantec.com>
6931
6932 * c-common.c (c_common_reswords): Add __bases,
6933 __direct_bases.
6934 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
6935
69362011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
6937
6938 PR c++/50757
6939 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
6940
847e697a
TT
69412011-10-15 Tom Tromey <tromey@redhat.com>
6942 Dodji Seketeli <dodji@redhat.com>
6943
6944 * c.opt (fdebug-cpp): New option.
6945 * c-opts.c (c_common_handle_option): Handle the option.
6946 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
6947 output stream in parameter. Factorized from ...
6948 (maybe_print_line): ... this. Dump location debug information when
6949 -fdebug-cpp is in effect.
6950 (print_line_1): New static function. Takes an output stream in
6951 parameter. Factorized from ...
6952 (print_line): ... here. Dump location information when -fdebug-cpp
6953 is in effect.
6954 (scan_translation_unit): Dump location information when
6955 -fdebug-cpp is in effect.
6956
92582b75
TT
69572011-10-15 Tom Tromey <tromey@redhat.com>
6958 Dodji Seketeli <dodji@redhat.com>
6959
6960 * c.opt (ftrack-macro-expansion): New option. Handle it with and
6961 without argument.
6962 * c-opts.c (c_common_handle_option)<case
6963 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
6964 cases. Handle -ftrack-macro-expansion with and without argument.
6965
46427374
TT
69662011-10-15 Tom Tromey <tromey@redhat.com>
6967 Dodji Seketeli <dodji@redhat.com>
6968
6969 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
6970 (print_line, cb_define, do_line_change): Adjust to avoid touching
6971 the internals of struct line_map. Use the public API instead.
6972 * c-pch.c (c_common_read_pch): Likewise.
6973 * c-lex.c (fe_file_change): Likewise.
6974
fc8396e9
PC
69752011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
6976
6977 PR c++/17212
6978 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
6979
69802011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
6981
6982 PR c++/33067
6983 * c-pretty-print.c (pp_c_floating_constant): Output
6984 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
6985
e79983f4
MM
69862011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6987
6988 * c-common.c (def_builtin_1): Delete old interface with two
6989 parallel arrays to hold standard builtin declarations, and replace
6990 it with a function based interface that can support creating
6991 builtins on the fly in the future. Change all uses, and poison
6992 the old names. Make sure 0 is not a legitimate builtin index.
6993 * c-omp.c (c_finish_omp_barrier): Ditto.
6994 (c_finish_omp_taskwait): Ditto.
6995 (c_finish_omp_flush): Ditto.
6996
6637388f
TG
69972011-10-11 Tristan Gingold <gingold@adacore.com>
6998
6999 * c.opt: (fallow-parameterless-variadic-functions): New.
7000
3797cb21
DS
70012011-09-08 Dodji Seketeli <dodji@redhat.com>
7002
7003 PR c++/33255 - Support -Wunused-local-typedefs warning
7004 * c-common.h (struct c_language_function::local_typedefs): New
7005 field.
9faeb493
UB
7006 (record_locally_defined_typedef, maybe_record_typedef_use)
7007 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 7008 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
7009 (maybe_record_typedef_use)
7010 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
7011 * c.opt: Declare new -Wunused-local-typedefs flag.
7012
693ddb1b
EB
70132011-09-06 Eric Botcazou <ebotcazou@adacore.com>
7014
7015 PR middle-end/50266
7016 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
7017 computations.
7018
830c740f
RG
70192011-09-05 Richard Guenther <rguenther@suse.de>
7020
7021 * c-common.c (complete_array_type): Use ssize_int (-1) instead
7022 of integer_minus_one_node for empty array upper bounds.
7023
892a371f
DS
70242011-08-28 Dodji Seketeli <dodji@redhat.com>
7025
7026 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
7027 it's the first time it's being called on this main TU.
7028
0e3fdb48
RB
70292011-08-24 Richard Guenther <rguenther@suse.de>
7030
7031 PR c/49396
7032 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
7033
70342011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
7035
7036 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
7037 defined in cpp_init_builtins and c_cpp_builtins.
7038
d4a83c10
JM
70392011-08-19 Joseph Myers <joseph@codesourcery.com>
7040
7041 * c-common.c (c_common_reswords): Add __builtin_complex.
7042 * c-common.h (RID_BUILTIN_COMPLEX): New.
7043
bbceee64
JM
70442011-08-18 Joseph Myers <joseph@codesourcery.com>
7045
7046 * c-common.c (c_common_reswords): Add _Noreturn.
7047 (keyword_is_function_specifier): Handle RID_NORETURN.
7048 * c-common.h (RID_NORETURN): New.
7049
3f8257db 70502011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
7051
7052 * c-common.c (unsafe_conversion_p): New function. Check if it is
7053 unsafe to convert an expression to the type.
7054 (conversion_warning): Adjust, use unsafe_conversion_p.
7055 * c-common.h (unsafe_conversion_p): New function declaration.
7056
20906c66
JJ
70572011-08-02 Jakub Jelinek <jakub@redhat.com>
7058
7059 * c-common.h (c_finish_omp_atomic): Adjust prototype.
7060 (c_finish_omp_taskyield): New prototype.
7061 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
7062 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
7063 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
7064 or RHS1 have side-effects, evaluate those too in the right spot,
7065 if it is a decl and LHS is also a decl, error out if they
7066 aren't the same.
7067 (c_finish_omp_taskyield): New function.
7068 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
7069 * c-pragma.c (omp_pragmas): Add taskyield.
7070 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
7071 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
7072 PRAGMA_OMP_CLAUSE_MERGEABLE.
7073
770e5a2e
DS
70742011-07-25 Dodji Seketeli <dodji@redhat.com>
7075
7076 * c-common.h (set_underlying_type): Remove parm name from
7077 declaration.
7078
1baae426
RG
70792011-07-25 Romain Geissler <romain.geissler@gmail.com>
7080
7081 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 7082
fcb21722
JM
70832011-07-22 Jason Merrill <jason@redhat.com>
7084
76f86d00
JM
7085 PR c++/49793
7086 * c.opt (Wnarrowing): New.
7087
3a636414
JM
7088 PR c++/30112
7089 * c-common.h: Declare c_linkage_bindings.
7090 * c-pragma.c (handle_pragma_redefine_extname): Use it.
7091
fcb21722
JM
7092 PR c++/49813
7093 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
7094 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
7095 as flag_isoc99 for 'restrict'.
7096 (pp_c_specifier_qualifier_list): Likewise for _Complex.
7097
02614448
ILT
70982011-07-21 Ian Lance Taylor <iant@google.com>
7099
7100 PR middle-end/49705
7101 * c-common.c (c_disable_warnings): New static function.
7102 (c_enable_warnings): New static function.
7103 (c_fully_fold_internal): Change local unused_p to bool. Call
7104 c_disable_warnings and c_enable_warnings rather than change
7105 c_inhibit_evaluation_warnings.
7106
34429675
JM
71072011-07-20 Jason Merrill <jason@redhat.com>
7108
7109 PR c++/6709 (DR 743)
7110 PR c++/42603 (DR 950)
7111 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
7112 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
7113 (CPP_DECLTYPE): New.
7114 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
7115
5d49b6a7
RG
71162011-07-19 Richard Guenther <rguenther@suse.de>
7117
7118 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
7119 * c-omp.c (c_finish_omp_for): Likewise.
7120
e84a58ff
EB
71212011-07-12 Eric Botcazou <ebotcazou@adacore.com>
7122
7123 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
7124 body on the next line.
7125
329af3c7
JM
71262011-07-08 Jason Merrill <jason@redhat.com>
7127
4063e61b
JM
7128 PR c++/45437
7129 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
7130
329af3c7
JM
7131 PR c++/49673
7132 * c-common.c (c_apply_type_quals_to_decl): Don't check
7133 TYPE_NEEDS_CONSTRUCTING.
7134
1a072294
RG
71352011-07-06 Richard Guenther <rguenther@suse.de>
7136
7137 * c-common.c (c_common_nodes_and_builtins):
7138 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
7139
fce5dddd
RG
71402011-07-05 Richard Guenther <rguenther@suse.de>
7141
7142 * c-common.c (c_common_nodes_and_builtins): Build all common
7143 tree nodes first.
7144
45d439ac
JJ
71452011-06-27 Jakub Jelinek <jakub@redhat.com>
7146
56300785
JJ
7147 * c-common.h (c_tree_chain_next): New static inline function.
7148
45d439ac
JJ
7149 * c-common.c (check_builtin_function_arguments): Handle
7150 BUILT_IN_ASSUME_ALIGNED.
7151
e0a8ecf2
AM
71522011-06-21 Andrew MacLeod <amacleod@redhat.com>
7153
7154 * c-common.c: Add sync_ or SYNC__ to builtin names.
7155 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
7156
71572011-06-20 Pierre Vittet <piervit@pvittet.com>
7158
7159 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
7160 handler.
7161 (gen_pragma_handler): New union.
7162 (internal_pragma_handler): New type.
7163 (c_register_pragma_with_data)
7164 (c_register_pragma_with_expansion_and_data): New functions.
7165
7166 * c-pragma.c (registered_pragmas, c_register_pragma_1)
7167 (c_register_pragma, c_register_pragma_with_expansion)
7168 (c_invoke_pragma_handler): Changed to work with
7169 internal_pragma_handler.
7170 (c_register_pragma_with_data)
7171 (c_register_pragma_with_expansion_and_data): New functions.
7172
677f3fa8
JM
71732011-06-14 Joseph Myers <joseph@codesourcery.com>
7174
7175 * c-common.c: Include common/common-target.h.
7176 (handle_section_attribute): Use
7177 targetm_common.have_named_sections.
7178 * c-cppbuiltin.c: Include common/common-target.h.
7179 (c_cpp_builtins): Use targetm_common.except_unwind_info.
7180
d7fc8c14
RG
71812011-06-10 Richard Guenther <rguenther@suse.de>
7182
7183 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
7184 to print a IDENTIFIER_NODE.
7185
10e48e39
RO
71862011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7187 Joseph Myers <joseph@codesourcery.com>
7188
7189 * c.opt (fbuilding-libgcc): New option.
7190 * c-cppbuiltin.c (c_cpp_builtins): Define
7191 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
7192
6976ae51
JM
71932011-06-07 Jason Merrill <jason@redhat.com>
7194
3ff60975
JM
7195 * c-common.c (max_tinst_depth): Lower default to 900.
7196
6976ae51
JM
7197 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
7198
009db074
RG
71992011-06-07 Richard Guenther <rguenther@suse.de>
7200
7201 * c-common.c (c_common_nodes_and_builtins): Do not set
7202 size_type_node or call set_sizetype.
7203
b4592b92
DS
72042011-06-07 Dodji Seketeli <dodji@redhat.com>
7205
7206 PR debug/49130
7207 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 7208 type when using pointer comparison to compare types.
b4592b92 7209
014ab419
JW
72102011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
7211
7212 * c.opt: Add -Wdelete-non-virtual-dtor.
7213 * c-opts.c (c_common_handle_option): Include it in -Wall.
7214
4f60111f
NF
72152011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
7216
7217 PR bootstrap/49190
7218
7219 Revert:
7220 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7221
7222 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7223 not tree_common.
7224
4cc4f2f4
JJ
72252011-05-27 Jakub Jelinek <jakub@redhat.com>
7226
7227 PR c++/49165
7228 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
7229 C++ don't call c_common_truthvalue_conversion on void type arms.
7230
38e01f9e
NF
72312011-05-27 Nathan Froyd <froydnj@codesourcery.com>
7232
7233 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
7234 (stmt_list_stack): Define.
7235 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
7236 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
7237
92e948a8
NF
72382011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7239
7240 * c-common.c (warning_candidate_p): Check for BLOCKs.
7241
a2fc3e63
NF
72422011-05-26 Nathan Froyd <froydnj@codesourcery.com>
7243
7244 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
7245 not tree_common.
7246
0957c029
JJ
72472011-05-25 Jakub Jelinek <jakub@redhat.com>
7248
7249 * c-common.c (def_fn_type): Remove extra va_end.
7250
828fb3ba
JM
72512011-05-23 Jason Merrill <jason@redhat.com>
7252
7253 PR c++/48106
7254 * c-common.c (c_common_get_narrower): New.
7255 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
7256
dde05067
NF
72572011-05-23 Nathan Froyd <froydnj@codesourcery.com>
7258
7259 * c-common.h (check_function_arguments): Tweak prototype of
7260 check_function_arguments.
7261 * c-common.c (check_function_arguments): Likewise. Adjust
7262 calls to check_function_nonnull, check_function_format, and
7263 check_function_sentinel.
7264 (check_function_sentinel): Take a FUNCTION_TYPE rather than
7265 separate attributes and typelist arguments. Use
7266 FOREACH_FUNCTION_ARGS to iterate over argument types.
7267
3c0d13bf
PC
72682011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7269
7270 * c-common.c (c_common_reswords): Reorder.
7271 * c-common.h (rid): Likewise.
7272
8242dd04
NF
72732011-05-10 Nathan Froyd <froydnj@codesourcery.com>
7274
7275 * c-common.c (def_fn_type): Don't call build_function_type, call
7276 build_function_type_array or build_varargs_function_type_array
7277 instead.
7278 (c_common_nodes_and_builtins): Likewise.
7279
3d528853
NF
72802011-05-05 Nathan Froyd <froydnj@codesourcery.com>
7281
7282 * c-common.c (c_add_case_label): Omit the loc argument to
7283 build_case_label.
7284 * c-common.h (build_case_label): Remove.
7285 * c-semantics.c (build_case_label): Remove.
7286
a04a722b
JM
72872011-05-05 Joseph Myers <joseph@codesourcery.com>
7288
7289 * c-objc.h (objc_start_method_definition): Update prototype.
7290 * stub-objc.c (objc_start_method_definition): Add extra parameter.
7291
e19a18d4
NF
72922011-05-04 Nathan Froyd <froydnj@codesourcery.com>
7293
7294 * c-common.c (check_main_parameter_types): Reindent. Don't use
7295 TYPE_ARG_TYPES directly.
7296 (handle_nonnull_attribute): Likewise.
7297 (sync_resolve_params): Likewise.
7298 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
7299 to check_format_string.
7300 (handle_format_attribute): Likewise.
7301 (check_format_string): Take a function type to examine instead of
7302 a type list. Use a function_arg_iterator to step through argument
7303 types.
7304
c62c040f
RG
73052011-05-04 Richard Guenther <rguenther@suse.de>
7306
7307 * c-common.c (fix_string_type): Use size_int for index type bounds.
7308 (start_fname_decls): Do not pass NULL to build_int_cst.
7309 (c_init_attributes): Likewise.
7310 * c-lex.c (c_lex_with_flags): Likewise.
7311
c12ff9d8
JM
73122011-04-27 Jason Merrill <jason@redhat.com>
7313
7314 * c-common.c (make_tree_vector_from_list): New.
7315 * c-common.h: Declare it.
7316
304dfbe3
RG
73172011-04-26 Richard Guenther <rguenther@suse.de>
7318
7319 PR preprocessor/48248
7320 * c-ppoutput.c (maybe_print_line): Always optimize newlines
7321 for output size with -P.
7322
3c0d13bf
PC
73232011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
7324
7325 * c-common.c (struct c_common_resword): Add __underlying_type.
7326 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
7327
04695783
JM
73282011-04-20 Jim Meyering <meyering@redhat.com>
7329
7330 * c-format.c (init_dollar_format_checking): Remove useless
7331 if-before-free.
7332
0dc33c3c
NP
73332011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
7334
7335 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 7336 (objc_detect_field_duplicates): New.
0dc33c3c 7337 * stub-objc.c: Likewise.
3c0d13bf 7338
c59633d9
NP
73392011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7340
7341 * stub-objc.c (objc_declare_protocols): Renamed to
7342 objc_declare_protocol.
7343 * c-objc.h: Likewise.
3c0d13bf 7344
32dabdaf
NP
73452011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
7346
7347 * stub-objc.c (objc_declare_class): Updated argument name.
7348
81f653d6
NF
73492011-04-12 Nathan Froyd <froydnj@codesourcery.com>
7350
7351 * c-common.h (c_common_init_ts): Declare.
7352 * c-common.c (c_common_init_ts): Define.
7353
eb345401
NP
73542011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
7355
7356 * c-objc.h (objc_build_message_expr): Updated prototype.
7357 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 7358
a358e188
MJ
73592011-04-12 Martin Jambor <mjambor@suse.cz>
7360
7361 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
7362 of cgraph_node.
7363
e6313a78
RG
73642011-04-11 Richard Guenther <rguenther@suse.de>
7365
7366 * c-common.c (complete_array_type): Build a range type of
7367 proper type.
7368
dcf0c47e
NF
73692011-04-08 Nathan Froyd <froydnj@codesourcery.com>
7370
7371 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
7372 (handle_type_generic_attribute): Likewise.
7373
1ee44b26
JM
73742011-04-07 Jason Merrill <jason@redhat.com>
7375
7376 PR c++/48450
7377 * c-common.c (c_common_truthvalue_conversion): Don't ignore
7378 conversion from C++0x scoped enum.
7379
acce4e77
JM
73802011-04-06 Joseph Myers <joseph@codesourcery.com>
7381
7382 * c-target-def.h: New file.
7383 * c-target.def: New file.
7384 * c-target.h: New file.
7385 * c-common.c (targetcm): Don't define here.
7386 * c-common.h (default_handle_c_option): Declare.
7387 * c-format.c: Include c-target.h instead of target.h.
7388 * c-opts.c: Include c-target.h instead of target.h. Explicitly
7389 include tm.h.
7390 (default_handle_c_option): Move from targhooks.c.
7391
e2eefb55
JJ
73922011-03-29 Jakub Jelinek <jakub@redhat.com>
7393
7394 PR preprocessor/48248
7395 * c-ppoutput.c (print): Add src_file field.
7396 (init_pp_output): Initialize it.
7397 (maybe_print_line): Don't optimize by adding up to 8 newlines
7398 if map->to_file and print.src_file are different file.
7399 (print_line): Update print.src_file.
7400
ba78087b
KT
74012011-03-25 Kai Tietz <ktietz@redhat.com>
7402
7403 * c-ada-spec.c (compare_comment): Use filename_cmp
7404 instead of strcmp for filename.
7405
0edf1bb2
JL
74062011-03-25 Jeff Law <law@redhat.com>
7407
adfac8df 7408 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 7409
c7dc8804
JM
74102011-03-25 Jason Merrill <jason@redhat.com>
7411
7412 * c.opt: Add -std=c++03.
7413
d1d879b1
EB
74142011-03-22 Eric Botcazou <ebotcazou@adacore.com>
7415
7416 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
7417
3f8257db 74182011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
7419
7420 PR target/12171
5050afdf
KT
7421 * c-pretty-print.c (pp_c_specifier_qualifier_list):
7422 Display allowed attributes for function pointer types.
7423 (pp_c_attributes_display): New function to display
7424 attributes having affects_type_identity flag set to true.
7425 * c-pretty-print.h (pp_c_attributes_display): New prototype.
7426
62d784f7
KT
7427 * c-common.c (c_common_attribute_table):
7428 Add new element.
7429 (c_common_format_attribute_table): Likewise.
7430
82d37118
JM
74312011-03-18 Jason Merrill <jason@redhat.com>
7432
49a000c3
JM
7433 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
7434 * c-common.h: Don't declare it here.
7435 * c-common.c: Or define it here.
7436 * c-opts.c (c_common_handle_option): Or set it here.
7437
82d37118
JM
7438 PR c++/35315
7439 * c-common.c (handle_transparent_union_attribute): Don't
7440 make a duplicate type in C++.
7441
17bc631c
JM
74422011-03-15 Jason Merrill <jason@redhat.com>
7443
7444 * c-common.c (max_constexpr_depth): New.
7445 * c-common.h: Declare it.
7446 * c-opts.c (c_common_handle_option): Set it.
7447 * c.opt (fconstexpr-depth): New option.
7448
1b9b91a6
JM
74492011-03-11 Jason Merrill <jason@redhat.com>
7450
f231b5ff
JM
7451 * c-common.c (attribute_takes_identifier_p): Add missing const.
7452
1b9b91a6
JM
7453 PR c++/46803
7454 * c-common.c (attribute_takes_identifier_p): Assume that an
7455 unknown attribute takes an identifier.
7456
a19e4d44
NF
74572011-03-07 Nathan Froyd <froydnj@codesourcery.com>
7458
7459 PR c/47786
7460 * c-common.c (c_type_hash): Call list_length instead of iterating
7461 through DECL_CHAIN. Rename 'i' to 'n_elements'.
7462
982d62f6
JJ
74632011-02-19 Jakub Jelinek <jakub@redhat.com>
7464
7465 PR c/47809
7466 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
7467
0a256240
NP
74682011-02-17 Iain Sandoe <iains@gcc.gnu.org>
7469
7470 * c.opt (fobjc-abi-version=) New.
7471 (fobjc-nilcheck): New.
7472
ba9e6dd5
NF
74732011-02-03 Nathan Froyd <froydnj@codesourcery.com>
7474
7475 PR c++/46890
7476 * c-common.h (keyword_is_decl_specifier): Declare.
7477 * c-common.c (keyword_is_decl_specifier): Define.
7478 (keyword_is_function_specifier): New function.
7479
7273813a
JJ
74802011-01-26 Jakub Jelinek <jakub@redhat.com>
7481
7482 PR c/47473
7483 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
7484 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
7485 REAL_TYPE.
7486
908ef79b
AC
74872011-01-26 Arnaud Charlet <charlet@adacore.com>
7488
7489 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
7490
237e9384
JJ
74912011-01-26 Jakub Jelinek <jakub@redhat.com>
7492
7493 PR pch/47430
7494 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
7495 after init_c_lex if pch_file is set.
7496
47ea1edf
DK
74972011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
7498
d4dba752 7499 PR c++/43601
47ea1edf
DK
7500 * c.opt (-fkeep-inline-dllexport): New switch.
7501
2aa9c6ae
RG
75022011-01-12 Richard Guenther <rguenther@suse.de>
7503
7504 PR middle-end/32511
7505 * c-common.c (handle_weak_attribute): Warn instead of error
7506 on declaring an inline function weak.
7507
7bd11157
TT
75082011-01-05 Tom Tromey <tromey@redhat.com>
7509
7510 * c-common.h (lvalue_error): Update.
7511 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
7512 not error.
7513
0e66e494 75142010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 7515
b4f588c4
NP
7516 PR objc/47075
7517 * c-objc.h (objc_finish_message_expr): Added argument to
7518 prototype.
7519
f4da8dce
NF
75202010-12-22 Nathan Froyd <froydnj@codesourcery.com>
7521
7522 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
7523 Use prototype_p.
7524
46270f14
NP
75252010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
7526
7527 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 7528 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 7529
4816c593
NF
75302010-12-10 Nathan Froyd <froydnj@codesourcery.com>
7531
7532 * c-common.h (readonly_error): Declare.
7533 * c-common.c (readonly_error): Define.
7534
7a6daeb0
NF
75352010-12-09 Nathan Froyd <froydnj@codesourcery.com>
7536
7537 * c-common.h (invalid_indirection_error): Declare.
7538 * c-common.c (invalid_indirection_error): Define.
7539
892f6119
RG
75402010-12-03 Richard Guenther <rguenther@suse.de>
7541
7542 PR c/46745
7543 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
7544 (pp_c_unary_expression): Likewise.
7545 (pp_c_expression): Likewise.
7546
6c39e757
NP
75472010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
7548
7549 * c-common.h (objc_finish_function): New.
7550 (objc_non_volatilized_type): Removed.
7551 (objc_type_quals_match): Removed.
7552 * stub-objc.c (objc_finish_function): New.
7553 (objc_non_volatilized_type): Removed.
7554 (objc_type_quals_match): Removed.
9faeb493 7555
7c475d11
JM
75562010-11-30 Joseph Myers <joseph@codesourcery.com>
7557
7558 * c-common.h (parse_optimize_options): Declare.
7559 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
7560 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
7561
71f3e391
JM
75622010-11-29 Joseph Myers <joseph@codesourcery.com>
7563
7564 * c-opts.c (check_deps_environment_vars): Use getenv instead of
7565 GET_ENVIRONMENT.
7566 * c-pch.c (O_BINARY): Don't define here.
7567 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
7568
d5fabb58
JM
75692010-11-25 Joseph Myers <joseph@codesourcery.com>
7570
7571 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
7572 targetm.except_unwind_info.
7573
299404a1
JM
75742010-11-23 Joseph Myers <joseph@codesourcery.com>
7575
7576 * c-opts.c (c_common_handle_option): Pass location to
7577 set_struct_debug_option.
7578
c98cd5bf
JM
75792010-11-23 Joseph Myers <joseph@codesourcery.com>
7580
7581 * c-common.c (visibility_options): Move from ../opts.c.
7582 * c-common.h (struct visibility_flags, visibility_options):
7583 Declare here.
7584 * c-opts.c (finish_options): Rename to c_finish_options.
7585 (c_common_init): Update call to finish_options.
7586
a9546771
NP
75872010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
7588
7589 PR objc/34033
7590 * c-lex.c (lex_string): Check that each string in an Objective-C
7591 string concat sequence starts with either one or zero '@', and
7592 that there are no spurious '@' signs at the end.
7593
24a57808
JM
75942010-11-20 Joseph Myers <joseph@codesourcery.com>
7595
7596 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
7597 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
7598 HANDLE_PRAGMA_VISIBILITY.
7599 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
7600 HANDLE_PRAGMA_VISIBILITY): Don't define.
7601 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
7602
a9aa2c3a
NF
76032010-11-20 Nathan Froyd <froydnj@codesourcery.com>
7604
7605 PR c++/16189
7606 PR c++/36888
7607 PR c++/45331
7608 * c-common.h (keyword_begins_type_specifier): Declare.
7609 (keyword_is_storage_class_specifier): Declare.
7610 (keyword_is_type_qualifier): Declare.
7611 * c-common.c (keyword_begins_type_specifier): New function.
7612 (keyword_is_storage_class_specifier): New function.
7613 (keyword_is_type_qualifier): Declare.
7614
5386338c
JM
76152010-11-19 Joseph Myers <joseph@codesourcery.com>
7616
7617 PR c/46547
7618 * c-common.c (in_late_binary_op): Define.
7619 (c_common_truthvalue_conversion): Check in_late_binary_op before
7620 calling c_save_expr.
7621 * c-common.h (in_late_binary_op): Declare.
7622
69ccdddb
JM
76232010-11-19 Joseph Myers <joseph@codesourcery.com>
7624
7625 * c-opts.c (c_common_handle_option): Update calls to
7626 set_struct_debug_option.
7627
6b192a09
NP
76282010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
7629
7630 * c-common.h (objc_declare_protocols): Added additional argument.
7631 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 7632
fb52b50a
NF
76332010-11-18 Nathan Froyd <froydnj@codesourcery.com>
7634
7635 PR c/33193
7636 * c-common.h (build_real_imag_expr): Declare.
7637 * c-semantics.c (build_real_imag_expr): Define.
7638
b37421c6
JM
76392010-11-17 Joseph Myers <joseph@codesourcery.com>
7640
7641 * c-opts.c (c_common_parse_file): Take no arguments.
7642 * c-common.h (c_common_parse_file): Update prototype.
7643
07078664
JJ
76442010-11-16 Jakub Jelinek <jakub@redhat.com>
7645
7646 PR c++/46401
7647 * c-common.c (warning_candidate_p): Don't track non-const calls
7648 or STRING_CSTs.
7649
c6a13190
ILT
76502010-11-15 Ian Lance Taylor <iant@google.com>
7651
7652 * c-lex.c (init_c_lex): Set macro debug callbacks if
7653 flag_dump_go_spec is set.
7654
925e8657
NP
76552010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
7656
7657 * c-common.h (objc_build_incr_expr_for_property_ref): New.
7658 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
7659
bb0a9581
NF
76602010-11-15 Nathan Froyd <froydnj@codesourcery.com>
7661
7662 PR preprocessor/45038
7663 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
7664 dialects.
7665
c5fa0890
JM
76662010-11-12 Joseph Myers <joseph@codesourcery.com>
7667
7668 * c-common.h (c_family_lang_mask): Declare.
7669 * c-opts.c (c_family_lang_mask): Make extern.
7670 * c-pragma.c (handle_pragma_diagnostic): Use
7671 control_warning_option.
7672
a4d8c676
JM
76732010-11-12 Joseph Myers <joseph@codesourcery.com>
7674
7675 * c-common.c (parse_optimize_options): Update call to
7676 decode_options.
7677 * c-common.h (c_common_handle_option): Update prototype.
7678 * c-opts.c (c_common_handle_option): Take location_t parameter and
7679 pass it to other functions.
7680
f954bd2c
JM
76812010-11-11 Joseph Myers <joseph@codesourcery.com>
7682
7683 * c-opts.c (warning_as_error_callback): Remove.
7684 (c_common_initialize_diagnostics): Don't call
7685 register_warning_as_error_callback.
7686 (c_common_handle_option): Handle -Werror=normalized= here.
7687
d8a07487
JM
76882010-11-10 Joseph Myers <joseph@codesourcery.com>
7689
7690 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
7691 in diagnostic.
7692 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
7693 letter.
7694 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
7695 Remove trailing '.' from diagnostics.
7696 * c.opt (Wwrite-strings_: Avoid '`' in help text.
7697
d5478783
JM
76982010-11-10 Joseph Myers <joseph@codesourcery.com>
7699
7700 * c-common.c (parse_optimize_options): Pass global_dc to
7701 decode_options.
7702 * c-opts.c (c_common_handle_option): Pass &global_options to
7703 set_Wstrict_aliasing.
7704 * c.opt (v): Don't mark Common or document here.
7705
91ebb981
IS
77062010-11-06 Iain Sandoe <iains@gcc.gnu.org>
7707
7708 PR target/44981
7709 * c-format.c (format_type): New type gcc_objc_string_format_type.
7710 (valid_stringptr_type_p): New.
7711 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 7712 (check_format_string): Pass expected type, use
91ebb981
IS
7713 valid_stringptr_type_p (), check that the format string types are
7714 consistent with the format specification.
7715 (decode_format_attr): Warn if NSString is used outside objective-c.
7716 (format_types_orig): Add NSString.
7717 (format_name): New.
7718 (format_flags): New.
7719 (check_format_arg): Handle format strings requiring an external parser.
7720 first_target_format_type: New variable.
7721 (handle_format_attribute): Set up first_target_format_type, pass the
7722 expected format arg string type to check_format_string().
7723 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
7724 * stub-objc.c (objc_string_ref_type_p): New.
7725 (objc_check_format_arg): New.
7726
bede2adc
NP
77272010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
7728
9faeb493 7729 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
7730 * c-common.h (objc_build_class_component_ref): New.
7731 * stub-objc.c (objc_build_class_component_ref): New.
7732
9a179d01
NP
77332010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7734
7735 * c.opt (Wproperty-assign-default): New option.
7736
22d8d616
NP
77372010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
7738
7739 Implemented -fobjc-std=objc1 flag.
7740 * c.opt (fobjc-std=objc1): New option.
7741
2debdb4f
NP
77422010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
7743
7744 Implemented format and noreturn attributes for Objective-C methods.
7745 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
7746 attribute for Objective-C methods.
7747
ec52b111
JM
77482010-10-31 Jason Merrill <jason@redhat.com>
7749
7750 * c-common.c (conversion_warning, warn_for_collisions_1): Use
7751 EXPR_LOC_OR_HERE.
7752
46a88c12
NP
77532010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
7754
7755 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
7756 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
7757 (objc_add_property_declaration): Removed arguments for copies and
7758 ivar.
7759 (objc_build_getter_call): Renamed to
7760 objc_maybe_build_component_ref.
7761 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7762 (objc_is_property_ref): New.
7763 * c-common.c (c_common_reswords): Removed copies and ivar.
7764 * stub-objc.c (objc_add_property_declaration): Removed arguments
7765 for copies and ivar.
7766 (objc_build_getter_call): Renamed to
7767 objc_maybe_build_component_ref.
7768 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
7769 (objc_is_property_ref): New.
9faeb493 7770
1e4bf85b
AC
77712010-10-29 Arnaud Charlet <charlet@adacore.com>
7772 Matthew Gingell <gingell@adacore.com>
7773
7774 * c-ada-spec.c (separate_class_package): New function.
7775 (pp_ada_tree_identifier): Prefix references to C++ classes with the
7776 name of their enclosing package.
7777 (print_ada_declaration): Use separate_class_package.
7778
81f0bab2
JM
77792010-10-27 Jason Merrill <jason@redhat.com>
7780
2b08f2c5
JM
7781 * c-common.c (c_common_reswords): Add __is_literal_type.
7782 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
7783
81f0bab2
JM
7784 * c-common.c (check_case_value): Remove special C++ code.
7785
200290f2
NP
77862010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7787
7788 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
7789 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
7790 and RID_LAST_PATTR.
7791 (objc_add_property_declaration): Added additional arguments.
7792 (objc_property_attribute_kind): Removed.
7793 (objc_set_property_attr): Removed.
7794 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
7795 copy and nonatomic.
7796 * stub-objc.c (objc_add_property_declaration): Added additional
7797 arguments.
7798 (objc_set_property_attr): Removed.
9faeb493 7799
f614132b
NP
78002010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
7801
7802 * c-common.h (objc_add_property_variable): Renamed to
7803 objc_add_property_declaration. Added location argument.
7804 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 7805
b8a18805
NP
78062010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
7807
7808 * c-common.h (objc_maybe_printable_name): New.
7809 * stub-objc.c (objc_maybe_printable_name): New.
7810
3f8257db
JJ
78112010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7812 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
7813
7814 * c-common.h (c_common_mark_addressable_vec): Declare.
7815 * c-common.c (c_common_mark_addressable_vec): New function.
7816
249a82c4
NP
78172010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7818
7819 * c-common.h (objc_set_method_type): Removed.
7820 (objc_add_method_declaration): Added boolean argument.
7821 (objc_start_method_definition): Same change.
7822 (objc_build_method_signature): Same change.
7823 * stub-objc.c (objc_set_method_type): Removed.
7824 (objc_add_method_declaration): Added boolean argument.
7825 (objc_start_method_definition): Same change.
7826 (objc_build_method_signature): Same change.
7827
977e30bc
NP
78282010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
7829
7830 * c-common.h (finish_file): Removed.
7831 (objc_write_global_declarations): New.
7832 * c-opts.c (c_common_parse_file): Do not call finish_file.
7833 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 7834
da57d1b9
NP
78352010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7836
7837 Implemented parsing @synthesize and @dynamic for
7838 Objective-C/Objective-C++.
7839 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
7840 (objc_add_synthesize_declaration): New.
7841 (objc_add_dynamic_declaration): New.
7842 * c-common.c (c_common_reswords): Add synthesize and dynamic.
7843 * stub-objc.c (objc_add_synthesize_declaration): New.
7844 (objc_add_dynamic_declaration): New.
9faeb493 7845
0069111f
MM
78462010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
7847
7848 PR target/46041
7849 * c-cppbuiltin.c (mode_has_fma): Move function here from
7850 builtins.c. Don't use the fma optab, instead just use the
7851 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
7852 using -save-temps.
7853
e426b47b
NP
78542010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
7855
7856 Merge from 'apple/trunk' branch on FSF servers.
0069111f 7857
3f8257db 7858 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 7859
9faeb493 7860 Radar 4330422
e426b47b
NP
7861 * c-common.h (objc_non_volatilized_type): New declaration
7862 * stub-objc.c (objc_non_volatilized_type): New stub.
7863
90fbfdc3
NP
78642010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
7865
e426b47b 7866 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 7867
3f8257db 7868 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 7869
9faeb493 7870 Radar 4133425
90fbfdc3 7871 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 7872 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 7873
c37d8c30
IS
78742010-10-17 Iain Sandoe <iains@gcc.gnu.org>
7875
7876 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
7877 * c-common.h (enum rid): Add RID_AT_PACKAGE.
7878 (objc_ivar_visibility_kind): New enum.
7879 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 7880 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
7881 visibility enum.
7882
1b1562a5
MM
78832010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
7884
7885 * c-cppbuiltin.c (builtin_define_float_constants): Emit
7886 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
7887 has the appropriate fma builtins.
7888 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
7889
668ea4b1
IS
78902010-10-14 Iain Sandoe <iains@gcc.gnu.org>
7891
1b1562a5 7892 merge from FSF apple 'trunk' branch.
3f8257db 7893 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 7894
668ea4b1
IS
7895 Radars 4436866, 4505126, 4506903, 4517826
7896 * c-common.c (c_common_resword): Define @property and its attributes.
7897 * c-common.h: Define property attribute enum entries.
7898 (OBJC_IS_PATTR_KEYWORD): New.
7899 (objc_property_attribute_kind): New enum.
7900 Declare objc_set_property_attr (), objc_add_property_variable (),
7901 objc_build_getter_call () and objc_build_setter_call ().
7902 * stub-objc.c (objc_set_property_attr): New stub.
7903 (objc_add_property_variable): Likewise.
7904 (objc_build_getter_call): Likewise.
7905 (objc_build_setter_call) Likewise.
1b1562a5 7906
a1178b30
IS
79072010-10-13 Iain Sandoe <iains@gcc.gnu.org>
7908
1b1562a5 7909 merge from FSF apple 'trunk' branch.
3f8257db 7910 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
7911
7912 Radar 3803157 (method attributes)
7913 * c-common.c (handle_deprecated_attribute): Recognize
7914 objc methods as valid declarations.
7915 * c-common.h: Declare objc_method_decl ().
1b1562a5 7916 * stub-objc.c (objc_method_decl): New stub.
a1178b30 7917
a75bfaa6
JM
79182010-10-08 Joseph Myers <joseph@codesourcery.com>
7919
7920 * c-common.c (parse_optimize_options): Call
7921 decode_cmdline_options_to_array_default_mask before
7922 decode_options. Update arguments to decode_options.
7923 * c-common.h (c_common_init_options_struct): Declare.
7924 * c-opts.c (c_common_init_options_struct): New. Split out from
7925 c_common_init_options.
7926
f05b9d93
NP
79272010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
7928
7929 Implemented fast enumeration for Objective-C.
7930 * c-common.h (objc_finish_foreach_loop): New.
7931 * stub-objc.c (objc_finish_foreach_loop): New.
7932
1ebe4b4f
JM
79332010-10-05 Joseph Myers <joseph@codesourcery.com>
7934
7935 * c-common.h (struct diagnostic_context): Don't declare here.
7936 (c_common_initialize_diagnostics): Declare using
7937 diagnostic_context typedef.
7938 * c-opts.c (c_common_handle_option): Pass global_dc to
7939 handle_generated_option.
7940
d4d24ba4
JM
79412010-10-04 Joseph Myers <joseph@codesourcery.com>
7942
7943 * c-opts.c (c_common_handle_option): Pass &global_options_set to
7944 handle_generated_option.
7945
478a1c5b
ILT
79462010-10-03 Ian Lance Taylor <iant@google.com>
7947
7948 * c.opt (-fplan9-extensions): New option.
7949
82a1c2fe
FXC
79502010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
7951
7952 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
7953 Remove.
7954 (c_cpp_builtins): Call functions from cppbuiltin.c instead
7955 of duplicating code.
7956
92902b1b
IS
79572010-09-30 Iain Sandoe <iains@gcc.gnu.org>
7958
7959 * c-common.c: Add two new entries for @optional
7960 and @required keywords.
7961
7962 merge from FSF 'apple/trunk' branch.
3f8257db 7963 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
7964
7965 Radar 4386773
7966 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
7967 objective-c keywords.
7968 (objc_set_method_opt): New declaration.
7969 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 7970
46625112
JM
79712010-09-30 Joseph Myers <joseph@codesourcery.com>
7972
7973 * c-common.c (handle_optimize_attribute): Pass &global_options to
7974 cl_optimization_save and cl_optimization_restore.
7975 * c-opts.c (c_common_handle_option): Pass &global_options to
7976 handle_generated_option.
7977 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
7978 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
7979 &global_options to cl_optimization_restore.
7980
49b91f05
NP
79812010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
7982
7983 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
7984 Objective-C/Objective-C++ keywords.
7985
13ed556f 79862010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 7987
9faeb493
UB
7988 Merge from 'apple/trunk' branch on FSF servers.
7989
3f8257db 7990 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
7991
7992 Radar 4281748
7993 * c-common.h (objc_check_global_decl): New declaration.
7994 * stub-objc.c (objc_check_global_decl): New stub.
7995
f0036cca
JM
79962010-09-29 Joseph Myers <joseph@codesourcery.com>
7997
7998 * c.opt: Don't use VarExists.
7999
e3339d0f
JM
80002010-09-29 Joseph Myers <joseph@codesourcery.com>
8001
8002 * c-common.c (c_cpp_error): Update names of diagnostic_context
8003 members.
8004 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
8005 cl_optimization members.
8006 * c-opts.c (warning_as_error_callback, c_common_handle_option,
8007 sanitize_cpp_opts, finish_options): Update names of cpp_options
8008 members.
8009
1973201f
NP
80102010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
8011
8012 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
8013 (objc_is_reserved_word): Removed.
8014 * c-common.c: Updated comments.
8015 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
8016 objc_is_reserved_word.
8017 * stub-objc.c (objc_is_reserved_word): Removed.
8018
f7e71da5
IS
80192010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8020
9faeb493 8021 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
8022 include attributes.
8023 (objc_start_method_definition): Likewise.
8024 (objc_build_keyword_decl): Likewise.
8025 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
8026 (objc_start_method_definition): Likewise.
8027 (objc_build_keyword_decl): Likewise.
8028
c165dca7
IS
80292010-09-28 Iain Sandoe <iains@gcc.gnu.org>
8030
8031 * c-common.h (objc_start_class_interface): Adjust prototype.
8032 (objc_start_category_interface): Likewise.
8033 (objc_start_protocol): Likewise.
8034 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
8035 (objc_start_class_interface): Likewise.
8036 (objc_start_category_interface): Likewise.
8037
7458026b
ILT
80382010-09-27 Ian Lance Taylor <iant@google.com>
8039
8040 * c-common.c (c_common_attribute_table): Add no_split_stack.
8041 (handle_no_split_stack_attribute): New static function.
8042
b581b85b
NP
80432010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
8044
9faeb493 8045 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 8046
3f8257db 8047 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 8048
9faeb493 8049 Radar 4229905
b581b85b
NP
8050 * c-common.h (objc_have_common_type): New declaration.
8051 * stub-objc.c (objc_have_common_type): New stub.
8052
8053 2005-06-22 Ziemowit Laski <zlaski@apple.com>
8054
8055 Radar 4154928
8056 * c-common.h (objc_common_type): New prototype.
9faeb493 8057 * stub-objc.c (objc_common_type): New stub.
b581b85b 8058
46a4da10
JH
80592010-09-24 Jan Hubicka <jh@suse.cz>
8060
8061 * c-common.c (handle_leaf_attribute): New function.
8062 (struct attribute_spec c_common_att): Add leaf.
8063
e200444e
JM
80642010-09-22 Joseph Myers <joseph@codesourcery.com>
8065
8066 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
8067 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
8068 -dump, -dump=, -imacros, -imacros=, -include, -include=,
8069 -include-barrier, -include-directory, -include-directory=,
8070 -include-directory-after, -include-directory-after=,
8071 -include-prefix, -include-prefix=, -include-with-prefix,
8072 -include-with-prefix=, -include-with-prefix-after,
8073 -include-with-prefix-after=, -include-with-prefix-before,
8074 -include-with-prefix-before=, -no-integrated-cpp,
8075 -no-line-commands, -no-standard-includes, -no-warnings, -output,
8076 -output=, -pedantic, -pedantic-errors, -preprocess,
8077 -print-missing-file-dependencies, -trace-includes, -traditional,
8078 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
8079 -user-dependencies, -verbose, -write-dependencies,
8080 -write-user-dependencies, no-integrated-cpp, traditional): New.
8081
29a80ea6
NP
80822010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8083
8084 PR objc/23710
ac1fc2fc
NP
8085 * c-common.h (objc_start_method_definition): Return bool instead
8086 of void.
8087 * stub-objc.c (objc_start_method_definition): Return bool instead
8088 of void.
8089
80902010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
8091
8092 PR objc/25965
8093 * c-common.h (objc_get_interface_ivars): New declaration.
8094 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 8095
de621752
ILT
80962010-09-15 Ian Lance Taylor <iant@google.com>
8097
8098 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 8099 messages. Remove period at end of warning message.
de621752 8100
ba885ec5
NS
81012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8102
8103 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
8104 (handle_alias_attribute): ... here.
8105 (handle_ifunc_attribute): New.
8106
c5ee1358
MM
81072010-09-06 Mark Mitchell <mark@codesourcery.com>
8108
8109 * c-common.h (do_warn_double_promotion): Declare.
8110 * c-common.c (do_warn_double_promotion): Define.
8111
0a0b3574
MM
81122010-09-05 Mark Mitchell <mark@codesourcery.com>
8113
8114 * c.opt (Wdouble-promotion): New.
8115
d1779886
JM
81162010-09-02 Joseph Myers <joseph@codesourcery.com>
8117
8118 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
8119 fvtable-thunks, fxref): Mark no longer supported in help text.
8120
2d2bd949
JM
81212010-09-02 Joseph Myers <joseph@codesourcery.com>
8122
8123 * c.opt (Wimport, fall-virtual, falt-external-templates,
8124 fdefault-inline, fenum-int-equiv, fexternal-templates,
8125 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
8126 fname-mangling-version-, fnew-abi, fnonnull-objects,
8127 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
8128 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
8129 applicable.
8130 (fhandle-exceptions): Mark with Alias and Warn.
8131 * c-opts.c (c_common_handle_option): Don't handle options marked
8132 as ignored.
8133
5de8299c
JM
81342010-09-02 Joseph Myers <joseph@codesourcery.com>
8135
8136 * c.opt (Wcomments, Werror-implicit-function-declaration,
8137 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
8138 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
8139 aliases.
8140 * c-common.c (option_codes): Use OPT_Wcomment instead of
8141 OPT_Wcomments.
8142 * c-opts.c (warning_as_error_callback, c_common_handle_option):
8143 Don't handle options marked as aliases.
8144
0ceb0201
RG
81452010-08-25 Richard Guenther <rguenther@suse.de>
8146
8147 * c-common.c (c_common_get_alias_set): Remove special
8148 handling for pointers.
8149
ac47786e
NF
81502010-08-20 Nathan Froyd <froydnj@codesourcery.com>
8151
8152 * c-common.c: Use FOR_EACH_VEC_ELT.
8153 * c-gimplify.c: Likewise.
8154 * c-pragma.c: Likewise.
8155
c878765b
JM
81562010-08-16 Joseph Myers <joseph@codesourcery.com>
8157
8158 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
8159 RejectDriver.
8160 (MMDX): Change back to MMD. Mark NoDriverArg instead of
8161 RejectDriver.
8162 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
8163 instead of OPT_MDX and OPT_MMDX.
8164
603349bf
JM
81652010-08-16 Joseph Myers <joseph@codesourcery.com>
8166
8167 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
8168
644fa7ac
JM
81692010-08-12 Joseph Myers <joseph@codesourcery.com>
8170
8171 * c.opt (MD, MMD): Change to MDX and MMDX.
8172 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
8173
481e1176
JM
81742010-08-11 Joseph Myers <joseph@codesourcery.com>
8175
8176 * c-opts.c (c_common_handle_option): Call handle_generated_option
8177 instead of handle_option.
8178
ac8dc9f7
NF
81792010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8180
8181 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
8182 (maybe_apply_renaming_pragma): Delete unneeded declarations.
8183
4f8c876d
NF
81842010-08-08 Nathan Froyd <froydnj@codesourcery.com>
8185
8186 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
8187 (pending_redefine_extname): Change type to a VEC.
8188 (add_to_renaming_pragma_list): Update for new type of
8189 pending_redefine_extname.
ac8dc9f7 8190 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 8191
3b0c690e
AC
81922010-08-04 Arnaud Charlet <charlet@adacore.com>
8193
8194 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
8195 visited.
8196 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
8197 decide whether a type has already been declared/seen.
8198 Do not go to the original type.
8199 (dump_nested_types): New parameter forward.
8200 Generate forward declaration if needed and mark type as visited.
8201 (print_ada_declaration): Call dump_nested_types if not already done.
8202 Mark types as visited.
8203
1890bccc
JM
82042010-08-03 Joseph Myers <joseph@codesourcery.com>
8205
8206 * c.opt (-print-pch-checksum): Remove option.
8207 * c-opts.c (c_common_handle_option): Don't handle
8208 OPT_print_pch_checksum.
8209
5f20c657
JM
82102010-07-27 Joseph Myers <joseph@codesourcery.com>
8211
8212 * c-common.h (c_common_handle_option): Update prototype and return
8213 value type.
8214 * c-opts.c (c_common_handle_option): Update prototype and return
8215 value type. Update calls to handle_option and
8216 enable_warning_as_error.
8217
f551f80c
JJ
82182010-07-27 Jakub Jelinek <jakub@redhat.com>
8219
8220 PR c/45079
8221 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
8222
61ff2bdc
JM
82232010-07-27 Joseph Myers <joseph@codesourcery.com>
8224
8225 * c-common.h (c_common_missing_argument): Remove.
8226 * c-opts.c (c_common_missing_argument): Remove.
8227 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
8228 idirafter, imacros, include, isysroot, isystem, iquote): Add
8229 MissingArgError.
8230 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
8231
7a9bf9a4
JM
82322010-07-27 Joseph Myers <joseph@codesourcery.com>
8233
8234 * c-common.h (c_common_option_lang_mask,
8235 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
8236 New.
8237 (c_common_init_options): Update prototype.
8238 * c-opts.c (c_common_option_lang_mask): New.
8239 (c_common_initialize_diagnostics): Split out of
8240 c_common_init_options.
8241 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
8242 New.
8243 (c_common_init_options): Update prototype. Use decoded options in
8244 search for -lang-asm.
8245
910ad8de
NF
82462010-07-15 Nathan Froyd <froydnj@codesourcery.com>
8247
8248 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
8249 * c-format.c: Likewise.
8250
718f9c0f
MLI
82512010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
8252
8253 * c-common.h: Include diagnostic-core.h. Error if already
8254 included.
8255 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
8256
4d451982
MLI
82572010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8258
adfac8df 8259 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
8260 Do not include expr.h
8261 (vector_mode_valid_p): Move here.
8262
119fe915
SB
82632010-06-21 DJ Delorie <dj@redhat.com>
8264
8265 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
8266 allow these pragmas anywhere.
8267
82682010-06-14 Jakub Jelinek <jakub@redhat.com>
8269
8270 PR bootstrap/44509
8271 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
8272 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
8273 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
8274 ggc_strdup instead of xstrdup.
8275
82762010-06-10 Jakub Jelinek <jakub@redhat.com>
8277
8278 * c-cppbuiltin.c: Include cpp-id-data.h.
8279 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
8280 (lazy_hex_fp_value): New function.
8281 (builtin_define_with_hex_fp_value): Provide definitions lazily.
8282
6662d794
MLI
82832010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8284
8285 * c-gimplify.c: Do not include tree-flow.h
8286
38f8b050
JR
82872010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
8288
8289 PR other/44034
8290 * c-common.c: Rename targetm member:
8291 targetm.enum_va_list -> targetm.enum_va_list_p
8292
9589f23e
AS
82932010-06-28 Anatoly Sokolov <aesok@post.ru>
8294
8295 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
8296
3b06d379
SB
82972010-06-28 Steven Bosscher <steven@gcc.gnu.org>
8298
8299 * c-cppbuiltin.c: Do not include except.h.
8300
d166d4c3
AK
83012010-06-24 Andi Kleen <ak@linux.intel.com>
8302
9faeb493
UB
8303 * c-common.c (warn_for_omitted_condop): New.
8304 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 8305
70cb8be6
JM
83062010-06-21 Joseph Myers <joseph@codesourcery.com>
8307
8308 * c.opt (lang-objc): Remove.
8309 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
8310
a4c97feb
JR
83112010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
8312
8313 * c-opts.c: Include "tm_p.h".
8314
6e2f1956
JM
83152010-06-20 Joseph Myers <joseph@codesourcery.com>
8316
8317 * c-common.c (parse_optimize_options): Update call to
8318 decode_options.
8319
bc87224e
NF
83202010-06-18 Nathan Froyd <froydnj@codesourcery.com>
8321
8322 * c-common.c (record_types_used_by_current_var_decl): Adjust for
8323 new type of types_used_by_cur_var_decl.
8324
b49cf425
JR
83252010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
8326
8327 PR bootstrap/44512
8328 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
8329 for C++ standard compliance.
8330
59f9c2ed
JM
83312010-06-16 Jason Merrill <jason@redhat.com>
8332
8333 * c.opt: Add -Wnoexcept.
8334
33766b66
RG
83352010-06-16 Richard Guenther <rguenther@suse.de>
8336
8337 PR c/44555
8338 * c-common.c (c_common_truthvalue_conversion): Remove
8339 premature and wrong optimization concering ADDR_EXPRs.
8340
eff7e30c
AC
83412010-06-15 Arnaud Charlet <charlet@adacore.com>
8342
8343 * c-ada-spec.c (dump_sloc): Remove column info.
8344 (is_simple_enum): New function.
8345 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
8346 enum types when relevant.
8347
6312e84d
MLI
83482010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8349
9faeb493 8350 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
8351 location.
8352
1cb42611
JM
83532010-06-10 Joseph Myers <joseph@codesourcery.com>
8354
8355 * c-opts.c (c_common_handle_option): Don't handle
8356 OPT_fshow_column.
8357
a9429e29
LB
83582010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
8359
8360 * c-pragma.c (push_alignment): Use typed GC allocation.
8361 (handle_pragma_push_options): Likewise.
8362
8363 * c-common.c (parse_optimize_options): Likewise.
8364
8365 * c-common.h (struct sorted_fields_type): Add variable_size GTY
8366 option.
8367
5498f011
JM
83682010-06-07 Joseph Myers <joseph@codesourcery.com>
8369
8370 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
8371 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8372 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8373 flag_signed_bitfields, warn_strict_null_sentinel,
8374 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
8375 flag_gen_declaration, flag_no_gnu_keywords,
8376 flag_implement_inlines, flag_implicit_templates,
8377 flag_implicit_inline_templates, flag_optional_diags,
8378 flag_elide_constructors, flag_default_inline, flag_rtti,
8379 flag_conserve_space, flag_access_control, flag_check_new,
8380 flag_new_for_scope, flag_weak, flag_working_directory,
8381 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
8382 flag_enforce_eh_specs, flag_threadsafe_statics,
8383 flag_pretty_templates): Remove.
8384 * c-common.h (flag_preprocess_only, flag_nil_receivers,
8385 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
8386 flag_replace_objc_classes, flag_undef, flag_no_builtin,
8387 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
8388 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
8389 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
8390 flag_no_gnu_keywords, flag_implement_inlines,
8391 flag_implicit_templates, flag_implicit_inline_templates,
8392 flag_optional_diags, flag_elide_constructors, flag_default_inline,
8393 flag_rtti, flag_conserve_space, flag_access_control,
8394 flag_check_new, flag_new_for_scope, flag_weak,
8395 flag_working_directory, flag_use_cxa_atexit,
8396 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
8397 flag_threadsafe_statics, flag_pretty_templates,
8398 warn_strict_null_sentinel): Remove.
8399 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
8400 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
8401 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
8402 fimplicit-inline-templates, fimplicit-templates,
8403 flax-vector-conversions, fms-extensions, fnil-receivers,
8404 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
8405 frtti, fshort-double, fshort-enums, fshort-wchar,
8406 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
8407 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
8408 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
8409 gen-decls, undef): Use Var.
8410 (fdefault-inline, foptional-diags): Document as doing nothing.
8411 * c-opts.c (c_common_handle_option): Remove cases for options now
8412 using Var. Mark ignored options as such.
8413
39dabefd
SB
84142010-06-05 Steven Bosscher <steven@gcc.gnu.org>
8415
9faeb493 8416 * c-common.c: Moved to here from parent directory.
39dabefd
SB
8417 * c-common.def: Likewise.
8418 * c-common.h: Likewise.
8419 * c-cppbuiltin.c: Likewise.
8420 * c-dump.c: Likewise.
8421 * c-format.c: Likewise.
8422 * c-format.h : Likewise.
8423 * c-gimplify.c: Likewise.
8424 * c-lex.c: Likewise.
8425 * c-omp.c: Likewise.
8426 * c.opt: Likewise.
8427 * c-opts.c: Likewise.
8428 * c-pch.c: Likewise.
8429 * c-ppoutput.c: Likewise.
8430 * c-pragma.c: Likewise.
8431 * c-pragma.h: Likewise.
8432 * c-pretty-print.c: Likewise.
8433 * c-pretty-print.h: Likewise.
8434 * c-semantics.c: Likewise.
8435 * stub-objc.c: Likewise.
8436
8437 * c-common.c: Include gt-c-family-c-common.h.
8438 * c-pragma.c: Include gt-c-family-c-pragma.h.
8439\f
cbe34bb5 8440Copyright (C) 2010-2017 Free Software Foundation, Inc.
39dabefd
SB
8441
8442Copying and distribution of this file, with or without modification,
8443are permitted in any medium without royalty provided the copyright
8444notice and this notice are preserved.