]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
34facf20
DM
12019-04-05 David Malcolm <dmalcolm@redhat.com>
2
3 PR c/89985
4 * c-warn.c (check_address_or_pointer_of_packed_member): Add
5 auto_diagnostic_group. Guard inform calls by result of
6 warning_at call.
7
05564120
MP
82019-04-05 Marek Polacek <polacek@redhat.com>
9
10 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
11 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
12 of RHS.
13
7a506c3c
JM
142019-04-03 Jason Merrill <jason@redhat.com>
15
16 PR c++/86586 - -fcompare-debug=-Wsign-compare.
17 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
18
ddeae8c8
MS
192019-04-01 Martin Sebor <msebor@redhat.com>
20
21 PR c/89685
22 * c-attribs.c (handle_copy_attribute): Handle references and
23 non-constant expressions.
24
a15ffa22
JJ
252019-03-22 Jakub Jelinek <jakub@redhat.com>
26
27 PR c++/87481
28 * c.opt (-fconstexpr-ops-limit=): New option.
29
36a3a7a3
JJ
302019-03-21 Jakub Jelinek <jakub@redhat.com>
31
32 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
33 template param.
34
bec1da64
MS
352019-03-19 Martin Sebor <msebor@redhat.com>
36
37 PR tree-optimization/89688
38 * c-common.c (braced_list_to_string): Make static.
39 (braced_lists_to_strings): Define new function.
40 * c-common.h (braced_list_to_string): Remove.
41 (braced_lists_to_strings): Declare.
42
1fe61adf
ML
432019-03-12 Martin Liska <mliska@suse.cz>
44
45 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
46
93964ebd
ML
472019-03-11 Martin Liska <mliska@suse.cz>
48
49 * c-opts.c (c_common_post_options): Wrap apostrophes
50 in gcc internal format with %'.
51
a3f9f006
ML
522019-03-11 Martin Liska <mliska@suse.cz>
53
54 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
55 in a string format message and fix GNU coding style.
56 * c-common.c (vector_types_convertible_p): Likewise.
57 (c_build_vec_perm_expr): Likewise.
58 * c-indentation.c (get_visual_column): Likewise.
59 * c-opts.c (c_common_handle_option): Likewise.
60 (c_common_post_options): Likewise.
61 (sanitize_cpp_opts): Likewise.
62 * c-pch.c (c_common_pch_pragma): Likewise.
63 * c-pragma.c (handle_pragma_pack): Likewise.
64
1db01ff9
JJ
652019-03-08 Jakub Jelinek <jakub@redhat.com>
66
67 PR tree-optimization/89550
68 * c-common.c (c_common_truthvalue_conversion): Only set
69 TREE_NO_WARNING if warning_at returned true.
70 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
71
ba790e6f
JJ
722019-02-25 Sandra Loosemore <sandra@codesourcery.com>
73 Martin Sebor <msebor@gmail.com>
74
75 * c.opt (Wmissing-attributes): Clean up doc string.
76
7da73ba7
JJ
772019-02-25 Jakub Jelinek <jakub@redhat.com>
78
79 PR c/89495
80 * c-format.c (maybe_read_dollar_number): Compute nargnum in
81 HOST_WIDE_INT type to avoid overflows and change overflow_flag
82 checking.
83
921bb9d1
RB
842019-02-22 Richard Biener <rguenther@suse.de>
85
86 * c-pch.c (no_checksum): Remove.
87 (pch_init): Remove assertion that executable_checksum is not
88 all zero.
89 (c_common_valid_pch): Likewise.
90
e2ebb05c
MS
912019-02-18 Martin Sebor <msebor@redhat.com>
92
93 PR middle-end/89294
94 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
95
3fe53000
DM
962019-02-16 David Malcolm <dmalcolm@redhat.com>
97
98 PR c++/88680
99 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
100 implementing -Wtype-limits.
101
28a8cef1
MS
1022019-02-11 Martin Sebor <msebor@redhat.com>
103
104 PR c++/87996
105 * c-common.c (invalid_array_size_error): New function.
106 (valid_array_size_p): Call it. Handle size as well as type.
107 * c-common.h (valid_constant_size_p): New function.
108 (enum cst_size_error): New type.
109
ec2be203
DM
1102019-01-31 David Malcolm <dmalcolm@redhat.com>
111
112 PR c/89122
113 * known-headers.cc (get_stdlib_header_for_name): Add
114 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
115
8936f047
JJ
1162019-01-31 Jakub Jelinek <jakub@redhat.com>
117
118 PR libstdc++/88170
119 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
120 a C cast in pp_c_flag_gnu_v3 mode.
121
6a335b96
JJ
1222019-01-29 Jakub Jelinek <jakub@redhat.com>
123
124 PR c/86125
125 * c-common.c (c_common_nodes_and_builtins): Build type variants for
126 builtin_structptr_types types even for C.
127
2a06eba5
BE
1282019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
129
130 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
131 when rhs is of array type correctly. Fix handling of nested structures.
132 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
133 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
134 type casts within nested compound expressions.
135
18a23298
JJ
1362019-01-22 Jakub Jelinek <jakub@redhat.com>
137
138 PR middle-end/88968
139 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
140 variable after using BIT_FIELD_REF.
141
420183d9
L
1422019-01-18 H.J. Lu <hongjiu.lu@intel.com>
143
144 PR c/51628
145 PR c/88664
146 * c-common.h (warn_for_address_or_pointer_of_packed_member):
147 Remove the boolean argument.
148 * c-warn.c (check_address_of_packed_member): Renamed to ...
149 (check_address_or_pointer_of_packed_member): This. Also
150 warn pointer conversion.
151 (check_and_warn_address_of_packed_member): Renamed to ...
152 (check_and_warn_address_or_pointer_of_packed_member): This.
153 Also warn pointer conversion.
154 (warn_for_address_or_pointer_of_packed_member): Remove the
155 boolean argument. Don't check pointer conversion here.
156
99063eee
RS
1572019-01-15 Richard Sandiford <richard.sandiford@arm.com>
158
159 PR inline-asm/52813
160 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
161
a30d0196
JJ
1622019-01-14 Jakub Jelinek <jakub@redhat.com>
163
164 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
165 and __cpp_nontype_template_parameter_auto. Add a comment that
166 __cpp_template_auto is deprecated.
167
2d91f79d
TH
1682019-01-14 Tom Honermann <tom@honermann.net>
169
170 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
171 * c-common.c (c_common_reswords): Add char8_t.
172 (fix_string_type): Use char8_t for the type of u8 string literals.
173 (c_common_get_alias_set): char8_t doesn't alias.
174 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
175 C++.
176 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
177 (keyword_begins_type_specifier): Add RID_CHAR8.
178 * c-common.h (rid): Add RID_CHAR8.
179 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
180 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
181 Define char8_type_node and char8_array_type_node.
182 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
183 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
184 (c_cpp_builtins): Predefine __cpp_char8_t.
185 * c-lex.c (lex_string): Use char8_array_type_node as the type of
186 CPP_UTF8STRING.
187 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
188 * c-opts.c: If not otherwise specified, enable -fchar8_t when
189 targeting C++2a.
190 * c.opt: Add the -fchar8_t command line option.
191
23db6ced
MS
1922019-01-14 Martin Sebor <msebor@redhat.com>
193
194 PR target/88638
195 * c-attribs.c (positional_argument): Call valid_format_string_type_p
196 and issue errors if it fails.
197 * c-common.h (valid_format_string_type_p): Declare.
198 * c-format.c (valid_stringptr_type_p): Rename...
199 (valid_format_string_type_p): ...to this and make extern.
200 (handle_format_arg_attribute): Adjust to new name.
201 (check_format_string): Same.
202
234c3818
L
2032019-01-13 H.J. Lu <hongjiu.lu@intel.com>
204
205 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
206 Replace "may may" with "may" in warning message.
207
d8fcab68
JJ
2082019-01-07 Jakub Jelinek <jakub@redhat.com>
209
210 PR c++/85052
211 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
212 (c_build_vec_convert): Declare.
213 * c-common.c (c_build_vec_convert): New function.
214
29d24852
MS
2152019-01-04 Martin Sebor <msebor@redhat.com>
216
217 PR c/88546
218 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
219 Handle C++ empty throw specification and C11 _Noreturn.
220 (has_attribute): Also handle C11 _Noreturn.
221
9069a4c9
MS
2222019-01-04 Martin Sebor <msebor@redhat.com>
223
224 PR c/88363
225 * c-attribs.c (positional_argument): Also accept enumerated types.
226
a5544970
JJ
2272019-01-01 Jakub Jelinek <jakub@redhat.com>
228
229 Update copyright years.
230
da77eace
L
2312018-12-20 H.J. Lu <hongjiu.lu@intel.com>
232
233 PR c/51628
234 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
235 * c-warn.c (check_alignment_of_packed_member): New function.
236 (check_address_of_packed_member): Likewise.
237 (check_and_warn_address_of_packed_member): Likewise.
238 (warn_for_address_or_pointer_of_packed_member): Likewise.
239 * c.opt: Add -Wno-address-of-packed-member.
240
573767d4
DM
2412018-12-20 David Malcolm <dmalcolm@redhat.com>
242
243 PR c++/87504
244 * c-warn.c (get_outermost_macro_expansion): New function.
245 (spelled_the_same_p): Use it to unwind the macro expansions, and
246 compare the outermost macro in each nested expansion, rather than
247 the innermost.
248
a14feb3c
DM
2492018-12-19 David Malcolm <dmalcolm@redhat.com>
250
251 PR c++/87504
252 * c-common.h (warn_tautological_cmp): Convert 1st param from
253 location_t to const op_location_t &.
254 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
255 when testing for INTEGER_CST.
256 (warn_tautological_bitwise_comparison): Convert 1st param from
257 location_t to const op_location_t &; use it to build a
258 binary_op_rich_location, and use this.
259 (spelled_the_same_p): New function.
260 (warn_tautological_cmp): Convert 1st param from location_t to
261 const op_location_t &. Warn for macro expansions if
262 spelled_the_same_p. Use binary_op_rich_location.
263
dfd7fdca
DM
2642018-12-19 David Malcolm <dmalcolm@redhat.com>
265
266 PR c++/43064
267 PR c++/43486
268 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
269 (verify_tree): Handle location wrappers.
270 (c_common_truthvalue_conversion): Strip any location wrapper.
271 Handle CONST_DECL.
272 (fold_offsetof): Strip any location wrapper.
273 (complete_array_type): Likewise for initial_value.
274 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
275 index before checking for INTEGER_CST.
276 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
277 print parentheses around location wrappers.
278 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
279 before checking for INTEGER_CST.
280 (warn_tautological_bitwise_comparison): Call
281 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
282 before checking for INTEGER_CST.
283 (readonly_error): Strip any location wrapper.
284 (warn_array_subscript_with_type_char): Strip location wrappers
285 before checking for INTEGER_CST. Use the location of the index if
286 available.
287
5c8b3702
JM
2882018-12-06 Jason Merrill <jason@redhat.com>
289
290 PR c++/88136 - -Wdeprecated-copy false positives
291 * c.opt (Wdeprecated-copy-dtor): New.
292 (Wdeprecated-copy): Move to -Wextra.
293
673670da
MS
2942018-11-29 Martin Sebor <msebor@redhat.com>
295
296 PR c/88172
297 PR testsuite/88208
298 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
299 alignments to values less than the target requires.
300 (has_attribute): For attribute aligned consider both the attribute
301 and the alignment bits.
302 * c-common.c (c_init_attributes): Optionally issue a warning for
303 zero alignment.
304
04864ec8
MS
3052018-11-28 Martin Sebor <msebor@redhat.com>
306
307 PR c/88065
308 PR c/87297
309 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
310 or destination is an error.
311
ace83db0
JJ
3122018-11-28 Jakub Jelinek <jakub@redhat.com>
313
314 PR c++/88215
315 * c-ubsan.c: Include langhooks.h.
316 (ubsan_instrument_division): Change gcc_assert that main variants
317 of op0 and op1 types are equal to gcc_checking_assert that the
318 main variants are compatible types.
319
da193a27
EB
3202018-11-27 Eric Botcazou <ebotcazou@adacore.com>
321
322 * c-ada-spec.c: Include stringpool.h.
323 (has_static_fields): Return false for incomplete types.
324 (is_tagged_type): Likewise.
325 (has_nontrivial_methods): Likewise.
326 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
327 (struct overloaded_name_hash): New structure.
328 (struct overloaded_name_hasher): Likewise.
329 (overloaded_names): New global variable.
330 (init_overloaded_names): New static function.
331 (overloaded_name_p): New predicate.
332 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
333 on the TYPE_STUB_DECL of the original type of a typedef, if any.
334 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
335 Remove always-true condition and dump forward types.
336 (dump_ada_specs): Delete overloaded_names.
337
98f08eb8
MS
3382018-11-20 Martin Sebor <msebor@redhat.com>
339
340 * c-attribs.c (type_for_vector_size): New function.
341 (type_valid_for_vector_size): Same.
342 (handle_vector_size_attribute): Move code to the functions above
343 and call them.
344 (validate_attribute, has_attribute): New functions.
345 * c-common.h (has_attribute): Declare.
346 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
347 * c-common.c (c_common_resword): Same.
348
2674fa47
JM
3492018-11-16 Jason Merrill <jason@redhat.com>
350
351 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
352 * c-attribs.c (attr_cold_hot_exclusions): Make public.
353
258b3854
JJ
3542018-11-16 Jakub Jelinek <jakub@redhat.com>
355
356 PR middle-end/87854
357 * c-common.c (fix_string_type): Reject string literals larger than
358 TYPE_MAX_VALUE (ssizetype) bytes.
359
1d249509
MS
3602018-11-15 Martin Sebor <msebor@redhat.com>
361
362 PR c++/87541
363 PR c++/87542
364 * c-attribs.c (positional_argument): New function.
365 (handle_alloc_size_attribute): Use it and simplify.
366 (handle_alloc_align_attribute): Same.
367 (handle_assume_aligned_attribute): Same.
368 (handle_nonnull_attribute): Same.
369 * c-common.c (check_function_arguments): Pass fntype to
370 check_function_format.
371 * c-common.h (check_function_format): Add an argument.
372 (PosArgFlags, positional_argument): Declare new type and function.
373 * c-format.c (decode_format_attr): Add arguments.
374 (check_format_string, get_constant): Same.
375 (convert_format_name_to_system_name): Adjust.
376
478dd60d
DM
3772018-11-15 David Malcolm <dmalcolm@redhat.com>
378
379 PR other/19165
380 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
381
8cca0163
JJ
3822018-11-14 Jakub Jelinek <jakub@redhat.com>
383
8ee09943
JJ
384 P1236R1 - Signed integers are two's complement
385 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
386 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
387 with in-range second operand well defined for -std=c++2a.
388
8cca0163
JJ
389 PR other/88007
390 * c-common.c (parse_optimize_options): Allocate option string from
391 opts_obstack rather than as GC memory. Move the allocation after
392 warning for invalid option.
393
620e594b
DM
3942018-11-13 David Malcolm <dmalcolm@redhat.com>
395
396 * c-common.c (c_get_substring_location): Update for renaming of
397 get_source_location_for_substring to get_location_within_string.
398 * c-lex.c: Replace "source_location" with "location_t".
399 * c-opts.c: Likewise.
400 * c-ppoutput.c: Likewise.
401
f9731de3
MS
4022018-11-13 Martin Sebor <msebor@redhat.com>
403
404 PR middle-end/81824
405 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
406 (handle_tls_model_attribute): Improve diagnostics.
407
e4bd6d5e
JM
4082018-11-12 Jason Merrill <jason@redhat.com>
409
a6bb6b07
JM
410 * c-cppbuiltin.c (c_cpp_builtins): Define
411 __cpp_impl_destroying_delete.
412
e4bd6d5e
JM
413 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
414 __cpp_conditional_explicit.
415
79a2c428
MS
4162018-11-09 Martin Sebor <msebor@redhat.com>
417
418 PR middle-end/81824
419 * c-attribs.c (handle_copy_attribute): New function.
420
4c7bd361
MS
4212018-11-09 Martin Sebor <msebor@redhat.com>
422
423 PR c/87795
424 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
425
28567c40
JJ
4262018-11-08 Jakub Jelinek <jakub@redhat.com>
427
428 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
429 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
430 enum omp_memory_order MEMORY_ORDER.
431 (c_finish_omp_flush): Add MO argument.
432 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
433 (c_finish_omp_for): Add FINAL_P argument.
434 * c-omp.c: Include memmodel.h.
435 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
436 OMP_TASKGROUP_CLAUSES to it.
437 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
438 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
439 instead of OMP_ATOMIC_SEQ_CST.
440 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
441 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
442 __atomic_thread_fence call with the given value.
443 (check_omp_for_incr_expr): Formatting fixes.
444 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
445 even in OpenMP loops, diagnose if NE_EXPR and incr expression
446 is not constant expression 1 or -1. Transform NE_EXPR loops
447 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
448 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
449 loops too.
450 (c_omp_split_clauses): Add support for combined
451 #pragma omp parallel master and
452 #pragma omp {,parallel }master taskloop{, simd} constructs.
453 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
454 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
455 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
456 (c_omp_predetermined_sharing): Don't return
457 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
458 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
459 PRAGMA_OMP_REQUIRES.
460 * c-pragma.h (enum pragma_kind): Likewise.
461 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
462 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
463
204839e7
DM
4642018-11-08 David Malcolm <dmalcolm@redhat.com>
465
466 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
467
d8010ee4
DM
4682018-11-08 David Malcolm <dmalcolm@redhat.com>
469
470 * c-format.c (local_cgraph_node_ptr_node): New variable.
471 (gcc_dump_printf_char_table): Add entry for %C.
472 (get_pointer_to_named_type): New function, taken from the handling
473 code for "gimple *" from...
474 (init_dynamic_diag_info): ...here. Add handling for
475 "cgraph_node *".
476 * c-format.h (T_CGRAPH_NODE): New.
477
4be5c72c
JM
4782018-10-19 Jason Merrill <jason@redhat.com>
479
480 * c-cppbuiltin.c (c_cpp_builtins): Add
481 __cpp_nontype_template_parameter_class.
482
f3f6029d
NS
4832018-10-31 Nathan Sidwell <nathan@acm.org>
484
ab5324fb
NS
485 * c-opts.c (c_finish_options): Force command line macro
486 location. Refactor to avoid repeating main debug hook.
487 (push_command_line_include): Clarify comment.
488
f3f6029d
NS
489 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
490
91e3ec29
MS
4912018-10-30 Martin Sebor <msebor@redhat.com>
492
493 PR middle-end/87041
494 * c-format.c (check_format_types): Avoid diagnosing null pointer
495 arguments to printf-family of functions.
496
b5ff4f5c
MP
4972018-10-30 Marek Polacek <polacek@redhat.com>
498
499 Implement P0892R2, explicit(bool).
500 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
501
7e2de6df
DM
5022018-10-29 David Malcolm <dmalcolm@redhat.com>
503
504 * name-hint.h (name_hint::take_deferred): New member function.
505
b2bf438c
DM
5062018-10-29 David Malcolm <dmalcolm@redhat.com>
507
508 PR c++/56856
509 * c-common.c (check_function_sentinel): Call fold_for_warn on the
510 argument.
511 (check_function_restrict): Rename param "argarray" to
512 "unfolded_argarray", and make a copy named "argarray", calling
513 fold_for_warn on each argument.
514 (check_function_arguments): Add note about responsibility for
515 folding the arguments.
516
9f936c86
JM
5172018-10-17 Joseph Myers <joseph@codesourcery.com>
518
519 * c-common.c (flag_isoc2x): New variable.
520 * c-common.h (clk_c): Update comment to reference C2X.
521 (flag_isoc99, flag_isoc11): Update comments to reference future
522 standard versions in general.
523 (flag_isoc2x): Declare.
524 * c-opts.c (set_std_c2x): New function.
525 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
526 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
527 flag_isoc2x to 0.
528 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
529
7a8a92c4
JM
5302018-10-17 Joseph Myers <joseph@codesourcery.com>
531
532 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
533 (std=iso9899:2018): Document C17 as published in 2018.
534
4dc003ff
CL
5352018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
536
537 PR c++/87364
538 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
539
79371671
WW
5402018-10-11 Will Wray <wjwray@gmail.com>
541
542 PR c++/87364
543 * c-pretty-print.h (pp_c_type_cast): Prototype.
544 (pp_c_integer_constant): Likewise.
545 * c-pretty-print.c (pp_c_type_cast): No longer static.
546 (pp_c_integer_constant): Likewise.
547 (pp_c_enumeration_constant): Fix loop termination when finding
548 name of constant. No longer returns a value. Call
549 pp_c_integer_constant.
550 (c_pretty_printer::constant): Update for changes to
551 pp_c_enumeration_constant.
552
46c62690
JJ
5532018-10-11 Jakub Jelinek <jakub@redhat.com>
554
555 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
556 for no_unique_address.
557
c24300ba
DM
5582018-10-09 David Malcolm <dmalcolm@redhat.com>
559
560 * c-common.c (c_option_controlling_cpp_error): Rename to...
561 (c_option_controlling_cpp_diagnostic): ...this, and convert
562 "reason" from int to enum.
563 (c_cpp_error): Rename to...
564 (c_cpp_diagnostic): ...this, converting level and reason to enums.
565 * c-common.h (c_cpp_error): Rename to...
566 (c_cpp_diagnostic): ...this, converting level and reason to enums.
567 * c-opts.c (c_common_init_options): Update for renaming.
568
8656dafa
RS
5692018-10-08 Richard Sandiford <richard.sandiford@arm.com>
570
571 PR c/87286
572 * c-common.c (vector_types_compatible_elements_p): Use
573 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
574
8cff0652
VK
5752018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
576
577 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
578 to generate constructor destructor priority warning.
579 * c.opt (-Wprio-ctor-dtor): New option.
580
bedf03a2
JM
5812018-10-01 Jason Merrill <jason@redhat.com>
582
583 * c-lex.c (c_common_has_attribute): Add no_unique_address.
584
6cc430c1
EB
5852018-10-01 Eric Botcazou <ebotcazou@adacore.com>
586
587 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
588 (dump_ada_node): Add const keyword.
589
87677ac7
ML
5902018-09-25 Martin Liska <mliska@suse.cz>
591
592 * c-common.c (c_common_truthvalue_conversion):
593 Remove Pascal from documentation.
594
518196cb
EB
5952018-09-21 Eric Botcazou <ebotcazou@adacore.com>
596
597 * c-ada-spec.c: Include diagnostic.h.
598 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
599
a599af84
MP
6002018-09-19 Marek Polacek <polacek@redhat.com>
601
602 * c.opt (Wclass-conversion): New.
603
9c4a4b3c
DM
6042018-09-17 David Malcolm <dmalcolm@redhat.com>
605
606 * c-format.c (range_label_for_format_type_mismatch::get_text):
607 Update for new param.
608
c896ecfe
DM
6092018-09-17 David Malcolm <dmalcolm@redhat.com>
610
611 * c-format.c (format_warning_at_char): Update for introduction of
612 format_string_diagnostic_t.
613 (format_type_warning): Likewise.
614
80c6d1f4
MJ
6152018-09-17 Martin Jambor <mjambor@suse.cz>
616
617 PR c/63886
618 * c.opt (Wabsolute-value): New.
619
6d900107
BE
6202018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
621
622 * c-common.c (complete_flexible_array_elts): New helper function.
623 * c-common.h (complete_flexible_array_elts): Declare.
624
b5764229
BE
6252018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
626
627 * c-common.c (braced_list_to_string): Remove eval parameter.
628 Add some more checks. Always create zero-terminated STRING_CST.
629 * c-common.h (braced_list_to_string): Adjust prototype.
630
85204e23
DM
6312018-08-27 David Malcolm <dmalcolm@redhat.com>
632
633 PR 87091
634 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
635 to a tri-state.
636 (maybe_suggest_missing_token_insertion): Likewise.
637 (maybe_add_include_fixit): Add param "override_location". If set,
638 and source-printing is enabled, then override the rich_location's
639 primary location with that of the insertion point for the fix-it
640 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
641 * c-common.h (extern void maybe_add_include_fixit): Add bool
642 param.
643 * c-format.c (selftest::test_type_mismatch_range_labels): Update
644 for conversion of show_caret_p to a tri-state.
645 * c-warn.c (warn_for_restrict): Likewise.
646 * known-headers.cc
647 (suggest_missing_header::~suggest_missing_header): Update call to
648 maybe_add_include_fixit to suggest overriding the location, as it
649 is for a note.
650
3d78e008
ML
6512018-08-27 Martin Liska <mliska@suse.cz>
652
653 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
654 fndecl_built_in_p and remove check for FUNCTION_DECL if
655 possible.
3d78e008
ML
656 (check_builtin_function_arguments): Likewise.
657 (reject_gcc_builtin): Likewise.
658 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
659
b5be6d0c
MP
6602018-08-26 Marek Polacek <polacek@redhat.com>
661
662 PR c++/87029, Implement -Wredundant-move.
663 * c.opt (Wredundant-move): New option.
664
79ca9c35
MP
6652018-08-21 Marek Polacek <polacek@redhat.com>
666
667 PR c++/86981, Implement -Wpessimizing-move.
668 * c.opt (Wpessimizing-move): New option.
669
097f82ec
DM
6702018-08-20 David Malcolm <dmalcolm@redhat.com>
671
672 PR other/84889
673 * c-attribs.c (common_handle_aligned_attribute): Add
674 auto_diagnostic_group instance.
675 * c-indentation.c (warn_for_misleading_indentation): Likewise.
676 * c-opts.c (c_common_post_options): Likewise.
677 * c-warn.c (warn_logical_not_parentheses): Likewise.
678 (warn_duplicated_cond_add_or_warn): Likewise.
679 (warn_for_multistatement_macros): Likewise.
680
3fb558b1
NS
6812018-08-20 Nathan Sidwell <nathan@acm.org>
682
683 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
684 access.
685
800c0e98
NS
6862018-08-17 Nathan Sidwell <nathan@acm.org>
687
688 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
689 field.
690 (laxy_hex_fp_value_count): Make unsigned.
691 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
692 manipulate the macro.
693 (builtin_defin_with_hex_fp_value): Adjust callback name, use
694 cpp_define_lazily.
695
6f795a92
DM
6962018-08-17 David Malcolm <dmalcolm@redhat.com>
697
698 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
699 (gcc_dump_printf_length_specs): New.
700 (gcc_dump_printf_flag_pairs): New.
701 (gcc_dump_printf_flag_specs): New.
702 (gcc_dump_printf_char_table): New.
703 (format_types_orig): Add entry for "gcc_dump_printf".
704 (init_dynamic_diag_info): Set up length_char_specs and
705 conversion_specs for gcc_dump_printf_format_type.
706 (handle_format_attribute): Handle gcc_dump_printf_format_type.
707
c5d725c0
NS
7082018-08-17 Nathan Sidwell <nathan@acm.org>
709
10f04917
NS
710 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
711
c5d725c0
NS
712 * c-ada-spec.c: Don't #include "cpp-id-data.h"
713 * c-cppbuiltin.c: Likewise.
714
c0c12356
ML
7152018-08-17 Martin Liska <mliska@suse.cz>
716
717 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
718 Ignore/Deprecated flag. Warning is done automatically for
719 Deprecated flags.
c0c12356 720
10fcc142
DM
7212018-08-16 David Malcolm <dmalcolm@redhat.com>
722
723 PR c++/70693
724 * c-common.c (selftest::c_family_tests): Call
725 selftest::c_indentation_c_tests.
726 * c-common.h (selftest::c_indentation_c_tests): New decl.
727 * c-indentation.c: Include "selftest.h".
728 (next_tab_stop): Add "tab_width" param, rather than accessing
729 cpp_opts.
730 (get_visual_column): Likewise. Clarify comment. Bulletproof
731 against reading past the end of the line.
732 (get_first_nws_vis_column): Add "tab_width" param.
733 (detect_intervening_unindent): Likewise.
734 (should_warn_for_misleading_indentation): Read tab width from
735 cpp_opts and pass around.
736 (selftest::test_next_tab_stop): New test.
737 (selftest::assert_get_visual_column_succeeds): New function.
738 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
739 (selftest::assert_get_visual_column_fails): New function.
740 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
741 (selftest::test_get_visual_column): New test.
742 (selftest::c_indentation_c_tests): New function.
743
3f6677f4
NS
7442018-08-16 Nathan Sidwell <nathan@acm.org>
745
746 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
747 (store_ada_macro): Likewise.
748 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
749 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
750
96e6ae57
DM
7512018-08-15 David Malcolm <dmalcolm@redhat.com>
752
753 * c-format.c: Include "selftest-diagnostic.h" and
754 "gcc-rich-location.h".
755 (format_warning_at_char): Pass NULL for new label params of
756 format_warning_va.
757 (class indirection_suffix): New class.
758 (class range_label_for_format_type_mismatch): New class.
759 (format_type_warning): Move logic for generating "*" suffix to
760 class indirection_suffix. Create "fmt_label" and "param_label"
761 to show their types, and pass them to the
762 format_warning_at_substring calls.
763 (selftest::test_type_mismatch_range_labels): New test.
764 (selftest::c_format_c_tests): Call it.
765
23aa9f7c
MS
7662018-08-13 Martin Sebor <msebor@redhat.com>
767
768 PR tree-optimization/71625
769 * c-common.c (braced_list_to_string): New function.
770 * c-common.h (braced_list_to_string): Declare it.
771
f10a9135
NS
7722018-08-08 Nathan Sidwell <nathan@acm.org>
773
774 * c-common.c (try_to_locate_new_include_inertion_point): Use
775 linemap_included_from_linemap.
776 * c-lex.c (fe_file_change): Use linemap_included_from.
777 * c-ppoutput.c (pp_file_change): Likewise.
778
8a45b051
MS
7792018-08-01 Martin Sebor <msebor@redhat.com>
780
781 PR tree-optimization/86650
782 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
783 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
784 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
785 * c-format.h (T89_G): Update to be "gimple *" rather than
786 "gcall *".
787 (local_gcall_ptr_node): Rename...
788 (local_gimple_ptr_node): ...to this.
789
e540ccc0
DM
7902018-07-31 David Malcolm <dmalcolm@redhat.com>
791
792 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
793 table entries for gcc_diag_char_table, and the 'Z' entry from
794 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
795 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
796 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
797 adding missing "Z" for this table. Remove erroneous "G" and "K"
798 entries.
799 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
800 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
801 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
802
425fc685
RE
8032018-07-31 Richard Earnshaw <rearnsha@arm.com>
804
805 * c-common.c (speculation_safe_resolve_call): New function.
806 (speculation_safe_resolve_params): New function.
807 (speculation_safe_resolve_return): New function.
808 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
809 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
810 __HAVE_SPECULATION_SAFE_VALUE.
811
181463c2
DM
8122018-07-20 David Malcolm <dmalcolm@redhat.com>
813
814 * c-common.c (c_cpp_error): Remove redundant "line_table"
815 parameter from call to rich_location::set_range.
816 (maybe_suggest_missing_token_insertion): Likewise.
817
0d7f9065
MS
8182018-07-20 Martin Sebor <msebor@redhat.com>
819
820 PR middle-end/82063
821 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
822
00abf86c
MS
8232018-07-20 Martin Sebor <msebor@redhat.com>
824
825 PR middle-end/82063
826 * c-common.h (c_common_handle_option): Change function argument
827 to HOST_WIDE_INT.
828 * c-opts.c (c_common_init_options): Same.
829 (c_common_handle_option): Same. Remove special handling of
830 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
831 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
832 options to take a HOST_WIDE_INT argument and accept a byte-size
833 suffix. Initialize.
834 (-Wvla-larger-than): Same.
835 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
836 (-Wno-vla-larger-than): Same.
837
9b452033
JJ
8382018-07-12 Jakub Jelinek <jakub@redhat.com>
839
840 * c-attribs.c (c_common_attribute_table): Add
841 "omp declare target implicit" attribute.
842
cd0762f3
RB
8432018-07-12 Richard Biener <rguenther@suse.de>
844
845 PR c/86453
846 * c-attribs.c (handle_packed_attribute): Do not build a variant
847 type with TYPE_PACKED, instead ignore the attribute if we may
848 not apply to the original type.
849
0b27c3ed
JJ
8502018-07-10 Jakub Jelinek <jakub@redhat.com>
851
852 PR c++/86443
853 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
854 to contain TREE_LIST for both the original class iterator and the
855 "last" helper var.
856
e730a0ef
EB
8572018-07-07 Eric Botcazou <ebotcazou@adacore.com>
858
859 * c-ada-spec.c (to_ada_name): Remove index parameter.
860 (pp_ada_tree_identifier): Likewise.
861 (dump_ada_macros): Adjust call to to_ada_name.
862 (struct overloaded_name_hash): Delete.
863 (struct overloaded_name_hasher): Likewise.
864 (overloaded_names): Likewise.
865 (compute_overloading_index): Likewise.
866 (dump_ada_decl_name): Do not call compute_overloading_index and
867 adjust calls to pp_ada_tree_identifier.
868 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
869 (dump_ada_import): Add spc parameter and switch to aspect syntax.
870 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
871 (dump_ada_enum_type): Remove type and display_convention parameters.
872 Adjust calls to pp_ada_tree_identifier.
873 (dump_ada_node): Likewise and for dump_ada_structure.
874 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
875 and tidy up.
876 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
877 syntax.
878 (print_constructor): Adjust call to pp_ada_tree_identifier.
879 (print_destructor): Likewise.
880 (dump_ada_declaration): Switch to aspect syntax.
881 (dump_ada_structure): Likewise and tidy up. Replace display_convention
882 parameter with nested parameter.
883 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
884 (dump_ada_specs): Do not delete overloaded_names table.
885
8de583fc
PB
8862018-07-06 Peter Bergner <bergner@linux.ibm.com>
887
888 PR target/86324
e730a0ef 889 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
890 target hook.
891
09cff37b
NS
8922018-07-05 Nathan Sidwell <nathan@acm.org>
893
894 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
895 NO_IMPLICIT_EXTERN_C.
896
98086b2b
ML
8972018-06-28 Martin Liska <mliska@suse.cz>
898
899 * cppspec.c: Include opt-suggestions.h.
900
829c6349
CLT
9012018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
902 Thomas Schwinge <thomas@codesourcery.com>
903 Cesar Philippidis <cesar@codesourcery.com>
904
905 * c-pragma.h (enum pragma_omp_clause): Add
906 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
907 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
908
f41b7612
JJ
9092018-06-20 Jakub Jelinek <jakub@redhat.com>
910
911 PR c++/86210
912 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
913 comment.
914
4252ccd7
MS
9152018-06-18 Martin Sebor <msebor@redhat.com>
916
917 PR middle-end/85602
918 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
919 nonstring.
920
e197e64e
KV
9212018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
922
923 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
924
34a7a230
JM
9252018-06-13 Jason Merrill <jason@redhat.com>
926
5cef3733
JM
927 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
928 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
929 handling.
930
34a7a230
JM
931 PR c++/86094 - wrong code with defaulted move ctor.
932 * c-opts.c (c_common_post_options): Bump the current ABI version to
933 13. Set warn_abi_version and flag_abi_compat_version to the current
934 version rather than 0. Fix defaulting flag_abi_compat_version from
935 warn_abi_version.
936
bb0f14ae
MS
9372018-06-12 Martin Sebor <msebor@redhat.com>
938
939 PR c/85931
940 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
941 sizeof source and destination yields the same value.
942
3713f2e2
ML
9432018-06-12 Martin Liska <mliska@suse.cz>
944
945 * c.opt: Make MPX-related options as Deprecated.
946
4af78ef8
DM
9472018-06-08 David Malcolm <dmalcolm@redhat.com>
948
949 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
950 rather than 0.
951
31db0fe0
ML
9522018-06-08 Martin Liska <mliska@suse.cz>
953
954 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
955 for MPX (macros, related functions, fields in cgraph_node, ...).
956 (handle_bnd_legacy): Likewise.
957 (handle_bnd_instrument): Likewise.
958 * c.opt: Likewise.
959
fe16acf2
JJ
9602018-06-06 Jakub Jelinek <jakub@redhat.com>
961
962 PR c++/86068
963 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
964 __cpp_transactional_memory to 201500 instead of 210500.
965
4dbdb49b
JM
9662018-06-06 Jason Merrill <jason@redhat.com>
967
968 PR c++/85710 - ICE with -Wmemset-elt-size.
969 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
970
f8ad043f
JM
9712018-06-01 Jason Merrill <jason@redhat.com>
972
973 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
974 201703.
975
abc24d93
EB
9762018-06-01 Eric Botcazou <ebotcazou@adacore.com>
977
978 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
979 declaration for a typedef independently of whether the declaration of
980 the subtype is generated.
981
d258f4aa
MS
9822018-05-31 Martin Sebor <msebor@redhat.com>
983
984 PR c/82063
985 * c.opt (-Wno-alloc-size-larger-than): New option.
986
b67b9225
DP
9872018-04-22 David Pagan <dave.pagan@oracle.com>
988
989 PR c/55976
990 * c-opts.c (c_common_post_options): Set default for warn_return_type
991 for C++/C++ with ObjC extensions only. For C, makes it possible to
992 differentiate between default (no option), -Wreturn-type, and
993 -Wno-return-type.
994
04eb9c55
JM
9952018-05-29 Jason Merrill <jason@redhat.com>
996
997 * c.opt (Winit-list-lifetime): New flag.
998
b0c31bc6
BE
9992018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1000
1001 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1002 splay_tree_delete_pointers.
1003
44284983
JJ
10042018-05-26 Jakub Jelinek <jakub@redhat.com>
1005
1006 PR bootstrap/85921
1007 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1008 noinline variable to workaround broken kernel headers.
1009
b46b715d
JM
10102018-05-18 Jason Merrill <jason@redhat.com>
1011
1012 * c.opt (Wdeprecated-copy): New flag.
1013
40659769
ML
10142018-05-17 Martin Liska <mliska@suse.cz>
1015
1016 * c-warn.c (overflow_warning): Do not use
1017 space in between 'G_' and '('.
1018
403962ea
JM
10192018-05-09 Jason Merrill <jason@redhat.com>
1020
1021 * c-common.c (valid_array_size_p): Add complain parameter.
1022 * c-common.h: ...which defaults to true.
1023
1c9ee609
JJ
10242018-05-11 Jakub Jelinek <jakub@redhat.com>
1025
1026 PR c/85696
1027 * c-omp.c (c_omp_predetermined_sharing): Return
1028 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1029
19916065
ML
10302018-05-11 Martin Liska <mliska@suse.cz>
1031
92a285c1 1032 PR sanitizer/85556
19916065
ML
1033 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1034 TREE_LIST values.
1035
79e7b1fe
JJ
10362018-05-10 Jakub Jelinek <jakub@redhat.com>
1037
1038 PR c++/85662
1039 * c-common.h (fold_offsetof_1): Removed.
1040 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1041 CTX argument defaulted to ERROR_MARK.
1042 * c-common.c (fold_offsetof_1): Renamed to ...
1043 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1044 argument, convert the pointer constant to TYPE and use size_binop
1045 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1046 a pointer type. Adjust recursive calls.
1047
86c12f76
EB
10482018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1049
1050 PR c++/85400
1051 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1052
ee336e84
NS
10532018-05-07 Nathan Sidwell <nathan@acm.org>
1054
1055 * c.opt (ffor-scope): Remove functionality, issue warning.
1056
6c072e21
NS
10572018-05-03 Nathan Sidwell <nathan@acm.org>
1058
1059 * c.opt (ffriend-injection): Remove functionality, issue warning.
1060
2cc7d3a7
DM
10612018-05-01 David Malcolm <dmalcolm@redhat.com>
1062
1063 PR c/84258
1064 * c-format.c (struct format_check_results): Add field
1065 "number_non_char".
1066 (check_format_info): Initialize it, and warn if encountered.
1067 (check_format_arg): Distinguish between wide char and
1068 everything else when detecting arrays of non-char.
1069
7761dfbe
DM
10702018-04-30 David Malcolm <dmalcolm@redhat.com>
1071
1072 * c-format.c (get_corrected_substring): Update for
1073 location_get_source_line returning a char_span. Use a char_span
1074 when handling the prefix of the correction.
1075 * c-indentation.c (get_visual_column): Update for
1076 location_get_source_line returning a char_span.
1077 (get_first_nws_vis_column): Likewise.
1078
62e98ef1
DM
10792018-03-29 David Malcolm <dmalcolm@redhat.com>
1080
1081 PR c++/84269
1082 * known-headers.cc (get_stdlib_header_for_name): Add various names
1083 from <assert.h>, <string.h>, and <memory.h>; add more names from
1084 <stdio.h>.
1085
a7dea617
JJ
10862018-03-27 Jakub Jelinek <jakub@redhat.com>
1087
1088 PR c++/85061
1089 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1090 get_base_address of the second operand is a VAR_P, rather than the
1091 operand itself, and use gcc_checking_assert instead of gcc_assert.
1092
889a3a30
MP
10932018-03-23 Marek Polacek <polacek@redhat.com>
1094
1095 PR c++/85045
1096 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1097 <case RDIV_EXPR>: Tweak condition.
1098
452154b9
EB
10992018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1100
1101 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1102
63ecb626
JJ
11032018-03-16 Jakub Jelinek <jakub@redhat.com>
1104
ce811fc4
JJ
1105 PR c/84909
1106 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1107 diagnostics.
1108
63ecb626
JJ
1109 PR c/84910
1110 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1111 diagnostics.
1112
a1295eec
RB
11132018-03-16 Richard Biener <rguenther@suse.de>
1114
1115 PR c/84873
1116 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1117 unshare the possibly folded expression.
1118
919674fb
RB
11192018-03-15 Richard Biener <rguenther@suse.de>
1120
1121 PR c/84873
1122 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1123
f99309b2
MS
11242018-03-13 Martin Sebor <msebor@redhat.com>
1125
1126 PR tree-optimization/84725
1127 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1128 with all three narrow character types, including their qualified forms.
1129
e9b9fa4c
MS
11302018-03-12 Martin Sebor <msebor@redhat.com>
1131
1132 PR tree-optimization/83456
1133 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1134 Restore checking of bounded built-in functions.
1135 (check_function_arguments): Also return the result
1136 of warn_for_restrict.
1137 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1138 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1139
0805d020
MP
11402018-03-02 Marek Polacek <polacek@redhat.com>
1141
1142 PR c++/84171
1143 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1144 is erroneous.
1145
ed2a2f08
TS
11462018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1147
1148 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1149 function".
1150
90abdde0
MP
11512018-03-01 Marek Polacek <polacek@redhat.com>
1152
1153 PR c++/84639
1154 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1155 alignment in computation.
1156
c6db43fa
EB
11572018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1158
1159 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1160 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1161
9e25c7ed
EB
11622018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1163
1164 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1165 (is_char_array): Take a type instead of a declaration.
1166 (dump_ada_array_type): Likewise.
1167 (is_simple_enum): Minor tweak.
1168 (dump_ada_enum_type): New function extracted from...
1169 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1170 <INTEGER_TYPE>: Remove unreachable code.
1171 <RECORD_TYPE>: Likewise. Minor tweaks.
1172 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1173 <ENUMERAL_TYPE>: New case.
1174 <RECORD_TYPE>: Factor out common code.
1175 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1176 Minor tweaks. Deal with enumeral types.
1177 (dump_ada_structure): Minor tweaks.
1178
09de3550
EB
11792018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1180
1181 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1182 address for incomplete structures.
1183 (dump_forward_type): Do not bail out for incomplete structures.
1184 (dump_ada_declaration): Do not special-case incomplete structures
1185 for subtypes. Dump them as null records for types.
1186
095d8d4b
EB
11872018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1188
1189 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1190 (is_char_array): Fix formatting.
1191 (dump_template_types): Likewise.
1192 (dump_generic_ada_node): Rename into...
1193 (dump_ada_node): ...this.
1194 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1195 incomplete structures and not for empty structures. Do not use it
1196 when forward declarations are needed.
1197 (dump_forward_type): New function.
1198 (dump_nested_types): Remove FORWARD parameter. Do not consider
1199 TREE_VISITED and do not generate a forward declaration. Only dump
1200 original nested types for nested declaration.
1201 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1202 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1203 <RECORD_TYPE>: Do not consider TREE_VISITED.
1204 (dump_ada_declaration): Use booleans and fix formatting throughout.
1205 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1206 Call dump_forward_type instead of dump_nested_types for a typedef.
1207 Remove superfluous check and adjust call to dump_nested_types.
1208 <POINTER_TYPE>: Call dump_forward_type and fall through.
1209 (dump_ada_struct_decl): Rename into...
1210 (dump_ada_structure): ...this. Do not special-case empty structures.
1211
d4cfd486
MS
12122018-02-27 Martin Sebor <msebor@redhat.com>
1213
1214 PR c++/83871
1215 * c.opt (-Wmissing-attributes): New option.
1216
b22dbd03
ML
12172018-02-21 Martin Liska <mliska@suse.cz>
1218
1219 * c.opt (Wcatch-value=): Add IntegerRange.
1220
883dfe2a
JM
12212018-02-15 Jason Merrill <jason@redhat.com>
1222
1223 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1224
0444aa9c
NS
12252018-02-09 Nathan Sidwell <nathan@acm.org>
1226
1227 PR c/84293
1228 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1229 arg.
1230 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1231 arg. Adjust.
1232
cea71f0a
MS
12332018-02-09 Martin Sebor <msebor@redhat.com>
1234
1235 PR lto/84212
1236 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1237 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1238 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1239 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1240 (-Wuninitialized): Same.
1241
8c8b7be5
EB
12422018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1243
1244 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1245 keyword for components.
1246
7c30b12a
PC
12472018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1248
1249 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1250
eece7fe5
JK
12512018-02-02 Julia Koval <julia.koval@intel.com>
1252
1253 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1254
7d07a93a
MP
12552018-01-29 Marek Polacek <polacek@redhat.com>
1256
1257 PR c/83966
1258 * c-format.c (check_function_format): Check current_function_decl.
1259
53723269
JJ
12602018-01-27 Jakub Jelinek <jakub@redhat.com>
1261
1262 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1263 argument.
1264 (LAZY_HEX_FP_VALUES_CNT): Define.
1265 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1266 values rather than just 12.
1267 (builtin_define_with_hex_fp_value): Likewise.
1268
7365279f
BK
12692018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1270
92a285c1
ML
1271 PR other/70268
1272 * c.opt (-fmacro-prefix-map): New option.
1273 * c-opts.c (c_common_handle_option): Handle it.
1274 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1275 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1276
bb9869d5
DM
12772018-01-17 David Malcolm <dmalcolm@redhat.com>
1278
1279 PR c++/83814
1280 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1281
68dc87c3
EB
12822018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1283
1284 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1285 Skip 'f' and 'F' characters if it is true.
1286 (store_ada_macro): Minor tweak.
1287 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1288 <CPP_WSTRING>: Likewise.
1289 <CPP_STRING>: Output '&' in the buffer if not the first string.
1290 <CPP_NUMBER>: Adjust calls to dump_number.
1291
9a004410
DM
12922018-01-10 David Malcolm <dmalcolm@redhat.com>
1293
1294 PR c++/43486
1295 * c-common.c: Include "selftest.h".
1296 (get_atomic_generic_size): Perform the test for integral type
1297 before the range test for any integer constant, fixing indentation
1298 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1299 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1300 (selftest::test_fold_for_warn): New function.
1301 (selftest::c_common_c_tests): New function.
1302 (selftest::c_family_tests): Call it, and
1303 selftest::c_pretty_print_c_tests.
1304 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1305 * c-format.c (check_format_arg): Convert VAR_P check to a
1306 fold_for_warn.
1307 * c-pretty-print.c: Include "selftest.h".
1308 (pp_c_cast_expression): Don't print casts for location wrappers.
1309 (selftest::assert_c_pretty_printer_output): New function.
1310 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1311 (selftest::test_location_wrappers): New function.
1312 (selftest::c_pretty_print_c_tests): New function.
1313 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1314
5c0caeb3
RS
13152018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1316 Alan Hayward <alan.hayward@arm.com>
1317 David Sherwood <david.sherwood@arm.com>
1318
1319 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1320
73a699ae
RS
13212018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1322 Alan Hayward <alan.hayward@arm.com>
1323 David Sherwood <david.sherwood@arm.com>
1324
1325 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1326 as polynomial.
1327
928686b1
RS
13282018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1329 Alan Hayward <alan.hayward@arm.com>
1330 David Sherwood <david.sherwood@arm.com>
1331
1332 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1333 (convert_vector_to_array_for_subscript): Handle polynomial
1334 TYPE_VECTOR_SUBPARTS.
1335 (c_common_type_for_mode): Check valid_vector_subparts_p.
1336 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1337 VECTOR_CST_NELTS.
1338
85ec4feb
JJ
13392018-01-03 Jakub Jelinek <jakub@redhat.com>
1340
1341 Update copyright years.
1342
170a8bd6 13432017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1344 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1345
1346 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1347 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1348
18408e96
AO
13492017-12-22 Alexandre Oliva <aoliva@redhat.com>
1350
1351 PR debug/83527
1352 PR debug/83419
1353 * c-semantics.c (only_debug_stmts_after_p): New.
1354 (pop_stmt_list): Clear side effects in debug-only stmt list.
1355 Check for single nondebug stmt followed by debug stmts only.
1356
c12d20d4
AO
13572017-12-21 Alexandre Oliva <aoliva@redhat.com>
1358
1359 PR debug/83419
1360 * c-semantics.c (pop_stmt_list): Propagate side effects from
1361 single nondebug stmt to container list.
1362
01512446
JJ
13632017-12-19 Jakub Jelinek <jakub@redhat.com>
1364
1365 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1366 conditions with typical order conditions.
1367
82cfbd01
MP
13682017-12-18 Marek Polacek <polacek@redhat.com>
1369
1370 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1371 not in effect.
1372
99da11ec
MS
13732017-12-17 Martin Sebor <msebor@redhat.com>
1374
1375 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1376 an error for attribute warn_if_not_aligned.
1377
cc8bea0a
MS
13782017-12-16 Martin Sebor <msebor@redhat.com>
1379
1380 PR tree-optimization/78918
1381 * c-common.c (check_function_restrict): Avoid checking built-ins.
1382 * c.opt (-Wrestrict): Include in -Wall.
1383
4849deb1
JJ
13842017-12-15 Jakub Jelinek <jakub@redhat.com>
1385
1386 * c-attribs.c (c_common_attribute_table,
1387 c_common_format_attribute_table): Swap affects_type_identity
1388 and handler fields, adjust comments.
1389
c65e18d3
BE
13902017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1391
1392 * c.opt (Wcast-function-type): New warning option.
1393 * c-lex.c (get_fileinfo): Avoid warning.
1394 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1395
2004617a
QZ
13962017-12-14 Qing Zhao <qing.zhao@oracle.com>
1397
7365279f 1398 PR middle_end/79538
2004617a
QZ
1399 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1400 Adjust the size of buf1 and buf2, add a new buf to avoid
1401 format-overflow warning.
1402
96a95ac1
AO
14032017-12-12 Alexandre Oliva <aoliva@redhat.com>
1404
1405 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1406 subsequent statement list.
1407
5d9ae53d
MS
14082017-12-07 Martin Sebor <msebor@redhat.com>
1409
1410 PR c/81544
1411 PR c/81566
1412 * c-attribs.c (attr_aligned_exclusions): New array.
1413 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1414 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1415 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1416 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1417 (attr_warn_unused_result_exclusions): Same.
1418 (handle_hot_attribute, handle_cold_attribute): Simplify.
1419 (handle_const_attribute): Warn on function returning void.
1420 (handle_pure_attribute): Same.
1421 (handle_aligned_attribute): Diagnose conflicting attribute
1422 specifications.
1423 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1424
c79144f8
DM
14252017-12-06 David Malcolm <dmalcolm@redhat.com>
1426
1427 PR c/83236
1428 * c-common.c (selftest::c_family_tests): Call
1429 selftest::c_spellcheck_cc_tests.
1430 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1431 * c-spellcheck.cc: Include "selftest.h".
1432 (name_reserved_for_implementation_p): New function.
1433 (should_suggest_as_macro_p): New function.
1434 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1435 should_suggest_as_macro_p and call it.
1436 (selftest::test_name_reserved_for_implementation_p): New function.
1437 (selftest::c_spellcheck_cc_tests): New function.
1438 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1439
613bc14f
DM
14402017-12-06 David Malcolm <dmalcolm@redhat.com>
1441
1442 * c-spellcheck.cc: New file, taken from macro-handling code in
1443 spellcheck-tree.c.
1444 * c-spellcheck.h: New file, taken from macro-handling code in
1445 spellcheck-tree.h.
1446
e76c7157
JJ
14472017-12-01 Jakub Jelinek <jakub@redhat.com>
1448
1449 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1450 attribute.
1451 (handle_simd_attribute): Don't check for "cilk simd function"
1452 attribute. Reindent, formatting changes.
1453
b0da4034
JK
14542017-11-30 Julia Koval <julia.koval@intel.com>
1455
1456 * c-common.h (inv_list): Remove.
1457
058f0b9e
JJ
14582017-11-28 Jakub Jelinek <jakub@redhat.com>
1459
1460 PR sanitizer/81275
1461 * c-common.c (c_switch_covers_all_cases_p_1,
1462 c_switch_covers_all_cases_p): New functions.
1463 * c-common.h (c_switch_covers_all_cases_p): Declare.
1464
5e9d6aa4 14652017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1466 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1467
1468 * array-notation-common.c: Delete.
1469 * c-cilkplus.c: Ditto.
1470 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1471 * c-common.def (ARRAY_NOTATION_REF): Remove.
1472 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1473 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1474 c_validate_cilk_plus_loop, cilkplus_an_parts,
1475 cilk_ignorable_spawn_rhs_op,
1476 cilk_recognize_spawn): Remove.
1477 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1478 * c-omp.c: Remove CILK_SIMD check.
1479 * c-pragma.c: Ditto.
1480 * c-pragma.h: Remove CILK related pragmas.
1481 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1482 ARRAY_NOTATION_REF condition.
1483 (c_pretty_printer::expression): Ditto.
1484 * c.opt (fcilkplus): Remove.
1485 * cilk.c: Delete.
1486
1af4ebf5
MG
14872017-11-21 Marc Glisse <marc.glisse@inria.fr>
1488
1489 * c-pretty-print.c (pp_c_additive_expression,
1490 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1491
d44ed508
JJ
14922017-11-21 Jakub Jelinek <jakub@redhat.com>
1493
7d2f0f9b
JJ
1494 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1495
d44ed508
JJ
1496 PR c++/83059
1497 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1498 instead of tree_to_uhwi, formatting fix.
1499
26edace6
DM
15002017-11-20 David Malcolm <dmalcolm@redhat.com>
1501
1502 PR c/81404
1503 * known-headers.cc: New file, based on material from c/c-decl.c.
1504 (suggest_missing_header): Copied as-is.
1505 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1506 heavily edited to add C++ support. Add some knowledge about
1507 <limits.h>, <stdint.h>, and <wchar.h>.
1508 * known-headers.h: Likewise.
1509
6c7a259b
DM
15102017-11-20 David Malcolm <dmalcolm@redhat.com>
1511
1512 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1513 (lookup_name_fuzzy): Likewise. Convert return type from
1514 const char * to name_hint. Add location_t param.
1515 * name-hint.h: New header.
1516
f9c59f7e
JJ
15172017-11-19 Jakub Jelinek <jakub@redhat.com>
1518
1519 PR c/66618
1520 PR c/69960
1521 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1522
1e39313a
JM
15232017-11-16 Joseph Myers <joseph@codesourcery.com>
1524
1525 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1526 expected publication date of C17.
1527 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1528
3ca0dc60
JM
15292017-11-15 Joseph Myers <joseph@codesourcery.com>
1530
1531 PR c/81156
1532 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1533 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1534
025d57f0
MS
15352017-11-10 Martin Sebor <msebor@redhat.com>
1536
1537 PR c/81117
1538 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1539 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1540 * c.opt (-Wstringop-truncation): New option.
1541
1b6fa695
ML
15422017-11-06 Martin Liska <mliska@suse.cz>
1543
1544 PR middle-end/82404
1545 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1546 FE.
1547 * c.opt: Set default value of warn_return_type.
1548
64a5912c
DM
15492017-10-31 David Malcolm <dmalcolm@redhat.com>
1550
1551 * c-common.c (binary_op_error): Update for renaming of
1552 error_at_rich_loc.
1553 (c_parse_error): Likewise.
1554 * c-warn.c (warn_logical_not_parentheses): Likewise for
1555 renaming of inform_at_rich_loc.
1556 (warn_for_restrict): Likewise for renaming of
1557 warning_at_rich_loc_n.
1558
c76dc9c3
JM
15592017-10-30 Joseph Myers <joseph@codesourcery.com>
1560
1561 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1562 * c-opts.c (set_std_c17): New function.
1563 (c_common_init_options): Use gnu17 as default C version.
1564 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1565
ee5fd23a
MM
15662017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1567
1568 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1569 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1570 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1571 __FP_FAST_FMA<N>X.
1572
d1047465
MP
15732017-10-23 Marek Polacek <polacek@redhat.com>
1574
1575 PR c/82681
1576 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1577
9e878cf1
EB
15782017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1579
1580 * c-common.c (check_builtin_function_arguments): Also check arguments
1581 of __builtin_alloca_with_align_and_max.
1582
89b6abbb
DM
15832017-10-17 David Malcolm <dmalcolm@redhat.com>
1584
1585 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1586 rather than NULL to format_warning_va.
1587 (check_format_types): Likewise when calling format_type_warning.
1588 Remove code to extract source_ranges and source_range * in favor
1589 of just a location_t.
1590 (format_type_warning): Convert source_range * param to a
1591 location_t.
1592
39382c09
JJ
15932017-10-13 Jakub Jelinek <jakub@redhat.com>
1594
1595 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1596 [LR]SHIFT_EXPR.
1597
62e1c678
DM
15982017-10-12 David Malcolm <dmalcolm@redhat.com>
1599
1600 * c-common.c (enum missing_token_insertion_kind): New enum.
1601 (get_missing_token_insertion_kind): New function.
1602 (maybe_suggest_missing_token_insertion): New function.
1603 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1604
b90c9338
NS
16052017-10-11 Nathan Sidwell <nathan@acm.org>
1606
1607 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1608 (c_common_handle_option): Update incpath_kind names.
1609
3a266bcd
ML
16102017-10-11 Martin Liska <mliska@suse.cz>
1611
1612 PR sanitizer/82490
1613 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1614 Wattributes warning.
1615
8e6cdc90
RS
16162017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1617
1618 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1619 operating on trees as wide_ints.
1620 * c-common.c (pointer_int_sum): Likewise.
1621 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1622 * c-warn.c (match_case_to_enum_1): Likewise.
1623 (c_do_switch_warnings): Likewise.
1624 (maybe_warn_shift_overflow): Likewise.
1625
802b38c9
JJ
16262017-10-10 Jakub Jelinek <jakub@redhat.com>
1627
1628 PR c/82437
1629 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1630 instead of wide_int::from.
1631
4e34b338
JJ
16322017-10-06 Jakub Jelinek <jakub@redhat.com>
1633
1634 PR c/82437
1635 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1636 using to_widest use wide_int with the larger of the two precisions.
1637
4bc4b2b4
BE
16382017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1639
1640 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1641 functions.
1642
a1488398
RS
16432017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1644
1645 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1646 when combining the original unconverted comparison operands.
1647
01c9fb68
JJ
16482017-09-29 Jakub Jelinek <jakub@redhat.com>
1649
1650 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1651 attribute.
1652
6e3e8419
EB
16532017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1654
1655 * c-ada-spec.c (to_ada_name): Add index parameter.
1656 (pp_ada_tree_identifier): Likewise.
1657 (dump_ada_macros): Adjust call to to_ada_name.
1658 (struct overloaded_name_hash): New type.
1659 (struct overloaded_name_hasher): Likewise.
1660 (overloaded_names): New hash table.
1661 (compute_overloading_index): New function.
1662 (dump_ada_decl_name): Call it and pass the result to
1663 pp_ada_tree_identifier.
1664 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1665 (dump_ada_function_declaration): Likewise.
1666 (dump_generic_ada_node): Likewise.
1667 (print_constructor): Likewise.
1668 (print_destructor): Likewise.
1669 (dump_ada_specs): Delete overloaded_names table.
1670
79310774
EB
16712017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1672
1673 * c-ada-spec.c (max_ada_macros): Move around.
1674 (store_ada_macro_index): Likewise.
1675 (source_file): Rename into...
1676 (macro_source_file): ...this.
1677 (count_ada_macro): Move around.
1678 (store_ada_macro): Likewise.
1679 (compare_macro): Likewise.
1680 (print_ada_macros): Merge in...
1681 (dump_ada_macros): ...this.
1682 (source_file_base): Rename into...
1683 (current_source_file): ...this.
1684 (print_comment): Move around.
1685 (dump_ada_nodes): Call dump_ada_declaration directly.
1686 (struct with): Change type of limited field to bool.
1687 (append_withs): Change type of limited_access parameter to bool.
1688 (pp_ada_tree_identifie): Likewise.
1689 (dump_ada_decl_nam): Likewise.
1690 (dump_generic_ada_node): Likewise. Do not print the return type.
1691 (to_ada_name): Change type of space_found parameter to bool.
1692 (dump_ada_function_declaration): Return void and change type of
1693 parameters to bool. Also print the return type for a function.
1694 (print_ada_methods): Rename into...
1695 (dump_ada_methods): ...this.
1696 (print_ada_declaration): Rename into ...
1697 (dump_ada_declaration): ...this. Do not print the return type.
1698 (print_ada_struct_decl): Rename into...
1699 (dump_ada_struct_decl): ...this.
1700
7d386d45
JJ
17012017-09-29 Jakub Jelinek <jakub@redhat.com>
1702
1703 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1704 rather than DECL_INITIAL.
1705 (common_handle_aligned_attribute): Likewise.
1706
9ed32e27
AO
17072017-09-20 Alexandre Oliva <aoliva@redhat.com>
1708
1709 * c.opt (gen-decls): Add RejectNegative.
1710
026a79f7
AS
17112017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1712 Jakub Jelinek <jakub@redhat.com>
1713
1714 Add support for -std=c++2a.
1715 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1716 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1717 * c-opts.c (set_std_cxx2a): New.
1718 (c_common_handle_option): Set options when -std=c++2a is enabled.
1719 (c_common_post_options): Adjust comments.
1720 (set_std_cxx14, set_std_cxx17): Likewise.
1721
4a8ca690
EB
17222017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1723
1724 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1725 message for non-uniform endianness and issue a warning in C++.
1726
7b936140
JJ
17272017-09-15 Jakub Jelinek <jakub@redhat.com>
1728
1729 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1730 (Wc++17-compat): Change from undocumented alias to option.
1731 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1732 change C++1z to C++17 in description.
1733 (std=c++1z, std=gnu++1z): Change from option to undocumented
1734 deprecated alias.
1735 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1736 Adjust description.
1737 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1738 * c-opts.c (set_std_cxx1z): Rename to ...
1739 (set_std_cxx17): ... this.
1740 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1741 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1742 caller.
7b936140
JJ
1743 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1744 comments.
1745
12263f13
L
17462017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1747
1748 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1749 function alignment if warn_if_not_aligned_p is true.
1750
6836632e
NS
17512017-09-12 Nathan Sidwell <nathan@acm.org>
1752
1753 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1754 resort_sorted_fields): Move to c/c-decl.c.
1755 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1756 (struct sorted_fields_type): Move to c/c-lang.h.
1757
019bf9ad
JW
17582017-09-09 Jonathan Wakely <jwakely@redhat.com>
1759
1760 PR c++/81852
1761 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1762
bc7fe952
MP
17632017-09-04 Marek Polacek <polacek@redhat.com>
1764
1765 PR c/81783
1766 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1767 (warn_tautological_cmp): Call it.
1768
de7c2c6a
BK
17692017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1770
1771 * c-opts.c (c_common_finish): Write dependency information even if
1772 there are errors.
1773
d2e05fcb
JJ
17742017-09-01 Jakub Jelinek <jakub@redhat.com>
1775
1776 PR c/81887
1777 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1778 (omp_pragmas_simd): ... here.
1779 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1780 create new clauses list containing just simd clause.
1781
18e2a8b8
RS
17822017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1783 Alan Hayward <alan.hayward@arm.com>
1784 David Sherwood <david.sherwood@arm.com>
1785
1786 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1787 into scalar_mode_supported_p call.
1788 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1789
16d22000
RS
17902017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1791 Alan Hayward <alan.hayward@arm.com>
1792 David Sherwood <david.sherwood@arm.com>
1793
1794 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1795 for the mode iterator.
1796
b397965c
RS
17972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1798 Alan Hayward <alan.hayward@arm.com>
1799 David Sherwood <david.sherwood@arm.com>
1800
1801 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1802 * c-common.c (c_build_vec_perm_expr): Likewise.
1803
357b7604
RS
18042017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1805 Alan Hayward <alan.hayward@arm.com>
1806 David Sherwood <david.sherwood@arm.com>
1807
1808 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1809
e05c94ba
RS
18102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1811 Alan Hayward <alan.hayward@arm.com>
1812 David Sherwood <david.sherwood@arm.com>
1813
1814 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1815 before calling targetm.addr_space.valid_pointer_mode.
1816
5c20c4af
RS
18172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1818 Alan Hayward <alan.hayward@arm.com>
1819 David Sherwood <david.sherwood@arm.com>
1820
1821 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1822
c94843d2 18232017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
1824 Alan Hayward <alan.hayward@arm.com>
1825 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
1826
1827 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1828 iterators.
1829 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1830
4e10a5a7
RS
18312017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1832 Alan Hayward <alan.hayward@arm.com>
1833 David Sherwood <david.sherwood@arm.com>
1834
1835 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1836 case statements.
1837
130fcab0
ML
18382017-08-29 Martin Liska <mliska@suse.cz>
1839
1840 PR other/39851
1841 * c-common.c (parse_optimize_options): Add argument to function
1842 call.
1843 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1844
14e18d71
DM
18452017-08-24 David Malcolm <dmalcolm@redhat.com>
1846
1847 * c-lex.c (interpret_float): Use token location
1848 when building an EXCESS_PRECISION_EXPR.
1849
2f687306
DM
18502017-08-21 David Malcolm <dmalcolm@redhat.com>
1851
1852 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1853 it to check_function_format.
1854 * c-common.h (check_function_arguments): Add vec<location_t> *
1855 param.
1856 (check_function_format): Likewise.
1857 * c-format.c (struct format_check_context): Add field "arglocs".
1858 (check_function_format): Add param "arglocs"; pass it to
1859 check_format_info.
1860 (check_format_info): Add param "arglocs"; use it to initialize
1861 new field of format_ctx.
1862 (check_format_arg): Pass format_ctx->arglocs to new param of
1863 check_format_info_main.
1864 (class argument_parser): New field "arglocs".
1865 (argument_parser::argument_parser): Add "arglocs_" param and use
1866 it to initialize new field.
1867 (argument_parser::check_argument_type): Pass new arglocs field to
1868 check_format_types.
1869 (check_format_info_main): Add param "arglocs", and use it when
1870 constructing arg_parser.
1871 (check_format_types): Add param "arglocs"; use it if non-NULL when
1872 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1873
00aa1fa2
L
18742017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1875
1876 PR c/53037
1877 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1878 (c_common_attribute_table): Add warn_if_not_aligned.
1879 (handle_aligned_attribute): Renamed to ...
1880 (common_handle_aligned_attribute): Remove argument, name, and add
1881 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1882 (handle_aligned_attribute): New.
1883 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1884
27be025d
MS
18852017-08-14 Martin Sebor <msebor@redhat.com>
1886
1887 PR c/81117
1888 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1889 (handle_nonstring_attribute): New function.
1890
da67acb9
MS
18912017-08-14 Martin Sebor <msebor@redhat.com>
1892
1893 PR c/81117
1894 * c-format.h (T89_G): New macro.
1895 * c-format.c (local_gcall_ptr_node): New variable.
1896 (init_dynamic_diag_info): Initialize it.
1897
a8b522b4
ML
18982017-08-11 Martin Liska <mliska@suse.cz>
1899
1900 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1901 TARGET_SUPPORTS_ALIASES.
1902
32129a17
DM
19032017-08-10 David Malcolm <dmalcolm@redhat.com>
1904
1905 * c-common.c (c_parse_error): Add rich_location * param, using it
1906 rather implicitly using input_location.
1907 * c-common.h (c_parse_error): Add rich_location * param.
1908
30af3a2b
MP
19092017-08-09 Marek Polacek <polacek@redhat.com>
1910
1911 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1912 (c_common_truthvalue_conversion): Likewise.
1913 * c-omp.c (c_finish_omp_atomic): Likewise.
1914 * c-common.h (build_binary_op): Update declaration.
1915
314e6352
ML
19162017-08-08 Martin Liska <mliska@suse.cz>
1917
1918 * c-ada-spec.c: Include header files.
1919 * c-ubsan.c: Likewise.
1920 * c-warn.c: Likewise.
1921
56b5041c
JJ
19222017-08-07 Jakub Jelinek <jakub@redhat.com>
1923
1924 PR c/69389
1925 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1926
db440138
EB
19272017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1928
1929 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1930 (print_ada_methods): Likewise.
1931 (print_ada_declaration): Likewise.
1932
577eec56
ML
19332017-08-07 Martin Liska <mliska@suse.cz>
1934
1935 * array-notation-common.c: Add new includes.
1936 * c-format.c( handle_format_attribute): Canonicalize a format
1937 function name.
1938 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1939 attribute.
1940 * c-pretty-print.c: Add new include.
1941
b854df3c
EB
19422017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1943
1944 * c-ada-spec.c (has_static_fields): Look only into variables.
1945 (print_constructor): Add TYPE parameter and use it for the name.
1946 (print_destructor): Likewise.
1947 (print_ada_declaration): Adjust to new constructor/destructor names.
1948 Adjust calls to print_constructor and print_destructor.
1949 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1950 Look only into variables in the final loop.
1951
9f2cb25e
EB
19522017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1953
1954 * c-ada-spec.c (has_static_fields): Look only into fields.
1955 (dump_generic_ada_node): Small tweak.
1956 (dump_nested_types): Look only into fields.
1957 (print_ada_declaration): Look only into methods. Small tweak.
1958 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1959
f4bcd9eb
EB
19602017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1961
1962 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1963 (dump_ada_function_declaration): Likewise.
1964 (dump_generic_ada_node): Likewise.
1965 (print_ada_declaration): Add support for const-qualified variables.
1966
f34ebeb2
ML
19672017-07-31 Martin Liska <mliska@suse.cz>
1968
1969 PR sanitize/81530
1970 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1971 Guard condition with flag_sanitize_p also with current_function_decl
1972 non-null equality.
1973 (ubsan_maybe_instrument_reference_or_call): Likewise.
1974
218e5d04
UB
19752017-07-30 Uros Bizjak <ubizjak@gmail.com>
1976
1977 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1978
942047f2
EB
19792017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1980
1981 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1982 for enumeral types.
1983 (print_ada_declaration): Add missing guard for record types.
1984
a40ff0ae
JJ
19852017-07-27 Jakub Jelinek <jakub@redhat.com>
1986
1987 PR c/45784
1988 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1989 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1990 new COMPOUND_EXPRs around the rhs of the comparison.
1991
06bd22f6
MP
19922017-07-27 Marek Polacek <polacek@redhat.com>
1993
1994 PR c/81417
1995 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1996 the types.
1997
036ea399
JJ
19982017-07-27 Jakub Jelinek <jakub@redhat.com>
1999
2000 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2001 (handle_noipa_attribute): New function.
2002
417ca011
TD
20032017-07-07 Torsten Duwe <duwe@suse.de>
2004
2005 * c-attribs.c (c_common_attribute_table): Add entry for
2006 "patchable_function_entry".
2007
5aaa8fb4
NS
20082017-07-20 Nathan Sidwell <nathan@acm.org>
2009
2010 Remove TYPE_METHODS.
2011 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2012 dump_ada_template, print_ada_methods,
2013 print_ada_declaration): Member fns are on TYPE_FIELDS.
2014
ff22eb12
NS
20152017-07-18 Nathan Sidwell <nathan@acm.org>
2016
2017 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2018
eea77d1f
DM
20192017-07-14 David Malcolm <dmalcolm@redhat.com>
2020
2021 * c-common.c (try_to_locate_new_include_insertion_point): New
2022 function.
2023 (per_file_includes_t): New typedef.
2024 (added_includes_t): New typedef.
2025 (added_includes): New variable.
2026 (maybe_add_include_fixit): New function.
2027 * c-common.h (maybe_add_include_fixit): New decl.
2028
281ac396
MS
20292017-07-10 Martin Sebor <msebor@redhat.com>
2030
2031 PR other/81345
2032 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2033
b6f43128
DM
20342017-07-06 David Malcolm <dmalcolm@redhat.com>
2035
2036 * c-common.c (selftest::c_family_tests): New.
2037 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2038 (selftest::c_family_tests): New decl.
2039
efbf55b0
MP
20402017-07-04 Marek Polacek <polacek@redhat.com>
2041
2042 PR c/81231
2043 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2044 types.
2045
6c86bd88
MP
20462017-07-04 Marek Polacek <polacek@redhat.com>
2047
2048 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2049
17a7218b
ML
20502017-06-28 Martin Liska <mliska@suse.cz>
2051
2052 PR ipa/81128
2053 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2054 to a function declaration.
2055
63010089
ML
20562017-06-28 Martin Liska <mliska@suse.cz>
2057
2058 PR driver/79659
2059 * c.opt: Add IntegerRange to various options.
2060
3e2becc4
MP
20612017-06-26 Marek Polacek <polacek@redhat.com>
2062
2063 PR c/80116
2064 * c-common.h (warn_for_multistatement_macros): Declare.
2065 * c-warn.c: Include "c-family/c-indentation.h".
2066 (warn_for_multistatement_macros): New function.
2067 * c.opt (Wmultistatement-macros): New option.
2068 * c-indentation.c (guard_tinfo_to_string): No longer static.
2069 Change the parameter type to "enum rid". Handle RID_SWITCH.
2070 * c-indentation.h (guard_tinfo_to_string): Declare.
2071
2db9b7cd
MG
20722017-06-23 Marc Glisse <marc.glisse@inria.fr>
2073
2074 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2075
c3684b7b
MS
20762017-06-15 Martin Sebor <msebor@redhat.com>
2077
2078 PR c++/80560
2079 * c.opt (-Wclass-memaccess): New option.
2080
e72c4afd
BK
20812017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2082
2083 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2084
8a516588
MP
20852017-06-13 Marek Polacek <polacek@redhat.com>
2086
2087 PR objc/80949
2088 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2089 branches is null.
2090
45b2222a
ML
20912017-06-13 Martin Liska <mliska@suse.cz>
2092
2093 PR sanitize/78204
2094 * c-attribs.c (add_no_sanitize_value): New function.
2095 (handle_no_sanitize_attribute): Likewise.
2096 (handle_no_sanitize_address_attribute): Use the function.
2097 (handle_no_sanitize_thread_attribute): New function.
2098 (handle_no_address_safety_analysis_attribute): Use
2099 add_no_sanitize_value.
2100 (handle_no_sanitize_undefined_attribute): Likewise.
2101 * c-common.h: Declare new functions.
2102 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2103 (ubsan_instrument_shift): Likewise.
2104 (ubsan_instrument_bounds): Likewise.
2105 (ubsan_maybe_instrument_array_ref): Likewise.
2106 (ubsan_maybe_instrument_reference_or_call): Likewise.
2107
a01f151f
JM
21082017-06-11 Jason Merrill <jason@redhat.com>
2109
2110 * c-ada-spec.c, c-pragma.c: Use id_equal.
2111
3de4ac6d
MP
21122017-06-04 Marek Polacek <polacek@redhat.com>
2113
2114 PR c/80919
2115 * c-format.c (matching_type_p): Return false if any of the types
2116 requires structural equality.
2117
2474f48f
MS
21182017-06-02 Martin Sebor <msebor@redhat.com>
2119
2120 PR c/80892
2121 * c-warn.c (conversion_warning): Use -Wconversion for integer
2122 conversion and -Wfloat-conversion for floating one.
2123
40ffd95f
BE
21242017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2125
2126 * c.opt (Wsizeof-pointer-div): New warning option.
2127
3fa4634c
VR
21282017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2129
2130 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2131 (Wcatch-value=1): Enable by -Wall.
2132
f012c8ef
DM
21332017-05-30 David Malcolm <dmalcolm@redhat.com>
2134
2135 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2136 format_chars.
2137 * c.opt (fdiagnostics-show-template-tree): New option.
2138 (felide-type): New option.
2139
63dbcd13
VR
21402017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2141
2142 * c.opt (Wcatch-value=): New C++ warning flag.
2143
be136b5c
NS
21442017-05-24 Nathan Sidwell <nathan@acm.org>
2145
2146 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2147 const casts to avoid warning.
2148
3cd211af
MS
21492017-05-24 Martin Sebor <msebor@redhat.com>
2150
2151 PR c/80731
2152 * c-common.h (unsafe_conversion_p): Add a function argument.
2153 * c-common.c (unsafe_conversion_p): Same.
2154 Add type names and values to diagnostics.
2155 (scalar_to_vector): Adjust.
2156 * c-warn.c (constant_expression_error): Add a function argument.
2157 Add type names and values to diagnostics.
2158 (conversion_warning): Add a function argument.
2159 Add type names and values to diagnostics.
2160 (warnings_for_convert_and_check): Same.
2161
1ff7be5a
JM
21622017-05-19 Jason Merrill <jason@redhat.com>
2163
2164 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2165 enumerators.
2166
ff502317
BE
21672017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2168
2169 * c-format.c (locus): Move out of function scope,
2170 add GTY attribute.
2171
2a8a8d7b
NS
21722017-05-19 Nathan Sidwell <nathan@acm.org>
2173
2174 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2175 (c_common_parse_file): Remove class dump handling.
2176 (get_dump_info): Likewise.
2177
39aac208
RB
21782017-05-19 Richard Biener <rguenther@suse.de>
2179
2180 PR c++/80593
2181 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2182 to alias-set zero memory.
2183
6ecd2339
BE
21842017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2185
2186 * c-format.c (local_tree_type_node): Add GTY attribute.
2187
6574d78e
MP
21882017-05-18 Marek Polacek <polacek@redhat.com>
2189
2190 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2191 (c_common_fixed_point_type_for_size): Likewise.
2192 (c_common_type_for_mode): Likewise.
2193 (shorten_compare): Likewise.
2194 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2195 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2196
e3455240
MP
21972017-05-18 Marek Polacek <polacek@redhat.com>
2198
2199 * c-common.c (self_promoting_args_p): Change the return type to bool.
2200 Use false/true instead of 0/1.
2201 * c-common.h (self_promoting_args_p): Update.
2202
3fa8871b
MP
22032017-05-17 Marek Polacek <polacek@redhat.com>
2204
2205 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2206 * c-warn.c: Likewise.
2207
b42cc3ca
VV
22082017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2209
2210 Implement new C++ intrinsics __is_assignable and __is_constructible.
2211 * c-common.c (__is_assignable, __is_constructible): New.
2212 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2213
1a817418
ML
22142017-05-17 Martin Liska <mliska@suse.cz>
2215
2216 * c-common.h: Introduce dump_flags_t type and
2217 use it instead of int type.
2218 * c-gimplify.c (c_genericize): Likewise.
2219 * c-opts.c: Likewise.
2220
b2fa0a8b
MP
22212017-05-17 Marek Polacek <polacek@redhat.com>
2222
2223 * c-common.c (c_save_expr): Remove.
2224 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2225 * c-common.h (c_save_expr): Remove declaration.
2226
31c2d57d
VR
22272017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2228
2229 PR c/35441
2230 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2231 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2232 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2233 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2234 RDIV_EXPR.
2235 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2236
684f84de
MP
22372017-05-09 Marek Polacek <polacek@redhat.com>
2238
2239 PR c/80525
2240 * c-warn.c (unwrap_c_maybe_const): New.
2241 (warn_logical_operator): Call it.
2242
641da50a
NS
22432017-05-09 Nathan Sidwell <nathan@acm.org>
2244
2245 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2246 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2247
631238ac
MS
22482017-05-08 Martin Sebor <msebor@redhat.com>
2249
2250 PR translation/80280
2251 * c-format.h (struct format_flag_spec): Add new member.
2252 (T89_T): New macro.
2253 * c-format.c (local_tree_type_node): New global.
2254 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2255 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2256 (strfmon_flag_specs): Likewise.
2257 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2258 with distinct quoting properties.
2259 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2260 (flag_chars_t::validate): Add argument and handle bad quoting.
2261 (check_format_info_main): Handle quoting problems.
2262 (init_dynamic_diag_info): Simplify.
2263
49f0c04c
JM
22642017-05-08 Jason Merrill <jason@redhat.com>
2265
2266 * c-opts.c (c_common_post_options): Update defaults for
2267 flag_abi_version and flag_abi_compat_version.
2268
56d35585
DM
22692017-05-05 David Malcolm <dmalcolm@redhat.com>
2270
2271 * c-common.c (c_cpp_error): Replace report_diagnostic
2272 with diagnostic_report_diagnostic.
2273
0f2c4a8f
MS
22742017-05-04 Martin Sebor <msebor@redhat.com>
2275
2276 PR translation/80280
2277 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2278 (handle_weakref_attribute): Same.
2279
6fe63fb4
NS
22802017-05-03 Nathan Sidwell <nathan@acm.org>
2281
2282 Canonicalize canonical type hashing
2283 * c-common.c (complete_array_type): Use type_hash_canon.
2284
815d9cc6
XR
22852017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2286
92a285c1 2287 PR c++/80038
815d9cc6
XR
2288 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2289 prototype.
2290 (cilk_install_body_pedigree_operations): Likewise.
2291 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2292 detatched.
2293 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2294 (cilk_install_body_pedigree_operations): Likewise.
2295 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2296 unwrapping.
2297
f8a36447
JJ
22982017-04-27 Jakub Jelinek <jakub@redhat.com>
2299
2300 PR c++/80534
2301 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2302 flag on non-aggregate element types.
2303
7c145456
BE
23042017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2305
2306 * c-common.c (c_type_hasher, type_hash_table): Remove.
2307 (c_common_get_alias_set): Remove unreachable code.
2308 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2309
c3cbcd45
VR
23102017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2311
2312 * c.opt (Wextra-semi): New C++ warning flag.
2313
8a59d466
JJ
23142017-04-20 Jakub Jelinek <jakub@redhat.com>
2315
2316 PR middle-end/80423
2317 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2318
8487c9a5
JJ
23192017-04-18 Jakub Jelinek <jakub@redhat.com>
2320
2321 PR middle-end/79788
2322 PR middle-end/80375
2323 * c-common.c (c_common_type_for_mode): Don't handle
2324 widest_*_literal_type_node here.
2325 c_common_signed_or_unsigned_type): Likewise.
2326 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2327 to *intTI_type_node or *intDI_type_node depending on whether
2328 TImode is supported by the target or not.
2329
3ee0fb02
ML
23302017-04-10 Martin Liska <mliska@suse.cz>
2331
2332 PR sanitizer/80350
2333 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2334 doing an UBSAN check.
2335
5764ee3c
JW
23362017-04-03 Jonathan Wakely <jwakely@redhat.com>
2337
2338 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2339
6f3af356
JJ
23402017-03-31 Jakub Jelinek <jakub@redhat.com>
2341
2342 PR c++/79572
2343 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2344 tree *.
2345 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2346 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2347 REFERENCE_TYPE.
2348
f6a7a9d5
DM
23492017-03-31 David Malcolm <dmalcolm@redhat.com>
2350
2351 PR documentation/78732
2352 * c.opt (Wendif-labels): Fix description to refer to
2353 #else rather than #elif.
2354
af88f557
JJ
23552017-03-31 Jakub Jelinek <jakub@redhat.com>
2356
2357 PR libstdc++/80251
2358 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2359 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2360
a9e4a1a5
JJ
23612017-03-27 Jakub Jelinek <jakub@redhat.com>
2362
2363 PR middle-end/80162
2364 * c-common.c (c_common_mark_addressable_vec): Don't set
2365 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2366
3f01b620
MS
23672017-03-21 Martin Sebor <msebor@redhat.com>
2368
2369 PR c++/79548
2370 * c-common.c (set_underlying_type): Mark type used only when
2371 original del is declared unused.
2372
2f6f187a
DM
23732017-03-10 David Malcolm <dmalcolm@redhat.com>
2374
2375 PR translation/79848
2376 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2377 "%qs".
2378
a02fa805
DM
23792017-03-10 David Malcolm <dmalcolm@redhat.com>
2380
2381 PR c/79921
2382 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2383 from inform's message, so that xgettext can locate it.
2384
822a132c
MP
23852017-03-09 Marek Polacek <polacek@redhat.com>
2386
2387 PR c++/79962
2388 PR c++/79984
2389 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2390 conversion to the attribute list.
2391
bba81f1c
ML
23922017-03-09 Martin Liska <mliska@suse.cz>
2393
2394 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2395
108154ff
JM
23962017-03-03 Jason Merrill <jason@redhat.com>
2397
2398 * c.opt (Wnoexcept-type): New.
2399
eb0e7c34
RB
24002017-03-02 Richard Biener <rguenther@suse.de>
2401
2402 PR c/79756
2403 * c-common.c (c_common_mark_addressable_vec): Look through
2404 C_MAYBE_CONST_EXPR.
2405
9453ba0a
ML
24062017-02-28 Martin Liska <mliska@suse.cz>
2407
2408 * c.opt: Replace space with tabular for options of <number>
2409 type.
2410
6a825afe
ML
24112017-02-28 Martin Liska <mliska@suse.cz>
2412
2413 * c.opt: Fix --help=option -Q for options which are of
2414 an enum type.
2415
4227c9ad
JJ
24162017-02-24 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR c++/79588
2419 * c-common.c (check_function_restrict): New function.
2420 (check_function_arguments): Add FNDECL argument. Call
2421 check_function_restrict if -Wrestrict.
2422 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2423 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2424 * c-common.h (check_function_arguments): Add FNDECL argument.
2425 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2426
59909673
EB
24272017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2428
2429 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2430 treatment of parameters with pointer-to-tagged type and tidy up.
2431 (print_ada_methods): Remove the special treatment of C++ static member
2432 functions.
2433
54dcd526
ML
24342017-02-22 Martin Liska <mliska@suse.cz>
2435
2436 * c.opt: Replace inequality signs with square brackets
2437 for -Wnornalized.
2438
00bc9de3
JJ
24392017-02-21 Jakub Jelinek <jakub@redhat.com>
2440
2441 PR c++/79641
2442 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2443 preserve quals.
2444
97fcf744
JM
24452017-02-17 Joseph Myers <joseph@codesourcery.com>
2446
2447 * c-cppbuiltin.c (builtin_define_float_constants): Define
2448 __DECIMAL_DIG__ to the value for long double.
2449
c7545f1c
MP
24502017-02-15 Marek Polacek <polacek@redhat.com>
2451
2452 PR c/79515
2453 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2454 conversion has occured.
2455
c2e84327
DM
24562017-01-24 David Malcolm <dmalcolm@redhat.com>
2457
2458 * c-common.c (c_common_reswords): Add "__RTL".
2459 * c-common.h (enum rid): Add RID_RTL.
2460
2ebd93e1
MP
24612017-01-20 Marek Polacek <polacek@redhat.com>
2462
2463 PR c/64279
2464 * c-common.h (do_warn_duplicated_branches_r): Declare.
2465 * c-gimplify.c (c_genericize): Walk the function tree calling
2466 do_warn_duplicated_branches_r.
2467 * c-warn.c (expr_from_macro_expansion_r): New.
2468 (do_warn_duplicated_branches): New.
2469 (do_warn_duplicated_branches_r): New.
2470 * c.opt (Wduplicated-branches): New option.
2471
0d80ab91
DM
24722017-01-17 David Malcolm <dmalcolm@redhat.com>
2473
2474 PR c++/71497
2475 * c-indentation.c (warn_for_misleading_indentation): Use the past
2476 subjunctive in the note.
2477
7f991c36
AH
24782017-01-17 Aldy Hernandez <aldyh@redhat.com>
2479
2480 PR c/79116
2481 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2482 start type to integer_type.
2483
1c70261c
JJ
24842017-01-16 Jakub Jelinek <jakub@redhat.com>
2485
2486 PR driver/49726
2487 * c.opt (gen-decls): Add Driver flag.
2488
1ddca3f3
PC
24892017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2490
2491 Revert:
2492 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2493
2494 PR c++/71737
2495 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2496
7d2f3f1d
PC
24972017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2498
2499 PR c++/71737
2500 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2501
bce6f760
MS
25022017-01-12 Martin Sebor <msebor@redhat.com>
2503
2504 (-Wformat-overflow): ...to this.
2505
bf5fbf46
MS
25062017-01-11 Martin Sebor <msebor@redhat.com>
2507
2508 PR c/78768
2509 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2510 Also enable for LTO.
2511
e363df3f
JM
25122017-01-10 Jason Merrill <jason@redhat.com>
2513
2514 Implement P0195R2, C++17 variadic using.
2515 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2516
bd2c6270
JJ
25172017-01-09 Jakub Jelinek <jakub@redhat.com>
2518
2519 PR translation/79019
2520 PR translation/79020
2521 * c.opt (Wnormalized=): Fix typo in description.
2522
efcc8d38
MS
25232017-01-08 Martin Sebor <msebor@redhat.com>
2524
2525 PR middle-end/77708
2526 * c.opt (-Wformat-truncation): New option.
2527
435f3f7a
AO
25282017-01-06 Alexandre Oliva <aoliva@redhat.com>
2529
2530 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2531 value to unsigned short to fit in 4 hex digits without
2532 warnings.
2533
4e89adf9
EB
25342017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2535
2536 * c.opt (fsso-struct): Add 'native' value.
2537
cd445b54
ML
25382017-01-05 Martin Liska <mliska@suse.cz>
2539
2540 PR pch/78970
2541 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2542 header.
2543
a9342885
MP
25442017-01-04 Marek Polacek <polacek@redhat.com>
2545
2546 PR c++/64767
2547 * c.opt (Wpointer-compare): New option.
2548
fc73e60c
JJ
25492017-01-04 Jakub Jelinek <jakub@redhat.com>
2550
2551 PR driver/78957
2552 * c.opt (fsso-struct=): Add RejectNegative.
2553
cbe34bb5
JJ
25542017-01-01 Jakub Jelinek <jakub@redhat.com>
2555
2556 Update copyright years.
2557
d4a6c0ea
ML
25582016-12-29 Martin Liska <mliska@suse.cz>
2559
2560 PR c/78933
2561 * c.opt (strong-eval-order): Add RejectNegative keyword.
2562
67a5ad7c
JM
25632016-12-22 Jason Merrill <jason@redhat.com>
2564
2565 Implement P0522R0, matching of template template arguments.
2566 * c-cppbuiltin.c (c_cpp_builtins): Define
2567 __cpp_template_template_args.
2568
0dba7960
JJ
25692016-12-21 Jakub Jelinek <jakub@redhat.com>
2570
2571 PR bootstrap/78817
2572 * c-common.c (struct nonnull_arg_ctx): New type.
2573 (check_function_nonnull): Return bool instead of void. Use
2574 nonnull_arg_ctx as context rather than just location_t.
2575 (check_nonnull_arg): Adjust for the new context type, set
2576 warned_p to true if a warning has been diagnosed.
2577 (check_function_arguments): Return bool instead of void.
2578 * c-common.h (check_function_arguments): Adjust prototype.
2579
31bfc9b9
JM
25802016-12-21 Jason Merrill <jason@redhat.com>
2581
2582 * c.opt (-fnew-ttp-matching): New flag.
2583 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2584
629b3d75
MJ
25852016-12-14 Martin Jambor <mjambor@suse.cz>
2586
2587 * c-omp.c: Include omp-general.h instead of omp-low.h.
2588 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2589 name.
2590
474da67e
MS
25912016-12-14 Martin Sebor <msebor@redhat.com>
2592
2593 PR c/17308
2594 * c-common.c (check_nonnull_arg): Disable when optimization
2595 is enabled.
2596
fe366b87
MP
25972016-12-12 Marek Polacek <polacek@redhat.com>
2598
2599 PR c++/78647
2600 * c-common.c (attribute_fallthrough_p): Return false for
2601 error_mark_node.
2602
8bd9f164
MS
26032016-12-08 Martin Sebor <msebor@redhat.com>
2604
2605 PR c/78284
2606 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2607
060162e0
MS
26082016-12-08 Martin Sebor <msebor@redhat.com>
2609
2610 PR c/78165
92a285c1
ML
2611 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2612 suffix.
060162e0 2613
ee92e7ba
MS
26142016-12-07 Martin Sebor <msebor@redhat.com>
2615
2616 PR c/53562
2617 PR middle-end/77784
2618 PR middle-end/78149
2619 PR middle-end/78138
2620 * c.opt (-Wstringop-overflow): New option.
2621
84b0769e
MO
26222016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2623
2624 * c-attribs.c (asan odr indicator): New attribute.
2625 (handle_asan_odr_indicator_attribute): New function.
2626
7fa6a965
PK
26272016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2628
2629 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2630 ptrdiff_type_node;
2631
56d8ffc1
JG
26322016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2633
2634 * c-common.c (excess_precision_mode_join): New.
2635 (c_ts18661_flt_eval_method): New.
2636 (c_c11_flt_eval_method): Likewise.
2637 (c_flt_eval_method): Likewise.
2638 * c-common.h (excess_precision_mode_join): New.
2639 (c_flt_eval_method): Likewise.
2640 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2641 (cpp_iec_559_value): Call it.
2642 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2643 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2644 __FLT_EVAL_METHOD_TS_18661_3__.
2645
04f0fcf7
JG
26462016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2647
2648 * c-opts.c (c_common_post_options): Add logic to handle the default
2649 case for -fpermitted-flt-eval-methods.
2650
fb2675cb
PB
26512016-11-23 Paolo Bonzini <bonzini@gnu.org>
2652
2653 * c.opt (Wexpansion-to-defined): New.
2654
ec1c5694
JJ
26552016-11-23 Jakub Jelinek <jakub@redhat.com>
2656
2657 PR target/78451
2658 * c-pragma.c (handle_pragma_target): Don't replace
2659 current_target_pragma, but chainon the new args to the current one.
2660
730c9e75
NS
26612016-11-22 Nathan Sidwell <nathan@acm.org>
2662
2663 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2664 indentation and formatting.
730c9e75 2665
89990732
MS
26662016-11-21 Martin Sebor <msebor@redhat.com>
2667
2668 * c.opt (-fprintf-return-value): Enable by default.
2669
48330c93
BE
26702016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2671
2672 PR c++/71973
2673 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2674 * c-common.c (c_common_nodes_and_builtins): Initialize
2675 const_tm_ptr_type_node.
2676
0d939c95
MP
26772016-11-16 Marek Polacek <polacek@redhat.com>
2678
2679 PR c/78285
2680 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2681
8e745a17
JJ
26822016-11-14 Jakub Jelinek <jakub@redhat.com>
2683
2684 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2685
1ee62b92 26862016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2687 Richard Biener <rguenther@suse.de>
2688
2689 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2690 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2691 * c.opt (fgimple): New option.
1ee62b92 2692
22b15758
UB
26932016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2694
2695 PR c/35503
2696 * c-common.h (warn_for_restrict): Declare.
2697 * c-warn.c: Include gcc-rich-location.h.
2698 (warn_for_restrict): New function.
2699 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2700 (gcc_cdiag_char_table): Likewise.
2701 (gcc_cxxdiag_char_table): Likewise.
2702 * c.opt (Wrestrict): New option.
2703
4be719cd
EB
27042016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2705
2706 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2707 for nested types only if the type is a record or union and dump SLOC.
2708
4a826ca6
JM
27092016-11-09 Jason Merrill <jason@redhat.com>
2710
2711 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2712
2e955d50
JJ
27132016-11-09 Jakub Jelinek <jakub@redhat.com>
2714
2715 * c-ubsan.c (ubsan_instrument_shift): Handle split
2716 -fsanitize=shift-base and -fsanitize=shift-exponent.
2717
51dc6603
JM
27182016-11-07 Jason Merrill <jason@redhat.com>
2719
2720 * c.opt (Wc++1z-compat): New.
2721 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2722
6dc4a604
ML
27232016-11-07 Martin Liska <mliska@suse.cz>
2724
2725 * c-warn.c (warn_for_unused_label): Save all labels used
2726 in goto or in &label.
2727
b302001e
JM
27282016-11-03 Jason Merrill <jason@redhat.com>
2729
2730 * c-cppbuiltin.c (c_cpp_builtins): Correct
2731 __cpp_inheriting_constructors.
2732
31f7f784
JM
27332016-11-01 Jason Merrill <jason@redhat.com>
2734
2bc78e3c
JM
2735 * c-cppbuiltin.c (c_cpp_builtins): Update
2736 __cpp_inheriting_constructors.
2737
31f7f784
JM
2738 * c.opt (-fnew-inheriting-ctors): New.
2739 * c-opts.c: Default to on for ABI 11+.
2740
dcb466ec
JJ
27412016-10-31 Jakub Jelinek <jakub@redhat.com>
2742
2743 PR c++/77948
2744 * c.opt (fext-numeric-literals): Add Var and Init.
2745 * c-opts.c (c_common_handle_option): Don't clear
2746 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2747 (c_common_post_options): Clear it here if not set
2748 explicitly.
2749
52e1b91e
AH
27502016-10-28 Aldy Hernandez <aldyh@redhat.com>
2751
2752 PR debug/77773
2753 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2754 if NULL.
2755
e16f1cc7
JJ
27562016-10-25 Jakub Jelinek <jakub@redhat.com>
2757
2758 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2759 * c-common.c (c_common_reswords): Add __builtin_launder.
2760
f8348061
BE
27612016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2762
2763 * c-common.c (c_common_truthvalue_conversion): Warn for
2764 multiplications in boolean context. Fix the quoting of '<<' and '<'
2765 in the shift warning.
2766
eff89e01
BE
27672016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2768
2769 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2770
24bc7bf4
JM
27712016-10-20 Jason Merrill <jason@redhat.com>
2772
2773 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2774
4c712374
BE
27752016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2776
2777 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2778 integer shift ops in boolean context.
2779
27802016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2781
2782 * c.opt (Walloca): New.
2783 (Walloca-larger-than=): New.
2784 (Wvla-larger-than=): New.
2785
8fa18c06
MP
27862016-10-17 Marek Polacek <polacek@redhat.com>
2787
2788 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2789 Return immediately when finding a match.
2790 (warn_tautological_cmp): Remove a boolean variable that is no longer
2791 needed.
2792
b12b1915
MP
27932016-10-17 Marek Polacek <polacek@redhat.com>
2794
2795 * c-attribs.c: New file.
2796 * c-common.c: Move attributes handling to c-attribs.c.
2797 (get_nonnull_operand): No longer static.
2798 * c-common.h: Move the declarations from c-attribs.c to its own section.
2799
2045acd9
JM
28002016-10-14 Jason Merrill <jason@redhat.com>
2801
2802 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2803 and __cpp_deduction_guides.
2804
14a2c9aa
JM
28052016-10-13 Jason Merrill <jason@redhat.com>
2806
2807 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2808
4d0cdd0c
TP
28092016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2810
2811 * c-cppbuiltin.c: Include memmodel.h.
2812 * c-opts.c: Likewise.
2813 * c-pragma.c: Likewise.
2814 * c-warn.c: Likewise.
2815
70f6d5e1
JJ
28162016-10-12 Jakub Jelinek <jakub@redhat.com>
2817
2818 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2819 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2820 * c-opts.c (sanitize_cpp_opts): Initialize
2821 cpp_opts->cpp_warn_implicit_fallthrough.
2822
78f61294
MP
28232016-10-11 Marek Polacek <polacek@redhat.com>
2824
2825 * c-common.c (warning_candidate_p): Change the return type to bool
2826 and return true/false instead of 1/0.
2827 (vector_mode_valid_p): Likewise.
2828
038b5cc0
MP
28292016-10-11 Marek Polacek <polacek@redhat.com>
2830
2831 * c-common.c (fold_for_warn): No longer static.
2832 (bool_promoted_to_int_p): Likewise.
2833 (c_common_get_narrower): Likewise.
2834 (constant_expression_warning): Move to c-warn.c.
2835 (constant_expression_error): Likewise.
2836 (overflow_warning): Likewise.
2837 (warn_logical_operator): Likewise.
2838 (find_array_ref_with_const_idx_r): Likewise.
2839 (warn_tautological_cmp): Likewise.
2840 (expr_has_boolean_operands_p): Likewise.
2841 (warn_logical_not_parentheses): Likewise.
2842 (warn_if_unused_value): Likewise.
2843 (strict_aliasing_warning): Likewise.
2844 (sizeof_pointer_memaccess_warning): Likewise.
2845 (check_main_parameter_types): Likewise.
2846 (conversion_warning): Likewise.
2847 (warnings_for_convert_and_check): Likewise.
2848 (match_case_to_enum_1): Likewise.
2849 (match_case_to_enum): Likewise.
2850 (c_do_switch_warnings): Likewise.
2851 (warn_for_omitted_condop): Likewise.
2852 (readonly_error): Likewise.
2853 (lvalue_error): Likewise.
2854 (invalid_indirection_error): Likewise.
2855 (warn_array_subscript_with_type_char): Likewise.
2856 (warn_about_parentheses): Likewise.
2857 (warn_for_unused_label): Likewise.
2858 (warn_for_div_by_zero): Likewise.
2859 (warn_for_memset): Likewise.
2860 (warn_for_sign_compare): Likewise.
2861 (do_warn_double_promotion): Likewise.
2862 (do_warn_unused_parameter): Likewise.
2863 (record_locally_defined_typedef): Likewise.
2864 (maybe_record_typedef_use): Likewise.
2865 (maybe_warn_unused_local_typedefs): Likewise.
2866 (maybe_warn_bool_compare): Likewise.
2867 (maybe_warn_shift_overflow): Likewise.
2868 (warn_duplicated_cond_add_or_warn): Likewise.
2869 (diagnose_mismatched_attributes): Likewise.
2870 * c-common.h: Move the declarations from c-warn.c to its own section.
2871 * c-warn.c: New file.
2872
627be19f
JM
28732016-10-08 Jason Merrill <jason@redhat.com>
2874
2875 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2876 into COND_EXPR in C++.
2877
7bad794a
JJ
28782016-10-08 Jakub Jelinek <jakub@redhat.com>
2879
2880 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2881 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2882 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2883
be845b04
JJ
28842016-10-07 Jakub Jelinek <jakub@redhat.com>
2885
2886 Implement LWG2296 helper intrinsic
2887 * c-common.h (enum rid): Add RID_ADDRESSOF.
2888 * c-common.c (c_common_reswords): Add __builtin_addressof.
2889
c09c4992
BE
28902016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2891
2892 PR c++/77700
2893 * c-common.c (c_common_truthvalue_conversion): Warn also for
2894 suspicious enum values in boolean context.
2895
342cfb3e
JJ
28962016-10-06 Jakub Jelinek <jakub@redhat.com>
2897
2898 Implement P0258R2 - helper for C++17
2899 std::has_unique_object_representations trait
2900 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2901 * c-common.c (c_common_reswords): Add
2902 __has_unique_object_representations.
2903
2e69f143
JJ
29042016-10-05 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR sanitizer/66343
2907 * c-ubsan.c (ubsan_instrument_return): Don't call
2908 initialize_sanitizer_builtins here.
2909
700fff34
BE
29102016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2911
2912 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2913 conditional expression in boolean context when only one arm is
2914 non-boolean.
2915
9563bfcd
JJ
29162016-10-05 Jakub Jelinek <jakub@redhat.com>
2917
04a32443
JJ
2918 PR sanitizer/77823
2919 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2920 is not integral.
2921
9563bfcd
JJ
2922 * c-common.c (c_common_reswords): Update comment for C++11.
2923
f1644724
JM
29242016-10-04 Jason Merrill <jason@redhat.com>
2925
2926 * c-common.c (make_tree_vector_from_ctor): New.
2927 * c-common.h: Declare it.
2928
5a79befb
JJ
29292016-10-04 Jakub Jelinek <jakub@redhat.com>
2930
2931 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2932 __LIBGCC_JCR_SECTION_NAME__.
2933
1633d3b9
BE
29342016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2935
2936 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2937 left shift in boolean context.
2938
a2c6e7f2
JJ
29392016-09-29 Jakub Jelinek <jakub@redhat.com>
2940
2941 Implement P0001R1 - C++17 removal of register storage class specifier
2942 * c.opt (Wregister): New warning.
2943 * c-opts.c (c_common_post_options): Enable -Wregister by
2944 default for C++17.
2945
75304c87
JG
29462016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2947
2948 * c-opts.c (c_common_post_options): Remove special case for
2949 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2950 in C++.
2951
bbfac6da
JJ
29522016-09-27 Jakub Jelinek <jakub@redhat.com>
2953
6e39060a
JJ
2954 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2955 -std=c++1z.
2956
bbfac6da
JJ
2957 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2958
e73cf9a2
TP
29592016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2960
2961 * c-common.c: Include memmodel.h.
2962
c6147dc4
MP
29632016-09-26 Marek Polacek <polacek@redhat.com>
2964
2965 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2966
81fea426
MP
29672016-09-26 Marek Polacek <polacek@redhat.com>
2968
2969 PR c/7652
2970 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2971 (handle_fallthrough_attribute): New function.
2972 (attribute_fallthrough_p): New function.
2973 * c-common.h (attribute_fallthrough_p): Declare.
2974
9a2300e9
MP
29752016-09-24 Marek Polacek <polacek@redhat.com>
2976
2977 PR c/77490
2978 * c.opt (Wbool-operation): New.
2979
a09e9e35
BE
29802016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2981
2982 * c-common.c (c_common_truthvalue_conversion): Inhibit
2983 Wint-in-bool-context warning with from_macro_definition_at.
2984 Mention the expression will always evaluate to true.
2985
d43b4ccc
MS
29862016-09-21 Martin Sebor <msebor@redhat.com>
2987
2988 PR bootstrap/77676
2989 * c.opt (fprintf-return-value): Temporarily initialize to zero
2990 to unblock bootstrap failures.
2991
2e1c20b1
JJ
29922016-09-21 Jakub Jelinek <jakub@redhat.com>
2993
2994 PR c++/77651
2995 * c.opt (Waligned-new=): Add RejectNegative.
2996 (faligned-new=): Likewise. Spelling fix - change
2997 aligned_new_threshhold to aligned_new_threshold.
2998 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2999 to aligned_new_threshold.
3000
88d0c3f0
MS
30012016-09-20 Martin Sebor <msebor@redhat.com>
3002
3003 PR middle-end/49905
3004 * c.opt: Add -Wformat-length and -fprintf-return-value.
3005
144a96e4
BE
30062016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3007
3008 PR c++/77434
3009 * c.opt (Wint-in-bool-context): New warning.
3010 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3011 constants in boolean context.
3012
63012d9a
JM
30132016-09-19 Joseph Myers <joseph@codesourcery.com>
3014
3015 * c-common.c (max_align_t_align): Also consider alignment of
3016 float128_type_node.
3017
931388ce
JM
30182016-09-15 Jason Merrill <jason@redhat.com>
3019
3020 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3021 DECL_EXTERNAL.
3022
38711381
JM
30232016-09-14 Jason Merrill <jason@redhat.com>
3024
3025 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3026 limit FIELD_DECL, either.
3027
e51fbec3
MP
30282016-09-14 Marek Polacek <polacek@redhat.com>
3029
3030 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3031 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3032 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3033
254830ba
DM
30342016-09-13 David Malcolm <dmalcolm@redhat.com>
3035
3036 * c-common.c (warn_logical_not_parentheses): Replace
3037 rich_location::add_fixit_insert calls with add_fixit_insert_before
3038 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3039
42763690
JM
30402016-09-13 Jason Merrill <jason@redhat.com>
3041 Tom de Vries <tom@codesourcery.com>
3042
3043 PR c++/77427
3044 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3045
9453eee9
JM
30462016-09-13 Jason Merrill <jason@redhat.com>
3047
3048 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3049 limit types at all.
3050
e96809e3
JM
30512016-09-12 Jason Merrill <jason@redhat.com>
3052
3053 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3054 bit/byte confusion, allow large alignment for types.
3055
54dcdb88
BE
30562016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3057
3058 PR c++/77496
3059 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3060
d1463eb9
DM
30612016-09-12 David Malcolm <dmalcolm@redhat.com>
3062
3063 PR c/72858
3064 * c-format.c (argument_parser::check_argument_type): Add params
3065 "type_start" and "conversion_char". Use the former to generate
3066 offset_to_type_start and pass it and conversion_char to
3067 check_format_types.
3068 (check_format_info_main): Capture the start of the type
3069 information as "type_start", and pass it an format_char
3070 to arg_parser.check_argument_type.
3071 (check_format_types): Provide an example in the leading comment.
3072 Add params "offset_to_type_start" and "conversion_char"; pass
3073 them to format_type_warning calls.
3074 (test_get_modifier_for_format_len): Likewise.
3075 (matching_type_p): New function.
3076 (get_format_for_type): Add param "conversion_char" and move
3077 implementation into...
3078 (get_format_for_type_1): ...new function, called twice.
3079 Use new function matching_type_p rather than checking for
3080 TYPE_CANONICAL equality.
3081 (get_corrected_substring): New function.
3082 (format_type_warning): Provide an example in the leading comment.
3083 Add params "offset_to_type_start" and "conversion_char". Replace
3084 call to get_format_for_type with call to get_corrected_substring
3085 and move rejection of hints for widths/precisions there.
3086 (assert_format_for_type_streq): Add param "conversion_char".
3087 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3088 (test_get_format_for_type_printf): Add conversion chars to the
3089 tests, adding coverage for various combinations of integer
3090 vs double conversions, and for preserving octal and hexadecimal
3091 conversions.
3092 (test_get_format_for_type_scanf): Add conversion chars to the
3093 tests.
3094
5b28efbb
TV
30952016-09-10 Tom de Vries <tom@codesourcery.com>
3096
3097 PR C/71602
3098 * c-common.c (build_va_arg): Handle more strict
3099 targetm.canonical_va_list_type. Replace first argument type error with
3100 assert.
3101
3f0177e7
MS
31022016-09-09 Martin Sebor <msebor@redhat.com>
3103
3104 PR c/77520
3105 PR c/77521
3106 * c-format.c (argument_parser::find_format_char_info): Use %qc
3107 format directive unconditionally.
3108
af63ba4b
JM
31092016-09-09 Jason Merrill <jason@redhat.com>
3110
3111 Implement C++17 new of over-aligned types.
3112 * c.opt: Add -faligned-new and -Waligned-new.
3113 * c-common.c (max_align_t_align): Split out from...
3114 (cxx_fundamental_alignment_p): ...here.
3115 * c-common.h: Declare it.
3116 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3117
c65248cb
JM
31182016-09-09 Joseph Myers <joseph@codesourcery.com>
3119
3120 * c-cppbuiltin.c (builtin_define_type_width): New function.
3121 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3122 macros.
3123
e5106e27
DM
31242016-09-07 David Malcolm <dmalcolm@redhat.com>
3125
3126 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3127 a POINTER_TYPE.
3128 (substring_loc::get_location): Move to substring-locations.c,
3129 keeping implementation as...
3130 (c_get_substring_location): New function, from the above, reworked
3131 to use accessors rather than member lookup.
3132 * c-common.h (class substring_loc): Move to substring-locations.h,
3133 replacing with a forward decl.
3134 (c_get_substring_location): New decl.
3135 * c-format.c: Include "substring-locations.h".
3136 (format_warning_va): Move to substring-locations.c.
3137 (format_warning_at_substring): Likewise.
3138
a42e7952
MS
31392016-09-06 Martin Sebor <msebor@redhat.com>
3140
3141 PR c/77336
3142 * c-format.c (check_function_format): Avoid issuing warnings for
3143 functions unless they call format functions with non-constant
3144 format strings.
3145
b772a565
RB
31462016-09-06 Richard Biener <rguenther@suse.de>
3147
3148 PR c/77450
3149 * c-common.c (c_common_mark_addressable_vec): Handle
3150 COMPOUND_LITERAL_EXPR.
3151
25ff5dd3
MP
31522016-09-05 Marek Polacek <polacek@redhat.com>
3153
3154 PR c/77423
3155 * c-common.c (bool_promoted_to_int_p): New function.
3156 (expr_has_boolean_operands_p): New function.
3157 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3158 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3159
21234eb5
TV
31602016-09-04 Tom de Vries <tom@codesourcery.com>
3161
3162 revert:
3163 2016-08-29 Tom de Vries <tom@codesourcery.com>
3164
3165 * c-common.c (build_va_arg): Replace first argument type error
3166 with assert.
3167
9dc5773f
JJ
31682016-09-02 Jakub Jelinek <jakub@redhat.com>
3169
3170 PR c/65467
3171 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3172 (c_finish_omp_for): Reject _Atomic qualified iterators.
3173
31742016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3175
3176 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3177 size to guarantee it fits the output of the formatted function
3178 regardless of its arguments.
3179
295844f6
MP
31802016-09-01 Marek Polacek <polacek@redhat.com>
3181
3182 PR c/7652
3183 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3184 FALLTHRU comments.
3185
3d06b6f2
MP
31862016-08-29 Marek Polacek <polacek@redhat.com>
3187
3188 PR c/77292
3189 * c-common.c (warn_logical_not_parentheses): Don't warn for
3190 a comparison or a logical operator.
3191
34cedad5
TV
31922016-08-29 Tom de Vries <tom@codesourcery.com>
3193
3194 * c-common.c (build_va_arg): Fix type comparison assert.
3195
f162d717
TV
31962016-08-29 Tom de Vries <tom@codesourcery.com>
3197
3198 * c-common.c (build_va_arg): Replace first argument type error
3199 with assert.
3200
ba9bbd6f
TV
32012016-08-29 Tom de Vries <tom@codesourcery.com>
3202
3203 PR c/77398
3204 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3205 with error_mark_node as va_list instead of with illegal va_list.
3206
ebef225f
MP
32072016-08-25 Marek Polacek <polacek@redhat.com>
3208 David Malcolm <dmalcolm@redhat.com>
3209
3210 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3211 * c-common.h (warn_logical_not_parentheses): Update declaration.
3212
b00e6e75
MP
32132016-08-22 Marek Polacek <polacek@redhat.com>
3214
3215 PR c++/77321
3216 * c-common.c (warn_for_memset): Check type for null.
3217
6dc198e3
JM
32182016-08-22 Joseph Myers <joseph@codesourcery.com>
3219
14ec014e 3220 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3221 _FloatNx types for suffixes for built-in functions.
3222
c65699ef
JM
32232016-08-19 Joseph Myers <joseph@codesourcery.com>
3224
3225 PR c/32187
3226 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3227 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3228 (RID_FLOAT128X): New enum rid values.
3229 (CASE_RID_FLOATN_NX): New macro.
3230 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3231 keywords.
3232 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3233 corresponding complex types.
3234 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3235 _FloatNx and corresponding complex types.
3236 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3237 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3238 and _FloatNx types for the widest type for determining
3239 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3240 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3241 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3242 and _FloatNx types.
3243 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3244 constants.
3245 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3246 _FloatNx types.
3247
cc015f3a
DM
32482016-08-18 David Malcolm <dmalcolm@redhat.com>
3249
3250 * c-opts.c (c_diagnostic_finalizer): Update for change to
3251 diagnostic_show_locus.
3252
cb18fd07
DM
32532016-08-18 David Malcolm <dmalcolm@redhat.com>
3254
3255 * c-common.c: Include "spellcheck.h".
3256 (cb_get_suggestion): New function.
3257 * c-common.h (cb_get_suggestion): New decl.
3258 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3259 cb_get_suggestion.
3260
a76989dc
MP
32612016-08-18 Marek Polacek <polacek@redhat.com>
3262
3263 PR c/71514
3264 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3265 and pointer-to-VLA.
3266
65e736c0
DM
32672016-08-16 David Malcolm <dmalcolm@redhat.com>
3268
3269 PR c/72857
3270 * c-common.c (substring_loc::get_range): Rename to...
3271 (substring_loc::get_location): ...this, converting param from a
3272 source_range * to a location_t *. Call
3273 get_source_location_for_substring rather than
3274 get_source_range_for_substring, and pass in m_caret_idx.
3275 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3276 (substring_loc::get_range): Replace with...
3277 (substring_loc::get_location): ...this.
3278 (substring_loc::set_caret_index): New method.
3279 (substring_loc): Add field m_caret_idx.
3280 * c-format.c (format_warning_va): Update for above changes.
3281 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3282 clashing with type name.
3283 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3284 (check_argument_type): Likewise.
3285 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3286 Use a copy when emitting warnings, setting the caret index from TYPE.
3287
7e1dde14 32882016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3289 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3290
3291 * c-ada-spec.c (dump_number): New function.
3292 (handle_escape_character): Likewise.
3293 (print_ada_macros): Add handling of constant integers and strings.
3294
191816a3
MP
32952016-08-12 Marek Polacek <polacek@redhat.com>
3296
3297 PR c/7652
3298 * c-common.c (scalar_to_vector): Adjust fall through comment.
3299 * c-opts.c (c_common_handle_option): Likewise.
3300 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3301 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3302 fall through comment.
3303 * cilk.c (extract_free_variables): Add FALLTHRU.
3304
452df4a4
JM
33052016-08-10 Jason Merrill <jason@redhat.com>
3306
3307 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3308
f3365c12
JM
33092016-08-09 Jason Merrill <jason@redhat.com>
3310
3311 * c-common.c (c_common_attribute_table): vector_size affects type
3312 identity.
3313
f0bc3323
MP
33142016-08-09 Marek Polacek <polacek@redhat.com>
3315
3316 PR c/7652
3317 * c-ada-spec.c (dump_generic_ada_node): Add return.
3318
98e5a19a
JM
33192016-08-09 Jason Merrill <jason@redhat.com>
3320
3321 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3322 C++17 constexpr lambdas.
3323
895aa8e1
DM
33242016-08-08 David Malcolm <dmalcolm@redhat.com>
3325
3326 PR c/64955
3327 * c-common.h (selftest::c_format_c_tests): New declaration.
3328 (selftest::run_c_tests): New declaration.
3329 * c-format.c: Include "selftest.h.
3330 (format_warning_va): Add param "corrected_substring" and use
3331 it to add a replacement fix-it hint.
3332 (format_warning_at_substring): Likewise.
3333 (format_warning_at_char): Update for new param of
3334 format_warning_va.
3335 (argument_parser::check_argument_type): Pass "fki" to
3336 check_format_types.
3337 (check_format_types): Add param "fki" and pass it to
3338 format_type_warning.
3339 (deref_n_times): New function.
3340 (get_modifier_for_format_len): New function.
3341 (selftest::test_get_modifier_for_format_len): New function.
3342 (get_format_for_type): New function.
3343 (format_type_warning): Add param "fki" and use it to attempt
3344 to provide hints for argument types when calling
3345 format_warning_at_substring.
3346 (selftest::get_info): New function.
3347 (selftest::assert_format_for_type_streq): New function.
3348 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3349 (selftest::test_get_format_for_type_printf): New function.
3350 (selftest::test_get_format_for_type_scanf): New function.
3351 (selftest::c_format_c_tests): New function.
3352
e52ed3fe
DM
33532016-08-08 David Malcolm <dmalcolm@redhat.com>
3354
3355 PR c/52952
3356 * c-format.c: Include "diagnostic.h".
3357 (location_column_from_byte_offset): Delete.
3358 (location_from_offset): Delete.
3359 (format_warning_va): New function.
3360 (format_warning_at_substring): New function.
3361 (format_warning_at_char): New function.
3362 (check_format_arg): Capture location of format_tree and pass to
3363 check_format_info_main.
3364 (argument_parser): Add fields "start_of_this_format" and
3365 "format_string_cst".
3366 (flag_chars_t::validate): Add param "format_string_cst". Convert
3367 warning_at call using location_from_offset to call to
3368 format_warning_at_char.
3369 (argument_parser::argument_parser): Add param "format_string_cst_"
3370 and use use it to initialize field "format_string_cst".
3371 Initialize new field "start_of_this_format".
3372 (argument_parser::read_format_flags): Convert warning_at call
3373 using location_from_offset to a call to format_warning_at_char.
3374 (argument_parser::read_any_format_left_precision): Likewise.
3375 (argument_parser::read_any_format_precision): Likewise.
3376 (argument_parser::read_any_other_modifier): Likewise.
3377 (argument_parser::find_format_char_info): Likewise, in three places.
3378 (argument_parser::parse_any_scan_set): Likewise, in one place.
3379 (argument_parser::handle_conversions): Likewise, in two places.
3380 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3381 and use it to make a substring_loc. Pass the latter to
3382 check_format_types.
3383 (check_format_info_main): Add params "fmt_param_loc" and
3384 "format_string_cst". Convert warning_at calls using
3385 location_from_offset to calls to format_warning_at_char. Pass the
3386 new params to the arg_parser ctor. Pass "format_string_cst" to
3387 flag_chars.validate. Pass "fmt_param_loc" to
3388 arg_parser.check_argument_type.
3389 (check_format_types): Convert first param from a location_t
3390 to a const substring_loc & and rename to "fmt_loc". Attempt
3391 to extract the range of the relevant parameter and pass it
3392 to format_type_warning.
3393 (format_type_warning): Convert first param from a location_t
3394 to a const substring_loc & and rename to "fmt_loc". Add
3395 params "param_range" and "type". Replace calls to warning_at
3396 with calls to format_warning_at_substring.
3397
1c4d457e
DM
33982016-08-08 David Malcolm <dmalcolm@redhat.com>
3399
3400 * c-format.c (class flag_chars_t): New class.
3401 (struct length_modifier): New struct.
3402 (class argument_parser): New class.
3403 (flag_chars_t::flag_chars_t): New ctor.
3404 (flag_chars_t::has_char_p): New method.
3405 (flag_chars_t::add_char): New method.
3406 (flag_chars_t::validate): New method.
3407 (flag_chars_t::get_alloc_flag): New method.
3408 (flag_chars_t::assignment_suppression_p): New method.
3409 (argument_parser::argument_parser): New ctor.
3410 (argument_parser::read_any_dollar): New method.
3411 (argument_parser::read_format_flags): New method.
3412 (argument_parser::read_any_format_width): New method.
3413 (argument_parser::read_any_format_left_precision): New method.
3414 (argument_parser::read_any_format_precision): New method.
3415 (argument_parser::handle_alloc_chars): New method.
3416 (argument_parser::read_any_length_modifier): New method.
3417 (argument_parser::read_any_other_modifier): New method.
3418 (argument_parser::find_format_char_info): New method.
3419 (argument_parser::validate_flag_pairs): New method.
3420 (argument_parser::give_y2k_warnings): New method.
3421 (argument_parser::parse_any_scan_set): New method.
3422 (argument_parser::handle_conversions): New method.
3423 (argument_parser::check_argument_type): New method.
3424 (check_format_info_main): Introduce classes argument_parser
3425 and flag_chars_t, moving the code within the loop into methods
3426 of these classes. Make various locals "const".
3427
88fa5555
DM
34282016-08-05 David Malcolm <dmalcolm@redhat.com>
3429
3430 * c-common.c: Include "substring-locations.h".
3431 (get_cpp_ttype_from_string_type): New function.
3432 (g_string_concat_db): New global.
3433 (substring_loc::get_range): New method.
3434 * c-common.h (g_string_concat_db): New declaration.
3435 (class substring_loc): New class.
3436 * c-lex.c (lex_string): When concatenating strings, capture the
3437 locations of all tokens using a new obstack, and record the
3438 concatenation locations within g_string_concat_db.
3439 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3440 on the ggc-heap.
3441
78169471
MP
34422016-07-29 Marek Polacek <polacek@redhat.com>
3443
638fc14f
MP
3444 PR c/71926
3445 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3446 parentheses warning.
3447
78169471
MP
3448 PR c/71574
3449 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3450
1225d6b1
ML
34512016-07-28 Martin Liska <mliska@suse.cz>
3452
3453 PR gcov-profile/68025
3454 * c-common.c (handle_no_profile_instrument_function_attribute):
3455
ec1e2a40
BE
34562016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3457
3458 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3459 BITS_PER_UNIT_LOG.
3460
5ec2cd9f
JM
34612016-07-25 Jason Merrill <jason@redhat.com>
3462
3463 PR c++/65970
3464 * c.opt (fconstexpr-loop-limit): New.
3465
9dc5773f 34662016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3467
3468 PR c++/71675
3469 * c-common.c (resolve_overloaded_builtin): Avoid converting
3470 __atomic_compare_exchange_n return type to that of what its
3471 first argument points to.
3472
e3fe09c1
UB
34732016-07-22 Uros Bizjak <ubizjak@gmail.com>
3474
3475 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3476 ~(unsigned HOST_WIDE_INT) 0.
3477
bc91c436
ML
34782016-07-22 Martin Liska <mliska@suse.cz>
3479
3480 PR gcov-profile/69028
3481 PR gcov-profile/62047
3482 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3483 to the current_function_decl.
3484
451dcc66
JM
34852016-07-21 Jason Merrill <jason@redhat.com>
3486
3487 PR c++/65168
3488 * c-common.c (c_common_truthvalue_conversion): Check
3489 c_inhibit_evaluation_warnings for warning about address of
3490 reference.
3491
de6a69ee
DM
34922016-07-20 David Malcolm <dmalcolm@redhat.com>
3493
3494 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3495 const char *.
3496
d022c55a
JM
34972016-07-15 Jason Merrill <jason@redhat.com>
3498
3499 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3500
ddbbcb19
JJ
35012016-07-15 Jakub Jelinek <jakub@redhat.com>
3502
3503 PR c/71858
3504 * c-common.h (enum lookup_name_fuzzy_kind): Add
3505 FUZZY_LOOKUP_FUNCTION_NAME.
3506
d0cf395a
JM
35072016-07-08 Jason Merrill <jason@redhat.com>
3508
3509 P0145: Refining Expression Order for C++.
3510 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3511 * c-opts.c: Adjust.
3512
98d44e93
MT
35132016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3514
3515 PR c++/71214
3516 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3517
f9d8d994
TS
35182016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3519
3520 * c-pragma.h (enum pragma_kind): Rename
3521 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3522 users.
3523
4aa83879
RB
35242016-06-29 Richard Biener <rguenther@suse.de>
3525
3526 PR middle-end/71002
3527 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3528
a25bd9e6
JM
35292016-06-24 Jason Merrill <jason@redhat.com>
3530
3531 P0145R2: Refining Expression Order for C++.
3532 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3533 MODIFY_EXPR.
3534
a86451b9
JJ
35352016-06-24 Jakub Jelinek <jakub@redhat.com>
3536
3537 * c-common.c (check_builtin_function_arguments): Require last
3538 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3539 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3540 if the last argument is pointer to enumerated or boolean type.
3541
1a4f11c8
DM
35422016-06-22 David Malcolm <dmalcolm@redhat.com>
3543
3544 PR c/70339
3545 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3546 (lookup_name_fuzzy): New prototype.
3547
fe55692c
JDA
35482016-06-21 John David Anglin <danglin@gcc.gnu.org>
3549
3550 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3551
4eb24e01
JM
35522016-06-14 Jason Merrill <jason@redhat.com>
3553
3554 P0145R2: Refining Expression Order for C++.
3555 * c.opt (fargs-in-order): New.
3556 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3557
ef7cf206
JJ
35582016-06-13 Jakub Jelinek <jakub@redhat.com>
3559
0dda258b
JJ
3560 PR sanitizer/71498
3561 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3562 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3563
ef7cf206
JJ
3564 PR preprocessor/71183
3565 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3566 to cb_get_source_date_epoch.
3567
50b15873
JJ
35682016-06-10 Jakub Jelinek <jakub@redhat.com>
3569
3570 PR c/68657
3571 * c.opt (Wpsabi): Add Warning flag.
3572
4d926e34
MS
35732016-06-10 Martin Sebor <msebor@redhat.com>
3574
3575 PR c/71392
14ec014e 3576 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3577 the nonnull attribute in type-generic builtins.
3578
e01b4e16
MS
35792016-06-09 Martin Sebor <msebor@redhat.com>
3580
3581 PR c/70883
3582 * c-common.c (builtin_function_validate_nargs): Make text of error
3583 message consistent with others like it.
3584
44a845ca
MS
35852016-06-08 Martin Sebor <msebor@redhat.com>
3586 Jakub Jelinek <jakub@redhat.com>
3587
3588 PR c++/70507
3589 PR c/68120
3590 * c-common.c (check_builtin_function_arguments): Handle
3591 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3592
a80a7051
RB
35932016-06-08 Richard Biener <rguenther@suse.de>
3594
3595 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3596
bfd67b47
RB
35972016-06-07 Richard Biener <rguenther@suse.de>
3598
3599 PR c/61564
3600 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3601 options and warn about others.
3602
15c98b2e
ES
36032016-06-01 Eduard Sanou <dhole@openmailbox.org>
3604
3605 * c-common.c (get_source_date_epoch): Rename to
3606 cb_get_source_date_epoch.
3607 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3608 message when the parsing fails. Use error_at instead of fatal_error.
3609 * c-common.h (get_source_date_epoch): Rename to
3610 cb_get_source_date_epoch.
3611 * c-common.h (cb_get_source_date_epoch): Prototype.
3612 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3613 * c-common.h (c_omp_region_type): Remove trailing comma.
3614 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3615 * c-lex.c (c_lex_with_flags): Remove initialization of
3616 pfile->source_date_epoch.
3617
00631022
JJ
36182016-05-30 Jakub Jelinek <jakub@redhat.com>
3619
3620 PR c++/71349
3621 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3622 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3623 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3624 instead of C_OMP_CLAUSE_SPLIT_FOR.
3625
f17a223d
RB
36262016-05-24 Richard Biener <rguenther@suse.de>
3627
3628 PR middle-end/70434
3629 PR c/69504
3630 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3631 (convert_vector_to_array_for_subscript): ... this.
3632 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3633 VIEW_CONVERT_EXPR to an array type. Rename to ...
3634 (convert_vector_to_array_for_subscript): ... this.
3635
4f2e1536
MP
36362016-05-12 Marek Polacek <polacek@redhat.com>
3637
3638 PR c/70756
3639 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3640 size_in_bytes and pass LOC to it.
3641
d6e83a8d
MM
36422016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3643
3644 PR c/43651
3645 * c.opt (Wduplicate-decl-specifier): New option.
3646
5c3a10fb
MP
36472016-05-11 Marek Polacek <polacek@redhat.com>
3648
3649 PR c++/71024
3650 * c-common.c (diagnose_mismatched_attributes): New function.
3651 * c-common.h (diagnose_mismatched_attributes): Declare.
3652
deef7113
MP
36532016-05-04 Marek Polacek <polacek@redhat.com>
3654
3655 * c.opt (Wdangling-else): New option.
3656
79ce98bc
MP
36572016-05-03 Marek Polacek <polacek@redhat.com>
3658
3659 PR c/70859
3660 * c-common.c (builtin_function_validate_nargs): Add location
3661 parameter. Use it.
3662 (check_builtin_function_arguments): Add location and arguments
3663 parameters. Use them.
3664 * c-common.h (check_builtin_function_arguments): Update declaration.
3665
381cdae4
RB
36662016-05-03 Richard Biener <rguenther@suse.de>
3667
3668 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3669 allow call args to gimplify to SSA names.
3670
1d793c34
MP
36712016-05-03 Marek Polacek <polacek@redhat.com>
3672
3673 * c-common.h (enum c_omp_region_type): Remove stray comma.
3674
77886428
CP
36752016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3676
3677 * c-common.h (enum c_omp_region_type): Define.
3678
697e0b28
RS
36792016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3680
3681 * c-common.c (shorten_compare): Use wi::to_wide.
3682
e7ff0319
CP
36832016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3684
3685 PR middle-end/70626
3686 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3687 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3688 reduction clauses in acc parallel loops.
3689
2fff3db8
MP
36902016-04-29 Marek Polacek <polacek@redhat.com>
3691
3692 PR c/70852
3693 * c-common.c (warn_for_memset): Check domain before accessing it.
3694
509063eb
DV
36952016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3696
3697 PR/69089
3698 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3699 "aligned" attribute.
3700
b632761d
JM
37012016-04-28 Jason Merrill <jason@redhat.com>
3702
3703 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3704
174f6622
ES
37052016-04-28 Eduard Sanou <dhole@openmailbox.org>
3706 Matthias Klose <doko@debian.org>
3707
3708 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3709 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3710 handling.
3711 * c-common.h (get_source_date_epoch): Prototype.
3712 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3713
6bc2bb18
RB
37142015-04-27 Ryan Burn <contact@rnburn.com>
3715
3716 PR c++/69024
3717 PR c++/68997
3718 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3719 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3720 external linkage.
3721 (cilk_detect_and_unwrap): Corresponding changes.
3722 (extract_free_variables): Don't extract free variables from
3723 AGGR_INIT_EXPR slot.
3724 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3725 (cilk_recognize_spawn): Likewise.
3726
c1e1f433
BS
37272016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3728
3729 * c.opt (Wmemset-elt-size): New option.
3730 * c-common.c (warn_for_memset): New function.
3731 * c-common.h (warn_for_memset): Declare.
3732
d067e05f
JM
37332016-04-25 Jason Merrill <jason@redhat.com>
3734
3735 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3736 No longer static.
3737 * c-common.h: Declare it.
3738 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3739
9aa36ae5
JM
37402016-04-22 Jason Merrill <jason@redhat.com>
3741
3742 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3743
477d4906
IV
37442016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3745
3746 PR c++/69363
3747 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3748 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3749
fe37c7af
MM
37502016-04-18 Michael Matz <matz@suse.de>
3751
3752 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3753 and SET_DECL_ALIGN.
3754
23f2660f
EB
37552016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3756
3757 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3758 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3759 to incomplete types.
3760 (dump_nested_type): Remove redundant tests and tidy up.
3761 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3762 a type which is the typedef of an original type.
3763
1e77281b
MP
37642016-04-15 Marek Polacek <polacek@redhat.com>
3765
3766 PR c/70651
3767 * c-common.c (build_va_arg): Change two asserts into errors and return
3768 error_mark_node.
3769
b3a77f21
MP
37702016-04-13 Marek Polacek <polacek@redhat.com>
3771
3772 PR c++/70639
3773 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3774 for switch statements, too.
3775
322b8466
JM
37762016-03-28 Jason Merrill <jason@redhat.com>
3777
3778 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3779
fbdb6baf
MP
37802016-03-23 Marek Polacek <polacek@redhat.com>
3781
3782 PR c++/69884
3783 * c.opt (Wignored-attributes): New option.
3784
5c240f4d
DM
37852016-03-22 David Malcolm <dmalcolm@redhat.com>
3786
3787 PR c/69993
3788 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3789 diagnostic text, reversing the order of the warning and note so
3790 that they appear in source order.
3791
14ba7b28
MP
37922016-03-17 Marek Polacek <polacek@redhat.com>
3793
3794 PR c/69407
3795 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3796 operations.
3797
08a1cadc
JM
37982016-03-14 Jason Merrill <jason@redhat.com>
3799
2aaeea19
JM
3800 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3801
08a1cadc
JM
3802 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3803
c06d25bb
RB
38042016-03-09 Richard Biener <rguenther@suse.de>
3805
3806 PR c/70143
3807 * c-common.c (strict_aliasing_warning): Add back
3808 alias_sets_conflict_p check.
3809
80aac5c8
JM
38102016-03-08 Jason Merrill <jason@redhat.com>
3811
3812 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3813
64b23c13
DM
38142016-03-04 David Malcolm <dmalcolm@redhat.com>
3815
3816 PR c/68187
3817 * c-indentation.c (get_visual_column): Move code to determine next
3818 tab stop to...
3819 (next_tab_stop): ...this new function.
3820 (line_contains_hash_if): Delete function.
3821 (detect_preprocessor_logic): Delete function.
3822 (get_first_nws_vis_column): New function.
3823 (detect_intervening_unindent): New function.
3824 (should_warn_for_misleading_indentation): Replace call to
3825 detect_preprocessor_logic with a call to
3826 detect_intervening_unindent.
3827
729526f5
DM
38282016-03-04 David Malcolm <dmalcolm@redhat.com>
3829
3830 PR c/68187
3831 * c-indentation.c (should_warn_for_misleading_indentation): When
3832 suppressing warnings about cases where the guard and body are on
3833 the same column, only use the first non-whitespace column in place
3834 of the guard token column when dealing with "else" clauses.
3835 When rejecting aligned BODY and NEXT, loosen the requirement
3836 from equality with the first non-whitespace of guard to simply
3837 that they not be indented relative to it.
3838
e9a35493
RB
38392016-03-04 Richard Biener <rguenther@suse.de>
3840
3841 PR c++/70054
3842 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3843 instead of alias_sets_conflict_p.
3844
1be56bc5
MP
38452016-03-01 Marek Polacek <polacek@redhat.com>
3846
3847 PR c++/69795
3848 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3849 any DECL.
3850
35886f0b
MS
38512016-02-22 Martin Sebor <msebor@redhat.com>
3852
3853 PR middle-end/69780
3854 * c-common.c (check_builtin_function_arguments): Validate and
3855 reject invalid arguments to __builtin_alloca_with_align.
3856
4246c8da
MW
38572016-02-20 Mark Wielaard <mjw@redhat.com>
3858
3859 PR c/28901
3860 * c.opt (Wunused-const-variable): Turn into Alias for...
3861 (Wunused-const-variable=): New option.
3862
268be88c
BE
38632016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3864
3865 PR c++/69865
3866 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3867 here...
3868 (c_common_init_options): ...to here.
3869 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3870
871b3f47
JJ
38712016-02-19 Jakub Jelinek <jakub@redhat.com>
3872
3873 PR c++/69826
3874 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3875 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3876 flag_preprocess_only.
3877
bf14eba2
JJ
38782016-02-16 Jakub Jelinek <jakub@redhat.com>
3879
3880 PR c/69835
3881 * c.opt (Wnonnull-compare): Enable for -Wall.
3882
ba6b3795
JJ
38832016-02-15 Jakub Jelinek <jakub@redhat.com>
3884
3885 PR c++/69797
3886 * c-common.c (sync_resolve_size): Diagnose too few arguments
3887 even when params is non-NULL empty vector.
3888
a011cd92
BS
38892016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3890
3891 PR target/60410
3892 * c.opt (fshort-double): Remove.
3893
46cb9332
MS
38942016-02-05 Martin Sebor <msebor@redhat.com>
3895
3896 PR c++/69662
3897 * c.opt (Warning options): Update -Wplacement-new to take
3898 an optional argument.
3899
e1b81f2b
JJ
39002016-02-01 Jakub Jelinek <jakub@redhat.com>
3901
3902 PR preprocessor/69543
3903 PR c/69558
3904 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3905 instead of loc to control_warning_option.
3906
b6adbb9f
NS
39072016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3908
3909 * c.opt (fopenacc-dim=): New option.
3910
5d70666e
RB
39112016-01-27 Ryan Burn <contact@rnburn.com>
3912
3913 PR cilkplus/69267
3914 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3915 gimplify_arg. Removed superfluous post_p argument.
3916 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3917 superfluous post_p argument.
3918 * c-gimplify.c (c_gimplify_expr): Likewise.
3919
01e1dea3
DM
39202016-01-26 David Malcolm <dmalcolm@redhat.com>
3921
3922 PR other/69006
3923 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3924 pp_newline_and_flush with pp_flush.
3925
9f04a53e
MS
39262016-01-20 Martin Sebor <msebor@redhat.com>
3927
3928 PR c/69405
3929 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3930 an incompatible argument when the argument isn't a valid tree node.
3931
7f26f7df
JM
39322016-01-18 Jason Merrill <jason@redhat.com>
3933
3934 PR c++/68767
3935 * c-common.c (check_function_arguments_recurse): Fold the whole
3936 COND_EXPR, not just the condition.
3937
f62bf092
TV
39382016-01-18 Tom de Vries <tom@codesourcery.com>
3939
3940 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3941 classify as loop clause.
3942
e0a575ff
JJ
39432016-01-15 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR bootstrap/68271
3946 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3947 C++ FE no longer has limit on number of pragmas.
3948
39492015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
3950
3951 PR c++/69048
3952 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 3953 to add missing cleanup point.
b6e3db06 3954
c7df95d8
DM
39552016-01-14 David Malcolm <dmalcolm@redhat.com>
3956
3957 PR c++/68819
3958 * c-indentation.c (get_visual_column): Add location_t param.
3959 Handle the column number being zero by effectively disabling the
3960 warning, with an "inform".
3961 (should_warn_for_misleading_indentation): Add location_t argument
3962 for all uses of get_visual_column.
3963
21efdd80
PP
39642016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3965
3966 PR c++/69029
3967 * c-indentation.c (should_warn_for_misleading_indentation):
3968 Don't warn about do-while statements.
3969
7a127fa7
MS
39702016-01-07 Martin Sebor <msebor@redhat.com>
3971
3972 PR c/68966
3973 * c-common.c (sync_resolve_size): Reject first argument when it's
3974 a pointer to _Bool.
3975
c589e975
DM
39762016-01-05 David Malcolm <dmalcolm@redhat.com>
3977
3978 PR c/69122
3979 * c-indentation.c (get_visual_column): Remove default argument.
3980 (should_warn_for_misleading_indentation): For the multiline case,
3981 update call to get_visual_column for next_stmt_exploc so that it
3982 captures the location of the first non-whitespace character in the
3983 relevant line. Don't issue warnings if there is non-whitespace
3984 before the next statement.
3985
818ab71a
JJ
39862016-01-04 Jakub Jelinek <jakub@redhat.com>
3987
3988 Update copyright years.
3989
745e411d
DM
39902015-12-21 David Malcolm <dmalcolm@redhat.com>
3991
3992 * c-common.c (binary_op_error): Convert first param from
3993 location_t to rich_location * and use it when emitting an error.
3994 * c-common.h (binary_op_error): Convert first param from
3995 location_t to rich_location *.
3996
de67c4c3
DM
39972015-12-16 David Malcolm <dmalcolm@redhat.com>
3998
3999 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4000 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4001
4a38b02b
IV
40022015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4003
4004 * c-common.c (c_common_attribute_table): Handle "omp declare target
4005 link" attribute.
4006
54d62f51
JJ
40072015-12-14 Jakub Jelinek <jakub@redhat.com>
4008
4009 PR c/68833
4010 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4011
8d4227c8
TB
40122014-12-12 Tobias Burnus <burnus@net-b.de>
4013
4014 PR fortran/68815
4015 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4016 specifiers (%d, %i,%u and %c).
4017
f6069ccc
DM
40182015-12-10 David Malcolm <dmalcolm@redhat.com>
4019
4020 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4021
63bbf46d
JJ
40222015-12-08 Jakub Jelinek <jakub@redhat.com>
4023
4024 PR c/48088
4025 PR c/68657
4026 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4027 * c-pragma.c (handle_pragma_diagnostic): Adjust
4028 control_warning_option caller.
4029
f79520bb
DM
40302015-12-07 David Malcolm <dmalcolm@redhat.com>
4031
4032 * c-common.c (c_cpp_error): Update for change to
4033 rich_location::set_range.
4034
b3d5bc62
JJ
40352015-12-04 Paolo Bonzini <bonzini@gnu.org>
4036
4037 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4038 shifting 1 out of the sign bit.
4039
40402015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4041
4042 * c-common.c (c_common_attribute_table[]): Update max arguments
4043 count for "simd" attribute.
4044 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4045
6eb4a537
JJ
40462015-12-03 Jakub Jelinek <jakub@redhat.com>
4047
4048 PR preprocessor/57580
4049 * c-ppoutput.c (print): Change printed field to bool.
4050 Move src_file last for smaller padding.
4051 (init_pp_output): Set print.printed to false instead of 0.
4052 (scan_translation_unit): Fix up formatting. Set print.printed
4053 to true after printing something other than newline.
4054 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4055 (maybe_print_line_1): Set print.printed to false instead of 0.
4056 (print_line_1): Likewise.
4057 (do_line_change): Set print.printed to true instead of 1.
4058 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4059 dump_macro): Set print.printed to false after printing newline.
4060
4250754e
JM
40612015-12-02 Jason Merrill <jason@redhat.com>
4062
f479b43d
JM
4063 * c-common.c (fold_for_warn): New.
4064 (warn_logical_operator, warn_tautological_cmp)
4065 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4066
4250754e
JM
4067 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4068 (c_fully_fold_internal, decl_constant_value_for_optimization):
4069 Move to c/c-fold.c.
4070 * c-common.h: Don't declare decl_constant_value_for_optimization.
4071
e9e32ee6
JM
40722015-12-02 Joseph Myers <joseph@codesourcery.com>
4073
4074 PR c/68162
4075 * c-common.h (c_build_qualified_type): Add extra default
4076 arguments.
4077
37d5ad46
JB
40782015-12-01 Julian Brown <julian@codesourcery.com>
4079 Cesar Philippidis <cesar@codesourcery.com>
4080 James Norris <James_Norris@mentor.com>
4081
4082 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4083 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4084 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4085
f07862c7
EB
40862015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4087
4088 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4089 (decl_sloc_common): Delete and move bulk of processing to...
4090 (decl_sloc): ...here.
4091 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4092 (dump_ada_double_name): Remove S parameter and compute the suffix.
4093 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4094 element type and deal with an anonymous one.
4095 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4096 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4097 and remove reference to QUAL_UNION_TYPE.
4098 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4099 (dump_nested_type): ...here. New function extracted from above.
4100 Generate a full declaration for anonymous element type of arrays.
4101 (print_ada_declaration): Really skip anonymous declarations. Remove
4102 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4103 Clean up processing of declarations of array types and objects.
4104 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4105 Remove obsolete code and tidy up.
4106
75c8aac3
JH
41072015-11-29 Jan Hubicka <hubicka@ucw.cz>
4108
4109 PR c/67581
4110 * c-common.c (handle_transparent_union_attribute): Update
4111 also type variants.
4112
b58d3df2
ML
41132015-11-27 Martin Liska <mliska@suse.cz>
4114
4115 PR c++/68312
4116 * array-notation-common.c (cilkplus_extract_an_triplets):
4117 Release vector of vectors.
4118 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4119
89a01fcf
EB
41202015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4121
4122 PR c++/68527
4123 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4124 (print_ada_struct_decl): Likewise.
4125
cc5c5226
IZ
41262015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4127
4128 PR c++/68001
4129 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4130 * cilk.c (recognize_spawn): Determine location in a more precise
4131 way.
4132
269adb9d
JM
41332015-11-19 Jason Merrill <jason@redhat.com>
4134
4135 * c-common.c (shorten_compare): But look through macros from
4136 system headers.
4137
d0eccfcd
JM
41382015-11-18 Jason Merrill <jason@redhat.com>
4139
4140 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4141 non-constant operand comes from a macro.
4142
3e44547c
JM
41432015-11-17 Jason Merrill <jason@redhat.com>
4144
4145 PR bootstrap/68346
4146 * c-common.c (warn_tautological_cmp): Fold before checking for
4147 constants.
4148
0f62c7a0
MP
41492015-11-16 Marek Polacek <polacek@redhat.com>
4150
4151 PR c++/68362
4152 * c-common.c (check_case_bounds): Fold low and high cases.
4153
a868811e
MP
41542015-11-16 Marek Polacek <polacek@redhat.com>
4155
4156 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4157 * c-common.c (c_common_get_alias_set): Likewise.
4158 (handle_visibility_attribute): Likewise.
4159
fff77217
KY
41602015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4161
4162 * c-common.c (handle_simd_attribute): New.
4163 (struct attribute_spec): Add entry for "simd".
4164 (handle_simd_attribute): New.
4165
269e63b7
KT
41662015-11-13 Kai Tietz <ktietz70@googlemail.com>
4167
4168 * c-lex.c (interpret_float): Use fold_convert.
4169
ebedc9a3
DM
41702015-11-13 David Malcolm <dmalcolm@redhat.com>
4171
4172 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4173 and store it on the result.
4174 * c-opts.c (c_common_init_options): Set
4175 global_dc->colorize_source_p.
4176
6e232ba4
JN
41772015-11-12 James Norris <jnorris@codesourcery.com>
4178 Joseph Myers <joseph@codesourcery.com>
4179
7365279f 4180 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4181 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4182 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4183 PRAGMA_OACC_CLAUSE_LINK.
4184
e78bede6
MP
41852015-11-11 Marek Polacek <polacek@redhat.com>
4186
4187 PR c/68107
4188 PR c++/68266
4189 * c-common.c (valid_array_size_p): New function.
4190 * c-common.h (valid_array_size_p): Declare.
4191
3f8257db 41922015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4193
4194 PR bootstrap/68271
4195 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4196
69f293c9
AM
41972015-11-11 Andrew MacLeod <amacleod@redhat.com>
4198
4199 * array-notation-common.c: Remove unused header files.
4200 * c-ada-spec.c: Likewise.
4201 * c-cilkplus.c: Likewise.
4202 * c-common.c: Likewise.
4203 * c-cppbuiltin.c: Likewise.
4204 * c-dump.c: Likewise.
4205 * c-format.c: Likewise.
4206 * c-gimplify.c: Likewise.
4207 * c-indentation.c: Likewise.
4208 * c-lex.c: Likewise.
4209 * c-omp.c: Likewise.
4210 * c-opts.c: Likewise.
4211 * c-pch.c: Likewise.
4212 * c-ppoutput.c: Likewise.
4213 * c-pragma.c: Likewise.
4214 * c-pretty-print.c: Likewise.
4215 * c-semantics.c: Likewise.
4216 * c-ubsan.c: Likewise.
4217 * cilk.c: Likewise.
4218 * stub-objc.c: Likewise.
4219
3a40d81d
NS
42202015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4221 Cesar Philippidis <cesar@codesourcery.com>
4222 James Norris <jnorris@codesourcery.com>
4223 Julian Brown <julian@codesourcery.com>
4224 Nathan Sidwell <nathan@codesourcery.com>
4225
4226 * c-pragma.c (oacc_pragmas): Add "routine".
4227 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4228
ee45a32d
EB
42292015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4230
4231 * c-common.c (c_common_attributes): Add scalar_storage_order.
4232 (handle_scalar_storage_order_attribute): New function.
4233 * c-pragma.c (global_sso): New variable.
4234 (maybe_apply_pragma_scalar_storage_order): New function.
4235 (handle_pragma_scalar_storage_order): Likewise.
4236 (init_pragma): Register scalar_storage_order.
4237 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4238 * c.opt (Wscalar-storage-order): New warning.
4239 (fsso-struct=): New option.
4240
eb11eb15
MS
42412015-11-08 Martin Sebor <msebor@redhat.com>
4242
4243 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4244
0aad0198
RS
42452015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4246
4247 * c-common.c: Don't undef DEF_BUILTIN.
4248
8a645150
DM
42492015-11-06 David Malcolm <dmalcolm@redhat.com>
4250
4251 * c-common.c (c_cpp_error): Convert parameter from location_t to
4252 rich_location *. Eliminate the "column_override" parameter and
4253 the call to diagnostic_override_column.
4254 Update the "done_lexing" clause to set range 0
4255 on the rich_location, rather than overwriting a location_t.
4256 * c-common.h (c_cpp_error): Convert parameter from location_t to
4257 rich_location *. Eliminate the "column_override" parameter.
4258
7a5e4956
CP
42592015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4260 Thomas Schwinge <thomas@codesourcery.com>
4261 James Norris <jnorris@codesourcery.com>
4262
4263 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4264 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4265 clauses with parallel and kernels and loops.
4266 * c-pragma.h (enum pragma_omp_clause): Add entries for
4267 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4268 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4269 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4270 INDEPENDENT,SEQ}.
4271 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4272
e2f5cc96
MS
42732015-11-05 Martin Sebor <msebor@redhat.com>
4274
4275 PR c++/67942
4276 * c.opt (-Wplacement-new): New option.
4277
e01d41e5
JJ
42782015-11-05 Jakub Jelinek <jakub@redhat.com>
4279
4280 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4281 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4282 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4283 save_expr or create_tmp_var* if TEST is true.
4284 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4285 Don't call add_stmt here.
4286 (struct c_omp_check_loop_iv_data): New type.
4287 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4288 c_omp_check_loop_iv_exprs): New functions.
4289 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4290 distribute.
4291 (c_omp_declare_simd_clauses_to_numbers): Change
4292 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4293 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4294 from numbers to PARM_DECLs.
4295
595278be
MM
42962015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4297
4298 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4299 flag_checking.
4300
3f8257db 43012015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4302
4303 PR c++-common/67882
b3d5bc62
JJ
4304 * c-common.h (fold_offsetof_1): Add argument.
4305 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4306 offsetof expressions that reference elements past the end of
4307 an array.
4308
4bf9e5a8
TS
43092015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4310 Chung-Lin Tang <cltang@codesourcery.com>
4311
4312 * c-pragma.c (oacc_pragmas): Add "atomic".
4313 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4314
3b1661a9
ES
43152015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4316
4317 * c-common.c (handle_target_clones_attribute): New.
4318 (c_common_attribute_table): Add handle_target_clones_attribute.
4319 (handle_always_inline_attribute): Add check on target_clones attribute.
4320 (handle_target_attribute): Ditto.
4321
2adfab87
AM
43222015-10-29 Andrew MacLeod <amacleod@redhat.com>
4323
4324 * array-notation-common.c: Reorder #include's and remove duplicates.
4325 * c-ada-spec.c: Likewise.
4326 * c-cilkplus.c: Likewise.
4327 * c-common.c: Likewise.
4328 * c-cppbuiltin.c: Likewise.
4329 * c-dump.c: Likewise.
4330 * c-format.c: Likewise.
4331 * c-gimplify.c: Likewise.
4332 * c-indentation.c: Likewise.
4333 * c-lex.c: Likewise.
4334 * c-omp.c: Likewise.
4335 * c-opts.c: Likewise.
4336 * c-pch.c: Likewise.
4337 * c-ppoutput.c: Likewise.
4338 * c-pragma.c: Likewise.
4339 * c-pretty-print.c: Likewise.
4340 * c-semantics.c: Likewise.
4341 * c-ubsan.c: Likewise.
4342 * cilk.c: Likewise.
4343 * stub-objc.c: Likewise.
4344
d90ec4f2
JM
43452015-10-28 Jason Merrill <jason@redhat.com>
4346
4347 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4348
88bae6f4
TS
43492015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4350 James Norris <jnorris@codesourcery.com>
4351 Cesar Philippidis <cesar@codesourcery.com>
4352
4353 PR c/64765
4354 PR c/64880
4355 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4356 * c-omp.c (c_oacc_split_loop_clauses): New function.
4357
b1726d6c
MS
43582015-10-21 Martin Sebor <msebor@redhat.com>
4359
4360 PR driver/68043
4361 * c.opt: End each sentence that describes an option with a period.
4362
fa60eeb9
MP
43632015-10-20 Marek Polacek <polacek@redhat.com>
4364
4365 * array-notation-common.c (is_cilkplus_vector_p): Define.
4366 * c-common.h (is_cilkplus_vector_p): Declare.
4367
95979049
MP
43682015-10-20 Marek Polacek <polacek@redhat.com>
4369
4370 * c.opt (std=gnu++11): Do not describe as experimental.
4371 (std=gnu++14): Likewise.
4372
2a9fb712
JM
43732015-10-19 Jason Merrill <jason@redhat.com>
4374
4375 * c-cppbuiltin.c (c_cpp_builtins): Define
4376 __cpp_nontype_template_args.
4377
13b380a3
JM
43782015-10-19 Jason Merrill <jason@redhat.com>
4379
4380 * c-cppbuiltin.c (c_cpp_builtins): Define
4381 __cpp_enumerator_attributes, __cpp_fold_expressions,
4382 __cpp_unicode_characters.
4383
d9a6bd32
JJ
43842015-10-13 Jakub Jelinek <jakub@redhat.com>
4385 Aldy Hernandez <aldyh@redhat.com>
4386
4387 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4388 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4389 (c_define_builtins): Likewise.
4390 * c-common.h (enum c_omp_clause_split): Add
4391 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4392 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4393 (c_finish_omp_for): Add ORIG_DECLV argument.
4394 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4395 201511 instead of 201307.
4396 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4397 OMP_CRITICAL_CLAUSES to it.
4398 (c_finish_omp_ordered): Add CLAUSES argument, set
4399 OMP_ORDERED_CLAUSES to it.
4400 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4401 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4402 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4403 constructs and new OpenMP 4.5 clauses. Clear
4404 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4405 verification code.
4406 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4407 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4408 (enum pragma_omp_clause): Add
4409 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4410 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4411
624d31fe
RS
44122015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4413
4414 * c-lex.c (interpret_float): Use real_equal instead of
4415 REAL_VALUES_EQUAL.
4416
b8fd7909
JM
44172015-10-04 Jason Merrill <jason@redhat.com>
4418
4419 Implement N4514, C++ Extensions for Transactional Memory.
4420 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4421 (c_common_attribute_table): Add transaction_safe_dynamic.
4422 transaction_safe now affects type identity.
4423 (handle_tm_attribute): Handle transaction_safe_dynamic.
4424 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4425 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4426 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4427 (D_TRANSMEM): New.
4428 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4429 * c-pretty-print.c (pp_c_attributes_display): Don't print
4430 transaction_safe in C++.
4431
12651878
MP
44322015-10-02 Marek Polacek <polacek@redhat.com>
4433
4434 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4435
3e3b8d63
MP
44362015-10-02 Marek Polacek <polacek@redhat.com>
4437
4438 PR c/64249
4439 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4440 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4441 * c.opt (Wduplicated-cond): New option.
4442
0d1a8f75
JM
44432015-10-01 Joseph Myers <joseph@codesourcery.com>
4444
4445 * c.opt (std=c11): Do not describe as experimental.
4446 (std=gnu11): Likewise.
4447 (std=iso9899:2011): Likewise.
4448
3e32ee19
NS
44492015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4450
4451 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4452 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4453
974348ee
MP
44542015-09-25 Marek Polacek <polacek@redhat.com>
4455
4456 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4457 (ubsan_instrument_shift): Likewise.
4458
15dbc1a6
MP
44592015-09-25 Marek Polacek <polacek@redhat.com>
4460
4461 PR sanitizer/64906
4462 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4463
6b95d7cc
PP
44642015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4465
4466 * c-indentation.c (should_warn_for_misleading_indentation):
4467 Compare next_stmt_vis_column with guard_line_first_nws instead
4468 of with guard_line_vis_column.
4469
c1822f9c
MLI
44702015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4471
4472 PR c/49654
4473 PR c/49655
4474 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4475 options and options not valid for the current language.
4476
d5398058
PP
44772015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4478
4479 * c-indentation.c (should_warn_for_misleading_indentation):
4480 Float out and consolidate the calls to get_visual_column that
4481 are passed guard_exploc as an argument. Compare
4482 next_stmt_vis_column with guard_line_first_nws instead of with
4483 body_line_first_nws.
4484
6b333269
NS
44852015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4486
4487 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4488 Wnamespaces): New C++ warnings.
4489
a75f1574
JM
44902015-09-22 Jason Merrill <jason@redhat.com>
4491
4492 * c-common.h (abi_compat_version_crosses): New.
4493 (warn_abi_version): Declare.
4494 * c-common.c: Define it.
4495 * c-opts.c (c_common_post_options): Handle it.
4496 flag_abi_compat_version defaults to 8.
4497
bdaaa8b7
VV
44982015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4499
4500 Complete the implementation of N4230, Nested namespace definition.
4501 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4502 __cpp_nested_namespace_definitions.
4503
eaa797e8
MLI
45042015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4505
4506 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4507
c4914de6
MLI
45082015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4509
4510 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4511 when warning.
4512 * c-pragma.h (pragma_lex): Add optional loc argument.
4513
fcb87c50
MM
45142015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4515
4516 * c-format.c (check_format_arg): Adjust to use common block size in all
4517 object pools.
4518
31bdd08a
DM
45192015-09-15 David Malcolm <dmalcolm@redhat.com>
4520
4521 * c-format.c (location_from_offset): Update for change in
4522 signature of location_get_source_line.
4523 * c-indentation.c (get_visual_column): Likewise.
4524 (line_contains_hash_if): Likewise.
4525
aa9f4b4c
MP
45262015-09-14 Marek Polacek <polacek@redhat.com>
4527
4528 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4529 setting various warnings.
4530
aa256c4a
MP
45312015-09-14 Marek Polacek <polacek@redhat.com>
4532
4533 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4534 a negative value.
4535
0f876f22
MW
45362015-09-11 Mark Wielaard <mjw@redhat.com>
4537
4538 PR c/28901
4539 * c.opt (Wunused-variable): Option from common.opt.
4540 (Wunused-const-variable): New option.
4541
273aa49e
PC
45422015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4543
4544 PR c++/53184
4545 * c.opt ([Wsubobject-linkage]): Add.
4546
1807ffc1
MS
45472015-09-03 Martin Sebor <msebor@redhat.com>
4548
4549 PR c/66516
4550 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4551 functions.
4552 * c-common.c (reject_gcc_builtin): Define.
4553
38942840
BI
45542015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4555
4556 PR middle-end/60586
4557 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4558 prototype.
4559 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4560 cilk_gimplify_call_params_in_spawned_fn.
4561 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4562 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4563 unwrapping.
4564
c316b5e4
MP
45652015-08-25 Marek Polacek <polacek@redhat.com>
4566
4567 PR middle-end/67330
4568 * c-common.c (handle_weak_attribute): Don't check whether the
4569 visibility can be changed here.
4570
584a7c46
MLI
45712015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4572
4573 * c-lex.c (c_lex_with_flags): Use explicit locations.
4574
a79683d5
TS
45752015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4576
4577 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4578 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4579
61717a45
FXC
45802015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4581
4582 PR middle-end/36757
4583 * c-common.c (check_builtin_function_arguments): Add check
4584 for BUILT_IN_SIGNBIT argument.
4585
329524f5
PC
45862015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4587
4588 PR c++/67160
4589 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4590 in c++1z mode.
4591
4ee55665
MP
45922015-08-17 Marek Polacek <polacek@redhat.com>
4593
4594 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4595 with whitespaces before qualifier names.
4596
b893e375
MP
45972015-08-12 Marek Polacek <polacek@redhat.com>
4598
4599 PR c++/55095
4600 * c-common.c (maybe_warn_shift_overflow): Properly handle
4601 left-shifting 1 into the sign bit.
4602
c2d89095
MLI
46032015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4604
4605 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4606
971e17ff
AS
46072015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4608 Braden Obrzut <admin@maniacsvault.net>
4609 Jason Merrill <jason@redhat.com>
4610
4611 Add C++ Concepts TS support.
4612 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4613 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4614 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4615 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4616 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4617 * c.opt (fconcepts): New.
4618
b3d5bc62
JJ
46192015-08-02 Martin Sebor <msebor@redhat.com>
4620
4621 * c.opt (-Wframe-address): New warning option.
4622
8ebca419
PP
46232015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4624
4625 * c-indentation.c (should_warn_for_misleading_indentation):
4626 Improve heuristics.
4627
1a1e101f
PP
46282015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4629
4630 * c-indentation.c (get_visual_column): Add parameter first_nws,
4631 use it. Update comment documenting the function.
4632 (is_first_nonwhitespace_on_line): Remove.
4633 (should_warn_for_misleading_indentation): Replace usage of
4634 of is_first_nonwhitespace_on_line with get_visual_column.
4635
992118a1
PP
46362015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4637
4638 * c-indentation.h (struct token_indent_info): Define.
4639 (get_token_indent_info): Define.
4640 (warn_for_misleading_information): Declare.
4641 * c-common.h (warn_for_misleading_information): Remove.
4642 * c-identation.c (warn_for_misleading_indentation):
4643 Change declaration to take three token_indent_infos. Adjust
4644 accordingly.
4645 * c-identation.c (should_warn_for_misleading_indentation):
4646 Likewise. Bail out early if the body is a compound statement.
4647 (guard_tinfo_to_string): Define.
4648
e8fa3817
JM
46492015-07-30 Jason Merrill <jason@redhat.com>
4650
4651 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4652 '*' for reference decay.
4653
173864e8
MP
46542015-07-30 Marek Polacek <polacek@redhat.com>
4655
4656 * c-common.c (warn_tautological_cmp): Bail for float types.
4657
f2afe6dd
MP
46582015-07-27 Marek Polacek <polacek@redhat.com>
4659
4660 PR bootstrap/67030
4661 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4662
05b28fd6
MP
46632015-07-27 Marek Polacek <polacek@redhat.com>
4664
4665 PR c++/66555
4666 PR c/54979
4667 * c-common.c (find_array_ref_with_const_idx_r): New function.
4668 (warn_tautological_cmp): New function.
4669 * c-common.h (warn_tautological_cmp): Declare.
4670 * c.opt (Wtautological-compare): New option.
4671
5a5062b8
MP
46722015-07-23 Marek Polacek <polacek@redhat.com>
4673
4674 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4675 (ubsan_instrument_shift): Likewise.
4676
dc891fe7
MP
46772015-07-23 Marek Polacek <polacek@redhat.com>
4678
4679 PR sanitizer/66908
4680 * c-ubsan.c: Include gimplify.h.
4681 (ubsan_instrument_division): Unshare OP0 and OP1.
4682 (ubsan_instrument_shift): Likewise.
4683
451b5e48
MP
46842015-07-20 Marek Polacek <polacek@redhat.com>
4685 Richard Sandiford <richard.sandiford@arm.com>
4686
4687 PR c++/55095
4688 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4689 Use EXPR_LOC_OR_LOC.
4690 (maybe_warn_shift_overflow): New function.
4691 * c-common.h (maybe_warn_shift_overflow): Declare.
4692 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4693 * c.opt (Wshift-overflow): New option.
4694
fb0b2914
ML
46952015-07-16 Martin Liska <mliska@suse.cz>
4696
4697 * c-format.c (static void check_format_info_main): Use
4698 object_allocator instead of pool_allocator.
4699 (check_format_arg): Likewise.
4700 (check_format_info_main): Likewise.
4701
903f5c23
AM
47022015-07-15 Andrew MacLeod <amacleod@redhat.com>
4703
4704 * c-opts.c: Remove multiline #include comment.
4705
026c3cfd
AH
47062015-07-12 Aldy Hernandez <aldyh@redhat.com>
4707
4708 * c-common.c: Fix double word typos.
4709
bb49ee66
EB
47102015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4711
4712 * c-ada-spec.h (cpp_operation): Revert latest change.
4713 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4714 constructors and destructors.
4715
1916bcb5
AM
47162015-07-09 Andrew MacLeod <amacleod@redhat.com>
4717
4718 * c-common.h: Adjust includes for flags.h changes.
4719 * stub-objc.c: Likewise.
026c3cfd 4720
a9dcd529
EB
47212015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4722
4723 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4724 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4725
b03b462f
JJ
47262015-07-08 Jakub Jelinek <jakub@redhat.com>
4727
4728 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4729 are to be removed, return NULL rather than original clauses list.
4730
c7131fb2
AM
47312015-07-07 Andrew MacLeod <amacleod@redhat.com>
4732
4733 * array-notation-common.c: Adjust includes.
4734 * c-ada-spec.c: Likewise.
4735 * c-cilkplus.c: Likewise.
4736 * c-common.h: Likewise.
4737 * c-cppbuiltin.c: Likewise.
4738 * c-dump.c: Likewise.
4739 * c-format.c: Likewise.
4740 * c-gimplify.c: Likewise.
4741 * c-indentation.c: Likewise.
4742 * c-lex.c: Likewise.
4743 * c-omp.c: Likewise.
4744 * c-opts.c: Likewise.
4745 * c-pch.c: Likewise.
4746 * c-ppoutput.c: Likewise.
4747 * c-pragma.c: Likewise.
4748 * c-pretty-print.c: Likewise.
4749 * c-semantics.c: Likewise.
4750 * c-ubsan.c: Likewise.
4751 * cilk.c: Likewise.
4752 * stub-objc.c: Likewise.
4753
2a7fb83f
EB
47542015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4755
4756 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4757 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4758
a03c9bf1
JM
47592015-07-01 Jason Merrill <jason@redhat.com>
4760
36a85135
JM
4761 * c-common.h (D_CXX11): Rename from D_CXX0X.
4762 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4763 * c-common.c: Adjust.
4764
e7fa68d5
JM
4765 * c-opts.c (c_common_post_options): Default to C++14.
4766
a03c9bf1
JM
4767 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4768
fe95b036
ESR
47692015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4770
4771 Implement N4197 - Adding u8 character literals
b3d5bc62 4772 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4773 CPP_CHAR.
b3d5bc62 4774 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4775 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4776 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4777 and CPP_UTF8CHAR tokens.
4778 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4779
da2e71c9
MLI
47802015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4781
4782 PR fortran/66605
4783 * c-common.c (do_warn_unused_parameter): Move here.
4784 * c-common.h (do_warn_unused_parameter): Declare.
4785
b155cfd9
MP
47862015-06-29 Marek Polacek <polacek@redhat.com>
4787
4788 PR c/66322
4789 * c-common.c (check_case_bounds): Add bool * parameter. Set
4790 OUTSIDE_RANGE_P.
4791 (c_add_case_label): Add bool * parameter. Pass it down to
4792 check_case_bounds.
4793 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4794 warning here.
4795 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4796 declarations.
4797
31521951
MP
47982015-06-27 Marek Polacek <polacek@redhat.com>
4799
4800 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4801 or VECTOR_INTEGER_TYPE_P throughout.
4802 * c-gimplify.c: Likewise.
4803
22d03525
MP
48042015-06-26 Marek Polacek <polacek@redhat.com>
4805
4806 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4807 * c-common.c (c_fully_fold_internal): Likewise.
4808 (c_alignof_expr): Likewise.
4809 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4810 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4811 * cilk.c (create_parm_list): Likewise.
22d03525 4812
af05e6e5
MP
48132015-06-26 Marek Polacek <polacek@redhat.com>
4814
4815 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4816
f0889939
AM
48172015-06-25 Andrew MacLeod <amacleod@redhat.com>
4818
4819 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4820 * c-gimplify.c: Likewise.
4821 * c-pragma.c: Likewise.
4822 * c-ubsan.c: Likewise.
4823 * cilk.c: Likewise.
4824
ca752f39
RS
48252015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4826
4827 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4828 ggc_hasher.
4829
16a16ec7
AM
48302015-06-25 Andrew MacLeod <amacleod@redhat.com>
4831
4832 * cilk.c: Move calls.h after tm.h in the include chain.
4833
0ae9bd27
MP
48342015-06-25 Marek Polacek <polacek@redhat.com>
4835
4836 * array-notation-common.c: Use VAR_P throughout.
4837 * c-ada-spec.c: Likewise.
4838 * c-common.c: Likewise.
4839 * c-format.c: Likewise.
4840 * c-gimplify.c: Likewise.
4841 * c-omp.c: Likewise.
4842 * c-pragma.c: Likewise.
4843 * c-pretty-print.c: Likewise.
4844 * cilk.c: Likewise.
4845
62f9079a
MP
48462015-06-25 Marek Polacek <polacek@redhat.com>
4847
4848 * cilk.c (extract_free_variables): Use is_global_var.
4849
0fa16060
RS
48502015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4851
4852 * c-common.c: Don't include target-def.h.
4853
a68ae2e1
MP
48542015-06-23 Marek Polacek <polacek@redhat.com>
4855
4856 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4857 when comparing INTEGER_CSTs.
4858
c6a2f2d9
PMR
48592015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4860
4861 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4862 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4863 (dump_ada_template): Skip partially specialized types.
4864
6b4db501
MM
48652015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4866
4867 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4868 swapping.
4869
abb226c9
AM
48702015-06-17 Andrew MacLeod <amacleod@redhat.com>
4871
4872 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4873 * c-ada-spec.c: Likewise.
4874 * c-cilkplus.c: Likewise.
4875 * c-common.c: Likewise.
4876 * c-common.h: Likewise.
4877 * c-cppbuiltin.c: Likewise.
4878 * c-dump.c: Likewise.
4879 * c-format.c: Likewise.
4880 * c-gimplify.c: Likewise.
4881 * c-indentation.c: Likewise.
4882 * c-lex.c: Likewise.
4883 * c-omp.c: Likewise.
4884 * c-opts.c: Likewise.
4885 * c-pch.c: Likewise.
4886 * c-ppoutput.c: Likewise.
4887 * c-pragma.c: Likewise.
4888 * c-pretty-print.c: Likewise.
4889 * c-semantics.c: Likewise.
4890 * c-ubsan.c: Likewise.
4891 * cilk.c: Likewise.
4892 * stub-objc.c: Likewise.
4893
076fecad
PP
48942015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4895
4896 PR c++/65168
4897 * c-common.c (c_common_truthvalue_conversion): Warn when
4898 converting an address of a reference to a truth value.
4899
13fdf2e2
AM
49002015-06-08 Andrew MacLeod <amacleod@redhat.com>
4901
4902 * array-notation-common.c : Adjust include files.
4903 * c-ada-spec.c : Likewise.
4904 * c-cilkplus.c : Likewise.
4905 * c-common.c : Likewise.
4906 * c-common.h : Likewise.
4907 * c-cppbuiltin.c : Likewise.
4908 * c-dump.c : Likewise.
4909 * c-format.c : Likewise.
4910 * c-gimplify.c : Likewise.
4911 * c-indentation.c : Likewise.
4912 * c-lex.c : Likewise.
4913 * c-omp.c : Likewise.
4914 * c-opts.c : Likewise.
4915 * c-pch.c : Likewise.
4916 * c-ppoutput.c : Likewise.
4917 * c-pragma.c : Likewise.
4918 * c-pretty-print.c : Likewise.
4919 * c-semantics.c : Likewise.
4920 * c-ubsan.c : Likewise.
4921 * cilk.c : Likewise.
4922 * stub-objc.c : Likewise.
4923
a1661b90
MP
49242015-06-08 Marek Polacek <polacek@redhat.com>
4925
4926 PR c/66415
4927 * c-format.c (location_from_offset): Return LOC if LINE is null.
4928
d7438551
AH
49292015-06-05 Aldy Hernandez <aldyh@redhat.com>
4930
4931 * c-common.h (c_parse_final_cleanups): New prototype.
4932 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4933
b3d5bc62
JJ
49342015-06-04 Sriraman Tallam <tmsriram@google.com>
4935
4936 * c-common.c (noplt): New attribute.
4937 (handle_noplt_attribute): New handler.
4938
ecb9f223
AM
49392015-06-04 Andrew MacLeod <amacleod@redhat.com>
4940
4941 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4942 * c-ada-spec.c: Likewise.
4943 * c-cilkplus.c: Likewise.
4944 * c-common.c: Likewise.
4945 * c-common.h: Likewise.
4946 * c-cppbuiltin.c: Likewise.
4947 * c-dump.c: Likewise.
4948 * c-format.c: Likewise.
4949 * c-gimplify.c: Likewise.
4950 * c-indentation.c: Likewise.
4951 * c-lex.c: Likewise.
4952 * c-omp.c: Likewise.
4953 * c-opts.c: Likewise.
4954 * c-pch.c: Likewise.
4955 * c-ppoutput.c: Likewise.
4956 * c-pragma.c: Likewise.
4957 * c-pretty-print.c: Likewise.
4958 * c-semantics.c: Likewise.
4959 * c-ubsan.c: Likewise.
4960 * cilk.c: Likewise.
4961 * stub-objc.c: Likewise.
4962
6ac48155
DM
49632015-06-02 David Malcolm <dmalcolm@redhat.com>
4964
4965 PR c/66220:
4966 * c-indentation.c (should_warn_for_misleading_indentation): Use
4967 expand_location rather than expand_location_to_spelling_point.
4968 Don't warn if the guarding statement is more indented than the
4969 next/body stmts.
4970
773ce42e
DM
49712015-06-02 David Malcolm <dmalcolm@redhat.com>
4972
4973 * c-indentation.c (warn_for_misleading_indentation): Bail out
4974 immediately if -Wmisleading-indentation isn't enabled.
4975
4fef8379
ML
49762015-06-01 Martin Liska <mliska@suse.cz>
4977
4978 * c-format.c (check_format_arg):Use new type-based pool allocator.
4979 (check_format_info_main) Likewise.
4980
1edfb384
EB
49812015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4982
4983 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4984 (has_nontrivial_methods): Likewise.
4985
9677ef52
MP
49862015-05-25 Marek Polacek <polacek@redhat.com>
4987
4988 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4989
fd5c817a
MP
49902015-05-22 Marek Polacek <polacek@redhat.com>
4991
4992 PR c/47043
4993 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4994
a2f45fe6 49952015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
4996
4997 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4998 STACK_GROWS_DOWNWARD.
4999
a2f45fe6 50002015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5001
5002 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5003 STACK_GROWS_DOWNWARD rather than if it is defined.
5004
0fee2ac2 50052015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5006
0fee2ac2
MLI
5007 PR c/52952
5008 * c-format.c (location_column_from_byte_offset): New.
5009 (location_from_offset): New.
5010 (struct format_wanted_type): Add offset_loc field.
5011 (check_format_info): Move handling of location for extra arguments
5012 closer to the point of warning.
5013 (check_format_info_main): Pass the result of location_from_offset
5014 to warning_at.
5015 (format_type_warning): Pass the result of location_from_offset
5016 to warning_at.
5017
cf4ef6f7
MP
50182015-05-20 Marek Polacek <polacek@redhat.com>
5019
5020 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5021
3a65ee74
MP
50222015-05-20 Marek Polacek <polacek@redhat.com>
5023
5024 * c-ada-spec.c (dump_sloc): Use DECL_P.
5025
21b634ae
MP
50262015-05-20 Marek Polacek <polacek@redhat.com>
5027
5028 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5029 * c-common.c: Likewise.
5030
0e50b624
DM
50312015-05-19 David Malcolm <dmalcolm@redhat.com>
5032
5033 * c-common.h (fe_file_change): Strengthen param from
5034 const line_map * to const line_map_ordinary *.
5035 (pp_file_change): Likewise.
5036 * c-lex.c (fe_file_change): Likewise.
5037 (cb_define): Use linemap_check_ordinary when invoking
5038 SOURCE_LINE.
5039 (cb_undef): Likewise.
5040 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5041 invoking cb_file_change.
5042 (c_finish_options): Likewise.
5043 (push_command_line_include): Likewise.
5044 (cb_file_change): Strengthen param "new_map" from
5045 const line_map * to const line_map_ordinary *.
5046 * c-ppoutput.c (cb_define): Likewise for local "map".
5047 (pp_file_change): Likewise for param "map" and local "from".
5048
fab27f52
MM
50492015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5050
5051 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5052
2fe1d762
TV
50532015-05-18 Tom de Vries <tom@codesourcery.com>
5054
5055 * c-common.c (build_va_arg_1): New function.
5056 (build_va_arg): Add address operator to va_list operand if necessary.
5057
7a37fa90
MM
50582015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5059
5060 PR c/48956
5061 * c-common.c (int_safely_convertible_to_real_p): Define.
5062 (unsafe_conversion_p): Check conversions involving complex types.
5063 (conversion_warning): Add new warning message for conversions which
5064 discard imaginary component.
5065 * c-common.h: (enum conversion_safety): Add new enumerator for such
5066 conversions.
5067
3aa3c9fc
MP
50682015-05-14 Marek Polacek <polacek@redhat.com>
5069
5070 PR c/66066
5071 PR c/66127
5072 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5073 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5074 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5075 use it. If FOR_INT_CONST, require that all evaluated operands be
5076 INTEGER_CSTs.
5077
c3388e62
DM
50782015-05-12 David Malcolm <dmalcolm@redhat.com>
5079
5080 * c-common.h (warn_for_misleading_indentation): New prototype.
5081 * c-indentation.c: New file.
5082 * c.opt (Wmisleading-indentation): New option.
5083
c7b38fd5
TV
50842015-05-12 Tom de Vries <tom@codesourcery.com>
5085
5086 PR tree-optimization/66010
5087 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5088
381bf11e
JM
50892015-05-09 Jason Merrill <jason@redhat.com>
5090
edff0c06
JM
5091 * c-opts.c (c_common_post_options): Also clear
5092 cpp_opts->cpp_warn_cxx11_compat.
5093
129211bc
JM
5094 * c-common.h (enum cxx_dialect): Add cxx_unset.
5095 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5096 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5097
381bf11e
JM
5098 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5099 (std=gnu++0x): Mark as Undocumented.
5100 (std=gnu++1y): Add deprecated message.
5101
fe191308
JM
51022015-05-08 Jason Merrill <jason@redhat.com>
5103
765189ff
JM
5104 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5105 * c-opts.c: Adjust.
5106
fe191308
JM
5107 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5108
755e528f
MP
51092015-05-08 Marek Polacek <polacek@redhat.com>
5110
5111 PR c/64918
5112 * c.opt (Woverride-init-side-effects): New option.
5113
0173bd2a
MP
51142015-05-07 Marek Polacek <polacek@redhat.com>
5115
5116 PR c/65179
5117 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5118 negative value.
5119 * c.opt (Wshift-negative-value): New option.
5120 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5121 when -Wextra and C99/C++11 mode.
5122
e0f0d3b9
MP
51232015-05-07 Marek Polacek <polacek@redhat.com>
5124 Martin Uecker <uecker@eecs.berkeley.edu>
5125
5126 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5127 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5128
8243e2a9
JM
51292015-05-05 Jason Merrill <jason@redhat.com>
5130
5131 * c.opt (Wterminate): New.
5132
577cd070
MP
51332015-04-30 Marek Polacek <polacek@redhat.com>
5134
5135 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5136 require that the non-constant be of a boolean type.
5137
0373796b
JT
51382015-04-29 Josh Triplett <josh@joshtriplett.org>
5139
e0f0d3b9
MP
5140 * c-common.c (handle_section_attribute): Refactor to reduce
5141 nesting and distinguish between error cases.
0373796b 5142
716c0ba6
MP
51432015-04-29 Marek Polacek <polacek@redhat.com>
5144
5145 PR c/64610
5146 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5147 with 0/1.
5148
8848828b
JJ
51492015-04-29 Jakub Jelinek <jakub@redhat.com>
5150
5151 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5152 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5153 HOST_BITS_PER_WIDE_INT.
5154
ecd0e562
TV
51552015-04-28 Tom de Vries <tom@codesourcery.com>
5156
5157 PR tree-optimization/65887
5158 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5159
2a877204 51602015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5161 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5162
5163 * c-ada-spec.c (in_function): Delete.
5164 (dump_generic_ada_node): Do not change in_function and remove the
5165 redundant code dealing with it.
5166 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5167 (print_ada_methods): Output the static member functions in a nested
5168 package after the regular methods as well as associated renamings.
5169
4853031e
MP
51702015-04-24 Marek Polacek <polacek@redhat.com>
5171
5172 PR c/65830
5173 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5174 and OPT_Wshift_count_overflow.
5175
8c2b7f79
MP
5176 PR c/63357
5177 * c-common.c (warn_logical_operator): Warn if the operands have the
5178 same expressions.
5179
b8787813
MP
51802015-04-24 Marek Polacek <polacek@redhat.com>
5181
5182 PR c/61534
5183 * c-common.c (warn_logical_operator): Bail if either operand comes
5184 from a macro expansion.
5185
8fba1830
BRF
51862015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5187
5188 PR target/55143
5189 * c-common.c (c_default_pointer_mode): Add definition.
5190 * c-common.h (c_default_pointer_mode): Add declaration.
5191
17958621
JJ
51922015-03-11 Jakub Jelinek <jakub@redhat.com>
5193
5194 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5195 on record_builtin_type argument.
5196
7ccb1a11
JJ
51972015-03-10 Jakub Jelinek <jakub@redhat.com>
5198
5199 PR c/65120
5200 * c-common.c (warn_logical_not_parentheses): Don't warn for
5201 !x == 0 or !x != 0.
5202
04fd785e
MP
52032015-03-07 Marek Polacek <polacek@redhat.com>
5204
5205 PR sanitizer/65280
5206 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5207 before trying to figure out whether we have a flexible array member.
5208
a4e26206 52092015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5210 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5211
5212 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5213
0d2489f4
EB
52142015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5215
5216 PR ada/65319
5217 * c-ada-spec.c (print_destructor): Remove obsolete code.
5218
83ed54d7
EB
52192015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5220
5221 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5222 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5223 DECL_TEMPLATE_RESULT emulations.
5224 (dump_ada_template)): Add guard for TYPE_METHODS.
5225
7631f0e2
MP
52262015-02-27 Marek Polacek <polacek@redhat.com>
5227
5228 PR c/65040
5229 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5230
d1783ae5
KT
52312015-02-27 Kai Tietz <ktietz@redhat.com>
5232
5233 PR c/35330
5234 * c-pragma.c (handle_pragma_weak): Do not try to create
5235 weak/alias of declarations not being function, or variable
5236 declarations.
5237
56a9f6bc
TS
52382015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5239
5240 PR libgomp/64625
5241 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5242 Remove macros.
5243 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5244
3d5cb23d
MP
52452015-02-16 Marek Polacek <polacek@redhat.com>
5246
5247 PR c/65066
5248 * c-format.c (check_format_types): Handle null param.
5249
fa008882
MP
52502015-02-13 Marek Polacek <polacek@redhat.com>
5251
5252 PR c/65040
5253 * c-format.c (check_format_types): Don't warn about different
5254 signedness if the original value is in the range of WANTED_TYPE.
5255
785f21af
JM
52562015-02-12 Jason Merrill <jason@redhat.com>
5257
5258 PR c++/64956
5259 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5260 to the current highest version.
5261 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5262
4886ec8e
JJ
52632015-02-04 Jakub Jelinek <jakub@redhat.com>
5264
5265 PR c/64824
5266 PR c/64868
5267 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5268 instead of RDIV_EXPR. Use build_binary_op instead of
5269 build2_loc.
5270
40fecdd6
JM
52712015-01-30 Joseph Myers <joseph@codesourcery.com>
5272
5273 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5274 to pass input_location as first argument.
5275
a0c88d06
TV
52762015-01-23 Tom de Vries <tom@codesourcery.com>
5277
5278 PR libgomp/64672
5279 * c.opt (fopenacc): Mark as LTO option.
5280
1506ae0e
TV
52812015-01-23 Tom de Vries <tom@codesourcery.com>
5282
5283 PR libgomp/64707
5284 * c.opt (fopenmp): Mark as LTO option.
5285
31be63ab
JJ
52862015-01-21 Jakub Jelinek <jakub@redhat.com>
5287
5288 PR c/63307
b1726d6c 5289 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5290 (compare_decls): Fix up formatting.
5291
52922015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5293
5294 PR c/63307
5295 * cilk.c: Include vec.h.
5296 (struct cilk_decls): New structure.
5297 (wrapper_parm_cb): Split this function to...
5298 (fill_decls_vec): ...this...
5299 (create_parm_list): ...and this.
5300 (compare_decls): New function.
5301 (for_local_cb): Remove.
5302 (wrapper_local_cb): Ditto.
5303 (build_wrapper_type): For now first traverse and fill vector of
5304 declarations then sort it and then deal with sorted vector.
5305 (cilk_outline): Ditto.
5306 (declare_one_free_variable): Ditto.
5307
6875457f
JM
53082015-01-21 Jason Merrill <jason@redhat.com>
5309
5310 PR c++/64629
5311 * c-format.c (check_format_arg): Call decl_constant_value.
5312
185c9e56
ML
53132015-01-19 Martin Liska <mliska@suse.cz>
5314
5315 * c-common.c (handle_noicf_attribute): New function.
5316
41dbbb37
TS
53172015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5318 Bernd Schmidt <bernds@codesourcery.com>
5319 James Norris <jnorris@codesourcery.com>
5320 Cesar Philippidis <cesar@codesourcery.com>
5321 Ilmir Usmanov <i.usmanov@samsung.com>
5322 Jakub Jelinek <jakub@redhat.com>
5323
5324 * c.opt (fopenacc): New option.
5325 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5326 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5327 New macros.
5328 * c-common.h (c_finish_oacc_wait): New prototype.
5329 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5330 (c_finish_oacc_wait): New function.
5331 * c-pragma.c (oacc_pragmas): New variable.
5332 (c_pp_lookup_pragma, init_pragma): Handle it.
5333 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5334 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5335 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5336 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5337 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5338 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5339 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5340 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5341 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5342 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5343 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5344 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5345 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5346 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5347 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5348 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5349 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5350 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5351 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5352 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5353 PRAGMA_OACC_CLAUSE_WORKER.
5354
3f8257db 53552015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5356
5357 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5358 for the new option fstack-protector_explicit.
5359 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5360 (handle_stack_protect_attribute): New function.
5361
3f8257db 53622015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5363
5364 * c.opt: New option -Warray-bounds=.
5365
adfac8df
JJ
53662015-01-09 Michael Collison <michael.collison@linaro.org>
5367
5368 * array-notation-common.c: Include hash-set.h, machmode.h,
5369 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5370 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5371 * c-ada-spec.c: Ditto.
5372 * c-cilkplus.c: Ditto.
5373 * c-common.c: Include input.h due to flattening of tree.h.
5374 Define macro GCC_C_COMMON_C.
5375 * c-common.h: Flatten tree.h header files into c-common.h.
5376 Remove include of tree-core.h.
5377 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5378 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5379 fold-const.h, wide-int.h, and inchash.h due to
5380 flattening of tree.h.
5381 * c-dump.c: Ditto.
5382 * c-format.c: Flatten tree.h header files into c-common.h.
5383 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5384 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5385 fold-const.h, wide-int.h, and inchash.h due to
5386 flattening of tree.h.
5387 * c-dump.c: Include hash-set.h, machmode.h,
5388 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5389 fold-const.h, wide-int.h, and inchash.h due to
5390 flattening of tree.h.
5391 * c-format.c: Include hash-set.h, machmode.h,
5392 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5393 fold-const.h, wide-int.h, inchash.h and real.h due to
5394 flattening of tree.h.
5395 * c-gimplify.c: Include hash-set.h, machmode.h,
5396 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5397 fold-const.h, wide-int.h, and inchash.h due to
5398 flattening of tree.h.
5399 * cilk.c: Ditto.
5400 * c-lex.c: Ditto.
5401 * c-omp.c: Ditto.
5402 * c-opts.c: Ditto.
5403 * c-pch.c: Ditto.
5404 * c-ppoutput.c: Ditto.
5405 * c-pragma.c: Ditto.
5406 * c-pretty-print.c: Ditto.
5407 * c-semantics.c: Ditto.
5408 * c-ubsan.c: Ditto.
5409 * stub-objc.c: Ditto.
5410
f5481fc4
JM
54112015-01-08 Jason Merrill <jason@redhat.com>
5412
5413 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5414 do_ubsan_in_current_function.
5415 (ubsan_maybe_instrument_reference_or_call): Likewise.
5416 * c-ubsan.h: Declare it.
5417
de35aa66
MS
54182015-01-08 Mike Stump <mikestump@comcast.net>
5419
5420 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5421
4a9a42ab
MP
54222015-01-07 Marek Polacek <polacek@redhat.com>
5423
5424 PR c/64440
5425 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5426 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5427
2f42e5de
TS
54282015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5429
5430 PR c++/31397
5431 * c.opt (Wsuggest-override): New option.
5432
5624e564
JJ
54332015-01-05 Jakub Jelinek <jakub@redhat.com>
5434
5435 Update copyright years.
5436
5bd012f8
MP
54372015-01-05 Marek Polacek <polacek@redhat.com>
5438
5439 PR c/64423
5440 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5441 parameter. Use it.
5442 * c-common.h (warn_array_subscript_with_type_char): Update
5443 declaration.
5444
a7fa8d18
ESR
54452014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5446
5447 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5448 Control macro with flag_sized_deallocation.
5449
3f8257db 54502014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5451
5452 * c.opt (Wdiscarded-array-qualifiers): New option.
5453
1f8d3e84
JJ
54542014-12-19 Jakub Jelinek <jakub@redhat.com>
5455
5456 PR preprocessor/63831
5457 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5458 and __has_cpp_attribute here.
5459 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5460 c_common_has_attribute.
5461 * c-common.h (c_common_has_attribute): New prototype.
5462 * c-lex.c (init_c_lex): Set cb->has_attribute to
5463 c_common_has_attribute instead of cb_has_attribute.
5464 (get_token_no_padding): New function.
5465 (cb_has_attribute): Renamed to ...
5466 (c_common_has_attribute): ... this. No longer static. Use
5467 get_token_no_padding, require ()s, don't build TREE_LIST
5468 unnecessarily, fix up formatting, adjust diagnostics, call
5469 init_attributes.
5470
20b06add
JM
54712014-12-15 Jason Merrill <jason@redhat.com>
5472
5473 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5474 (-Wsized-deallocation): New.
5475 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5476 to on in C++14 and up.
5477
94a073b2
JM
54782014-12-11 Jason Merrill <jason@redhat.com>
5479
acaa5911
JM
5480 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5481
94a073b2
JM
5482 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5483 we aren't complaining about VLAs.
5484
7fb66c15
MP
54852014-12-06 Marek Polacek <polacek@redhat.com>
5486
5487 PR tree-optimization/64183
5488 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5489 shift-expression if it is integer_type_node. Use types_compatible_p.
5490
b731b390
JJ
54912014-11-29 Jakub Jelinek <jakub@redhat.com>
5492
5493 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5494 last argument from create_tmp_var_raw and create_tmp_var calls.
5495 * cilk.c (gimplify_cilk_spawn): Likewise.
5496 * c-omp.c (c_finish_omp_atomic): Likewise.
5497
6a4da643
MP
54982014-11-28 Marek Polacek <polacek@redhat.com>
5499
5500 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5501 instead of unsigned_type_node.
5502
541e35a6
MP
55032014-11-28 Marek Polacek <polacek@redhat.com>
5504
5505 PR c/63862
5506 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5507 to op1_utype.
5508 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5509 expression to unsigned_type_node.
5510
dcc97066
MW
55112014-11-20 Mark Wielaard <mjw@redhat.com>
5512
5513 PR debug/38757
5514 * c-opts.c (set_std_c89): Set lang_hooks.name.
5515 (set_std_c99): Likewise.
5516 (set_std_c11): Likewise.
5517 (set_std_cxx98): Likewise.
5518 (set_std_cxx11): Likewise.
5519 (set_std_cxx14): Likewise.
5520 (set_std_cxx1z): Likewise.
5521
aa7da51a
JJ
55222014-11-21 Jakub Jelinek <jakub@redhat.com>
5523
5524 PR target/63764
5525 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5526 return type to bool.
009a3480 5527 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5528 (convert_vector_to_pointer_for_subscript): Change return type to
5529 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5530 and copy it into a TARGET_EXPR and use that instead of *vecp
5531 directly.
5532
538dd0b7
DM
55332014-11-19 David Malcolm <dmalcolm@redhat.com>
5534
5535 Merger of git branch "gimple-classes-v2-option-3".
5536 * ChangeLog.gimple-classes: New.
5537 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5538 from being just a vec<gimple> to a vec<gbind *>.
5539
c39a5e99
JJ
55402014-11-18 Jakub Jelinek <jakub@redhat.com>
5541
5542 PR sanitizer/63813
5543 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5544 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5545 get_pointer_alignment for non-pointers. Use ptype, or if it is
5546 reference type, corresponding pointer type, as type of kind
5547 argument.
5548 (ubsan_maybe_instrument_reference,
5549 ubsan_maybe_instrument_member_call): Adjust callers.
5550
8537a4a9
MP
55512014-11-15 Marek Polacek <polacek@redhat.com>
5552
5553 PR middle-end/63884
5554 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5555 for NULL fndecl.
5556 (extract_array_notation_exprs): Return for NULL node.
5557
2079956a
JM
55582014-11-12 Joseph Myers <joseph@codesourcery.com>
5559
5560 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5561 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5562
1304953e
JJ
55632014-11-12 Jakub Jelinek <jakub@redhat.com>
5564
5565 PR c/59708
5566 * c-common.c (check_builtin_function_arguments): Handle
5567 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5568
e5e44252
AK
55692014-11-10 Andi Kleen <ak@linux.intel.com>
5570
5571 PR c/60804
5572 * c-common.h (check_no_cilk): Declare.
5573 * cilk.c (get_error_location): New function.
5574 (check_no_cilk): Dito.
5575
e64b984d
AK
55762014-11-10 Andi Kleen <ak@linux.intel.com>
5577
5578 * cilk.c (recognize_spawn): Use expression location
5579 for error message.
5580
13c21655
PC
55812014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5582
5583 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5584
42fd12b1
ESR
55852014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5586
5587 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5588 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5589 (__cpp_range_based_for, __cpp_initializer_lists,
5590 __cpp_delegating_constructors, __cpp_nsdmi,
5591 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5592 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5593 __has_cpp_attribute.
5594 * c-lex.c (cb_has_attribute): New callback CPP function;
5595 (init_c_lex): Set has_attribute callback.
5596
6f450181
RB
55972014-11-04 Richard Biener <rguenther@suse.de>
5598
5599 * c-common.c (shorten_compare): Do not shorten mixed
5600 DFP and non-DFP compares.
5601
26f0e1d6
ESR
56022014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5603
5604 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5605 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5606 Commentary and rearrangement of tests.
5607 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5608 Commentary and rearrangement of tests.
5609 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5610 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5611
ef4bddc2
RS
56122014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5613
5614 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5615 enum from machine_mode.
5616
c582198b
AM
56172014-10-28 Andrew MacLeod <amacleod@redhat.com>
5618
adfac8df
JJ
5619 * c-common.c: Adjust include files.
5620 * c-gimplify.c: Ditto.
5621 * cilk.c: Ditto.
5622 * c-pragma.c: Ditto.
5623 * c-ubsan.c: Ditto.
c582198b 5624
60393bbc
AM
56252014-10-27 Andrew MacLeod <amacleod@redhat.com>
5626
5627 * c-gimplify.c: Adjust include files.
5628
d723bb7c
MLI
56292014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5630
5631 PR c++/53061
5632 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5633 c_common_initialize_diagnostics.
5634 * c-common.h: Likewise.
5635
90f3520e
MP
56362014-10-24 Marek Polacek <polacek@redhat.com>
5637
5638 PR c/56980
5639 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5640 print "struct"/"union"/"enum" for typedefed names.
5641
59d7607a
MP
56422014-10-23 Marek Polacek <polacek@redhat.com>
5643
5644 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5645 in unsigned type.
5646
d95a2703
JJ
56472014-10-22 Jakub Jelinek <jakub@redhat.com>
5648 Yury Gribov <y.gribov@samsung.com>
5649
5650 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5651 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5652 instead of flag_sanitize_recover as bool flag.
5653
8e6ef852
KY
56542014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5655
5656 * cilk.c: Revert previous change.
5657
948cf550
IZ
56582014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5659
5660 PR c/63307
5661 * cilk.c: Include vec.h.
5662 (struct cilk_decls): New structure.
5663 (wrapper_parm_cb): Split this function to...
5664 (fill_decls_vec): ...this...
5665 (create_parm_list): ...and this.
5666 (compare_decls): New function.
5667 (for_local_cb): Remove.
5668 (wrapper_local_cb): Ditto.
5669 (build_wrapper_type): For now first traverse and fill vector of
5670 declarations then sort it and then deal with sorted vector.
5671 (cilk_outline): Ditto.
5672 (declare_one_free_variable): Ditto.
5673
92574c7c
MP
56742014-10-17 Marek Polacek <polacek@redhat.com>
5675
5676 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5677 * c.opt (Wimplicit-int): Initialize to -1.
5678
83685514
AM
56792014-10-16 Andrew MacLeod <amacleod@redhat.com>
5680
5681 * c-pragma.c: Adjust include files.
5682 * c-semantics.c: Likewise.
5683
5b8300ea
DD
56842014-10-16 DJ Delorie <dj@redhat.com>
5685
5686 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5687 multiples of bytes.
5688
5f83e90b
JM
56892014-10-14 Jason Merrill <jason@redhat.com>
5690
5691 PR c++/63455
5692 * c-common.h (CPP_PREPARSED_EXPR): New.
5693 (N_CP_TTYPES): Adjust.
5694
d73326ca
MP
56952014-10-15 Marek Polacek <polacek@redhat.com>
5696
5697 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5698
78a7c317
DD
56992014-10-14 DJ Delorie <dj@redhat.com>
5700
5701 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5702 types, not just __int128.
5703 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5704 types, not just __int128.
5705 (cpp_atomic_builtins): Round pointer sizes up.
5706 (type_suffix): Use type precision, not specific types.
5707 * c-common.c (c_common_reswords): Remove __int128 special case.
5708 (c_common_type_for_size): Check for all __intN types, not just
5709 __int128.
5710 (c_common_type_for_mode): Likewise.
5711 (c_common_signed_or_unsigned_type): Likewise.
5712 (c_build_bitfield_integer_type): Likewise.
5713 (c_common_nodes_and_builtins): Likewise.
5714 (keyword_begins_type_specifier): Likewise.
5715 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5716 __intN variants.
5717
2a22f99c
TS
57182014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5719
5720 * c-common.c: Use hash_table instead of hashtab.
5721
2a8ef767
ESR
57222014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5723
adfac8df 5724 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5725 C++11 section.
5726
3c9aabbd
MG
57272014-10-03 Marc Glisse <marc.glisse@inria.fr>
5728
5729 PR c++/54427
5730 PR c++/57198
5731 PR c++/58845
5732 * c-common.c (warn_logical_operator): Punt for vectors.
5733
a15f7cb8
ESR
57342014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5735
5736 Implement SD-6: SG10 Feature Test Recommendations
5737 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5738 macros and the __has_header macro.
5739
8d0cf15e
JM
57402014-09-30 Jason Merrill <jason@redhat.com>
5741
dd5d5481
JM
5742 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5743 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5744 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5745
b752325e
JM
5746 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5747 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5748
8d0cf15e
JM
5749 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5750 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5751
083e891e
MP
57522014-09-24 Marek Polacek <polacek@redhat.com>
5753
5754 PR c/61405
5755 PR c/53874
5756 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5757
7861b648
AK
57582014-09-23 Andi Kleen <ak@linux.intel.com>
5759
5760 * c-common.c (handle_no_reorder_attribute): New function.
5761 (c_common_attribute_table): Add no_reorder attribute.
5762
9a79452d
JM
57632014-09-22 Joseph Myers <joseph@codesourcery.com>
5764
5765 * c-cppbuiltin.c (c_cpp_builtins): Define
5766 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5767 modes.
5768
dd69f047
JM
57692014-09-18 Joseph Myers <joseph@codesourcery.com>
5770
5771 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5772 for supported floating-point modes.
5773
737a4826
MLI
57742014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5775
5776 * c.opt (Wpsabi): Use LangEnabledBy.
5777 * c-opts.c (c_common_handle_option): Do not handle here.
5778
8cc4b7a2
JM
57792014-09-12 Joseph Myers <joseph@codesourcery.com>
5780
5781 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5782 macros for floating-point modes.
5783
179b5a55
MG
57842014-09-11 Marc Glisse <marc.glisse@inria.fr>
5785
5786 PR target/58757
5787 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5788 __*_DENORM_MIN__ without denormals.
5789
570a11fe
JJ
57902014-09-10 Jakub Jelinek <jakub@redhat.com>
5791
5792 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5793 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5794 ubsan_create_data callers.
5795 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5796 index is constant or BIT_AND_EXPR with constant mask and is
5797 small enough for the bound.
5798 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5799 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5800
b559c810
MLI
58012014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5802
5803 * c.opt: Add CppReason to various flags.
5804 (Wdate-time): Re-sort.
5805 * c-common.c: Include c-common.h earlier.
5806 (struct reason_option_codes_t): Delete.
5807 (c_option_controlling_cpp_error): Prefix global type and struct
5808 with cpp_.
5809
1ef33fd4
MLI
58102014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5811
5812 * c.opt (Wnormalized): New.
5813 (Wnormalized=): Use Enum and Reject Negative.
5814 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5815
66bb34c0
JM
58162014-09-08 Joseph Myers <joseph@codesourcery.com>
5817
5818 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5819 digits of floating-point modes if -fbuilding-libgcc.
5820
53d68b9f
JM
58212014-09-05 Joseph Myers <joseph@codesourcery.com>
5822
5823 * c-cppbuiltin.c (c_cpp_builtins): Also define
5824 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5825 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5826 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5827 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5828 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5829 __LIBGCC_STACK_GROWS_DOWNWARD__,
5830 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5831 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5832 __LIBGCC_DWARF_FRAME_REGISTERS__,
5833 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5834 __LIBGCC_STACK_POINTER_REGNUM__ and
5835 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5836 (builtin_define_with_value): Handle backslash-escaping in string
5837 macro values.
5838
f65586dc
RB
58392014-09-05 Richard Biener <rguenther@suse.de>
5840
5841 PR middle-end/63148
5842 * c-format.c (check_format_arg): Properly handle
5843 effectively signed POINTER_PLUS_EXPR offset.
5844
2b71f4a4
MLI
58452014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5846
5847 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5848 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5849 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5850 and Init.
5851 * c-opts.c (c_common_handle_option): Do not handle here.
5852 (sanitize_cpp_opts): Likewise.
5853 * c-common.c (struct reason_option_codes_t): Handle
5854 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5855
d2e4feca
MP
58562014-09-03 Marek Polacek <polacek@redhat.com>
5857
5858 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5859
9a771876
JJ
58602014-09-02 Jakub Jelinek <jakub@redhat.com>
5861 Balaji V. Iyer <balaji.v.iyer@intel.com>
5862 Igor Zamyatin <igor.zamyatin@intel.com>
5863
5864 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5865 * c-common.c (c_common_reswords): Added _Cilk_for.
5866 * c-common.h (enum rid): Added RID_CILK_FOR.
5867 (cilk_for_number_of_iterations): Add declaration.
5868 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5869 CILK_FOR.
5870 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5871 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5872
81b5d104
MLI
58732014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5874
5875 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5876 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5877 Wundef): Use CPP, Var and Init.
5878 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5879
b753b37b
MLI
58802014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5881
5882 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5883 * c-opts.c (c_common_handle_option): Do not handle here.
5884
028aee17
JM
58852014-08-25 Jason Merrill <jason@redhat.com>
5886
5887 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5888 -std=c++14 and -std=gnu++14, rather than the reverse.
5889 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5890 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5891 * c-common.h (cxx_dialect): Remove cxx1y.
5892
e4276ba5
ESR
58932014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5894
5895 * c-common.h (enum cxx_dialect): Add cxx14.
5896 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5897 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5898 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5899
a545cacd
JM
59002014-08-22 Jason Merrill <jason@redhat.com>
5901
5902 * c.opt (std=gnu++17): Fix alias.
5903
59ea0364
MP
59042014-08-22 Marek Polacek <polacek@redhat.com>
5905
5906 PR c++/62199
5907 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5908 check for vector types. Drop LHS argument.
5909 * c-common.h (warn_logical_not_parentheses): Adjust.
5910
596e808c
MLI
59112014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5912
5913 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5914 (Wmultichar): Likewise.
5915 (Wdate-time): Use C-family languages instead of Common. Use CPP
5916 and Var.
5917 * c-opts.c (c_common_handle_option): Do not handle the above
5918 options here.
5919 (sanitize_cpp_opts): Likewise.
5920
18767f65
MLI
59212014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5922
5923 PR fortran/44054
5924 * c-opts.c: Include tree-diagnostics.h.
5925 (c_diagnostic_finalizer): New.
5926 (c_common_initialize_diagnostics): Use it.
5927
b4413594
MLI
59282014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5929
5930 PR preprocessor/51303
5931 * c-common.c (struct reason_option_codes_t option_codes):
5932 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5933
43f9a13c
MLI
59342014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5935
5936 PR c/60975
5937 PR c/53063
5938 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5939 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5940 (c_common_post_options): Call init_global_opts_from_cpp.
5941 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5942
04159acf
MP
59432014-08-19 Marek Polacek <polacek@redhat.com>
5944
5945 PR c++/62153
5946 * c-common.c (maybe_warn_bool_compare): New function.
5947 * c-common.h (maybe_warn_bool_compare): Declare.
5948 * c.opt (Wbool-compare): New option.
5949
35aff4fb
MP
59502014-08-19 Marek Polacek <polacek@redhat.com>
5951
5952 * c.opt (Wc99-c11-compat): New option.
5953
177cce46
MP
59542014-08-19 Marek Polacek <polacek@redhat.com>
5955
5956 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5957 to warn_c90_c99_compat.
5958 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5959 to -1.
5960
6ae9194f
MLI
59612014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5962 Steven Bosscher <steven@gcc.gnu.org>
5963
5964 PR c/52952
5965 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5966 format_check_results.
5967 (check_function_format): Use true and add comment for boolean
5968 argument.
5969 (finish_dollar_format_checking): Use explicit location when warning.
5970 (check_format_info): Likewise.
5971 (check_format_arg): Set extra_arg_loc and format_string_loc.
5972 (check_format_info_main): Use explicit location when warning.
5973 (check_format_types): Pass explicit location.
5974 (format_type_warning): Likewise.
5975
8e54f6d3
MLI
59762014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5977
5978 PR fortran/44054
5979 * c-format.c: Handle Fortran flags.
5980
cd4e76fc
IZ
59812014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5982
5983 PR other/61962
5984 * array-notation-common.c (find_rank): Added handling for other
5985 types of references.
5986
f3bede71
MP
59872014-08-10 Marek Polacek <polacek@redhat.com>
5988
5989 PR c/51849
5990 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5991 * c.opt (Wc90-c99-compat): Add option.
5992
9f25a338
TS
59932014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5994
5995 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5996
62e4eb35
MP
59972014-08-03 Marek Polacek <polacek@redhat.com>
5998
5999 * c-common.c (check_case_value): Add location_t parameter. Use it.
6000 (c_add_case_label): Pass loc to check_case_value.
6001
b787e7a2
TS
60022014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6003
6004 * cilk.c: Use hash_map instead of pointer_map.
6005
6e2830c3
TS
60062014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6007
6008 * c-gimplify.c: Use hash_set instead of pointer_set.
6009
a7ee52fb
IZ
60102014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6011
6012 PR middle-end/61455
6013 * array-notation-common.c (extract_array_notation_exprs): Handling
6014 of DECL_EXPR added.
6015
944fa280
JJ
60162014-08-01 Jakub Jelinek <jakub@redhat.com>
6017
6018 * c-common.h (min_align_of_type): Removed prototype.
6019 * c-common.c (min_align_of_type): Removed.
6020 * c-ubsan.h (ubsan_maybe_instrument_reference,
6021 ubsan_maybe_instrument_member_call): New prototypes.
6022 * c-ubsan.c: Include stor-layout.h and builtins.h.
6023 (ubsan_maybe_instrument_reference_or_call,
6024 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6025 functions.
6026
b4dfdc11
MG
60272014-07-31 Marc Glisse <marc.glisse@inria.fr>
6028
6029 PR c++/60517
6030 * c.opt (-Wreturn-local-addr): Move to common.opt.
6031
a41844e5
JM
60322014-07-30 Jason Merrill <jason@redhat.com>
6033
6034 PR c++/61659
6035 PR c++/61687
6036 Revert:
6037 * c.opt (-fuse-all-virtuals): New.
6038
976d5a22
TT
60392014-07-30 Tom Tromey <tromey@redhat.com>
6040
6041 PR c/59855
6042 * c.opt (Wdesignated-init): New option.
6043 * c-common.c (c_common_attribute_table): Add "designated_init".
6044 (handle_designated_init): New function.
6045
cdc94aca
MP
60462014-07-24 Marek Polacek <polacek@redhat.com>
6047
6048 PR c/57653
6049 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6050
f41373b6
DS
60512014-07-16 Dodji Seketeli <dodji@redhat.com>
6052
6053 PR preprocessor/60723 - missing system-ness marks for macro tokens
6054 * c-ppoutput.c (struct print::prev_was_system_token): New data
6055 member.
6056 (init_pp_output): Initialize it.
6057 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6058 (do_line_change): Return a flag saying if a line marker was
6059 emitted or not.
6060 (scan_translation_unit): Detect if the system-ness of the token we
6061 are about to emit is different from the one of the previously
6062 emitted token. If so, emit a line marker. Avoid emitting useless
6063 adjacent line markers. Avoid emitting line markers for tokens
6064 originating from the expansion of built-in macros.
6065 (scan_translation_unit_directives_only): Adjust.
6066
4d661eaa
MP
60672014-07-15 Marek Polacek <polacek@redhat.com>
6068
6069 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6070 TYPE_MAX_VALUE is NULL.
6071
b108f48f
JJ
60722014-07-14 Jakub Jelinek <jakub@redhat.com>
6073
6074 PR middle-end/61294
6075 * c.opt (Wmemset-transposed-args): New warning.
6076
c0221884
JM
60772014-07-10 Jason Merrill <jason@redhat.com>
6078
6079 PR c++/61659
6080 PR c++/61687
6081 * c.opt (-fuse-all-virtuals): New.
6082
63dfbb95
RB
60832014-07-09 Richard Biener <rguenther@suse.de>
6084
6085 PR c-family/61741
6086 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6087 using unsigned arithmetic if overflow does not wrap instead of
6088 if overflow is undefined.
6089
773ec47f
MP
60902014-07-06 Marek Polacek <polacek@redhat.com>
6091
6092 PR c/6940
6093 * c.opt (Wsizeof-array-argument): New option.
6094
00a7ba58
JJ
60952014-07-03 Jakub Jelinek <jakub@redhat.com>
6096
b1726d6c 6097 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6098 comments->count <= 1, as comments->entries might be NULL.
6099
52ec0ea3
MP
61002014-07-01 Marek Polacek <polacek@redhat.com>
6101
6102 * c.opt (Wint-conversion): New option.
6103
d5c3d343
MP
61042014-07-01 Marek Polacek <polacek@redhat.com>
6105
6106 PR c/58286
6107 * c.opt (Wincompatible-pointer-types): New option.
6108
6e7ceb17
PC
61092014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6110
6111 PR c++/51400
6112 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6113 Do not discard TYPE_QUALS of type.
6114
da73100b
JM
61152014-06-26 Jason Merrill <jason@redhat.com>
6116
6117 * c-common.h (enum cxx_dialect): Add cxx1z.
6118 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6119 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6120
08eedf75
TJ
61212014-06-26 Teresa Johnson <tejohnson@google.com>
6122
6123 * c-common.h (get_dump_info): Declare.
6124 * c-gimplify.c (c_genericize): Use saved dump files.
6125 * c-opts.c (c_common_parse_file): Begin and end dumps
6126 once around parsing invocation.
6127 (get_dump_info): New function.
6128
7b56b2f8
MP
61292014-06-23 Marek Polacek <polacek@redhat.com>
6130 Andrew MacLeod <amacleod@redhat.com>
6131
6132 PR c/61553
6133 * c-common.c (get_atomic_generic_size): Don't segfault if the
6134 type doesn't have a size.
6135
0e37a2f3
MP
61362014-06-20 Marek Polacek <polacek@redhat.com>
6137
6138 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6139 (ubsan_walk_array_refs_r): New function.
6140 (c_genericize): Instrument array bounds.
6141 * c-ubsan.c: Include "internal-fn.h".
6142 (ubsan_instrument_division): Mark instrumented arrays as having
6143 side effects. Adjust ubsan_type_descriptor call.
6144 (ubsan_instrument_shift): Likewise.
6145 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6146 (ubsan_instrument_bounds): New function.
6147 (ubsan_array_ref_instrumented_p): New function.
6148 (ubsan_maybe_instrument_array_ref): New function.
6149 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6150 (ubsan_array_ref_instrumented_p): Declare.
6151 (ubsan_maybe_instrument_array_ref): Declare.
6152
61532014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6154
6155 PR lto/61123
6156 * c.opt (fshort-enums): Add to LTO.
6157 * c.opt (fshort-wchar): Likewise.
6158
5c3d09f7
MP
61592014-06-16 Marek Polacek <polacek@redhat.com>
6160
6161 PR c/60439
6162 * c.opt (Wswitch-bool): Add Var.
6163
9cf32741
JJ
61642014-06-12 Jakub Jelinek <jakub@redhat.com>
6165
6166 PR middle-end/61486
6167 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6168 #pragma omp target teams or
6169 #pragma omp {,target }teams distribute simd.
6170
62984918
JM
61712014-06-12 Jason Merrill <jason@redhat.com>
6172
6173 * c.opt (Wabi=, fabi-compat-version): New.
6174 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6175 (c_common_post_options): Handle flag_abi_compat_version default.
6176 Disallow -fabi-compat-version=1.
6177 * c-common.h (abi_version_crosses): New.
6178
f961457f
JH
61792014-06-11 Jan Hubicka <hubicka@ucw.cz>
6180
adfac8df 6181 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6182 section names that are no longer trees.
6183
92d28cbb
JJ
61842014-06-10 Jakub Jelinek <jakub@redhat.com>
6185
6186 PR fortran/60928
6187 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6188 (omp_pragmas): ... back here.
6189
742938c9
MP
61902014-06-05 Marek Polacek <polacek@redhat.com>
6191
6192 PR c/49706
6193 * c-common.c (warn_logical_not_parentheses): New function.
6194 * c-common.h (warn_logical_not_parentheses): Declare.
6195 * c.opt (Wlogical-not-parentheses): New option.
6196
9d548dfb
MP
61972014-06-04 Marek Polacek <polacek@redhat.com>
6198
6199 PR c/30020
6200 * c-common.c (check_case_bounds): Add location parameter.
6201 Use it.
6202 (c_add_case_label): Pass loc to check_case_bounds.
6203
fedfecef
MP
62042014-06-03 Marek Polacek <polacek@redhat.com>
6205
6206 PR c/60439
6207 * c.opt (Wswitch-bool): New option.
6208
f6a7cffc
TS
62092014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6210
040d18b6
TS
6211 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6212 Remove prototypes.
6213 (record_types_used_by_current_var_decl): Move prototype to where
6214 it belongs.
6215
f6a7cffc
TS
6216 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6217 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6218 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6219
632f2871
RS
62202014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6221
6222 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6223 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6224 void_zero_node.
6225 * c-pretty-print.c (pp_c_void_constant): New function.
6226 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6227 (c_pretty_printer::expression): Handle VOID_CST.
6228 * cilk.c (extract_free_variables): Likewise.
6229 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6230 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6231
766090c2
TS
62322014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6233
6234 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6235 * c-pragma.c (push_alignment): Adjust.
6236 (handle_pragma_push_options): Likewise.
6237
661a0813
MP
62382014-05-09 Marek Polacek <polacek@redhat.com>
6239
6240 PR c/50459
6241 * c-common.c (check_user_alignment): Return -1 if alignment is error
6242 node.
6243 (handle_aligned_attribute): Don't call default_conversion on
6244 FUNCTION_DECLs.
6245 (handle_vector_size_attribute): Likewise.
6246 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6247 (handle_sentinel_attribute): Call default_conversion and allow even
6248 integral types as an argument.
6249
2793eeab
MP
62502014-05-08 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/61053
6253 * c-common.c (min_align_of_type): New function factored out from...
6254 (c_sizeof_or_alignof_type): ...here.
6255 * c-common.h (min_align_of_type): Declare.
6256
f827930a
MP
62572014-05-08 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/61077
6260 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6261 parameter type of main.
6262
ca49b74e
DD
62632014-05-07 DJ Delorie <dj@redhat.com>
6264
6265 * c-cppbuiltin.c (print_bits_of_hex): New.
6266 (builtin_define_type_minmax): Print values using hex so as not to
6267 require a pre-computed list of string values.
6268
1d60af08
KZ
62692014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6270 Mike Stump <mikestump@comcast.net>
6271 Richard Sandiford <rdsandiford@googlemail.com>
6272
6273 * c-ada-spec.c: Include wide-int.h.
6274 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6275 (dump_generic_ada_node): Use wide-int interfaces.
6276 * c-common.c: Include wide-int-print.h.
6277 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6278 (pointer_int_sum): Use wide-int interfaces.
6279 (c_common_nodes_and_builtins): Use make_int_cst.
6280 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6281 (handle_alloc_size_attribute): Use wide-int interfaces.
6282 (get_nonnull_operand): Likewise.
6283 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6284 * c-lex.c: Include wide-int.h.
6285 (narrowest_unsigned_type): Take a widest_int rather than two
6286 HOST_WIDE_INTs.
6287 (narrowest_signed_type): Likewise.
6288 (interpret_integer): Update accordingly. Use wide-int interfaces.
6289 (lex_charconst): Use wide-int interfaces.
6290 * c-pretty-print.c: Include wide-int.h.
6291 (pp_c_integer_constant): Use wide-int interfaces.
6292 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6293 INT_CST_LT_UNSIGNED.
6294
b15458be
RB
62952014-05-06 Richard Biener <rguenther@suse.de>
6296
6297 * c-opts.c (c_common_post_options): For -freestanding,
6298 -fno-hosted and -fno-builtin disable pattern recognition
6299 if not enabled explicitely.
6300
6577374e
MP
63012014-05-02 Marek Polacek <polacek@redhat.com>
6302
6303 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6304
d00887e8
MP
63052014-05-01 Marek Polacek <polacek@redhat.com>
6306
6307 PR c/43245
6308 * c.opt (Wdiscarded-qualifiers): Add.
6309
f8ed5150
MP
63102014-04-30 Marek Polacek <polacek@redhat.com>
6311
6312 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6313 INT_MIN / -1 sanitization only for integer types.
6314
45484dcf
MP
63152014-04-25 Marek Polacek <polacek@redhat.com>
6316
6317 PR c/18079
6318 * c-common.c (handle_noinline_attribute): Warn if the attribute
6319 conflicts with always_inline attribute.
6320 (handle_always_inline_attribute): Warn if the attribute conflicts
6321 with noinline attribute.
6322
38e514c0
MP
63232014-04-25 Marek Polacek <polacek@redhat.com>
6324
6325 PR c/60156
6326 * c-common.c (check_main_parameter_types): Warn about variadic main.
6327
44875f92
MS
63282014-04-24 Mike Stump <mikestump@comcast.net>
6329
6330 * c.opt (Wshadow-ivar): Default to on.
6331
dcaaa5a0
DP
63322014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6333
6334 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6335
c07d7c02
MP
63362014-04-23 Marek Polacek <polacek@redhat.com>
6337
6338 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6339
1c33c9b7
JJ
63402014-04-22 Jakub Jelinek <jakub@redhat.com>
6341
6342 PR sanitizer/60275
6343 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6344 if flag_sanitize_undefined_trap_on_error.
6345 (ubsan_instrument_division, ubsan_instrument_shift,
6346 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6347 if !flag_sanitize_recover.
6348
793c625f
MG
63492014-04-22 Marc Glisse <marc.glisse@inria.fr>
6350
6351 PR libstdc++/43622
6352 * c-common.c (registered_builtin_types): Make non-static.
6353 * c-common.h (registered_builtin_types): Declare.
6354
b0f1bf36
RB
63552014-04-14 Richard Biener <rguenther@suse.de>
6356 Marc Glisse <marc.glisse@inria.fr>
6357
6358 PR c/60819
6359 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6360 apply may-alias the scalar pointer type when applicable.
6361
3b07fa4a
IZ
63622014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6363
6364 PR middle-end/60467
6365 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6366 as possible argument for Cilk_spawn.
6367
cbbd2b1c
TB
63682014-04-11 Tobias Burnus <burnus@net-b.de>
6369
6370 PR c/60194
6371 * c.opt (Wformat-signedness): Add
6372 * c-format.c(check_format_types): Use it.
6373
6415bd5d
JM
63742014-04-11 Jason Merrill <jason@redhat.com>
6375
6376 PR c++/57926
6377 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6378 default_conversion for an array argument.
6379
6525783a
MP
63802014-04-08 Marek Polacek <polacek@redhat.com>
6381
6382 PR sanitizer/60745
6383 * c-ubsan.c: Include asan.h.
6384 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6385
880a467b
NS
63862014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6387
6388 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6389
7b59ff2d
MP
63902014-04-02 Marek Polacek <polacek@redhat.com>
6391
6392 * c-common.h (c_expand_expr): Remove declaration.
6393
8edbfaa6
JJ
63942014-03-28 Jakub Jelinek <jakub@redhat.com>
6395
6396 PR c++/60689
6397 * c-common.c (add_atomic_size_parameter): When creating new
6398 params vector, push the size argument first.
6399
07d72e1d
JJ
64002014-03-26 Jakub Jelinek <jakub@redhat.com>
6401
6402 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6403 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6404 ubsan_create_data callers.
6405
b35e0fa0
JJ
64062014-03-22 Jakub Jelinek <jakub@redhat.com>
6407
6408 PR debug/60603
6409 * c-opts.c (c_finish_options): Restore cb_file_change call to
6410 <built-in>.
6411
39a1ebb3
JJ
64122014-03-13 Jakub Jelinek <jakub@redhat.com>
6413
6414 PR middle-end/36282
6415 * c-pragma.c (apply_pragma_weak): Only look at
6416 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6417 DECL_ASSEMBLER_NAME_SET_P (decl).
6418 (maybe_apply_pending_pragma_weaks): Exit early if
6419 vec_safe_is_empty (pending_weaks) rather than only when
6420 !pending_weaks.
6421 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6422 set assembler name back to NULL afterwards.
6423
a07f6ed2
JM
64242014-03-11 Jason Merrill <jason@redhat.com>
6425
6426 * c.opt: Add -std=gnu++14.
6427
75b107f5
IB
64282014-03-11 Ian Bolton <ian.bolton@arm.com>
6429
6430 * c-opts.c (c_common_post_options): Don't override
6431 -ffp-contract=fast if unsafe-math-optimizations is on.
6432
f42c637e
PM
64332014-03-08 Paulo Matos <paulo@matos-sorge.com>
6434
22b15758 6435 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6436
70e24808
JM
64372014-03-07 Jason Merrill <jason@redhat.com>
6438
6439 * c.opt: Add -std=c++14.
6440
3af9c5e9
MP
64412014-03-06 Marek Polacek <polacek@redhat.com>
6442
6443 PR c/60197
6444 * cilk.c (contains_cilk_spawn_stmt): New function.
6445 (contains_cilk_spawn_stmt_walker): Likewise.
6446 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6447 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6448
b3bdf019
JJ
64492014-03-03 Jakub Jelinek <jakub@redhat.com>
6450
6451 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6452 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6453 even when flag_preprocess_only.
6454
ca7e759d
JM
64552014-02-26 Jason Merrill <jason@redhat.com>
6456
6457 PR c++/59231
6458 PR c++/11586
6459 * c-common.c (shorten_compare): Don't check
6460 c_inhibit_evaluation_warnings.
6461
28e41874
JJ
64622014-02-19 Jakub Jelinek <jakub@redhat.com>
6463
cca615af
JJ
6464 PR c/37743
6465 * c-common.c (c_common_nodes_and_builtins): When initializing
6466 c_uint{16,32,64}_type_node, also set corresponding
6467 uint{16,32,64}_type_node to the same value.
6468
28e41874
JJ
6469 PR c++/60267
6470 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6471 for PRAGMA_IVDEP if flag_preprocess_only.
6472
c2bf53a1
JJ
64732014-02-12 Jakub Jelinek <jakub@redhat.com>
6474
6475 PR c/60101
6476 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6477 if false, add ADD itself, rather than vice versa.
6478 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6479 copy. For SAVE_EXPR, only call merge_tlist once.
6480
8fcbce72
JJ
64812014-02-08 Jakub Jelinek <jakub@redhat.com>
6482
6483 PR middle-end/60092
6484 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6485 and tree_to_uhwi.
6486 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6487 functions.
6488 (c_common_attribute_table): Add alloc_align and assume_aligned
6489 attributes.
6490
0a756a3f
MP
64912014-02-06 Marek Polacek <polacek@redhat.com>
6492
6493 PR c/60087
6494 * c-common.c (warn_for_sign_compare): Call warning_at with location
6495 instead of warning.
6496
7ec4847a
MP
64972014-02-05 Marek Polacek <polacek@redhat.com>
6498
6499 PR c/53123
6500 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6501 statement.
6502
66f20604
MP
65032014-02-04 Marek Polacek <polacek@redhat.com>
6504
6505 PR c/60036
6506 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6507 SAVE_EXPR.
6508
5d77fb19
MG
65092014-02-03 Marc Glisse <marc.glisse@inria.fr>
6510
6511 PR c++/53017
6512 PR c++/59211
6513 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6514 handle_vector_size_attribute, handle_nonnull_attribute): Call
6515 default_conversion on the attribute argument.
6516 (handle_nonnull_attribute): Increment the argument number.
6517
81e5eca8
MP
65182014-01-31 Marek Polacek <polacek@redhat.com>
6519
6520 PR c/59963
6521 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6522 build_function_call_vec.
6523 (resolve_overloaded_builtin): Likewise.
6524 * c-common.h (build_function_call_vec): Adjust declaration.
6525
68fca595
MP
65262014-01-30 Marek Polacek <polacek@redhat.com>
6527
6528 PR c/59940
6529 * c-common.h (unsafe_conversion_p): Adjust declaration.
6530 (warnings_for_convert_and_check): Likewise.
6531 (convert_and_check): Likewise.
6532 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6533 expansion_point_location_if_in_system_header on it.
6534 (warnings_for_convert_and_check): Add location parameter. Call
6535 expansion_point_location_if_in_system_header on it. Use it.
6536 (convert_and_check): Add location parameter. Use it.
6537 (conversion_warning): Likewise.
6538 (c_add_case_label): Adjust convert_and_check calls.
6539 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6540
b72271b9
BI
65412014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6542
6543 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6544 flag_cilkplus.
6545 * c-pragma.c (init_pragma): Likewise.
6546 * c.opt: Likewise.
6547
393e8e8b
MP
65482014-01-23 Marek Polacek <polacek@redhat.com>
6549
6550 PR c/59846
6551 * c-common.c (shorten_compare): Add location_t parameter.
6552 * c-common.h (shorten_binary_op): Adjust declaration.
6553
f04dda30
MP
65542014-01-23 Marek Polacek <polacek@redhat.com>
6555
6556 PR c/58346
6557 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6558 * c-common.h: Declare it.
6559
621955cb
EB
65602014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6561
6562 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6563 * c-ada-spec.c (dump_ads): Likewise.
6564 (cpp_check): Likewise.
6565 (dump_ada_specs): Likewise.
6566
65672014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6568
6569 PR c++/49718
6570 * c-common.c (handle_no_instrument_function_attribute): Allow
6571 no_instrument_function attribute in class member
6572 definition/declaration.
6573
241f845a
JJ
65742014-01-15 Jakub Jelinek <jakub@redhat.com>
6575
6576 PR c/58943
6577 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6578 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6579 being COMPOUND_EXPR.
6580 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6581 operand a SAVE_EXPR and second MODIFY_EXPR.
6582
e83b8e2e
JJ
65832014-01-09 Jakub Jelinek <jakub@redhat.com>
6584
6585 PR target/58115
6586 * c-pch.c (c_common_write_pch): Call
6587 prepare_target_option_nodes_for_pch.
6588
23a5b65a
RS
65892014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6590
6591 Update copyright years
6592
f9030485
RS
65932014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6594
6595 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6596 the copyright notice.
6597
f2aa696b
EB
65982013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6599
6600 * c-ada-spec.c (print_constructor): New function.
6601 (print_destructor): Retrieve the origin of the destructor.
6602 (print_ada_declaration): Revamp handling of constructors/destructors.
6603
3f8257db 66042013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6605 Bill Maddox <maddox@google.com>
6606 Jason Merrill <jason@redhat.com>
6607
6608 * c.opt: Add -fdeclone-ctor-dtor.
6609 * c-opts.c (c_common_post_options): Default to on iff -Os.
6610
41958c28
BI
66112013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6612
6613 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6614 attribute.
6615 * c-pragma.h (enum pragma_cilk_clause): Remove.
6616 (enum pragma_omp_clause): Added the following fields:
6617 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6618 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6619 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6620 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6621 PRAGMA_CILK_CLAUSE_UNIFORM.
6622
b1726d6c 6623
12893402
BI
66242013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6625
6626 * cilk.c (cilk_outline): Made this function non-static.
6627 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6628 (create_cilk_wrapper): Added a new parameter: a function pointer.
6629 (c_install_body_w_frame_cleanup): Remove
6630 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6631 * c-common.h (cilk_outline): New prototype.
6632 (gimplify_cilk_spawn): Removed two parameters.
6633 (cilk_install_body_with_frame_cleanup): New prototype.
6634 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6635 CILK_SPAWN_STMT case.
6636
085b42ed
BS
66372013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6638
2ce064c3
BS
6639 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6640
085b42ed
BS
6641 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6642 (int_array_type_node): Remove.
6643 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6644
9e36c9ed
MP
66452013-12-05 Marek Polacek <polacek@redhat.com>
6646
6647 PR c/52023
6648 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6649 [ADJUST_FIELD_ALIGN].
6650
296674db
JM
66512013-12-04 Joseph Myers <joseph@codesourcery.com>
6652
6653 PR c/52023
6654 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6655 and check field alignment if set.
6656 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6657 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6658
b1726d6c 66592013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6660 Marek Polacek <polacek@redhat.com>
6661
6662 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6663 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6664
d7947e19
L
66652013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6666
6667 PR c/59309
6668 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6669 arguments.
6670
fad7652e
JJ
66712013-11-29 Jakub Jelinek <jakub@redhat.com>
6672
6673 PR c/59280
6674 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6675 goto invalid. If it is error_mark_node, don't issue further
6676 diagnostics.
6677
8b5e1202
SO
66782013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6679
6680 * c.opt (Wopenmp-simd): New.
6681
0a508bb6
JJ
66822013-11-22 Jakub Jelinek <jakub@redhat.com>
6683
6684 * c-ubsan.h (ubsan_instrument_return): New prototype.
6685 * c-ubsan.c (ubsan_instrument_return): New function.
6686
2fb9a547
AM
66872013-11-22 Andrew MacLeod <amacleod@redhat.com>
6688
6689 * c-common.c: Add required include files from gimple.h.
6690 * c-gimplify.c: Likewise
6691 * cilk.c: Likewise
6692
8400e75e
DM
66932013-11-22 David Malcolm <dmalcolm@redhat.com>
6694
6695 * c-common.c (unsafe_conversion_p): Remove use of
6696 EXPR_LOC_OR_HERE macro.
6697 (conversion_warning): Likewise.
6698 (warnings_for_convert_and_check): Likewise.
6699 (warn_for_collisions_1): Likewise.
6700 (shorten_compare): Likewise, and remove use of in_system_header
6701 macro, using the location from the former.
6702 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6703 (cb_def_pragma): Remove use of in_system_header macro.
6704 (lex_string): Likewise.
6705 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6706
eb1ce453
KZ
67072013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6708 Mike Stump <mikestump@comcast.net>
6709 Richard Sandiford <rdsandiford@googlemail.com>
6710
6711 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6712 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6713 tree_fits_shwi_p or tree_fits_uhwi_p.
6714 (dump_generic_ada_node): Likewise.
6715 * c-format.c (check_format_arg): Likewise.
6716 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6717
6b3b8c27
KZ
67182013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6719
6720 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6721
49b0aa18
JC
67222013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6723
6724 PR c/53001
6725 * c-common.c (unsafe_conversion_p): Make this function
6726 return an enumeration with more detail.
6727 (conversion_warning): Use the new return type of
6728 unsafe_conversion_p to separately warn either about conversions
6729 that lower floating point number precision or about the other
6730 kinds of conversions.
6731 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6732 (unsafe_conversion_p): switching return type to
6733 conversion_safety enumeration.
49b0aa18
JC
6734 * c.opt: Adding new warning -Wfloat-conversion and
6735 enabling it with -Wconversion.
6736
b826515a
BS
67372013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6738
8e745a17
JJ
6739 * c-opts.c: Include plugin.h.
6740 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6741
b9a55b13
MP
67422013-11-19 Marek Polacek <polacek@redhat.com>
6743
6744 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6745 call.
6746 (ubsan_instrument_shift): Likewise.
6747 (ubsan_instrument_vla): Likewise.
6748
7d362f6c
RS
67492013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6750
6751 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6752 cast to unsigned type.
6753
386b1f1f
RS
67542013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6755
6756 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6757 tree_low_cst.
6758 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6759 rather than tree_low_cst.
6760
ae7e9ddd
RS
67612013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6762
6763 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6764 tree_to_uhwi throughout.
6765
9439e9a1
RS
67662013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6767
6768 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6769 tree_low_cst (..., 0) with tree_to_shwi throughout.
6770
cc269bb6
RS
67712013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6772
6773 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6774 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6775
9541ffee
RS
67762013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6777
6778 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6779 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6780
c02065fc
AH
67812013-11-15 Aldy Hernandez <aldyh@redhat.com>
6782
6783 * c-cilkplus.c: New file.
6784 * c-common.c (readonly_error): Add location argument.
6785 * c-common.h (readonly_error): Same.
6786 (c_finish_cilk_clauses): Protoize.
6787 (c_check_cilk_loop): Same.
6788 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6789 Do not fail on error_mark_node.
6790 Abstract increment canonicalization to here...
6791 (c_omp_for_incr_canonicalize_ptr): New.
6792 c-pragma.c (init_pragma): Register "simd" pragma.
6793 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6794 (enum pragma_cilk_clause): New.
6795
9cc65f15
RS
67962013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6797
6798 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6799 wchar_type and host_integerp checks.
6800
18f429e2
AM
68012013-11-14 Andrew MacLeod <amacleod@redhat.com>
6802
6803 * c-common.c: Likewise.
6804 * c-gimplify.c: Likewise.
6805 * cilk.c: Likewise.
6806
d8a2d370
DN
68072013-11-14 Diego Novillo <dnovillo@google.com>
6808
6809 * c-common.c: Include fold-const.h.
6810 Include stor-layout.h.
6811 Include calls.h.
6812 Include stringpool.h.
6813 Include attribs.h.
6814 Include varasm.h.
6815 Include trans-mem.h.
6816 * c-cppbuiltin.c: Include stor-layout.h.
6817 Include stringpool.h.
6818 * c-format.c: Include stringpool.h.
6819 * c-lex.c: Include stringpool.h.
6820 Include stor-layout.h.
6821 * c-pragma.c: Include stringpool.h.
6822 Include attribs.h.
6823 Include varasm.h.
6824 Include gcc-symtab.h.
6825 * c-pretty-print.c: Include stor-layout.h.
6826 Include attribs.h.
6827 * cilk.c: Include stringpool.h.
6828 Include calls.h.
6829
38b7bc7f
JM
68302013-11-13 Joseph Myers <joseph@codesourcery.com>
6831
6832 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6833 * c-common.c (c_common_reswords): Add __auto_type.
6834 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6835
45b0be94
AM
68362013-11-12 Andrew MacLeod <amacleod@redhat.com>
6837
18f429e2
AM
6838 * c-common.c: Include gimplify.h.
6839 * c-gimplify.c: Likewise.
6840 * cilk.c: Likewise.
6841 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6842 * c-ubsan.c: Don't include gimple.h.
45b0be94 6843
582d9b50
JM
68442013-11-12 Joseph Myers <joseph@codesourcery.com>
6845
6846 * c-common.c (c_common_reswords): Add _Thread_local.
6847
6b28e197
JM
68482013-11-09 Joseph Myers <joseph@codesourcery.com>
6849
6850 * c-common.c (atomic_size_supported_p): New function.
6851 (resolve_overloaded_atomic_exchange)
6852 (resolve_overloaded_atomic_compare_exchange)
6853 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6854 Use it instead of comparing size with a local list of sizes.
6855
267bac10
JM
68562013-11-07 Andrew MacLeod <amacleod@redhat.com>
6857 Joseph Myers <joseph@codesourcery.com>
6858
6859 * c-common.h (enum rid): Add RID_ATOMIC.
6860 * c-common.c (c_common_reswords): Add _Atomic.
6861 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6862 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6863 * c-format.c (check_format_types): Check for extra _Atomic
6864 qualifiers in format argument.
6865 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6866 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6867
5157b91e
TB
68682013-11-06 Tobias Burnus <burnus@net-b.de>
6869
6870 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6871
6dbe0958
JM
68722013-11-06 Joseph Myers <joseph@codesourcery.com>
6873
6874 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6875 standards modes.
6876 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6877 to mean lack of IEEE 754 support.
6878
e8ff5196
TB
68792013-11-05 Tobias Burnus <burnus@net-b.de>
6880
6881 * c.opt (-Wdate-time): New option
6882 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6883
254a0760
JM
68842013-11-05 Joseph Myers <joseph@codesourcery.com>
6885
6886 * c-cppbuiltin.c (cpp_iec_559_value): Test
6887 flag_excess_precision_cmdline not flag_excess_precision.
6888
6d7f7e0a
TB
68892013-11-05 Tobias Burnus <burnus@net-b.de>
6890
6891 * c.opt (fopenmp-simd): New option.
6892 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6893 (omp_pragmas): ... this new struct.
6894 (c_pp_lookup_pragma): Also walk omp_pragmas.
6895 (init_pragma): Init pragmas for -fopenmp-simd.
6896
55a7f02f
MP
68972013-11-04 Marek Polacek <polacek@redhat.com>
6898
6899 PR c++/58979
6900 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6901
9193fb05
JM
69022013-11-04 Joseph Myers <joseph@codesourcery.com>
6903
6904 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6905 New functions.
6906 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6907
94159ecf
EB
69082013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6909
6910 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6911 (dump_ada_specs): Adjust prototype of second callback.
6912 * c-ada-spec.c (cpp_check): New global variable.
6913 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6914 (print_generic_ada_decl): Likewise.
6915 (has_static_fields): Change return type to bool and add guard.
6916 (has_nontrivial_methods): New predicate.
6917 (is_tagged_type): Change return type to bool.
6918 (separate_class_package): Call has_nontrivial_methods.
6919 (pp_ada_tree_identifier): Minor tweaks.
6920 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6921 (dump_ada_array_domains): Likewise.
6922 (dump_ada_array_type): Likewise.
6923 (dump_template_types): Remove cpp_check parameter and do not pass it to
6924 dump_generic_ada_node.
6925 (dump_ada_template): Likewise.
6926 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6927 recursively.
6928 (print_ada_methods): Change return type to integer. Remove cpp_check
6929 parameter and do not pass it down.
6930 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6931 dump_generic_ada_node.
6932 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6933 accessing methods.
6934 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6935 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6936 value of print_ada_methods.
6937 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6938 Set cpp_check to it before invoking dump_ada_nodes.
6939 (dump_ada_specs): Likewise.
6940
b906f4ca
MP
69412013-11-03 Marek Polacek <polacek@redhat.com>
6942
6943 * c-ubsan.c: Don't include hash-table.h.
6944 (ubsan_instrument_vla): New function.
6945 * c-ubsan.h: Declare it.
6946
5e20cdc9
DM
69472013-10-31 David Malcolm <dmalcolm@redhat.com>
6948
6949 Automated part of renaming of symtab_node_base to symtab_node.
6950
6951 Patch autogenerated by rename_symtab.py from
6952 https://github.com/davidmalcolm/gcc-refactoring-scripts
6953 revision 58bb219cc090b2f4516a9297d868c245495ee622
6954
6955 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6956 symtab_node_base to symtab_node.
6957
7057e645
ESR
69582013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6959
8e745a17 6960 Implement C++14 digit separators.
7057e645
ESR
6961 * c-lex.c (interpret_float): Remove digit separators from scratch string
6962 before building real literal.
6963
193ea7bc
JJ
69642013-10-30 Jakub Jelinek <jakub@redhat.com>
6965
6966 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6967
939b37da
BI
69682013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6969
6970 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6971 fields.
6972 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6973 enabled.
6974 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6975 (insert_cilk_frame): New prototype.
6976 (cilk_init_builtins): Likewise.
6977 (gimplify_cilk_spawn): Likewise.
6978 (c_cilk_install_body_w_frame_cleanup): Likewise.
6979 (cilk_detect_spawn_and_unwrap): Likewise.
6980 (cilk_set_spawn_marker): Likewise.
6981 (build_cilk_sync): Likewise.
6982 (build_cilk_spawn): Likewise.
6983 * cilk.c: New file.
6984
67348ccc
DM
69852013-10-29 David Malcolm <dmalcolm@redhat.com>
6986
6987 Patch autogenerated by refactor_symtab.py from
6988 https://github.com/davidmalcolm/gcc-refactoring-scripts
6989 revision 58bb219cc090b2f4516a9297d868c245495ee622
6990
6991 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6992 to a true class hierarchy.
6993 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6994
d570872d
RS
69952013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6996
6997 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6998
98906124
JL
69992013-10-26 Jeff Law <law@redhat.com>
7000
adfac8df
JJ
7001 * c-common.c (c_define_builtins): Remove mudflap support.
7002 * c.opt: Ignore and warn for mudflap options.
98906124 7003
d73749df 70042013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7005
7006 PR other/33426
7007 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7008 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7009
3f04b1bb
JM
70102013-10-23 Jason Merrill <jason@redhat.com>
7011
7012 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7013
acf0174b
JJ
70142013-10-11 Jakub Jelinek <jakub@redhat.com>
7015
acd15a28
JJ
7016 * c-common.h (omp_clause_mask::operator !=): New method.
7017 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7018 instead of if (mask & something) tests everywhere.
7019
acf0174b
JJ
7020 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7021 201307 instead of 201107.
7022 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7023 (c_common_attribute_table): Add "omp declare target" and
7024 "omp declare simd" attributes.
7025 (handle_omp_declare_target_attribute,
7026 handle_omp_declare_simd_attribute): New functions.
7027 * c-omp.c: Include c-pragma.h.
7028 (c_finish_omp_taskgroup): New function.
7029 (c_finish_omp_atomic): Add swapped argument, if true,
7030 build the operation first with rhs, lhs arguments and use NOP_EXPR
7031 build_modify_expr.
7032 (c_finish_omp_for): Add code argument, pass it down to make_code.
7033 (c_omp_split_clauses): New function.
7034 (c_split_parallel_clauses): Removed.
7035 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7036 c_omp_declare_simd_clauses_to_decls): New functions.
7037 * c-common.h (omp_clause_mask): New type.
7038 (OMP_CLAUSE_MASK_1): Define.
7039 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7040 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7041 omp_clause_mask::operator |, omp_clause_mask::operator &,
7042 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7043 omp_clause_mask::operator ==): New methods.
7044 (enum c_omp_clause_split): New.
7045 (c_finish_omp_taskgroup): New prototype.
7046 (c_finish_omp_atomic): Add swapped argument.
7047 (c_finish_omp_for): Add code argument.
7048 (c_omp_split_clauses): New prototype.
7049 (c_split_parallel_clauses): Removed.
7050 (c_omp_declare_simd_clauses_to_numbers,
7051 c_omp_declare_simd_clauses_to_decls): New prototypes.
7052 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7053 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7054 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7055 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7056 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7057 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7058 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7059 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7060 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7061 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7062 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7063 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7064 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7065 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7066 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7067 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7068 PRAGMA_OMP_CLAUSE_UNIFORM.
7069
826cacfe
MG
70702013-10-09 Marc Glisse <marc.glisse@inria.fr>
7071
7072 PR tree-optimization/20318
7073 * c-common.c (handle_returns_nonnull_attribute): New function.
7074 (c_common_attribute_table): Add returns_nonnull.
7075
2284b034
MG
70762013-10-03 Marc Glisse <marc.glisse@inria.fr>
7077
7078 PR c++/19476
7079 * c.opt (fcheck-new): Move to common.opt.
7080
b56e9788
MP
70812013-09-25 Marek Polacek <polacek@redhat.com>
7082 Jakub Jelinek <jakub@redhat.com>
7083
7084 PR sanitizer/58413
7085 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7086 an expression if we can prove it is correct.
7087 (ubsan_instrument_division): Likewise. Remove unnecessary
7088 check.
7089
ce6923c5
MP
70902013-09-18 Marek Polacek <polacek@redhat.com>
7091
7092 PR sanitizer/58411
7093 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7094 Declare it.
7095 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7096
fb5610fb
IS
70972013-09-14 Iain Sandoe <iain@codesourcery.com>
7098
7099 PR target/48094
7100 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7101 fobjc-gc, freplace-objc-classes): Accept for LTO.
7102
88b0e79e
JC
71032013-09-13 Jacek Caban <jacek@codeweavers.com>
7104
7105 * c-target.def: New hook
7106
c9b0866a
PC
71072013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7108
7109 PR c++/43452
7110 * c.opt (Wdelete-incomplete): Add.
7111
0af94e6f
JR
71122013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7113
7114 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7115 (vector_types_compatible_elements_p): New function.
7116 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7117 declaration.
7118 (vector_types_compatible_elements_p): Declare.
7119
7c26172c
GDR
71202013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7121
7122 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7123 a virtual member function.
7124 (pp_simple_type_specifier): Remove.
7125 (pp_c_type_specifier): Likewise.
7126 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7127 Rename from pp_c_type_specifier. Adjust.
7128 (c_pretty_printer::c_pretty_printer): Do not assign to
7129 simple_type_specifier.
7130
20059c8b
GDR
71312013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7132
7133 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7134 member function.
7135 (c_pretty_printer::storage_class_specifier): Likewise.
7136 (c_pretty_printer::initializer): Likewise.
7137 (pp_declaration): Remove.
7138 (pp_declaration_specifiers): Likewise.
7139 (pp_abstract_declarator): Likewise.
7140 (pp_declarator): Likewise.
7141 (pp_type_id): Likewise.
7142 (pp_statement): Likewise.
7143 (pp_constant): Likewise.
7144 (pp_id_expression): Likewise.
7145 (pp_primary_expression): Likewise.
7146 (pp_unary_expression): Likewise.
7147 (pp_multiplicative_expression): Likewise.
7148 (pp_conditional_expression): Likewise.
7149 (pp_assignment_expression): Likewise.
7150 (pp_expression): Likewise.
7151 (pp_c_type_id): Likewise.
7152 (pp_c_storage_class_specifier): Likewise.
7153 * c-pretty-print.c (pp_c_type_cast): Tidy.
7154 (pp_c_pointer): Likewise.
7155 (pp_c_type_specifier): Likewise.
7156 (pp_c_parameter_type_list): Likewise.
7157 (pp_c_function_definition): Likewise.
7158 (pp_c_init_declarator): Likewise.
7159 (pp_c_initializer_list): Likewise.
7160 (pp_c_constructor_elts): Likewise.
7161 (c_pretty_printer::direct_abstract_declarator): Likewise.
7162 (c_pretty_printer::declaration_specifiers): Likewise.
7163 (c_pretty_printer::primary_expression): Likewise.
7164 (c_pretty_printer::postfix_expression): Likewise.
7165 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7166 (c_pretty_printer::storage_class_specifier): Rename from
7167 pp_c_storage_class_specifier.
7168 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7169 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7170 storage_class_specifier, initializer, offset_list, flags.
7171
de5a5fa1
MP
71722013-08-30 Marek Polacek <polacek@redhat.com>
7173
7174 * c-ubsan.c: New file.
7175 * c-ubsan.h: New file.
7176
8f0e4d72
GDR
71772013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7178
7179 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7180 member function.
7181 (c_pretty_printer::declaration_specifiers): Likewise.
7182 (c_pretty_printer::declarator): Likewise.
7183 (c_pretty_printer::abstract_declarator): Likewise.
7184 (c_pretty_printer::direct_abstract_declarator): Likewise.
7185 (c_pretty_printer::direct_declarator): Likewise.
7186 (c_pretty_printer::function_specifier): Likewise.
7187 (pp_declaration): Adjust.
7188 (pp_declaration_specifiers): Likewise.
7189 (pp_abstract_declarator): Likewise.
7190 (pp_direct_declarator): Likewise.
7191 (pp_function_specifier): Likewise.
7192 (pp_direct_abstract_declarator): Remove as unused.
7193 (pp_c_declaration): Remove.
7194 (pp_c_declaration_specifiers): Likewise.
7195 (pp_c_declarator): Likewise.
7196 (pp_c_direct_declarator): Likewise.
7197 (pp_c_function_specifier): Likewise.
7198 (pp_c_direct_abstract_declarator): Likewise.
7199 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7200 from pp_c_abstract_declarator. Adjust.
7201 (c_pretty_printer::direct_abstract_declarator): Rename from
7202 pp_c_direct_abstract_declarator. Adjust.
7203 (c_pretty_printer::function_specifier): Rename from
7204 pp_c_function_specifier. Adjust.
7205 (c_pretty_printer::declaration_specifiers): Rename from
7206 pp_c_declaration_specifiers. Adjust.
7207 (c_pretty_printer::direct_declarator): Rename from
7208 pp_c_direct_declarator. Adjust.
7209 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7210 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7211 (c_pretty_printer::c_pretty_printer): Do not assign to
7212 declaration, declaration_specifiers, declarator,
7213 direct_declarator, direct_abstract_declarator, function_specifier.
7214
00d34d3a
GDR
72152013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7216
7217 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7218 virtual member function.
7219 (c_pretty_printer::multiplicative_expression): Likewise.
7220 (c_pretty_printer::conditional_expression): Likewise.
7221 (c_pretty_printer::assignment_expression): Likewise.
7222 (c_pretty_printer::expression): Likewise.
7223 (pp_unary_expression): Adjust.
7224 (pp_multiplicative_expression): Likewise.
7225 (pp_assignment_expression): Likewise.
7226 (pp_conditional_expression): Likewise.
7227 (pp_expression): Likewise.
7228 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7229 from pp_c_unary_expression. Adjust.
7230 (c_pretty_printer::multiplicative_expression): Rename from
7231 pp_c_multiplicative_expression. Adjust.
7232 (c_pretty_printer::conditional_expression): Rename from
7233 pp_c_conditional_expression. Adjust.
7234 (c_pretty_printer::assignment_expression): Rename from
7235 pp_c_assignment_expression. Adjust.
7236 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7237 (c_pretty_printer::c_pretty_printer): Do not assign to
7238 unary_expression, multiplicative_expression,
7239 conditional_expression, expression.
7240
fb22178f
GDR
72412013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7242
7243 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7244 virtual member function.
7245 (pp_postfix_expression): Adjust.
7246 (pp_c_postfix_expression): Remove.
7247 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7248 from pp_c_postfix_expression. Adjust.
7249 (c_pretty_printer::c_pretty_printer): Do not assign to
7250 postfix_expression.
7251
7ecc2600
GDR
72522013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7253
7254 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7255 virtua member function.
7256 (pp_primary_expression): Adjust.
7257 (pp_c_primary_expression): Remove.
7258 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7259 from pp_c_primary_expression. Adjust.
7260 (pp_c_initializer_list): Use pp_primary_expression.
7261 (c_pretty_printer::c_pretty_printer): Do not assign to
7262 primary_expression.
7263
0691175f
GDR
72642013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7265
7266 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7267 * c-pretty-print.c (M_): Remove.
7268 (c_pretty_printer::translate_string): Define.
7269 (pp_c_type_specifier): Use it.
7270 (pp_c_primary_expression): Likewise.
7271 (pp_c_expression): Likewise.
7272
66dfe4c4
GDR
72732013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7274
7275 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7276 virtual function.
7277 (pp_c_id_expression): Remove.
7278 (pp_id_expression): Adjust.
7279 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7280 pp_c_id_expression. Adjust.
7281 (pp_c_postfix_expression): Use pp_id_expression.
7282 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7283
ca43e9d5
GDR
72842013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7285
7286 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7287 member function.
7288 (pp_constant): Adjust.
7289 (pp_c_constant): Remove.
7290 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7291 pp_c_constant. Adjust.
7292 (pp_c_constant)
7293 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7294 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7295
da6ca2b5
GDR
72962013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7297
7298 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7299 (c_pretty_printer::c_pretty_printer): Declare.
7300 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7301 c_pretty_printer_init. Adjust.
7302 (print_c_tree): Do not call c_pretty_printer_init.
7303 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7304
65a372f4
AC
73052013-08-09 Arnaud Charlet <charlet@adacore.com>
7306
7307 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7308
fd9b0f32
PC
73092013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7310
7311 PR c++/58080
7312 * c-common.c (pointer_int_sum): Add bool parameter.
7313 * c-common.h (pointer_int_sum): Adjust declaration.
7314
e0aec1e9
GDR
73152013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7316
7317 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7318 c_pretty_printer variable.
7319
b066401f
GDR
73202013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7321
7322 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7323 (pp_base): Remove.
7324 (pp_c_base): Likewise. Adjust users.
7325 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7326 (pp_c_whitespace): Do not call pp_base.
7327 (pp_c_left_paren): Likewise.
7328 (pp_c_right_paren): Likewise.
7329 (pp_c_left_brace): Likewise.
7330 (pp_c_right_brace): Likewise.
7331 (pp_c_left_bracket): Likewise.
7332 (pp_c_right_bracket): Likewise.
7333 (pp_c_dot): Likewise.
7334 (pp_c_ampersand): Likewise.
7335 (pp_c_star): Likewise.
7336 (pp_c_arrow): Likewise.
7337 (pp_c_semicolon): Likewise.
7338 (pp_c_complement): Likewise.
7339 (pp_c_exclamation): Likewise.
7340 (pp_c_direct_declarator): Likewise.
7341 (pp_c_ws_string): Likewise.
7342 (pp_c_identifier): Likewise.
7343 (pp_c_statement): Likewise.
7344 (print_c_tree): Likewise.
7345
65e5a578
ESR
73462013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7347
7348 PR c++/58072
7349 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7350 provide useful error strings.
7351
137a1a27
GDR
73522013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7353
7354 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7355 printer functions instead of pp_string or operators and punctuators.
7356 (dump_generic_ada_node): Likewise.
7357 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7358 (pp_c_relational_expression): Likewise.
7359 (pp_c_logical_or_expression): Likewise.
7360
07838b13
GDR
73612013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7362
7363 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7364 functions instead of pp_character.
7365 (pp_ada_tree_identifier): Likewise.
7366 (dump_ada_double_name): Likewise.
7367 (dump_ada_function_declaration): Likewise.
7368 (dump_ada_array_domains): Likewise.
7369 (dump_template_types): Likewise.
7370 (dump_generic_ada_node): Likewise.
7371 (print_ada_declaration): Likewise.
7372 (print_ada_struct_decl): Likewise.
7373 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7374
433cc7b0
TT
73752013-07-23 Tom Tromey <tromey@redhat.com>
7376
7377 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7378 * c-common.c (c_common_reswords): Add _Generic.
7379
688010ba
OB
73802013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7381
7382 * c-common.c: Fix typos.
7383 * c-common.h: Likewise.
7384
2a99e5e6
LL
73852013-07-13 Lubos Lunak <l.lunak@suse.cz>
7386
7387 PR c++/55203
7388 * c-common.c (c_common_attribute_table): Add warn_unused.
7389 (handle_warn_unused_attribute): New.
7390
c26302d5
JJ
73912013-07-10 Jakub Jelinek <jakub@redhat.com>
7392
7393 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7394 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7395
dfeadaa0
PC
73962013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7397
7398 PR c++/57869
7399 * c.opt: Add Wconditionally-supported.
7400
6a2fa4b2
GS
74012013-07-08 Graham Stott <graham.stott@btinternet.com>
7402
adfac8df 7403 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7404 unused variables l_length and l_node.
7405
ecdbd01a 74062013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7407
7408 PR c/57821
7409 * c-common.c (complete_array_type): Delay folding first index
7410 like other indices. When folding, check for index overflow.
7411
bedc293e
MG
74122013-06-27 Marc Glisse <marc.glisse@inria.fr>
7413
7414 PR c++/57509
7415 * c-common.h (c_build_vec_perm_expr): New complain argument.
7416 * c-common.c (c_build_vec_perm_expr): Likewise.
7417 Use save_expr also in C++.
7418
604b2bfc
GDR
74192013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7420
7421 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7422 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7423 * c-opts.c (c_common_post_options): Likewise.
7424
dfeadaa0 74252013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7426
7427 * array-notation-common.c (length_mismatch_in_expr): Changed the
7428 parameter type's from a dynamic array to a vec_tree. Also removed
7429 the size parameters.
7430 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7431 the change above.
7432
2ce86d2e
BI
74332013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7434
7435 * c-common.h (struct cilkplus_an_parts): New structure.
7436 (struct cilkplus_an_loop_parts): Likewise.
7437 (cilkplus_extract_an_triplets): New prototype.
7438 (fix_sec_implicit_args): Likewise.
7439 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7440 (fix_sec_implicit_args): Likewise.
604b2bfc 7441
07a6825b
BI
74422013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7443
7444 * array-notation-common.c (find_inv_trees): Removed an unwanted
7445 typecasting.
7446 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7447 enum rid to enum tree_code.
7448
08346abd
JH
74492013-06-11 Jan Hubicka <jh@suse.cz>
7450
7451 * c-common.c (handle_alias_ifunc_attribute): Do not set
7452 DECL_EXTERNAL for weakref variables.
7453 * c-pragma.c (handle_pragma_weak): Make sure aliases
7454 are not declared as external.
7455
d60f1706
BI
74562013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7457
7458 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7459 function from c/c-array-notation.c.
7460 (is_cilkplus_reduce_builtin): Likewise.
7461 (find_rank): Likewise.
7462 (extract_array_notation_exprs): Likewise.
7463 (replace_array_notations): Likewise.
7464 (find_inv_trees): Likewise.
7465 (replace_inv_trees): Likewise.
7466 (contains_array_notation_expr): Likewise.
7467 (find_correct_array_notation_type): Likewise.
7468 * c-common.h (struct inv_list): Moved this struct from the file
7469 c/c-array-notation.c and added a new field called additional tcodes.
7470 (length_mismatch_in_expr_p): New prototype.
7471 (is_cilkplus_reduce_builtin): Likewise.
7472 (find_rank): Likewise.
7473 (extract_array_notation_exprs): Likewise.
7474 (replace_array_notation): Likewise.
7475 (find_inv_trees): Likewise.
7476 (replace_inv_trees): Likewise.
7477 (find_correct_array_notation_type): Likewise.
dfeadaa0 7478
36536d79
BI
74792013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7480
7481 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7482 function array_notation_init_builtins is called.
7483 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7484 * c-common.def (ARRAY_NOTATION_REF): New tree.
7485 * c-common.h (build_array_notation_expr): New function declaration.
7486 (build_array_notation_ref): Likewise.
7487 (extract_sec_implicit_index_arg): New extern declaration.
7488 (is_sec_implicit_index_fn): Likewise.
7489 (ARRAY_NOTATION_CHECK): New define.
7490 (ARRAY_NOTATION_ARRAY): Likewise.
7491 (ARRAY_NOTATION_START): Likewise.
7492 (ARRAY_NOTATION_LENGTH): Likewise.
7493 (ARRAY_NOTATION_STRIDE): Likewise.
7494 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7495 ARRAY_NOTATION_REF.
7496 (pp_c_expression): Likewise.
7497 * c.opt (flag_enable_cilkplus): New flag.
7498 * array-notation-common.c: New file.
7499
f7716d57
JJ
75002013-05-14 Jakub Jelinek <jakub@redhat.com>
7501
7502 PR c++/57274
7503 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7504
a5e0cd1d
MG
75052013-05-10 Marc Glisse <marc.glisse@inria.fr>
7506
7507 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7508 vectors.
7509
f6bc1c4a
HS
75102013-05-07 Han Shen <shenhan@google.com>
7511
7512 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7513
3f12f6e9
SKS
75142013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7515
7516 * c-common.c (check_user_alignment): Emit error for negative values.
7517
61949153
PC
75182013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7519
7520 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7521
e93e18e9
PC
75222013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7523
7524 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7525 __GXX_EXPERIMENTAL_CXX1Y__.
7526
44d90fe1 75272013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7528 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7529
7530 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7531 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7532 to simply use OPT_Wpointer_arith.
7533 (c_sizeof_or_alignof_type): Likewise.
7534
13f39b2e
PC
75352013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7536
7537 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7538
4b84d650
JJ
75392013-04-12 Jakub Jelinek <jakub@redhat.com>
7540
7541 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7542 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7543 specifiers.
7544
fb037b5d
SB
75452013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7546
7547 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7548
4e856798
PC
75492013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7550
7551 * c-common.c (pointer_int_sum): Remove dead code.
7552
4b1baac8
RS
75532013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7554
7555 PR middle-end/56524
7556 * c-common.c (handle_optimize_attribute): Don't call
7557 save_optabs_if_changed.
7558
0b50e654
JJ
75592013-03-05 Jakub Jelinek <jakub@redhat.com>
7560
7561 PR middle-end/56461
7562 * c-pch.c (pch_init): Free target_validity at the end.
7563
48c41403
JJ
75642013-03-04 Jakub Jelinek <jakub@redhat.com>
7565
7566 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7567
e664c61c
KS
75682013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7569 Jakub Jelinek <jakub@redhat.com>
7570
7571 PR sanitizer/56454
7572 * c-common.c (handle_no_sanitize_address_attribute): New function.
7573 (c_common_attribute_table): Add no_sanitize_address attribute.
7574 (handle_no_address_safety_analysis_attribute): Add
7575 no_sanitize_address attribute, not no_address_safety_analysis
7576 attribute.
7577
a475fd3d 75782013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7579
7580 PR target/52555
7581 * c-common.c (handle_optimize_attribute): Call
7582 save_optabs_if_changed.
7583
f6007d99
JJ
75842013-02-18 Jakub Jelinek <jakub@redhat.com>
7585 Steven Bosscher <steven@gcc.gnu.org>
7586
7587 PR pch/54117
7588 * c-opts.c (c_common_post_options): If debug info is enabled
7589 and non-dwarf*, refuse to load PCH files and when writing PCH
7590 file warn.
7591
cf35e2b1
JJ
75922013-02-05 Jakub Jelinek <jakub@redhat.com>
7593
7594 PR middle-end/56167
7595 * c-common.c (handle_error_attribute): Fix condition.
7596
32887460
JJ
75972013-01-30 Jakub Jelinek <jakub@redhat.com>
7598
7599 PR c++/55742
7600 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7601
5af057d8
JM
76022013-01-18 Jason Merrill <jason@redhat.com>
7603
7604 PR target/54908
7605 * c.opt (-fextern-tls-init): New.
7606 * c-opts.c (c_common_post_options): Handle it.
7607
cc83c823
JJ
76082013-01-09 Jakub Jelinek <jakub@redhat.com>
7609
7610 PR c/48418
7611 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7612 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7613 and is either negative or bigger or equal to type precision
7614 of the first operand.
7615
a859517f
MP
76162012-12-03 Marek Polacek <polacek@redhat.com>
7617
7618 PR c/55570
7619 * c-common.c (check_user_alignment): Swap order of tests,
7620 check TREE_CODE first.
7621
2d7aa578
ESR
76222012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7623
7624 PR c++/52654
7625 * c-common.h (overflow_type): New enum.
7626 (build_userdef_literal): Add overflow_type argument.
7627 (tree_userdef_literal): Add overflow_type.
7628 (USERDEF_LITERAL_OVERFLOW): New access macro.
7629 * c-common.c (build_userdef_literal): Add overflow_type
7630 argument.
7631 * c-lex.c (c_lex_with_flags): Add overflow_type to
7632 build_userdef_literal calls.
7633 (interpret_integer, interpret_float): Add overflow_type argument.
7634
cc3c4f62
RB
76352012-11-28 Richard Biener <rguenther@suse.de>
7636
7637 PR c/35634
7638 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7639 here and use a type with proper overflow behavior for types that would
7640 need to be promoted for the arithmetic.
7641
77bc5132
JJ
76422012-11-23 Jakub Jelinek <jakub@redhat.com>
7643
7644 PR sanitizer/55435
7645 * c-common.c (handle_no_address_safety_analysis_attribute): New
7646 function.
7647 (c_common_attribute_table): Add no_address_safety_analysis.
7648
5dc99c46
SB
76492012-11-16 Simon Baldwin <simonb@google.com>
7650
7651 * c.opt: Add f[no-]canonical-system-headers.
7652 * c-opts.c (c_common_handle_option): Handle
7653 OPT_fcanonical_system_headers.
7654
a4a0016d
ESR
76552012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7656
7657 PR c++/54413
7658 * c-opts.c (c_common_handle_option): Set new flags.
7659 * c.opt: Describe new flags.
7660
7dbb85a7
JM
76612012-11-09 Jason Merrill <jason@redhat.com>
7662
7663 * c.opt (Wabi-tag): New.
7664
ad7bac31
AK
76652012-11-09 Andi Kleen <ak@linux.intel.com>
7666
7667 PR 55139
7668 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7669 MEMMODEL_MASK
ad7bac31 7670
7332899a
MLI
76712012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7672
7673 PR c/53063
7674 * c.opt (Wformat): Make it Alias Wformat=1.
7675 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7676 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7677 LangEnabledBy.
7678 (Wformat=): RejectNegative. Use LangEnabledBy.
7679 (Wnonnull): Use LangEnabledBy.
7680 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7681 * c-format.c (set_Wformat): Delete.
7682 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7683 (maybe_read_dollar_number): Likewise.
7684 (avoid_dollar_number): Likewise.
7685 (finish_dollar_format_checking): Likewise.
7686 (check_format_info): Likewise.
7687 (check_format_info_main): Likewise.
7688 (check_format_types): Likewise.
7689 (format_type_warning): Likewise.
7690 * c-common.c (int): Likewise.
7691 (check_function_sentinel): Likewise.
7692 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7693
34a180a6
MLI
76942012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7695
7696 PR c/53063
7697 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7698 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7699 Use LangEnabledBy.
7700 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7701 common.opt.
7702 (Wvariadic-macros): Init(1).
7703 * c-opts.c (c_common_handle_option): Do not handle them
7704 explicitly.
7705 (c_common_post_options): Likewise.
7706 (sanitize_cpp_opts): warn_unused_macros is now
7707 cpp_warn_unused_macros.
7708 (push_command_line_include): Likewise.
7709 * c-common.c (warn_unknown_pragmas): Do not define.
7710 * c-common.h (warn_unknown_pragmas): Do not declare.
7711
3f46d6a5
MLI
77122012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7713
7714 PR c/51294
7715 * c-common.c (conversion_warning): Handle conditional expressions.
7716
880661a4
JW
77172012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7718
7719 PR c++/54930
7720 * c.opt (Wreturn_local_addr): Define new option.
7721
4514a96b
JM
77222012-10-25 Jason Merrill <jason@redhat.com>
7723
f14edc1a
JM
7724 * c.opt (Wvirtual-move-assign): New.
7725
4514a96b
JM
7726 * c.opt (Winherited-variadic-ctor): New.
7727
93100c6b
MG
77282012-10-25 Marc Glisse <marc.glisse@inria.fr>
7729
7730 PR c++/54427
7731 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7732
1efcb8c6
JM
77332012-10-23 Joseph Myers <joseph@codesourcery.com>
7734
7735 * c-common.h (pch_cpp_save_state): Declare.
7736 * c-target.def (c_preinclude): New hook.
7737 * c-opts.c (done_preinclude): New.
7738 (push_command_line_include): Handle default preincluded header.
7739 (cb_file_change): Call pch_cpp_save_state when calling
7740 push_command_line_include.
7741 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7742 (pch_cpp_save_state): New.
7743 (pch_init): Call pch_cpp_save_state conditionally, instead of
7744 calling cpp_save_state.
7745
4a0ae68e
MLI
77462012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7747
7748 PR c/53063
7749 PR c/40989
7750 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7751 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7752 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7753 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7754 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7755 * c-opts.c (c_common_handle_option): Remove explicit handling from
7756 here.
7757 (c_common_post_options): Likewise.
7758
67e4210b
EB
77592012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7760
7761 * c-ada-spec.c (LOCATION_COL): Delete.
7762 (compare_location): New function.
7763 (compare_node): Use it.
7764 (compare_comment): Likewise.
7765
65d4f2cd
MLI
77662012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7767
7768 PR c/53063
7769 PR c/40989
7770 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7771 * c-opts.c (c_common_handle_option): Do not set them here. Add
7772 comment.
7773 (c_common_post_options): Likewise.
7774
909881cb
EB
77752012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7776
7777 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7778 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7779 Remove POINTER_TYPE handling, add large unsigned handling and use
7780 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7781
3a785c97
JJ
77822012-10-12 Jakub Jelinek <jakub@redhat.com>
7783
7784 PR c/54381
7785 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7786 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7787 locs and array of 3 trees instead of just single loc and single
7788 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7789 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7790 For *cmp* builtins that take two sources strings report warnings
7791 about first and second source, not about destination and source.
7792
5e54f81d
MG
77932012-10-12 Marc Glisse <marc.glisse@inria.fr>
7794
7795 PR c++/53055
7796 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7797
f5b02f1e
EB
77982012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7799
7800 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7801 declaring something coming from another file.
7802
b46dbc6c
AC
78032012-10-10 Arnaud Charlet <charlet@adacore.com>
7804
f5b02f1e 7805 PR ada/54845
b46dbc6c
AC
7806 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7807
5d9de0d0
PC
78082012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7809
7810 PR c++/54194
7811 * c-common.c (warn_about_parentheses): Add location_t parameter;
7812 use EXPR_LOC_OR_LOC.
7813 * c-common.h: Update declaration.
7814
a212e43f
MG
78152012-10-09 Marc Glisse <marc.glisse@inria.fr>
7816
7817 PR c++/54427
7818 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7819 more operations. Make error messages optional.
7820 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7821 (scalar_to_vector): Declare.
7822
b1db7f91
JM
78232012-10-08 Jason Merrill <jason@redhat.com>
7824
7825 * c-common.c (c_common_reswords): Add thread_local.
7826
e28d52cf
DS
78272012-10-08 Dodji Seketeli <dodji@redhat.com>
7828
7829 PR c++/53528 C++11 attribute support
7830 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7831 new functions.
7832 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7833 static function.
7834 (handle_aligned_attribute): In choose strictest alignment
7835 among many. Use new check_cxx_fundamental_alignment_constraints.
7836 (handle_transparent_union_attribute): In c++11 attribute syntax,
7837 don't look through typedefs.
7838
3b78de56
AC
78392012-10-04 Arnaud Charlet <charlet@adacore.com>
7840
7841 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7842 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7843 out of dumpfile.h.
7844
6040bb5f
DC
78452012-09-25 Dehao Chen <dehao@google.com>
7846
7847 PR middle-end/54645
3b78de56 7848 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7849 map when read in the pch.
7850
3f8257db 78512012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7852
7853 * c-ada-spec.c: Style fixes.
7854
3f8257db 78552012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7856
7857 * c.opt (-fada-spec-parent): Define new command line switch.
7858 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7859 is specified, generate binding spec as a child of the specified unit.
7860
0ccb505d
PC
78612012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7862 Manuel López-Ibáñez <manu@gcc.gnu.org>
7863
7864 PR c++/53210
7865 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7866
c583af79
AC
78672012-08-23 Arnaud Charlet <charlet@adacore.com>
7868
7869 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7870 for pointers, and add missing Convention C pragma.
7871 (print_ada_struct_decl): Add missing aliased keyword.
7872 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7873
1a4049e7
JJ
78742012-08-17 Jakub Jelinek <jakub@redhat.com>
7875
7876 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7877 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7878 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7879 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7880 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7881
70b5e7dc
RG
78822012-08-10 Richard Guenther <rguenther@suse.de>
7883
7884 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7885
f8923f7e
SB
78862012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7887
7888 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7889 instead of separate pp_newline and pp_flush.
7890 (print_c_tree): Likewise.
7891
e45abe1f
RH
78922012-07-26 Richard Henderson <rth@redhat.com>
7893
7894 * c-common.c (handle_hot_attribute): Allow labels.
7895 (handle_cold_attribute): Likewise.
7896
332f1d24
JJ
78972012-07-20 Jakub Jelinek <jakub@redhat.com>
7898
7899 PR c++/28656
7900 * c-common.c (check_function_nonnull): Handle multiple nonnull
7901 attributes properly.
7902
7ee2468b
SB
79032012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7904
7905 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7906 * c-ada-spec.c: Likewise.
7907 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7908
ee7b28eb
SB
79092012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7910
7911 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7912 Remove code conditional on it.
7913
6bdf3519
SB
79142012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7915
7916 * c-gimplify.c: Do not include basic-block.h.
7917 * c-common.c: Do not include linfuncs.h.
7918
532aafad
SB
79192012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7920
7921 * c-common.h: Include tree.h.
7922
8d0d1915
JM
79232012-07-02 Jason Merrill <jason@redhat.com>
7924
7925 PR c++/53524
7926 * c-common.c (get_priority): Call default_conversion.
7927
fbc873ad
UB
79282012-07-01 Uros Bizjak <ubizjak@gmail.com>
7929
7930 * c-pch.c (c_common_write_pch): Remove unused variables.
7931
d4a10d0a
SB
79322012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7933
7934 * cppspec.c: Moved from gcc/ to here.
7935
6f3a2e23
KT
79362012-06-27 Kai Tietz <ktietz@redhat.com>
7937
7938 PR preprocessor/37215
7939 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7940
8ca92d04
SB
79412012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7942
7943 * c-common.h (c_common_print_pch_checksum): Remove.
7944 * c-pch.c: Do not include output.h.
7945 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7946 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7947 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7948 (struct c_pch_header): Remove.
7949 (get_ident): Update gpch version.
7950 (pch_init): Do not print executable_checksum to asm_out_file.
7951 Do not fail if there is no asm_out_file to read back from. Set
7952 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7953 (c_common_write_pch): Verify that nothing was written to asm_out_file
7954 since pch_init was called. Do not write a c_pch_header, and do not
7955 copy from asm_out_file to the PCH.
7956 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7957 the content of asm_out_file from the PCH.
7958 (c_common_print_pch_checksum): Remove.
7959 * c-opts.c (c_common_init): Print out executable_checksum directly.
7960
70f42967
SB
79612012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7962
7963 * c-target.def (objc_declare_unresolved_class_reference,
7964 objc_declare_class_definition): Add new hooks.
7965
a8781821
SB
79662012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7967
7968 * c-lex.c: Do not include output.h.
7969 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7970 Remove uses of ASM_OUTPUT_IDENT.
7971
9e1a8dd1
RR
79722012-06-15 Marc Glisse <marc.glisse@inria.fr>
7973
7974 PR c++/51033
7975 * c-common.h (c_build_vec_perm_expr): Move decl here.
7976 * c-common.c (c_build_vec_perm_expr): Move definition
7977 here.
7978
6f07a821
SB
79792012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7980
7981 * c.opt (fconserve-space): Turn into a no-op.
7982
9faeb493 79832012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
7984
7985 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7986 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7987 both the start and end of the function.
7988
a4b7d13c
SB
79892012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7990
7991 * c-common.c: Do not include output.h.
7992 * c-pragma.c: Likewise.
7993
c265f413
SA
79942012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7995
7996 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7997 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7998 (lang_decl_name): Handle namespace decls.
7999
be7a421e
SB
80002012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8001
8002 * c-ada-spec.c: Do not include output.h.
8003 * c-semantics.c: Likewise.
8004
65de6659
JM
80052012-05-29 Joseph Myers <joseph@codesourcery.com>
8006
8007 * c-common.c: Fix typo.
8008
ca5f4331
MM
80092012-05-29 Michael Matz <matz@suse.de>
8010
8011 * c-common.h (c_expand_decl): Remove prototype.
8012
4f7f7aca
MLI
80132012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8014
8015 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8016 * c-opts.c (c_common_handle_option): Remove code handling
8017 warn_missing_braces.
8018
4a792f9b
PC
80192012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8020
8021 PR c++/25137
8022 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8023 -Wmissing_braces.
8024
650dc14a
DS
80252012-05-22 Dodji Seketeli <dodji@redhat.com>
8026
8027 PR c++/53322
8028 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8029
9b095bf1
MLI
80302012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8031
8032 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8033 * c-opts.c (c_common_handle_option): Do not handle explicitly
8034 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8035
0b2c4be5
DS
80362012-05-16 Dodji Seketeli <dodji@redhat.com>
8037
8038 PR preprocessor/7263
8039 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8040 to cpp_classify_number. For diagnostics, use the precise location
8041 instead of the global input_location.
8042
a1bde5af
PC
80432012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8044
d02924ef 8045 PR c++/11856
a1bde5af
PC
8046 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8047
d1ede5f4
BS
80482012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8049
a1bde5af 8050 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8051
f2bc201f
MLI
80522012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8053
8054 PR 53063
8055 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8056 Wreorder): Use LangEnabledBy.
8057 * c-opts.c (c_common_handle_option): Do not enable them
8058 explicitly. Call lang-specific generated functions.
8059 (c_common_post_options): Do not set them here.
8060
95744782
MLI
80612012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8062
8063 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8064 Wmissing-field-initializers,Wmissing-parameter-type,
8065 Wold-style-declaration,Woverride-init): Use EnabledBy.
8066 * c-opts.c (c_common_post_options): Do not set here explicitly.
8067
7d5a5747
MLI
80682012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8069
8070 PR 53063
8071 * c-opts.c (c_common_handle_option): Use handle_generated_option
8072 to enable sub-options.
8073
5a3c9cf2
PC
80742012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8075
8076 PR c++/53158
8077 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8078
3ac8781c
RG
80792012-05-10 Richard Guenther <rguenther@suse.de>
8080
8081 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8082 adjust commentary about TYPE_IS_SIZETYPE types.
8083
1e537948
MLI
80842012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8085
8086 PR c++/53261
8087 * c-common.c (warn_logical_operator): Check that argument of
8088 integer_zerop is not NULL.
8089
f2c4a785
MLI
80902012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8091
8092 PR c/43772
8093 * c-common.c (warn_logical_operator): Do not warn if either side
8094 is already true or false.
8095
50f305ca
MLI
80962012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8097
8098 PR c/51712
8099 * c-common.c (expr_original_type): New.
8100 (shorten_compare): Do not warn for enumeration types.
8101
0c3641b0
MLI
81022012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8103
8104 * c.opt (fpermissive): Add Var(flag_permissive).
8105
7edaa4d2
MG
81062012-04-30 Marc Glisse <marc.glisse@inria.fr>
8107
8108 PR c++/51033
8109 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8110 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8111
b9c8da34
DS
81122012-04-30 Dodji Seketeli <dodji@redhat.com>
8113
8114 Add -Wvarargs option
8115 * c.opt (Wvarargs): Define new option.
8116
e6c69da0
MLI
81172012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8118
8119 * c-common.c (check_function_arguments): Replace
8120 Wmissing-format-attribute with Wsuggest-attribute=format.
8121
90137d8f
MLI
81222012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8123
8124 * c.opt (Wsuggest-attribute=format): New. Alias of
8125 Wmissing-format-attribute.
8126 * c-format.c (decode_format_type): Replace
8127 Wmissing-format-attribute with Wsuggest-attribute=format.
8128 (check_function_format): Likewise.
8129
9faeb493 81302012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8131
8132 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8133 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8134 * c.opt: Add Wliteral-suffix.
8135
c1771a20
MLI
81362012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8137
8138 PR c/44774
8139 * c.opt (Wpedantic): New.
8140 (pedantic): Alias Wpedantic.
8141 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8142 (c_common_post_options): Likewise.
8143 (sanitize_cpp_opts): Likewise.
8144 * c-lex.c (interpret_float): Likewise.
8145 * c-format.c (check_format_types): Likewise.
8146 * c-common.c (pointer_int_sum): Likewise.
8147 (c_sizeof_or_alignof_type): Likewise.
8148 (c_add_case_label): Likewise.
8149 (c_do_switch_warnings): Likewise.
8150 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8151
04b391c1
JM
81522012-04-15 Jason Merrill <jason@redhat.com>
8153
8154 PR c++/52818
8155 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8156 (C_STD_NAME): Distinguish between C++98 and C++11.
8157
ac868f29
EB
81582012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8159
8160 PR target/52624
8161 * c-common.h (uint16_type_node): Rename into...
8162 (c_uint16_type_node): ...this.
8163 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8164 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8165
fd4116f4
MLI
81662012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8167
8168 * c-common.c (warn_if_unused_value): Move definition to here.
8169 * c-common.h (warn_if_unused_value): Move declaration to here.
8170
573ac65e
WB
81712012-03-23 William Bader <williambader@hotmail.com>
8172
8173 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8174
552b8185
JM
81752012-03-20 Jason Merrill <jason@redhat.com>
8176
8177 * c-common.h (enum cxx_dialect): Add cxx1y.
8178 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8179 test.
8180 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8181 * c-opts.c (c_common_post_options): Likewise.
8182 (set_std_cxx1y): New.
8183 (c_common_handle_option): Call it.
8184 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8185
04398fa8
PC
81862012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8187
8188 PR c++/14710
8189 * c.opt ([Wuseless-cast]): Add.
8190
d2a12ae7
RG
81912012-03-16 Richard Guenther <rguenther@suse.de>
8192
8193 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8194
a12bf402
MLI
81952012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8196
8197 PR c++/44783
8198 * c.opt (ftemplate-backtrace-limit) Add.
8199
5c30094f
RO
82002012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8201
8202 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8203 handling.
8204 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8205 (init_pragma): Don't register extern_prefix.
8206
21fa2faf
RG
82072012-03-12 Richard Guenther <rguenther@suse.de>
8208
8209 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8210 (builtin_type_for_size): Likewise.
8211
e3793c6f
JJ
82122012-02-13 Jakub Jelinek <jakub@redhat.com>
8213
8214 PR c++/52215
8215 * c-common.c (sync_resolve_params): Don't decide whether to convert
8216 or not based on TYPE_SIZE comparison, convert whenever arg_type
8217 is unsigned INTEGER_TYPE.
8218
93286335
PC
82192012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8220
8221 PR c/52118
8222 * c.opt ([Wunused-local-typedefs]): Fix description.
8223
7a421706
MS
82242012-01-24 Mike Stump <mikestump@comcast.net>
8225
8226 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8227 exactly.
8228
ba9b1f11
RG
82292012-01-18 Richard Guenther <rguenther@suse.de>
8230
8231 * c-opts.c (c_common_post_options): Reset LTO flags if
8232 we are about to generate a PCH.
8233
465406be
PC
82342012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8235
8236 PR c++/51777
8237 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8238 use pp_unsigned_wide_integer.
8239
aee15221
RG
82402012-01-10 Richard Guenther <rguenther@suse.de>
8241
8242 PR middle-end/51806
8243 * c-opts.c (c_common_handle_option): Move -Werror handling
8244 to language independent code.
8245
5720c0dc
RG
82462012-01-05 Richard Guenther <rguenther@suse.de>
8247
8248 PR middle-end/51764
8249 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8250 from common.opt.
8251
73ac190a
PC
82522011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8253
8254 PR c++/51316
8255 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8256 of array types with an unknown bound.
8257
48b0b196
JM
82582011-12-20 Joseph Myers <joseph@codesourcery.com>
8259
8260 * c-common.c (flag_isoc99): Update comment to refer to C11.
8261 (flag_isoc1x): Change to flag_isoc11.
8262 * c-common.h (flag_isoc99): Update comment to refer to C11.
8263 (flag_isoc1x): Change to flag_isoc11.
8264 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8265 C11.
8266 * c-opts.c (set_std_c1x): Change to set_std_c11.
8267 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8268 Call set_std_c11.
8269 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8270 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8271 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8272 standard.
8273 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8274 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8275 (std=gnu1x): Make alias of std=gnu11.
8276
d58d6eb5
JM
82772011-12-19 Jason Merrill <jason@redhat.com>
8278
8279 PR c++/51228
8280 * c-common.c (handle_transparent_union_attribute): Check the first
8281 field if the type is complete.
8282
b3908fcc
JW
82832011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8284
8285 PR libstdc++/51365
8286 * c-common.c (RID_IS_FINAL): Add.
8287 * c-common.h (RID_IS_FINAL): Add.
8288
fea3ca91
IS
82892011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8290
8291 * c.opt (fgnu-runtime): Provide full description.
8292 (fnext-runtime): Likewise.
8293 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8294
62bad7cd
AM
82952011-11-28 Andrew MacLeod <amacleod@redhat.com>
8296
8297 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8298 predefines in one place. Add LOCK_FREE predefines.
8299 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8300 new func.
8301
c466c4ff
AM
83022011-11-24 Andrew MacLeod <amacleod@redhat.com>
8303
8304 PR c/51256
9faeb493 8305 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8306 conditions
9faeb493
UB
8307 (resolve_overloaded_atomic_exchange,
8308 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8309 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8310 error_mark_node for error conditions.
9faeb493 8311
a5952633
RG
83122011-11-08 Richard Guenther <rguenther@suse.de>
8313
8314 PR middle-end/51010
8315 c-family/
8316
0a35513e
AH
83172011-11-07 Richard Henderson <rth@redhat.com>
8318 Aldy Hernandez <aldyh@redhat.com>
8319 Torvald Riegel <triegel@redhat.com>
8320
8321 Merged from transactional-memory.
8322
8323 * c-common.c (handle_tm_wrap_attribute,
8324 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8325 (struct c_common_reswords): Added __transaction* keywords.
8326 (struct c_common_attribute_table): Added transaction* and tm_regparm
8327 attributes.
8328 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8329 masks.
8330 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8331 find_tm_attribute): Declare.
8332
6d87092d
JM
83332011-11-07 Jason Merrill <jason@redhat.com>
8334
8335 PR c++/35688
8336 * c-common.c, c-common.h: Revert yesterday's changes.
8337
8e7860a1
JM
83382011-11-06 Jason Merrill <jason@redhat.com>
8339
8340 PR c++/35688
8341 * c-common.c (decl_has_visibility_attr): Split out from...
8342 (c_determine_visibility): ...here.
8343 * c-common.h: Declare it.
8344
d19fa6b5
JM
83452011-11-06 Joseph Myers <joseph@codesourcery.com>
8346
8347 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8348 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8349 type.
8350 (check_user_alignment): New. Split out of
8351 handle_aligned_attribute. Disallow integer constants with
8352 noninteger types. Conditionally allow zero.
8353 (handle_aligned_attribute): Use check_user_alignment.
8354 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8355
86951993
AM
83562011-11-06 Andrew MacLeod <amacleod@redhat.com>
8357 Richard Henderson <rth@redhat.com>
8358
8359 Merged from cxx-mem-model.
8360
8361 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8362 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8363 parameters that are the same type size.
8364 (get_atomic_generic_size): New. Find size of generic
8365 atomic function parameters and do typechecking.
8366 (add_atomic_size_parameter): New. Insert size into parameter list.
8367 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8368 either __atomic_exchange_n or external library call.
9faeb493 8369 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8370 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8371 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8372 __atomic_load_n or an external library call.
8373 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8374 __atomic_store_n or an external library call.
8375 (resolve_overloaded_builtin): Handle new __atomic builtins.
8376
cf9e9959
EB
83772011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8378
8379 PR c++/50608
8380 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8381 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8382 <INDIRECT_REF>: Return the argument.
8383 <ARRAY_REF>: Remove special code for negative offset.
8384 Call fold_build_pointer_plus instead of size_binop.
8385 (fold_offsetof): Remove STOP_REF argument and adjust.
8386 * c-common.h (fold_offsetof_1): Declare.
8387 (fold_offsetof): Remove STOP_REF argument.
8388
25339f10
JM
83892011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8390
8391 PR c++/50810
8392 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8393 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8394 Wnarrowing for C++0x and C++98.
8395 * c.opt ([Wnarrowing]): Update.
8396
89401152
PC
83972011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8398
8399 PR c++/44277
8400 * c.opt: Add Wzero-as-null-pointer-constant.
8401
97e3ad20
JM
84022011-10-31 Jason Merrill <jason@redhat.com>
8403
15694fdd
JM
8404 * c.opt (-fdeduce-init-list): Off by default.
8405
97e3ad20
JM
8406 PR c++/50920
8407 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8408 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8409 and -Wc++11-compat.
8410 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8411
fb9120e3
RAV
84122011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8413
8414 PR c++/30066
8415 * c.opt (fvisibility-inlines-hidden): Description change.
8416
3ce4f9e4
ESR
84172011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8418
8419 Implement C++11 user-defined literals.
8420 * c-common.c (build_userdef_literal): New.
8421 * c-common.def: New tree code.
8422 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8423 * c-lex.c (interpret_float): Add suffix parm.
8424 (c_lex_with_flags): Build literal tokens.
8425
5f53c243
PC
84262011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8427
8428 PR c++/50841
8429 Revert:
8430 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8431
8432 PR c++/50810
8433 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8434 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8435 Wnarrowing for C++0x and C++98.
8436 * c.opt ([Wnarrowing]): Update.
8437
263734e1
PC
84382011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8439
8440 PR c++/50810
8441 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8442 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8443 Wnarrowing for C++0x and C++98.
8444 * c.opt ([Wnarrowing]): Update.
8445
d2e312d7
PC
84462011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8447
8448 PR c++/45385
8449 * c-common.c (conversion_warning): Remove code looking for
8450 artificial operands.
8451
d17687f6
DS
84522011-10-18 Dodji Seketeli <dodji@redhat.com>
8453
8454 PR bootstrap/50760
8455 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8456 !NO_IMPLICIT_EXTERN_C.
d17687f6 8457
fc8396e9
PC
84582011-10-17 Michael Spertus <mike_spertus@symantec.com>
8459
8460 * c-common.c (c_common_reswords): Add __bases,
8461 __direct_bases.
8462 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8463
84642011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8465
8466 PR c++/50757
8467 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8468
847e697a
TT
84692011-10-15 Tom Tromey <tromey@redhat.com>
8470 Dodji Seketeli <dodji@redhat.com>
8471
8472 * c.opt (fdebug-cpp): New option.
8473 * c-opts.c (c_common_handle_option): Handle the option.
8474 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8475 output stream in parameter. Factorized from ...
8476 (maybe_print_line): ... this. Dump location debug information when
8477 -fdebug-cpp is in effect.
8478 (print_line_1): New static function. Takes an output stream in
8479 parameter. Factorized from ...
8480 (print_line): ... here. Dump location information when -fdebug-cpp
8481 is in effect.
8482 (scan_translation_unit): Dump location information when
8483 -fdebug-cpp is in effect.
8484
92582b75
TT
84852011-10-15 Tom Tromey <tromey@redhat.com>
8486 Dodji Seketeli <dodji@redhat.com>
8487
8488 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8489 without argument.
8490 * c-opts.c (c_common_handle_option)<case
8491 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8492 cases. Handle -ftrack-macro-expansion with and without argument.
8493
46427374
TT
84942011-10-15 Tom Tromey <tromey@redhat.com>
8495 Dodji Seketeli <dodji@redhat.com>
8496
8497 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8498 (print_line, cb_define, do_line_change): Adjust to avoid touching
8499 the internals of struct line_map. Use the public API instead.
8500 * c-pch.c (c_common_read_pch): Likewise.
8501 * c-lex.c (fe_file_change): Likewise.
8502
fc8396e9
PC
85032011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8504
8505 PR c++/17212
8506 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8507
85082011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8509
8510 PR c++/33067
8511 * c-pretty-print.c (pp_c_floating_constant): Output
8512 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8513
e79983f4
MM
85142011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8515
8516 * c-common.c (def_builtin_1): Delete old interface with two
8517 parallel arrays to hold standard builtin declarations, and replace
8518 it with a function based interface that can support creating
8519 builtins on the fly in the future. Change all uses, and poison
8520 the old names. Make sure 0 is not a legitimate builtin index.
8521 * c-omp.c (c_finish_omp_barrier): Ditto.
8522 (c_finish_omp_taskwait): Ditto.
8523 (c_finish_omp_flush): Ditto.
8524
6637388f
TG
85252011-10-11 Tristan Gingold <gingold@adacore.com>
8526
8527 * c.opt: (fallow-parameterless-variadic-functions): New.
8528
3797cb21
DS
85292011-09-08 Dodji Seketeli <dodji@redhat.com>
8530
8531 PR c++/33255 - Support -Wunused-local-typedefs warning
8532 * c-common.h (struct c_language_function::local_typedefs): New
8533 field.
9faeb493
UB
8534 (record_locally_defined_typedef, maybe_record_typedef_use)
8535 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8536 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8537 (maybe_record_typedef_use)
8538 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8539 * c.opt: Declare new -Wunused-local-typedefs flag.
8540
693ddb1b
EB
85412011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8542
8543 PR middle-end/50266
8544 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8545 computations.
8546
830c740f
RG
85472011-09-05 Richard Guenther <rguenther@suse.de>
8548
8549 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8550 of integer_minus_one_node for empty array upper bounds.
8551
892a371f
DS
85522011-08-28 Dodji Seketeli <dodji@redhat.com>
8553
8554 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8555 it's the first time it's being called on this main TU.
8556
0e3fdb48
RB
85572011-08-24 Richard Guenther <rguenther@suse.de>
8558
8559 PR c/49396
8560 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8561
85622011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8563
8564 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8565 defined in cpp_init_builtins and c_cpp_builtins.
8566
d4a83c10
JM
85672011-08-19 Joseph Myers <joseph@codesourcery.com>
8568
8569 * c-common.c (c_common_reswords): Add __builtin_complex.
8570 * c-common.h (RID_BUILTIN_COMPLEX): New.
8571
bbceee64
JM
85722011-08-18 Joseph Myers <joseph@codesourcery.com>
8573
8574 * c-common.c (c_common_reswords): Add _Noreturn.
8575 (keyword_is_function_specifier): Handle RID_NORETURN.
8576 * c-common.h (RID_NORETURN): New.
8577
3f8257db 85782011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8579
8580 * c-common.c (unsafe_conversion_p): New function. Check if it is
8581 unsafe to convert an expression to the type.
8582 (conversion_warning): Adjust, use unsafe_conversion_p.
8583 * c-common.h (unsafe_conversion_p): New function declaration.
8584
20906c66
JJ
85852011-08-02 Jakub Jelinek <jakub@redhat.com>
8586
8587 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8588 (c_finish_omp_taskyield): New prototype.
8589 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8590 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8591 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8592 or RHS1 have side-effects, evaluate those too in the right spot,
8593 if it is a decl and LHS is also a decl, error out if they
8594 aren't the same.
8595 (c_finish_omp_taskyield): New function.
8596 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8597 * c-pragma.c (omp_pragmas): Add taskyield.
8598 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8599 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8600 PRAGMA_OMP_CLAUSE_MERGEABLE.
8601
770e5a2e
DS
86022011-07-25 Dodji Seketeli <dodji@redhat.com>
8603
8604 * c-common.h (set_underlying_type): Remove parm name from
8605 declaration.
8606
1baae426
RG
86072011-07-25 Romain Geissler <romain.geissler@gmail.com>
8608
8609 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8610
fcb21722
JM
86112011-07-22 Jason Merrill <jason@redhat.com>
8612
76f86d00
JM
8613 PR c++/49793
8614 * c.opt (Wnarrowing): New.
8615
3a636414
JM
8616 PR c++/30112
8617 * c-common.h: Declare c_linkage_bindings.
8618 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8619
fcb21722
JM
8620 PR c++/49813
8621 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8622 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8623 as flag_isoc99 for 'restrict'.
8624 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8625
02614448
ILT
86262011-07-21 Ian Lance Taylor <iant@google.com>
8627
8628 PR middle-end/49705
8629 * c-common.c (c_disable_warnings): New static function.
8630 (c_enable_warnings): New static function.
8631 (c_fully_fold_internal): Change local unused_p to bool. Call
8632 c_disable_warnings and c_enable_warnings rather than change
8633 c_inhibit_evaluation_warnings.
8634
34429675
JM
86352011-07-20 Jason Merrill <jason@redhat.com>
8636
8637 PR c++/6709 (DR 743)
8638 PR c++/42603 (DR 950)
8639 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8640 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8641 (CPP_DECLTYPE): New.
8642 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8643
5d49b6a7
RG
86442011-07-19 Richard Guenther <rguenther@suse.de>
8645
8646 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8647 * c-omp.c (c_finish_omp_for): Likewise.
8648
e84a58ff
EB
86492011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8650
8651 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8652 body on the next line.
8653
329af3c7
JM
86542011-07-08 Jason Merrill <jason@redhat.com>
8655
4063e61b
JM
8656 PR c++/45437
8657 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8658
329af3c7
JM
8659 PR c++/49673
8660 * c-common.c (c_apply_type_quals_to_decl): Don't check
8661 TYPE_NEEDS_CONSTRUCTING.
8662
1a072294
RG
86632011-07-06 Richard Guenther <rguenther@suse.de>
8664
8665 * c-common.c (c_common_nodes_and_builtins):
8666 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8667
fce5dddd
RG
86682011-07-05 Richard Guenther <rguenther@suse.de>
8669
8670 * c-common.c (c_common_nodes_and_builtins): Build all common
8671 tree nodes first.
8672
45d439ac
JJ
86732011-06-27 Jakub Jelinek <jakub@redhat.com>
8674
56300785
JJ
8675 * c-common.h (c_tree_chain_next): New static inline function.
8676
45d439ac
JJ
8677 * c-common.c (check_builtin_function_arguments): Handle
8678 BUILT_IN_ASSUME_ALIGNED.
8679
e0a8ecf2
AM
86802011-06-21 Andrew MacLeod <amacleod@redhat.com>
8681
8682 * c-common.c: Add sync_ or SYNC__ to builtin names.
8683 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8684
86852011-06-20 Pierre Vittet <piervit@pvittet.com>
8686
8687 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8688 handler.
8689 (gen_pragma_handler): New union.
8690 (internal_pragma_handler): New type.
8691 (c_register_pragma_with_data)
8692 (c_register_pragma_with_expansion_and_data): New functions.
8693
8694 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8695 (c_register_pragma, c_register_pragma_with_expansion)
8696 (c_invoke_pragma_handler): Changed to work with
8697 internal_pragma_handler.
8698 (c_register_pragma_with_data)
8699 (c_register_pragma_with_expansion_and_data): New functions.
8700
677f3fa8
JM
87012011-06-14 Joseph Myers <joseph@codesourcery.com>
8702
8703 * c-common.c: Include common/common-target.h.
8704 (handle_section_attribute): Use
8705 targetm_common.have_named_sections.
8706 * c-cppbuiltin.c: Include common/common-target.h.
8707 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8708
d7fc8c14
RG
87092011-06-10 Richard Guenther <rguenther@suse.de>
8710
8711 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8712 to print a IDENTIFIER_NODE.
8713
10e48e39
RO
87142011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8715 Joseph Myers <joseph@codesourcery.com>
8716
8717 * c.opt (fbuilding-libgcc): New option.
8718 * c-cppbuiltin.c (c_cpp_builtins): Define
8719 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8720
6976ae51
JM
87212011-06-07 Jason Merrill <jason@redhat.com>
8722
3ff60975
JM
8723 * c-common.c (max_tinst_depth): Lower default to 900.
8724
6976ae51
JM
8725 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8726
009db074
RG
87272011-06-07 Richard Guenther <rguenther@suse.de>
8728
8729 * c-common.c (c_common_nodes_and_builtins): Do not set
8730 size_type_node or call set_sizetype.
8731
b4592b92
DS
87322011-06-07 Dodji Seketeli <dodji@redhat.com>
8733
8734 PR debug/49130
8735 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8736 type when using pointer comparison to compare types.
b4592b92 8737
014ab419
JW
87382011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8739
8740 * c.opt: Add -Wdelete-non-virtual-dtor.
8741 * c-opts.c (c_common_handle_option): Include it in -Wall.
8742
4f60111f
NF
87432011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8744
8745 PR bootstrap/49190
8746
8747 Revert:
8748 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8749
8750 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8751 not tree_common.
8752
4cc4f2f4
JJ
87532011-05-27 Jakub Jelinek <jakub@redhat.com>
8754
8755 PR c++/49165
8756 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8757 C++ don't call c_common_truthvalue_conversion on void type arms.
8758
38e01f9e
NF
87592011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8760
8761 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8762 (stmt_list_stack): Define.
8763 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8764 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8765
92e948a8
NF
87662011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8767
8768 * c-common.c (warning_candidate_p): Check for BLOCKs.
8769
a2fc3e63
NF
87702011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8771
8772 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8773 not tree_common.
8774
0957c029
JJ
87752011-05-25 Jakub Jelinek <jakub@redhat.com>
8776
8777 * c-common.c (def_fn_type): Remove extra va_end.
8778
828fb3ba
JM
87792011-05-23 Jason Merrill <jason@redhat.com>
8780
8781 PR c++/48106
8782 * c-common.c (c_common_get_narrower): New.
8783 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8784
dde05067
NF
87852011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8786
8787 * c-common.h (check_function_arguments): Tweak prototype of
8788 check_function_arguments.
8789 * c-common.c (check_function_arguments): Likewise. Adjust
8790 calls to check_function_nonnull, check_function_format, and
8791 check_function_sentinel.
8792 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8793 separate attributes and typelist arguments. Use
8794 FOREACH_FUNCTION_ARGS to iterate over argument types.
8795
3c0d13bf
PC
87962011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8797
8798 * c-common.c (c_common_reswords): Reorder.
8799 * c-common.h (rid): Likewise.
8800
8242dd04
NF
88012011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8802
8803 * c-common.c (def_fn_type): Don't call build_function_type, call
8804 build_function_type_array or build_varargs_function_type_array
8805 instead.
8806 (c_common_nodes_and_builtins): Likewise.
8807
3d528853
NF
88082011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8809
8810 * c-common.c (c_add_case_label): Omit the loc argument to
8811 build_case_label.
8812 * c-common.h (build_case_label): Remove.
8813 * c-semantics.c (build_case_label): Remove.
8814
a04a722b
JM
88152011-05-05 Joseph Myers <joseph@codesourcery.com>
8816
8817 * c-objc.h (objc_start_method_definition): Update prototype.
8818 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8819
e19a18d4
NF
88202011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8821
8822 * c-common.c (check_main_parameter_types): Reindent. Don't use
8823 TYPE_ARG_TYPES directly.
8824 (handle_nonnull_attribute): Likewise.
8825 (sync_resolve_params): Likewise.
8826 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8827 to check_format_string.
8828 (handle_format_attribute): Likewise.
8829 (check_format_string): Take a function type to examine instead of
8830 a type list. Use a function_arg_iterator to step through argument
8831 types.
8832
c62c040f
RG
88332011-05-04 Richard Guenther <rguenther@suse.de>
8834
8835 * c-common.c (fix_string_type): Use size_int for index type bounds.
8836 (start_fname_decls): Do not pass NULL to build_int_cst.
8837 (c_init_attributes): Likewise.
8838 * c-lex.c (c_lex_with_flags): Likewise.
8839
c12ff9d8
JM
88402011-04-27 Jason Merrill <jason@redhat.com>
8841
8842 * c-common.c (make_tree_vector_from_list): New.
8843 * c-common.h: Declare it.
8844
304dfbe3
RG
88452011-04-26 Richard Guenther <rguenther@suse.de>
8846
8847 PR preprocessor/48248
8848 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8849 for output size with -P.
8850
3c0d13bf
PC
88512011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8852
8853 * c-common.c (struct c_common_resword): Add __underlying_type.
8854 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8855
04695783
JM
88562011-04-20 Jim Meyering <meyering@redhat.com>
8857
8858 * c-format.c (init_dollar_format_checking): Remove useless
8859 if-before-free.
8860
0dc33c3c
NP
88612011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8862
8863 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8864 (objc_detect_field_duplicates): New.
0dc33c3c 8865 * stub-objc.c: Likewise.
3c0d13bf 8866
c59633d9
NP
88672011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8868
8869 * stub-objc.c (objc_declare_protocols): Renamed to
8870 objc_declare_protocol.
8871 * c-objc.h: Likewise.
3c0d13bf 8872
32dabdaf
NP
88732011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8874
8875 * stub-objc.c (objc_declare_class): Updated argument name.
8876
81f653d6
NF
88772011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8878
8879 * c-common.h (c_common_init_ts): Declare.
8880 * c-common.c (c_common_init_ts): Define.
8881
eb345401
NP
88822011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8883
8884 * c-objc.h (objc_build_message_expr): Updated prototype.
8885 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8886
a358e188
MJ
88872011-04-12 Martin Jambor <mjambor@suse.cz>
8888
8889 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8890 of cgraph_node.
8891
e6313a78
RG
88922011-04-11 Richard Guenther <rguenther@suse.de>
8893
8894 * c-common.c (complete_array_type): Build a range type of
8895 proper type.
8896
dcf0c47e
NF
88972011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8898
8899 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8900 (handle_type_generic_attribute): Likewise.
8901
1ee44b26
JM
89022011-04-07 Jason Merrill <jason@redhat.com>
8903
8904 PR c++/48450
8905 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8906 conversion from C++0x scoped enum.
8907
acce4e77
JM
89082011-04-06 Joseph Myers <joseph@codesourcery.com>
8909
8910 * c-target-def.h: New file.
8911 * c-target.def: New file.
8912 * c-target.h: New file.
8913 * c-common.c (targetcm): Don't define here.
8914 * c-common.h (default_handle_c_option): Declare.
8915 * c-format.c: Include c-target.h instead of target.h.
8916 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8917 include tm.h.
8918 (default_handle_c_option): Move from targhooks.c.
8919
e2eefb55
JJ
89202011-03-29 Jakub Jelinek <jakub@redhat.com>
8921
8922 PR preprocessor/48248
8923 * c-ppoutput.c (print): Add src_file field.
8924 (init_pp_output): Initialize it.
8925 (maybe_print_line): Don't optimize by adding up to 8 newlines
8926 if map->to_file and print.src_file are different file.
8927 (print_line): Update print.src_file.
8928
ba78087b
KT
89292011-03-25 Kai Tietz <ktietz@redhat.com>
8930
8931 * c-ada-spec.c (compare_comment): Use filename_cmp
8932 instead of strcmp for filename.
8933
0edf1bb2
JL
89342011-03-25 Jeff Law <law@redhat.com>
8935
adfac8df 8936 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8937
c7dc8804
JM
89382011-03-25 Jason Merrill <jason@redhat.com>
8939
8940 * c.opt: Add -std=c++03.
8941
d1d879b1
EB
89422011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8943
8944 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8945
3f8257db 89462011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
8947
8948 PR target/12171
5050afdf
KT
8949 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8950 Display allowed attributes for function pointer types.
8951 (pp_c_attributes_display): New function to display
8952 attributes having affects_type_identity flag set to true.
8953 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8954
62d784f7
KT
8955 * c-common.c (c_common_attribute_table):
8956 Add new element.
8957 (c_common_format_attribute_table): Likewise.
8958
82d37118
JM
89592011-03-18 Jason Merrill <jason@redhat.com>
8960
49a000c3
JM
8961 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8962 * c-common.h: Don't declare it here.
8963 * c-common.c: Or define it here.
8964 * c-opts.c (c_common_handle_option): Or set it here.
8965
82d37118
JM
8966 PR c++/35315
8967 * c-common.c (handle_transparent_union_attribute): Don't
8968 make a duplicate type in C++.
8969
17bc631c
JM
89702011-03-15 Jason Merrill <jason@redhat.com>
8971
8972 * c-common.c (max_constexpr_depth): New.
8973 * c-common.h: Declare it.
8974 * c-opts.c (c_common_handle_option): Set it.
8975 * c.opt (fconstexpr-depth): New option.
8976
1b9b91a6
JM
89772011-03-11 Jason Merrill <jason@redhat.com>
8978
f231b5ff
JM
8979 * c-common.c (attribute_takes_identifier_p): Add missing const.
8980
1b9b91a6
JM
8981 PR c++/46803
8982 * c-common.c (attribute_takes_identifier_p): Assume that an
8983 unknown attribute takes an identifier.
8984
a19e4d44
NF
89852011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8986
8987 PR c/47786
8988 * c-common.c (c_type_hash): Call list_length instead of iterating
8989 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8990
982d62f6
JJ
89912011-02-19 Jakub Jelinek <jakub@redhat.com>
8992
8993 PR c/47809
8994 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8995
0a256240
NP
89962011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8997
8998 * c.opt (fobjc-abi-version=) New.
8999 (fobjc-nilcheck): New.
9000
ba9e6dd5
NF
90012011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9002
9003 PR c++/46890
9004 * c-common.h (keyword_is_decl_specifier): Declare.
9005 * c-common.c (keyword_is_decl_specifier): Define.
9006 (keyword_is_function_specifier): New function.
9007
7273813a
JJ
90082011-01-26 Jakub Jelinek <jakub@redhat.com>
9009
9010 PR c/47473
9011 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9012 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9013 REAL_TYPE.
9014
908ef79b
AC
90152011-01-26 Arnaud Charlet <charlet@adacore.com>
9016
9017 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9018
237e9384
JJ
90192011-01-26 Jakub Jelinek <jakub@redhat.com>
9020
9021 PR pch/47430
9022 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9023 after init_c_lex if pch_file is set.
9024
47ea1edf
DK
90252011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9026
d4dba752 9027 PR c++/43601
47ea1edf
DK
9028 * c.opt (-fkeep-inline-dllexport): New switch.
9029
2aa9c6ae
RG
90302011-01-12 Richard Guenther <rguenther@suse.de>
9031
9032 PR middle-end/32511
9033 * c-common.c (handle_weak_attribute): Warn instead of error
9034 on declaring an inline function weak.
9035
7bd11157
TT
90362011-01-05 Tom Tromey <tromey@redhat.com>
9037
9038 * c-common.h (lvalue_error): Update.
9039 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9040 not error.
9041
0e66e494 90422010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9043
b4f588c4
NP
9044 PR objc/47075
9045 * c-objc.h (objc_finish_message_expr): Added argument to
9046 prototype.
9047
f4da8dce
NF
90482010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9049
9050 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9051 Use prototype_p.
9052
46270f14
NP
90532010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9054
9055 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9056 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9057
4816c593
NF
90582010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9059
9060 * c-common.h (readonly_error): Declare.
9061 * c-common.c (readonly_error): Define.
9062
7a6daeb0
NF
90632010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9064
9065 * c-common.h (invalid_indirection_error): Declare.
9066 * c-common.c (invalid_indirection_error): Define.
9067
892f6119
RG
90682010-12-03 Richard Guenther <rguenther@suse.de>
9069
9070 PR c/46745
9071 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9072 (pp_c_unary_expression): Likewise.
9073 (pp_c_expression): Likewise.
9074
6c39e757
NP
90752010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9076
9077 * c-common.h (objc_finish_function): New.
9078 (objc_non_volatilized_type): Removed.
9079 (objc_type_quals_match): Removed.
9080 * stub-objc.c (objc_finish_function): New.
9081 (objc_non_volatilized_type): Removed.
9082 (objc_type_quals_match): Removed.
9faeb493 9083
7c475d11
JM
90842010-11-30 Joseph Myers <joseph@codesourcery.com>
9085
9086 * c-common.h (parse_optimize_options): Declare.
9087 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9088 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9089
71f3e391
JM
90902010-11-29 Joseph Myers <joseph@codesourcery.com>
9091
9092 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9093 GET_ENVIRONMENT.
9094 * c-pch.c (O_BINARY): Don't define here.
9095 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9096
d5fabb58
JM
90972010-11-25 Joseph Myers <joseph@codesourcery.com>
9098
9099 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9100 targetm.except_unwind_info.
9101
299404a1
JM
91022010-11-23 Joseph Myers <joseph@codesourcery.com>
9103
9104 * c-opts.c (c_common_handle_option): Pass location to
9105 set_struct_debug_option.
9106
c98cd5bf
JM
91072010-11-23 Joseph Myers <joseph@codesourcery.com>
9108
9109 * c-common.c (visibility_options): Move from ../opts.c.
9110 * c-common.h (struct visibility_flags, visibility_options):
9111 Declare here.
9112 * c-opts.c (finish_options): Rename to c_finish_options.
9113 (c_common_init): Update call to finish_options.
9114
a9546771
NP
91152010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9116
9117 PR objc/34033
9118 * c-lex.c (lex_string): Check that each string in an Objective-C
9119 string concat sequence starts with either one or zero '@', and
9120 that there are no spurious '@' signs at the end.
9121
24a57808
JM
91222010-11-20 Joseph Myers <joseph@codesourcery.com>
9123
9124 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9125 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9126 HANDLE_PRAGMA_VISIBILITY.
9127 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9128 HANDLE_PRAGMA_VISIBILITY): Don't define.
9129 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9130
a9aa2c3a
NF
91312010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9132
9133 PR c++/16189
9134 PR c++/36888
9135 PR c++/45331
9136 * c-common.h (keyword_begins_type_specifier): Declare.
9137 (keyword_is_storage_class_specifier): Declare.
9138 (keyword_is_type_qualifier): Declare.
9139 * c-common.c (keyword_begins_type_specifier): New function.
9140 (keyword_is_storage_class_specifier): New function.
9141 (keyword_is_type_qualifier): Declare.
9142
5386338c
JM
91432010-11-19 Joseph Myers <joseph@codesourcery.com>
9144
9145 PR c/46547
9146 * c-common.c (in_late_binary_op): Define.
9147 (c_common_truthvalue_conversion): Check in_late_binary_op before
9148 calling c_save_expr.
9149 * c-common.h (in_late_binary_op): Declare.
9150
69ccdddb
JM
91512010-11-19 Joseph Myers <joseph@codesourcery.com>
9152
9153 * c-opts.c (c_common_handle_option): Update calls to
9154 set_struct_debug_option.
9155
6b192a09
NP
91562010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9157
9158 * c-common.h (objc_declare_protocols): Added additional argument.
9159 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9160
fb52b50a
NF
91612010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9162
9163 PR c/33193
9164 * c-common.h (build_real_imag_expr): Declare.
9165 * c-semantics.c (build_real_imag_expr): Define.
9166
b37421c6
JM
91672010-11-17 Joseph Myers <joseph@codesourcery.com>
9168
9169 * c-opts.c (c_common_parse_file): Take no arguments.
9170 * c-common.h (c_common_parse_file): Update prototype.
9171
07078664
JJ
91722010-11-16 Jakub Jelinek <jakub@redhat.com>
9173
9174 PR c++/46401
9175 * c-common.c (warning_candidate_p): Don't track non-const calls
9176 or STRING_CSTs.
9177
c6a13190
ILT
91782010-11-15 Ian Lance Taylor <iant@google.com>
9179
9180 * c-lex.c (init_c_lex): Set macro debug callbacks if
9181 flag_dump_go_spec is set.
9182
925e8657
NP
91832010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9184
9185 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9186 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9187
bb0a9581
NF
91882010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9189
9190 PR preprocessor/45038
9191 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9192 dialects.
9193
c5fa0890
JM
91942010-11-12 Joseph Myers <joseph@codesourcery.com>
9195
9196 * c-common.h (c_family_lang_mask): Declare.
9197 * c-opts.c (c_family_lang_mask): Make extern.
9198 * c-pragma.c (handle_pragma_diagnostic): Use
9199 control_warning_option.
9200
a4d8c676
JM
92012010-11-12 Joseph Myers <joseph@codesourcery.com>
9202
9203 * c-common.c (parse_optimize_options): Update call to
9204 decode_options.
9205 * c-common.h (c_common_handle_option): Update prototype.
9206 * c-opts.c (c_common_handle_option): Take location_t parameter and
9207 pass it to other functions.
9208
f954bd2c
JM
92092010-11-11 Joseph Myers <joseph@codesourcery.com>
9210
9211 * c-opts.c (warning_as_error_callback): Remove.
9212 (c_common_initialize_diagnostics): Don't call
9213 register_warning_as_error_callback.
9214 (c_common_handle_option): Handle -Werror=normalized= here.
9215
d8a07487
JM
92162010-11-10 Joseph Myers <joseph@codesourcery.com>
9217
9218 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9219 in diagnostic.
9220 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9221 letter.
9222 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9223 Remove trailing '.' from diagnostics.
9224 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9225
d5478783
JM
92262010-11-10 Joseph Myers <joseph@codesourcery.com>
9227
9228 * c-common.c (parse_optimize_options): Pass global_dc to
9229 decode_options.
9230 * c-opts.c (c_common_handle_option): Pass &global_options to
9231 set_Wstrict_aliasing.
9232 * c.opt (v): Don't mark Common or document here.
9233
91ebb981
IS
92342010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9235
9236 PR target/44981
9237 * c-format.c (format_type): New type gcc_objc_string_format_type.
9238 (valid_stringptr_type_p): New.
9239 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9240 (check_format_string): Pass expected type, use
91ebb981
IS
9241 valid_stringptr_type_p (), check that the format string types are
9242 consistent with the format specification.
9243 (decode_format_attr): Warn if NSString is used outside objective-c.
9244 (format_types_orig): Add NSString.
9245 (format_name): New.
9246 (format_flags): New.
9247 (check_format_arg): Handle format strings requiring an external parser.
9248 first_target_format_type: New variable.
9249 (handle_format_attribute): Set up first_target_format_type, pass the
9250 expected format arg string type to check_format_string().
9251 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9252 * stub-objc.c (objc_string_ref_type_p): New.
9253 (objc_check_format_arg): New.
9254
bede2adc
NP
92552010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9256
9faeb493 9257 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9258 * c-common.h (objc_build_class_component_ref): New.
9259 * stub-objc.c (objc_build_class_component_ref): New.
9260
9a179d01
NP
92612010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9262
9263 * c.opt (Wproperty-assign-default): New option.
9264
22d8d616
NP
92652010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9266
9267 Implemented -fobjc-std=objc1 flag.
9268 * c.opt (fobjc-std=objc1): New option.
9269
2debdb4f
NP
92702010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9271
9272 Implemented format and noreturn attributes for Objective-C methods.
9273 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9274 attribute for Objective-C methods.
9275
ec52b111
JM
92762010-10-31 Jason Merrill <jason@redhat.com>
9277
9278 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9279 EXPR_LOC_OR_HERE.
9280
46a88c12
NP
92812010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9282
9283 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9284 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9285 (objc_add_property_declaration): Removed arguments for copies and
9286 ivar.
9287 (objc_build_getter_call): Renamed to
9288 objc_maybe_build_component_ref.
9289 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9290 (objc_is_property_ref): New.
9291 * c-common.c (c_common_reswords): Removed copies and ivar.
9292 * stub-objc.c (objc_add_property_declaration): Removed arguments
9293 for copies and ivar.
9294 (objc_build_getter_call): Renamed to
9295 objc_maybe_build_component_ref.
9296 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9297 (objc_is_property_ref): New.
9faeb493 9298
1e4bf85b
AC
92992010-10-29 Arnaud Charlet <charlet@adacore.com>
9300 Matthew Gingell <gingell@adacore.com>
9301
9302 * c-ada-spec.c (separate_class_package): New function.
9303 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9304 name of their enclosing package.
9305 (print_ada_declaration): Use separate_class_package.
9306
81f0bab2
JM
93072010-10-27 Jason Merrill <jason@redhat.com>
9308
2b08f2c5
JM
9309 * c-common.c (c_common_reswords): Add __is_literal_type.
9310 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9311
81f0bab2
JM
9312 * c-common.c (check_case_value): Remove special C++ code.
9313
200290f2
NP
93142010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9315
9316 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9317 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9318 and RID_LAST_PATTR.
9319 (objc_add_property_declaration): Added additional arguments.
9320 (objc_property_attribute_kind): Removed.
9321 (objc_set_property_attr): Removed.
9322 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9323 copy and nonatomic.
9324 * stub-objc.c (objc_add_property_declaration): Added additional
9325 arguments.
9326 (objc_set_property_attr): Removed.
9faeb493 9327
f614132b
NP
93282010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9329
9330 * c-common.h (objc_add_property_variable): Renamed to
9331 objc_add_property_declaration. Added location argument.
9332 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9333
b8a18805
NP
93342010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9335
9336 * c-common.h (objc_maybe_printable_name): New.
9337 * stub-objc.c (objc_maybe_printable_name): New.
9338
3f8257db
JJ
93392010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9340 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9341
9342 * c-common.h (c_common_mark_addressable_vec): Declare.
9343 * c-common.c (c_common_mark_addressable_vec): New function.
9344
249a82c4
NP
93452010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9346
9347 * c-common.h (objc_set_method_type): Removed.
9348 (objc_add_method_declaration): Added boolean argument.
9349 (objc_start_method_definition): Same change.
9350 (objc_build_method_signature): Same change.
9351 * stub-objc.c (objc_set_method_type): Removed.
9352 (objc_add_method_declaration): Added boolean argument.
9353 (objc_start_method_definition): Same change.
9354 (objc_build_method_signature): Same change.
9355
977e30bc
NP
93562010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9357
9358 * c-common.h (finish_file): Removed.
9359 (objc_write_global_declarations): New.
9360 * c-opts.c (c_common_parse_file): Do not call finish_file.
9361 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9362
da57d1b9
NP
93632010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9364
9365 Implemented parsing @synthesize and @dynamic for
9366 Objective-C/Objective-C++.
9367 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9368 (objc_add_synthesize_declaration): New.
9369 (objc_add_dynamic_declaration): New.
9370 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9371 * stub-objc.c (objc_add_synthesize_declaration): New.
9372 (objc_add_dynamic_declaration): New.
9faeb493 9373
0069111f
MM
93742010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9375
9376 PR target/46041
9377 * c-cppbuiltin.c (mode_has_fma): Move function here from
9378 builtins.c. Don't use the fma optab, instead just use the
9379 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9380 using -save-temps.
9381
e426b47b
NP
93822010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9383
9384 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9385
3f8257db 9386 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9387
9faeb493 9388 Radar 4330422
e426b47b
NP
9389 * c-common.h (objc_non_volatilized_type): New declaration
9390 * stub-objc.c (objc_non_volatilized_type): New stub.
9391
90fbfdc3
NP
93922010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9393
e426b47b 9394 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9395
3f8257db 9396 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9397
9faeb493 9398 Radar 4133425
90fbfdc3 9399 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9400 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9401
c37d8c30
IS
94022010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9403
9404 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9405 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9406 (objc_ivar_visibility_kind): New enum.
9407 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9408 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9409 visibility enum.
9410
1b1562a5
MM
94112010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9412
9413 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9414 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9415 has the appropriate fma builtins.
9416 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9417
668ea4b1
IS
94182010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9419
1b1562a5 9420 merge from FSF apple 'trunk' branch.
3f8257db 9421 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9422
668ea4b1
IS
9423 Radars 4436866, 4505126, 4506903, 4517826
9424 * c-common.c (c_common_resword): Define @property and its attributes.
9425 * c-common.h: Define property attribute enum entries.
9426 (OBJC_IS_PATTR_KEYWORD): New.
9427 (objc_property_attribute_kind): New enum.
9428 Declare objc_set_property_attr (), objc_add_property_variable (),
9429 objc_build_getter_call () and objc_build_setter_call ().
9430 * stub-objc.c (objc_set_property_attr): New stub.
9431 (objc_add_property_variable): Likewise.
9432 (objc_build_getter_call): Likewise.
9433 (objc_build_setter_call) Likewise.
1b1562a5 9434
a1178b30
IS
94352010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9436
1b1562a5 9437 merge from FSF apple 'trunk' branch.
3f8257db 9438 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9439
9440 Radar 3803157 (method attributes)
9441 * c-common.c (handle_deprecated_attribute): Recognize
9442 objc methods as valid declarations.
9443 * c-common.h: Declare objc_method_decl ().
1b1562a5 9444 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9445
a75bfaa6
JM
94462010-10-08 Joseph Myers <joseph@codesourcery.com>
9447
9448 * c-common.c (parse_optimize_options): Call
9449 decode_cmdline_options_to_array_default_mask before
9450 decode_options. Update arguments to decode_options.
9451 * c-common.h (c_common_init_options_struct): Declare.
9452 * c-opts.c (c_common_init_options_struct): New. Split out from
9453 c_common_init_options.
9454
f05b9d93
NP
94552010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9456
9457 Implemented fast enumeration for Objective-C.
9458 * c-common.h (objc_finish_foreach_loop): New.
9459 * stub-objc.c (objc_finish_foreach_loop): New.
9460
1ebe4b4f
JM
94612010-10-05 Joseph Myers <joseph@codesourcery.com>
9462
9463 * c-common.h (struct diagnostic_context): Don't declare here.
9464 (c_common_initialize_diagnostics): Declare using
9465 diagnostic_context typedef.
9466 * c-opts.c (c_common_handle_option): Pass global_dc to
9467 handle_generated_option.
9468
d4d24ba4
JM
94692010-10-04 Joseph Myers <joseph@codesourcery.com>
9470
9471 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9472 handle_generated_option.
9473
478a1c5b
ILT
94742010-10-03 Ian Lance Taylor <iant@google.com>
9475
9476 * c.opt (-fplan9-extensions): New option.
9477
82a1c2fe
FXC
94782010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9479
9480 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9481 Remove.
9482 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9483 of duplicating code.
9484
92902b1b
IS
94852010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9486
9487 * c-common.c: Add two new entries for @optional
9488 and @required keywords.
9489
9490 merge from FSF 'apple/trunk' branch.
3f8257db 9491 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9492
9493 Radar 4386773
9494 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9495 objective-c keywords.
9496 (objc_set_method_opt): New declaration.
9497 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9498
46625112
JM
94992010-09-30 Joseph Myers <joseph@codesourcery.com>
9500
9501 * c-common.c (handle_optimize_attribute): Pass &global_options to
9502 cl_optimization_save and cl_optimization_restore.
9503 * c-opts.c (c_common_handle_option): Pass &global_options to
9504 handle_generated_option.
9505 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9506 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9507 &global_options to cl_optimization_restore.
9508
49b91f05
NP
95092010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9510
9511 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9512 Objective-C/Objective-C++ keywords.
9513
13ed556f 95142010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9515
9faeb493
UB
9516 Merge from 'apple/trunk' branch on FSF servers.
9517
3f8257db 9518 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9519
9520 Radar 4281748
9521 * c-common.h (objc_check_global_decl): New declaration.
9522 * stub-objc.c (objc_check_global_decl): New stub.
9523
f0036cca
JM
95242010-09-29 Joseph Myers <joseph@codesourcery.com>
9525
9526 * c.opt: Don't use VarExists.
9527
e3339d0f
JM
95282010-09-29 Joseph Myers <joseph@codesourcery.com>
9529
9530 * c-common.c (c_cpp_error): Update names of diagnostic_context
9531 members.
9532 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9533 cl_optimization members.
9534 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9535 sanitize_cpp_opts, finish_options): Update names of cpp_options
9536 members.
9537
1973201f
NP
95382010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9539
9540 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9541 (objc_is_reserved_word): Removed.
9542 * c-common.c: Updated comments.
9543 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9544 objc_is_reserved_word.
9545 * stub-objc.c (objc_is_reserved_word): Removed.
9546
f7e71da5
IS
95472010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9548
9faeb493 9549 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9550 include attributes.
9551 (objc_start_method_definition): Likewise.
9552 (objc_build_keyword_decl): Likewise.
9553 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9554 (objc_start_method_definition): Likewise.
9555 (objc_build_keyword_decl): Likewise.
9556
c165dca7
IS
95572010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9558
9559 * c-common.h (objc_start_class_interface): Adjust prototype.
9560 (objc_start_category_interface): Likewise.
9561 (objc_start_protocol): Likewise.
9562 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9563 (objc_start_class_interface): Likewise.
9564 (objc_start_category_interface): Likewise.
9565
7458026b
ILT
95662010-09-27 Ian Lance Taylor <iant@google.com>
9567
9568 * c-common.c (c_common_attribute_table): Add no_split_stack.
9569 (handle_no_split_stack_attribute): New static function.
9570
b581b85b
NP
95712010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9572
9faeb493 9573 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9574
3f8257db 9575 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9576
9faeb493 9577 Radar 4229905
b581b85b
NP
9578 * c-common.h (objc_have_common_type): New declaration.
9579 * stub-objc.c (objc_have_common_type): New stub.
9580
9581 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9582
9583 Radar 4154928
9584 * c-common.h (objc_common_type): New prototype.
9faeb493 9585 * stub-objc.c (objc_common_type): New stub.
b581b85b 9586
46a4da10
JH
95872010-09-24 Jan Hubicka <jh@suse.cz>
9588
9589 * c-common.c (handle_leaf_attribute): New function.
9590 (struct attribute_spec c_common_att): Add leaf.
9591
e200444e
JM
95922010-09-22 Joseph Myers <joseph@codesourcery.com>
9593
9594 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9595 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9596 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9597 -include-barrier, -include-directory, -include-directory=,
9598 -include-directory-after, -include-directory-after=,
9599 -include-prefix, -include-prefix=, -include-with-prefix,
9600 -include-with-prefix=, -include-with-prefix-after,
9601 -include-with-prefix-after=, -include-with-prefix-before,
9602 -include-with-prefix-before=, -no-integrated-cpp,
9603 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9604 -output=, -pedantic, -pedantic-errors, -preprocess,
9605 -print-missing-file-dependencies, -trace-includes, -traditional,
9606 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9607 -user-dependencies, -verbose, -write-dependencies,
9608 -write-user-dependencies, no-integrated-cpp, traditional): New.
9609
29a80ea6
NP
96102010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9611
9612 PR objc/23710
ac1fc2fc
NP
9613 * c-common.h (objc_start_method_definition): Return bool instead
9614 of void.
9615 * stub-objc.c (objc_start_method_definition): Return bool instead
9616 of void.
9617
96182010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9619
9620 PR objc/25965
9621 * c-common.h (objc_get_interface_ivars): New declaration.
9622 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9623
de621752
ILT
96242010-09-15 Ian Lance Taylor <iant@google.com>
9625
9626 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9627 messages. Remove period at end of warning message.
de621752 9628
ba885ec5
NS
96292010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9630
9631 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9632 (handle_alias_attribute): ... here.
9633 (handle_ifunc_attribute): New.
9634
c5ee1358
MM
96352010-09-06 Mark Mitchell <mark@codesourcery.com>
9636
9637 * c-common.h (do_warn_double_promotion): Declare.
9638 * c-common.c (do_warn_double_promotion): Define.
9639
0a0b3574
MM
96402010-09-05 Mark Mitchell <mark@codesourcery.com>
9641
9642 * c.opt (Wdouble-promotion): New.
9643
d1779886
JM
96442010-09-02 Joseph Myers <joseph@codesourcery.com>
9645
9646 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9647 fvtable-thunks, fxref): Mark no longer supported in help text.
9648
2d2bd949
JM
96492010-09-02 Joseph Myers <joseph@codesourcery.com>
9650
9651 * c.opt (Wimport, fall-virtual, falt-external-templates,
9652 fdefault-inline, fenum-int-equiv, fexternal-templates,
9653 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9654 fname-mangling-version-, fnew-abi, fnonnull-objects,
9655 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9656 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9657 applicable.
9658 (fhandle-exceptions): Mark with Alias and Warn.
9659 * c-opts.c (c_common_handle_option): Don't handle options marked
9660 as ignored.
9661
5de8299c
JM
96622010-09-02 Joseph Myers <joseph@codesourcery.com>
9663
9664 * c.opt (Wcomments, Werror-implicit-function-declaration,
9665 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9666 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9667 aliases.
9668 * c-common.c (option_codes): Use OPT_Wcomment instead of
9669 OPT_Wcomments.
9670 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9671 Don't handle options marked as aliases.
9672
0ceb0201
RG
96732010-08-25 Richard Guenther <rguenther@suse.de>
9674
9675 * c-common.c (c_common_get_alias_set): Remove special
9676 handling for pointers.
9677
ac47786e
NF
96782010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9679
9680 * c-common.c: Use FOR_EACH_VEC_ELT.
9681 * c-gimplify.c: Likewise.
9682 * c-pragma.c: Likewise.
9683
c878765b
JM
96842010-08-16 Joseph Myers <joseph@codesourcery.com>
9685
9686 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9687 RejectDriver.
9688 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9689 RejectDriver.
9690 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9691 instead of OPT_MDX and OPT_MMDX.
9692
603349bf
JM
96932010-08-16 Joseph Myers <joseph@codesourcery.com>
9694
9695 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9696
644fa7ac
JM
96972010-08-12 Joseph Myers <joseph@codesourcery.com>
9698
9699 * c.opt (MD, MMD): Change to MDX and MMDX.
9700 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9701
481e1176
JM
97022010-08-11 Joseph Myers <joseph@codesourcery.com>
9703
9704 * c-opts.c (c_common_handle_option): Call handle_generated_option
9705 instead of handle_option.
9706
ac8dc9f7
NF
97072010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9708
9709 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9710 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9711
4f8c876d
NF
97122010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9713
9714 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9715 (pending_redefine_extname): Change type to a VEC.
9716 (add_to_renaming_pragma_list): Update for new type of
9717 pending_redefine_extname.
ac8dc9f7 9718 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9719
3b0c690e
AC
97202010-08-04 Arnaud Charlet <charlet@adacore.com>
9721
9722 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9723 visited.
9724 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9725 decide whether a type has already been declared/seen.
9726 Do not go to the original type.
9727 (dump_nested_types): New parameter forward.
9728 Generate forward declaration if needed and mark type as visited.
9729 (print_ada_declaration): Call dump_nested_types if not already done.
9730 Mark types as visited.
9731
1890bccc
JM
97322010-08-03 Joseph Myers <joseph@codesourcery.com>
9733
9734 * c.opt (-print-pch-checksum): Remove option.
9735 * c-opts.c (c_common_handle_option): Don't handle
9736 OPT_print_pch_checksum.
9737
5f20c657
JM
97382010-07-27 Joseph Myers <joseph@codesourcery.com>
9739
9740 * c-common.h (c_common_handle_option): Update prototype and return
9741 value type.
9742 * c-opts.c (c_common_handle_option): Update prototype and return
9743 value type. Update calls to handle_option and
9744 enable_warning_as_error.
9745
f551f80c
JJ
97462010-07-27 Jakub Jelinek <jakub@redhat.com>
9747
9748 PR c/45079
9749 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9750
61ff2bdc
JM
97512010-07-27 Joseph Myers <joseph@codesourcery.com>
9752
9753 * c-common.h (c_common_missing_argument): Remove.
9754 * c-opts.c (c_common_missing_argument): Remove.
9755 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9756 idirafter, imacros, include, isysroot, isystem, iquote): Add
9757 MissingArgError.
9758 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9759
7a9bf9a4
JM
97602010-07-27 Joseph Myers <joseph@codesourcery.com>
9761
9762 * c-common.h (c_common_option_lang_mask,
9763 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9764 New.
9765 (c_common_init_options): Update prototype.
9766 * c-opts.c (c_common_option_lang_mask): New.
9767 (c_common_initialize_diagnostics): Split out of
9768 c_common_init_options.
9769 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9770 New.
9771 (c_common_init_options): Update prototype. Use decoded options in
9772 search for -lang-asm.
9773
910ad8de
NF
97742010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9775
9776 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9777 * c-format.c: Likewise.
9778
718f9c0f
MLI
97792010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9780
9781 * c-common.h: Include diagnostic-core.h. Error if already
9782 included.
9783 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9784
4d451982
MLI
97852010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9786
adfac8df 9787 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9788 Do not include expr.h
9789 (vector_mode_valid_p): Move here.
9790
119fe915
SB
97912010-06-21 DJ Delorie <dj@redhat.com>
9792
9793 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9794 allow these pragmas anywhere.
9795
97962010-06-14 Jakub Jelinek <jakub@redhat.com>
9797
9798 PR bootstrap/44509
9799 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9800 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9801 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9802 ggc_strdup instead of xstrdup.
9803
98042010-06-10 Jakub Jelinek <jakub@redhat.com>
9805
9806 * c-cppbuiltin.c: Include cpp-id-data.h.
9807 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9808 (lazy_hex_fp_value): New function.
9809 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9810
6662d794
MLI
98112010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9812
9813 * c-gimplify.c: Do not include tree-flow.h
9814
38f8b050
JR
98152010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9816
9817 PR other/44034
9818 * c-common.c: Rename targetm member:
9819 targetm.enum_va_list -> targetm.enum_va_list_p
9820
9589f23e
AS
98212010-06-28 Anatoly Sokolov <aesok@post.ru>
9822
9823 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9824
3b06d379
SB
98252010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9826
9827 * c-cppbuiltin.c: Do not include except.h.
9828
d166d4c3
AK
98292010-06-24 Andi Kleen <ak@linux.intel.com>
9830
9faeb493
UB
9831 * c-common.c (warn_for_omitted_condop): New.
9832 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9833
70cb8be6
JM
98342010-06-21 Joseph Myers <joseph@codesourcery.com>
9835
9836 * c.opt (lang-objc): Remove.
9837 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9838
a4c97feb
JR
98392010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9840
9841 * c-opts.c: Include "tm_p.h".
9842
6e2f1956
JM
98432010-06-20 Joseph Myers <joseph@codesourcery.com>
9844
9845 * c-common.c (parse_optimize_options): Update call to
9846 decode_options.
9847
bc87224e
NF
98482010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9849
9850 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9851 new type of types_used_by_cur_var_decl.
9852
b49cf425
JR
98532010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9854
9855 PR bootstrap/44512
9856 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9857 for C++ standard compliance.
9858
59f9c2ed
JM
98592010-06-16 Jason Merrill <jason@redhat.com>
9860
9861 * c.opt: Add -Wnoexcept.
9862
33766b66
RG
98632010-06-16 Richard Guenther <rguenther@suse.de>
9864
9865 PR c/44555
9866 * c-common.c (c_common_truthvalue_conversion): Remove
9867 premature and wrong optimization concering ADDR_EXPRs.
9868
eff7e30c
AC
98692010-06-15 Arnaud Charlet <charlet@adacore.com>
9870
9871 * c-ada-spec.c (dump_sloc): Remove column info.
9872 (is_simple_enum): New function.
9873 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9874 enum types when relevant.
9875
6312e84d
MLI
98762010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9877
9faeb493 9878 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9879 location.
9880
1cb42611
JM
98812010-06-10 Joseph Myers <joseph@codesourcery.com>
9882
9883 * c-opts.c (c_common_handle_option): Don't handle
9884 OPT_fshow_column.
9885
a9429e29
LB
98862010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9887
9888 * c-pragma.c (push_alignment): Use typed GC allocation.
9889 (handle_pragma_push_options): Likewise.
9890
9891 * c-common.c (parse_optimize_options): Likewise.
9892
9893 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9894 option.
9895
5498f011
JM
98962010-06-07 Joseph Myers <joseph@codesourcery.com>
9897
9898 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9899 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9900 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9901 flag_signed_bitfields, warn_strict_null_sentinel,
9902 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9903 flag_gen_declaration, flag_no_gnu_keywords,
9904 flag_implement_inlines, flag_implicit_templates,
9905 flag_implicit_inline_templates, flag_optional_diags,
9906 flag_elide_constructors, flag_default_inline, flag_rtti,
9907 flag_conserve_space, flag_access_control, flag_check_new,
9908 flag_new_for_scope, flag_weak, flag_working_directory,
9909 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9910 flag_enforce_eh_specs, flag_threadsafe_statics,
9911 flag_pretty_templates): Remove.
9912 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9913 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9914 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9915 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9916 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9917 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9918 flag_no_gnu_keywords, flag_implement_inlines,
9919 flag_implicit_templates, flag_implicit_inline_templates,
9920 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9921 flag_rtti, flag_conserve_space, flag_access_control,
9922 flag_check_new, flag_new_for_scope, flag_weak,
9923 flag_working_directory, flag_use_cxa_atexit,
9924 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9925 flag_threadsafe_statics, flag_pretty_templates,
9926 warn_strict_null_sentinel): Remove.
9927 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9928 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9929 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9930 fimplicit-inline-templates, fimplicit-templates,
9931 flax-vector-conversions, fms-extensions, fnil-receivers,
9932 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9933 frtti, fshort-double, fshort-enums, fshort-wchar,
9934 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9935 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9936 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9937 gen-decls, undef): Use Var.
9938 (fdefault-inline, foptional-diags): Document as doing nothing.
9939 * c-opts.c (c_common_handle_option): Remove cases for options now
9940 using Var. Mark ignored options as such.
9941
39dabefd
SB
99422010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9943
9faeb493 9944 * c-common.c: Moved to here from parent directory.
39dabefd
SB
9945 * c-common.def: Likewise.
9946 * c-common.h: Likewise.
9947 * c-cppbuiltin.c: Likewise.
9948 * c-dump.c: Likewise.
9949 * c-format.c: Likewise.
9950 * c-format.h : Likewise.
9951 * c-gimplify.c: Likewise.
9952 * c-lex.c: Likewise.
9953 * c-omp.c: Likewise.
9954 * c.opt: Likewise.
9955 * c-opts.c: Likewise.
9956 * c-pch.c: Likewise.
9957 * c-ppoutput.c: Likewise.
9958 * c-pragma.c: Likewise.
9959 * c-pragma.h: Likewise.
9960 * c-pretty-print.c: Likewise.
9961 * c-pretty-print.h: Likewise.
9962 * c-semantics.c: Likewise.
9963 * stub-objc.c: Likewise.
9964
9965 * c-common.c: Include gt-c-family-c-common.h.
9966 * c-pragma.c: Include gt-c-family-c-pragma.h.
9967\f
a5544970 9968Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
9969
9970Copying and distribution of this file, with or without modification,
9971are permitted in any medium without royalty provided the copyright
9972notice and this notice are preserved.