]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
PR translation/90156 - add linter check suggesting to replace %<%s%> with %qs
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
cc90adc2 12019-06-19 Martin Sebor <msebor@redhat.com>
2
3 PR translation/90156
4 * c-format.c (function_format_info::format_type): Adjust type.
5 (function_format_info::is_raw): New member.
6 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
7 (decode_format_attr): Adjust call to decode_format_type.
8 Avoid a redundant call to convert_format_name_to_system_name.
9 Avoid abbreviating the word "arguments" in a diagnostic.
10 (format_warning_substr): New function.
11 (avoid_dollar_number): Quote dollar sign in a diagnostic.
12 (finish_dollar_format_checking): Same.
13 (check_format_info): Same.
14 (struct baltoks_t): New.
15 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
16 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
17 functions.
18 (check_format_info_main): Call check_plain. Use baltoks_t. Call
19 maybe_diag_unbalanced_tokens.
20 (handle_format_attribute): Spell out the word "arguments" in
21 a diagnostic.
22
d5d463f6 232019-06-11 Matthew Beliveau <mbelivea@redhat.com>
24
25 PR c++/90449 - add -Winaccessible-base option.
26 * c.opt (Winaccessible-base): New option.
27
70a6624c 282019-06-10 Jakub Jelinek <jakub@redhat.com>
29
30 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
31 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
32 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
33 combined/composite constructs where it is not allowed. Copy over
34 OMP_CLAUSE_REDUCTION_INSCAN.
35
62c34df8 362019-06-05 Martin Sebor <msebor@redhat.com>
37
38 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
39 (handle_alias_ifunc_attribute): Same.
40 (handle_copy_attribute): Same.
41 (handle_weakref_attribute): Same.
42 (handle_nonnull_attribute): Same.
43 * c-warn.c (warn_for_sign_compare): Same.
44 (warn_for_restrict): Same.
45 * c.opt: Same.
46
b1d1ac23 472019-06-05 Martin Sebor <msebor@redhat.com>
48
49 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
50 * c.opt (-Wformat-diag): Remove a spurious period.
51
1e829480 522019-05-29 Jakub Jelinek <jakub@redhat.com>
53
54 PR c/90628
55 * c-common.c (check_builtin_function_arguments)
56 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
57 as last argument.
58
ea6dbca9 592019-05-23 Eric Botcazou <ebotcazou@adacore.com>
60
61 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
62
bd364f04 632019-05-22 Martin Liska <mliska@suse.cz>
64
65 PR lto/90500
66 * c-attribs.c (handle_copy_attribute): Do not copy
67 target_clones attribute.
68
3d6be0d5 692019-05-21 Eric Botcazou <ebotcazou@adacore.com>
70
71 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
72 * c-ada-spec.c (print_assignment_operator): New function.
73 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
74 assignment operators declared as methods and filter out the others.
75
9b500985 762019-05-17 Thomas Schwinge <thomas@codesourcery.com>
77
78 PR c/89433
79 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
80 "omp declare target".
81
85b9be9b 822019-05-16 Martin Sebor <msebor@redhat.com>
83
84 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
85 keywords, operators, and types in diagnostics.
86 (handle_scalar_storage_order_attribute): Same.
87 (handle_mode_attribute): Same.
88 (handle_visibility_attribute): Same.
89 (handle_assume_aligned_attribute): Same.
90 (handle_no_split_stack_attribute): Same.
91 * c-common.c (shorten_compare): Same.
92 (c_common_truthvalue_conversion): Same.
93 (cb_get_source_date_epoch): Same.
94 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
95 in diagnostics.
96 (interpret_float): Same.
97 * c-omp.c (c_finish_omp_for): Same.
98 * c-opts.c (c_common_post_options): Same.
99 * c-pch.c (c_common_pch_pragma): Same.
100 * c-pragma.c (pop_alignment): Same.
101 (handle_pragma_pack): Same.
102 (apply_pragma_weak): Same.
103 (handle_pragma_weak): Same.
104 (handle_pragma_scalar_storage_order): Same.
105 (handle_pragma_redefine_extname): Same.
106 (add_to_renaming_pragma_list): Same.
107 (maybe_apply_renaming_pragma): Same.
108 (push_visibility): Same.
109 (handle_pragma_visibility): Same.
110 (handle_pragma_optimize): Same.
111 (handle_pragma_message): Same.
112 * c-warn.c (warn_for_omitted_condop): Same.
113 (lvalue_error): Same.
114
2df84ae1 1152019-05-15 Richard Biener <rguenther@suse.de>
116
117 PR c/90474
118 * c-common.c (c_common_mark_addressable_vec): Also mark
119 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
120 c_mark_addressable.
121
3d7617fe 1222019-05-06 Nathan Sidwell <nathan@acm.org>
123
124 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
125
8d595bfa 1262019-04-30 Nathan Sidwell <nathan@acm.org>
127
128 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
129
a448f8cc 1302019-04-30 Martin Liska <mliska@suse.cz>
131
132 * c-pragma.c (handle_pragma_diagnostic): Provide hints
133 for unknown options.
134
8bbdcaf0 1352019-04-26 Richard Sandiford <richard.sandiford@arm.com>
136
137 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
138 the pointer target rather than the pointer itself.
139
45cf699c 1402019-04-19 Jakub Jelinek <jakub@redhat.com>
141
142 PR c/89888
143 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
144 arguments.
145 (c_do_switch_warnings): Remove outside_range_p argument.
146 * c-common.c (check_case_bounds): Removed.
147 (c_add_case_label): Remove orig_type and outside_range_p arguments.
148 Don't call check_case_bounds. Fold low_value as well as high_value.
149 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
150 Check for case labels outside of range of original type here and
151 adjust them.
152
a538a79e 1532019-04-12 Jakub Jelinek <jakub@redhat.com>
154
1ef6e17f 155 PR translation/90041
156 * c.opt (-fhandle-exceptions): Use %< and %> around option names
157 in the Warn diagnostics.
158
a538a79e 159 PR c/89946
160 * c-attribs.c (handle_patchable_function_entry_attribute): Add
161 function comment. Warn if arguments of the attribute are not positive
162 integer constants.
163
b4e67beb 1642019-04-09 Eric Botcazou <ebotcazou@adacore.com>
165
166 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
167 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
168
d7ca95c0 1692019-04-07 Eric Botcazou <ebotcazou@adacore.com>
170
171 * c-ada-spec.c (is_float128): New predicate extracted from...
172 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
173 <REAL_TYPE>: ...here. Call it.
174
d0162866 1752019-04-05 David Malcolm <dmalcolm@redhat.com>
176
177 PR c/89985
178 * c-warn.c (check_address_or_pointer_of_packed_member): Add
179 auto_diagnostic_group. Guard inform calls by result of
180 warning_at call.
181
1e689000 1822019-04-05 Marek Polacek <polacek@redhat.com>
183
184 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
185 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
186 of RHS.
187
b3902d2e 1882019-04-03 Jason Merrill <jason@redhat.com>
189
190 PR c++/86586 - -fcompare-debug=-Wsign-compare.
191 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
192
a38fa913 1932019-04-01 Martin Sebor <msebor@redhat.com>
194
195 PR c/89685
196 * c-attribs.c (handle_copy_attribute): Handle references and
197 non-constant expressions.
198
84f13b2f 1992019-03-22 Jakub Jelinek <jakub@redhat.com>
200
201 PR c++/87481
202 * c.opt (-fconstexpr-ops-limit=): New option.
203
067e9a50 2042019-03-21 Jakub Jelinek <jakub@redhat.com>
205
206 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
207 template param.
208
dc0cf270 2092019-03-19 Martin Sebor <msebor@redhat.com>
210
211 PR tree-optimization/89688
212 * c-common.c (braced_list_to_string): Make static.
213 (braced_lists_to_strings): Define new function.
214 * c-common.h (braced_list_to_string): Remove.
215 (braced_lists_to_strings): Declare.
216
4520ad45 2172019-03-12 Martin Liska <mliska@suse.cz>
218
219 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
220
f2a60d44 2212019-03-11 Martin Liska <mliska@suse.cz>
222
223 * c-opts.c (c_common_post_options): Wrap apostrophes
224 in gcc internal format with %'.
225
2f6d557f 2262019-03-11 Martin Liska <mliska@suse.cz>
227
228 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
229 in a string format message and fix GNU coding style.
230 * c-common.c (vector_types_convertible_p): Likewise.
231 (c_build_vec_perm_expr): Likewise.
232 * c-indentation.c (get_visual_column): Likewise.
233 * c-opts.c (c_common_handle_option): Likewise.
234 (c_common_post_options): Likewise.
235 (sanitize_cpp_opts): Likewise.
236 * c-pch.c (c_common_pch_pragma): Likewise.
237 * c-pragma.c (handle_pragma_pack): Likewise.
238
94a62c5a 2392019-03-08 Jakub Jelinek <jakub@redhat.com>
240
241 PR tree-optimization/89550
242 * c-common.c (c_common_truthvalue_conversion): Only set
243 TREE_NO_WARNING if warning_at returned true.
244 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
245
b501a363 2462019-02-25 Sandra Loosemore <sandra@codesourcery.com>
247 Martin Sebor <msebor@gmail.com>
248
249 * c.opt (Wmissing-attributes): Clean up doc string.
250
af313a98 2512019-02-25 Jakub Jelinek <jakub@redhat.com>
252
253 PR c/89495
254 * c-format.c (maybe_read_dollar_number): Compute nargnum in
255 HOST_WIDE_INT type to avoid overflows and change overflow_flag
256 checking.
257
75dba176 2582019-02-22 Richard Biener <rguenther@suse.de>
259
260 * c-pch.c (no_checksum): Remove.
261 (pch_init): Remove assertion that executable_checksum is not
262 all zero.
263 (c_common_valid_pch): Likewise.
264
ec425a89 2652019-02-18 Martin Sebor <msebor@redhat.com>
266
267 PR middle-end/89294
268 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
269
3bb711c4 2702019-02-16 David Malcolm <dmalcolm@redhat.com>
271
272 PR c++/88680
273 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
274 implementing -Wtype-limits.
275
08acf739 2762019-02-11 Martin Sebor <msebor@redhat.com>
277
278 PR c++/87996
279 * c-common.c (invalid_array_size_error): New function.
280 (valid_array_size_p): Call it. Handle size as well as type.
281 * c-common.h (valid_constant_size_p): New function.
282 (enum cst_size_error): New type.
283
d6bfe450 2842019-01-31 David Malcolm <dmalcolm@redhat.com>
285
286 PR c/89122
287 * known-headers.cc (get_stdlib_header_for_name): Add
288 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
289
abb9ae66 2902019-01-31 Jakub Jelinek <jakub@redhat.com>
291
292 PR libstdc++/88170
293 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
294 a C cast in pp_c_flag_gnu_v3 mode.
295
a456bf31 2962019-01-29 Jakub Jelinek <jakub@redhat.com>
297
298 PR c/86125
299 * c-common.c (c_common_nodes_and_builtins): Build type variants for
300 builtin_structptr_types types even for C.
301
a6061e19 3022019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
303
304 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
305 when rhs is of array type correctly. Fix handling of nested structures.
306 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
307 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
308 type casts within nested compound expressions.
309
f840847c 3102019-01-22 Jakub Jelinek <jakub@redhat.com>
311
312 PR middle-end/88968
313 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
314 variable after using BIT_FIELD_REF.
315
6d4e8a95 3162019-01-18 H.J. Lu <hongjiu.lu@intel.com>
317
318 PR c/51628
319 PR c/88664
320 * c-common.h (warn_for_address_or_pointer_of_packed_member):
321 Remove the boolean argument.
322 * c-warn.c (check_address_of_packed_member): Renamed to ...
323 (check_address_or_pointer_of_packed_member): This. Also
324 warn pointer conversion.
325 (check_and_warn_address_of_packed_member): Renamed to ...
326 (check_and_warn_address_or_pointer_of_packed_member): This.
327 Also warn pointer conversion.
328 (warn_for_address_or_pointer_of_packed_member): Remove the
329 boolean argument. Don't check pointer conversion here.
330
9d1cdb74 3312019-01-15 Richard Sandiford <richard.sandiford@arm.com>
332
333 PR inline-asm/52813
334 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
335
478fe3c0 3362019-01-14 Jakub Jelinek <jakub@redhat.com>
337
338 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
339 and __cpp_nontype_template_parameter_auto. Add a comment that
340 __cpp_template_auto is deprecated.
341
82362779 3422019-01-14 Tom Honermann <tom@honermann.net>
343
344 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
345 * c-common.c (c_common_reswords): Add char8_t.
346 (fix_string_type): Use char8_t for the type of u8 string literals.
347 (c_common_get_alias_set): char8_t doesn't alias.
348 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
349 C++.
350 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
351 (keyword_begins_type_specifier): Add RID_CHAR8.
352 * c-common.h (rid): Add RID_CHAR8.
353 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
354 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
355 Define char8_type_node and char8_array_type_node.
356 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
357 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
358 (c_cpp_builtins): Predefine __cpp_char8_t.
359 * c-lex.c (lex_string): Use char8_array_type_node as the type of
360 CPP_UTF8STRING.
361 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
362 * c-opts.c: If not otherwise specified, enable -fchar8_t when
363 targeting C++2a.
364 * c.opt: Add the -fchar8_t command line option.
365
955a4e68 3662019-01-14 Martin Sebor <msebor@redhat.com>
367
368 PR target/88638
369 * c-attribs.c (positional_argument): Call valid_format_string_type_p
370 and issue errors if it fails.
371 * c-common.h (valid_format_string_type_p): Declare.
372 * c-format.c (valid_stringptr_type_p): Rename...
373 (valid_format_string_type_p): ...to this and make extern.
374 (handle_format_arg_attribute): Adjust to new name.
375 (check_format_string): Same.
376
bd5cf857 3772019-01-13 H.J. Lu <hongjiu.lu@intel.com>
378
379 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
380 Replace "may may" with "may" in warning message.
381
59409f09 3822019-01-07 Jakub Jelinek <jakub@redhat.com>
383
384 PR c++/85052
385 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
386 (c_build_vec_convert): Declare.
387 * c-common.c (c_build_vec_convert): New function.
388
dd1ab8da 3892019-01-04 Martin Sebor <msebor@redhat.com>
390
391 PR c/88546
392 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
393 Handle C++ empty throw specification and C11 _Noreturn.
394 (has_attribute): Also handle C11 _Noreturn.
395
3910b703 3962019-01-04 Martin Sebor <msebor@redhat.com>
397
398 PR c/88363
399 * c-attribs.c (positional_argument): Also accept enumerated types.
400
fbd26352 4012019-01-01 Jakub Jelinek <jakub@redhat.com>
402
403 Update copyright years.
404
5c934723 4052018-12-20 H.J. Lu <hongjiu.lu@intel.com>
406
407 PR c/51628
408 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
409 * c-warn.c (check_alignment_of_packed_member): New function.
410 (check_address_of_packed_member): Likewise.
411 (check_and_warn_address_of_packed_member): Likewise.
412 (warn_for_address_or_pointer_of_packed_member): Likewise.
413 * c.opt: Add -Wno-address-of-packed-member.
414
98de922f 4152018-12-20 David Malcolm <dmalcolm@redhat.com>
416
417 PR c++/87504
418 * c-warn.c (get_outermost_macro_expansion): New function.
419 (spelled_the_same_p): Use it to unwind the macro expansions, and
420 compare the outermost macro in each nested expansion, rather than
421 the innermost.
422
fbfc389d 4232018-12-19 David Malcolm <dmalcolm@redhat.com>
424
425 PR c++/87504
426 * c-common.h (warn_tautological_cmp): Convert 1st param from
427 location_t to const op_location_t &.
428 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
429 when testing for INTEGER_CST.
430 (warn_tautological_bitwise_comparison): Convert 1st param from
431 location_t to const op_location_t &; use it to build a
432 binary_op_rich_location, and use this.
433 (spelled_the_same_p): New function.
434 (warn_tautological_cmp): Convert 1st param from location_t to
435 const op_location_t &. Warn for macro expansions if
436 spelled_the_same_p. Use binary_op_rich_location.
437
d582d140 4382018-12-19 David Malcolm <dmalcolm@redhat.com>
439
440 PR c++/43064
441 PR c++/43486
442 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
443 (verify_tree): Handle location wrappers.
444 (c_common_truthvalue_conversion): Strip any location wrapper.
445 Handle CONST_DECL.
446 (fold_offsetof): Strip any location wrapper.
447 (complete_array_type): Likewise for initial_value.
448 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
449 index before checking for INTEGER_CST.
450 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
451 print parentheses around location wrappers.
452 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
453 before checking for INTEGER_CST.
454 (warn_tautological_bitwise_comparison): Call
455 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
456 before checking for INTEGER_CST.
457 (readonly_error): Strip any location wrapper.
458 (warn_array_subscript_with_type_char): Strip location wrappers
459 before checking for INTEGER_CST. Use the location of the index if
460 available.
461
482bd38e 4622018-12-06 Jason Merrill <jason@redhat.com>
463
464 PR c++/88136 - -Wdeprecated-copy false positives
465 * c.opt (Wdeprecated-copy-dtor): New.
466 (Wdeprecated-copy): Move to -Wextra.
467
85e8db42 4682018-11-29 Martin Sebor <msebor@redhat.com>
469
470 PR c/88172
471 PR testsuite/88208
472 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
473 alignments to values less than the target requires.
474 (has_attribute): For attribute aligned consider both the attribute
475 and the alignment bits.
476 * c-common.c (c_init_attributes): Optionally issue a warning for
477 zero alignment.
478
656f8801 4792018-11-28 Martin Sebor <msebor@redhat.com>
480
481 PR c/88065
482 PR c/87297
483 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
484 or destination is an error.
485
bc03033c 4862018-11-28 Jakub Jelinek <jakub@redhat.com>
487
488 PR c++/88215
489 * c-ubsan.c: Include langhooks.h.
490 (ubsan_instrument_division): Change gcc_assert that main variants
491 of op0 and op1 types are equal to gcc_checking_assert that the
492 main variants are compatible types.
493
801cc086 4942018-11-27 Eric Botcazou <ebotcazou@adacore.com>
495
496 * c-ada-spec.c: Include stringpool.h.
497 (has_static_fields): Return false for incomplete types.
498 (is_tagged_type): Likewise.
499 (has_nontrivial_methods): Likewise.
500 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
501 (struct overloaded_name_hash): New structure.
502 (struct overloaded_name_hasher): Likewise.
503 (overloaded_names): New global variable.
504 (init_overloaded_names): New static function.
505 (overloaded_name_p): New predicate.
506 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
507 on the TYPE_STUB_DECL of the original type of a typedef, if any.
508 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
509 Remove always-true condition and dump forward types.
510 (dump_ada_specs): Delete overloaded_names.
511
818af1aa 5122018-11-20 Martin Sebor <msebor@redhat.com>
513
514 * c-attribs.c (type_for_vector_size): New function.
515 (type_valid_for_vector_size): Same.
516 (handle_vector_size_attribute): Move code to the functions above
517 and call them.
518 (validate_attribute, has_attribute): New functions.
519 * c-common.h (has_attribute): Declare.
520 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
521 * c-common.c (c_common_resword): Same.
522
863c62e0 5232018-11-16 Jason Merrill <jason@redhat.com>
524
525 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
526 * c-attribs.c (attr_cold_hot_exclusions): Make public.
527
bee3d99f 5282018-11-16 Jakub Jelinek <jakub@redhat.com>
529
530 PR middle-end/87854
531 * c-common.c (fix_string_type): Reject string literals larger than
532 TYPE_MAX_VALUE (ssizetype) bytes.
533
249e7a17 5342018-11-15 Martin Sebor <msebor@redhat.com>
535
536 PR c++/87541
537 PR c++/87542
538 * c-attribs.c (positional_argument): New function.
539 (handle_alloc_size_attribute): Use it and simplify.
540 (handle_alloc_align_attribute): Same.
541 (handle_assume_aligned_attribute): Same.
542 (handle_nonnull_attribute): Same.
543 * c-common.c (check_function_arguments): Pass fntype to
544 check_function_format.
545 * c-common.h (check_function_format): Add an argument.
546 (PosArgFlags, positional_argument): Declare new type and function.
547 * c-format.c (decode_format_attr): Add arguments.
548 (check_format_string, get_constant): Same.
549 (convert_format_name_to_system_name): Adjust.
550
1bcc5c64 5512018-11-15 David Malcolm <dmalcolm@redhat.com>
552
553 PR other/19165
554 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
555
f6742350 5562018-11-14 Jakub Jelinek <jakub@redhat.com>
557
1170ee75 558 P1236R1 - Signed integers are two's complement
559 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
560 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
561 with in-range second operand well defined for -std=c++2a.
562
f6742350 563 PR other/88007
564 * c-common.c (parse_optimize_options): Allocate option string from
565 opts_obstack rather than as GC memory. Move the allocation after
566 warning for invalid option.
567
be1e7283 5682018-11-13 David Malcolm <dmalcolm@redhat.com>
569
570 * c-common.c (c_get_substring_location): Update for renaming of
571 get_source_location_for_substring to get_location_within_string.
572 * c-lex.c: Replace "source_location" with "location_t".
573 * c-opts.c: Likewise.
574 * c-ppoutput.c: Likewise.
575
49610463 5762018-11-13 Martin Sebor <msebor@redhat.com>
577
578 PR middle-end/81824
579 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
580 (handle_tls_model_attribute): Improve diagnostics.
581
2207ad3a 5822018-11-12 Jason Merrill <jason@redhat.com>
583
76b94d4b 584 * c-cppbuiltin.c (c_cpp_builtins): Define
585 __cpp_impl_destroying_delete.
586
2207ad3a 587 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
588 __cpp_conditional_explicit.
589
08cc1019 5902018-11-09 Martin Sebor <msebor@redhat.com>
591
592 PR middle-end/81824
593 * c-attribs.c (handle_copy_attribute): New function.
594
ff31e352 5952018-11-09 Martin Sebor <msebor@redhat.com>
596
597 PR c/87795
598 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
599
7e5a76c8 6002018-11-08 Jakub Jelinek <jakub@redhat.com>
601
602 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
603 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
604 enum omp_memory_order MEMORY_ORDER.
605 (c_finish_omp_flush): Add MO argument.
606 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
607 (c_finish_omp_for): Add FINAL_P argument.
608 * c-omp.c: Include memmodel.h.
609 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
610 OMP_TASKGROUP_CLAUSES to it.
611 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
612 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
613 instead of OMP_ATOMIC_SEQ_CST.
614 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
615 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
616 __atomic_thread_fence call with the given value.
617 (check_omp_for_incr_expr): Formatting fixes.
618 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
619 even in OpenMP loops, diagnose if NE_EXPR and incr expression
620 is not constant expression 1 or -1. Transform NE_EXPR loops
621 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
622 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
623 loops too.
624 (c_omp_split_clauses): Add support for combined
625 #pragma omp parallel master and
626 #pragma omp {,parallel }master taskloop{, simd} constructs.
627 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
628 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
629 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
630 (c_omp_predetermined_sharing): Don't return
631 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
632 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
633 PRAGMA_OMP_REQUIRES.
634 * c-pragma.h (enum pragma_kind): Likewise.
635 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
636 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
637
e75dc1cb 6382018-11-08 David Malcolm <dmalcolm@redhat.com>
639
640 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
641
95b14393 6422018-11-08 David Malcolm <dmalcolm@redhat.com>
643
644 * c-format.c (local_cgraph_node_ptr_node): New variable.
645 (gcc_dump_printf_char_table): Add entry for %C.
646 (get_pointer_to_named_type): New function, taken from the handling
647 code for "gimple *" from...
648 (init_dynamic_diag_info): ...here. Add handling for
649 "cgraph_node *".
650 * c-format.h (T_CGRAPH_NODE): New.
651
95f798aa 6522018-10-19 Jason Merrill <jason@redhat.com>
653
654 * c-cppbuiltin.c (c_cpp_builtins): Add
655 __cpp_nontype_template_parameter_class.
656
048062ed 6572018-10-31 Nathan Sidwell <nathan@acm.org>
658
64bbb6a7 659 * c-opts.c (c_finish_options): Force command line macro
660 location. Refactor to avoid repeating main debug hook.
661 (push_command_line_include): Clarify comment.
662
048062ed 663 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
664
7b2ced2f 6652018-10-30 Martin Sebor <msebor@redhat.com>
666
667 PR middle-end/87041
668 * c-format.c (check_format_types): Avoid diagnosing null pointer
669 arguments to printf-family of functions.
670
529d9008 6712018-10-30 Marek Polacek <polacek@redhat.com>
672
673 Implement P0892R2, explicit(bool).
674 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
675
d42760aa 6762018-10-29 David Malcolm <dmalcolm@redhat.com>
677
678 * name-hint.h (name_hint::take_deferred): New member function.
679
8e415b30 6802018-10-29 David Malcolm <dmalcolm@redhat.com>
681
682 PR c++/56856
683 * c-common.c (check_function_sentinel): Call fold_for_warn on the
684 argument.
685 (check_function_restrict): Rename param "argarray" to
686 "unfolded_argarray", and make a copy named "argarray", calling
687 fold_for_warn on each argument.
688 (check_function_arguments): Add note about responsibility for
689 folding the arguments.
690
fcbe1d64 6912018-10-17 Joseph Myers <joseph@codesourcery.com>
692
693 * c-common.c (flag_isoc2x): New variable.
694 * c-common.h (clk_c): Update comment to reference C2X.
695 (flag_isoc99, flag_isoc11): Update comments to reference future
696 standard versions in general.
697 (flag_isoc2x): Declare.
698 * c-opts.c (set_std_c2x): New function.
699 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
700 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
701 flag_isoc2x to 0.
702 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
703
d767b8cd 7042018-10-17 Joseph Myers <joseph@codesourcery.com>
705
706 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
707 (std=iso9899:2018): Document C17 as published in 2018.
708
b109e9da 7092018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
710
711 PR c++/87364
712 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
713
5bea0e90 7142018-10-11 Will Wray <wjwray@gmail.com>
715
716 PR c++/87364
717 * c-pretty-print.h (pp_c_type_cast): Prototype.
718 (pp_c_integer_constant): Likewise.
719 * c-pretty-print.c (pp_c_type_cast): No longer static.
720 (pp_c_integer_constant): Likewise.
721 (pp_c_enumeration_constant): Fix loop termination when finding
722 name of constant. No longer returns a value. Call
723 pp_c_integer_constant.
724 (c_pretty_printer::constant): Update for changes to
725 pp_c_enumeration_constant.
726
37c22fd1 7272018-10-11 Jakub Jelinek <jakub@redhat.com>
728
729 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
730 for no_unique_address.
731
fb225cf1 7322018-10-09 David Malcolm <dmalcolm@redhat.com>
733
734 * c-common.c (c_option_controlling_cpp_error): Rename to...
735 (c_option_controlling_cpp_diagnostic): ...this, and convert
736 "reason" from int to enum.
737 (c_cpp_error): Rename to...
738 (c_cpp_diagnostic): ...this, converting level and reason to enums.
739 * c-common.h (c_cpp_error): Rename to...
740 (c_cpp_diagnostic): ...this, converting level and reason to enums.
741 * c-opts.c (c_common_init_options): Update for renaming.
742
d32a4fbd 7432018-10-08 Richard Sandiford <richard.sandiford@arm.com>
744
745 PR c/87286
746 * c-common.c (vector_types_compatible_elements_p): Use
747 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
748
0e992424 7492018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
750
751 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
752 to generate constructor destructor priority warning.
753 * c.opt (-Wprio-ctor-dtor): New option.
754
0c9e54e8 7552018-10-01 Jason Merrill <jason@redhat.com>
756
757 * c-lex.c (c_common_has_attribute): Add no_unique_address.
758
384be95a 7592018-10-01 Eric Botcazou <ebotcazou@adacore.com>
760
761 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
762 (dump_ada_node): Add const keyword.
763
6c77f4a4 7642018-09-25 Martin Liska <mliska@suse.cz>
765
766 * c-common.c (c_common_truthvalue_conversion):
767 Remove Pascal from documentation.
768
d1ee343c 7692018-09-21 Eric Botcazou <ebotcazou@adacore.com>
770
771 * c-ada-spec.c: Include diagnostic.h.
772 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
773
51481b25 7742018-09-19 Marek Polacek <polacek@redhat.com>
775
776 * c.opt (Wclass-conversion): New.
777
a2507e3d 7782018-09-17 David Malcolm <dmalcolm@redhat.com>
779
780 * c-format.c (range_label_for_format_type_mismatch::get_text):
781 Update for new param.
782
995dda73 7832018-09-17 David Malcolm <dmalcolm@redhat.com>
784
785 * c-format.c (format_warning_at_char): Update for introduction of
786 format_string_diagnostic_t.
787 (format_type_warning): Likewise.
788
f178ded7 7892018-09-17 Martin Jambor <mjambor@suse.cz>
790
791 PR c/63886
792 * c.opt (Wabsolute-value): New.
793
df06d247 7942018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
795
796 * c-common.c (complete_flexible_array_elts): New helper function.
797 * c-common.h (complete_flexible_array_elts): Declare.
798
d839099f 7992018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
800
801 * c-common.c (braced_list_to_string): Remove eval parameter.
802 Add some more checks. Always create zero-terminated STRING_CST.
803 * c-common.h (braced_list_to_string): Adjust prototype.
804
5fe20025 8052018-08-27 David Malcolm <dmalcolm@redhat.com>
806
807 PR 87091
808 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
809 to a tri-state.
810 (maybe_suggest_missing_token_insertion): Likewise.
811 (maybe_add_include_fixit): Add param "override_location". If set,
812 and source-printing is enabled, then override the rich_location's
813 primary location with that of the insertion point for the fix-it
814 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
815 * c-common.h (extern void maybe_add_include_fixit): Add bool
816 param.
817 * c-format.c (selftest::test_type_mismatch_range_labels): Update
818 for conversion of show_caret_p to a tri-state.
819 * c-warn.c (warn_for_restrict): Likewise.
820 * known-headers.cc
821 (suggest_missing_header::~suggest_missing_header): Update call to
822 maybe_add_include_fixit to suggest overriding the location, as it
823 is for a note.
824
a0e9bfbb 8252018-08-27 Martin Liska <mliska@suse.cz>
826
827 * c-common.c (check_function_restrict): Use new function
c9e63184 828 fndecl_built_in_p and remove check for FUNCTION_DECL if
829 possible.
a0e9bfbb 830 (check_builtin_function_arguments): Likewise.
831 (reject_gcc_builtin): Likewise.
832 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
833
48bbcd96 8342018-08-26 Marek Polacek <polacek@redhat.com>
835
836 PR c++/87029, Implement -Wredundant-move.
837 * c.opt (Wredundant-move): New option.
838
543dc27e 8392018-08-21 Marek Polacek <polacek@redhat.com>
840
841 PR c++/86981, Implement -Wpessimizing-move.
842 * c.opt (Wpessimizing-move): New option.
843
bc35ef65 8442018-08-20 David Malcolm <dmalcolm@redhat.com>
845
846 PR other/84889
847 * c-attribs.c (common_handle_aligned_attribute): Add
848 auto_diagnostic_group instance.
849 * c-indentation.c (warn_for_misleading_indentation): Likewise.
850 * c-opts.c (c_common_post_options): Likewise.
851 * c-warn.c (warn_logical_not_parentheses): Likewise.
852 (warn_duplicated_cond_add_or_warn): Likewise.
853 (warn_for_multistatement_macros): Likewise.
854
8a0afc11 8552018-08-20 Nathan Sidwell <nathan@acm.org>
856
857 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
858 access.
859
6d6279f8 8602018-08-17 Nathan Sidwell <nathan@acm.org>
861
862 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
863 field.
864 (laxy_hex_fp_value_count): Make unsigned.
865 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
866 manipulate the macro.
867 (builtin_defin_with_hex_fp_value): Adjust callback name, use
868 cpp_define_lazily.
869
bffe1cb4 8702018-08-17 David Malcolm <dmalcolm@redhat.com>
871
872 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
873 (gcc_dump_printf_length_specs): New.
874 (gcc_dump_printf_flag_pairs): New.
875 (gcc_dump_printf_flag_specs): New.
876 (gcc_dump_printf_char_table): New.
877 (format_types_orig): Add entry for "gcc_dump_printf".
878 (init_dynamic_diag_info): Set up length_char_specs and
879 conversion_specs for gcc_dump_printf_format_type.
880 (handle_format_attribute): Handle gcc_dump_printf_format_type.
881
373b37e4 8822018-08-17 Nathan Sidwell <nathan@acm.org>
883
7496b881 884 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
885
373b37e4 886 * c-ada-spec.c: Don't #include "cpp-id-data.h"
887 * c-cppbuiltin.c: Likewise.
888
0c46a085 8892018-08-17 Martin Liska <mliska@suse.cz>
890
891 * c.opt: Remove Warn, Init and Report for options with
c9e63184 892 Ignore/Deprecated flag. Warning is done automatically for
893 Deprecated flags.
0c46a085 894
6564acaf 8952018-08-16 David Malcolm <dmalcolm@redhat.com>
896
897 PR c++/70693
898 * c-common.c (selftest::c_family_tests): Call
899 selftest::c_indentation_c_tests.
900 * c-common.h (selftest::c_indentation_c_tests): New decl.
901 * c-indentation.c: Include "selftest.h".
902 (next_tab_stop): Add "tab_width" param, rather than accessing
903 cpp_opts.
904 (get_visual_column): Likewise. Clarify comment. Bulletproof
905 against reading past the end of the line.
906 (get_first_nws_vis_column): Add "tab_width" param.
907 (detect_intervening_unindent): Likewise.
908 (should_warn_for_misleading_indentation): Read tab width from
909 cpp_opts and pass around.
910 (selftest::test_next_tab_stop): New test.
911 (selftest::assert_get_visual_column_succeeds): New function.
912 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
913 (selftest::assert_get_visual_column_fails): New function.
914 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
915 (selftest::test_get_visual_column): New test.
916 (selftest::c_indentation_c_tests): New function.
917
793b38da 9182018-08-16 Nathan Sidwell <nathan@acm.org>
919
920 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
921 (store_ada_macro): Likewise.
922 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
923 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
924
b7bb5264 9252018-08-15 David Malcolm <dmalcolm@redhat.com>
926
927 * c-format.c: Include "selftest-diagnostic.h" and
928 "gcc-rich-location.h".
929 (format_warning_at_char): Pass NULL for new label params of
930 format_warning_va.
931 (class indirection_suffix): New class.
932 (class range_label_for_format_type_mismatch): New class.
933 (format_type_warning): Move logic for generating "*" suffix to
934 class indirection_suffix. Create "fmt_label" and "param_label"
935 to show their types, and pass them to the
936 format_warning_at_substring calls.
937 (selftest::test_type_mismatch_range_labels): New test.
938 (selftest::c_format_c_tests): Call it.
939
b2fc0527 9402018-08-13 Martin Sebor <msebor@redhat.com>
941
942 PR tree-optimization/71625
943 * c-common.c (braced_list_to_string): New function.
944 * c-common.h (braced_list_to_string): Declare it.
945
03410c5e 9462018-08-08 Nathan Sidwell <nathan@acm.org>
947
948 * c-common.c (try_to_locate_new_include_inertion_point): Use
949 linemap_included_from_linemap.
950 * c-lex.c (fe_file_change): Use linemap_included_from.
951 * c-ppoutput.c (pp_file_change): Likewise.
952
a2e93b74 9532018-08-01 Martin Sebor <msebor@redhat.com>
954
955 PR tree-optimization/86650
956 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
957 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
958 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
959 * c-format.h (T89_G): Update to be "gimple *" rather than
960 "gcall *".
961 (local_gcall_ptr_node): Rename...
962 (local_gimple_ptr_node): ...to this.
963
98605dea 9642018-07-31 David Malcolm <dmalcolm@redhat.com>
965
966 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
967 table entries for gcc_diag_char_table, and the 'Z' entry from
968 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
969 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
970 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
971 adding missing "Z" for this table. Remove erroneous "G" and "K"
972 entries.
973 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
974 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
975 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
976
123081ef 9772018-07-31 Richard Earnshaw <rearnsha@arm.com>
978
979 * c-common.c (speculation_safe_resolve_call): New function.
980 (speculation_safe_resolve_params): New function.
981 (speculation_safe_resolve_return): New function.
982 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
983 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
984 __HAVE_SPECULATION_SAFE_VALUE.
985
8d3ff470 9862018-07-20 David Malcolm <dmalcolm@redhat.com>
987
988 * c-common.c (c_cpp_error): Remove redundant "line_table"
989 parameter from call to rich_location::set_range.
990 (maybe_suggest_missing_token_insertion): Likewise.
991
d9147f51 9922018-07-20 Martin Sebor <msebor@redhat.com>
993
994 PR middle-end/82063
995 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
996
8e18705e 9972018-07-20 Martin Sebor <msebor@redhat.com>
998
999 PR middle-end/82063
1000 * c-common.h (c_common_handle_option): Change function argument
1001 to HOST_WIDE_INT.
1002 * c-opts.c (c_common_init_options): Same.
1003 (c_common_handle_option): Same. Remove special handling of
1004 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1005 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1006 options to take a HOST_WIDE_INT argument and accept a byte-size
1007 suffix. Initialize.
1008 (-Wvla-larger-than): Same.
1009 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1010 (-Wno-vla-larger-than): Same.
1011
12f69ea4 10122018-07-12 Jakub Jelinek <jakub@redhat.com>
1013
1014 * c-attribs.c (c_common_attribute_table): Add
1015 "omp declare target implicit" attribute.
1016
e56b0fa3 10172018-07-12 Richard Biener <rguenther@suse.de>
1018
1019 PR c/86453
1020 * c-attribs.c (handle_packed_attribute): Do not build a variant
1021 type with TYPE_PACKED, instead ignore the attribute if we may
1022 not apply to the original type.
1023
ed321d14 10242018-07-10 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c++/86443
1027 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1028 to contain TREE_LIST for both the original class iterator and the
1029 "last" helper var.
1030
32f67408 10312018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1032
1033 * c-ada-spec.c (to_ada_name): Remove index parameter.
1034 (pp_ada_tree_identifier): Likewise.
1035 (dump_ada_macros): Adjust call to to_ada_name.
1036 (struct overloaded_name_hash): Delete.
1037 (struct overloaded_name_hasher): Likewise.
1038 (overloaded_names): Likewise.
1039 (compute_overloading_index): Likewise.
1040 (dump_ada_decl_name): Do not call compute_overloading_index and
1041 adjust calls to pp_ada_tree_identifier.
1042 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1043 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1044 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1045 (dump_ada_enum_type): Remove type and display_convention parameters.
1046 Adjust calls to pp_ada_tree_identifier.
1047 (dump_ada_node): Likewise and for dump_ada_structure.
1048 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1049 and tidy up.
1050 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1051 syntax.
1052 (print_constructor): Adjust call to pp_ada_tree_identifier.
1053 (print_destructor): Likewise.
1054 (dump_ada_declaration): Switch to aspect syntax.
1055 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1056 parameter with nested parameter.
1057 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1058 (dump_ada_specs): Do not delete overloaded_names table.
1059
93711a35 10602018-07-06 Peter Bergner <bergner@linux.ibm.com>
1061
1062 PR target/86324
32f67408 1063 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
93711a35 1064 target hook.
1065
8c422d60 10662018-07-05 Nathan Sidwell <nathan@acm.org>
1067
1068 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1069 NO_IMPLICIT_EXTERN_C.
1070
2abdff38 10712018-06-28 Martin Liska <mliska@suse.cz>
1072
1073 * cppspec.c: Include opt-suggestions.h.
1074
737cc978 10752018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1076 Thomas Schwinge <thomas@codesourcery.com>
1077 Cesar Philippidis <cesar@codesourcery.com>
1078
1079 * c-pragma.h (enum pragma_omp_clause): Add
1080 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1081 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1082
4210c535 10832018-06-20 Jakub Jelinek <jakub@redhat.com>
1084
1085 PR c++/86210
1086 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1087 comment.
1088
0eff2551 10892018-06-18 Martin Sebor <msebor@redhat.com>
1090
1091 PR middle-end/85602
1092 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1093 nonstring.
1094
1c67942e 10952018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1096
1097 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1098
a1dbee61 10992018-06-13 Jason Merrill <jason@redhat.com>
1100
ae5baadd 1101 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1102 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1103 handling.
1104
a1dbee61 1105 PR c++/86094 - wrong code with defaulted move ctor.
1106 * c-opts.c (c_common_post_options): Bump the current ABI version to
1107 13. Set warn_abi_version and flag_abi_compat_version to the current
1108 version rather than 0. Fix defaulting flag_abi_compat_version from
1109 warn_abi_version.
1110
2b691a1c 11112018-06-12 Martin Sebor <msebor@redhat.com>
1112
1113 PR c/85931
1114 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1115 sizeof source and destination yields the same value.
1116
274d31f0 11172018-06-12 Martin Liska <mliska@suse.cz>
1118
1119 * c.opt: Make MPX-related options as Deprecated.
1120
54e7de93 11212018-06-08 David Malcolm <dmalcolm@redhat.com>
1122
1123 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1124 rather than 0.
1125
1e42d5c6 11262018-06-08 Martin Liska <mliska@suse.cz>
1127
1128 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1129 for MPX (macros, related functions, fields in cgraph_node, ...).
1130 (handle_bnd_legacy): Likewise.
1131 (handle_bnd_instrument): Likewise.
1132 * c.opt: Likewise.
1133
243805b7 11342018-06-06 Jakub Jelinek <jakub@redhat.com>
1135
1136 PR c++/86068
1137 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1138 __cpp_transactional_memory to 201500 instead of 210500.
1139
dd38bee9 11402018-06-06 Jason Merrill <jason@redhat.com>
1141
1142 PR c++/85710 - ICE with -Wmemset-elt-size.
1143 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1144
d68ed833 11452018-06-01 Jason Merrill <jason@redhat.com>
1146
1147 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1148 201703.
1149
ec3dd94a 11502018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1151
1152 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1153 declaration for a typedef independently of whether the declaration of
1154 the subtype is generated.
1155
8306d54c 11562018-05-31 Martin Sebor <msebor@redhat.com>
1157
1158 PR c/82063
1159 * c.opt (-Wno-alloc-size-larger-than): New option.
1160
768cc20e 11612018-04-22 David Pagan <dave.pagan@oracle.com>
1162
1163 PR c/55976
1164 * c-opts.c (c_common_post_options): Set default for warn_return_type
1165 for C++/C++ with ObjC extensions only. For C, makes it possible to
1166 differentiate between default (no option), -Wreturn-type, and
1167 -Wno-return-type.
1168
06a58535 11692018-05-29 Jason Merrill <jason@redhat.com>
1170
1171 * c.opt (Winit-list-lifetime): New flag.
1172
777e90ba 11732018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1174
1175 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1176 splay_tree_delete_pointers.
1177
fbdd91b9 11782018-05-26 Jakub Jelinek <jakub@redhat.com>
1179
1180 PR bootstrap/85921
1181 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1182 noinline variable to workaround broken kernel headers.
1183
17847cff 11842018-05-18 Jason Merrill <jason@redhat.com>
1185
1186 * c.opt (Wdeprecated-copy): New flag.
1187
b2312729 11882018-05-17 Martin Liska <mliska@suse.cz>
1189
1190 * c-warn.c (overflow_warning): Do not use
1191 space in between 'G_' and '('.
1192
23cc4e77 11932018-05-09 Jason Merrill <jason@redhat.com>
1194
1195 * c-common.c (valid_array_size_p): Add complain parameter.
1196 * c-common.h: ...which defaults to true.
1197
b16a5119 11982018-05-11 Jakub Jelinek <jakub@redhat.com>
1199
1200 PR c/85696
1201 * c-omp.c (c_omp_predetermined_sharing): Return
1202 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1203
3308817a 12042018-05-11 Martin Liska <mliska@suse.cz>
1205
c9e63184 1206 PR sanitizer/85556
3308817a 1207 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1208 TREE_LIST values.
1209
3c43ed34 12102018-05-10 Jakub Jelinek <jakub@redhat.com>
1211
1212 PR c++/85662
1213 * c-common.h (fold_offsetof_1): Removed.
1214 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1215 CTX argument defaulted to ERROR_MARK.
1216 * c-common.c (fold_offsetof_1): Renamed to ...
1217 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1218 argument, convert the pointer constant to TYPE and use size_binop
1219 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1220 a pointer type. Adjust recursive calls.
1221
cb8ba767 12222018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1223
1224 PR c++/85400
1225 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1226
216c7678 12272018-05-07 Nathan Sidwell <nathan@acm.org>
1228
1229 * c.opt (ffor-scope): Remove functionality, issue warning.
1230
984120c9 12312018-05-03 Nathan Sidwell <nathan@acm.org>
1232
1233 * c.opt (ffriend-injection): Remove functionality, issue warning.
1234
35ebe9da 12352018-05-01 David Malcolm <dmalcolm@redhat.com>
1236
1237 PR c/84258
1238 * c-format.c (struct format_check_results): Add field
1239 "number_non_char".
1240 (check_format_info): Initialize it, and warn if encountered.
1241 (check_format_arg): Distinguish between wide char and
1242 everything else when detecting arrays of non-char.
1243
0bce23e1 12442018-04-30 David Malcolm <dmalcolm@redhat.com>
1245
1246 * c-format.c (get_corrected_substring): Update for
1247 location_get_source_line returning a char_span. Use a char_span
1248 when handling the prefix of the correction.
1249 * c-indentation.c (get_visual_column): Update for
1250 location_get_source_line returning a char_span.
1251 (get_first_nws_vis_column): Likewise.
1252
57607963 12532018-03-29 David Malcolm <dmalcolm@redhat.com>
1254
1255 PR c++/84269
1256 * known-headers.cc (get_stdlib_header_for_name): Add various names
1257 from <assert.h>, <string.h>, and <memory.h>; add more names from
1258 <stdio.h>.
1259
45685ee6 12602018-03-27 Jakub Jelinek <jakub@redhat.com>
1261
1262 PR c++/85061
1263 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1264 get_base_address of the second operand is a VAR_P, rather than the
1265 operand itself, and use gcc_checking_assert instead of gcc_assert.
1266
317cd23f 12672018-03-23 Marek Polacek <polacek@redhat.com>
1268
1269 PR c++/85045
1270 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1271 <case RDIV_EXPR>: Tweak condition.
1272
b0e58d34 12732018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1274
1275 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1276
7b2c7b75 12772018-03-16 Jakub Jelinek <jakub@redhat.com>
1278
f9936b7c 1279 PR c/84909
1280 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1281 diagnostics.
1282
7b2c7b75 1283 PR c/84910
1284 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1285 diagnostics.
1286
b4e852c0 12872018-03-16 Richard Biener <rguenther@suse.de>
1288
1289 PR c/84873
1290 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1291 unshare the possibly folded expression.
1292
e1d101a0 12932018-03-15 Richard Biener <rguenther@suse.de>
1294
1295 PR c/84873
1296 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1297
2bc9729c 12982018-03-13 Martin Sebor <msebor@redhat.com>
1299
1300 PR tree-optimization/84725
1301 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1302 with all three narrow character types, including their qualified forms.
1303
75e9093e 13042018-03-12 Martin Sebor <msebor@redhat.com>
1305
1306 PR tree-optimization/83456
1307 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1308 Restore checking of bounded built-in functions.
1309 (check_function_arguments): Also return the result
1310 of warn_for_restrict.
1311 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1312 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1313
76b7321d 13142018-03-02 Marek Polacek <polacek@redhat.com>
1315
1316 PR c++/84171
1317 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1318 is erroneous.
1319
bd571ec4 13202018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1321
1322 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1323 function".
1324
95a88c7b 13252018-03-01 Marek Polacek <polacek@redhat.com>
1326
1327 PR c++/84639
1328 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1329 alignment in computation.
1330
e1bc82cd 13312018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1332
1333 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1334 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1335
f16f0d55 13362018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1337
1338 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1339 (is_char_array): Take a type instead of a declaration.
1340 (dump_ada_array_type): Likewise.
1341 (is_simple_enum): Minor tweak.
1342 (dump_ada_enum_type): New function extracted from...
1343 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1344 <INTEGER_TYPE>: Remove unreachable code.
1345 <RECORD_TYPE>: Likewise. Minor tweaks.
1346 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1347 <ENUMERAL_TYPE>: New case.
1348 <RECORD_TYPE>: Factor out common code.
1349 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1350 Minor tweaks. Deal with enumeral types.
1351 (dump_ada_structure): Minor tweaks.
1352
7688a279 13532018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1354
1355 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1356 address for incomplete structures.
1357 (dump_forward_type): Do not bail out for incomplete structures.
1358 (dump_ada_declaration): Do not special-case incomplete structures
1359 for subtypes. Dump them as null records for types.
1360
3da348a7 13612018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1362
1363 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1364 (is_char_array): Fix formatting.
1365 (dump_template_types): Likewise.
1366 (dump_generic_ada_node): Rename into...
1367 (dump_ada_node): ...this.
1368 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1369 incomplete structures and not for empty structures. Do not use it
1370 when forward declarations are needed.
1371 (dump_forward_type): New function.
1372 (dump_nested_types): Remove FORWARD parameter. Do not consider
1373 TREE_VISITED and do not generate a forward declaration. Only dump
1374 original nested types for nested declaration.
1375 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1376 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1377 <RECORD_TYPE>: Do not consider TREE_VISITED.
1378 (dump_ada_declaration): Use booleans and fix formatting throughout.
1379 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1380 Call dump_forward_type instead of dump_nested_types for a typedef.
1381 Remove superfluous check and adjust call to dump_nested_types.
1382 <POINTER_TYPE>: Call dump_forward_type and fall through.
1383 (dump_ada_struct_decl): Rename into...
1384 (dump_ada_structure): ...this. Do not special-case empty structures.
1385
77628407 13862018-02-27 Martin Sebor <msebor@redhat.com>
1387
1388 PR c++/83871
1389 * c.opt (-Wmissing-attributes): New option.
1390
268febc9 13912018-02-21 Martin Liska <mliska@suse.cz>
1392
1393 * c.opt (Wcatch-value=): Add IntegerRange.
1394
6bac1b10 13952018-02-15 Jason Merrill <jason@redhat.com>
1396
1397 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1398
d9757bb6 13992018-02-09 Nathan Sidwell <nathan@acm.org>
1400
1401 PR c/84293
1402 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1403 arg.
1404 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1405 arg. Adjust.
1406
4183b672 14072018-02-09 Martin Sebor <msebor@redhat.com>
1408
1409 PR lto/84212
1410 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1411 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1412 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1413 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1414 (-Wuninitialized): Same.
1415
2b149f78 14162018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1417
1418 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1419 keyword for components.
1420
3cde3c29 14212018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1422
1423 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1424
4a7580c4 14252018-02-02 Julia Koval <julia.koval@intel.com>
1426
1427 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1428
6f27ed83 14292018-01-29 Marek Polacek <polacek@redhat.com>
1430
1431 PR c/83966
1432 * c-format.c (check_function_format): Check current_function_decl.
1433
5462c8e9 14342018-01-27 Jakub Jelinek <jakub@redhat.com>
1435
1436 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1437 argument.
1438 (LAZY_HEX_FP_VALUES_CNT): Define.
1439 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1440 values rather than just 12.
1441 (builtin_define_with_hex_fp_value): Likewise.
1442
859b51f8 14432018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1444
c9e63184 1445 PR other/70268
1446 * c.opt (-fmacro-prefix-map): New option.
1447 * c-opts.c (c_common_handle_option): Handle it.
1448 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1449 * c-ppoutput.c (init_pp_output): Likewise.
859b51f8 1450
510e5f39 14512018-01-17 David Malcolm <dmalcolm@redhat.com>
1452
1453 PR c++/83814
1454 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1455
8c42dc9e 14562018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1457
1458 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1459 Skip 'f' and 'F' characters if it is true.
1460 (store_ada_macro): Minor tweak.
1461 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1462 <CPP_WSTRING>: Likewise.
1463 <CPP_STRING>: Output '&' in the buffer if not the first string.
1464 <CPP_NUMBER>: Adjust calls to dump_number.
1465
d76863c8 14662018-01-10 David Malcolm <dmalcolm@redhat.com>
1467
1468 PR c++/43486
1469 * c-common.c: Include "selftest.h".
1470 (get_atomic_generic_size): Perform the test for integral type
1471 before the range test for any integer constant, fixing indentation
1472 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1473 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1474 (selftest::test_fold_for_warn): New function.
1475 (selftest::c_common_c_tests): New function.
1476 (selftest::c_family_tests): Call it, and
1477 selftest::c_pretty_print_c_tests.
1478 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1479 * c-format.c (check_format_arg): Convert VAR_P check to a
1480 fold_for_warn.
1481 * c-pretty-print.c: Include "selftest.h".
1482 (pp_c_cast_expression): Don't print casts for location wrappers.
1483 (selftest::assert_c_pretty_printer_output): New function.
1484 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1485 (selftest::test_location_wrappers): New function.
1486 (selftest::c_pretty_print_c_tests): New function.
1487 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1488
8464736b 14892018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1490 Alan Hayward <alan.hayward@arm.com>
1491 David Sherwood <david.sherwood@arm.com>
1492
1493 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1494
eafbcd13 14952018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1496 Alan Hayward <alan.hayward@arm.com>
1497 David Sherwood <david.sherwood@arm.com>
1498
1499 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1500 as polynomial.
1501
f08ee65f 15022018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1503 Alan Hayward <alan.hayward@arm.com>
1504 David Sherwood <david.sherwood@arm.com>
1505
1506 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1507 (convert_vector_to_array_for_subscript): Handle polynomial
1508 TYPE_VECTOR_SUBPARTS.
1509 (c_common_type_for_mode): Check valid_vector_subparts_p.
1510 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1511 VECTOR_CST_NELTS.
1512
8e8f6434 15132018-01-03 Jakub Jelinek <jakub@redhat.com>
1514
1515 Update copyright years.
1516
82841c8f 15172017-12-22 Mike Stump <mikestump@comcast.net>
c9e63184 1518 Eric Botcazou <ebotcazou@adacore.com>
82841c8f 1519
1520 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1521 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1522
02eb0013 15232017-12-22 Alexandre Oliva <aoliva@redhat.com>
1524
1525 PR debug/83527
1526 PR debug/83419
1527 * c-semantics.c (only_debug_stmts_after_p): New.
1528 (pop_stmt_list): Clear side effects in debug-only stmt list.
1529 Check for single nondebug stmt followed by debug stmts only.
1530
7b26afa7 15312017-12-21 Alexandre Oliva <aoliva@redhat.com>
1532
1533 PR debug/83419
1534 * c-semantics.c (pop_stmt_list): Propagate side effects from
1535 single nondebug stmt to container list.
1536
c9281ef8 15372017-12-19 Jakub Jelinek <jakub@redhat.com>
1538
1539 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1540 conditions with typical order conditions.
1541
0526776f 15422017-12-18 Marek Polacek <polacek@redhat.com>
1543
1544 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1545 not in effect.
1546
7bfd6b12 15472017-12-17 Martin Sebor <msebor@redhat.com>
1548
1549 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1550 an error for attribute warn_if_not_aligned.
1551
e6a18b5a 15522017-12-16 Martin Sebor <msebor@redhat.com>
1553
1554 PR tree-optimization/78918
1555 * c-common.c (check_function_restrict): Avoid checking built-ins.
1556 * c.opt (-Wrestrict): Include in -Wall.
1557
672bc44d 15582017-12-15 Jakub Jelinek <jakub@redhat.com>
1559
1560 * c-attribs.c (c_common_attribute_table,
1561 c_common_format_attribute_table): Swap affects_type_identity
1562 and handler fields, adjust comments.
1563
d76c514d 15642017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1565
1566 * c.opt (Wcast-function-type): New warning option.
1567 * c-lex.c (get_fileinfo): Avoid warning.
1568 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1569
b8bf7c13 15702017-12-14 Qing Zhao <qing.zhao@oracle.com>
1571
859b51f8 1572 PR middle_end/79538
b8bf7c13 1573 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1574 Adjust the size of buf1 and buf2, add a new buf to avoid
1575 format-overflow warning.
1576
90567983 15772017-12-12 Alexandre Oliva <aoliva@redhat.com>
1578
1579 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1580 subsequent statement list.
1581
dab0e385 15822017-12-07 Martin Sebor <msebor@redhat.com>
1583
1584 PR c/81544
1585 PR c/81566
1586 * c-attribs.c (attr_aligned_exclusions): New array.
1587 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1588 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1589 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1590 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1591 (attr_warn_unused_result_exclusions): Same.
1592 (handle_hot_attribute, handle_cold_attribute): Simplify.
1593 (handle_const_attribute): Warn on function returning void.
1594 (handle_pure_attribute): Same.
1595 (handle_aligned_attribute): Diagnose conflicting attribute
1596 specifications.
1597 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1598
08233401 15992017-12-06 David Malcolm <dmalcolm@redhat.com>
1600
1601 PR c/83236
1602 * c-common.c (selftest::c_family_tests): Call
1603 selftest::c_spellcheck_cc_tests.
1604 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1605 * c-spellcheck.cc: Include "selftest.h".
1606 (name_reserved_for_implementation_p): New function.
1607 (should_suggest_as_macro_p): New function.
1608 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1609 should_suggest_as_macro_p and call it.
1610 (selftest::test_name_reserved_for_implementation_p): New function.
1611 (selftest::c_spellcheck_cc_tests): New function.
1612 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1613
aa0e50a0 16142017-12-06 David Malcolm <dmalcolm@redhat.com>
1615
1616 * c-spellcheck.cc: New file, taken from macro-handling code in
1617 spellcheck-tree.c.
1618 * c-spellcheck.h: New file, taken from macro-handling code in
1619 spellcheck-tree.h.
1620
4d62fce5 16212017-12-01 Jakub Jelinek <jakub@redhat.com>
1622
1623 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1624 attribute.
1625 (handle_simd_attribute): Don't check for "cilk simd function"
1626 attribute. Reindent, formatting changes.
1627
01fc1257 16282017-11-30 Julia Koval <julia.koval@intel.com>
1629
1630 * c-common.h (inv_list): Remove.
1631
dfa10f0d 16322017-11-28 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR sanitizer/81275
1635 * c-common.c (c_switch_covers_all_cases_p_1,
1636 c_switch_covers_all_cases_p): New functions.
1637 * c-common.h (c_switch_covers_all_cases_p): Declare.
1638
efa02472 16392017-11-28 Julia Koval <julia.koval@intel.com>
c9e63184 1640 Sebastian Peryt <sebastian.peryt@intel.com>
efa02472 1641
1642 * array-notation-common.c: Delete.
1643 * c-cilkplus.c: Ditto.
1644 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1645 * c-common.def (ARRAY_NOTATION_REF): Remove.
1646 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1647 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1648 c_validate_cilk_plus_loop, cilkplus_an_parts,
1649 cilk_ignorable_spawn_rhs_op,
1650 cilk_recognize_spawn): Remove.
1651 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1652 * c-omp.c: Remove CILK_SIMD check.
1653 * c-pragma.c: Ditto.
1654 * c-pragma.h: Remove CILK related pragmas.
1655 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1656 ARRAY_NOTATION_REF condition.
1657 (c_pretty_printer::expression): Ditto.
1658 * c.opt (fcilkplus): Remove.
1659 * cilk.c: Delete.
1660
57e83b58 16612017-11-21 Marc Glisse <marc.glisse@inria.fr>
1662
1663 * c-pretty-print.c (pp_c_additive_expression,
1664 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1665
72f46c23 16662017-11-21 Jakub Jelinek <jakub@redhat.com>
1667
ab2a527a 1668 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1669
72f46c23 1670 PR c++/83059
1671 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1672 instead of tree_to_uhwi, formatting fix.
1673
145fb49f 16742017-11-20 David Malcolm <dmalcolm@redhat.com>
1675
1676 PR c/81404
1677 * known-headers.cc: New file, based on material from c/c-decl.c.
1678 (suggest_missing_header): Copied as-is.
1679 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1680 heavily edited to add C++ support. Add some knowledge about
1681 <limits.h>, <stdint.h>, and <wchar.h>.
1682 * known-headers.h: Likewise.
1683
dd008336 16842017-11-20 David Malcolm <dmalcolm@redhat.com>
1685
1686 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1687 (lookup_name_fuzzy): Likewise. Convert return type from
1688 const char * to name_hint. Add location_t param.
1689 * name-hint.h: New header.
1690
69cd03b2 16912017-11-19 Jakub Jelinek <jakub@redhat.com>
1692
1693 PR c/66618
1694 PR c/69960
1695 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1696
88a136ba 16972017-11-16 Joseph Myers <joseph@codesourcery.com>
1698
1699 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1700 expected publication date of C17.
1701 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1702
aac64699 17032017-11-15 Joseph Myers <joseph@codesourcery.com>
1704
1705 PR c/81156
1706 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1707 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1708
d8aad786 17092017-11-10 Martin Sebor <msebor@redhat.com>
1710
1711 PR c/81117
1712 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1713 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1714 * c.opt (-Wstringop-truncation): New option.
1715
2fb20ba2 17162017-11-06 Martin Liska <mliska@suse.cz>
1717
1718 PR middle-end/82404
1719 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1720 FE.
1721 * c.opt: Set default value of warn_return_type.
1722
3b6578b3 17232017-10-31 David Malcolm <dmalcolm@redhat.com>
1724
1725 * c-common.c (binary_op_error): Update for renaming of
1726 error_at_rich_loc.
1727 (c_parse_error): Likewise.
1728 * c-warn.c (warn_logical_not_parentheses): Likewise for
1729 renaming of inform_at_rich_loc.
1730 (warn_for_restrict): Likewise for renaming of
1731 warning_at_rich_loc_n.
1732
a0f44249 17332017-10-30 Joseph Myers <joseph@codesourcery.com>
1734
1735 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1736 * c-opts.c (set_std_c17): New function.
1737 (c_common_init_options): Use gnu17 as default C version.
1738 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1739
8c32188e 17402017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1741
1742 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1743 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1744 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1745 __FP_FAST_FMA<N>X.
1746
0f637402 17472017-10-23 Marek Polacek <polacek@redhat.com>
1748
1749 PR c/82681
1750 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1751
2b34677f 17522017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1753
1754 * c-common.c (check_builtin_function_arguments): Also check arguments
1755 of __builtin_alloca_with_align_and_max.
1756
3a010afa 17572017-10-17 David Malcolm <dmalcolm@redhat.com>
1758
1759 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1760 rather than NULL to format_warning_va.
1761 (check_format_types): Likewise when calling format_type_warning.
1762 Remove code to extract source_ranges and source_range * in favor
1763 of just a location_t.
1764 (format_type_warning): Convert source_range * param to a
1765 location_t.
1766
a78fcdf9 17672017-10-13 Jakub Jelinek <jakub@redhat.com>
1768
1769 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1770 [LR]SHIFT_EXPR.
1771
74578794 17722017-10-12 David Malcolm <dmalcolm@redhat.com>
1773
1774 * c-common.c (enum missing_token_insertion_kind): New enum.
1775 (get_missing_token_insertion_kind): New function.
1776 (maybe_suggest_missing_token_insertion): New function.
1777 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1778
299a080a 17792017-10-11 Nathan Sidwell <nathan@acm.org>
1780
1781 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1782 (c_common_handle_option): Update incpath_kind names.
1783
93e9d560 17842017-10-11 Martin Liska <mliska@suse.cz>
1785
1786 PR sanitizer/82490
1787 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1788 Wattributes warning.
1789
e3d0f65c 17902017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1791
1792 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1793 operating on trees as wide_ints.
1794 * c-common.c (pointer_int_sum): Likewise.
1795 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1796 * c-warn.c (match_case_to_enum_1): Likewise.
1797 (c_do_switch_warnings): Likewise.
1798 (maybe_warn_shift_overflow): Likewise.
1799
8688bba9 18002017-10-10 Jakub Jelinek <jakub@redhat.com>
1801
1802 PR c/82437
1803 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1804 instead of wide_int::from.
1805
bc64d8a6 18062017-10-06 Jakub Jelinek <jakub@redhat.com>
1807
1808 PR c/82437
1809 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1810 using to_widest use wide_int with the larger of the two precisions.
1811
ce4c2def 18122017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1813
1814 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1815 functions.
1816
cb7bca5f 18172017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1818
1819 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1820 when combining the original unconverted comparison operands.
1821
db967b08 18222017-09-29 Jakub Jelinek <jakub@redhat.com>
1823
1824 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1825 attribute.
1826
f5bdf6da 18272017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1828
1829 * c-ada-spec.c (to_ada_name): Add index parameter.
1830 (pp_ada_tree_identifier): Likewise.
1831 (dump_ada_macros): Adjust call to to_ada_name.
1832 (struct overloaded_name_hash): New type.
1833 (struct overloaded_name_hasher): Likewise.
1834 (overloaded_names): New hash table.
1835 (compute_overloading_index): New function.
1836 (dump_ada_decl_name): Call it and pass the result to
1837 pp_ada_tree_identifier.
1838 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1839 (dump_ada_function_declaration): Likewise.
1840 (dump_generic_ada_node): Likewise.
1841 (print_constructor): Likewise.
1842 (print_destructor): Likewise.
1843 (dump_ada_specs): Delete overloaded_names table.
1844
7fa43da2 18452017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1846
1847 * c-ada-spec.c (max_ada_macros): Move around.
1848 (store_ada_macro_index): Likewise.
1849 (source_file): Rename into...
1850 (macro_source_file): ...this.
1851 (count_ada_macro): Move around.
1852 (store_ada_macro): Likewise.
1853 (compare_macro): Likewise.
1854 (print_ada_macros): Merge in...
1855 (dump_ada_macros): ...this.
1856 (source_file_base): Rename into...
1857 (current_source_file): ...this.
1858 (print_comment): Move around.
1859 (dump_ada_nodes): Call dump_ada_declaration directly.
1860 (struct with): Change type of limited field to bool.
1861 (append_withs): Change type of limited_access parameter to bool.
1862 (pp_ada_tree_identifie): Likewise.
1863 (dump_ada_decl_nam): Likewise.
1864 (dump_generic_ada_node): Likewise. Do not print the return type.
1865 (to_ada_name): Change type of space_found parameter to bool.
1866 (dump_ada_function_declaration): Return void and change type of
1867 parameters to bool. Also print the return type for a function.
1868 (print_ada_methods): Rename into...
1869 (dump_ada_methods): ...this.
1870 (print_ada_declaration): Rename into ...
1871 (dump_ada_declaration): ...this. Do not print the return type.
1872 (print_ada_struct_decl): Rename into...
1873 (dump_ada_struct_decl): ...this.
1874
52f26f82 18752017-09-29 Jakub Jelinek <jakub@redhat.com>
1876
1877 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1878 rather than DECL_INITIAL.
1879 (common_handle_aligned_attribute): Likewise.
1880
a1408eb3 18812017-09-20 Alexandre Oliva <aoliva@redhat.com>
1882
1883 * c.opt (gen-decls): Add RejectNegative.
1884
96bf2948 18852017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1886 Jakub Jelinek <jakub@redhat.com>
1887
1888 Add support for -std=c++2a.
1889 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1890 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1891 * c-opts.c (set_std_cxx2a): New.
1892 (c_common_handle_option): Set options when -std=c++2a is enabled.
1893 (c_common_post_options): Adjust comments.
1894 (set_std_cxx14, set_std_cxx17): Likewise.
1895
a372ea88 18962017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1897
1898 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1899 message for non-uniform endianness and issue a warning in C++.
1900
40e2decb 19012017-09-15 Jakub Jelinek <jakub@redhat.com>
1902
1903 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1904 (Wc++17-compat): Change from undocumented alias to option.
1905 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1906 change C++1z to C++17 in description.
1907 (std=c++1z, std=gnu++1z): Change from option to undocumented
1908 deprecated alias.
1909 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1910 Adjust description.
1911 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1912 * c-opts.c (set_std_cxx1z): Rename to ...
1913 (set_std_cxx17): ... this.
1914 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1915 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
859b51f8 1916 caller.
40e2decb 1917 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1918 comments.
1919
04c83f14 19202017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1921
1922 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1923 function alignment if warn_if_not_aligned_p is true.
1924
daf40ee6 19252017-09-12 Nathan Sidwell <nathan@acm.org>
1926
1927 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1928 resort_sorted_fields): Move to c/c-decl.c.
1929 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1930 (struct sorted_fields_type): Move to c/c-lang.h.
1931
c0cd8832 19322017-09-09 Jonathan Wakely <jwakely@redhat.com>
1933
1934 PR c++/81852
1935 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1936
45d3a9aa 19372017-09-04 Marek Polacek <polacek@redhat.com>
1938
1939 PR c/81783
1940 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1941 (warn_tautological_cmp): Call it.
1942
9b766c33 19432017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1944
1945 * c-opts.c (c_common_finish): Write dependency information even if
1946 there are errors.
1947
1e52a582 19482017-09-01 Jakub Jelinek <jakub@redhat.com>
1949
1950 PR c/81887
1951 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1952 (omp_pragmas_simd): ... here.
1953 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1954 create new clauses list containing just simd clause.
1955
8aec1ebb 19562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1957 Alan Hayward <alan.hayward@arm.com>
1958 David Sherwood <david.sherwood@arm.com>
1959
1960 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1961 into scalar_mode_supported_p call.
1962 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1963
2b8f5b8a 19642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1965 Alan Hayward <alan.hayward@arm.com>
1966 David Sherwood <david.sherwood@arm.com>
1967
1968 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1969 for the mode iterator.
1970
3d2b0034 19712017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1972 Alan Hayward <alan.hayward@arm.com>
1973 David Sherwood <david.sherwood@arm.com>
1974
1975 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1976 * c-common.c (c_build_vec_perm_expr): Likewise.
1977
d082dc6e 19782017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1979 Alan Hayward <alan.hayward@arm.com>
1980 David Sherwood <david.sherwood@arm.com>
1981
1982 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1983
659fb061 19842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1985 Alan Hayward <alan.hayward@arm.com>
1986 David Sherwood <david.sherwood@arm.com>
1987
1988 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1989 before calling targetm.addr_space.valid_pointer_mode.
1990
2b8f2d97 19912017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1992 Alan Hayward <alan.hayward@arm.com>
1993 David Sherwood <david.sherwood@arm.com>
1994
1995 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1996
19a4dce4 19972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
c9e63184 1998 Alan Hayward <alan.hayward@arm.com>
1999 David Sherwood <david.sherwood@arm.com>
19a4dce4 2000
2001 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2002 iterators.
2003 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2004
916ace94 20052017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2006 Alan Hayward <alan.hayward@arm.com>
2007 David Sherwood <david.sherwood@arm.com>
2008
2009 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2010 case statements.
2011
98102386 20122017-08-29 Martin Liska <mliska@suse.cz>
2013
2014 PR other/39851
2015 * c-common.c (parse_optimize_options): Add argument to function
2016 call.
2017 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2018
0bdd7941 20192017-08-24 David Malcolm <dmalcolm@redhat.com>
2020
2021 * c-lex.c (interpret_float): Use token location
2022 when building an EXCESS_PRECISION_EXPR.
2023
a115c319 20242017-08-21 David Malcolm <dmalcolm@redhat.com>
2025
2026 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2027 it to check_function_format.
2028 * c-common.h (check_function_arguments): Add vec<location_t> *
2029 param.
2030 (check_function_format): Likewise.
2031 * c-format.c (struct format_check_context): Add field "arglocs".
2032 (check_function_format): Add param "arglocs"; pass it to
2033 check_format_info.
2034 (check_format_info): Add param "arglocs"; use it to initialize
2035 new field of format_ctx.
2036 (check_format_arg): Pass format_ctx->arglocs to new param of
2037 check_format_info_main.
2038 (class argument_parser): New field "arglocs".
2039 (argument_parser::argument_parser): Add "arglocs_" param and use
2040 it to initialize new field.
2041 (argument_parser::check_argument_type): Pass new arglocs field to
2042 check_format_types.
2043 (check_format_info_main): Add param "arglocs", and use it when
2044 constructing arg_parser.
2045 (check_format_types): Add param "arglocs"; use it if non-NULL when
2046 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2047
4bec7283 20482017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2049
2050 PR c/53037
2051 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2052 (c_common_attribute_table): Add warn_if_not_aligned.
2053 (handle_aligned_attribute): Renamed to ...
2054 (common_handle_aligned_attribute): Remove argument, name, and add
2055 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2056 (handle_aligned_attribute): New.
2057 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2058
9d3c24b9 20592017-08-14 Martin Sebor <msebor@redhat.com>
2060
2061 PR c/81117
2062 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2063 (handle_nonstring_attribute): New function.
2064
c8616982 20652017-08-14 Martin Sebor <msebor@redhat.com>
2066
2067 PR c/81117
2068 * c-format.h (T89_G): New macro.
2069 * c-format.c (local_gcall_ptr_node): New variable.
2070 (init_dynamic_diag_info): Initialize it.
2071
07b8a412 20722017-08-11 Martin Liska <mliska@suse.cz>
2073
2074 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2075 TARGET_SUPPORTS_ALIASES.
2076
3fe34694 20772017-08-10 David Malcolm <dmalcolm@redhat.com>
2078
2079 * c-common.c (c_parse_error): Add rich_location * param, using it
2080 rather implicitly using input_location.
2081 * c-common.h (c_parse_error): Add rich_location * param.
2082
623ee358 20832017-08-09 Marek Polacek <polacek@redhat.com>
2084
2085 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2086 (c_common_truthvalue_conversion): Likewise.
2087 * c-omp.c (c_finish_omp_atomic): Likewise.
2088 * c-common.h (build_binary_op): Update declaration.
2089
30a86690 20902017-08-08 Martin Liska <mliska@suse.cz>
2091
2092 * c-ada-spec.c: Include header files.
2093 * c-ubsan.c: Likewise.
2094 * c-warn.c: Likewise.
2095
b4ae034c 20962017-08-07 Jakub Jelinek <jakub@redhat.com>
2097
2098 PR c/69389
2099 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2100
22dadfd6 21012017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2102
2103 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2104 (print_ada_methods): Likewise.
2105 (print_ada_declaration): Likewise.
2106
1610e7fb 21072017-08-07 Martin Liska <mliska@suse.cz>
2108
2109 * array-notation-common.c: Add new includes.
2110 * c-format.c( handle_format_attribute): Canonicalize a format
2111 function name.
2112 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2113 attribute.
2114 * c-pretty-print.c: Add new include.
2115
5ddd2306 21162017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2117
2118 * c-ada-spec.c (has_static_fields): Look only into variables.
2119 (print_constructor): Add TYPE parameter and use it for the name.
2120 (print_destructor): Likewise.
2121 (print_ada_declaration): Adjust to new constructor/destructor names.
2122 Adjust calls to print_constructor and print_destructor.
2123 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2124 Look only into variables in the final loop.
2125
e2252c91 21262017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2127
2128 * c-ada-spec.c (has_static_fields): Look only into fields.
2129 (dump_generic_ada_node): Small tweak.
2130 (dump_nested_types): Look only into fields.
2131 (print_ada_declaration): Look only into methods. Small tweak.
2132 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2133
636174dc 21342017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2135
2136 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2137 (dump_ada_function_declaration): Likewise.
2138 (dump_generic_ada_node): Likewise.
2139 (print_ada_declaration): Add support for const-qualified variables.
2140
dadc219c 21412017-07-31 Martin Liska <mliska@suse.cz>
2142
2143 PR sanitize/81530
2144 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2145 Guard condition with flag_sanitize_p also with current_function_decl
2146 non-null equality.
2147 (ubsan_maybe_instrument_reference_or_call): Likewise.
2148
5eb639c2 21492017-07-30 Uros Bizjak <ubizjak@gmail.com>
2150
2151 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2152
934a9503 21532017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2154
2155 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2156 for enumeral types.
2157 (print_ada_declaration): Add missing guard for record types.
2158
df930a61 21592017-07-27 Jakub Jelinek <jakub@redhat.com>
2160
2161 PR c/45784
2162 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2163 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2164 new COMPOUND_EXPRs around the rhs of the comparison.
2165
7d4d7ecb 21662017-07-27 Marek Polacek <polacek@redhat.com>
2167
2168 PR c/81417
2169 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2170 the types.
2171
280ce47d 21722017-07-27 Jakub Jelinek <jakub@redhat.com>
2173
2174 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2175 (handle_noipa_attribute): New function.
2176
e6c4532a 21772017-07-07 Torsten Duwe <duwe@suse.de>
2178
2179 * c-attribs.c (c_common_attribute_table): Add entry for
2180 "patchable_function_entry".
2181
ab87ee8f 21822017-07-20 Nathan Sidwell <nathan@acm.org>
2183
2184 Remove TYPE_METHODS.
2185 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2186 dump_ada_template, print_ada_methods,
2187 print_ada_declaration): Member fns are on TYPE_FIELDS.
2188
a8de6c92 21892017-07-18 Nathan Sidwell <nathan@acm.org>
2190
2191 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2192
7f9c8569 21932017-07-14 David Malcolm <dmalcolm@redhat.com>
2194
2195 * c-common.c (try_to_locate_new_include_insertion_point): New
2196 function.
2197 (per_file_includes_t): New typedef.
2198 (added_includes_t): New typedef.
2199 (added_includes): New variable.
2200 (maybe_add_include_fixit): New function.
2201 * c-common.h (maybe_add_include_fixit): New decl.
2202
b1b5fc9c 22032017-07-10 Martin Sebor <msebor@redhat.com>
2204
2205 PR other/81345
2206 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2207
7051d239 22082017-07-06 David Malcolm <dmalcolm@redhat.com>
2209
2210 * c-common.c (selftest::c_family_tests): New.
2211 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2212 (selftest::c_family_tests): New decl.
2213
c18b3f9b 22142017-07-04 Marek Polacek <polacek@redhat.com>
2215
2216 PR c/81231
2217 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2218 types.
2219
a2de34d4 22202017-07-04 Marek Polacek <polacek@redhat.com>
2221
2222 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2223
72db0954 22242017-06-28 Martin Liska <mliska@suse.cz>
2225
2226 PR ipa/81128
2227 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2228 to a function declaration.
2229
52368c34 22302017-06-28 Martin Liska <mliska@suse.cz>
2231
2232 PR driver/79659
2233 * c.opt: Add IntegerRange to various options.
2234
2bfb0686 22352017-06-26 Marek Polacek <polacek@redhat.com>
2236
2237 PR c/80116
2238 * c-common.h (warn_for_multistatement_macros): Declare.
2239 * c-warn.c: Include "c-family/c-indentation.h".
2240 (warn_for_multistatement_macros): New function.
2241 * c.opt (Wmultistatement-macros): New option.
2242 * c-indentation.c (guard_tinfo_to_string): No longer static.
2243 Change the parameter type to "enum rid". Handle RID_SWITCH.
2244 * c-indentation.h (guard_tinfo_to_string): Declare.
2245
4e551c7d 22462017-06-23 Marc Glisse <marc.glisse@inria.fr>
2247
2248 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2249
a324786b 22502017-06-15 Martin Sebor <msebor@redhat.com>
2251
2252 PR c++/80560
2253 * c.opt (-Wclass-memaccess): New option.
2254
b4bbadc1 22552017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2256
2257 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2258
314b4196 22592017-06-13 Marek Polacek <polacek@redhat.com>
2260
2261 PR objc/80949
2262 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2263 branches is null.
2264
9917317a 22652017-06-13 Martin Liska <mliska@suse.cz>
2266
2267 PR sanitize/78204
2268 * c-attribs.c (add_no_sanitize_value): New function.
2269 (handle_no_sanitize_attribute): Likewise.
2270 (handle_no_sanitize_address_attribute): Use the function.
2271 (handle_no_sanitize_thread_attribute): New function.
2272 (handle_no_address_safety_analysis_attribute): Use
2273 add_no_sanitize_value.
2274 (handle_no_sanitize_undefined_attribute): Likewise.
2275 * c-common.h: Declare new functions.
2276 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2277 (ubsan_instrument_shift): Likewise.
2278 (ubsan_instrument_bounds): Likewise.
2279 (ubsan_maybe_instrument_array_ref): Likewise.
2280 (ubsan_maybe_instrument_reference_or_call): Likewise.
2281
e34c848a 22822017-06-11 Jason Merrill <jason@redhat.com>
2283
2284 * c-ada-spec.c, c-pragma.c: Use id_equal.
2285
f8897e74 22862017-06-04 Marek Polacek <polacek@redhat.com>
2287
2288 PR c/80919
2289 * c-format.c (matching_type_p): Return false if any of the types
2290 requires structural equality.
2291
a977cac9 22922017-06-02 Martin Sebor <msebor@redhat.com>
2293
2294 PR c/80892
2295 * c-warn.c (conversion_warning): Use -Wconversion for integer
2296 conversion and -Wfloat-conversion for floating one.
2297
0ca70bfd 22982017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2299
2300 * c.opt (Wsizeof-pointer-div): New warning option.
2301
6cf2f0b6 23022017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2303
2304 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2305 (Wcatch-value=1): Enable by -Wall.
2306
4d1eda3a 23072017-05-30 David Malcolm <dmalcolm@redhat.com>
2308
2309 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2310 format_chars.
2311 * c.opt (fdiagnostics-show-template-tree): New option.
2312 (felide-type): New option.
2313
6c547211 23142017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2315
2316 * c.opt (Wcatch-value=): New C++ warning flag.
2317
5570d275 23182017-05-24 Nathan Sidwell <nathan@acm.org>
2319
2320 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2321 const casts to avoid warning.
2322
645b0f8d 23232017-05-24 Martin Sebor <msebor@redhat.com>
2324
2325 PR c/80731
2326 * c-common.h (unsafe_conversion_p): Add a function argument.
2327 * c-common.c (unsafe_conversion_p): Same.
2328 Add type names and values to diagnostics.
2329 (scalar_to_vector): Adjust.
2330 * c-warn.c (constant_expression_error): Add a function argument.
2331 Add type names and values to diagnostics.
2332 (conversion_warning): Add a function argument.
2333 Add type names and values to diagnostics.
2334 (warnings_for_convert_and_check): Same.
2335
65fb3b5b 23362017-05-19 Jason Merrill <jason@redhat.com>
2337
2338 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2339 enumerators.
2340
5407f1e9 23412017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2342
2343 * c-format.c (locus): Move out of function scope,
2344 add GTY attribute.
2345
0fa326f5 23462017-05-19 Nathan Sidwell <nathan@acm.org>
2347
2348 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2349 (c_common_parse_file): Remove class dump handling.
2350 (get_dump_info): Likewise.
2351
195b31a0 23522017-05-19 Richard Biener <rguenther@suse.de>
2353
2354 PR c++/80593
2355 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2356 to alias-set zero memory.
2357
1bccae6b 23582017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2359
2360 * c-format.c (local_tree_type_node): Add GTY attribute.
2361
78173203 23622017-05-18 Marek Polacek <polacek@redhat.com>
2363
2364 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2365 (c_common_fixed_point_type_for_size): Likewise.
2366 (c_common_type_for_mode): Likewise.
2367 (shorten_compare): Likewise.
2368 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2369 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2370
2823920b 23712017-05-18 Marek Polacek <polacek@redhat.com>
2372
2373 * c-common.c (self_promoting_args_p): Change the return type to bool.
2374 Use false/true instead of 0/1.
2375 * c-common.h (self_promoting_args_p): Update.
2376
72749341 23772017-05-17 Marek Polacek <polacek@redhat.com>
2378
2379 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2380 * c-warn.c: Likewise.
2381
b4d90ee2 23822017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2383
2384 Implement new C++ intrinsics __is_assignable and __is_constructible.
2385 * c-common.c (__is_assignable, __is_constructible): New.
2386 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2387
3f6e5ced 23882017-05-17 Martin Liska <mliska@suse.cz>
2389
2390 * c-common.h: Introduce dump_flags_t type and
2391 use it instead of int type.
2392 * c-gimplify.c (c_genericize): Likewise.
2393 * c-opts.c: Likewise.
2394
d0869ea4 23952017-05-17 Marek Polacek <polacek@redhat.com>
2396
2397 * c-common.c (c_save_expr): Remove.
2398 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2399 * c-common.h (c_save_expr): Remove declaration.
2400
0d7b4486 24012017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2402
2403 PR c/35441
2404 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2405 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2406 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2407 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2408 RDIV_EXPR.
2409 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2410
1a2d3e8e 24112017-05-09 Marek Polacek <polacek@redhat.com>
2412
2413 PR c/80525
2414 * c-warn.c (unwrap_c_maybe_const): New.
2415 (warn_logical_operator): Call it.
2416
cdf05a3f 24172017-05-09 Nathan Sidwell <nathan@acm.org>
2418
2419 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2420 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2421
554efdbb 24222017-05-08 Martin Sebor <msebor@redhat.com>
2423
2424 PR translation/80280
2425 * c-format.h (struct format_flag_spec): Add new member.
2426 (T89_T): New macro.
2427 * c-format.c (local_tree_type_node): New global.
2428 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2429 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2430 (strfmon_flag_specs): Likewise.
2431 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2432 with distinct quoting properties.
2433 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2434 (flag_chars_t::validate): Add argument and handle bad quoting.
2435 (check_format_info_main): Handle quoting problems.
2436 (init_dynamic_diag_info): Simplify.
2437
7344fb00 24382017-05-08 Jason Merrill <jason@redhat.com>
2439
2440 * c-opts.c (c_common_post_options): Update defaults for
2441 flag_abi_version and flag_abi_compat_version.
2442
56b8400f 24432017-05-05 David Malcolm <dmalcolm@redhat.com>
2444
2445 * c-common.c (c_cpp_error): Replace report_diagnostic
2446 with diagnostic_report_diagnostic.
2447
8c41abe8 24482017-05-04 Martin Sebor <msebor@redhat.com>
2449
2450 PR translation/80280
2451 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2452 (handle_weakref_attribute): Same.
2453
a06321ef 24542017-05-03 Nathan Sidwell <nathan@acm.org>
2455
2456 Canonicalize canonical type hashing
2457 * c-common.c (complete_array_type): Use type_hash_canon.
2458
92bc38e7 24592017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2460
c9e63184 2461 PR c++/80038
92bc38e7 2462 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2463 prototype.
2464 (cilk_install_body_pedigree_operations): Likewise.
2465 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2466 detatched.
2467 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2468 (cilk_install_body_pedigree_operations): Likewise.
2469 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2470 unwrapping.
2471
fb8ab1f8 24722017-04-27 Jakub Jelinek <jakub@redhat.com>
2473
2474 PR c++/80534
2475 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2476 flag on non-aggregate element types.
2477
31af80fe 24782017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2479
2480 * c-common.c (c_type_hasher, type_hash_table): Remove.
2481 (c_common_get_alias_set): Remove unreachable code.
2482 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2483
dc993150 24842017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2485
2486 * c.opt (Wextra-semi): New C++ warning flag.
2487
6bac87c3 24882017-04-20 Jakub Jelinek <jakub@redhat.com>
2489
2490 PR middle-end/80423
2491 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2492
7ec2cbc9 24932017-04-18 Jakub Jelinek <jakub@redhat.com>
2494
2495 PR middle-end/79788
2496 PR middle-end/80375
2497 * c-common.c (c_common_type_for_mode): Don't handle
2498 widest_*_literal_type_node here.
2499 c_common_signed_or_unsigned_type): Likewise.
2500 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2501 to *intTI_type_node or *intDI_type_node depending on whether
2502 TImode is supported by the target or not.
2503
65b66772 25042017-04-10 Martin Liska <mliska@suse.cz>
2505
2506 PR sanitizer/80350
2507 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2508 doing an UBSAN check.
2509
2fbe7a32 25102017-04-03 Jonathan Wakely <jwakely@redhat.com>
2511
2512 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2513
3ddb3278 25142017-03-31 Jakub Jelinek <jakub@redhat.com>
2515
2516 PR c++/79572
2517 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2518 tree *.
2519 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2520 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2521 REFERENCE_TYPE.
2522
9511b9de 25232017-03-31 David Malcolm <dmalcolm@redhat.com>
2524
2525 PR documentation/78732
2526 * c.opt (Wendif-labels): Fix description to refer to
2527 #else rather than #elif.
2528
ca2af7df 25292017-03-31 Jakub Jelinek <jakub@redhat.com>
2530
2531 PR libstdc++/80251
2532 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2533 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2534
3385a573 25352017-03-27 Jakub Jelinek <jakub@redhat.com>
2536
2537 PR middle-end/80162
2538 * c-common.c (c_common_mark_addressable_vec): Don't set
2539 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2540
da7a26fc 25412017-03-21 Martin Sebor <msebor@redhat.com>
2542
2543 PR c++/79548
2544 * c-common.c (set_underlying_type): Mark type used only when
2545 original del is declared unused.
2546
ca1f4c7a 25472017-03-10 David Malcolm <dmalcolm@redhat.com>
2548
2549 PR translation/79848
2550 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2551 "%qs".
2552
3b496eb9 25532017-03-10 David Malcolm <dmalcolm@redhat.com>
2554
2555 PR c/79921
2556 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2557 from inform's message, so that xgettext can locate it.
2558
6a9c24a0 25592017-03-09 Marek Polacek <polacek@redhat.com>
2560
2561 PR c++/79962
2562 PR c++/79984
2563 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2564 conversion to the attribute list.
2565
5383272d 25662017-03-09 Martin Liska <mliska@suse.cz>
2567
2568 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2569
957a727b 25702017-03-03 Jason Merrill <jason@redhat.com>
2571
2572 * c.opt (Wnoexcept-type): New.
2573
b977a7e3 25742017-03-02 Richard Biener <rguenther@suse.de>
2575
2576 PR c/79756
2577 * c-common.c (c_common_mark_addressable_vec): Look through
2578 C_MAYBE_CONST_EXPR.
2579
78adba87 25802017-02-28 Martin Liska <mliska@suse.cz>
2581
2582 * c.opt: Replace space with tabular for options of <number>
2583 type.
2584
6ac368bb 25852017-02-28 Martin Liska <mliska@suse.cz>
2586
2587 * c.opt: Fix --help=option -Q for options which are of
2588 an enum type.
2589
bbd5521e 25902017-02-24 Jakub Jelinek <jakub@redhat.com>
2591
2592 PR c++/79588
2593 * c-common.c (check_function_restrict): New function.
2594 (check_function_arguments): Add FNDECL argument. Call
2595 check_function_restrict if -Wrestrict.
2596 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2597 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2598 * c-common.h (check_function_arguments): Add FNDECL argument.
2599 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2600
e967bbfd 26012017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2602
2603 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2604 treatment of parameters with pointer-to-tagged type and tidy up.
2605 (print_ada_methods): Remove the special treatment of C++ static member
2606 functions.
2607
52ccf715 26082017-02-22 Martin Liska <mliska@suse.cz>
2609
2610 * c.opt: Replace inequality signs with square brackets
2611 for -Wnornalized.
2612
a42e4e13 26132017-02-21 Jakub Jelinek <jakub@redhat.com>
2614
2615 PR c++/79641
2616 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2617 preserve quals.
2618
f6202e1a 26192017-02-17 Joseph Myers <joseph@codesourcery.com>
2620
2621 * c-cppbuiltin.c (builtin_define_float_constants): Define
2622 __DECIMAL_DIG__ to the value for long double.
2623
0396f790 26242017-02-15 Marek Polacek <polacek@redhat.com>
2625
2626 PR c/79515
2627 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2628 conversion has occured.
2629
175e0d6b 26302017-01-24 David Malcolm <dmalcolm@redhat.com>
2631
2632 * c-common.c (c_common_reswords): Add "__RTL".
2633 * c-common.h (enum rid): Add RID_RTL.
2634
3ef7eab1 26352017-01-20 Marek Polacek <polacek@redhat.com>
2636
2637 PR c/64279
2638 * c-common.h (do_warn_duplicated_branches_r): Declare.
2639 * c-gimplify.c (c_genericize): Walk the function tree calling
2640 do_warn_duplicated_branches_r.
2641 * c-warn.c (expr_from_macro_expansion_r): New.
2642 (do_warn_duplicated_branches): New.
2643 (do_warn_duplicated_branches_r): New.
2644 * c.opt (Wduplicated-branches): New option.
2645
32641de7 26462017-01-17 David Malcolm <dmalcolm@redhat.com>
2647
2648 PR c++/71497
2649 * c-indentation.c (warn_for_misleading_indentation): Use the past
2650 subjunctive in the note.
2651
7e66f344 26522017-01-17 Aldy Hernandez <aldyh@redhat.com>
2653
2654 PR c/79116
2655 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2656 start type to integer_type.
2657
14234f77 26582017-01-16 Jakub Jelinek <jakub@redhat.com>
2659
2660 PR driver/49726
2661 * c.opt (gen-decls): Add Driver flag.
2662
ba5a0dd7 26632017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2664
2665 Revert:
2666 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2667
2668 PR c++/71737
2669 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2670
231589de 26712017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2672
2673 PR c++/71737
2674 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2675
78cf39ca 26762017-01-12 Martin Sebor <msebor@redhat.com>
2677
2678 (-Wformat-overflow): ...to this.
2679
1a1ce9a6 26802017-01-11 Martin Sebor <msebor@redhat.com>
2681
2682 PR c/78768
2683 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2684 Also enable for LTO.
2685
3386344d 26862017-01-10 Jason Merrill <jason@redhat.com>
2687
2688 Implement P0195R2, C++17 variadic using.
2689 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2690
d0abd9e0 26912017-01-09 Jakub Jelinek <jakub@redhat.com>
2692
2693 PR translation/79019
2694 PR translation/79020
2695 * c.opt (Wnormalized=): Fix typo in description.
2696
aba01341 26972017-01-08 Martin Sebor <msebor@redhat.com>
2698
2699 PR middle-end/77708
2700 * c.opt (-Wformat-truncation): New option.
2701
2792c2c7 27022017-01-06 Alexandre Oliva <aoliva@redhat.com>
2703
2704 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2705 value to unsigned short to fit in 4 hex digits without
2706 warnings.
2707
3389a464 27082017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2709
2710 * c.opt (fsso-struct): Add 'native' value.
2711
f6deeb21 27122017-01-05 Martin Liska <mliska@suse.cz>
2713
2714 PR pch/78970
2715 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2716 header.
2717
6124217c 27182017-01-04 Marek Polacek <polacek@redhat.com>
2719
2720 PR c++/64767
2721 * c.opt (Wpointer-compare): New option.
2722
48284845 27232017-01-04 Jakub Jelinek <jakub@redhat.com>
2724
2725 PR driver/78957
2726 * c.opt (fsso-struct=): Add RejectNegative.
2727
aad93da1 27282017-01-01 Jakub Jelinek <jakub@redhat.com>
2729
2730 Update copyright years.
2731
7dbe2449 27322016-12-29 Martin Liska <mliska@suse.cz>
2733
2734 PR c/78933
2735 * c.opt (strong-eval-order): Add RejectNegative keyword.
2736
23ea3d01 27372016-12-22 Jason Merrill <jason@redhat.com>
2738
2739 Implement P0522R0, matching of template template arguments.
2740 * c-cppbuiltin.c (c_cpp_builtins): Define
2741 __cpp_template_template_args.
2742
184fac50 27432016-12-21 Jakub Jelinek <jakub@redhat.com>
2744
2745 PR bootstrap/78817
2746 * c-common.c (struct nonnull_arg_ctx): New type.
2747 (check_function_nonnull): Return bool instead of void. Use
2748 nonnull_arg_ctx as context rather than just location_t.
2749 (check_nonnull_arg): Adjust for the new context type, set
2750 warned_p to true if a warning has been diagnosed.
2751 (check_function_arguments): Return bool instead of void.
2752 * c-common.h (check_function_arguments): Adjust prototype.
2753
7806e079 27542016-12-21 Jason Merrill <jason@redhat.com>
2755
2756 * c.opt (-fnew-ttp-matching): New flag.
2757 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2758
4954efd4 27592016-12-14 Martin Jambor <mjambor@suse.cz>
2760
2761 * c-omp.c: Include omp-general.h instead of omp-low.h.
2762 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2763 name.
2764
5cfa3fc8 27652016-12-14 Martin Sebor <msebor@redhat.com>
2766
2767 PR c/17308
2768 * c-common.c (check_nonnull_arg): Disable when optimization
2769 is enabled.
2770
bbdce47f 27712016-12-12 Marek Polacek <polacek@redhat.com>
2772
2773 PR c++/78647
2774 * c-common.c (attribute_fallthrough_p): Return false for
2775 error_mark_node.
2776
370e45b9 27772016-12-08 Martin Sebor <msebor@redhat.com>
2778
2779 PR c/78284
2780 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2781
3bb246b3 27822016-12-08 Martin Sebor <msebor@redhat.com>
2783
2784 PR c/78165
c9e63184 2785 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2786 suffix.
3bb246b3 2787
5aef8938 27882016-12-07 Martin Sebor <msebor@redhat.com>
2789
2790 PR c/53562
2791 PR middle-end/77784
2792 PR middle-end/78149
2793 PR middle-end/78138
2794 * c.opt (-Wstringop-overflow): New option.
2795
47c3d0de 27962016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2797
2798 * c-attribs.c (asan odr indicator): New attribute.
2799 (handle_asan_odr_indicator_attribute): New function.
2800
c932c990 28012016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2802
2803 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2804 ptrdiff_type_node;
2805
c39beb8a 28062016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2807
2808 * c-common.c (excess_precision_mode_join): New.
2809 (c_ts18661_flt_eval_method): New.
2810 (c_c11_flt_eval_method): Likewise.
2811 (c_flt_eval_method): Likewise.
2812 * c-common.h (excess_precision_mode_join): New.
2813 (c_flt_eval_method): Likewise.
2814 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2815 (cpp_iec_559_value): Call it.
2816 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2817 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2818 __FLT_EVAL_METHOD_TS_18661_3__.
2819
a998ac00 28202016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2821
2822 * c-opts.c (c_common_post_options): Add logic to handle the default
2823 case for -fpermitted-flt-eval-methods.
2824
6e47b422 28252016-11-23 Paolo Bonzini <bonzini@gnu.org>
2826
2827 * c.opt (Wexpansion-to-defined): New.
2828
0d65cc6c 28292016-11-23 Jakub Jelinek <jakub@redhat.com>
2830
2831 PR target/78451
2832 * c-pragma.c (handle_pragma_target): Don't replace
2833 current_target_pragma, but chainon the new args to the current one.
2834
ff6497a3 28352016-11-22 Nathan Sidwell <nathan@acm.org>
2836
2837 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
bacc5324 2838 indentation and formatting.
ff6497a3 2839
13341287 28402016-11-21 Martin Sebor <msebor@redhat.com>
2841
2842 * c.opt (-fprintf-return-value): Enable by default.
2843
f1b3e1c9 28442016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2845
2846 PR c++/71973
2847 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2848 * c-common.c (c_common_nodes_and_builtins): Initialize
2849 const_tm_ptr_type_node.
2850
6c1f90ee 28512016-11-16 Marek Polacek <polacek@redhat.com>
2852
2853 PR c/78285
2854 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2855
a49621cf 28562016-11-14 Jakub Jelinek <jakub@redhat.com>
2857
2858 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2859
b1f04d34 28602016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
a49621cf 2861 Richard Biener <rguenther@suse.de>
2862
2863 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2864 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2865 * c.opt (fgimple): New option.
b1f04d34 2866
9b8f3aa1 28672016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2868
2869 PR c/35503
2870 * c-common.h (warn_for_restrict): Declare.
2871 * c-warn.c: Include gcc-rich-location.h.
2872 (warn_for_restrict): New function.
2873 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2874 (gcc_cdiag_char_table): Likewise.
2875 (gcc_cxxdiag_char_table): Likewise.
2876 * c.opt (Wrestrict): New option.
2877
7907d43b 28782016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2879
2880 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2881 for nested types only if the type is a record or union and dump SLOC.
2882
b1363399 28832016-11-09 Jason Merrill <jason@redhat.com>
2884
2885 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2886
58721d0c 28872016-11-09 Jakub Jelinek <jakub@redhat.com>
2888
2889 * c-ubsan.c (ubsan_instrument_shift): Handle split
2890 -fsanitize=shift-base and -fsanitize=shift-exponent.
2891
2e9e9363 28922016-11-07 Jason Merrill <jason@redhat.com>
2893
2894 * c.opt (Wc++1z-compat): New.
2895 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2896
629b6abc 28972016-11-07 Martin Liska <mliska@suse.cz>
2898
2899 * c-warn.c (warn_for_unused_label): Save all labels used
2900 in goto or in &label.
2901
2f1c4c07 29022016-11-03 Jason Merrill <jason@redhat.com>
2903
2904 * c-cppbuiltin.c (c_cpp_builtins): Correct
2905 __cpp_inheriting_constructors.
2906
7896267d 29072016-11-01 Jason Merrill <jason@redhat.com>
2908
02a9e65f 2909 * c-cppbuiltin.c (c_cpp_builtins): Update
2910 __cpp_inheriting_constructors.
2911
7896267d 2912 * c.opt (-fnew-inheriting-ctors): New.
2913 * c-opts.c: Default to on for ABI 11+.
2914
f6f44a1d 29152016-10-31 Jakub Jelinek <jakub@redhat.com>
2916
2917 PR c++/77948
2918 * c.opt (fext-numeric-literals): Add Var and Init.
2919 * c-opts.c (c_common_handle_option): Don't clear
2920 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2921 (c_common_post_options): Clear it here if not set
2922 explicitly.
2923
d24c4079 29242016-10-28 Aldy Hernandez <aldyh@redhat.com>
2925
2926 PR debug/77773
2927 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2928 if NULL.
2929
6e1b2ffb 29302016-10-25 Jakub Jelinek <jakub@redhat.com>
2931
2932 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2933 * c-common.c (c_common_reswords): Add __builtin_launder.
2934
5f64e688 29352016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2936
2937 * c-common.c (c_common_truthvalue_conversion): Warn for
2938 multiplications in boolean context. Fix the quoting of '<<' and '<'
2939 in the shift warning.
2940
3645e924 29412016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2942
2943 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2944
146cbd63 29452016-10-20 Jason Merrill <jason@redhat.com>
2946
2947 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2948
5c2ba578 29492016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2950
2951 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2952 integer shift ops in boolean context.
2953
29542016-10-18 Aldy Hernandez <aldyh@redhat.com>
da6cf191 2955
2956 * c.opt (Walloca): New.
2957 (Walloca-larger-than=): New.
2958 (Wvla-larger-than=): New.
2959
876d4bc9 29602016-10-17 Marek Polacek <polacek@redhat.com>
2961
2962 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2963 Return immediately when finding a match.
2964 (warn_tautological_cmp): Remove a boolean variable that is no longer
2965 needed.
2966
b0c98c23 29672016-10-17 Marek Polacek <polacek@redhat.com>
2968
2969 * c-attribs.c: New file.
2970 * c-common.c: Move attributes handling to c-attribs.c.
2971 (get_nonnull_operand): No longer static.
2972 * c-common.h: Move the declarations from c-attribs.c to its own section.
2973
2ab6420c 29742016-10-14 Jason Merrill <jason@redhat.com>
2975
2976 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2977 and __cpp_deduction_guides.
2978
81f19d90 29792016-10-13 Jason Merrill <jason@redhat.com>
2980
2981 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2982
ad7b10a2 29832016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2984
2985 * c-cppbuiltin.c: Include memmodel.h.
2986 * c-opts.c: Likewise.
2987 * c-pragma.c: Likewise.
2988 * c-warn.c: Likewise.
2989
12663602 29902016-10-12 Jakub Jelinek <jakub@redhat.com>
2991
2992 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2993 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2994 * c-opts.c (sanitize_cpp_opts): Initialize
2995 cpp_opts->cpp_warn_implicit_fallthrough.
2996
424b2d7d 29972016-10-11 Marek Polacek <polacek@redhat.com>
2998
2999 * c-common.c (warning_candidate_p): Change the return type to bool
3000 and return true/false instead of 1/0.
3001 (vector_mode_valid_p): Likewise.
3002
0f4cea33 30032016-10-11 Marek Polacek <polacek@redhat.com>
3004
3005 * c-common.c (fold_for_warn): No longer static.
3006 (bool_promoted_to_int_p): Likewise.
3007 (c_common_get_narrower): Likewise.
3008 (constant_expression_warning): Move to c-warn.c.
3009 (constant_expression_error): Likewise.
3010 (overflow_warning): Likewise.
3011 (warn_logical_operator): Likewise.
3012 (find_array_ref_with_const_idx_r): Likewise.
3013 (warn_tautological_cmp): Likewise.
3014 (expr_has_boolean_operands_p): Likewise.
3015 (warn_logical_not_parentheses): Likewise.
3016 (warn_if_unused_value): Likewise.
3017 (strict_aliasing_warning): Likewise.
3018 (sizeof_pointer_memaccess_warning): Likewise.
3019 (check_main_parameter_types): Likewise.
3020 (conversion_warning): Likewise.
3021 (warnings_for_convert_and_check): Likewise.
3022 (match_case_to_enum_1): Likewise.
3023 (match_case_to_enum): Likewise.
3024 (c_do_switch_warnings): Likewise.
3025 (warn_for_omitted_condop): Likewise.
3026 (readonly_error): Likewise.
3027 (lvalue_error): Likewise.
3028 (invalid_indirection_error): Likewise.
3029 (warn_array_subscript_with_type_char): Likewise.
3030 (warn_about_parentheses): Likewise.
3031 (warn_for_unused_label): Likewise.
3032 (warn_for_div_by_zero): Likewise.
3033 (warn_for_memset): Likewise.
3034 (warn_for_sign_compare): Likewise.
3035 (do_warn_double_promotion): Likewise.
3036 (do_warn_unused_parameter): Likewise.
3037 (record_locally_defined_typedef): Likewise.
3038 (maybe_record_typedef_use): Likewise.
3039 (maybe_warn_unused_local_typedefs): Likewise.
3040 (maybe_warn_bool_compare): Likewise.
3041 (maybe_warn_shift_overflow): Likewise.
3042 (warn_duplicated_cond_add_or_warn): Likewise.
3043 (diagnose_mismatched_attributes): Likewise.
3044 * c-common.h: Move the declarations from c-warn.c to its own section.
3045 * c-warn.c: New file.
3046
7a7ca07c 30472016-10-08 Jason Merrill <jason@redhat.com>
3048
3049 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3050 into COND_EXPR in C++.
3051
ad0c1dec 30522016-10-08 Jakub Jelinek <jakub@redhat.com>
3053
3054 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3055 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3056 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3057
cd45162d 30582016-10-07 Jakub Jelinek <jakub@redhat.com>
3059
3060 Implement LWG2296 helper intrinsic
3061 * c-common.h (enum rid): Add RID_ADDRESSOF.
3062 * c-common.c (c_common_reswords): Add __builtin_addressof.
3063
0365bfa8 30642016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3065
3066 PR c++/77700
3067 * c-common.c (c_common_truthvalue_conversion): Warn also for
3068 suspicious enum values in boolean context.
3069
adeca879 30702016-10-06 Jakub Jelinek <jakub@redhat.com>
3071
3072 Implement P0258R2 - helper for C++17
3073 std::has_unique_object_representations trait
3074 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3075 * c-common.c (c_common_reswords): Add
3076 __has_unique_object_representations.
3077
c6958264 30782016-10-05 Jakub Jelinek <jakub@redhat.com>
3079
3080 PR sanitizer/66343
3081 * c-ubsan.c (ubsan_instrument_return): Don't call
3082 initialize_sanitizer_builtins here.
3083
2b6903a5 30842016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3085
3086 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3087 conditional expression in boolean context when only one arm is
3088 non-boolean.
3089
5c176ebe 30902016-10-05 Jakub Jelinek <jakub@redhat.com>
3091
c7b01e77 3092 PR sanitizer/77823
3093 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3094 is not integral.
3095
5c176ebe 3096 * c-common.c (c_common_reswords): Update comment for C++11.
3097
492ab670 30982016-10-04 Jason Merrill <jason@redhat.com>
3099
3100 * c-common.c (make_tree_vector_from_ctor): New.
3101 * c-common.h: Declare it.
3102
bc6b11a7 31032016-10-04 Jakub Jelinek <jakub@redhat.com>
3104
3105 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3106 __LIBGCC_JCR_SECTION_NAME__.
3107
255beb07 31082016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3109
3110 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3111 left shift in boolean context.
3112
c5d89bae 31132016-09-29 Jakub Jelinek <jakub@redhat.com>
3114
3115 Implement P0001R1 - C++17 removal of register storage class specifier
3116 * c.opt (Wregister): New warning.
3117 * c-opts.c (c_common_post_options): Enable -Wregister by
3118 default for C++17.
3119
4267ed07 31202016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3121
3122 * c-opts.c (c_common_post_options): Remove special case for
3123 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3124 in C++.
3125
0b72b025 31262016-09-27 Jakub Jelinek <jakub@redhat.com>
3127
4fd4e9e0 3128 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3129 -std=c++1z.
3130
0b72b025 3131 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3132
ea36272b 31332016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3134
3135 * c-common.c: Include memmodel.h.
3136
e997bd3a 31372016-09-26 Marek Polacek <polacek@redhat.com>
3138
3139 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3140
3c77f69c 31412016-09-26 Marek Polacek <polacek@redhat.com>
3142
3143 PR c/7652
3144 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3145 (handle_fallthrough_attribute): New function.
3146 (attribute_fallthrough_p): New function.
3147 * c-common.h (attribute_fallthrough_p): Declare.
3148
481ce481 31492016-09-24 Marek Polacek <polacek@redhat.com>
3150
3151 PR c/77490
3152 * c.opt (Wbool-operation): New.
3153
a5fe0b37 31542016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3155
3156 * c-common.c (c_common_truthvalue_conversion): Inhibit
3157 Wint-in-bool-context warning with from_macro_definition_at.
3158 Mention the expression will always evaluate to true.
3159
90f40f08 31602016-09-21 Martin Sebor <msebor@redhat.com>
3161
3162 PR bootstrap/77676
3163 * c.opt (fprintf-return-value): Temporarily initialize to zero
3164 to unblock bootstrap failures.
3165
98aa0f57 31662016-09-21 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR c++/77651
3169 * c.opt (Waligned-new=): Add RejectNegative.
3170 (faligned-new=): Likewise. Spelling fix - change
3171 aligned_new_threshhold to aligned_new_threshold.
3172 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3173 to aligned_new_threshold.
3174
b9833bfd 31752016-09-20 Martin Sebor <msebor@redhat.com>
3176
3177 PR middle-end/49905
3178 * c.opt: Add -Wformat-length and -fprintf-return-value.
3179
bed03df1 31802016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3181
3182 PR c++/77434
3183 * c.opt (Wint-in-bool-context): New warning.
3184 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3185 constants in boolean context.
3186
9b5c49ef 31872016-09-19 Joseph Myers <joseph@codesourcery.com>
3188
3189 * c-common.c (max_align_t_align): Also consider alignment of
3190 float128_type_node.
3191
cc4b5c58 31922016-09-15 Jason Merrill <jason@redhat.com>
3193
3194 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3195 DECL_EXTERNAL.
3196
ef45c4c0 31972016-09-14 Jason Merrill <jason@redhat.com>
3198
3199 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3200 limit FIELD_DECL, either.
3201
b99cc6da 32022016-09-14 Marek Polacek <polacek@redhat.com>
3203
3204 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3205 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3206 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3207
68ef907c 32082016-09-13 David Malcolm <dmalcolm@redhat.com>
3209
3210 * c-common.c (warn_logical_not_parentheses): Replace
3211 rich_location::add_fixit_insert calls with add_fixit_insert_before
3212 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3213
2c24fd5e 32142016-09-13 Jason Merrill <jason@redhat.com>
3215 Tom de Vries <tom@codesourcery.com>
3216
3217 PR c++/77427
3218 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3219
005248bc 32202016-09-13 Jason Merrill <jason@redhat.com>
3221
3222 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3223 limit types at all.
3224
0c893604 32252016-09-12 Jason Merrill <jason@redhat.com>
3226
3227 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3228 bit/byte confusion, allow large alignment for types.
3229
7a21b590 32302016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3231
3232 PR c++/77496
3233 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3234
00434032 32352016-09-12 David Malcolm <dmalcolm@redhat.com>
3236
3237 PR c/72858
3238 * c-format.c (argument_parser::check_argument_type): Add params
3239 "type_start" and "conversion_char". Use the former to generate
3240 offset_to_type_start and pass it and conversion_char to
3241 check_format_types.
3242 (check_format_info_main): Capture the start of the type
3243 information as "type_start", and pass it an format_char
3244 to arg_parser.check_argument_type.
3245 (check_format_types): Provide an example in the leading comment.
3246 Add params "offset_to_type_start" and "conversion_char"; pass
3247 them to format_type_warning calls.
3248 (test_get_modifier_for_format_len): Likewise.
3249 (matching_type_p): New function.
3250 (get_format_for_type): Add param "conversion_char" and move
3251 implementation into...
3252 (get_format_for_type_1): ...new function, called twice.
3253 Use new function matching_type_p rather than checking for
3254 TYPE_CANONICAL equality.
3255 (get_corrected_substring): New function.
3256 (format_type_warning): Provide an example in the leading comment.
3257 Add params "offset_to_type_start" and "conversion_char". Replace
3258 call to get_format_for_type with call to get_corrected_substring
3259 and move rejection of hints for widths/precisions there.
3260 (assert_format_for_type_streq): Add param "conversion_char".
3261 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3262 (test_get_format_for_type_printf): Add conversion chars to the
3263 tests, adding coverage for various combinations of integer
3264 vs double conversions, and for preserving octal and hexadecimal
3265 conversions.
3266 (test_get_format_for_type_scanf): Add conversion chars to the
3267 tests.
3268
3bb45f76 32692016-09-10 Tom de Vries <tom@codesourcery.com>
3270
3271 PR C/71602
3272 * c-common.c (build_va_arg): Handle more strict
3273 targetm.canonical_va_list_type. Replace first argument type error with
3274 assert.
3275
911ea34a 32762016-09-09 Martin Sebor <msebor@redhat.com>
3277
3278 PR c/77520
3279 PR c/77521
3280 * c-format.c (argument_parser::find_format_char_info): Use %qc
3281 format directive unconditionally.
3282
db8ffb40 32832016-09-09 Jason Merrill <jason@redhat.com>
3284
3285 Implement C++17 new of over-aligned types.
3286 * c.opt: Add -faligned-new and -Waligned-new.
3287 * c-common.c (max_align_t_align): Split out from...
3288 (cxx_fundamental_alignment_p): ...here.
3289 * c-common.h: Declare it.
3290 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3291
c5eddaf9 32922016-09-09 Joseph Myers <joseph@codesourcery.com>
3293
3294 * c-cppbuiltin.c (builtin_define_type_width): New function.
3295 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3296 macros.
3297
3da97ff7 32982016-09-07 David Malcolm <dmalcolm@redhat.com>
3299
3300 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3301 a POINTER_TYPE.
3302 (substring_loc::get_location): Move to substring-locations.c,
3303 keeping implementation as...
3304 (c_get_substring_location): New function, from the above, reworked
3305 to use accessors rather than member lookup.
3306 * c-common.h (class substring_loc): Move to substring-locations.h,
3307 replacing with a forward decl.
3308 (c_get_substring_location): New decl.
3309 * c-format.c: Include "substring-locations.h".
3310 (format_warning_va): Move to substring-locations.c.
3311 (format_warning_at_substring): Likewise.
3312
f9b3f702 33132016-09-06 Martin Sebor <msebor@redhat.com>
3314
3315 PR c/77336
3316 * c-format.c (check_function_format): Avoid issuing warnings for
3317 functions unless they call format functions with non-constant
3318 format strings.
3319
4c04bcce 33202016-09-06 Richard Biener <rguenther@suse.de>
3321
3322 PR c/77450
3323 * c-common.c (c_common_mark_addressable_vec): Handle
3324 COMPOUND_LITERAL_EXPR.
3325
8f8828ba 33262016-09-05 Marek Polacek <polacek@redhat.com>
3327
3328 PR c/77423
3329 * c-common.c (bool_promoted_to_int_p): New function.
3330 (expr_has_boolean_operands_p): New function.
3331 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3332 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3333
8ff61e58 33342016-09-04 Tom de Vries <tom@codesourcery.com>
3335
3336 revert:
3337 2016-08-29 Tom de Vries <tom@codesourcery.com>
3338
3339 * c-common.c (build_va_arg): Replace first argument type error
3340 with assert.
3341
0b80c4b2 33422016-09-02 Jakub Jelinek <jakub@redhat.com>
3343
3344 PR c/65467
3345 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3346 (c_finish_omp_for): Reject _Atomic qualified iterators.
3347
33482016-09-01 Martin Sebor <msebor@redhat.com>
b18dea91 3349
3350 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3351 size to guarantee it fits the output of the formatted function
3352 regardless of its arguments.
3353
c7afb782 33542016-09-01 Marek Polacek <polacek@redhat.com>
3355
3356 PR c/7652
3357 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3358 FALLTHRU comments.
3359
f293b7f2 33602016-08-29 Marek Polacek <polacek@redhat.com>
3361
3362 PR c/77292
3363 * c-common.c (warn_logical_not_parentheses): Don't warn for
3364 a comparison or a logical operator.
3365
839e4d28 33662016-08-29 Tom de Vries <tom@codesourcery.com>
3367
3368 * c-common.c (build_va_arg): Fix type comparison assert.
3369
0acb92b8 33702016-08-29 Tom de Vries <tom@codesourcery.com>
3371
3372 * c-common.c (build_va_arg): Replace first argument type error
3373 with assert.
3374
ea2ec8f6 33752016-08-29 Tom de Vries <tom@codesourcery.com>
3376
3377 PR c/77398
3378 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3379 with error_mark_node as va_list instead of with illegal va_list.
3380
c4963714 33812016-08-25 Marek Polacek <polacek@redhat.com>
3382 David Malcolm <dmalcolm@redhat.com>
3383
3384 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3385 * c-common.h (warn_logical_not_parentheses): Update declaration.
3386
364743f3 33872016-08-22 Marek Polacek <polacek@redhat.com>
3388
3389 PR c++/77321
3390 * c-common.c (warn_for_memset): Check type for null.
3391
012f068a 33922016-08-22 Joseph Myers <joseph@codesourcery.com>
3393
be7ed04d 3394 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
012f068a 3395 _FloatNx types for suffixes for built-in functions.
3396
82c85aba 33972016-08-19 Joseph Myers <joseph@codesourcery.com>
3398
3399 PR c/32187
3400 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3401 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3402 (RID_FLOAT128X): New enum rid values.
3403 (CASE_RID_FLOATN_NX): New macro.
3404 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3405 keywords.
3406 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3407 corresponding complex types.
3408 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3409 _FloatNx and corresponding complex types.
3410 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3411 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3412 and _FloatNx types for the widest type for determining
3413 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3414 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3415 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3416 and _FloatNx types.
3417 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3418 constants.
3419 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3420 _FloatNx types.
3421
48a7392b 34222016-08-18 David Malcolm <dmalcolm@redhat.com>
3423
3424 * c-opts.c (c_diagnostic_finalizer): Update for change to
3425 diagnostic_show_locus.
3426
5c8151fa 34272016-08-18 David Malcolm <dmalcolm@redhat.com>
3428
3429 * c-common.c: Include "spellcheck.h".
3430 (cb_get_suggestion): New function.
3431 * c-common.h (cb_get_suggestion): New decl.
3432 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3433 cb_get_suggestion.
3434
26040f06 34352016-08-18 Marek Polacek <polacek@redhat.com>
3436
3437 PR c/71514
3438 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3439 and pointer-to-VLA.
3440
5927e78e 34412016-08-16 David Malcolm <dmalcolm@redhat.com>
3442
3443 PR c/72857
3444 * c-common.c (substring_loc::get_range): Rename to...
3445 (substring_loc::get_location): ...this, converting param from a
3446 source_range * to a location_t *. Call
3447 get_source_location_for_substring rather than
3448 get_source_range_for_substring, and pass in m_caret_idx.
3449 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3450 (substring_loc::get_range): Replace with...
3451 (substring_loc::get_location): ...this.
3452 (substring_loc::set_caret_index): New method.
3453 (substring_loc): Add field m_caret_idx.
3454 * c-format.c (format_warning_va): Update for above changes.
3455 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3456 clashing with type name.
3457 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3458 (check_argument_type): Likewise.
3459 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3460 Use a copy when emitting warnings, setting the caret index from TYPE.
3461
6ce66d38 34622016-08-16 Eric Botcazou <ebotcazou@adacore.com>
a49621cf 3463 Arnaud Charlet <charlet@adacore.com>
6ce66d38 3464
3465 * c-ada-spec.c (dump_number): New function.
3466 (handle_escape_character): Likewise.
3467 (print_ada_macros): Add handling of constant integers and strings.
3468
e3533433 34692016-08-12 Marek Polacek <polacek@redhat.com>
3470
3471 PR c/7652
3472 * c-common.c (scalar_to_vector): Adjust fall through comment.
3473 * c-opts.c (c_common_handle_option): Likewise.
3474 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3475 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3476 fall through comment.
3477 * cilk.c (extract_free_variables): Add FALLTHRU.
3478
0f463aec 34792016-08-10 Jason Merrill <jason@redhat.com>
3480
3481 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3482
80488e20 34832016-08-09 Jason Merrill <jason@redhat.com>
3484
3485 * c-common.c (c_common_attribute_table): vector_size affects type
3486 identity.
3487
a319e7f4 34882016-08-09 Marek Polacek <polacek@redhat.com>
3489
3490 PR c/7652
3491 * c-ada-spec.c (dump_generic_ada_node): Add return.
3492
33603066 34932016-08-09 Jason Merrill <jason@redhat.com>
3494
3495 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3496 C++17 constexpr lambdas.
3497
7af4d06b 34982016-08-08 David Malcolm <dmalcolm@redhat.com>
3499
3500 PR c/64955
3501 * c-common.h (selftest::c_format_c_tests): New declaration.
3502 (selftest::run_c_tests): New declaration.
3503 * c-format.c: Include "selftest.h.
3504 (format_warning_va): Add param "corrected_substring" and use
3505 it to add a replacement fix-it hint.
3506 (format_warning_at_substring): Likewise.
3507 (format_warning_at_char): Update for new param of
3508 format_warning_va.
3509 (argument_parser::check_argument_type): Pass "fki" to
3510 check_format_types.
3511 (check_format_types): Add param "fki" and pass it to
3512 format_type_warning.
3513 (deref_n_times): New function.
3514 (get_modifier_for_format_len): New function.
3515 (selftest::test_get_modifier_for_format_len): New function.
3516 (get_format_for_type): New function.
3517 (format_type_warning): Add param "fki" and use it to attempt
3518 to provide hints for argument types when calling
3519 format_warning_at_substring.
3520 (selftest::get_info): New function.
3521 (selftest::assert_format_for_type_streq): New function.
3522 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3523 (selftest::test_get_format_for_type_printf): New function.
3524 (selftest::test_get_format_for_type_scanf): New function.
3525 (selftest::c_format_c_tests): New function.
3526
d189b094 35272016-08-08 David Malcolm <dmalcolm@redhat.com>
3528
3529 PR c/52952
3530 * c-format.c: Include "diagnostic.h".
3531 (location_column_from_byte_offset): Delete.
3532 (location_from_offset): Delete.
3533 (format_warning_va): New function.
3534 (format_warning_at_substring): New function.
3535 (format_warning_at_char): New function.
3536 (check_format_arg): Capture location of format_tree and pass to
3537 check_format_info_main.
3538 (argument_parser): Add fields "start_of_this_format" and
3539 "format_string_cst".
3540 (flag_chars_t::validate): Add param "format_string_cst". Convert
3541 warning_at call using location_from_offset to call to
3542 format_warning_at_char.
3543 (argument_parser::argument_parser): Add param "format_string_cst_"
3544 and use use it to initialize field "format_string_cst".
3545 Initialize new field "start_of_this_format".
3546 (argument_parser::read_format_flags): Convert warning_at call
3547 using location_from_offset to a call to format_warning_at_char.
3548 (argument_parser::read_any_format_left_precision): Likewise.
3549 (argument_parser::read_any_format_precision): Likewise.
3550 (argument_parser::read_any_other_modifier): Likewise.
3551 (argument_parser::find_format_char_info): Likewise, in three places.
3552 (argument_parser::parse_any_scan_set): Likewise, in one place.
3553 (argument_parser::handle_conversions): Likewise, in two places.
3554 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3555 and use it to make a substring_loc. Pass the latter to
3556 check_format_types.
3557 (check_format_info_main): Add params "fmt_param_loc" and
3558 "format_string_cst". Convert warning_at calls using
3559 location_from_offset to calls to format_warning_at_char. Pass the
3560 new params to the arg_parser ctor. Pass "format_string_cst" to
3561 flag_chars.validate. Pass "fmt_param_loc" to
3562 arg_parser.check_argument_type.
3563 (check_format_types): Convert first param from a location_t
3564 to a const substring_loc & and rename to "fmt_loc". Attempt
3565 to extract the range of the relevant parameter and pass it
3566 to format_type_warning.
3567 (format_type_warning): Convert first param from a location_t
3568 to a const substring_loc & and rename to "fmt_loc". Add
3569 params "param_range" and "type". Replace calls to warning_at
3570 with calls to format_warning_at_substring.
3571
0dae5fef 35722016-08-08 David Malcolm <dmalcolm@redhat.com>
3573
3574 * c-format.c (class flag_chars_t): New class.
3575 (struct length_modifier): New struct.
3576 (class argument_parser): New class.
3577 (flag_chars_t::flag_chars_t): New ctor.
3578 (flag_chars_t::has_char_p): New method.
3579 (flag_chars_t::add_char): New method.
3580 (flag_chars_t::validate): New method.
3581 (flag_chars_t::get_alloc_flag): New method.
3582 (flag_chars_t::assignment_suppression_p): New method.
3583 (argument_parser::argument_parser): New ctor.
3584 (argument_parser::read_any_dollar): New method.
3585 (argument_parser::read_format_flags): New method.
3586 (argument_parser::read_any_format_width): New method.
3587 (argument_parser::read_any_format_left_precision): New method.
3588 (argument_parser::read_any_format_precision): New method.
3589 (argument_parser::handle_alloc_chars): New method.
3590 (argument_parser::read_any_length_modifier): New method.
3591 (argument_parser::read_any_other_modifier): New method.
3592 (argument_parser::find_format_char_info): New method.
3593 (argument_parser::validate_flag_pairs): New method.
3594 (argument_parser::give_y2k_warnings): New method.
3595 (argument_parser::parse_any_scan_set): New method.
3596 (argument_parser::handle_conversions): New method.
3597 (argument_parser::check_argument_type): New method.
3598 (check_format_info_main): Introduce classes argument_parser
3599 and flag_chars_t, moving the code within the loop into methods
3600 of these classes. Make various locals "const".
3601
d4166bdc 36022016-08-05 David Malcolm <dmalcolm@redhat.com>
3603
3604 * c-common.c: Include "substring-locations.h".
3605 (get_cpp_ttype_from_string_type): New function.
3606 (g_string_concat_db): New global.
3607 (substring_loc::get_range): New method.
3608 * c-common.h (g_string_concat_db): New declaration.
3609 (class substring_loc): New class.
3610 * c-lex.c (lex_string): When concatenating strings, capture the
3611 locations of all tokens using a new obstack, and record the
3612 concatenation locations within g_string_concat_db.
3613 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3614 on the ggc-heap.
3615
7648c9c7 36162016-07-29 Marek Polacek <polacek@redhat.com>
3617
8ae70602 3618 PR c/71926
3619 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3620 parentheses warning.
3621
7648c9c7 3622 PR c/71574
3623 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3624
595e387a 36252016-07-28 Martin Liska <mliska@suse.cz>
3626
3627 PR gcov-profile/68025
3628 * c-common.c (handle_no_profile_instrument_function_attribute):
3629
296103aa 36302016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3631
3632 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3633 BITS_PER_UNIT_LOG.
3634
21483ab7 36352016-07-25 Jason Merrill <jason@redhat.com>
3636
3637 PR c++/65970
3638 * c.opt (fconstexpr-loop-limit): New.
3639
0b80c4b2 36402016-07-22 Martin Sebor <msebor@redhat.com>
efa8e86e 3641
3642 PR c++/71675
3643 * c-common.c (resolve_overloaded_builtin): Avoid converting
3644 __atomic_compare_exchange_n return type to that of what its
3645 first argument points to.
3646
59c1507a 36472016-07-22 Uros Bizjak <ubizjak@gmail.com>
3648
3649 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3650 ~(unsigned HOST_WIDE_INT) 0.
3651
45648efe 36522016-07-22 Martin Liska <mliska@suse.cz>
3653
3654 PR gcov-profile/69028
3655 PR gcov-profile/62047
3656 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3657 to the current_function_decl.
3658
0c0f63cb 36592016-07-21 Jason Merrill <jason@redhat.com>
3660
3661 PR c++/65168
3662 * c-common.c (c_common_truthvalue_conversion): Check
3663 c_inhibit_evaluation_warnings for warning about address of
3664 reference.
3665
d208f6e6 36662016-07-20 David Malcolm <dmalcolm@redhat.com>
3667
3668 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3669 const char *.
3670
0238e35e 36712016-07-15 Jason Merrill <jason@redhat.com>
3672
3673 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3674
0dd7db3b 36752016-07-15 Jakub Jelinek <jakub@redhat.com>
3676
3677 PR c/71858
3678 * c-common.h (enum lookup_name_fuzzy_kind): Add
3679 FUZZY_LOOKUP_FUNCTION_NAME.
3680
e59cff35 36812016-07-08 Jason Merrill <jason@redhat.com>
3682
3683 P0145: Refining Expression Order for C++.
3684 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3685 * c-opts.c: Adjust.
3686
faee03ad 36872016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3688
3689 PR c++/71214
3690 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3691
a4dd89cb 36922016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3693
3694 * c-pragma.h (enum pragma_kind): Rename
3695 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3696 users.
3697
b6a4a0f5 36982016-06-29 Richard Biener <rguenther@suse.de>
3699
3700 PR middle-end/71002
3701 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3702
176aa551 37032016-06-24 Jason Merrill <jason@redhat.com>
3704
3705 P0145R2: Refining Expression Order for C++.
3706 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3707 MODIFY_EXPR.
3708
77104764 37092016-06-24 Jakub Jelinek <jakub@redhat.com>
3710
3711 * c-common.c (check_builtin_function_arguments): Require last
3712 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3713 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3714 if the last argument is pointer to enumerated or boolean type.
3715
8469aece 37162016-06-22 David Malcolm <dmalcolm@redhat.com>
3717
3718 PR c/70339
3719 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3720 (lookup_name_fuzzy): New prototype.
3721
bd08c370 37222016-06-21 John David Anglin <danglin@gcc.gnu.org>
3723
3724 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3725
06c75b9a 37262016-06-14 Jason Merrill <jason@redhat.com>
3727
3728 P0145R2: Refining Expression Order for C++.
3729 * c.opt (fargs-in-order): New.
3730 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3731
9720103d 37322016-06-13 Jakub Jelinek <jakub@redhat.com>
3733
12cb8367 3734 PR sanitizer/71498
3735 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3736 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3737
9720103d 3738 PR preprocessor/71183
3739 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3740 to cb_get_source_date_epoch.
3741
8ec29807 37422016-06-10 Jakub Jelinek <jakub@redhat.com>
3743
3744 PR c/68657
3745 * c.opt (Wpsabi): Add Warning flag.
3746
1dc4d519 37472016-06-10 Martin Sebor <msebor@redhat.com>
3748
3749 PR c/71392
be7ed04d 3750 * c-common.c (handle_nonnull_attribute): Accept
1dc4d519 3751 the nonnull attribute in type-generic builtins.
3752
23b101c5 37532016-06-09 Martin Sebor <msebor@redhat.com>
3754
3755 PR c/70883
3756 * c-common.c (builtin_function_validate_nargs): Make text of error
3757 message consistent with others like it.
3758
732905bb 37592016-06-08 Martin Sebor <msebor@redhat.com>
3760 Jakub Jelinek <jakub@redhat.com>
3761
3762 PR c++/70507
3763 PR c/68120
3764 * c-common.c (check_builtin_function_arguments): Handle
3765 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3766
86a5f91c 37672016-06-08 Richard Biener <rguenther@suse.de>
3768
3769 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3770
b032c4dd 37712016-06-07 Richard Biener <rguenther@suse.de>
3772
3773 PR c/61564
3774 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3775 options and warn about others.
3776
dfa5c0d3 37772016-06-01 Eduard Sanou <dhole@openmailbox.org>
3778
3779 * c-common.c (get_source_date_epoch): Rename to
3780 cb_get_source_date_epoch.
3781 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3782 message when the parsing fails. Use error_at instead of fatal_error.
3783 * c-common.h (get_source_date_epoch): Rename to
3784 cb_get_source_date_epoch.
3785 * c-common.h (cb_get_source_date_epoch): Prototype.
3786 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3787 * c-common.h (c_omp_region_type): Remove trailing comma.
3788 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3789 * c-lex.c (c_lex_with_flags): Remove initialization of
3790 pfile->source_date_epoch.
3791
b6431756 37922016-05-30 Jakub Jelinek <jakub@redhat.com>
3793
3794 PR c++/71349
3795 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3796 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3797 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3798 instead of C_OMP_CLAUSE_SPLIT_FOR.
3799
7345b977 38002016-05-24 Richard Biener <rguenther@suse.de>
3801
3802 PR middle-end/70434
3803 PR c/69504
3804 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3805 (convert_vector_to_array_for_subscript): ... this.
3806 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3807 VIEW_CONVERT_EXPR to an array type. Rename to ...
3808 (convert_vector_to_array_for_subscript): ... this.
3809
22a3f7bd 38102016-05-12 Marek Polacek <polacek@redhat.com>
3811
3812 PR c/70756
3813 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3814 size_in_bytes and pass LOC to it.
3815
54c4d22e 38162016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3817
3818 PR c/43651
3819 * c.opt (Wduplicate-decl-specifier): New option.
3820
7f8012a5 38212016-05-11 Marek Polacek <polacek@redhat.com>
3822
3823 PR c++/71024
3824 * c-common.c (diagnose_mismatched_attributes): New function.
3825 * c-common.h (diagnose_mismatched_attributes): Declare.
3826
1d52c456 38272016-05-04 Marek Polacek <polacek@redhat.com>
3828
3829 * c.opt (Wdangling-else): New option.
3830
5d4db8ef 38312016-05-03 Marek Polacek <polacek@redhat.com>
3832
3833 PR c/70859
3834 * c-common.c (builtin_function_validate_nargs): Add location
3835 parameter. Use it.
3836 (check_builtin_function_arguments): Add location and arguments
3837 parameters. Use them.
3838 * c-common.h (check_builtin_function_arguments): Update declaration.
3839
9ae1b28a 38402016-05-03 Richard Biener <rguenther@suse.de>
3841
3842 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3843 allow call args to gimplify to SSA names.
3844
4341e093 38452016-05-03 Marek Polacek <polacek@redhat.com>
3846
3847 * c-common.h (enum c_omp_region_type): Remove stray comma.
3848
b5e88f74 38492016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3850
3851 * c-common.h (enum c_omp_region_type): Define.
3852
ee31dd3d 38532016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3854
3855 * c-common.c (shorten_compare): Use wi::to_wide.
3856
4d0a8bac 38572016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3858
3859 PR middle-end/70626
3860 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3861 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3862 reduction clauses in acc parallel loops.
3863
025dd1e0 38642016-04-29 Marek Polacek <polacek@redhat.com>
3865
3866 PR c/70852
3867 * c-common.c (warn_for_memset): Check domain before accessing it.
3868
eb16928e 38692016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3870
3871 PR/69089
3872 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3873 "aligned" attribute.
3874
ddd2a3d4 38752016-04-28 Jason Merrill <jason@redhat.com>
3876
3877 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3878
e3e8c48c 38792016-04-28 Eduard Sanou <dhole@openmailbox.org>
3880 Matthias Klose <doko@debian.org>
3881
3882 * c-common.c (get_source_date_epoch): New function, gets the environment
859b51f8 3883 variable SOURCE_DATE_EPOCH and parses it as long long with error
e3e8c48c 3884 handling.
3885 * c-common.h (get_source_date_epoch): Prototype.
3886 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3887
605a4556 38882015-04-27 Ryan Burn <contact@rnburn.com>
3889
3890 PR c++/69024
3891 PR c++/68997
3892 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3893 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3894 external linkage.
3895 (cilk_detect_and_unwrap): Corresponding changes.
3896 (extract_free_variables): Don't extract free variables from
3897 AGGR_INIT_EXPR slot.
3898 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3899 (cilk_recognize_spawn): Likewise.
3900
40385231 39012016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3902
3903 * c.opt (Wmemset-elt-size): New option.
3904 * c-common.c (warn_for_memset): New function.
3905 * c-common.h (warn_for_memset): Declare.
3906
f5d49c14 39072016-04-25 Jason Merrill <jason@redhat.com>
3908
3909 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3910 No longer static.
3911 * c-common.h: Declare it.
3912 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3913
9c980ab5 39142016-04-22 Jason Merrill <jason@redhat.com>
3915
3916 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3917
70574e60 39182016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3919
3920 PR c++/69363
3921 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3922 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3923
5d4b30ea 39242016-04-18 Michael Matz <matz@suse.de>
3925
3926 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3927 and SET_DECL_ALIGN.
3928
021ad2f3 39292016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3930
3931 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3932 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3933 to incomplete types.
3934 (dump_nested_type): Remove redundant tests and tidy up.
3935 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3936 a type which is the typedef of an original type.
3937
926f9422 39382016-04-15 Marek Polacek <polacek@redhat.com>
3939
3940 PR c/70651
3941 * c-common.c (build_va_arg): Change two asserts into errors and return
3942 error_mark_node.
3943
92c53257 39442016-04-13 Marek Polacek <polacek@redhat.com>
3945
3946 PR c++/70639
3947 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3948 for switch statements, too.
3949
a3ae889f 39502016-03-28 Jason Merrill <jason@redhat.com>
3951
3952 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3953
62d2a6dc 39542016-03-23 Marek Polacek <polacek@redhat.com>
3955
3956 PR c++/69884
3957 * c.opt (Wignored-attributes): New option.
3958
4baec9f2 39592016-03-22 David Malcolm <dmalcolm@redhat.com>
3960
3961 PR c/69993
3962 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3963 diagnostic text, reversing the order of the warning and note so
3964 that they appear in source order.
3965
92e7ab1e 39662016-03-17 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/69407
3969 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3970 operations.
3971
6f895832 39722016-03-14 Jason Merrill <jason@redhat.com>
3973
14c36b14 3974 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3975
6f895832 3976 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3977
42bb3bfb 39782016-03-09 Richard Biener <rguenther@suse.de>
3979
3980 PR c/70143
3981 * c-common.c (strict_aliasing_warning): Add back
3982 alias_sets_conflict_p check.
3983
3556aa80 39842016-03-08 Jason Merrill <jason@redhat.com>
3985
3986 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3987
0060768a 39882016-03-04 David Malcolm <dmalcolm@redhat.com>
3989
3990 PR c/68187
3991 * c-indentation.c (get_visual_column): Move code to determine next
3992 tab stop to...
3993 (next_tab_stop): ...this new function.
3994 (line_contains_hash_if): Delete function.
3995 (detect_preprocessor_logic): Delete function.
3996 (get_first_nws_vis_column): New function.
3997 (detect_intervening_unindent): New function.
3998 (should_warn_for_misleading_indentation): Replace call to
3999 detect_preprocessor_logic with a call to
4000 detect_intervening_unindent.
4001
74c6fd40 40022016-03-04 David Malcolm <dmalcolm@redhat.com>
4003
4004 PR c/68187
4005 * c-indentation.c (should_warn_for_misleading_indentation): When
4006 suppressing warnings about cases where the guard and body are on
4007 the same column, only use the first non-whitespace column in place
4008 of the guard token column when dealing with "else" clauses.
4009 When rejecting aligned BODY and NEXT, loosen the requirement
4010 from equality with the first non-whitespace of guard to simply
4011 that they not be indented relative to it.
4012
e692d332 40132016-03-04 Richard Biener <rguenther@suse.de>
4014
4015 PR c++/70054
4016 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4017 instead of alias_sets_conflict_p.
4018
12cc1225 40192016-03-01 Marek Polacek <polacek@redhat.com>
4020
4021 PR c++/69795
4022 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4023 any DECL.
4024
8c38d887 40252016-02-22 Martin Sebor <msebor@redhat.com>
4026
4027 PR middle-end/69780
4028 * c-common.c (check_builtin_function_arguments): Validate and
4029 reject invalid arguments to __builtin_alloca_with_align.
4030
e53f41d5 40312016-02-20 Mark Wielaard <mjw@redhat.com>
4032
4033 PR c/28901
4034 * c.opt (Wunused-const-variable): Turn into Alias for...
4035 (Wunused-const-variable=): New option.
4036
9cce8384 40372016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4038
4039 PR c++/69865
4040 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4041 here...
4042 (c_common_init_options): ...to here.
4043 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4044
563d5cb8 40452016-02-19 Jakub Jelinek <jakub@redhat.com>
4046
4047 PR c++/69826
4048 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4049 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4050 flag_preprocess_only.
4051
7675e968 40522016-02-16 Jakub Jelinek <jakub@redhat.com>
4053
4054 PR c/69835
4055 * c.opt (Wnonnull-compare): Enable for -Wall.
4056
77454e6e 40572016-02-15 Jakub Jelinek <jakub@redhat.com>
4058
4059 PR c++/69797
4060 * c-common.c (sync_resolve_size): Diagnose too few arguments
4061 even when params is non-NULL empty vector.
4062
600695e0 40632016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4064
4065 PR target/60410
4066 * c.opt (fshort-double): Remove.
4067
a7cc1f94 40682016-02-05 Martin Sebor <msebor@redhat.com>
4069
4070 PR c++/69662
4071 * c.opt (Warning options): Update -Wplacement-new to take
4072 an optional argument.
4073
6f13b088 40742016-02-01 Jakub Jelinek <jakub@redhat.com>
4075
4076 PR preprocessor/69543
4077 PR c/69558
4078 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4079 instead of loc to control_warning_option.
4080
948eee2f 40812016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4082
4083 * c.opt (fopenacc-dim=): New option.
4084
5fa82c11 40852016-01-27 Ryan Burn <contact@rnburn.com>
4086
4087 PR cilkplus/69267
4088 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4089 gimplify_arg. Removed superfluous post_p argument.
4090 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4091 superfluous post_p argument.
4092 * c-gimplify.c (c_gimplify_expr): Likewise.
4093
3752e5b1 40942016-01-26 David Malcolm <dmalcolm@redhat.com>
4095
4096 PR other/69006
4097 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4098 pp_newline_and_flush with pp_flush.
4099
bbbbe8ab 41002016-01-20 Martin Sebor <msebor@redhat.com>
4101
4102 PR c/69405
4103 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4104 an incompatible argument when the argument isn't a valid tree node.
4105
f6dfb86a 41062016-01-18 Jason Merrill <jason@redhat.com>
4107
4108 PR c++/68767
4109 * c-common.c (check_function_arguments_recurse): Fold the whole
4110 COND_EXPR, not just the condition.
4111
f672c103 41122016-01-18 Tom de Vries <tom@codesourcery.com>
4113
4114 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4115 classify as loop clause.
4116
c8ef893c 41172016-01-15 Jakub Jelinek <jakub@redhat.com>
4118
4119 PR bootstrap/68271
4120 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4121 C++ FE no longer has limit on number of pragmas.
4122
41232015-01-14 Ryan Burn <contact@rnburn.com>
7d600da5 4124
4125 PR c++/69048
4126 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
580357e7 4127 to add missing cleanup point.
7d600da5 4128
a7ed4583 41292016-01-14 David Malcolm <dmalcolm@redhat.com>
4130
4131 PR c++/68819
4132 * c-indentation.c (get_visual_column): Add location_t param.
4133 Handle the column number being zero by effectively disabling the
4134 warning, with an "inform".
4135 (should_warn_for_misleading_indentation): Add location_t argument
4136 for all uses of get_visual_column.
4137
b933e511 41382016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4139
4140 PR c++/69029
4141 * c-indentation.c (should_warn_for_misleading_indentation):
4142 Don't warn about do-while statements.
4143
517906ff 41442016-01-07 Martin Sebor <msebor@redhat.com>
4145
4146 PR c/68966
4147 * c-common.c (sync_resolve_size): Reject first argument when it's
4148 a pointer to _Bool.
4149
d42aa619 41502016-01-05 David Malcolm <dmalcolm@redhat.com>
4151
4152 PR c/69122
4153 * c-indentation.c (get_visual_column): Remove default argument.
4154 (should_warn_for_misleading_indentation): For the multiline case,
4155 update call to get_visual_column for next_stmt_exploc so that it
4156 captures the location of the first non-whitespace character in the
4157 relevant line. Don't issue warnings if there is non-whitespace
4158 before the next statement.
4159
f1717362 41602016-01-04 Jakub Jelinek <jakub@redhat.com>
4161
4162 Update copyright years.
4163
c0bf500c 41642015-12-21 David Malcolm <dmalcolm@redhat.com>
4165
4166 * c-common.c (binary_op_error): Convert first param from
4167 location_t to rich_location * and use it when emitting an error.
4168 * c-common.h (binary_op_error): Convert first param from
4169 location_t to rich_location *.
4170
dbd79382 41712015-12-16 David Malcolm <dmalcolm@redhat.com>
4172
4173 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4174 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4175
c0998828 41762015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4177
4178 * c-common.c (c_common_attribute_table): Handle "omp declare target
4179 link" attribute.
4180
7ca909c6 41812015-12-14 Jakub Jelinek <jakub@redhat.com>
4182
4183 PR c/68833
4184 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4185
d9102cbe 41862014-12-12 Tobias Burnus <burnus@net-b.de>
4187
4188 PR fortran/68815
4189 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4190 specifiers (%d, %i,%u and %c).
4191
a515ebdf 41922015-12-10 David Malcolm <dmalcolm@redhat.com>
4193
4194 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4195
31ba81bd 41962015-12-08 Jakub Jelinek <jakub@redhat.com>
4197
4198 PR c/48088
4199 PR c/68657
4200 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4201 * c-pragma.c (handle_pragma_diagnostic): Adjust
4202 control_warning_option caller.
4203
d0f713f4 42042015-12-07 David Malcolm <dmalcolm@redhat.com>
4205
4206 * c-common.c (c_cpp_error): Update for change to
4207 rich_location::set_range.
4208
32d050b5 42092015-12-04 Paolo Bonzini <bonzini@gnu.org>
4210
4211 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4212 shifting 1 out of the sign bit.
4213
42142015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4215
4216 * c-common.c (c_common_attribute_table[]): Update max arguments
4217 count for "simd" attribute.
4218 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4219
6a8fbd7a 42202015-12-03 Jakub Jelinek <jakub@redhat.com>
4221
4222 PR preprocessor/57580
4223 * c-ppoutput.c (print): Change printed field to bool.
4224 Move src_file last for smaller padding.
4225 (init_pp_output): Set print.printed to false instead of 0.
4226 (scan_translation_unit): Fix up formatting. Set print.printed
4227 to true after printing something other than newline.
4228 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4229 (maybe_print_line_1): Set print.printed to false instead of 0.
4230 (print_line_1): Likewise.
4231 (do_line_change): Set print.printed to true instead of 1.
4232 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4233 dump_macro): Set print.printed to false after printing newline.
4234
da562e32 42352015-12-02 Jason Merrill <jason@redhat.com>
4236
9c691dbd 4237 * c-common.c (fold_for_warn): New.
4238 (warn_logical_operator, warn_tautological_cmp)
4239 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4240
da562e32 4241 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4242 (c_fully_fold_internal, decl_constant_value_for_optimization):
4243 Move to c/c-fold.c.
4244 * c-common.h: Don't declare decl_constant_value_for_optimization.
4245
89f16034 42462015-12-02 Joseph Myers <joseph@codesourcery.com>
4247
4248 PR c/68162
4249 * c-common.h (c_build_qualified_type): Add extra default
4250 arguments.
4251
571b3486 42522015-12-01 Julian Brown <julian@codesourcery.com>
4253 Cesar Philippidis <cesar@codesourcery.com>
4254 James Norris <James_Norris@mentor.com>
4255
4256 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4257 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4258 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4259
ed92a461 42602015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4261
4262 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4263 (decl_sloc_common): Delete and move bulk of processing to...
4264 (decl_sloc): ...here.
4265 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4266 (dump_ada_double_name): Remove S parameter and compute the suffix.
4267 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4268 element type and deal with an anonymous one.
4269 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4270 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4271 and remove reference to QUAL_UNION_TYPE.
4272 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4273 (dump_nested_type): ...here. New function extracted from above.
4274 Generate a full declaration for anonymous element type of arrays.
4275 (print_ada_declaration): Really skip anonymous declarations. Remove
4276 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4277 Clean up processing of declarations of array types and objects.
4278 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4279 Remove obsolete code and tidy up.
4280
c25b3e3f 42812015-11-29 Jan Hubicka <hubicka@ucw.cz>
4282
4283 PR c/67581
4284 * c-common.c (handle_transparent_union_attribute): Update
4285 also type variants.
4286
d4e328e9 42872015-11-27 Martin Liska <mliska@suse.cz>
4288
4289 PR c++/68312
4290 * array-notation-common.c (cilkplus_extract_an_triplets):
4291 Release vector of vectors.
4292 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4293
f63d9c4e 42942015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4295
4296 PR c++/68527
4297 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4298 (print_ada_struct_decl): Likewise.
4299
8d63c601 43002015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4301
4302 PR c++/68001
4303 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4304 * cilk.c (recognize_spawn): Determine location in a more precise
4305 way.
4306
01f11119 43072015-11-19 Jason Merrill <jason@redhat.com>
4308
4309 * c-common.c (shorten_compare): But look through macros from
4310 system headers.
4311
2d3d3af7 43122015-11-18 Jason Merrill <jason@redhat.com>
4313
4314 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4315 non-constant operand comes from a macro.
4316
7991eeee 43172015-11-17 Jason Merrill <jason@redhat.com>
4318
4319 PR bootstrap/68346
4320 * c-common.c (warn_tautological_cmp): Fold before checking for
4321 constants.
4322
73f67931 43232015-11-16 Marek Polacek <polacek@redhat.com>
4324
4325 PR c++/68362
4326 * c-common.c (check_case_bounds): Fold low and high cases.
4327
8e539fdc 43282015-11-16 Marek Polacek <polacek@redhat.com>
4329
4330 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4331 * c-common.c (c_common_get_alias_set): Likewise.
4332 (handle_visibility_attribute): Likewise.
4333
c58a4cfd 43342015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4335
4336 * c-common.c (handle_simd_attribute): New.
4337 (struct attribute_spec): Add entry for "simd".
4338 (handle_simd_attribute): New.
4339
bb036391 43402015-11-13 Kai Tietz <ktietz70@googlemail.com>
4341
4342 * c-lex.c (interpret_float): Use fold_convert.
4343
a96cefb2 43442015-11-13 David Malcolm <dmalcolm@redhat.com>
4345
4346 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4347 and store it on the result.
4348 * c-opts.c (c_common_init_options): Set
4349 global_dc->colorize_source_p.
4350
2fc5e987 43512015-11-12 James Norris <jnorris@codesourcery.com>
4352 Joseph Myers <joseph@codesourcery.com>
4353
859b51f8 4354 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
2fc5e987 4355 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4356 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4357 PRAGMA_OACC_CLAUSE_LINK.
4358
81b1b2a8 43592015-11-11 Marek Polacek <polacek@redhat.com>
4360
4361 PR c/68107
4362 PR c++/68266
4363 * c-common.c (valid_array_size_p): New function.
4364 * c-common.h (valid_array_size_p): Declare.
4365
92a44a68 43662015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4f3707ca 4367
4368 PR bootstrap/68271
4369 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4370
6e803544 43712015-11-11 Andrew MacLeod <amacleod@redhat.com>
4372
4373 * array-notation-common.c: Remove unused header files.
4374 * c-ada-spec.c: Likewise.
4375 * c-cilkplus.c: Likewise.
4376 * c-common.c: Likewise.
4377 * c-cppbuiltin.c: Likewise.
4378 * c-dump.c: Likewise.
4379 * c-format.c: Likewise.
4380 * c-gimplify.c: Likewise.
4381 * c-indentation.c: Likewise.
4382 * c-lex.c: Likewise.
4383 * c-omp.c: Likewise.
4384 * c-opts.c: Likewise.
4385 * c-pch.c: Likewise.
4386 * c-ppoutput.c: Likewise.
4387 * c-pragma.c: Likewise.
4388 * c-pretty-print.c: Likewise.
4389 * c-semantics.c: Likewise.
4390 * c-ubsan.c: Likewise.
4391 * cilk.c: Likewise.
4392 * stub-objc.c: Likewise.
4393
a1b7fe4b 43942015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4395 Cesar Philippidis <cesar@codesourcery.com>
4396 James Norris <jnorris@codesourcery.com>
4397 Julian Brown <julian@codesourcery.com>
4398 Nathan Sidwell <nathan@codesourcery.com>
4399
4400 * c-pragma.c (oacc_pragmas): Add "routine".
4401 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4402
292237f3 44032015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4404
4405 * c-common.c (c_common_attributes): Add scalar_storage_order.
4406 (handle_scalar_storage_order_attribute): New function.
4407 * c-pragma.c (global_sso): New variable.
4408 (maybe_apply_pragma_scalar_storage_order): New function.
4409 (handle_pragma_scalar_storage_order): Likewise.
4410 (init_pragma): Register scalar_storage_order.
4411 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4412 * c.opt (Wscalar-storage-order): New warning.
4413 (fsso-struct=): New option.
4414
b4a4c5fa 44152015-11-08 Martin Sebor <msebor@redhat.com>
4416
4417 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4418
ac677063 44192015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4420
4421 * c-common.c: Don't undef DEF_BUILTIN.
4422
f0479000 44232015-11-06 David Malcolm <dmalcolm@redhat.com>
4424
4425 * c-common.c (c_cpp_error): Convert parameter from location_t to
4426 rich_location *. Eliminate the "column_override" parameter and
4427 the call to diagnostic_override_column.
4428 Update the "done_lexing" clause to set range 0
4429 on the rich_location, rather than overwriting a location_t.
4430 * c-common.h (c_cpp_error): Convert parameter from location_t to
4431 rich_location *. Eliminate the "column_override" parameter.
4432
ef014f95 44332015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4434 Thomas Schwinge <thomas@codesourcery.com>
4435 James Norris <jnorris@codesourcery.com>
4436
4437 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4438 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4439 clauses with parallel and kernels and loops.
4440 * c-pragma.h (enum pragma_omp_clause): Add entries for
4441 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4442 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4443 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4444 INDEPENDENT,SEQ}.
4445 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4446
e520488c 44472015-11-05 Martin Sebor <msebor@redhat.com>
4448
4449 PR c++/67942
4450 * c.opt (-Wplacement-new): New option.
4451
9561765e 44522015-11-05 Jakub Jelinek <jakub@redhat.com>
4453
4454 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4455 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4456 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4457 save_expr or create_tmp_var* if TEST is true.
4458 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4459 Don't call add_stmt here.
4460 (struct c_omp_check_loop_iv_data): New type.
4461 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4462 c_omp_check_loop_iv_exprs): New functions.
4463 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4464 distribute.
4465 (c_omp_declare_simd_clauses_to_numbers): Change
4466 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4467 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4468 from numbers to PARM_DECLs.
4469
5e8689fb 44702015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4471
4472 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4473 flag_checking.
4474
92a44a68 44752015-11-03 Bernd Schmidt <bschmidt@redhat.com>
aeaccb75 4476
4477 PR c++-common/67882
32d050b5 4478 * c-common.h (fold_offsetof_1): Add argument.
4479 * c-common.c (fold_offsetof_1): Diagnose more invalid
aeaccb75 4480 offsetof expressions that reference elements past the end of
4481 an array.
4482
9e10bfb7 44832015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4484 Chung-Lin Tang <cltang@codesourcery.com>
4485
4486 * c-pragma.c (oacc_pragmas): Add "atomic".
4487 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4488
ab50af2a 44892015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4490
4491 * c-common.c (handle_target_clones_attribute): New.
4492 (c_common_attribute_table): Add handle_target_clones_attribute.
4493 (handle_always_inline_attribute): Add check on target_clones attribute.
4494 (handle_target_attribute): Ditto.
4495
4cba6f60 44962015-10-29 Andrew MacLeod <amacleod@redhat.com>
4497
4498 * array-notation-common.c: Reorder #include's and remove duplicates.
4499 * c-ada-spec.c: Likewise.
4500 * c-cilkplus.c: Likewise.
4501 * c-common.c: Likewise.
4502 * c-cppbuiltin.c: Likewise.
4503 * c-dump.c: Likewise.
4504 * c-format.c: Likewise.
4505 * c-gimplify.c: Likewise.
4506 * c-indentation.c: Likewise.
4507 * c-lex.c: Likewise.
4508 * c-omp.c: Likewise.
4509 * c-opts.c: Likewise.
4510 * c-pch.c: Likewise.
4511 * c-ppoutput.c: Likewise.
4512 * c-pragma.c: Likewise.
4513 * c-pretty-print.c: Likewise.
4514 * c-semantics.c: Likewise.
4515 * c-ubsan.c: Likewise.
4516 * cilk.c: Likewise.
4517 * stub-objc.c: Likewise.
4518
f576a2e4 45192015-10-28 Jason Merrill <jason@redhat.com>
4520
4521 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4522
2c4c8725 45232015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4524 James Norris <jnorris@codesourcery.com>
4525 Cesar Philippidis <cesar@codesourcery.com>
4526
4527 PR c/64765
4528 PR c/64880
4529 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4530 * c-omp.c (c_oacc_split_loop_clauses): New function.
4531
8204c077 45322015-10-21 Martin Sebor <msebor@redhat.com>
4533
4534 PR driver/68043
4535 * c.opt: End each sentence that describes an option with a period.
4536
8523243e 45372015-10-20 Marek Polacek <polacek@redhat.com>
4538
4539 * array-notation-common.c (is_cilkplus_vector_p): Define.
4540 * c-common.h (is_cilkplus_vector_p): Declare.
4541
08881cb8 45422015-10-20 Marek Polacek <polacek@redhat.com>
4543
4544 * c.opt (std=gnu++11): Do not describe as experimental.
4545 (std=gnu++14): Likewise.
4546
a36e5e5e 45472015-10-19 Jason Merrill <jason@redhat.com>
4548
4549 * c-cppbuiltin.c (c_cpp_builtins): Define
4550 __cpp_nontype_template_args.
4551
a349de0a 45522015-10-19 Jason Merrill <jason@redhat.com>
4553
4554 * c-cppbuiltin.c (c_cpp_builtins): Define
4555 __cpp_enumerator_attributes, __cpp_fold_expressions,
4556 __cpp_unicode_characters.
4557
43895be5 45582015-10-13 Jakub Jelinek <jakub@redhat.com>
4559 Aldy Hernandez <aldyh@redhat.com>
4560
4561 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4562 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4563 (c_define_builtins): Likewise.
4564 * c-common.h (enum c_omp_clause_split): Add
4565 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4566 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4567 (c_finish_omp_for): Add ORIG_DECLV argument.
4568 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4569 201511 instead of 201307.
4570 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4571 OMP_CRITICAL_CLAUSES to it.
4572 (c_finish_omp_ordered): Add CLAUSES argument, set
4573 OMP_ORDERED_CLAUSES to it.
4574 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4575 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4576 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4577 constructs and new OpenMP 4.5 clauses. Clear
4578 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4579 verification code.
4580 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4581 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4582 (enum pragma_omp_clause): Add
4583 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4584 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4585
20cb53c9 45862015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4587
4588 * c-lex.c (interpret_float): Use real_equal instead of
4589 REAL_VALUES_EQUAL.
4590
6d02e6b2 45912015-10-04 Jason Merrill <jason@redhat.com>
4592
4593 Implement N4514, C++ Extensions for Transactional Memory.
4594 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4595 (c_common_attribute_table): Add transaction_safe_dynamic.
4596 transaction_safe now affects type identity.
4597 (handle_tm_attribute): Handle transaction_safe_dynamic.
4598 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4599 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4600 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4601 (D_TRANSMEM): New.
4602 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4603 * c-pretty-print.c (pp_c_attributes_display): Don't print
4604 transaction_safe in C++.
4605
c0999a5d 46062015-10-02 Marek Polacek <polacek@redhat.com>
4607
4608 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4609
ef17a71a 46102015-10-02 Marek Polacek <polacek@redhat.com>
4611
4612 PR c/64249
4613 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4614 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4615 * c.opt (Wduplicated-cond): New option.
4616
05b84e7b 46172015-10-01 Joseph Myers <joseph@codesourcery.com>
4618
4619 * c.opt (std=c11): Do not describe as experimental.
4620 (std=gnu11): Likewise.
4621 (std=iso9899:2011): Likewise.
4622
e561d5e1 46232015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4624
4625 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4626 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4627
bd4b90d2 46282015-09-25 Marek Polacek <polacek@redhat.com>
4629
4630 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4631 (ubsan_instrument_shift): Likewise.
4632
ac13b2b2 46332015-09-25 Marek Polacek <polacek@redhat.com>
4634
4635 PR sanitizer/64906
4636 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4637
a3c82f4c 46382015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4639
4640 * c-indentation.c (should_warn_for_misleading_indentation):
4641 Compare next_stmt_vis_column with guard_line_first_nws instead
4642 of with guard_line_vis_column.
4643
5eef101d 46442015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4645
4646 PR c/49654
4647 PR c/49655
4648 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4649 options and options not valid for the current language.
4650
60897493 46512015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4652
4653 * c-indentation.c (should_warn_for_misleading_indentation):
4654 Float out and consolidate the calls to get_visual_column that
4655 are passed guard_exploc as an argument. Compare
4656 next_stmt_vis_column with guard_line_first_nws instead of with
4657 body_line_first_nws.
4658
85c93154 46592015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4660
4661 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4662 Wnamespaces): New C++ warnings.
4663
229a58b1 46642015-09-22 Jason Merrill <jason@redhat.com>
4665
4666 * c-common.h (abi_compat_version_crosses): New.
4667 (warn_abi_version): Declare.
4668 * c-common.c: Define it.
4669 * c-opts.c (c_common_post_options): Handle it.
4670 flag_abi_compat_version defaults to 8.
4671
2d2de569 46722015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4673
4674 Complete the implementation of N4230, Nested namespace definition.
4675 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4676 __cpp_nested_namespace_definitions.
4677
2b897e68 46782015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4679
4680 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4681
ed536208 46822015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4683
4684 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4685 when warning.
4686 * c-pragma.h (pragma_lex): Add optional loc argument.
4687
1dc6c44d 46882015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4689
4690 * c-format.c (check_format_arg): Adjust to use common block size in all
4691 object pools.
4692
be812248 46932015-09-15 David Malcolm <dmalcolm@redhat.com>
4694
4695 * c-format.c (location_from_offset): Update for change in
4696 signature of location_get_source_line.
4697 * c-indentation.c (get_visual_column): Likewise.
4698 (line_contains_hash_if): Likewise.
4699
e4cc057f 47002015-09-14 Marek Polacek <polacek@redhat.com>
4701
4702 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4703 setting various warnings.
4704
85f5e2ee 47052015-09-14 Marek Polacek <polacek@redhat.com>
4706
4707 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4708 a negative value.
4709
1bca8cbd 47102015-09-11 Mark Wielaard <mjw@redhat.com>
4711
4712 PR c/28901
4713 * c.opt (Wunused-variable): Option from common.opt.
4714 (Wunused-const-variable): New option.
4715
ee48893a 47162015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4717
4718 PR c++/53184
4719 * c.opt ([Wsubobject-linkage]): Add.
4720
547c6b1f 47212015-09-03 Martin Sebor <msebor@redhat.com>
4722
4723 PR c/66516
4724 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4725 functions.
4726 * c-common.c (reject_gcc_builtin): Define.
4727
7e976b10 47282015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4729
4730 PR middle-end/60586
4731 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4732 prototype.
4733 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4734 cilk_gimplify_call_params_in_spawned_fn.
4735 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4736 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4737 unwrapping.
4738
9e6bcade 47392015-08-25 Marek Polacek <polacek@redhat.com>
4740
4741 PR middle-end/67330
4742 * c-common.c (handle_weak_attribute): Don't check whether the
4743 visibility can be changed here.
4744
af9de21d 47452015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4746
4747 * c-lex.c (c_lex_with_flags): Use explicit locations.
4748
6dc50383 47492015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4750
4751 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4752 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4753
10902624 47542015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4755
4756 PR middle-end/36757
4757 * c-common.c (check_builtin_function_arguments): Add check
4758 for BUILT_IN_SIGNBIT argument.
4759
a03a71ab 47602015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4761
4762 PR c++/67160
4763 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4764 in c++1z mode.
4765
22723c26 47662015-08-17 Marek Polacek <polacek@redhat.com>
4767
4768 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4769 with whitespaces before qualifier names.
4770
f4809955 47712015-08-12 Marek Polacek <polacek@redhat.com>
4772
4773 PR c++/55095
4774 * c-common.c (maybe_warn_shift_overflow): Properly handle
4775 left-shifting 1 into the sign bit.
4776
5463f502 47772015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4778
4779 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4780
56c12fd4 47812015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4782 Braden Obrzut <admin@maniacsvault.net>
4783 Jason Merrill <jason@redhat.com>
4784
4785 Add C++ Concepts TS support.
4786 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4787 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4788 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4789 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4790 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4791 * c.opt (fconcepts): New.
4792
32d050b5 47932015-08-02 Martin Sebor <msebor@redhat.com>
4794
4795 * c.opt (-Wframe-address): New warning option.
4796
17afcef6 47972015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4798
4799 * c-indentation.c (should_warn_for_misleading_indentation):
4800 Improve heuristics.
4801
f95bfdd4 48022015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4803
4804 * c-indentation.c (get_visual_column): Add parameter first_nws,
4805 use it. Update comment documenting the function.
4806 (is_first_nonwhitespace_on_line): Remove.
4807 (should_warn_for_misleading_indentation): Replace usage of
4808 of is_first_nonwhitespace_on_line with get_visual_column.
4809
9255be07 48102015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4811
4812 * c-indentation.h (struct token_indent_info): Define.
4813 (get_token_indent_info): Define.
4814 (warn_for_misleading_information): Declare.
4815 * c-common.h (warn_for_misleading_information): Remove.
4816 * c-identation.c (warn_for_misleading_indentation):
4817 Change declaration to take three token_indent_infos. Adjust
4818 accordingly.
4819 * c-identation.c (should_warn_for_misleading_indentation):
4820 Likewise. Bail out early if the body is a compound statement.
4821 (guard_tinfo_to_string): Define.
4822
e880695c 48232015-07-30 Jason Merrill <jason@redhat.com>
4824
4825 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4826 '*' for reference decay.
4827
f58dd84b 48282015-07-30 Marek Polacek <polacek@redhat.com>
4829
4830 * c-common.c (warn_tautological_cmp): Bail for float types.
4831
d9e4fe27 48322015-07-27 Marek Polacek <polacek@redhat.com>
4833
4834 PR bootstrap/67030
4835 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4836
6784a472 48372015-07-27 Marek Polacek <polacek@redhat.com>
4838
4839 PR c++/66555
4840 PR c/54979
4841 * c-common.c (find_array_ref_with_const_idx_r): New function.
4842 (warn_tautological_cmp): New function.
4843 * c-common.h (warn_tautological_cmp): Declare.
4844 * c.opt (Wtautological-compare): New option.
4845
08034975 48462015-07-23 Marek Polacek <polacek@redhat.com>
4847
4848 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4849 (ubsan_instrument_shift): Likewise.
4850
f6f5e49b 48512015-07-23 Marek Polacek <polacek@redhat.com>
4852
4853 PR sanitizer/66908
4854 * c-ubsan.c: Include gimplify.h.
4855 (ubsan_instrument_division): Unshare OP0 and OP1.
4856 (ubsan_instrument_shift): Likewise.
4857
8d669e79 48582015-07-20 Marek Polacek <polacek@redhat.com>
4859 Richard Sandiford <richard.sandiford@arm.com>
4860
4861 PR c++/55095
4862 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4863 Use EXPR_LOC_OR_LOC.
4864 (maybe_warn_shift_overflow): New function.
4865 * c-common.h (maybe_warn_shift_overflow): Declare.
4866 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4867 * c.opt (Wshift-overflow): New option.
4868
e16712b1 48692015-07-16 Martin Liska <mliska@suse.cz>
4870
4871 * c-format.c (static void check_format_info_main): Use
4872 object_allocator instead of pool_allocator.
4873 (check_format_arg): Likewise.
4874 (check_format_info_main): Likewise.
4875
e51764ad 48762015-07-15 Andrew MacLeod <amacleod@redhat.com>
4877
4878 * c-opts.c: Remove multiline #include comment.
4879
47ae02b7 48802015-07-12 Aldy Hernandez <aldyh@redhat.com>
4881
4882 * c-common.c: Fix double word typos.
4883
ed2b2eb2 48842015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4885
4886 * c-ada-spec.h (cpp_operation): Revert latest change.
4887 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4888 constructors and destructors.
4889
1eacc14a 48902015-07-09 Andrew MacLeod <amacleod@redhat.com>
4891
4892 * c-common.h: Adjust includes for flags.h changes.
4893 * stub-objc.c: Likewise.
47ae02b7 4894
0124237f 48952015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4896
4897 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4898 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4899
386ef929 49002015-07-08 Jakub Jelinek <jakub@redhat.com>
4901
4902 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4903 are to be removed, return NULL rather than original clauses list.
4904
9ef16211 49052015-07-07 Andrew MacLeod <amacleod@redhat.com>
4906
4907 * array-notation-common.c: Adjust includes.
4908 * c-ada-spec.c: Likewise.
4909 * c-cilkplus.c: Likewise.
4910 * c-common.h: Likewise.
4911 * c-cppbuiltin.c: Likewise.
4912 * c-dump.c: Likewise.
4913 * c-format.c: Likewise.
4914 * c-gimplify.c: Likewise.
4915 * c-indentation.c: Likewise.
4916 * c-lex.c: Likewise.
4917 * c-omp.c: Likewise.
4918 * c-opts.c: Likewise.
4919 * c-pch.c: Likewise.
4920 * c-ppoutput.c: Likewise.
4921 * c-pragma.c: Likewise.
4922 * c-pretty-print.c: Likewise.
4923 * c-semantics.c: Likewise.
4924 * c-ubsan.c: Likewise.
4925 * cilk.c: Likewise.
4926 * stub-objc.c: Likewise.
4927
67ede3e4 49282015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4929
4930 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4931 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4932
42af8c2a 49332015-07-01 Jason Merrill <jason@redhat.com>
4934
fa769cc5 4935 * c-common.h (D_CXX11): Rename from D_CXX0X.
4936 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4937 * c-common.c: Adjust.
4938
97e9c847 4939 * c-opts.c (c_common_post_options): Default to C++14.
4940
42af8c2a 4941 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4942
30b1ba42 49432015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4944
4945 Implement N4197 - Adding u8 character literals
32d050b5 4946 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
95858835 4947 CPP_CHAR.
32d050b5 4948 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
95858835 4949 CPP_UTF8CHAR_USERDEF tokens.
32d050b5 4950 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
95858835 4951 and CPP_UTF8CHAR tokens.
4952 (lex_charconst): Treat CPP_UTF8CHAR token.
30b1ba42 4953
0949f227 49542015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4955
4956 PR fortran/66605
4957 * c-common.c (do_warn_unused_parameter): Move here.
4958 * c-common.h (do_warn_unused_parameter): Declare.
4959
be23b16f 49602015-06-29 Marek Polacek <polacek@redhat.com>
4961
4962 PR c/66322
4963 * c-common.c (check_case_bounds): Add bool * parameter. Set
4964 OUTSIDE_RANGE_P.
4965 (c_add_case_label): Add bool * parameter. Pass it down to
4966 check_case_bounds.
4967 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4968 warning here.
4969 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4970 declarations.
4971
6290f0db 49722015-06-27 Marek Polacek <polacek@redhat.com>
4973
4974 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4975 or VECTOR_INTEGER_TYPE_P throughout.
4976 * c-gimplify.c: Likewise.
4977
aa3e402e 49782015-06-26 Marek Polacek <polacek@redhat.com>
4979
4980 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4981 * c-common.c (c_fully_fold_internal): Likewise.
4982 (c_alignof_expr): Likewise.
4983 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4984 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
8204c077 4985 * cilk.c (create_parm_list): Likewise.
aa3e402e 4986
4e81b384 49872015-06-26 Marek Polacek <polacek@redhat.com>
4988
4989 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4990
ec2e0095 49912015-06-25 Andrew MacLeod <amacleod@redhat.com>
4992
4993 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4994 * c-gimplify.c: Likewise.
4995 * c-pragma.c: Likewise.
4996 * c-ubsan.c: Likewise.
4997 * cilk.c: Likewise.
4998
b594087e 49992015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5000
5001 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5002 ggc_hasher.
5003
a3c76fda 50042015-06-25 Andrew MacLeod <amacleod@redhat.com>
5005
5006 * cilk.c: Move calls.h after tm.h in the include chain.
5007
f48c7f4a 50082015-06-25 Marek Polacek <polacek@redhat.com>
5009
5010 * array-notation-common.c: Use VAR_P throughout.
5011 * c-ada-spec.c: Likewise.
5012 * c-common.c: Likewise.
5013 * c-format.c: Likewise.
5014 * c-gimplify.c: Likewise.
5015 * c-omp.c: Likewise.
5016 * c-pragma.c: Likewise.
5017 * c-pretty-print.c: Likewise.
5018 * cilk.c: Likewise.
5019
ce41e81a 50202015-06-25 Marek Polacek <polacek@redhat.com>
5021
5022 * cilk.c (extract_free_variables): Use is_global_var.
5023
de231ec2 50242015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5025
5026 * c-common.c: Don't include target-def.h.
5027
0200602e 50282015-06-23 Marek Polacek <polacek@redhat.com>
5029
5030 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5031 when comparing INTEGER_CSTs.
5032
99838ed7 50332015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5034
5035 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5036 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5037 (dump_ada_template): Skip partially specialized types.
5038
a4f59596 50392015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5040
5041 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5042 swapping.
5043
f2ab3bac 50442015-06-17 Andrew MacLeod <amacleod@redhat.com>
5045
5046 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5047 * c-ada-spec.c: Likewise.
5048 * c-cilkplus.c: Likewise.
5049 * c-common.c: Likewise.
5050 * c-common.h: Likewise.
5051 * c-cppbuiltin.c: Likewise.
5052 * c-dump.c: Likewise.
5053 * c-format.c: Likewise.
5054 * c-gimplify.c: Likewise.
5055 * c-indentation.c: Likewise.
5056 * c-lex.c: Likewise.
5057 * c-omp.c: Likewise.
5058 * c-opts.c: Likewise.
5059 * c-pch.c: Likewise.
5060 * c-ppoutput.c: Likewise.
5061 * c-pragma.c: Likewise.
5062 * c-pretty-print.c: Likewise.
5063 * c-semantics.c: Likewise.
5064 * c-ubsan.c: Likewise.
5065 * cilk.c: Likewise.
5066 * stub-objc.c: Likewise.
5067
db3d1ffc 50682015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5069
5070 PR c++/65168
5071 * c-common.c (c_common_truthvalue_conversion): Warn when
5072 converting an address of a reference to a truth value.
5073
64486212 50742015-06-08 Andrew MacLeod <amacleod@redhat.com>
5075
5076 * array-notation-common.c : Adjust include files.
5077 * c-ada-spec.c : Likewise.
5078 * c-cilkplus.c : Likewise.
5079 * c-common.c : Likewise.
5080 * c-common.h : Likewise.
5081 * c-cppbuiltin.c : Likewise.
5082 * c-dump.c : Likewise.
5083 * c-format.c : Likewise.
5084 * c-gimplify.c : Likewise.
5085 * c-indentation.c : Likewise.
5086 * c-lex.c : Likewise.
5087 * c-omp.c : Likewise.
5088 * c-opts.c : Likewise.
5089 * c-pch.c : Likewise.
5090 * c-ppoutput.c : Likewise.
5091 * c-pragma.c : Likewise.
5092 * c-pretty-print.c : Likewise.
5093 * c-semantics.c : Likewise.
5094 * c-ubsan.c : Likewise.
5095 * cilk.c : Likewise.
5096 * stub-objc.c : Likewise.
5097
6e84ccad 50982015-06-08 Marek Polacek <polacek@redhat.com>
5099
5100 PR c/66415
5101 * c-format.c (location_from_offset): Return LOC if LINE is null.
5102
3a1c9df2 51032015-06-05 Aldy Hernandez <aldyh@redhat.com>
5104
5105 * c-common.h (c_parse_final_cleanups): New prototype.
5106 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5107
32d050b5 51082015-06-04 Sriraman Tallam <tmsriram@google.com>
5109
5110 * c-common.c (noplt): New attribute.
5111 (handle_noplt_attribute): New handler.
5112
f77c0292 51132015-06-04 Andrew MacLeod <amacleod@redhat.com>
5114
5115 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5116 * c-ada-spec.c: Likewise.
5117 * c-cilkplus.c: Likewise.
5118 * c-common.c: Likewise.
5119 * c-common.h: Likewise.
5120 * c-cppbuiltin.c: Likewise.
5121 * c-dump.c: Likewise.
5122 * c-format.c: Likewise.
5123 * c-gimplify.c: Likewise.
5124 * c-indentation.c: Likewise.
5125 * c-lex.c: Likewise.
5126 * c-omp.c: Likewise.
5127 * c-opts.c: Likewise.
5128 * c-pch.c: Likewise.
5129 * c-ppoutput.c: Likewise.
5130 * c-pragma.c: Likewise.
5131 * c-pretty-print.c: Likewise.
5132 * c-semantics.c: Likewise.
5133 * c-ubsan.c: Likewise.
5134 * cilk.c: Likewise.
5135 * stub-objc.c: Likewise.
5136
7c62dfbb 51372015-06-02 David Malcolm <dmalcolm@redhat.com>
5138
5139 PR c/66220:
5140 * c-indentation.c (should_warn_for_misleading_indentation): Use
5141 expand_location rather than expand_location_to_spelling_point.
5142 Don't warn if the guarding statement is more indented than the
5143 next/body stmts.
5144
9af7c176 51452015-06-02 David Malcolm <dmalcolm@redhat.com>
5146
5147 * c-indentation.c (warn_for_misleading_indentation): Bail out
5148 immediately if -Wmisleading-indentation isn't enabled.
5149
eebcf436 51502015-06-01 Martin Liska <mliska@suse.cz>
5151
5152 * c-format.c (check_format_arg):Use new type-based pool allocator.
5153 (check_format_info_main) Likewise.
5154
b0a23e2f 51552015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5156
5157 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5158 (has_nontrivial_methods): Likewise.
5159
63dc1330 51602015-05-25 Marek Polacek <polacek@redhat.com>
5161
5162 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5163
5a4c69dd 51642015-05-22 Marek Polacek <polacek@redhat.com>
5165
5166 PR c/47043
5167 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5168
044580bb 51692015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
3764c94e 5170
5171 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5172 STACK_GROWS_DOWNWARD.
5173
044580bb 51742015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
2b785411 5175
5176 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5177 STACK_GROWS_DOWNWARD rather than if it is defined.
5178
d5a2ddc7 51792015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
8204c077 5180
d5a2ddc7 5181 PR c/52952
5182 * c-format.c (location_column_from_byte_offset): New.
5183 (location_from_offset): New.
5184 (struct format_wanted_type): Add offset_loc field.
5185 (check_format_info): Move handling of location for extra arguments
5186 closer to the point of warning.
5187 (check_format_info_main): Pass the result of location_from_offset
5188 to warning_at.
5189 (format_type_warning): Pass the result of location_from_offset
5190 to warning_at.
5191
72f8014e 51922015-05-20 Marek Polacek <polacek@redhat.com>
5193
5194 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5195
74efe522 51962015-05-20 Marek Polacek <polacek@redhat.com>
5197
5198 * c-ada-spec.c (dump_sloc): Use DECL_P.
5199
b443c459 52002015-05-20 Marek Polacek <polacek@redhat.com>
5201
5202 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5203 * c-common.c: Likewise.
5204
551e34da 52052015-05-19 David Malcolm <dmalcolm@redhat.com>
5206
5207 * c-common.h (fe_file_change): Strengthen param from
5208 const line_map * to const line_map_ordinary *.
5209 (pp_file_change): Likewise.
5210 * c-lex.c (fe_file_change): Likewise.
5211 (cb_define): Use linemap_check_ordinary when invoking
5212 SOURCE_LINE.
5213 (cb_undef): Likewise.
5214 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5215 invoking cb_file_change.
5216 (c_finish_options): Likewise.
5217 (push_command_line_include): Likewise.
5218 (cb_file_change): Strengthen param "new_map" from
5219 const line_map * to const line_map_ordinary *.
5220 * c-ppoutput.c (cb_define): Likewise for local "map".
5221 (pp_file_change): Likewise for param "map" and local "from".
5222
dfcf26a5 52232015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5224
5225 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5226
2e474820 52272015-05-18 Tom de Vries <tom@codesourcery.com>
5228
5229 * c-common.c (build_va_arg_1): New function.
5230 (build_va_arg): Add address operator to va_list operand if necessary.
5231
e53013a8 52322015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5233
5234 PR c/48956
5235 * c-common.c (int_safely_convertible_to_real_p): Define.
5236 (unsafe_conversion_p): Check conversions involving complex types.
5237 (conversion_warning): Add new warning message for conversions which
5238 discard imaginary component.
5239 * c-common.h: (enum conversion_safety): Add new enumerator for such
5240 conversions.
5241
aac24642 52422015-05-14 Marek Polacek <polacek@redhat.com>
5243
5244 PR c/66066
5245 PR c/66127
5246 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5247 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5248 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5249 use it. If FOR_INT_CONST, require that all evaluated operands be
5250 INTEGER_CSTs.
5251
e5f01cba 52522015-05-12 David Malcolm <dmalcolm@redhat.com>
5253
5254 * c-common.h (warn_for_misleading_indentation): New prototype.
5255 * c-indentation.c: New file.
5256 * c.opt (Wmisleading-indentation): New option.
5257
c37be9ec 52582015-05-12 Tom de Vries <tom@codesourcery.com>
5259
5260 PR tree-optimization/66010
5261 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5262
7290114b 52632015-05-09 Jason Merrill <jason@redhat.com>
5264
3c665566 5265 * c-opts.c (c_common_post_options): Also clear
5266 cpp_opts->cpp_warn_cxx11_compat.
5267
d875b9d2 5268 * c-common.h (enum cxx_dialect): Add cxx_unset.
5269 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5270 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5271
7290114b 5272 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5273 (std=gnu++0x): Mark as Undocumented.
5274 (std=gnu++1y): Add deprecated message.
5275
1b03cc89 52762015-05-08 Jason Merrill <jason@redhat.com>
5277
1c5f7aba 5278 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5279 * c-opts.c: Adjust.
5280
1b03cc89 5281 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5282
dc5945dc 52832015-05-08 Marek Polacek <polacek@redhat.com>
5284
5285 PR c/64918
5286 * c.opt (Woverride-init-side-effects): New option.
5287
cdc64059 52882015-05-07 Marek Polacek <polacek@redhat.com>
5289
5290 PR c/65179
5291 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5292 negative value.
5293 * c.opt (Wshift-negative-value): New option.
5294 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5295 when -Wextra and C99/C++11 mode.
5296
8cafe283 52972015-05-07 Marek Polacek <polacek@redhat.com>
5298 Martin Uecker <uecker@eecs.berkeley.edu>
5299
5300 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5301 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5302
cb40a6f7 53032015-05-05 Jason Merrill <jason@redhat.com>
5304
5305 * c.opt (Wterminate): New.
5306
14744a16 53072015-04-30 Marek Polacek <polacek@redhat.com>
5308
5309 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5310 require that the non-constant be of a boolean type.
5311
9866562d 53122015-04-29 Josh Triplett <josh@joshtriplett.org>
5313
8cafe283 5314 * c-common.c (handle_section_attribute): Refactor to reduce
5315 nesting and distinguish between error cases.
9866562d 5316
a720ab1c 53172015-04-29 Marek Polacek <polacek@redhat.com>
5318
5319 PR c/64610
5320 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5321 with 0/1.
5322
8c072e52 53232015-04-29 Jakub Jelinek <jakub@redhat.com>
5324
5325 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5326 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5327 HOST_BITS_PER_WIDE_INT.
5328
f7fec1c7 53292015-04-28 Tom de Vries <tom@codesourcery.com>
5330
5331 PR tree-optimization/65887
5332 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5333
483b3d26 53342015-04-28 Eric Botcazou <ebotcazou@adacore.com>
8cafe283 5335 Pierre-Marie de Rodat <derodat@adacore.com>
483b3d26 5336
5337 * c-ada-spec.c (in_function): Delete.
5338 (dump_generic_ada_node): Do not change in_function and remove the
5339 redundant code dealing with it.
5340 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5341 (print_ada_methods): Output the static member functions in a nested
5342 package after the regular methods as well as associated renamings.
5343
f11bdffb 53442015-04-24 Marek Polacek <polacek@redhat.com>
5345
5346 PR c/65830
5347 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5348 and OPT_Wshift_count_overflow.
5349
485f6b9c 5350 PR c/63357
5351 * c-common.c (warn_logical_operator): Warn if the operands have the
5352 same expressions.
5353
439606a9 53542015-04-24 Marek Polacek <polacek@redhat.com>
5355
5356 PR c/61534
5357 * c-common.c (warn_logical_operator): Bail if either operand comes
5358 from a macro expansion.
5359
de801c28 53602015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5361
5362 PR target/55143
5363 * c-common.c (c_default_pointer_mode): Add definition.
5364 * c-common.h (c_default_pointer_mode): Add declaration.
5365
76738f56 53662015-03-11 Jakub Jelinek <jakub@redhat.com>
5367
5368 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5369 on record_builtin_type argument.
5370
16f958b3 53712015-03-10 Jakub Jelinek <jakub@redhat.com>
5372
5373 PR c/65120
5374 * c-common.c (warn_logical_not_parentheses): Don't warn for
5375 !x == 0 or !x != 0.
5376
9b22f73f 53772015-03-07 Marek Polacek <polacek@redhat.com>
5378
5379 PR sanitizer/65280
5380 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5381 before trying to figure out whether we have a flexible array member.
5382
a864b7d4 53832015-03-06 Eric Botcazou <ebotcazou@adacore.com>
a49621cf 5384 Jonathan Wakely <jwakely.gcc@gmail.com>
a864b7d4 5385
5386 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5387
9bf8c90b 53882015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5389
5390 PR ada/65319
5391 * c-ada-spec.c (print_destructor): Remove obsolete code.
5392
037ac54f 53932015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5394
5395 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5396 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5397 DECL_TEMPLATE_RESULT emulations.
5398 (dump_ada_template)): Add guard for TYPE_METHODS.
5399
495cbfb8 54002015-02-27 Marek Polacek <polacek@redhat.com>
5401
5402 PR c/65040
5403 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5404
688a864e 54052015-02-27 Kai Tietz <ktietz@redhat.com>
5406
5407 PR c/35330
5408 * c-pragma.c (handle_pragma_weak): Do not try to create
5409 weak/alias of declarations not being function, or variable
5410 declarations.
5411
6349b8cc 54122015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5413
5414 PR libgomp/64625
5415 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5416 Remove macros.
5417 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5418
3afd5369 54192015-02-16 Marek Polacek <polacek@redhat.com>
5420
5421 PR c/65066
5422 * c-format.c (check_format_types): Handle null param.
5423
46173d1b 54242015-02-13 Marek Polacek <polacek@redhat.com>
5425
5426 PR c/65040
5427 * c-format.c (check_format_types): Don't warn about different
5428 signedness if the original value is in the range of WANTED_TYPE.
5429
1d524ff7 54302015-02-12 Jason Merrill <jason@redhat.com>
5431
5432 PR c++/64956
5433 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5434 to the current highest version.
5435 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5436
bbf8fbec 54372015-02-04 Jakub Jelinek <jakub@redhat.com>
5438
5439 PR c/64824
5440 PR c/64868
5441 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5442 instead of RDIV_EXPR. Use build_binary_op instead of
5443 build2_loc.
5444
c05be867 54452015-01-30 Joseph Myers <joseph@codesourcery.com>
5446
5447 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5448 to pass input_location as first argument.
5449
85977647 54502015-01-23 Tom de Vries <tom@codesourcery.com>
5451
5452 PR libgomp/64672
5453 * c.opt (fopenacc): Mark as LTO option.
5454
fa175926 54552015-01-23 Tom de Vries <tom@codesourcery.com>
5456
5457 PR libgomp/64707
5458 * c.opt (fopenmp): Mark as LTO option.
5459
20aad5ba 54602015-01-21 Jakub Jelinek <jakub@redhat.com>
5461
5462 PR c/63307
8204c077 5463 * cilk.c (fill_decls_vec): Only put decls into vector v.
20aad5ba 5464 (compare_decls): Fix up formatting.
5465
54662015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5467
5468 PR c/63307
5469 * cilk.c: Include vec.h.
5470 (struct cilk_decls): New structure.
5471 (wrapper_parm_cb): Split this function to...
5472 (fill_decls_vec): ...this...
5473 (create_parm_list): ...and this.
5474 (compare_decls): New function.
5475 (for_local_cb): Remove.
5476 (wrapper_local_cb): Ditto.
5477 (build_wrapper_type): For now first traverse and fill vector of
5478 declarations then sort it and then deal with sorted vector.
5479 (cilk_outline): Ditto.
5480 (declare_one_free_variable): Ditto.
5481
60b77e28 54822015-01-21 Jason Merrill <jason@redhat.com>
5483
5484 PR c++/64629
5485 * c-format.c (check_format_arg): Call decl_constant_value.
5486
85fbea97 54872015-01-19 Martin Liska <mliska@suse.cz>
5488
5489 * c-common.c (handle_noicf_attribute): New function.
5490
ca4c3545 54912015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5492 Bernd Schmidt <bernds@codesourcery.com>
5493 James Norris <jnorris@codesourcery.com>
5494 Cesar Philippidis <cesar@codesourcery.com>
5495 Ilmir Usmanov <i.usmanov@samsung.com>
5496 Jakub Jelinek <jakub@redhat.com>
5497
5498 * c.opt (fopenacc): New option.
5499 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5500 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5501 New macros.
5502 * c-common.h (c_finish_oacc_wait): New prototype.
5503 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5504 (c_finish_oacc_wait): New function.
5505 * c-pragma.c (oacc_pragmas): New variable.
5506 (c_pp_lookup_pragma, init_pragma): Handle it.
5507 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5508 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5509 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5510 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5511 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5512 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5513 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5514 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5515 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5516 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5517 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5518 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5519 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5520 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5521 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5522 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5523 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5524 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5525 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5526 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5527 PRAGMA_OACC_CLAUSE_WORKER.
5528
92a44a68 55292015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
947aa916 5530
5531 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5532 for the new option fstack-protector_explicit.
5533 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5534 (handle_stack_protect_attribute): New function.
5535
92a44a68 55362015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
e4fd7af1 5537
5538 * c.opt: New option -Warray-bounds=.
5539
1f78217c 55402015-01-09 Michael Collison <michael.collison@linaro.org>
5541
5542 * array-notation-common.c: Include hash-set.h, machmode.h,
5543 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5544 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5545 * c-ada-spec.c: Ditto.
5546 * c-cilkplus.c: Ditto.
5547 * c-common.c: Include input.h due to flattening of tree.h.
5548 Define macro GCC_C_COMMON_C.
5549 * c-common.h: Flatten tree.h header files into c-common.h.
5550 Remove include of tree-core.h.
5551 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5552 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5553 fold-const.h, wide-int.h, and inchash.h due to
5554 flattening of tree.h.
5555 * c-dump.c: Ditto.
5556 * c-format.c: Flatten tree.h header files into c-common.h.
5557 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5558 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5559 fold-const.h, wide-int.h, and inchash.h due to
5560 flattening of tree.h.
5561 * c-dump.c: Include hash-set.h, machmode.h,
5562 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5563 fold-const.h, wide-int.h, and inchash.h due to
5564 flattening of tree.h.
5565 * c-format.c: Include hash-set.h, machmode.h,
5566 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5567 fold-const.h, wide-int.h, inchash.h and real.h due to
5568 flattening of tree.h.
5569 * c-gimplify.c: Include hash-set.h, machmode.h,
5570 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5571 fold-const.h, wide-int.h, and inchash.h due to
5572 flattening of tree.h.
5573 * cilk.c: Ditto.
5574 * c-lex.c: Ditto.
5575 * c-omp.c: Ditto.
5576 * c-opts.c: Ditto.
5577 * c-pch.c: Ditto.
5578 * c-ppoutput.c: Ditto.
5579 * c-pragma.c: Ditto.
5580 * c-pretty-print.c: Ditto.
5581 * c-semantics.c: Ditto.
5582 * c-ubsan.c: Ditto.
5583 * stub-objc.c: Ditto.
5584
411b7663 55852015-01-08 Jason Merrill <jason@redhat.com>
5586
5587 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5588 do_ubsan_in_current_function.
5589 (ubsan_maybe_instrument_reference_or_call): Likewise.
5590 * c-ubsan.h: Declare it.
5591
d1e96383 55922015-01-08 Mike Stump <mikestump@comcast.net>
5593
5594 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5595
b57910fa 55962015-01-07 Marek Polacek <polacek@redhat.com>
5597
5598 PR c/64440
5599 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5600 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5601
678a4e3e 56022015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5603
5604 PR c++/31397
5605 * c.opt (Wsuggest-override): New option.
5606
d353bf18 56072015-01-05 Jakub Jelinek <jakub@redhat.com>
5608
5609 Update copyright years.
5610
92b63884 56112015-01-05 Marek Polacek <polacek@redhat.com>
5612
5613 PR c/64423
5614 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5615 parameter. Use it.
5616 * c-common.h (warn_array_subscript_with_type_char): Update
5617 declaration.
5618
83715bc4 56192014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5620
5621 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5622 Control macro with flag_sized_deallocation.
5623
92a44a68 56242014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
8a8211df 5625
5626 * c.opt (Wdiscarded-array-qualifiers): New option.
5627
33058239 56282014-12-19 Jakub Jelinek <jakub@redhat.com>
5629
5630 PR preprocessor/63831
5631 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5632 and __has_cpp_attribute here.
5633 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5634 c_common_has_attribute.
5635 * c-common.h (c_common_has_attribute): New prototype.
5636 * c-lex.c (init_c_lex): Set cb->has_attribute to
5637 c_common_has_attribute instead of cb_has_attribute.
5638 (get_token_no_padding): New function.
5639 (cb_has_attribute): Renamed to ...
5640 (c_common_has_attribute): ... this. No longer static. Use
5641 get_token_no_padding, require ()s, don't build TREE_LIST
5642 unnecessarily, fix up formatting, adjust diagnostics, call
5643 init_attributes.
5644
d1856d2c 56452014-12-15 Jason Merrill <jason@redhat.com>
5646
5647 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5648 (-Wsized-deallocation): New.
5649 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5650 to on in C++14 and up.
5651
4972ed5d 56522014-12-11 Jason Merrill <jason@redhat.com>
5653
7d7fa964 5654 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5655
4972ed5d 5656 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5657 we aren't complaining about VLAs.
5658
5ebccf71 56592014-12-06 Marek Polacek <polacek@redhat.com>
5660
5661 PR tree-optimization/64183
5662 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5663 shift-expression if it is integer_type_node. Use types_compatible_p.
5664
f9e245b2 56652014-11-29 Jakub Jelinek <jakub@redhat.com>
5666
5667 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5668 last argument from create_tmp_var_raw and create_tmp_var calls.
5669 * cilk.c (gimplify_cilk_spawn): Likewise.
5670 * c-omp.c (c_finish_omp_atomic): Likewise.
5671
d2f60593 56722014-11-28 Marek Polacek <polacek@redhat.com>
5673
5674 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5675 instead of unsigned_type_node.
5676
fce2dbd1 56772014-11-28 Marek Polacek <polacek@redhat.com>
5678
5679 PR c/63862
5680 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5681 to op1_utype.
5682 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5683 expression to unsigned_type_node.
5684
3a4a2292 56852014-11-20 Mark Wielaard <mjw@redhat.com>
5686
5687 PR debug/38757
5688 * c-opts.c (set_std_c89): Set lang_hooks.name.
5689 (set_std_c99): Likewise.
5690 (set_std_c11): Likewise.
5691 (set_std_cxx98): Likewise.
5692 (set_std_cxx11): Likewise.
5693 (set_std_cxx14): Likewise.
5694 (set_std_cxx1z): Likewise.
5695
c61ef207 56962014-11-21 Jakub Jelinek <jakub@redhat.com>
5697
5698 PR target/63764
5699 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5700 return type to bool.
c9ed79de 5701 * c-common.c: Include gimple-expr.h.
c61ef207 5702 (convert_vector_to_pointer_for_subscript): Change return type to
5703 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5704 and copy it into a TARGET_EXPR and use that instead of *vecp
5705 directly.
5706
1a91d914 57072014-11-19 David Malcolm <dmalcolm@redhat.com>
5708
5709 Merger of git branch "gimple-classes-v2-option-3".
5710 * ChangeLog.gimple-classes: New.
5711 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5712 from being just a vec<gimple> to a vec<gbind *>.
5713
f8fc8b8e 57142014-11-18 Jakub Jelinek <jakub@redhat.com>
5715
5716 PR sanitizer/63813
5717 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5718 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5719 get_pointer_alignment for non-pointers. Use ptype, or if it is
5720 reference type, corresponding pointer type, as type of kind
5721 argument.
5722 (ubsan_maybe_instrument_reference,
5723 ubsan_maybe_instrument_member_call): Adjust callers.
5724
8315e35e 57252014-11-15 Marek Polacek <polacek@redhat.com>
5726
5727 PR middle-end/63884
5728 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5729 for NULL fndecl.
5730 (extract_array_notation_exprs): Return for NULL node.
5731
86b9f14b 57322014-11-12 Joseph Myers <joseph@codesourcery.com>
5733
5734 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5735 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5736
0c93c8a9 57372014-11-12 Jakub Jelinek <jakub@redhat.com>
5738
5739 PR c/59708
5740 * c-common.c (check_builtin_function_arguments): Handle
5741 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5742
fdd735a7 57432014-11-10 Andi Kleen <ak@linux.intel.com>
5744
5745 PR c/60804
5746 * c-common.h (check_no_cilk): Declare.
5747 * cilk.c (get_error_location): New function.
5748 (check_no_cilk): Dito.
5749
5cb678b4 57502014-11-10 Andi Kleen <ak@linux.intel.com>
5751
5752 * cilk.c (recognize_spawn): Use expression location
5753 for error message.
5754
0feb4de1 57552014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5756
5757 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5758
3aa2fa44 57592014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5760
5761 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5762 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5763 (__cpp_range_based_for, __cpp_initializer_lists,
5764 __cpp_delegating_constructors, __cpp_nsdmi,
5765 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5766 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5767 __has_cpp_attribute.
5768 * c-lex.c (cb_has_attribute): New callback CPP function;
5769 (init_c_lex): Set has_attribute callback.
5770
7fd22aae 57712014-11-04 Richard Biener <rguenther@suse.de>
5772
5773 * c-common.c (shorten_compare): Do not shorten mixed
5774 DFP and non-DFP compares.
5775
4af203ac 57762014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5777
5778 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5779 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5780 Commentary and rearrangement of tests.
5781 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5782 Commentary and rearrangement of tests.
5783 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5784 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5785
3754d046 57862014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5787
5788 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5789 enum from machine_mode.
5790
1140c305 57912014-10-28 Andrew MacLeod <amacleod@redhat.com>
5792
1f78217c 5793 * c-common.c: Adjust include files.
5794 * c-gimplify.c: Ditto.
5795 * cilk.c: Ditto.
5796 * c-pragma.c: Ditto.
5797 * c-ubsan.c: Ditto.
1140c305 5798
94ea8568 57992014-10-27 Andrew MacLeod <amacleod@redhat.com>
5800
5801 * c-gimplify.c: Adjust include files.
5802
32ecf960 58032014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5804
5805 PR c++/53061
5806 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5807 c_common_initialize_diagnostics.
5808 * c-common.h: Likewise.
5809
85fecbe2 58102014-10-24 Marek Polacek <polacek@redhat.com>
5811
5812 PR c/56980
5813 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5814 print "struct"/"union"/"enum" for typedefed names.
5815
e7ec033a 58162014-10-23 Marek Polacek <polacek@redhat.com>
5817
5818 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5819 in unsigned type.
5820
c2598081 58212014-10-22 Jakub Jelinek <jakub@redhat.com>
5822 Yury Gribov <y.gribov@samsung.com>
5823
5824 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5825 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5826 instead of flag_sanitize_recover as bool flag.
5827
acebb7e2 58282014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5829
5830 * cilk.c: Revert previous change.
5831
6115016c 58322014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5833
5834 PR c/63307
5835 * cilk.c: Include vec.h.
5836 (struct cilk_decls): New structure.
5837 (wrapper_parm_cb): Split this function to...
5838 (fill_decls_vec): ...this...
5839 (create_parm_list): ...and this.
5840 (compare_decls): New function.
5841 (for_local_cb): Remove.
5842 (wrapper_local_cb): Ditto.
5843 (build_wrapper_type): For now first traverse and fill vector of
5844 declarations then sort it and then deal with sorted vector.
5845 (cilk_outline): Ditto.
5846 (declare_one_free_variable): Ditto.
5847
e610d2b2 58482014-10-17 Marek Polacek <polacek@redhat.com>
5849
5850 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5851 * c.opt (Wimplicit-int): Initialize to -1.
5852
a3020f2f 58532014-10-16 Andrew MacLeod <amacleod@redhat.com>
5854
5855 * c-pragma.c: Adjust include files.
5856 * c-semantics.c: Likewise.
5857
926ddd2c 58582014-10-16 DJ Delorie <dj@redhat.com>
5859
5860 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5861 multiples of bytes.
5862
b0542e7c 58632014-10-14 Jason Merrill <jason@redhat.com>
5864
5865 PR c++/63455
5866 * c-common.h (CPP_PREPARSED_EXPR): New.
5867 (N_CP_TTYPES): Adjust.
5868
b2601928 58692014-10-15 Marek Polacek <polacek@redhat.com>
5870
5871 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5872
9f75f026 58732014-10-14 DJ Delorie <dj@redhat.com>
5874
5875 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5876 types, not just __int128.
5877 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5878 types, not just __int128.
5879 (cpp_atomic_builtins): Round pointer sizes up.
5880 (type_suffix): Use type precision, not specific types.
5881 * c-common.c (c_common_reswords): Remove __int128 special case.
5882 (c_common_type_for_size): Check for all __intN types, not just
5883 __int128.
5884 (c_common_type_for_mode): Likewise.
5885 (c_common_signed_or_unsigned_type): Likewise.
5886 (c_build_bitfield_integer_type): Likewise.
5887 (c_common_nodes_and_builtins): Likewise.
5888 (keyword_begins_type_specifier): Likewise.
5889 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5890 __intN variants.
5891
2ef51f0e 58922014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5893
5894 * c-common.c: Use hash_table instead of hashtab.
5895
5b8257e3 58962014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5897
1f78217c 5898 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5b8257e3 5899 C++11 section.
5900
5e84569c 59012014-10-03 Marc Glisse <marc.glisse@inria.fr>
5902
5903 PR c++/54427
5904 PR c++/57198
5905 PR c++/58845
5906 * c-common.c (warn_logical_operator): Punt for vectors.
5907
f6751ff2 59082014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5909
5910 Implement SD-6: SG10 Feature Test Recommendations
5911 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5912 macros and the __has_header macro.
5913
c33e051d 59142014-09-30 Jason Merrill <jason@redhat.com>
5915
f76a9aa8 5916 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5917 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5918 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5919
717e52f9 5920 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5921 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5922
c33e051d 5923 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5924 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5925
5213d6c9 59262014-09-24 Marek Polacek <polacek@redhat.com>
5927
5928 PR c/61405
5929 PR c/53874
5930 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5931
6b722052 59322014-09-23 Andi Kleen <ak@linux.intel.com>
5933
5934 * c-common.c (handle_no_reorder_attribute): New function.
5935 (c_common_attribute_table): Add no_reorder attribute.
5936
0cb69d12 59372014-09-22 Joseph Myers <joseph@codesourcery.com>
5938
5939 * c-cppbuiltin.c (c_cpp_builtins): Define
5940 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5941 modes.
5942
168dfbf0 59432014-09-18 Joseph Myers <joseph@codesourcery.com>
5944
5945 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5946 for supported floating-point modes.
5947
b83705f4 59482014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5949
5950 * c.opt (Wpsabi): Use LangEnabledBy.
5951 * c-opts.c (c_common_handle_option): Do not handle here.
5952
d5957f0d 59532014-09-12 Joseph Myers <joseph@codesourcery.com>
5954
5955 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5956 macros for floating-point modes.
5957
bae6edff 59582014-09-11 Marc Glisse <marc.glisse@inria.fr>
5959
5960 PR target/58757
5961 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5962 __*_DENORM_MIN__ without denormals.
5963
73a69d02 59642014-09-10 Jakub Jelinek <jakub@redhat.com>
5965
5966 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5967 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5968 ubsan_create_data callers.
5969 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5970 index is constant or BIT_AND_EXPR with constant mask and is
5971 small enough for the bound.
5972 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5973 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5974
7ff8db31 59752014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5976
5977 * c.opt: Add CppReason to various flags.
5978 (Wdate-time): Re-sort.
5979 * c-common.c: Include c-common.h earlier.
5980 (struct reason_option_codes_t): Delete.
5981 (c_option_controlling_cpp_error): Prefix global type and struct
5982 with cpp_.
5983
bcc1f37e 59842014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5985
5986 * c.opt (Wnormalized): New.
5987 (Wnormalized=): Use Enum and Reject Negative.
5988 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5989
b660d3c6 59902014-09-08 Joseph Myers <joseph@codesourcery.com>
5991
5992 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5993 digits of floating-point modes if -fbuilding-libgcc.
5994
325b8c3c 59952014-09-05 Joseph Myers <joseph@codesourcery.com>
5996
5997 * c-cppbuiltin.c (c_cpp_builtins): Also define
5998 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5999 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6000 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6001 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6002 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6003 __LIBGCC_STACK_GROWS_DOWNWARD__,
6004 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6005 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6006 __LIBGCC_DWARF_FRAME_REGISTERS__,
6007 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6008 __LIBGCC_STACK_POINTER_REGNUM__ and
6009 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6010 (builtin_define_with_value): Handle backslash-escaping in string
6011 macro values.
6012
1e074e77 60132014-09-05 Richard Biener <rguenther@suse.de>
6014
6015 PR middle-end/63148
6016 * c-format.c (check_format_arg): Properly handle
6017 effectively signed POINTER_PLUS_EXPR offset.
6018
04afd878 60192014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6020
6021 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6022 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6023 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6024 and Init.
6025 * c-opts.c (c_common_handle_option): Do not handle here.
6026 (sanitize_cpp_opts): Likewise.
6027 * c-common.c (struct reason_option_codes_t): Handle
6028 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6029
a3f448f0 60302014-09-03 Marek Polacek <polacek@redhat.com>
6031
6032 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6033
40750995 60342014-09-02 Jakub Jelinek <jakub@redhat.com>
6035 Balaji V. Iyer <balaji.v.iyer@intel.com>
6036 Igor Zamyatin <igor.zamyatin@intel.com>
6037
6038 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6039 * c-common.c (c_common_reswords): Added _Cilk_for.
6040 * c-common.h (enum rid): Added RID_CILK_FOR.
6041 (cilk_for_number_of_iterations): Add declaration.
6042 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6043 CILK_FOR.
6044 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6045 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6046
f0fbe519 60472014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6048
6049 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6050 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6051 Wundef): Use CPP, Var and Init.
6052 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6053
a7d2e480 60542014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6055
6056 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6057 * c-opts.c (c_common_handle_option): Do not handle here.
6058
c35e53f1 60592014-08-25 Jason Merrill <jason@redhat.com>
6060
6061 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6062 -std=c++14 and -std=gnu++14, rather than the reverse.
6063 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6064 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6065 * c-common.h (cxx_dialect): Remove cxx1y.
6066
4e454776 60672014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6068
6069 * c-common.h (enum cxx_dialect): Add cxx14.
6070 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6071 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6072 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6073
af1a80f2 60742014-08-22 Jason Merrill <jason@redhat.com>
6075
6076 * c.opt (std=gnu++17): Fix alias.
6077
dc6229e8 60782014-08-22 Marek Polacek <polacek@redhat.com>
6079
6080 PR c++/62199
6081 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6082 check for vector types. Drop LHS argument.
6083 * c-common.h (warn_logical_not_parentheses): Adjust.
6084
ba7f7c88 60852014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6086
6087 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6088 (Wmultichar): Likewise.
6089 (Wdate-time): Use C-family languages instead of Common. Use CPP
6090 and Var.
6091 * c-opts.c (c_common_handle_option): Do not handle the above
6092 options here.
6093 (sanitize_cpp_opts): Likewise.
6094
399d4f80 60952014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6096
6097 PR fortran/44054
6098 * c-opts.c: Include tree-diagnostics.h.
6099 (c_diagnostic_finalizer): New.
6100 (c_common_initialize_diagnostics): Use it.
6101
1babed5f 61022014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6103
6104 PR preprocessor/51303
6105 * c-common.c (struct reason_option_codes_t option_codes):
6106 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6107
3636964b 61082014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6109
6110 PR c/60975
6111 PR c/53063
6112 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6113 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6114 (c_common_post_options): Call init_global_opts_from_cpp.
6115 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6116
78bf4156 61172014-08-19 Marek Polacek <polacek@redhat.com>
6118
6119 PR c++/62153
6120 * c-common.c (maybe_warn_bool_compare): New function.
6121 * c-common.h (maybe_warn_bool_compare): Declare.
6122 * c.opt (Wbool-compare): New option.
6123
508ea33a 61242014-08-19 Marek Polacek <polacek@redhat.com>
6125
6126 * c.opt (Wc99-c11-compat): New option.
6127
806fe15e 61282014-08-19 Marek Polacek <polacek@redhat.com>
6129
6130 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6131 to warn_c90_c99_compat.
6132 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6133 to -1.
6134
6c867de1 61352014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6136 Steven Bosscher <steven@gcc.gnu.org>
6137
6138 PR c/52952
6139 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6140 format_check_results.
6141 (check_function_format): Use true and add comment for boolean
6142 argument.
6143 (finish_dollar_format_checking): Use explicit location when warning.
6144 (check_format_info): Likewise.
6145 (check_format_arg): Set extra_arg_loc and format_string_loc.
6146 (check_format_info_main): Use explicit location when warning.
6147 (check_format_types): Pass explicit location.
6148 (format_type_warning): Likewise.
6149
dc8078a3 61502014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6151
6152 PR fortran/44054
6153 * c-format.c: Handle Fortran flags.
6154
d271ec7e 61552014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6156
6157 PR other/61962
6158 * array-notation-common.c (find_rank): Added handling for other
6159 types of references.
6160
890c2e2f 61612014-08-10 Marek Polacek <polacek@redhat.com>
6162
6163 PR c/51849
6164 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6165 * c.opt (Wc90-c99-compat): Add option.
6166
7149db5f 61672014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6168
6169 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6170
2d2f6a15 61712014-08-03 Marek Polacek <polacek@redhat.com>
6172
6173 * c-common.c (check_case_value): Add location_t parameter. Use it.
6174 (c_add_case_label): Pass loc to check_case_value.
6175
06ecf488 61762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6177
6178 * cilk.c: Use hash_map instead of pointer_map.
6179
431205b7 61802014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6181
6182 * c-gimplify.c: Use hash_set instead of pointer_set.
6183
3394c80c 61842014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6185
6186 PR middle-end/61455
6187 * array-notation-common.c (extract_array_notation_exprs): Handling
6188 of DECL_EXPR added.
6189
392dee1e 61902014-08-01 Jakub Jelinek <jakub@redhat.com>
6191
6192 * c-common.h (min_align_of_type): Removed prototype.
6193 * c-common.c (min_align_of_type): Removed.
6194 * c-ubsan.h (ubsan_maybe_instrument_reference,
6195 ubsan_maybe_instrument_member_call): New prototypes.
6196 * c-ubsan.c: Include stor-layout.h and builtins.h.
6197 (ubsan_maybe_instrument_reference_or_call,
6198 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6199 functions.
6200
f22a2cb7 62012014-07-31 Marc Glisse <marc.glisse@inria.fr>
6202
6203 PR c++/60517
6204 * c.opt (-Wreturn-local-addr): Move to common.opt.
6205
87b0198f 62062014-07-30 Jason Merrill <jason@redhat.com>
6207
6208 PR c++/61659
6209 PR c++/61687
6210 Revert:
6211 * c.opt (-fuse-all-virtuals): New.
6212
74691f46 62132014-07-30 Tom Tromey <tromey@redhat.com>
6214
6215 PR c/59855
6216 * c.opt (Wdesignated-init): New option.
6217 * c-common.c (c_common_attribute_table): Add "designated_init".
6218 (handle_designated_init): New function.
6219
9140d56f 62202014-07-24 Marek Polacek <polacek@redhat.com>
6221
6222 PR c/57653
6223 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6224
a09c5cc2 62252014-07-16 Dodji Seketeli <dodji@redhat.com>
6226
6227 PR preprocessor/60723 - missing system-ness marks for macro tokens
6228 * c-ppoutput.c (struct print::prev_was_system_token): New data
6229 member.
6230 (init_pp_output): Initialize it.
6231 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6232 (do_line_change): Return a flag saying if a line marker was
6233 emitted or not.
6234 (scan_translation_unit): Detect if the system-ness of the token we
6235 are about to emit is different from the one of the previously
6236 emitted token. If so, emit a line marker. Avoid emitting useless
6237 adjacent line markers. Avoid emitting line markers for tokens
6238 originating from the expansion of built-in macros.
6239 (scan_translation_unit_directives_only): Adjust.
6240
2b25b62f 62412014-07-15 Marek Polacek <polacek@redhat.com>
6242
6243 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6244 TYPE_MAX_VALUE is NULL.
6245
305d96bc 62462014-07-14 Jakub Jelinek <jakub@redhat.com>
6247
6248 PR middle-end/61294
6249 * c.opt (Wmemset-transposed-args): New warning.
6250
8ea4660d 62512014-07-10 Jason Merrill <jason@redhat.com>
6252
6253 PR c++/61659
6254 PR c++/61687
6255 * c.opt (-fuse-all-virtuals): New.
6256
cd480f3d 62572014-07-09 Richard Biener <rguenther@suse.de>
6258
6259 PR c-family/61741
6260 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6261 using unsigned arithmetic if overflow does not wrap instead of
6262 if overflow is undefined.
6263
87d59e72 62642014-07-06 Marek Polacek <polacek@redhat.com>
6265
6266 PR c/6940
6267 * c.opt (Wsizeof-array-argument): New option.
6268
d69521d8 62692014-07-03 Jakub Jelinek <jakub@redhat.com>
6270
8204c077 6271 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
d69521d8 6272 comments->count <= 1, as comments->entries might be NULL.
6273
1207866e 62742014-07-01 Marek Polacek <polacek@redhat.com>
6275
6276 * c.opt (Wint-conversion): New option.
6277
7a6bbb76 62782014-07-01 Marek Polacek <polacek@redhat.com>
6279
6280 PR c/58286
6281 * c.opt (Wincompatible-pointer-types): New option.
6282
9d4eeb52 62832014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6284
6285 PR c++/51400
6286 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6287 Do not discard TYPE_QUALS of type.
6288
4b53bc0f 62892014-06-26 Jason Merrill <jason@redhat.com>
6290
6291 * c-common.h (enum cxx_dialect): Add cxx1z.
6292 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6293 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6294
a8a8d4ea 62952014-06-26 Teresa Johnson <tejohnson@google.com>
6296
6297 * c-common.h (get_dump_info): Declare.
6298 * c-gimplify.c (c_genericize): Use saved dump files.
6299 * c-opts.c (c_common_parse_file): Begin and end dumps
6300 once around parsing invocation.
6301 (get_dump_info): New function.
6302
1f6be080 63032014-06-23 Marek Polacek <polacek@redhat.com>
6304 Andrew MacLeod <amacleod@redhat.com>
6305
6306 PR c/61553
6307 * c-common.c (get_atomic_generic_size): Don't segfault if the
6308 type doesn't have a size.
6309
5ef6b660 63102014-06-20 Marek Polacek <polacek@redhat.com>
6311
6312 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6313 (ubsan_walk_array_refs_r): New function.
6314 (c_genericize): Instrument array bounds.
6315 * c-ubsan.c: Include "internal-fn.h".
6316 (ubsan_instrument_division): Mark instrumented arrays as having
6317 side effects. Adjust ubsan_type_descriptor call.
6318 (ubsan_instrument_shift): Likewise.
6319 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6320 (ubsan_instrument_bounds): New function.
6321 (ubsan_array_ref_instrumented_p): New function.
6322 (ubsan_maybe_instrument_array_ref): New function.
6323 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6324 (ubsan_array_ref_instrumented_p): Declare.
6325 (ubsan_maybe_instrument_array_ref): Declare.
6326
63272014-06-20 Hale Wang <hale.wang@arm.com>
3ccd1e6e 6328
6329 PR lto/61123
6330 * c.opt (fshort-enums): Add to LTO.
6331 * c.opt (fshort-wchar): Likewise.
6332
78438f31 63332014-06-16 Marek Polacek <polacek@redhat.com>
6334
6335 PR c/60439
6336 * c.opt (Wswitch-bool): Add Var.
6337
5fddcf34 63382014-06-12 Jakub Jelinek <jakub@redhat.com>
6339
6340 PR middle-end/61486
6341 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6342 #pragma omp target teams or
6343 #pragma omp {,target }teams distribute simd.
6344
74b777e5 63452014-06-12 Jason Merrill <jason@redhat.com>
6346
6347 * c.opt (Wabi=, fabi-compat-version): New.
6348 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6349 (c_common_post_options): Handle flag_abi_compat_version default.
6350 Disallow -fabi-compat-version=1.
6351 * c-common.h (abi_version_crosses): New.
6352
738a6bda 63532014-06-11 Jan Hubicka <hubicka@ucw.cz>
6354
1f78217c 6355 * c-common.c (handle_section_attribute): Update handling for
738a6bda 6356 section names that are no longer trees.
6357
cf5f881f 63582014-06-10 Jakub Jelinek <jakub@redhat.com>
6359
6360 PR fortran/60928
6361 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6362 (omp_pragmas): ... back here.
6363
32dc1512 63642014-06-05 Marek Polacek <polacek@redhat.com>
6365
6366 PR c/49706
6367 * c-common.c (warn_logical_not_parentheses): New function.
6368 * c-common.h (warn_logical_not_parentheses): Declare.
6369 * c.opt (Wlogical-not-parentheses): New option.
6370
f61a9bc2 63712014-06-04 Marek Polacek <polacek@redhat.com>
6372
6373 PR c/30020
6374 * c-common.c (check_case_bounds): Add location parameter.
6375 Use it.
6376 (c_add_case_label): Pass loc to check_case_bounds.
6377
c69ec07d 63782014-06-03 Marek Polacek <polacek@redhat.com>
6379
6380 PR c/60439
6381 * c.opt (Wswitch-bool): New option.
6382
3c77ca67 63832014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6384
68a2c870 6385 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6386 Remove prototypes.
6387 (record_types_used_by_current_var_decl): Move prototype to where
6388 it belongs.
6389
3c77ca67 6390 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6391 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6392 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6393
3ab4693e 63942014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6395
6396 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6397 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6398 void_zero_node.
6399 * c-pretty-print.c (pp_c_void_constant): New function.
6400 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6401 (c_pretty_printer::expression): Handle VOID_CST.
6402 * cilk.c (extract_free_variables): Likewise.
6403 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6404 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6405
25a27413 64062014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6407
6408 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6409 * c-pragma.c (push_alignment): Adjust.
6410 (handle_pragma_push_options): Likewise.
6411
3e5a8b00 64122014-05-09 Marek Polacek <polacek@redhat.com>
6413
6414 PR c/50459
6415 * c-common.c (check_user_alignment): Return -1 if alignment is error
6416 node.
6417 (handle_aligned_attribute): Don't call default_conversion on
6418 FUNCTION_DECLs.
6419 (handle_vector_size_attribute): Likewise.
6420 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6421 (handle_sentinel_attribute): Call default_conversion and allow even
6422 integral types as an argument.
6423
c2c4ae8d 64242014-05-08 Marek Polacek <polacek@redhat.com>
6425
6426 PR c/61053
6427 * c-common.c (min_align_of_type): New function factored out from...
6428 (c_sizeof_or_alignof_type): ...here.
6429 * c-common.h (min_align_of_type): Declare.
6430
2026249a 64312014-05-08 Marek Polacek <polacek@redhat.com>
6432
6433 PR c/61077
6434 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6435 parameter type of main.
6436
33c8dcfe 64372014-05-07 DJ Delorie <dj@redhat.com>
6438
6439 * c-cppbuiltin.c (print_bits_of_hex): New.
6440 (builtin_define_type_minmax): Print values using hex so as not to
6441 require a pre-computed list of string values.
6442
960d5a55 64432014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6444 Mike Stump <mikestump@comcast.net>
6445 Richard Sandiford <rdsandiford@googlemail.com>
6446
6447 * c-ada-spec.c: Include wide-int.h.
6448 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6449 (dump_generic_ada_node): Use wide-int interfaces.
6450 * c-common.c: Include wide-int-print.h.
6451 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6452 (pointer_int_sum): Use wide-int interfaces.
6453 (c_common_nodes_and_builtins): Use make_int_cst.
6454 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6455 (handle_alloc_size_attribute): Use wide-int interfaces.
6456 (get_nonnull_operand): Likewise.
6457 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6458 * c-lex.c: Include wide-int.h.
6459 (narrowest_unsigned_type): Take a widest_int rather than two
6460 HOST_WIDE_INTs.
6461 (narrowest_signed_type): Likewise.
6462 (interpret_integer): Update accordingly. Use wide-int interfaces.
6463 (lex_charconst): Use wide-int interfaces.
6464 * c-pretty-print.c: Include wide-int.h.
6465 (pp_c_integer_constant): Use wide-int interfaces.
6466 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6467 INT_CST_LT_UNSIGNED.
6468
bbb88b31 64692014-05-06 Richard Biener <rguenther@suse.de>
6470
6471 * c-opts.c (c_common_post_options): For -freestanding,
6472 -fno-hosted and -fno-builtin disable pattern recognition
6473 if not enabled explicitely.
6474
022d4718 64752014-05-02 Marek Polacek <polacek@redhat.com>
6476
6477 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6478
e4ab2ef3 64792014-05-01 Marek Polacek <polacek@redhat.com>
6480
6481 PR c/43245
6482 * c.opt (Wdiscarded-qualifiers): Add.
6483
52cc0072 64842014-04-30 Marek Polacek <polacek@redhat.com>
6485
6486 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6487 INT_MIN / -1 sanitization only for integer types.
6488
4a026b48 64892014-04-25 Marek Polacek <polacek@redhat.com>
6490
6491 PR c/18079
6492 * c-common.c (handle_noinline_attribute): Warn if the attribute
6493 conflicts with always_inline attribute.
6494 (handle_always_inline_attribute): Warn if the attribute conflicts
6495 with noinline attribute.
6496
90e645fa 64972014-04-25 Marek Polacek <polacek@redhat.com>
6498
6499 PR c/60156
6500 * c-common.c (check_main_parameter_types): Warn about variadic main.
6501
db103ea4 65022014-04-24 Mike Stump <mikestump@comcast.net>
6503
6504 * c.opt (Wshadow-ivar): Default to on.
6505
06511efd 65062014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6507
6508 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6509
cdf34fca 65102014-04-23 Marek Polacek <polacek@redhat.com>
6511
6512 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6513
7311d7c1 65142014-04-22 Jakub Jelinek <jakub@redhat.com>
6515
6516 PR sanitizer/60275
6517 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6518 if flag_sanitize_undefined_trap_on_error.
6519 (ubsan_instrument_division, ubsan_instrument_shift,
6520 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6521 if !flag_sanitize_recover.
6522
c1917557 65232014-04-22 Marc Glisse <marc.glisse@inria.fr>
6524
6525 PR libstdc++/43622
6526 * c-common.c (registered_builtin_types): Make non-static.
6527 * c-common.h (registered_builtin_types): Declare.
6528
b2ca6510 65292014-04-14 Richard Biener <rguenther@suse.de>
6530 Marc Glisse <marc.glisse@inria.fr>
6531
6532 PR c/60819
6533 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6534 apply may-alias the scalar pointer type when applicable.
6535
855372a3 65362014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6537
6538 PR middle-end/60467
6539 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6540 as possible argument for Cilk_spawn.
6541
4012a986 65422014-04-11 Tobias Burnus <burnus@net-b.de>
6543
6544 PR c/60194
6545 * c.opt (Wformat-signedness): Add
6546 * c-format.c(check_format_types): Use it.
6547
0d284870 65482014-04-11 Jason Merrill <jason@redhat.com>
6549
6550 PR c++/57926
6551 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6552 default_conversion for an array argument.
6553
a34c1231 65542014-04-08 Marek Polacek <polacek@redhat.com>
6555
6556 PR sanitizer/60745
6557 * c-ubsan.c: Include asan.h.
6558 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6559
a35a8e18 65602014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6561
6562 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6563
b23e42b6 65642014-04-02 Marek Polacek <polacek@redhat.com>
6565
6566 * c-common.h (c_expand_expr): Remove declaration.
6567
5a672e62 65682014-03-28 Jakub Jelinek <jakub@redhat.com>
6569
6570 PR c++/60689
6571 * c-common.c (add_atomic_size_parameter): When creating new
6572 params vector, push the size argument first.
6573
d4d068c0 65742014-03-26 Jakub Jelinek <jakub@redhat.com>
6575
6576 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6577 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6578 ubsan_create_data callers.
6579
446bdf5f 65802014-03-22 Jakub Jelinek <jakub@redhat.com>
6581
6582 PR debug/60603
6583 * c-opts.c (c_finish_options): Restore cb_file_change call to
6584 <built-in>.
6585
8895f0a3 65862014-03-13 Jakub Jelinek <jakub@redhat.com>
6587
6588 PR middle-end/36282
6589 * c-pragma.c (apply_pragma_weak): Only look at
6590 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6591 DECL_ASSEMBLER_NAME_SET_P (decl).
6592 (maybe_apply_pending_pragma_weaks): Exit early if
6593 vec_safe_is_empty (pending_weaks) rather than only when
6594 !pending_weaks.
6595 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6596 set assembler name back to NULL afterwards.
6597
7a5da2cd 65982014-03-11 Jason Merrill <jason@redhat.com>
6599
6600 * c.opt: Add -std=gnu++14.
6601
95093889 66022014-03-11 Ian Bolton <ian.bolton@arm.com>
6603
6604 * c-opts.c (c_common_post_options): Don't override
6605 -ffp-contract=fast if unsafe-math-optimizations is on.
6606
c9a24b37 66072014-03-08 Paulo Matos <paulo@matos-sorge.com>
6608
9b8f3aa1 6609 * c.opt: Enable LTO FE for fshort-double.
c9a24b37 6610
3f6dba6e 66112014-03-07 Jason Merrill <jason@redhat.com>
6612
6613 * c.opt: Add -std=c++14.
6614
3bfdc94f 66152014-03-06 Marek Polacek <polacek@redhat.com>
6616
6617 PR c/60197
6618 * cilk.c (contains_cilk_spawn_stmt): New function.
6619 (contains_cilk_spawn_stmt_walker): Likewise.
6620 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6621 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6622
8b3a6a4c 66232014-03-03 Jakub Jelinek <jakub@redhat.com>
6624
6625 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6626 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6627 even when flag_preprocess_only.
6628
734ec290 66292014-02-26 Jason Merrill <jason@redhat.com>
6630
6631 PR c++/59231
6632 PR c++/11586
6633 * c-common.c (shorten_compare): Don't check
6634 c_inhibit_evaluation_warnings.
6635
81aec8b8 66362014-02-19 Jakub Jelinek <jakub@redhat.com>
6637
d1081017 6638 PR c/37743
6639 * c-common.c (c_common_nodes_and_builtins): When initializing
6640 c_uint{16,32,64}_type_node, also set corresponding
6641 uint{16,32,64}_type_node to the same value.
6642
81aec8b8 6643 PR c++/60267
6644 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6645 for PRAGMA_IVDEP if flag_preprocess_only.
6646
312243bb 66472014-02-12 Jakub Jelinek <jakub@redhat.com>
6648
6649 PR c/60101
6650 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6651 if false, add ADD itself, rather than vice versa.
6652 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6653 copy. For SAVE_EXPR, only call merge_tlist once.
6654
237e78b1 66552014-02-08 Jakub Jelinek <jakub@redhat.com>
6656
6657 PR middle-end/60092
6658 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6659 and tree_to_uhwi.
6660 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6661 functions.
6662 (c_common_attribute_table): Add alloc_align and assume_aligned
6663 attributes.
6664
76fdceeb 66652014-02-06 Marek Polacek <polacek@redhat.com>
6666
6667 PR c/60087
6668 * c-common.c (warn_for_sign_compare): Call warning_at with location
6669 instead of warning.
6670
4a4dea42 66712014-02-05 Marek Polacek <polacek@redhat.com>
6672
6673 PR c/53123
6674 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6675 statement.
6676
ec704957 66772014-02-04 Marek Polacek <polacek@redhat.com>
6678
6679 PR c/60036
6680 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6681 SAVE_EXPR.
6682
caf62483 66832014-02-03 Marc Glisse <marc.glisse@inria.fr>
6684
6685 PR c++/53017
6686 PR c++/59211
6687 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6688 handle_vector_size_attribute, handle_nonnull_attribute): Call
6689 default_conversion on the attribute argument.
6690 (handle_nonnull_attribute): Increment the argument number.
6691
ec761d5a 66922014-01-31 Marek Polacek <polacek@redhat.com>
6693
6694 PR c/59963
6695 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6696 build_function_call_vec.
6697 (resolve_overloaded_builtin): Likewise.
6698 * c-common.h (build_function_call_vec): Adjust declaration.
6699
22a75734 67002014-01-30 Marek Polacek <polacek@redhat.com>
6701
6702 PR c/59940
6703 * c-common.h (unsafe_conversion_p): Adjust declaration.
6704 (warnings_for_convert_and_check): Likewise.
6705 (convert_and_check): Likewise.
6706 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6707 expansion_point_location_if_in_system_header on it.
6708 (warnings_for_convert_and_check): Add location parameter. Call
6709 expansion_point_location_if_in_system_header on it. Use it.
6710 (convert_and_check): Add location parameter. Use it.
6711 (conversion_warning): Likewise.
6712 (c_add_case_label): Adjust convert_and_check calls.
6713 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6714
a89e6c15 67152014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6716
6717 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6718 flag_cilkplus.
6719 * c-pragma.c (init_pragma): Likewise.
6720 * c.opt: Likewise.
6721
2623625f 67222014-01-23 Marek Polacek <polacek@redhat.com>
6723
6724 PR c/59846
6725 * c-common.c (shorten_compare): Add location_t parameter.
6726 * c-common.h (shorten_binary_op): Adjust declaration.
6727
46da3601 67282014-01-23 Marek Polacek <polacek@redhat.com>
6729
6730 PR c/58346
6731 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6732 * c-common.h: Declare it.
6733
c9743c6a 67342014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6735
6736 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6737 * c-ada-spec.c (dump_ads): Likewise.
6738 (cpp_check): Likewise.
6739 (dump_ada_specs): Likewise.
6740
67412014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
36e33c6a 6742
6743 PR c++/49718
6744 * c-common.c (handle_no_instrument_function_attribute): Allow
6745 no_instrument_function attribute in class member
6746 definition/declaration.
6747
1248c663 67482014-01-15 Jakub Jelinek <jakub@redhat.com>
6749
6750 PR c/58943
6751 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6752 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6753 being COMPOUND_EXPR.
6754 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6755 operand a SAVE_EXPR and second MODIFY_EXPR.
6756
6e5c480b 67572014-01-09 Jakub Jelinek <jakub@redhat.com>
6758
6759 PR target/58115
6760 * c-pch.c (c_common_write_pch): Call
6761 prepare_target_option_nodes_for_pch.
6762
3aea1f79 67632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6764
6765 Update copyright years
6766
e4f22041 67672014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6768
6769 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6770 the copyright notice.
6771
7fb0fe24 67722013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6773
6774 * c-ada-spec.c (print_constructor): New function.
6775 (print_destructor): Retrieve the origin of the destructor.
6776 (print_ada_declaration): Revamp handling of constructors/destructors.
6777
92a44a68 67782013-12-23 Stuart Hastings <stuart@apple.com>
468088ac 6779 Bill Maddox <maddox@google.com>
6780 Jason Merrill <jason@redhat.com>
6781
6782 * c.opt: Add -fdeclone-ctor-dtor.
6783 * c-opts.c (c_common_post_options): Default to on iff -Os.
6784
74acc703 67852013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6786
6787 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6788 attribute.
6789 * c-pragma.h (enum pragma_cilk_clause): Remove.
6790 (enum pragma_omp_clause): Added the following fields:
6791 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6792 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6793 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6794 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6795 PRAGMA_CILK_CLAUSE_UNIFORM.
6796
8204c077 6797
433e804e 67982013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6799
6800 * cilk.c (cilk_outline): Made this function non-static.
6801 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6802 (create_cilk_wrapper): Added a new parameter: a function pointer.
6803 (c_install_body_w_frame_cleanup): Remove
6804 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6805 * c-common.h (cilk_outline): New prototype.
6806 (gimplify_cilk_spawn): Removed two parameters.
6807 (cilk_install_body_with_frame_cleanup): New prototype.
6808 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6809 CILK_SPAWN_STMT case.
6810
5bcc7e60 68112013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6812
e66325ea 6813 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6814
5bcc7e60 6815 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6816 (int_array_type_node): Remove.
6817 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6818
0b26ec77 68192013-12-05 Marek Polacek <polacek@redhat.com>
6820
6821 PR c/52023
6822 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6823 [ADJUST_FIELD_ALIGN].
6824
a179a7dc 68252013-12-04 Joseph Myers <joseph@codesourcery.com>
6826
6827 PR c/52023
6828 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6829 and check field alignment if set.
6830 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6831 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6832
8204c077 68332013-12-04 Jakub Jelinek <jakub@redhat.com>
137559b2 6834 Marek Polacek <polacek@redhat.com>
6835
6836 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6837 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6838
648fd348 68392013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6840
6841 PR c/59309
6842 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6843 arguments.
6844
253e1cae 68452013-11-29 Jakub Jelinek <jakub@redhat.com>
6846
6847 PR c/59280
6848 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6849 goto invalid. If it is error_mark_node, don't issue further
6850 diagnostics.
6851
3e398f5b 68522013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6853
6854 * c.opt (Wopenmp-simd): New.
6855
020bc656 68562013-11-22 Jakub Jelinek <jakub@redhat.com>
6857
6858 * c-ubsan.h (ubsan_instrument_return): New prototype.
6859 * c-ubsan.c (ubsan_instrument_return): New function.
6860
bc61cadb 68612013-11-22 Andrew MacLeod <amacleod@redhat.com>
6862
6863 * c-common.c: Add required include files from gimple.h.
6864 * c-gimplify.c: Likewise
6865 * cilk.c: Likewise
6866
3df42822 68672013-11-22 David Malcolm <dmalcolm@redhat.com>
6868
6869 * c-common.c (unsafe_conversion_p): Remove use of
6870 EXPR_LOC_OR_HERE macro.
6871 (conversion_warning): Likewise.
6872 (warnings_for_convert_and_check): Likewise.
6873 (warn_for_collisions_1): Likewise.
6874 (shorten_compare): Likewise, and remove use of in_system_header
6875 macro, using the location from the former.
6876 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6877 (cb_def_pragma): Remove use of in_system_header macro.
6878 (lex_string): Likewise.
6879 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6880
8c53c46c 68812013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6882 Mike Stump <mikestump@comcast.net>
6883 Richard Sandiford <rdsandiford@googlemail.com>
6884
6885 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6886 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6887 tree_fits_shwi_p or tree_fits_uhwi_p.
6888 (dump_generic_ada_node): Likewise.
6889 * c-format.c (check_format_arg): Likewise.
6890 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6891
5200ef07 68922013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6893
6894 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6895
ca9d7d74 68962013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6897
6898 PR c/53001
6899 * c-common.c (unsafe_conversion_p): Make this function
6900 return an enumeration with more detail.
6901 (conversion_warning): Use the new return type of
6902 unsafe_conversion_p to separately warn either about conversions
6903 that lower floating point number precision or about the other
6904 kinds of conversions.
6905 * c-common.h (enum conversion_safety): New enumeration.
a49621cf 6906 (unsafe_conversion_p): switching return type to
6907 conversion_safety enumeration.
ca9d7d74 6908 * c.opt: Adding new warning -Wfloat-conversion and
6909 enabling it with -Wconversion.
6910
0391a567 69112013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6912
a49621cf 6913 * c-opts.c: Include plugin.h.
6914 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
0391a567 6915
19b928d9 69162013-11-19 Marek Polacek <polacek@redhat.com>
6917
6918 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6919 call.
6920 (ubsan_instrument_shift): Likewise.
6921 (ubsan_instrument_vla): Likewise.
6922
aa59f000 69232013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6924
6925 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6926 cast to unsigned type.
6927
08f817b3 69282013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6929
6930 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6931 tree_low_cst.
6932 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6933 rather than tree_low_cst.
6934
6a0712d4 69352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6936
6937 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6938 tree_to_uhwi throughout.
6939
fcb97e84 69402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6941
6942 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6943 tree_low_cst (..., 0) with tree_to_shwi throughout.
6944
cd4547bf 69452013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6946
6947 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6948 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6949
35ec552a 69502013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6951
6952 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6953 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6954
f2697631 69552013-11-15 Aldy Hernandez <aldyh@redhat.com>
6956
6957 * c-cilkplus.c: New file.
6958 * c-common.c (readonly_error): Add location argument.
6959 * c-common.h (readonly_error): Same.
6960 (c_finish_cilk_clauses): Protoize.
6961 (c_check_cilk_loop): Same.
6962 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6963 Do not fail on error_mark_node.
6964 Abstract increment canonicalization to here...
6965 (c_omp_for_incr_canonicalize_ptr): New.
6966 c-pragma.c (init_pragma): Register "simd" pragma.
6967 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6968 (enum pragma_cilk_clause): New.
6969
0aa8c34e 69702013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6971
6972 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6973 wchar_type and host_integerp checks.
6974
e795d6e1 69752013-11-14 Andrew MacLeod <amacleod@redhat.com>
6976
6977 * c-common.c: Likewise.
6978 * c-gimplify.c: Likewise.
6979 * cilk.c: Likewise.
6980
9ed99284 69812013-11-14 Diego Novillo <dnovillo@google.com>
6982
6983 * c-common.c: Include fold-const.h.
6984 Include stor-layout.h.
6985 Include calls.h.
6986 Include stringpool.h.
6987 Include attribs.h.
6988 Include varasm.h.
6989 Include trans-mem.h.
6990 * c-cppbuiltin.c: Include stor-layout.h.
6991 Include stringpool.h.
6992 * c-format.c: Include stringpool.h.
6993 * c-lex.c: Include stringpool.h.
6994 Include stor-layout.h.
6995 * c-pragma.c: Include stringpool.h.
6996 Include attribs.h.
6997 Include varasm.h.
6998 Include gcc-symtab.h.
6999 * c-pretty-print.c: Include stor-layout.h.
7000 Include attribs.h.
7001 * cilk.c: Include stringpool.h.
7002 Include calls.h.
7003
4fba5eb9 70042013-11-13 Joseph Myers <joseph@codesourcery.com>
7005
7006 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7007 * c-common.c (c_common_reswords): Add __auto_type.
7008 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7009
a8783bee 70102013-11-12 Andrew MacLeod <amacleod@redhat.com>
7011
e795d6e1 7012 * c-common.c: Include gimplify.h.
7013 * c-gimplify.c: Likewise.
7014 * cilk.c: Likewise.
7015 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7016 * c-ubsan.c: Don't include gimple.h.
a8783bee 7017
d184e0c0 70182013-11-12 Joseph Myers <joseph@codesourcery.com>
7019
7020 * c-common.c (c_common_reswords): Add _Thread_local.
7021
a056826c 70222013-11-09 Joseph Myers <joseph@codesourcery.com>
7023
7024 * c-common.c (atomic_size_supported_p): New function.
7025 (resolve_overloaded_atomic_exchange)
7026 (resolve_overloaded_atomic_compare_exchange)
7027 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7028 Use it instead of comparing size with a local list of sizes.
7029
b560fabd 70302013-11-07 Andrew MacLeod <amacleod@redhat.com>
7031 Joseph Myers <joseph@codesourcery.com>
7032
7033 * c-common.h (enum rid): Add RID_ATOMIC.
7034 * c-common.c (c_common_reswords): Add _Atomic.
7035 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7036 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7037 * c-format.c (check_format_types): Check for extra _Atomic
7038 qualifiers in format argument.
7039 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7040 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7041
5b1a0622 70422013-11-06 Tobias Burnus <burnus@net-b.de>
7043
7044 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7045
4f8f4cb8 70462013-11-06 Joseph Myers <joseph@codesourcery.com>
7047
7048 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7049 standards modes.
7050 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7051 to mean lack of IEEE 754 support.
7052
9148bda3 70532013-11-05 Tobias Burnus <burnus@net-b.de>
7054
7055 * c.opt (-Wdate-time): New option
7056 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7057
08c5f4d5 70582013-11-05 Joseph Myers <joseph@codesourcery.com>
7059
7060 * c-cppbuiltin.c (cpp_iec_559_value): Test
7061 flag_excess_precision_cmdline not flag_excess_precision.
7062
c630ef93 70632013-11-05 Tobias Burnus <burnus@net-b.de>
7064
7065 * c.opt (fopenmp-simd): New option.
7066 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7067 (omp_pragmas): ... this new struct.
7068 (c_pp_lookup_pragma): Also walk omp_pragmas.
7069 (init_pragma): Init pragmas for -fopenmp-simd.
7070
7354a89b 70712013-11-04 Marek Polacek <polacek@redhat.com>
7072
7073 PR c++/58979
7074 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7075
4c866b9b 70762013-11-04 Joseph Myers <joseph@codesourcery.com>
7077
7078 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7079 New functions.
7080 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7081
e2a6a333 70822013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7083
7084 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7085 (dump_ada_specs): Adjust prototype of second callback.
7086 * c-ada-spec.c (cpp_check): New global variable.
7087 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7088 (print_generic_ada_decl): Likewise.
7089 (has_static_fields): Change return type to bool and add guard.
7090 (has_nontrivial_methods): New predicate.
7091 (is_tagged_type): Change return type to bool.
7092 (separate_class_package): Call has_nontrivial_methods.
7093 (pp_ada_tree_identifier): Minor tweaks.
7094 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7095 (dump_ada_array_domains): Likewise.
7096 (dump_ada_array_type): Likewise.
7097 (dump_template_types): Remove cpp_check parameter and do not pass it to
7098 dump_generic_ada_node.
7099 (dump_ada_template): Likewise.
7100 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7101 recursively.
7102 (print_ada_methods): Change return type to integer. Remove cpp_check
7103 parameter and do not pass it down.
7104 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7105 dump_generic_ada_node.
7106 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7107 accessing methods.
7108 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7109 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7110 value of print_ada_methods.
7111 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7112 Set cpp_check to it before invoking dump_ada_nodes.
7113 (dump_ada_specs): Likewise.
7114
2c4c3477 71152013-11-03 Marek Polacek <polacek@redhat.com>
7116
7117 * c-ubsan.c: Don't include hash-table.h.
7118 (ubsan_instrument_vla): New function.
7119 * c-ubsan.h: Declare it.
7120
452659af 71212013-10-31 David Malcolm <dmalcolm@redhat.com>
7122
7123 Automated part of renaming of symtab_node_base to symtab_node.
7124
7125 Patch autogenerated by rename_symtab.py from
7126 https://github.com/davidmalcolm/gcc-refactoring-scripts
7127 revision 58bb219cc090b2f4516a9297d868c245495ee622
7128
7129 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7130 symtab_node_base to symtab_node.
7131
4d6f7dd4 71322013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7133
a49621cf 7134 Implement C++14 digit separators.
4d6f7dd4 7135 * c-lex.c (interpret_float): Remove digit separators from scratch string
7136 before building real literal.
7137
06cfe805 71382013-10-30 Jakub Jelinek <jakub@redhat.com>
7139
7140 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7141
d037099f 71422013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7143
7144 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7145 fields.
7146 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7147 enabled.
7148 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7149 (insert_cilk_frame): New prototype.
7150 (cilk_init_builtins): Likewise.
7151 (gimplify_cilk_spawn): Likewise.
7152 (c_cilk_install_body_w_frame_cleanup): Likewise.
7153 (cilk_detect_spawn_and_unwrap): Likewise.
7154 (cilk_set_spawn_marker): Likewise.
7155 (build_cilk_sync): Likewise.
7156 (build_cilk_spawn): Likewise.
7157 * cilk.c: New file.
7158
02774f2d 71592013-10-29 David Malcolm <dmalcolm@redhat.com>
7160
7161 Patch autogenerated by refactor_symtab.py from
7162 https://github.com/davidmalcolm/gcc-refactoring-scripts
7163 revision 58bb219cc090b2f4516a9297d868c245495ee622
7164
7165 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7166 to a true class hierarchy.
7167 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7168
31fe10fd 71692013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7170
7171 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7172
b1c06ff9 71732013-10-26 Jeff Law <law@redhat.com>
7174
1f78217c 7175 * c-common.c (c_define_builtins): Remove mudflap support.
7176 * c.opt: Ignore and warn for mudflap options.
b1c06ff9 7177
48a972c8 71782013-10-24 Tobias Burnus <burnus@net-b.de>
4644b593 7179
7180 PR other/33426
7181 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7182 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7183
546a04b1 71842013-10-23 Jason Merrill <jason@redhat.com>
7185
7186 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7187
bc7bff74 71882013-10-11 Jakub Jelinek <jakub@redhat.com>
7189
d62c713e 7190 * c-common.h (omp_clause_mask::operator !=): New method.
7191 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7192 instead of if (mask & something) tests everywhere.
7193
bc7bff74 7194 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7195 201307 instead of 201107.
7196 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7197 (c_common_attribute_table): Add "omp declare target" and
7198 "omp declare simd" attributes.
7199 (handle_omp_declare_target_attribute,
7200 handle_omp_declare_simd_attribute): New functions.
7201 * c-omp.c: Include c-pragma.h.
7202 (c_finish_omp_taskgroup): New function.
7203 (c_finish_omp_atomic): Add swapped argument, if true,
7204 build the operation first with rhs, lhs arguments and use NOP_EXPR
7205 build_modify_expr.
7206 (c_finish_omp_for): Add code argument, pass it down to make_code.
7207 (c_omp_split_clauses): New function.
7208 (c_split_parallel_clauses): Removed.
7209 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7210 c_omp_declare_simd_clauses_to_decls): New functions.
7211 * c-common.h (omp_clause_mask): New type.
7212 (OMP_CLAUSE_MASK_1): Define.
7213 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7214 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7215 omp_clause_mask::operator |, omp_clause_mask::operator &,
7216 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7217 omp_clause_mask::operator ==): New methods.
7218 (enum c_omp_clause_split): New.
7219 (c_finish_omp_taskgroup): New prototype.
7220 (c_finish_omp_atomic): Add swapped argument.
7221 (c_finish_omp_for): Add code argument.
7222 (c_omp_split_clauses): New prototype.
7223 (c_split_parallel_clauses): Removed.
7224 (c_omp_declare_simd_clauses_to_numbers,
7225 c_omp_declare_simd_clauses_to_decls): New prototypes.
7226 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7227 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7228 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7229 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7230 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7231 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7232 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7233 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7234 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7235 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7236 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7237 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7238 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7239 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7240 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7241 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7242 PRAGMA_OMP_CLAUSE_UNIFORM.
7243
d7dcba40 72442013-10-09 Marc Glisse <marc.glisse@inria.fr>
7245
7246 PR tree-optimization/20318
7247 * c-common.c (handle_returns_nonnull_attribute): New function.
7248 (c_common_attribute_table): Add returns_nonnull.
7249
0b7282f1 72502013-10-03 Marc Glisse <marc.glisse@inria.fr>
7251
7252 PR c++/19476
7253 * c.opt (fcheck-new): Move to common.opt.
7254
51f553af 72552013-09-25 Marek Polacek <polacek@redhat.com>
7256 Jakub Jelinek <jakub@redhat.com>
7257
7258 PR sanitizer/58413
7259 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7260 an expression if we can prove it is correct.
7261 (ubsan_instrument_division): Likewise. Remove unnecessary
7262 check.
7263
05f893e1 72642013-09-18 Marek Polacek <polacek@redhat.com>
7265
7266 PR sanitizer/58411
7267 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7268 Declare it.
7269 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7270
236ce1d1 72712013-09-14 Iain Sandoe <iain@codesourcery.com>
7272
7273 PR target/48094
7274 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7275 fobjc-gc, freplace-objc-classes): Accept for LTO.
7276
f9f68d35 72772013-09-13 Jacek Caban <jacek@codeweavers.com>
7278
7279 * c-target.def: New hook
7280
ba2f764e 72812013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7282
7283 PR c++/43452
7284 * c.opt (Wdelete-incomplete): Add.
7285
73437615 72862013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7287
7288 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7289 (vector_types_compatible_elements_p): New function.
7290 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7291 declaration.
7292 (vector_types_compatible_elements_p): Declare.
7293
95af4c75 72942013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7295
7296 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7297 a virtual member function.
7298 (pp_simple_type_specifier): Remove.
7299 (pp_c_type_specifier): Likewise.
7300 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7301 Rename from pp_c_type_specifier. Adjust.
7302 (c_pretty_printer::c_pretty_printer): Do not assign to
7303 simple_type_specifier.
7304
eaab24b9 73052013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7306
7307 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7308 member function.
7309 (c_pretty_printer::storage_class_specifier): Likewise.
7310 (c_pretty_printer::initializer): Likewise.
7311 (pp_declaration): Remove.
7312 (pp_declaration_specifiers): Likewise.
7313 (pp_abstract_declarator): Likewise.
7314 (pp_declarator): Likewise.
7315 (pp_type_id): Likewise.
7316 (pp_statement): Likewise.
7317 (pp_constant): Likewise.
7318 (pp_id_expression): Likewise.
7319 (pp_primary_expression): Likewise.
7320 (pp_unary_expression): Likewise.
7321 (pp_multiplicative_expression): Likewise.
7322 (pp_conditional_expression): Likewise.
7323 (pp_assignment_expression): Likewise.
7324 (pp_expression): Likewise.
7325 (pp_c_type_id): Likewise.
7326 (pp_c_storage_class_specifier): Likewise.
7327 * c-pretty-print.c (pp_c_type_cast): Tidy.
7328 (pp_c_pointer): Likewise.
7329 (pp_c_type_specifier): Likewise.
7330 (pp_c_parameter_type_list): Likewise.
7331 (pp_c_function_definition): Likewise.
7332 (pp_c_init_declarator): Likewise.
7333 (pp_c_initializer_list): Likewise.
7334 (pp_c_constructor_elts): Likewise.
7335 (c_pretty_printer::direct_abstract_declarator): Likewise.
7336 (c_pretty_printer::declaration_specifiers): Likewise.
7337 (c_pretty_printer::primary_expression): Likewise.
7338 (c_pretty_printer::postfix_expression): Likewise.
7339 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7340 (c_pretty_printer::storage_class_specifier): Rename from
7341 pp_c_storage_class_specifier.
7342 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7343 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7344 storage_class_specifier, initializer, offset_list, flags.
7345
9e46467d 73462013-08-30 Marek Polacek <polacek@redhat.com>
7347
7348 * c-ubsan.c: New file.
7349 * c-ubsan.h: New file.
7350
36a8d9b9 73512013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7352
7353 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7354 member function.
7355 (c_pretty_printer::declaration_specifiers): Likewise.
7356 (c_pretty_printer::declarator): Likewise.
7357 (c_pretty_printer::abstract_declarator): Likewise.
7358 (c_pretty_printer::direct_abstract_declarator): Likewise.
7359 (c_pretty_printer::direct_declarator): Likewise.
7360 (c_pretty_printer::function_specifier): Likewise.
7361 (pp_declaration): Adjust.
7362 (pp_declaration_specifiers): Likewise.
7363 (pp_abstract_declarator): Likewise.
7364 (pp_direct_declarator): Likewise.
7365 (pp_function_specifier): Likewise.
7366 (pp_direct_abstract_declarator): Remove as unused.
7367 (pp_c_declaration): Remove.
7368 (pp_c_declaration_specifiers): Likewise.
7369 (pp_c_declarator): Likewise.
7370 (pp_c_direct_declarator): Likewise.
7371 (pp_c_function_specifier): Likewise.
7372 (pp_c_direct_abstract_declarator): Likewise.
7373 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7374 from pp_c_abstract_declarator. Adjust.
7375 (c_pretty_printer::direct_abstract_declarator): Rename from
7376 pp_c_direct_abstract_declarator. Adjust.
7377 (c_pretty_printer::function_specifier): Rename from
7378 pp_c_function_specifier. Adjust.
7379 (c_pretty_printer::declaration_specifiers): Rename from
7380 pp_c_declaration_specifiers. Adjust.
7381 (c_pretty_printer::direct_declarator): Rename from
7382 pp_c_direct_declarator. Adjust.
7383 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7384 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7385 (c_pretty_printer::c_pretty_printer): Do not assign to
7386 declaration, declaration_specifiers, declarator,
7387 direct_declarator, direct_abstract_declarator, function_specifier.
7388
30635c2e 73892013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7390
7391 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7392 virtual member function.
7393 (c_pretty_printer::multiplicative_expression): Likewise.
7394 (c_pretty_printer::conditional_expression): Likewise.
7395 (c_pretty_printer::assignment_expression): Likewise.
7396 (c_pretty_printer::expression): Likewise.
7397 (pp_unary_expression): Adjust.
7398 (pp_multiplicative_expression): Likewise.
7399 (pp_assignment_expression): Likewise.
7400 (pp_conditional_expression): Likewise.
7401 (pp_expression): Likewise.
7402 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7403 from pp_c_unary_expression. Adjust.
7404 (c_pretty_printer::multiplicative_expression): Rename from
7405 pp_c_multiplicative_expression. Adjust.
7406 (c_pretty_printer::conditional_expression): Rename from
7407 pp_c_conditional_expression. Adjust.
7408 (c_pretty_printer::assignment_expression): Rename from
7409 pp_c_assignment_expression. Adjust.
7410 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7411 (c_pretty_printer::c_pretty_printer): Do not assign to
7412 unary_expression, multiplicative_expression,
7413 conditional_expression, expression.
7414
027d08ed 74152013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7416
7417 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7418 virtual member function.
7419 (pp_postfix_expression): Adjust.
7420 (pp_c_postfix_expression): Remove.
7421 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7422 from pp_c_postfix_expression. Adjust.
7423 (c_pretty_printer::c_pretty_printer): Do not assign to
7424 postfix_expression.
7425
f873303a 74262013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7427
7428 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7429 virtua member function.
7430 (pp_primary_expression): Adjust.
7431 (pp_c_primary_expression): Remove.
7432 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7433 from pp_c_primary_expression. Adjust.
7434 (pp_c_initializer_list): Use pp_primary_expression.
7435 (c_pretty_printer::c_pretty_printer): Do not assign to
7436 primary_expression.
7437
08e3e481 74382013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7439
7440 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7441 * c-pretty-print.c (M_): Remove.
7442 (c_pretty_printer::translate_string): Define.
7443 (pp_c_type_specifier): Use it.
7444 (pp_c_primary_expression): Likewise.
7445 (pp_c_expression): Likewise.
7446
1fc4a87f 74472013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7448
7449 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7450 virtual function.
7451 (pp_c_id_expression): Remove.
7452 (pp_id_expression): Adjust.
7453 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7454 pp_c_id_expression. Adjust.
7455 (pp_c_postfix_expression): Use pp_id_expression.
7456 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7457
a6cb161b 74582013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7459
7460 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7461 member function.
7462 (pp_constant): Adjust.
7463 (pp_c_constant): Remove.
7464 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7465 pp_c_constant. Adjust.
7466 (pp_c_constant)
7467 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7468 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7469
eed6bc21 74702013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7471
7472 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7473 (c_pretty_printer::c_pretty_printer): Declare.
7474 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7475 c_pretty_printer_init. Adjust.
7476 (print_c_tree): Do not call c_pretty_printer_init.
7477 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7478
df558d2e 74792013-08-09 Arnaud Charlet <charlet@adacore.com>
7480
7481 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7482
42f9a786 74832013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7484
7485 PR c++/58080
7486 * c-common.c (pointer_int_sum): Add bool parameter.
7487 * c-common.h (pointer_int_sum): Adjust declaration.
7488
f874ddad 74892013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7490
7491 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7492 c_pretty_printer variable.
7493
a94db6b0 74942013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7495
7496 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7497 (pp_base): Remove.
7498 (pp_c_base): Likewise. Adjust users.
7499 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7500 (pp_c_whitespace): Do not call pp_base.
7501 (pp_c_left_paren): Likewise.
7502 (pp_c_right_paren): Likewise.
7503 (pp_c_left_brace): Likewise.
7504 (pp_c_right_brace): Likewise.
7505 (pp_c_left_bracket): Likewise.
7506 (pp_c_right_bracket): Likewise.
7507 (pp_c_dot): Likewise.
7508 (pp_c_ampersand): Likewise.
7509 (pp_c_star): Likewise.
7510 (pp_c_arrow): Likewise.
7511 (pp_c_semicolon): Likewise.
7512 (pp_c_complement): Likewise.
7513 (pp_c_exclamation): Likewise.
7514 (pp_c_direct_declarator): Likewise.
7515 (pp_c_ws_string): Likewise.
7516 (pp_c_identifier): Likewise.
7517 (pp_c_statement): Likewise.
7518 (print_c_tree): Likewise.
7519
1898176c 75202013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7521
7522 PR c++/58072
7523 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7524 provide useful error strings.
7525
70d60d1d 75262013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7527
7528 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7529 printer functions instead of pp_string or operators and punctuators.
7530 (dump_generic_ada_node): Likewise.
7531 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7532 (pp_c_relational_expression): Likewise.
7533 (pp_c_logical_or_expression): Likewise.
7534
dda4f0ec 75352013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7536
7537 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7538 functions instead of pp_character.
7539 (pp_ada_tree_identifier): Likewise.
7540 (dump_ada_double_name): Likewise.
7541 (dump_ada_function_declaration): Likewise.
7542 (dump_ada_array_domains): Likewise.
7543 (dump_template_types): Likewise.
7544 (dump_generic_ada_node): Likewise.
7545 (print_ada_declaration): Likewise.
7546 (print_ada_struct_decl): Likewise.
7547 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7548
7aa04c8d 75492013-07-23 Tom Tromey <tromey@redhat.com>
7550
7551 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7552 * c-common.c (c_common_reswords): Add _Generic.
7553
a04e8d62 75542013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7555
7556 * c-common.c: Fix typos.
7557 * c-common.h: Likewise.
7558
a96c3cc1 75592013-07-13 Lubos Lunak <l.lunak@suse.cz>
7560
7561 PR c++/55203
7562 * c-common.c (c_common_attribute_table): Add warn_unused.
7563 (handle_warn_unused_attribute): New.
7564
da31536d 75652013-07-10 Jakub Jelinek <jakub@redhat.com>
7566
7567 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7568 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7569
839f2f70 75702013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7571
7572 PR c++/57869
7573 * c.opt: Add Wconditionally-supported.
7574
73f353d0 75752013-07-08 Graham Stott <graham.stott@btinternet.com>
7576
1f78217c 7577 * array-notation-common.c (length_mismatch_in_expr_p): Delete
73f353d0 7578 unused variables l_length and l_node.
7579
21ebaa24 75802013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
f5298614 7581
7582 PR c/57821
7583 * c-common.c (complete_array_type): Delay folding first index
7584 like other indices. When folding, check for index overflow.
7585
68ea4406 75862013-06-27 Marc Glisse <marc.glisse@inria.fr>
7587
7588 PR c++/57509
7589 * c-common.h (c_build_vec_perm_expr): New complain argument.
7590 * c-common.c (c_build_vec_perm_expr): Likewise.
7591 Use save_expr also in C++.
7592
60777f69 75932013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7594
7595 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7596 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7597 * c-opts.c (c_common_post_options): Likewise.
7598
839f2f70 75992013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
50acebe0 7600
7601 * array-notation-common.c (length_mismatch_in_expr): Changed the
7602 parameter type's from a dynamic array to a vec_tree. Also removed
7603 the size parameters.
7604 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7605 the change above.
7606
e9331eab 76072013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7608
7609 * c-common.h (struct cilkplus_an_parts): New structure.
7610 (struct cilkplus_an_loop_parts): Likewise.
7611 (cilkplus_extract_an_triplets): New prototype.
7612 (fix_sec_implicit_args): Likewise.
7613 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7614 (fix_sec_implicit_args): Likewise.
60777f69 7615
a9c99fc4 76162013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7617
7618 * array-notation-common.c (find_inv_trees): Removed an unwanted
7619 typecasting.
7620 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7621 enum rid to enum tree_code.
7622
f2526cce 76232013-06-11 Jan Hubicka <jh@suse.cz>
7624
7625 * c-common.c (handle_alias_ifunc_attribute): Do not set
7626 DECL_EXTERNAL for weakref variables.
7627 * c-pragma.c (handle_pragma_weak): Make sure aliases
7628 are not declared as external.
7629
09970d67 76302013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7631
7632 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7633 function from c/c-array-notation.c.
7634 (is_cilkplus_reduce_builtin): Likewise.
7635 (find_rank): Likewise.
7636 (extract_array_notation_exprs): Likewise.
7637 (replace_array_notations): Likewise.
7638 (find_inv_trees): Likewise.
7639 (replace_inv_trees): Likewise.
7640 (contains_array_notation_expr): Likewise.
7641 (find_correct_array_notation_type): Likewise.
7642 * c-common.h (struct inv_list): Moved this struct from the file
7643 c/c-array-notation.c and added a new field called additional tcodes.
7644 (length_mismatch_in_expr_p): New prototype.
7645 (is_cilkplus_reduce_builtin): Likewise.
7646 (find_rank): Likewise.
7647 (extract_array_notation_exprs): Likewise.
7648 (replace_array_notation): Likewise.
7649 (find_inv_trees): Likewise.
7650 (replace_inv_trees): Likewise.
7651 (find_correct_array_notation_type): Likewise.
839f2f70 7652
3c6d4197 76532013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7654
7655 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7656 function array_notation_init_builtins is called.
7657 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7658 * c-common.def (ARRAY_NOTATION_REF): New tree.
7659 * c-common.h (build_array_notation_expr): New function declaration.
7660 (build_array_notation_ref): Likewise.
7661 (extract_sec_implicit_index_arg): New extern declaration.
7662 (is_sec_implicit_index_fn): Likewise.
7663 (ARRAY_NOTATION_CHECK): New define.
7664 (ARRAY_NOTATION_ARRAY): Likewise.
7665 (ARRAY_NOTATION_START): Likewise.
7666 (ARRAY_NOTATION_LENGTH): Likewise.
7667 (ARRAY_NOTATION_STRIDE): Likewise.
7668 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7669 ARRAY_NOTATION_REF.
7670 (pp_c_expression): Likewise.
7671 * c.opt (flag_enable_cilkplus): New flag.
7672 * array-notation-common.c: New file.
7673
8e71dad2 76742013-05-14 Jakub Jelinek <jakub@redhat.com>
7675
7676 PR c++/57274
7677 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7678
432dd330 76792013-05-10 Marc Glisse <marc.glisse@inria.fr>
7680
7681 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7682 vectors.
7683
b156ec37 76842013-05-07 Han Shen <shenhan@google.com>
7685
7686 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7687
1a087624 76882013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7689
7690 * c-common.c (check_user_alignment): Emit error for negative values.
7691
1638c736 76922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7693
7694 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7695
949dbf93 76962013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7697
7698 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7699 __GXX_EXPERIMENTAL_CXX1Y__.
7700
9205a6cc 77012013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
a49621cf 7702 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
9205a6cc 7703
7704 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7705 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7706 to simply use OPT_Wpointer_arith.
7707 (c_sizeof_or_alignof_type): Likewise.
7708
05d0bce1 77092013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7710
7711 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7712
41609f8b 77132013-04-12 Jakub Jelinek <jakub@redhat.com>
7714
7715 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7716 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7717 specifiers.
7718
c671dc4f 77192013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7720
7721 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7722
ba125576 77232013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7724
7725 * c-common.c (pointer_int_sum): Remove dead code.
7726
9d3fa937 77272013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7728
7729 PR middle-end/56524
7730 * c-common.c (handle_optimize_attribute): Don't call
7731 save_optabs_if_changed.
7732
5ceebb21 77332013-03-05 Jakub Jelinek <jakub@redhat.com>
7734
7735 PR middle-end/56461
7736 * c-pch.c (pch_init): Free target_validity at the end.
7737
18eeed2b 77382013-03-04 Jakub Jelinek <jakub@redhat.com>
7739
7740 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7741
a9196da9 77422013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7743 Jakub Jelinek <jakub@redhat.com>
7744
7745 PR sanitizer/56454
7746 * c-common.c (handle_no_sanitize_address_attribute): New function.
7747 (c_common_attribute_table): Add no_sanitize_address attribute.
7748 (handle_no_address_safety_analysis_attribute): Add
7749 no_sanitize_address attribute, not no_address_safety_analysis
7750 attribute.
7751
15c27dda 77522013-02-18 Aldy Hernandez <aldyh@redhat.com>
08c7d04b 7753
7754 PR target/52555
7755 * c-common.c (handle_optimize_attribute): Call
7756 save_optabs_if_changed.
7757
19426fe1 77582013-02-18 Jakub Jelinek <jakub@redhat.com>
7759 Steven Bosscher <steven@gcc.gnu.org>
7760
7761 PR pch/54117
7762 * c-opts.c (c_common_post_options): If debug info is enabled
7763 and non-dwarf*, refuse to load PCH files and when writing PCH
7764 file warn.
7765
df936998 77662013-02-05 Jakub Jelinek <jakub@redhat.com>
7767
7768 PR middle-end/56167
7769 * c-common.c (handle_error_attribute): Fix condition.
7770
ae0c3984 77712013-01-30 Jakub Jelinek <jakub@redhat.com>
7772
7773 PR c++/55742
7774 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7775
1c4973d7 77762013-01-18 Jason Merrill <jason@redhat.com>
7777
7778 PR target/54908
7779 * c.opt (-fextern-tls-init): New.
7780 * c-opts.c (c_common_post_options): Handle it.
7781
7c834436 77822013-01-09 Jakub Jelinek <jakub@redhat.com>
7783
7784 PR c/48418
7785 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7786 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7787 and is either negative or bigger or equal to type precision
7788 of the first operand.
7789
5abaa10a 77902012-12-03 Marek Polacek <polacek@redhat.com>
7791
7792 PR c/55570
7793 * c-common.c (check_user_alignment): Swap order of tests,
7794 check TREE_CODE first.
7795
324ca377 77962012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7797
7798 PR c++/52654
7799 * c-common.h (overflow_type): New enum.
7800 (build_userdef_literal): Add overflow_type argument.
7801 (tree_userdef_literal): Add overflow_type.
7802 (USERDEF_LITERAL_OVERFLOW): New access macro.
7803 * c-common.c (build_userdef_literal): Add overflow_type
7804 argument.
7805 * c-lex.c (c_lex_with_flags): Add overflow_type to
7806 build_userdef_literal calls.
7807 (interpret_integer, interpret_float): Add overflow_type argument.
7808
b4c4a429 78092012-11-28 Richard Biener <rguenther@suse.de>
7810
7811 PR c/35634
7812 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7813 here and use a type with proper overflow behavior for types that would
7814 need to be promoted for the arithmetic.
7815
d413ffdd 78162012-11-23 Jakub Jelinek <jakub@redhat.com>
7817
7818 PR sanitizer/55435
7819 * c-common.c (handle_no_address_safety_analysis_attribute): New
7820 function.
7821 (c_common_attribute_table): Add no_address_safety_analysis.
7822
52bc861d 78232012-11-16 Simon Baldwin <simonb@google.com>
7824
7825 * c.opt: Add f[no-]canonical-system-headers.
7826 * c-opts.c (c_common_handle_option): Handle
7827 OPT_fcanonical_system_headers.
7828
2dd00636 78292012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7830
7831 PR c++/54413
7832 * c-opts.c (c_common_handle_option): Set new flags.
7833 * c.opt: Describe new flags.
7834
d4701f6c 78352012-11-09 Jason Merrill <jason@redhat.com>
7836
7837 * c.opt (Wabi-tag): New.
7838
72d65da9 78392012-11-09 Andi Kleen <ak@linux.intel.com>
7840
7841 PR 55139
7842 * c-common.c (get_atomic_generic_size): Mask with
a49621cf 7843 MEMMODEL_MASK
72d65da9 7844
77a357e3 78452012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7846
7847 PR c/53063
7848 * c.opt (Wformat): Make it Alias Wformat=1.
7849 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7850 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7851 LangEnabledBy.
7852 (Wformat=): RejectNegative. Use LangEnabledBy.
7853 (Wnonnull): Use LangEnabledBy.
7854 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7855 * c-format.c (set_Wformat): Delete.
7856 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
a49621cf 7857 (maybe_read_dollar_number): Likewise.
7858 (avoid_dollar_number): Likewise.
7859 (finish_dollar_format_checking): Likewise.
7860 (check_format_info): Likewise.
7861 (check_format_info_main): Likewise.
7862 (check_format_types): Likewise.
7863 (format_type_warning): Likewise.
7864 * c-common.c (int): Likewise.
7865 (check_function_sentinel): Likewise.
7866 * c-common.h (warn_format,set_Wformat): Do not declare here.
77a357e3 7867
45efa6b9 78682012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7869
7870 PR c/53063
7871 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7872 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7873 Use LangEnabledBy.
7874 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7875 common.opt.
7876 (Wvariadic-macros): Init(1).
7877 * c-opts.c (c_common_handle_option): Do not handle them
7878 explicitly.
7879 (c_common_post_options): Likewise.
7880 (sanitize_cpp_opts): warn_unused_macros is now
7881 cpp_warn_unused_macros.
7882 (push_command_line_include): Likewise.
7883 * c-common.c (warn_unknown_pragmas): Do not define.
7884 * c-common.h (warn_unknown_pragmas): Do not declare.
7885
0e4e775a 78862012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7887
7888 PR c/51294
7889 * c-common.c (conversion_warning): Handle conditional expressions.
7890
8b447d3f 78912012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7892
7893 PR c++/54930
7894 * c.opt (Wreturn_local_addr): Define new option.
7895
f4a61754 78962012-10-25 Jason Merrill <jason@redhat.com>
7897
ecb10e6a 7898 * c.opt (Wvirtual-move-assign): New.
7899
f4a61754 7900 * c.opt (Winherited-variadic-ctor): New.
7901
7b463b19 79022012-10-25 Marc Glisse <marc.glisse@inria.fr>
7903
7904 PR c++/54427
7905 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7906
6adc88f8 79072012-10-23 Joseph Myers <joseph@codesourcery.com>
7908
7909 * c-common.h (pch_cpp_save_state): Declare.
7910 * c-target.def (c_preinclude): New hook.
7911 * c-opts.c (done_preinclude): New.
7912 (push_command_line_include): Handle default preincluded header.
7913 (cb_file_change): Call pch_cpp_save_state when calling
7914 push_command_line_include.
7915 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7916 (pch_cpp_save_state): New.
7917 (pch_init): Call pch_cpp_save_state conditionally, instead of
7918 calling cpp_save_state.
7919
fa816b0b 79202012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7921
7922 PR c/53063
7923 PR c/40989
7924 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7925 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7926 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7927 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7928 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7929 * c-opts.c (c_common_handle_option): Remove explicit handling from
7930 here.
7931 (c_common_post_options): Likewise.
7932
d214ccee 79332012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7934
7935 * c-ada-spec.c (LOCATION_COL): Delete.
7936 (compare_location): New function.
7937 (compare_node): Use it.
7938 (compare_comment): Likewise.
7939
77b27208 79402012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7941
7942 PR c/53063
7943 PR c/40989
7944 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7945 * c-opts.c (c_common_handle_option): Do not set them here. Add
7946 comment.
7947 (c_common_post_options): Likewise.
7948
cc02ca4d 79492012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7950
7951 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7952 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7953 Remove POINTER_TYPE handling, add large unsigned handling and use
7954 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7955
57f872a2 79562012-10-12 Jakub Jelinek <jakub@redhat.com>
7957
7958 PR c/54381
7959 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7960 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7961 locs and array of 3 trees instead of just single loc and single
7962 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7963 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7964 For *cmp* builtins that take two sources strings report warnings
7965 about first and second source, not about destination and source.
7966
7354ad2e 79672012-10-12 Marc Glisse <marc.glisse@inria.fr>
7968
7969 PR c++/53055
7970 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7971
1ac7f120 79722012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7973
7974 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7975 declaring something coming from another file.
7976
1e0cc9e3 79772012-10-10 Arnaud Charlet <charlet@adacore.com>
7978
1ac7f120 7979 PR ada/54845
1e0cc9e3 7980 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7981
b0e7825e 79822012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7983
7984 PR c++/54194
7985 * c-common.c (warn_about_parentheses): Add location_t parameter;
7986 use EXPR_LOC_OR_LOC.
7987 * c-common.h: Update declaration.
7988
41ed701a 79892012-10-09 Marc Glisse <marc.glisse@inria.fr>
7990
7991 PR c++/54427
7992 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7993 more operations. Make error messages optional.
7994 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7995 (scalar_to_vector): Declare.
7996
3740094c 79972012-10-08 Jason Merrill <jason@redhat.com>
7998
7999 * c-common.c (c_common_reswords): Add thread_local.
8000
ffcdbf9c 80012012-10-08 Dodji Seketeli <dodji@redhat.com>
8002
8003 PR c++/53528 C++11 attribute support
8004 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8005 new functions.
8006 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8007 static function.
8008 (handle_aligned_attribute): In choose strictest alignment
8009 among many. Use new check_cxx_fundamental_alignment_constraints.
8010 (handle_transparent_union_attribute): In c++11 attribute syntax,
8011 don't look through typedefs.
8012
ef34afc1 80132012-10-04 Arnaud Charlet <charlet@adacore.com>
8014
8015 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8016 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8017 out of dumpfile.h.
8018
f1ff4562 80192012-09-25 Dehao Chen <dehao@google.com>
8020
8021 PR middle-end/54645
ef34afc1 8022 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
f1ff4562 8023 map when read in the pch.
8024
92a44a68 80252012-09-18 Arnaud Charlet <charlet@adacore.com>
735538a1 8026
8027 * c-ada-spec.c: Style fixes.
8028
92a44a68 80292012-09-18 Thomas Quinot <quinot@adacore.com>
9120cdc8 8030
8031 * c.opt (-fada-spec-parent): Define new command line switch.
8032 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8033 is specified, generate binding spec as a child of the specified unit.
8034
8eba82c2 80352012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8036 Manuel López-Ibáñez <manu@gcc.gnu.org>
8037
8038 PR c++/53210
8039 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8040
38682990 80412012-08-23 Arnaud Charlet <charlet@adacore.com>
8042
8043 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8044 for pointers, and add missing Convention C pragma.
8045 (print_ada_struct_decl): Add missing aliased keyword.
8046 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8047
f003f5dc 80482012-08-17 Jakub Jelinek <jakub@redhat.com>
8049
8050 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8051 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8052 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8053 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8054 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8055
ec11736b 80562012-08-10 Richard Guenther <rguenther@suse.de>
8057
8058 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8059
5f7f600e 80602012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8061
8062 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8063 instead of separate pp_newline and pp_flush.
8064 (print_c_tree): Likewise.
8065
758a38ab 80662012-07-26 Richard Henderson <rth@redhat.com>
8067
8068 * c-common.c (handle_hot_attribute): Allow labels.
8069 (handle_cold_attribute): Likewise.
8070
9ca77b08 80712012-07-20 Jakub Jelinek <jakub@redhat.com>
8072
8073 PR c++/28656
8074 * c-common.c (check_function_nonnull): Handle multiple nonnull
8075 attributes properly.
8076
b9ed1410 80772012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8078
8079 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8080 * c-ada-spec.c: Likewise.
8081 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8082
c2a65b90 80832012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8084
8085 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8086 Remove code conditional on it.
8087
88c5a1d1 80882012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8089
8090 * c-gimplify.c: Do not include basic-block.h.
8091 * c-common.c: Do not include linfuncs.h.
8092
4a020a8c 80932012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8094
8095 * c-common.h: Include tree.h.
8096
c28ddc97 80972012-07-02 Jason Merrill <jason@redhat.com>
8098
8099 PR c++/53524
8100 * c-common.c (get_priority): Call default_conversion.
8101
405ed67f 81022012-07-01 Uros Bizjak <ubizjak@gmail.com>
8103
8104 * c-pch.c (c_common_write_pch): Remove unused variables.
8105
e53d55e7 81062012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8107
8108 * cppspec.c: Moved from gcc/ to here.
8109
3d9c25ec 81102012-06-27 Kai Tietz <ktietz@redhat.com>
8111
8112 PR preprocessor/37215
8113 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8114
3169c57a 81152012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8116
8117 * c-common.h (c_common_print_pch_checksum): Remove.
8118 * c-pch.c: Do not include output.h.
8119 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8120 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8121 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8122 (struct c_pch_header): Remove.
8123 (get_ident): Update gpch version.
8124 (pch_init): Do not print executable_checksum to asm_out_file.
8125 Do not fail if there is no asm_out_file to read back from. Set
8126 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8127 (c_common_write_pch): Verify that nothing was written to asm_out_file
8128 since pch_init was called. Do not write a c_pch_header, and do not
8129 copy from asm_out_file to the PCH.
8130 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8131 the content of asm_out_file from the PCH.
8132 (c_common_print_pch_checksum): Remove.
8133 * c-opts.c (c_common_init): Print out executable_checksum directly.
8134
ff6624bc 81352012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8136
8137 * c-target.def (objc_declare_unresolved_class_reference,
8138 objc_declare_class_definition): Add new hooks.
8139
367b1459 81402012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8141
8142 * c-lex.c: Do not include output.h.
8143 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8144 Remove uses of ASM_OUTPUT_IDENT.
8145
bf0cb017 81462012-06-15 Marc Glisse <marc.glisse@inria.fr>
8147
8148 PR c++/51033
8149 * c-common.h (c_build_vec_perm_expr): Move decl here.
8150 * c-common.c (c_build_vec_perm_expr): Move definition
8151 here.
8152
b37a3600 81532012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8154
8155 * c.opt (fconserve-space): Turn into a no-op.
8156
19931eea 81572012-06-04 Sterling Augustine <saugustine@google.com>
5f9e7dd5 8158
8159 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8160 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8161 both the start and end of the function.
8162
dff12c10 81632012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8164
8165 * c-common.c: Do not include output.h.
8166 * c-pragma.c: Likewise.
8167
5f9e7dd5 81682012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8169
8170 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8171 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8172 (lang_decl_name): Handle namespace decls.
8173
b5369b7d 81742012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8175
8176 * c-ada-spec.c: Do not include output.h.
8177 * c-semantics.c: Likewise.
8178
8032877c 81792012-05-29 Joseph Myers <joseph@codesourcery.com>
8180
8181 * c-common.c: Fix typo.
8182
7843e4bc 81832012-05-29 Michael Matz <matz@suse.de>
8184
8185 * c-common.h (c_expand_decl): Remove prototype.
8186
8cf857d4 81872012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8188
8189 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8190 * c-opts.c (c_common_handle_option): Remove code handling
8191 warn_missing_braces.
8192
8b64dc3c 81932012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8194
8195 PR c++/25137
8196 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8197 -Wmissing_braces.
8198
43cbde16 81992012-05-22 Dodji Seketeli <dodji@redhat.com>
8200
8201 PR c++/53322
8202 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8203
db490cb6 82042012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8205
8206 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8207 * c-opts.c (c_common_handle_option): Do not handle explicitly
8208 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8209
a60f3e81 82102012-05-16 Dodji Seketeli <dodji@redhat.com>
8211
8212 PR preprocessor/7263
8213 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8214 to cpp_classify_number. For diagnostics, use the precise location
8215 instead of the global input_location.
8216
82e6ef7c 82172012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8218
cd4797ff 8219 PR c++/11856
82e6ef7c 8220 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8221
258a168d 82222012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8223
82e6ef7c 8224 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
258a168d 8225
d3b7ee7c 82262012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8227
8228 PR 53063
8229 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8230 Wreorder): Use LangEnabledBy.
8231 * c-opts.c (c_common_handle_option): Do not enable them
8232 explicitly. Call lang-specific generated functions.
8233 (c_common_post_options): Do not set them here.
8234
70059cea 82352012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8236
8237 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8238 Wmissing-field-initializers,Wmissing-parameter-type,
8239 Wold-style-declaration,Woverride-init): Use EnabledBy.
8240 * c-opts.c (c_common_post_options): Do not set here explicitly.
8241
fbb6fbd8 82422012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8243
8244 PR 53063
8245 * c-opts.c (c_common_handle_option): Use handle_generated_option
8246 to enable sub-options.
8247
61f69bc9 82482012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8249
8250 PR c++/53158
8251 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8252
5a1fe2db 82532012-05-10 Richard Guenther <rguenther@suse.de>
8254
8255 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8256 adjust commentary about TYPE_IS_SIZETYPE types.
8257
d42e7c5a 82582012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8259
8260 PR c++/53261
8261 * c-common.c (warn_logical_operator): Check that argument of
8262 integer_zerop is not NULL.
8263
686369e8 82642012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8265
8266 PR c/43772
8267 * c-common.c (warn_logical_operator): Do not warn if either side
8268 is already true or false.
8269
03fe1dc2 82702012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8271
8272 PR c/51712
8273 * c-common.c (expr_original_type): New.
8274 (shorten_compare): Do not warn for enumeration types.
8275
bba5a206 82762012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8277
8278 * c.opt (fpermissive): Add Var(flag_permissive).
8279
7059d45d 82802012-04-30 Marc Glisse <marc.glisse@inria.fr>
8281
8282 PR c++/51033
8283 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8284 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8285
7edb1062 82862012-04-30 Dodji Seketeli <dodji@redhat.com>
8287
8288 Add -Wvarargs option
8289 * c.opt (Wvarargs): Define new option.
8290
068bea1e 82912012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8292
8293 * c-common.c (check_function_arguments): Replace
8294 Wmissing-format-attribute with Wsuggest-attribute=format.
8295
b86527d8 82962012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8297
8298 * c.opt (Wsuggest-attribute=format): New. Alias of
8299 Wmissing-format-attribute.
8300 * c-format.c (decode_format_type): Replace
8301 Wmissing-format-attribute with Wsuggest-attribute=format.
8302 (check_function_format): Likewise.
8303
19931eea 83042012-04-27 Ollie Wild <aaw@google.com>
76d340ac 8305
8306 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8307 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8308 * c.opt: Add Wliteral-suffix.
8309
29438999 83102012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8311
8312 PR c/44774
8313 * c.opt (Wpedantic): New.
8314 (pedantic): Alias Wpedantic.
8315 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8316 (c_common_post_options): Likewise.
8317 (sanitize_cpp_opts): Likewise.
8318 * c-lex.c (interpret_float): Likewise.
8319 * c-format.c (check_format_types): Likewise.
8320 * c-common.c (pointer_int_sum): Likewise.
8321 (c_sizeof_or_alignof_type): Likewise.
8322 (c_add_case_label): Likewise.
8323 (c_do_switch_warnings): Likewise.
8324 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8325
4f9d6b8b 83262012-04-15 Jason Merrill <jason@redhat.com>
8327
8328 PR c++/52818
8329 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8330 (C_STD_NAME): Distinguish between C++98 and C++11.
8331
74bdbe96 83322012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8333
8334 PR target/52624
8335 * c-common.h (uint16_type_node): Rename into...
8336 (c_uint16_type_node): ...this.
8337 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8338 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8339
3d177e8c 83402012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8341
8342 * c-common.c (warn_if_unused_value): Move definition to here.
8343 * c-common.h (warn_if_unused_value): Move declaration to here.
8344
6a9a958f 83452012-03-23 William Bader <williambader@hotmail.com>
8346
8347 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8348
543efdbe 83492012-03-20 Jason Merrill <jason@redhat.com>
8350
8351 * c-common.h (enum cxx_dialect): Add cxx1y.
8352 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8353 test.
8354 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8355 * c-opts.c (c_common_post_options): Likewise.
8356 (set_std_cxx1y): New.
8357 (c_common_handle_option): Call it.
8358 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8359
62206d34 83602012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8361
8362 PR c++/14710
8363 * c.opt ([Wuseless-cast]): Add.
8364
fadf62f4 83652012-03-16 Richard Guenther <rguenther@suse.de>
8366
8367 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8368
249faa35 83692012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8370
8371 PR c++/44783
8372 * c.opt (ftemplate-backtrace-limit) Add.
8373
126b6848 83742012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8375
8376 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8377 handling.
8378 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8379 (init_pragma): Don't register extern_prefix.
8380
a51edb4c 83812012-03-12 Richard Guenther <rguenther@suse.de>
8382
8383 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8384 (builtin_type_for_size): Likewise.
8385
0f6a7cb7 83862012-02-13 Jakub Jelinek <jakub@redhat.com>
8387
8388 PR c++/52215
8389 * c-common.c (sync_resolve_params): Don't decide whether to convert
8390 or not based on TYPE_SIZE comparison, convert whenever arg_type
8391 is unsigned INTEGER_TYPE.
8392
0779e32c 83932012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8394
8395 PR c/52118
8396 * c.opt ([Wunused-local-typedefs]): Fix description.
8397
baec58e1 83982012-01-24 Mike Stump <mikestump@comcast.net>
8399
8400 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8401 exactly.
8402
c779d8cc 84032012-01-18 Richard Guenther <rguenther@suse.de>
8404
8405 * c-opts.c (c_common_post_options): Reset LTO flags if
8406 we are about to generate a PCH.
8407
ee917d24 84082012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8409
8410 PR c++/51777
8411 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8412 use pp_unsigned_wide_integer.
8413
90e2341f 84142012-01-10 Richard Guenther <rguenther@suse.de>
8415
8416 PR middle-end/51806
8417 * c-opts.c (c_common_handle_option): Move -Werror handling
8418 to language independent code.
8419
9ea022ce 84202012-01-05 Richard Guenther <rguenther@suse.de>
8421
8422 PR middle-end/51764
8423 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8424 from common.opt.
8425
3df19e1b 84262011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8427
8428 PR c++/51316
8429 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8430 of array types with an unknown bound.
8431
32074525 84322011-12-20 Joseph Myers <joseph@codesourcery.com>
8433
8434 * c-common.c (flag_isoc99): Update comment to refer to C11.
8435 (flag_isoc1x): Change to flag_isoc11.
8436 * c-common.h (flag_isoc99): Update comment to refer to C11.
8437 (flag_isoc1x): Change to flag_isoc11.
8438 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8439 C11.
8440 * c-opts.c (set_std_c1x): Change to set_std_c11.
8441 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8442 Call set_std_c11.
8443 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8444 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8445 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8446 standard.
8447 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8448 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8449 (std=gnu1x): Make alias of std=gnu11.
8450
fca86134 84512011-12-19 Jason Merrill <jason@redhat.com>
8452
8453 PR c++/51228
8454 * c-common.c (handle_transparent_union_attribute): Check the first
8455 field if the type is complete.
8456
aa4313eb 84572011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8458
8459 PR libstdc++/51365
8460 * c-common.c (RID_IS_FINAL): Add.
8461 * c-common.h (RID_IS_FINAL): Add.
8462
3f3d5ad4 84632011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8464
8465 * c.opt (fgnu-runtime): Provide full description.
8466 (fnext-runtime): Likewise.
8467 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8468
c4606d19 84692011-11-28 Andrew MacLeod <amacleod@redhat.com>
8470
8471 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8472 predefines in one place. Add LOCK_FREE predefines.
8473 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8474 new func.
8475
1d581089 84762011-11-24 Andrew MacLeod <amacleod@redhat.com>
8477
8478 PR c/51256
19931eea 8479 * c-common.c (get_atomic_generic_size): Check for various error
1d581089 8480 conditions
19931eea 8481 (resolve_overloaded_atomic_exchange,
8482 resolve_overloaded_atomic_compare_exchange,
1d581089 8483 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8484 error_mark_node for error conditions.
19931eea 8485
6aa221fa 84862011-11-08 Richard Guenther <rguenther@suse.de>
8487
8488 PR middle-end/51010
8489 c-family/
8490
4c0315d0 84912011-11-07 Richard Henderson <rth@redhat.com>
8492 Aldy Hernandez <aldyh@redhat.com>
8493 Torvald Riegel <triegel@redhat.com>
8494
8495 Merged from transactional-memory.
8496
8497 * c-common.c (handle_tm_wrap_attribute,
8498 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8499 (struct c_common_reswords): Added __transaction* keywords.
8500 (struct c_common_attribute_table): Added transaction* and tm_regparm
8501 attributes.
8502 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8503 masks.
8504 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8505 find_tm_attribute): Declare.
8506
920f5a70 85072011-11-07 Jason Merrill <jason@redhat.com>
8508
8509 PR c++/35688
8510 * c-common.c, c-common.h: Revert yesterday's changes.
8511
b4f861b4 85122011-11-06 Jason Merrill <jason@redhat.com>
8513
8514 PR c++/35688
8515 * c-common.c (decl_has_visibility_attr): Split out from...
8516 (c_determine_visibility): ...here.
8517 * c-common.h: Declare it.
8518
83e25171 85192011-11-06 Joseph Myers <joseph@codesourcery.com>
8520
8521 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8522 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8523 type.
8524 (check_user_alignment): New. Split out of
8525 handle_aligned_attribute. Disallow integer constants with
8526 noninteger types. Conditionally allow zero.
8527 (handle_aligned_attribute): Use check_user_alignment.
8528 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8529
1cd6e20d 85302011-11-06 Andrew MacLeod <amacleod@redhat.com>
8531 Richard Henderson <rth@redhat.com>
8532
8533 Merged from cxx-mem-model.
8534
8535 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
19931eea 8536 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
1cd6e20d 8537 parameters that are the same type size.
8538 (get_atomic_generic_size): New. Find size of generic
8539 atomic function parameters and do typechecking.
8540 (add_atomic_size_parameter): New. Insert size into parameter list.
8541 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8542 either __atomic_exchange_n or external library call.
19931eea 8543 (resolve_overloaded_atomic_compare_exchange): Restructure
1cd6e20d 8544 __atomic_compare_exchange to either _n variant or external library call.
19931eea 8545 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
1cd6e20d 8546 __atomic_load_n or an external library call.
8547 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8548 __atomic_store_n or an external library call.
8549 (resolve_overloaded_builtin): Handle new __atomic builtins.
8550
7549df0d 85512011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8552
8553 PR c++/50608
8554 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8555 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8556 <INDIRECT_REF>: Return the argument.
8557 <ARRAY_REF>: Remove special code for negative offset.
8558 Call fold_build_pointer_plus instead of size_binop.
8559 (fold_offsetof): Remove STOP_REF argument and adjust.
8560 * c-common.h (fold_offsetof_1): Declare.
8561 (fold_offsetof): Remove STOP_REF argument.
8562
7e783eb3 85632011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8564
8565 PR c++/50810
8566 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8567 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8568 Wnarrowing for C++0x and C++98.
8569 * c.opt ([Wnarrowing]): Update.
8570
8fe701f5 85712011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8572
8573 PR c++/44277
8574 * c.opt: Add Wzero-as-null-pointer-constant.
8575
0d84dc2d 85762011-10-31 Jason Merrill <jason@redhat.com>
8577
67031f52 8578 * c.opt (-fdeduce-init-list): Off by default.
8579
0d84dc2d 8580 PR c++/50920
8581 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8582 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8583 and -Wc++11-compat.
8584 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8585
66f24c41 85862011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8587
8588 PR c++/30066
8589 * c.opt (fvisibility-inlines-hidden): Description change.
8590
244db24d 85912011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8592
8593 Implement C++11 user-defined literals.
8594 * c-common.c (build_userdef_literal): New.
8595 * c-common.def: New tree code.
8596 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8597 * c-lex.c (interpret_float): Add suffix parm.
8598 (c_lex_with_flags): Build literal tokens.
8599
235be70f 86002011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8601
8602 PR c++/50841
8603 Revert:
8604 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8605
8606 PR c++/50810
8607 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8608 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8609 Wnarrowing for C++0x and C++98.
8610 * c.opt ([Wnarrowing]): Update.
8611
4fe0fb1c 86122011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8613
8614 PR c++/50810
8615 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8616 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8617 Wnarrowing for C++0x and C++98.
8618 * c.opt ([Wnarrowing]): Update.
8619
5f7504f9 86202011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8621
8622 PR c++/45385
8623 * c-common.c (conversion_warning): Remove code looking for
8624 artificial operands.
8625
2a688977 86262011-10-18 Dodji Seketeli <dodji@redhat.com>
8627
8628 PR bootstrap/50760
8629 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
19931eea 8630 !NO_IMPLICIT_EXTERN_C.
2a688977 8631
326e3391 86322011-10-17 Michael Spertus <mike_spertus@symantec.com>
8633
8634 * c-common.c (c_common_reswords): Add __bases,
8635 __direct_bases.
8636 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8637
86382011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8639
8640 PR c++/50757
8641 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8642
62db153a 86432011-10-15 Tom Tromey <tromey@redhat.com>
8644 Dodji Seketeli <dodji@redhat.com>
8645
8646 * c.opt (fdebug-cpp): New option.
8647 * c-opts.c (c_common_handle_option): Handle the option.
8648 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8649 output stream in parameter. Factorized from ...
8650 (maybe_print_line): ... this. Dump location debug information when
8651 -fdebug-cpp is in effect.
8652 (print_line_1): New static function. Takes an output stream in
8653 parameter. Factorized from ...
8654 (print_line): ... here. Dump location information when -fdebug-cpp
8655 is in effect.
8656 (scan_translation_unit): Dump location information when
8657 -fdebug-cpp is in effect.
8658
ce70f433 86592011-10-15 Tom Tromey <tromey@redhat.com>
8660 Dodji Seketeli <dodji@redhat.com>
8661
8662 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8663 without argument.
8664 * c-opts.c (c_common_handle_option)<case
8665 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8666 cases. Handle -ftrack-macro-expansion with and without argument.
8667
97bfb9ef 86682011-10-15 Tom Tromey <tromey@redhat.com>
8669 Dodji Seketeli <dodji@redhat.com>
8670
8671 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8672 (print_line, cb_define, do_line_change): Adjust to avoid touching
8673 the internals of struct line_map. Use the public API instead.
8674 * c-pch.c (c_common_read_pch): Likewise.
8675 * c-lex.c (fe_file_change): Likewise.
8676
326e3391 86772011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8678
8679 PR c++/17212
8680 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8681
86822011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8683
8684 PR c++/33067
8685 * c-pretty-print.c (pp_c_floating_constant): Output
8686 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8687
b9a16870 86882011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8689
8690 * c-common.c (def_builtin_1): Delete old interface with two
8691 parallel arrays to hold standard builtin declarations, and replace
8692 it with a function based interface that can support creating
8693 builtins on the fly in the future. Change all uses, and poison
8694 the old names. Make sure 0 is not a legitimate builtin index.
8695 * c-omp.c (c_finish_omp_barrier): Ditto.
8696 (c_finish_omp_taskwait): Ditto.
8697 (c_finish_omp_flush): Ditto.
8698
c7964868 86992011-10-11 Tristan Gingold <gingold@adacore.com>
8700
8701 * c.opt: (fallow-parameterless-variadic-functions): New.
8702
a4e3ffad 87032011-09-08 Dodji Seketeli <dodji@redhat.com>
8704
8705 PR c++/33255 - Support -Wunused-local-typedefs warning
8706 * c-common.h (struct c_language_function::local_typedefs): New
8707 field.
19931eea 8708 (record_locally_defined_typedef, maybe_record_typedef_use)
8709 (maybe_warn_unused_local_typedefs): Declare new functions.
a4e3ffad 8710 * c-common.c (record_locally_defined_typedef)
19931eea 8711 (maybe_record_typedef_use)
8712 (maybe_warn_unused_local_typedefs): Define new functions.
a4e3ffad 8713 * c.opt: Declare new -Wunused-local-typedefs flag.
8714
737a23cc 87152011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8716
8717 PR middle-end/50266
8718 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8719 computations.
8720
7542c3b4 87212011-09-05 Richard Guenther <rguenther@suse.de>
8722
8723 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8724 of integer_minus_one_node for empty array upper bounds.
8725
1dc92c59 87262011-08-28 Dodji Seketeli <dodji@redhat.com>
8727
8728 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8729 it's the first time it's being called on this main TU.
8730
2bdf2b6e 87312011-08-24 Richard Guenther <rguenther@suse.de>
8732
8733 PR c/49396
8734 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8735
87362011-08-22 Gabriel Charette <gchare@google.com>
6ea2c7a3 8737
8738 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8739 defined in cpp_init_builtins and c_cpp_builtins.
8740
bff4ad11 87412011-08-19 Joseph Myers <joseph@codesourcery.com>
8742
8743 * c-common.c (c_common_reswords): Add __builtin_complex.
8744 * c-common.h (RID_BUILTIN_COMPLEX): New.
8745
985c6e3a 87462011-08-18 Joseph Myers <joseph@codesourcery.com>
8747
8748 * c-common.c (c_common_reswords): Add _Noreturn.
8749 (keyword_is_function_specifier): Handle RID_NORETURN.
8750 * c-common.h (RID_NORETURN): New.
8751
92a44a68 87522011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
7dfa155b 8753
8754 * c-common.c (unsafe_conversion_p): New function. Check if it is
8755 unsafe to convert an expression to the type.
8756 (conversion_warning): Adjust, use unsafe_conversion_p.
8757 * c-common.h (unsafe_conversion_p): New function declaration.
8758
2169f33b 87592011-08-02 Jakub Jelinek <jakub@redhat.com>
8760
8761 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8762 (c_finish_omp_taskyield): New prototype.
8763 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8764 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8765 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8766 or RHS1 have side-effects, evaluate those too in the right spot,
8767 if it is a decl and LHS is also a decl, error out if they
8768 aren't the same.
8769 (c_finish_omp_taskyield): New function.
8770 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8771 * c-pragma.c (omp_pragmas): Add taskyield.
8772 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8773 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8774 PRAGMA_OMP_CLAUSE_MERGEABLE.
8775
ab77850e 87762011-07-25 Dodji Seketeli <dodji@redhat.com>
8777
8778 * c-common.h (set_underlying_type): Remove parm name from
8779 declaration.
8780
6ee97920 87812011-07-25 Romain Geissler <romain.geissler@gmail.com>
8782
8783 * c-pretty-print.h: Search c-common.h in c-family.
19931eea 8784
dc251364 87852011-07-22 Jason Merrill <jason@redhat.com>
8786
1a2a35f0 8787 PR c++/49793
8788 * c.opt (Wnarrowing): New.
8789
27282252 8790 PR c++/30112
8791 * c-common.h: Declare c_linkage_bindings.
8792 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8793
dc251364 8794 PR c++/49813
8795 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8796 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8797 as flag_isoc99 for 'restrict'.
8798 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8799
fc501191 88002011-07-21 Ian Lance Taylor <iant@google.com>
8801
8802 PR middle-end/49705
8803 * c-common.c (c_disable_warnings): New static function.
8804 (c_enable_warnings): New static function.
8805 (c_fully_fold_internal): Change local unused_p to bool. Call
8806 c_disable_warnings and c_enable_warnings rather than change
8807 c_inhibit_evaluation_warnings.
8808
07b8f133 88092011-07-20 Jason Merrill <jason@redhat.com>
8810
8811 PR c++/6709 (DR 743)
8812 PR c++/42603 (DR 950)
8813 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8814 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8815 (CPP_DECLTYPE): New.
8816 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8817
2cc66f2a 88182011-07-19 Richard Guenther <rguenther@suse.de>
8819
8820 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8821 * c-omp.c (c_finish_omp_for): Likewise.
8822
3c802a1e 88232011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8824
8825 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8826 body on the next line.
8827
98a33d9f 88282011-07-08 Jason Merrill <jason@redhat.com>
8829
3115bda0 8830 PR c++/45437
8831 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8832
98a33d9f 8833 PR c++/49673
8834 * c-common.c (c_apply_type_quals_to_decl): Don't check
8835 TYPE_NEEDS_CONSTRUCTING.
8836
c38a75b7 88372011-07-06 Richard Guenther <rguenther@suse.de>
8838
8839 * c-common.c (c_common_nodes_and_builtins):
8840 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8841
e593356b 88422011-07-05 Richard Guenther <rguenther@suse.de>
8843
8844 * c-common.c (c_common_nodes_and_builtins): Build all common
8845 tree nodes first.
8846
fca0886c 88472011-06-27 Jakub Jelinek <jakub@redhat.com>
8848
a68f7a8d 8849 * c-common.h (c_tree_chain_next): New static inline function.
8850
fca0886c 8851 * c-common.c (check_builtin_function_arguments): Handle
8852 BUILT_IN_ASSUME_ALIGNED.
8853
2797f13a 88542011-06-21 Andrew MacLeod <amacleod@redhat.com>
8855
8856 * c-common.c: Add sync_ or SYNC__ to builtin names.
8857 * c-omp.c: Add sync_ or SYNC__ to builtin names.
9cad95b7 8858
88592011-06-20 Pierre Vittet <piervit@pvittet.com>
8860
8861 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8862 handler.
8863 (gen_pragma_handler): New union.
8864 (internal_pragma_handler): New type.
8865 (c_register_pragma_with_data)
8866 (c_register_pragma_with_expansion_and_data): New functions.
8867
8868 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8869 (c_register_pragma, c_register_pragma_with_expansion)
8870 (c_invoke_pragma_handler): Changed to work with
8871 internal_pragma_handler.
8872 (c_register_pragma_with_data)
8873 (c_register_pragma_with_expansion_and_data): New functions.
8874
218e3e4e 88752011-06-14 Joseph Myers <joseph@codesourcery.com>
8876
8877 * c-common.c: Include common/common-target.h.
8878 (handle_section_attribute): Use
8879 targetm_common.have_named_sections.
8880 * c-cppbuiltin.c: Include common/common-target.h.
8881 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8882
41e53ed2 88832011-06-10 Richard Guenther <rguenther@suse.de>
8884
8885 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8886 to print a IDENTIFIER_NODE.
8887
a6f06169 88882011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8889 Joseph Myers <joseph@codesourcery.com>
8890
8891 * c.opt (fbuilding-libgcc): New option.
8892 * c-cppbuiltin.c (c_cpp_builtins): Define
8893 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8894
1ea9269b 88952011-06-07 Jason Merrill <jason@redhat.com>
8896
8ce59854 8897 * c-common.c (max_tinst_depth): Lower default to 900.
8898
1ea9269b 8899 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8900
1af0124d 89012011-06-07 Richard Guenther <rguenther@suse.de>
8902
8903 * c-common.c (c_common_nodes_and_builtins): Do not set
8904 size_type_node or call set_sizetype.
8905
0e9a4c01 89062011-06-07 Dodji Seketeli <dodji@redhat.com>
8907
8908 PR debug/49130
8909 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
19931eea 8910 type when using pointer comparison to compare types.
0e9a4c01 8911
90b40725 89122011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8913
8914 * c.opt: Add -Wdelete-non-virtual-dtor.
8915 * c-opts.c (c_common_handle_option): Include it in -Wall.
8916
fc9c9e87 89172011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8918
8919 PR bootstrap/49190
8920
8921 Revert:
8922 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8923
8924 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8925 not tree_common.
8926
d0389adc 89272011-05-27 Jakub Jelinek <jakub@redhat.com>
8928
8929 PR c++/49165
8930 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8931 C++ don't call c_common_truthvalue_conversion on void type arms.
8932
cacfdc02 89332011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8934
8935 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8936 (stmt_list_stack): Define.
8937 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8938 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8939
027fc6ef 89402011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8941
8942 * c-common.c (warning_candidate_p): Check for BLOCKs.
8943
f21317a1 89442011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8945
8946 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8947 not tree_common.
8948
789e953d 89492011-05-25 Jakub Jelinek <jakub@redhat.com>
8950
8951 * c-common.c (def_fn_type): Remove extra va_end.
8952
7f506bca 89532011-05-23 Jason Merrill <jason@redhat.com>
8954
8955 PR c++/48106
8956 * c-common.c (c_common_get_narrower): New.
8957 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8958
774e9d58 89592011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8960
8961 * c-common.h (check_function_arguments): Tweak prototype of
8962 check_function_arguments.
8963 * c-common.c (check_function_arguments): Likewise. Adjust
8964 calls to check_function_nonnull, check_function_format, and
8965 check_function_sentinel.
8966 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8967 separate attributes and typelist arguments. Use
8968 FOREACH_FUNCTION_ARGS to iterate over argument types.
8969
23407dc9 89702011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8971
8972 * c-common.c (c_common_reswords): Reorder.
8973 * c-common.h (rid): Likewise.
8974
3a939d12 89752011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8976
8977 * c-common.c (def_fn_type): Don't call build_function_type, call
8978 build_function_type_array or build_varargs_function_type_array
8979 instead.
8980 (c_common_nodes_and_builtins): Likewise.
8981
b6e3dd65 89822011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8983
8984 * c-common.c (c_add_case_label): Omit the loc argument to
8985 build_case_label.
8986 * c-common.h (build_case_label): Remove.
8987 * c-semantics.c (build_case_label): Remove.
8988
4232a958 89892011-05-05 Joseph Myers <joseph@codesourcery.com>
8990
8991 * c-objc.h (objc_start_method_definition): Update prototype.
8992 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8993
d0af78c5 89942011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8995
8996 * c-common.c (check_main_parameter_types): Reindent. Don't use
8997 TYPE_ARG_TYPES directly.
8998 (handle_nonnull_attribute): Likewise.
8999 (sync_resolve_params): Likewise.
9000 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9001 to check_format_string.
9002 (handle_format_attribute): Likewise.
9003 (check_format_string): Take a function type to examine instead of
9004 a type list. Use a function_arg_iterator to step through argument
9005 types.
9006
ceb7b692 90072011-05-04 Richard Guenther <rguenther@suse.de>
9008
9009 * c-common.c (fix_string_type): Use size_int for index type bounds.
9010 (start_fname_decls): Do not pass NULL to build_int_cst.
9011 (c_init_attributes): Likewise.
9012 * c-lex.c (c_lex_with_flags): Likewise.
9013
c66c81be 90142011-04-27 Jason Merrill <jason@redhat.com>
9015
9016 * c-common.c (make_tree_vector_from_list): New.
9017 * c-common.h: Declare it.
9018
16930c72 90192011-04-26 Richard Guenther <rguenther@suse.de>
9020
9021 PR preprocessor/48248
9022 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9023 for output size with -P.
9024
23407dc9 90252011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9026
9027 * c-common.c (struct c_common_resword): Add __underlying_type.
9028 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9029
dd045aee 90302011-04-20 Jim Meyering <meyering@redhat.com>
9031
9032 * c-format.c (init_dollar_format_checking): Remove useless
9033 if-before-free.
9034
394dd737 90352011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9036
9037 * c-objc.h (objc_get_interface_ivars): Removed.
23407dc9 9038 (objc_detect_field_duplicates): New.
394dd737 9039 * stub-objc.c: Likewise.
23407dc9 9040
a758bf7d 90412011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9042
9043 * stub-objc.c (objc_declare_protocols): Renamed to
9044 objc_declare_protocol.
9045 * c-objc.h: Likewise.
23407dc9 9046
29d7200d 90472011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9048
9049 * stub-objc.c (objc_declare_class): Updated argument name.
9050
9b88d08d 90512011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9052
9053 * c-common.h (c_common_init_ts): Declare.
9054 * c-common.c (c_common_init_ts): Define.
9055
4185cf58 90562011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9057
9058 * c-objc.h (objc_build_message_expr): Updated prototype.
9059 * stub-objc.c (objc_build_message_expr): Likewise.
19931eea 9060
5a90471f 90612011-04-12 Martin Jambor <mjambor@suse.cz>
9062
9063 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9064 of cgraph_node.
9065
783bb57e 90662011-04-11 Richard Guenther <rguenther@suse.de>
9067
9068 * c-common.c (complete_array_type): Build a range type of
9069 proper type.
9070
c33080b9 90712011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9072
9073 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9074 (handle_type_generic_attribute): Likewise.
9075
f8913d47 90762011-04-07 Jason Merrill <jason@redhat.com>
9077
9078 PR c++/48450
9079 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9080 conversion from C++0x scoped enum.
9081
c94b1d0e 90822011-04-06 Joseph Myers <joseph@codesourcery.com>
9083
9084 * c-target-def.h: New file.
9085 * c-target.def: New file.
9086 * c-target.h: New file.
9087 * c-common.c (targetcm): Don't define here.
9088 * c-common.h (default_handle_c_option): Declare.
9089 * c-format.c: Include c-target.h instead of target.h.
9090 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9091 include tm.h.
9092 (default_handle_c_option): Move from targhooks.c.
9093
acb10f41 90942011-03-29 Jakub Jelinek <jakub@redhat.com>
9095
9096 PR preprocessor/48248
9097 * c-ppoutput.c (print): Add src_file field.
9098 (init_pp_output): Initialize it.
9099 (maybe_print_line): Don't optimize by adding up to 8 newlines
9100 if map->to_file and print.src_file are different file.
9101 (print_line): Update print.src_file.
9102
82715bcd 91032011-03-25 Kai Tietz <ktietz@redhat.com>
9104
9105 * c-ada-spec.c (compare_comment): Use filename_cmp
9106 instead of strcmp for filename.
9107
451c8e2f 91082011-03-25 Jeff Law <law@redhat.com>
9109
1f78217c 9110 * c-common.c (def_fn_type): Add missing va_end.
451c8e2f 9111
3c47771c 91122011-03-25 Jason Merrill <jason@redhat.com>
9113
9114 * c.opt: Add -std=c++03.
9115
97e6200f 91162011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9117
9118 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9119
92a44a68 91202011-03-17 Kai Tietz <ktietz@redhat.com>
ac86af5d 9121
9122 PR target/12171
ee212425 9123 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9124 Display allowed attributes for function pointer types.
9125 (pp_c_attributes_display): New function to display
9126 attributes having affects_type_identity flag set to true.
9127 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9128
ac86af5d 9129 * c-common.c (c_common_attribute_table):
9130 Add new element.
9131 (c_common_format_attribute_table): Likewise.
9132
914d1151 91332011-03-18 Jason Merrill <jason@redhat.com>
9134
69788bdf 9135 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9136 * c-common.h: Don't declare it here.
9137 * c-common.c: Or define it here.
9138 * c-opts.c (c_common_handle_option): Or set it here.
9139
914d1151 9140 PR c++/35315
9141 * c-common.c (handle_transparent_union_attribute): Don't
9142 make a duplicate type in C++.
9143
54cf6eed 91442011-03-15 Jason Merrill <jason@redhat.com>
9145
9146 * c-common.c (max_constexpr_depth): New.
9147 * c-common.h: Declare it.
9148 * c-opts.c (c_common_handle_option): Set it.
9149 * c.opt (fconstexpr-depth): New option.
9150
02cb1060 91512011-03-11 Jason Merrill <jason@redhat.com>
9152
9bf1c74e 9153 * c-common.c (attribute_takes_identifier_p): Add missing const.
9154
02cb1060 9155 PR c++/46803
9156 * c-common.c (attribute_takes_identifier_p): Assume that an
9157 unknown attribute takes an identifier.
9158
ecf2703d 91592011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9160
9161 PR c/47786
9162 * c-common.c (c_type_hash): Call list_length instead of iterating
9163 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9164
2b19dfe4 91652011-02-19 Jakub Jelinek <jakub@redhat.com>
9166
9167 PR c/47809
9168 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9169
29cf2335 91702011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9171
9172 * c.opt (fobjc-abi-version=) New.
9173 (fobjc-nilcheck): New.
9174
fad3f658 91752011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9176
9177 PR c++/46890
9178 * c-common.h (keyword_is_decl_specifier): Declare.
9179 * c-common.c (keyword_is_decl_specifier): Define.
9180 (keyword_is_function_specifier): New function.
9181
a12319b3 91822011-01-26 Jakub Jelinek <jakub@redhat.com>
9183
9184 PR c/47473
9185 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9186 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9187 REAL_TYPE.
9188
5c128dc8 91892011-01-26 Arnaud Charlet <charlet@adacore.com>
9190
9191 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9192
8d67b0c7 91932011-01-26 Jakub Jelinek <jakub@redhat.com>
9194
9195 PR pch/47430
9196 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9197 after init_c_lex if pch_file is set.
9198
0675168d 91992011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9200
e8911163 9201 PR c++/43601
0675168d 9202 * c.opt (-fkeep-inline-dllexport): New switch.
9203
0725e25c 92042011-01-12 Richard Guenther <rguenther@suse.de>
9205
9206 PR middle-end/32511
9207 * c-common.c (handle_weak_attribute): Warn instead of error
9208 on declaring an inline function weak.
9209
fdd84b77 92102011-01-05 Tom Tromey <tromey@redhat.com>
9211
9212 * c-common.h (lvalue_error): Update.
9213 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9214 not error.
9215
e6e73d14 92162010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
19931eea 9217
d67e8485 9218 PR objc/47075
9219 * c-objc.h (objc_finish_message_expr): Added argument to
9220 prototype.
9221
a36cf284 92222010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9223
9224 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9225 Use prototype_p.
9226
33b3681f 92272010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9228
9229 * c-objc.h (objc_maybe_warn_exceptions): New.
19931eea 9230 * stub-objc.c (objc_maybe_warn_exceptions): New.
33b3681f 9231
a1f90215 92322010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9233
9234 * c-common.h (readonly_error): Declare.
9235 * c-common.c (readonly_error): Define.
9236
b1bbc8e5 92372010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9238
9239 * c-common.h (invalid_indirection_error): Declare.
9240 * c-common.c (invalid_indirection_error): Define.
9241
b0d55af9 92422010-12-03 Richard Guenther <rguenther@suse.de>
9243
9244 PR c/46745
9245 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9246 (pp_c_unary_expression): Likewise.
9247 (pp_c_expression): Likewise.
9248
d7489d8d 92492010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9250
9251 * c-common.h (objc_finish_function): New.
9252 (objc_non_volatilized_type): Removed.
9253 (objc_type_quals_match): Removed.
9254 * stub-objc.c (objc_finish_function): New.
9255 (objc_non_volatilized_type): Removed.
9256 (objc_type_quals_match): Removed.
19931eea 9257
92468061 92582010-11-30 Joseph Myers <joseph@codesourcery.com>
9259
9260 * c-common.h (parse_optimize_options): Declare.
9261 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9262 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9263
967958e4 92642010-11-29 Joseph Myers <joseph@codesourcery.com>
9265
9266 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9267 GET_ENVIRONMENT.
9268 * c-pch.c (O_BINARY): Don't define here.
9269 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9270
b213bf24 92712010-11-25 Joseph Myers <joseph@codesourcery.com>
9272
9273 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9274 targetm.except_unwind_info.
9275
9faf44d6 92762010-11-23 Joseph Myers <joseph@codesourcery.com>
9277
9278 * c-opts.c (c_common_handle_option): Pass location to
9279 set_struct_debug_option.
9280
79396169 92812010-11-23 Joseph Myers <joseph@codesourcery.com>
9282
9283 * c-common.c (visibility_options): Move from ../opts.c.
9284 * c-common.h (struct visibility_flags, visibility_options):
9285 Declare here.
9286 * c-opts.c (finish_options): Rename to c_finish_options.
9287 (c_common_init): Update call to finish_options.
9288
b4aa4123 92892010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9290
9291 PR objc/34033
9292 * c-lex.c (lex_string): Check that each string in an Objective-C
9293 string concat sequence starts with either one or zero '@', and
9294 that there are no spurious '@' signs at the end.
9295
3e0e49f2 92962010-11-20 Joseph Myers <joseph@codesourcery.com>
9297
9298 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9299 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9300 HANDLE_PRAGMA_VISIBILITY.
9301 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9302 HANDLE_PRAGMA_VISIBILITY): Don't define.
9303 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9304
a9ffdd35 93052010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9306
9307 PR c++/16189
9308 PR c++/36888
9309 PR c++/45331
9310 * c-common.h (keyword_begins_type_specifier): Declare.
9311 (keyword_is_storage_class_specifier): Declare.
9312 (keyword_is_type_qualifier): Declare.
9313 * c-common.c (keyword_begins_type_specifier): New function.
9314 (keyword_is_storage_class_specifier): New function.
9315 (keyword_is_type_qualifier): Declare.
9316
93be21c0 93172010-11-19 Joseph Myers <joseph@codesourcery.com>
9318
9319 PR c/46547
9320 * c-common.c (in_late_binary_op): Define.
9321 (c_common_truthvalue_conversion): Check in_late_binary_op before
9322 calling c_save_expr.
9323 * c-common.h (in_late_binary_op): Declare.
9324
d7175aef 93252010-11-19 Joseph Myers <joseph@codesourcery.com>
9326
9327 * c-opts.c (c_common_handle_option): Update calls to
9328 set_struct_debug_option.
9329
c213e196 93302010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9331
9332 * c-common.h (objc_declare_protocols): Added additional argument.
9333 * stub-objc.c (objc_declare_protocol): Same change.
19931eea 9334
0b5fc5d6 93352010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9336
9337 PR c/33193
9338 * c-common.h (build_real_imag_expr): Declare.
9339 * c-semantics.c (build_real_imag_expr): Define.
9340
b8ba44e7 93412010-11-17 Joseph Myers <joseph@codesourcery.com>
9342
9343 * c-opts.c (c_common_parse_file): Take no arguments.
9344 * c-common.h (c_common_parse_file): Update prototype.
9345
6ef8d12f 93462010-11-16 Jakub Jelinek <jakub@redhat.com>
9347
9348 PR c++/46401
9349 * c-common.c (warning_candidate_p): Don't track non-const calls
9350 or STRING_CSTs.
9351
929d2a90 93522010-11-15 Ian Lance Taylor <iant@google.com>
9353
9354 * c-lex.c (init_c_lex): Set macro debug callbacks if
9355 flag_dump_go_spec is set.
9356
e4a7640a 93572010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9358
9359 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9360 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9361
597d2d81 93622010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9363
9364 PR preprocessor/45038
9365 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9366 dialects.
9367
c123f04d 93682010-11-12 Joseph Myers <joseph@codesourcery.com>
9369
9370 * c-common.h (c_family_lang_mask): Declare.
9371 * c-opts.c (c_family_lang_mask): Make extern.
9372 * c-pragma.c (handle_pragma_diagnostic): Use
9373 control_warning_option.
9374
3c6c0e40 93752010-11-12 Joseph Myers <joseph@codesourcery.com>
9376
9377 * c-common.c (parse_optimize_options): Update call to
9378 decode_options.
9379 * c-common.h (c_common_handle_option): Update prototype.
9380 * c-opts.c (c_common_handle_option): Take location_t parameter and
9381 pass it to other functions.
9382
19ec5c9e 93832010-11-11 Joseph Myers <joseph@codesourcery.com>
9384
9385 * c-opts.c (warning_as_error_callback): Remove.
9386 (c_common_initialize_diagnostics): Don't call
9387 register_warning_as_error_callback.
9388 (c_common_handle_option): Handle -Werror=normalized= here.
9389
bf776685 93902010-11-10 Joseph Myers <joseph@codesourcery.com>
9391
9392 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9393 in diagnostic.
9394 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9395 letter.
9396 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9397 Remove trailing '.' from diagnostics.
9398 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9399
6bd9d862 94002010-11-10 Joseph Myers <joseph@codesourcery.com>
9401
9402 * c-common.c (parse_optimize_options): Pass global_dc to
9403 decode_options.
9404 * c-opts.c (c_common_handle_option): Pass &global_options to
9405 set_Wstrict_aliasing.
9406 * c.opt (v): Don't mark Common or document here.
9407
1f6616ee 94082010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9409
9410 PR target/44981
9411 * c-format.c (format_type): New type gcc_objc_string_format_type.
9412 (valid_stringptr_type_p): New.
9413 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
19931eea 9414 (check_format_string): Pass expected type, use
1f6616ee 9415 valid_stringptr_type_p (), check that the format string types are
9416 consistent with the format specification.
9417 (decode_format_attr): Warn if NSString is used outside objective-c.
9418 (format_types_orig): Add NSString.
9419 (format_name): New.
9420 (format_flags): New.
9421 (check_format_arg): Handle format strings requiring an external parser.
9422 first_target_format_type: New variable.
9423 (handle_format_attribute): Set up first_target_format_type, pass the
9424 expected format arg string type to check_format_string().
9425 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9426 * stub-objc.c (objc_string_ref_type_p): New.
9427 (objc_check_format_arg): New.
9428
b0d0931f 94292010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9430
19931eea 9431 Fixed using the Objective-C 2.0 dot-syntax with class names.
b0d0931f 9432 * c-common.h (objc_build_class_component_ref): New.
9433 * stub-objc.c (objc_build_class_component_ref): New.
9434
f26877d5 94352010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9436
9437 * c.opt (Wproperty-assign-default): New option.
9438
1ef143b6 94392010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9440
9441 Implemented -fobjc-std=objc1 flag.
9442 * c.opt (fobjc-std=objc1): New option.
9443
8c582e4f 94442010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9445
9446 Implemented format and noreturn attributes for Objective-C methods.
9447 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9448 attribute for Objective-C methods.
9449
8637f1db 94502010-10-31 Jason Merrill <jason@redhat.com>
9451
9452 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9453 EXPR_LOC_OR_HERE.
9454
9d9f5bb3 94552010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9456
9457 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9458 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9459 (objc_add_property_declaration): Removed arguments for copies and
9460 ivar.
9461 (objc_build_getter_call): Renamed to
9462 objc_maybe_build_component_ref.
9463 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9464 (objc_is_property_ref): New.
9465 * c-common.c (c_common_reswords): Removed copies and ivar.
9466 * stub-objc.c (objc_add_property_declaration): Removed arguments
9467 for copies and ivar.
9468 (objc_build_getter_call): Renamed to
9469 objc_maybe_build_component_ref.
9470 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9471 (objc_is_property_ref): New.
19931eea 9472
56f907a0 94732010-10-29 Arnaud Charlet <charlet@adacore.com>
9474 Matthew Gingell <gingell@adacore.com>
9475
9476 * c-ada-spec.c (separate_class_package): New function.
9477 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9478 name of their enclosing package.
9479 (print_ada_declaration): Use separate_class_package.
9480
b5fa273e 94812010-10-27 Jason Merrill <jason@redhat.com>
9482
5290e253 9483 * c-common.c (c_common_reswords): Add __is_literal_type.
9484 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9485
b5fa273e 9486 * c-common.c (check_case_value): Remove special C++ code.
9487
7590f0e5 94882010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9489
9490 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9491 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9492 and RID_LAST_PATTR.
9493 (objc_add_property_declaration): Added additional arguments.
9494 (objc_property_attribute_kind): Removed.
9495 (objc_set_property_attr): Removed.
9496 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9497 copy and nonatomic.
9498 * stub-objc.c (objc_add_property_declaration): Added additional
9499 arguments.
9500 (objc_set_property_attr): Removed.
19931eea 9501
1d894bcf 95022010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9503
9504 * c-common.h (objc_add_property_variable): Renamed to
9505 objc_add_property_declaration. Added location argument.
9506 * stub-objc.c (objc_add_property_variable): Same change.
8204c077 9507
e23bf1fb 95082010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9509
9510 * c-common.h (objc_maybe_printable_name): New.
9511 * stub-objc.c (objc_maybe_printable_name): New.
9512
92a44a68 95132010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9514 Andrew Pinski <pinskia@gmail.com>
93426222 9515
9516 * c-common.h (c_common_mark_addressable_vec): Declare.
9517 * c-common.c (c_common_mark_addressable_vec): New function.
9518
45b2b110 95192010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9520
9521 * c-common.h (objc_set_method_type): Removed.
9522 (objc_add_method_declaration): Added boolean argument.
9523 (objc_start_method_definition): Same change.
9524 (objc_build_method_signature): Same change.
9525 * stub-objc.c (objc_set_method_type): Removed.
9526 (objc_add_method_declaration): Added boolean argument.
9527 (objc_start_method_definition): Same change.
9528 (objc_build_method_signature): Same change.
9529
64cd9619 95302010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9531
9532 * c-common.h (finish_file): Removed.
9533 (objc_write_global_declarations): New.
9534 * c-opts.c (c_common_parse_file): Do not call finish_file.
9535 * stub-objc.c (objc_write_global_declarations): New.
19931eea 9536
e1f293c0 95372010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9538
9539 Implemented parsing @synthesize and @dynamic for
9540 Objective-C/Objective-C++.
9541 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9542 (objc_add_synthesize_declaration): New.
9543 (objc_add_dynamic_declaration): New.
9544 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9545 * stub-objc.c (objc_add_synthesize_declaration): New.
9546 (objc_add_dynamic_declaration): New.
19931eea 9547
ef97a312 95482010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9549
9550 PR target/46041
9551 * c-cppbuiltin.c (mode_has_fma): Move function here from
9552 builtins.c. Don't use the fma optab, instead just use the
9553 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9554 using -save-temps.
9555
69b07042 95562010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9557
9558 Merge from 'apple/trunk' branch on FSF servers.
ef97a312 9559
92a44a68 9560 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
69b07042 9561
19931eea 9562 Radar 4330422
69b07042 9563 * c-common.h (objc_non_volatilized_type): New declaration
9564 * stub-objc.c (objc_non_volatilized_type): New stub.
9565
f15f2e56 95662010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9567
69b07042 9568 Merge from 'apple/trunk' branch on FSF servers.
f15f2e56 9569
92a44a68 9570 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
f15f2e56 9571
19931eea 9572 Radar 4133425
f15f2e56 9573 * c-common.h (objc_diagnose_private_ivar): New decl.
ef97a312 9574 * stub-objc.c (objc_diagnose_private_ivar): New stub.
f15f2e56 9575
4a8875ed 95762010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9577
9578 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9579 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9580 (objc_ivar_visibility_kind): New enum.
9581 (objc_set_visibility): Adjust prototype to use visibility enum.
ef97a312 9582 * stub-objc.c (objc_set_visibility): Adjust stub to use
4a8875ed 9583 visibility enum.
9584
7e0713b1 95852010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9586
9587 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9588 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9589 has the appropriate fma builtins.
9590 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9591
86c110ac 95922010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9593
7e0713b1 9594 merge from FSF apple 'trunk' branch.
92a44a68 9595 2006 Fariborz Jahanian <fjahanian@apple.com>
7e0713b1 9596
86c110ac 9597 Radars 4436866, 4505126, 4506903, 4517826
9598 * c-common.c (c_common_resword): Define @property and its attributes.
9599 * c-common.h: Define property attribute enum entries.
9600 (OBJC_IS_PATTR_KEYWORD): New.
9601 (objc_property_attribute_kind): New enum.
9602 Declare objc_set_property_attr (), objc_add_property_variable (),
9603 objc_build_getter_call () and objc_build_setter_call ().
9604 * stub-objc.c (objc_set_property_attr): New stub.
9605 (objc_add_property_variable): Likewise.
9606 (objc_build_getter_call): Likewise.
9607 (objc_build_setter_call) Likewise.
7e0713b1 9608
40c8d1dd 96092010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9610
7e0713b1 9611 merge from FSF apple 'trunk' branch.
92a44a68 9612 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
40c8d1dd 9613
9614 Radar 3803157 (method attributes)
9615 * c-common.c (handle_deprecated_attribute): Recognize
9616 objc methods as valid declarations.
9617 * c-common.h: Declare objc_method_decl ().
7e0713b1 9618 * stub-objc.c (objc_method_decl): New stub.
40c8d1dd 9619
f3f006ad 96202010-10-08 Joseph Myers <joseph@codesourcery.com>
9621
9622 * c-common.c (parse_optimize_options): Call
9623 decode_cmdline_options_to_array_default_mask before
9624 decode_options. Update arguments to decode_options.
9625 * c-common.h (c_common_init_options_struct): Declare.
9626 * c-opts.c (c_common_init_options_struct): New. Split out from
9627 c_common_init_options.
9628
0a65c3bb 96292010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9630
9631 Implemented fast enumeration for Objective-C.
9632 * c-common.h (objc_finish_foreach_loop): New.
9633 * stub-objc.c (objc_finish_foreach_loop): New.
9634
24ca3b4e 96352010-10-05 Joseph Myers <joseph@codesourcery.com>
9636
9637 * c-common.h (struct diagnostic_context): Don't declare here.
9638 (c_common_initialize_diagnostics): Declare using
9639 diagnostic_context typedef.
9640 * c-opts.c (c_common_handle_option): Pass global_dc to
9641 handle_generated_option.
9642
f83b64ca 96432010-10-04 Joseph Myers <joseph@codesourcery.com>
9644
9645 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9646 handle_generated_option.
9647
2fdec027 96482010-10-03 Ian Lance Taylor <iant@google.com>
9649
9650 * c.opt (-fplan9-extensions): New option.
9651
41acdfa4 96522010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9653
9654 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9655 Remove.
9656 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9657 of duplicating code.
9658
069761fb 96592010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9660
9661 * c-common.c: Add two new entries for @optional
9662 and @required keywords.
9663
9664 merge from FSF 'apple/trunk' branch.
92a44a68 9665 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
069761fb 9666
9667 Radar 4386773
9668 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9669 objective-c keywords.
9670 (objc_set_method_opt): New declaration.
9671 * stub-objc.c (objc_set_method_opt): New stub.
19931eea 9672
2c5d2e39 96732010-09-30 Joseph Myers <joseph@codesourcery.com>
9674
9675 * c-common.c (handle_optimize_attribute): Pass &global_options to
9676 cl_optimization_save and cl_optimization_restore.
9677 * c-opts.c (c_common_handle_option): Pass &global_options to
9678 handle_generated_option.
9679 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9680 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9681 &global_options to cl_optimization_restore.
9682
e5c75ac3 96832010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9684
9685 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9686 Objective-C/Objective-C++ keywords.
9687
3511333e 96882010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
e147d6aa 9689
19931eea 9690 Merge from 'apple/trunk' branch on FSF servers.
9691
92a44a68 9692 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
e147d6aa 9693
9694 Radar 4281748
9695 * c-common.h (objc_check_global_decl): New declaration.
9696 * stub-objc.c (objc_check_global_decl): New stub.
9697
5461e683 96982010-09-29 Joseph Myers <joseph@codesourcery.com>
9699
9700 * c.opt: Don't use VarExists.
9701
5ae82d58 97022010-09-29 Joseph Myers <joseph@codesourcery.com>
9703
9704 * c-common.c (c_cpp_error): Update names of diagnostic_context
9705 members.
9706 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9707 cl_optimization members.
9708 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9709 sanitize_cpp_opts, finish_options): Update names of cpp_options
9710 members.
9711
b27e241e 97122010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9713
9714 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9715 (objc_is_reserved_word): Removed.
9716 * c-common.c: Updated comments.
9717 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9718 objc_is_reserved_word.
9719 * stub-objc.c (objc_is_reserved_word): Removed.
9720
03fc2271 97212010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9722
19931eea 9723 * c-common.h (objc_add_method_declaration): Adjust prototype to
03fc2271 9724 include attributes.
9725 (objc_start_method_definition): Likewise.
9726 (objc_build_keyword_decl): Likewise.
9727 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9728 (objc_start_method_definition): Likewise.
9729 (objc_build_keyword_decl): Likewise.
9730
a336eb4b 97312010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9732
9733 * c-common.h (objc_start_class_interface): Adjust prototype.
9734 (objc_start_category_interface): Likewise.
9735 (objc_start_protocol): Likewise.
9736 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9737 (objc_start_class_interface): Likewise.
9738 (objc_start_category_interface): Likewise.
9739
48b14f50 97402010-09-27 Ian Lance Taylor <iant@google.com>
9741
9742 * c-common.c (c_common_attribute_table): Add no_split_stack.
9743 (handle_no_split_stack_attribute): New static function.
9744
4abfc532 97452010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9746
19931eea 9747 Merge from 'apple/trunk' branch on FSF servers.
4abfc532 9748
92a44a68 9749 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
4abfc532 9750
19931eea 9751 Radar 4229905
4abfc532 9752 * c-common.h (objc_have_common_type): New declaration.
9753 * stub-objc.c (objc_have_common_type): New stub.
9754
9755 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9756
9757 Radar 4154928
9758 * c-common.h (objc_common_type): New prototype.
19931eea 9759 * stub-objc.c (objc_common_type): New stub.
4abfc532 9760
7bd95dfd 97612010-09-24 Jan Hubicka <jh@suse.cz>
9762
9763 * c-common.c (handle_leaf_attribute): New function.
9764 (struct attribute_spec c_common_att): Add leaf.
9765
5789e05b 97662010-09-22 Joseph Myers <joseph@codesourcery.com>
9767
9768 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9769 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9770 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9771 -include-barrier, -include-directory, -include-directory=,
9772 -include-directory-after, -include-directory-after=,
9773 -include-prefix, -include-prefix=, -include-with-prefix,
9774 -include-with-prefix=, -include-with-prefix-after,
9775 -include-with-prefix-after=, -include-with-prefix-before,
9776 -include-with-prefix-before=, -no-integrated-cpp,
9777 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9778 -output=, -pedantic, -pedantic-errors, -preprocess,
9779 -print-missing-file-dependencies, -trace-includes, -traditional,
9780 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9781 -user-dependencies, -verbose, -write-dependencies,
9782 -write-user-dependencies, no-integrated-cpp, traditional): New.
9783
e6fb54ba 97842010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9785
9786 PR objc/23710
9b60f3b0 9787 * c-common.h (objc_start_method_definition): Return bool instead
9788 of void.
9789 * stub-objc.c (objc_start_method_definition): Return bool instead
9790 of void.
9791
97922010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9793
9794 PR objc/25965
9795 * c-common.h (objc_get_interface_ivars): New declaration.
9796 * stub-objc.c (objc_get_interface_ivars): New stub.
e6fb54ba 9797
e44b0a1f 97982010-09-15 Ian Lance Taylor <iant@google.com>
9799
9800 * c-common.c (parse_optimize_options): Do not capitalize warning
ebd7c4c1 9801 messages. Remove period at end of warning message.
e44b0a1f 9802
85c0a25c 98032010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9804
9805 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9806 (handle_alias_attribute): ... here.
9807 (handle_ifunc_attribute): New.
9808
5ba33bf4 98092010-09-06 Mark Mitchell <mark@codesourcery.com>
9810
9811 * c-common.h (do_warn_double_promotion): Declare.
9812 * c-common.c (do_warn_double_promotion): Define.
9813
c920faa3 98142010-09-05 Mark Mitchell <mark@codesourcery.com>
9815
9816 * c.opt (Wdouble-promotion): New.
9817
9604e070 98182010-09-02 Joseph Myers <joseph@codesourcery.com>
9819
9820 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9821 fvtable-thunks, fxref): Mark no longer supported in help text.
9822
3b0273a1 98232010-09-02 Joseph Myers <joseph@codesourcery.com>
9824
9825 * c.opt (Wimport, fall-virtual, falt-external-templates,
9826 fdefault-inline, fenum-int-equiv, fexternal-templates,
9827 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9828 fname-mangling-version-, fnew-abi, fnonnull-objects,
9829 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9830 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9831 applicable.
9832 (fhandle-exceptions): Mark with Alias and Warn.
9833 * c-opts.c (c_common_handle_option): Don't handle options marked
9834 as ignored.
9835
67089c6b 98362010-09-02 Joseph Myers <joseph@codesourcery.com>
9837
9838 * c.opt (Wcomments, Werror-implicit-function-declaration,
9839 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9840 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9841 aliases.
9842 * c-common.c (option_codes): Use OPT_Wcomment instead of
9843 OPT_Wcomments.
9844 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9845 Don't handle options marked as aliases.
9846
2af087f2 98472010-08-25 Richard Guenther <rguenther@suse.de>
9848
9849 * c-common.c (c_common_get_alias_set): Remove special
9850 handling for pointers.
9851
48148244 98522010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9853
9854 * c-common.c: Use FOR_EACH_VEC_ELT.
9855 * c-gimplify.c: Likewise.
9856 * c-pragma.c: Likewise.
9857
89c69892 98582010-08-16 Joseph Myers <joseph@codesourcery.com>
9859
9860 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9861 RejectDriver.
9862 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9863 RejectDriver.
9864 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9865 instead of OPT_MDX and OPT_MMDX.
9866
e28aa114 98672010-08-16 Joseph Myers <joseph@codesourcery.com>
9868
9869 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9870
99b66d21 98712010-08-12 Joseph Myers <joseph@codesourcery.com>
9872
9873 * c.opt (MD, MMD): Change to MDX and MMDX.
9874 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9875
666f4bf0 98762010-08-11 Joseph Myers <joseph@codesourcery.com>
9877
9878 * c-opts.c (c_common_handle_option): Call handle_generated_option
9879 instead of handle_option.
9880
5ec815f6 98812010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9882
9883 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9884 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9885
d13143cf 98862010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9887
9888 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9889 (pending_redefine_extname): Change type to a VEC.
9890 (add_to_renaming_pragma_list): Update for new type of
9891 pending_redefine_extname.
5ec815f6 9892 (maybe_apply_renaming_pragma): Likewise.
d13143cf 9893
2008c983 98942010-08-04 Arnaud Charlet <charlet@adacore.com>
9895
9896 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9897 visited.
9898 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9899 decide whether a type has already been declared/seen.
9900 Do not go to the original type.
9901 (dump_nested_types): New parameter forward.
9902 Generate forward declaration if needed and mark type as visited.
9903 (print_ada_declaration): Call dump_nested_types if not already done.
9904 Mark types as visited.
9905
9b091a73 99062010-08-03 Joseph Myers <joseph@codesourcery.com>
9907
9908 * c.opt (-print-pch-checksum): Remove option.
9909 * c-opts.c (c_common_handle_option): Don't handle
9910 OPT_print_pch_checksum.
9911
b78351e5 99122010-07-27 Joseph Myers <joseph@codesourcery.com>
9913
9914 * c-common.h (c_common_handle_option): Update prototype and return
9915 value type.
9916 * c-opts.c (c_common_handle_option): Update prototype and return
9917 value type. Update calls to handle_option and
9918 enable_warning_as_error.
9919
34416a90 99202010-07-27 Jakub Jelinek <jakub@redhat.com>
9921
9922 PR c/45079
9923 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9924
fecf9011 99252010-07-27 Joseph Myers <joseph@codesourcery.com>
9926
9927 * c-common.h (c_common_missing_argument): Remove.
9928 * c-opts.c (c_common_missing_argument): Remove.
9929 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9930 idirafter, imacros, include, isysroot, isystem, iquote): Add
9931 MissingArgError.
9932 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9933
e88d34f6 99342010-07-27 Joseph Myers <joseph@codesourcery.com>
9935
9936 * c-common.h (c_common_option_lang_mask,
9937 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9938 New.
9939 (c_common_init_options): Update prototype.
9940 * c-opts.c (c_common_option_lang_mask): New.
9941 (c_common_initialize_diagnostics): Split out of
9942 c_common_init_options.
9943 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9944 New.
9945 (c_common_init_options): Update prototype. Use decoded options in
9946 search for -lang-asm.
9947
1767a056 99482010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9949
9950 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9951 * c-format.c: Likewise.
9952
0b205f4c 99532010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9954
9955 * c-common.h: Include diagnostic-core.h. Error if already
9956 included.
9957 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9958
1c58e3f1 99592010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9960
1f78217c 9961 * c-common.c (IN_GCC_FRONTEND): Do not undef.
1c58e3f1 9962 Do not include expr.h
9963 (vector_mode_valid_p): Move here.
9964
33cc157c 99652010-06-21 DJ Delorie <dj@redhat.com>
9966
9967 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9968 allow these pragmas anywhere.
9969
99702010-06-14 Jakub Jelinek <jakub@redhat.com>
9971
9972 PR bootstrap/44509
9973 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9974 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9975 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9976 ggc_strdup instead of xstrdup.
9977
99782010-06-10 Jakub Jelinek <jakub@redhat.com>
9979
9980 * c-cppbuiltin.c: Include cpp-id-data.h.
9981 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9982 (lazy_hex_fp_value): New function.
9983 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9984
9b40bfbf 99852010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9986
9987 * c-gimplify.c: Do not include tree-flow.h
9988
202d6e5f 99892010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9990
9991 PR other/44034
9992 * c-common.c: Rename targetm member:
9993 targetm.enum_va_list -> targetm.enum_va_list_p
9994
d3237426 99952010-06-28 Anatoly Sokolov <aesok@post.ru>
9996
9997 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9998
596981c8 99992010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10000
10001 * c-cppbuiltin.c: Do not include except.h.
10002
b9bdfa0b 100032010-06-24 Andi Kleen <ak@linux.intel.com>
10004
19931eea 10005 * c-common.c (warn_for_omitted_condop): New.
10006 * c-common.h (warn_for_omitted_condop): Add prototype.
b9bdfa0b 10007
55ad092d 100082010-06-21 Joseph Myers <joseph@codesourcery.com>
10009
10010 * c.opt (lang-objc): Remove.
10011 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10012
9e7c2572 100132010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10014
10015 * c-opts.c: Include "tm_p.h".
10016
615ef0bb 100172010-06-20 Joseph Myers <joseph@codesourcery.com>
10018
10019 * c-common.c (parse_optimize_options): Update call to
10020 decode_options.
10021
aef48c9a 100222010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10023
10024 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10025 new type of types_used_by_cur_var_decl.
10026
d74003b4 100272010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10028
10029 PR bootstrap/44512
10030 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10031 for C++ standard compliance.
10032
1194d077 100332010-06-16 Jason Merrill <jason@redhat.com>
10034
10035 * c.opt: Add -Wnoexcept.
10036
d473d901 100372010-06-16 Richard Guenther <rguenther@suse.de>
10038
10039 PR c/44555
10040 * c-common.c (c_common_truthvalue_conversion): Remove
10041 premature and wrong optimization concering ADDR_EXPRs.
10042
b62dbfd3 100432010-06-15 Arnaud Charlet <charlet@adacore.com>
10044
10045 * c-ada-spec.c (dump_sloc): Remove column info.
10046 (is_simple_enum): New function.
10047 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10048 enum types when relevant.
10049
200dd99c 100502010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10051
19931eea 10052 * c-common.c (conversion_warning): Warn at expression
200dd99c 10053 location.
10054
abf6a617 100552010-06-10 Joseph Myers <joseph@codesourcery.com>
10056
10057 * c-opts.c (c_common_handle_option): Don't handle
10058 OPT_fshow_column.
10059
ba72912a 100602010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10061
10062 * c-pragma.c (push_alignment): Use typed GC allocation.
10063 (handle_pragma_push_options): Likewise.
10064
10065 * c-common.c (parse_optimize_options): Likewise.
10066
10067 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10068 option.
10069
4aafe913 100702010-06-07 Joseph Myers <joseph@codesourcery.com>
10071
10072 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10073 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10074 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10075 flag_signed_bitfields, warn_strict_null_sentinel,
10076 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10077 flag_gen_declaration, flag_no_gnu_keywords,
10078 flag_implement_inlines, flag_implicit_templates,
10079 flag_implicit_inline_templates, flag_optional_diags,
10080 flag_elide_constructors, flag_default_inline, flag_rtti,
10081 flag_conserve_space, flag_access_control, flag_check_new,
10082 flag_new_for_scope, flag_weak, flag_working_directory,
10083 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10084 flag_enforce_eh_specs, flag_threadsafe_statics,
10085 flag_pretty_templates): Remove.
10086 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10087 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10088 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10089 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10090 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10091 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10092 flag_no_gnu_keywords, flag_implement_inlines,
10093 flag_implicit_templates, flag_implicit_inline_templates,
10094 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10095 flag_rtti, flag_conserve_space, flag_access_control,
10096 flag_check_new, flag_new_for_scope, flag_weak,
10097 flag_working_directory, flag_use_cxa_atexit,
10098 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10099 flag_threadsafe_statics, flag_pretty_templates,
10100 warn_strict_null_sentinel): Remove.
10101 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10102 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10103 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10104 fimplicit-inline-templates, fimplicit-templates,
10105 flax-vector-conversions, fms-extensions, fnil-receivers,
10106 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10107 frtti, fshort-double, fshort-enums, fshort-wchar,
10108 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10109 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10110 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10111 gen-decls, undef): Use Var.
10112 (fdefault-inline, foptional-diags): Document as doing nothing.
10113 * c-opts.c (c_common_handle_option): Remove cases for options now
10114 using Var. Mark ignored options as such.
10115
7bedc3a0 101162010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10117
19931eea 10118 * c-common.c: Moved to here from parent directory.
7bedc3a0 10119 * c-common.def: Likewise.
10120 * c-common.h: Likewise.
10121 * c-cppbuiltin.c: Likewise.
10122 * c-dump.c: Likewise.
10123 * c-format.c: Likewise.
10124 * c-format.h : Likewise.
10125 * c-gimplify.c: Likewise.
10126 * c-lex.c: Likewise.
10127 * c-omp.c: Likewise.
10128 * c.opt: Likewise.
10129 * c-opts.c: Likewise.
10130 * c-pch.c: Likewise.
10131 * c-ppoutput.c: Likewise.
10132 * c-pragma.c: Likewise.
10133 * c-pragma.h: Likewise.
10134 * c-pretty-print.c: Likewise.
10135 * c-pretty-print.h: Likewise.
10136 * c-semantics.c: Likewise.
10137 * stub-objc.c: Likewise.
10138
10139 * c-common.c: Include gt-c-family-c-common.h.
10140 * c-pragma.c: Include gt-c-family-c-pragma.h.
10141\f
fbd26352 10142Copyright (C) 2010-2019 Free Software Foundation, Inc.
7bedc3a0 10143
10144Copying and distribution of this file, with or without modification,
10145are permitted in any medium without royalty provided the copyright
10146notice and this notice are preserved.