]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
re PR fortran/54613 ([F08] Add FINDLOC plus support MAXLOC/MINLOC with KIND=/BACK=)
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
6b943512
RB
12019-05-15 Richard Biener <rguenther@suse.de>
2
3 PR c/90474
4 * c-common.c (c_common_mark_addressable_vec): Also mark
5 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
6 c_mark_addressable.
7
b744fc85
NS
82019-05-06 Nathan Sidwell <nathan@acm.org>
9
10 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
11
598f50d7
NS
122019-04-30 Nathan Sidwell <nathan@acm.org>
13
14 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
15
5bcc5a3b
ML
162019-04-30 Martin Liska <mliska@suse.cz>
17
18 * c-pragma.c (handle_pragma_diagnostic): Provide hints
19 for unknown options.
20
e78a87f7
RS
212019-04-26 Richard Sandiford <richard.sandiford@arm.com>
22
23 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
24 the pointer target rather than the pointer itself.
25
c280b7ee
JJ
262019-04-19 Jakub Jelinek <jakub@redhat.com>
27
28 PR c/89888
29 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
30 arguments.
31 (c_do_switch_warnings): Remove outside_range_p argument.
32 * c-common.c (check_case_bounds): Removed.
33 (c_add_case_label): Remove orig_type and outside_range_p arguments.
34 Don't call check_case_bounds. Fold low_value as well as high_value.
35 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
36 Check for case labels outside of range of original type here and
37 adjust them.
38
8e8225e6
JJ
392019-04-12 Jakub Jelinek <jakub@redhat.com>
40
63b8a166
JJ
41 PR translation/90041
42 * c.opt (-fhandle-exceptions): Use %< and %> around option names
43 in the Warn diagnostics.
44
8e8225e6
JJ
45 PR c/89946
46 * c-attribs.c (handle_patchable_function_entry_attribute): Add
47 function comment. Warn if arguments of the attribute are not positive
48 integer constants.
49
53a3f614
EB
502019-04-09 Eric Botcazou <ebotcazou@adacore.com>
51
52 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
53 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
54
22be5873
EB
552019-04-07 Eric Botcazou <ebotcazou@adacore.com>
56
57 * c-ada-spec.c (is_float128): New predicate extracted from...
58 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
59 <REAL_TYPE>: ...here. Call it.
60
34facf20
DM
612019-04-05 David Malcolm <dmalcolm@redhat.com>
62
63 PR c/89985
64 * c-warn.c (check_address_or_pointer_of_packed_member): Add
65 auto_diagnostic_group. Guard inform calls by result of
66 warning_at call.
67
05564120
MP
682019-04-05 Marek Polacek <polacek@redhat.com>
69
70 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
71 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
72 of RHS.
73
7a506c3c
JM
742019-04-03 Jason Merrill <jason@redhat.com>
75
76 PR c++/86586 - -fcompare-debug=-Wsign-compare.
77 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
78
ddeae8c8
MS
792019-04-01 Martin Sebor <msebor@redhat.com>
80
81 PR c/89685
82 * c-attribs.c (handle_copy_attribute): Handle references and
83 non-constant expressions.
84
a15ffa22
JJ
852019-03-22 Jakub Jelinek <jakub@redhat.com>
86
87 PR c++/87481
88 * c.opt (-fconstexpr-ops-limit=): New option.
89
36a3a7a3
JJ
902019-03-21 Jakub Jelinek <jakub@redhat.com>
91
92 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
93 template param.
94
bec1da64
MS
952019-03-19 Martin Sebor <msebor@redhat.com>
96
97 PR tree-optimization/89688
98 * c-common.c (braced_list_to_string): Make static.
99 (braced_lists_to_strings): Define new function.
100 * c-common.h (braced_list_to_string): Remove.
101 (braced_lists_to_strings): Declare.
102
1fe61adf
ML
1032019-03-12 Martin Liska <mliska@suse.cz>
104
105 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
106
93964ebd
ML
1072019-03-11 Martin Liska <mliska@suse.cz>
108
109 * c-opts.c (c_common_post_options): Wrap apostrophes
110 in gcc internal format with %'.
111
a3f9f006
ML
1122019-03-11 Martin Liska <mliska@suse.cz>
113
114 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
115 in a string format message and fix GNU coding style.
116 * c-common.c (vector_types_convertible_p): Likewise.
117 (c_build_vec_perm_expr): Likewise.
118 * c-indentation.c (get_visual_column): Likewise.
119 * c-opts.c (c_common_handle_option): Likewise.
120 (c_common_post_options): Likewise.
121 (sanitize_cpp_opts): Likewise.
122 * c-pch.c (c_common_pch_pragma): Likewise.
123 * c-pragma.c (handle_pragma_pack): Likewise.
124
1db01ff9
JJ
1252019-03-08 Jakub Jelinek <jakub@redhat.com>
126
127 PR tree-optimization/89550
128 * c-common.c (c_common_truthvalue_conversion): Only set
129 TREE_NO_WARNING if warning_at returned true.
130 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
131
ba790e6f
JJ
1322019-02-25 Sandra Loosemore <sandra@codesourcery.com>
133 Martin Sebor <msebor@gmail.com>
134
135 * c.opt (Wmissing-attributes): Clean up doc string.
136
7da73ba7
JJ
1372019-02-25 Jakub Jelinek <jakub@redhat.com>
138
139 PR c/89495
140 * c-format.c (maybe_read_dollar_number): Compute nargnum in
141 HOST_WIDE_INT type to avoid overflows and change overflow_flag
142 checking.
143
921bb9d1
RB
1442019-02-22 Richard Biener <rguenther@suse.de>
145
146 * c-pch.c (no_checksum): Remove.
147 (pch_init): Remove assertion that executable_checksum is not
148 all zero.
149 (c_common_valid_pch): Likewise.
150
e2ebb05c
MS
1512019-02-18 Martin Sebor <msebor@redhat.com>
152
153 PR middle-end/89294
154 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
155
3fe53000
DM
1562019-02-16 David Malcolm <dmalcolm@redhat.com>
157
158 PR c++/88680
159 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
160 implementing -Wtype-limits.
161
28a8cef1
MS
1622019-02-11 Martin Sebor <msebor@redhat.com>
163
164 PR c++/87996
165 * c-common.c (invalid_array_size_error): New function.
166 (valid_array_size_p): Call it. Handle size as well as type.
167 * c-common.h (valid_constant_size_p): New function.
168 (enum cst_size_error): New type.
169
ec2be203
DM
1702019-01-31 David Malcolm <dmalcolm@redhat.com>
171
172 PR c/89122
173 * known-headers.cc (get_stdlib_header_for_name): Add
174 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
175
8936f047
JJ
1762019-01-31 Jakub Jelinek <jakub@redhat.com>
177
178 PR libstdc++/88170
179 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
180 a C cast in pp_c_flag_gnu_v3 mode.
181
6a335b96
JJ
1822019-01-29 Jakub Jelinek <jakub@redhat.com>
183
184 PR c/86125
185 * c-common.c (c_common_nodes_and_builtins): Build type variants for
186 builtin_structptr_types types even for C.
187
2a06eba5
BE
1882019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
189
190 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
191 when rhs is of array type correctly. Fix handling of nested structures.
192 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
193 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
194 type casts within nested compound expressions.
195
18a23298
JJ
1962019-01-22 Jakub Jelinek <jakub@redhat.com>
197
198 PR middle-end/88968
199 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
200 variable after using BIT_FIELD_REF.
201
420183d9
L
2022019-01-18 H.J. Lu <hongjiu.lu@intel.com>
203
204 PR c/51628
205 PR c/88664
206 * c-common.h (warn_for_address_or_pointer_of_packed_member):
207 Remove the boolean argument.
208 * c-warn.c (check_address_of_packed_member): Renamed to ...
209 (check_address_or_pointer_of_packed_member): This. Also
210 warn pointer conversion.
211 (check_and_warn_address_of_packed_member): Renamed to ...
212 (check_and_warn_address_or_pointer_of_packed_member): This.
213 Also warn pointer conversion.
214 (warn_for_address_or_pointer_of_packed_member): Remove the
215 boolean argument. Don't check pointer conversion here.
216
99063eee
RS
2172019-01-15 Richard Sandiford <richard.sandiford@arm.com>
218
219 PR inline-asm/52813
220 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
221
a30d0196
JJ
2222019-01-14 Jakub Jelinek <jakub@redhat.com>
223
224 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
225 and __cpp_nontype_template_parameter_auto. Add a comment that
226 __cpp_template_auto is deprecated.
227
2d91f79d
TH
2282019-01-14 Tom Honermann <tom@honermann.net>
229
230 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
231 * c-common.c (c_common_reswords): Add char8_t.
232 (fix_string_type): Use char8_t for the type of u8 string literals.
233 (c_common_get_alias_set): char8_t doesn't alias.
234 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
235 C++.
236 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
237 (keyword_begins_type_specifier): Add RID_CHAR8.
238 * c-common.h (rid): Add RID_CHAR8.
239 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
240 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
241 Define char8_type_node and char8_array_type_node.
242 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
243 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
244 (c_cpp_builtins): Predefine __cpp_char8_t.
245 * c-lex.c (lex_string): Use char8_array_type_node as the type of
246 CPP_UTF8STRING.
247 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
248 * c-opts.c: If not otherwise specified, enable -fchar8_t when
249 targeting C++2a.
250 * c.opt: Add the -fchar8_t command line option.
251
23db6ced
MS
2522019-01-14 Martin Sebor <msebor@redhat.com>
253
254 PR target/88638
255 * c-attribs.c (positional_argument): Call valid_format_string_type_p
256 and issue errors if it fails.
257 * c-common.h (valid_format_string_type_p): Declare.
258 * c-format.c (valid_stringptr_type_p): Rename...
259 (valid_format_string_type_p): ...to this and make extern.
260 (handle_format_arg_attribute): Adjust to new name.
261 (check_format_string): Same.
262
234c3818
L
2632019-01-13 H.J. Lu <hongjiu.lu@intel.com>
264
265 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
266 Replace "may may" with "may" in warning message.
267
d8fcab68
JJ
2682019-01-07 Jakub Jelinek <jakub@redhat.com>
269
270 PR c++/85052
271 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
272 (c_build_vec_convert): Declare.
273 * c-common.c (c_build_vec_convert): New function.
274
29d24852
MS
2752019-01-04 Martin Sebor <msebor@redhat.com>
276
277 PR c/88546
278 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
279 Handle C++ empty throw specification and C11 _Noreturn.
280 (has_attribute): Also handle C11 _Noreturn.
281
9069a4c9
MS
2822019-01-04 Martin Sebor <msebor@redhat.com>
283
284 PR c/88363
285 * c-attribs.c (positional_argument): Also accept enumerated types.
286
a5544970
JJ
2872019-01-01 Jakub Jelinek <jakub@redhat.com>
288
289 Update copyright years.
290
da77eace
L
2912018-12-20 H.J. Lu <hongjiu.lu@intel.com>
292
293 PR c/51628
294 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
295 * c-warn.c (check_alignment_of_packed_member): New function.
296 (check_address_of_packed_member): Likewise.
297 (check_and_warn_address_of_packed_member): Likewise.
298 (warn_for_address_or_pointer_of_packed_member): Likewise.
299 * c.opt: Add -Wno-address-of-packed-member.
300
573767d4
DM
3012018-12-20 David Malcolm <dmalcolm@redhat.com>
302
303 PR c++/87504
304 * c-warn.c (get_outermost_macro_expansion): New function.
305 (spelled_the_same_p): Use it to unwind the macro expansions, and
306 compare the outermost macro in each nested expansion, rather than
307 the innermost.
308
a14feb3c
DM
3092018-12-19 David Malcolm <dmalcolm@redhat.com>
310
311 PR c++/87504
312 * c-common.h (warn_tautological_cmp): Convert 1st param from
313 location_t to const op_location_t &.
314 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
315 when testing for INTEGER_CST.
316 (warn_tautological_bitwise_comparison): Convert 1st param from
317 location_t to const op_location_t &; use it to build a
318 binary_op_rich_location, and use this.
319 (spelled_the_same_p): New function.
320 (warn_tautological_cmp): Convert 1st param from location_t to
321 const op_location_t &. Warn for macro expansions if
322 spelled_the_same_p. Use binary_op_rich_location.
323
dfd7fdca
DM
3242018-12-19 David Malcolm <dmalcolm@redhat.com>
325
326 PR c++/43064
327 PR c++/43486
328 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
329 (verify_tree): Handle location wrappers.
330 (c_common_truthvalue_conversion): Strip any location wrapper.
331 Handle CONST_DECL.
332 (fold_offsetof): Strip any location wrapper.
333 (complete_array_type): Likewise for initial_value.
334 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
335 index before checking for INTEGER_CST.
336 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
337 print parentheses around location wrappers.
338 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
339 before checking for INTEGER_CST.
340 (warn_tautological_bitwise_comparison): Call
341 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
342 before checking for INTEGER_CST.
343 (readonly_error): Strip any location wrapper.
344 (warn_array_subscript_with_type_char): Strip location wrappers
345 before checking for INTEGER_CST. Use the location of the index if
346 available.
347
5c8b3702
JM
3482018-12-06 Jason Merrill <jason@redhat.com>
349
350 PR c++/88136 - -Wdeprecated-copy false positives
351 * c.opt (Wdeprecated-copy-dtor): New.
352 (Wdeprecated-copy): Move to -Wextra.
353
673670da
MS
3542018-11-29 Martin Sebor <msebor@redhat.com>
355
356 PR c/88172
357 PR testsuite/88208
358 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
359 alignments to values less than the target requires.
360 (has_attribute): For attribute aligned consider both the attribute
361 and the alignment bits.
362 * c-common.c (c_init_attributes): Optionally issue a warning for
363 zero alignment.
364
04864ec8
MS
3652018-11-28 Martin Sebor <msebor@redhat.com>
366
367 PR c/88065
368 PR c/87297
369 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
370 or destination is an error.
371
ace83db0
JJ
3722018-11-28 Jakub Jelinek <jakub@redhat.com>
373
374 PR c++/88215
375 * c-ubsan.c: Include langhooks.h.
376 (ubsan_instrument_division): Change gcc_assert that main variants
377 of op0 and op1 types are equal to gcc_checking_assert that the
378 main variants are compatible types.
379
da193a27
EB
3802018-11-27 Eric Botcazou <ebotcazou@adacore.com>
381
382 * c-ada-spec.c: Include stringpool.h.
383 (has_static_fields): Return false for incomplete types.
384 (is_tagged_type): Likewise.
385 (has_nontrivial_methods): Likewise.
386 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
387 (struct overloaded_name_hash): New structure.
388 (struct overloaded_name_hasher): Likewise.
389 (overloaded_names): New global variable.
390 (init_overloaded_names): New static function.
391 (overloaded_name_p): New predicate.
392 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
393 on the TYPE_STUB_DECL of the original type of a typedef, if any.
394 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
395 Remove always-true condition and dump forward types.
396 (dump_ada_specs): Delete overloaded_names.
397
98f08eb8
MS
3982018-11-20 Martin Sebor <msebor@redhat.com>
399
400 * c-attribs.c (type_for_vector_size): New function.
401 (type_valid_for_vector_size): Same.
402 (handle_vector_size_attribute): Move code to the functions above
403 and call them.
404 (validate_attribute, has_attribute): New functions.
405 * c-common.h (has_attribute): Declare.
406 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
407 * c-common.c (c_common_resword): Same.
408
2674fa47
JM
4092018-11-16 Jason Merrill <jason@redhat.com>
410
411 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
412 * c-attribs.c (attr_cold_hot_exclusions): Make public.
413
258b3854
JJ
4142018-11-16 Jakub Jelinek <jakub@redhat.com>
415
416 PR middle-end/87854
417 * c-common.c (fix_string_type): Reject string literals larger than
418 TYPE_MAX_VALUE (ssizetype) bytes.
419
1d249509
MS
4202018-11-15 Martin Sebor <msebor@redhat.com>
421
422 PR c++/87541
423 PR c++/87542
424 * c-attribs.c (positional_argument): New function.
425 (handle_alloc_size_attribute): Use it and simplify.
426 (handle_alloc_align_attribute): Same.
427 (handle_assume_aligned_attribute): Same.
428 (handle_nonnull_attribute): Same.
429 * c-common.c (check_function_arguments): Pass fntype to
430 check_function_format.
431 * c-common.h (check_function_format): Add an argument.
432 (PosArgFlags, positional_argument): Declare new type and function.
433 * c-format.c (decode_format_attr): Add arguments.
434 (check_format_string, get_constant): Same.
435 (convert_format_name_to_system_name): Adjust.
436
478dd60d
DM
4372018-11-15 David Malcolm <dmalcolm@redhat.com>
438
439 PR other/19165
440 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
441
8cca0163
JJ
4422018-11-14 Jakub Jelinek <jakub@redhat.com>
443
8ee09943
JJ
444 P1236R1 - Signed integers are two's complement
445 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
446 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
447 with in-range second operand well defined for -std=c++2a.
448
8cca0163
JJ
449 PR other/88007
450 * c-common.c (parse_optimize_options): Allocate option string from
451 opts_obstack rather than as GC memory. Move the allocation after
452 warning for invalid option.
453
620e594b
DM
4542018-11-13 David Malcolm <dmalcolm@redhat.com>
455
456 * c-common.c (c_get_substring_location): Update for renaming of
457 get_source_location_for_substring to get_location_within_string.
458 * c-lex.c: Replace "source_location" with "location_t".
459 * c-opts.c: Likewise.
460 * c-ppoutput.c: Likewise.
461
f9731de3
MS
4622018-11-13 Martin Sebor <msebor@redhat.com>
463
464 PR middle-end/81824
465 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
466 (handle_tls_model_attribute): Improve diagnostics.
467
e4bd6d5e
JM
4682018-11-12 Jason Merrill <jason@redhat.com>
469
a6bb6b07
JM
470 * c-cppbuiltin.c (c_cpp_builtins): Define
471 __cpp_impl_destroying_delete.
472
e4bd6d5e
JM
473 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
474 __cpp_conditional_explicit.
475
79a2c428
MS
4762018-11-09 Martin Sebor <msebor@redhat.com>
477
478 PR middle-end/81824
479 * c-attribs.c (handle_copy_attribute): New function.
480
4c7bd361
MS
4812018-11-09 Martin Sebor <msebor@redhat.com>
482
483 PR c/87795
484 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
485
28567c40
JJ
4862018-11-08 Jakub Jelinek <jakub@redhat.com>
487
488 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
489 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
490 enum omp_memory_order MEMORY_ORDER.
491 (c_finish_omp_flush): Add MO argument.
492 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
493 (c_finish_omp_for): Add FINAL_P argument.
494 * c-omp.c: Include memmodel.h.
495 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
496 OMP_TASKGROUP_CLAUSES to it.
497 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
498 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
499 instead of OMP_ATOMIC_SEQ_CST.
500 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
501 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
502 __atomic_thread_fence call with the given value.
503 (check_omp_for_incr_expr): Formatting fixes.
504 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
505 even in OpenMP loops, diagnose if NE_EXPR and incr expression
506 is not constant expression 1 or -1. Transform NE_EXPR loops
507 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
508 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
509 loops too.
510 (c_omp_split_clauses): Add support for combined
511 #pragma omp parallel master and
512 #pragma omp {,parallel }master taskloop{, simd} constructs.
513 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
514 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
515 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
516 (c_omp_predetermined_sharing): Don't return
517 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
518 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
519 PRAGMA_OMP_REQUIRES.
520 * c-pragma.h (enum pragma_kind): Likewise.
521 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
522 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
523
204839e7
DM
5242018-11-08 David Malcolm <dmalcolm@redhat.com>
525
526 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
527
d8010ee4
DM
5282018-11-08 David Malcolm <dmalcolm@redhat.com>
529
530 * c-format.c (local_cgraph_node_ptr_node): New variable.
531 (gcc_dump_printf_char_table): Add entry for %C.
532 (get_pointer_to_named_type): New function, taken from the handling
533 code for "gimple *" from...
534 (init_dynamic_diag_info): ...here. Add handling for
535 "cgraph_node *".
536 * c-format.h (T_CGRAPH_NODE): New.
537
4be5c72c
JM
5382018-10-19 Jason Merrill <jason@redhat.com>
539
540 * c-cppbuiltin.c (c_cpp_builtins): Add
541 __cpp_nontype_template_parameter_class.
542
f3f6029d
NS
5432018-10-31 Nathan Sidwell <nathan@acm.org>
544
ab5324fb
NS
545 * c-opts.c (c_finish_options): Force command line macro
546 location. Refactor to avoid repeating main debug hook.
547 (push_command_line_include): Clarify comment.
548
f3f6029d
NS
549 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
550
91e3ec29
MS
5512018-10-30 Martin Sebor <msebor@redhat.com>
552
553 PR middle-end/87041
554 * c-format.c (check_format_types): Avoid diagnosing null pointer
555 arguments to printf-family of functions.
556
b5ff4f5c
MP
5572018-10-30 Marek Polacek <polacek@redhat.com>
558
559 Implement P0892R2, explicit(bool).
560 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
561
7e2de6df
DM
5622018-10-29 David Malcolm <dmalcolm@redhat.com>
563
564 * name-hint.h (name_hint::take_deferred): New member function.
565
b2bf438c
DM
5662018-10-29 David Malcolm <dmalcolm@redhat.com>
567
568 PR c++/56856
569 * c-common.c (check_function_sentinel): Call fold_for_warn on the
570 argument.
571 (check_function_restrict): Rename param "argarray" to
572 "unfolded_argarray", and make a copy named "argarray", calling
573 fold_for_warn on each argument.
574 (check_function_arguments): Add note about responsibility for
575 folding the arguments.
576
9f936c86
JM
5772018-10-17 Joseph Myers <joseph@codesourcery.com>
578
579 * c-common.c (flag_isoc2x): New variable.
580 * c-common.h (clk_c): Update comment to reference C2X.
581 (flag_isoc99, flag_isoc11): Update comments to reference future
582 standard versions in general.
583 (flag_isoc2x): Declare.
584 * c-opts.c (set_std_c2x): New function.
585 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
586 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
587 flag_isoc2x to 0.
588 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
589
7a8a92c4
JM
5902018-10-17 Joseph Myers <joseph@codesourcery.com>
591
592 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
593 (std=iso9899:2018): Document C17 as published in 2018.
594
4dc003ff
CL
5952018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
596
597 PR c++/87364
598 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
599
79371671
WW
6002018-10-11 Will Wray <wjwray@gmail.com>
601
602 PR c++/87364
603 * c-pretty-print.h (pp_c_type_cast): Prototype.
604 (pp_c_integer_constant): Likewise.
605 * c-pretty-print.c (pp_c_type_cast): No longer static.
606 (pp_c_integer_constant): Likewise.
607 (pp_c_enumeration_constant): Fix loop termination when finding
608 name of constant. No longer returns a value. Call
609 pp_c_integer_constant.
610 (c_pretty_printer::constant): Update for changes to
611 pp_c_enumeration_constant.
612
46c62690
JJ
6132018-10-11 Jakub Jelinek <jakub@redhat.com>
614
615 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
616 for no_unique_address.
617
c24300ba
DM
6182018-10-09 David Malcolm <dmalcolm@redhat.com>
619
620 * c-common.c (c_option_controlling_cpp_error): Rename to...
621 (c_option_controlling_cpp_diagnostic): ...this, and convert
622 "reason" from int to enum.
623 (c_cpp_error): Rename to...
624 (c_cpp_diagnostic): ...this, converting level and reason to enums.
625 * c-common.h (c_cpp_error): Rename to...
626 (c_cpp_diagnostic): ...this, converting level and reason to enums.
627 * c-opts.c (c_common_init_options): Update for renaming.
628
8656dafa
RS
6292018-10-08 Richard Sandiford <richard.sandiford@arm.com>
630
631 PR c/87286
632 * c-common.c (vector_types_compatible_elements_p): Use
633 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
634
8cff0652
VK
6352018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
636
637 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
638 to generate constructor destructor priority warning.
639 * c.opt (-Wprio-ctor-dtor): New option.
640
bedf03a2
JM
6412018-10-01 Jason Merrill <jason@redhat.com>
642
643 * c-lex.c (c_common_has_attribute): Add no_unique_address.
644
6cc430c1
EB
6452018-10-01 Eric Botcazou <ebotcazou@adacore.com>
646
647 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
648 (dump_ada_node): Add const keyword.
649
87677ac7
ML
6502018-09-25 Martin Liska <mliska@suse.cz>
651
652 * c-common.c (c_common_truthvalue_conversion):
653 Remove Pascal from documentation.
654
518196cb
EB
6552018-09-21 Eric Botcazou <ebotcazou@adacore.com>
656
657 * c-ada-spec.c: Include diagnostic.h.
658 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
659
a599af84
MP
6602018-09-19 Marek Polacek <polacek@redhat.com>
661
662 * c.opt (Wclass-conversion): New.
663
9c4a4b3c
DM
6642018-09-17 David Malcolm <dmalcolm@redhat.com>
665
666 * c-format.c (range_label_for_format_type_mismatch::get_text):
667 Update for new param.
668
c896ecfe
DM
6692018-09-17 David Malcolm <dmalcolm@redhat.com>
670
671 * c-format.c (format_warning_at_char): Update for introduction of
672 format_string_diagnostic_t.
673 (format_type_warning): Likewise.
674
80c6d1f4
MJ
6752018-09-17 Martin Jambor <mjambor@suse.cz>
676
677 PR c/63886
678 * c.opt (Wabsolute-value): New.
679
6d900107
BE
6802018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
681
682 * c-common.c (complete_flexible_array_elts): New helper function.
683 * c-common.h (complete_flexible_array_elts): Declare.
684
b5764229
BE
6852018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
686
687 * c-common.c (braced_list_to_string): Remove eval parameter.
688 Add some more checks. Always create zero-terminated STRING_CST.
689 * c-common.h (braced_list_to_string): Adjust prototype.
690
85204e23
DM
6912018-08-27 David Malcolm <dmalcolm@redhat.com>
692
693 PR 87091
694 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
695 to a tri-state.
696 (maybe_suggest_missing_token_insertion): Likewise.
697 (maybe_add_include_fixit): Add param "override_location". If set,
698 and source-printing is enabled, then override the rich_location's
699 primary location with that of the insertion point for the fix-it
700 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
701 * c-common.h (extern void maybe_add_include_fixit): Add bool
702 param.
703 * c-format.c (selftest::test_type_mismatch_range_labels): Update
704 for conversion of show_caret_p to a tri-state.
705 * c-warn.c (warn_for_restrict): Likewise.
706 * known-headers.cc
707 (suggest_missing_header::~suggest_missing_header): Update call to
708 maybe_add_include_fixit to suggest overriding the location, as it
709 is for a note.
710
3d78e008
ML
7112018-08-27 Martin Liska <mliska@suse.cz>
712
713 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
714 fndecl_built_in_p and remove check for FUNCTION_DECL if
715 possible.
3d78e008
ML
716 (check_builtin_function_arguments): Likewise.
717 (reject_gcc_builtin): Likewise.
718 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
719
b5be6d0c
MP
7202018-08-26 Marek Polacek <polacek@redhat.com>
721
722 PR c++/87029, Implement -Wredundant-move.
723 * c.opt (Wredundant-move): New option.
724
79ca9c35
MP
7252018-08-21 Marek Polacek <polacek@redhat.com>
726
727 PR c++/86981, Implement -Wpessimizing-move.
728 * c.opt (Wpessimizing-move): New option.
729
097f82ec
DM
7302018-08-20 David Malcolm <dmalcolm@redhat.com>
731
732 PR other/84889
733 * c-attribs.c (common_handle_aligned_attribute): Add
734 auto_diagnostic_group instance.
735 * c-indentation.c (warn_for_misleading_indentation): Likewise.
736 * c-opts.c (c_common_post_options): Likewise.
737 * c-warn.c (warn_logical_not_parentheses): Likewise.
738 (warn_duplicated_cond_add_or_warn): Likewise.
739 (warn_for_multistatement_macros): Likewise.
740
3fb558b1
NS
7412018-08-20 Nathan Sidwell <nathan@acm.org>
742
743 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
744 access.
745
800c0e98
NS
7462018-08-17 Nathan Sidwell <nathan@acm.org>
747
748 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
749 field.
750 (laxy_hex_fp_value_count): Make unsigned.
751 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
752 manipulate the macro.
753 (builtin_defin_with_hex_fp_value): Adjust callback name, use
754 cpp_define_lazily.
755
6f795a92
DM
7562018-08-17 David Malcolm <dmalcolm@redhat.com>
757
758 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
759 (gcc_dump_printf_length_specs): New.
760 (gcc_dump_printf_flag_pairs): New.
761 (gcc_dump_printf_flag_specs): New.
762 (gcc_dump_printf_char_table): New.
763 (format_types_orig): Add entry for "gcc_dump_printf".
764 (init_dynamic_diag_info): Set up length_char_specs and
765 conversion_specs for gcc_dump_printf_format_type.
766 (handle_format_attribute): Handle gcc_dump_printf_format_type.
767
c5d725c0
NS
7682018-08-17 Nathan Sidwell <nathan@acm.org>
769
10f04917
NS
770 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
771
c5d725c0
NS
772 * c-ada-spec.c: Don't #include "cpp-id-data.h"
773 * c-cppbuiltin.c: Likewise.
774
c0c12356
ML
7752018-08-17 Martin Liska <mliska@suse.cz>
776
777 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
778 Ignore/Deprecated flag. Warning is done automatically for
779 Deprecated flags.
c0c12356 780
10fcc142
DM
7812018-08-16 David Malcolm <dmalcolm@redhat.com>
782
783 PR c++/70693
784 * c-common.c (selftest::c_family_tests): Call
785 selftest::c_indentation_c_tests.
786 * c-common.h (selftest::c_indentation_c_tests): New decl.
787 * c-indentation.c: Include "selftest.h".
788 (next_tab_stop): Add "tab_width" param, rather than accessing
789 cpp_opts.
790 (get_visual_column): Likewise. Clarify comment. Bulletproof
791 against reading past the end of the line.
792 (get_first_nws_vis_column): Add "tab_width" param.
793 (detect_intervening_unindent): Likewise.
794 (should_warn_for_misleading_indentation): Read tab width from
795 cpp_opts and pass around.
796 (selftest::test_next_tab_stop): New test.
797 (selftest::assert_get_visual_column_succeeds): New function.
798 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
799 (selftest::assert_get_visual_column_fails): New function.
800 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
801 (selftest::test_get_visual_column): New test.
802 (selftest::c_indentation_c_tests): New function.
803
3f6677f4
NS
8042018-08-16 Nathan Sidwell <nathan@acm.org>
805
806 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
807 (store_ada_macro): Likewise.
808 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
809 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
810
96e6ae57
DM
8112018-08-15 David Malcolm <dmalcolm@redhat.com>
812
813 * c-format.c: Include "selftest-diagnostic.h" and
814 "gcc-rich-location.h".
815 (format_warning_at_char): Pass NULL for new label params of
816 format_warning_va.
817 (class indirection_suffix): New class.
818 (class range_label_for_format_type_mismatch): New class.
819 (format_type_warning): Move logic for generating "*" suffix to
820 class indirection_suffix. Create "fmt_label" and "param_label"
821 to show their types, and pass them to the
822 format_warning_at_substring calls.
823 (selftest::test_type_mismatch_range_labels): New test.
824 (selftest::c_format_c_tests): Call it.
825
23aa9f7c
MS
8262018-08-13 Martin Sebor <msebor@redhat.com>
827
828 PR tree-optimization/71625
829 * c-common.c (braced_list_to_string): New function.
830 * c-common.h (braced_list_to_string): Declare it.
831
f10a9135
NS
8322018-08-08 Nathan Sidwell <nathan@acm.org>
833
834 * c-common.c (try_to_locate_new_include_inertion_point): Use
835 linemap_included_from_linemap.
836 * c-lex.c (fe_file_change): Use linemap_included_from.
837 * c-ppoutput.c (pp_file_change): Likewise.
838
8a45b051
MS
8392018-08-01 Martin Sebor <msebor@redhat.com>
840
841 PR tree-optimization/86650
842 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
843 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
844 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
845 * c-format.h (T89_G): Update to be "gimple *" rather than
846 "gcall *".
847 (local_gcall_ptr_node): Rename...
848 (local_gimple_ptr_node): ...to this.
849
e540ccc0
DM
8502018-07-31 David Malcolm <dmalcolm@redhat.com>
851
852 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
853 table entries for gcc_diag_char_table, and the 'Z' entry from
854 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
855 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
856 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
857 adding missing "Z" for this table. Remove erroneous "G" and "K"
858 entries.
859 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
860 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
861 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
862
425fc685
RE
8632018-07-31 Richard Earnshaw <rearnsha@arm.com>
864
865 * c-common.c (speculation_safe_resolve_call): New function.
866 (speculation_safe_resolve_params): New function.
867 (speculation_safe_resolve_return): New function.
868 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
869 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
870 __HAVE_SPECULATION_SAFE_VALUE.
871
181463c2
DM
8722018-07-20 David Malcolm <dmalcolm@redhat.com>
873
874 * c-common.c (c_cpp_error): Remove redundant "line_table"
875 parameter from call to rich_location::set_range.
876 (maybe_suggest_missing_token_insertion): Likewise.
877
0d7f9065
MS
8782018-07-20 Martin Sebor <msebor@redhat.com>
879
880 PR middle-end/82063
881 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
882
00abf86c
MS
8832018-07-20 Martin Sebor <msebor@redhat.com>
884
885 PR middle-end/82063
886 * c-common.h (c_common_handle_option): Change function argument
887 to HOST_WIDE_INT.
888 * c-opts.c (c_common_init_options): Same.
889 (c_common_handle_option): Same. Remove special handling of
890 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
891 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
892 options to take a HOST_WIDE_INT argument and accept a byte-size
893 suffix. Initialize.
894 (-Wvla-larger-than): Same.
895 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
896 (-Wno-vla-larger-than): Same.
897
9b452033
JJ
8982018-07-12 Jakub Jelinek <jakub@redhat.com>
899
900 * c-attribs.c (c_common_attribute_table): Add
901 "omp declare target implicit" attribute.
902
cd0762f3
RB
9032018-07-12 Richard Biener <rguenther@suse.de>
904
905 PR c/86453
906 * c-attribs.c (handle_packed_attribute): Do not build a variant
907 type with TYPE_PACKED, instead ignore the attribute if we may
908 not apply to the original type.
909
0b27c3ed
JJ
9102018-07-10 Jakub Jelinek <jakub@redhat.com>
911
912 PR c++/86443
913 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
914 to contain TREE_LIST for both the original class iterator and the
915 "last" helper var.
916
e730a0ef
EB
9172018-07-07 Eric Botcazou <ebotcazou@adacore.com>
918
919 * c-ada-spec.c (to_ada_name): Remove index parameter.
920 (pp_ada_tree_identifier): Likewise.
921 (dump_ada_macros): Adjust call to to_ada_name.
922 (struct overloaded_name_hash): Delete.
923 (struct overloaded_name_hasher): Likewise.
924 (overloaded_names): Likewise.
925 (compute_overloading_index): Likewise.
926 (dump_ada_decl_name): Do not call compute_overloading_index and
927 adjust calls to pp_ada_tree_identifier.
928 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
929 (dump_ada_import): Add spc parameter and switch to aspect syntax.
930 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
931 (dump_ada_enum_type): Remove type and display_convention parameters.
932 Adjust calls to pp_ada_tree_identifier.
933 (dump_ada_node): Likewise and for dump_ada_structure.
934 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
935 and tidy up.
936 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
937 syntax.
938 (print_constructor): Adjust call to pp_ada_tree_identifier.
939 (print_destructor): Likewise.
940 (dump_ada_declaration): Switch to aspect syntax.
941 (dump_ada_structure): Likewise and tidy up. Replace display_convention
942 parameter with nested parameter.
943 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
944 (dump_ada_specs): Do not delete overloaded_names table.
945
8de583fc
PB
9462018-07-06 Peter Bergner <bergner@linux.ibm.com>
947
948 PR target/86324
e730a0ef 949 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
950 target hook.
951
09cff37b
NS
9522018-07-05 Nathan Sidwell <nathan@acm.org>
953
954 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
955 NO_IMPLICIT_EXTERN_C.
956
98086b2b
ML
9572018-06-28 Martin Liska <mliska@suse.cz>
958
959 * cppspec.c: Include opt-suggestions.h.
960
829c6349
CLT
9612018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
962 Thomas Schwinge <thomas@codesourcery.com>
963 Cesar Philippidis <cesar@codesourcery.com>
964
965 * c-pragma.h (enum pragma_omp_clause): Add
966 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
967 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
968
f41b7612
JJ
9692018-06-20 Jakub Jelinek <jakub@redhat.com>
970
971 PR c++/86210
972 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
973 comment.
974
4252ccd7
MS
9752018-06-18 Martin Sebor <msebor@redhat.com>
976
977 PR middle-end/85602
978 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
979 nonstring.
980
e197e64e
KV
9812018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
982
983 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
984
34a7a230
JM
9852018-06-13 Jason Merrill <jason@redhat.com>
986
5cef3733
JM
987 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
988 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
989 handling.
990
34a7a230
JM
991 PR c++/86094 - wrong code with defaulted move ctor.
992 * c-opts.c (c_common_post_options): Bump the current ABI version to
993 13. Set warn_abi_version and flag_abi_compat_version to the current
994 version rather than 0. Fix defaulting flag_abi_compat_version from
995 warn_abi_version.
996
bb0f14ae
MS
9972018-06-12 Martin Sebor <msebor@redhat.com>
998
999 PR c/85931
1000 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1001 sizeof source and destination yields the same value.
1002
3713f2e2
ML
10032018-06-12 Martin Liska <mliska@suse.cz>
1004
1005 * c.opt: Make MPX-related options as Deprecated.
1006
4af78ef8
DM
10072018-06-08 David Malcolm <dmalcolm@redhat.com>
1008
1009 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1010 rather than 0.
1011
31db0fe0
ML
10122018-06-08 Martin Liska <mliska@suse.cz>
1013
1014 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1015 for MPX (macros, related functions, fields in cgraph_node, ...).
1016 (handle_bnd_legacy): Likewise.
1017 (handle_bnd_instrument): Likewise.
1018 * c.opt: Likewise.
1019
fe16acf2
JJ
10202018-06-06 Jakub Jelinek <jakub@redhat.com>
1021
1022 PR c++/86068
1023 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1024 __cpp_transactional_memory to 201500 instead of 210500.
1025
4dbdb49b
JM
10262018-06-06 Jason Merrill <jason@redhat.com>
1027
1028 PR c++/85710 - ICE with -Wmemset-elt-size.
1029 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1030
f8ad043f
JM
10312018-06-01 Jason Merrill <jason@redhat.com>
1032
1033 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1034 201703.
1035
abc24d93
EB
10362018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1037
1038 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1039 declaration for a typedef independently of whether the declaration of
1040 the subtype is generated.
1041
d258f4aa
MS
10422018-05-31 Martin Sebor <msebor@redhat.com>
1043
1044 PR c/82063
1045 * c.opt (-Wno-alloc-size-larger-than): New option.
1046
b67b9225
DP
10472018-04-22 David Pagan <dave.pagan@oracle.com>
1048
1049 PR c/55976
1050 * c-opts.c (c_common_post_options): Set default for warn_return_type
1051 for C++/C++ with ObjC extensions only. For C, makes it possible to
1052 differentiate between default (no option), -Wreturn-type, and
1053 -Wno-return-type.
1054
04eb9c55
JM
10552018-05-29 Jason Merrill <jason@redhat.com>
1056
1057 * c.opt (Winit-list-lifetime): New flag.
1058
b0c31bc6
BE
10592018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1060
1061 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1062 splay_tree_delete_pointers.
1063
44284983
JJ
10642018-05-26 Jakub Jelinek <jakub@redhat.com>
1065
1066 PR bootstrap/85921
1067 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1068 noinline variable to workaround broken kernel headers.
1069
b46b715d
JM
10702018-05-18 Jason Merrill <jason@redhat.com>
1071
1072 * c.opt (Wdeprecated-copy): New flag.
1073
40659769
ML
10742018-05-17 Martin Liska <mliska@suse.cz>
1075
1076 * c-warn.c (overflow_warning): Do not use
1077 space in between 'G_' and '('.
1078
403962ea
JM
10792018-05-09 Jason Merrill <jason@redhat.com>
1080
1081 * c-common.c (valid_array_size_p): Add complain parameter.
1082 * c-common.h: ...which defaults to true.
1083
1c9ee609
JJ
10842018-05-11 Jakub Jelinek <jakub@redhat.com>
1085
1086 PR c/85696
1087 * c-omp.c (c_omp_predetermined_sharing): Return
1088 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1089
19916065
ML
10902018-05-11 Martin Liska <mliska@suse.cz>
1091
92a285c1 1092 PR sanitizer/85556
19916065
ML
1093 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1094 TREE_LIST values.
1095
79e7b1fe
JJ
10962018-05-10 Jakub Jelinek <jakub@redhat.com>
1097
1098 PR c++/85662
1099 * c-common.h (fold_offsetof_1): Removed.
1100 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1101 CTX argument defaulted to ERROR_MARK.
1102 * c-common.c (fold_offsetof_1): Renamed to ...
1103 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1104 argument, convert the pointer constant to TYPE and use size_binop
1105 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1106 a pointer type. Adjust recursive calls.
1107
86c12f76
EB
11082018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1109
1110 PR c++/85400
1111 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1112
ee336e84
NS
11132018-05-07 Nathan Sidwell <nathan@acm.org>
1114
1115 * c.opt (ffor-scope): Remove functionality, issue warning.
1116
6c072e21
NS
11172018-05-03 Nathan Sidwell <nathan@acm.org>
1118
1119 * c.opt (ffriend-injection): Remove functionality, issue warning.
1120
2cc7d3a7
DM
11212018-05-01 David Malcolm <dmalcolm@redhat.com>
1122
1123 PR c/84258
1124 * c-format.c (struct format_check_results): Add field
1125 "number_non_char".
1126 (check_format_info): Initialize it, and warn if encountered.
1127 (check_format_arg): Distinguish between wide char and
1128 everything else when detecting arrays of non-char.
1129
7761dfbe
DM
11302018-04-30 David Malcolm <dmalcolm@redhat.com>
1131
1132 * c-format.c (get_corrected_substring): Update for
1133 location_get_source_line returning a char_span. Use a char_span
1134 when handling the prefix of the correction.
1135 * c-indentation.c (get_visual_column): Update for
1136 location_get_source_line returning a char_span.
1137 (get_first_nws_vis_column): Likewise.
1138
62e98ef1
DM
11392018-03-29 David Malcolm <dmalcolm@redhat.com>
1140
1141 PR c++/84269
1142 * known-headers.cc (get_stdlib_header_for_name): Add various names
1143 from <assert.h>, <string.h>, and <memory.h>; add more names from
1144 <stdio.h>.
1145
a7dea617
JJ
11462018-03-27 Jakub Jelinek <jakub@redhat.com>
1147
1148 PR c++/85061
1149 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1150 get_base_address of the second operand is a VAR_P, rather than the
1151 operand itself, and use gcc_checking_assert instead of gcc_assert.
1152
889a3a30
MP
11532018-03-23 Marek Polacek <polacek@redhat.com>
1154
1155 PR c++/85045
1156 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1157 <case RDIV_EXPR>: Tweak condition.
1158
452154b9
EB
11592018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1160
1161 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1162
63ecb626
JJ
11632018-03-16 Jakub Jelinek <jakub@redhat.com>
1164
ce811fc4
JJ
1165 PR c/84909
1166 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1167 diagnostics.
1168
63ecb626
JJ
1169 PR c/84910
1170 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1171 diagnostics.
1172
a1295eec
RB
11732018-03-16 Richard Biener <rguenther@suse.de>
1174
1175 PR c/84873
1176 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1177 unshare the possibly folded expression.
1178
919674fb
RB
11792018-03-15 Richard Biener <rguenther@suse.de>
1180
1181 PR c/84873
1182 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1183
f99309b2
MS
11842018-03-13 Martin Sebor <msebor@redhat.com>
1185
1186 PR tree-optimization/84725
1187 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1188 with all three narrow character types, including their qualified forms.
1189
e9b9fa4c
MS
11902018-03-12 Martin Sebor <msebor@redhat.com>
1191
1192 PR tree-optimization/83456
1193 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1194 Restore checking of bounded built-in functions.
1195 (check_function_arguments): Also return the result
1196 of warn_for_restrict.
1197 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1198 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1199
0805d020
MP
12002018-03-02 Marek Polacek <polacek@redhat.com>
1201
1202 PR c++/84171
1203 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1204 is erroneous.
1205
ed2a2f08
TS
12062018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1207
1208 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1209 function".
1210
90abdde0
MP
12112018-03-01 Marek Polacek <polacek@redhat.com>
1212
1213 PR c++/84639
1214 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1215 alignment in computation.
1216
c6db43fa
EB
12172018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1218
1219 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1220 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1221
9e25c7ed
EB
12222018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1223
1224 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1225 (is_char_array): Take a type instead of a declaration.
1226 (dump_ada_array_type): Likewise.
1227 (is_simple_enum): Minor tweak.
1228 (dump_ada_enum_type): New function extracted from...
1229 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1230 <INTEGER_TYPE>: Remove unreachable code.
1231 <RECORD_TYPE>: Likewise. Minor tweaks.
1232 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1233 <ENUMERAL_TYPE>: New case.
1234 <RECORD_TYPE>: Factor out common code.
1235 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1236 Minor tweaks. Deal with enumeral types.
1237 (dump_ada_structure): Minor tweaks.
1238
09de3550
EB
12392018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1240
1241 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1242 address for incomplete structures.
1243 (dump_forward_type): Do not bail out for incomplete structures.
1244 (dump_ada_declaration): Do not special-case incomplete structures
1245 for subtypes. Dump them as null records for types.
1246
095d8d4b
EB
12472018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1248
1249 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1250 (is_char_array): Fix formatting.
1251 (dump_template_types): Likewise.
1252 (dump_generic_ada_node): Rename into...
1253 (dump_ada_node): ...this.
1254 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1255 incomplete structures and not for empty structures. Do not use it
1256 when forward declarations are needed.
1257 (dump_forward_type): New function.
1258 (dump_nested_types): Remove FORWARD parameter. Do not consider
1259 TREE_VISITED and do not generate a forward declaration. Only dump
1260 original nested types for nested declaration.
1261 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1262 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1263 <RECORD_TYPE>: Do not consider TREE_VISITED.
1264 (dump_ada_declaration): Use booleans and fix formatting throughout.
1265 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1266 Call dump_forward_type instead of dump_nested_types for a typedef.
1267 Remove superfluous check and adjust call to dump_nested_types.
1268 <POINTER_TYPE>: Call dump_forward_type and fall through.
1269 (dump_ada_struct_decl): Rename into...
1270 (dump_ada_structure): ...this. Do not special-case empty structures.
1271
d4cfd486
MS
12722018-02-27 Martin Sebor <msebor@redhat.com>
1273
1274 PR c++/83871
1275 * c.opt (-Wmissing-attributes): New option.
1276
b22dbd03
ML
12772018-02-21 Martin Liska <mliska@suse.cz>
1278
1279 * c.opt (Wcatch-value=): Add IntegerRange.
1280
883dfe2a
JM
12812018-02-15 Jason Merrill <jason@redhat.com>
1282
1283 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1284
0444aa9c
NS
12852018-02-09 Nathan Sidwell <nathan@acm.org>
1286
1287 PR c/84293
1288 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1289 arg.
1290 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1291 arg. Adjust.
1292
cea71f0a
MS
12932018-02-09 Martin Sebor <msebor@redhat.com>
1294
1295 PR lto/84212
1296 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1297 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1298 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1299 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1300 (-Wuninitialized): Same.
1301
8c8b7be5
EB
13022018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1303
1304 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1305 keyword for components.
1306
7c30b12a
PC
13072018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1308
1309 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1310
eece7fe5
JK
13112018-02-02 Julia Koval <julia.koval@intel.com>
1312
1313 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1314
7d07a93a
MP
13152018-01-29 Marek Polacek <polacek@redhat.com>
1316
1317 PR c/83966
1318 * c-format.c (check_function_format): Check current_function_decl.
1319
53723269
JJ
13202018-01-27 Jakub Jelinek <jakub@redhat.com>
1321
1322 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1323 argument.
1324 (LAZY_HEX_FP_VALUES_CNT): Define.
1325 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1326 values rather than just 12.
1327 (builtin_define_with_hex_fp_value): Likewise.
1328
7365279f
BK
13292018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1330
92a285c1
ML
1331 PR other/70268
1332 * c.opt (-fmacro-prefix-map): New option.
1333 * c-opts.c (c_common_handle_option): Handle it.
1334 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1335 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1336
bb9869d5
DM
13372018-01-17 David Malcolm <dmalcolm@redhat.com>
1338
1339 PR c++/83814
1340 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1341
68dc87c3
EB
13422018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1343
1344 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1345 Skip 'f' and 'F' characters if it is true.
1346 (store_ada_macro): Minor tweak.
1347 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1348 <CPP_WSTRING>: Likewise.
1349 <CPP_STRING>: Output '&' in the buffer if not the first string.
1350 <CPP_NUMBER>: Adjust calls to dump_number.
1351
9a004410
DM
13522018-01-10 David Malcolm <dmalcolm@redhat.com>
1353
1354 PR c++/43486
1355 * c-common.c: Include "selftest.h".
1356 (get_atomic_generic_size): Perform the test for integral type
1357 before the range test for any integer constant, fixing indentation
1358 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1359 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1360 (selftest::test_fold_for_warn): New function.
1361 (selftest::c_common_c_tests): New function.
1362 (selftest::c_family_tests): Call it, and
1363 selftest::c_pretty_print_c_tests.
1364 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1365 * c-format.c (check_format_arg): Convert VAR_P check to a
1366 fold_for_warn.
1367 * c-pretty-print.c: Include "selftest.h".
1368 (pp_c_cast_expression): Don't print casts for location wrappers.
1369 (selftest::assert_c_pretty_printer_output): New function.
1370 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1371 (selftest::test_location_wrappers): New function.
1372 (selftest::c_pretty_print_c_tests): New function.
1373 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1374
5c0caeb3
RS
13752018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1376 Alan Hayward <alan.hayward@arm.com>
1377 David Sherwood <david.sherwood@arm.com>
1378
1379 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1380
73a699ae
RS
13812018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1382 Alan Hayward <alan.hayward@arm.com>
1383 David Sherwood <david.sherwood@arm.com>
1384
1385 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1386 as polynomial.
1387
928686b1
RS
13882018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1389 Alan Hayward <alan.hayward@arm.com>
1390 David Sherwood <david.sherwood@arm.com>
1391
1392 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1393 (convert_vector_to_array_for_subscript): Handle polynomial
1394 TYPE_VECTOR_SUBPARTS.
1395 (c_common_type_for_mode): Check valid_vector_subparts_p.
1396 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1397 VECTOR_CST_NELTS.
1398
85ec4feb
JJ
13992018-01-03 Jakub Jelinek <jakub@redhat.com>
1400
1401 Update copyright years.
1402
170a8bd6 14032017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1404 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1405
1406 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1407 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1408
18408e96
AO
14092017-12-22 Alexandre Oliva <aoliva@redhat.com>
1410
1411 PR debug/83527
1412 PR debug/83419
1413 * c-semantics.c (only_debug_stmts_after_p): New.
1414 (pop_stmt_list): Clear side effects in debug-only stmt list.
1415 Check for single nondebug stmt followed by debug stmts only.
1416
c12d20d4
AO
14172017-12-21 Alexandre Oliva <aoliva@redhat.com>
1418
1419 PR debug/83419
1420 * c-semantics.c (pop_stmt_list): Propagate side effects from
1421 single nondebug stmt to container list.
1422
01512446
JJ
14232017-12-19 Jakub Jelinek <jakub@redhat.com>
1424
1425 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1426 conditions with typical order conditions.
1427
82cfbd01
MP
14282017-12-18 Marek Polacek <polacek@redhat.com>
1429
1430 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1431 not in effect.
1432
99da11ec
MS
14332017-12-17 Martin Sebor <msebor@redhat.com>
1434
1435 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1436 an error for attribute warn_if_not_aligned.
1437
cc8bea0a
MS
14382017-12-16 Martin Sebor <msebor@redhat.com>
1439
1440 PR tree-optimization/78918
1441 * c-common.c (check_function_restrict): Avoid checking built-ins.
1442 * c.opt (-Wrestrict): Include in -Wall.
1443
4849deb1
JJ
14442017-12-15 Jakub Jelinek <jakub@redhat.com>
1445
1446 * c-attribs.c (c_common_attribute_table,
1447 c_common_format_attribute_table): Swap affects_type_identity
1448 and handler fields, adjust comments.
1449
c65e18d3
BE
14502017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1451
1452 * c.opt (Wcast-function-type): New warning option.
1453 * c-lex.c (get_fileinfo): Avoid warning.
1454 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1455
2004617a
QZ
14562017-12-14 Qing Zhao <qing.zhao@oracle.com>
1457
7365279f 1458 PR middle_end/79538
2004617a
QZ
1459 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1460 Adjust the size of buf1 and buf2, add a new buf to avoid
1461 format-overflow warning.
1462
96a95ac1
AO
14632017-12-12 Alexandre Oliva <aoliva@redhat.com>
1464
1465 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1466 subsequent statement list.
1467
5d9ae53d
MS
14682017-12-07 Martin Sebor <msebor@redhat.com>
1469
1470 PR c/81544
1471 PR c/81566
1472 * c-attribs.c (attr_aligned_exclusions): New array.
1473 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1474 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1475 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1476 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1477 (attr_warn_unused_result_exclusions): Same.
1478 (handle_hot_attribute, handle_cold_attribute): Simplify.
1479 (handle_const_attribute): Warn on function returning void.
1480 (handle_pure_attribute): Same.
1481 (handle_aligned_attribute): Diagnose conflicting attribute
1482 specifications.
1483 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1484
c79144f8
DM
14852017-12-06 David Malcolm <dmalcolm@redhat.com>
1486
1487 PR c/83236
1488 * c-common.c (selftest::c_family_tests): Call
1489 selftest::c_spellcheck_cc_tests.
1490 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1491 * c-spellcheck.cc: Include "selftest.h".
1492 (name_reserved_for_implementation_p): New function.
1493 (should_suggest_as_macro_p): New function.
1494 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1495 should_suggest_as_macro_p and call it.
1496 (selftest::test_name_reserved_for_implementation_p): New function.
1497 (selftest::c_spellcheck_cc_tests): New function.
1498 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1499
613bc14f
DM
15002017-12-06 David Malcolm <dmalcolm@redhat.com>
1501
1502 * c-spellcheck.cc: New file, taken from macro-handling code in
1503 spellcheck-tree.c.
1504 * c-spellcheck.h: New file, taken from macro-handling code in
1505 spellcheck-tree.h.
1506
e76c7157
JJ
15072017-12-01 Jakub Jelinek <jakub@redhat.com>
1508
1509 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1510 attribute.
1511 (handle_simd_attribute): Don't check for "cilk simd function"
1512 attribute. Reindent, formatting changes.
1513
b0da4034
JK
15142017-11-30 Julia Koval <julia.koval@intel.com>
1515
1516 * c-common.h (inv_list): Remove.
1517
058f0b9e
JJ
15182017-11-28 Jakub Jelinek <jakub@redhat.com>
1519
1520 PR sanitizer/81275
1521 * c-common.c (c_switch_covers_all_cases_p_1,
1522 c_switch_covers_all_cases_p): New functions.
1523 * c-common.h (c_switch_covers_all_cases_p): Declare.
1524
5e9d6aa4 15252017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1526 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1527
1528 * array-notation-common.c: Delete.
1529 * c-cilkplus.c: Ditto.
1530 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1531 * c-common.def (ARRAY_NOTATION_REF): Remove.
1532 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1533 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1534 c_validate_cilk_plus_loop, cilkplus_an_parts,
1535 cilk_ignorable_spawn_rhs_op,
1536 cilk_recognize_spawn): Remove.
1537 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1538 * c-omp.c: Remove CILK_SIMD check.
1539 * c-pragma.c: Ditto.
1540 * c-pragma.h: Remove CILK related pragmas.
1541 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1542 ARRAY_NOTATION_REF condition.
1543 (c_pretty_printer::expression): Ditto.
1544 * c.opt (fcilkplus): Remove.
1545 * cilk.c: Delete.
1546
1af4ebf5
MG
15472017-11-21 Marc Glisse <marc.glisse@inria.fr>
1548
1549 * c-pretty-print.c (pp_c_additive_expression,
1550 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1551
d44ed508
JJ
15522017-11-21 Jakub Jelinek <jakub@redhat.com>
1553
7d2f0f9b
JJ
1554 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1555
d44ed508
JJ
1556 PR c++/83059
1557 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1558 instead of tree_to_uhwi, formatting fix.
1559
26edace6
DM
15602017-11-20 David Malcolm <dmalcolm@redhat.com>
1561
1562 PR c/81404
1563 * known-headers.cc: New file, based on material from c/c-decl.c.
1564 (suggest_missing_header): Copied as-is.
1565 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1566 heavily edited to add C++ support. Add some knowledge about
1567 <limits.h>, <stdint.h>, and <wchar.h>.
1568 * known-headers.h: Likewise.
1569
6c7a259b
DM
15702017-11-20 David Malcolm <dmalcolm@redhat.com>
1571
1572 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1573 (lookup_name_fuzzy): Likewise. Convert return type from
1574 const char * to name_hint. Add location_t param.
1575 * name-hint.h: New header.
1576
f9c59f7e
JJ
15772017-11-19 Jakub Jelinek <jakub@redhat.com>
1578
1579 PR c/66618
1580 PR c/69960
1581 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1582
1e39313a
JM
15832017-11-16 Joseph Myers <joseph@codesourcery.com>
1584
1585 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1586 expected publication date of C17.
1587 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1588
3ca0dc60
JM
15892017-11-15 Joseph Myers <joseph@codesourcery.com>
1590
1591 PR c/81156
1592 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1593 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1594
025d57f0
MS
15952017-11-10 Martin Sebor <msebor@redhat.com>
1596
1597 PR c/81117
1598 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1599 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1600 * c.opt (-Wstringop-truncation): New option.
1601
1b6fa695
ML
16022017-11-06 Martin Liska <mliska@suse.cz>
1603
1604 PR middle-end/82404
1605 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1606 FE.
1607 * c.opt: Set default value of warn_return_type.
1608
64a5912c
DM
16092017-10-31 David Malcolm <dmalcolm@redhat.com>
1610
1611 * c-common.c (binary_op_error): Update for renaming of
1612 error_at_rich_loc.
1613 (c_parse_error): Likewise.
1614 * c-warn.c (warn_logical_not_parentheses): Likewise for
1615 renaming of inform_at_rich_loc.
1616 (warn_for_restrict): Likewise for renaming of
1617 warning_at_rich_loc_n.
1618
c76dc9c3
JM
16192017-10-30 Joseph Myers <joseph@codesourcery.com>
1620
1621 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1622 * c-opts.c (set_std_c17): New function.
1623 (c_common_init_options): Use gnu17 as default C version.
1624 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1625
ee5fd23a
MM
16262017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1627
1628 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1629 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1630 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1631 __FP_FAST_FMA<N>X.
1632
d1047465
MP
16332017-10-23 Marek Polacek <polacek@redhat.com>
1634
1635 PR c/82681
1636 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1637
9e878cf1
EB
16382017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1639
1640 * c-common.c (check_builtin_function_arguments): Also check arguments
1641 of __builtin_alloca_with_align_and_max.
1642
89b6abbb
DM
16432017-10-17 David Malcolm <dmalcolm@redhat.com>
1644
1645 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1646 rather than NULL to format_warning_va.
1647 (check_format_types): Likewise when calling format_type_warning.
1648 Remove code to extract source_ranges and source_range * in favor
1649 of just a location_t.
1650 (format_type_warning): Convert source_range * param to a
1651 location_t.
1652
39382c09
JJ
16532017-10-13 Jakub Jelinek <jakub@redhat.com>
1654
1655 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1656 [LR]SHIFT_EXPR.
1657
62e1c678
DM
16582017-10-12 David Malcolm <dmalcolm@redhat.com>
1659
1660 * c-common.c (enum missing_token_insertion_kind): New enum.
1661 (get_missing_token_insertion_kind): New function.
1662 (maybe_suggest_missing_token_insertion): New function.
1663 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1664
b90c9338
NS
16652017-10-11 Nathan Sidwell <nathan@acm.org>
1666
1667 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1668 (c_common_handle_option): Update incpath_kind names.
1669
3a266bcd
ML
16702017-10-11 Martin Liska <mliska@suse.cz>
1671
1672 PR sanitizer/82490
1673 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1674 Wattributes warning.
1675
8e6cdc90
RS
16762017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1677
1678 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1679 operating on trees as wide_ints.
1680 * c-common.c (pointer_int_sum): Likewise.
1681 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1682 * c-warn.c (match_case_to_enum_1): Likewise.
1683 (c_do_switch_warnings): Likewise.
1684 (maybe_warn_shift_overflow): Likewise.
1685
802b38c9
JJ
16862017-10-10 Jakub Jelinek <jakub@redhat.com>
1687
1688 PR c/82437
1689 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1690 instead of wide_int::from.
1691
4e34b338
JJ
16922017-10-06 Jakub Jelinek <jakub@redhat.com>
1693
1694 PR c/82437
1695 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1696 using to_widest use wide_int with the larger of the two precisions.
1697
4bc4b2b4
BE
16982017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1699
1700 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1701 functions.
1702
a1488398
RS
17032017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1704
1705 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1706 when combining the original unconverted comparison operands.
1707
01c9fb68
JJ
17082017-09-29 Jakub Jelinek <jakub@redhat.com>
1709
1710 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1711 attribute.
1712
6e3e8419
EB
17132017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1714
1715 * c-ada-spec.c (to_ada_name): Add index parameter.
1716 (pp_ada_tree_identifier): Likewise.
1717 (dump_ada_macros): Adjust call to to_ada_name.
1718 (struct overloaded_name_hash): New type.
1719 (struct overloaded_name_hasher): Likewise.
1720 (overloaded_names): New hash table.
1721 (compute_overloading_index): New function.
1722 (dump_ada_decl_name): Call it and pass the result to
1723 pp_ada_tree_identifier.
1724 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1725 (dump_ada_function_declaration): Likewise.
1726 (dump_generic_ada_node): Likewise.
1727 (print_constructor): Likewise.
1728 (print_destructor): Likewise.
1729 (dump_ada_specs): Delete overloaded_names table.
1730
79310774
EB
17312017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1732
1733 * c-ada-spec.c (max_ada_macros): Move around.
1734 (store_ada_macro_index): Likewise.
1735 (source_file): Rename into...
1736 (macro_source_file): ...this.
1737 (count_ada_macro): Move around.
1738 (store_ada_macro): Likewise.
1739 (compare_macro): Likewise.
1740 (print_ada_macros): Merge in...
1741 (dump_ada_macros): ...this.
1742 (source_file_base): Rename into...
1743 (current_source_file): ...this.
1744 (print_comment): Move around.
1745 (dump_ada_nodes): Call dump_ada_declaration directly.
1746 (struct with): Change type of limited field to bool.
1747 (append_withs): Change type of limited_access parameter to bool.
1748 (pp_ada_tree_identifie): Likewise.
1749 (dump_ada_decl_nam): Likewise.
1750 (dump_generic_ada_node): Likewise. Do not print the return type.
1751 (to_ada_name): Change type of space_found parameter to bool.
1752 (dump_ada_function_declaration): Return void and change type of
1753 parameters to bool. Also print the return type for a function.
1754 (print_ada_methods): Rename into...
1755 (dump_ada_methods): ...this.
1756 (print_ada_declaration): Rename into ...
1757 (dump_ada_declaration): ...this. Do not print the return type.
1758 (print_ada_struct_decl): Rename into...
1759 (dump_ada_struct_decl): ...this.
1760
7d386d45
JJ
17612017-09-29 Jakub Jelinek <jakub@redhat.com>
1762
1763 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1764 rather than DECL_INITIAL.
1765 (common_handle_aligned_attribute): Likewise.
1766
9ed32e27
AO
17672017-09-20 Alexandre Oliva <aoliva@redhat.com>
1768
1769 * c.opt (gen-decls): Add RejectNegative.
1770
026a79f7
AS
17712017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1772 Jakub Jelinek <jakub@redhat.com>
1773
1774 Add support for -std=c++2a.
1775 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1776 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1777 * c-opts.c (set_std_cxx2a): New.
1778 (c_common_handle_option): Set options when -std=c++2a is enabled.
1779 (c_common_post_options): Adjust comments.
1780 (set_std_cxx14, set_std_cxx17): Likewise.
1781
4a8ca690
EB
17822017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1783
1784 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1785 message for non-uniform endianness and issue a warning in C++.
1786
7b936140
JJ
17872017-09-15 Jakub Jelinek <jakub@redhat.com>
1788
1789 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1790 (Wc++17-compat): Change from undocumented alias to option.
1791 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1792 change C++1z to C++17 in description.
1793 (std=c++1z, std=gnu++1z): Change from option to undocumented
1794 deprecated alias.
1795 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1796 Adjust description.
1797 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1798 * c-opts.c (set_std_cxx1z): Rename to ...
1799 (set_std_cxx17): ... this.
1800 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1801 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1802 caller.
7b936140
JJ
1803 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1804 comments.
1805
12263f13
L
18062017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1807
1808 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1809 function alignment if warn_if_not_aligned_p is true.
1810
6836632e
NS
18112017-09-12 Nathan Sidwell <nathan@acm.org>
1812
1813 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1814 resort_sorted_fields): Move to c/c-decl.c.
1815 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1816 (struct sorted_fields_type): Move to c/c-lang.h.
1817
019bf9ad
JW
18182017-09-09 Jonathan Wakely <jwakely@redhat.com>
1819
1820 PR c++/81852
1821 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1822
bc7fe952
MP
18232017-09-04 Marek Polacek <polacek@redhat.com>
1824
1825 PR c/81783
1826 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1827 (warn_tautological_cmp): Call it.
1828
de7c2c6a
BK
18292017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1830
1831 * c-opts.c (c_common_finish): Write dependency information even if
1832 there are errors.
1833
d2e05fcb
JJ
18342017-09-01 Jakub Jelinek <jakub@redhat.com>
1835
1836 PR c/81887
1837 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1838 (omp_pragmas_simd): ... here.
1839 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1840 create new clauses list containing just simd clause.
1841
18e2a8b8
RS
18422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1843 Alan Hayward <alan.hayward@arm.com>
1844 David Sherwood <david.sherwood@arm.com>
1845
1846 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1847 into scalar_mode_supported_p call.
1848 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1849
16d22000
RS
18502017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1851 Alan Hayward <alan.hayward@arm.com>
1852 David Sherwood <david.sherwood@arm.com>
1853
1854 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1855 for the mode iterator.
1856
b397965c
RS
18572017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1858 Alan Hayward <alan.hayward@arm.com>
1859 David Sherwood <david.sherwood@arm.com>
1860
1861 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1862 * c-common.c (c_build_vec_perm_expr): Likewise.
1863
357b7604
RS
18642017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1865 Alan Hayward <alan.hayward@arm.com>
1866 David Sherwood <david.sherwood@arm.com>
1867
1868 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1869
e05c94ba
RS
18702017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1871 Alan Hayward <alan.hayward@arm.com>
1872 David Sherwood <david.sherwood@arm.com>
1873
1874 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1875 before calling targetm.addr_space.valid_pointer_mode.
1876
5c20c4af
RS
18772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1878 Alan Hayward <alan.hayward@arm.com>
1879 David Sherwood <david.sherwood@arm.com>
1880
1881 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1882
c94843d2 18832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
1884 Alan Hayward <alan.hayward@arm.com>
1885 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
1886
1887 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1888 iterators.
1889 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1890
4e10a5a7
RS
18912017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1892 Alan Hayward <alan.hayward@arm.com>
1893 David Sherwood <david.sherwood@arm.com>
1894
1895 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1896 case statements.
1897
130fcab0
ML
18982017-08-29 Martin Liska <mliska@suse.cz>
1899
1900 PR other/39851
1901 * c-common.c (parse_optimize_options): Add argument to function
1902 call.
1903 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1904
14e18d71
DM
19052017-08-24 David Malcolm <dmalcolm@redhat.com>
1906
1907 * c-lex.c (interpret_float): Use token location
1908 when building an EXCESS_PRECISION_EXPR.
1909
2f687306
DM
19102017-08-21 David Malcolm <dmalcolm@redhat.com>
1911
1912 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1913 it to check_function_format.
1914 * c-common.h (check_function_arguments): Add vec<location_t> *
1915 param.
1916 (check_function_format): Likewise.
1917 * c-format.c (struct format_check_context): Add field "arglocs".
1918 (check_function_format): Add param "arglocs"; pass it to
1919 check_format_info.
1920 (check_format_info): Add param "arglocs"; use it to initialize
1921 new field of format_ctx.
1922 (check_format_arg): Pass format_ctx->arglocs to new param of
1923 check_format_info_main.
1924 (class argument_parser): New field "arglocs".
1925 (argument_parser::argument_parser): Add "arglocs_" param and use
1926 it to initialize new field.
1927 (argument_parser::check_argument_type): Pass new arglocs field to
1928 check_format_types.
1929 (check_format_info_main): Add param "arglocs", and use it when
1930 constructing arg_parser.
1931 (check_format_types): Add param "arglocs"; use it if non-NULL when
1932 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1933
00aa1fa2
L
19342017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1935
1936 PR c/53037
1937 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1938 (c_common_attribute_table): Add warn_if_not_aligned.
1939 (handle_aligned_attribute): Renamed to ...
1940 (common_handle_aligned_attribute): Remove argument, name, and add
1941 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1942 (handle_aligned_attribute): New.
1943 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1944
27be025d
MS
19452017-08-14 Martin Sebor <msebor@redhat.com>
1946
1947 PR c/81117
1948 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1949 (handle_nonstring_attribute): New function.
1950
da67acb9
MS
19512017-08-14 Martin Sebor <msebor@redhat.com>
1952
1953 PR c/81117
1954 * c-format.h (T89_G): New macro.
1955 * c-format.c (local_gcall_ptr_node): New variable.
1956 (init_dynamic_diag_info): Initialize it.
1957
a8b522b4
ML
19582017-08-11 Martin Liska <mliska@suse.cz>
1959
1960 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1961 TARGET_SUPPORTS_ALIASES.
1962
32129a17
DM
19632017-08-10 David Malcolm <dmalcolm@redhat.com>
1964
1965 * c-common.c (c_parse_error): Add rich_location * param, using it
1966 rather implicitly using input_location.
1967 * c-common.h (c_parse_error): Add rich_location * param.
1968
30af3a2b
MP
19692017-08-09 Marek Polacek <polacek@redhat.com>
1970
1971 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1972 (c_common_truthvalue_conversion): Likewise.
1973 * c-omp.c (c_finish_omp_atomic): Likewise.
1974 * c-common.h (build_binary_op): Update declaration.
1975
314e6352
ML
19762017-08-08 Martin Liska <mliska@suse.cz>
1977
1978 * c-ada-spec.c: Include header files.
1979 * c-ubsan.c: Likewise.
1980 * c-warn.c: Likewise.
1981
56b5041c
JJ
19822017-08-07 Jakub Jelinek <jakub@redhat.com>
1983
1984 PR c/69389
1985 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1986
db440138
EB
19872017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1988
1989 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1990 (print_ada_methods): Likewise.
1991 (print_ada_declaration): Likewise.
1992
577eec56
ML
19932017-08-07 Martin Liska <mliska@suse.cz>
1994
1995 * array-notation-common.c: Add new includes.
1996 * c-format.c( handle_format_attribute): Canonicalize a format
1997 function name.
1998 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1999 attribute.
2000 * c-pretty-print.c: Add new include.
2001
b854df3c
EB
20022017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2003
2004 * c-ada-spec.c (has_static_fields): Look only into variables.
2005 (print_constructor): Add TYPE parameter and use it for the name.
2006 (print_destructor): Likewise.
2007 (print_ada_declaration): Adjust to new constructor/destructor names.
2008 Adjust calls to print_constructor and print_destructor.
2009 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2010 Look only into variables in the final loop.
2011
9f2cb25e
EB
20122017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2013
2014 * c-ada-spec.c (has_static_fields): Look only into fields.
2015 (dump_generic_ada_node): Small tweak.
2016 (dump_nested_types): Look only into fields.
2017 (print_ada_declaration): Look only into methods. Small tweak.
2018 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2019
f4bcd9eb
EB
20202017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2021
2022 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2023 (dump_ada_function_declaration): Likewise.
2024 (dump_generic_ada_node): Likewise.
2025 (print_ada_declaration): Add support for const-qualified variables.
2026
f34ebeb2
ML
20272017-07-31 Martin Liska <mliska@suse.cz>
2028
2029 PR sanitize/81530
2030 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2031 Guard condition with flag_sanitize_p also with current_function_decl
2032 non-null equality.
2033 (ubsan_maybe_instrument_reference_or_call): Likewise.
2034
218e5d04
UB
20352017-07-30 Uros Bizjak <ubizjak@gmail.com>
2036
2037 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2038
942047f2
EB
20392017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2040
2041 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2042 for enumeral types.
2043 (print_ada_declaration): Add missing guard for record types.
2044
a40ff0ae
JJ
20452017-07-27 Jakub Jelinek <jakub@redhat.com>
2046
2047 PR c/45784
2048 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2049 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2050 new COMPOUND_EXPRs around the rhs of the comparison.
2051
06bd22f6
MP
20522017-07-27 Marek Polacek <polacek@redhat.com>
2053
2054 PR c/81417
2055 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2056 the types.
2057
036ea399
JJ
20582017-07-27 Jakub Jelinek <jakub@redhat.com>
2059
2060 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2061 (handle_noipa_attribute): New function.
2062
417ca011
TD
20632017-07-07 Torsten Duwe <duwe@suse.de>
2064
2065 * c-attribs.c (c_common_attribute_table): Add entry for
2066 "patchable_function_entry".
2067
5aaa8fb4
NS
20682017-07-20 Nathan Sidwell <nathan@acm.org>
2069
2070 Remove TYPE_METHODS.
2071 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2072 dump_ada_template, print_ada_methods,
2073 print_ada_declaration): Member fns are on TYPE_FIELDS.
2074
ff22eb12
NS
20752017-07-18 Nathan Sidwell <nathan@acm.org>
2076
2077 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2078
eea77d1f
DM
20792017-07-14 David Malcolm <dmalcolm@redhat.com>
2080
2081 * c-common.c (try_to_locate_new_include_insertion_point): New
2082 function.
2083 (per_file_includes_t): New typedef.
2084 (added_includes_t): New typedef.
2085 (added_includes): New variable.
2086 (maybe_add_include_fixit): New function.
2087 * c-common.h (maybe_add_include_fixit): New decl.
2088
281ac396
MS
20892017-07-10 Martin Sebor <msebor@redhat.com>
2090
2091 PR other/81345
2092 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2093
b6f43128
DM
20942017-07-06 David Malcolm <dmalcolm@redhat.com>
2095
2096 * c-common.c (selftest::c_family_tests): New.
2097 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2098 (selftest::c_family_tests): New decl.
2099
efbf55b0
MP
21002017-07-04 Marek Polacek <polacek@redhat.com>
2101
2102 PR c/81231
2103 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2104 types.
2105
6c86bd88
MP
21062017-07-04 Marek Polacek <polacek@redhat.com>
2107
2108 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2109
17a7218b
ML
21102017-06-28 Martin Liska <mliska@suse.cz>
2111
2112 PR ipa/81128
2113 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2114 to a function declaration.
2115
63010089
ML
21162017-06-28 Martin Liska <mliska@suse.cz>
2117
2118 PR driver/79659
2119 * c.opt: Add IntegerRange to various options.
2120
3e2becc4
MP
21212017-06-26 Marek Polacek <polacek@redhat.com>
2122
2123 PR c/80116
2124 * c-common.h (warn_for_multistatement_macros): Declare.
2125 * c-warn.c: Include "c-family/c-indentation.h".
2126 (warn_for_multistatement_macros): New function.
2127 * c.opt (Wmultistatement-macros): New option.
2128 * c-indentation.c (guard_tinfo_to_string): No longer static.
2129 Change the parameter type to "enum rid". Handle RID_SWITCH.
2130 * c-indentation.h (guard_tinfo_to_string): Declare.
2131
2db9b7cd
MG
21322017-06-23 Marc Glisse <marc.glisse@inria.fr>
2133
2134 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2135
c3684b7b
MS
21362017-06-15 Martin Sebor <msebor@redhat.com>
2137
2138 PR c++/80560
2139 * c.opt (-Wclass-memaccess): New option.
2140
e72c4afd
BK
21412017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2142
2143 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2144
8a516588
MP
21452017-06-13 Marek Polacek <polacek@redhat.com>
2146
2147 PR objc/80949
2148 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2149 branches is null.
2150
45b2222a
ML
21512017-06-13 Martin Liska <mliska@suse.cz>
2152
2153 PR sanitize/78204
2154 * c-attribs.c (add_no_sanitize_value): New function.
2155 (handle_no_sanitize_attribute): Likewise.
2156 (handle_no_sanitize_address_attribute): Use the function.
2157 (handle_no_sanitize_thread_attribute): New function.
2158 (handle_no_address_safety_analysis_attribute): Use
2159 add_no_sanitize_value.
2160 (handle_no_sanitize_undefined_attribute): Likewise.
2161 * c-common.h: Declare new functions.
2162 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2163 (ubsan_instrument_shift): Likewise.
2164 (ubsan_instrument_bounds): Likewise.
2165 (ubsan_maybe_instrument_array_ref): Likewise.
2166 (ubsan_maybe_instrument_reference_or_call): Likewise.
2167
a01f151f
JM
21682017-06-11 Jason Merrill <jason@redhat.com>
2169
2170 * c-ada-spec.c, c-pragma.c: Use id_equal.
2171
3de4ac6d
MP
21722017-06-04 Marek Polacek <polacek@redhat.com>
2173
2174 PR c/80919
2175 * c-format.c (matching_type_p): Return false if any of the types
2176 requires structural equality.
2177
2474f48f
MS
21782017-06-02 Martin Sebor <msebor@redhat.com>
2179
2180 PR c/80892
2181 * c-warn.c (conversion_warning): Use -Wconversion for integer
2182 conversion and -Wfloat-conversion for floating one.
2183
40ffd95f
BE
21842017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2185
2186 * c.opt (Wsizeof-pointer-div): New warning option.
2187
3fa4634c
VR
21882017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2189
2190 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2191 (Wcatch-value=1): Enable by -Wall.
2192
f012c8ef
DM
21932017-05-30 David Malcolm <dmalcolm@redhat.com>
2194
2195 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2196 format_chars.
2197 * c.opt (fdiagnostics-show-template-tree): New option.
2198 (felide-type): New option.
2199
63dbcd13
VR
22002017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2201
2202 * c.opt (Wcatch-value=): New C++ warning flag.
2203
be136b5c
NS
22042017-05-24 Nathan Sidwell <nathan@acm.org>
2205
2206 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2207 const casts to avoid warning.
2208
3cd211af
MS
22092017-05-24 Martin Sebor <msebor@redhat.com>
2210
2211 PR c/80731
2212 * c-common.h (unsafe_conversion_p): Add a function argument.
2213 * c-common.c (unsafe_conversion_p): Same.
2214 Add type names and values to diagnostics.
2215 (scalar_to_vector): Adjust.
2216 * c-warn.c (constant_expression_error): Add a function argument.
2217 Add type names and values to diagnostics.
2218 (conversion_warning): Add a function argument.
2219 Add type names and values to diagnostics.
2220 (warnings_for_convert_and_check): Same.
2221
1ff7be5a
JM
22222017-05-19 Jason Merrill <jason@redhat.com>
2223
2224 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2225 enumerators.
2226
ff502317
BE
22272017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2228
2229 * c-format.c (locus): Move out of function scope,
2230 add GTY attribute.
2231
2a8a8d7b
NS
22322017-05-19 Nathan Sidwell <nathan@acm.org>
2233
2234 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2235 (c_common_parse_file): Remove class dump handling.
2236 (get_dump_info): Likewise.
2237
39aac208
RB
22382017-05-19 Richard Biener <rguenther@suse.de>
2239
2240 PR c++/80593
2241 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2242 to alias-set zero memory.
2243
6ecd2339
BE
22442017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2245
2246 * c-format.c (local_tree_type_node): Add GTY attribute.
2247
6574d78e
MP
22482017-05-18 Marek Polacek <polacek@redhat.com>
2249
2250 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2251 (c_common_fixed_point_type_for_size): Likewise.
2252 (c_common_type_for_mode): Likewise.
2253 (shorten_compare): Likewise.
2254 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2255 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2256
e3455240
MP
22572017-05-18 Marek Polacek <polacek@redhat.com>
2258
2259 * c-common.c (self_promoting_args_p): Change the return type to bool.
2260 Use false/true instead of 0/1.
2261 * c-common.h (self_promoting_args_p): Update.
2262
3fa8871b
MP
22632017-05-17 Marek Polacek <polacek@redhat.com>
2264
2265 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2266 * c-warn.c: Likewise.
2267
b42cc3ca
VV
22682017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2269
2270 Implement new C++ intrinsics __is_assignable and __is_constructible.
2271 * c-common.c (__is_assignable, __is_constructible): New.
2272 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2273
1a817418
ML
22742017-05-17 Martin Liska <mliska@suse.cz>
2275
2276 * c-common.h: Introduce dump_flags_t type and
2277 use it instead of int type.
2278 * c-gimplify.c (c_genericize): Likewise.
2279 * c-opts.c: Likewise.
2280
b2fa0a8b
MP
22812017-05-17 Marek Polacek <polacek@redhat.com>
2282
2283 * c-common.c (c_save_expr): Remove.
2284 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2285 * c-common.h (c_save_expr): Remove declaration.
2286
31c2d57d
VR
22872017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2288
2289 PR c/35441
2290 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2291 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2292 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2293 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2294 RDIV_EXPR.
2295 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2296
684f84de
MP
22972017-05-09 Marek Polacek <polacek@redhat.com>
2298
2299 PR c/80525
2300 * c-warn.c (unwrap_c_maybe_const): New.
2301 (warn_logical_operator): Call it.
2302
641da50a
NS
23032017-05-09 Nathan Sidwell <nathan@acm.org>
2304
2305 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2306 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2307
631238ac
MS
23082017-05-08 Martin Sebor <msebor@redhat.com>
2309
2310 PR translation/80280
2311 * c-format.h (struct format_flag_spec): Add new member.
2312 (T89_T): New macro.
2313 * c-format.c (local_tree_type_node): New global.
2314 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2315 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2316 (strfmon_flag_specs): Likewise.
2317 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2318 with distinct quoting properties.
2319 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2320 (flag_chars_t::validate): Add argument and handle bad quoting.
2321 (check_format_info_main): Handle quoting problems.
2322 (init_dynamic_diag_info): Simplify.
2323
49f0c04c
JM
23242017-05-08 Jason Merrill <jason@redhat.com>
2325
2326 * c-opts.c (c_common_post_options): Update defaults for
2327 flag_abi_version and flag_abi_compat_version.
2328
56d35585
DM
23292017-05-05 David Malcolm <dmalcolm@redhat.com>
2330
2331 * c-common.c (c_cpp_error): Replace report_diagnostic
2332 with diagnostic_report_diagnostic.
2333
0f2c4a8f
MS
23342017-05-04 Martin Sebor <msebor@redhat.com>
2335
2336 PR translation/80280
2337 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2338 (handle_weakref_attribute): Same.
2339
6fe63fb4
NS
23402017-05-03 Nathan Sidwell <nathan@acm.org>
2341
2342 Canonicalize canonical type hashing
2343 * c-common.c (complete_array_type): Use type_hash_canon.
2344
815d9cc6
XR
23452017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2346
92a285c1 2347 PR c++/80038
815d9cc6
XR
2348 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2349 prototype.
2350 (cilk_install_body_pedigree_operations): Likewise.
2351 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2352 detatched.
2353 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2354 (cilk_install_body_pedigree_operations): Likewise.
2355 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2356 unwrapping.
2357
f8a36447
JJ
23582017-04-27 Jakub Jelinek <jakub@redhat.com>
2359
2360 PR c++/80534
2361 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2362 flag on non-aggregate element types.
2363
7c145456
BE
23642017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2365
2366 * c-common.c (c_type_hasher, type_hash_table): Remove.
2367 (c_common_get_alias_set): Remove unreachable code.
2368 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2369
c3cbcd45
VR
23702017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2371
2372 * c.opt (Wextra-semi): New C++ warning flag.
2373
8a59d466
JJ
23742017-04-20 Jakub Jelinek <jakub@redhat.com>
2375
2376 PR middle-end/80423
2377 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2378
8487c9a5
JJ
23792017-04-18 Jakub Jelinek <jakub@redhat.com>
2380
2381 PR middle-end/79788
2382 PR middle-end/80375
2383 * c-common.c (c_common_type_for_mode): Don't handle
2384 widest_*_literal_type_node here.
2385 c_common_signed_or_unsigned_type): Likewise.
2386 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2387 to *intTI_type_node or *intDI_type_node depending on whether
2388 TImode is supported by the target or not.
2389
3ee0fb02
ML
23902017-04-10 Martin Liska <mliska@suse.cz>
2391
2392 PR sanitizer/80350
2393 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2394 doing an UBSAN check.
2395
5764ee3c
JW
23962017-04-03 Jonathan Wakely <jwakely@redhat.com>
2397
2398 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2399
6f3af356
JJ
24002017-03-31 Jakub Jelinek <jakub@redhat.com>
2401
2402 PR c++/79572
2403 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2404 tree *.
2405 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2406 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2407 REFERENCE_TYPE.
2408
f6a7a9d5
DM
24092017-03-31 David Malcolm <dmalcolm@redhat.com>
2410
2411 PR documentation/78732
2412 * c.opt (Wendif-labels): Fix description to refer to
2413 #else rather than #elif.
2414
af88f557
JJ
24152017-03-31 Jakub Jelinek <jakub@redhat.com>
2416
2417 PR libstdc++/80251
2418 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2419 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2420
a9e4a1a5
JJ
24212017-03-27 Jakub Jelinek <jakub@redhat.com>
2422
2423 PR middle-end/80162
2424 * c-common.c (c_common_mark_addressable_vec): Don't set
2425 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2426
3f01b620
MS
24272017-03-21 Martin Sebor <msebor@redhat.com>
2428
2429 PR c++/79548
2430 * c-common.c (set_underlying_type): Mark type used only when
2431 original del is declared unused.
2432
2f6f187a
DM
24332017-03-10 David Malcolm <dmalcolm@redhat.com>
2434
2435 PR translation/79848
2436 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2437 "%qs".
2438
a02fa805
DM
24392017-03-10 David Malcolm <dmalcolm@redhat.com>
2440
2441 PR c/79921
2442 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2443 from inform's message, so that xgettext can locate it.
2444
822a132c
MP
24452017-03-09 Marek Polacek <polacek@redhat.com>
2446
2447 PR c++/79962
2448 PR c++/79984
2449 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2450 conversion to the attribute list.
2451
bba81f1c
ML
24522017-03-09 Martin Liska <mliska@suse.cz>
2453
2454 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2455
108154ff
JM
24562017-03-03 Jason Merrill <jason@redhat.com>
2457
2458 * c.opt (Wnoexcept-type): New.
2459
eb0e7c34
RB
24602017-03-02 Richard Biener <rguenther@suse.de>
2461
2462 PR c/79756
2463 * c-common.c (c_common_mark_addressable_vec): Look through
2464 C_MAYBE_CONST_EXPR.
2465
9453ba0a
ML
24662017-02-28 Martin Liska <mliska@suse.cz>
2467
2468 * c.opt: Replace space with tabular for options of <number>
2469 type.
2470
6a825afe
ML
24712017-02-28 Martin Liska <mliska@suse.cz>
2472
2473 * c.opt: Fix --help=option -Q for options which are of
2474 an enum type.
2475
4227c9ad
JJ
24762017-02-24 Jakub Jelinek <jakub@redhat.com>
2477
2478 PR c++/79588
2479 * c-common.c (check_function_restrict): New function.
2480 (check_function_arguments): Add FNDECL argument. Call
2481 check_function_restrict if -Wrestrict.
2482 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2483 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2484 * c-common.h (check_function_arguments): Add FNDECL argument.
2485 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2486
59909673
EB
24872017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2488
2489 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2490 treatment of parameters with pointer-to-tagged type and tidy up.
2491 (print_ada_methods): Remove the special treatment of C++ static member
2492 functions.
2493
54dcd526
ML
24942017-02-22 Martin Liska <mliska@suse.cz>
2495
2496 * c.opt: Replace inequality signs with square brackets
2497 for -Wnornalized.
2498
00bc9de3
JJ
24992017-02-21 Jakub Jelinek <jakub@redhat.com>
2500
2501 PR c++/79641
2502 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2503 preserve quals.
2504
97fcf744
JM
25052017-02-17 Joseph Myers <joseph@codesourcery.com>
2506
2507 * c-cppbuiltin.c (builtin_define_float_constants): Define
2508 __DECIMAL_DIG__ to the value for long double.
2509
c7545f1c
MP
25102017-02-15 Marek Polacek <polacek@redhat.com>
2511
2512 PR c/79515
2513 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2514 conversion has occured.
2515
c2e84327
DM
25162017-01-24 David Malcolm <dmalcolm@redhat.com>
2517
2518 * c-common.c (c_common_reswords): Add "__RTL".
2519 * c-common.h (enum rid): Add RID_RTL.
2520
2ebd93e1
MP
25212017-01-20 Marek Polacek <polacek@redhat.com>
2522
2523 PR c/64279
2524 * c-common.h (do_warn_duplicated_branches_r): Declare.
2525 * c-gimplify.c (c_genericize): Walk the function tree calling
2526 do_warn_duplicated_branches_r.
2527 * c-warn.c (expr_from_macro_expansion_r): New.
2528 (do_warn_duplicated_branches): New.
2529 (do_warn_duplicated_branches_r): New.
2530 * c.opt (Wduplicated-branches): New option.
2531
0d80ab91
DM
25322017-01-17 David Malcolm <dmalcolm@redhat.com>
2533
2534 PR c++/71497
2535 * c-indentation.c (warn_for_misleading_indentation): Use the past
2536 subjunctive in the note.
2537
7f991c36
AH
25382017-01-17 Aldy Hernandez <aldyh@redhat.com>
2539
2540 PR c/79116
2541 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2542 start type to integer_type.
2543
1c70261c
JJ
25442017-01-16 Jakub Jelinek <jakub@redhat.com>
2545
2546 PR driver/49726
2547 * c.opt (gen-decls): Add Driver flag.
2548
1ddca3f3
PC
25492017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2550
2551 Revert:
2552 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2553
2554 PR c++/71737
2555 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2556
7d2f3f1d
PC
25572017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2558
2559 PR c++/71737
2560 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2561
bce6f760
MS
25622017-01-12 Martin Sebor <msebor@redhat.com>
2563
2564 (-Wformat-overflow): ...to this.
2565
bf5fbf46
MS
25662017-01-11 Martin Sebor <msebor@redhat.com>
2567
2568 PR c/78768
2569 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2570 Also enable for LTO.
2571
e363df3f
JM
25722017-01-10 Jason Merrill <jason@redhat.com>
2573
2574 Implement P0195R2, C++17 variadic using.
2575 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2576
bd2c6270
JJ
25772017-01-09 Jakub Jelinek <jakub@redhat.com>
2578
2579 PR translation/79019
2580 PR translation/79020
2581 * c.opt (Wnormalized=): Fix typo in description.
2582
efcc8d38
MS
25832017-01-08 Martin Sebor <msebor@redhat.com>
2584
2585 PR middle-end/77708
2586 * c.opt (-Wformat-truncation): New option.
2587
435f3f7a
AO
25882017-01-06 Alexandre Oliva <aoliva@redhat.com>
2589
2590 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2591 value to unsigned short to fit in 4 hex digits without
2592 warnings.
2593
4e89adf9
EB
25942017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2595
2596 * c.opt (fsso-struct): Add 'native' value.
2597
cd445b54
ML
25982017-01-05 Martin Liska <mliska@suse.cz>
2599
2600 PR pch/78970
2601 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2602 header.
2603
a9342885
MP
26042017-01-04 Marek Polacek <polacek@redhat.com>
2605
2606 PR c++/64767
2607 * c.opt (Wpointer-compare): New option.
2608
fc73e60c
JJ
26092017-01-04 Jakub Jelinek <jakub@redhat.com>
2610
2611 PR driver/78957
2612 * c.opt (fsso-struct=): Add RejectNegative.
2613
cbe34bb5
JJ
26142017-01-01 Jakub Jelinek <jakub@redhat.com>
2615
2616 Update copyright years.
2617
d4a6c0ea
ML
26182016-12-29 Martin Liska <mliska@suse.cz>
2619
2620 PR c/78933
2621 * c.opt (strong-eval-order): Add RejectNegative keyword.
2622
67a5ad7c
JM
26232016-12-22 Jason Merrill <jason@redhat.com>
2624
2625 Implement P0522R0, matching of template template arguments.
2626 * c-cppbuiltin.c (c_cpp_builtins): Define
2627 __cpp_template_template_args.
2628
0dba7960
JJ
26292016-12-21 Jakub Jelinek <jakub@redhat.com>
2630
2631 PR bootstrap/78817
2632 * c-common.c (struct nonnull_arg_ctx): New type.
2633 (check_function_nonnull): Return bool instead of void. Use
2634 nonnull_arg_ctx as context rather than just location_t.
2635 (check_nonnull_arg): Adjust for the new context type, set
2636 warned_p to true if a warning has been diagnosed.
2637 (check_function_arguments): Return bool instead of void.
2638 * c-common.h (check_function_arguments): Adjust prototype.
2639
31bfc9b9
JM
26402016-12-21 Jason Merrill <jason@redhat.com>
2641
2642 * c.opt (-fnew-ttp-matching): New flag.
2643 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2644
629b3d75
MJ
26452016-12-14 Martin Jambor <mjambor@suse.cz>
2646
2647 * c-omp.c: Include omp-general.h instead of omp-low.h.
2648 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2649 name.
2650
474da67e
MS
26512016-12-14 Martin Sebor <msebor@redhat.com>
2652
2653 PR c/17308
2654 * c-common.c (check_nonnull_arg): Disable when optimization
2655 is enabled.
2656
fe366b87
MP
26572016-12-12 Marek Polacek <polacek@redhat.com>
2658
2659 PR c++/78647
2660 * c-common.c (attribute_fallthrough_p): Return false for
2661 error_mark_node.
2662
8bd9f164
MS
26632016-12-08 Martin Sebor <msebor@redhat.com>
2664
2665 PR c/78284
2666 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2667
060162e0
MS
26682016-12-08 Martin Sebor <msebor@redhat.com>
2669
2670 PR c/78165
92a285c1
ML
2671 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2672 suffix.
060162e0 2673
ee92e7ba
MS
26742016-12-07 Martin Sebor <msebor@redhat.com>
2675
2676 PR c/53562
2677 PR middle-end/77784
2678 PR middle-end/78149
2679 PR middle-end/78138
2680 * c.opt (-Wstringop-overflow): New option.
2681
84b0769e
MO
26822016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2683
2684 * c-attribs.c (asan odr indicator): New attribute.
2685 (handle_asan_odr_indicator_attribute): New function.
2686
7fa6a965
PK
26872016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2688
2689 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2690 ptrdiff_type_node;
2691
56d8ffc1
JG
26922016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2693
2694 * c-common.c (excess_precision_mode_join): New.
2695 (c_ts18661_flt_eval_method): New.
2696 (c_c11_flt_eval_method): Likewise.
2697 (c_flt_eval_method): Likewise.
2698 * c-common.h (excess_precision_mode_join): New.
2699 (c_flt_eval_method): Likewise.
2700 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2701 (cpp_iec_559_value): Call it.
2702 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2703 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2704 __FLT_EVAL_METHOD_TS_18661_3__.
2705
04f0fcf7
JG
27062016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2707
2708 * c-opts.c (c_common_post_options): Add logic to handle the default
2709 case for -fpermitted-flt-eval-methods.
2710
fb2675cb
PB
27112016-11-23 Paolo Bonzini <bonzini@gnu.org>
2712
2713 * c.opt (Wexpansion-to-defined): New.
2714
ec1c5694
JJ
27152016-11-23 Jakub Jelinek <jakub@redhat.com>
2716
2717 PR target/78451
2718 * c-pragma.c (handle_pragma_target): Don't replace
2719 current_target_pragma, but chainon the new args to the current one.
2720
730c9e75
NS
27212016-11-22 Nathan Sidwell <nathan@acm.org>
2722
2723 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2724 indentation and formatting.
730c9e75 2725
89990732
MS
27262016-11-21 Martin Sebor <msebor@redhat.com>
2727
2728 * c.opt (-fprintf-return-value): Enable by default.
2729
48330c93
BE
27302016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2731
2732 PR c++/71973
2733 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2734 * c-common.c (c_common_nodes_and_builtins): Initialize
2735 const_tm_ptr_type_node.
2736
0d939c95
MP
27372016-11-16 Marek Polacek <polacek@redhat.com>
2738
2739 PR c/78285
2740 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2741
8e745a17
JJ
27422016-11-14 Jakub Jelinek <jakub@redhat.com>
2743
2744 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2745
1ee62b92 27462016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2747 Richard Biener <rguenther@suse.de>
2748
2749 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2750 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2751 * c.opt (fgimple): New option.
1ee62b92 2752
22b15758
UB
27532016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2754
2755 PR c/35503
2756 * c-common.h (warn_for_restrict): Declare.
2757 * c-warn.c: Include gcc-rich-location.h.
2758 (warn_for_restrict): New function.
2759 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2760 (gcc_cdiag_char_table): Likewise.
2761 (gcc_cxxdiag_char_table): Likewise.
2762 * c.opt (Wrestrict): New option.
2763
4be719cd
EB
27642016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2765
2766 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2767 for nested types only if the type is a record or union and dump SLOC.
2768
4a826ca6
JM
27692016-11-09 Jason Merrill <jason@redhat.com>
2770
2771 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2772
2e955d50
JJ
27732016-11-09 Jakub Jelinek <jakub@redhat.com>
2774
2775 * c-ubsan.c (ubsan_instrument_shift): Handle split
2776 -fsanitize=shift-base and -fsanitize=shift-exponent.
2777
51dc6603
JM
27782016-11-07 Jason Merrill <jason@redhat.com>
2779
2780 * c.opt (Wc++1z-compat): New.
2781 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2782
6dc4a604
ML
27832016-11-07 Martin Liska <mliska@suse.cz>
2784
2785 * c-warn.c (warn_for_unused_label): Save all labels used
2786 in goto or in &label.
2787
b302001e
JM
27882016-11-03 Jason Merrill <jason@redhat.com>
2789
2790 * c-cppbuiltin.c (c_cpp_builtins): Correct
2791 __cpp_inheriting_constructors.
2792
31f7f784
JM
27932016-11-01 Jason Merrill <jason@redhat.com>
2794
2bc78e3c
JM
2795 * c-cppbuiltin.c (c_cpp_builtins): Update
2796 __cpp_inheriting_constructors.
2797
31f7f784
JM
2798 * c.opt (-fnew-inheriting-ctors): New.
2799 * c-opts.c: Default to on for ABI 11+.
2800
dcb466ec
JJ
28012016-10-31 Jakub Jelinek <jakub@redhat.com>
2802
2803 PR c++/77948
2804 * c.opt (fext-numeric-literals): Add Var and Init.
2805 * c-opts.c (c_common_handle_option): Don't clear
2806 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2807 (c_common_post_options): Clear it here if not set
2808 explicitly.
2809
52e1b91e
AH
28102016-10-28 Aldy Hernandez <aldyh@redhat.com>
2811
2812 PR debug/77773
2813 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2814 if NULL.
2815
e16f1cc7
JJ
28162016-10-25 Jakub Jelinek <jakub@redhat.com>
2817
2818 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2819 * c-common.c (c_common_reswords): Add __builtin_launder.
2820
f8348061
BE
28212016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2822
2823 * c-common.c (c_common_truthvalue_conversion): Warn for
2824 multiplications in boolean context. Fix the quoting of '<<' and '<'
2825 in the shift warning.
2826
eff89e01
BE
28272016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2828
2829 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2830
24bc7bf4
JM
28312016-10-20 Jason Merrill <jason@redhat.com>
2832
2833 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2834
4c712374
BE
28352016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2836
2837 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2838 integer shift ops in boolean context.
2839
28402016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2841
2842 * c.opt (Walloca): New.
2843 (Walloca-larger-than=): New.
2844 (Wvla-larger-than=): New.
2845
8fa18c06
MP
28462016-10-17 Marek Polacek <polacek@redhat.com>
2847
2848 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2849 Return immediately when finding a match.
2850 (warn_tautological_cmp): Remove a boolean variable that is no longer
2851 needed.
2852
b12b1915
MP
28532016-10-17 Marek Polacek <polacek@redhat.com>
2854
2855 * c-attribs.c: New file.
2856 * c-common.c: Move attributes handling to c-attribs.c.
2857 (get_nonnull_operand): No longer static.
2858 * c-common.h: Move the declarations from c-attribs.c to its own section.
2859
2045acd9
JM
28602016-10-14 Jason Merrill <jason@redhat.com>
2861
2862 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2863 and __cpp_deduction_guides.
2864
14a2c9aa
JM
28652016-10-13 Jason Merrill <jason@redhat.com>
2866
2867 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2868
4d0cdd0c
TP
28692016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2870
2871 * c-cppbuiltin.c: Include memmodel.h.
2872 * c-opts.c: Likewise.
2873 * c-pragma.c: Likewise.
2874 * c-warn.c: Likewise.
2875
70f6d5e1
JJ
28762016-10-12 Jakub Jelinek <jakub@redhat.com>
2877
2878 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2879 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2880 * c-opts.c (sanitize_cpp_opts): Initialize
2881 cpp_opts->cpp_warn_implicit_fallthrough.
2882
78f61294
MP
28832016-10-11 Marek Polacek <polacek@redhat.com>
2884
2885 * c-common.c (warning_candidate_p): Change the return type to bool
2886 and return true/false instead of 1/0.
2887 (vector_mode_valid_p): Likewise.
2888
038b5cc0
MP
28892016-10-11 Marek Polacek <polacek@redhat.com>
2890
2891 * c-common.c (fold_for_warn): No longer static.
2892 (bool_promoted_to_int_p): Likewise.
2893 (c_common_get_narrower): Likewise.
2894 (constant_expression_warning): Move to c-warn.c.
2895 (constant_expression_error): Likewise.
2896 (overflow_warning): Likewise.
2897 (warn_logical_operator): Likewise.
2898 (find_array_ref_with_const_idx_r): Likewise.
2899 (warn_tautological_cmp): Likewise.
2900 (expr_has_boolean_operands_p): Likewise.
2901 (warn_logical_not_parentheses): Likewise.
2902 (warn_if_unused_value): Likewise.
2903 (strict_aliasing_warning): Likewise.
2904 (sizeof_pointer_memaccess_warning): Likewise.
2905 (check_main_parameter_types): Likewise.
2906 (conversion_warning): Likewise.
2907 (warnings_for_convert_and_check): Likewise.
2908 (match_case_to_enum_1): Likewise.
2909 (match_case_to_enum): Likewise.
2910 (c_do_switch_warnings): Likewise.
2911 (warn_for_omitted_condop): Likewise.
2912 (readonly_error): Likewise.
2913 (lvalue_error): Likewise.
2914 (invalid_indirection_error): Likewise.
2915 (warn_array_subscript_with_type_char): Likewise.
2916 (warn_about_parentheses): Likewise.
2917 (warn_for_unused_label): Likewise.
2918 (warn_for_div_by_zero): Likewise.
2919 (warn_for_memset): Likewise.
2920 (warn_for_sign_compare): Likewise.
2921 (do_warn_double_promotion): Likewise.
2922 (do_warn_unused_parameter): Likewise.
2923 (record_locally_defined_typedef): Likewise.
2924 (maybe_record_typedef_use): Likewise.
2925 (maybe_warn_unused_local_typedefs): Likewise.
2926 (maybe_warn_bool_compare): Likewise.
2927 (maybe_warn_shift_overflow): Likewise.
2928 (warn_duplicated_cond_add_or_warn): Likewise.
2929 (diagnose_mismatched_attributes): Likewise.
2930 * c-common.h: Move the declarations from c-warn.c to its own section.
2931 * c-warn.c: New file.
2932
627be19f
JM
29332016-10-08 Jason Merrill <jason@redhat.com>
2934
2935 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2936 into COND_EXPR in C++.
2937
7bad794a
JJ
29382016-10-08 Jakub Jelinek <jakub@redhat.com>
2939
2940 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2941 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2942 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2943
be845b04
JJ
29442016-10-07 Jakub Jelinek <jakub@redhat.com>
2945
2946 Implement LWG2296 helper intrinsic
2947 * c-common.h (enum rid): Add RID_ADDRESSOF.
2948 * c-common.c (c_common_reswords): Add __builtin_addressof.
2949
c09c4992
BE
29502016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2951
2952 PR c++/77700
2953 * c-common.c (c_common_truthvalue_conversion): Warn also for
2954 suspicious enum values in boolean context.
2955
342cfb3e
JJ
29562016-10-06 Jakub Jelinek <jakub@redhat.com>
2957
2958 Implement P0258R2 - helper for C++17
2959 std::has_unique_object_representations trait
2960 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2961 * c-common.c (c_common_reswords): Add
2962 __has_unique_object_representations.
2963
2e69f143
JJ
29642016-10-05 Jakub Jelinek <jakub@redhat.com>
2965
2966 PR sanitizer/66343
2967 * c-ubsan.c (ubsan_instrument_return): Don't call
2968 initialize_sanitizer_builtins here.
2969
700fff34
BE
29702016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2971
2972 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2973 conditional expression in boolean context when only one arm is
2974 non-boolean.
2975
9563bfcd
JJ
29762016-10-05 Jakub Jelinek <jakub@redhat.com>
2977
04a32443
JJ
2978 PR sanitizer/77823
2979 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2980 is not integral.
2981
9563bfcd
JJ
2982 * c-common.c (c_common_reswords): Update comment for C++11.
2983
f1644724
JM
29842016-10-04 Jason Merrill <jason@redhat.com>
2985
2986 * c-common.c (make_tree_vector_from_ctor): New.
2987 * c-common.h: Declare it.
2988
5a79befb
JJ
29892016-10-04 Jakub Jelinek <jakub@redhat.com>
2990
2991 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2992 __LIBGCC_JCR_SECTION_NAME__.
2993
1633d3b9
BE
29942016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2995
2996 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2997 left shift in boolean context.
2998
a2c6e7f2
JJ
29992016-09-29 Jakub Jelinek <jakub@redhat.com>
3000
3001 Implement P0001R1 - C++17 removal of register storage class specifier
3002 * c.opt (Wregister): New warning.
3003 * c-opts.c (c_common_post_options): Enable -Wregister by
3004 default for C++17.
3005
75304c87
JG
30062016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3007
3008 * c-opts.c (c_common_post_options): Remove special case for
3009 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3010 in C++.
3011
bbfac6da
JJ
30122016-09-27 Jakub Jelinek <jakub@redhat.com>
3013
6e39060a
JJ
3014 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3015 -std=c++1z.
3016
bbfac6da
JJ
3017 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3018
e73cf9a2
TP
30192016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3020
3021 * c-common.c: Include memmodel.h.
3022
c6147dc4
MP
30232016-09-26 Marek Polacek <polacek@redhat.com>
3024
3025 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3026
81fea426
MP
30272016-09-26 Marek Polacek <polacek@redhat.com>
3028
3029 PR c/7652
3030 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3031 (handle_fallthrough_attribute): New function.
3032 (attribute_fallthrough_p): New function.
3033 * c-common.h (attribute_fallthrough_p): Declare.
3034
9a2300e9
MP
30352016-09-24 Marek Polacek <polacek@redhat.com>
3036
3037 PR c/77490
3038 * c.opt (Wbool-operation): New.
3039
a09e9e35
BE
30402016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3041
3042 * c-common.c (c_common_truthvalue_conversion): Inhibit
3043 Wint-in-bool-context warning with from_macro_definition_at.
3044 Mention the expression will always evaluate to true.
3045
d43b4ccc
MS
30462016-09-21 Martin Sebor <msebor@redhat.com>
3047
3048 PR bootstrap/77676
3049 * c.opt (fprintf-return-value): Temporarily initialize to zero
3050 to unblock bootstrap failures.
3051
2e1c20b1
JJ
30522016-09-21 Jakub Jelinek <jakub@redhat.com>
3053
3054 PR c++/77651
3055 * c.opt (Waligned-new=): Add RejectNegative.
3056 (faligned-new=): Likewise. Spelling fix - change
3057 aligned_new_threshhold to aligned_new_threshold.
3058 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3059 to aligned_new_threshold.
3060
88d0c3f0
MS
30612016-09-20 Martin Sebor <msebor@redhat.com>
3062
3063 PR middle-end/49905
3064 * c.opt: Add -Wformat-length and -fprintf-return-value.
3065
144a96e4
BE
30662016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3067
3068 PR c++/77434
3069 * c.opt (Wint-in-bool-context): New warning.
3070 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3071 constants in boolean context.
3072
63012d9a
JM
30732016-09-19 Joseph Myers <joseph@codesourcery.com>
3074
3075 * c-common.c (max_align_t_align): Also consider alignment of
3076 float128_type_node.
3077
931388ce
JM
30782016-09-15 Jason Merrill <jason@redhat.com>
3079
3080 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3081 DECL_EXTERNAL.
3082
38711381
JM
30832016-09-14 Jason Merrill <jason@redhat.com>
3084
3085 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3086 limit FIELD_DECL, either.
3087
e51fbec3
MP
30882016-09-14 Marek Polacek <polacek@redhat.com>
3089
3090 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3091 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3092 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3093
254830ba
DM
30942016-09-13 David Malcolm <dmalcolm@redhat.com>
3095
3096 * c-common.c (warn_logical_not_parentheses): Replace
3097 rich_location::add_fixit_insert calls with add_fixit_insert_before
3098 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3099
42763690
JM
31002016-09-13 Jason Merrill <jason@redhat.com>
3101 Tom de Vries <tom@codesourcery.com>
3102
3103 PR c++/77427
3104 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3105
9453eee9
JM
31062016-09-13 Jason Merrill <jason@redhat.com>
3107
3108 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3109 limit types at all.
3110
e96809e3
JM
31112016-09-12 Jason Merrill <jason@redhat.com>
3112
3113 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3114 bit/byte confusion, allow large alignment for types.
3115
54dcdb88
BE
31162016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3117
3118 PR c++/77496
3119 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3120
d1463eb9
DM
31212016-09-12 David Malcolm <dmalcolm@redhat.com>
3122
3123 PR c/72858
3124 * c-format.c (argument_parser::check_argument_type): Add params
3125 "type_start" and "conversion_char". Use the former to generate
3126 offset_to_type_start and pass it and conversion_char to
3127 check_format_types.
3128 (check_format_info_main): Capture the start of the type
3129 information as "type_start", and pass it an format_char
3130 to arg_parser.check_argument_type.
3131 (check_format_types): Provide an example in the leading comment.
3132 Add params "offset_to_type_start" and "conversion_char"; pass
3133 them to format_type_warning calls.
3134 (test_get_modifier_for_format_len): Likewise.
3135 (matching_type_p): New function.
3136 (get_format_for_type): Add param "conversion_char" and move
3137 implementation into...
3138 (get_format_for_type_1): ...new function, called twice.
3139 Use new function matching_type_p rather than checking for
3140 TYPE_CANONICAL equality.
3141 (get_corrected_substring): New function.
3142 (format_type_warning): Provide an example in the leading comment.
3143 Add params "offset_to_type_start" and "conversion_char". Replace
3144 call to get_format_for_type with call to get_corrected_substring
3145 and move rejection of hints for widths/precisions there.
3146 (assert_format_for_type_streq): Add param "conversion_char".
3147 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3148 (test_get_format_for_type_printf): Add conversion chars to the
3149 tests, adding coverage for various combinations of integer
3150 vs double conversions, and for preserving octal and hexadecimal
3151 conversions.
3152 (test_get_format_for_type_scanf): Add conversion chars to the
3153 tests.
3154
5b28efbb
TV
31552016-09-10 Tom de Vries <tom@codesourcery.com>
3156
3157 PR C/71602
3158 * c-common.c (build_va_arg): Handle more strict
3159 targetm.canonical_va_list_type. Replace first argument type error with
3160 assert.
3161
3f0177e7
MS
31622016-09-09 Martin Sebor <msebor@redhat.com>
3163
3164 PR c/77520
3165 PR c/77521
3166 * c-format.c (argument_parser::find_format_char_info): Use %qc
3167 format directive unconditionally.
3168
af63ba4b
JM
31692016-09-09 Jason Merrill <jason@redhat.com>
3170
3171 Implement C++17 new of over-aligned types.
3172 * c.opt: Add -faligned-new and -Waligned-new.
3173 * c-common.c (max_align_t_align): Split out from...
3174 (cxx_fundamental_alignment_p): ...here.
3175 * c-common.h: Declare it.
3176 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3177
c65248cb
JM
31782016-09-09 Joseph Myers <joseph@codesourcery.com>
3179
3180 * c-cppbuiltin.c (builtin_define_type_width): New function.
3181 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3182 macros.
3183
e5106e27
DM
31842016-09-07 David Malcolm <dmalcolm@redhat.com>
3185
3186 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3187 a POINTER_TYPE.
3188 (substring_loc::get_location): Move to substring-locations.c,
3189 keeping implementation as...
3190 (c_get_substring_location): New function, from the above, reworked
3191 to use accessors rather than member lookup.
3192 * c-common.h (class substring_loc): Move to substring-locations.h,
3193 replacing with a forward decl.
3194 (c_get_substring_location): New decl.
3195 * c-format.c: Include "substring-locations.h".
3196 (format_warning_va): Move to substring-locations.c.
3197 (format_warning_at_substring): Likewise.
3198
a42e7952
MS
31992016-09-06 Martin Sebor <msebor@redhat.com>
3200
3201 PR c/77336
3202 * c-format.c (check_function_format): Avoid issuing warnings for
3203 functions unless they call format functions with non-constant
3204 format strings.
3205
b772a565
RB
32062016-09-06 Richard Biener <rguenther@suse.de>
3207
3208 PR c/77450
3209 * c-common.c (c_common_mark_addressable_vec): Handle
3210 COMPOUND_LITERAL_EXPR.
3211
25ff5dd3
MP
32122016-09-05 Marek Polacek <polacek@redhat.com>
3213
3214 PR c/77423
3215 * c-common.c (bool_promoted_to_int_p): New function.
3216 (expr_has_boolean_operands_p): New function.
3217 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3218 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3219
21234eb5
TV
32202016-09-04 Tom de Vries <tom@codesourcery.com>
3221
3222 revert:
3223 2016-08-29 Tom de Vries <tom@codesourcery.com>
3224
3225 * c-common.c (build_va_arg): Replace first argument type error
3226 with assert.
3227
9dc5773f
JJ
32282016-09-02 Jakub Jelinek <jakub@redhat.com>
3229
3230 PR c/65467
3231 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3232 (c_finish_omp_for): Reject _Atomic qualified iterators.
3233
32342016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3235
3236 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3237 size to guarantee it fits the output of the formatted function
3238 regardless of its arguments.
3239
295844f6
MP
32402016-09-01 Marek Polacek <polacek@redhat.com>
3241
3242 PR c/7652
3243 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3244 FALLTHRU comments.
3245
3d06b6f2
MP
32462016-08-29 Marek Polacek <polacek@redhat.com>
3247
3248 PR c/77292
3249 * c-common.c (warn_logical_not_parentheses): Don't warn for
3250 a comparison or a logical operator.
3251
34cedad5
TV
32522016-08-29 Tom de Vries <tom@codesourcery.com>
3253
3254 * c-common.c (build_va_arg): Fix type comparison assert.
3255
f162d717
TV
32562016-08-29 Tom de Vries <tom@codesourcery.com>
3257
3258 * c-common.c (build_va_arg): Replace first argument type error
3259 with assert.
3260
ba9bbd6f
TV
32612016-08-29 Tom de Vries <tom@codesourcery.com>
3262
3263 PR c/77398
3264 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3265 with error_mark_node as va_list instead of with illegal va_list.
3266
ebef225f
MP
32672016-08-25 Marek Polacek <polacek@redhat.com>
3268 David Malcolm <dmalcolm@redhat.com>
3269
3270 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3271 * c-common.h (warn_logical_not_parentheses): Update declaration.
3272
b00e6e75
MP
32732016-08-22 Marek Polacek <polacek@redhat.com>
3274
3275 PR c++/77321
3276 * c-common.c (warn_for_memset): Check type for null.
3277
6dc198e3
JM
32782016-08-22 Joseph Myers <joseph@codesourcery.com>
3279
14ec014e 3280 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3281 _FloatNx types for suffixes for built-in functions.
3282
c65699ef
JM
32832016-08-19 Joseph Myers <joseph@codesourcery.com>
3284
3285 PR c/32187
3286 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3287 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3288 (RID_FLOAT128X): New enum rid values.
3289 (CASE_RID_FLOATN_NX): New macro.
3290 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3291 keywords.
3292 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3293 corresponding complex types.
3294 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3295 _FloatNx and corresponding complex types.
3296 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3297 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3298 and _FloatNx types for the widest type for determining
3299 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3300 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3301 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3302 and _FloatNx types.
3303 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3304 constants.
3305 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3306 _FloatNx types.
3307
cc015f3a
DM
33082016-08-18 David Malcolm <dmalcolm@redhat.com>
3309
3310 * c-opts.c (c_diagnostic_finalizer): Update for change to
3311 diagnostic_show_locus.
3312
cb18fd07
DM
33132016-08-18 David Malcolm <dmalcolm@redhat.com>
3314
3315 * c-common.c: Include "spellcheck.h".
3316 (cb_get_suggestion): New function.
3317 * c-common.h (cb_get_suggestion): New decl.
3318 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3319 cb_get_suggestion.
3320
a76989dc
MP
33212016-08-18 Marek Polacek <polacek@redhat.com>
3322
3323 PR c/71514
3324 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3325 and pointer-to-VLA.
3326
65e736c0
DM
33272016-08-16 David Malcolm <dmalcolm@redhat.com>
3328
3329 PR c/72857
3330 * c-common.c (substring_loc::get_range): Rename to...
3331 (substring_loc::get_location): ...this, converting param from a
3332 source_range * to a location_t *. Call
3333 get_source_location_for_substring rather than
3334 get_source_range_for_substring, and pass in m_caret_idx.
3335 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3336 (substring_loc::get_range): Replace with...
3337 (substring_loc::get_location): ...this.
3338 (substring_loc::set_caret_index): New method.
3339 (substring_loc): Add field m_caret_idx.
3340 * c-format.c (format_warning_va): Update for above changes.
3341 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3342 clashing with type name.
3343 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3344 (check_argument_type): Likewise.
3345 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3346 Use a copy when emitting warnings, setting the caret index from TYPE.
3347
7e1dde14 33482016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3349 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3350
3351 * c-ada-spec.c (dump_number): New function.
3352 (handle_escape_character): Likewise.
3353 (print_ada_macros): Add handling of constant integers and strings.
3354
191816a3
MP
33552016-08-12 Marek Polacek <polacek@redhat.com>
3356
3357 PR c/7652
3358 * c-common.c (scalar_to_vector): Adjust fall through comment.
3359 * c-opts.c (c_common_handle_option): Likewise.
3360 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3361 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3362 fall through comment.
3363 * cilk.c (extract_free_variables): Add FALLTHRU.
3364
452df4a4
JM
33652016-08-10 Jason Merrill <jason@redhat.com>
3366
3367 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3368
f3365c12
JM
33692016-08-09 Jason Merrill <jason@redhat.com>
3370
3371 * c-common.c (c_common_attribute_table): vector_size affects type
3372 identity.
3373
f0bc3323
MP
33742016-08-09 Marek Polacek <polacek@redhat.com>
3375
3376 PR c/7652
3377 * c-ada-spec.c (dump_generic_ada_node): Add return.
3378
98e5a19a
JM
33792016-08-09 Jason Merrill <jason@redhat.com>
3380
3381 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3382 C++17 constexpr lambdas.
3383
895aa8e1
DM
33842016-08-08 David Malcolm <dmalcolm@redhat.com>
3385
3386 PR c/64955
3387 * c-common.h (selftest::c_format_c_tests): New declaration.
3388 (selftest::run_c_tests): New declaration.
3389 * c-format.c: Include "selftest.h.
3390 (format_warning_va): Add param "corrected_substring" and use
3391 it to add a replacement fix-it hint.
3392 (format_warning_at_substring): Likewise.
3393 (format_warning_at_char): Update for new param of
3394 format_warning_va.
3395 (argument_parser::check_argument_type): Pass "fki" to
3396 check_format_types.
3397 (check_format_types): Add param "fki" and pass it to
3398 format_type_warning.
3399 (deref_n_times): New function.
3400 (get_modifier_for_format_len): New function.
3401 (selftest::test_get_modifier_for_format_len): New function.
3402 (get_format_for_type): New function.
3403 (format_type_warning): Add param "fki" and use it to attempt
3404 to provide hints for argument types when calling
3405 format_warning_at_substring.
3406 (selftest::get_info): New function.
3407 (selftest::assert_format_for_type_streq): New function.
3408 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3409 (selftest::test_get_format_for_type_printf): New function.
3410 (selftest::test_get_format_for_type_scanf): New function.
3411 (selftest::c_format_c_tests): New function.
3412
e52ed3fe
DM
34132016-08-08 David Malcolm <dmalcolm@redhat.com>
3414
3415 PR c/52952
3416 * c-format.c: Include "diagnostic.h".
3417 (location_column_from_byte_offset): Delete.
3418 (location_from_offset): Delete.
3419 (format_warning_va): New function.
3420 (format_warning_at_substring): New function.
3421 (format_warning_at_char): New function.
3422 (check_format_arg): Capture location of format_tree and pass to
3423 check_format_info_main.
3424 (argument_parser): Add fields "start_of_this_format" and
3425 "format_string_cst".
3426 (flag_chars_t::validate): Add param "format_string_cst". Convert
3427 warning_at call using location_from_offset to call to
3428 format_warning_at_char.
3429 (argument_parser::argument_parser): Add param "format_string_cst_"
3430 and use use it to initialize field "format_string_cst".
3431 Initialize new field "start_of_this_format".
3432 (argument_parser::read_format_flags): Convert warning_at call
3433 using location_from_offset to a call to format_warning_at_char.
3434 (argument_parser::read_any_format_left_precision): Likewise.
3435 (argument_parser::read_any_format_precision): Likewise.
3436 (argument_parser::read_any_other_modifier): Likewise.
3437 (argument_parser::find_format_char_info): Likewise, in three places.
3438 (argument_parser::parse_any_scan_set): Likewise, in one place.
3439 (argument_parser::handle_conversions): Likewise, in two places.
3440 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3441 and use it to make a substring_loc. Pass the latter to
3442 check_format_types.
3443 (check_format_info_main): Add params "fmt_param_loc" and
3444 "format_string_cst". Convert warning_at calls using
3445 location_from_offset to calls to format_warning_at_char. Pass the
3446 new params to the arg_parser ctor. Pass "format_string_cst" to
3447 flag_chars.validate. Pass "fmt_param_loc" to
3448 arg_parser.check_argument_type.
3449 (check_format_types): Convert first param from a location_t
3450 to a const substring_loc & and rename to "fmt_loc". Attempt
3451 to extract the range of the relevant parameter and pass it
3452 to format_type_warning.
3453 (format_type_warning): Convert first param from a location_t
3454 to a const substring_loc & and rename to "fmt_loc". Add
3455 params "param_range" and "type". Replace calls to warning_at
3456 with calls to format_warning_at_substring.
3457
1c4d457e
DM
34582016-08-08 David Malcolm <dmalcolm@redhat.com>
3459
3460 * c-format.c (class flag_chars_t): New class.
3461 (struct length_modifier): New struct.
3462 (class argument_parser): New class.
3463 (flag_chars_t::flag_chars_t): New ctor.
3464 (flag_chars_t::has_char_p): New method.
3465 (flag_chars_t::add_char): New method.
3466 (flag_chars_t::validate): New method.
3467 (flag_chars_t::get_alloc_flag): New method.
3468 (flag_chars_t::assignment_suppression_p): New method.
3469 (argument_parser::argument_parser): New ctor.
3470 (argument_parser::read_any_dollar): New method.
3471 (argument_parser::read_format_flags): New method.
3472 (argument_parser::read_any_format_width): New method.
3473 (argument_parser::read_any_format_left_precision): New method.
3474 (argument_parser::read_any_format_precision): New method.
3475 (argument_parser::handle_alloc_chars): New method.
3476 (argument_parser::read_any_length_modifier): New method.
3477 (argument_parser::read_any_other_modifier): New method.
3478 (argument_parser::find_format_char_info): New method.
3479 (argument_parser::validate_flag_pairs): New method.
3480 (argument_parser::give_y2k_warnings): New method.
3481 (argument_parser::parse_any_scan_set): New method.
3482 (argument_parser::handle_conversions): New method.
3483 (argument_parser::check_argument_type): New method.
3484 (check_format_info_main): Introduce classes argument_parser
3485 and flag_chars_t, moving the code within the loop into methods
3486 of these classes. Make various locals "const".
3487
88fa5555
DM
34882016-08-05 David Malcolm <dmalcolm@redhat.com>
3489
3490 * c-common.c: Include "substring-locations.h".
3491 (get_cpp_ttype_from_string_type): New function.
3492 (g_string_concat_db): New global.
3493 (substring_loc::get_range): New method.
3494 * c-common.h (g_string_concat_db): New declaration.
3495 (class substring_loc): New class.
3496 * c-lex.c (lex_string): When concatenating strings, capture the
3497 locations of all tokens using a new obstack, and record the
3498 concatenation locations within g_string_concat_db.
3499 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3500 on the ggc-heap.
3501
78169471
MP
35022016-07-29 Marek Polacek <polacek@redhat.com>
3503
638fc14f
MP
3504 PR c/71926
3505 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3506 parentheses warning.
3507
78169471
MP
3508 PR c/71574
3509 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3510
1225d6b1
ML
35112016-07-28 Martin Liska <mliska@suse.cz>
3512
3513 PR gcov-profile/68025
3514 * c-common.c (handle_no_profile_instrument_function_attribute):
3515
ec1e2a40
BE
35162016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3517
3518 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3519 BITS_PER_UNIT_LOG.
3520
5ec2cd9f
JM
35212016-07-25 Jason Merrill <jason@redhat.com>
3522
3523 PR c++/65970
3524 * c.opt (fconstexpr-loop-limit): New.
3525
9dc5773f 35262016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3527
3528 PR c++/71675
3529 * c-common.c (resolve_overloaded_builtin): Avoid converting
3530 __atomic_compare_exchange_n return type to that of what its
3531 first argument points to.
3532
e3fe09c1
UB
35332016-07-22 Uros Bizjak <ubizjak@gmail.com>
3534
3535 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3536 ~(unsigned HOST_WIDE_INT) 0.
3537
bc91c436
ML
35382016-07-22 Martin Liska <mliska@suse.cz>
3539
3540 PR gcov-profile/69028
3541 PR gcov-profile/62047
3542 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3543 to the current_function_decl.
3544
451dcc66
JM
35452016-07-21 Jason Merrill <jason@redhat.com>
3546
3547 PR c++/65168
3548 * c-common.c (c_common_truthvalue_conversion): Check
3549 c_inhibit_evaluation_warnings for warning about address of
3550 reference.
3551
de6a69ee
DM
35522016-07-20 David Malcolm <dmalcolm@redhat.com>
3553
3554 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3555 const char *.
3556
d022c55a
JM
35572016-07-15 Jason Merrill <jason@redhat.com>
3558
3559 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3560
ddbbcb19
JJ
35612016-07-15 Jakub Jelinek <jakub@redhat.com>
3562
3563 PR c/71858
3564 * c-common.h (enum lookup_name_fuzzy_kind): Add
3565 FUZZY_LOOKUP_FUNCTION_NAME.
3566
d0cf395a
JM
35672016-07-08 Jason Merrill <jason@redhat.com>
3568
3569 P0145: Refining Expression Order for C++.
3570 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3571 * c-opts.c: Adjust.
3572
98d44e93
MT
35732016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3574
3575 PR c++/71214
3576 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3577
f9d8d994
TS
35782016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3579
3580 * c-pragma.h (enum pragma_kind): Rename
3581 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3582 users.
3583
4aa83879
RB
35842016-06-29 Richard Biener <rguenther@suse.de>
3585
3586 PR middle-end/71002
3587 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3588
a25bd9e6
JM
35892016-06-24 Jason Merrill <jason@redhat.com>
3590
3591 P0145R2: Refining Expression Order for C++.
3592 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3593 MODIFY_EXPR.
3594
a86451b9
JJ
35952016-06-24 Jakub Jelinek <jakub@redhat.com>
3596
3597 * c-common.c (check_builtin_function_arguments): Require last
3598 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3599 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3600 if the last argument is pointer to enumerated or boolean type.
3601
1a4f11c8
DM
36022016-06-22 David Malcolm <dmalcolm@redhat.com>
3603
3604 PR c/70339
3605 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3606 (lookup_name_fuzzy): New prototype.
3607
fe55692c
JDA
36082016-06-21 John David Anglin <danglin@gcc.gnu.org>
3609
3610 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3611
4eb24e01
JM
36122016-06-14 Jason Merrill <jason@redhat.com>
3613
3614 P0145R2: Refining Expression Order for C++.
3615 * c.opt (fargs-in-order): New.
3616 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3617
ef7cf206
JJ
36182016-06-13 Jakub Jelinek <jakub@redhat.com>
3619
0dda258b
JJ
3620 PR sanitizer/71498
3621 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3622 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3623
ef7cf206
JJ
3624 PR preprocessor/71183
3625 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3626 to cb_get_source_date_epoch.
3627
50b15873
JJ
36282016-06-10 Jakub Jelinek <jakub@redhat.com>
3629
3630 PR c/68657
3631 * c.opt (Wpsabi): Add Warning flag.
3632
4d926e34
MS
36332016-06-10 Martin Sebor <msebor@redhat.com>
3634
3635 PR c/71392
14ec014e 3636 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3637 the nonnull attribute in type-generic builtins.
3638
e01b4e16
MS
36392016-06-09 Martin Sebor <msebor@redhat.com>
3640
3641 PR c/70883
3642 * c-common.c (builtin_function_validate_nargs): Make text of error
3643 message consistent with others like it.
3644
44a845ca
MS
36452016-06-08 Martin Sebor <msebor@redhat.com>
3646 Jakub Jelinek <jakub@redhat.com>
3647
3648 PR c++/70507
3649 PR c/68120
3650 * c-common.c (check_builtin_function_arguments): Handle
3651 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3652
a80a7051
RB
36532016-06-08 Richard Biener <rguenther@suse.de>
3654
3655 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3656
bfd67b47
RB
36572016-06-07 Richard Biener <rguenther@suse.de>
3658
3659 PR c/61564
3660 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3661 options and warn about others.
3662
15c98b2e
ES
36632016-06-01 Eduard Sanou <dhole@openmailbox.org>
3664
3665 * c-common.c (get_source_date_epoch): Rename to
3666 cb_get_source_date_epoch.
3667 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3668 message when the parsing fails. Use error_at instead of fatal_error.
3669 * c-common.h (get_source_date_epoch): Rename to
3670 cb_get_source_date_epoch.
3671 * c-common.h (cb_get_source_date_epoch): Prototype.
3672 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3673 * c-common.h (c_omp_region_type): Remove trailing comma.
3674 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3675 * c-lex.c (c_lex_with_flags): Remove initialization of
3676 pfile->source_date_epoch.
3677
00631022
JJ
36782016-05-30 Jakub Jelinek <jakub@redhat.com>
3679
3680 PR c++/71349
3681 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3682 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3683 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3684 instead of C_OMP_CLAUSE_SPLIT_FOR.
3685
f17a223d
RB
36862016-05-24 Richard Biener <rguenther@suse.de>
3687
3688 PR middle-end/70434
3689 PR c/69504
3690 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3691 (convert_vector_to_array_for_subscript): ... this.
3692 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3693 VIEW_CONVERT_EXPR to an array type. Rename to ...
3694 (convert_vector_to_array_for_subscript): ... this.
3695
4f2e1536
MP
36962016-05-12 Marek Polacek <polacek@redhat.com>
3697
3698 PR c/70756
3699 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3700 size_in_bytes and pass LOC to it.
3701
d6e83a8d
MM
37022016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3703
3704 PR c/43651
3705 * c.opt (Wduplicate-decl-specifier): New option.
3706
5c3a10fb
MP
37072016-05-11 Marek Polacek <polacek@redhat.com>
3708
3709 PR c++/71024
3710 * c-common.c (diagnose_mismatched_attributes): New function.
3711 * c-common.h (diagnose_mismatched_attributes): Declare.
3712
deef7113
MP
37132016-05-04 Marek Polacek <polacek@redhat.com>
3714
3715 * c.opt (Wdangling-else): New option.
3716
79ce98bc
MP
37172016-05-03 Marek Polacek <polacek@redhat.com>
3718
3719 PR c/70859
3720 * c-common.c (builtin_function_validate_nargs): Add location
3721 parameter. Use it.
3722 (check_builtin_function_arguments): Add location and arguments
3723 parameters. Use them.
3724 * c-common.h (check_builtin_function_arguments): Update declaration.
3725
381cdae4
RB
37262016-05-03 Richard Biener <rguenther@suse.de>
3727
3728 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3729 allow call args to gimplify to SSA names.
3730
1d793c34
MP
37312016-05-03 Marek Polacek <polacek@redhat.com>
3732
3733 * c-common.h (enum c_omp_region_type): Remove stray comma.
3734
77886428
CP
37352016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3736
3737 * c-common.h (enum c_omp_region_type): Define.
3738
697e0b28
RS
37392016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3740
3741 * c-common.c (shorten_compare): Use wi::to_wide.
3742
e7ff0319
CP
37432016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3744
3745 PR middle-end/70626
3746 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3747 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3748 reduction clauses in acc parallel loops.
3749
2fff3db8
MP
37502016-04-29 Marek Polacek <polacek@redhat.com>
3751
3752 PR c/70852
3753 * c-common.c (warn_for_memset): Check domain before accessing it.
3754
509063eb
DV
37552016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3756
3757 PR/69089
3758 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3759 "aligned" attribute.
3760
b632761d
JM
37612016-04-28 Jason Merrill <jason@redhat.com>
3762
3763 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3764
174f6622
ES
37652016-04-28 Eduard Sanou <dhole@openmailbox.org>
3766 Matthias Klose <doko@debian.org>
3767
3768 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3769 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3770 handling.
3771 * c-common.h (get_source_date_epoch): Prototype.
3772 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3773
6bc2bb18
RB
37742015-04-27 Ryan Burn <contact@rnburn.com>
3775
3776 PR c++/69024
3777 PR c++/68997
3778 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3779 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3780 external linkage.
3781 (cilk_detect_and_unwrap): Corresponding changes.
3782 (extract_free_variables): Don't extract free variables from
3783 AGGR_INIT_EXPR slot.
3784 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3785 (cilk_recognize_spawn): Likewise.
3786
c1e1f433
BS
37872016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3788
3789 * c.opt (Wmemset-elt-size): New option.
3790 * c-common.c (warn_for_memset): New function.
3791 * c-common.h (warn_for_memset): Declare.
3792
d067e05f
JM
37932016-04-25 Jason Merrill <jason@redhat.com>
3794
3795 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3796 No longer static.
3797 * c-common.h: Declare it.
3798 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3799
9aa36ae5
JM
38002016-04-22 Jason Merrill <jason@redhat.com>
3801
3802 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3803
477d4906
IV
38042016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3805
3806 PR c++/69363
3807 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3808 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3809
fe37c7af
MM
38102016-04-18 Michael Matz <matz@suse.de>
3811
3812 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3813 and SET_DECL_ALIGN.
3814
23f2660f
EB
38152016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3816
3817 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3818 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3819 to incomplete types.
3820 (dump_nested_type): Remove redundant tests and tidy up.
3821 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3822 a type which is the typedef of an original type.
3823
1e77281b
MP
38242016-04-15 Marek Polacek <polacek@redhat.com>
3825
3826 PR c/70651
3827 * c-common.c (build_va_arg): Change two asserts into errors and return
3828 error_mark_node.
3829
b3a77f21
MP
38302016-04-13 Marek Polacek <polacek@redhat.com>
3831
3832 PR c++/70639
3833 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3834 for switch statements, too.
3835
322b8466
JM
38362016-03-28 Jason Merrill <jason@redhat.com>
3837
3838 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3839
fbdb6baf
MP
38402016-03-23 Marek Polacek <polacek@redhat.com>
3841
3842 PR c++/69884
3843 * c.opt (Wignored-attributes): New option.
3844
5c240f4d
DM
38452016-03-22 David Malcolm <dmalcolm@redhat.com>
3846
3847 PR c/69993
3848 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3849 diagnostic text, reversing the order of the warning and note so
3850 that they appear in source order.
3851
14ba7b28
MP
38522016-03-17 Marek Polacek <polacek@redhat.com>
3853
3854 PR c/69407
3855 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3856 operations.
3857
08a1cadc
JM
38582016-03-14 Jason Merrill <jason@redhat.com>
3859
2aaeea19
JM
3860 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3861
08a1cadc
JM
3862 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3863
c06d25bb
RB
38642016-03-09 Richard Biener <rguenther@suse.de>
3865
3866 PR c/70143
3867 * c-common.c (strict_aliasing_warning): Add back
3868 alias_sets_conflict_p check.
3869
80aac5c8
JM
38702016-03-08 Jason Merrill <jason@redhat.com>
3871
3872 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3873
64b23c13
DM
38742016-03-04 David Malcolm <dmalcolm@redhat.com>
3875
3876 PR c/68187
3877 * c-indentation.c (get_visual_column): Move code to determine next
3878 tab stop to...
3879 (next_tab_stop): ...this new function.
3880 (line_contains_hash_if): Delete function.
3881 (detect_preprocessor_logic): Delete function.
3882 (get_first_nws_vis_column): New function.
3883 (detect_intervening_unindent): New function.
3884 (should_warn_for_misleading_indentation): Replace call to
3885 detect_preprocessor_logic with a call to
3886 detect_intervening_unindent.
3887
729526f5
DM
38882016-03-04 David Malcolm <dmalcolm@redhat.com>
3889
3890 PR c/68187
3891 * c-indentation.c (should_warn_for_misleading_indentation): When
3892 suppressing warnings about cases where the guard and body are on
3893 the same column, only use the first non-whitespace column in place
3894 of the guard token column when dealing with "else" clauses.
3895 When rejecting aligned BODY and NEXT, loosen the requirement
3896 from equality with the first non-whitespace of guard to simply
3897 that they not be indented relative to it.
3898
e9a35493
RB
38992016-03-04 Richard Biener <rguenther@suse.de>
3900
3901 PR c++/70054
3902 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3903 instead of alias_sets_conflict_p.
3904
1be56bc5
MP
39052016-03-01 Marek Polacek <polacek@redhat.com>
3906
3907 PR c++/69795
3908 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3909 any DECL.
3910
35886f0b
MS
39112016-02-22 Martin Sebor <msebor@redhat.com>
3912
3913 PR middle-end/69780
3914 * c-common.c (check_builtin_function_arguments): Validate and
3915 reject invalid arguments to __builtin_alloca_with_align.
3916
4246c8da
MW
39172016-02-20 Mark Wielaard <mjw@redhat.com>
3918
3919 PR c/28901
3920 * c.opt (Wunused-const-variable): Turn into Alias for...
3921 (Wunused-const-variable=): New option.
3922
268be88c
BE
39232016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3924
3925 PR c++/69865
3926 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3927 here...
3928 (c_common_init_options): ...to here.
3929 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3930
871b3f47
JJ
39312016-02-19 Jakub Jelinek <jakub@redhat.com>
3932
3933 PR c++/69826
3934 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3935 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3936 flag_preprocess_only.
3937
bf14eba2
JJ
39382016-02-16 Jakub Jelinek <jakub@redhat.com>
3939
3940 PR c/69835
3941 * c.opt (Wnonnull-compare): Enable for -Wall.
3942
ba6b3795
JJ
39432016-02-15 Jakub Jelinek <jakub@redhat.com>
3944
3945 PR c++/69797
3946 * c-common.c (sync_resolve_size): Diagnose too few arguments
3947 even when params is non-NULL empty vector.
3948
a011cd92
BS
39492016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3950
3951 PR target/60410
3952 * c.opt (fshort-double): Remove.
3953
46cb9332
MS
39542016-02-05 Martin Sebor <msebor@redhat.com>
3955
3956 PR c++/69662
3957 * c.opt (Warning options): Update -Wplacement-new to take
3958 an optional argument.
3959
e1b81f2b
JJ
39602016-02-01 Jakub Jelinek <jakub@redhat.com>
3961
3962 PR preprocessor/69543
3963 PR c/69558
3964 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3965 instead of loc to control_warning_option.
3966
b6adbb9f
NS
39672016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3968
3969 * c.opt (fopenacc-dim=): New option.
3970
5d70666e
RB
39712016-01-27 Ryan Burn <contact@rnburn.com>
3972
3973 PR cilkplus/69267
3974 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3975 gimplify_arg. Removed superfluous post_p argument.
3976 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3977 superfluous post_p argument.
3978 * c-gimplify.c (c_gimplify_expr): Likewise.
3979
01e1dea3
DM
39802016-01-26 David Malcolm <dmalcolm@redhat.com>
3981
3982 PR other/69006
3983 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3984 pp_newline_and_flush with pp_flush.
3985
9f04a53e
MS
39862016-01-20 Martin Sebor <msebor@redhat.com>
3987
3988 PR c/69405
3989 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3990 an incompatible argument when the argument isn't a valid tree node.
3991
7f26f7df
JM
39922016-01-18 Jason Merrill <jason@redhat.com>
3993
3994 PR c++/68767
3995 * c-common.c (check_function_arguments_recurse): Fold the whole
3996 COND_EXPR, not just the condition.
3997
f62bf092
TV
39982016-01-18 Tom de Vries <tom@codesourcery.com>
3999
4000 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4001 classify as loop clause.
4002
e0a575ff
JJ
40032016-01-15 Jakub Jelinek <jakub@redhat.com>
4004
4005 PR bootstrap/68271
4006 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4007 C++ FE no longer has limit on number of pragmas.
4008
40092015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4010
4011 PR c++/69048
4012 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4013 to add missing cleanup point.
b6e3db06 4014
c7df95d8
DM
40152016-01-14 David Malcolm <dmalcolm@redhat.com>
4016
4017 PR c++/68819
4018 * c-indentation.c (get_visual_column): Add location_t param.
4019 Handle the column number being zero by effectively disabling the
4020 warning, with an "inform".
4021 (should_warn_for_misleading_indentation): Add location_t argument
4022 for all uses of get_visual_column.
4023
21efdd80
PP
40242016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4025
4026 PR c++/69029
4027 * c-indentation.c (should_warn_for_misleading_indentation):
4028 Don't warn about do-while statements.
4029
7a127fa7
MS
40302016-01-07 Martin Sebor <msebor@redhat.com>
4031
4032 PR c/68966
4033 * c-common.c (sync_resolve_size): Reject first argument when it's
4034 a pointer to _Bool.
4035
c589e975
DM
40362016-01-05 David Malcolm <dmalcolm@redhat.com>
4037
4038 PR c/69122
4039 * c-indentation.c (get_visual_column): Remove default argument.
4040 (should_warn_for_misleading_indentation): For the multiline case,
4041 update call to get_visual_column for next_stmt_exploc so that it
4042 captures the location of the first non-whitespace character in the
4043 relevant line. Don't issue warnings if there is non-whitespace
4044 before the next statement.
4045
818ab71a
JJ
40462016-01-04 Jakub Jelinek <jakub@redhat.com>
4047
4048 Update copyright years.
4049
745e411d
DM
40502015-12-21 David Malcolm <dmalcolm@redhat.com>
4051
4052 * c-common.c (binary_op_error): Convert first param from
4053 location_t to rich_location * and use it when emitting an error.
4054 * c-common.h (binary_op_error): Convert first param from
4055 location_t to rich_location *.
4056
de67c4c3
DM
40572015-12-16 David Malcolm <dmalcolm@redhat.com>
4058
4059 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4060 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4061
4a38b02b
IV
40622015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4063
4064 * c-common.c (c_common_attribute_table): Handle "omp declare target
4065 link" attribute.
4066
54d62f51
JJ
40672015-12-14 Jakub Jelinek <jakub@redhat.com>
4068
4069 PR c/68833
4070 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4071
8d4227c8
TB
40722014-12-12 Tobias Burnus <burnus@net-b.de>
4073
4074 PR fortran/68815
4075 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4076 specifiers (%d, %i,%u and %c).
4077
f6069ccc
DM
40782015-12-10 David Malcolm <dmalcolm@redhat.com>
4079
4080 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4081
63bbf46d
JJ
40822015-12-08 Jakub Jelinek <jakub@redhat.com>
4083
4084 PR c/48088
4085 PR c/68657
4086 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4087 * c-pragma.c (handle_pragma_diagnostic): Adjust
4088 control_warning_option caller.
4089
f79520bb
DM
40902015-12-07 David Malcolm <dmalcolm@redhat.com>
4091
4092 * c-common.c (c_cpp_error): Update for change to
4093 rich_location::set_range.
4094
b3d5bc62
JJ
40952015-12-04 Paolo Bonzini <bonzini@gnu.org>
4096
4097 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4098 shifting 1 out of the sign bit.
4099
41002015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4101
4102 * c-common.c (c_common_attribute_table[]): Update max arguments
4103 count for "simd" attribute.
4104 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4105
6eb4a537
JJ
41062015-12-03 Jakub Jelinek <jakub@redhat.com>
4107
4108 PR preprocessor/57580
4109 * c-ppoutput.c (print): Change printed field to bool.
4110 Move src_file last for smaller padding.
4111 (init_pp_output): Set print.printed to false instead of 0.
4112 (scan_translation_unit): Fix up formatting. Set print.printed
4113 to true after printing something other than newline.
4114 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4115 (maybe_print_line_1): Set print.printed to false instead of 0.
4116 (print_line_1): Likewise.
4117 (do_line_change): Set print.printed to true instead of 1.
4118 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4119 dump_macro): Set print.printed to false after printing newline.
4120
4250754e
JM
41212015-12-02 Jason Merrill <jason@redhat.com>
4122
f479b43d
JM
4123 * c-common.c (fold_for_warn): New.
4124 (warn_logical_operator, warn_tautological_cmp)
4125 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4126
4250754e
JM
4127 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4128 (c_fully_fold_internal, decl_constant_value_for_optimization):
4129 Move to c/c-fold.c.
4130 * c-common.h: Don't declare decl_constant_value_for_optimization.
4131
e9e32ee6
JM
41322015-12-02 Joseph Myers <joseph@codesourcery.com>
4133
4134 PR c/68162
4135 * c-common.h (c_build_qualified_type): Add extra default
4136 arguments.
4137
37d5ad46
JB
41382015-12-01 Julian Brown <julian@codesourcery.com>
4139 Cesar Philippidis <cesar@codesourcery.com>
4140 James Norris <James_Norris@mentor.com>
4141
4142 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4143 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4144 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4145
f07862c7
EB
41462015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4147
4148 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4149 (decl_sloc_common): Delete and move bulk of processing to...
4150 (decl_sloc): ...here.
4151 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4152 (dump_ada_double_name): Remove S parameter and compute the suffix.
4153 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4154 element type and deal with an anonymous one.
4155 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4156 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4157 and remove reference to QUAL_UNION_TYPE.
4158 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4159 (dump_nested_type): ...here. New function extracted from above.
4160 Generate a full declaration for anonymous element type of arrays.
4161 (print_ada_declaration): Really skip anonymous declarations. Remove
4162 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4163 Clean up processing of declarations of array types and objects.
4164 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4165 Remove obsolete code and tidy up.
4166
75c8aac3
JH
41672015-11-29 Jan Hubicka <hubicka@ucw.cz>
4168
4169 PR c/67581
4170 * c-common.c (handle_transparent_union_attribute): Update
4171 also type variants.
4172
b58d3df2
ML
41732015-11-27 Martin Liska <mliska@suse.cz>
4174
4175 PR c++/68312
4176 * array-notation-common.c (cilkplus_extract_an_triplets):
4177 Release vector of vectors.
4178 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4179
89a01fcf
EB
41802015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4181
4182 PR c++/68527
4183 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4184 (print_ada_struct_decl): Likewise.
4185
cc5c5226
IZ
41862015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4187
4188 PR c++/68001
4189 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4190 * cilk.c (recognize_spawn): Determine location in a more precise
4191 way.
4192
269adb9d
JM
41932015-11-19 Jason Merrill <jason@redhat.com>
4194
4195 * c-common.c (shorten_compare): But look through macros from
4196 system headers.
4197
d0eccfcd
JM
41982015-11-18 Jason Merrill <jason@redhat.com>
4199
4200 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4201 non-constant operand comes from a macro.
4202
3e44547c
JM
42032015-11-17 Jason Merrill <jason@redhat.com>
4204
4205 PR bootstrap/68346
4206 * c-common.c (warn_tautological_cmp): Fold before checking for
4207 constants.
4208
0f62c7a0
MP
42092015-11-16 Marek Polacek <polacek@redhat.com>
4210
4211 PR c++/68362
4212 * c-common.c (check_case_bounds): Fold low and high cases.
4213
a868811e
MP
42142015-11-16 Marek Polacek <polacek@redhat.com>
4215
4216 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4217 * c-common.c (c_common_get_alias_set): Likewise.
4218 (handle_visibility_attribute): Likewise.
4219
fff77217
KY
42202015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4221
4222 * c-common.c (handle_simd_attribute): New.
4223 (struct attribute_spec): Add entry for "simd".
4224 (handle_simd_attribute): New.
4225
269e63b7
KT
42262015-11-13 Kai Tietz <ktietz70@googlemail.com>
4227
4228 * c-lex.c (interpret_float): Use fold_convert.
4229
ebedc9a3
DM
42302015-11-13 David Malcolm <dmalcolm@redhat.com>
4231
4232 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4233 and store it on the result.
4234 * c-opts.c (c_common_init_options): Set
4235 global_dc->colorize_source_p.
4236
6e232ba4
JN
42372015-11-12 James Norris <jnorris@codesourcery.com>
4238 Joseph Myers <joseph@codesourcery.com>
4239
7365279f 4240 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4241 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4242 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4243 PRAGMA_OACC_CLAUSE_LINK.
4244
e78bede6
MP
42452015-11-11 Marek Polacek <polacek@redhat.com>
4246
4247 PR c/68107
4248 PR c++/68266
4249 * c-common.c (valid_array_size_p): New function.
4250 * c-common.h (valid_array_size_p): Declare.
4251
3f8257db 42522015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4253
4254 PR bootstrap/68271
4255 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4256
69f293c9
AM
42572015-11-11 Andrew MacLeod <amacleod@redhat.com>
4258
4259 * array-notation-common.c: Remove unused header files.
4260 * c-ada-spec.c: Likewise.
4261 * c-cilkplus.c: Likewise.
4262 * c-common.c: Likewise.
4263 * c-cppbuiltin.c: Likewise.
4264 * c-dump.c: Likewise.
4265 * c-format.c: Likewise.
4266 * c-gimplify.c: Likewise.
4267 * c-indentation.c: Likewise.
4268 * c-lex.c: Likewise.
4269 * c-omp.c: Likewise.
4270 * c-opts.c: Likewise.
4271 * c-pch.c: Likewise.
4272 * c-ppoutput.c: Likewise.
4273 * c-pragma.c: Likewise.
4274 * c-pretty-print.c: Likewise.
4275 * c-semantics.c: Likewise.
4276 * c-ubsan.c: Likewise.
4277 * cilk.c: Likewise.
4278 * stub-objc.c: Likewise.
4279
3a40d81d
NS
42802015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4281 Cesar Philippidis <cesar@codesourcery.com>
4282 James Norris <jnorris@codesourcery.com>
4283 Julian Brown <julian@codesourcery.com>
4284 Nathan Sidwell <nathan@codesourcery.com>
4285
4286 * c-pragma.c (oacc_pragmas): Add "routine".
4287 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4288
ee45a32d
EB
42892015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4290
4291 * c-common.c (c_common_attributes): Add scalar_storage_order.
4292 (handle_scalar_storage_order_attribute): New function.
4293 * c-pragma.c (global_sso): New variable.
4294 (maybe_apply_pragma_scalar_storage_order): New function.
4295 (handle_pragma_scalar_storage_order): Likewise.
4296 (init_pragma): Register scalar_storage_order.
4297 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4298 * c.opt (Wscalar-storage-order): New warning.
4299 (fsso-struct=): New option.
4300
eb11eb15
MS
43012015-11-08 Martin Sebor <msebor@redhat.com>
4302
4303 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4304
0aad0198
RS
43052015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4306
4307 * c-common.c: Don't undef DEF_BUILTIN.
4308
8a645150
DM
43092015-11-06 David Malcolm <dmalcolm@redhat.com>
4310
4311 * c-common.c (c_cpp_error): Convert parameter from location_t to
4312 rich_location *. Eliminate the "column_override" parameter and
4313 the call to diagnostic_override_column.
4314 Update the "done_lexing" clause to set range 0
4315 on the rich_location, rather than overwriting a location_t.
4316 * c-common.h (c_cpp_error): Convert parameter from location_t to
4317 rich_location *. Eliminate the "column_override" parameter.
4318
7a5e4956
CP
43192015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4320 Thomas Schwinge <thomas@codesourcery.com>
4321 James Norris <jnorris@codesourcery.com>
4322
4323 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4324 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4325 clauses with parallel and kernels and loops.
4326 * c-pragma.h (enum pragma_omp_clause): Add entries for
4327 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4328 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4329 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4330 INDEPENDENT,SEQ}.
4331 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4332
e2f5cc96
MS
43332015-11-05 Martin Sebor <msebor@redhat.com>
4334
4335 PR c++/67942
4336 * c.opt (-Wplacement-new): New option.
4337
e01d41e5
JJ
43382015-11-05 Jakub Jelinek <jakub@redhat.com>
4339
4340 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4341 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4342 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4343 save_expr or create_tmp_var* if TEST is true.
4344 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4345 Don't call add_stmt here.
4346 (struct c_omp_check_loop_iv_data): New type.
4347 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4348 c_omp_check_loop_iv_exprs): New functions.
4349 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4350 distribute.
4351 (c_omp_declare_simd_clauses_to_numbers): Change
4352 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4353 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4354 from numbers to PARM_DECLs.
4355
595278be
MM
43562015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4357
4358 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4359 flag_checking.
4360
3f8257db 43612015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4362
4363 PR c++-common/67882
b3d5bc62
JJ
4364 * c-common.h (fold_offsetof_1): Add argument.
4365 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4366 offsetof expressions that reference elements past the end of
4367 an array.
4368
4bf9e5a8
TS
43692015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4370 Chung-Lin Tang <cltang@codesourcery.com>
4371
4372 * c-pragma.c (oacc_pragmas): Add "atomic".
4373 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4374
3b1661a9
ES
43752015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4376
4377 * c-common.c (handle_target_clones_attribute): New.
4378 (c_common_attribute_table): Add handle_target_clones_attribute.
4379 (handle_always_inline_attribute): Add check on target_clones attribute.
4380 (handle_target_attribute): Ditto.
4381
2adfab87
AM
43822015-10-29 Andrew MacLeod <amacleod@redhat.com>
4383
4384 * array-notation-common.c: Reorder #include's and remove duplicates.
4385 * c-ada-spec.c: Likewise.
4386 * c-cilkplus.c: Likewise.
4387 * c-common.c: Likewise.
4388 * c-cppbuiltin.c: Likewise.
4389 * c-dump.c: Likewise.
4390 * c-format.c: Likewise.
4391 * c-gimplify.c: Likewise.
4392 * c-indentation.c: Likewise.
4393 * c-lex.c: Likewise.
4394 * c-omp.c: Likewise.
4395 * c-opts.c: Likewise.
4396 * c-pch.c: Likewise.
4397 * c-ppoutput.c: Likewise.
4398 * c-pragma.c: Likewise.
4399 * c-pretty-print.c: Likewise.
4400 * c-semantics.c: Likewise.
4401 * c-ubsan.c: Likewise.
4402 * cilk.c: Likewise.
4403 * stub-objc.c: Likewise.
4404
d90ec4f2
JM
44052015-10-28 Jason Merrill <jason@redhat.com>
4406
4407 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4408
88bae6f4
TS
44092015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4410 James Norris <jnorris@codesourcery.com>
4411 Cesar Philippidis <cesar@codesourcery.com>
4412
4413 PR c/64765
4414 PR c/64880
4415 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4416 * c-omp.c (c_oacc_split_loop_clauses): New function.
4417
b1726d6c
MS
44182015-10-21 Martin Sebor <msebor@redhat.com>
4419
4420 PR driver/68043
4421 * c.opt: End each sentence that describes an option with a period.
4422
fa60eeb9
MP
44232015-10-20 Marek Polacek <polacek@redhat.com>
4424
4425 * array-notation-common.c (is_cilkplus_vector_p): Define.
4426 * c-common.h (is_cilkplus_vector_p): Declare.
4427
95979049
MP
44282015-10-20 Marek Polacek <polacek@redhat.com>
4429
4430 * c.opt (std=gnu++11): Do not describe as experimental.
4431 (std=gnu++14): Likewise.
4432
2a9fb712
JM
44332015-10-19 Jason Merrill <jason@redhat.com>
4434
4435 * c-cppbuiltin.c (c_cpp_builtins): Define
4436 __cpp_nontype_template_args.
4437
13b380a3
JM
44382015-10-19 Jason Merrill <jason@redhat.com>
4439
4440 * c-cppbuiltin.c (c_cpp_builtins): Define
4441 __cpp_enumerator_attributes, __cpp_fold_expressions,
4442 __cpp_unicode_characters.
4443
d9a6bd32
JJ
44442015-10-13 Jakub Jelinek <jakub@redhat.com>
4445 Aldy Hernandez <aldyh@redhat.com>
4446
4447 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4448 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4449 (c_define_builtins): Likewise.
4450 * c-common.h (enum c_omp_clause_split): Add
4451 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4452 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4453 (c_finish_omp_for): Add ORIG_DECLV argument.
4454 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4455 201511 instead of 201307.
4456 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4457 OMP_CRITICAL_CLAUSES to it.
4458 (c_finish_omp_ordered): Add CLAUSES argument, set
4459 OMP_ORDERED_CLAUSES to it.
4460 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4461 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4462 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4463 constructs and new OpenMP 4.5 clauses. Clear
4464 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4465 verification code.
4466 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4467 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4468 (enum pragma_omp_clause): Add
4469 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4470 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4471
624d31fe
RS
44722015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4473
4474 * c-lex.c (interpret_float): Use real_equal instead of
4475 REAL_VALUES_EQUAL.
4476
b8fd7909
JM
44772015-10-04 Jason Merrill <jason@redhat.com>
4478
4479 Implement N4514, C++ Extensions for Transactional Memory.
4480 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4481 (c_common_attribute_table): Add transaction_safe_dynamic.
4482 transaction_safe now affects type identity.
4483 (handle_tm_attribute): Handle transaction_safe_dynamic.
4484 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4485 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4486 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4487 (D_TRANSMEM): New.
4488 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4489 * c-pretty-print.c (pp_c_attributes_display): Don't print
4490 transaction_safe in C++.
4491
12651878
MP
44922015-10-02 Marek Polacek <polacek@redhat.com>
4493
4494 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4495
3e3b8d63
MP
44962015-10-02 Marek Polacek <polacek@redhat.com>
4497
4498 PR c/64249
4499 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4500 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4501 * c.opt (Wduplicated-cond): New option.
4502
0d1a8f75
JM
45032015-10-01 Joseph Myers <joseph@codesourcery.com>
4504
4505 * c.opt (std=c11): Do not describe as experimental.
4506 (std=gnu11): Likewise.
4507 (std=iso9899:2011): Likewise.
4508
3e32ee19
NS
45092015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4510
4511 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4512 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4513
974348ee
MP
45142015-09-25 Marek Polacek <polacek@redhat.com>
4515
4516 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4517 (ubsan_instrument_shift): Likewise.
4518
15dbc1a6
MP
45192015-09-25 Marek Polacek <polacek@redhat.com>
4520
4521 PR sanitizer/64906
4522 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4523
6b95d7cc
PP
45242015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4525
4526 * c-indentation.c (should_warn_for_misleading_indentation):
4527 Compare next_stmt_vis_column with guard_line_first_nws instead
4528 of with guard_line_vis_column.
4529
c1822f9c
MLI
45302015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4531
4532 PR c/49654
4533 PR c/49655
4534 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4535 options and options not valid for the current language.
4536
d5398058
PP
45372015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4538
4539 * c-indentation.c (should_warn_for_misleading_indentation):
4540 Float out and consolidate the calls to get_visual_column that
4541 are passed guard_exploc as an argument. Compare
4542 next_stmt_vis_column with guard_line_first_nws instead of with
4543 body_line_first_nws.
4544
6b333269
NS
45452015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4546
4547 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4548 Wnamespaces): New C++ warnings.
4549
a75f1574
JM
45502015-09-22 Jason Merrill <jason@redhat.com>
4551
4552 * c-common.h (abi_compat_version_crosses): New.
4553 (warn_abi_version): Declare.
4554 * c-common.c: Define it.
4555 * c-opts.c (c_common_post_options): Handle it.
4556 flag_abi_compat_version defaults to 8.
4557
bdaaa8b7
VV
45582015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4559
4560 Complete the implementation of N4230, Nested namespace definition.
4561 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4562 __cpp_nested_namespace_definitions.
4563
eaa797e8
MLI
45642015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4565
4566 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4567
c4914de6
MLI
45682015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4569
4570 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4571 when warning.
4572 * c-pragma.h (pragma_lex): Add optional loc argument.
4573
fcb87c50
MM
45742015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4575
4576 * c-format.c (check_format_arg): Adjust to use common block size in all
4577 object pools.
4578
31bdd08a
DM
45792015-09-15 David Malcolm <dmalcolm@redhat.com>
4580
4581 * c-format.c (location_from_offset): Update for change in
4582 signature of location_get_source_line.
4583 * c-indentation.c (get_visual_column): Likewise.
4584 (line_contains_hash_if): Likewise.
4585
aa9f4b4c
MP
45862015-09-14 Marek Polacek <polacek@redhat.com>
4587
4588 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4589 setting various warnings.
4590
aa256c4a
MP
45912015-09-14 Marek Polacek <polacek@redhat.com>
4592
4593 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4594 a negative value.
4595
0f876f22
MW
45962015-09-11 Mark Wielaard <mjw@redhat.com>
4597
4598 PR c/28901
4599 * c.opt (Wunused-variable): Option from common.opt.
4600 (Wunused-const-variable): New option.
4601
273aa49e
PC
46022015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4603
4604 PR c++/53184
4605 * c.opt ([Wsubobject-linkage]): Add.
4606
1807ffc1
MS
46072015-09-03 Martin Sebor <msebor@redhat.com>
4608
4609 PR c/66516
4610 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4611 functions.
4612 * c-common.c (reject_gcc_builtin): Define.
4613
38942840
BI
46142015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4615
4616 PR middle-end/60586
4617 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4618 prototype.
4619 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4620 cilk_gimplify_call_params_in_spawned_fn.
4621 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4622 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4623 unwrapping.
4624
c316b5e4
MP
46252015-08-25 Marek Polacek <polacek@redhat.com>
4626
4627 PR middle-end/67330
4628 * c-common.c (handle_weak_attribute): Don't check whether the
4629 visibility can be changed here.
4630
584a7c46
MLI
46312015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4632
4633 * c-lex.c (c_lex_with_flags): Use explicit locations.
4634
a79683d5
TS
46352015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4636
4637 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4638 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4639
61717a45
FXC
46402015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4641
4642 PR middle-end/36757
4643 * c-common.c (check_builtin_function_arguments): Add check
4644 for BUILT_IN_SIGNBIT argument.
4645
329524f5
PC
46462015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4647
4648 PR c++/67160
4649 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4650 in c++1z mode.
4651
4ee55665
MP
46522015-08-17 Marek Polacek <polacek@redhat.com>
4653
4654 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4655 with whitespaces before qualifier names.
4656
b893e375
MP
46572015-08-12 Marek Polacek <polacek@redhat.com>
4658
4659 PR c++/55095
4660 * c-common.c (maybe_warn_shift_overflow): Properly handle
4661 left-shifting 1 into the sign bit.
4662
c2d89095
MLI
46632015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4664
4665 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4666
971e17ff
AS
46672015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4668 Braden Obrzut <admin@maniacsvault.net>
4669 Jason Merrill <jason@redhat.com>
4670
4671 Add C++ Concepts TS support.
4672 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4673 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4674 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4675 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4676 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4677 * c.opt (fconcepts): New.
4678
b3d5bc62
JJ
46792015-08-02 Martin Sebor <msebor@redhat.com>
4680
4681 * c.opt (-Wframe-address): New warning option.
4682
8ebca419
PP
46832015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4684
4685 * c-indentation.c (should_warn_for_misleading_indentation):
4686 Improve heuristics.
4687
1a1e101f
PP
46882015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4689
4690 * c-indentation.c (get_visual_column): Add parameter first_nws,
4691 use it. Update comment documenting the function.
4692 (is_first_nonwhitespace_on_line): Remove.
4693 (should_warn_for_misleading_indentation): Replace usage of
4694 of is_first_nonwhitespace_on_line with get_visual_column.
4695
992118a1
PP
46962015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4697
4698 * c-indentation.h (struct token_indent_info): Define.
4699 (get_token_indent_info): Define.
4700 (warn_for_misleading_information): Declare.
4701 * c-common.h (warn_for_misleading_information): Remove.
4702 * c-identation.c (warn_for_misleading_indentation):
4703 Change declaration to take three token_indent_infos. Adjust
4704 accordingly.
4705 * c-identation.c (should_warn_for_misleading_indentation):
4706 Likewise. Bail out early if the body is a compound statement.
4707 (guard_tinfo_to_string): Define.
4708
e8fa3817
JM
47092015-07-30 Jason Merrill <jason@redhat.com>
4710
4711 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4712 '*' for reference decay.
4713
173864e8
MP
47142015-07-30 Marek Polacek <polacek@redhat.com>
4715
4716 * c-common.c (warn_tautological_cmp): Bail for float types.
4717
f2afe6dd
MP
47182015-07-27 Marek Polacek <polacek@redhat.com>
4719
4720 PR bootstrap/67030
4721 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4722
05b28fd6
MP
47232015-07-27 Marek Polacek <polacek@redhat.com>
4724
4725 PR c++/66555
4726 PR c/54979
4727 * c-common.c (find_array_ref_with_const_idx_r): New function.
4728 (warn_tautological_cmp): New function.
4729 * c-common.h (warn_tautological_cmp): Declare.
4730 * c.opt (Wtautological-compare): New option.
4731
5a5062b8
MP
47322015-07-23 Marek Polacek <polacek@redhat.com>
4733
4734 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4735 (ubsan_instrument_shift): Likewise.
4736
dc891fe7
MP
47372015-07-23 Marek Polacek <polacek@redhat.com>
4738
4739 PR sanitizer/66908
4740 * c-ubsan.c: Include gimplify.h.
4741 (ubsan_instrument_division): Unshare OP0 and OP1.
4742 (ubsan_instrument_shift): Likewise.
4743
451b5e48
MP
47442015-07-20 Marek Polacek <polacek@redhat.com>
4745 Richard Sandiford <richard.sandiford@arm.com>
4746
4747 PR c++/55095
4748 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4749 Use EXPR_LOC_OR_LOC.
4750 (maybe_warn_shift_overflow): New function.
4751 * c-common.h (maybe_warn_shift_overflow): Declare.
4752 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4753 * c.opt (Wshift-overflow): New option.
4754
fb0b2914
ML
47552015-07-16 Martin Liska <mliska@suse.cz>
4756
4757 * c-format.c (static void check_format_info_main): Use
4758 object_allocator instead of pool_allocator.
4759 (check_format_arg): Likewise.
4760 (check_format_info_main): Likewise.
4761
903f5c23
AM
47622015-07-15 Andrew MacLeod <amacleod@redhat.com>
4763
4764 * c-opts.c: Remove multiline #include comment.
4765
026c3cfd
AH
47662015-07-12 Aldy Hernandez <aldyh@redhat.com>
4767
4768 * c-common.c: Fix double word typos.
4769
bb49ee66
EB
47702015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4771
4772 * c-ada-spec.h (cpp_operation): Revert latest change.
4773 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4774 constructors and destructors.
4775
1916bcb5
AM
47762015-07-09 Andrew MacLeod <amacleod@redhat.com>
4777
4778 * c-common.h: Adjust includes for flags.h changes.
4779 * stub-objc.c: Likewise.
026c3cfd 4780
a9dcd529
EB
47812015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4782
4783 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4784 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4785
b03b462f
JJ
47862015-07-08 Jakub Jelinek <jakub@redhat.com>
4787
4788 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4789 are to be removed, return NULL rather than original clauses list.
4790
c7131fb2
AM
47912015-07-07 Andrew MacLeod <amacleod@redhat.com>
4792
4793 * array-notation-common.c: Adjust includes.
4794 * c-ada-spec.c: Likewise.
4795 * c-cilkplus.c: Likewise.
4796 * c-common.h: Likewise.
4797 * c-cppbuiltin.c: Likewise.
4798 * c-dump.c: Likewise.
4799 * c-format.c: Likewise.
4800 * c-gimplify.c: Likewise.
4801 * c-indentation.c: Likewise.
4802 * c-lex.c: Likewise.
4803 * c-omp.c: Likewise.
4804 * c-opts.c: Likewise.
4805 * c-pch.c: Likewise.
4806 * c-ppoutput.c: Likewise.
4807 * c-pragma.c: Likewise.
4808 * c-pretty-print.c: Likewise.
4809 * c-semantics.c: Likewise.
4810 * c-ubsan.c: Likewise.
4811 * cilk.c: Likewise.
4812 * stub-objc.c: Likewise.
4813
2a7fb83f
EB
48142015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4815
4816 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4817 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4818
a03c9bf1
JM
48192015-07-01 Jason Merrill <jason@redhat.com>
4820
36a85135
JM
4821 * c-common.h (D_CXX11): Rename from D_CXX0X.
4822 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4823 * c-common.c: Adjust.
4824
e7fa68d5
JM
4825 * c-opts.c (c_common_post_options): Default to C++14.
4826
a03c9bf1
JM
4827 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4828
fe95b036
ESR
48292015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4830
4831 Implement N4197 - Adding u8 character literals
b3d5bc62 4832 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4833 CPP_CHAR.
b3d5bc62 4834 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4835 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4836 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4837 and CPP_UTF8CHAR tokens.
4838 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4839
da2e71c9
MLI
48402015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4841
4842 PR fortran/66605
4843 * c-common.c (do_warn_unused_parameter): Move here.
4844 * c-common.h (do_warn_unused_parameter): Declare.
4845
b155cfd9
MP
48462015-06-29 Marek Polacek <polacek@redhat.com>
4847
4848 PR c/66322
4849 * c-common.c (check_case_bounds): Add bool * parameter. Set
4850 OUTSIDE_RANGE_P.
4851 (c_add_case_label): Add bool * parameter. Pass it down to
4852 check_case_bounds.
4853 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4854 warning here.
4855 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4856 declarations.
4857
31521951
MP
48582015-06-27 Marek Polacek <polacek@redhat.com>
4859
4860 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4861 or VECTOR_INTEGER_TYPE_P throughout.
4862 * c-gimplify.c: Likewise.
4863
22d03525
MP
48642015-06-26 Marek Polacek <polacek@redhat.com>
4865
4866 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4867 * c-common.c (c_fully_fold_internal): Likewise.
4868 (c_alignof_expr): Likewise.
4869 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4870 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4871 * cilk.c (create_parm_list): Likewise.
22d03525 4872
af05e6e5
MP
48732015-06-26 Marek Polacek <polacek@redhat.com>
4874
4875 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4876
f0889939
AM
48772015-06-25 Andrew MacLeod <amacleod@redhat.com>
4878
4879 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4880 * c-gimplify.c: Likewise.
4881 * c-pragma.c: Likewise.
4882 * c-ubsan.c: Likewise.
4883 * cilk.c: Likewise.
4884
ca752f39
RS
48852015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4886
4887 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4888 ggc_hasher.
4889
16a16ec7
AM
48902015-06-25 Andrew MacLeod <amacleod@redhat.com>
4891
4892 * cilk.c: Move calls.h after tm.h in the include chain.
4893
0ae9bd27
MP
48942015-06-25 Marek Polacek <polacek@redhat.com>
4895
4896 * array-notation-common.c: Use VAR_P throughout.
4897 * c-ada-spec.c: Likewise.
4898 * c-common.c: Likewise.
4899 * c-format.c: Likewise.
4900 * c-gimplify.c: Likewise.
4901 * c-omp.c: Likewise.
4902 * c-pragma.c: Likewise.
4903 * c-pretty-print.c: Likewise.
4904 * cilk.c: Likewise.
4905
62f9079a
MP
49062015-06-25 Marek Polacek <polacek@redhat.com>
4907
4908 * cilk.c (extract_free_variables): Use is_global_var.
4909
0fa16060
RS
49102015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4911
4912 * c-common.c: Don't include target-def.h.
4913
a68ae2e1
MP
49142015-06-23 Marek Polacek <polacek@redhat.com>
4915
4916 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4917 when comparing INTEGER_CSTs.
4918
c6a2f2d9
PMR
49192015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4920
4921 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4922 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4923 (dump_ada_template): Skip partially specialized types.
4924
6b4db501
MM
49252015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4926
4927 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4928 swapping.
4929
abb226c9
AM
49302015-06-17 Andrew MacLeod <amacleod@redhat.com>
4931
4932 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4933 * c-ada-spec.c: Likewise.
4934 * c-cilkplus.c: Likewise.
4935 * c-common.c: Likewise.
4936 * c-common.h: Likewise.
4937 * c-cppbuiltin.c: Likewise.
4938 * c-dump.c: Likewise.
4939 * c-format.c: Likewise.
4940 * c-gimplify.c: Likewise.
4941 * c-indentation.c: Likewise.
4942 * c-lex.c: Likewise.
4943 * c-omp.c: Likewise.
4944 * c-opts.c: Likewise.
4945 * c-pch.c: Likewise.
4946 * c-ppoutput.c: Likewise.
4947 * c-pragma.c: Likewise.
4948 * c-pretty-print.c: Likewise.
4949 * c-semantics.c: Likewise.
4950 * c-ubsan.c: Likewise.
4951 * cilk.c: Likewise.
4952 * stub-objc.c: Likewise.
4953
076fecad
PP
49542015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4955
4956 PR c++/65168
4957 * c-common.c (c_common_truthvalue_conversion): Warn when
4958 converting an address of a reference to a truth value.
4959
13fdf2e2
AM
49602015-06-08 Andrew MacLeod <amacleod@redhat.com>
4961
4962 * array-notation-common.c : Adjust include files.
4963 * c-ada-spec.c : Likewise.
4964 * c-cilkplus.c : Likewise.
4965 * c-common.c : Likewise.
4966 * c-common.h : Likewise.
4967 * c-cppbuiltin.c : Likewise.
4968 * c-dump.c : Likewise.
4969 * c-format.c : Likewise.
4970 * c-gimplify.c : Likewise.
4971 * c-indentation.c : Likewise.
4972 * c-lex.c : Likewise.
4973 * c-omp.c : Likewise.
4974 * c-opts.c : Likewise.
4975 * c-pch.c : Likewise.
4976 * c-ppoutput.c : Likewise.
4977 * c-pragma.c : Likewise.
4978 * c-pretty-print.c : Likewise.
4979 * c-semantics.c : Likewise.
4980 * c-ubsan.c : Likewise.
4981 * cilk.c : Likewise.
4982 * stub-objc.c : Likewise.
4983
a1661b90
MP
49842015-06-08 Marek Polacek <polacek@redhat.com>
4985
4986 PR c/66415
4987 * c-format.c (location_from_offset): Return LOC if LINE is null.
4988
d7438551
AH
49892015-06-05 Aldy Hernandez <aldyh@redhat.com>
4990
4991 * c-common.h (c_parse_final_cleanups): New prototype.
4992 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4993
b3d5bc62
JJ
49942015-06-04 Sriraman Tallam <tmsriram@google.com>
4995
4996 * c-common.c (noplt): New attribute.
4997 (handle_noplt_attribute): New handler.
4998
ecb9f223
AM
49992015-06-04 Andrew MacLeod <amacleod@redhat.com>
5000
5001 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5002 * c-ada-spec.c: Likewise.
5003 * c-cilkplus.c: Likewise.
5004 * c-common.c: Likewise.
5005 * c-common.h: Likewise.
5006 * c-cppbuiltin.c: Likewise.
5007 * c-dump.c: Likewise.
5008 * c-format.c: Likewise.
5009 * c-gimplify.c: Likewise.
5010 * c-indentation.c: Likewise.
5011 * c-lex.c: Likewise.
5012 * c-omp.c: Likewise.
5013 * c-opts.c: Likewise.
5014 * c-pch.c: Likewise.
5015 * c-ppoutput.c: Likewise.
5016 * c-pragma.c: Likewise.
5017 * c-pretty-print.c: Likewise.
5018 * c-semantics.c: Likewise.
5019 * c-ubsan.c: Likewise.
5020 * cilk.c: Likewise.
5021 * stub-objc.c: Likewise.
5022
6ac48155
DM
50232015-06-02 David Malcolm <dmalcolm@redhat.com>
5024
5025 PR c/66220:
5026 * c-indentation.c (should_warn_for_misleading_indentation): Use
5027 expand_location rather than expand_location_to_spelling_point.
5028 Don't warn if the guarding statement is more indented than the
5029 next/body stmts.
5030
773ce42e
DM
50312015-06-02 David Malcolm <dmalcolm@redhat.com>
5032
5033 * c-indentation.c (warn_for_misleading_indentation): Bail out
5034 immediately if -Wmisleading-indentation isn't enabled.
5035
4fef8379
ML
50362015-06-01 Martin Liska <mliska@suse.cz>
5037
5038 * c-format.c (check_format_arg):Use new type-based pool allocator.
5039 (check_format_info_main) Likewise.
5040
1edfb384
EB
50412015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5042
5043 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5044 (has_nontrivial_methods): Likewise.
5045
9677ef52
MP
50462015-05-25 Marek Polacek <polacek@redhat.com>
5047
5048 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5049
fd5c817a
MP
50502015-05-22 Marek Polacek <polacek@redhat.com>
5051
5052 PR c/47043
5053 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5054
a2f45fe6 50552015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5056
5057 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5058 STACK_GROWS_DOWNWARD.
5059
a2f45fe6 50602015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5061
5062 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5063 STACK_GROWS_DOWNWARD rather than if it is defined.
5064
0fee2ac2 50652015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5066
0fee2ac2
MLI
5067 PR c/52952
5068 * c-format.c (location_column_from_byte_offset): New.
5069 (location_from_offset): New.
5070 (struct format_wanted_type): Add offset_loc field.
5071 (check_format_info): Move handling of location for extra arguments
5072 closer to the point of warning.
5073 (check_format_info_main): Pass the result of location_from_offset
5074 to warning_at.
5075 (format_type_warning): Pass the result of location_from_offset
5076 to warning_at.
5077
cf4ef6f7
MP
50782015-05-20 Marek Polacek <polacek@redhat.com>
5079
5080 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5081
3a65ee74
MP
50822015-05-20 Marek Polacek <polacek@redhat.com>
5083
5084 * c-ada-spec.c (dump_sloc): Use DECL_P.
5085
21b634ae
MP
50862015-05-20 Marek Polacek <polacek@redhat.com>
5087
5088 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5089 * c-common.c: Likewise.
5090
0e50b624
DM
50912015-05-19 David Malcolm <dmalcolm@redhat.com>
5092
5093 * c-common.h (fe_file_change): Strengthen param from
5094 const line_map * to const line_map_ordinary *.
5095 (pp_file_change): Likewise.
5096 * c-lex.c (fe_file_change): Likewise.
5097 (cb_define): Use linemap_check_ordinary when invoking
5098 SOURCE_LINE.
5099 (cb_undef): Likewise.
5100 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5101 invoking cb_file_change.
5102 (c_finish_options): Likewise.
5103 (push_command_line_include): Likewise.
5104 (cb_file_change): Strengthen param "new_map" from
5105 const line_map * to const line_map_ordinary *.
5106 * c-ppoutput.c (cb_define): Likewise for local "map".
5107 (pp_file_change): Likewise for param "map" and local "from".
5108
fab27f52
MM
51092015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5110
5111 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5112
2fe1d762
TV
51132015-05-18 Tom de Vries <tom@codesourcery.com>
5114
5115 * c-common.c (build_va_arg_1): New function.
5116 (build_va_arg): Add address operator to va_list operand if necessary.
5117
7a37fa90
MM
51182015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5119
5120 PR c/48956
5121 * c-common.c (int_safely_convertible_to_real_p): Define.
5122 (unsafe_conversion_p): Check conversions involving complex types.
5123 (conversion_warning): Add new warning message for conversions which
5124 discard imaginary component.
5125 * c-common.h: (enum conversion_safety): Add new enumerator for such
5126 conversions.
5127
3aa3c9fc
MP
51282015-05-14 Marek Polacek <polacek@redhat.com>
5129
5130 PR c/66066
5131 PR c/66127
5132 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5133 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5134 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5135 use it. If FOR_INT_CONST, require that all evaluated operands be
5136 INTEGER_CSTs.
5137
c3388e62
DM
51382015-05-12 David Malcolm <dmalcolm@redhat.com>
5139
5140 * c-common.h (warn_for_misleading_indentation): New prototype.
5141 * c-indentation.c: New file.
5142 * c.opt (Wmisleading-indentation): New option.
5143
c7b38fd5
TV
51442015-05-12 Tom de Vries <tom@codesourcery.com>
5145
5146 PR tree-optimization/66010
5147 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5148
381bf11e
JM
51492015-05-09 Jason Merrill <jason@redhat.com>
5150
edff0c06
JM
5151 * c-opts.c (c_common_post_options): Also clear
5152 cpp_opts->cpp_warn_cxx11_compat.
5153
129211bc
JM
5154 * c-common.h (enum cxx_dialect): Add cxx_unset.
5155 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5156 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5157
381bf11e
JM
5158 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5159 (std=gnu++0x): Mark as Undocumented.
5160 (std=gnu++1y): Add deprecated message.
5161
fe191308
JM
51622015-05-08 Jason Merrill <jason@redhat.com>
5163
765189ff
JM
5164 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5165 * c-opts.c: Adjust.
5166
fe191308
JM
5167 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5168
755e528f
MP
51692015-05-08 Marek Polacek <polacek@redhat.com>
5170
5171 PR c/64918
5172 * c.opt (Woverride-init-side-effects): New option.
5173
0173bd2a
MP
51742015-05-07 Marek Polacek <polacek@redhat.com>
5175
5176 PR c/65179
5177 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5178 negative value.
5179 * c.opt (Wshift-negative-value): New option.
5180 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5181 when -Wextra and C99/C++11 mode.
5182
e0f0d3b9
MP
51832015-05-07 Marek Polacek <polacek@redhat.com>
5184 Martin Uecker <uecker@eecs.berkeley.edu>
5185
5186 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5187 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5188
8243e2a9
JM
51892015-05-05 Jason Merrill <jason@redhat.com>
5190
5191 * c.opt (Wterminate): New.
5192
577cd070
MP
51932015-04-30 Marek Polacek <polacek@redhat.com>
5194
5195 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5196 require that the non-constant be of a boolean type.
5197
0373796b
JT
51982015-04-29 Josh Triplett <josh@joshtriplett.org>
5199
e0f0d3b9
MP
5200 * c-common.c (handle_section_attribute): Refactor to reduce
5201 nesting and distinguish between error cases.
0373796b 5202
716c0ba6
MP
52032015-04-29 Marek Polacek <polacek@redhat.com>
5204
5205 PR c/64610
5206 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5207 with 0/1.
5208
8848828b
JJ
52092015-04-29 Jakub Jelinek <jakub@redhat.com>
5210
5211 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5212 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5213 HOST_BITS_PER_WIDE_INT.
5214
ecd0e562
TV
52152015-04-28 Tom de Vries <tom@codesourcery.com>
5216
5217 PR tree-optimization/65887
5218 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5219
2a877204 52202015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5221 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5222
5223 * c-ada-spec.c (in_function): Delete.
5224 (dump_generic_ada_node): Do not change in_function and remove the
5225 redundant code dealing with it.
5226 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5227 (print_ada_methods): Output the static member functions in a nested
5228 package after the regular methods as well as associated renamings.
5229
4853031e
MP
52302015-04-24 Marek Polacek <polacek@redhat.com>
5231
5232 PR c/65830
5233 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5234 and OPT_Wshift_count_overflow.
5235
8c2b7f79
MP
5236 PR c/63357
5237 * c-common.c (warn_logical_operator): Warn if the operands have the
5238 same expressions.
5239
b8787813
MP
52402015-04-24 Marek Polacek <polacek@redhat.com>
5241
5242 PR c/61534
5243 * c-common.c (warn_logical_operator): Bail if either operand comes
5244 from a macro expansion.
5245
8fba1830
BRF
52462015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5247
5248 PR target/55143
5249 * c-common.c (c_default_pointer_mode): Add definition.
5250 * c-common.h (c_default_pointer_mode): Add declaration.
5251
17958621
JJ
52522015-03-11 Jakub Jelinek <jakub@redhat.com>
5253
5254 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5255 on record_builtin_type argument.
5256
7ccb1a11
JJ
52572015-03-10 Jakub Jelinek <jakub@redhat.com>
5258
5259 PR c/65120
5260 * c-common.c (warn_logical_not_parentheses): Don't warn for
5261 !x == 0 or !x != 0.
5262
04fd785e
MP
52632015-03-07 Marek Polacek <polacek@redhat.com>
5264
5265 PR sanitizer/65280
5266 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5267 before trying to figure out whether we have a flexible array member.
5268
a4e26206 52692015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5270 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5271
5272 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5273
0d2489f4
EB
52742015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5275
5276 PR ada/65319
5277 * c-ada-spec.c (print_destructor): Remove obsolete code.
5278
83ed54d7
EB
52792015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5280
5281 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5282 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5283 DECL_TEMPLATE_RESULT emulations.
5284 (dump_ada_template)): Add guard for TYPE_METHODS.
5285
7631f0e2
MP
52862015-02-27 Marek Polacek <polacek@redhat.com>
5287
5288 PR c/65040
5289 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5290
d1783ae5
KT
52912015-02-27 Kai Tietz <ktietz@redhat.com>
5292
5293 PR c/35330
5294 * c-pragma.c (handle_pragma_weak): Do not try to create
5295 weak/alias of declarations not being function, or variable
5296 declarations.
5297
56a9f6bc
TS
52982015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5299
5300 PR libgomp/64625
5301 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5302 Remove macros.
5303 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5304
3d5cb23d
MP
53052015-02-16 Marek Polacek <polacek@redhat.com>
5306
5307 PR c/65066
5308 * c-format.c (check_format_types): Handle null param.
5309
fa008882
MP
53102015-02-13 Marek Polacek <polacek@redhat.com>
5311
5312 PR c/65040
5313 * c-format.c (check_format_types): Don't warn about different
5314 signedness if the original value is in the range of WANTED_TYPE.
5315
785f21af
JM
53162015-02-12 Jason Merrill <jason@redhat.com>
5317
5318 PR c++/64956
5319 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5320 to the current highest version.
5321 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5322
4886ec8e
JJ
53232015-02-04 Jakub Jelinek <jakub@redhat.com>
5324
5325 PR c/64824
5326 PR c/64868
5327 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5328 instead of RDIV_EXPR. Use build_binary_op instead of
5329 build2_loc.
5330
40fecdd6
JM
53312015-01-30 Joseph Myers <joseph@codesourcery.com>
5332
5333 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5334 to pass input_location as first argument.
5335
a0c88d06
TV
53362015-01-23 Tom de Vries <tom@codesourcery.com>
5337
5338 PR libgomp/64672
5339 * c.opt (fopenacc): Mark as LTO option.
5340
1506ae0e
TV
53412015-01-23 Tom de Vries <tom@codesourcery.com>
5342
5343 PR libgomp/64707
5344 * c.opt (fopenmp): Mark as LTO option.
5345
31be63ab
JJ
53462015-01-21 Jakub Jelinek <jakub@redhat.com>
5347
5348 PR c/63307
b1726d6c 5349 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5350 (compare_decls): Fix up formatting.
5351
53522015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5353
5354 PR c/63307
5355 * cilk.c: Include vec.h.
5356 (struct cilk_decls): New structure.
5357 (wrapper_parm_cb): Split this function to...
5358 (fill_decls_vec): ...this...
5359 (create_parm_list): ...and this.
5360 (compare_decls): New function.
5361 (for_local_cb): Remove.
5362 (wrapper_local_cb): Ditto.
5363 (build_wrapper_type): For now first traverse and fill vector of
5364 declarations then sort it and then deal with sorted vector.
5365 (cilk_outline): Ditto.
5366 (declare_one_free_variable): Ditto.
5367
6875457f
JM
53682015-01-21 Jason Merrill <jason@redhat.com>
5369
5370 PR c++/64629
5371 * c-format.c (check_format_arg): Call decl_constant_value.
5372
185c9e56
ML
53732015-01-19 Martin Liska <mliska@suse.cz>
5374
5375 * c-common.c (handle_noicf_attribute): New function.
5376
41dbbb37
TS
53772015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5378 Bernd Schmidt <bernds@codesourcery.com>
5379 James Norris <jnorris@codesourcery.com>
5380 Cesar Philippidis <cesar@codesourcery.com>
5381 Ilmir Usmanov <i.usmanov@samsung.com>
5382 Jakub Jelinek <jakub@redhat.com>
5383
5384 * c.opt (fopenacc): New option.
5385 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5386 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5387 New macros.
5388 * c-common.h (c_finish_oacc_wait): New prototype.
5389 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5390 (c_finish_oacc_wait): New function.
5391 * c-pragma.c (oacc_pragmas): New variable.
5392 (c_pp_lookup_pragma, init_pragma): Handle it.
5393 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5394 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5395 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5396 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5397 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5398 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5399 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5400 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5401 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5402 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5403 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5404 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5405 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5406 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5407 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5408 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5409 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5410 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5411 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5412 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5413 PRAGMA_OACC_CLAUSE_WORKER.
5414
3f8257db 54152015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5416
5417 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5418 for the new option fstack-protector_explicit.
5419 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5420 (handle_stack_protect_attribute): New function.
5421
3f8257db 54222015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5423
5424 * c.opt: New option -Warray-bounds=.
5425
adfac8df
JJ
54262015-01-09 Michael Collison <michael.collison@linaro.org>
5427
5428 * array-notation-common.c: Include hash-set.h, machmode.h,
5429 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5430 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5431 * c-ada-spec.c: Ditto.
5432 * c-cilkplus.c: Ditto.
5433 * c-common.c: Include input.h due to flattening of tree.h.
5434 Define macro GCC_C_COMMON_C.
5435 * c-common.h: Flatten tree.h header files into c-common.h.
5436 Remove include of tree-core.h.
5437 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5438 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5439 fold-const.h, wide-int.h, and inchash.h due to
5440 flattening of tree.h.
5441 * c-dump.c: Ditto.
5442 * c-format.c: Flatten tree.h header files into c-common.h.
5443 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5444 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5445 fold-const.h, wide-int.h, and inchash.h due to
5446 flattening of tree.h.
5447 * c-dump.c: Include hash-set.h, machmode.h,
5448 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5449 fold-const.h, wide-int.h, and inchash.h due to
5450 flattening of tree.h.
5451 * c-format.c: Include hash-set.h, machmode.h,
5452 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5453 fold-const.h, wide-int.h, inchash.h and real.h due to
5454 flattening of tree.h.
5455 * c-gimplify.c: Include hash-set.h, machmode.h,
5456 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5457 fold-const.h, wide-int.h, and inchash.h due to
5458 flattening of tree.h.
5459 * cilk.c: Ditto.
5460 * c-lex.c: Ditto.
5461 * c-omp.c: Ditto.
5462 * c-opts.c: Ditto.
5463 * c-pch.c: Ditto.
5464 * c-ppoutput.c: Ditto.
5465 * c-pragma.c: Ditto.
5466 * c-pretty-print.c: Ditto.
5467 * c-semantics.c: Ditto.
5468 * c-ubsan.c: Ditto.
5469 * stub-objc.c: Ditto.
5470
f5481fc4
JM
54712015-01-08 Jason Merrill <jason@redhat.com>
5472
5473 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5474 do_ubsan_in_current_function.
5475 (ubsan_maybe_instrument_reference_or_call): Likewise.
5476 * c-ubsan.h: Declare it.
5477
de35aa66
MS
54782015-01-08 Mike Stump <mikestump@comcast.net>
5479
5480 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5481
4a9a42ab
MP
54822015-01-07 Marek Polacek <polacek@redhat.com>
5483
5484 PR c/64440
5485 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5486 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5487
2f42e5de
TS
54882015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5489
5490 PR c++/31397
5491 * c.opt (Wsuggest-override): New option.
5492
5624e564
JJ
54932015-01-05 Jakub Jelinek <jakub@redhat.com>
5494
5495 Update copyright years.
5496
5bd012f8
MP
54972015-01-05 Marek Polacek <polacek@redhat.com>
5498
5499 PR c/64423
5500 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5501 parameter. Use it.
5502 * c-common.h (warn_array_subscript_with_type_char): Update
5503 declaration.
5504
a7fa8d18
ESR
55052014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5506
5507 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5508 Control macro with flag_sized_deallocation.
5509
3f8257db 55102014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5511
5512 * c.opt (Wdiscarded-array-qualifiers): New option.
5513
1f8d3e84
JJ
55142014-12-19 Jakub Jelinek <jakub@redhat.com>
5515
5516 PR preprocessor/63831
5517 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5518 and __has_cpp_attribute here.
5519 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5520 c_common_has_attribute.
5521 * c-common.h (c_common_has_attribute): New prototype.
5522 * c-lex.c (init_c_lex): Set cb->has_attribute to
5523 c_common_has_attribute instead of cb_has_attribute.
5524 (get_token_no_padding): New function.
5525 (cb_has_attribute): Renamed to ...
5526 (c_common_has_attribute): ... this. No longer static. Use
5527 get_token_no_padding, require ()s, don't build TREE_LIST
5528 unnecessarily, fix up formatting, adjust diagnostics, call
5529 init_attributes.
5530
20b06add
JM
55312014-12-15 Jason Merrill <jason@redhat.com>
5532
5533 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5534 (-Wsized-deallocation): New.
5535 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5536 to on in C++14 and up.
5537
94a073b2
JM
55382014-12-11 Jason Merrill <jason@redhat.com>
5539
acaa5911
JM
5540 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5541
94a073b2
JM
5542 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5543 we aren't complaining about VLAs.
5544
7fb66c15
MP
55452014-12-06 Marek Polacek <polacek@redhat.com>
5546
5547 PR tree-optimization/64183
5548 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5549 shift-expression if it is integer_type_node. Use types_compatible_p.
5550
b731b390
JJ
55512014-11-29 Jakub Jelinek <jakub@redhat.com>
5552
5553 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5554 last argument from create_tmp_var_raw and create_tmp_var calls.
5555 * cilk.c (gimplify_cilk_spawn): Likewise.
5556 * c-omp.c (c_finish_omp_atomic): Likewise.
5557
6a4da643
MP
55582014-11-28 Marek Polacek <polacek@redhat.com>
5559
5560 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5561 instead of unsigned_type_node.
5562
541e35a6
MP
55632014-11-28 Marek Polacek <polacek@redhat.com>
5564
5565 PR c/63862
5566 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5567 to op1_utype.
5568 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5569 expression to unsigned_type_node.
5570
dcc97066
MW
55712014-11-20 Mark Wielaard <mjw@redhat.com>
5572
5573 PR debug/38757
5574 * c-opts.c (set_std_c89): Set lang_hooks.name.
5575 (set_std_c99): Likewise.
5576 (set_std_c11): Likewise.
5577 (set_std_cxx98): Likewise.
5578 (set_std_cxx11): Likewise.
5579 (set_std_cxx14): Likewise.
5580 (set_std_cxx1z): Likewise.
5581
aa7da51a
JJ
55822014-11-21 Jakub Jelinek <jakub@redhat.com>
5583
5584 PR target/63764
5585 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5586 return type to bool.
009a3480 5587 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5588 (convert_vector_to_pointer_for_subscript): Change return type to
5589 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5590 and copy it into a TARGET_EXPR and use that instead of *vecp
5591 directly.
5592
538dd0b7
DM
55932014-11-19 David Malcolm <dmalcolm@redhat.com>
5594
5595 Merger of git branch "gimple-classes-v2-option-3".
5596 * ChangeLog.gimple-classes: New.
5597 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5598 from being just a vec<gimple> to a vec<gbind *>.
5599
c39a5e99
JJ
56002014-11-18 Jakub Jelinek <jakub@redhat.com>
5601
5602 PR sanitizer/63813
5603 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5604 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5605 get_pointer_alignment for non-pointers. Use ptype, or if it is
5606 reference type, corresponding pointer type, as type of kind
5607 argument.
5608 (ubsan_maybe_instrument_reference,
5609 ubsan_maybe_instrument_member_call): Adjust callers.
5610
8537a4a9
MP
56112014-11-15 Marek Polacek <polacek@redhat.com>
5612
5613 PR middle-end/63884
5614 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5615 for NULL fndecl.
5616 (extract_array_notation_exprs): Return for NULL node.
5617
2079956a
JM
56182014-11-12 Joseph Myers <joseph@codesourcery.com>
5619
5620 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5621 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5622
1304953e
JJ
56232014-11-12 Jakub Jelinek <jakub@redhat.com>
5624
5625 PR c/59708
5626 * c-common.c (check_builtin_function_arguments): Handle
5627 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5628
e5e44252
AK
56292014-11-10 Andi Kleen <ak@linux.intel.com>
5630
5631 PR c/60804
5632 * c-common.h (check_no_cilk): Declare.
5633 * cilk.c (get_error_location): New function.
5634 (check_no_cilk): Dito.
5635
e64b984d
AK
56362014-11-10 Andi Kleen <ak@linux.intel.com>
5637
5638 * cilk.c (recognize_spawn): Use expression location
5639 for error message.
5640
13c21655
PC
56412014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5642
5643 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5644
42fd12b1
ESR
56452014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5646
5647 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5648 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5649 (__cpp_range_based_for, __cpp_initializer_lists,
5650 __cpp_delegating_constructors, __cpp_nsdmi,
5651 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5652 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5653 __has_cpp_attribute.
5654 * c-lex.c (cb_has_attribute): New callback CPP function;
5655 (init_c_lex): Set has_attribute callback.
5656
6f450181
RB
56572014-11-04 Richard Biener <rguenther@suse.de>
5658
5659 * c-common.c (shorten_compare): Do not shorten mixed
5660 DFP and non-DFP compares.
5661
26f0e1d6
ESR
56622014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5663
5664 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5665 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5666 Commentary and rearrangement of tests.
5667 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5668 Commentary and rearrangement of tests.
5669 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5670 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5671
ef4bddc2
RS
56722014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5673
5674 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5675 enum from machine_mode.
5676
c582198b
AM
56772014-10-28 Andrew MacLeod <amacleod@redhat.com>
5678
adfac8df
JJ
5679 * c-common.c: Adjust include files.
5680 * c-gimplify.c: Ditto.
5681 * cilk.c: Ditto.
5682 * c-pragma.c: Ditto.
5683 * c-ubsan.c: Ditto.
c582198b 5684
60393bbc
AM
56852014-10-27 Andrew MacLeod <amacleod@redhat.com>
5686
5687 * c-gimplify.c: Adjust include files.
5688
d723bb7c
MLI
56892014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5690
5691 PR c++/53061
5692 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5693 c_common_initialize_diagnostics.
5694 * c-common.h: Likewise.
5695
90f3520e
MP
56962014-10-24 Marek Polacek <polacek@redhat.com>
5697
5698 PR c/56980
5699 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5700 print "struct"/"union"/"enum" for typedefed names.
5701
59d7607a
MP
57022014-10-23 Marek Polacek <polacek@redhat.com>
5703
5704 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5705 in unsigned type.
5706
d95a2703
JJ
57072014-10-22 Jakub Jelinek <jakub@redhat.com>
5708 Yury Gribov <y.gribov@samsung.com>
5709
5710 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5711 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5712 instead of flag_sanitize_recover as bool flag.
5713
8e6ef852
KY
57142014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5715
5716 * cilk.c: Revert previous change.
5717
948cf550
IZ
57182014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5719
5720 PR c/63307
5721 * cilk.c: Include vec.h.
5722 (struct cilk_decls): New structure.
5723 (wrapper_parm_cb): Split this function to...
5724 (fill_decls_vec): ...this...
5725 (create_parm_list): ...and this.
5726 (compare_decls): New function.
5727 (for_local_cb): Remove.
5728 (wrapper_local_cb): Ditto.
5729 (build_wrapper_type): For now first traverse and fill vector of
5730 declarations then sort it and then deal with sorted vector.
5731 (cilk_outline): Ditto.
5732 (declare_one_free_variable): Ditto.
5733
92574c7c
MP
57342014-10-17 Marek Polacek <polacek@redhat.com>
5735
5736 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5737 * c.opt (Wimplicit-int): Initialize to -1.
5738
83685514
AM
57392014-10-16 Andrew MacLeod <amacleod@redhat.com>
5740
5741 * c-pragma.c: Adjust include files.
5742 * c-semantics.c: Likewise.
5743
5b8300ea
DD
57442014-10-16 DJ Delorie <dj@redhat.com>
5745
5746 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5747 multiples of bytes.
5748
5f83e90b
JM
57492014-10-14 Jason Merrill <jason@redhat.com>
5750
5751 PR c++/63455
5752 * c-common.h (CPP_PREPARSED_EXPR): New.
5753 (N_CP_TTYPES): Adjust.
5754
d73326ca
MP
57552014-10-15 Marek Polacek <polacek@redhat.com>
5756
5757 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5758
78a7c317
DD
57592014-10-14 DJ Delorie <dj@redhat.com>
5760
5761 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5762 types, not just __int128.
5763 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5764 types, not just __int128.
5765 (cpp_atomic_builtins): Round pointer sizes up.
5766 (type_suffix): Use type precision, not specific types.
5767 * c-common.c (c_common_reswords): Remove __int128 special case.
5768 (c_common_type_for_size): Check for all __intN types, not just
5769 __int128.
5770 (c_common_type_for_mode): Likewise.
5771 (c_common_signed_or_unsigned_type): Likewise.
5772 (c_build_bitfield_integer_type): Likewise.
5773 (c_common_nodes_and_builtins): Likewise.
5774 (keyword_begins_type_specifier): Likewise.
5775 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5776 __intN variants.
5777
2a22f99c
TS
57782014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5779
5780 * c-common.c: Use hash_table instead of hashtab.
5781
2a8ef767
ESR
57822014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5783
adfac8df 5784 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5785 C++11 section.
5786
3c9aabbd
MG
57872014-10-03 Marc Glisse <marc.glisse@inria.fr>
5788
5789 PR c++/54427
5790 PR c++/57198
5791 PR c++/58845
5792 * c-common.c (warn_logical_operator): Punt for vectors.
5793
a15f7cb8
ESR
57942014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5795
5796 Implement SD-6: SG10 Feature Test Recommendations
5797 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5798 macros and the __has_header macro.
5799
8d0cf15e
JM
58002014-09-30 Jason Merrill <jason@redhat.com>
5801
dd5d5481
JM
5802 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5803 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5804 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5805
b752325e
JM
5806 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5807 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5808
8d0cf15e
JM
5809 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5810 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5811
083e891e
MP
58122014-09-24 Marek Polacek <polacek@redhat.com>
5813
5814 PR c/61405
5815 PR c/53874
5816 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5817
7861b648
AK
58182014-09-23 Andi Kleen <ak@linux.intel.com>
5819
5820 * c-common.c (handle_no_reorder_attribute): New function.
5821 (c_common_attribute_table): Add no_reorder attribute.
5822
9a79452d
JM
58232014-09-22 Joseph Myers <joseph@codesourcery.com>
5824
5825 * c-cppbuiltin.c (c_cpp_builtins): Define
5826 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5827 modes.
5828
dd69f047
JM
58292014-09-18 Joseph Myers <joseph@codesourcery.com>
5830
5831 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5832 for supported floating-point modes.
5833
737a4826
MLI
58342014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5835
5836 * c.opt (Wpsabi): Use LangEnabledBy.
5837 * c-opts.c (c_common_handle_option): Do not handle here.
5838
8cc4b7a2
JM
58392014-09-12 Joseph Myers <joseph@codesourcery.com>
5840
5841 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5842 macros for floating-point modes.
5843
179b5a55
MG
58442014-09-11 Marc Glisse <marc.glisse@inria.fr>
5845
5846 PR target/58757
5847 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5848 __*_DENORM_MIN__ without denormals.
5849
570a11fe
JJ
58502014-09-10 Jakub Jelinek <jakub@redhat.com>
5851
5852 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5853 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5854 ubsan_create_data callers.
5855 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5856 index is constant or BIT_AND_EXPR with constant mask and is
5857 small enough for the bound.
5858 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5859 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5860
b559c810
MLI
58612014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5862
5863 * c.opt: Add CppReason to various flags.
5864 (Wdate-time): Re-sort.
5865 * c-common.c: Include c-common.h earlier.
5866 (struct reason_option_codes_t): Delete.
5867 (c_option_controlling_cpp_error): Prefix global type and struct
5868 with cpp_.
5869
1ef33fd4
MLI
58702014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5871
5872 * c.opt (Wnormalized): New.
5873 (Wnormalized=): Use Enum and Reject Negative.
5874 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5875
66bb34c0
JM
58762014-09-08 Joseph Myers <joseph@codesourcery.com>
5877
5878 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5879 digits of floating-point modes if -fbuilding-libgcc.
5880
53d68b9f
JM
58812014-09-05 Joseph Myers <joseph@codesourcery.com>
5882
5883 * c-cppbuiltin.c (c_cpp_builtins): Also define
5884 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5885 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5886 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5887 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5888 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5889 __LIBGCC_STACK_GROWS_DOWNWARD__,
5890 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5891 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5892 __LIBGCC_DWARF_FRAME_REGISTERS__,
5893 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5894 __LIBGCC_STACK_POINTER_REGNUM__ and
5895 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5896 (builtin_define_with_value): Handle backslash-escaping in string
5897 macro values.
5898
f65586dc
RB
58992014-09-05 Richard Biener <rguenther@suse.de>
5900
5901 PR middle-end/63148
5902 * c-format.c (check_format_arg): Properly handle
5903 effectively signed POINTER_PLUS_EXPR offset.
5904
2b71f4a4
MLI
59052014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5906
5907 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5908 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5909 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5910 and Init.
5911 * c-opts.c (c_common_handle_option): Do not handle here.
5912 (sanitize_cpp_opts): Likewise.
5913 * c-common.c (struct reason_option_codes_t): Handle
5914 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5915
d2e4feca
MP
59162014-09-03 Marek Polacek <polacek@redhat.com>
5917
5918 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5919
9a771876
JJ
59202014-09-02 Jakub Jelinek <jakub@redhat.com>
5921 Balaji V. Iyer <balaji.v.iyer@intel.com>
5922 Igor Zamyatin <igor.zamyatin@intel.com>
5923
5924 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5925 * c-common.c (c_common_reswords): Added _Cilk_for.
5926 * c-common.h (enum rid): Added RID_CILK_FOR.
5927 (cilk_for_number_of_iterations): Add declaration.
5928 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5929 CILK_FOR.
5930 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5931 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5932
81b5d104
MLI
59332014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5934
5935 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5936 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5937 Wundef): Use CPP, Var and Init.
5938 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5939
b753b37b
MLI
59402014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5941
5942 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5943 * c-opts.c (c_common_handle_option): Do not handle here.
5944
028aee17
JM
59452014-08-25 Jason Merrill <jason@redhat.com>
5946
5947 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5948 -std=c++14 and -std=gnu++14, rather than the reverse.
5949 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5950 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5951 * c-common.h (cxx_dialect): Remove cxx1y.
5952
e4276ba5
ESR
59532014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5954
5955 * c-common.h (enum cxx_dialect): Add cxx14.
5956 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5957 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5958 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5959
a545cacd
JM
59602014-08-22 Jason Merrill <jason@redhat.com>
5961
5962 * c.opt (std=gnu++17): Fix alias.
5963
59ea0364
MP
59642014-08-22 Marek Polacek <polacek@redhat.com>
5965
5966 PR c++/62199
5967 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5968 check for vector types. Drop LHS argument.
5969 * c-common.h (warn_logical_not_parentheses): Adjust.
5970
596e808c
MLI
59712014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5972
5973 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5974 (Wmultichar): Likewise.
5975 (Wdate-time): Use C-family languages instead of Common. Use CPP
5976 and Var.
5977 * c-opts.c (c_common_handle_option): Do not handle the above
5978 options here.
5979 (sanitize_cpp_opts): Likewise.
5980
18767f65
MLI
59812014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5982
5983 PR fortran/44054
5984 * c-opts.c: Include tree-diagnostics.h.
5985 (c_diagnostic_finalizer): New.
5986 (c_common_initialize_diagnostics): Use it.
5987
b4413594
MLI
59882014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5989
5990 PR preprocessor/51303
5991 * c-common.c (struct reason_option_codes_t option_codes):
5992 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5993
43f9a13c
MLI
59942014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5995
5996 PR c/60975
5997 PR c/53063
5998 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5999 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6000 (c_common_post_options): Call init_global_opts_from_cpp.
6001 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6002
04159acf
MP
60032014-08-19 Marek Polacek <polacek@redhat.com>
6004
6005 PR c++/62153
6006 * c-common.c (maybe_warn_bool_compare): New function.
6007 * c-common.h (maybe_warn_bool_compare): Declare.
6008 * c.opt (Wbool-compare): New option.
6009
35aff4fb
MP
60102014-08-19 Marek Polacek <polacek@redhat.com>
6011
6012 * c.opt (Wc99-c11-compat): New option.
6013
177cce46
MP
60142014-08-19 Marek Polacek <polacek@redhat.com>
6015
6016 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6017 to warn_c90_c99_compat.
6018 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6019 to -1.
6020
6ae9194f
MLI
60212014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6022 Steven Bosscher <steven@gcc.gnu.org>
6023
6024 PR c/52952
6025 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6026 format_check_results.
6027 (check_function_format): Use true and add comment for boolean
6028 argument.
6029 (finish_dollar_format_checking): Use explicit location when warning.
6030 (check_format_info): Likewise.
6031 (check_format_arg): Set extra_arg_loc and format_string_loc.
6032 (check_format_info_main): Use explicit location when warning.
6033 (check_format_types): Pass explicit location.
6034 (format_type_warning): Likewise.
6035
8e54f6d3
MLI
60362014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6037
6038 PR fortran/44054
6039 * c-format.c: Handle Fortran flags.
6040
cd4e76fc
IZ
60412014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6042
6043 PR other/61962
6044 * array-notation-common.c (find_rank): Added handling for other
6045 types of references.
6046
f3bede71
MP
60472014-08-10 Marek Polacek <polacek@redhat.com>
6048
6049 PR c/51849
6050 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6051 * c.opt (Wc90-c99-compat): Add option.
6052
9f25a338
TS
60532014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6054
6055 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6056
62e4eb35
MP
60572014-08-03 Marek Polacek <polacek@redhat.com>
6058
6059 * c-common.c (check_case_value): Add location_t parameter. Use it.
6060 (c_add_case_label): Pass loc to check_case_value.
6061
b787e7a2
TS
60622014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6063
6064 * cilk.c: Use hash_map instead of pointer_map.
6065
6e2830c3
TS
60662014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6067
6068 * c-gimplify.c: Use hash_set instead of pointer_set.
6069
a7ee52fb
IZ
60702014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6071
6072 PR middle-end/61455
6073 * array-notation-common.c (extract_array_notation_exprs): Handling
6074 of DECL_EXPR added.
6075
944fa280
JJ
60762014-08-01 Jakub Jelinek <jakub@redhat.com>
6077
6078 * c-common.h (min_align_of_type): Removed prototype.
6079 * c-common.c (min_align_of_type): Removed.
6080 * c-ubsan.h (ubsan_maybe_instrument_reference,
6081 ubsan_maybe_instrument_member_call): New prototypes.
6082 * c-ubsan.c: Include stor-layout.h and builtins.h.
6083 (ubsan_maybe_instrument_reference_or_call,
6084 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6085 functions.
6086
b4dfdc11
MG
60872014-07-31 Marc Glisse <marc.glisse@inria.fr>
6088
6089 PR c++/60517
6090 * c.opt (-Wreturn-local-addr): Move to common.opt.
6091
a41844e5
JM
60922014-07-30 Jason Merrill <jason@redhat.com>
6093
6094 PR c++/61659
6095 PR c++/61687
6096 Revert:
6097 * c.opt (-fuse-all-virtuals): New.
6098
976d5a22
TT
60992014-07-30 Tom Tromey <tromey@redhat.com>
6100
6101 PR c/59855
6102 * c.opt (Wdesignated-init): New option.
6103 * c-common.c (c_common_attribute_table): Add "designated_init".
6104 (handle_designated_init): New function.
6105
cdc94aca
MP
61062014-07-24 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/57653
6109 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6110
f41373b6
DS
61112014-07-16 Dodji Seketeli <dodji@redhat.com>
6112
6113 PR preprocessor/60723 - missing system-ness marks for macro tokens
6114 * c-ppoutput.c (struct print::prev_was_system_token): New data
6115 member.
6116 (init_pp_output): Initialize it.
6117 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6118 (do_line_change): Return a flag saying if a line marker was
6119 emitted or not.
6120 (scan_translation_unit): Detect if the system-ness of the token we
6121 are about to emit is different from the one of the previously
6122 emitted token. If so, emit a line marker. Avoid emitting useless
6123 adjacent line markers. Avoid emitting line markers for tokens
6124 originating from the expansion of built-in macros.
6125 (scan_translation_unit_directives_only): Adjust.
6126
4d661eaa
MP
61272014-07-15 Marek Polacek <polacek@redhat.com>
6128
6129 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6130 TYPE_MAX_VALUE is NULL.
6131
b108f48f
JJ
61322014-07-14 Jakub Jelinek <jakub@redhat.com>
6133
6134 PR middle-end/61294
6135 * c.opt (Wmemset-transposed-args): New warning.
6136
c0221884
JM
61372014-07-10 Jason Merrill <jason@redhat.com>
6138
6139 PR c++/61659
6140 PR c++/61687
6141 * c.opt (-fuse-all-virtuals): New.
6142
63dfbb95
RB
61432014-07-09 Richard Biener <rguenther@suse.de>
6144
6145 PR c-family/61741
6146 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6147 using unsigned arithmetic if overflow does not wrap instead of
6148 if overflow is undefined.
6149
773ec47f
MP
61502014-07-06 Marek Polacek <polacek@redhat.com>
6151
6152 PR c/6940
6153 * c.opt (Wsizeof-array-argument): New option.
6154
00a7ba58
JJ
61552014-07-03 Jakub Jelinek <jakub@redhat.com>
6156
b1726d6c 6157 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6158 comments->count <= 1, as comments->entries might be NULL.
6159
52ec0ea3
MP
61602014-07-01 Marek Polacek <polacek@redhat.com>
6161
6162 * c.opt (Wint-conversion): New option.
6163
d5c3d343
MP
61642014-07-01 Marek Polacek <polacek@redhat.com>
6165
6166 PR c/58286
6167 * c.opt (Wincompatible-pointer-types): New option.
6168
6e7ceb17
PC
61692014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6170
6171 PR c++/51400
6172 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6173 Do not discard TYPE_QUALS of type.
6174
da73100b
JM
61752014-06-26 Jason Merrill <jason@redhat.com>
6176
6177 * c-common.h (enum cxx_dialect): Add cxx1z.
6178 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6179 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6180
08eedf75
TJ
61812014-06-26 Teresa Johnson <tejohnson@google.com>
6182
6183 * c-common.h (get_dump_info): Declare.
6184 * c-gimplify.c (c_genericize): Use saved dump files.
6185 * c-opts.c (c_common_parse_file): Begin and end dumps
6186 once around parsing invocation.
6187 (get_dump_info): New function.
6188
7b56b2f8
MP
61892014-06-23 Marek Polacek <polacek@redhat.com>
6190 Andrew MacLeod <amacleod@redhat.com>
6191
6192 PR c/61553
6193 * c-common.c (get_atomic_generic_size): Don't segfault if the
6194 type doesn't have a size.
6195
0e37a2f3
MP
61962014-06-20 Marek Polacek <polacek@redhat.com>
6197
6198 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6199 (ubsan_walk_array_refs_r): New function.
6200 (c_genericize): Instrument array bounds.
6201 * c-ubsan.c: Include "internal-fn.h".
6202 (ubsan_instrument_division): Mark instrumented arrays as having
6203 side effects. Adjust ubsan_type_descriptor call.
6204 (ubsan_instrument_shift): Likewise.
6205 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6206 (ubsan_instrument_bounds): New function.
6207 (ubsan_array_ref_instrumented_p): New function.
6208 (ubsan_maybe_instrument_array_ref): New function.
6209 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6210 (ubsan_array_ref_instrumented_p): Declare.
6211 (ubsan_maybe_instrument_array_ref): Declare.
6212
62132014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6214
6215 PR lto/61123
6216 * c.opt (fshort-enums): Add to LTO.
6217 * c.opt (fshort-wchar): Likewise.
6218
5c3d09f7
MP
62192014-06-16 Marek Polacek <polacek@redhat.com>
6220
6221 PR c/60439
6222 * c.opt (Wswitch-bool): Add Var.
6223
9cf32741
JJ
62242014-06-12 Jakub Jelinek <jakub@redhat.com>
6225
6226 PR middle-end/61486
6227 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6228 #pragma omp target teams or
6229 #pragma omp {,target }teams distribute simd.
6230
62984918
JM
62312014-06-12 Jason Merrill <jason@redhat.com>
6232
6233 * c.opt (Wabi=, fabi-compat-version): New.
6234 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6235 (c_common_post_options): Handle flag_abi_compat_version default.
6236 Disallow -fabi-compat-version=1.
6237 * c-common.h (abi_version_crosses): New.
6238
f961457f
JH
62392014-06-11 Jan Hubicka <hubicka@ucw.cz>
6240
adfac8df 6241 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6242 section names that are no longer trees.
6243
92d28cbb
JJ
62442014-06-10 Jakub Jelinek <jakub@redhat.com>
6245
6246 PR fortran/60928
6247 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6248 (omp_pragmas): ... back here.
6249
742938c9
MP
62502014-06-05 Marek Polacek <polacek@redhat.com>
6251
6252 PR c/49706
6253 * c-common.c (warn_logical_not_parentheses): New function.
6254 * c-common.h (warn_logical_not_parentheses): Declare.
6255 * c.opt (Wlogical-not-parentheses): New option.
6256
9d548dfb
MP
62572014-06-04 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/30020
6260 * c-common.c (check_case_bounds): Add location parameter.
6261 Use it.
6262 (c_add_case_label): Pass loc to check_case_bounds.
6263
fedfecef
MP
62642014-06-03 Marek Polacek <polacek@redhat.com>
6265
6266 PR c/60439
6267 * c.opt (Wswitch-bool): New option.
6268
f6a7cffc
TS
62692014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6270
040d18b6
TS
6271 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6272 Remove prototypes.
6273 (record_types_used_by_current_var_decl): Move prototype to where
6274 it belongs.
6275
f6a7cffc
TS
6276 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6277 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6278 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6279
632f2871
RS
62802014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6281
6282 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6283 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6284 void_zero_node.
6285 * c-pretty-print.c (pp_c_void_constant): New function.
6286 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6287 (c_pretty_printer::expression): Handle VOID_CST.
6288 * cilk.c (extract_free_variables): Likewise.
6289 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6290 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6291
766090c2
TS
62922014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6293
6294 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6295 * c-pragma.c (push_alignment): Adjust.
6296 (handle_pragma_push_options): Likewise.
6297
661a0813
MP
62982014-05-09 Marek Polacek <polacek@redhat.com>
6299
6300 PR c/50459
6301 * c-common.c (check_user_alignment): Return -1 if alignment is error
6302 node.
6303 (handle_aligned_attribute): Don't call default_conversion on
6304 FUNCTION_DECLs.
6305 (handle_vector_size_attribute): Likewise.
6306 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6307 (handle_sentinel_attribute): Call default_conversion and allow even
6308 integral types as an argument.
6309
2793eeab
MP
63102014-05-08 Marek Polacek <polacek@redhat.com>
6311
6312 PR c/61053
6313 * c-common.c (min_align_of_type): New function factored out from...
6314 (c_sizeof_or_alignof_type): ...here.
6315 * c-common.h (min_align_of_type): Declare.
6316
f827930a
MP
63172014-05-08 Marek Polacek <polacek@redhat.com>
6318
6319 PR c/61077
6320 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6321 parameter type of main.
6322
ca49b74e
DD
63232014-05-07 DJ Delorie <dj@redhat.com>
6324
6325 * c-cppbuiltin.c (print_bits_of_hex): New.
6326 (builtin_define_type_minmax): Print values using hex so as not to
6327 require a pre-computed list of string values.
6328
1d60af08
KZ
63292014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6330 Mike Stump <mikestump@comcast.net>
6331 Richard Sandiford <rdsandiford@googlemail.com>
6332
6333 * c-ada-spec.c: Include wide-int.h.
6334 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6335 (dump_generic_ada_node): Use wide-int interfaces.
6336 * c-common.c: Include wide-int-print.h.
6337 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6338 (pointer_int_sum): Use wide-int interfaces.
6339 (c_common_nodes_and_builtins): Use make_int_cst.
6340 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6341 (handle_alloc_size_attribute): Use wide-int interfaces.
6342 (get_nonnull_operand): Likewise.
6343 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6344 * c-lex.c: Include wide-int.h.
6345 (narrowest_unsigned_type): Take a widest_int rather than two
6346 HOST_WIDE_INTs.
6347 (narrowest_signed_type): Likewise.
6348 (interpret_integer): Update accordingly. Use wide-int interfaces.
6349 (lex_charconst): Use wide-int interfaces.
6350 * c-pretty-print.c: Include wide-int.h.
6351 (pp_c_integer_constant): Use wide-int interfaces.
6352 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6353 INT_CST_LT_UNSIGNED.
6354
b15458be
RB
63552014-05-06 Richard Biener <rguenther@suse.de>
6356
6357 * c-opts.c (c_common_post_options): For -freestanding,
6358 -fno-hosted and -fno-builtin disable pattern recognition
6359 if not enabled explicitely.
6360
6577374e
MP
63612014-05-02 Marek Polacek <polacek@redhat.com>
6362
6363 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6364
d00887e8
MP
63652014-05-01 Marek Polacek <polacek@redhat.com>
6366
6367 PR c/43245
6368 * c.opt (Wdiscarded-qualifiers): Add.
6369
f8ed5150
MP
63702014-04-30 Marek Polacek <polacek@redhat.com>
6371
6372 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6373 INT_MIN / -1 sanitization only for integer types.
6374
45484dcf
MP
63752014-04-25 Marek Polacek <polacek@redhat.com>
6376
6377 PR c/18079
6378 * c-common.c (handle_noinline_attribute): Warn if the attribute
6379 conflicts with always_inline attribute.
6380 (handle_always_inline_attribute): Warn if the attribute conflicts
6381 with noinline attribute.
6382
38e514c0
MP
63832014-04-25 Marek Polacek <polacek@redhat.com>
6384
6385 PR c/60156
6386 * c-common.c (check_main_parameter_types): Warn about variadic main.
6387
44875f92
MS
63882014-04-24 Mike Stump <mikestump@comcast.net>
6389
6390 * c.opt (Wshadow-ivar): Default to on.
6391
dcaaa5a0
DP
63922014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6393
6394 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6395
c07d7c02
MP
63962014-04-23 Marek Polacek <polacek@redhat.com>
6397
6398 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6399
1c33c9b7
JJ
64002014-04-22 Jakub Jelinek <jakub@redhat.com>
6401
6402 PR sanitizer/60275
6403 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6404 if flag_sanitize_undefined_trap_on_error.
6405 (ubsan_instrument_division, ubsan_instrument_shift,
6406 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6407 if !flag_sanitize_recover.
6408
793c625f
MG
64092014-04-22 Marc Glisse <marc.glisse@inria.fr>
6410
6411 PR libstdc++/43622
6412 * c-common.c (registered_builtin_types): Make non-static.
6413 * c-common.h (registered_builtin_types): Declare.
6414
b0f1bf36
RB
64152014-04-14 Richard Biener <rguenther@suse.de>
6416 Marc Glisse <marc.glisse@inria.fr>
6417
6418 PR c/60819
6419 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6420 apply may-alias the scalar pointer type when applicable.
6421
3b07fa4a
IZ
64222014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6423
6424 PR middle-end/60467
6425 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6426 as possible argument for Cilk_spawn.
6427
cbbd2b1c
TB
64282014-04-11 Tobias Burnus <burnus@net-b.de>
6429
6430 PR c/60194
6431 * c.opt (Wformat-signedness): Add
6432 * c-format.c(check_format_types): Use it.
6433
6415bd5d
JM
64342014-04-11 Jason Merrill <jason@redhat.com>
6435
6436 PR c++/57926
6437 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6438 default_conversion for an array argument.
6439
6525783a
MP
64402014-04-08 Marek Polacek <polacek@redhat.com>
6441
6442 PR sanitizer/60745
6443 * c-ubsan.c: Include asan.h.
6444 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6445
880a467b
NS
64462014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6447
6448 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6449
7b59ff2d
MP
64502014-04-02 Marek Polacek <polacek@redhat.com>
6451
6452 * c-common.h (c_expand_expr): Remove declaration.
6453
8edbfaa6
JJ
64542014-03-28 Jakub Jelinek <jakub@redhat.com>
6455
6456 PR c++/60689
6457 * c-common.c (add_atomic_size_parameter): When creating new
6458 params vector, push the size argument first.
6459
07d72e1d
JJ
64602014-03-26 Jakub Jelinek <jakub@redhat.com>
6461
6462 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6463 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6464 ubsan_create_data callers.
6465
b35e0fa0
JJ
64662014-03-22 Jakub Jelinek <jakub@redhat.com>
6467
6468 PR debug/60603
6469 * c-opts.c (c_finish_options): Restore cb_file_change call to
6470 <built-in>.
6471
39a1ebb3
JJ
64722014-03-13 Jakub Jelinek <jakub@redhat.com>
6473
6474 PR middle-end/36282
6475 * c-pragma.c (apply_pragma_weak): Only look at
6476 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6477 DECL_ASSEMBLER_NAME_SET_P (decl).
6478 (maybe_apply_pending_pragma_weaks): Exit early if
6479 vec_safe_is_empty (pending_weaks) rather than only when
6480 !pending_weaks.
6481 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6482 set assembler name back to NULL afterwards.
6483
a07f6ed2
JM
64842014-03-11 Jason Merrill <jason@redhat.com>
6485
6486 * c.opt: Add -std=gnu++14.
6487
75b107f5
IB
64882014-03-11 Ian Bolton <ian.bolton@arm.com>
6489
6490 * c-opts.c (c_common_post_options): Don't override
6491 -ffp-contract=fast if unsafe-math-optimizations is on.
6492
f42c637e
PM
64932014-03-08 Paulo Matos <paulo@matos-sorge.com>
6494
22b15758 6495 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6496
70e24808
JM
64972014-03-07 Jason Merrill <jason@redhat.com>
6498
6499 * c.opt: Add -std=c++14.
6500
3af9c5e9
MP
65012014-03-06 Marek Polacek <polacek@redhat.com>
6502
6503 PR c/60197
6504 * cilk.c (contains_cilk_spawn_stmt): New function.
6505 (contains_cilk_spawn_stmt_walker): Likewise.
6506 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6507 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6508
b3bdf019
JJ
65092014-03-03 Jakub Jelinek <jakub@redhat.com>
6510
6511 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6512 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6513 even when flag_preprocess_only.
6514
ca7e759d
JM
65152014-02-26 Jason Merrill <jason@redhat.com>
6516
6517 PR c++/59231
6518 PR c++/11586
6519 * c-common.c (shorten_compare): Don't check
6520 c_inhibit_evaluation_warnings.
6521
28e41874
JJ
65222014-02-19 Jakub Jelinek <jakub@redhat.com>
6523
cca615af
JJ
6524 PR c/37743
6525 * c-common.c (c_common_nodes_and_builtins): When initializing
6526 c_uint{16,32,64}_type_node, also set corresponding
6527 uint{16,32,64}_type_node to the same value.
6528
28e41874
JJ
6529 PR c++/60267
6530 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6531 for PRAGMA_IVDEP if flag_preprocess_only.
6532
c2bf53a1
JJ
65332014-02-12 Jakub Jelinek <jakub@redhat.com>
6534
6535 PR c/60101
6536 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6537 if false, add ADD itself, rather than vice versa.
6538 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6539 copy. For SAVE_EXPR, only call merge_tlist once.
6540
8fcbce72
JJ
65412014-02-08 Jakub Jelinek <jakub@redhat.com>
6542
6543 PR middle-end/60092
6544 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6545 and tree_to_uhwi.
6546 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6547 functions.
6548 (c_common_attribute_table): Add alloc_align and assume_aligned
6549 attributes.
6550
0a756a3f
MP
65512014-02-06 Marek Polacek <polacek@redhat.com>
6552
6553 PR c/60087
6554 * c-common.c (warn_for_sign_compare): Call warning_at with location
6555 instead of warning.
6556
7ec4847a
MP
65572014-02-05 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/53123
6560 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6561 statement.
6562
66f20604
MP
65632014-02-04 Marek Polacek <polacek@redhat.com>
6564
6565 PR c/60036
6566 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6567 SAVE_EXPR.
6568
5d77fb19
MG
65692014-02-03 Marc Glisse <marc.glisse@inria.fr>
6570
6571 PR c++/53017
6572 PR c++/59211
6573 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6574 handle_vector_size_attribute, handle_nonnull_attribute): Call
6575 default_conversion on the attribute argument.
6576 (handle_nonnull_attribute): Increment the argument number.
6577
81e5eca8
MP
65782014-01-31 Marek Polacek <polacek@redhat.com>
6579
6580 PR c/59963
6581 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6582 build_function_call_vec.
6583 (resolve_overloaded_builtin): Likewise.
6584 * c-common.h (build_function_call_vec): Adjust declaration.
6585
68fca595
MP
65862014-01-30 Marek Polacek <polacek@redhat.com>
6587
6588 PR c/59940
6589 * c-common.h (unsafe_conversion_p): Adjust declaration.
6590 (warnings_for_convert_and_check): Likewise.
6591 (convert_and_check): Likewise.
6592 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6593 expansion_point_location_if_in_system_header on it.
6594 (warnings_for_convert_and_check): Add location parameter. Call
6595 expansion_point_location_if_in_system_header on it. Use it.
6596 (convert_and_check): Add location parameter. Use it.
6597 (conversion_warning): Likewise.
6598 (c_add_case_label): Adjust convert_and_check calls.
6599 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6600
b72271b9
BI
66012014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6602
6603 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6604 flag_cilkplus.
6605 * c-pragma.c (init_pragma): Likewise.
6606 * c.opt: Likewise.
6607
393e8e8b
MP
66082014-01-23 Marek Polacek <polacek@redhat.com>
6609
6610 PR c/59846
6611 * c-common.c (shorten_compare): Add location_t parameter.
6612 * c-common.h (shorten_binary_op): Adjust declaration.
6613
f04dda30
MP
66142014-01-23 Marek Polacek <polacek@redhat.com>
6615
6616 PR c/58346
6617 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6618 * c-common.h: Declare it.
6619
621955cb
EB
66202014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6621
6622 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6623 * c-ada-spec.c (dump_ads): Likewise.
6624 (cpp_check): Likewise.
6625 (dump_ada_specs): Likewise.
6626
66272014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6628
6629 PR c++/49718
6630 * c-common.c (handle_no_instrument_function_attribute): Allow
6631 no_instrument_function attribute in class member
6632 definition/declaration.
6633
241f845a
JJ
66342014-01-15 Jakub Jelinek <jakub@redhat.com>
6635
6636 PR c/58943
6637 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6638 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6639 being COMPOUND_EXPR.
6640 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6641 operand a SAVE_EXPR and second MODIFY_EXPR.
6642
e83b8e2e
JJ
66432014-01-09 Jakub Jelinek <jakub@redhat.com>
6644
6645 PR target/58115
6646 * c-pch.c (c_common_write_pch): Call
6647 prepare_target_option_nodes_for_pch.
6648
23a5b65a
RS
66492014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6650
6651 Update copyright years
6652
f9030485
RS
66532014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6654
6655 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6656 the copyright notice.
6657
f2aa696b
EB
66582013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6659
6660 * c-ada-spec.c (print_constructor): New function.
6661 (print_destructor): Retrieve the origin of the destructor.
6662 (print_ada_declaration): Revamp handling of constructors/destructors.
6663
3f8257db 66642013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6665 Bill Maddox <maddox@google.com>
6666 Jason Merrill <jason@redhat.com>
6667
6668 * c.opt: Add -fdeclone-ctor-dtor.
6669 * c-opts.c (c_common_post_options): Default to on iff -Os.
6670
41958c28
BI
66712013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6672
6673 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6674 attribute.
6675 * c-pragma.h (enum pragma_cilk_clause): Remove.
6676 (enum pragma_omp_clause): Added the following fields:
6677 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6678 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6679 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6680 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6681 PRAGMA_CILK_CLAUSE_UNIFORM.
6682
b1726d6c 6683
12893402
BI
66842013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6685
6686 * cilk.c (cilk_outline): Made this function non-static.
6687 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6688 (create_cilk_wrapper): Added a new parameter: a function pointer.
6689 (c_install_body_w_frame_cleanup): Remove
6690 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6691 * c-common.h (cilk_outline): New prototype.
6692 (gimplify_cilk_spawn): Removed two parameters.
6693 (cilk_install_body_with_frame_cleanup): New prototype.
6694 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6695 CILK_SPAWN_STMT case.
6696
085b42ed
BS
66972013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6698
2ce064c3
BS
6699 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6700
085b42ed
BS
6701 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6702 (int_array_type_node): Remove.
6703 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6704
9e36c9ed
MP
67052013-12-05 Marek Polacek <polacek@redhat.com>
6706
6707 PR c/52023
6708 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6709 [ADJUST_FIELD_ALIGN].
6710
296674db
JM
67112013-12-04 Joseph Myers <joseph@codesourcery.com>
6712
6713 PR c/52023
6714 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6715 and check field alignment if set.
6716 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6717 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6718
b1726d6c 67192013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6720 Marek Polacek <polacek@redhat.com>
6721
6722 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6723 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6724
d7947e19
L
67252013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6726
6727 PR c/59309
6728 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6729 arguments.
6730
fad7652e
JJ
67312013-11-29 Jakub Jelinek <jakub@redhat.com>
6732
6733 PR c/59280
6734 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6735 goto invalid. If it is error_mark_node, don't issue further
6736 diagnostics.
6737
8b5e1202
SO
67382013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6739
6740 * c.opt (Wopenmp-simd): New.
6741
0a508bb6
JJ
67422013-11-22 Jakub Jelinek <jakub@redhat.com>
6743
6744 * c-ubsan.h (ubsan_instrument_return): New prototype.
6745 * c-ubsan.c (ubsan_instrument_return): New function.
6746
2fb9a547
AM
67472013-11-22 Andrew MacLeod <amacleod@redhat.com>
6748
6749 * c-common.c: Add required include files from gimple.h.
6750 * c-gimplify.c: Likewise
6751 * cilk.c: Likewise
6752
8400e75e
DM
67532013-11-22 David Malcolm <dmalcolm@redhat.com>
6754
6755 * c-common.c (unsafe_conversion_p): Remove use of
6756 EXPR_LOC_OR_HERE macro.
6757 (conversion_warning): Likewise.
6758 (warnings_for_convert_and_check): Likewise.
6759 (warn_for_collisions_1): Likewise.
6760 (shorten_compare): Likewise, and remove use of in_system_header
6761 macro, using the location from the former.
6762 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6763 (cb_def_pragma): Remove use of in_system_header macro.
6764 (lex_string): Likewise.
6765 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6766
eb1ce453
KZ
67672013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6768 Mike Stump <mikestump@comcast.net>
6769 Richard Sandiford <rdsandiford@googlemail.com>
6770
6771 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6772 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6773 tree_fits_shwi_p or tree_fits_uhwi_p.
6774 (dump_generic_ada_node): Likewise.
6775 * c-format.c (check_format_arg): Likewise.
6776 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6777
6b3b8c27
KZ
67782013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6779
6780 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6781
49b0aa18
JC
67822013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6783
6784 PR c/53001
6785 * c-common.c (unsafe_conversion_p): Make this function
6786 return an enumeration with more detail.
6787 (conversion_warning): Use the new return type of
6788 unsafe_conversion_p to separately warn either about conversions
6789 that lower floating point number precision or about the other
6790 kinds of conversions.
6791 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6792 (unsafe_conversion_p): switching return type to
6793 conversion_safety enumeration.
49b0aa18
JC
6794 * c.opt: Adding new warning -Wfloat-conversion and
6795 enabling it with -Wconversion.
6796
b826515a
BS
67972013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6798
8e745a17
JJ
6799 * c-opts.c: Include plugin.h.
6800 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6801
b9a55b13
MP
68022013-11-19 Marek Polacek <polacek@redhat.com>
6803
6804 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6805 call.
6806 (ubsan_instrument_shift): Likewise.
6807 (ubsan_instrument_vla): Likewise.
6808
7d362f6c
RS
68092013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6810
6811 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6812 cast to unsigned type.
6813
386b1f1f
RS
68142013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6815
6816 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6817 tree_low_cst.
6818 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6819 rather than tree_low_cst.
6820
ae7e9ddd
RS
68212013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6822
6823 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6824 tree_to_uhwi throughout.
6825
9439e9a1
RS
68262013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6827
6828 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6829 tree_low_cst (..., 0) with tree_to_shwi throughout.
6830
cc269bb6
RS
68312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6832
6833 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6834 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6835
9541ffee
RS
68362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6837
6838 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6839 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6840
c02065fc
AH
68412013-11-15 Aldy Hernandez <aldyh@redhat.com>
6842
6843 * c-cilkplus.c: New file.
6844 * c-common.c (readonly_error): Add location argument.
6845 * c-common.h (readonly_error): Same.
6846 (c_finish_cilk_clauses): Protoize.
6847 (c_check_cilk_loop): Same.
6848 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6849 Do not fail on error_mark_node.
6850 Abstract increment canonicalization to here...
6851 (c_omp_for_incr_canonicalize_ptr): New.
6852 c-pragma.c (init_pragma): Register "simd" pragma.
6853 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6854 (enum pragma_cilk_clause): New.
6855
9cc65f15
RS
68562013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6857
6858 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6859 wchar_type and host_integerp checks.
6860
18f429e2
AM
68612013-11-14 Andrew MacLeod <amacleod@redhat.com>
6862
6863 * c-common.c: Likewise.
6864 * c-gimplify.c: Likewise.
6865 * cilk.c: Likewise.
6866
d8a2d370
DN
68672013-11-14 Diego Novillo <dnovillo@google.com>
6868
6869 * c-common.c: Include fold-const.h.
6870 Include stor-layout.h.
6871 Include calls.h.
6872 Include stringpool.h.
6873 Include attribs.h.
6874 Include varasm.h.
6875 Include trans-mem.h.
6876 * c-cppbuiltin.c: Include stor-layout.h.
6877 Include stringpool.h.
6878 * c-format.c: Include stringpool.h.
6879 * c-lex.c: Include stringpool.h.
6880 Include stor-layout.h.
6881 * c-pragma.c: Include stringpool.h.
6882 Include attribs.h.
6883 Include varasm.h.
6884 Include gcc-symtab.h.
6885 * c-pretty-print.c: Include stor-layout.h.
6886 Include attribs.h.
6887 * cilk.c: Include stringpool.h.
6888 Include calls.h.
6889
38b7bc7f
JM
68902013-11-13 Joseph Myers <joseph@codesourcery.com>
6891
6892 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6893 * c-common.c (c_common_reswords): Add __auto_type.
6894 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6895
45b0be94
AM
68962013-11-12 Andrew MacLeod <amacleod@redhat.com>
6897
18f429e2
AM
6898 * c-common.c: Include gimplify.h.
6899 * c-gimplify.c: Likewise.
6900 * cilk.c: Likewise.
6901 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6902 * c-ubsan.c: Don't include gimple.h.
45b0be94 6903
582d9b50
JM
69042013-11-12 Joseph Myers <joseph@codesourcery.com>
6905
6906 * c-common.c (c_common_reswords): Add _Thread_local.
6907
6b28e197
JM
69082013-11-09 Joseph Myers <joseph@codesourcery.com>
6909
6910 * c-common.c (atomic_size_supported_p): New function.
6911 (resolve_overloaded_atomic_exchange)
6912 (resolve_overloaded_atomic_compare_exchange)
6913 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6914 Use it instead of comparing size with a local list of sizes.
6915
267bac10
JM
69162013-11-07 Andrew MacLeod <amacleod@redhat.com>
6917 Joseph Myers <joseph@codesourcery.com>
6918
6919 * c-common.h (enum rid): Add RID_ATOMIC.
6920 * c-common.c (c_common_reswords): Add _Atomic.
6921 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6922 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6923 * c-format.c (check_format_types): Check for extra _Atomic
6924 qualifiers in format argument.
6925 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6926 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6927
5157b91e
TB
69282013-11-06 Tobias Burnus <burnus@net-b.de>
6929
6930 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6931
6dbe0958
JM
69322013-11-06 Joseph Myers <joseph@codesourcery.com>
6933
6934 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6935 standards modes.
6936 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6937 to mean lack of IEEE 754 support.
6938
e8ff5196
TB
69392013-11-05 Tobias Burnus <burnus@net-b.de>
6940
6941 * c.opt (-Wdate-time): New option
6942 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6943
254a0760
JM
69442013-11-05 Joseph Myers <joseph@codesourcery.com>
6945
6946 * c-cppbuiltin.c (cpp_iec_559_value): Test
6947 flag_excess_precision_cmdline not flag_excess_precision.
6948
6d7f7e0a
TB
69492013-11-05 Tobias Burnus <burnus@net-b.de>
6950
6951 * c.opt (fopenmp-simd): New option.
6952 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6953 (omp_pragmas): ... this new struct.
6954 (c_pp_lookup_pragma): Also walk omp_pragmas.
6955 (init_pragma): Init pragmas for -fopenmp-simd.
6956
55a7f02f
MP
69572013-11-04 Marek Polacek <polacek@redhat.com>
6958
6959 PR c++/58979
6960 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6961
9193fb05
JM
69622013-11-04 Joseph Myers <joseph@codesourcery.com>
6963
6964 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6965 New functions.
6966 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6967
94159ecf
EB
69682013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6969
6970 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6971 (dump_ada_specs): Adjust prototype of second callback.
6972 * c-ada-spec.c (cpp_check): New global variable.
6973 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6974 (print_generic_ada_decl): Likewise.
6975 (has_static_fields): Change return type to bool and add guard.
6976 (has_nontrivial_methods): New predicate.
6977 (is_tagged_type): Change return type to bool.
6978 (separate_class_package): Call has_nontrivial_methods.
6979 (pp_ada_tree_identifier): Minor tweaks.
6980 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6981 (dump_ada_array_domains): Likewise.
6982 (dump_ada_array_type): Likewise.
6983 (dump_template_types): Remove cpp_check parameter and do not pass it to
6984 dump_generic_ada_node.
6985 (dump_ada_template): Likewise.
6986 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6987 recursively.
6988 (print_ada_methods): Change return type to integer. Remove cpp_check
6989 parameter and do not pass it down.
6990 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6991 dump_generic_ada_node.
6992 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6993 accessing methods.
6994 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6995 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6996 value of print_ada_methods.
6997 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6998 Set cpp_check to it before invoking dump_ada_nodes.
6999 (dump_ada_specs): Likewise.
7000
b906f4ca
MP
70012013-11-03 Marek Polacek <polacek@redhat.com>
7002
7003 * c-ubsan.c: Don't include hash-table.h.
7004 (ubsan_instrument_vla): New function.
7005 * c-ubsan.h: Declare it.
7006
5e20cdc9
DM
70072013-10-31 David Malcolm <dmalcolm@redhat.com>
7008
7009 Automated part of renaming of symtab_node_base to symtab_node.
7010
7011 Patch autogenerated by rename_symtab.py from
7012 https://github.com/davidmalcolm/gcc-refactoring-scripts
7013 revision 58bb219cc090b2f4516a9297d868c245495ee622
7014
7015 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7016 symtab_node_base to symtab_node.
7017
7057e645
ESR
70182013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7019
8e745a17 7020 Implement C++14 digit separators.
7057e645
ESR
7021 * c-lex.c (interpret_float): Remove digit separators from scratch string
7022 before building real literal.
7023
193ea7bc
JJ
70242013-10-30 Jakub Jelinek <jakub@redhat.com>
7025
7026 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7027
939b37da
BI
70282013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7029
7030 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7031 fields.
7032 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7033 enabled.
7034 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7035 (insert_cilk_frame): New prototype.
7036 (cilk_init_builtins): Likewise.
7037 (gimplify_cilk_spawn): Likewise.
7038 (c_cilk_install_body_w_frame_cleanup): Likewise.
7039 (cilk_detect_spawn_and_unwrap): Likewise.
7040 (cilk_set_spawn_marker): Likewise.
7041 (build_cilk_sync): Likewise.
7042 (build_cilk_spawn): Likewise.
7043 * cilk.c: New file.
7044
67348ccc
DM
70452013-10-29 David Malcolm <dmalcolm@redhat.com>
7046
7047 Patch autogenerated by refactor_symtab.py from
7048 https://github.com/davidmalcolm/gcc-refactoring-scripts
7049 revision 58bb219cc090b2f4516a9297d868c245495ee622
7050
7051 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7052 to a true class hierarchy.
7053 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7054
d570872d
RS
70552013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7056
7057 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7058
98906124
JL
70592013-10-26 Jeff Law <law@redhat.com>
7060
adfac8df
JJ
7061 * c-common.c (c_define_builtins): Remove mudflap support.
7062 * c.opt: Ignore and warn for mudflap options.
98906124 7063
d73749df 70642013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7065
7066 PR other/33426
7067 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7068 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7069
3f04b1bb
JM
70702013-10-23 Jason Merrill <jason@redhat.com>
7071
7072 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7073
acf0174b
JJ
70742013-10-11 Jakub Jelinek <jakub@redhat.com>
7075
acd15a28
JJ
7076 * c-common.h (omp_clause_mask::operator !=): New method.
7077 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7078 instead of if (mask & something) tests everywhere.
7079
acf0174b
JJ
7080 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7081 201307 instead of 201107.
7082 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7083 (c_common_attribute_table): Add "omp declare target" and
7084 "omp declare simd" attributes.
7085 (handle_omp_declare_target_attribute,
7086 handle_omp_declare_simd_attribute): New functions.
7087 * c-omp.c: Include c-pragma.h.
7088 (c_finish_omp_taskgroup): New function.
7089 (c_finish_omp_atomic): Add swapped argument, if true,
7090 build the operation first with rhs, lhs arguments and use NOP_EXPR
7091 build_modify_expr.
7092 (c_finish_omp_for): Add code argument, pass it down to make_code.
7093 (c_omp_split_clauses): New function.
7094 (c_split_parallel_clauses): Removed.
7095 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7096 c_omp_declare_simd_clauses_to_decls): New functions.
7097 * c-common.h (omp_clause_mask): New type.
7098 (OMP_CLAUSE_MASK_1): Define.
7099 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7100 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7101 omp_clause_mask::operator |, omp_clause_mask::operator &,
7102 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7103 omp_clause_mask::operator ==): New methods.
7104 (enum c_omp_clause_split): New.
7105 (c_finish_omp_taskgroup): New prototype.
7106 (c_finish_omp_atomic): Add swapped argument.
7107 (c_finish_omp_for): Add code argument.
7108 (c_omp_split_clauses): New prototype.
7109 (c_split_parallel_clauses): Removed.
7110 (c_omp_declare_simd_clauses_to_numbers,
7111 c_omp_declare_simd_clauses_to_decls): New prototypes.
7112 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7113 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7114 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7115 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7116 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7117 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7118 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7119 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7120 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7121 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7122 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7123 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7124 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7125 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7126 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7127 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7128 PRAGMA_OMP_CLAUSE_UNIFORM.
7129
826cacfe
MG
71302013-10-09 Marc Glisse <marc.glisse@inria.fr>
7131
7132 PR tree-optimization/20318
7133 * c-common.c (handle_returns_nonnull_attribute): New function.
7134 (c_common_attribute_table): Add returns_nonnull.
7135
2284b034
MG
71362013-10-03 Marc Glisse <marc.glisse@inria.fr>
7137
7138 PR c++/19476
7139 * c.opt (fcheck-new): Move to common.opt.
7140
b56e9788
MP
71412013-09-25 Marek Polacek <polacek@redhat.com>
7142 Jakub Jelinek <jakub@redhat.com>
7143
7144 PR sanitizer/58413
7145 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7146 an expression if we can prove it is correct.
7147 (ubsan_instrument_division): Likewise. Remove unnecessary
7148 check.
7149
ce6923c5
MP
71502013-09-18 Marek Polacek <polacek@redhat.com>
7151
7152 PR sanitizer/58411
7153 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7154 Declare it.
7155 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7156
fb5610fb
IS
71572013-09-14 Iain Sandoe <iain@codesourcery.com>
7158
7159 PR target/48094
7160 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7161 fobjc-gc, freplace-objc-classes): Accept for LTO.
7162
88b0e79e
JC
71632013-09-13 Jacek Caban <jacek@codeweavers.com>
7164
7165 * c-target.def: New hook
7166
c9b0866a
PC
71672013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7168
7169 PR c++/43452
7170 * c.opt (Wdelete-incomplete): Add.
7171
0af94e6f
JR
71722013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7173
7174 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7175 (vector_types_compatible_elements_p): New function.
7176 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7177 declaration.
7178 (vector_types_compatible_elements_p): Declare.
7179
7c26172c
GDR
71802013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7181
7182 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7183 a virtual member function.
7184 (pp_simple_type_specifier): Remove.
7185 (pp_c_type_specifier): Likewise.
7186 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7187 Rename from pp_c_type_specifier. Adjust.
7188 (c_pretty_printer::c_pretty_printer): Do not assign to
7189 simple_type_specifier.
7190
20059c8b
GDR
71912013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7192
7193 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7194 member function.
7195 (c_pretty_printer::storage_class_specifier): Likewise.
7196 (c_pretty_printer::initializer): Likewise.
7197 (pp_declaration): Remove.
7198 (pp_declaration_specifiers): Likewise.
7199 (pp_abstract_declarator): Likewise.
7200 (pp_declarator): Likewise.
7201 (pp_type_id): Likewise.
7202 (pp_statement): Likewise.
7203 (pp_constant): Likewise.
7204 (pp_id_expression): Likewise.
7205 (pp_primary_expression): Likewise.
7206 (pp_unary_expression): Likewise.
7207 (pp_multiplicative_expression): Likewise.
7208 (pp_conditional_expression): Likewise.
7209 (pp_assignment_expression): Likewise.
7210 (pp_expression): Likewise.
7211 (pp_c_type_id): Likewise.
7212 (pp_c_storage_class_specifier): Likewise.
7213 * c-pretty-print.c (pp_c_type_cast): Tidy.
7214 (pp_c_pointer): Likewise.
7215 (pp_c_type_specifier): Likewise.
7216 (pp_c_parameter_type_list): Likewise.
7217 (pp_c_function_definition): Likewise.
7218 (pp_c_init_declarator): Likewise.
7219 (pp_c_initializer_list): Likewise.
7220 (pp_c_constructor_elts): Likewise.
7221 (c_pretty_printer::direct_abstract_declarator): Likewise.
7222 (c_pretty_printer::declaration_specifiers): Likewise.
7223 (c_pretty_printer::primary_expression): Likewise.
7224 (c_pretty_printer::postfix_expression): Likewise.
7225 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7226 (c_pretty_printer::storage_class_specifier): Rename from
7227 pp_c_storage_class_specifier.
7228 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7229 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7230 storage_class_specifier, initializer, offset_list, flags.
7231
de5a5fa1
MP
72322013-08-30 Marek Polacek <polacek@redhat.com>
7233
7234 * c-ubsan.c: New file.
7235 * c-ubsan.h: New file.
7236
8f0e4d72
GDR
72372013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7238
7239 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7240 member function.
7241 (c_pretty_printer::declaration_specifiers): Likewise.
7242 (c_pretty_printer::declarator): Likewise.
7243 (c_pretty_printer::abstract_declarator): Likewise.
7244 (c_pretty_printer::direct_abstract_declarator): Likewise.
7245 (c_pretty_printer::direct_declarator): Likewise.
7246 (c_pretty_printer::function_specifier): Likewise.
7247 (pp_declaration): Adjust.
7248 (pp_declaration_specifiers): Likewise.
7249 (pp_abstract_declarator): Likewise.
7250 (pp_direct_declarator): Likewise.
7251 (pp_function_specifier): Likewise.
7252 (pp_direct_abstract_declarator): Remove as unused.
7253 (pp_c_declaration): Remove.
7254 (pp_c_declaration_specifiers): Likewise.
7255 (pp_c_declarator): Likewise.
7256 (pp_c_direct_declarator): Likewise.
7257 (pp_c_function_specifier): Likewise.
7258 (pp_c_direct_abstract_declarator): Likewise.
7259 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7260 from pp_c_abstract_declarator. Adjust.
7261 (c_pretty_printer::direct_abstract_declarator): Rename from
7262 pp_c_direct_abstract_declarator. Adjust.
7263 (c_pretty_printer::function_specifier): Rename from
7264 pp_c_function_specifier. Adjust.
7265 (c_pretty_printer::declaration_specifiers): Rename from
7266 pp_c_declaration_specifiers. Adjust.
7267 (c_pretty_printer::direct_declarator): Rename from
7268 pp_c_direct_declarator. Adjust.
7269 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7270 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7271 (c_pretty_printer::c_pretty_printer): Do not assign to
7272 declaration, declaration_specifiers, declarator,
7273 direct_declarator, direct_abstract_declarator, function_specifier.
7274
00d34d3a
GDR
72752013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7276
7277 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7278 virtual member function.
7279 (c_pretty_printer::multiplicative_expression): Likewise.
7280 (c_pretty_printer::conditional_expression): Likewise.
7281 (c_pretty_printer::assignment_expression): Likewise.
7282 (c_pretty_printer::expression): Likewise.
7283 (pp_unary_expression): Adjust.
7284 (pp_multiplicative_expression): Likewise.
7285 (pp_assignment_expression): Likewise.
7286 (pp_conditional_expression): Likewise.
7287 (pp_expression): Likewise.
7288 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7289 from pp_c_unary_expression. Adjust.
7290 (c_pretty_printer::multiplicative_expression): Rename from
7291 pp_c_multiplicative_expression. Adjust.
7292 (c_pretty_printer::conditional_expression): Rename from
7293 pp_c_conditional_expression. Adjust.
7294 (c_pretty_printer::assignment_expression): Rename from
7295 pp_c_assignment_expression. Adjust.
7296 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7297 (c_pretty_printer::c_pretty_printer): Do not assign to
7298 unary_expression, multiplicative_expression,
7299 conditional_expression, expression.
7300
fb22178f
GDR
73012013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7302
7303 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7304 virtual member function.
7305 (pp_postfix_expression): Adjust.
7306 (pp_c_postfix_expression): Remove.
7307 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7308 from pp_c_postfix_expression. Adjust.
7309 (c_pretty_printer::c_pretty_printer): Do not assign to
7310 postfix_expression.
7311
7ecc2600
GDR
73122013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7313
7314 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7315 virtua member function.
7316 (pp_primary_expression): Adjust.
7317 (pp_c_primary_expression): Remove.
7318 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7319 from pp_c_primary_expression. Adjust.
7320 (pp_c_initializer_list): Use pp_primary_expression.
7321 (c_pretty_printer::c_pretty_printer): Do not assign to
7322 primary_expression.
7323
0691175f
GDR
73242013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7325
7326 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7327 * c-pretty-print.c (M_): Remove.
7328 (c_pretty_printer::translate_string): Define.
7329 (pp_c_type_specifier): Use it.
7330 (pp_c_primary_expression): Likewise.
7331 (pp_c_expression): Likewise.
7332
66dfe4c4
GDR
73332013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7334
7335 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7336 virtual function.
7337 (pp_c_id_expression): Remove.
7338 (pp_id_expression): Adjust.
7339 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7340 pp_c_id_expression. Adjust.
7341 (pp_c_postfix_expression): Use pp_id_expression.
7342 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7343
ca43e9d5
GDR
73442013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7345
7346 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7347 member function.
7348 (pp_constant): Adjust.
7349 (pp_c_constant): Remove.
7350 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7351 pp_c_constant. Adjust.
7352 (pp_c_constant)
7353 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7354 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7355
da6ca2b5
GDR
73562013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7357
7358 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7359 (c_pretty_printer::c_pretty_printer): Declare.
7360 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7361 c_pretty_printer_init. Adjust.
7362 (print_c_tree): Do not call c_pretty_printer_init.
7363 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7364
65a372f4
AC
73652013-08-09 Arnaud Charlet <charlet@adacore.com>
7366
7367 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7368
fd9b0f32
PC
73692013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7370
7371 PR c++/58080
7372 * c-common.c (pointer_int_sum): Add bool parameter.
7373 * c-common.h (pointer_int_sum): Adjust declaration.
7374
e0aec1e9
GDR
73752013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7376
7377 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7378 c_pretty_printer variable.
7379
b066401f
GDR
73802013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7381
7382 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7383 (pp_base): Remove.
7384 (pp_c_base): Likewise. Adjust users.
7385 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7386 (pp_c_whitespace): Do not call pp_base.
7387 (pp_c_left_paren): Likewise.
7388 (pp_c_right_paren): Likewise.
7389 (pp_c_left_brace): Likewise.
7390 (pp_c_right_brace): Likewise.
7391 (pp_c_left_bracket): Likewise.
7392 (pp_c_right_bracket): Likewise.
7393 (pp_c_dot): Likewise.
7394 (pp_c_ampersand): Likewise.
7395 (pp_c_star): Likewise.
7396 (pp_c_arrow): Likewise.
7397 (pp_c_semicolon): Likewise.
7398 (pp_c_complement): Likewise.
7399 (pp_c_exclamation): Likewise.
7400 (pp_c_direct_declarator): Likewise.
7401 (pp_c_ws_string): Likewise.
7402 (pp_c_identifier): Likewise.
7403 (pp_c_statement): Likewise.
7404 (print_c_tree): Likewise.
7405
65e5a578
ESR
74062013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7407
7408 PR c++/58072
7409 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7410 provide useful error strings.
7411
137a1a27
GDR
74122013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7413
7414 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7415 printer functions instead of pp_string or operators and punctuators.
7416 (dump_generic_ada_node): Likewise.
7417 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7418 (pp_c_relational_expression): Likewise.
7419 (pp_c_logical_or_expression): Likewise.
7420
07838b13
GDR
74212013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7422
7423 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7424 functions instead of pp_character.
7425 (pp_ada_tree_identifier): Likewise.
7426 (dump_ada_double_name): Likewise.
7427 (dump_ada_function_declaration): Likewise.
7428 (dump_ada_array_domains): Likewise.
7429 (dump_template_types): Likewise.
7430 (dump_generic_ada_node): Likewise.
7431 (print_ada_declaration): Likewise.
7432 (print_ada_struct_decl): Likewise.
7433 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7434
433cc7b0
TT
74352013-07-23 Tom Tromey <tromey@redhat.com>
7436
7437 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7438 * c-common.c (c_common_reswords): Add _Generic.
7439
688010ba
OB
74402013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7441
7442 * c-common.c: Fix typos.
7443 * c-common.h: Likewise.
7444
2a99e5e6
LL
74452013-07-13 Lubos Lunak <l.lunak@suse.cz>
7446
7447 PR c++/55203
7448 * c-common.c (c_common_attribute_table): Add warn_unused.
7449 (handle_warn_unused_attribute): New.
7450
c26302d5
JJ
74512013-07-10 Jakub Jelinek <jakub@redhat.com>
7452
7453 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7454 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7455
dfeadaa0
PC
74562013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7457
7458 PR c++/57869
7459 * c.opt: Add Wconditionally-supported.
7460
6a2fa4b2
GS
74612013-07-08 Graham Stott <graham.stott@btinternet.com>
7462
adfac8df 7463 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7464 unused variables l_length and l_node.
7465
ecdbd01a 74662013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7467
7468 PR c/57821
7469 * c-common.c (complete_array_type): Delay folding first index
7470 like other indices. When folding, check for index overflow.
7471
bedc293e
MG
74722013-06-27 Marc Glisse <marc.glisse@inria.fr>
7473
7474 PR c++/57509
7475 * c-common.h (c_build_vec_perm_expr): New complain argument.
7476 * c-common.c (c_build_vec_perm_expr): Likewise.
7477 Use save_expr also in C++.
7478
604b2bfc
GDR
74792013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7480
7481 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7482 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7483 * c-opts.c (c_common_post_options): Likewise.
7484
dfeadaa0 74852013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7486
7487 * array-notation-common.c (length_mismatch_in_expr): Changed the
7488 parameter type's from a dynamic array to a vec_tree. Also removed
7489 the size parameters.
7490 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7491 the change above.
7492
2ce86d2e
BI
74932013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7494
7495 * c-common.h (struct cilkplus_an_parts): New structure.
7496 (struct cilkplus_an_loop_parts): Likewise.
7497 (cilkplus_extract_an_triplets): New prototype.
7498 (fix_sec_implicit_args): Likewise.
7499 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7500 (fix_sec_implicit_args): Likewise.
604b2bfc 7501
07a6825b
BI
75022013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7503
7504 * array-notation-common.c (find_inv_trees): Removed an unwanted
7505 typecasting.
7506 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7507 enum rid to enum tree_code.
7508
08346abd
JH
75092013-06-11 Jan Hubicka <jh@suse.cz>
7510
7511 * c-common.c (handle_alias_ifunc_attribute): Do not set
7512 DECL_EXTERNAL for weakref variables.
7513 * c-pragma.c (handle_pragma_weak): Make sure aliases
7514 are not declared as external.
7515
d60f1706
BI
75162013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7517
7518 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7519 function from c/c-array-notation.c.
7520 (is_cilkplus_reduce_builtin): Likewise.
7521 (find_rank): Likewise.
7522 (extract_array_notation_exprs): Likewise.
7523 (replace_array_notations): Likewise.
7524 (find_inv_trees): Likewise.
7525 (replace_inv_trees): Likewise.
7526 (contains_array_notation_expr): Likewise.
7527 (find_correct_array_notation_type): Likewise.
7528 * c-common.h (struct inv_list): Moved this struct from the file
7529 c/c-array-notation.c and added a new field called additional tcodes.
7530 (length_mismatch_in_expr_p): New prototype.
7531 (is_cilkplus_reduce_builtin): Likewise.
7532 (find_rank): Likewise.
7533 (extract_array_notation_exprs): Likewise.
7534 (replace_array_notation): Likewise.
7535 (find_inv_trees): Likewise.
7536 (replace_inv_trees): Likewise.
7537 (find_correct_array_notation_type): Likewise.
dfeadaa0 7538
36536d79
BI
75392013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7540
7541 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7542 function array_notation_init_builtins is called.
7543 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7544 * c-common.def (ARRAY_NOTATION_REF): New tree.
7545 * c-common.h (build_array_notation_expr): New function declaration.
7546 (build_array_notation_ref): Likewise.
7547 (extract_sec_implicit_index_arg): New extern declaration.
7548 (is_sec_implicit_index_fn): Likewise.
7549 (ARRAY_NOTATION_CHECK): New define.
7550 (ARRAY_NOTATION_ARRAY): Likewise.
7551 (ARRAY_NOTATION_START): Likewise.
7552 (ARRAY_NOTATION_LENGTH): Likewise.
7553 (ARRAY_NOTATION_STRIDE): Likewise.
7554 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7555 ARRAY_NOTATION_REF.
7556 (pp_c_expression): Likewise.
7557 * c.opt (flag_enable_cilkplus): New flag.
7558 * array-notation-common.c: New file.
7559
f7716d57
JJ
75602013-05-14 Jakub Jelinek <jakub@redhat.com>
7561
7562 PR c++/57274
7563 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7564
a5e0cd1d
MG
75652013-05-10 Marc Glisse <marc.glisse@inria.fr>
7566
7567 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7568 vectors.
7569
f6bc1c4a
HS
75702013-05-07 Han Shen <shenhan@google.com>
7571
7572 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7573
3f12f6e9
SKS
75742013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7575
7576 * c-common.c (check_user_alignment): Emit error for negative values.
7577
61949153
PC
75782013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7579
7580 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7581
e93e18e9
PC
75822013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7583
7584 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7585 __GXX_EXPERIMENTAL_CXX1Y__.
7586
44d90fe1 75872013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7588 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7589
7590 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7591 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7592 to simply use OPT_Wpointer_arith.
7593 (c_sizeof_or_alignof_type): Likewise.
7594
13f39b2e
PC
75952013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7596
7597 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7598
4b84d650
JJ
75992013-04-12 Jakub Jelinek <jakub@redhat.com>
7600
7601 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7602 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7603 specifiers.
7604
fb037b5d
SB
76052013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7606
7607 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7608
4e856798
PC
76092013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7610
7611 * c-common.c (pointer_int_sum): Remove dead code.
7612
4b1baac8
RS
76132013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7614
7615 PR middle-end/56524
7616 * c-common.c (handle_optimize_attribute): Don't call
7617 save_optabs_if_changed.
7618
0b50e654
JJ
76192013-03-05 Jakub Jelinek <jakub@redhat.com>
7620
7621 PR middle-end/56461
7622 * c-pch.c (pch_init): Free target_validity at the end.
7623
48c41403
JJ
76242013-03-04 Jakub Jelinek <jakub@redhat.com>
7625
7626 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7627
e664c61c
KS
76282013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7629 Jakub Jelinek <jakub@redhat.com>
7630
7631 PR sanitizer/56454
7632 * c-common.c (handle_no_sanitize_address_attribute): New function.
7633 (c_common_attribute_table): Add no_sanitize_address attribute.
7634 (handle_no_address_safety_analysis_attribute): Add
7635 no_sanitize_address attribute, not no_address_safety_analysis
7636 attribute.
7637
a475fd3d 76382013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7639
7640 PR target/52555
7641 * c-common.c (handle_optimize_attribute): Call
7642 save_optabs_if_changed.
7643
f6007d99
JJ
76442013-02-18 Jakub Jelinek <jakub@redhat.com>
7645 Steven Bosscher <steven@gcc.gnu.org>
7646
7647 PR pch/54117
7648 * c-opts.c (c_common_post_options): If debug info is enabled
7649 and non-dwarf*, refuse to load PCH files and when writing PCH
7650 file warn.
7651
cf35e2b1
JJ
76522013-02-05 Jakub Jelinek <jakub@redhat.com>
7653
7654 PR middle-end/56167
7655 * c-common.c (handle_error_attribute): Fix condition.
7656
32887460
JJ
76572013-01-30 Jakub Jelinek <jakub@redhat.com>
7658
7659 PR c++/55742
7660 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7661
5af057d8
JM
76622013-01-18 Jason Merrill <jason@redhat.com>
7663
7664 PR target/54908
7665 * c.opt (-fextern-tls-init): New.
7666 * c-opts.c (c_common_post_options): Handle it.
7667
cc83c823
JJ
76682013-01-09 Jakub Jelinek <jakub@redhat.com>
7669
7670 PR c/48418
7671 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7672 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7673 and is either negative or bigger or equal to type precision
7674 of the first operand.
7675
a859517f
MP
76762012-12-03 Marek Polacek <polacek@redhat.com>
7677
7678 PR c/55570
7679 * c-common.c (check_user_alignment): Swap order of tests,
7680 check TREE_CODE first.
7681
2d7aa578
ESR
76822012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7683
7684 PR c++/52654
7685 * c-common.h (overflow_type): New enum.
7686 (build_userdef_literal): Add overflow_type argument.
7687 (tree_userdef_literal): Add overflow_type.
7688 (USERDEF_LITERAL_OVERFLOW): New access macro.
7689 * c-common.c (build_userdef_literal): Add overflow_type
7690 argument.
7691 * c-lex.c (c_lex_with_flags): Add overflow_type to
7692 build_userdef_literal calls.
7693 (interpret_integer, interpret_float): Add overflow_type argument.
7694
cc3c4f62
RB
76952012-11-28 Richard Biener <rguenther@suse.de>
7696
7697 PR c/35634
7698 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7699 here and use a type with proper overflow behavior for types that would
7700 need to be promoted for the arithmetic.
7701
77bc5132
JJ
77022012-11-23 Jakub Jelinek <jakub@redhat.com>
7703
7704 PR sanitizer/55435
7705 * c-common.c (handle_no_address_safety_analysis_attribute): New
7706 function.
7707 (c_common_attribute_table): Add no_address_safety_analysis.
7708
5dc99c46
SB
77092012-11-16 Simon Baldwin <simonb@google.com>
7710
7711 * c.opt: Add f[no-]canonical-system-headers.
7712 * c-opts.c (c_common_handle_option): Handle
7713 OPT_fcanonical_system_headers.
7714
a4a0016d
ESR
77152012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7716
7717 PR c++/54413
7718 * c-opts.c (c_common_handle_option): Set new flags.
7719 * c.opt: Describe new flags.
7720
7dbb85a7
JM
77212012-11-09 Jason Merrill <jason@redhat.com>
7722
7723 * c.opt (Wabi-tag): New.
7724
ad7bac31
AK
77252012-11-09 Andi Kleen <ak@linux.intel.com>
7726
7727 PR 55139
7728 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7729 MEMMODEL_MASK
ad7bac31 7730
7332899a
MLI
77312012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7732
7733 PR c/53063
7734 * c.opt (Wformat): Make it Alias Wformat=1.
7735 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7736 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7737 LangEnabledBy.
7738 (Wformat=): RejectNegative. Use LangEnabledBy.
7739 (Wnonnull): Use LangEnabledBy.
7740 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7741 * c-format.c (set_Wformat): Delete.
7742 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7743 (maybe_read_dollar_number): Likewise.
7744 (avoid_dollar_number): Likewise.
7745 (finish_dollar_format_checking): Likewise.
7746 (check_format_info): Likewise.
7747 (check_format_info_main): Likewise.
7748 (check_format_types): Likewise.
7749 (format_type_warning): Likewise.
7750 * c-common.c (int): Likewise.
7751 (check_function_sentinel): Likewise.
7752 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7753
34a180a6
MLI
77542012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7755
7756 PR c/53063
7757 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7758 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7759 Use LangEnabledBy.
7760 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7761 common.opt.
7762 (Wvariadic-macros): Init(1).
7763 * c-opts.c (c_common_handle_option): Do not handle them
7764 explicitly.
7765 (c_common_post_options): Likewise.
7766 (sanitize_cpp_opts): warn_unused_macros is now
7767 cpp_warn_unused_macros.
7768 (push_command_line_include): Likewise.
7769 * c-common.c (warn_unknown_pragmas): Do not define.
7770 * c-common.h (warn_unknown_pragmas): Do not declare.
7771
3f46d6a5
MLI
77722012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7773
7774 PR c/51294
7775 * c-common.c (conversion_warning): Handle conditional expressions.
7776
880661a4
JW
77772012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7778
7779 PR c++/54930
7780 * c.opt (Wreturn_local_addr): Define new option.
7781
4514a96b
JM
77822012-10-25 Jason Merrill <jason@redhat.com>
7783
f14edc1a
JM
7784 * c.opt (Wvirtual-move-assign): New.
7785
4514a96b
JM
7786 * c.opt (Winherited-variadic-ctor): New.
7787
93100c6b
MG
77882012-10-25 Marc Glisse <marc.glisse@inria.fr>
7789
7790 PR c++/54427
7791 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7792
1efcb8c6
JM
77932012-10-23 Joseph Myers <joseph@codesourcery.com>
7794
7795 * c-common.h (pch_cpp_save_state): Declare.
7796 * c-target.def (c_preinclude): New hook.
7797 * c-opts.c (done_preinclude): New.
7798 (push_command_line_include): Handle default preincluded header.
7799 (cb_file_change): Call pch_cpp_save_state when calling
7800 push_command_line_include.
7801 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7802 (pch_cpp_save_state): New.
7803 (pch_init): Call pch_cpp_save_state conditionally, instead of
7804 calling cpp_save_state.
7805
4a0ae68e
MLI
78062012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7807
7808 PR c/53063
7809 PR c/40989
7810 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7811 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7812 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7813 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7814 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7815 * c-opts.c (c_common_handle_option): Remove explicit handling from
7816 here.
7817 (c_common_post_options): Likewise.
7818
67e4210b
EB
78192012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7820
7821 * c-ada-spec.c (LOCATION_COL): Delete.
7822 (compare_location): New function.
7823 (compare_node): Use it.
7824 (compare_comment): Likewise.
7825
65d4f2cd
MLI
78262012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7827
7828 PR c/53063
7829 PR c/40989
7830 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7831 * c-opts.c (c_common_handle_option): Do not set them here. Add
7832 comment.
7833 (c_common_post_options): Likewise.
7834
909881cb
EB
78352012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7836
7837 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7838 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7839 Remove POINTER_TYPE handling, add large unsigned handling and use
7840 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7841
3a785c97
JJ
78422012-10-12 Jakub Jelinek <jakub@redhat.com>
7843
7844 PR c/54381
7845 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7846 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7847 locs and array of 3 trees instead of just single loc and single
7848 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7849 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7850 For *cmp* builtins that take two sources strings report warnings
7851 about first and second source, not about destination and source.
7852
5e54f81d
MG
78532012-10-12 Marc Glisse <marc.glisse@inria.fr>
7854
7855 PR c++/53055
7856 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7857
f5b02f1e
EB
78582012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7859
7860 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7861 declaring something coming from another file.
7862
b46dbc6c
AC
78632012-10-10 Arnaud Charlet <charlet@adacore.com>
7864
f5b02f1e 7865 PR ada/54845
b46dbc6c
AC
7866 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7867
5d9de0d0
PC
78682012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7869
7870 PR c++/54194
7871 * c-common.c (warn_about_parentheses): Add location_t parameter;
7872 use EXPR_LOC_OR_LOC.
7873 * c-common.h: Update declaration.
7874
a212e43f
MG
78752012-10-09 Marc Glisse <marc.glisse@inria.fr>
7876
7877 PR c++/54427
7878 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7879 more operations. Make error messages optional.
7880 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7881 (scalar_to_vector): Declare.
7882
b1db7f91
JM
78832012-10-08 Jason Merrill <jason@redhat.com>
7884
7885 * c-common.c (c_common_reswords): Add thread_local.
7886
e28d52cf
DS
78872012-10-08 Dodji Seketeli <dodji@redhat.com>
7888
7889 PR c++/53528 C++11 attribute support
7890 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7891 new functions.
7892 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7893 static function.
7894 (handle_aligned_attribute): In choose strictest alignment
7895 among many. Use new check_cxx_fundamental_alignment_constraints.
7896 (handle_transparent_union_attribute): In c++11 attribute syntax,
7897 don't look through typedefs.
7898
3b78de56
AC
78992012-10-04 Arnaud Charlet <charlet@adacore.com>
7900
7901 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7902 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7903 out of dumpfile.h.
7904
6040bb5f
DC
79052012-09-25 Dehao Chen <dehao@google.com>
7906
7907 PR middle-end/54645
3b78de56 7908 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7909 map when read in the pch.
7910
3f8257db 79112012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7912
7913 * c-ada-spec.c: Style fixes.
7914
3f8257db 79152012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7916
7917 * c.opt (-fada-spec-parent): Define new command line switch.
7918 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7919 is specified, generate binding spec as a child of the specified unit.
7920
0ccb505d
PC
79212012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7922 Manuel López-Ibáñez <manu@gcc.gnu.org>
7923
7924 PR c++/53210
7925 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7926
c583af79
AC
79272012-08-23 Arnaud Charlet <charlet@adacore.com>
7928
7929 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7930 for pointers, and add missing Convention C pragma.
7931 (print_ada_struct_decl): Add missing aliased keyword.
7932 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7933
1a4049e7
JJ
79342012-08-17 Jakub Jelinek <jakub@redhat.com>
7935
7936 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7937 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7938 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7939 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7940 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7941
70b5e7dc
RG
79422012-08-10 Richard Guenther <rguenther@suse.de>
7943
7944 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7945
f8923f7e
SB
79462012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7947
7948 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7949 instead of separate pp_newline and pp_flush.
7950 (print_c_tree): Likewise.
7951
e45abe1f
RH
79522012-07-26 Richard Henderson <rth@redhat.com>
7953
7954 * c-common.c (handle_hot_attribute): Allow labels.
7955 (handle_cold_attribute): Likewise.
7956
332f1d24
JJ
79572012-07-20 Jakub Jelinek <jakub@redhat.com>
7958
7959 PR c++/28656
7960 * c-common.c (check_function_nonnull): Handle multiple nonnull
7961 attributes properly.
7962
7ee2468b
SB
79632012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7964
7965 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7966 * c-ada-spec.c: Likewise.
7967 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7968
ee7b28eb
SB
79692012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7970
7971 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7972 Remove code conditional on it.
7973
6bdf3519
SB
79742012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7975
7976 * c-gimplify.c: Do not include basic-block.h.
7977 * c-common.c: Do not include linfuncs.h.
7978
532aafad
SB
79792012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7980
7981 * c-common.h: Include tree.h.
7982
8d0d1915
JM
79832012-07-02 Jason Merrill <jason@redhat.com>
7984
7985 PR c++/53524
7986 * c-common.c (get_priority): Call default_conversion.
7987
fbc873ad
UB
79882012-07-01 Uros Bizjak <ubizjak@gmail.com>
7989
7990 * c-pch.c (c_common_write_pch): Remove unused variables.
7991
d4a10d0a
SB
79922012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7993
7994 * cppspec.c: Moved from gcc/ to here.
7995
6f3a2e23
KT
79962012-06-27 Kai Tietz <ktietz@redhat.com>
7997
7998 PR preprocessor/37215
7999 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8000
8ca92d04
SB
80012012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8002
8003 * c-common.h (c_common_print_pch_checksum): Remove.
8004 * c-pch.c: Do not include output.h.
8005 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8006 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8007 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8008 (struct c_pch_header): Remove.
8009 (get_ident): Update gpch version.
8010 (pch_init): Do not print executable_checksum to asm_out_file.
8011 Do not fail if there is no asm_out_file to read back from. Set
8012 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8013 (c_common_write_pch): Verify that nothing was written to asm_out_file
8014 since pch_init was called. Do not write a c_pch_header, and do not
8015 copy from asm_out_file to the PCH.
8016 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8017 the content of asm_out_file from the PCH.
8018 (c_common_print_pch_checksum): Remove.
8019 * c-opts.c (c_common_init): Print out executable_checksum directly.
8020
70f42967
SB
80212012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8022
8023 * c-target.def (objc_declare_unresolved_class_reference,
8024 objc_declare_class_definition): Add new hooks.
8025
a8781821
SB
80262012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8027
8028 * c-lex.c: Do not include output.h.
8029 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8030 Remove uses of ASM_OUTPUT_IDENT.
8031
9e1a8dd1
RR
80322012-06-15 Marc Glisse <marc.glisse@inria.fr>
8033
8034 PR c++/51033
8035 * c-common.h (c_build_vec_perm_expr): Move decl here.
8036 * c-common.c (c_build_vec_perm_expr): Move definition
8037 here.
8038
6f07a821
SB
80392012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8040
8041 * c.opt (fconserve-space): Turn into a no-op.
8042
9faeb493 80432012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8044
8045 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8046 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8047 both the start and end of the function.
8048
a4b7d13c
SB
80492012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8050
8051 * c-common.c: Do not include output.h.
8052 * c-pragma.c: Likewise.
8053
c265f413
SA
80542012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8055
8056 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8057 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8058 (lang_decl_name): Handle namespace decls.
8059
be7a421e
SB
80602012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8061
8062 * c-ada-spec.c: Do not include output.h.
8063 * c-semantics.c: Likewise.
8064
65de6659
JM
80652012-05-29 Joseph Myers <joseph@codesourcery.com>
8066
8067 * c-common.c: Fix typo.
8068
ca5f4331
MM
80692012-05-29 Michael Matz <matz@suse.de>
8070
8071 * c-common.h (c_expand_decl): Remove prototype.
8072
4f7f7aca
MLI
80732012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8074
8075 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8076 * c-opts.c (c_common_handle_option): Remove code handling
8077 warn_missing_braces.
8078
4a792f9b
PC
80792012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8080
8081 PR c++/25137
8082 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8083 -Wmissing_braces.
8084
650dc14a
DS
80852012-05-22 Dodji Seketeli <dodji@redhat.com>
8086
8087 PR c++/53322
8088 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8089
9b095bf1
MLI
80902012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8091
8092 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8093 * c-opts.c (c_common_handle_option): Do not handle explicitly
8094 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8095
0b2c4be5
DS
80962012-05-16 Dodji Seketeli <dodji@redhat.com>
8097
8098 PR preprocessor/7263
8099 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8100 to cpp_classify_number. For diagnostics, use the precise location
8101 instead of the global input_location.
8102
a1bde5af
PC
81032012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8104
d02924ef 8105 PR c++/11856
a1bde5af
PC
8106 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8107
d1ede5f4
BS
81082012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8109
a1bde5af 8110 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8111
f2bc201f
MLI
81122012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8113
8114 PR 53063
8115 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8116 Wreorder): Use LangEnabledBy.
8117 * c-opts.c (c_common_handle_option): Do not enable them
8118 explicitly. Call lang-specific generated functions.
8119 (c_common_post_options): Do not set them here.
8120
95744782
MLI
81212012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8122
8123 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8124 Wmissing-field-initializers,Wmissing-parameter-type,
8125 Wold-style-declaration,Woverride-init): Use EnabledBy.
8126 * c-opts.c (c_common_post_options): Do not set here explicitly.
8127
7d5a5747
MLI
81282012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8129
8130 PR 53063
8131 * c-opts.c (c_common_handle_option): Use handle_generated_option
8132 to enable sub-options.
8133
5a3c9cf2
PC
81342012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8135
8136 PR c++/53158
8137 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8138
3ac8781c
RG
81392012-05-10 Richard Guenther <rguenther@suse.de>
8140
8141 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8142 adjust commentary about TYPE_IS_SIZETYPE types.
8143
1e537948
MLI
81442012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8145
8146 PR c++/53261
8147 * c-common.c (warn_logical_operator): Check that argument of
8148 integer_zerop is not NULL.
8149
f2c4a785
MLI
81502012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8151
8152 PR c/43772
8153 * c-common.c (warn_logical_operator): Do not warn if either side
8154 is already true or false.
8155
50f305ca
MLI
81562012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8157
8158 PR c/51712
8159 * c-common.c (expr_original_type): New.
8160 (shorten_compare): Do not warn for enumeration types.
8161
0c3641b0
MLI
81622012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8163
8164 * c.opt (fpermissive): Add Var(flag_permissive).
8165
7edaa4d2
MG
81662012-04-30 Marc Glisse <marc.glisse@inria.fr>
8167
8168 PR c++/51033
8169 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8170 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8171
b9c8da34
DS
81722012-04-30 Dodji Seketeli <dodji@redhat.com>
8173
8174 Add -Wvarargs option
8175 * c.opt (Wvarargs): Define new option.
8176
e6c69da0
MLI
81772012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8178
8179 * c-common.c (check_function_arguments): Replace
8180 Wmissing-format-attribute with Wsuggest-attribute=format.
8181
90137d8f
MLI
81822012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8183
8184 * c.opt (Wsuggest-attribute=format): New. Alias of
8185 Wmissing-format-attribute.
8186 * c-format.c (decode_format_type): Replace
8187 Wmissing-format-attribute with Wsuggest-attribute=format.
8188 (check_function_format): Likewise.
8189
9faeb493 81902012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8191
8192 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8193 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8194 * c.opt: Add Wliteral-suffix.
8195
c1771a20
MLI
81962012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8197
8198 PR c/44774
8199 * c.opt (Wpedantic): New.
8200 (pedantic): Alias Wpedantic.
8201 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8202 (c_common_post_options): Likewise.
8203 (sanitize_cpp_opts): Likewise.
8204 * c-lex.c (interpret_float): Likewise.
8205 * c-format.c (check_format_types): Likewise.
8206 * c-common.c (pointer_int_sum): Likewise.
8207 (c_sizeof_or_alignof_type): Likewise.
8208 (c_add_case_label): Likewise.
8209 (c_do_switch_warnings): Likewise.
8210 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8211
04b391c1
JM
82122012-04-15 Jason Merrill <jason@redhat.com>
8213
8214 PR c++/52818
8215 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8216 (C_STD_NAME): Distinguish between C++98 and C++11.
8217
ac868f29
EB
82182012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8219
8220 PR target/52624
8221 * c-common.h (uint16_type_node): Rename into...
8222 (c_uint16_type_node): ...this.
8223 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8224 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8225
fd4116f4
MLI
82262012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8227
8228 * c-common.c (warn_if_unused_value): Move definition to here.
8229 * c-common.h (warn_if_unused_value): Move declaration to here.
8230
573ac65e
WB
82312012-03-23 William Bader <williambader@hotmail.com>
8232
8233 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8234
552b8185
JM
82352012-03-20 Jason Merrill <jason@redhat.com>
8236
8237 * c-common.h (enum cxx_dialect): Add cxx1y.
8238 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8239 test.
8240 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8241 * c-opts.c (c_common_post_options): Likewise.
8242 (set_std_cxx1y): New.
8243 (c_common_handle_option): Call it.
8244 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8245
04398fa8
PC
82462012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8247
8248 PR c++/14710
8249 * c.opt ([Wuseless-cast]): Add.
8250
d2a12ae7
RG
82512012-03-16 Richard Guenther <rguenther@suse.de>
8252
8253 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8254
a12bf402
MLI
82552012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8256
8257 PR c++/44783
8258 * c.opt (ftemplate-backtrace-limit) Add.
8259
5c30094f
RO
82602012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8261
8262 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8263 handling.
8264 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8265 (init_pragma): Don't register extern_prefix.
8266
21fa2faf
RG
82672012-03-12 Richard Guenther <rguenther@suse.de>
8268
8269 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8270 (builtin_type_for_size): Likewise.
8271
e3793c6f
JJ
82722012-02-13 Jakub Jelinek <jakub@redhat.com>
8273
8274 PR c++/52215
8275 * c-common.c (sync_resolve_params): Don't decide whether to convert
8276 or not based on TYPE_SIZE comparison, convert whenever arg_type
8277 is unsigned INTEGER_TYPE.
8278
93286335
PC
82792012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8280
8281 PR c/52118
8282 * c.opt ([Wunused-local-typedefs]): Fix description.
8283
7a421706
MS
82842012-01-24 Mike Stump <mikestump@comcast.net>
8285
8286 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8287 exactly.
8288
ba9b1f11
RG
82892012-01-18 Richard Guenther <rguenther@suse.de>
8290
8291 * c-opts.c (c_common_post_options): Reset LTO flags if
8292 we are about to generate a PCH.
8293
465406be
PC
82942012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8295
8296 PR c++/51777
8297 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8298 use pp_unsigned_wide_integer.
8299
aee15221
RG
83002012-01-10 Richard Guenther <rguenther@suse.de>
8301
8302 PR middle-end/51806
8303 * c-opts.c (c_common_handle_option): Move -Werror handling
8304 to language independent code.
8305
5720c0dc
RG
83062012-01-05 Richard Guenther <rguenther@suse.de>
8307
8308 PR middle-end/51764
8309 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8310 from common.opt.
8311
73ac190a
PC
83122011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8313
8314 PR c++/51316
8315 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8316 of array types with an unknown bound.
8317
48b0b196
JM
83182011-12-20 Joseph Myers <joseph@codesourcery.com>
8319
8320 * c-common.c (flag_isoc99): Update comment to refer to C11.
8321 (flag_isoc1x): Change to flag_isoc11.
8322 * c-common.h (flag_isoc99): Update comment to refer to C11.
8323 (flag_isoc1x): Change to flag_isoc11.
8324 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8325 C11.
8326 * c-opts.c (set_std_c1x): Change to set_std_c11.
8327 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8328 Call set_std_c11.
8329 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8330 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8331 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8332 standard.
8333 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8334 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8335 (std=gnu1x): Make alias of std=gnu11.
8336
d58d6eb5
JM
83372011-12-19 Jason Merrill <jason@redhat.com>
8338
8339 PR c++/51228
8340 * c-common.c (handle_transparent_union_attribute): Check the first
8341 field if the type is complete.
8342
b3908fcc
JW
83432011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8344
8345 PR libstdc++/51365
8346 * c-common.c (RID_IS_FINAL): Add.
8347 * c-common.h (RID_IS_FINAL): Add.
8348
fea3ca91
IS
83492011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8350
8351 * c.opt (fgnu-runtime): Provide full description.
8352 (fnext-runtime): Likewise.
8353 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8354
62bad7cd
AM
83552011-11-28 Andrew MacLeod <amacleod@redhat.com>
8356
8357 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8358 predefines in one place. Add LOCK_FREE predefines.
8359 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8360 new func.
8361
c466c4ff
AM
83622011-11-24 Andrew MacLeod <amacleod@redhat.com>
8363
8364 PR c/51256
9faeb493 8365 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8366 conditions
9faeb493
UB
8367 (resolve_overloaded_atomic_exchange,
8368 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8369 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8370 error_mark_node for error conditions.
9faeb493 8371
a5952633
RG
83722011-11-08 Richard Guenther <rguenther@suse.de>
8373
8374 PR middle-end/51010
8375 c-family/
8376
0a35513e
AH
83772011-11-07 Richard Henderson <rth@redhat.com>
8378 Aldy Hernandez <aldyh@redhat.com>
8379 Torvald Riegel <triegel@redhat.com>
8380
8381 Merged from transactional-memory.
8382
8383 * c-common.c (handle_tm_wrap_attribute,
8384 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8385 (struct c_common_reswords): Added __transaction* keywords.
8386 (struct c_common_attribute_table): Added transaction* and tm_regparm
8387 attributes.
8388 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8389 masks.
8390 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8391 find_tm_attribute): Declare.
8392
6d87092d
JM
83932011-11-07 Jason Merrill <jason@redhat.com>
8394
8395 PR c++/35688
8396 * c-common.c, c-common.h: Revert yesterday's changes.
8397
8e7860a1
JM
83982011-11-06 Jason Merrill <jason@redhat.com>
8399
8400 PR c++/35688
8401 * c-common.c (decl_has_visibility_attr): Split out from...
8402 (c_determine_visibility): ...here.
8403 * c-common.h: Declare it.
8404
d19fa6b5
JM
84052011-11-06 Joseph Myers <joseph@codesourcery.com>
8406
8407 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8408 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8409 type.
8410 (check_user_alignment): New. Split out of
8411 handle_aligned_attribute. Disallow integer constants with
8412 noninteger types. Conditionally allow zero.
8413 (handle_aligned_attribute): Use check_user_alignment.
8414 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8415
86951993
AM
84162011-11-06 Andrew MacLeod <amacleod@redhat.com>
8417 Richard Henderson <rth@redhat.com>
8418
8419 Merged from cxx-mem-model.
8420
8421 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8422 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8423 parameters that are the same type size.
8424 (get_atomic_generic_size): New. Find size of generic
8425 atomic function parameters and do typechecking.
8426 (add_atomic_size_parameter): New. Insert size into parameter list.
8427 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8428 either __atomic_exchange_n or external library call.
9faeb493 8429 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8430 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8431 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8432 __atomic_load_n or an external library call.
8433 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8434 __atomic_store_n or an external library call.
8435 (resolve_overloaded_builtin): Handle new __atomic builtins.
8436
cf9e9959
EB
84372011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8438
8439 PR c++/50608
8440 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8441 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8442 <INDIRECT_REF>: Return the argument.
8443 <ARRAY_REF>: Remove special code for negative offset.
8444 Call fold_build_pointer_plus instead of size_binop.
8445 (fold_offsetof): Remove STOP_REF argument and adjust.
8446 * c-common.h (fold_offsetof_1): Declare.
8447 (fold_offsetof): Remove STOP_REF argument.
8448
25339f10
JM
84492011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8450
8451 PR c++/50810
8452 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8453 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8454 Wnarrowing for C++0x and C++98.
8455 * c.opt ([Wnarrowing]): Update.
8456
89401152
PC
84572011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8458
8459 PR c++/44277
8460 * c.opt: Add Wzero-as-null-pointer-constant.
8461
97e3ad20
JM
84622011-10-31 Jason Merrill <jason@redhat.com>
8463
15694fdd
JM
8464 * c.opt (-fdeduce-init-list): Off by default.
8465
97e3ad20
JM
8466 PR c++/50920
8467 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8468 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8469 and -Wc++11-compat.
8470 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8471
fb9120e3
RAV
84722011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8473
8474 PR c++/30066
8475 * c.opt (fvisibility-inlines-hidden): Description change.
8476
3ce4f9e4
ESR
84772011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8478
8479 Implement C++11 user-defined literals.
8480 * c-common.c (build_userdef_literal): New.
8481 * c-common.def: New tree code.
8482 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8483 * c-lex.c (interpret_float): Add suffix parm.
8484 (c_lex_with_flags): Build literal tokens.
8485
5f53c243
PC
84862011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8487
8488 PR c++/50841
8489 Revert:
8490 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8491
8492 PR c++/50810
8493 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8494 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8495 Wnarrowing for C++0x and C++98.
8496 * c.opt ([Wnarrowing]): Update.
8497
263734e1
PC
84982011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8499
8500 PR c++/50810
8501 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8502 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8503 Wnarrowing for C++0x and C++98.
8504 * c.opt ([Wnarrowing]): Update.
8505
d2e312d7
PC
85062011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8507
8508 PR c++/45385
8509 * c-common.c (conversion_warning): Remove code looking for
8510 artificial operands.
8511
d17687f6
DS
85122011-10-18 Dodji Seketeli <dodji@redhat.com>
8513
8514 PR bootstrap/50760
8515 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8516 !NO_IMPLICIT_EXTERN_C.
d17687f6 8517
fc8396e9
PC
85182011-10-17 Michael Spertus <mike_spertus@symantec.com>
8519
8520 * c-common.c (c_common_reswords): Add __bases,
8521 __direct_bases.
8522 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8523
85242011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8525
8526 PR c++/50757
8527 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8528
847e697a
TT
85292011-10-15 Tom Tromey <tromey@redhat.com>
8530 Dodji Seketeli <dodji@redhat.com>
8531
8532 * c.opt (fdebug-cpp): New option.
8533 * c-opts.c (c_common_handle_option): Handle the option.
8534 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8535 output stream in parameter. Factorized from ...
8536 (maybe_print_line): ... this. Dump location debug information when
8537 -fdebug-cpp is in effect.
8538 (print_line_1): New static function. Takes an output stream in
8539 parameter. Factorized from ...
8540 (print_line): ... here. Dump location information when -fdebug-cpp
8541 is in effect.
8542 (scan_translation_unit): Dump location information when
8543 -fdebug-cpp is in effect.
8544
92582b75
TT
85452011-10-15 Tom Tromey <tromey@redhat.com>
8546 Dodji Seketeli <dodji@redhat.com>
8547
8548 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8549 without argument.
8550 * c-opts.c (c_common_handle_option)<case
8551 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8552 cases. Handle -ftrack-macro-expansion with and without argument.
8553
46427374
TT
85542011-10-15 Tom Tromey <tromey@redhat.com>
8555 Dodji Seketeli <dodji@redhat.com>
8556
8557 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8558 (print_line, cb_define, do_line_change): Adjust to avoid touching
8559 the internals of struct line_map. Use the public API instead.
8560 * c-pch.c (c_common_read_pch): Likewise.
8561 * c-lex.c (fe_file_change): Likewise.
8562
fc8396e9
PC
85632011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8564
8565 PR c++/17212
8566 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8567
85682011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8569
8570 PR c++/33067
8571 * c-pretty-print.c (pp_c_floating_constant): Output
8572 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8573
e79983f4
MM
85742011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8575
8576 * c-common.c (def_builtin_1): Delete old interface with two
8577 parallel arrays to hold standard builtin declarations, and replace
8578 it with a function based interface that can support creating
8579 builtins on the fly in the future. Change all uses, and poison
8580 the old names. Make sure 0 is not a legitimate builtin index.
8581 * c-omp.c (c_finish_omp_barrier): Ditto.
8582 (c_finish_omp_taskwait): Ditto.
8583 (c_finish_omp_flush): Ditto.
8584
6637388f
TG
85852011-10-11 Tristan Gingold <gingold@adacore.com>
8586
8587 * c.opt: (fallow-parameterless-variadic-functions): New.
8588
3797cb21
DS
85892011-09-08 Dodji Seketeli <dodji@redhat.com>
8590
8591 PR c++/33255 - Support -Wunused-local-typedefs warning
8592 * c-common.h (struct c_language_function::local_typedefs): New
8593 field.
9faeb493
UB
8594 (record_locally_defined_typedef, maybe_record_typedef_use)
8595 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8596 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8597 (maybe_record_typedef_use)
8598 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8599 * c.opt: Declare new -Wunused-local-typedefs flag.
8600
693ddb1b
EB
86012011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8602
8603 PR middle-end/50266
8604 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8605 computations.
8606
830c740f
RG
86072011-09-05 Richard Guenther <rguenther@suse.de>
8608
8609 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8610 of integer_minus_one_node for empty array upper bounds.
8611
892a371f
DS
86122011-08-28 Dodji Seketeli <dodji@redhat.com>
8613
8614 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8615 it's the first time it's being called on this main TU.
8616
0e3fdb48
RB
86172011-08-24 Richard Guenther <rguenther@suse.de>
8618
8619 PR c/49396
8620 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8621
86222011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8623
8624 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8625 defined in cpp_init_builtins and c_cpp_builtins.
8626
d4a83c10
JM
86272011-08-19 Joseph Myers <joseph@codesourcery.com>
8628
8629 * c-common.c (c_common_reswords): Add __builtin_complex.
8630 * c-common.h (RID_BUILTIN_COMPLEX): New.
8631
bbceee64
JM
86322011-08-18 Joseph Myers <joseph@codesourcery.com>
8633
8634 * c-common.c (c_common_reswords): Add _Noreturn.
8635 (keyword_is_function_specifier): Handle RID_NORETURN.
8636 * c-common.h (RID_NORETURN): New.
8637
3f8257db 86382011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8639
8640 * c-common.c (unsafe_conversion_p): New function. Check if it is
8641 unsafe to convert an expression to the type.
8642 (conversion_warning): Adjust, use unsafe_conversion_p.
8643 * c-common.h (unsafe_conversion_p): New function declaration.
8644
20906c66
JJ
86452011-08-02 Jakub Jelinek <jakub@redhat.com>
8646
8647 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8648 (c_finish_omp_taskyield): New prototype.
8649 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8650 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8651 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8652 or RHS1 have side-effects, evaluate those too in the right spot,
8653 if it is a decl and LHS is also a decl, error out if they
8654 aren't the same.
8655 (c_finish_omp_taskyield): New function.
8656 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8657 * c-pragma.c (omp_pragmas): Add taskyield.
8658 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8659 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8660 PRAGMA_OMP_CLAUSE_MERGEABLE.
8661
770e5a2e
DS
86622011-07-25 Dodji Seketeli <dodji@redhat.com>
8663
8664 * c-common.h (set_underlying_type): Remove parm name from
8665 declaration.
8666
1baae426
RG
86672011-07-25 Romain Geissler <romain.geissler@gmail.com>
8668
8669 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8670
fcb21722
JM
86712011-07-22 Jason Merrill <jason@redhat.com>
8672
76f86d00
JM
8673 PR c++/49793
8674 * c.opt (Wnarrowing): New.
8675
3a636414
JM
8676 PR c++/30112
8677 * c-common.h: Declare c_linkage_bindings.
8678 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8679
fcb21722
JM
8680 PR c++/49813
8681 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8682 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8683 as flag_isoc99 for 'restrict'.
8684 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8685
02614448
ILT
86862011-07-21 Ian Lance Taylor <iant@google.com>
8687
8688 PR middle-end/49705
8689 * c-common.c (c_disable_warnings): New static function.
8690 (c_enable_warnings): New static function.
8691 (c_fully_fold_internal): Change local unused_p to bool. Call
8692 c_disable_warnings and c_enable_warnings rather than change
8693 c_inhibit_evaluation_warnings.
8694
34429675
JM
86952011-07-20 Jason Merrill <jason@redhat.com>
8696
8697 PR c++/6709 (DR 743)
8698 PR c++/42603 (DR 950)
8699 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8700 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8701 (CPP_DECLTYPE): New.
8702 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8703
5d49b6a7
RG
87042011-07-19 Richard Guenther <rguenther@suse.de>
8705
8706 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8707 * c-omp.c (c_finish_omp_for): Likewise.
8708
e84a58ff
EB
87092011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8710
8711 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8712 body on the next line.
8713
329af3c7
JM
87142011-07-08 Jason Merrill <jason@redhat.com>
8715
4063e61b
JM
8716 PR c++/45437
8717 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8718
329af3c7
JM
8719 PR c++/49673
8720 * c-common.c (c_apply_type_quals_to_decl): Don't check
8721 TYPE_NEEDS_CONSTRUCTING.
8722
1a072294
RG
87232011-07-06 Richard Guenther <rguenther@suse.de>
8724
8725 * c-common.c (c_common_nodes_and_builtins):
8726 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8727
fce5dddd
RG
87282011-07-05 Richard Guenther <rguenther@suse.de>
8729
8730 * c-common.c (c_common_nodes_and_builtins): Build all common
8731 tree nodes first.
8732
45d439ac
JJ
87332011-06-27 Jakub Jelinek <jakub@redhat.com>
8734
56300785
JJ
8735 * c-common.h (c_tree_chain_next): New static inline function.
8736
45d439ac
JJ
8737 * c-common.c (check_builtin_function_arguments): Handle
8738 BUILT_IN_ASSUME_ALIGNED.
8739
e0a8ecf2
AM
87402011-06-21 Andrew MacLeod <amacleod@redhat.com>
8741
8742 * c-common.c: Add sync_ or SYNC__ to builtin names.
8743 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8744
87452011-06-20 Pierre Vittet <piervit@pvittet.com>
8746
8747 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8748 handler.
8749 (gen_pragma_handler): New union.
8750 (internal_pragma_handler): New type.
8751 (c_register_pragma_with_data)
8752 (c_register_pragma_with_expansion_and_data): New functions.
8753
8754 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8755 (c_register_pragma, c_register_pragma_with_expansion)
8756 (c_invoke_pragma_handler): Changed to work with
8757 internal_pragma_handler.
8758 (c_register_pragma_with_data)
8759 (c_register_pragma_with_expansion_and_data): New functions.
8760
677f3fa8
JM
87612011-06-14 Joseph Myers <joseph@codesourcery.com>
8762
8763 * c-common.c: Include common/common-target.h.
8764 (handle_section_attribute): Use
8765 targetm_common.have_named_sections.
8766 * c-cppbuiltin.c: Include common/common-target.h.
8767 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8768
d7fc8c14
RG
87692011-06-10 Richard Guenther <rguenther@suse.de>
8770
8771 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8772 to print a IDENTIFIER_NODE.
8773
10e48e39
RO
87742011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8775 Joseph Myers <joseph@codesourcery.com>
8776
8777 * c.opt (fbuilding-libgcc): New option.
8778 * c-cppbuiltin.c (c_cpp_builtins): Define
8779 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8780
6976ae51
JM
87812011-06-07 Jason Merrill <jason@redhat.com>
8782
3ff60975
JM
8783 * c-common.c (max_tinst_depth): Lower default to 900.
8784
6976ae51
JM
8785 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8786
009db074
RG
87872011-06-07 Richard Guenther <rguenther@suse.de>
8788
8789 * c-common.c (c_common_nodes_and_builtins): Do not set
8790 size_type_node or call set_sizetype.
8791
b4592b92
DS
87922011-06-07 Dodji Seketeli <dodji@redhat.com>
8793
8794 PR debug/49130
8795 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8796 type when using pointer comparison to compare types.
b4592b92 8797
014ab419
JW
87982011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8799
8800 * c.opt: Add -Wdelete-non-virtual-dtor.
8801 * c-opts.c (c_common_handle_option): Include it in -Wall.
8802
4f60111f
NF
88032011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8804
8805 PR bootstrap/49190
8806
8807 Revert:
8808 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8809
8810 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8811 not tree_common.
8812
4cc4f2f4
JJ
88132011-05-27 Jakub Jelinek <jakub@redhat.com>
8814
8815 PR c++/49165
8816 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8817 C++ don't call c_common_truthvalue_conversion on void type arms.
8818
38e01f9e
NF
88192011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8820
8821 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8822 (stmt_list_stack): Define.
8823 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8824 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8825
92e948a8
NF
88262011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8827
8828 * c-common.c (warning_candidate_p): Check for BLOCKs.
8829
a2fc3e63
NF
88302011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8831
8832 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8833 not tree_common.
8834
0957c029
JJ
88352011-05-25 Jakub Jelinek <jakub@redhat.com>
8836
8837 * c-common.c (def_fn_type): Remove extra va_end.
8838
828fb3ba
JM
88392011-05-23 Jason Merrill <jason@redhat.com>
8840
8841 PR c++/48106
8842 * c-common.c (c_common_get_narrower): New.
8843 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8844
dde05067
NF
88452011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8846
8847 * c-common.h (check_function_arguments): Tweak prototype of
8848 check_function_arguments.
8849 * c-common.c (check_function_arguments): Likewise. Adjust
8850 calls to check_function_nonnull, check_function_format, and
8851 check_function_sentinel.
8852 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8853 separate attributes and typelist arguments. Use
8854 FOREACH_FUNCTION_ARGS to iterate over argument types.
8855
3c0d13bf
PC
88562011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8857
8858 * c-common.c (c_common_reswords): Reorder.
8859 * c-common.h (rid): Likewise.
8860
8242dd04
NF
88612011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8862
8863 * c-common.c (def_fn_type): Don't call build_function_type, call
8864 build_function_type_array or build_varargs_function_type_array
8865 instead.
8866 (c_common_nodes_and_builtins): Likewise.
8867
3d528853
NF
88682011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8869
8870 * c-common.c (c_add_case_label): Omit the loc argument to
8871 build_case_label.
8872 * c-common.h (build_case_label): Remove.
8873 * c-semantics.c (build_case_label): Remove.
8874
a04a722b
JM
88752011-05-05 Joseph Myers <joseph@codesourcery.com>
8876
8877 * c-objc.h (objc_start_method_definition): Update prototype.
8878 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8879
e19a18d4
NF
88802011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8881
8882 * c-common.c (check_main_parameter_types): Reindent. Don't use
8883 TYPE_ARG_TYPES directly.
8884 (handle_nonnull_attribute): Likewise.
8885 (sync_resolve_params): Likewise.
8886 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8887 to check_format_string.
8888 (handle_format_attribute): Likewise.
8889 (check_format_string): Take a function type to examine instead of
8890 a type list. Use a function_arg_iterator to step through argument
8891 types.
8892
c62c040f
RG
88932011-05-04 Richard Guenther <rguenther@suse.de>
8894
8895 * c-common.c (fix_string_type): Use size_int for index type bounds.
8896 (start_fname_decls): Do not pass NULL to build_int_cst.
8897 (c_init_attributes): Likewise.
8898 * c-lex.c (c_lex_with_flags): Likewise.
8899
c12ff9d8
JM
89002011-04-27 Jason Merrill <jason@redhat.com>
8901
8902 * c-common.c (make_tree_vector_from_list): New.
8903 * c-common.h: Declare it.
8904
304dfbe3
RG
89052011-04-26 Richard Guenther <rguenther@suse.de>
8906
8907 PR preprocessor/48248
8908 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8909 for output size with -P.
8910
3c0d13bf
PC
89112011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8912
8913 * c-common.c (struct c_common_resword): Add __underlying_type.
8914 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8915
04695783
JM
89162011-04-20 Jim Meyering <meyering@redhat.com>
8917
8918 * c-format.c (init_dollar_format_checking): Remove useless
8919 if-before-free.
8920
0dc33c3c
NP
89212011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8922
8923 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8924 (objc_detect_field_duplicates): New.
0dc33c3c 8925 * stub-objc.c: Likewise.
3c0d13bf 8926
c59633d9
NP
89272011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8928
8929 * stub-objc.c (objc_declare_protocols): Renamed to
8930 objc_declare_protocol.
8931 * c-objc.h: Likewise.
3c0d13bf 8932
32dabdaf
NP
89332011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8934
8935 * stub-objc.c (objc_declare_class): Updated argument name.
8936
81f653d6
NF
89372011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8938
8939 * c-common.h (c_common_init_ts): Declare.
8940 * c-common.c (c_common_init_ts): Define.
8941
eb345401
NP
89422011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8943
8944 * c-objc.h (objc_build_message_expr): Updated prototype.
8945 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8946
a358e188
MJ
89472011-04-12 Martin Jambor <mjambor@suse.cz>
8948
8949 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8950 of cgraph_node.
8951
e6313a78
RG
89522011-04-11 Richard Guenther <rguenther@suse.de>
8953
8954 * c-common.c (complete_array_type): Build a range type of
8955 proper type.
8956
dcf0c47e
NF
89572011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8958
8959 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8960 (handle_type_generic_attribute): Likewise.
8961
1ee44b26
JM
89622011-04-07 Jason Merrill <jason@redhat.com>
8963
8964 PR c++/48450
8965 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8966 conversion from C++0x scoped enum.
8967
acce4e77
JM
89682011-04-06 Joseph Myers <joseph@codesourcery.com>
8969
8970 * c-target-def.h: New file.
8971 * c-target.def: New file.
8972 * c-target.h: New file.
8973 * c-common.c (targetcm): Don't define here.
8974 * c-common.h (default_handle_c_option): Declare.
8975 * c-format.c: Include c-target.h instead of target.h.
8976 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8977 include tm.h.
8978 (default_handle_c_option): Move from targhooks.c.
8979
e2eefb55
JJ
89802011-03-29 Jakub Jelinek <jakub@redhat.com>
8981
8982 PR preprocessor/48248
8983 * c-ppoutput.c (print): Add src_file field.
8984 (init_pp_output): Initialize it.
8985 (maybe_print_line): Don't optimize by adding up to 8 newlines
8986 if map->to_file and print.src_file are different file.
8987 (print_line): Update print.src_file.
8988
ba78087b
KT
89892011-03-25 Kai Tietz <ktietz@redhat.com>
8990
8991 * c-ada-spec.c (compare_comment): Use filename_cmp
8992 instead of strcmp for filename.
8993
0edf1bb2
JL
89942011-03-25 Jeff Law <law@redhat.com>
8995
adfac8df 8996 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8997
c7dc8804
JM
89982011-03-25 Jason Merrill <jason@redhat.com>
8999
9000 * c.opt: Add -std=c++03.
9001
d1d879b1
EB
90022011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9003
9004 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9005
3f8257db 90062011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9007
9008 PR target/12171
5050afdf
KT
9009 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9010 Display allowed attributes for function pointer types.
9011 (pp_c_attributes_display): New function to display
9012 attributes having affects_type_identity flag set to true.
9013 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9014
62d784f7
KT
9015 * c-common.c (c_common_attribute_table):
9016 Add new element.
9017 (c_common_format_attribute_table): Likewise.
9018
82d37118
JM
90192011-03-18 Jason Merrill <jason@redhat.com>
9020
49a000c3
JM
9021 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9022 * c-common.h: Don't declare it here.
9023 * c-common.c: Or define it here.
9024 * c-opts.c (c_common_handle_option): Or set it here.
9025
82d37118
JM
9026 PR c++/35315
9027 * c-common.c (handle_transparent_union_attribute): Don't
9028 make a duplicate type in C++.
9029
17bc631c
JM
90302011-03-15 Jason Merrill <jason@redhat.com>
9031
9032 * c-common.c (max_constexpr_depth): New.
9033 * c-common.h: Declare it.
9034 * c-opts.c (c_common_handle_option): Set it.
9035 * c.opt (fconstexpr-depth): New option.
9036
1b9b91a6
JM
90372011-03-11 Jason Merrill <jason@redhat.com>
9038
f231b5ff
JM
9039 * c-common.c (attribute_takes_identifier_p): Add missing const.
9040
1b9b91a6
JM
9041 PR c++/46803
9042 * c-common.c (attribute_takes_identifier_p): Assume that an
9043 unknown attribute takes an identifier.
9044
a19e4d44
NF
90452011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9046
9047 PR c/47786
9048 * c-common.c (c_type_hash): Call list_length instead of iterating
9049 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9050
982d62f6
JJ
90512011-02-19 Jakub Jelinek <jakub@redhat.com>
9052
9053 PR c/47809
9054 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9055
0a256240
NP
90562011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9057
9058 * c.opt (fobjc-abi-version=) New.
9059 (fobjc-nilcheck): New.
9060
ba9e6dd5
NF
90612011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9062
9063 PR c++/46890
9064 * c-common.h (keyword_is_decl_specifier): Declare.
9065 * c-common.c (keyword_is_decl_specifier): Define.
9066 (keyword_is_function_specifier): New function.
9067
7273813a
JJ
90682011-01-26 Jakub Jelinek <jakub@redhat.com>
9069
9070 PR c/47473
9071 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9072 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9073 REAL_TYPE.
9074
908ef79b
AC
90752011-01-26 Arnaud Charlet <charlet@adacore.com>
9076
9077 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9078
237e9384
JJ
90792011-01-26 Jakub Jelinek <jakub@redhat.com>
9080
9081 PR pch/47430
9082 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9083 after init_c_lex if pch_file is set.
9084
47ea1edf
DK
90852011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9086
d4dba752 9087 PR c++/43601
47ea1edf
DK
9088 * c.opt (-fkeep-inline-dllexport): New switch.
9089
2aa9c6ae
RG
90902011-01-12 Richard Guenther <rguenther@suse.de>
9091
9092 PR middle-end/32511
9093 * c-common.c (handle_weak_attribute): Warn instead of error
9094 on declaring an inline function weak.
9095
7bd11157
TT
90962011-01-05 Tom Tromey <tromey@redhat.com>
9097
9098 * c-common.h (lvalue_error): Update.
9099 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9100 not error.
9101
0e66e494 91022010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9103
b4f588c4
NP
9104 PR objc/47075
9105 * c-objc.h (objc_finish_message_expr): Added argument to
9106 prototype.
9107
f4da8dce
NF
91082010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9109
9110 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9111 Use prototype_p.
9112
46270f14
NP
91132010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9114
9115 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9116 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9117
4816c593
NF
91182010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9119
9120 * c-common.h (readonly_error): Declare.
9121 * c-common.c (readonly_error): Define.
9122
7a6daeb0
NF
91232010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9124
9125 * c-common.h (invalid_indirection_error): Declare.
9126 * c-common.c (invalid_indirection_error): Define.
9127
892f6119
RG
91282010-12-03 Richard Guenther <rguenther@suse.de>
9129
9130 PR c/46745
9131 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9132 (pp_c_unary_expression): Likewise.
9133 (pp_c_expression): Likewise.
9134
6c39e757
NP
91352010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9136
9137 * c-common.h (objc_finish_function): New.
9138 (objc_non_volatilized_type): Removed.
9139 (objc_type_quals_match): Removed.
9140 * stub-objc.c (objc_finish_function): New.
9141 (objc_non_volatilized_type): Removed.
9142 (objc_type_quals_match): Removed.
9faeb493 9143
7c475d11
JM
91442010-11-30 Joseph Myers <joseph@codesourcery.com>
9145
9146 * c-common.h (parse_optimize_options): Declare.
9147 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9148 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9149
71f3e391
JM
91502010-11-29 Joseph Myers <joseph@codesourcery.com>
9151
9152 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9153 GET_ENVIRONMENT.
9154 * c-pch.c (O_BINARY): Don't define here.
9155 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9156
d5fabb58
JM
91572010-11-25 Joseph Myers <joseph@codesourcery.com>
9158
9159 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9160 targetm.except_unwind_info.
9161
299404a1
JM
91622010-11-23 Joseph Myers <joseph@codesourcery.com>
9163
9164 * c-opts.c (c_common_handle_option): Pass location to
9165 set_struct_debug_option.
9166
c98cd5bf
JM
91672010-11-23 Joseph Myers <joseph@codesourcery.com>
9168
9169 * c-common.c (visibility_options): Move from ../opts.c.
9170 * c-common.h (struct visibility_flags, visibility_options):
9171 Declare here.
9172 * c-opts.c (finish_options): Rename to c_finish_options.
9173 (c_common_init): Update call to finish_options.
9174
a9546771
NP
91752010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9176
9177 PR objc/34033
9178 * c-lex.c (lex_string): Check that each string in an Objective-C
9179 string concat sequence starts with either one or zero '@', and
9180 that there are no spurious '@' signs at the end.
9181
24a57808
JM
91822010-11-20 Joseph Myers <joseph@codesourcery.com>
9183
9184 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9185 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9186 HANDLE_PRAGMA_VISIBILITY.
9187 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9188 HANDLE_PRAGMA_VISIBILITY): Don't define.
9189 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9190
a9aa2c3a
NF
91912010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9192
9193 PR c++/16189
9194 PR c++/36888
9195 PR c++/45331
9196 * c-common.h (keyword_begins_type_specifier): Declare.
9197 (keyword_is_storage_class_specifier): Declare.
9198 (keyword_is_type_qualifier): Declare.
9199 * c-common.c (keyword_begins_type_specifier): New function.
9200 (keyword_is_storage_class_specifier): New function.
9201 (keyword_is_type_qualifier): Declare.
9202
5386338c
JM
92032010-11-19 Joseph Myers <joseph@codesourcery.com>
9204
9205 PR c/46547
9206 * c-common.c (in_late_binary_op): Define.
9207 (c_common_truthvalue_conversion): Check in_late_binary_op before
9208 calling c_save_expr.
9209 * c-common.h (in_late_binary_op): Declare.
9210
69ccdddb
JM
92112010-11-19 Joseph Myers <joseph@codesourcery.com>
9212
9213 * c-opts.c (c_common_handle_option): Update calls to
9214 set_struct_debug_option.
9215
6b192a09
NP
92162010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9217
9218 * c-common.h (objc_declare_protocols): Added additional argument.
9219 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9220
fb52b50a
NF
92212010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9222
9223 PR c/33193
9224 * c-common.h (build_real_imag_expr): Declare.
9225 * c-semantics.c (build_real_imag_expr): Define.
9226
b37421c6
JM
92272010-11-17 Joseph Myers <joseph@codesourcery.com>
9228
9229 * c-opts.c (c_common_parse_file): Take no arguments.
9230 * c-common.h (c_common_parse_file): Update prototype.
9231
07078664
JJ
92322010-11-16 Jakub Jelinek <jakub@redhat.com>
9233
9234 PR c++/46401
9235 * c-common.c (warning_candidate_p): Don't track non-const calls
9236 or STRING_CSTs.
9237
c6a13190
ILT
92382010-11-15 Ian Lance Taylor <iant@google.com>
9239
9240 * c-lex.c (init_c_lex): Set macro debug callbacks if
9241 flag_dump_go_spec is set.
9242
925e8657
NP
92432010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9244
9245 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9246 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9247
bb0a9581
NF
92482010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9249
9250 PR preprocessor/45038
9251 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9252 dialects.
9253
c5fa0890
JM
92542010-11-12 Joseph Myers <joseph@codesourcery.com>
9255
9256 * c-common.h (c_family_lang_mask): Declare.
9257 * c-opts.c (c_family_lang_mask): Make extern.
9258 * c-pragma.c (handle_pragma_diagnostic): Use
9259 control_warning_option.
9260
a4d8c676
JM
92612010-11-12 Joseph Myers <joseph@codesourcery.com>
9262
9263 * c-common.c (parse_optimize_options): Update call to
9264 decode_options.
9265 * c-common.h (c_common_handle_option): Update prototype.
9266 * c-opts.c (c_common_handle_option): Take location_t parameter and
9267 pass it to other functions.
9268
f954bd2c
JM
92692010-11-11 Joseph Myers <joseph@codesourcery.com>
9270
9271 * c-opts.c (warning_as_error_callback): Remove.
9272 (c_common_initialize_diagnostics): Don't call
9273 register_warning_as_error_callback.
9274 (c_common_handle_option): Handle -Werror=normalized= here.
9275
d8a07487
JM
92762010-11-10 Joseph Myers <joseph@codesourcery.com>
9277
9278 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9279 in diagnostic.
9280 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9281 letter.
9282 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9283 Remove trailing '.' from diagnostics.
9284 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9285
d5478783
JM
92862010-11-10 Joseph Myers <joseph@codesourcery.com>
9287
9288 * c-common.c (parse_optimize_options): Pass global_dc to
9289 decode_options.
9290 * c-opts.c (c_common_handle_option): Pass &global_options to
9291 set_Wstrict_aliasing.
9292 * c.opt (v): Don't mark Common or document here.
9293
91ebb981
IS
92942010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9295
9296 PR target/44981
9297 * c-format.c (format_type): New type gcc_objc_string_format_type.
9298 (valid_stringptr_type_p): New.
9299 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9300 (check_format_string): Pass expected type, use
91ebb981
IS
9301 valid_stringptr_type_p (), check that the format string types are
9302 consistent with the format specification.
9303 (decode_format_attr): Warn if NSString is used outside objective-c.
9304 (format_types_orig): Add NSString.
9305 (format_name): New.
9306 (format_flags): New.
9307 (check_format_arg): Handle format strings requiring an external parser.
9308 first_target_format_type: New variable.
9309 (handle_format_attribute): Set up first_target_format_type, pass the
9310 expected format arg string type to check_format_string().
9311 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9312 * stub-objc.c (objc_string_ref_type_p): New.
9313 (objc_check_format_arg): New.
9314
bede2adc
NP
93152010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9316
9faeb493 9317 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9318 * c-common.h (objc_build_class_component_ref): New.
9319 * stub-objc.c (objc_build_class_component_ref): New.
9320
9a179d01
NP
93212010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9322
9323 * c.opt (Wproperty-assign-default): New option.
9324
22d8d616
NP
93252010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9326
9327 Implemented -fobjc-std=objc1 flag.
9328 * c.opt (fobjc-std=objc1): New option.
9329
2debdb4f
NP
93302010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9331
9332 Implemented format and noreturn attributes for Objective-C methods.
9333 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9334 attribute for Objective-C methods.
9335
ec52b111
JM
93362010-10-31 Jason Merrill <jason@redhat.com>
9337
9338 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9339 EXPR_LOC_OR_HERE.
9340
46a88c12
NP
93412010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9342
9343 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9344 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9345 (objc_add_property_declaration): Removed arguments for copies and
9346 ivar.
9347 (objc_build_getter_call): Renamed to
9348 objc_maybe_build_component_ref.
9349 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9350 (objc_is_property_ref): New.
9351 * c-common.c (c_common_reswords): Removed copies and ivar.
9352 * stub-objc.c (objc_add_property_declaration): Removed arguments
9353 for copies and ivar.
9354 (objc_build_getter_call): Renamed to
9355 objc_maybe_build_component_ref.
9356 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9357 (objc_is_property_ref): New.
9faeb493 9358
1e4bf85b
AC
93592010-10-29 Arnaud Charlet <charlet@adacore.com>
9360 Matthew Gingell <gingell@adacore.com>
9361
9362 * c-ada-spec.c (separate_class_package): New function.
9363 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9364 name of their enclosing package.
9365 (print_ada_declaration): Use separate_class_package.
9366
81f0bab2
JM
93672010-10-27 Jason Merrill <jason@redhat.com>
9368
2b08f2c5
JM
9369 * c-common.c (c_common_reswords): Add __is_literal_type.
9370 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9371
81f0bab2
JM
9372 * c-common.c (check_case_value): Remove special C++ code.
9373
200290f2
NP
93742010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9375
9376 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9377 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9378 and RID_LAST_PATTR.
9379 (objc_add_property_declaration): Added additional arguments.
9380 (objc_property_attribute_kind): Removed.
9381 (objc_set_property_attr): Removed.
9382 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9383 copy and nonatomic.
9384 * stub-objc.c (objc_add_property_declaration): Added additional
9385 arguments.
9386 (objc_set_property_attr): Removed.
9faeb493 9387
f614132b
NP
93882010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9389
9390 * c-common.h (objc_add_property_variable): Renamed to
9391 objc_add_property_declaration. Added location argument.
9392 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9393
b8a18805
NP
93942010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9395
9396 * c-common.h (objc_maybe_printable_name): New.
9397 * stub-objc.c (objc_maybe_printable_name): New.
9398
3f8257db
JJ
93992010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9400 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9401
9402 * c-common.h (c_common_mark_addressable_vec): Declare.
9403 * c-common.c (c_common_mark_addressable_vec): New function.
9404
249a82c4
NP
94052010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9406
9407 * c-common.h (objc_set_method_type): Removed.
9408 (objc_add_method_declaration): Added boolean argument.
9409 (objc_start_method_definition): Same change.
9410 (objc_build_method_signature): Same change.
9411 * stub-objc.c (objc_set_method_type): Removed.
9412 (objc_add_method_declaration): Added boolean argument.
9413 (objc_start_method_definition): Same change.
9414 (objc_build_method_signature): Same change.
9415
977e30bc
NP
94162010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9417
9418 * c-common.h (finish_file): Removed.
9419 (objc_write_global_declarations): New.
9420 * c-opts.c (c_common_parse_file): Do not call finish_file.
9421 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9422
da57d1b9
NP
94232010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9424
9425 Implemented parsing @synthesize and @dynamic for
9426 Objective-C/Objective-C++.
9427 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9428 (objc_add_synthesize_declaration): New.
9429 (objc_add_dynamic_declaration): New.
9430 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9431 * stub-objc.c (objc_add_synthesize_declaration): New.
9432 (objc_add_dynamic_declaration): New.
9faeb493 9433
0069111f
MM
94342010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9435
9436 PR target/46041
9437 * c-cppbuiltin.c (mode_has_fma): Move function here from
9438 builtins.c. Don't use the fma optab, instead just use the
9439 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9440 using -save-temps.
9441
e426b47b
NP
94422010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9443
9444 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9445
3f8257db 9446 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9447
9faeb493 9448 Radar 4330422
e426b47b
NP
9449 * c-common.h (objc_non_volatilized_type): New declaration
9450 * stub-objc.c (objc_non_volatilized_type): New stub.
9451
90fbfdc3
NP
94522010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9453
e426b47b 9454 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9455
3f8257db 9456 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9457
9faeb493 9458 Radar 4133425
90fbfdc3 9459 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9460 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9461
c37d8c30
IS
94622010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9463
9464 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9465 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9466 (objc_ivar_visibility_kind): New enum.
9467 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9468 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9469 visibility enum.
9470
1b1562a5
MM
94712010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9472
9473 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9474 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9475 has the appropriate fma builtins.
9476 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9477
668ea4b1
IS
94782010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9479
1b1562a5 9480 merge from FSF apple 'trunk' branch.
3f8257db 9481 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9482
668ea4b1
IS
9483 Radars 4436866, 4505126, 4506903, 4517826
9484 * c-common.c (c_common_resword): Define @property and its attributes.
9485 * c-common.h: Define property attribute enum entries.
9486 (OBJC_IS_PATTR_KEYWORD): New.
9487 (objc_property_attribute_kind): New enum.
9488 Declare objc_set_property_attr (), objc_add_property_variable (),
9489 objc_build_getter_call () and objc_build_setter_call ().
9490 * stub-objc.c (objc_set_property_attr): New stub.
9491 (objc_add_property_variable): Likewise.
9492 (objc_build_getter_call): Likewise.
9493 (objc_build_setter_call) Likewise.
1b1562a5 9494
a1178b30
IS
94952010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9496
1b1562a5 9497 merge from FSF apple 'trunk' branch.
3f8257db 9498 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9499
9500 Radar 3803157 (method attributes)
9501 * c-common.c (handle_deprecated_attribute): Recognize
9502 objc methods as valid declarations.
9503 * c-common.h: Declare objc_method_decl ().
1b1562a5 9504 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9505
a75bfaa6
JM
95062010-10-08 Joseph Myers <joseph@codesourcery.com>
9507
9508 * c-common.c (parse_optimize_options): Call
9509 decode_cmdline_options_to_array_default_mask before
9510 decode_options. Update arguments to decode_options.
9511 * c-common.h (c_common_init_options_struct): Declare.
9512 * c-opts.c (c_common_init_options_struct): New. Split out from
9513 c_common_init_options.
9514
f05b9d93
NP
95152010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9516
9517 Implemented fast enumeration for Objective-C.
9518 * c-common.h (objc_finish_foreach_loop): New.
9519 * stub-objc.c (objc_finish_foreach_loop): New.
9520
1ebe4b4f
JM
95212010-10-05 Joseph Myers <joseph@codesourcery.com>
9522
9523 * c-common.h (struct diagnostic_context): Don't declare here.
9524 (c_common_initialize_diagnostics): Declare using
9525 diagnostic_context typedef.
9526 * c-opts.c (c_common_handle_option): Pass global_dc to
9527 handle_generated_option.
9528
d4d24ba4
JM
95292010-10-04 Joseph Myers <joseph@codesourcery.com>
9530
9531 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9532 handle_generated_option.
9533
478a1c5b
ILT
95342010-10-03 Ian Lance Taylor <iant@google.com>
9535
9536 * c.opt (-fplan9-extensions): New option.
9537
82a1c2fe
FXC
95382010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9539
9540 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9541 Remove.
9542 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9543 of duplicating code.
9544
92902b1b
IS
95452010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9546
9547 * c-common.c: Add two new entries for @optional
9548 and @required keywords.
9549
9550 merge from FSF 'apple/trunk' branch.
3f8257db 9551 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9552
9553 Radar 4386773
9554 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9555 objective-c keywords.
9556 (objc_set_method_opt): New declaration.
9557 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9558
46625112
JM
95592010-09-30 Joseph Myers <joseph@codesourcery.com>
9560
9561 * c-common.c (handle_optimize_attribute): Pass &global_options to
9562 cl_optimization_save and cl_optimization_restore.
9563 * c-opts.c (c_common_handle_option): Pass &global_options to
9564 handle_generated_option.
9565 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9566 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9567 &global_options to cl_optimization_restore.
9568
49b91f05
NP
95692010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9570
9571 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9572 Objective-C/Objective-C++ keywords.
9573
13ed556f 95742010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9575
9faeb493
UB
9576 Merge from 'apple/trunk' branch on FSF servers.
9577
3f8257db 9578 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9579
9580 Radar 4281748
9581 * c-common.h (objc_check_global_decl): New declaration.
9582 * stub-objc.c (objc_check_global_decl): New stub.
9583
f0036cca
JM
95842010-09-29 Joseph Myers <joseph@codesourcery.com>
9585
9586 * c.opt: Don't use VarExists.
9587
e3339d0f
JM
95882010-09-29 Joseph Myers <joseph@codesourcery.com>
9589
9590 * c-common.c (c_cpp_error): Update names of diagnostic_context
9591 members.
9592 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9593 cl_optimization members.
9594 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9595 sanitize_cpp_opts, finish_options): Update names of cpp_options
9596 members.
9597
1973201f
NP
95982010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9599
9600 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9601 (objc_is_reserved_word): Removed.
9602 * c-common.c: Updated comments.
9603 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9604 objc_is_reserved_word.
9605 * stub-objc.c (objc_is_reserved_word): Removed.
9606
f7e71da5
IS
96072010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9608
9faeb493 9609 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9610 include attributes.
9611 (objc_start_method_definition): Likewise.
9612 (objc_build_keyword_decl): Likewise.
9613 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9614 (objc_start_method_definition): Likewise.
9615 (objc_build_keyword_decl): Likewise.
9616
c165dca7
IS
96172010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9618
9619 * c-common.h (objc_start_class_interface): Adjust prototype.
9620 (objc_start_category_interface): Likewise.
9621 (objc_start_protocol): Likewise.
9622 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9623 (objc_start_class_interface): Likewise.
9624 (objc_start_category_interface): Likewise.
9625
7458026b
ILT
96262010-09-27 Ian Lance Taylor <iant@google.com>
9627
9628 * c-common.c (c_common_attribute_table): Add no_split_stack.
9629 (handle_no_split_stack_attribute): New static function.
9630
b581b85b
NP
96312010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9632
9faeb493 9633 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9634
3f8257db 9635 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9636
9faeb493 9637 Radar 4229905
b581b85b
NP
9638 * c-common.h (objc_have_common_type): New declaration.
9639 * stub-objc.c (objc_have_common_type): New stub.
9640
9641 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9642
9643 Radar 4154928
9644 * c-common.h (objc_common_type): New prototype.
9faeb493 9645 * stub-objc.c (objc_common_type): New stub.
b581b85b 9646
46a4da10
JH
96472010-09-24 Jan Hubicka <jh@suse.cz>
9648
9649 * c-common.c (handle_leaf_attribute): New function.
9650 (struct attribute_spec c_common_att): Add leaf.
9651
e200444e
JM
96522010-09-22 Joseph Myers <joseph@codesourcery.com>
9653
9654 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9655 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9656 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9657 -include-barrier, -include-directory, -include-directory=,
9658 -include-directory-after, -include-directory-after=,
9659 -include-prefix, -include-prefix=, -include-with-prefix,
9660 -include-with-prefix=, -include-with-prefix-after,
9661 -include-with-prefix-after=, -include-with-prefix-before,
9662 -include-with-prefix-before=, -no-integrated-cpp,
9663 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9664 -output=, -pedantic, -pedantic-errors, -preprocess,
9665 -print-missing-file-dependencies, -trace-includes, -traditional,
9666 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9667 -user-dependencies, -verbose, -write-dependencies,
9668 -write-user-dependencies, no-integrated-cpp, traditional): New.
9669
29a80ea6
NP
96702010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9671
9672 PR objc/23710
ac1fc2fc
NP
9673 * c-common.h (objc_start_method_definition): Return bool instead
9674 of void.
9675 * stub-objc.c (objc_start_method_definition): Return bool instead
9676 of void.
9677
96782010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9679
9680 PR objc/25965
9681 * c-common.h (objc_get_interface_ivars): New declaration.
9682 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9683
de621752
ILT
96842010-09-15 Ian Lance Taylor <iant@google.com>
9685
9686 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9687 messages. Remove period at end of warning message.
de621752 9688
ba885ec5
NS
96892010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9690
9691 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9692 (handle_alias_attribute): ... here.
9693 (handle_ifunc_attribute): New.
9694
c5ee1358
MM
96952010-09-06 Mark Mitchell <mark@codesourcery.com>
9696
9697 * c-common.h (do_warn_double_promotion): Declare.
9698 * c-common.c (do_warn_double_promotion): Define.
9699
0a0b3574
MM
97002010-09-05 Mark Mitchell <mark@codesourcery.com>
9701
9702 * c.opt (Wdouble-promotion): New.
9703
d1779886
JM
97042010-09-02 Joseph Myers <joseph@codesourcery.com>
9705
9706 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9707 fvtable-thunks, fxref): Mark no longer supported in help text.
9708
2d2bd949
JM
97092010-09-02 Joseph Myers <joseph@codesourcery.com>
9710
9711 * c.opt (Wimport, fall-virtual, falt-external-templates,
9712 fdefault-inline, fenum-int-equiv, fexternal-templates,
9713 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9714 fname-mangling-version-, fnew-abi, fnonnull-objects,
9715 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9716 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9717 applicable.
9718 (fhandle-exceptions): Mark with Alias and Warn.
9719 * c-opts.c (c_common_handle_option): Don't handle options marked
9720 as ignored.
9721
5de8299c
JM
97222010-09-02 Joseph Myers <joseph@codesourcery.com>
9723
9724 * c.opt (Wcomments, Werror-implicit-function-declaration,
9725 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9726 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9727 aliases.
9728 * c-common.c (option_codes): Use OPT_Wcomment instead of
9729 OPT_Wcomments.
9730 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9731 Don't handle options marked as aliases.
9732
0ceb0201
RG
97332010-08-25 Richard Guenther <rguenther@suse.de>
9734
9735 * c-common.c (c_common_get_alias_set): Remove special
9736 handling for pointers.
9737
ac47786e
NF
97382010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9739
9740 * c-common.c: Use FOR_EACH_VEC_ELT.
9741 * c-gimplify.c: Likewise.
9742 * c-pragma.c: Likewise.
9743
c878765b
JM
97442010-08-16 Joseph Myers <joseph@codesourcery.com>
9745
9746 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9747 RejectDriver.
9748 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9749 RejectDriver.
9750 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9751 instead of OPT_MDX and OPT_MMDX.
9752
603349bf
JM
97532010-08-16 Joseph Myers <joseph@codesourcery.com>
9754
9755 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9756
644fa7ac
JM
97572010-08-12 Joseph Myers <joseph@codesourcery.com>
9758
9759 * c.opt (MD, MMD): Change to MDX and MMDX.
9760 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9761
481e1176
JM
97622010-08-11 Joseph Myers <joseph@codesourcery.com>
9763
9764 * c-opts.c (c_common_handle_option): Call handle_generated_option
9765 instead of handle_option.
9766
ac8dc9f7
NF
97672010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9768
9769 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9770 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9771
4f8c876d
NF
97722010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9773
9774 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9775 (pending_redefine_extname): Change type to a VEC.
9776 (add_to_renaming_pragma_list): Update for new type of
9777 pending_redefine_extname.
ac8dc9f7 9778 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9779
3b0c690e
AC
97802010-08-04 Arnaud Charlet <charlet@adacore.com>
9781
9782 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9783 visited.
9784 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9785 decide whether a type has already been declared/seen.
9786 Do not go to the original type.
9787 (dump_nested_types): New parameter forward.
9788 Generate forward declaration if needed and mark type as visited.
9789 (print_ada_declaration): Call dump_nested_types if not already done.
9790 Mark types as visited.
9791
1890bccc
JM
97922010-08-03 Joseph Myers <joseph@codesourcery.com>
9793
9794 * c.opt (-print-pch-checksum): Remove option.
9795 * c-opts.c (c_common_handle_option): Don't handle
9796 OPT_print_pch_checksum.
9797
5f20c657
JM
97982010-07-27 Joseph Myers <joseph@codesourcery.com>
9799
9800 * c-common.h (c_common_handle_option): Update prototype and return
9801 value type.
9802 * c-opts.c (c_common_handle_option): Update prototype and return
9803 value type. Update calls to handle_option and
9804 enable_warning_as_error.
9805
f551f80c
JJ
98062010-07-27 Jakub Jelinek <jakub@redhat.com>
9807
9808 PR c/45079
9809 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9810
61ff2bdc
JM
98112010-07-27 Joseph Myers <joseph@codesourcery.com>
9812
9813 * c-common.h (c_common_missing_argument): Remove.
9814 * c-opts.c (c_common_missing_argument): Remove.
9815 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9816 idirafter, imacros, include, isysroot, isystem, iquote): Add
9817 MissingArgError.
9818 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9819
7a9bf9a4
JM
98202010-07-27 Joseph Myers <joseph@codesourcery.com>
9821
9822 * c-common.h (c_common_option_lang_mask,
9823 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9824 New.
9825 (c_common_init_options): Update prototype.
9826 * c-opts.c (c_common_option_lang_mask): New.
9827 (c_common_initialize_diagnostics): Split out of
9828 c_common_init_options.
9829 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9830 New.
9831 (c_common_init_options): Update prototype. Use decoded options in
9832 search for -lang-asm.
9833
910ad8de
NF
98342010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9835
9836 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9837 * c-format.c: Likewise.
9838
718f9c0f
MLI
98392010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9840
9841 * c-common.h: Include diagnostic-core.h. Error if already
9842 included.
9843 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9844
4d451982
MLI
98452010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9846
adfac8df 9847 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9848 Do not include expr.h
9849 (vector_mode_valid_p): Move here.
9850
119fe915
SB
98512010-06-21 DJ Delorie <dj@redhat.com>
9852
9853 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9854 allow these pragmas anywhere.
9855
98562010-06-14 Jakub Jelinek <jakub@redhat.com>
9857
9858 PR bootstrap/44509
9859 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9860 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9861 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9862 ggc_strdup instead of xstrdup.
9863
98642010-06-10 Jakub Jelinek <jakub@redhat.com>
9865
9866 * c-cppbuiltin.c: Include cpp-id-data.h.
9867 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9868 (lazy_hex_fp_value): New function.
9869 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9870
6662d794
MLI
98712010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9872
9873 * c-gimplify.c: Do not include tree-flow.h
9874
38f8b050
JR
98752010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9876
9877 PR other/44034
9878 * c-common.c: Rename targetm member:
9879 targetm.enum_va_list -> targetm.enum_va_list_p
9880
9589f23e
AS
98812010-06-28 Anatoly Sokolov <aesok@post.ru>
9882
9883 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9884
3b06d379
SB
98852010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9886
9887 * c-cppbuiltin.c: Do not include except.h.
9888
d166d4c3
AK
98892010-06-24 Andi Kleen <ak@linux.intel.com>
9890
9faeb493
UB
9891 * c-common.c (warn_for_omitted_condop): New.
9892 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9893
70cb8be6
JM
98942010-06-21 Joseph Myers <joseph@codesourcery.com>
9895
9896 * c.opt (lang-objc): Remove.
9897 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9898
a4c97feb
JR
98992010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9900
9901 * c-opts.c: Include "tm_p.h".
9902
6e2f1956
JM
99032010-06-20 Joseph Myers <joseph@codesourcery.com>
9904
9905 * c-common.c (parse_optimize_options): Update call to
9906 decode_options.
9907
bc87224e
NF
99082010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9909
9910 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9911 new type of types_used_by_cur_var_decl.
9912
b49cf425
JR
99132010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9914
9915 PR bootstrap/44512
9916 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9917 for C++ standard compliance.
9918
59f9c2ed
JM
99192010-06-16 Jason Merrill <jason@redhat.com>
9920
9921 * c.opt: Add -Wnoexcept.
9922
33766b66
RG
99232010-06-16 Richard Guenther <rguenther@suse.de>
9924
9925 PR c/44555
9926 * c-common.c (c_common_truthvalue_conversion): Remove
9927 premature and wrong optimization concering ADDR_EXPRs.
9928
eff7e30c
AC
99292010-06-15 Arnaud Charlet <charlet@adacore.com>
9930
9931 * c-ada-spec.c (dump_sloc): Remove column info.
9932 (is_simple_enum): New function.
9933 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9934 enum types when relevant.
9935
6312e84d
MLI
99362010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9937
9faeb493 9938 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9939 location.
9940
1cb42611
JM
99412010-06-10 Joseph Myers <joseph@codesourcery.com>
9942
9943 * c-opts.c (c_common_handle_option): Don't handle
9944 OPT_fshow_column.
9945
a9429e29
LB
99462010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9947
9948 * c-pragma.c (push_alignment): Use typed GC allocation.
9949 (handle_pragma_push_options): Likewise.
9950
9951 * c-common.c (parse_optimize_options): Likewise.
9952
9953 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9954 option.
9955
5498f011
JM
99562010-06-07 Joseph Myers <joseph@codesourcery.com>
9957
9958 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9959 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9960 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9961 flag_signed_bitfields, warn_strict_null_sentinel,
9962 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9963 flag_gen_declaration, flag_no_gnu_keywords,
9964 flag_implement_inlines, flag_implicit_templates,
9965 flag_implicit_inline_templates, flag_optional_diags,
9966 flag_elide_constructors, flag_default_inline, flag_rtti,
9967 flag_conserve_space, flag_access_control, flag_check_new,
9968 flag_new_for_scope, flag_weak, flag_working_directory,
9969 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9970 flag_enforce_eh_specs, flag_threadsafe_statics,
9971 flag_pretty_templates): Remove.
9972 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9973 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9974 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9975 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9976 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9977 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9978 flag_no_gnu_keywords, flag_implement_inlines,
9979 flag_implicit_templates, flag_implicit_inline_templates,
9980 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9981 flag_rtti, flag_conserve_space, flag_access_control,
9982 flag_check_new, flag_new_for_scope, flag_weak,
9983 flag_working_directory, flag_use_cxa_atexit,
9984 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9985 flag_threadsafe_statics, flag_pretty_templates,
9986 warn_strict_null_sentinel): Remove.
9987 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9988 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9989 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9990 fimplicit-inline-templates, fimplicit-templates,
9991 flax-vector-conversions, fms-extensions, fnil-receivers,
9992 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9993 frtti, fshort-double, fshort-enums, fshort-wchar,
9994 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9995 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9996 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9997 gen-decls, undef): Use Var.
9998 (fdefault-inline, foptional-diags): Document as doing nothing.
9999 * c-opts.c (c_common_handle_option): Remove cases for options now
10000 using Var. Mark ignored options as such.
10001
39dabefd
SB
100022010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10003
9faeb493 10004 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10005 * c-common.def: Likewise.
10006 * c-common.h: Likewise.
10007 * c-cppbuiltin.c: Likewise.
10008 * c-dump.c: Likewise.
10009 * c-format.c: Likewise.
10010 * c-format.h : Likewise.
10011 * c-gimplify.c: Likewise.
10012 * c-lex.c: Likewise.
10013 * c-omp.c: Likewise.
10014 * c.opt: Likewise.
10015 * c-opts.c: Likewise.
10016 * c-pch.c: Likewise.
10017 * c-ppoutput.c: Likewise.
10018 * c-pragma.c: Likewise.
10019 * c-pragma.h: Likewise.
10020 * c-pretty-print.c: Likewise.
10021 * c-pretty-print.h: Likewise.
10022 * c-semantics.c: Likewise.
10023 * stub-objc.c: Likewise.
10024
10025 * c-common.c: Include gt-c-family-c-common.h.
10026 * c-pragma.c: Include gt-c-family-c-pragma.h.
10027\f
a5544970 10028Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10029
10030Copying and distribution of this file, with or without modification,
10031are permitted in any medium without royalty provided the copyright
10032notice and this notice are preserved.