]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
re PR fortran/71066 (ICE in set_loop_bounds, at fortran/trans-array.c:4680)
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
28a8cef1
MS
12019-02-11 Martin Sebor <msebor@redhat.com>
2
3 PR c++/87996
4 * c-common.c (invalid_array_size_error): New function.
5 (valid_array_size_p): Call it. Handle size as well as type.
6 * c-common.h (valid_constant_size_p): New function.
7 (enum cst_size_error): New type.
8
ec2be203
DM
92019-01-31 David Malcolm <dmalcolm@redhat.com>
10
11 PR c/89122
12 * known-headers.cc (get_stdlib_header_for_name): Add
13 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
14
8936f047
JJ
152019-01-31 Jakub Jelinek <jakub@redhat.com>
16
17 PR libstdc++/88170
18 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
19 a C cast in pp_c_flag_gnu_v3 mode.
20
6a335b96
JJ
212019-01-29 Jakub Jelinek <jakub@redhat.com>
22
23 PR c/86125
24 * c-common.c (c_common_nodes_and_builtins): Build type variants for
25 builtin_structptr_types types even for C.
26
2a06eba5
BE
272019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
28
29 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
30 when rhs is of array type correctly. Fix handling of nested structures.
31 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
32 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
33 type casts within nested compound expressions.
34
18a23298
JJ
352019-01-22 Jakub Jelinek <jakub@redhat.com>
36
37 PR middle-end/88968
38 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
39 variable after using BIT_FIELD_REF.
40
420183d9
L
412019-01-18 H.J. Lu <hongjiu.lu@intel.com>
42
43 PR c/51628
44 PR c/88664
45 * c-common.h (warn_for_address_or_pointer_of_packed_member):
46 Remove the boolean argument.
47 * c-warn.c (check_address_of_packed_member): Renamed to ...
48 (check_address_or_pointer_of_packed_member): This. Also
49 warn pointer conversion.
50 (check_and_warn_address_of_packed_member): Renamed to ...
51 (check_and_warn_address_or_pointer_of_packed_member): This.
52 Also warn pointer conversion.
53 (warn_for_address_or_pointer_of_packed_member): Remove the
54 boolean argument. Don't check pointer conversion here.
55
99063eee
RS
562019-01-15 Richard Sandiford <richard.sandiford@arm.com>
57
58 PR inline-asm/52813
59 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
60
a30d0196
JJ
612019-01-14 Jakub Jelinek <jakub@redhat.com>
62
63 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
64 and __cpp_nontype_template_parameter_auto. Add a comment that
65 __cpp_template_auto is deprecated.
66
2d91f79d
TH
672019-01-14 Tom Honermann <tom@honermann.net>
68
69 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
70 * c-common.c (c_common_reswords): Add char8_t.
71 (fix_string_type): Use char8_t for the type of u8 string literals.
72 (c_common_get_alias_set): char8_t doesn't alias.
73 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
74 C++.
75 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
76 (keyword_begins_type_specifier): Add RID_CHAR8.
77 * c-common.h (rid): Add RID_CHAR8.
78 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
79 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
80 Define char8_type_node and char8_array_type_node.
81 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
82 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
83 (c_cpp_builtins): Predefine __cpp_char8_t.
84 * c-lex.c (lex_string): Use char8_array_type_node as the type of
85 CPP_UTF8STRING.
86 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
87 * c-opts.c: If not otherwise specified, enable -fchar8_t when
88 targeting C++2a.
89 * c.opt: Add the -fchar8_t command line option.
90
23db6ced
MS
912019-01-14 Martin Sebor <msebor@redhat.com>
92
93 PR target/88638
94 * c-attribs.c (positional_argument): Call valid_format_string_type_p
95 and issue errors if it fails.
96 * c-common.h (valid_format_string_type_p): Declare.
97 * c-format.c (valid_stringptr_type_p): Rename...
98 (valid_format_string_type_p): ...to this and make extern.
99 (handle_format_arg_attribute): Adjust to new name.
100 (check_format_string): Same.
101
234c3818
L
1022019-01-13 H.J. Lu <hongjiu.lu@intel.com>
103
104 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
105 Replace "may may" with "may" in warning message.
106
d8fcab68
JJ
1072019-01-07 Jakub Jelinek <jakub@redhat.com>
108
109 PR c++/85052
110 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
111 (c_build_vec_convert): Declare.
112 * c-common.c (c_build_vec_convert): New function.
113
29d24852
MS
1142019-01-04 Martin Sebor <msebor@redhat.com>
115
116 PR c/88546
117 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
118 Handle C++ empty throw specification and C11 _Noreturn.
119 (has_attribute): Also handle C11 _Noreturn.
120
9069a4c9
MS
1212019-01-04 Martin Sebor <msebor@redhat.com>
122
123 PR c/88363
124 * c-attribs.c (positional_argument): Also accept enumerated types.
125
a5544970
JJ
1262019-01-01 Jakub Jelinek <jakub@redhat.com>
127
128 Update copyright years.
129
da77eace
L
1302018-12-20 H.J. Lu <hongjiu.lu@intel.com>
131
132 PR c/51628
133 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
134 * c-warn.c (check_alignment_of_packed_member): New function.
135 (check_address_of_packed_member): Likewise.
136 (check_and_warn_address_of_packed_member): Likewise.
137 (warn_for_address_or_pointer_of_packed_member): Likewise.
138 * c.opt: Add -Wno-address-of-packed-member.
139
573767d4
DM
1402018-12-20 David Malcolm <dmalcolm@redhat.com>
141
142 PR c++/87504
143 * c-warn.c (get_outermost_macro_expansion): New function.
144 (spelled_the_same_p): Use it to unwind the macro expansions, and
145 compare the outermost macro in each nested expansion, rather than
146 the innermost.
147
a14feb3c
DM
1482018-12-19 David Malcolm <dmalcolm@redhat.com>
149
150 PR c++/87504
151 * c-common.h (warn_tautological_cmp): Convert 1st param from
152 location_t to const op_location_t &.
153 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
154 when testing for INTEGER_CST.
155 (warn_tautological_bitwise_comparison): Convert 1st param from
156 location_t to const op_location_t &; use it to build a
157 binary_op_rich_location, and use this.
158 (spelled_the_same_p): New function.
159 (warn_tautological_cmp): Convert 1st param from location_t to
160 const op_location_t &. Warn for macro expansions if
161 spelled_the_same_p. Use binary_op_rich_location.
162
dfd7fdca
DM
1632018-12-19 David Malcolm <dmalcolm@redhat.com>
164
165 PR c++/43064
166 PR c++/43486
167 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
168 (verify_tree): Handle location wrappers.
169 (c_common_truthvalue_conversion): Strip any location wrapper.
170 Handle CONST_DECL.
171 (fold_offsetof): Strip any location wrapper.
172 (complete_array_type): Likewise for initial_value.
173 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
174 index before checking for INTEGER_CST.
175 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
176 print parentheses around location wrappers.
177 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
178 before checking for INTEGER_CST.
179 (warn_tautological_bitwise_comparison): Call
180 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
181 before checking for INTEGER_CST.
182 (readonly_error): Strip any location wrapper.
183 (warn_array_subscript_with_type_char): Strip location wrappers
184 before checking for INTEGER_CST. Use the location of the index if
185 available.
186
5c8b3702
JM
1872018-12-06 Jason Merrill <jason@redhat.com>
188
189 PR c++/88136 - -Wdeprecated-copy false positives
190 * c.opt (Wdeprecated-copy-dtor): New.
191 (Wdeprecated-copy): Move to -Wextra.
192
673670da
MS
1932018-11-29 Martin Sebor <msebor@redhat.com>
194
195 PR c/88172
196 PR testsuite/88208
197 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
198 alignments to values less than the target requires.
199 (has_attribute): For attribute aligned consider both the attribute
200 and the alignment bits.
201 * c-common.c (c_init_attributes): Optionally issue a warning for
202 zero alignment.
203
04864ec8
MS
2042018-11-28 Martin Sebor <msebor@redhat.com>
205
206 PR c/88065
207 PR c/87297
208 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
209 or destination is an error.
210
ace83db0
JJ
2112018-11-28 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/88215
214 * c-ubsan.c: Include langhooks.h.
215 (ubsan_instrument_division): Change gcc_assert that main variants
216 of op0 and op1 types are equal to gcc_checking_assert that the
217 main variants are compatible types.
218
da193a27
EB
2192018-11-27 Eric Botcazou <ebotcazou@adacore.com>
220
221 * c-ada-spec.c: Include stringpool.h.
222 (has_static_fields): Return false for incomplete types.
223 (is_tagged_type): Likewise.
224 (has_nontrivial_methods): Likewise.
225 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
226 (struct overloaded_name_hash): New structure.
227 (struct overloaded_name_hasher): Likewise.
228 (overloaded_names): New global variable.
229 (init_overloaded_names): New static function.
230 (overloaded_name_p): New predicate.
231 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
232 on the TYPE_STUB_DECL of the original type of a typedef, if any.
233 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
234 Remove always-true condition and dump forward types.
235 (dump_ada_specs): Delete overloaded_names.
236
98f08eb8
MS
2372018-11-20 Martin Sebor <msebor@redhat.com>
238
239 * c-attribs.c (type_for_vector_size): New function.
240 (type_valid_for_vector_size): Same.
241 (handle_vector_size_attribute): Move code to the functions above
242 and call them.
243 (validate_attribute, has_attribute): New functions.
244 * c-common.h (has_attribute): Declare.
245 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
246 * c-common.c (c_common_resword): Same.
247
2674fa47
JM
2482018-11-16 Jason Merrill <jason@redhat.com>
249
250 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
251 * c-attribs.c (attr_cold_hot_exclusions): Make public.
252
258b3854
JJ
2532018-11-16 Jakub Jelinek <jakub@redhat.com>
254
255 PR middle-end/87854
256 * c-common.c (fix_string_type): Reject string literals larger than
257 TYPE_MAX_VALUE (ssizetype) bytes.
258
1d249509
MS
2592018-11-15 Martin Sebor <msebor@redhat.com>
260
261 PR c++/87541
262 PR c++/87542
263 * c-attribs.c (positional_argument): New function.
264 (handle_alloc_size_attribute): Use it and simplify.
265 (handle_alloc_align_attribute): Same.
266 (handle_assume_aligned_attribute): Same.
267 (handle_nonnull_attribute): Same.
268 * c-common.c (check_function_arguments): Pass fntype to
269 check_function_format.
270 * c-common.h (check_function_format): Add an argument.
271 (PosArgFlags, positional_argument): Declare new type and function.
272 * c-format.c (decode_format_attr): Add arguments.
273 (check_format_string, get_constant): Same.
274 (convert_format_name_to_system_name): Adjust.
275
478dd60d
DM
2762018-11-15 David Malcolm <dmalcolm@redhat.com>
277
278 PR other/19165
279 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
280
8cca0163
JJ
2812018-11-14 Jakub Jelinek <jakub@redhat.com>
282
8ee09943
JJ
283 P1236R1 - Signed integers are two's complement
284 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
285 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
286 with in-range second operand well defined for -std=c++2a.
287
8cca0163
JJ
288 PR other/88007
289 * c-common.c (parse_optimize_options): Allocate option string from
290 opts_obstack rather than as GC memory. Move the allocation after
291 warning for invalid option.
292
620e594b
DM
2932018-11-13 David Malcolm <dmalcolm@redhat.com>
294
295 * c-common.c (c_get_substring_location): Update for renaming of
296 get_source_location_for_substring to get_location_within_string.
297 * c-lex.c: Replace "source_location" with "location_t".
298 * c-opts.c: Likewise.
299 * c-ppoutput.c: Likewise.
300
f9731de3
MS
3012018-11-13 Martin Sebor <msebor@redhat.com>
302
303 PR middle-end/81824
304 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
305 (handle_tls_model_attribute): Improve diagnostics.
306
e4bd6d5e
JM
3072018-11-12 Jason Merrill <jason@redhat.com>
308
a6bb6b07
JM
309 * c-cppbuiltin.c (c_cpp_builtins): Define
310 __cpp_impl_destroying_delete.
311
e4bd6d5e
JM
312 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
313 __cpp_conditional_explicit.
314
79a2c428
MS
3152018-11-09 Martin Sebor <msebor@redhat.com>
316
317 PR middle-end/81824
318 * c-attribs.c (handle_copy_attribute): New function.
319
4c7bd361
MS
3202018-11-09 Martin Sebor <msebor@redhat.com>
321
322 PR c/87795
323 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
324
28567c40
JJ
3252018-11-08 Jakub Jelinek <jakub@redhat.com>
326
327 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
328 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
329 enum omp_memory_order MEMORY_ORDER.
330 (c_finish_omp_flush): Add MO argument.
331 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
332 (c_finish_omp_for): Add FINAL_P argument.
333 * c-omp.c: Include memmodel.h.
334 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
335 OMP_TASKGROUP_CLAUSES to it.
336 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
337 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
338 instead of OMP_ATOMIC_SEQ_CST.
339 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
340 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
341 __atomic_thread_fence call with the given value.
342 (check_omp_for_incr_expr): Formatting fixes.
343 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
344 even in OpenMP loops, diagnose if NE_EXPR and incr expression
345 is not constant expression 1 or -1. Transform NE_EXPR loops
346 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
347 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
348 loops too.
349 (c_omp_split_clauses): Add support for combined
350 #pragma omp parallel master and
351 #pragma omp {,parallel }master taskloop{, simd} constructs.
352 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
353 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
354 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
355 (c_omp_predetermined_sharing): Don't return
356 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
357 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
358 PRAGMA_OMP_REQUIRES.
359 * c-pragma.h (enum pragma_kind): Likewise.
360 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
361 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
362
204839e7
DM
3632018-11-08 David Malcolm <dmalcolm@redhat.com>
364
365 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
366
d8010ee4
DM
3672018-11-08 David Malcolm <dmalcolm@redhat.com>
368
369 * c-format.c (local_cgraph_node_ptr_node): New variable.
370 (gcc_dump_printf_char_table): Add entry for %C.
371 (get_pointer_to_named_type): New function, taken from the handling
372 code for "gimple *" from...
373 (init_dynamic_diag_info): ...here. Add handling for
374 "cgraph_node *".
375 * c-format.h (T_CGRAPH_NODE): New.
376
4be5c72c
JM
3772018-10-19 Jason Merrill <jason@redhat.com>
378
379 * c-cppbuiltin.c (c_cpp_builtins): Add
380 __cpp_nontype_template_parameter_class.
381
f3f6029d
NS
3822018-10-31 Nathan Sidwell <nathan@acm.org>
383
ab5324fb
NS
384 * c-opts.c (c_finish_options): Force command line macro
385 location. Refactor to avoid repeating main debug hook.
386 (push_command_line_include): Clarify comment.
387
f3f6029d
NS
388 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
389
91e3ec29
MS
3902018-10-30 Martin Sebor <msebor@redhat.com>
391
392 PR middle-end/87041
393 * c-format.c (check_format_types): Avoid diagnosing null pointer
394 arguments to printf-family of functions.
395
b5ff4f5c
MP
3962018-10-30 Marek Polacek <polacek@redhat.com>
397
398 Implement P0892R2, explicit(bool).
399 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
400
7e2de6df
DM
4012018-10-29 David Malcolm <dmalcolm@redhat.com>
402
403 * name-hint.h (name_hint::take_deferred): New member function.
404
b2bf438c
DM
4052018-10-29 David Malcolm <dmalcolm@redhat.com>
406
407 PR c++/56856
408 * c-common.c (check_function_sentinel): Call fold_for_warn on the
409 argument.
410 (check_function_restrict): Rename param "argarray" to
411 "unfolded_argarray", and make a copy named "argarray", calling
412 fold_for_warn on each argument.
413 (check_function_arguments): Add note about responsibility for
414 folding the arguments.
415
9f936c86
JM
4162018-10-17 Joseph Myers <joseph@codesourcery.com>
417
418 * c-common.c (flag_isoc2x): New variable.
419 * c-common.h (clk_c): Update comment to reference C2X.
420 (flag_isoc99, flag_isoc11): Update comments to reference future
421 standard versions in general.
422 (flag_isoc2x): Declare.
423 * c-opts.c (set_std_c2x): New function.
424 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
425 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
426 flag_isoc2x to 0.
427 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
428
7a8a92c4
JM
4292018-10-17 Joseph Myers <joseph@codesourcery.com>
430
431 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
432 (std=iso9899:2018): Document C17 as published in 2018.
433
4dc003ff
CL
4342018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
435
436 PR c++/87364
437 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
438
79371671
WW
4392018-10-11 Will Wray <wjwray@gmail.com>
440
441 PR c++/87364
442 * c-pretty-print.h (pp_c_type_cast): Prototype.
443 (pp_c_integer_constant): Likewise.
444 * c-pretty-print.c (pp_c_type_cast): No longer static.
445 (pp_c_integer_constant): Likewise.
446 (pp_c_enumeration_constant): Fix loop termination when finding
447 name of constant. No longer returns a value. Call
448 pp_c_integer_constant.
449 (c_pretty_printer::constant): Update for changes to
450 pp_c_enumeration_constant.
451
46c62690
JJ
4522018-10-11 Jakub Jelinek <jakub@redhat.com>
453
454 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
455 for no_unique_address.
456
c24300ba
DM
4572018-10-09 David Malcolm <dmalcolm@redhat.com>
458
459 * c-common.c (c_option_controlling_cpp_error): Rename to...
460 (c_option_controlling_cpp_diagnostic): ...this, and convert
461 "reason" from int to enum.
462 (c_cpp_error): Rename to...
463 (c_cpp_diagnostic): ...this, converting level and reason to enums.
464 * c-common.h (c_cpp_error): Rename to...
465 (c_cpp_diagnostic): ...this, converting level and reason to enums.
466 * c-opts.c (c_common_init_options): Update for renaming.
467
8656dafa
RS
4682018-10-08 Richard Sandiford <richard.sandiford@arm.com>
469
470 PR c/87286
471 * c-common.c (vector_types_compatible_elements_p): Use
472 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
473
8cff0652
VK
4742018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
475
476 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
477 to generate constructor destructor priority warning.
478 * c.opt (-Wprio-ctor-dtor): New option.
479
bedf03a2
JM
4802018-10-01 Jason Merrill <jason@redhat.com>
481
482 * c-lex.c (c_common_has_attribute): Add no_unique_address.
483
6cc430c1
EB
4842018-10-01 Eric Botcazou <ebotcazou@adacore.com>
485
486 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
487 (dump_ada_node): Add const keyword.
488
87677ac7
ML
4892018-09-25 Martin Liska <mliska@suse.cz>
490
491 * c-common.c (c_common_truthvalue_conversion):
492 Remove Pascal from documentation.
493
518196cb
EB
4942018-09-21 Eric Botcazou <ebotcazou@adacore.com>
495
496 * c-ada-spec.c: Include diagnostic.h.
497 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
498
a599af84
MP
4992018-09-19 Marek Polacek <polacek@redhat.com>
500
501 * c.opt (Wclass-conversion): New.
502
9c4a4b3c
DM
5032018-09-17 David Malcolm <dmalcolm@redhat.com>
504
505 * c-format.c (range_label_for_format_type_mismatch::get_text):
506 Update for new param.
507
c896ecfe
DM
5082018-09-17 David Malcolm <dmalcolm@redhat.com>
509
510 * c-format.c (format_warning_at_char): Update for introduction of
511 format_string_diagnostic_t.
512 (format_type_warning): Likewise.
513
80c6d1f4
MJ
5142018-09-17 Martin Jambor <mjambor@suse.cz>
515
516 PR c/63886
517 * c.opt (Wabsolute-value): New.
518
6d900107
BE
5192018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
520
521 * c-common.c (complete_flexible_array_elts): New helper function.
522 * c-common.h (complete_flexible_array_elts): Declare.
523
b5764229
BE
5242018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
525
526 * c-common.c (braced_list_to_string): Remove eval parameter.
527 Add some more checks. Always create zero-terminated STRING_CST.
528 * c-common.h (braced_list_to_string): Adjust prototype.
529
85204e23
DM
5302018-08-27 David Malcolm <dmalcolm@redhat.com>
531
532 PR 87091
533 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
534 to a tri-state.
535 (maybe_suggest_missing_token_insertion): Likewise.
536 (maybe_add_include_fixit): Add param "override_location". If set,
537 and source-printing is enabled, then override the rich_location's
538 primary location with that of the insertion point for the fix-it
539 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
540 * c-common.h (extern void maybe_add_include_fixit): Add bool
541 param.
542 * c-format.c (selftest::test_type_mismatch_range_labels): Update
543 for conversion of show_caret_p to a tri-state.
544 * c-warn.c (warn_for_restrict): Likewise.
545 * known-headers.cc
546 (suggest_missing_header::~suggest_missing_header): Update call to
547 maybe_add_include_fixit to suggest overriding the location, as it
548 is for a note.
549
3d78e008
ML
5502018-08-27 Martin Liska <mliska@suse.cz>
551
552 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
553 fndecl_built_in_p and remove check for FUNCTION_DECL if
554 possible.
3d78e008
ML
555 (check_builtin_function_arguments): Likewise.
556 (reject_gcc_builtin): Likewise.
557 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
558
b5be6d0c
MP
5592018-08-26 Marek Polacek <polacek@redhat.com>
560
561 PR c++/87029, Implement -Wredundant-move.
562 * c.opt (Wredundant-move): New option.
563
79ca9c35
MP
5642018-08-21 Marek Polacek <polacek@redhat.com>
565
566 PR c++/86981, Implement -Wpessimizing-move.
567 * c.opt (Wpessimizing-move): New option.
568
097f82ec
DM
5692018-08-20 David Malcolm <dmalcolm@redhat.com>
570
571 PR other/84889
572 * c-attribs.c (common_handle_aligned_attribute): Add
573 auto_diagnostic_group instance.
574 * c-indentation.c (warn_for_misleading_indentation): Likewise.
575 * c-opts.c (c_common_post_options): Likewise.
576 * c-warn.c (warn_logical_not_parentheses): Likewise.
577 (warn_duplicated_cond_add_or_warn): Likewise.
578 (warn_for_multistatement_macros): Likewise.
579
3fb558b1
NS
5802018-08-20 Nathan Sidwell <nathan@acm.org>
581
582 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
583 access.
584
800c0e98
NS
5852018-08-17 Nathan Sidwell <nathan@acm.org>
586
587 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
588 field.
589 (laxy_hex_fp_value_count): Make unsigned.
590 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
591 manipulate the macro.
592 (builtin_defin_with_hex_fp_value): Adjust callback name, use
593 cpp_define_lazily.
594
6f795a92
DM
5952018-08-17 David Malcolm <dmalcolm@redhat.com>
596
597 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
598 (gcc_dump_printf_length_specs): New.
599 (gcc_dump_printf_flag_pairs): New.
600 (gcc_dump_printf_flag_specs): New.
601 (gcc_dump_printf_char_table): New.
602 (format_types_orig): Add entry for "gcc_dump_printf".
603 (init_dynamic_diag_info): Set up length_char_specs and
604 conversion_specs for gcc_dump_printf_format_type.
605 (handle_format_attribute): Handle gcc_dump_printf_format_type.
606
c5d725c0
NS
6072018-08-17 Nathan Sidwell <nathan@acm.org>
608
10f04917
NS
609 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
610
c5d725c0
NS
611 * c-ada-spec.c: Don't #include "cpp-id-data.h"
612 * c-cppbuiltin.c: Likewise.
613
c0c12356
ML
6142018-08-17 Martin Liska <mliska@suse.cz>
615
616 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
617 Ignore/Deprecated flag. Warning is done automatically for
618 Deprecated flags.
c0c12356 619
10fcc142
DM
6202018-08-16 David Malcolm <dmalcolm@redhat.com>
621
622 PR c++/70693
623 * c-common.c (selftest::c_family_tests): Call
624 selftest::c_indentation_c_tests.
625 * c-common.h (selftest::c_indentation_c_tests): New decl.
626 * c-indentation.c: Include "selftest.h".
627 (next_tab_stop): Add "tab_width" param, rather than accessing
628 cpp_opts.
629 (get_visual_column): Likewise. Clarify comment. Bulletproof
630 against reading past the end of the line.
631 (get_first_nws_vis_column): Add "tab_width" param.
632 (detect_intervening_unindent): Likewise.
633 (should_warn_for_misleading_indentation): Read tab width from
634 cpp_opts and pass around.
635 (selftest::test_next_tab_stop): New test.
636 (selftest::assert_get_visual_column_succeeds): New function.
637 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
638 (selftest::assert_get_visual_column_fails): New function.
639 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
640 (selftest::test_get_visual_column): New test.
641 (selftest::c_indentation_c_tests): New function.
642
3f6677f4
NS
6432018-08-16 Nathan Sidwell <nathan@acm.org>
644
645 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
646 (store_ada_macro): Likewise.
647 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
648 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
649
96e6ae57
DM
6502018-08-15 David Malcolm <dmalcolm@redhat.com>
651
652 * c-format.c: Include "selftest-diagnostic.h" and
653 "gcc-rich-location.h".
654 (format_warning_at_char): Pass NULL for new label params of
655 format_warning_va.
656 (class indirection_suffix): New class.
657 (class range_label_for_format_type_mismatch): New class.
658 (format_type_warning): Move logic for generating "*" suffix to
659 class indirection_suffix. Create "fmt_label" and "param_label"
660 to show their types, and pass them to the
661 format_warning_at_substring calls.
662 (selftest::test_type_mismatch_range_labels): New test.
663 (selftest::c_format_c_tests): Call it.
664
23aa9f7c
MS
6652018-08-13 Martin Sebor <msebor@redhat.com>
666
667 PR tree-optimization/71625
668 * c-common.c (braced_list_to_string): New function.
669 * c-common.h (braced_list_to_string): Declare it.
670
f10a9135
NS
6712018-08-08 Nathan Sidwell <nathan@acm.org>
672
673 * c-common.c (try_to_locate_new_include_inertion_point): Use
674 linemap_included_from_linemap.
675 * c-lex.c (fe_file_change): Use linemap_included_from.
676 * c-ppoutput.c (pp_file_change): Likewise.
677
8a45b051
MS
6782018-08-01 Martin Sebor <msebor@redhat.com>
679
680 PR tree-optimization/86650
681 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
682 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
683 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
684 * c-format.h (T89_G): Update to be "gimple *" rather than
685 "gcall *".
686 (local_gcall_ptr_node): Rename...
687 (local_gimple_ptr_node): ...to this.
688
e540ccc0
DM
6892018-07-31 David Malcolm <dmalcolm@redhat.com>
690
691 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
692 table entries for gcc_diag_char_table, and the 'Z' entry from
693 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
694 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
695 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
696 adding missing "Z" for this table. Remove erroneous "G" and "K"
697 entries.
698 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
699 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
700 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
701
425fc685
RE
7022018-07-31 Richard Earnshaw <rearnsha@arm.com>
703
704 * c-common.c (speculation_safe_resolve_call): New function.
705 (speculation_safe_resolve_params): New function.
706 (speculation_safe_resolve_return): New function.
707 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
708 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
709 __HAVE_SPECULATION_SAFE_VALUE.
710
181463c2
DM
7112018-07-20 David Malcolm <dmalcolm@redhat.com>
712
713 * c-common.c (c_cpp_error): Remove redundant "line_table"
714 parameter from call to rich_location::set_range.
715 (maybe_suggest_missing_token_insertion): Likewise.
716
0d7f9065
MS
7172018-07-20 Martin Sebor <msebor@redhat.com>
718
719 PR middle-end/82063
720 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
721
00abf86c
MS
7222018-07-20 Martin Sebor <msebor@redhat.com>
723
724 PR middle-end/82063
725 * c-common.h (c_common_handle_option): Change function argument
726 to HOST_WIDE_INT.
727 * c-opts.c (c_common_init_options): Same.
728 (c_common_handle_option): Same. Remove special handling of
729 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
730 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
731 options to take a HOST_WIDE_INT argument and accept a byte-size
732 suffix. Initialize.
733 (-Wvla-larger-than): Same.
734 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
735 (-Wno-vla-larger-than): Same.
736
9b452033
JJ
7372018-07-12 Jakub Jelinek <jakub@redhat.com>
738
739 * c-attribs.c (c_common_attribute_table): Add
740 "omp declare target implicit" attribute.
741
cd0762f3
RB
7422018-07-12 Richard Biener <rguenther@suse.de>
743
744 PR c/86453
745 * c-attribs.c (handle_packed_attribute): Do not build a variant
746 type with TYPE_PACKED, instead ignore the attribute if we may
747 not apply to the original type.
748
0b27c3ed
JJ
7492018-07-10 Jakub Jelinek <jakub@redhat.com>
750
751 PR c++/86443
752 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
753 to contain TREE_LIST for both the original class iterator and the
754 "last" helper var.
755
e730a0ef
EB
7562018-07-07 Eric Botcazou <ebotcazou@adacore.com>
757
758 * c-ada-spec.c (to_ada_name): Remove index parameter.
759 (pp_ada_tree_identifier): Likewise.
760 (dump_ada_macros): Adjust call to to_ada_name.
761 (struct overloaded_name_hash): Delete.
762 (struct overloaded_name_hasher): Likewise.
763 (overloaded_names): Likewise.
764 (compute_overloading_index): Likewise.
765 (dump_ada_decl_name): Do not call compute_overloading_index and
766 adjust calls to pp_ada_tree_identifier.
767 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
768 (dump_ada_import): Add spc parameter and switch to aspect syntax.
769 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
770 (dump_ada_enum_type): Remove type and display_convention parameters.
771 Adjust calls to pp_ada_tree_identifier.
772 (dump_ada_node): Likewise and for dump_ada_structure.
773 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
774 and tidy up.
775 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
776 syntax.
777 (print_constructor): Adjust call to pp_ada_tree_identifier.
778 (print_destructor): Likewise.
779 (dump_ada_declaration): Switch to aspect syntax.
780 (dump_ada_structure): Likewise and tidy up. Replace display_convention
781 parameter with nested parameter.
782 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
783 (dump_ada_specs): Do not delete overloaded_names table.
784
8de583fc
PB
7852018-07-06 Peter Bergner <bergner@linux.ibm.com>
786
787 PR target/86324
e730a0ef 788 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
789 target hook.
790
09cff37b
NS
7912018-07-05 Nathan Sidwell <nathan@acm.org>
792
793 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
794 NO_IMPLICIT_EXTERN_C.
795
98086b2b
ML
7962018-06-28 Martin Liska <mliska@suse.cz>
797
798 * cppspec.c: Include opt-suggestions.h.
799
829c6349
CLT
8002018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
801 Thomas Schwinge <thomas@codesourcery.com>
802 Cesar Philippidis <cesar@codesourcery.com>
803
804 * c-pragma.h (enum pragma_omp_clause): Add
805 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
806 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
807
f41b7612
JJ
8082018-06-20 Jakub Jelinek <jakub@redhat.com>
809
810 PR c++/86210
811 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
812 comment.
813
4252ccd7
MS
8142018-06-18 Martin Sebor <msebor@redhat.com>
815
816 PR middle-end/85602
817 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
818 nonstring.
819
e197e64e
KV
8202018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
821
822 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
823
34a7a230
JM
8242018-06-13 Jason Merrill <jason@redhat.com>
825
5cef3733
JM
826 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
827 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
828 handling.
829
34a7a230
JM
830 PR c++/86094 - wrong code with defaulted move ctor.
831 * c-opts.c (c_common_post_options): Bump the current ABI version to
832 13. Set warn_abi_version and flag_abi_compat_version to the current
833 version rather than 0. Fix defaulting flag_abi_compat_version from
834 warn_abi_version.
835
bb0f14ae
MS
8362018-06-12 Martin Sebor <msebor@redhat.com>
837
838 PR c/85931
839 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
840 sizeof source and destination yields the same value.
841
3713f2e2
ML
8422018-06-12 Martin Liska <mliska@suse.cz>
843
844 * c.opt: Make MPX-related options as Deprecated.
845
4af78ef8
DM
8462018-06-08 David Malcolm <dmalcolm@redhat.com>
847
848 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
849 rather than 0.
850
31db0fe0
ML
8512018-06-08 Martin Liska <mliska@suse.cz>
852
853 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
854 for MPX (macros, related functions, fields in cgraph_node, ...).
855 (handle_bnd_legacy): Likewise.
856 (handle_bnd_instrument): Likewise.
857 * c.opt: Likewise.
858
fe16acf2
JJ
8592018-06-06 Jakub Jelinek <jakub@redhat.com>
860
861 PR c++/86068
862 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
863 __cpp_transactional_memory to 201500 instead of 210500.
864
4dbdb49b
JM
8652018-06-06 Jason Merrill <jason@redhat.com>
866
867 PR c++/85710 - ICE with -Wmemset-elt-size.
868 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
869
f8ad043f
JM
8702018-06-01 Jason Merrill <jason@redhat.com>
871
872 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
873 201703.
874
abc24d93
EB
8752018-06-01 Eric Botcazou <ebotcazou@adacore.com>
876
877 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
878 declaration for a typedef independently of whether the declaration of
879 the subtype is generated.
880
d258f4aa
MS
8812018-05-31 Martin Sebor <msebor@redhat.com>
882
883 PR c/82063
884 * c.opt (-Wno-alloc-size-larger-than): New option.
885
b67b9225
DP
8862018-04-22 David Pagan <dave.pagan@oracle.com>
887
888 PR c/55976
889 * c-opts.c (c_common_post_options): Set default for warn_return_type
890 for C++/C++ with ObjC extensions only. For C, makes it possible to
891 differentiate between default (no option), -Wreturn-type, and
892 -Wno-return-type.
893
04eb9c55
JM
8942018-05-29 Jason Merrill <jason@redhat.com>
895
896 * c.opt (Winit-list-lifetime): New flag.
897
b0c31bc6
BE
8982018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
899
900 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
901 splay_tree_delete_pointers.
902
44284983
JJ
9032018-05-26 Jakub Jelinek <jakub@redhat.com>
904
905 PR bootstrap/85921
906 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
907 noinline variable to workaround broken kernel headers.
908
b46b715d
JM
9092018-05-18 Jason Merrill <jason@redhat.com>
910
911 * c.opt (Wdeprecated-copy): New flag.
912
40659769
ML
9132018-05-17 Martin Liska <mliska@suse.cz>
914
915 * c-warn.c (overflow_warning): Do not use
916 space in between 'G_' and '('.
917
403962ea
JM
9182018-05-09 Jason Merrill <jason@redhat.com>
919
920 * c-common.c (valid_array_size_p): Add complain parameter.
921 * c-common.h: ...which defaults to true.
922
1c9ee609
JJ
9232018-05-11 Jakub Jelinek <jakub@redhat.com>
924
925 PR c/85696
926 * c-omp.c (c_omp_predetermined_sharing): Return
927 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
928
19916065
ML
9292018-05-11 Martin Liska <mliska@suse.cz>
930
92a285c1 931 PR sanitizer/85556
19916065
ML
932 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
933 TREE_LIST values.
934
79e7b1fe
JJ
9352018-05-10 Jakub Jelinek <jakub@redhat.com>
936
937 PR c++/85662
938 * c-common.h (fold_offsetof_1): Removed.
939 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
940 CTX argument defaulted to ERROR_MARK.
941 * c-common.c (fold_offsetof_1): Renamed to ...
942 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
943 argument, convert the pointer constant to TYPE and use size_binop
944 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
945 a pointer type. Adjust recursive calls.
946
86c12f76
EB
9472018-05-10 Eric Botcazou <ebotcazou@adacore.com>
948
949 PR c++/85400
950 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
951
ee336e84
NS
9522018-05-07 Nathan Sidwell <nathan@acm.org>
953
954 * c.opt (ffor-scope): Remove functionality, issue warning.
955
6c072e21
NS
9562018-05-03 Nathan Sidwell <nathan@acm.org>
957
958 * c.opt (ffriend-injection): Remove functionality, issue warning.
959
2cc7d3a7
DM
9602018-05-01 David Malcolm <dmalcolm@redhat.com>
961
962 PR c/84258
963 * c-format.c (struct format_check_results): Add field
964 "number_non_char".
965 (check_format_info): Initialize it, and warn if encountered.
966 (check_format_arg): Distinguish between wide char and
967 everything else when detecting arrays of non-char.
968
7761dfbe
DM
9692018-04-30 David Malcolm <dmalcolm@redhat.com>
970
971 * c-format.c (get_corrected_substring): Update for
972 location_get_source_line returning a char_span. Use a char_span
973 when handling the prefix of the correction.
974 * c-indentation.c (get_visual_column): Update for
975 location_get_source_line returning a char_span.
976 (get_first_nws_vis_column): Likewise.
977
62e98ef1
DM
9782018-03-29 David Malcolm <dmalcolm@redhat.com>
979
980 PR c++/84269
981 * known-headers.cc (get_stdlib_header_for_name): Add various names
982 from <assert.h>, <string.h>, and <memory.h>; add more names from
983 <stdio.h>.
984
a7dea617
JJ
9852018-03-27 Jakub Jelinek <jakub@redhat.com>
986
987 PR c++/85061
988 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
989 get_base_address of the second operand is a VAR_P, rather than the
990 operand itself, and use gcc_checking_assert instead of gcc_assert.
991
889a3a30
MP
9922018-03-23 Marek Polacek <polacek@redhat.com>
993
994 PR c++/85045
995 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
996 <case RDIV_EXPR>: Tweak condition.
997
452154b9
EB
9982018-03-20 Eric Botcazou <ebotcazou@adacore.com>
999
1000 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1001
63ecb626
JJ
10022018-03-16 Jakub Jelinek <jakub@redhat.com>
1003
ce811fc4
JJ
1004 PR c/84909
1005 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1006 diagnostics.
1007
63ecb626
JJ
1008 PR c/84910
1009 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1010 diagnostics.
1011
a1295eec
RB
10122018-03-16 Richard Biener <rguenther@suse.de>
1013
1014 PR c/84873
1015 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1016 unshare the possibly folded expression.
1017
919674fb
RB
10182018-03-15 Richard Biener <rguenther@suse.de>
1019
1020 PR c/84873
1021 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1022
f99309b2
MS
10232018-03-13 Martin Sebor <msebor@redhat.com>
1024
1025 PR tree-optimization/84725
1026 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1027 with all three narrow character types, including their qualified forms.
1028
e9b9fa4c
MS
10292018-03-12 Martin Sebor <msebor@redhat.com>
1030
1031 PR tree-optimization/83456
1032 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1033 Restore checking of bounded built-in functions.
1034 (check_function_arguments): Also return the result
1035 of warn_for_restrict.
1036 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1037 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1038
0805d020
MP
10392018-03-02 Marek Polacek <polacek@redhat.com>
1040
1041 PR c++/84171
1042 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1043 is erroneous.
1044
ed2a2f08
TS
10452018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1046
1047 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1048 function".
1049
90abdde0
MP
10502018-03-01 Marek Polacek <polacek@redhat.com>
1051
1052 PR c++/84639
1053 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1054 alignment in computation.
1055
c6db43fa
EB
10562018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1057
1058 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1059 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1060
9e25c7ed
EB
10612018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1062
1063 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1064 (is_char_array): Take a type instead of a declaration.
1065 (dump_ada_array_type): Likewise.
1066 (is_simple_enum): Minor tweak.
1067 (dump_ada_enum_type): New function extracted from...
1068 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1069 <INTEGER_TYPE>: Remove unreachable code.
1070 <RECORD_TYPE>: Likewise. Minor tweaks.
1071 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1072 <ENUMERAL_TYPE>: New case.
1073 <RECORD_TYPE>: Factor out common code.
1074 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1075 Minor tweaks. Deal with enumeral types.
1076 (dump_ada_structure): Minor tweaks.
1077
09de3550
EB
10782018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1079
1080 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1081 address for incomplete structures.
1082 (dump_forward_type): Do not bail out for incomplete structures.
1083 (dump_ada_declaration): Do not special-case incomplete structures
1084 for subtypes. Dump them as null records for types.
1085
095d8d4b
EB
10862018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1087
1088 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1089 (is_char_array): Fix formatting.
1090 (dump_template_types): Likewise.
1091 (dump_generic_ada_node): Rename into...
1092 (dump_ada_node): ...this.
1093 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1094 incomplete structures and not for empty structures. Do not use it
1095 when forward declarations are needed.
1096 (dump_forward_type): New function.
1097 (dump_nested_types): Remove FORWARD parameter. Do not consider
1098 TREE_VISITED and do not generate a forward declaration. Only dump
1099 original nested types for nested declaration.
1100 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1101 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1102 <RECORD_TYPE>: Do not consider TREE_VISITED.
1103 (dump_ada_declaration): Use booleans and fix formatting throughout.
1104 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1105 Call dump_forward_type instead of dump_nested_types for a typedef.
1106 Remove superfluous check and adjust call to dump_nested_types.
1107 <POINTER_TYPE>: Call dump_forward_type and fall through.
1108 (dump_ada_struct_decl): Rename into...
1109 (dump_ada_structure): ...this. Do not special-case empty structures.
1110
d4cfd486
MS
11112018-02-27 Martin Sebor <msebor@redhat.com>
1112
1113 PR c++/83871
1114 * c.opt (-Wmissing-attributes): New option.
1115
b22dbd03
ML
11162018-02-21 Martin Liska <mliska@suse.cz>
1117
1118 * c.opt (Wcatch-value=): Add IntegerRange.
1119
883dfe2a
JM
11202018-02-15 Jason Merrill <jason@redhat.com>
1121
1122 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1123
0444aa9c
NS
11242018-02-09 Nathan Sidwell <nathan@acm.org>
1125
1126 PR c/84293
1127 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1128 arg.
1129 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1130 arg. Adjust.
1131
cea71f0a
MS
11322018-02-09 Martin Sebor <msebor@redhat.com>
1133
1134 PR lto/84212
1135 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1136 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1137 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1138 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1139 (-Wuninitialized): Same.
1140
8c8b7be5
EB
11412018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1142
1143 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1144 keyword for components.
1145
7c30b12a
PC
11462018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1147
1148 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1149
eece7fe5
JK
11502018-02-02 Julia Koval <julia.koval@intel.com>
1151
1152 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1153
7d07a93a
MP
11542018-01-29 Marek Polacek <polacek@redhat.com>
1155
1156 PR c/83966
1157 * c-format.c (check_function_format): Check current_function_decl.
1158
53723269
JJ
11592018-01-27 Jakub Jelinek <jakub@redhat.com>
1160
1161 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1162 argument.
1163 (LAZY_HEX_FP_VALUES_CNT): Define.
1164 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1165 values rather than just 12.
1166 (builtin_define_with_hex_fp_value): Likewise.
1167
7365279f
BK
11682018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1169
92a285c1
ML
1170 PR other/70268
1171 * c.opt (-fmacro-prefix-map): New option.
1172 * c-opts.c (c_common_handle_option): Handle it.
1173 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1174 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1175
bb9869d5
DM
11762018-01-17 David Malcolm <dmalcolm@redhat.com>
1177
1178 PR c++/83814
1179 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1180
68dc87c3
EB
11812018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1182
1183 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1184 Skip 'f' and 'F' characters if it is true.
1185 (store_ada_macro): Minor tweak.
1186 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1187 <CPP_WSTRING>: Likewise.
1188 <CPP_STRING>: Output '&' in the buffer if not the first string.
1189 <CPP_NUMBER>: Adjust calls to dump_number.
1190
9a004410
DM
11912018-01-10 David Malcolm <dmalcolm@redhat.com>
1192
1193 PR c++/43486
1194 * c-common.c: Include "selftest.h".
1195 (get_atomic_generic_size): Perform the test for integral type
1196 before the range test for any integer constant, fixing indentation
1197 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1198 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1199 (selftest::test_fold_for_warn): New function.
1200 (selftest::c_common_c_tests): New function.
1201 (selftest::c_family_tests): Call it, and
1202 selftest::c_pretty_print_c_tests.
1203 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1204 * c-format.c (check_format_arg): Convert VAR_P check to a
1205 fold_for_warn.
1206 * c-pretty-print.c: Include "selftest.h".
1207 (pp_c_cast_expression): Don't print casts for location wrappers.
1208 (selftest::assert_c_pretty_printer_output): New function.
1209 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1210 (selftest::test_location_wrappers): New function.
1211 (selftest::c_pretty_print_c_tests): New function.
1212 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1213
5c0caeb3
RS
12142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1215 Alan Hayward <alan.hayward@arm.com>
1216 David Sherwood <david.sherwood@arm.com>
1217
1218 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1219
73a699ae
RS
12202018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1221 Alan Hayward <alan.hayward@arm.com>
1222 David Sherwood <david.sherwood@arm.com>
1223
1224 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1225 as polynomial.
1226
928686b1
RS
12272018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1228 Alan Hayward <alan.hayward@arm.com>
1229 David Sherwood <david.sherwood@arm.com>
1230
1231 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1232 (convert_vector_to_array_for_subscript): Handle polynomial
1233 TYPE_VECTOR_SUBPARTS.
1234 (c_common_type_for_mode): Check valid_vector_subparts_p.
1235 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1236 VECTOR_CST_NELTS.
1237
85ec4feb
JJ
12382018-01-03 Jakub Jelinek <jakub@redhat.com>
1239
1240 Update copyright years.
1241
170a8bd6 12422017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1243 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1244
1245 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1246 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1247
18408e96
AO
12482017-12-22 Alexandre Oliva <aoliva@redhat.com>
1249
1250 PR debug/83527
1251 PR debug/83419
1252 * c-semantics.c (only_debug_stmts_after_p): New.
1253 (pop_stmt_list): Clear side effects in debug-only stmt list.
1254 Check for single nondebug stmt followed by debug stmts only.
1255
c12d20d4
AO
12562017-12-21 Alexandre Oliva <aoliva@redhat.com>
1257
1258 PR debug/83419
1259 * c-semantics.c (pop_stmt_list): Propagate side effects from
1260 single nondebug stmt to container list.
1261
01512446
JJ
12622017-12-19 Jakub Jelinek <jakub@redhat.com>
1263
1264 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1265 conditions with typical order conditions.
1266
82cfbd01
MP
12672017-12-18 Marek Polacek <polacek@redhat.com>
1268
1269 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1270 not in effect.
1271
99da11ec
MS
12722017-12-17 Martin Sebor <msebor@redhat.com>
1273
1274 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1275 an error for attribute warn_if_not_aligned.
1276
cc8bea0a
MS
12772017-12-16 Martin Sebor <msebor@redhat.com>
1278
1279 PR tree-optimization/78918
1280 * c-common.c (check_function_restrict): Avoid checking built-ins.
1281 * c.opt (-Wrestrict): Include in -Wall.
1282
4849deb1
JJ
12832017-12-15 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-attribs.c (c_common_attribute_table,
1286 c_common_format_attribute_table): Swap affects_type_identity
1287 and handler fields, adjust comments.
1288
c65e18d3
BE
12892017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1290
1291 * c.opt (Wcast-function-type): New warning option.
1292 * c-lex.c (get_fileinfo): Avoid warning.
1293 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1294
2004617a
QZ
12952017-12-14 Qing Zhao <qing.zhao@oracle.com>
1296
7365279f 1297 PR middle_end/79538
2004617a
QZ
1298 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1299 Adjust the size of buf1 and buf2, add a new buf to avoid
1300 format-overflow warning.
1301
96a95ac1
AO
13022017-12-12 Alexandre Oliva <aoliva@redhat.com>
1303
1304 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1305 subsequent statement list.
1306
5d9ae53d
MS
13072017-12-07 Martin Sebor <msebor@redhat.com>
1308
1309 PR c/81544
1310 PR c/81566
1311 * c-attribs.c (attr_aligned_exclusions): New array.
1312 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1313 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1314 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1315 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1316 (attr_warn_unused_result_exclusions): Same.
1317 (handle_hot_attribute, handle_cold_attribute): Simplify.
1318 (handle_const_attribute): Warn on function returning void.
1319 (handle_pure_attribute): Same.
1320 (handle_aligned_attribute): Diagnose conflicting attribute
1321 specifications.
1322 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1323
c79144f8
DM
13242017-12-06 David Malcolm <dmalcolm@redhat.com>
1325
1326 PR c/83236
1327 * c-common.c (selftest::c_family_tests): Call
1328 selftest::c_spellcheck_cc_tests.
1329 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1330 * c-spellcheck.cc: Include "selftest.h".
1331 (name_reserved_for_implementation_p): New function.
1332 (should_suggest_as_macro_p): New function.
1333 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1334 should_suggest_as_macro_p and call it.
1335 (selftest::test_name_reserved_for_implementation_p): New function.
1336 (selftest::c_spellcheck_cc_tests): New function.
1337 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1338
613bc14f
DM
13392017-12-06 David Malcolm <dmalcolm@redhat.com>
1340
1341 * c-spellcheck.cc: New file, taken from macro-handling code in
1342 spellcheck-tree.c.
1343 * c-spellcheck.h: New file, taken from macro-handling code in
1344 spellcheck-tree.h.
1345
e76c7157
JJ
13462017-12-01 Jakub Jelinek <jakub@redhat.com>
1347
1348 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1349 attribute.
1350 (handle_simd_attribute): Don't check for "cilk simd function"
1351 attribute. Reindent, formatting changes.
1352
b0da4034
JK
13532017-11-30 Julia Koval <julia.koval@intel.com>
1354
1355 * c-common.h (inv_list): Remove.
1356
058f0b9e
JJ
13572017-11-28 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR sanitizer/81275
1360 * c-common.c (c_switch_covers_all_cases_p_1,
1361 c_switch_covers_all_cases_p): New functions.
1362 * c-common.h (c_switch_covers_all_cases_p): Declare.
1363
5e9d6aa4 13642017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1365 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1366
1367 * array-notation-common.c: Delete.
1368 * c-cilkplus.c: Ditto.
1369 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1370 * c-common.def (ARRAY_NOTATION_REF): Remove.
1371 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1372 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1373 c_validate_cilk_plus_loop, cilkplus_an_parts,
1374 cilk_ignorable_spawn_rhs_op,
1375 cilk_recognize_spawn): Remove.
1376 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1377 * c-omp.c: Remove CILK_SIMD check.
1378 * c-pragma.c: Ditto.
1379 * c-pragma.h: Remove CILK related pragmas.
1380 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1381 ARRAY_NOTATION_REF condition.
1382 (c_pretty_printer::expression): Ditto.
1383 * c.opt (fcilkplus): Remove.
1384 * cilk.c: Delete.
1385
1af4ebf5
MG
13862017-11-21 Marc Glisse <marc.glisse@inria.fr>
1387
1388 * c-pretty-print.c (pp_c_additive_expression,
1389 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1390
d44ed508
JJ
13912017-11-21 Jakub Jelinek <jakub@redhat.com>
1392
7d2f0f9b
JJ
1393 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1394
d44ed508
JJ
1395 PR c++/83059
1396 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1397 instead of tree_to_uhwi, formatting fix.
1398
26edace6
DM
13992017-11-20 David Malcolm <dmalcolm@redhat.com>
1400
1401 PR c/81404
1402 * known-headers.cc: New file, based on material from c/c-decl.c.
1403 (suggest_missing_header): Copied as-is.
1404 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1405 heavily edited to add C++ support. Add some knowledge about
1406 <limits.h>, <stdint.h>, and <wchar.h>.
1407 * known-headers.h: Likewise.
1408
6c7a259b
DM
14092017-11-20 David Malcolm <dmalcolm@redhat.com>
1410
1411 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1412 (lookup_name_fuzzy): Likewise. Convert return type from
1413 const char * to name_hint. Add location_t param.
1414 * name-hint.h: New header.
1415
f9c59f7e
JJ
14162017-11-19 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/66618
1419 PR c/69960
1420 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1421
1e39313a
JM
14222017-11-16 Joseph Myers <joseph@codesourcery.com>
1423
1424 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1425 expected publication date of C17.
1426 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1427
3ca0dc60
JM
14282017-11-15 Joseph Myers <joseph@codesourcery.com>
1429
1430 PR c/81156
1431 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1432 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1433
025d57f0
MS
14342017-11-10 Martin Sebor <msebor@redhat.com>
1435
1436 PR c/81117
1437 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1438 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1439 * c.opt (-Wstringop-truncation): New option.
1440
1b6fa695
ML
14412017-11-06 Martin Liska <mliska@suse.cz>
1442
1443 PR middle-end/82404
1444 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1445 FE.
1446 * c.opt: Set default value of warn_return_type.
1447
64a5912c
DM
14482017-10-31 David Malcolm <dmalcolm@redhat.com>
1449
1450 * c-common.c (binary_op_error): Update for renaming of
1451 error_at_rich_loc.
1452 (c_parse_error): Likewise.
1453 * c-warn.c (warn_logical_not_parentheses): Likewise for
1454 renaming of inform_at_rich_loc.
1455 (warn_for_restrict): Likewise for renaming of
1456 warning_at_rich_loc_n.
1457
c76dc9c3
JM
14582017-10-30 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1461 * c-opts.c (set_std_c17): New function.
1462 (c_common_init_options): Use gnu17 as default C version.
1463 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1464
ee5fd23a
MM
14652017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1466
1467 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1468 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1469 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1470 __FP_FAST_FMA<N>X.
1471
d1047465
MP
14722017-10-23 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/82681
1475 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1476
9e878cf1
EB
14772017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1478
1479 * c-common.c (check_builtin_function_arguments): Also check arguments
1480 of __builtin_alloca_with_align_and_max.
1481
89b6abbb
DM
14822017-10-17 David Malcolm <dmalcolm@redhat.com>
1483
1484 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1485 rather than NULL to format_warning_va.
1486 (check_format_types): Likewise when calling format_type_warning.
1487 Remove code to extract source_ranges and source_range * in favor
1488 of just a location_t.
1489 (format_type_warning): Convert source_range * param to a
1490 location_t.
1491
39382c09
JJ
14922017-10-13 Jakub Jelinek <jakub@redhat.com>
1493
1494 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1495 [LR]SHIFT_EXPR.
1496
62e1c678
DM
14972017-10-12 David Malcolm <dmalcolm@redhat.com>
1498
1499 * c-common.c (enum missing_token_insertion_kind): New enum.
1500 (get_missing_token_insertion_kind): New function.
1501 (maybe_suggest_missing_token_insertion): New function.
1502 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1503
b90c9338
NS
15042017-10-11 Nathan Sidwell <nathan@acm.org>
1505
1506 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1507 (c_common_handle_option): Update incpath_kind names.
1508
3a266bcd
ML
15092017-10-11 Martin Liska <mliska@suse.cz>
1510
1511 PR sanitizer/82490
1512 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1513 Wattributes warning.
1514
8e6cdc90
RS
15152017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1516
1517 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1518 operating on trees as wide_ints.
1519 * c-common.c (pointer_int_sum): Likewise.
1520 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1521 * c-warn.c (match_case_to_enum_1): Likewise.
1522 (c_do_switch_warnings): Likewise.
1523 (maybe_warn_shift_overflow): Likewise.
1524
802b38c9
JJ
15252017-10-10 Jakub Jelinek <jakub@redhat.com>
1526
1527 PR c/82437
1528 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1529 instead of wide_int::from.
1530
4e34b338
JJ
15312017-10-06 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c/82437
1534 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1535 using to_widest use wide_int with the larger of the two precisions.
1536
4bc4b2b4
BE
15372017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1538
1539 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1540 functions.
1541
a1488398
RS
15422017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1543
1544 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1545 when combining the original unconverted comparison operands.
1546
01c9fb68
JJ
15472017-09-29 Jakub Jelinek <jakub@redhat.com>
1548
1549 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1550 attribute.
1551
6e3e8419
EB
15522017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1553
1554 * c-ada-spec.c (to_ada_name): Add index parameter.
1555 (pp_ada_tree_identifier): Likewise.
1556 (dump_ada_macros): Adjust call to to_ada_name.
1557 (struct overloaded_name_hash): New type.
1558 (struct overloaded_name_hasher): Likewise.
1559 (overloaded_names): New hash table.
1560 (compute_overloading_index): New function.
1561 (dump_ada_decl_name): Call it and pass the result to
1562 pp_ada_tree_identifier.
1563 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1564 (dump_ada_function_declaration): Likewise.
1565 (dump_generic_ada_node): Likewise.
1566 (print_constructor): Likewise.
1567 (print_destructor): Likewise.
1568 (dump_ada_specs): Delete overloaded_names table.
1569
79310774
EB
15702017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1571
1572 * c-ada-spec.c (max_ada_macros): Move around.
1573 (store_ada_macro_index): Likewise.
1574 (source_file): Rename into...
1575 (macro_source_file): ...this.
1576 (count_ada_macro): Move around.
1577 (store_ada_macro): Likewise.
1578 (compare_macro): Likewise.
1579 (print_ada_macros): Merge in...
1580 (dump_ada_macros): ...this.
1581 (source_file_base): Rename into...
1582 (current_source_file): ...this.
1583 (print_comment): Move around.
1584 (dump_ada_nodes): Call dump_ada_declaration directly.
1585 (struct with): Change type of limited field to bool.
1586 (append_withs): Change type of limited_access parameter to bool.
1587 (pp_ada_tree_identifie): Likewise.
1588 (dump_ada_decl_nam): Likewise.
1589 (dump_generic_ada_node): Likewise. Do not print the return type.
1590 (to_ada_name): Change type of space_found parameter to bool.
1591 (dump_ada_function_declaration): Return void and change type of
1592 parameters to bool. Also print the return type for a function.
1593 (print_ada_methods): Rename into...
1594 (dump_ada_methods): ...this.
1595 (print_ada_declaration): Rename into ...
1596 (dump_ada_declaration): ...this. Do not print the return type.
1597 (print_ada_struct_decl): Rename into...
1598 (dump_ada_struct_decl): ...this.
1599
7d386d45
JJ
16002017-09-29 Jakub Jelinek <jakub@redhat.com>
1601
1602 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1603 rather than DECL_INITIAL.
1604 (common_handle_aligned_attribute): Likewise.
1605
9ed32e27
AO
16062017-09-20 Alexandre Oliva <aoliva@redhat.com>
1607
1608 * c.opt (gen-decls): Add RejectNegative.
1609
026a79f7
AS
16102017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1611 Jakub Jelinek <jakub@redhat.com>
1612
1613 Add support for -std=c++2a.
1614 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1615 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1616 * c-opts.c (set_std_cxx2a): New.
1617 (c_common_handle_option): Set options when -std=c++2a is enabled.
1618 (c_common_post_options): Adjust comments.
1619 (set_std_cxx14, set_std_cxx17): Likewise.
1620
4a8ca690
EB
16212017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1622
1623 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1624 message for non-uniform endianness and issue a warning in C++.
1625
7b936140
JJ
16262017-09-15 Jakub Jelinek <jakub@redhat.com>
1627
1628 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1629 (Wc++17-compat): Change from undocumented alias to option.
1630 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1631 change C++1z to C++17 in description.
1632 (std=c++1z, std=gnu++1z): Change from option to undocumented
1633 deprecated alias.
1634 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1635 Adjust description.
1636 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1637 * c-opts.c (set_std_cxx1z): Rename to ...
1638 (set_std_cxx17): ... this.
1639 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1640 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1641 caller.
7b936140
JJ
1642 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1643 comments.
1644
12263f13
L
16452017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1646
1647 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1648 function alignment if warn_if_not_aligned_p is true.
1649
6836632e
NS
16502017-09-12 Nathan Sidwell <nathan@acm.org>
1651
1652 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1653 resort_sorted_fields): Move to c/c-decl.c.
1654 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1655 (struct sorted_fields_type): Move to c/c-lang.h.
1656
019bf9ad
JW
16572017-09-09 Jonathan Wakely <jwakely@redhat.com>
1658
1659 PR c++/81852
1660 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1661
bc7fe952
MP
16622017-09-04 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/81783
1665 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1666 (warn_tautological_cmp): Call it.
1667
de7c2c6a
BK
16682017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1669
1670 * c-opts.c (c_common_finish): Write dependency information even if
1671 there are errors.
1672
d2e05fcb
JJ
16732017-09-01 Jakub Jelinek <jakub@redhat.com>
1674
1675 PR c/81887
1676 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1677 (omp_pragmas_simd): ... here.
1678 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1679 create new clauses list containing just simd clause.
1680
18e2a8b8
RS
16812017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1682 Alan Hayward <alan.hayward@arm.com>
1683 David Sherwood <david.sherwood@arm.com>
1684
1685 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1686 into scalar_mode_supported_p call.
1687 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1688
16d22000
RS
16892017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1690 Alan Hayward <alan.hayward@arm.com>
1691 David Sherwood <david.sherwood@arm.com>
1692
1693 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1694 for the mode iterator.
1695
b397965c
RS
16962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1697 Alan Hayward <alan.hayward@arm.com>
1698 David Sherwood <david.sherwood@arm.com>
1699
1700 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1701 * c-common.c (c_build_vec_perm_expr): Likewise.
1702
357b7604
RS
17032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1704 Alan Hayward <alan.hayward@arm.com>
1705 David Sherwood <david.sherwood@arm.com>
1706
1707 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1708
e05c94ba
RS
17092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1710 Alan Hayward <alan.hayward@arm.com>
1711 David Sherwood <david.sherwood@arm.com>
1712
1713 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1714 before calling targetm.addr_space.valid_pointer_mode.
1715
5c20c4af
RS
17162017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1717 Alan Hayward <alan.hayward@arm.com>
1718 David Sherwood <david.sherwood@arm.com>
1719
1720 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1721
c94843d2 17222017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
1723 Alan Hayward <alan.hayward@arm.com>
1724 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
1725
1726 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1727 iterators.
1728 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1729
4e10a5a7
RS
17302017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1731 Alan Hayward <alan.hayward@arm.com>
1732 David Sherwood <david.sherwood@arm.com>
1733
1734 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1735 case statements.
1736
130fcab0
ML
17372017-08-29 Martin Liska <mliska@suse.cz>
1738
1739 PR other/39851
1740 * c-common.c (parse_optimize_options): Add argument to function
1741 call.
1742 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1743
14e18d71
DM
17442017-08-24 David Malcolm <dmalcolm@redhat.com>
1745
1746 * c-lex.c (interpret_float): Use token location
1747 when building an EXCESS_PRECISION_EXPR.
1748
2f687306
DM
17492017-08-21 David Malcolm <dmalcolm@redhat.com>
1750
1751 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1752 it to check_function_format.
1753 * c-common.h (check_function_arguments): Add vec<location_t> *
1754 param.
1755 (check_function_format): Likewise.
1756 * c-format.c (struct format_check_context): Add field "arglocs".
1757 (check_function_format): Add param "arglocs"; pass it to
1758 check_format_info.
1759 (check_format_info): Add param "arglocs"; use it to initialize
1760 new field of format_ctx.
1761 (check_format_arg): Pass format_ctx->arglocs to new param of
1762 check_format_info_main.
1763 (class argument_parser): New field "arglocs".
1764 (argument_parser::argument_parser): Add "arglocs_" param and use
1765 it to initialize new field.
1766 (argument_parser::check_argument_type): Pass new arglocs field to
1767 check_format_types.
1768 (check_format_info_main): Add param "arglocs", and use it when
1769 constructing arg_parser.
1770 (check_format_types): Add param "arglocs"; use it if non-NULL when
1771 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1772
00aa1fa2
L
17732017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1774
1775 PR c/53037
1776 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1777 (c_common_attribute_table): Add warn_if_not_aligned.
1778 (handle_aligned_attribute): Renamed to ...
1779 (common_handle_aligned_attribute): Remove argument, name, and add
1780 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1781 (handle_aligned_attribute): New.
1782 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1783
27be025d
MS
17842017-08-14 Martin Sebor <msebor@redhat.com>
1785
1786 PR c/81117
1787 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1788 (handle_nonstring_attribute): New function.
1789
da67acb9
MS
17902017-08-14 Martin Sebor <msebor@redhat.com>
1791
1792 PR c/81117
1793 * c-format.h (T89_G): New macro.
1794 * c-format.c (local_gcall_ptr_node): New variable.
1795 (init_dynamic_diag_info): Initialize it.
1796
a8b522b4
ML
17972017-08-11 Martin Liska <mliska@suse.cz>
1798
1799 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1800 TARGET_SUPPORTS_ALIASES.
1801
32129a17
DM
18022017-08-10 David Malcolm <dmalcolm@redhat.com>
1803
1804 * c-common.c (c_parse_error): Add rich_location * param, using it
1805 rather implicitly using input_location.
1806 * c-common.h (c_parse_error): Add rich_location * param.
1807
30af3a2b
MP
18082017-08-09 Marek Polacek <polacek@redhat.com>
1809
1810 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1811 (c_common_truthvalue_conversion): Likewise.
1812 * c-omp.c (c_finish_omp_atomic): Likewise.
1813 * c-common.h (build_binary_op): Update declaration.
1814
314e6352
ML
18152017-08-08 Martin Liska <mliska@suse.cz>
1816
1817 * c-ada-spec.c: Include header files.
1818 * c-ubsan.c: Likewise.
1819 * c-warn.c: Likewise.
1820
56b5041c
JJ
18212017-08-07 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c/69389
1824 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1825
db440138
EB
18262017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1827
1828 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1829 (print_ada_methods): Likewise.
1830 (print_ada_declaration): Likewise.
1831
577eec56
ML
18322017-08-07 Martin Liska <mliska@suse.cz>
1833
1834 * array-notation-common.c: Add new includes.
1835 * c-format.c( handle_format_attribute): Canonicalize a format
1836 function name.
1837 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1838 attribute.
1839 * c-pretty-print.c: Add new include.
1840
b854df3c
EB
18412017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1842
1843 * c-ada-spec.c (has_static_fields): Look only into variables.
1844 (print_constructor): Add TYPE parameter and use it for the name.
1845 (print_destructor): Likewise.
1846 (print_ada_declaration): Adjust to new constructor/destructor names.
1847 Adjust calls to print_constructor and print_destructor.
1848 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1849 Look only into variables in the final loop.
1850
9f2cb25e
EB
18512017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1852
1853 * c-ada-spec.c (has_static_fields): Look only into fields.
1854 (dump_generic_ada_node): Small tweak.
1855 (dump_nested_types): Look only into fields.
1856 (print_ada_declaration): Look only into methods. Small tweak.
1857 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1858
f4bcd9eb
EB
18592017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1860
1861 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1862 (dump_ada_function_declaration): Likewise.
1863 (dump_generic_ada_node): Likewise.
1864 (print_ada_declaration): Add support for const-qualified variables.
1865
f34ebeb2
ML
18662017-07-31 Martin Liska <mliska@suse.cz>
1867
1868 PR sanitize/81530
1869 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1870 Guard condition with flag_sanitize_p also with current_function_decl
1871 non-null equality.
1872 (ubsan_maybe_instrument_reference_or_call): Likewise.
1873
218e5d04
UB
18742017-07-30 Uros Bizjak <ubizjak@gmail.com>
1875
1876 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1877
942047f2
EB
18782017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1879
1880 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1881 for enumeral types.
1882 (print_ada_declaration): Add missing guard for record types.
1883
a40ff0ae
JJ
18842017-07-27 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/45784
1887 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1888 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1889 new COMPOUND_EXPRs around the rhs of the comparison.
1890
06bd22f6
MP
18912017-07-27 Marek Polacek <polacek@redhat.com>
1892
1893 PR c/81417
1894 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1895 the types.
1896
036ea399
JJ
18972017-07-27 Jakub Jelinek <jakub@redhat.com>
1898
1899 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1900 (handle_noipa_attribute): New function.
1901
417ca011
TD
19022017-07-07 Torsten Duwe <duwe@suse.de>
1903
1904 * c-attribs.c (c_common_attribute_table): Add entry for
1905 "patchable_function_entry".
1906
5aaa8fb4
NS
19072017-07-20 Nathan Sidwell <nathan@acm.org>
1908
1909 Remove TYPE_METHODS.
1910 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1911 dump_ada_template, print_ada_methods,
1912 print_ada_declaration): Member fns are on TYPE_FIELDS.
1913
ff22eb12
NS
19142017-07-18 Nathan Sidwell <nathan@acm.org>
1915
1916 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1917
eea77d1f
DM
19182017-07-14 David Malcolm <dmalcolm@redhat.com>
1919
1920 * c-common.c (try_to_locate_new_include_insertion_point): New
1921 function.
1922 (per_file_includes_t): New typedef.
1923 (added_includes_t): New typedef.
1924 (added_includes): New variable.
1925 (maybe_add_include_fixit): New function.
1926 * c-common.h (maybe_add_include_fixit): New decl.
1927
281ac396
MS
19282017-07-10 Martin Sebor <msebor@redhat.com>
1929
1930 PR other/81345
1931 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1932
b6f43128
DM
19332017-07-06 David Malcolm <dmalcolm@redhat.com>
1934
1935 * c-common.c (selftest::c_family_tests): New.
1936 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1937 (selftest::c_family_tests): New decl.
1938
efbf55b0
MP
19392017-07-04 Marek Polacek <polacek@redhat.com>
1940
1941 PR c/81231
1942 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1943 types.
1944
6c86bd88
MP
19452017-07-04 Marek Polacek <polacek@redhat.com>
1946
1947 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1948
17a7218b
ML
19492017-06-28 Martin Liska <mliska@suse.cz>
1950
1951 PR ipa/81128
1952 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1953 to a function declaration.
1954
63010089
ML
19552017-06-28 Martin Liska <mliska@suse.cz>
1956
1957 PR driver/79659
1958 * c.opt: Add IntegerRange to various options.
1959
3e2becc4
MP
19602017-06-26 Marek Polacek <polacek@redhat.com>
1961
1962 PR c/80116
1963 * c-common.h (warn_for_multistatement_macros): Declare.
1964 * c-warn.c: Include "c-family/c-indentation.h".
1965 (warn_for_multistatement_macros): New function.
1966 * c.opt (Wmultistatement-macros): New option.
1967 * c-indentation.c (guard_tinfo_to_string): No longer static.
1968 Change the parameter type to "enum rid". Handle RID_SWITCH.
1969 * c-indentation.h (guard_tinfo_to_string): Declare.
1970
2db9b7cd
MG
19712017-06-23 Marc Glisse <marc.glisse@inria.fr>
1972
1973 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1974
c3684b7b
MS
19752017-06-15 Martin Sebor <msebor@redhat.com>
1976
1977 PR c++/80560
1978 * c.opt (-Wclass-memaccess): New option.
1979
e72c4afd
BK
19802017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1981
1982 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1983
8a516588
MP
19842017-06-13 Marek Polacek <polacek@redhat.com>
1985
1986 PR objc/80949
1987 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1988 branches is null.
1989
45b2222a
ML
19902017-06-13 Martin Liska <mliska@suse.cz>
1991
1992 PR sanitize/78204
1993 * c-attribs.c (add_no_sanitize_value): New function.
1994 (handle_no_sanitize_attribute): Likewise.
1995 (handle_no_sanitize_address_attribute): Use the function.
1996 (handle_no_sanitize_thread_attribute): New function.
1997 (handle_no_address_safety_analysis_attribute): Use
1998 add_no_sanitize_value.
1999 (handle_no_sanitize_undefined_attribute): Likewise.
2000 * c-common.h: Declare new functions.
2001 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2002 (ubsan_instrument_shift): Likewise.
2003 (ubsan_instrument_bounds): Likewise.
2004 (ubsan_maybe_instrument_array_ref): Likewise.
2005 (ubsan_maybe_instrument_reference_or_call): Likewise.
2006
a01f151f
JM
20072017-06-11 Jason Merrill <jason@redhat.com>
2008
2009 * c-ada-spec.c, c-pragma.c: Use id_equal.
2010
3de4ac6d
MP
20112017-06-04 Marek Polacek <polacek@redhat.com>
2012
2013 PR c/80919
2014 * c-format.c (matching_type_p): Return false if any of the types
2015 requires structural equality.
2016
2474f48f
MS
20172017-06-02 Martin Sebor <msebor@redhat.com>
2018
2019 PR c/80892
2020 * c-warn.c (conversion_warning): Use -Wconversion for integer
2021 conversion and -Wfloat-conversion for floating one.
2022
40ffd95f
BE
20232017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2024
2025 * c.opt (Wsizeof-pointer-div): New warning option.
2026
3fa4634c
VR
20272017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2028
2029 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2030 (Wcatch-value=1): Enable by -Wall.
2031
f012c8ef
DM
20322017-05-30 David Malcolm <dmalcolm@redhat.com>
2033
2034 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2035 format_chars.
2036 * c.opt (fdiagnostics-show-template-tree): New option.
2037 (felide-type): New option.
2038
63dbcd13
VR
20392017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2040
2041 * c.opt (Wcatch-value=): New C++ warning flag.
2042
be136b5c
NS
20432017-05-24 Nathan Sidwell <nathan@acm.org>
2044
2045 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2046 const casts to avoid warning.
2047
3cd211af
MS
20482017-05-24 Martin Sebor <msebor@redhat.com>
2049
2050 PR c/80731
2051 * c-common.h (unsafe_conversion_p): Add a function argument.
2052 * c-common.c (unsafe_conversion_p): Same.
2053 Add type names and values to diagnostics.
2054 (scalar_to_vector): Adjust.
2055 * c-warn.c (constant_expression_error): Add a function argument.
2056 Add type names and values to diagnostics.
2057 (conversion_warning): Add a function argument.
2058 Add type names and values to diagnostics.
2059 (warnings_for_convert_and_check): Same.
2060
1ff7be5a
JM
20612017-05-19 Jason Merrill <jason@redhat.com>
2062
2063 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2064 enumerators.
2065
ff502317
BE
20662017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2067
2068 * c-format.c (locus): Move out of function scope,
2069 add GTY attribute.
2070
2a8a8d7b
NS
20712017-05-19 Nathan Sidwell <nathan@acm.org>
2072
2073 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2074 (c_common_parse_file): Remove class dump handling.
2075 (get_dump_info): Likewise.
2076
39aac208
RB
20772017-05-19 Richard Biener <rguenther@suse.de>
2078
2079 PR c++/80593
2080 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2081 to alias-set zero memory.
2082
6ecd2339
BE
20832017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2084
2085 * c-format.c (local_tree_type_node): Add GTY attribute.
2086
6574d78e
MP
20872017-05-18 Marek Polacek <polacek@redhat.com>
2088
2089 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2090 (c_common_fixed_point_type_for_size): Likewise.
2091 (c_common_type_for_mode): Likewise.
2092 (shorten_compare): Likewise.
2093 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2094 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2095
e3455240
MP
20962017-05-18 Marek Polacek <polacek@redhat.com>
2097
2098 * c-common.c (self_promoting_args_p): Change the return type to bool.
2099 Use false/true instead of 0/1.
2100 * c-common.h (self_promoting_args_p): Update.
2101
3fa8871b
MP
21022017-05-17 Marek Polacek <polacek@redhat.com>
2103
2104 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2105 * c-warn.c: Likewise.
2106
b42cc3ca
VV
21072017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2108
2109 Implement new C++ intrinsics __is_assignable and __is_constructible.
2110 * c-common.c (__is_assignable, __is_constructible): New.
2111 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2112
1a817418
ML
21132017-05-17 Martin Liska <mliska@suse.cz>
2114
2115 * c-common.h: Introduce dump_flags_t type and
2116 use it instead of int type.
2117 * c-gimplify.c (c_genericize): Likewise.
2118 * c-opts.c: Likewise.
2119
b2fa0a8b
MP
21202017-05-17 Marek Polacek <polacek@redhat.com>
2121
2122 * c-common.c (c_save_expr): Remove.
2123 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2124 * c-common.h (c_save_expr): Remove declaration.
2125
31c2d57d
VR
21262017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2127
2128 PR c/35441
2129 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2130 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2131 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2132 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2133 RDIV_EXPR.
2134 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2135
684f84de
MP
21362017-05-09 Marek Polacek <polacek@redhat.com>
2137
2138 PR c/80525
2139 * c-warn.c (unwrap_c_maybe_const): New.
2140 (warn_logical_operator): Call it.
2141
641da50a
NS
21422017-05-09 Nathan Sidwell <nathan@acm.org>
2143
2144 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2145 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2146
631238ac
MS
21472017-05-08 Martin Sebor <msebor@redhat.com>
2148
2149 PR translation/80280
2150 * c-format.h (struct format_flag_spec): Add new member.
2151 (T89_T): New macro.
2152 * c-format.c (local_tree_type_node): New global.
2153 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2154 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2155 (strfmon_flag_specs): Likewise.
2156 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2157 with distinct quoting properties.
2158 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2159 (flag_chars_t::validate): Add argument and handle bad quoting.
2160 (check_format_info_main): Handle quoting problems.
2161 (init_dynamic_diag_info): Simplify.
2162
49f0c04c
JM
21632017-05-08 Jason Merrill <jason@redhat.com>
2164
2165 * c-opts.c (c_common_post_options): Update defaults for
2166 flag_abi_version and flag_abi_compat_version.
2167
56d35585
DM
21682017-05-05 David Malcolm <dmalcolm@redhat.com>
2169
2170 * c-common.c (c_cpp_error): Replace report_diagnostic
2171 with diagnostic_report_diagnostic.
2172
0f2c4a8f
MS
21732017-05-04 Martin Sebor <msebor@redhat.com>
2174
2175 PR translation/80280
2176 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2177 (handle_weakref_attribute): Same.
2178
6fe63fb4
NS
21792017-05-03 Nathan Sidwell <nathan@acm.org>
2180
2181 Canonicalize canonical type hashing
2182 * c-common.c (complete_array_type): Use type_hash_canon.
2183
815d9cc6
XR
21842017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2185
92a285c1 2186 PR c++/80038
815d9cc6
XR
2187 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2188 prototype.
2189 (cilk_install_body_pedigree_operations): Likewise.
2190 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2191 detatched.
2192 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2193 (cilk_install_body_pedigree_operations): Likewise.
2194 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2195 unwrapping.
2196
f8a36447
JJ
21972017-04-27 Jakub Jelinek <jakub@redhat.com>
2198
2199 PR c++/80534
2200 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2201 flag on non-aggregate element types.
2202
7c145456
BE
22032017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2204
2205 * c-common.c (c_type_hasher, type_hash_table): Remove.
2206 (c_common_get_alias_set): Remove unreachable code.
2207 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2208
c3cbcd45
VR
22092017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2210
2211 * c.opt (Wextra-semi): New C++ warning flag.
2212
8a59d466
JJ
22132017-04-20 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR middle-end/80423
2216 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2217
8487c9a5
JJ
22182017-04-18 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR middle-end/79788
2221 PR middle-end/80375
2222 * c-common.c (c_common_type_for_mode): Don't handle
2223 widest_*_literal_type_node here.
2224 c_common_signed_or_unsigned_type): Likewise.
2225 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2226 to *intTI_type_node or *intDI_type_node depending on whether
2227 TImode is supported by the target or not.
2228
3ee0fb02
ML
22292017-04-10 Martin Liska <mliska@suse.cz>
2230
2231 PR sanitizer/80350
2232 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2233 doing an UBSAN check.
2234
5764ee3c
JW
22352017-04-03 Jonathan Wakely <jwakely@redhat.com>
2236
2237 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2238
6f3af356
JJ
22392017-03-31 Jakub Jelinek <jakub@redhat.com>
2240
2241 PR c++/79572
2242 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2243 tree *.
2244 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2245 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2246 REFERENCE_TYPE.
2247
f6a7a9d5
DM
22482017-03-31 David Malcolm <dmalcolm@redhat.com>
2249
2250 PR documentation/78732
2251 * c.opt (Wendif-labels): Fix description to refer to
2252 #else rather than #elif.
2253
af88f557
JJ
22542017-03-31 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR libstdc++/80251
2257 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2258 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2259
a9e4a1a5
JJ
22602017-03-27 Jakub Jelinek <jakub@redhat.com>
2261
2262 PR middle-end/80162
2263 * c-common.c (c_common_mark_addressable_vec): Don't set
2264 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2265
3f01b620
MS
22662017-03-21 Martin Sebor <msebor@redhat.com>
2267
2268 PR c++/79548
2269 * c-common.c (set_underlying_type): Mark type used only when
2270 original del is declared unused.
2271
2f6f187a
DM
22722017-03-10 David Malcolm <dmalcolm@redhat.com>
2273
2274 PR translation/79848
2275 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2276 "%qs".
2277
a02fa805
DM
22782017-03-10 David Malcolm <dmalcolm@redhat.com>
2279
2280 PR c/79921
2281 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2282 from inform's message, so that xgettext can locate it.
2283
822a132c
MP
22842017-03-09 Marek Polacek <polacek@redhat.com>
2285
2286 PR c++/79962
2287 PR c++/79984
2288 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2289 conversion to the attribute list.
2290
bba81f1c
ML
22912017-03-09 Martin Liska <mliska@suse.cz>
2292
2293 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2294
108154ff
JM
22952017-03-03 Jason Merrill <jason@redhat.com>
2296
2297 * c.opt (Wnoexcept-type): New.
2298
eb0e7c34
RB
22992017-03-02 Richard Biener <rguenther@suse.de>
2300
2301 PR c/79756
2302 * c-common.c (c_common_mark_addressable_vec): Look through
2303 C_MAYBE_CONST_EXPR.
2304
9453ba0a
ML
23052017-02-28 Martin Liska <mliska@suse.cz>
2306
2307 * c.opt: Replace space with tabular for options of <number>
2308 type.
2309
6a825afe
ML
23102017-02-28 Martin Liska <mliska@suse.cz>
2311
2312 * c.opt: Fix --help=option -Q for options which are of
2313 an enum type.
2314
4227c9ad
JJ
23152017-02-24 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c++/79588
2318 * c-common.c (check_function_restrict): New function.
2319 (check_function_arguments): Add FNDECL argument. Call
2320 check_function_restrict if -Wrestrict.
2321 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2322 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2323 * c-common.h (check_function_arguments): Add FNDECL argument.
2324 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2325
59909673
EB
23262017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2327
2328 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2329 treatment of parameters with pointer-to-tagged type and tidy up.
2330 (print_ada_methods): Remove the special treatment of C++ static member
2331 functions.
2332
54dcd526
ML
23332017-02-22 Martin Liska <mliska@suse.cz>
2334
2335 * c.opt: Replace inequality signs with square brackets
2336 for -Wnornalized.
2337
00bc9de3
JJ
23382017-02-21 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR c++/79641
2341 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2342 preserve quals.
2343
97fcf744
JM
23442017-02-17 Joseph Myers <joseph@codesourcery.com>
2345
2346 * c-cppbuiltin.c (builtin_define_float_constants): Define
2347 __DECIMAL_DIG__ to the value for long double.
2348
c7545f1c
MP
23492017-02-15 Marek Polacek <polacek@redhat.com>
2350
2351 PR c/79515
2352 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2353 conversion has occured.
2354
c2e84327
DM
23552017-01-24 David Malcolm <dmalcolm@redhat.com>
2356
2357 * c-common.c (c_common_reswords): Add "__RTL".
2358 * c-common.h (enum rid): Add RID_RTL.
2359
2ebd93e1
MP
23602017-01-20 Marek Polacek <polacek@redhat.com>
2361
2362 PR c/64279
2363 * c-common.h (do_warn_duplicated_branches_r): Declare.
2364 * c-gimplify.c (c_genericize): Walk the function tree calling
2365 do_warn_duplicated_branches_r.
2366 * c-warn.c (expr_from_macro_expansion_r): New.
2367 (do_warn_duplicated_branches): New.
2368 (do_warn_duplicated_branches_r): New.
2369 * c.opt (Wduplicated-branches): New option.
2370
0d80ab91
DM
23712017-01-17 David Malcolm <dmalcolm@redhat.com>
2372
2373 PR c++/71497
2374 * c-indentation.c (warn_for_misleading_indentation): Use the past
2375 subjunctive in the note.
2376
7f991c36
AH
23772017-01-17 Aldy Hernandez <aldyh@redhat.com>
2378
2379 PR c/79116
2380 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2381 start type to integer_type.
2382
1c70261c
JJ
23832017-01-16 Jakub Jelinek <jakub@redhat.com>
2384
2385 PR driver/49726
2386 * c.opt (gen-decls): Add Driver flag.
2387
1ddca3f3
PC
23882017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2389
2390 Revert:
2391 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2392
2393 PR c++/71737
2394 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2395
7d2f3f1d
PC
23962017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2397
2398 PR c++/71737
2399 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2400
bce6f760
MS
24012017-01-12 Martin Sebor <msebor@redhat.com>
2402
2403 (-Wformat-overflow): ...to this.
2404
bf5fbf46
MS
24052017-01-11 Martin Sebor <msebor@redhat.com>
2406
2407 PR c/78768
2408 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2409 Also enable for LTO.
2410
e363df3f
JM
24112017-01-10 Jason Merrill <jason@redhat.com>
2412
2413 Implement P0195R2, C++17 variadic using.
2414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2415
bd2c6270
JJ
24162017-01-09 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR translation/79019
2419 PR translation/79020
2420 * c.opt (Wnormalized=): Fix typo in description.
2421
efcc8d38
MS
24222017-01-08 Martin Sebor <msebor@redhat.com>
2423
2424 PR middle-end/77708
2425 * c.opt (-Wformat-truncation): New option.
2426
435f3f7a
AO
24272017-01-06 Alexandre Oliva <aoliva@redhat.com>
2428
2429 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2430 value to unsigned short to fit in 4 hex digits without
2431 warnings.
2432
4e89adf9
EB
24332017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2434
2435 * c.opt (fsso-struct): Add 'native' value.
2436
cd445b54
ML
24372017-01-05 Martin Liska <mliska@suse.cz>
2438
2439 PR pch/78970
2440 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2441 header.
2442
a9342885
MP
24432017-01-04 Marek Polacek <polacek@redhat.com>
2444
2445 PR c++/64767
2446 * c.opt (Wpointer-compare): New option.
2447
fc73e60c
JJ
24482017-01-04 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR driver/78957
2451 * c.opt (fsso-struct=): Add RejectNegative.
2452
cbe34bb5
JJ
24532017-01-01 Jakub Jelinek <jakub@redhat.com>
2454
2455 Update copyright years.
2456
d4a6c0ea
ML
24572016-12-29 Martin Liska <mliska@suse.cz>
2458
2459 PR c/78933
2460 * c.opt (strong-eval-order): Add RejectNegative keyword.
2461
67a5ad7c
JM
24622016-12-22 Jason Merrill <jason@redhat.com>
2463
2464 Implement P0522R0, matching of template template arguments.
2465 * c-cppbuiltin.c (c_cpp_builtins): Define
2466 __cpp_template_template_args.
2467
0dba7960
JJ
24682016-12-21 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR bootstrap/78817
2471 * c-common.c (struct nonnull_arg_ctx): New type.
2472 (check_function_nonnull): Return bool instead of void. Use
2473 nonnull_arg_ctx as context rather than just location_t.
2474 (check_nonnull_arg): Adjust for the new context type, set
2475 warned_p to true if a warning has been diagnosed.
2476 (check_function_arguments): Return bool instead of void.
2477 * c-common.h (check_function_arguments): Adjust prototype.
2478
31bfc9b9
JM
24792016-12-21 Jason Merrill <jason@redhat.com>
2480
2481 * c.opt (-fnew-ttp-matching): New flag.
2482 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2483
629b3d75
MJ
24842016-12-14 Martin Jambor <mjambor@suse.cz>
2485
2486 * c-omp.c: Include omp-general.h instead of omp-low.h.
2487 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2488 name.
2489
474da67e
MS
24902016-12-14 Martin Sebor <msebor@redhat.com>
2491
2492 PR c/17308
2493 * c-common.c (check_nonnull_arg): Disable when optimization
2494 is enabled.
2495
fe366b87
MP
24962016-12-12 Marek Polacek <polacek@redhat.com>
2497
2498 PR c++/78647
2499 * c-common.c (attribute_fallthrough_p): Return false for
2500 error_mark_node.
2501
8bd9f164
MS
25022016-12-08 Martin Sebor <msebor@redhat.com>
2503
2504 PR c/78284
2505 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2506
060162e0
MS
25072016-12-08 Martin Sebor <msebor@redhat.com>
2508
2509 PR c/78165
92a285c1
ML
2510 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2511 suffix.
060162e0 2512
ee92e7ba
MS
25132016-12-07 Martin Sebor <msebor@redhat.com>
2514
2515 PR c/53562
2516 PR middle-end/77784
2517 PR middle-end/78149
2518 PR middle-end/78138
2519 * c.opt (-Wstringop-overflow): New option.
2520
84b0769e
MO
25212016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2522
2523 * c-attribs.c (asan odr indicator): New attribute.
2524 (handle_asan_odr_indicator_attribute): New function.
2525
7fa6a965
PK
25262016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2527
2528 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2529 ptrdiff_type_node;
2530
56d8ffc1
JG
25312016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2532
2533 * c-common.c (excess_precision_mode_join): New.
2534 (c_ts18661_flt_eval_method): New.
2535 (c_c11_flt_eval_method): Likewise.
2536 (c_flt_eval_method): Likewise.
2537 * c-common.h (excess_precision_mode_join): New.
2538 (c_flt_eval_method): Likewise.
2539 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2540 (cpp_iec_559_value): Call it.
2541 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2542 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2543 __FLT_EVAL_METHOD_TS_18661_3__.
2544
04f0fcf7
JG
25452016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2546
2547 * c-opts.c (c_common_post_options): Add logic to handle the default
2548 case for -fpermitted-flt-eval-methods.
2549
fb2675cb
PB
25502016-11-23 Paolo Bonzini <bonzini@gnu.org>
2551
2552 * c.opt (Wexpansion-to-defined): New.
2553
ec1c5694
JJ
25542016-11-23 Jakub Jelinek <jakub@redhat.com>
2555
2556 PR target/78451
2557 * c-pragma.c (handle_pragma_target): Don't replace
2558 current_target_pragma, but chainon the new args to the current one.
2559
730c9e75
NS
25602016-11-22 Nathan Sidwell <nathan@acm.org>
2561
2562 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2563 indentation and formatting.
730c9e75 2564
89990732
MS
25652016-11-21 Martin Sebor <msebor@redhat.com>
2566
2567 * c.opt (-fprintf-return-value): Enable by default.
2568
48330c93
BE
25692016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2570
2571 PR c++/71973
2572 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2573 * c-common.c (c_common_nodes_and_builtins): Initialize
2574 const_tm_ptr_type_node.
2575
0d939c95
MP
25762016-11-16 Marek Polacek <polacek@redhat.com>
2577
2578 PR c/78285
2579 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2580
8e745a17
JJ
25812016-11-14 Jakub Jelinek <jakub@redhat.com>
2582
2583 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2584
1ee62b92 25852016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2586 Richard Biener <rguenther@suse.de>
2587
2588 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2589 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2590 * c.opt (fgimple): New option.
1ee62b92 2591
22b15758
UB
25922016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2593
2594 PR c/35503
2595 * c-common.h (warn_for_restrict): Declare.
2596 * c-warn.c: Include gcc-rich-location.h.
2597 (warn_for_restrict): New function.
2598 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2599 (gcc_cdiag_char_table): Likewise.
2600 (gcc_cxxdiag_char_table): Likewise.
2601 * c.opt (Wrestrict): New option.
2602
4be719cd
EB
26032016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2604
2605 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2606 for nested types only if the type is a record or union and dump SLOC.
2607
4a826ca6
JM
26082016-11-09 Jason Merrill <jason@redhat.com>
2609
2610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2611
2e955d50
JJ
26122016-11-09 Jakub Jelinek <jakub@redhat.com>
2613
2614 * c-ubsan.c (ubsan_instrument_shift): Handle split
2615 -fsanitize=shift-base and -fsanitize=shift-exponent.
2616
51dc6603
JM
26172016-11-07 Jason Merrill <jason@redhat.com>
2618
2619 * c.opt (Wc++1z-compat): New.
2620 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2621
6dc4a604
ML
26222016-11-07 Martin Liska <mliska@suse.cz>
2623
2624 * c-warn.c (warn_for_unused_label): Save all labels used
2625 in goto or in &label.
2626
b302001e
JM
26272016-11-03 Jason Merrill <jason@redhat.com>
2628
2629 * c-cppbuiltin.c (c_cpp_builtins): Correct
2630 __cpp_inheriting_constructors.
2631
31f7f784
JM
26322016-11-01 Jason Merrill <jason@redhat.com>
2633
2bc78e3c
JM
2634 * c-cppbuiltin.c (c_cpp_builtins): Update
2635 __cpp_inheriting_constructors.
2636
31f7f784
JM
2637 * c.opt (-fnew-inheriting-ctors): New.
2638 * c-opts.c: Default to on for ABI 11+.
2639
dcb466ec
JJ
26402016-10-31 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c++/77948
2643 * c.opt (fext-numeric-literals): Add Var and Init.
2644 * c-opts.c (c_common_handle_option): Don't clear
2645 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2646 (c_common_post_options): Clear it here if not set
2647 explicitly.
2648
52e1b91e
AH
26492016-10-28 Aldy Hernandez <aldyh@redhat.com>
2650
2651 PR debug/77773
2652 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2653 if NULL.
2654
e16f1cc7
JJ
26552016-10-25 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2658 * c-common.c (c_common_reswords): Add __builtin_launder.
2659
f8348061
BE
26602016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2661
2662 * c-common.c (c_common_truthvalue_conversion): Warn for
2663 multiplications in boolean context. Fix the quoting of '<<' and '<'
2664 in the shift warning.
2665
eff89e01
BE
26662016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2667
2668 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2669
24bc7bf4
JM
26702016-10-20 Jason Merrill <jason@redhat.com>
2671
2672 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2673
4c712374
BE
26742016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2675
2676 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2677 integer shift ops in boolean context.
2678
26792016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2680
2681 * c.opt (Walloca): New.
2682 (Walloca-larger-than=): New.
2683 (Wvla-larger-than=): New.
2684
8fa18c06
MP
26852016-10-17 Marek Polacek <polacek@redhat.com>
2686
2687 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2688 Return immediately when finding a match.
2689 (warn_tautological_cmp): Remove a boolean variable that is no longer
2690 needed.
2691
b12b1915
MP
26922016-10-17 Marek Polacek <polacek@redhat.com>
2693
2694 * c-attribs.c: New file.
2695 * c-common.c: Move attributes handling to c-attribs.c.
2696 (get_nonnull_operand): No longer static.
2697 * c-common.h: Move the declarations from c-attribs.c to its own section.
2698
2045acd9
JM
26992016-10-14 Jason Merrill <jason@redhat.com>
2700
2701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2702 and __cpp_deduction_guides.
2703
14a2c9aa
JM
27042016-10-13 Jason Merrill <jason@redhat.com>
2705
2706 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2707
4d0cdd0c
TP
27082016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2709
2710 * c-cppbuiltin.c: Include memmodel.h.
2711 * c-opts.c: Likewise.
2712 * c-pragma.c: Likewise.
2713 * c-warn.c: Likewise.
2714
70f6d5e1
JJ
27152016-10-12 Jakub Jelinek <jakub@redhat.com>
2716
2717 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2718 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2719 * c-opts.c (sanitize_cpp_opts): Initialize
2720 cpp_opts->cpp_warn_implicit_fallthrough.
2721
78f61294
MP
27222016-10-11 Marek Polacek <polacek@redhat.com>
2723
2724 * c-common.c (warning_candidate_p): Change the return type to bool
2725 and return true/false instead of 1/0.
2726 (vector_mode_valid_p): Likewise.
2727
038b5cc0
MP
27282016-10-11 Marek Polacek <polacek@redhat.com>
2729
2730 * c-common.c (fold_for_warn): No longer static.
2731 (bool_promoted_to_int_p): Likewise.
2732 (c_common_get_narrower): Likewise.
2733 (constant_expression_warning): Move to c-warn.c.
2734 (constant_expression_error): Likewise.
2735 (overflow_warning): Likewise.
2736 (warn_logical_operator): Likewise.
2737 (find_array_ref_with_const_idx_r): Likewise.
2738 (warn_tautological_cmp): Likewise.
2739 (expr_has_boolean_operands_p): Likewise.
2740 (warn_logical_not_parentheses): Likewise.
2741 (warn_if_unused_value): Likewise.
2742 (strict_aliasing_warning): Likewise.
2743 (sizeof_pointer_memaccess_warning): Likewise.
2744 (check_main_parameter_types): Likewise.
2745 (conversion_warning): Likewise.
2746 (warnings_for_convert_and_check): Likewise.
2747 (match_case_to_enum_1): Likewise.
2748 (match_case_to_enum): Likewise.
2749 (c_do_switch_warnings): Likewise.
2750 (warn_for_omitted_condop): Likewise.
2751 (readonly_error): Likewise.
2752 (lvalue_error): Likewise.
2753 (invalid_indirection_error): Likewise.
2754 (warn_array_subscript_with_type_char): Likewise.
2755 (warn_about_parentheses): Likewise.
2756 (warn_for_unused_label): Likewise.
2757 (warn_for_div_by_zero): Likewise.
2758 (warn_for_memset): Likewise.
2759 (warn_for_sign_compare): Likewise.
2760 (do_warn_double_promotion): Likewise.
2761 (do_warn_unused_parameter): Likewise.
2762 (record_locally_defined_typedef): Likewise.
2763 (maybe_record_typedef_use): Likewise.
2764 (maybe_warn_unused_local_typedefs): Likewise.
2765 (maybe_warn_bool_compare): Likewise.
2766 (maybe_warn_shift_overflow): Likewise.
2767 (warn_duplicated_cond_add_or_warn): Likewise.
2768 (diagnose_mismatched_attributes): Likewise.
2769 * c-common.h: Move the declarations from c-warn.c to its own section.
2770 * c-warn.c: New file.
2771
627be19f
JM
27722016-10-08 Jason Merrill <jason@redhat.com>
2773
2774 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2775 into COND_EXPR in C++.
2776
7bad794a
JJ
27772016-10-08 Jakub Jelinek <jakub@redhat.com>
2778
2779 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2780 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2781 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2782
be845b04
JJ
27832016-10-07 Jakub Jelinek <jakub@redhat.com>
2784
2785 Implement LWG2296 helper intrinsic
2786 * c-common.h (enum rid): Add RID_ADDRESSOF.
2787 * c-common.c (c_common_reswords): Add __builtin_addressof.
2788
c09c4992
BE
27892016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2790
2791 PR c++/77700
2792 * c-common.c (c_common_truthvalue_conversion): Warn also for
2793 suspicious enum values in boolean context.
2794
342cfb3e
JJ
27952016-10-06 Jakub Jelinek <jakub@redhat.com>
2796
2797 Implement P0258R2 - helper for C++17
2798 std::has_unique_object_representations trait
2799 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2800 * c-common.c (c_common_reswords): Add
2801 __has_unique_object_representations.
2802
2e69f143
JJ
28032016-10-05 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR sanitizer/66343
2806 * c-ubsan.c (ubsan_instrument_return): Don't call
2807 initialize_sanitizer_builtins here.
2808
700fff34
BE
28092016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2810
2811 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2812 conditional expression in boolean context when only one arm is
2813 non-boolean.
2814
9563bfcd
JJ
28152016-10-05 Jakub Jelinek <jakub@redhat.com>
2816
04a32443
JJ
2817 PR sanitizer/77823
2818 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2819 is not integral.
2820
9563bfcd
JJ
2821 * c-common.c (c_common_reswords): Update comment for C++11.
2822
f1644724
JM
28232016-10-04 Jason Merrill <jason@redhat.com>
2824
2825 * c-common.c (make_tree_vector_from_ctor): New.
2826 * c-common.h: Declare it.
2827
5a79befb
JJ
28282016-10-04 Jakub Jelinek <jakub@redhat.com>
2829
2830 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2831 __LIBGCC_JCR_SECTION_NAME__.
2832
1633d3b9
BE
28332016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2834
2835 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2836 left shift in boolean context.
2837
a2c6e7f2
JJ
28382016-09-29 Jakub Jelinek <jakub@redhat.com>
2839
2840 Implement P0001R1 - C++17 removal of register storage class specifier
2841 * c.opt (Wregister): New warning.
2842 * c-opts.c (c_common_post_options): Enable -Wregister by
2843 default for C++17.
2844
75304c87
JG
28452016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2846
2847 * c-opts.c (c_common_post_options): Remove special case for
2848 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2849 in C++.
2850
bbfac6da
JJ
28512016-09-27 Jakub Jelinek <jakub@redhat.com>
2852
6e39060a
JJ
2853 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2854 -std=c++1z.
2855
bbfac6da
JJ
2856 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2857
e73cf9a2
TP
28582016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2859
2860 * c-common.c: Include memmodel.h.
2861
c6147dc4
MP
28622016-09-26 Marek Polacek <polacek@redhat.com>
2863
2864 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2865
81fea426
MP
28662016-09-26 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/7652
2869 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2870 (handle_fallthrough_attribute): New function.
2871 (attribute_fallthrough_p): New function.
2872 * c-common.h (attribute_fallthrough_p): Declare.
2873
9a2300e9
MP
28742016-09-24 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/77490
2877 * c.opt (Wbool-operation): New.
2878
a09e9e35
BE
28792016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2880
2881 * c-common.c (c_common_truthvalue_conversion): Inhibit
2882 Wint-in-bool-context warning with from_macro_definition_at.
2883 Mention the expression will always evaluate to true.
2884
d43b4ccc
MS
28852016-09-21 Martin Sebor <msebor@redhat.com>
2886
2887 PR bootstrap/77676
2888 * c.opt (fprintf-return-value): Temporarily initialize to zero
2889 to unblock bootstrap failures.
2890
2e1c20b1
JJ
28912016-09-21 Jakub Jelinek <jakub@redhat.com>
2892
2893 PR c++/77651
2894 * c.opt (Waligned-new=): Add RejectNegative.
2895 (faligned-new=): Likewise. Spelling fix - change
2896 aligned_new_threshhold to aligned_new_threshold.
2897 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2898 to aligned_new_threshold.
2899
88d0c3f0
MS
29002016-09-20 Martin Sebor <msebor@redhat.com>
2901
2902 PR middle-end/49905
2903 * c.opt: Add -Wformat-length and -fprintf-return-value.
2904
144a96e4
BE
29052016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2906
2907 PR c++/77434
2908 * c.opt (Wint-in-bool-context): New warning.
2909 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2910 constants in boolean context.
2911
63012d9a
JM
29122016-09-19 Joseph Myers <joseph@codesourcery.com>
2913
2914 * c-common.c (max_align_t_align): Also consider alignment of
2915 float128_type_node.
2916
931388ce
JM
29172016-09-15 Jason Merrill <jason@redhat.com>
2918
2919 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2920 DECL_EXTERNAL.
2921
38711381
JM
29222016-09-14 Jason Merrill <jason@redhat.com>
2923
2924 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2925 limit FIELD_DECL, either.
2926
e51fbec3
MP
29272016-09-14 Marek Polacek <polacek@redhat.com>
2928
2929 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2930 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2931 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2932
254830ba
DM
29332016-09-13 David Malcolm <dmalcolm@redhat.com>
2934
2935 * c-common.c (warn_logical_not_parentheses): Replace
2936 rich_location::add_fixit_insert calls with add_fixit_insert_before
2937 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2938
42763690
JM
29392016-09-13 Jason Merrill <jason@redhat.com>
2940 Tom de Vries <tom@codesourcery.com>
2941
2942 PR c++/77427
2943 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2944
9453eee9
JM
29452016-09-13 Jason Merrill <jason@redhat.com>
2946
2947 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2948 limit types at all.
2949
e96809e3
JM
29502016-09-12 Jason Merrill <jason@redhat.com>
2951
2952 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2953 bit/byte confusion, allow large alignment for types.
2954
54dcdb88
BE
29552016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2956
2957 PR c++/77496
2958 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2959
d1463eb9
DM
29602016-09-12 David Malcolm <dmalcolm@redhat.com>
2961
2962 PR c/72858
2963 * c-format.c (argument_parser::check_argument_type): Add params
2964 "type_start" and "conversion_char". Use the former to generate
2965 offset_to_type_start and pass it and conversion_char to
2966 check_format_types.
2967 (check_format_info_main): Capture the start of the type
2968 information as "type_start", and pass it an format_char
2969 to arg_parser.check_argument_type.
2970 (check_format_types): Provide an example in the leading comment.
2971 Add params "offset_to_type_start" and "conversion_char"; pass
2972 them to format_type_warning calls.
2973 (test_get_modifier_for_format_len): Likewise.
2974 (matching_type_p): New function.
2975 (get_format_for_type): Add param "conversion_char" and move
2976 implementation into...
2977 (get_format_for_type_1): ...new function, called twice.
2978 Use new function matching_type_p rather than checking for
2979 TYPE_CANONICAL equality.
2980 (get_corrected_substring): New function.
2981 (format_type_warning): Provide an example in the leading comment.
2982 Add params "offset_to_type_start" and "conversion_char". Replace
2983 call to get_format_for_type with call to get_corrected_substring
2984 and move rejection of hints for widths/precisions there.
2985 (assert_format_for_type_streq): Add param "conversion_char".
2986 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2987 (test_get_format_for_type_printf): Add conversion chars to the
2988 tests, adding coverage for various combinations of integer
2989 vs double conversions, and for preserving octal and hexadecimal
2990 conversions.
2991 (test_get_format_for_type_scanf): Add conversion chars to the
2992 tests.
2993
5b28efbb
TV
29942016-09-10 Tom de Vries <tom@codesourcery.com>
2995
2996 PR C/71602
2997 * c-common.c (build_va_arg): Handle more strict
2998 targetm.canonical_va_list_type. Replace first argument type error with
2999 assert.
3000
3f0177e7
MS
30012016-09-09 Martin Sebor <msebor@redhat.com>
3002
3003 PR c/77520
3004 PR c/77521
3005 * c-format.c (argument_parser::find_format_char_info): Use %qc
3006 format directive unconditionally.
3007
af63ba4b
JM
30082016-09-09 Jason Merrill <jason@redhat.com>
3009
3010 Implement C++17 new of over-aligned types.
3011 * c.opt: Add -faligned-new and -Waligned-new.
3012 * c-common.c (max_align_t_align): Split out from...
3013 (cxx_fundamental_alignment_p): ...here.
3014 * c-common.h: Declare it.
3015 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3016
c65248cb
JM
30172016-09-09 Joseph Myers <joseph@codesourcery.com>
3018
3019 * c-cppbuiltin.c (builtin_define_type_width): New function.
3020 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3021 macros.
3022
e5106e27
DM
30232016-09-07 David Malcolm <dmalcolm@redhat.com>
3024
3025 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3026 a POINTER_TYPE.
3027 (substring_loc::get_location): Move to substring-locations.c,
3028 keeping implementation as...
3029 (c_get_substring_location): New function, from the above, reworked
3030 to use accessors rather than member lookup.
3031 * c-common.h (class substring_loc): Move to substring-locations.h,
3032 replacing with a forward decl.
3033 (c_get_substring_location): New decl.
3034 * c-format.c: Include "substring-locations.h".
3035 (format_warning_va): Move to substring-locations.c.
3036 (format_warning_at_substring): Likewise.
3037
a42e7952
MS
30382016-09-06 Martin Sebor <msebor@redhat.com>
3039
3040 PR c/77336
3041 * c-format.c (check_function_format): Avoid issuing warnings for
3042 functions unless they call format functions with non-constant
3043 format strings.
3044
b772a565
RB
30452016-09-06 Richard Biener <rguenther@suse.de>
3046
3047 PR c/77450
3048 * c-common.c (c_common_mark_addressable_vec): Handle
3049 COMPOUND_LITERAL_EXPR.
3050
25ff5dd3
MP
30512016-09-05 Marek Polacek <polacek@redhat.com>
3052
3053 PR c/77423
3054 * c-common.c (bool_promoted_to_int_p): New function.
3055 (expr_has_boolean_operands_p): New function.
3056 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3057 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3058
21234eb5
TV
30592016-09-04 Tom de Vries <tom@codesourcery.com>
3060
3061 revert:
3062 2016-08-29 Tom de Vries <tom@codesourcery.com>
3063
3064 * c-common.c (build_va_arg): Replace first argument type error
3065 with assert.
3066
9dc5773f
JJ
30672016-09-02 Jakub Jelinek <jakub@redhat.com>
3068
3069 PR c/65467
3070 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3071 (c_finish_omp_for): Reject _Atomic qualified iterators.
3072
30732016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3074
3075 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3076 size to guarantee it fits the output of the formatted function
3077 regardless of its arguments.
3078
295844f6
MP
30792016-09-01 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/7652
3082 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3083 FALLTHRU comments.
3084
3d06b6f2
MP
30852016-08-29 Marek Polacek <polacek@redhat.com>
3086
3087 PR c/77292
3088 * c-common.c (warn_logical_not_parentheses): Don't warn for
3089 a comparison or a logical operator.
3090
34cedad5
TV
30912016-08-29 Tom de Vries <tom@codesourcery.com>
3092
3093 * c-common.c (build_va_arg): Fix type comparison assert.
3094
f162d717
TV
30952016-08-29 Tom de Vries <tom@codesourcery.com>
3096
3097 * c-common.c (build_va_arg): Replace first argument type error
3098 with assert.
3099
ba9bbd6f
TV
31002016-08-29 Tom de Vries <tom@codesourcery.com>
3101
3102 PR c/77398
3103 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3104 with error_mark_node as va_list instead of with illegal va_list.
3105
ebef225f
MP
31062016-08-25 Marek Polacek <polacek@redhat.com>
3107 David Malcolm <dmalcolm@redhat.com>
3108
3109 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3110 * c-common.h (warn_logical_not_parentheses): Update declaration.
3111
b00e6e75
MP
31122016-08-22 Marek Polacek <polacek@redhat.com>
3113
3114 PR c++/77321
3115 * c-common.c (warn_for_memset): Check type for null.
3116
6dc198e3
JM
31172016-08-22 Joseph Myers <joseph@codesourcery.com>
3118
14ec014e 3119 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3120 _FloatNx types for suffixes for built-in functions.
3121
c65699ef
JM
31222016-08-19 Joseph Myers <joseph@codesourcery.com>
3123
3124 PR c/32187
3125 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3126 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3127 (RID_FLOAT128X): New enum rid values.
3128 (CASE_RID_FLOATN_NX): New macro.
3129 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3130 keywords.
3131 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3132 corresponding complex types.
3133 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3134 _FloatNx and corresponding complex types.
3135 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3136 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3137 and _FloatNx types for the widest type for determining
3138 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3139 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3140 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3141 and _FloatNx types.
3142 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3143 constants.
3144 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3145 _FloatNx types.
3146
cc015f3a
DM
31472016-08-18 David Malcolm <dmalcolm@redhat.com>
3148
3149 * c-opts.c (c_diagnostic_finalizer): Update for change to
3150 diagnostic_show_locus.
3151
cb18fd07
DM
31522016-08-18 David Malcolm <dmalcolm@redhat.com>
3153
3154 * c-common.c: Include "spellcheck.h".
3155 (cb_get_suggestion): New function.
3156 * c-common.h (cb_get_suggestion): New decl.
3157 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3158 cb_get_suggestion.
3159
a76989dc
MP
31602016-08-18 Marek Polacek <polacek@redhat.com>
3161
3162 PR c/71514
3163 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3164 and pointer-to-VLA.
3165
65e736c0
DM
31662016-08-16 David Malcolm <dmalcolm@redhat.com>
3167
3168 PR c/72857
3169 * c-common.c (substring_loc::get_range): Rename to...
3170 (substring_loc::get_location): ...this, converting param from a
3171 source_range * to a location_t *. Call
3172 get_source_location_for_substring rather than
3173 get_source_range_for_substring, and pass in m_caret_idx.
3174 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3175 (substring_loc::get_range): Replace with...
3176 (substring_loc::get_location): ...this.
3177 (substring_loc::set_caret_index): New method.
3178 (substring_loc): Add field m_caret_idx.
3179 * c-format.c (format_warning_va): Update for above changes.
3180 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3181 clashing with type name.
3182 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3183 (check_argument_type): Likewise.
3184 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3185 Use a copy when emitting warnings, setting the caret index from TYPE.
3186
7e1dde14 31872016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3188 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3189
3190 * c-ada-spec.c (dump_number): New function.
3191 (handle_escape_character): Likewise.
3192 (print_ada_macros): Add handling of constant integers and strings.
3193
191816a3
MP
31942016-08-12 Marek Polacek <polacek@redhat.com>
3195
3196 PR c/7652
3197 * c-common.c (scalar_to_vector): Adjust fall through comment.
3198 * c-opts.c (c_common_handle_option): Likewise.
3199 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3200 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3201 fall through comment.
3202 * cilk.c (extract_free_variables): Add FALLTHRU.
3203
452df4a4
JM
32042016-08-10 Jason Merrill <jason@redhat.com>
3205
3206 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3207
f3365c12
JM
32082016-08-09 Jason Merrill <jason@redhat.com>
3209
3210 * c-common.c (c_common_attribute_table): vector_size affects type
3211 identity.
3212
f0bc3323
MP
32132016-08-09 Marek Polacek <polacek@redhat.com>
3214
3215 PR c/7652
3216 * c-ada-spec.c (dump_generic_ada_node): Add return.
3217
98e5a19a
JM
32182016-08-09 Jason Merrill <jason@redhat.com>
3219
3220 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3221 C++17 constexpr lambdas.
3222
895aa8e1
DM
32232016-08-08 David Malcolm <dmalcolm@redhat.com>
3224
3225 PR c/64955
3226 * c-common.h (selftest::c_format_c_tests): New declaration.
3227 (selftest::run_c_tests): New declaration.
3228 * c-format.c: Include "selftest.h.
3229 (format_warning_va): Add param "corrected_substring" and use
3230 it to add a replacement fix-it hint.
3231 (format_warning_at_substring): Likewise.
3232 (format_warning_at_char): Update for new param of
3233 format_warning_va.
3234 (argument_parser::check_argument_type): Pass "fki" to
3235 check_format_types.
3236 (check_format_types): Add param "fki" and pass it to
3237 format_type_warning.
3238 (deref_n_times): New function.
3239 (get_modifier_for_format_len): New function.
3240 (selftest::test_get_modifier_for_format_len): New function.
3241 (get_format_for_type): New function.
3242 (format_type_warning): Add param "fki" and use it to attempt
3243 to provide hints for argument types when calling
3244 format_warning_at_substring.
3245 (selftest::get_info): New function.
3246 (selftest::assert_format_for_type_streq): New function.
3247 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3248 (selftest::test_get_format_for_type_printf): New function.
3249 (selftest::test_get_format_for_type_scanf): New function.
3250 (selftest::c_format_c_tests): New function.
3251
e52ed3fe
DM
32522016-08-08 David Malcolm <dmalcolm@redhat.com>
3253
3254 PR c/52952
3255 * c-format.c: Include "diagnostic.h".
3256 (location_column_from_byte_offset): Delete.
3257 (location_from_offset): Delete.
3258 (format_warning_va): New function.
3259 (format_warning_at_substring): New function.
3260 (format_warning_at_char): New function.
3261 (check_format_arg): Capture location of format_tree and pass to
3262 check_format_info_main.
3263 (argument_parser): Add fields "start_of_this_format" and
3264 "format_string_cst".
3265 (flag_chars_t::validate): Add param "format_string_cst". Convert
3266 warning_at call using location_from_offset to call to
3267 format_warning_at_char.
3268 (argument_parser::argument_parser): Add param "format_string_cst_"
3269 and use use it to initialize field "format_string_cst".
3270 Initialize new field "start_of_this_format".
3271 (argument_parser::read_format_flags): Convert warning_at call
3272 using location_from_offset to a call to format_warning_at_char.
3273 (argument_parser::read_any_format_left_precision): Likewise.
3274 (argument_parser::read_any_format_precision): Likewise.
3275 (argument_parser::read_any_other_modifier): Likewise.
3276 (argument_parser::find_format_char_info): Likewise, in three places.
3277 (argument_parser::parse_any_scan_set): Likewise, in one place.
3278 (argument_parser::handle_conversions): Likewise, in two places.
3279 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3280 and use it to make a substring_loc. Pass the latter to
3281 check_format_types.
3282 (check_format_info_main): Add params "fmt_param_loc" and
3283 "format_string_cst". Convert warning_at calls using
3284 location_from_offset to calls to format_warning_at_char. Pass the
3285 new params to the arg_parser ctor. Pass "format_string_cst" to
3286 flag_chars.validate. Pass "fmt_param_loc" to
3287 arg_parser.check_argument_type.
3288 (check_format_types): Convert first param from a location_t
3289 to a const substring_loc & and rename to "fmt_loc". Attempt
3290 to extract the range of the relevant parameter and pass it
3291 to format_type_warning.
3292 (format_type_warning): Convert first param from a location_t
3293 to a const substring_loc & and rename to "fmt_loc". Add
3294 params "param_range" and "type". Replace calls to warning_at
3295 with calls to format_warning_at_substring.
3296
1c4d457e
DM
32972016-08-08 David Malcolm <dmalcolm@redhat.com>
3298
3299 * c-format.c (class flag_chars_t): New class.
3300 (struct length_modifier): New struct.
3301 (class argument_parser): New class.
3302 (flag_chars_t::flag_chars_t): New ctor.
3303 (flag_chars_t::has_char_p): New method.
3304 (flag_chars_t::add_char): New method.
3305 (flag_chars_t::validate): New method.
3306 (flag_chars_t::get_alloc_flag): New method.
3307 (flag_chars_t::assignment_suppression_p): New method.
3308 (argument_parser::argument_parser): New ctor.
3309 (argument_parser::read_any_dollar): New method.
3310 (argument_parser::read_format_flags): New method.
3311 (argument_parser::read_any_format_width): New method.
3312 (argument_parser::read_any_format_left_precision): New method.
3313 (argument_parser::read_any_format_precision): New method.
3314 (argument_parser::handle_alloc_chars): New method.
3315 (argument_parser::read_any_length_modifier): New method.
3316 (argument_parser::read_any_other_modifier): New method.
3317 (argument_parser::find_format_char_info): New method.
3318 (argument_parser::validate_flag_pairs): New method.
3319 (argument_parser::give_y2k_warnings): New method.
3320 (argument_parser::parse_any_scan_set): New method.
3321 (argument_parser::handle_conversions): New method.
3322 (argument_parser::check_argument_type): New method.
3323 (check_format_info_main): Introduce classes argument_parser
3324 and flag_chars_t, moving the code within the loop into methods
3325 of these classes. Make various locals "const".
3326
88fa5555
DM
33272016-08-05 David Malcolm <dmalcolm@redhat.com>
3328
3329 * c-common.c: Include "substring-locations.h".
3330 (get_cpp_ttype_from_string_type): New function.
3331 (g_string_concat_db): New global.
3332 (substring_loc::get_range): New method.
3333 * c-common.h (g_string_concat_db): New declaration.
3334 (class substring_loc): New class.
3335 * c-lex.c (lex_string): When concatenating strings, capture the
3336 locations of all tokens using a new obstack, and record the
3337 concatenation locations within g_string_concat_db.
3338 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3339 on the ggc-heap.
3340
78169471
MP
33412016-07-29 Marek Polacek <polacek@redhat.com>
3342
638fc14f
MP
3343 PR c/71926
3344 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3345 parentheses warning.
3346
78169471
MP
3347 PR c/71574
3348 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3349
1225d6b1
ML
33502016-07-28 Martin Liska <mliska@suse.cz>
3351
3352 PR gcov-profile/68025
3353 * c-common.c (handle_no_profile_instrument_function_attribute):
3354
ec1e2a40
BE
33552016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3356
3357 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3358 BITS_PER_UNIT_LOG.
3359
5ec2cd9f
JM
33602016-07-25 Jason Merrill <jason@redhat.com>
3361
3362 PR c++/65970
3363 * c.opt (fconstexpr-loop-limit): New.
3364
9dc5773f 33652016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3366
3367 PR c++/71675
3368 * c-common.c (resolve_overloaded_builtin): Avoid converting
3369 __atomic_compare_exchange_n return type to that of what its
3370 first argument points to.
3371
e3fe09c1
UB
33722016-07-22 Uros Bizjak <ubizjak@gmail.com>
3373
3374 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3375 ~(unsigned HOST_WIDE_INT) 0.
3376
bc91c436
ML
33772016-07-22 Martin Liska <mliska@suse.cz>
3378
3379 PR gcov-profile/69028
3380 PR gcov-profile/62047
3381 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3382 to the current_function_decl.
3383
451dcc66
JM
33842016-07-21 Jason Merrill <jason@redhat.com>
3385
3386 PR c++/65168
3387 * c-common.c (c_common_truthvalue_conversion): Check
3388 c_inhibit_evaluation_warnings for warning about address of
3389 reference.
3390
de6a69ee
DM
33912016-07-20 David Malcolm <dmalcolm@redhat.com>
3392
3393 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3394 const char *.
3395
d022c55a
JM
33962016-07-15 Jason Merrill <jason@redhat.com>
3397
3398 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3399
ddbbcb19
JJ
34002016-07-15 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c/71858
3403 * c-common.h (enum lookup_name_fuzzy_kind): Add
3404 FUZZY_LOOKUP_FUNCTION_NAME.
3405
d0cf395a
JM
34062016-07-08 Jason Merrill <jason@redhat.com>
3407
3408 P0145: Refining Expression Order for C++.
3409 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3410 * c-opts.c: Adjust.
3411
98d44e93
MT
34122016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3413
3414 PR c++/71214
3415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3416
f9d8d994
TS
34172016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3418
3419 * c-pragma.h (enum pragma_kind): Rename
3420 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3421 users.
3422
4aa83879
RB
34232016-06-29 Richard Biener <rguenther@suse.de>
3424
3425 PR middle-end/71002
3426 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3427
a25bd9e6
JM
34282016-06-24 Jason Merrill <jason@redhat.com>
3429
3430 P0145R2: Refining Expression Order for C++.
3431 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3432 MODIFY_EXPR.
3433
a86451b9
JJ
34342016-06-24 Jakub Jelinek <jakub@redhat.com>
3435
3436 * c-common.c (check_builtin_function_arguments): Require last
3437 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3438 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3439 if the last argument is pointer to enumerated or boolean type.
3440
1a4f11c8
DM
34412016-06-22 David Malcolm <dmalcolm@redhat.com>
3442
3443 PR c/70339
3444 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3445 (lookup_name_fuzzy): New prototype.
3446
fe55692c
JDA
34472016-06-21 John David Anglin <danglin@gcc.gnu.org>
3448
3449 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3450
4eb24e01
JM
34512016-06-14 Jason Merrill <jason@redhat.com>
3452
3453 P0145R2: Refining Expression Order for C++.
3454 * c.opt (fargs-in-order): New.
3455 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3456
ef7cf206
JJ
34572016-06-13 Jakub Jelinek <jakub@redhat.com>
3458
0dda258b
JJ
3459 PR sanitizer/71498
3460 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3461 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3462
ef7cf206
JJ
3463 PR preprocessor/71183
3464 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3465 to cb_get_source_date_epoch.
3466
50b15873
JJ
34672016-06-10 Jakub Jelinek <jakub@redhat.com>
3468
3469 PR c/68657
3470 * c.opt (Wpsabi): Add Warning flag.
3471
4d926e34
MS
34722016-06-10 Martin Sebor <msebor@redhat.com>
3473
3474 PR c/71392
14ec014e 3475 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3476 the nonnull attribute in type-generic builtins.
3477
e01b4e16
MS
34782016-06-09 Martin Sebor <msebor@redhat.com>
3479
3480 PR c/70883
3481 * c-common.c (builtin_function_validate_nargs): Make text of error
3482 message consistent with others like it.
3483
44a845ca
MS
34842016-06-08 Martin Sebor <msebor@redhat.com>
3485 Jakub Jelinek <jakub@redhat.com>
3486
3487 PR c++/70507
3488 PR c/68120
3489 * c-common.c (check_builtin_function_arguments): Handle
3490 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3491
a80a7051
RB
34922016-06-08 Richard Biener <rguenther@suse.de>
3493
3494 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3495
bfd67b47
RB
34962016-06-07 Richard Biener <rguenther@suse.de>
3497
3498 PR c/61564
3499 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3500 options and warn about others.
3501
15c98b2e
ES
35022016-06-01 Eduard Sanou <dhole@openmailbox.org>
3503
3504 * c-common.c (get_source_date_epoch): Rename to
3505 cb_get_source_date_epoch.
3506 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3507 message when the parsing fails. Use error_at instead of fatal_error.
3508 * c-common.h (get_source_date_epoch): Rename to
3509 cb_get_source_date_epoch.
3510 * c-common.h (cb_get_source_date_epoch): Prototype.
3511 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3512 * c-common.h (c_omp_region_type): Remove trailing comma.
3513 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3514 * c-lex.c (c_lex_with_flags): Remove initialization of
3515 pfile->source_date_epoch.
3516
00631022
JJ
35172016-05-30 Jakub Jelinek <jakub@redhat.com>
3518
3519 PR c++/71349
3520 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3521 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3522 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3523 instead of C_OMP_CLAUSE_SPLIT_FOR.
3524
f17a223d
RB
35252016-05-24 Richard Biener <rguenther@suse.de>
3526
3527 PR middle-end/70434
3528 PR c/69504
3529 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3530 (convert_vector_to_array_for_subscript): ... this.
3531 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3532 VIEW_CONVERT_EXPR to an array type. Rename to ...
3533 (convert_vector_to_array_for_subscript): ... this.
3534
4f2e1536
MP
35352016-05-12 Marek Polacek <polacek@redhat.com>
3536
3537 PR c/70756
3538 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3539 size_in_bytes and pass LOC to it.
3540
d6e83a8d
MM
35412016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3542
3543 PR c/43651
3544 * c.opt (Wduplicate-decl-specifier): New option.
3545
5c3a10fb
MP
35462016-05-11 Marek Polacek <polacek@redhat.com>
3547
3548 PR c++/71024
3549 * c-common.c (diagnose_mismatched_attributes): New function.
3550 * c-common.h (diagnose_mismatched_attributes): Declare.
3551
deef7113
MP
35522016-05-04 Marek Polacek <polacek@redhat.com>
3553
3554 * c.opt (Wdangling-else): New option.
3555
79ce98bc
MP
35562016-05-03 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/70859
3559 * c-common.c (builtin_function_validate_nargs): Add location
3560 parameter. Use it.
3561 (check_builtin_function_arguments): Add location and arguments
3562 parameters. Use them.
3563 * c-common.h (check_builtin_function_arguments): Update declaration.
3564
381cdae4
RB
35652016-05-03 Richard Biener <rguenther@suse.de>
3566
3567 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3568 allow call args to gimplify to SSA names.
3569
1d793c34
MP
35702016-05-03 Marek Polacek <polacek@redhat.com>
3571
3572 * c-common.h (enum c_omp_region_type): Remove stray comma.
3573
77886428
CP
35742016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3575
3576 * c-common.h (enum c_omp_region_type): Define.
3577
697e0b28
RS
35782016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3579
3580 * c-common.c (shorten_compare): Use wi::to_wide.
3581
e7ff0319
CP
35822016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3583
3584 PR middle-end/70626
3585 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3586 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3587 reduction clauses in acc parallel loops.
3588
2fff3db8
MP
35892016-04-29 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/70852
3592 * c-common.c (warn_for_memset): Check domain before accessing it.
3593
509063eb
DV
35942016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3595
3596 PR/69089
3597 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3598 "aligned" attribute.
3599
b632761d
JM
36002016-04-28 Jason Merrill <jason@redhat.com>
3601
3602 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3603
174f6622
ES
36042016-04-28 Eduard Sanou <dhole@openmailbox.org>
3605 Matthias Klose <doko@debian.org>
3606
3607 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3608 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3609 handling.
3610 * c-common.h (get_source_date_epoch): Prototype.
3611 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3612
6bc2bb18
RB
36132015-04-27 Ryan Burn <contact@rnburn.com>
3614
3615 PR c++/69024
3616 PR c++/68997
3617 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3618 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3619 external linkage.
3620 (cilk_detect_and_unwrap): Corresponding changes.
3621 (extract_free_variables): Don't extract free variables from
3622 AGGR_INIT_EXPR slot.
3623 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3624 (cilk_recognize_spawn): Likewise.
3625
c1e1f433
BS
36262016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3627
3628 * c.opt (Wmemset-elt-size): New option.
3629 * c-common.c (warn_for_memset): New function.
3630 * c-common.h (warn_for_memset): Declare.
3631
d067e05f
JM
36322016-04-25 Jason Merrill <jason@redhat.com>
3633
3634 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3635 No longer static.
3636 * c-common.h: Declare it.
3637 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3638
9aa36ae5
JM
36392016-04-22 Jason Merrill <jason@redhat.com>
3640
3641 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3642
477d4906
IV
36432016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3644
3645 PR c++/69363
3646 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3647 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3648
fe37c7af
MM
36492016-04-18 Michael Matz <matz@suse.de>
3650
3651 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3652 and SET_DECL_ALIGN.
3653
23f2660f
EB
36542016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3655
3656 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3657 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3658 to incomplete types.
3659 (dump_nested_type): Remove redundant tests and tidy up.
3660 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3661 a type which is the typedef of an original type.
3662
1e77281b
MP
36632016-04-15 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/70651
3666 * c-common.c (build_va_arg): Change two asserts into errors and return
3667 error_mark_node.
3668
b3a77f21
MP
36692016-04-13 Marek Polacek <polacek@redhat.com>
3670
3671 PR c++/70639
3672 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3673 for switch statements, too.
3674
322b8466
JM
36752016-03-28 Jason Merrill <jason@redhat.com>
3676
3677 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3678
fbdb6baf
MP
36792016-03-23 Marek Polacek <polacek@redhat.com>
3680
3681 PR c++/69884
3682 * c.opt (Wignored-attributes): New option.
3683
5c240f4d
DM
36842016-03-22 David Malcolm <dmalcolm@redhat.com>
3685
3686 PR c/69993
3687 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3688 diagnostic text, reversing the order of the warning and note so
3689 that they appear in source order.
3690
14ba7b28
MP
36912016-03-17 Marek Polacek <polacek@redhat.com>
3692
3693 PR c/69407
3694 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3695 operations.
3696
08a1cadc
JM
36972016-03-14 Jason Merrill <jason@redhat.com>
3698
2aaeea19
JM
3699 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3700
08a1cadc
JM
3701 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3702
c06d25bb
RB
37032016-03-09 Richard Biener <rguenther@suse.de>
3704
3705 PR c/70143
3706 * c-common.c (strict_aliasing_warning): Add back
3707 alias_sets_conflict_p check.
3708
80aac5c8
JM
37092016-03-08 Jason Merrill <jason@redhat.com>
3710
3711 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3712
64b23c13
DM
37132016-03-04 David Malcolm <dmalcolm@redhat.com>
3714
3715 PR c/68187
3716 * c-indentation.c (get_visual_column): Move code to determine next
3717 tab stop to...
3718 (next_tab_stop): ...this new function.
3719 (line_contains_hash_if): Delete function.
3720 (detect_preprocessor_logic): Delete function.
3721 (get_first_nws_vis_column): New function.
3722 (detect_intervening_unindent): New function.
3723 (should_warn_for_misleading_indentation): Replace call to
3724 detect_preprocessor_logic with a call to
3725 detect_intervening_unindent.
3726
729526f5
DM
37272016-03-04 David Malcolm <dmalcolm@redhat.com>
3728
3729 PR c/68187
3730 * c-indentation.c (should_warn_for_misleading_indentation): When
3731 suppressing warnings about cases where the guard and body are on
3732 the same column, only use the first non-whitespace column in place
3733 of the guard token column when dealing with "else" clauses.
3734 When rejecting aligned BODY and NEXT, loosen the requirement
3735 from equality with the first non-whitespace of guard to simply
3736 that they not be indented relative to it.
3737
e9a35493
RB
37382016-03-04 Richard Biener <rguenther@suse.de>
3739
3740 PR c++/70054
3741 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3742 instead of alias_sets_conflict_p.
3743
1be56bc5
MP
37442016-03-01 Marek Polacek <polacek@redhat.com>
3745
3746 PR c++/69795
3747 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3748 any DECL.
3749
35886f0b
MS
37502016-02-22 Martin Sebor <msebor@redhat.com>
3751
3752 PR middle-end/69780
3753 * c-common.c (check_builtin_function_arguments): Validate and
3754 reject invalid arguments to __builtin_alloca_with_align.
3755
4246c8da
MW
37562016-02-20 Mark Wielaard <mjw@redhat.com>
3757
3758 PR c/28901
3759 * c.opt (Wunused-const-variable): Turn into Alias for...
3760 (Wunused-const-variable=): New option.
3761
268be88c
BE
37622016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3763
3764 PR c++/69865
3765 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3766 here...
3767 (c_common_init_options): ...to here.
3768 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3769
871b3f47
JJ
37702016-02-19 Jakub Jelinek <jakub@redhat.com>
3771
3772 PR c++/69826
3773 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3774 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3775 flag_preprocess_only.
3776
bf14eba2
JJ
37772016-02-16 Jakub Jelinek <jakub@redhat.com>
3778
3779 PR c/69835
3780 * c.opt (Wnonnull-compare): Enable for -Wall.
3781
ba6b3795
JJ
37822016-02-15 Jakub Jelinek <jakub@redhat.com>
3783
3784 PR c++/69797
3785 * c-common.c (sync_resolve_size): Diagnose too few arguments
3786 even when params is non-NULL empty vector.
3787
a011cd92
BS
37882016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3789
3790 PR target/60410
3791 * c.opt (fshort-double): Remove.
3792
46cb9332
MS
37932016-02-05 Martin Sebor <msebor@redhat.com>
3794
3795 PR c++/69662
3796 * c.opt (Warning options): Update -Wplacement-new to take
3797 an optional argument.
3798
e1b81f2b
JJ
37992016-02-01 Jakub Jelinek <jakub@redhat.com>
3800
3801 PR preprocessor/69543
3802 PR c/69558
3803 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3804 instead of loc to control_warning_option.
3805
b6adbb9f
NS
38062016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3807
3808 * c.opt (fopenacc-dim=): New option.
3809
5d70666e
RB
38102016-01-27 Ryan Burn <contact@rnburn.com>
3811
3812 PR cilkplus/69267
3813 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3814 gimplify_arg. Removed superfluous post_p argument.
3815 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3816 superfluous post_p argument.
3817 * c-gimplify.c (c_gimplify_expr): Likewise.
3818
01e1dea3
DM
38192016-01-26 David Malcolm <dmalcolm@redhat.com>
3820
3821 PR other/69006
3822 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3823 pp_newline_and_flush with pp_flush.
3824
9f04a53e
MS
38252016-01-20 Martin Sebor <msebor@redhat.com>
3826
3827 PR c/69405
3828 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3829 an incompatible argument when the argument isn't a valid tree node.
3830
7f26f7df
JM
38312016-01-18 Jason Merrill <jason@redhat.com>
3832
3833 PR c++/68767
3834 * c-common.c (check_function_arguments_recurse): Fold the whole
3835 COND_EXPR, not just the condition.
3836
f62bf092
TV
38372016-01-18 Tom de Vries <tom@codesourcery.com>
3838
3839 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3840 classify as loop clause.
3841
e0a575ff
JJ
38422016-01-15 Jakub Jelinek <jakub@redhat.com>
3843
3844 PR bootstrap/68271
3845 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3846 C++ FE no longer has limit on number of pragmas.
3847
38482015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
3849
3850 PR c++/69048
3851 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 3852 to add missing cleanup point.
b6e3db06 3853
c7df95d8
DM
38542016-01-14 David Malcolm <dmalcolm@redhat.com>
3855
3856 PR c++/68819
3857 * c-indentation.c (get_visual_column): Add location_t param.
3858 Handle the column number being zero by effectively disabling the
3859 warning, with an "inform".
3860 (should_warn_for_misleading_indentation): Add location_t argument
3861 for all uses of get_visual_column.
3862
21efdd80
PP
38632016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3864
3865 PR c++/69029
3866 * c-indentation.c (should_warn_for_misleading_indentation):
3867 Don't warn about do-while statements.
3868
7a127fa7
MS
38692016-01-07 Martin Sebor <msebor@redhat.com>
3870
3871 PR c/68966
3872 * c-common.c (sync_resolve_size): Reject first argument when it's
3873 a pointer to _Bool.
3874
c589e975
DM
38752016-01-05 David Malcolm <dmalcolm@redhat.com>
3876
3877 PR c/69122
3878 * c-indentation.c (get_visual_column): Remove default argument.
3879 (should_warn_for_misleading_indentation): For the multiline case,
3880 update call to get_visual_column for next_stmt_exploc so that it
3881 captures the location of the first non-whitespace character in the
3882 relevant line. Don't issue warnings if there is non-whitespace
3883 before the next statement.
3884
818ab71a
JJ
38852016-01-04 Jakub Jelinek <jakub@redhat.com>
3886
3887 Update copyright years.
3888
745e411d
DM
38892015-12-21 David Malcolm <dmalcolm@redhat.com>
3890
3891 * c-common.c (binary_op_error): Convert first param from
3892 location_t to rich_location * and use it when emitting an error.
3893 * c-common.h (binary_op_error): Convert first param from
3894 location_t to rich_location *.
3895
de67c4c3
DM
38962015-12-16 David Malcolm <dmalcolm@redhat.com>
3897
3898 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3899 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3900
4a38b02b
IV
39012015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3902
3903 * c-common.c (c_common_attribute_table): Handle "omp declare target
3904 link" attribute.
3905
54d62f51
JJ
39062015-12-14 Jakub Jelinek <jakub@redhat.com>
3907
3908 PR c/68833
3909 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3910
8d4227c8
TB
39112014-12-12 Tobias Burnus <burnus@net-b.de>
3912
3913 PR fortran/68815
3914 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3915 specifiers (%d, %i,%u and %c).
3916
f6069ccc
DM
39172015-12-10 David Malcolm <dmalcolm@redhat.com>
3918
3919 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3920
63bbf46d
JJ
39212015-12-08 Jakub Jelinek <jakub@redhat.com>
3922
3923 PR c/48088
3924 PR c/68657
3925 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3926 * c-pragma.c (handle_pragma_diagnostic): Adjust
3927 control_warning_option caller.
3928
f79520bb
DM
39292015-12-07 David Malcolm <dmalcolm@redhat.com>
3930
3931 * c-common.c (c_cpp_error): Update for change to
3932 rich_location::set_range.
3933
b3d5bc62
JJ
39342015-12-04 Paolo Bonzini <bonzini@gnu.org>
3935
3936 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3937 shifting 1 out of the sign bit.
3938
39392015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3940
3941 * c-common.c (c_common_attribute_table[]): Update max arguments
3942 count for "simd" attribute.
3943 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3944
6eb4a537
JJ
39452015-12-03 Jakub Jelinek <jakub@redhat.com>
3946
3947 PR preprocessor/57580
3948 * c-ppoutput.c (print): Change printed field to bool.
3949 Move src_file last for smaller padding.
3950 (init_pp_output): Set print.printed to false instead of 0.
3951 (scan_translation_unit): Fix up formatting. Set print.printed
3952 to true after printing something other than newline.
3953 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3954 (maybe_print_line_1): Set print.printed to false instead of 0.
3955 (print_line_1): Likewise.
3956 (do_line_change): Set print.printed to true instead of 1.
3957 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3958 dump_macro): Set print.printed to false after printing newline.
3959
4250754e
JM
39602015-12-02 Jason Merrill <jason@redhat.com>
3961
f479b43d
JM
3962 * c-common.c (fold_for_warn): New.
3963 (warn_logical_operator, warn_tautological_cmp)
3964 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3965
4250754e
JM
3966 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3967 (c_fully_fold_internal, decl_constant_value_for_optimization):
3968 Move to c/c-fold.c.
3969 * c-common.h: Don't declare decl_constant_value_for_optimization.
3970
e9e32ee6
JM
39712015-12-02 Joseph Myers <joseph@codesourcery.com>
3972
3973 PR c/68162
3974 * c-common.h (c_build_qualified_type): Add extra default
3975 arguments.
3976
37d5ad46
JB
39772015-12-01 Julian Brown <julian@codesourcery.com>
3978 Cesar Philippidis <cesar@codesourcery.com>
3979 James Norris <James_Norris@mentor.com>
3980
3981 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3982 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3983 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3984
f07862c7
EB
39852015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3986
3987 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3988 (decl_sloc_common): Delete and move bulk of processing to...
3989 (decl_sloc): ...here.
3990 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3991 (dump_ada_double_name): Remove S parameter and compute the suffix.
3992 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3993 element type and deal with an anonymous one.
3994 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3995 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3996 and remove reference to QUAL_UNION_TYPE.
3997 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3998 (dump_nested_type): ...here. New function extracted from above.
3999 Generate a full declaration for anonymous element type of arrays.
4000 (print_ada_declaration): Really skip anonymous declarations. Remove
4001 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4002 Clean up processing of declarations of array types and objects.
4003 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4004 Remove obsolete code and tidy up.
4005
75c8aac3
JH
40062015-11-29 Jan Hubicka <hubicka@ucw.cz>
4007
4008 PR c/67581
4009 * c-common.c (handle_transparent_union_attribute): Update
4010 also type variants.
4011
b58d3df2
ML
40122015-11-27 Martin Liska <mliska@suse.cz>
4013
4014 PR c++/68312
4015 * array-notation-common.c (cilkplus_extract_an_triplets):
4016 Release vector of vectors.
4017 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4018
89a01fcf
EB
40192015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4020
4021 PR c++/68527
4022 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4023 (print_ada_struct_decl): Likewise.
4024
cc5c5226
IZ
40252015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4026
4027 PR c++/68001
4028 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4029 * cilk.c (recognize_spawn): Determine location in a more precise
4030 way.
4031
269adb9d
JM
40322015-11-19 Jason Merrill <jason@redhat.com>
4033
4034 * c-common.c (shorten_compare): But look through macros from
4035 system headers.
4036
d0eccfcd
JM
40372015-11-18 Jason Merrill <jason@redhat.com>
4038
4039 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4040 non-constant operand comes from a macro.
4041
3e44547c
JM
40422015-11-17 Jason Merrill <jason@redhat.com>
4043
4044 PR bootstrap/68346
4045 * c-common.c (warn_tautological_cmp): Fold before checking for
4046 constants.
4047
0f62c7a0
MP
40482015-11-16 Marek Polacek <polacek@redhat.com>
4049
4050 PR c++/68362
4051 * c-common.c (check_case_bounds): Fold low and high cases.
4052
a868811e
MP
40532015-11-16 Marek Polacek <polacek@redhat.com>
4054
4055 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4056 * c-common.c (c_common_get_alias_set): Likewise.
4057 (handle_visibility_attribute): Likewise.
4058
fff77217
KY
40592015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4060
4061 * c-common.c (handle_simd_attribute): New.
4062 (struct attribute_spec): Add entry for "simd".
4063 (handle_simd_attribute): New.
4064
269e63b7
KT
40652015-11-13 Kai Tietz <ktietz70@googlemail.com>
4066
4067 * c-lex.c (interpret_float): Use fold_convert.
4068
ebedc9a3
DM
40692015-11-13 David Malcolm <dmalcolm@redhat.com>
4070
4071 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4072 and store it on the result.
4073 * c-opts.c (c_common_init_options): Set
4074 global_dc->colorize_source_p.
4075
6e232ba4
JN
40762015-11-12 James Norris <jnorris@codesourcery.com>
4077 Joseph Myers <joseph@codesourcery.com>
4078
7365279f 4079 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4080 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4081 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4082 PRAGMA_OACC_CLAUSE_LINK.
4083
e78bede6
MP
40842015-11-11 Marek Polacek <polacek@redhat.com>
4085
4086 PR c/68107
4087 PR c++/68266
4088 * c-common.c (valid_array_size_p): New function.
4089 * c-common.h (valid_array_size_p): Declare.
4090
3f8257db 40912015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4092
4093 PR bootstrap/68271
4094 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4095
69f293c9
AM
40962015-11-11 Andrew MacLeod <amacleod@redhat.com>
4097
4098 * array-notation-common.c: Remove unused header files.
4099 * c-ada-spec.c: Likewise.
4100 * c-cilkplus.c: Likewise.
4101 * c-common.c: Likewise.
4102 * c-cppbuiltin.c: Likewise.
4103 * c-dump.c: Likewise.
4104 * c-format.c: Likewise.
4105 * c-gimplify.c: Likewise.
4106 * c-indentation.c: Likewise.
4107 * c-lex.c: Likewise.
4108 * c-omp.c: Likewise.
4109 * c-opts.c: Likewise.
4110 * c-pch.c: Likewise.
4111 * c-ppoutput.c: Likewise.
4112 * c-pragma.c: Likewise.
4113 * c-pretty-print.c: Likewise.
4114 * c-semantics.c: Likewise.
4115 * c-ubsan.c: Likewise.
4116 * cilk.c: Likewise.
4117 * stub-objc.c: Likewise.
4118
3a40d81d
NS
41192015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4120 Cesar Philippidis <cesar@codesourcery.com>
4121 James Norris <jnorris@codesourcery.com>
4122 Julian Brown <julian@codesourcery.com>
4123 Nathan Sidwell <nathan@codesourcery.com>
4124
4125 * c-pragma.c (oacc_pragmas): Add "routine".
4126 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4127
ee45a32d
EB
41282015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4129
4130 * c-common.c (c_common_attributes): Add scalar_storage_order.
4131 (handle_scalar_storage_order_attribute): New function.
4132 * c-pragma.c (global_sso): New variable.
4133 (maybe_apply_pragma_scalar_storage_order): New function.
4134 (handle_pragma_scalar_storage_order): Likewise.
4135 (init_pragma): Register scalar_storage_order.
4136 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4137 * c.opt (Wscalar-storage-order): New warning.
4138 (fsso-struct=): New option.
4139
eb11eb15
MS
41402015-11-08 Martin Sebor <msebor@redhat.com>
4141
4142 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4143
0aad0198
RS
41442015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4145
4146 * c-common.c: Don't undef DEF_BUILTIN.
4147
8a645150
DM
41482015-11-06 David Malcolm <dmalcolm@redhat.com>
4149
4150 * c-common.c (c_cpp_error): Convert parameter from location_t to
4151 rich_location *. Eliminate the "column_override" parameter and
4152 the call to diagnostic_override_column.
4153 Update the "done_lexing" clause to set range 0
4154 on the rich_location, rather than overwriting a location_t.
4155 * c-common.h (c_cpp_error): Convert parameter from location_t to
4156 rich_location *. Eliminate the "column_override" parameter.
4157
7a5e4956
CP
41582015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4159 Thomas Schwinge <thomas@codesourcery.com>
4160 James Norris <jnorris@codesourcery.com>
4161
4162 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4163 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4164 clauses with parallel and kernels and loops.
4165 * c-pragma.h (enum pragma_omp_clause): Add entries for
4166 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4167 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4168 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4169 INDEPENDENT,SEQ}.
4170 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4171
e2f5cc96
MS
41722015-11-05 Martin Sebor <msebor@redhat.com>
4173
4174 PR c++/67942
4175 * c.opt (-Wplacement-new): New option.
4176
e01d41e5
JJ
41772015-11-05 Jakub Jelinek <jakub@redhat.com>
4178
4179 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4180 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4181 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4182 save_expr or create_tmp_var* if TEST is true.
4183 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4184 Don't call add_stmt here.
4185 (struct c_omp_check_loop_iv_data): New type.
4186 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4187 c_omp_check_loop_iv_exprs): New functions.
4188 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4189 distribute.
4190 (c_omp_declare_simd_clauses_to_numbers): Change
4191 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4192 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4193 from numbers to PARM_DECLs.
4194
595278be
MM
41952015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4196
4197 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4198 flag_checking.
4199
3f8257db 42002015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4201
4202 PR c++-common/67882
b3d5bc62
JJ
4203 * c-common.h (fold_offsetof_1): Add argument.
4204 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4205 offsetof expressions that reference elements past the end of
4206 an array.
4207
4bf9e5a8
TS
42082015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4209 Chung-Lin Tang <cltang@codesourcery.com>
4210
4211 * c-pragma.c (oacc_pragmas): Add "atomic".
4212 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4213
3b1661a9
ES
42142015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4215
4216 * c-common.c (handle_target_clones_attribute): New.
4217 (c_common_attribute_table): Add handle_target_clones_attribute.
4218 (handle_always_inline_attribute): Add check on target_clones attribute.
4219 (handle_target_attribute): Ditto.
4220
2adfab87
AM
42212015-10-29 Andrew MacLeod <amacleod@redhat.com>
4222
4223 * array-notation-common.c: Reorder #include's and remove duplicates.
4224 * c-ada-spec.c: Likewise.
4225 * c-cilkplus.c: Likewise.
4226 * c-common.c: Likewise.
4227 * c-cppbuiltin.c: Likewise.
4228 * c-dump.c: Likewise.
4229 * c-format.c: Likewise.
4230 * c-gimplify.c: Likewise.
4231 * c-indentation.c: Likewise.
4232 * c-lex.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-opts.c: Likewise.
4235 * c-pch.c: Likewise.
4236 * c-ppoutput.c: Likewise.
4237 * c-pragma.c: Likewise.
4238 * c-pretty-print.c: Likewise.
4239 * c-semantics.c: Likewise.
4240 * c-ubsan.c: Likewise.
4241 * cilk.c: Likewise.
4242 * stub-objc.c: Likewise.
4243
d90ec4f2
JM
42442015-10-28 Jason Merrill <jason@redhat.com>
4245
4246 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4247
88bae6f4
TS
42482015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4249 James Norris <jnorris@codesourcery.com>
4250 Cesar Philippidis <cesar@codesourcery.com>
4251
4252 PR c/64765
4253 PR c/64880
4254 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4255 * c-omp.c (c_oacc_split_loop_clauses): New function.
4256
b1726d6c
MS
42572015-10-21 Martin Sebor <msebor@redhat.com>
4258
4259 PR driver/68043
4260 * c.opt: End each sentence that describes an option with a period.
4261
fa60eeb9
MP
42622015-10-20 Marek Polacek <polacek@redhat.com>
4263
4264 * array-notation-common.c (is_cilkplus_vector_p): Define.
4265 * c-common.h (is_cilkplus_vector_p): Declare.
4266
95979049
MP
42672015-10-20 Marek Polacek <polacek@redhat.com>
4268
4269 * c.opt (std=gnu++11): Do not describe as experimental.
4270 (std=gnu++14): Likewise.
4271
2a9fb712
JM
42722015-10-19 Jason Merrill <jason@redhat.com>
4273
4274 * c-cppbuiltin.c (c_cpp_builtins): Define
4275 __cpp_nontype_template_args.
4276
13b380a3
JM
42772015-10-19 Jason Merrill <jason@redhat.com>
4278
4279 * c-cppbuiltin.c (c_cpp_builtins): Define
4280 __cpp_enumerator_attributes, __cpp_fold_expressions,
4281 __cpp_unicode_characters.
4282
d9a6bd32
JJ
42832015-10-13 Jakub Jelinek <jakub@redhat.com>
4284 Aldy Hernandez <aldyh@redhat.com>
4285
4286 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4287 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4288 (c_define_builtins): Likewise.
4289 * c-common.h (enum c_omp_clause_split): Add
4290 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4291 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4292 (c_finish_omp_for): Add ORIG_DECLV argument.
4293 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4294 201511 instead of 201307.
4295 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4296 OMP_CRITICAL_CLAUSES to it.
4297 (c_finish_omp_ordered): Add CLAUSES argument, set
4298 OMP_ORDERED_CLAUSES to it.
4299 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4300 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4301 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4302 constructs and new OpenMP 4.5 clauses. Clear
4303 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4304 verification code.
4305 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4306 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4307 (enum pragma_omp_clause): Add
4308 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4309 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4310
624d31fe
RS
43112015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4312
4313 * c-lex.c (interpret_float): Use real_equal instead of
4314 REAL_VALUES_EQUAL.
4315
b8fd7909
JM
43162015-10-04 Jason Merrill <jason@redhat.com>
4317
4318 Implement N4514, C++ Extensions for Transactional Memory.
4319 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4320 (c_common_attribute_table): Add transaction_safe_dynamic.
4321 transaction_safe now affects type identity.
4322 (handle_tm_attribute): Handle transaction_safe_dynamic.
4323 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4324 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4325 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4326 (D_TRANSMEM): New.
4327 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4328 * c-pretty-print.c (pp_c_attributes_display): Don't print
4329 transaction_safe in C++.
4330
12651878
MP
43312015-10-02 Marek Polacek <polacek@redhat.com>
4332
4333 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4334
3e3b8d63
MP
43352015-10-02 Marek Polacek <polacek@redhat.com>
4336
4337 PR c/64249
4338 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4339 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4340 * c.opt (Wduplicated-cond): New option.
4341
0d1a8f75
JM
43422015-10-01 Joseph Myers <joseph@codesourcery.com>
4343
4344 * c.opt (std=c11): Do not describe as experimental.
4345 (std=gnu11): Likewise.
4346 (std=iso9899:2011): Likewise.
4347
3e32ee19
NS
43482015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4349
4350 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4351 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4352
974348ee
MP
43532015-09-25 Marek Polacek <polacek@redhat.com>
4354
4355 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4356 (ubsan_instrument_shift): Likewise.
4357
15dbc1a6
MP
43582015-09-25 Marek Polacek <polacek@redhat.com>
4359
4360 PR sanitizer/64906
4361 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4362
6b95d7cc
PP
43632015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4364
4365 * c-indentation.c (should_warn_for_misleading_indentation):
4366 Compare next_stmt_vis_column with guard_line_first_nws instead
4367 of with guard_line_vis_column.
4368
c1822f9c
MLI
43692015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4370
4371 PR c/49654
4372 PR c/49655
4373 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4374 options and options not valid for the current language.
4375
d5398058
PP
43762015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4377
4378 * c-indentation.c (should_warn_for_misleading_indentation):
4379 Float out and consolidate the calls to get_visual_column that
4380 are passed guard_exploc as an argument. Compare
4381 next_stmt_vis_column with guard_line_first_nws instead of with
4382 body_line_first_nws.
4383
6b333269
NS
43842015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4385
4386 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4387 Wnamespaces): New C++ warnings.
4388
a75f1574
JM
43892015-09-22 Jason Merrill <jason@redhat.com>
4390
4391 * c-common.h (abi_compat_version_crosses): New.
4392 (warn_abi_version): Declare.
4393 * c-common.c: Define it.
4394 * c-opts.c (c_common_post_options): Handle it.
4395 flag_abi_compat_version defaults to 8.
4396
bdaaa8b7
VV
43972015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4398
4399 Complete the implementation of N4230, Nested namespace definition.
4400 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4401 __cpp_nested_namespace_definitions.
4402
eaa797e8
MLI
44032015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4404
4405 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4406
c4914de6
MLI
44072015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4408
4409 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4410 when warning.
4411 * c-pragma.h (pragma_lex): Add optional loc argument.
4412
fcb87c50
MM
44132015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4414
4415 * c-format.c (check_format_arg): Adjust to use common block size in all
4416 object pools.
4417
31bdd08a
DM
44182015-09-15 David Malcolm <dmalcolm@redhat.com>
4419
4420 * c-format.c (location_from_offset): Update for change in
4421 signature of location_get_source_line.
4422 * c-indentation.c (get_visual_column): Likewise.
4423 (line_contains_hash_if): Likewise.
4424
aa9f4b4c
MP
44252015-09-14 Marek Polacek <polacek@redhat.com>
4426
4427 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4428 setting various warnings.
4429
aa256c4a
MP
44302015-09-14 Marek Polacek <polacek@redhat.com>
4431
4432 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4433 a negative value.
4434
0f876f22
MW
44352015-09-11 Mark Wielaard <mjw@redhat.com>
4436
4437 PR c/28901
4438 * c.opt (Wunused-variable): Option from common.opt.
4439 (Wunused-const-variable): New option.
4440
273aa49e
PC
44412015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4442
4443 PR c++/53184
4444 * c.opt ([Wsubobject-linkage]): Add.
4445
1807ffc1
MS
44462015-09-03 Martin Sebor <msebor@redhat.com>
4447
4448 PR c/66516
4449 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4450 functions.
4451 * c-common.c (reject_gcc_builtin): Define.
4452
38942840
BI
44532015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4454
4455 PR middle-end/60586
4456 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4457 prototype.
4458 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4459 cilk_gimplify_call_params_in_spawned_fn.
4460 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4461 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4462 unwrapping.
4463
c316b5e4
MP
44642015-08-25 Marek Polacek <polacek@redhat.com>
4465
4466 PR middle-end/67330
4467 * c-common.c (handle_weak_attribute): Don't check whether the
4468 visibility can be changed here.
4469
584a7c46
MLI
44702015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4471
4472 * c-lex.c (c_lex_with_flags): Use explicit locations.
4473
a79683d5
TS
44742015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4475
4476 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4477 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4478
61717a45
FXC
44792015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4480
4481 PR middle-end/36757
4482 * c-common.c (check_builtin_function_arguments): Add check
4483 for BUILT_IN_SIGNBIT argument.
4484
329524f5
PC
44852015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4486
4487 PR c++/67160
4488 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4489 in c++1z mode.
4490
4ee55665
MP
44912015-08-17 Marek Polacek <polacek@redhat.com>
4492
4493 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4494 with whitespaces before qualifier names.
4495
b893e375
MP
44962015-08-12 Marek Polacek <polacek@redhat.com>
4497
4498 PR c++/55095
4499 * c-common.c (maybe_warn_shift_overflow): Properly handle
4500 left-shifting 1 into the sign bit.
4501
c2d89095
MLI
45022015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4503
4504 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4505
971e17ff
AS
45062015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4507 Braden Obrzut <admin@maniacsvault.net>
4508 Jason Merrill <jason@redhat.com>
4509
4510 Add C++ Concepts TS support.
4511 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4512 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4513 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4515 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4516 * c.opt (fconcepts): New.
4517
b3d5bc62
JJ
45182015-08-02 Martin Sebor <msebor@redhat.com>
4519
4520 * c.opt (-Wframe-address): New warning option.
4521
8ebca419
PP
45222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4523
4524 * c-indentation.c (should_warn_for_misleading_indentation):
4525 Improve heuristics.
4526
1a1e101f
PP
45272015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4528
4529 * c-indentation.c (get_visual_column): Add parameter first_nws,
4530 use it. Update comment documenting the function.
4531 (is_first_nonwhitespace_on_line): Remove.
4532 (should_warn_for_misleading_indentation): Replace usage of
4533 of is_first_nonwhitespace_on_line with get_visual_column.
4534
992118a1
PP
45352015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4536
4537 * c-indentation.h (struct token_indent_info): Define.
4538 (get_token_indent_info): Define.
4539 (warn_for_misleading_information): Declare.
4540 * c-common.h (warn_for_misleading_information): Remove.
4541 * c-identation.c (warn_for_misleading_indentation):
4542 Change declaration to take three token_indent_infos. Adjust
4543 accordingly.
4544 * c-identation.c (should_warn_for_misleading_indentation):
4545 Likewise. Bail out early if the body is a compound statement.
4546 (guard_tinfo_to_string): Define.
4547
e8fa3817
JM
45482015-07-30 Jason Merrill <jason@redhat.com>
4549
4550 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4551 '*' for reference decay.
4552
173864e8
MP
45532015-07-30 Marek Polacek <polacek@redhat.com>
4554
4555 * c-common.c (warn_tautological_cmp): Bail for float types.
4556
f2afe6dd
MP
45572015-07-27 Marek Polacek <polacek@redhat.com>
4558
4559 PR bootstrap/67030
4560 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4561
05b28fd6
MP
45622015-07-27 Marek Polacek <polacek@redhat.com>
4563
4564 PR c++/66555
4565 PR c/54979
4566 * c-common.c (find_array_ref_with_const_idx_r): New function.
4567 (warn_tautological_cmp): New function.
4568 * c-common.h (warn_tautological_cmp): Declare.
4569 * c.opt (Wtautological-compare): New option.
4570
5a5062b8
MP
45712015-07-23 Marek Polacek <polacek@redhat.com>
4572
4573 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4574 (ubsan_instrument_shift): Likewise.
4575
dc891fe7
MP
45762015-07-23 Marek Polacek <polacek@redhat.com>
4577
4578 PR sanitizer/66908
4579 * c-ubsan.c: Include gimplify.h.
4580 (ubsan_instrument_division): Unshare OP0 and OP1.
4581 (ubsan_instrument_shift): Likewise.
4582
451b5e48
MP
45832015-07-20 Marek Polacek <polacek@redhat.com>
4584 Richard Sandiford <richard.sandiford@arm.com>
4585
4586 PR c++/55095
4587 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4588 Use EXPR_LOC_OR_LOC.
4589 (maybe_warn_shift_overflow): New function.
4590 * c-common.h (maybe_warn_shift_overflow): Declare.
4591 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4592 * c.opt (Wshift-overflow): New option.
4593
fb0b2914
ML
45942015-07-16 Martin Liska <mliska@suse.cz>
4595
4596 * c-format.c (static void check_format_info_main): Use
4597 object_allocator instead of pool_allocator.
4598 (check_format_arg): Likewise.
4599 (check_format_info_main): Likewise.
4600
903f5c23
AM
46012015-07-15 Andrew MacLeod <amacleod@redhat.com>
4602
4603 * c-opts.c: Remove multiline #include comment.
4604
026c3cfd
AH
46052015-07-12 Aldy Hernandez <aldyh@redhat.com>
4606
4607 * c-common.c: Fix double word typos.
4608
bb49ee66
EB
46092015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4610
4611 * c-ada-spec.h (cpp_operation): Revert latest change.
4612 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4613 constructors and destructors.
4614
1916bcb5
AM
46152015-07-09 Andrew MacLeod <amacleod@redhat.com>
4616
4617 * c-common.h: Adjust includes for flags.h changes.
4618 * stub-objc.c: Likewise.
026c3cfd 4619
a9dcd529
EB
46202015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4621
4622 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4623 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4624
b03b462f
JJ
46252015-07-08 Jakub Jelinek <jakub@redhat.com>
4626
4627 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4628 are to be removed, return NULL rather than original clauses list.
4629
c7131fb2
AM
46302015-07-07 Andrew MacLeod <amacleod@redhat.com>
4631
4632 * array-notation-common.c: Adjust includes.
4633 * c-ada-spec.c: Likewise.
4634 * c-cilkplus.c: Likewise.
4635 * c-common.h: Likewise.
4636 * c-cppbuiltin.c: Likewise.
4637 * c-dump.c: Likewise.
4638 * c-format.c: Likewise.
4639 * c-gimplify.c: Likewise.
4640 * c-indentation.c: Likewise.
4641 * c-lex.c: Likewise.
4642 * c-omp.c: Likewise.
4643 * c-opts.c: Likewise.
4644 * c-pch.c: Likewise.
4645 * c-ppoutput.c: Likewise.
4646 * c-pragma.c: Likewise.
4647 * c-pretty-print.c: Likewise.
4648 * c-semantics.c: Likewise.
4649 * c-ubsan.c: Likewise.
4650 * cilk.c: Likewise.
4651 * stub-objc.c: Likewise.
4652
2a7fb83f
EB
46532015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4654
4655 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4656 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4657
a03c9bf1
JM
46582015-07-01 Jason Merrill <jason@redhat.com>
4659
36a85135
JM
4660 * c-common.h (D_CXX11): Rename from D_CXX0X.
4661 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4662 * c-common.c: Adjust.
4663
e7fa68d5
JM
4664 * c-opts.c (c_common_post_options): Default to C++14.
4665
a03c9bf1
JM
4666 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4667
fe95b036
ESR
46682015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4669
4670 Implement N4197 - Adding u8 character literals
b3d5bc62 4671 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4672 CPP_CHAR.
b3d5bc62 4673 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4674 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4675 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4676 and CPP_UTF8CHAR tokens.
4677 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4678
da2e71c9
MLI
46792015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4680
4681 PR fortran/66605
4682 * c-common.c (do_warn_unused_parameter): Move here.
4683 * c-common.h (do_warn_unused_parameter): Declare.
4684
b155cfd9
MP
46852015-06-29 Marek Polacek <polacek@redhat.com>
4686
4687 PR c/66322
4688 * c-common.c (check_case_bounds): Add bool * parameter. Set
4689 OUTSIDE_RANGE_P.
4690 (c_add_case_label): Add bool * parameter. Pass it down to
4691 check_case_bounds.
4692 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4693 warning here.
4694 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4695 declarations.
4696
31521951
MP
46972015-06-27 Marek Polacek <polacek@redhat.com>
4698
4699 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4700 or VECTOR_INTEGER_TYPE_P throughout.
4701 * c-gimplify.c: Likewise.
4702
22d03525
MP
47032015-06-26 Marek Polacek <polacek@redhat.com>
4704
4705 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4706 * c-common.c (c_fully_fold_internal): Likewise.
4707 (c_alignof_expr): Likewise.
4708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4709 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4710 * cilk.c (create_parm_list): Likewise.
22d03525 4711
af05e6e5
MP
47122015-06-26 Marek Polacek <polacek@redhat.com>
4713
4714 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4715
f0889939
AM
47162015-06-25 Andrew MacLeod <amacleod@redhat.com>
4717
4718 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4719 * c-gimplify.c: Likewise.
4720 * c-pragma.c: Likewise.
4721 * c-ubsan.c: Likewise.
4722 * cilk.c: Likewise.
4723
ca752f39
RS
47242015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4725
4726 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4727 ggc_hasher.
4728
16a16ec7
AM
47292015-06-25 Andrew MacLeod <amacleod@redhat.com>
4730
4731 * cilk.c: Move calls.h after tm.h in the include chain.
4732
0ae9bd27
MP
47332015-06-25 Marek Polacek <polacek@redhat.com>
4734
4735 * array-notation-common.c: Use VAR_P throughout.
4736 * c-ada-spec.c: Likewise.
4737 * c-common.c: Likewise.
4738 * c-format.c: Likewise.
4739 * c-gimplify.c: Likewise.
4740 * c-omp.c: Likewise.
4741 * c-pragma.c: Likewise.
4742 * c-pretty-print.c: Likewise.
4743 * cilk.c: Likewise.
4744
62f9079a
MP
47452015-06-25 Marek Polacek <polacek@redhat.com>
4746
4747 * cilk.c (extract_free_variables): Use is_global_var.
4748
0fa16060
RS
47492015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4750
4751 * c-common.c: Don't include target-def.h.
4752
a68ae2e1
MP
47532015-06-23 Marek Polacek <polacek@redhat.com>
4754
4755 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4756 when comparing INTEGER_CSTs.
4757
c6a2f2d9
PMR
47582015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4759
4760 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4761 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4762 (dump_ada_template): Skip partially specialized types.
4763
6b4db501
MM
47642015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4765
4766 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4767 swapping.
4768
abb226c9
AM
47692015-06-17 Andrew MacLeod <amacleod@redhat.com>
4770
4771 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4772 * c-ada-spec.c: Likewise.
4773 * c-cilkplus.c: Likewise.
4774 * c-common.c: Likewise.
4775 * c-common.h: Likewise.
4776 * c-cppbuiltin.c: Likewise.
4777 * c-dump.c: Likewise.
4778 * c-format.c: Likewise.
4779 * c-gimplify.c: Likewise.
4780 * c-indentation.c: Likewise.
4781 * c-lex.c: Likewise.
4782 * c-omp.c: Likewise.
4783 * c-opts.c: Likewise.
4784 * c-pch.c: Likewise.
4785 * c-ppoutput.c: Likewise.
4786 * c-pragma.c: Likewise.
4787 * c-pretty-print.c: Likewise.
4788 * c-semantics.c: Likewise.
4789 * c-ubsan.c: Likewise.
4790 * cilk.c: Likewise.
4791 * stub-objc.c: Likewise.
4792
076fecad
PP
47932015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4794
4795 PR c++/65168
4796 * c-common.c (c_common_truthvalue_conversion): Warn when
4797 converting an address of a reference to a truth value.
4798
13fdf2e2
AM
47992015-06-08 Andrew MacLeod <amacleod@redhat.com>
4800
4801 * array-notation-common.c : Adjust include files.
4802 * c-ada-spec.c : Likewise.
4803 * c-cilkplus.c : Likewise.
4804 * c-common.c : Likewise.
4805 * c-common.h : Likewise.
4806 * c-cppbuiltin.c : Likewise.
4807 * c-dump.c : Likewise.
4808 * c-format.c : Likewise.
4809 * c-gimplify.c : Likewise.
4810 * c-indentation.c : Likewise.
4811 * c-lex.c : Likewise.
4812 * c-omp.c : Likewise.
4813 * c-opts.c : Likewise.
4814 * c-pch.c : Likewise.
4815 * c-ppoutput.c : Likewise.
4816 * c-pragma.c : Likewise.
4817 * c-pretty-print.c : Likewise.
4818 * c-semantics.c : Likewise.
4819 * c-ubsan.c : Likewise.
4820 * cilk.c : Likewise.
4821 * stub-objc.c : Likewise.
4822
a1661b90
MP
48232015-06-08 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/66415
4826 * c-format.c (location_from_offset): Return LOC if LINE is null.
4827
d7438551
AH
48282015-06-05 Aldy Hernandez <aldyh@redhat.com>
4829
4830 * c-common.h (c_parse_final_cleanups): New prototype.
4831 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4832
b3d5bc62
JJ
48332015-06-04 Sriraman Tallam <tmsriram@google.com>
4834
4835 * c-common.c (noplt): New attribute.
4836 (handle_noplt_attribute): New handler.
4837
ecb9f223
AM
48382015-06-04 Andrew MacLeod <amacleod@redhat.com>
4839
4840 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4841 * c-ada-spec.c: Likewise.
4842 * c-cilkplus.c: Likewise.
4843 * c-common.c: Likewise.
4844 * c-common.h: Likewise.
4845 * c-cppbuiltin.c: Likewise.
4846 * c-dump.c: Likewise.
4847 * c-format.c: Likewise.
4848 * c-gimplify.c: Likewise.
4849 * c-indentation.c: Likewise.
4850 * c-lex.c: Likewise.
4851 * c-omp.c: Likewise.
4852 * c-opts.c: Likewise.
4853 * c-pch.c: Likewise.
4854 * c-ppoutput.c: Likewise.
4855 * c-pragma.c: Likewise.
4856 * c-pretty-print.c: Likewise.
4857 * c-semantics.c: Likewise.
4858 * c-ubsan.c: Likewise.
4859 * cilk.c: Likewise.
4860 * stub-objc.c: Likewise.
4861
6ac48155
DM
48622015-06-02 David Malcolm <dmalcolm@redhat.com>
4863
4864 PR c/66220:
4865 * c-indentation.c (should_warn_for_misleading_indentation): Use
4866 expand_location rather than expand_location_to_spelling_point.
4867 Don't warn if the guarding statement is more indented than the
4868 next/body stmts.
4869
773ce42e
DM
48702015-06-02 David Malcolm <dmalcolm@redhat.com>
4871
4872 * c-indentation.c (warn_for_misleading_indentation): Bail out
4873 immediately if -Wmisleading-indentation isn't enabled.
4874
4fef8379
ML
48752015-06-01 Martin Liska <mliska@suse.cz>
4876
4877 * c-format.c (check_format_arg):Use new type-based pool allocator.
4878 (check_format_info_main) Likewise.
4879
1edfb384
EB
48802015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4881
4882 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4883 (has_nontrivial_methods): Likewise.
4884
9677ef52
MP
48852015-05-25 Marek Polacek <polacek@redhat.com>
4886
4887 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4888
fd5c817a
MP
48892015-05-22 Marek Polacek <polacek@redhat.com>
4890
4891 PR c/47043
4892 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4893
a2f45fe6 48942015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
4895
4896 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4897 STACK_GROWS_DOWNWARD.
4898
a2f45fe6 48992015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
4900
4901 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4902 STACK_GROWS_DOWNWARD rather than if it is defined.
4903
0fee2ac2 49042015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 4905
0fee2ac2
MLI
4906 PR c/52952
4907 * c-format.c (location_column_from_byte_offset): New.
4908 (location_from_offset): New.
4909 (struct format_wanted_type): Add offset_loc field.
4910 (check_format_info): Move handling of location for extra arguments
4911 closer to the point of warning.
4912 (check_format_info_main): Pass the result of location_from_offset
4913 to warning_at.
4914 (format_type_warning): Pass the result of location_from_offset
4915 to warning_at.
4916
cf4ef6f7
MP
49172015-05-20 Marek Polacek <polacek@redhat.com>
4918
4919 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4920
3a65ee74
MP
49212015-05-20 Marek Polacek <polacek@redhat.com>
4922
4923 * c-ada-spec.c (dump_sloc): Use DECL_P.
4924
21b634ae
MP
49252015-05-20 Marek Polacek <polacek@redhat.com>
4926
4927 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4928 * c-common.c: Likewise.
4929
0e50b624
DM
49302015-05-19 David Malcolm <dmalcolm@redhat.com>
4931
4932 * c-common.h (fe_file_change): Strengthen param from
4933 const line_map * to const line_map_ordinary *.
4934 (pp_file_change): Likewise.
4935 * c-lex.c (fe_file_change): Likewise.
4936 (cb_define): Use linemap_check_ordinary when invoking
4937 SOURCE_LINE.
4938 (cb_undef): Likewise.
4939 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4940 invoking cb_file_change.
4941 (c_finish_options): Likewise.
4942 (push_command_line_include): Likewise.
4943 (cb_file_change): Strengthen param "new_map" from
4944 const line_map * to const line_map_ordinary *.
4945 * c-ppoutput.c (cb_define): Likewise for local "map".
4946 (pp_file_change): Likewise for param "map" and local "from".
4947
fab27f52
MM
49482015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4949
4950 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4951
2fe1d762
TV
49522015-05-18 Tom de Vries <tom@codesourcery.com>
4953
4954 * c-common.c (build_va_arg_1): New function.
4955 (build_va_arg): Add address operator to va_list operand if necessary.
4956
7a37fa90
MM
49572015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4958
4959 PR c/48956
4960 * c-common.c (int_safely_convertible_to_real_p): Define.
4961 (unsafe_conversion_p): Check conversions involving complex types.
4962 (conversion_warning): Add new warning message for conversions which
4963 discard imaginary component.
4964 * c-common.h: (enum conversion_safety): Add new enumerator for such
4965 conversions.
4966
3aa3c9fc
MP
49672015-05-14 Marek Polacek <polacek@redhat.com>
4968
4969 PR c/66066
4970 PR c/66127
4971 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4972 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4973 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4974 use it. If FOR_INT_CONST, require that all evaluated operands be
4975 INTEGER_CSTs.
4976
c3388e62
DM
49772015-05-12 David Malcolm <dmalcolm@redhat.com>
4978
4979 * c-common.h (warn_for_misleading_indentation): New prototype.
4980 * c-indentation.c: New file.
4981 * c.opt (Wmisleading-indentation): New option.
4982
c7b38fd5
TV
49832015-05-12 Tom de Vries <tom@codesourcery.com>
4984
4985 PR tree-optimization/66010
4986 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4987
381bf11e
JM
49882015-05-09 Jason Merrill <jason@redhat.com>
4989
edff0c06
JM
4990 * c-opts.c (c_common_post_options): Also clear
4991 cpp_opts->cpp_warn_cxx11_compat.
4992
129211bc
JM
4993 * c-common.h (enum cxx_dialect): Add cxx_unset.
4994 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4995 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4996
381bf11e
JM
4997 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4998 (std=gnu++0x): Mark as Undocumented.
4999 (std=gnu++1y): Add deprecated message.
5000
fe191308
JM
50012015-05-08 Jason Merrill <jason@redhat.com>
5002
765189ff
JM
5003 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5004 * c-opts.c: Adjust.
5005
fe191308
JM
5006 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5007
755e528f
MP
50082015-05-08 Marek Polacek <polacek@redhat.com>
5009
5010 PR c/64918
5011 * c.opt (Woverride-init-side-effects): New option.
5012
0173bd2a
MP
50132015-05-07 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/65179
5016 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5017 negative value.
5018 * c.opt (Wshift-negative-value): New option.
5019 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5020 when -Wextra and C99/C++11 mode.
5021
e0f0d3b9
MP
50222015-05-07 Marek Polacek <polacek@redhat.com>
5023 Martin Uecker <uecker@eecs.berkeley.edu>
5024
5025 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5026 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5027
8243e2a9
JM
50282015-05-05 Jason Merrill <jason@redhat.com>
5029
5030 * c.opt (Wterminate): New.
5031
577cd070
MP
50322015-04-30 Marek Polacek <polacek@redhat.com>
5033
5034 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5035 require that the non-constant be of a boolean type.
5036
0373796b
JT
50372015-04-29 Josh Triplett <josh@joshtriplett.org>
5038
e0f0d3b9
MP
5039 * c-common.c (handle_section_attribute): Refactor to reduce
5040 nesting and distinguish between error cases.
0373796b 5041
716c0ba6
MP
50422015-04-29 Marek Polacek <polacek@redhat.com>
5043
5044 PR c/64610
5045 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5046 with 0/1.
5047
8848828b
JJ
50482015-04-29 Jakub Jelinek <jakub@redhat.com>
5049
5050 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5051 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5052 HOST_BITS_PER_WIDE_INT.
5053
ecd0e562
TV
50542015-04-28 Tom de Vries <tom@codesourcery.com>
5055
5056 PR tree-optimization/65887
5057 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5058
2a877204 50592015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5060 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5061
5062 * c-ada-spec.c (in_function): Delete.
5063 (dump_generic_ada_node): Do not change in_function and remove the
5064 redundant code dealing with it.
5065 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5066 (print_ada_methods): Output the static member functions in a nested
5067 package after the regular methods as well as associated renamings.
5068
4853031e
MP
50692015-04-24 Marek Polacek <polacek@redhat.com>
5070
5071 PR c/65830
5072 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5073 and OPT_Wshift_count_overflow.
5074
8c2b7f79
MP
5075 PR c/63357
5076 * c-common.c (warn_logical_operator): Warn if the operands have the
5077 same expressions.
5078
b8787813
MP
50792015-04-24 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/61534
5082 * c-common.c (warn_logical_operator): Bail if either operand comes
5083 from a macro expansion.
5084
8fba1830
BRF
50852015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5086
5087 PR target/55143
5088 * c-common.c (c_default_pointer_mode): Add definition.
5089 * c-common.h (c_default_pointer_mode): Add declaration.
5090
17958621
JJ
50912015-03-11 Jakub Jelinek <jakub@redhat.com>
5092
5093 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5094 on record_builtin_type argument.
5095
7ccb1a11
JJ
50962015-03-10 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c/65120
5099 * c-common.c (warn_logical_not_parentheses): Don't warn for
5100 !x == 0 or !x != 0.
5101
04fd785e
MP
51022015-03-07 Marek Polacek <polacek@redhat.com>
5103
5104 PR sanitizer/65280
5105 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5106 before trying to figure out whether we have a flexible array member.
5107
a4e26206 51082015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5109 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5110
5111 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5112
0d2489f4
EB
51132015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5114
5115 PR ada/65319
5116 * c-ada-spec.c (print_destructor): Remove obsolete code.
5117
83ed54d7
EB
51182015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5119
5120 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5121 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5122 DECL_TEMPLATE_RESULT emulations.
5123 (dump_ada_template)): Add guard for TYPE_METHODS.
5124
7631f0e2
MP
51252015-02-27 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/65040
5128 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5129
d1783ae5
KT
51302015-02-27 Kai Tietz <ktietz@redhat.com>
5131
5132 PR c/35330
5133 * c-pragma.c (handle_pragma_weak): Do not try to create
5134 weak/alias of declarations not being function, or variable
5135 declarations.
5136
56a9f6bc
TS
51372015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5138
5139 PR libgomp/64625
5140 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5141 Remove macros.
5142 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5143
3d5cb23d
MP
51442015-02-16 Marek Polacek <polacek@redhat.com>
5145
5146 PR c/65066
5147 * c-format.c (check_format_types): Handle null param.
5148
fa008882
MP
51492015-02-13 Marek Polacek <polacek@redhat.com>
5150
5151 PR c/65040
5152 * c-format.c (check_format_types): Don't warn about different
5153 signedness if the original value is in the range of WANTED_TYPE.
5154
785f21af
JM
51552015-02-12 Jason Merrill <jason@redhat.com>
5156
5157 PR c++/64956
5158 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5159 to the current highest version.
5160 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5161
4886ec8e
JJ
51622015-02-04 Jakub Jelinek <jakub@redhat.com>
5163
5164 PR c/64824
5165 PR c/64868
5166 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5167 instead of RDIV_EXPR. Use build_binary_op instead of
5168 build2_loc.
5169
40fecdd6
JM
51702015-01-30 Joseph Myers <joseph@codesourcery.com>
5171
5172 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5173 to pass input_location as first argument.
5174
a0c88d06
TV
51752015-01-23 Tom de Vries <tom@codesourcery.com>
5176
5177 PR libgomp/64672
5178 * c.opt (fopenacc): Mark as LTO option.
5179
1506ae0e
TV
51802015-01-23 Tom de Vries <tom@codesourcery.com>
5181
5182 PR libgomp/64707
5183 * c.opt (fopenmp): Mark as LTO option.
5184
31be63ab
JJ
51852015-01-21 Jakub Jelinek <jakub@redhat.com>
5186
5187 PR c/63307
b1726d6c 5188 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5189 (compare_decls): Fix up formatting.
5190
51912015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5192
5193 PR c/63307
5194 * cilk.c: Include vec.h.
5195 (struct cilk_decls): New structure.
5196 (wrapper_parm_cb): Split this function to...
5197 (fill_decls_vec): ...this...
5198 (create_parm_list): ...and this.
5199 (compare_decls): New function.
5200 (for_local_cb): Remove.
5201 (wrapper_local_cb): Ditto.
5202 (build_wrapper_type): For now first traverse and fill vector of
5203 declarations then sort it and then deal with sorted vector.
5204 (cilk_outline): Ditto.
5205 (declare_one_free_variable): Ditto.
5206
6875457f
JM
52072015-01-21 Jason Merrill <jason@redhat.com>
5208
5209 PR c++/64629
5210 * c-format.c (check_format_arg): Call decl_constant_value.
5211
185c9e56
ML
52122015-01-19 Martin Liska <mliska@suse.cz>
5213
5214 * c-common.c (handle_noicf_attribute): New function.
5215
41dbbb37
TS
52162015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5217 Bernd Schmidt <bernds@codesourcery.com>
5218 James Norris <jnorris@codesourcery.com>
5219 Cesar Philippidis <cesar@codesourcery.com>
5220 Ilmir Usmanov <i.usmanov@samsung.com>
5221 Jakub Jelinek <jakub@redhat.com>
5222
5223 * c.opt (fopenacc): New option.
5224 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5225 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5226 New macros.
5227 * c-common.h (c_finish_oacc_wait): New prototype.
5228 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5229 (c_finish_oacc_wait): New function.
5230 * c-pragma.c (oacc_pragmas): New variable.
5231 (c_pp_lookup_pragma, init_pragma): Handle it.
5232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5233 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5234 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5235 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5236 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5237 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5238 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5239 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5240 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5241 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5242 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5243 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5244 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5245 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5246 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5247 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5248 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5249 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5250 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5251 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5252 PRAGMA_OACC_CLAUSE_WORKER.
5253
3f8257db 52542015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5255
5256 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5257 for the new option fstack-protector_explicit.
5258 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5259 (handle_stack_protect_attribute): New function.
5260
3f8257db 52612015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5262
5263 * c.opt: New option -Warray-bounds=.
5264
adfac8df
JJ
52652015-01-09 Michael Collison <michael.collison@linaro.org>
5266
5267 * array-notation-common.c: Include hash-set.h, machmode.h,
5268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5269 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5270 * c-ada-spec.c: Ditto.
5271 * c-cilkplus.c: Ditto.
5272 * c-common.c: Include input.h due to flattening of tree.h.
5273 Define macro GCC_C_COMMON_C.
5274 * c-common.h: Flatten tree.h header files into c-common.h.
5275 Remove include of tree-core.h.
5276 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5277 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5278 fold-const.h, wide-int.h, and inchash.h due to
5279 flattening of tree.h.
5280 * c-dump.c: Ditto.
5281 * c-format.c: Flatten tree.h header files into c-common.h.
5282 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5283 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5284 fold-const.h, wide-int.h, and inchash.h due to
5285 flattening of tree.h.
5286 * c-dump.c: Include hash-set.h, machmode.h,
5287 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5288 fold-const.h, wide-int.h, and inchash.h due to
5289 flattening of tree.h.
5290 * c-format.c: Include hash-set.h, machmode.h,
5291 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5292 fold-const.h, wide-int.h, inchash.h and real.h due to
5293 flattening of tree.h.
5294 * c-gimplify.c: Include hash-set.h, machmode.h,
5295 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5296 fold-const.h, wide-int.h, and inchash.h due to
5297 flattening of tree.h.
5298 * cilk.c: Ditto.
5299 * c-lex.c: Ditto.
5300 * c-omp.c: Ditto.
5301 * c-opts.c: Ditto.
5302 * c-pch.c: Ditto.
5303 * c-ppoutput.c: Ditto.
5304 * c-pragma.c: Ditto.
5305 * c-pretty-print.c: Ditto.
5306 * c-semantics.c: Ditto.
5307 * c-ubsan.c: Ditto.
5308 * stub-objc.c: Ditto.
5309
f5481fc4
JM
53102015-01-08 Jason Merrill <jason@redhat.com>
5311
5312 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5313 do_ubsan_in_current_function.
5314 (ubsan_maybe_instrument_reference_or_call): Likewise.
5315 * c-ubsan.h: Declare it.
5316
de35aa66
MS
53172015-01-08 Mike Stump <mikestump@comcast.net>
5318
5319 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5320
4a9a42ab
MP
53212015-01-07 Marek Polacek <polacek@redhat.com>
5322
5323 PR c/64440
5324 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5325 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5326
2f42e5de
TS
53272015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5328
5329 PR c++/31397
5330 * c.opt (Wsuggest-override): New option.
5331
5624e564
JJ
53322015-01-05 Jakub Jelinek <jakub@redhat.com>
5333
5334 Update copyright years.
5335
5bd012f8
MP
53362015-01-05 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/64423
5339 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5340 parameter. Use it.
5341 * c-common.h (warn_array_subscript_with_type_char): Update
5342 declaration.
5343
a7fa8d18
ESR
53442014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5345
5346 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5347 Control macro with flag_sized_deallocation.
5348
3f8257db 53492014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5350
5351 * c.opt (Wdiscarded-array-qualifiers): New option.
5352
1f8d3e84
JJ
53532014-12-19 Jakub Jelinek <jakub@redhat.com>
5354
5355 PR preprocessor/63831
5356 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5357 and __has_cpp_attribute here.
5358 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5359 c_common_has_attribute.
5360 * c-common.h (c_common_has_attribute): New prototype.
5361 * c-lex.c (init_c_lex): Set cb->has_attribute to
5362 c_common_has_attribute instead of cb_has_attribute.
5363 (get_token_no_padding): New function.
5364 (cb_has_attribute): Renamed to ...
5365 (c_common_has_attribute): ... this. No longer static. Use
5366 get_token_no_padding, require ()s, don't build TREE_LIST
5367 unnecessarily, fix up formatting, adjust diagnostics, call
5368 init_attributes.
5369
20b06add
JM
53702014-12-15 Jason Merrill <jason@redhat.com>
5371
5372 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5373 (-Wsized-deallocation): New.
5374 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5375 to on in C++14 and up.
5376
94a073b2
JM
53772014-12-11 Jason Merrill <jason@redhat.com>
5378
acaa5911
JM
5379 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5380
94a073b2
JM
5381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5382 we aren't complaining about VLAs.
5383
7fb66c15
MP
53842014-12-06 Marek Polacek <polacek@redhat.com>
5385
5386 PR tree-optimization/64183
5387 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5388 shift-expression if it is integer_type_node. Use types_compatible_p.
5389
b731b390
JJ
53902014-11-29 Jakub Jelinek <jakub@redhat.com>
5391
5392 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5393 last argument from create_tmp_var_raw and create_tmp_var calls.
5394 * cilk.c (gimplify_cilk_spawn): Likewise.
5395 * c-omp.c (c_finish_omp_atomic): Likewise.
5396
6a4da643
MP
53972014-11-28 Marek Polacek <polacek@redhat.com>
5398
5399 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5400 instead of unsigned_type_node.
5401
541e35a6
MP
54022014-11-28 Marek Polacek <polacek@redhat.com>
5403
5404 PR c/63862
5405 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5406 to op1_utype.
5407 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5408 expression to unsigned_type_node.
5409
dcc97066
MW
54102014-11-20 Mark Wielaard <mjw@redhat.com>
5411
5412 PR debug/38757
5413 * c-opts.c (set_std_c89): Set lang_hooks.name.
5414 (set_std_c99): Likewise.
5415 (set_std_c11): Likewise.
5416 (set_std_cxx98): Likewise.
5417 (set_std_cxx11): Likewise.
5418 (set_std_cxx14): Likewise.
5419 (set_std_cxx1z): Likewise.
5420
aa7da51a
JJ
54212014-11-21 Jakub Jelinek <jakub@redhat.com>
5422
5423 PR target/63764
5424 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5425 return type to bool.
009a3480 5426 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5427 (convert_vector_to_pointer_for_subscript): Change return type to
5428 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5429 and copy it into a TARGET_EXPR and use that instead of *vecp
5430 directly.
5431
538dd0b7
DM
54322014-11-19 David Malcolm <dmalcolm@redhat.com>
5433
5434 Merger of git branch "gimple-classes-v2-option-3".
5435 * ChangeLog.gimple-classes: New.
5436 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5437 from being just a vec<gimple> to a vec<gbind *>.
5438
c39a5e99
JJ
54392014-11-18 Jakub Jelinek <jakub@redhat.com>
5440
5441 PR sanitizer/63813
5442 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5443 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5444 get_pointer_alignment for non-pointers. Use ptype, or if it is
5445 reference type, corresponding pointer type, as type of kind
5446 argument.
5447 (ubsan_maybe_instrument_reference,
5448 ubsan_maybe_instrument_member_call): Adjust callers.
5449
8537a4a9
MP
54502014-11-15 Marek Polacek <polacek@redhat.com>
5451
5452 PR middle-end/63884
5453 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5454 for NULL fndecl.
5455 (extract_array_notation_exprs): Return for NULL node.
5456
2079956a
JM
54572014-11-12 Joseph Myers <joseph@codesourcery.com>
5458
5459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5460 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5461
1304953e
JJ
54622014-11-12 Jakub Jelinek <jakub@redhat.com>
5463
5464 PR c/59708
5465 * c-common.c (check_builtin_function_arguments): Handle
5466 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5467
e5e44252
AK
54682014-11-10 Andi Kleen <ak@linux.intel.com>
5469
5470 PR c/60804
5471 * c-common.h (check_no_cilk): Declare.
5472 * cilk.c (get_error_location): New function.
5473 (check_no_cilk): Dito.
5474
e64b984d
AK
54752014-11-10 Andi Kleen <ak@linux.intel.com>
5476
5477 * cilk.c (recognize_spawn): Use expression location
5478 for error message.
5479
13c21655
PC
54802014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5481
5482 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5483
42fd12b1
ESR
54842014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5485
5486 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5487 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5488 (__cpp_range_based_for, __cpp_initializer_lists,
5489 __cpp_delegating_constructors, __cpp_nsdmi,
5490 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5491 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5492 __has_cpp_attribute.
5493 * c-lex.c (cb_has_attribute): New callback CPP function;
5494 (init_c_lex): Set has_attribute callback.
5495
6f450181
RB
54962014-11-04 Richard Biener <rguenther@suse.de>
5497
5498 * c-common.c (shorten_compare): Do not shorten mixed
5499 DFP and non-DFP compares.
5500
26f0e1d6
ESR
55012014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5502
5503 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5504 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5505 Commentary and rearrangement of tests.
5506 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5507 Commentary and rearrangement of tests.
5508 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5509 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5510
ef4bddc2
RS
55112014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5512
5513 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5514 enum from machine_mode.
5515
c582198b
AM
55162014-10-28 Andrew MacLeod <amacleod@redhat.com>
5517
adfac8df
JJ
5518 * c-common.c: Adjust include files.
5519 * c-gimplify.c: Ditto.
5520 * cilk.c: Ditto.
5521 * c-pragma.c: Ditto.
5522 * c-ubsan.c: Ditto.
c582198b 5523
60393bbc
AM
55242014-10-27 Andrew MacLeod <amacleod@redhat.com>
5525
5526 * c-gimplify.c: Adjust include files.
5527
d723bb7c
MLI
55282014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5529
5530 PR c++/53061
5531 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5532 c_common_initialize_diagnostics.
5533 * c-common.h: Likewise.
5534
90f3520e
MP
55352014-10-24 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/56980
5538 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5539 print "struct"/"union"/"enum" for typedefed names.
5540
59d7607a
MP
55412014-10-23 Marek Polacek <polacek@redhat.com>
5542
5543 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5544 in unsigned type.
5545
d95a2703
JJ
55462014-10-22 Jakub Jelinek <jakub@redhat.com>
5547 Yury Gribov <y.gribov@samsung.com>
5548
5549 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5550 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5551 instead of flag_sanitize_recover as bool flag.
5552
8e6ef852
KY
55532014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5554
5555 * cilk.c: Revert previous change.
5556
948cf550
IZ
55572014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5558
5559 PR c/63307
5560 * cilk.c: Include vec.h.
5561 (struct cilk_decls): New structure.
5562 (wrapper_parm_cb): Split this function to...
5563 (fill_decls_vec): ...this...
5564 (create_parm_list): ...and this.
5565 (compare_decls): New function.
5566 (for_local_cb): Remove.
5567 (wrapper_local_cb): Ditto.
5568 (build_wrapper_type): For now first traverse and fill vector of
5569 declarations then sort it and then deal with sorted vector.
5570 (cilk_outline): Ditto.
5571 (declare_one_free_variable): Ditto.
5572
92574c7c
MP
55732014-10-17 Marek Polacek <polacek@redhat.com>
5574
5575 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5576 * c.opt (Wimplicit-int): Initialize to -1.
5577
83685514
AM
55782014-10-16 Andrew MacLeod <amacleod@redhat.com>
5579
5580 * c-pragma.c: Adjust include files.
5581 * c-semantics.c: Likewise.
5582
5b8300ea
DD
55832014-10-16 DJ Delorie <dj@redhat.com>
5584
5585 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5586 multiples of bytes.
5587
5f83e90b
JM
55882014-10-14 Jason Merrill <jason@redhat.com>
5589
5590 PR c++/63455
5591 * c-common.h (CPP_PREPARSED_EXPR): New.
5592 (N_CP_TTYPES): Adjust.
5593
d73326ca
MP
55942014-10-15 Marek Polacek <polacek@redhat.com>
5595
5596 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5597
78a7c317
DD
55982014-10-14 DJ Delorie <dj@redhat.com>
5599
5600 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5601 types, not just __int128.
5602 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5603 types, not just __int128.
5604 (cpp_atomic_builtins): Round pointer sizes up.
5605 (type_suffix): Use type precision, not specific types.
5606 * c-common.c (c_common_reswords): Remove __int128 special case.
5607 (c_common_type_for_size): Check for all __intN types, not just
5608 __int128.
5609 (c_common_type_for_mode): Likewise.
5610 (c_common_signed_or_unsigned_type): Likewise.
5611 (c_build_bitfield_integer_type): Likewise.
5612 (c_common_nodes_and_builtins): Likewise.
5613 (keyword_begins_type_specifier): Likewise.
5614 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5615 __intN variants.
5616
2a22f99c
TS
56172014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5618
5619 * c-common.c: Use hash_table instead of hashtab.
5620
2a8ef767
ESR
56212014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5622
adfac8df 5623 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5624 C++11 section.
5625
3c9aabbd
MG
56262014-10-03 Marc Glisse <marc.glisse@inria.fr>
5627
5628 PR c++/54427
5629 PR c++/57198
5630 PR c++/58845
5631 * c-common.c (warn_logical_operator): Punt for vectors.
5632
a15f7cb8
ESR
56332014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5634
5635 Implement SD-6: SG10 Feature Test Recommendations
5636 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5637 macros and the __has_header macro.
5638
8d0cf15e
JM
56392014-09-30 Jason Merrill <jason@redhat.com>
5640
dd5d5481
JM
5641 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5642 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5643 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5644
b752325e
JM
5645 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5646 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5647
8d0cf15e
JM
5648 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5649 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5650
083e891e
MP
56512014-09-24 Marek Polacek <polacek@redhat.com>
5652
5653 PR c/61405
5654 PR c/53874
5655 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5656
7861b648
AK
56572014-09-23 Andi Kleen <ak@linux.intel.com>
5658
5659 * c-common.c (handle_no_reorder_attribute): New function.
5660 (c_common_attribute_table): Add no_reorder attribute.
5661
9a79452d
JM
56622014-09-22 Joseph Myers <joseph@codesourcery.com>
5663
5664 * c-cppbuiltin.c (c_cpp_builtins): Define
5665 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5666 modes.
5667
dd69f047
JM
56682014-09-18 Joseph Myers <joseph@codesourcery.com>
5669
5670 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5671 for supported floating-point modes.
5672
737a4826
MLI
56732014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5674
5675 * c.opt (Wpsabi): Use LangEnabledBy.
5676 * c-opts.c (c_common_handle_option): Do not handle here.
5677
8cc4b7a2
JM
56782014-09-12 Joseph Myers <joseph@codesourcery.com>
5679
5680 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5681 macros for floating-point modes.
5682
179b5a55
MG
56832014-09-11 Marc Glisse <marc.glisse@inria.fr>
5684
5685 PR target/58757
5686 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5687 __*_DENORM_MIN__ without denormals.
5688
570a11fe
JJ
56892014-09-10 Jakub Jelinek <jakub@redhat.com>
5690
5691 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5692 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5693 ubsan_create_data callers.
5694 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5695 index is constant or BIT_AND_EXPR with constant mask and is
5696 small enough for the bound.
5697 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5698 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5699
b559c810
MLI
57002014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5701
5702 * c.opt: Add CppReason to various flags.
5703 (Wdate-time): Re-sort.
5704 * c-common.c: Include c-common.h earlier.
5705 (struct reason_option_codes_t): Delete.
5706 (c_option_controlling_cpp_error): Prefix global type and struct
5707 with cpp_.
5708
1ef33fd4
MLI
57092014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5710
5711 * c.opt (Wnormalized): New.
5712 (Wnormalized=): Use Enum and Reject Negative.
5713 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5714
66bb34c0
JM
57152014-09-08 Joseph Myers <joseph@codesourcery.com>
5716
5717 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5718 digits of floating-point modes if -fbuilding-libgcc.
5719
53d68b9f
JM
57202014-09-05 Joseph Myers <joseph@codesourcery.com>
5721
5722 * c-cppbuiltin.c (c_cpp_builtins): Also define
5723 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5724 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5725 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5726 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5727 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5728 __LIBGCC_STACK_GROWS_DOWNWARD__,
5729 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5730 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5731 __LIBGCC_DWARF_FRAME_REGISTERS__,
5732 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5733 __LIBGCC_STACK_POINTER_REGNUM__ and
5734 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5735 (builtin_define_with_value): Handle backslash-escaping in string
5736 macro values.
5737
f65586dc
RB
57382014-09-05 Richard Biener <rguenther@suse.de>
5739
5740 PR middle-end/63148
5741 * c-format.c (check_format_arg): Properly handle
5742 effectively signed POINTER_PLUS_EXPR offset.
5743
2b71f4a4
MLI
57442014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5745
5746 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5747 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5748 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5749 and Init.
5750 * c-opts.c (c_common_handle_option): Do not handle here.
5751 (sanitize_cpp_opts): Likewise.
5752 * c-common.c (struct reason_option_codes_t): Handle
5753 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5754
d2e4feca
MP
57552014-09-03 Marek Polacek <polacek@redhat.com>
5756
5757 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5758
9a771876
JJ
57592014-09-02 Jakub Jelinek <jakub@redhat.com>
5760 Balaji V. Iyer <balaji.v.iyer@intel.com>
5761 Igor Zamyatin <igor.zamyatin@intel.com>
5762
5763 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5764 * c-common.c (c_common_reswords): Added _Cilk_for.
5765 * c-common.h (enum rid): Added RID_CILK_FOR.
5766 (cilk_for_number_of_iterations): Add declaration.
5767 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5768 CILK_FOR.
5769 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5770 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5771
81b5d104
MLI
57722014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5773
5774 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5775 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5776 Wundef): Use CPP, Var and Init.
5777 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5778
b753b37b
MLI
57792014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5780
5781 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5782 * c-opts.c (c_common_handle_option): Do not handle here.
5783
028aee17
JM
57842014-08-25 Jason Merrill <jason@redhat.com>
5785
5786 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5787 -std=c++14 and -std=gnu++14, rather than the reverse.
5788 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5789 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5790 * c-common.h (cxx_dialect): Remove cxx1y.
5791
e4276ba5
ESR
57922014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5793
5794 * c-common.h (enum cxx_dialect): Add cxx14.
5795 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5796 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5797 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5798
a545cacd
JM
57992014-08-22 Jason Merrill <jason@redhat.com>
5800
5801 * c.opt (std=gnu++17): Fix alias.
5802
59ea0364
MP
58032014-08-22 Marek Polacek <polacek@redhat.com>
5804
5805 PR c++/62199
5806 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5807 check for vector types. Drop LHS argument.
5808 * c-common.h (warn_logical_not_parentheses): Adjust.
5809
596e808c
MLI
58102014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5811
5812 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5813 (Wmultichar): Likewise.
5814 (Wdate-time): Use C-family languages instead of Common. Use CPP
5815 and Var.
5816 * c-opts.c (c_common_handle_option): Do not handle the above
5817 options here.
5818 (sanitize_cpp_opts): Likewise.
5819
18767f65
MLI
58202014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5821
5822 PR fortran/44054
5823 * c-opts.c: Include tree-diagnostics.h.
5824 (c_diagnostic_finalizer): New.
5825 (c_common_initialize_diagnostics): Use it.
5826
b4413594
MLI
58272014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5828
5829 PR preprocessor/51303
5830 * c-common.c (struct reason_option_codes_t option_codes):
5831 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5832
43f9a13c
MLI
58332014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5834
5835 PR c/60975
5836 PR c/53063
5837 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5838 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5839 (c_common_post_options): Call init_global_opts_from_cpp.
5840 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5841
04159acf
MP
58422014-08-19 Marek Polacek <polacek@redhat.com>
5843
5844 PR c++/62153
5845 * c-common.c (maybe_warn_bool_compare): New function.
5846 * c-common.h (maybe_warn_bool_compare): Declare.
5847 * c.opt (Wbool-compare): New option.
5848
35aff4fb
MP
58492014-08-19 Marek Polacek <polacek@redhat.com>
5850
5851 * c.opt (Wc99-c11-compat): New option.
5852
177cce46
MP
58532014-08-19 Marek Polacek <polacek@redhat.com>
5854
5855 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5856 to warn_c90_c99_compat.
5857 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5858 to -1.
5859
6ae9194f
MLI
58602014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5861 Steven Bosscher <steven@gcc.gnu.org>
5862
5863 PR c/52952
5864 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5865 format_check_results.
5866 (check_function_format): Use true and add comment for boolean
5867 argument.
5868 (finish_dollar_format_checking): Use explicit location when warning.
5869 (check_format_info): Likewise.
5870 (check_format_arg): Set extra_arg_loc and format_string_loc.
5871 (check_format_info_main): Use explicit location when warning.
5872 (check_format_types): Pass explicit location.
5873 (format_type_warning): Likewise.
5874
8e54f6d3
MLI
58752014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5876
5877 PR fortran/44054
5878 * c-format.c: Handle Fortran flags.
5879
cd4e76fc
IZ
58802014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5881
5882 PR other/61962
5883 * array-notation-common.c (find_rank): Added handling for other
5884 types of references.
5885
f3bede71
MP
58862014-08-10 Marek Polacek <polacek@redhat.com>
5887
5888 PR c/51849
5889 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5890 * c.opt (Wc90-c99-compat): Add option.
5891
9f25a338
TS
58922014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5893
5894 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5895
62e4eb35
MP
58962014-08-03 Marek Polacek <polacek@redhat.com>
5897
5898 * c-common.c (check_case_value): Add location_t parameter. Use it.
5899 (c_add_case_label): Pass loc to check_case_value.
5900
b787e7a2
TS
59012014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5902
5903 * cilk.c: Use hash_map instead of pointer_map.
5904
6e2830c3
TS
59052014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5906
5907 * c-gimplify.c: Use hash_set instead of pointer_set.
5908
a7ee52fb
IZ
59092014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5910
5911 PR middle-end/61455
5912 * array-notation-common.c (extract_array_notation_exprs): Handling
5913 of DECL_EXPR added.
5914
944fa280
JJ
59152014-08-01 Jakub Jelinek <jakub@redhat.com>
5916
5917 * c-common.h (min_align_of_type): Removed prototype.
5918 * c-common.c (min_align_of_type): Removed.
5919 * c-ubsan.h (ubsan_maybe_instrument_reference,
5920 ubsan_maybe_instrument_member_call): New prototypes.
5921 * c-ubsan.c: Include stor-layout.h and builtins.h.
5922 (ubsan_maybe_instrument_reference_or_call,
5923 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5924 functions.
5925
b4dfdc11
MG
59262014-07-31 Marc Glisse <marc.glisse@inria.fr>
5927
5928 PR c++/60517
5929 * c.opt (-Wreturn-local-addr): Move to common.opt.
5930
a41844e5
JM
59312014-07-30 Jason Merrill <jason@redhat.com>
5932
5933 PR c++/61659
5934 PR c++/61687
5935 Revert:
5936 * c.opt (-fuse-all-virtuals): New.
5937
976d5a22
TT
59382014-07-30 Tom Tromey <tromey@redhat.com>
5939
5940 PR c/59855
5941 * c.opt (Wdesignated-init): New option.
5942 * c-common.c (c_common_attribute_table): Add "designated_init".
5943 (handle_designated_init): New function.
5944
cdc94aca
MP
59452014-07-24 Marek Polacek <polacek@redhat.com>
5946
5947 PR c/57653
5948 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5949
f41373b6
DS
59502014-07-16 Dodji Seketeli <dodji@redhat.com>
5951
5952 PR preprocessor/60723 - missing system-ness marks for macro tokens
5953 * c-ppoutput.c (struct print::prev_was_system_token): New data
5954 member.
5955 (init_pp_output): Initialize it.
5956 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5957 (do_line_change): Return a flag saying if a line marker was
5958 emitted or not.
5959 (scan_translation_unit): Detect if the system-ness of the token we
5960 are about to emit is different from the one of the previously
5961 emitted token. If so, emit a line marker. Avoid emitting useless
5962 adjacent line markers. Avoid emitting line markers for tokens
5963 originating from the expansion of built-in macros.
5964 (scan_translation_unit_directives_only): Adjust.
5965
4d661eaa
MP
59662014-07-15 Marek Polacek <polacek@redhat.com>
5967
5968 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5969 TYPE_MAX_VALUE is NULL.
5970
b108f48f
JJ
59712014-07-14 Jakub Jelinek <jakub@redhat.com>
5972
5973 PR middle-end/61294
5974 * c.opt (Wmemset-transposed-args): New warning.
5975
c0221884
JM
59762014-07-10 Jason Merrill <jason@redhat.com>
5977
5978 PR c++/61659
5979 PR c++/61687
5980 * c.opt (-fuse-all-virtuals): New.
5981
63dfbb95
RB
59822014-07-09 Richard Biener <rguenther@suse.de>
5983
5984 PR c-family/61741
5985 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5986 using unsigned arithmetic if overflow does not wrap instead of
5987 if overflow is undefined.
5988
773ec47f
MP
59892014-07-06 Marek Polacek <polacek@redhat.com>
5990
5991 PR c/6940
5992 * c.opt (Wsizeof-array-argument): New option.
5993
00a7ba58
JJ
59942014-07-03 Jakub Jelinek <jakub@redhat.com>
5995
b1726d6c 5996 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
5997 comments->count <= 1, as comments->entries might be NULL.
5998
52ec0ea3
MP
59992014-07-01 Marek Polacek <polacek@redhat.com>
6000
6001 * c.opt (Wint-conversion): New option.
6002
d5c3d343
MP
60032014-07-01 Marek Polacek <polacek@redhat.com>
6004
6005 PR c/58286
6006 * c.opt (Wincompatible-pointer-types): New option.
6007
6e7ceb17
PC
60082014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6009
6010 PR c++/51400
6011 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6012 Do not discard TYPE_QUALS of type.
6013
da73100b
JM
60142014-06-26 Jason Merrill <jason@redhat.com>
6015
6016 * c-common.h (enum cxx_dialect): Add cxx1z.
6017 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6018 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6019
08eedf75
TJ
60202014-06-26 Teresa Johnson <tejohnson@google.com>
6021
6022 * c-common.h (get_dump_info): Declare.
6023 * c-gimplify.c (c_genericize): Use saved dump files.
6024 * c-opts.c (c_common_parse_file): Begin and end dumps
6025 once around parsing invocation.
6026 (get_dump_info): New function.
6027
7b56b2f8
MP
60282014-06-23 Marek Polacek <polacek@redhat.com>
6029 Andrew MacLeod <amacleod@redhat.com>
6030
6031 PR c/61553
6032 * c-common.c (get_atomic_generic_size): Don't segfault if the
6033 type doesn't have a size.
6034
0e37a2f3
MP
60352014-06-20 Marek Polacek <polacek@redhat.com>
6036
6037 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6038 (ubsan_walk_array_refs_r): New function.
6039 (c_genericize): Instrument array bounds.
6040 * c-ubsan.c: Include "internal-fn.h".
6041 (ubsan_instrument_division): Mark instrumented arrays as having
6042 side effects. Adjust ubsan_type_descriptor call.
6043 (ubsan_instrument_shift): Likewise.
6044 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6045 (ubsan_instrument_bounds): New function.
6046 (ubsan_array_ref_instrumented_p): New function.
6047 (ubsan_maybe_instrument_array_ref): New function.
6048 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6049 (ubsan_array_ref_instrumented_p): Declare.
6050 (ubsan_maybe_instrument_array_ref): Declare.
6051
60522014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6053
6054 PR lto/61123
6055 * c.opt (fshort-enums): Add to LTO.
6056 * c.opt (fshort-wchar): Likewise.
6057
5c3d09f7
MP
60582014-06-16 Marek Polacek <polacek@redhat.com>
6059
6060 PR c/60439
6061 * c.opt (Wswitch-bool): Add Var.
6062
9cf32741
JJ
60632014-06-12 Jakub Jelinek <jakub@redhat.com>
6064
6065 PR middle-end/61486
6066 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6067 #pragma omp target teams or
6068 #pragma omp {,target }teams distribute simd.
6069
62984918
JM
60702014-06-12 Jason Merrill <jason@redhat.com>
6071
6072 * c.opt (Wabi=, fabi-compat-version): New.
6073 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6074 (c_common_post_options): Handle flag_abi_compat_version default.
6075 Disallow -fabi-compat-version=1.
6076 * c-common.h (abi_version_crosses): New.
6077
f961457f
JH
60782014-06-11 Jan Hubicka <hubicka@ucw.cz>
6079
adfac8df 6080 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6081 section names that are no longer trees.
6082
92d28cbb
JJ
60832014-06-10 Jakub Jelinek <jakub@redhat.com>
6084
6085 PR fortran/60928
6086 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6087 (omp_pragmas): ... back here.
6088
742938c9
MP
60892014-06-05 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/49706
6092 * c-common.c (warn_logical_not_parentheses): New function.
6093 * c-common.h (warn_logical_not_parentheses): Declare.
6094 * c.opt (Wlogical-not-parentheses): New option.
6095
9d548dfb
MP
60962014-06-04 Marek Polacek <polacek@redhat.com>
6097
6098 PR c/30020
6099 * c-common.c (check_case_bounds): Add location parameter.
6100 Use it.
6101 (c_add_case_label): Pass loc to check_case_bounds.
6102
fedfecef
MP
61032014-06-03 Marek Polacek <polacek@redhat.com>
6104
6105 PR c/60439
6106 * c.opt (Wswitch-bool): New option.
6107
f6a7cffc
TS
61082014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6109
040d18b6
TS
6110 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6111 Remove prototypes.
6112 (record_types_used_by_current_var_decl): Move prototype to where
6113 it belongs.
6114
f6a7cffc
TS
6115 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6116 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6117 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6118
632f2871
RS
61192014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6120
6121 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6122 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6123 void_zero_node.
6124 * c-pretty-print.c (pp_c_void_constant): New function.
6125 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6126 (c_pretty_printer::expression): Handle VOID_CST.
6127 * cilk.c (extract_free_variables): Likewise.
6128 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6129 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6130
766090c2
TS
61312014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6132
6133 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6134 * c-pragma.c (push_alignment): Adjust.
6135 (handle_pragma_push_options): Likewise.
6136
661a0813
MP
61372014-05-09 Marek Polacek <polacek@redhat.com>
6138
6139 PR c/50459
6140 * c-common.c (check_user_alignment): Return -1 if alignment is error
6141 node.
6142 (handle_aligned_attribute): Don't call default_conversion on
6143 FUNCTION_DECLs.
6144 (handle_vector_size_attribute): Likewise.
6145 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6146 (handle_sentinel_attribute): Call default_conversion and allow even
6147 integral types as an argument.
6148
2793eeab
MP
61492014-05-08 Marek Polacek <polacek@redhat.com>
6150
6151 PR c/61053
6152 * c-common.c (min_align_of_type): New function factored out from...
6153 (c_sizeof_or_alignof_type): ...here.
6154 * c-common.h (min_align_of_type): Declare.
6155
f827930a
MP
61562014-05-08 Marek Polacek <polacek@redhat.com>
6157
6158 PR c/61077
6159 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6160 parameter type of main.
6161
ca49b74e
DD
61622014-05-07 DJ Delorie <dj@redhat.com>
6163
6164 * c-cppbuiltin.c (print_bits_of_hex): New.
6165 (builtin_define_type_minmax): Print values using hex so as not to
6166 require a pre-computed list of string values.
6167
1d60af08
KZ
61682014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6169 Mike Stump <mikestump@comcast.net>
6170 Richard Sandiford <rdsandiford@googlemail.com>
6171
6172 * c-ada-spec.c: Include wide-int.h.
6173 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6174 (dump_generic_ada_node): Use wide-int interfaces.
6175 * c-common.c: Include wide-int-print.h.
6176 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6177 (pointer_int_sum): Use wide-int interfaces.
6178 (c_common_nodes_and_builtins): Use make_int_cst.
6179 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6180 (handle_alloc_size_attribute): Use wide-int interfaces.
6181 (get_nonnull_operand): Likewise.
6182 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6183 * c-lex.c: Include wide-int.h.
6184 (narrowest_unsigned_type): Take a widest_int rather than two
6185 HOST_WIDE_INTs.
6186 (narrowest_signed_type): Likewise.
6187 (interpret_integer): Update accordingly. Use wide-int interfaces.
6188 (lex_charconst): Use wide-int interfaces.
6189 * c-pretty-print.c: Include wide-int.h.
6190 (pp_c_integer_constant): Use wide-int interfaces.
6191 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6192 INT_CST_LT_UNSIGNED.
6193
b15458be
RB
61942014-05-06 Richard Biener <rguenther@suse.de>
6195
6196 * c-opts.c (c_common_post_options): For -freestanding,
6197 -fno-hosted and -fno-builtin disable pattern recognition
6198 if not enabled explicitely.
6199
6577374e
MP
62002014-05-02 Marek Polacek <polacek@redhat.com>
6201
6202 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6203
d00887e8
MP
62042014-05-01 Marek Polacek <polacek@redhat.com>
6205
6206 PR c/43245
6207 * c.opt (Wdiscarded-qualifiers): Add.
6208
f8ed5150
MP
62092014-04-30 Marek Polacek <polacek@redhat.com>
6210
6211 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6212 INT_MIN / -1 sanitization only for integer types.
6213
45484dcf
MP
62142014-04-25 Marek Polacek <polacek@redhat.com>
6215
6216 PR c/18079
6217 * c-common.c (handle_noinline_attribute): Warn if the attribute
6218 conflicts with always_inline attribute.
6219 (handle_always_inline_attribute): Warn if the attribute conflicts
6220 with noinline attribute.
6221
38e514c0
MP
62222014-04-25 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/60156
6225 * c-common.c (check_main_parameter_types): Warn about variadic main.
6226
44875f92
MS
62272014-04-24 Mike Stump <mikestump@comcast.net>
6228
6229 * c.opt (Wshadow-ivar): Default to on.
6230
dcaaa5a0
DP
62312014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6232
6233 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6234
c07d7c02
MP
62352014-04-23 Marek Polacek <polacek@redhat.com>
6236
6237 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6238
1c33c9b7
JJ
62392014-04-22 Jakub Jelinek <jakub@redhat.com>
6240
6241 PR sanitizer/60275
6242 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6243 if flag_sanitize_undefined_trap_on_error.
6244 (ubsan_instrument_division, ubsan_instrument_shift,
6245 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6246 if !flag_sanitize_recover.
6247
793c625f
MG
62482014-04-22 Marc Glisse <marc.glisse@inria.fr>
6249
6250 PR libstdc++/43622
6251 * c-common.c (registered_builtin_types): Make non-static.
6252 * c-common.h (registered_builtin_types): Declare.
6253
b0f1bf36
RB
62542014-04-14 Richard Biener <rguenther@suse.de>
6255 Marc Glisse <marc.glisse@inria.fr>
6256
6257 PR c/60819
6258 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6259 apply may-alias the scalar pointer type when applicable.
6260
3b07fa4a
IZ
62612014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6262
6263 PR middle-end/60467
6264 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6265 as possible argument for Cilk_spawn.
6266
cbbd2b1c
TB
62672014-04-11 Tobias Burnus <burnus@net-b.de>
6268
6269 PR c/60194
6270 * c.opt (Wformat-signedness): Add
6271 * c-format.c(check_format_types): Use it.
6272
6415bd5d
JM
62732014-04-11 Jason Merrill <jason@redhat.com>
6274
6275 PR c++/57926
6276 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6277 default_conversion for an array argument.
6278
6525783a
MP
62792014-04-08 Marek Polacek <polacek@redhat.com>
6280
6281 PR sanitizer/60745
6282 * c-ubsan.c: Include asan.h.
6283 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6284
880a467b
NS
62852014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6286
6287 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6288
7b59ff2d
MP
62892014-04-02 Marek Polacek <polacek@redhat.com>
6290
6291 * c-common.h (c_expand_expr): Remove declaration.
6292
8edbfaa6
JJ
62932014-03-28 Jakub Jelinek <jakub@redhat.com>
6294
6295 PR c++/60689
6296 * c-common.c (add_atomic_size_parameter): When creating new
6297 params vector, push the size argument first.
6298
07d72e1d
JJ
62992014-03-26 Jakub Jelinek <jakub@redhat.com>
6300
6301 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6302 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6303 ubsan_create_data callers.
6304
b35e0fa0
JJ
63052014-03-22 Jakub Jelinek <jakub@redhat.com>
6306
6307 PR debug/60603
6308 * c-opts.c (c_finish_options): Restore cb_file_change call to
6309 <built-in>.
6310
39a1ebb3
JJ
63112014-03-13 Jakub Jelinek <jakub@redhat.com>
6312
6313 PR middle-end/36282
6314 * c-pragma.c (apply_pragma_weak): Only look at
6315 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6316 DECL_ASSEMBLER_NAME_SET_P (decl).
6317 (maybe_apply_pending_pragma_weaks): Exit early if
6318 vec_safe_is_empty (pending_weaks) rather than only when
6319 !pending_weaks.
6320 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6321 set assembler name back to NULL afterwards.
6322
a07f6ed2
JM
63232014-03-11 Jason Merrill <jason@redhat.com>
6324
6325 * c.opt: Add -std=gnu++14.
6326
75b107f5
IB
63272014-03-11 Ian Bolton <ian.bolton@arm.com>
6328
6329 * c-opts.c (c_common_post_options): Don't override
6330 -ffp-contract=fast if unsafe-math-optimizations is on.
6331
f42c637e
PM
63322014-03-08 Paulo Matos <paulo@matos-sorge.com>
6333
22b15758 6334 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6335
70e24808
JM
63362014-03-07 Jason Merrill <jason@redhat.com>
6337
6338 * c.opt: Add -std=c++14.
6339
3af9c5e9
MP
63402014-03-06 Marek Polacek <polacek@redhat.com>
6341
6342 PR c/60197
6343 * cilk.c (contains_cilk_spawn_stmt): New function.
6344 (contains_cilk_spawn_stmt_walker): Likewise.
6345 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6346 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6347
b3bdf019
JJ
63482014-03-03 Jakub Jelinek <jakub@redhat.com>
6349
6350 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6351 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6352 even when flag_preprocess_only.
6353
ca7e759d
JM
63542014-02-26 Jason Merrill <jason@redhat.com>
6355
6356 PR c++/59231
6357 PR c++/11586
6358 * c-common.c (shorten_compare): Don't check
6359 c_inhibit_evaluation_warnings.
6360
28e41874
JJ
63612014-02-19 Jakub Jelinek <jakub@redhat.com>
6362
cca615af
JJ
6363 PR c/37743
6364 * c-common.c (c_common_nodes_and_builtins): When initializing
6365 c_uint{16,32,64}_type_node, also set corresponding
6366 uint{16,32,64}_type_node to the same value.
6367
28e41874
JJ
6368 PR c++/60267
6369 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6370 for PRAGMA_IVDEP if flag_preprocess_only.
6371
c2bf53a1
JJ
63722014-02-12 Jakub Jelinek <jakub@redhat.com>
6373
6374 PR c/60101
6375 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6376 if false, add ADD itself, rather than vice versa.
6377 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6378 copy. For SAVE_EXPR, only call merge_tlist once.
6379
8fcbce72
JJ
63802014-02-08 Jakub Jelinek <jakub@redhat.com>
6381
6382 PR middle-end/60092
6383 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6384 and tree_to_uhwi.
6385 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6386 functions.
6387 (c_common_attribute_table): Add alloc_align and assume_aligned
6388 attributes.
6389
0a756a3f
MP
63902014-02-06 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/60087
6393 * c-common.c (warn_for_sign_compare): Call warning_at with location
6394 instead of warning.
6395
7ec4847a
MP
63962014-02-05 Marek Polacek <polacek@redhat.com>
6397
6398 PR c/53123
6399 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6400 statement.
6401
66f20604
MP
64022014-02-04 Marek Polacek <polacek@redhat.com>
6403
6404 PR c/60036
6405 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6406 SAVE_EXPR.
6407
5d77fb19
MG
64082014-02-03 Marc Glisse <marc.glisse@inria.fr>
6409
6410 PR c++/53017
6411 PR c++/59211
6412 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6413 handle_vector_size_attribute, handle_nonnull_attribute): Call
6414 default_conversion on the attribute argument.
6415 (handle_nonnull_attribute): Increment the argument number.
6416
81e5eca8
MP
64172014-01-31 Marek Polacek <polacek@redhat.com>
6418
6419 PR c/59963
6420 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6421 build_function_call_vec.
6422 (resolve_overloaded_builtin): Likewise.
6423 * c-common.h (build_function_call_vec): Adjust declaration.
6424
68fca595
MP
64252014-01-30 Marek Polacek <polacek@redhat.com>
6426
6427 PR c/59940
6428 * c-common.h (unsafe_conversion_p): Adjust declaration.
6429 (warnings_for_convert_and_check): Likewise.
6430 (convert_and_check): Likewise.
6431 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6432 expansion_point_location_if_in_system_header on it.
6433 (warnings_for_convert_and_check): Add location parameter. Call
6434 expansion_point_location_if_in_system_header on it. Use it.
6435 (convert_and_check): Add location parameter. Use it.
6436 (conversion_warning): Likewise.
6437 (c_add_case_label): Adjust convert_and_check calls.
6438 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6439
b72271b9
BI
64402014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6441
6442 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6443 flag_cilkplus.
6444 * c-pragma.c (init_pragma): Likewise.
6445 * c.opt: Likewise.
6446
393e8e8b
MP
64472014-01-23 Marek Polacek <polacek@redhat.com>
6448
6449 PR c/59846
6450 * c-common.c (shorten_compare): Add location_t parameter.
6451 * c-common.h (shorten_binary_op): Adjust declaration.
6452
f04dda30
MP
64532014-01-23 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/58346
6456 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6457 * c-common.h: Declare it.
6458
621955cb
EB
64592014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6460
6461 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6462 * c-ada-spec.c (dump_ads): Likewise.
6463 (cpp_check): Likewise.
6464 (dump_ada_specs): Likewise.
6465
64662014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6467
6468 PR c++/49718
6469 * c-common.c (handle_no_instrument_function_attribute): Allow
6470 no_instrument_function attribute in class member
6471 definition/declaration.
6472
241f845a
JJ
64732014-01-15 Jakub Jelinek <jakub@redhat.com>
6474
6475 PR c/58943
6476 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6477 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6478 being COMPOUND_EXPR.
6479 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6480 operand a SAVE_EXPR and second MODIFY_EXPR.
6481
e83b8e2e
JJ
64822014-01-09 Jakub Jelinek <jakub@redhat.com>
6483
6484 PR target/58115
6485 * c-pch.c (c_common_write_pch): Call
6486 prepare_target_option_nodes_for_pch.
6487
23a5b65a
RS
64882014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6489
6490 Update copyright years
6491
f9030485
RS
64922014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6493
6494 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6495 the copyright notice.
6496
f2aa696b
EB
64972013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6498
6499 * c-ada-spec.c (print_constructor): New function.
6500 (print_destructor): Retrieve the origin of the destructor.
6501 (print_ada_declaration): Revamp handling of constructors/destructors.
6502
3f8257db 65032013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6504 Bill Maddox <maddox@google.com>
6505 Jason Merrill <jason@redhat.com>
6506
6507 * c.opt: Add -fdeclone-ctor-dtor.
6508 * c-opts.c (c_common_post_options): Default to on iff -Os.
6509
41958c28
BI
65102013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6511
6512 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6513 attribute.
6514 * c-pragma.h (enum pragma_cilk_clause): Remove.
6515 (enum pragma_omp_clause): Added the following fields:
6516 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6517 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6518 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6519 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6520 PRAGMA_CILK_CLAUSE_UNIFORM.
6521
b1726d6c 6522
12893402
BI
65232013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6524
6525 * cilk.c (cilk_outline): Made this function non-static.
6526 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6527 (create_cilk_wrapper): Added a new parameter: a function pointer.
6528 (c_install_body_w_frame_cleanup): Remove
6529 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6530 * c-common.h (cilk_outline): New prototype.
6531 (gimplify_cilk_spawn): Removed two parameters.
6532 (cilk_install_body_with_frame_cleanup): New prototype.
6533 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6534 CILK_SPAWN_STMT case.
6535
085b42ed
BS
65362013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6537
2ce064c3
BS
6538 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6539
085b42ed
BS
6540 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6541 (int_array_type_node): Remove.
6542 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6543
9e36c9ed
MP
65442013-12-05 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/52023
6547 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6548 [ADJUST_FIELD_ALIGN].
6549
296674db
JM
65502013-12-04 Joseph Myers <joseph@codesourcery.com>
6551
6552 PR c/52023
6553 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6554 and check field alignment if set.
6555 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6556 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6557
b1726d6c 65582013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6559 Marek Polacek <polacek@redhat.com>
6560
6561 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6562 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6563
d7947e19
L
65642013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6565
6566 PR c/59309
6567 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6568 arguments.
6569
fad7652e
JJ
65702013-11-29 Jakub Jelinek <jakub@redhat.com>
6571
6572 PR c/59280
6573 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6574 goto invalid. If it is error_mark_node, don't issue further
6575 diagnostics.
6576
8b5e1202
SO
65772013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6578
6579 * c.opt (Wopenmp-simd): New.
6580
0a508bb6
JJ
65812013-11-22 Jakub Jelinek <jakub@redhat.com>
6582
6583 * c-ubsan.h (ubsan_instrument_return): New prototype.
6584 * c-ubsan.c (ubsan_instrument_return): New function.
6585
2fb9a547
AM
65862013-11-22 Andrew MacLeod <amacleod@redhat.com>
6587
6588 * c-common.c: Add required include files from gimple.h.
6589 * c-gimplify.c: Likewise
6590 * cilk.c: Likewise
6591
8400e75e
DM
65922013-11-22 David Malcolm <dmalcolm@redhat.com>
6593
6594 * c-common.c (unsafe_conversion_p): Remove use of
6595 EXPR_LOC_OR_HERE macro.
6596 (conversion_warning): Likewise.
6597 (warnings_for_convert_and_check): Likewise.
6598 (warn_for_collisions_1): Likewise.
6599 (shorten_compare): Likewise, and remove use of in_system_header
6600 macro, using the location from the former.
6601 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6602 (cb_def_pragma): Remove use of in_system_header macro.
6603 (lex_string): Likewise.
6604 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6605
eb1ce453
KZ
66062013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6607 Mike Stump <mikestump@comcast.net>
6608 Richard Sandiford <rdsandiford@googlemail.com>
6609
6610 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6611 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6612 tree_fits_shwi_p or tree_fits_uhwi_p.
6613 (dump_generic_ada_node): Likewise.
6614 * c-format.c (check_format_arg): Likewise.
6615 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6616
6b3b8c27
KZ
66172013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6618
6619 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6620
49b0aa18
JC
66212013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6622
6623 PR c/53001
6624 * c-common.c (unsafe_conversion_p): Make this function
6625 return an enumeration with more detail.
6626 (conversion_warning): Use the new return type of
6627 unsafe_conversion_p to separately warn either about conversions
6628 that lower floating point number precision or about the other
6629 kinds of conversions.
6630 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6631 (unsafe_conversion_p): switching return type to
6632 conversion_safety enumeration.
49b0aa18
JC
6633 * c.opt: Adding new warning -Wfloat-conversion and
6634 enabling it with -Wconversion.
6635
b826515a
BS
66362013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6637
8e745a17
JJ
6638 * c-opts.c: Include plugin.h.
6639 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6640
b9a55b13
MP
66412013-11-19 Marek Polacek <polacek@redhat.com>
6642
6643 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6644 call.
6645 (ubsan_instrument_shift): Likewise.
6646 (ubsan_instrument_vla): Likewise.
6647
7d362f6c
RS
66482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6649
6650 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6651 cast to unsigned type.
6652
386b1f1f
RS
66532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6654
6655 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6656 tree_low_cst.
6657 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6658 rather than tree_low_cst.
6659
ae7e9ddd
RS
66602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6661
6662 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6663 tree_to_uhwi throughout.
6664
9439e9a1
RS
66652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6666
6667 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6668 tree_low_cst (..., 0) with tree_to_shwi throughout.
6669
cc269bb6
RS
66702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6671
6672 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6673 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6674
9541ffee
RS
66752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6676
6677 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6678 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6679
c02065fc
AH
66802013-11-15 Aldy Hernandez <aldyh@redhat.com>
6681
6682 * c-cilkplus.c: New file.
6683 * c-common.c (readonly_error): Add location argument.
6684 * c-common.h (readonly_error): Same.
6685 (c_finish_cilk_clauses): Protoize.
6686 (c_check_cilk_loop): Same.
6687 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6688 Do not fail on error_mark_node.
6689 Abstract increment canonicalization to here...
6690 (c_omp_for_incr_canonicalize_ptr): New.
6691 c-pragma.c (init_pragma): Register "simd" pragma.
6692 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6693 (enum pragma_cilk_clause): New.
6694
9cc65f15
RS
66952013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6696
6697 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6698 wchar_type and host_integerp checks.
6699
18f429e2
AM
67002013-11-14 Andrew MacLeod <amacleod@redhat.com>
6701
6702 * c-common.c: Likewise.
6703 * c-gimplify.c: Likewise.
6704 * cilk.c: Likewise.
6705
d8a2d370
DN
67062013-11-14 Diego Novillo <dnovillo@google.com>
6707
6708 * c-common.c: Include fold-const.h.
6709 Include stor-layout.h.
6710 Include calls.h.
6711 Include stringpool.h.
6712 Include attribs.h.
6713 Include varasm.h.
6714 Include trans-mem.h.
6715 * c-cppbuiltin.c: Include stor-layout.h.
6716 Include stringpool.h.
6717 * c-format.c: Include stringpool.h.
6718 * c-lex.c: Include stringpool.h.
6719 Include stor-layout.h.
6720 * c-pragma.c: Include stringpool.h.
6721 Include attribs.h.
6722 Include varasm.h.
6723 Include gcc-symtab.h.
6724 * c-pretty-print.c: Include stor-layout.h.
6725 Include attribs.h.
6726 * cilk.c: Include stringpool.h.
6727 Include calls.h.
6728
38b7bc7f
JM
67292013-11-13 Joseph Myers <joseph@codesourcery.com>
6730
6731 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6732 * c-common.c (c_common_reswords): Add __auto_type.
6733 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6734
45b0be94
AM
67352013-11-12 Andrew MacLeod <amacleod@redhat.com>
6736
18f429e2
AM
6737 * c-common.c: Include gimplify.h.
6738 * c-gimplify.c: Likewise.
6739 * cilk.c: Likewise.
6740 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6741 * c-ubsan.c: Don't include gimple.h.
45b0be94 6742
582d9b50
JM
67432013-11-12 Joseph Myers <joseph@codesourcery.com>
6744
6745 * c-common.c (c_common_reswords): Add _Thread_local.
6746
6b28e197
JM
67472013-11-09 Joseph Myers <joseph@codesourcery.com>
6748
6749 * c-common.c (atomic_size_supported_p): New function.
6750 (resolve_overloaded_atomic_exchange)
6751 (resolve_overloaded_atomic_compare_exchange)
6752 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6753 Use it instead of comparing size with a local list of sizes.
6754
267bac10
JM
67552013-11-07 Andrew MacLeod <amacleod@redhat.com>
6756 Joseph Myers <joseph@codesourcery.com>
6757
6758 * c-common.h (enum rid): Add RID_ATOMIC.
6759 * c-common.c (c_common_reswords): Add _Atomic.
6760 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6761 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6762 * c-format.c (check_format_types): Check for extra _Atomic
6763 qualifiers in format argument.
6764 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6765 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6766
5157b91e
TB
67672013-11-06 Tobias Burnus <burnus@net-b.de>
6768
6769 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6770
6dbe0958
JM
67712013-11-06 Joseph Myers <joseph@codesourcery.com>
6772
6773 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6774 standards modes.
6775 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6776 to mean lack of IEEE 754 support.
6777
e8ff5196
TB
67782013-11-05 Tobias Burnus <burnus@net-b.de>
6779
6780 * c.opt (-Wdate-time): New option
6781 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6782
254a0760
JM
67832013-11-05 Joseph Myers <joseph@codesourcery.com>
6784
6785 * c-cppbuiltin.c (cpp_iec_559_value): Test
6786 flag_excess_precision_cmdline not flag_excess_precision.
6787
6d7f7e0a
TB
67882013-11-05 Tobias Burnus <burnus@net-b.de>
6789
6790 * c.opt (fopenmp-simd): New option.
6791 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6792 (omp_pragmas): ... this new struct.
6793 (c_pp_lookup_pragma): Also walk omp_pragmas.
6794 (init_pragma): Init pragmas for -fopenmp-simd.
6795
55a7f02f
MP
67962013-11-04 Marek Polacek <polacek@redhat.com>
6797
6798 PR c++/58979
6799 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6800
9193fb05
JM
68012013-11-04 Joseph Myers <joseph@codesourcery.com>
6802
6803 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6804 New functions.
6805 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6806
94159ecf
EB
68072013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6808
6809 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6810 (dump_ada_specs): Adjust prototype of second callback.
6811 * c-ada-spec.c (cpp_check): New global variable.
6812 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6813 (print_generic_ada_decl): Likewise.
6814 (has_static_fields): Change return type to bool and add guard.
6815 (has_nontrivial_methods): New predicate.
6816 (is_tagged_type): Change return type to bool.
6817 (separate_class_package): Call has_nontrivial_methods.
6818 (pp_ada_tree_identifier): Minor tweaks.
6819 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6820 (dump_ada_array_domains): Likewise.
6821 (dump_ada_array_type): Likewise.
6822 (dump_template_types): Remove cpp_check parameter and do not pass it to
6823 dump_generic_ada_node.
6824 (dump_ada_template): Likewise.
6825 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6826 recursively.
6827 (print_ada_methods): Change return type to integer. Remove cpp_check
6828 parameter and do not pass it down.
6829 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6830 dump_generic_ada_node.
6831 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6832 accessing methods.
6833 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6834 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6835 value of print_ada_methods.
6836 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6837 Set cpp_check to it before invoking dump_ada_nodes.
6838 (dump_ada_specs): Likewise.
6839
b906f4ca
MP
68402013-11-03 Marek Polacek <polacek@redhat.com>
6841
6842 * c-ubsan.c: Don't include hash-table.h.
6843 (ubsan_instrument_vla): New function.
6844 * c-ubsan.h: Declare it.
6845
5e20cdc9
DM
68462013-10-31 David Malcolm <dmalcolm@redhat.com>
6847
6848 Automated part of renaming of symtab_node_base to symtab_node.
6849
6850 Patch autogenerated by rename_symtab.py from
6851 https://github.com/davidmalcolm/gcc-refactoring-scripts
6852 revision 58bb219cc090b2f4516a9297d868c245495ee622
6853
6854 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6855 symtab_node_base to symtab_node.
6856
7057e645
ESR
68572013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6858
8e745a17 6859 Implement C++14 digit separators.
7057e645
ESR
6860 * c-lex.c (interpret_float): Remove digit separators from scratch string
6861 before building real literal.
6862
193ea7bc
JJ
68632013-10-30 Jakub Jelinek <jakub@redhat.com>
6864
6865 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6866
939b37da
BI
68672013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6868
6869 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6870 fields.
6871 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6872 enabled.
6873 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6874 (insert_cilk_frame): New prototype.
6875 (cilk_init_builtins): Likewise.
6876 (gimplify_cilk_spawn): Likewise.
6877 (c_cilk_install_body_w_frame_cleanup): Likewise.
6878 (cilk_detect_spawn_and_unwrap): Likewise.
6879 (cilk_set_spawn_marker): Likewise.
6880 (build_cilk_sync): Likewise.
6881 (build_cilk_spawn): Likewise.
6882 * cilk.c: New file.
6883
67348ccc
DM
68842013-10-29 David Malcolm <dmalcolm@redhat.com>
6885
6886 Patch autogenerated by refactor_symtab.py from
6887 https://github.com/davidmalcolm/gcc-refactoring-scripts
6888 revision 58bb219cc090b2f4516a9297d868c245495ee622
6889
6890 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6891 to a true class hierarchy.
6892 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6893
d570872d
RS
68942013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6895
6896 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6897
98906124
JL
68982013-10-26 Jeff Law <law@redhat.com>
6899
adfac8df
JJ
6900 * c-common.c (c_define_builtins): Remove mudflap support.
6901 * c.opt: Ignore and warn for mudflap options.
98906124 6902
d73749df 69032013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6904
6905 PR other/33426
6906 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6907 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6908
3f04b1bb
JM
69092013-10-23 Jason Merrill <jason@redhat.com>
6910
6911 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6912
acf0174b
JJ
69132013-10-11 Jakub Jelinek <jakub@redhat.com>
6914
acd15a28
JJ
6915 * c-common.h (omp_clause_mask::operator !=): New method.
6916 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6917 instead of if (mask & something) tests everywhere.
6918
acf0174b
JJ
6919 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6920 201307 instead of 201107.
6921 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6922 (c_common_attribute_table): Add "omp declare target" and
6923 "omp declare simd" attributes.
6924 (handle_omp_declare_target_attribute,
6925 handle_omp_declare_simd_attribute): New functions.
6926 * c-omp.c: Include c-pragma.h.
6927 (c_finish_omp_taskgroup): New function.
6928 (c_finish_omp_atomic): Add swapped argument, if true,
6929 build the operation first with rhs, lhs arguments and use NOP_EXPR
6930 build_modify_expr.
6931 (c_finish_omp_for): Add code argument, pass it down to make_code.
6932 (c_omp_split_clauses): New function.
6933 (c_split_parallel_clauses): Removed.
6934 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6935 c_omp_declare_simd_clauses_to_decls): New functions.
6936 * c-common.h (omp_clause_mask): New type.
6937 (OMP_CLAUSE_MASK_1): Define.
6938 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6939 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6940 omp_clause_mask::operator |, omp_clause_mask::operator &,
6941 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6942 omp_clause_mask::operator ==): New methods.
6943 (enum c_omp_clause_split): New.
6944 (c_finish_omp_taskgroup): New prototype.
6945 (c_finish_omp_atomic): Add swapped argument.
6946 (c_finish_omp_for): Add code argument.
6947 (c_omp_split_clauses): New prototype.
6948 (c_split_parallel_clauses): Removed.
6949 (c_omp_declare_simd_clauses_to_numbers,
6950 c_omp_declare_simd_clauses_to_decls): New prototypes.
6951 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6953 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6954 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6955 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6956 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6957 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6958 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6959 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6960 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6961 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6962 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6963 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6964 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6965 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6966 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6967 PRAGMA_OMP_CLAUSE_UNIFORM.
6968
826cacfe
MG
69692013-10-09 Marc Glisse <marc.glisse@inria.fr>
6970
6971 PR tree-optimization/20318
6972 * c-common.c (handle_returns_nonnull_attribute): New function.
6973 (c_common_attribute_table): Add returns_nonnull.
6974
2284b034
MG
69752013-10-03 Marc Glisse <marc.glisse@inria.fr>
6976
6977 PR c++/19476
6978 * c.opt (fcheck-new): Move to common.opt.
6979
b56e9788
MP
69802013-09-25 Marek Polacek <polacek@redhat.com>
6981 Jakub Jelinek <jakub@redhat.com>
6982
6983 PR sanitizer/58413
6984 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6985 an expression if we can prove it is correct.
6986 (ubsan_instrument_division): Likewise. Remove unnecessary
6987 check.
6988
ce6923c5
MP
69892013-09-18 Marek Polacek <polacek@redhat.com>
6990
6991 PR sanitizer/58411
6992 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6993 Declare it.
6994 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6995
fb5610fb
IS
69962013-09-14 Iain Sandoe <iain@codesourcery.com>
6997
6998 PR target/48094
6999 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7000 fobjc-gc, freplace-objc-classes): Accept for LTO.
7001
88b0e79e
JC
70022013-09-13 Jacek Caban <jacek@codeweavers.com>
7003
7004 * c-target.def: New hook
7005
c9b0866a
PC
70062013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7007
7008 PR c++/43452
7009 * c.opt (Wdelete-incomplete): Add.
7010
0af94e6f
JR
70112013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7012
7013 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7014 (vector_types_compatible_elements_p): New function.
7015 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7016 declaration.
7017 (vector_types_compatible_elements_p): Declare.
7018
7c26172c
GDR
70192013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7020
7021 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7022 a virtual member function.
7023 (pp_simple_type_specifier): Remove.
7024 (pp_c_type_specifier): Likewise.
7025 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7026 Rename from pp_c_type_specifier. Adjust.
7027 (c_pretty_printer::c_pretty_printer): Do not assign to
7028 simple_type_specifier.
7029
20059c8b
GDR
70302013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7031
7032 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7033 member function.
7034 (c_pretty_printer::storage_class_specifier): Likewise.
7035 (c_pretty_printer::initializer): Likewise.
7036 (pp_declaration): Remove.
7037 (pp_declaration_specifiers): Likewise.
7038 (pp_abstract_declarator): Likewise.
7039 (pp_declarator): Likewise.
7040 (pp_type_id): Likewise.
7041 (pp_statement): Likewise.
7042 (pp_constant): Likewise.
7043 (pp_id_expression): Likewise.
7044 (pp_primary_expression): Likewise.
7045 (pp_unary_expression): Likewise.
7046 (pp_multiplicative_expression): Likewise.
7047 (pp_conditional_expression): Likewise.
7048 (pp_assignment_expression): Likewise.
7049 (pp_expression): Likewise.
7050 (pp_c_type_id): Likewise.
7051 (pp_c_storage_class_specifier): Likewise.
7052 * c-pretty-print.c (pp_c_type_cast): Tidy.
7053 (pp_c_pointer): Likewise.
7054 (pp_c_type_specifier): Likewise.
7055 (pp_c_parameter_type_list): Likewise.
7056 (pp_c_function_definition): Likewise.
7057 (pp_c_init_declarator): Likewise.
7058 (pp_c_initializer_list): Likewise.
7059 (pp_c_constructor_elts): Likewise.
7060 (c_pretty_printer::direct_abstract_declarator): Likewise.
7061 (c_pretty_printer::declaration_specifiers): Likewise.
7062 (c_pretty_printer::primary_expression): Likewise.
7063 (c_pretty_printer::postfix_expression): Likewise.
7064 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7065 (c_pretty_printer::storage_class_specifier): Rename from
7066 pp_c_storage_class_specifier.
7067 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7068 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7069 storage_class_specifier, initializer, offset_list, flags.
7070
de5a5fa1
MP
70712013-08-30 Marek Polacek <polacek@redhat.com>
7072
7073 * c-ubsan.c: New file.
7074 * c-ubsan.h: New file.
7075
8f0e4d72
GDR
70762013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7077
7078 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7079 member function.
7080 (c_pretty_printer::declaration_specifiers): Likewise.
7081 (c_pretty_printer::declarator): Likewise.
7082 (c_pretty_printer::abstract_declarator): Likewise.
7083 (c_pretty_printer::direct_abstract_declarator): Likewise.
7084 (c_pretty_printer::direct_declarator): Likewise.
7085 (c_pretty_printer::function_specifier): Likewise.
7086 (pp_declaration): Adjust.
7087 (pp_declaration_specifiers): Likewise.
7088 (pp_abstract_declarator): Likewise.
7089 (pp_direct_declarator): Likewise.
7090 (pp_function_specifier): Likewise.
7091 (pp_direct_abstract_declarator): Remove as unused.
7092 (pp_c_declaration): Remove.
7093 (pp_c_declaration_specifiers): Likewise.
7094 (pp_c_declarator): Likewise.
7095 (pp_c_direct_declarator): Likewise.
7096 (pp_c_function_specifier): Likewise.
7097 (pp_c_direct_abstract_declarator): Likewise.
7098 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7099 from pp_c_abstract_declarator. Adjust.
7100 (c_pretty_printer::direct_abstract_declarator): Rename from
7101 pp_c_direct_abstract_declarator. Adjust.
7102 (c_pretty_printer::function_specifier): Rename from
7103 pp_c_function_specifier. Adjust.
7104 (c_pretty_printer::declaration_specifiers): Rename from
7105 pp_c_declaration_specifiers. Adjust.
7106 (c_pretty_printer::direct_declarator): Rename from
7107 pp_c_direct_declarator. Adjust.
7108 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7109 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7110 (c_pretty_printer::c_pretty_printer): Do not assign to
7111 declaration, declaration_specifiers, declarator,
7112 direct_declarator, direct_abstract_declarator, function_specifier.
7113
00d34d3a
GDR
71142013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7115
7116 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7117 virtual member function.
7118 (c_pretty_printer::multiplicative_expression): Likewise.
7119 (c_pretty_printer::conditional_expression): Likewise.
7120 (c_pretty_printer::assignment_expression): Likewise.
7121 (c_pretty_printer::expression): Likewise.
7122 (pp_unary_expression): Adjust.
7123 (pp_multiplicative_expression): Likewise.
7124 (pp_assignment_expression): Likewise.
7125 (pp_conditional_expression): Likewise.
7126 (pp_expression): Likewise.
7127 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7128 from pp_c_unary_expression. Adjust.
7129 (c_pretty_printer::multiplicative_expression): Rename from
7130 pp_c_multiplicative_expression. Adjust.
7131 (c_pretty_printer::conditional_expression): Rename from
7132 pp_c_conditional_expression. Adjust.
7133 (c_pretty_printer::assignment_expression): Rename from
7134 pp_c_assignment_expression. Adjust.
7135 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7136 (c_pretty_printer::c_pretty_printer): Do not assign to
7137 unary_expression, multiplicative_expression,
7138 conditional_expression, expression.
7139
fb22178f
GDR
71402013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7141
7142 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7143 virtual member function.
7144 (pp_postfix_expression): Adjust.
7145 (pp_c_postfix_expression): Remove.
7146 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7147 from pp_c_postfix_expression. Adjust.
7148 (c_pretty_printer::c_pretty_printer): Do not assign to
7149 postfix_expression.
7150
7ecc2600
GDR
71512013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7152
7153 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7154 virtua member function.
7155 (pp_primary_expression): Adjust.
7156 (pp_c_primary_expression): Remove.
7157 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7158 from pp_c_primary_expression. Adjust.
7159 (pp_c_initializer_list): Use pp_primary_expression.
7160 (c_pretty_printer::c_pretty_printer): Do not assign to
7161 primary_expression.
7162
0691175f
GDR
71632013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7164
7165 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7166 * c-pretty-print.c (M_): Remove.
7167 (c_pretty_printer::translate_string): Define.
7168 (pp_c_type_specifier): Use it.
7169 (pp_c_primary_expression): Likewise.
7170 (pp_c_expression): Likewise.
7171
66dfe4c4
GDR
71722013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7173
7174 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7175 virtual function.
7176 (pp_c_id_expression): Remove.
7177 (pp_id_expression): Adjust.
7178 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7179 pp_c_id_expression. Adjust.
7180 (pp_c_postfix_expression): Use pp_id_expression.
7181 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7182
ca43e9d5
GDR
71832013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7184
7185 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7186 member function.
7187 (pp_constant): Adjust.
7188 (pp_c_constant): Remove.
7189 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7190 pp_c_constant. Adjust.
7191 (pp_c_constant)
7192 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7193 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7194
da6ca2b5
GDR
71952013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7196
7197 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7198 (c_pretty_printer::c_pretty_printer): Declare.
7199 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7200 c_pretty_printer_init. Adjust.
7201 (print_c_tree): Do not call c_pretty_printer_init.
7202 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7203
65a372f4
AC
72042013-08-09 Arnaud Charlet <charlet@adacore.com>
7205
7206 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7207
fd9b0f32
PC
72082013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7209
7210 PR c++/58080
7211 * c-common.c (pointer_int_sum): Add bool parameter.
7212 * c-common.h (pointer_int_sum): Adjust declaration.
7213
e0aec1e9
GDR
72142013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7215
7216 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7217 c_pretty_printer variable.
7218
b066401f
GDR
72192013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7220
7221 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7222 (pp_base): Remove.
7223 (pp_c_base): Likewise. Adjust users.
7224 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7225 (pp_c_whitespace): Do not call pp_base.
7226 (pp_c_left_paren): Likewise.
7227 (pp_c_right_paren): Likewise.
7228 (pp_c_left_brace): Likewise.
7229 (pp_c_right_brace): Likewise.
7230 (pp_c_left_bracket): Likewise.
7231 (pp_c_right_bracket): Likewise.
7232 (pp_c_dot): Likewise.
7233 (pp_c_ampersand): Likewise.
7234 (pp_c_star): Likewise.
7235 (pp_c_arrow): Likewise.
7236 (pp_c_semicolon): Likewise.
7237 (pp_c_complement): Likewise.
7238 (pp_c_exclamation): Likewise.
7239 (pp_c_direct_declarator): Likewise.
7240 (pp_c_ws_string): Likewise.
7241 (pp_c_identifier): Likewise.
7242 (pp_c_statement): Likewise.
7243 (print_c_tree): Likewise.
7244
65e5a578
ESR
72452013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7246
7247 PR c++/58072
7248 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7249 provide useful error strings.
7250
137a1a27
GDR
72512013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7252
7253 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7254 printer functions instead of pp_string or operators and punctuators.
7255 (dump_generic_ada_node): Likewise.
7256 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7257 (pp_c_relational_expression): Likewise.
7258 (pp_c_logical_or_expression): Likewise.
7259
07838b13
GDR
72602013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7261
7262 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7263 functions instead of pp_character.
7264 (pp_ada_tree_identifier): Likewise.
7265 (dump_ada_double_name): Likewise.
7266 (dump_ada_function_declaration): Likewise.
7267 (dump_ada_array_domains): Likewise.
7268 (dump_template_types): Likewise.
7269 (dump_generic_ada_node): Likewise.
7270 (print_ada_declaration): Likewise.
7271 (print_ada_struct_decl): Likewise.
7272 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7273
433cc7b0
TT
72742013-07-23 Tom Tromey <tromey@redhat.com>
7275
7276 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7277 * c-common.c (c_common_reswords): Add _Generic.
7278
688010ba
OB
72792013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7280
7281 * c-common.c: Fix typos.
7282 * c-common.h: Likewise.
7283
2a99e5e6
LL
72842013-07-13 Lubos Lunak <l.lunak@suse.cz>
7285
7286 PR c++/55203
7287 * c-common.c (c_common_attribute_table): Add warn_unused.
7288 (handle_warn_unused_attribute): New.
7289
c26302d5
JJ
72902013-07-10 Jakub Jelinek <jakub@redhat.com>
7291
7292 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7293 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7294
dfeadaa0
PC
72952013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7296
7297 PR c++/57869
7298 * c.opt: Add Wconditionally-supported.
7299
6a2fa4b2
GS
73002013-07-08 Graham Stott <graham.stott@btinternet.com>
7301
adfac8df 7302 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7303 unused variables l_length and l_node.
7304
ecdbd01a 73052013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7306
7307 PR c/57821
7308 * c-common.c (complete_array_type): Delay folding first index
7309 like other indices. When folding, check for index overflow.
7310
bedc293e
MG
73112013-06-27 Marc Glisse <marc.glisse@inria.fr>
7312
7313 PR c++/57509
7314 * c-common.h (c_build_vec_perm_expr): New complain argument.
7315 * c-common.c (c_build_vec_perm_expr): Likewise.
7316 Use save_expr also in C++.
7317
604b2bfc
GDR
73182013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7319
7320 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7321 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7322 * c-opts.c (c_common_post_options): Likewise.
7323
dfeadaa0 73242013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7325
7326 * array-notation-common.c (length_mismatch_in_expr): Changed the
7327 parameter type's from a dynamic array to a vec_tree. Also removed
7328 the size parameters.
7329 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7330 the change above.
7331
2ce86d2e
BI
73322013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7333
7334 * c-common.h (struct cilkplus_an_parts): New structure.
7335 (struct cilkplus_an_loop_parts): Likewise.
7336 (cilkplus_extract_an_triplets): New prototype.
7337 (fix_sec_implicit_args): Likewise.
7338 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7339 (fix_sec_implicit_args): Likewise.
604b2bfc 7340
07a6825b
BI
73412013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7342
7343 * array-notation-common.c (find_inv_trees): Removed an unwanted
7344 typecasting.
7345 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7346 enum rid to enum tree_code.
7347
08346abd
JH
73482013-06-11 Jan Hubicka <jh@suse.cz>
7349
7350 * c-common.c (handle_alias_ifunc_attribute): Do not set
7351 DECL_EXTERNAL for weakref variables.
7352 * c-pragma.c (handle_pragma_weak): Make sure aliases
7353 are not declared as external.
7354
d60f1706
BI
73552013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7356
7357 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7358 function from c/c-array-notation.c.
7359 (is_cilkplus_reduce_builtin): Likewise.
7360 (find_rank): Likewise.
7361 (extract_array_notation_exprs): Likewise.
7362 (replace_array_notations): Likewise.
7363 (find_inv_trees): Likewise.
7364 (replace_inv_trees): Likewise.
7365 (contains_array_notation_expr): Likewise.
7366 (find_correct_array_notation_type): Likewise.
7367 * c-common.h (struct inv_list): Moved this struct from the file
7368 c/c-array-notation.c and added a new field called additional tcodes.
7369 (length_mismatch_in_expr_p): New prototype.
7370 (is_cilkplus_reduce_builtin): Likewise.
7371 (find_rank): Likewise.
7372 (extract_array_notation_exprs): Likewise.
7373 (replace_array_notation): Likewise.
7374 (find_inv_trees): Likewise.
7375 (replace_inv_trees): Likewise.
7376 (find_correct_array_notation_type): Likewise.
dfeadaa0 7377
36536d79
BI
73782013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7379
7380 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7381 function array_notation_init_builtins is called.
7382 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7383 * c-common.def (ARRAY_NOTATION_REF): New tree.
7384 * c-common.h (build_array_notation_expr): New function declaration.
7385 (build_array_notation_ref): Likewise.
7386 (extract_sec_implicit_index_arg): New extern declaration.
7387 (is_sec_implicit_index_fn): Likewise.
7388 (ARRAY_NOTATION_CHECK): New define.
7389 (ARRAY_NOTATION_ARRAY): Likewise.
7390 (ARRAY_NOTATION_START): Likewise.
7391 (ARRAY_NOTATION_LENGTH): Likewise.
7392 (ARRAY_NOTATION_STRIDE): Likewise.
7393 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7394 ARRAY_NOTATION_REF.
7395 (pp_c_expression): Likewise.
7396 * c.opt (flag_enable_cilkplus): New flag.
7397 * array-notation-common.c: New file.
7398
f7716d57
JJ
73992013-05-14 Jakub Jelinek <jakub@redhat.com>
7400
7401 PR c++/57274
7402 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7403
a5e0cd1d
MG
74042013-05-10 Marc Glisse <marc.glisse@inria.fr>
7405
7406 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7407 vectors.
7408
f6bc1c4a
HS
74092013-05-07 Han Shen <shenhan@google.com>
7410
7411 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7412
3f12f6e9
SKS
74132013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7414
7415 * c-common.c (check_user_alignment): Emit error for negative values.
7416
61949153
PC
74172013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7418
7419 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7420
e93e18e9
PC
74212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7422
7423 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7424 __GXX_EXPERIMENTAL_CXX1Y__.
7425
44d90fe1 74262013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7427 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7428
7429 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7430 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7431 to simply use OPT_Wpointer_arith.
7432 (c_sizeof_or_alignof_type): Likewise.
7433
13f39b2e
PC
74342013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7435
7436 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7437
4b84d650
JJ
74382013-04-12 Jakub Jelinek <jakub@redhat.com>
7439
7440 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7441 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7442 specifiers.
7443
fb037b5d
SB
74442013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7445
7446 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7447
4e856798
PC
74482013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7449
7450 * c-common.c (pointer_int_sum): Remove dead code.
7451
4b1baac8
RS
74522013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7453
7454 PR middle-end/56524
7455 * c-common.c (handle_optimize_attribute): Don't call
7456 save_optabs_if_changed.
7457
0b50e654
JJ
74582013-03-05 Jakub Jelinek <jakub@redhat.com>
7459
7460 PR middle-end/56461
7461 * c-pch.c (pch_init): Free target_validity at the end.
7462
48c41403
JJ
74632013-03-04 Jakub Jelinek <jakub@redhat.com>
7464
7465 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7466
e664c61c
KS
74672013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7468 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR sanitizer/56454
7471 * c-common.c (handle_no_sanitize_address_attribute): New function.
7472 (c_common_attribute_table): Add no_sanitize_address attribute.
7473 (handle_no_address_safety_analysis_attribute): Add
7474 no_sanitize_address attribute, not no_address_safety_analysis
7475 attribute.
7476
a475fd3d 74772013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7478
7479 PR target/52555
7480 * c-common.c (handle_optimize_attribute): Call
7481 save_optabs_if_changed.
7482
f6007d99
JJ
74832013-02-18 Jakub Jelinek <jakub@redhat.com>
7484 Steven Bosscher <steven@gcc.gnu.org>
7485
7486 PR pch/54117
7487 * c-opts.c (c_common_post_options): If debug info is enabled
7488 and non-dwarf*, refuse to load PCH files and when writing PCH
7489 file warn.
7490
cf35e2b1
JJ
74912013-02-05 Jakub Jelinek <jakub@redhat.com>
7492
7493 PR middle-end/56167
7494 * c-common.c (handle_error_attribute): Fix condition.
7495
32887460
JJ
74962013-01-30 Jakub Jelinek <jakub@redhat.com>
7497
7498 PR c++/55742
7499 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7500
5af057d8
JM
75012013-01-18 Jason Merrill <jason@redhat.com>
7502
7503 PR target/54908
7504 * c.opt (-fextern-tls-init): New.
7505 * c-opts.c (c_common_post_options): Handle it.
7506
cc83c823
JJ
75072013-01-09 Jakub Jelinek <jakub@redhat.com>
7508
7509 PR c/48418
7510 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7511 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7512 and is either negative or bigger or equal to type precision
7513 of the first operand.
7514
a859517f
MP
75152012-12-03 Marek Polacek <polacek@redhat.com>
7516
7517 PR c/55570
7518 * c-common.c (check_user_alignment): Swap order of tests,
7519 check TREE_CODE first.
7520
2d7aa578
ESR
75212012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7522
7523 PR c++/52654
7524 * c-common.h (overflow_type): New enum.
7525 (build_userdef_literal): Add overflow_type argument.
7526 (tree_userdef_literal): Add overflow_type.
7527 (USERDEF_LITERAL_OVERFLOW): New access macro.
7528 * c-common.c (build_userdef_literal): Add overflow_type
7529 argument.
7530 * c-lex.c (c_lex_with_flags): Add overflow_type to
7531 build_userdef_literal calls.
7532 (interpret_integer, interpret_float): Add overflow_type argument.
7533
cc3c4f62
RB
75342012-11-28 Richard Biener <rguenther@suse.de>
7535
7536 PR c/35634
7537 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7538 here and use a type with proper overflow behavior for types that would
7539 need to be promoted for the arithmetic.
7540
77bc5132
JJ
75412012-11-23 Jakub Jelinek <jakub@redhat.com>
7542
7543 PR sanitizer/55435
7544 * c-common.c (handle_no_address_safety_analysis_attribute): New
7545 function.
7546 (c_common_attribute_table): Add no_address_safety_analysis.
7547
5dc99c46
SB
75482012-11-16 Simon Baldwin <simonb@google.com>
7549
7550 * c.opt: Add f[no-]canonical-system-headers.
7551 * c-opts.c (c_common_handle_option): Handle
7552 OPT_fcanonical_system_headers.
7553
a4a0016d
ESR
75542012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7555
7556 PR c++/54413
7557 * c-opts.c (c_common_handle_option): Set new flags.
7558 * c.opt: Describe new flags.
7559
7dbb85a7
JM
75602012-11-09 Jason Merrill <jason@redhat.com>
7561
7562 * c.opt (Wabi-tag): New.
7563
ad7bac31
AK
75642012-11-09 Andi Kleen <ak@linux.intel.com>
7565
7566 PR 55139
7567 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7568 MEMMODEL_MASK
ad7bac31 7569
7332899a
MLI
75702012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7571
7572 PR c/53063
7573 * c.opt (Wformat): Make it Alias Wformat=1.
7574 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7575 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7576 LangEnabledBy.
7577 (Wformat=): RejectNegative. Use LangEnabledBy.
7578 (Wnonnull): Use LangEnabledBy.
7579 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7580 * c-format.c (set_Wformat): Delete.
7581 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7582 (maybe_read_dollar_number): Likewise.
7583 (avoid_dollar_number): Likewise.
7584 (finish_dollar_format_checking): Likewise.
7585 (check_format_info): Likewise.
7586 (check_format_info_main): Likewise.
7587 (check_format_types): Likewise.
7588 (format_type_warning): Likewise.
7589 * c-common.c (int): Likewise.
7590 (check_function_sentinel): Likewise.
7591 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7592
34a180a6
MLI
75932012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7594
7595 PR c/53063
7596 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7597 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7598 Use LangEnabledBy.
7599 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7600 common.opt.
7601 (Wvariadic-macros): Init(1).
7602 * c-opts.c (c_common_handle_option): Do not handle them
7603 explicitly.
7604 (c_common_post_options): Likewise.
7605 (sanitize_cpp_opts): warn_unused_macros is now
7606 cpp_warn_unused_macros.
7607 (push_command_line_include): Likewise.
7608 * c-common.c (warn_unknown_pragmas): Do not define.
7609 * c-common.h (warn_unknown_pragmas): Do not declare.
7610
3f46d6a5
MLI
76112012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7612
7613 PR c/51294
7614 * c-common.c (conversion_warning): Handle conditional expressions.
7615
880661a4
JW
76162012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7617
7618 PR c++/54930
7619 * c.opt (Wreturn_local_addr): Define new option.
7620
4514a96b
JM
76212012-10-25 Jason Merrill <jason@redhat.com>
7622
f14edc1a
JM
7623 * c.opt (Wvirtual-move-assign): New.
7624
4514a96b
JM
7625 * c.opt (Winherited-variadic-ctor): New.
7626
93100c6b
MG
76272012-10-25 Marc Glisse <marc.glisse@inria.fr>
7628
7629 PR c++/54427
7630 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7631
1efcb8c6
JM
76322012-10-23 Joseph Myers <joseph@codesourcery.com>
7633
7634 * c-common.h (pch_cpp_save_state): Declare.
7635 * c-target.def (c_preinclude): New hook.
7636 * c-opts.c (done_preinclude): New.
7637 (push_command_line_include): Handle default preincluded header.
7638 (cb_file_change): Call pch_cpp_save_state when calling
7639 push_command_line_include.
7640 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7641 (pch_cpp_save_state): New.
7642 (pch_init): Call pch_cpp_save_state conditionally, instead of
7643 calling cpp_save_state.
7644
4a0ae68e
MLI
76452012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7646
7647 PR c/53063
7648 PR c/40989
7649 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7650 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7651 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7652 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7653 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7654 * c-opts.c (c_common_handle_option): Remove explicit handling from
7655 here.
7656 (c_common_post_options): Likewise.
7657
67e4210b
EB
76582012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7659
7660 * c-ada-spec.c (LOCATION_COL): Delete.
7661 (compare_location): New function.
7662 (compare_node): Use it.
7663 (compare_comment): Likewise.
7664
65d4f2cd
MLI
76652012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7666
7667 PR c/53063
7668 PR c/40989
7669 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7670 * c-opts.c (c_common_handle_option): Do not set them here. Add
7671 comment.
7672 (c_common_post_options): Likewise.
7673
909881cb
EB
76742012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7675
7676 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7677 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7678 Remove POINTER_TYPE handling, add large unsigned handling and use
7679 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7680
3a785c97
JJ
76812012-10-12 Jakub Jelinek <jakub@redhat.com>
7682
7683 PR c/54381
7684 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7685 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7686 locs and array of 3 trees instead of just single loc and single
7687 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7688 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7689 For *cmp* builtins that take two sources strings report warnings
7690 about first and second source, not about destination and source.
7691
5e54f81d
MG
76922012-10-12 Marc Glisse <marc.glisse@inria.fr>
7693
7694 PR c++/53055
7695 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7696
f5b02f1e
EB
76972012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7698
7699 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7700 declaring something coming from another file.
7701
b46dbc6c
AC
77022012-10-10 Arnaud Charlet <charlet@adacore.com>
7703
f5b02f1e 7704 PR ada/54845
b46dbc6c
AC
7705 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7706
5d9de0d0
PC
77072012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7708
7709 PR c++/54194
7710 * c-common.c (warn_about_parentheses): Add location_t parameter;
7711 use EXPR_LOC_OR_LOC.
7712 * c-common.h: Update declaration.
7713
a212e43f
MG
77142012-10-09 Marc Glisse <marc.glisse@inria.fr>
7715
7716 PR c++/54427
7717 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7718 more operations. Make error messages optional.
7719 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7720 (scalar_to_vector): Declare.
7721
b1db7f91
JM
77222012-10-08 Jason Merrill <jason@redhat.com>
7723
7724 * c-common.c (c_common_reswords): Add thread_local.
7725
e28d52cf
DS
77262012-10-08 Dodji Seketeli <dodji@redhat.com>
7727
7728 PR c++/53528 C++11 attribute support
7729 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7730 new functions.
7731 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7732 static function.
7733 (handle_aligned_attribute): In choose strictest alignment
7734 among many. Use new check_cxx_fundamental_alignment_constraints.
7735 (handle_transparent_union_attribute): In c++11 attribute syntax,
7736 don't look through typedefs.
7737
3b78de56
AC
77382012-10-04 Arnaud Charlet <charlet@adacore.com>
7739
7740 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7741 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7742 out of dumpfile.h.
7743
6040bb5f
DC
77442012-09-25 Dehao Chen <dehao@google.com>
7745
7746 PR middle-end/54645
3b78de56 7747 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7748 map when read in the pch.
7749
3f8257db 77502012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7751
7752 * c-ada-spec.c: Style fixes.
7753
3f8257db 77542012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7755
7756 * c.opt (-fada-spec-parent): Define new command line switch.
7757 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7758 is specified, generate binding spec as a child of the specified unit.
7759
0ccb505d
PC
77602012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7761 Manuel López-Ibáñez <manu@gcc.gnu.org>
7762
7763 PR c++/53210
7764 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7765
c583af79
AC
77662012-08-23 Arnaud Charlet <charlet@adacore.com>
7767
7768 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7769 for pointers, and add missing Convention C pragma.
7770 (print_ada_struct_decl): Add missing aliased keyword.
7771 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7772
1a4049e7
JJ
77732012-08-17 Jakub Jelinek <jakub@redhat.com>
7774
7775 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7776 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7777 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7778 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7779 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7780
70b5e7dc
RG
77812012-08-10 Richard Guenther <rguenther@suse.de>
7782
7783 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7784
f8923f7e
SB
77852012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7786
7787 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7788 instead of separate pp_newline and pp_flush.
7789 (print_c_tree): Likewise.
7790
e45abe1f
RH
77912012-07-26 Richard Henderson <rth@redhat.com>
7792
7793 * c-common.c (handle_hot_attribute): Allow labels.
7794 (handle_cold_attribute): Likewise.
7795
332f1d24
JJ
77962012-07-20 Jakub Jelinek <jakub@redhat.com>
7797
7798 PR c++/28656
7799 * c-common.c (check_function_nonnull): Handle multiple nonnull
7800 attributes properly.
7801
7ee2468b
SB
78022012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7803
7804 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7805 * c-ada-spec.c: Likewise.
7806 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7807
ee7b28eb
SB
78082012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7809
7810 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7811 Remove code conditional on it.
7812
6bdf3519
SB
78132012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7814
7815 * c-gimplify.c: Do not include basic-block.h.
7816 * c-common.c: Do not include linfuncs.h.
7817
532aafad
SB
78182012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7819
7820 * c-common.h: Include tree.h.
7821
8d0d1915
JM
78222012-07-02 Jason Merrill <jason@redhat.com>
7823
7824 PR c++/53524
7825 * c-common.c (get_priority): Call default_conversion.
7826
fbc873ad
UB
78272012-07-01 Uros Bizjak <ubizjak@gmail.com>
7828
7829 * c-pch.c (c_common_write_pch): Remove unused variables.
7830
d4a10d0a
SB
78312012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7832
7833 * cppspec.c: Moved from gcc/ to here.
7834
6f3a2e23
KT
78352012-06-27 Kai Tietz <ktietz@redhat.com>
7836
7837 PR preprocessor/37215
7838 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7839
8ca92d04
SB
78402012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7841
7842 * c-common.h (c_common_print_pch_checksum): Remove.
7843 * c-pch.c: Do not include output.h.
7844 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7845 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7846 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7847 (struct c_pch_header): Remove.
7848 (get_ident): Update gpch version.
7849 (pch_init): Do not print executable_checksum to asm_out_file.
7850 Do not fail if there is no asm_out_file to read back from. Set
7851 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7852 (c_common_write_pch): Verify that nothing was written to asm_out_file
7853 since pch_init was called. Do not write a c_pch_header, and do not
7854 copy from asm_out_file to the PCH.
7855 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7856 the content of asm_out_file from the PCH.
7857 (c_common_print_pch_checksum): Remove.
7858 * c-opts.c (c_common_init): Print out executable_checksum directly.
7859
70f42967
SB
78602012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7861
7862 * c-target.def (objc_declare_unresolved_class_reference,
7863 objc_declare_class_definition): Add new hooks.
7864
a8781821
SB
78652012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7866
7867 * c-lex.c: Do not include output.h.
7868 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7869 Remove uses of ASM_OUTPUT_IDENT.
7870
9e1a8dd1
RR
78712012-06-15 Marc Glisse <marc.glisse@inria.fr>
7872
7873 PR c++/51033
7874 * c-common.h (c_build_vec_perm_expr): Move decl here.
7875 * c-common.c (c_build_vec_perm_expr): Move definition
7876 here.
7877
6f07a821
SB
78782012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7879
7880 * c.opt (fconserve-space): Turn into a no-op.
7881
9faeb493 78822012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
7883
7884 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7885 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7886 both the start and end of the function.
7887
a4b7d13c
SB
78882012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7889
7890 * c-common.c: Do not include output.h.
7891 * c-pragma.c: Likewise.
7892
c265f413
SA
78932012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7894
7895 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7896 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7897 (lang_decl_name): Handle namespace decls.
7898
be7a421e
SB
78992012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7900
7901 * c-ada-spec.c: Do not include output.h.
7902 * c-semantics.c: Likewise.
7903
65de6659
JM
79042012-05-29 Joseph Myers <joseph@codesourcery.com>
7905
7906 * c-common.c: Fix typo.
7907
ca5f4331
MM
79082012-05-29 Michael Matz <matz@suse.de>
7909
7910 * c-common.h (c_expand_decl): Remove prototype.
7911
4f7f7aca
MLI
79122012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7913
7914 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7915 * c-opts.c (c_common_handle_option): Remove code handling
7916 warn_missing_braces.
7917
4a792f9b
PC
79182012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7919
7920 PR c++/25137
7921 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7922 -Wmissing_braces.
7923
650dc14a
DS
79242012-05-22 Dodji Seketeli <dodji@redhat.com>
7925
7926 PR c++/53322
7927 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7928
9b095bf1
MLI
79292012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7930
7931 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7932 * c-opts.c (c_common_handle_option): Do not handle explicitly
7933 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7934
0b2c4be5
DS
79352012-05-16 Dodji Seketeli <dodji@redhat.com>
7936
7937 PR preprocessor/7263
7938 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7939 to cpp_classify_number. For diagnostics, use the precise location
7940 instead of the global input_location.
7941
a1bde5af
PC
79422012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7943
d02924ef 7944 PR c++/11856
a1bde5af
PC
7945 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7946
d1ede5f4
BS
79472012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7948
a1bde5af 7949 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 7950
f2bc201f
MLI
79512012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7952
7953 PR 53063
7954 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7955 Wreorder): Use LangEnabledBy.
7956 * c-opts.c (c_common_handle_option): Do not enable them
7957 explicitly. Call lang-specific generated functions.
7958 (c_common_post_options): Do not set them here.
7959
95744782
MLI
79602012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7961
7962 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7963 Wmissing-field-initializers,Wmissing-parameter-type,
7964 Wold-style-declaration,Woverride-init): Use EnabledBy.
7965 * c-opts.c (c_common_post_options): Do not set here explicitly.
7966
7d5a5747
MLI
79672012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7968
7969 PR 53063
7970 * c-opts.c (c_common_handle_option): Use handle_generated_option
7971 to enable sub-options.
7972
5a3c9cf2
PC
79732012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7974
7975 PR c++/53158
7976 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7977
3ac8781c
RG
79782012-05-10 Richard Guenther <rguenther@suse.de>
7979
7980 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7981 adjust commentary about TYPE_IS_SIZETYPE types.
7982
1e537948
MLI
79832012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7984
7985 PR c++/53261
7986 * c-common.c (warn_logical_operator): Check that argument of
7987 integer_zerop is not NULL.
7988
f2c4a785
MLI
79892012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7990
7991 PR c/43772
7992 * c-common.c (warn_logical_operator): Do not warn if either side
7993 is already true or false.
7994
50f305ca
MLI
79952012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7996
7997 PR c/51712
7998 * c-common.c (expr_original_type): New.
7999 (shorten_compare): Do not warn for enumeration types.
8000
0c3641b0
MLI
80012012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8002
8003 * c.opt (fpermissive): Add Var(flag_permissive).
8004
7edaa4d2
MG
80052012-04-30 Marc Glisse <marc.glisse@inria.fr>
8006
8007 PR c++/51033
8008 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8009 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8010
b9c8da34
DS
80112012-04-30 Dodji Seketeli <dodji@redhat.com>
8012
8013 Add -Wvarargs option
8014 * c.opt (Wvarargs): Define new option.
8015
e6c69da0
MLI
80162012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8017
8018 * c-common.c (check_function_arguments): Replace
8019 Wmissing-format-attribute with Wsuggest-attribute=format.
8020
90137d8f
MLI
80212012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8022
8023 * c.opt (Wsuggest-attribute=format): New. Alias of
8024 Wmissing-format-attribute.
8025 * c-format.c (decode_format_type): Replace
8026 Wmissing-format-attribute with Wsuggest-attribute=format.
8027 (check_function_format): Likewise.
8028
9faeb493 80292012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8030
8031 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8032 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8033 * c.opt: Add Wliteral-suffix.
8034
c1771a20
MLI
80352012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8036
8037 PR c/44774
8038 * c.opt (Wpedantic): New.
8039 (pedantic): Alias Wpedantic.
8040 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8041 (c_common_post_options): Likewise.
8042 (sanitize_cpp_opts): Likewise.
8043 * c-lex.c (interpret_float): Likewise.
8044 * c-format.c (check_format_types): Likewise.
8045 * c-common.c (pointer_int_sum): Likewise.
8046 (c_sizeof_or_alignof_type): Likewise.
8047 (c_add_case_label): Likewise.
8048 (c_do_switch_warnings): Likewise.
8049 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8050
04b391c1
JM
80512012-04-15 Jason Merrill <jason@redhat.com>
8052
8053 PR c++/52818
8054 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8055 (C_STD_NAME): Distinguish between C++98 and C++11.
8056
ac868f29
EB
80572012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8058
8059 PR target/52624
8060 * c-common.h (uint16_type_node): Rename into...
8061 (c_uint16_type_node): ...this.
8062 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8063 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8064
fd4116f4
MLI
80652012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8066
8067 * c-common.c (warn_if_unused_value): Move definition to here.
8068 * c-common.h (warn_if_unused_value): Move declaration to here.
8069
573ac65e
WB
80702012-03-23 William Bader <williambader@hotmail.com>
8071
8072 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8073
552b8185
JM
80742012-03-20 Jason Merrill <jason@redhat.com>
8075
8076 * c-common.h (enum cxx_dialect): Add cxx1y.
8077 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8078 test.
8079 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8080 * c-opts.c (c_common_post_options): Likewise.
8081 (set_std_cxx1y): New.
8082 (c_common_handle_option): Call it.
8083 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8084
04398fa8
PC
80852012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8086
8087 PR c++/14710
8088 * c.opt ([Wuseless-cast]): Add.
8089
d2a12ae7
RG
80902012-03-16 Richard Guenther <rguenther@suse.de>
8091
8092 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8093
a12bf402
MLI
80942012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8095
8096 PR c++/44783
8097 * c.opt (ftemplate-backtrace-limit) Add.
8098
5c30094f
RO
80992012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8100
8101 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8102 handling.
8103 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8104 (init_pragma): Don't register extern_prefix.
8105
21fa2faf
RG
81062012-03-12 Richard Guenther <rguenther@suse.de>
8107
8108 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8109 (builtin_type_for_size): Likewise.
8110
e3793c6f
JJ
81112012-02-13 Jakub Jelinek <jakub@redhat.com>
8112
8113 PR c++/52215
8114 * c-common.c (sync_resolve_params): Don't decide whether to convert
8115 or not based on TYPE_SIZE comparison, convert whenever arg_type
8116 is unsigned INTEGER_TYPE.
8117
93286335
PC
81182012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8119
8120 PR c/52118
8121 * c.opt ([Wunused-local-typedefs]): Fix description.
8122
7a421706
MS
81232012-01-24 Mike Stump <mikestump@comcast.net>
8124
8125 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8126 exactly.
8127
ba9b1f11
RG
81282012-01-18 Richard Guenther <rguenther@suse.de>
8129
8130 * c-opts.c (c_common_post_options): Reset LTO flags if
8131 we are about to generate a PCH.
8132
465406be
PC
81332012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8134
8135 PR c++/51777
8136 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8137 use pp_unsigned_wide_integer.
8138
aee15221
RG
81392012-01-10 Richard Guenther <rguenther@suse.de>
8140
8141 PR middle-end/51806
8142 * c-opts.c (c_common_handle_option): Move -Werror handling
8143 to language independent code.
8144
5720c0dc
RG
81452012-01-05 Richard Guenther <rguenther@suse.de>
8146
8147 PR middle-end/51764
8148 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8149 from common.opt.
8150
73ac190a
PC
81512011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8152
8153 PR c++/51316
8154 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8155 of array types with an unknown bound.
8156
48b0b196
JM
81572011-12-20 Joseph Myers <joseph@codesourcery.com>
8158
8159 * c-common.c (flag_isoc99): Update comment to refer to C11.
8160 (flag_isoc1x): Change to flag_isoc11.
8161 * c-common.h (flag_isoc99): Update comment to refer to C11.
8162 (flag_isoc1x): Change to flag_isoc11.
8163 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8164 C11.
8165 * c-opts.c (set_std_c1x): Change to set_std_c11.
8166 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8167 Call set_std_c11.
8168 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8169 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8170 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8171 standard.
8172 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8173 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8174 (std=gnu1x): Make alias of std=gnu11.
8175
d58d6eb5
JM
81762011-12-19 Jason Merrill <jason@redhat.com>
8177
8178 PR c++/51228
8179 * c-common.c (handle_transparent_union_attribute): Check the first
8180 field if the type is complete.
8181
b3908fcc
JW
81822011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8183
8184 PR libstdc++/51365
8185 * c-common.c (RID_IS_FINAL): Add.
8186 * c-common.h (RID_IS_FINAL): Add.
8187
fea3ca91
IS
81882011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8189
8190 * c.opt (fgnu-runtime): Provide full description.
8191 (fnext-runtime): Likewise.
8192 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8193
62bad7cd
AM
81942011-11-28 Andrew MacLeod <amacleod@redhat.com>
8195
8196 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8197 predefines in one place. Add LOCK_FREE predefines.
8198 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8199 new func.
8200
c466c4ff
AM
82012011-11-24 Andrew MacLeod <amacleod@redhat.com>
8202
8203 PR c/51256
9faeb493 8204 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8205 conditions
9faeb493
UB
8206 (resolve_overloaded_atomic_exchange,
8207 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8208 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8209 error_mark_node for error conditions.
9faeb493 8210
a5952633
RG
82112011-11-08 Richard Guenther <rguenther@suse.de>
8212
8213 PR middle-end/51010
8214 c-family/
8215
0a35513e
AH
82162011-11-07 Richard Henderson <rth@redhat.com>
8217 Aldy Hernandez <aldyh@redhat.com>
8218 Torvald Riegel <triegel@redhat.com>
8219
8220 Merged from transactional-memory.
8221
8222 * c-common.c (handle_tm_wrap_attribute,
8223 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8224 (struct c_common_reswords): Added __transaction* keywords.
8225 (struct c_common_attribute_table): Added transaction* and tm_regparm
8226 attributes.
8227 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8228 masks.
8229 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8230 find_tm_attribute): Declare.
8231
6d87092d
JM
82322011-11-07 Jason Merrill <jason@redhat.com>
8233
8234 PR c++/35688
8235 * c-common.c, c-common.h: Revert yesterday's changes.
8236
8e7860a1
JM
82372011-11-06 Jason Merrill <jason@redhat.com>
8238
8239 PR c++/35688
8240 * c-common.c (decl_has_visibility_attr): Split out from...
8241 (c_determine_visibility): ...here.
8242 * c-common.h: Declare it.
8243
d19fa6b5
JM
82442011-11-06 Joseph Myers <joseph@codesourcery.com>
8245
8246 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8247 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8248 type.
8249 (check_user_alignment): New. Split out of
8250 handle_aligned_attribute. Disallow integer constants with
8251 noninteger types. Conditionally allow zero.
8252 (handle_aligned_attribute): Use check_user_alignment.
8253 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8254
86951993
AM
82552011-11-06 Andrew MacLeod <amacleod@redhat.com>
8256 Richard Henderson <rth@redhat.com>
8257
8258 Merged from cxx-mem-model.
8259
8260 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8261 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8262 parameters that are the same type size.
8263 (get_atomic_generic_size): New. Find size of generic
8264 atomic function parameters and do typechecking.
8265 (add_atomic_size_parameter): New. Insert size into parameter list.
8266 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8267 either __atomic_exchange_n or external library call.
9faeb493 8268 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8269 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8270 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8271 __atomic_load_n or an external library call.
8272 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8273 __atomic_store_n or an external library call.
8274 (resolve_overloaded_builtin): Handle new __atomic builtins.
8275
cf9e9959
EB
82762011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8277
8278 PR c++/50608
8279 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8280 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8281 <INDIRECT_REF>: Return the argument.
8282 <ARRAY_REF>: Remove special code for negative offset.
8283 Call fold_build_pointer_plus instead of size_binop.
8284 (fold_offsetof): Remove STOP_REF argument and adjust.
8285 * c-common.h (fold_offsetof_1): Declare.
8286 (fold_offsetof): Remove STOP_REF argument.
8287
25339f10
JM
82882011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8289
8290 PR c++/50810
8291 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8292 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8293 Wnarrowing for C++0x and C++98.
8294 * c.opt ([Wnarrowing]): Update.
8295
89401152
PC
82962011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8297
8298 PR c++/44277
8299 * c.opt: Add Wzero-as-null-pointer-constant.
8300
97e3ad20
JM
83012011-10-31 Jason Merrill <jason@redhat.com>
8302
15694fdd
JM
8303 * c.opt (-fdeduce-init-list): Off by default.
8304
97e3ad20
JM
8305 PR c++/50920
8306 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8307 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8308 and -Wc++11-compat.
8309 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8310
fb9120e3
RAV
83112011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8312
8313 PR c++/30066
8314 * c.opt (fvisibility-inlines-hidden): Description change.
8315
3ce4f9e4
ESR
83162011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8317
8318 Implement C++11 user-defined literals.
8319 * c-common.c (build_userdef_literal): New.
8320 * c-common.def: New tree code.
8321 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8322 * c-lex.c (interpret_float): Add suffix parm.
8323 (c_lex_with_flags): Build literal tokens.
8324
5f53c243
PC
83252011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8326
8327 PR c++/50841
8328 Revert:
8329 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8330
8331 PR c++/50810
8332 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8333 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8334 Wnarrowing for C++0x and C++98.
8335 * c.opt ([Wnarrowing]): Update.
8336
263734e1
PC
83372011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8338
8339 PR c++/50810
8340 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8341 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8342 Wnarrowing for C++0x and C++98.
8343 * c.opt ([Wnarrowing]): Update.
8344
d2e312d7
PC
83452011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8346
8347 PR c++/45385
8348 * c-common.c (conversion_warning): Remove code looking for
8349 artificial operands.
8350
d17687f6
DS
83512011-10-18 Dodji Seketeli <dodji@redhat.com>
8352
8353 PR bootstrap/50760
8354 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8355 !NO_IMPLICIT_EXTERN_C.
d17687f6 8356
fc8396e9
PC
83572011-10-17 Michael Spertus <mike_spertus@symantec.com>
8358
8359 * c-common.c (c_common_reswords): Add __bases,
8360 __direct_bases.
8361 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8362
83632011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8364
8365 PR c++/50757
8366 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8367
847e697a
TT
83682011-10-15 Tom Tromey <tromey@redhat.com>
8369 Dodji Seketeli <dodji@redhat.com>
8370
8371 * c.opt (fdebug-cpp): New option.
8372 * c-opts.c (c_common_handle_option): Handle the option.
8373 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8374 output stream in parameter. Factorized from ...
8375 (maybe_print_line): ... this. Dump location debug information when
8376 -fdebug-cpp is in effect.
8377 (print_line_1): New static function. Takes an output stream in
8378 parameter. Factorized from ...
8379 (print_line): ... here. Dump location information when -fdebug-cpp
8380 is in effect.
8381 (scan_translation_unit): Dump location information when
8382 -fdebug-cpp is in effect.
8383
92582b75
TT
83842011-10-15 Tom Tromey <tromey@redhat.com>
8385 Dodji Seketeli <dodji@redhat.com>
8386
8387 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8388 without argument.
8389 * c-opts.c (c_common_handle_option)<case
8390 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8391 cases. Handle -ftrack-macro-expansion with and without argument.
8392
46427374
TT
83932011-10-15 Tom Tromey <tromey@redhat.com>
8394 Dodji Seketeli <dodji@redhat.com>
8395
8396 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8397 (print_line, cb_define, do_line_change): Adjust to avoid touching
8398 the internals of struct line_map. Use the public API instead.
8399 * c-pch.c (c_common_read_pch): Likewise.
8400 * c-lex.c (fe_file_change): Likewise.
8401
fc8396e9
PC
84022011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8403
8404 PR c++/17212
8405 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8406
84072011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8408
8409 PR c++/33067
8410 * c-pretty-print.c (pp_c_floating_constant): Output
8411 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8412
e79983f4
MM
84132011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8414
8415 * c-common.c (def_builtin_1): Delete old interface with two
8416 parallel arrays to hold standard builtin declarations, and replace
8417 it with a function based interface that can support creating
8418 builtins on the fly in the future. Change all uses, and poison
8419 the old names. Make sure 0 is not a legitimate builtin index.
8420 * c-omp.c (c_finish_omp_barrier): Ditto.
8421 (c_finish_omp_taskwait): Ditto.
8422 (c_finish_omp_flush): Ditto.
8423
6637388f
TG
84242011-10-11 Tristan Gingold <gingold@adacore.com>
8425
8426 * c.opt: (fallow-parameterless-variadic-functions): New.
8427
3797cb21
DS
84282011-09-08 Dodji Seketeli <dodji@redhat.com>
8429
8430 PR c++/33255 - Support -Wunused-local-typedefs warning
8431 * c-common.h (struct c_language_function::local_typedefs): New
8432 field.
9faeb493
UB
8433 (record_locally_defined_typedef, maybe_record_typedef_use)
8434 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8435 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8436 (maybe_record_typedef_use)
8437 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8438 * c.opt: Declare new -Wunused-local-typedefs flag.
8439
693ddb1b
EB
84402011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8441
8442 PR middle-end/50266
8443 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8444 computations.
8445
830c740f
RG
84462011-09-05 Richard Guenther <rguenther@suse.de>
8447
8448 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8449 of integer_minus_one_node for empty array upper bounds.
8450
892a371f
DS
84512011-08-28 Dodji Seketeli <dodji@redhat.com>
8452
8453 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8454 it's the first time it's being called on this main TU.
8455
0e3fdb48
RB
84562011-08-24 Richard Guenther <rguenther@suse.de>
8457
8458 PR c/49396
8459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8460
84612011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8462
8463 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8464 defined in cpp_init_builtins and c_cpp_builtins.
8465
d4a83c10
JM
84662011-08-19 Joseph Myers <joseph@codesourcery.com>
8467
8468 * c-common.c (c_common_reswords): Add __builtin_complex.
8469 * c-common.h (RID_BUILTIN_COMPLEX): New.
8470
bbceee64
JM
84712011-08-18 Joseph Myers <joseph@codesourcery.com>
8472
8473 * c-common.c (c_common_reswords): Add _Noreturn.
8474 (keyword_is_function_specifier): Handle RID_NORETURN.
8475 * c-common.h (RID_NORETURN): New.
8476
3f8257db 84772011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8478
8479 * c-common.c (unsafe_conversion_p): New function. Check if it is
8480 unsafe to convert an expression to the type.
8481 (conversion_warning): Adjust, use unsafe_conversion_p.
8482 * c-common.h (unsafe_conversion_p): New function declaration.
8483
20906c66
JJ
84842011-08-02 Jakub Jelinek <jakub@redhat.com>
8485
8486 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8487 (c_finish_omp_taskyield): New prototype.
8488 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8489 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8490 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8491 or RHS1 have side-effects, evaluate those too in the right spot,
8492 if it is a decl and LHS is also a decl, error out if they
8493 aren't the same.
8494 (c_finish_omp_taskyield): New function.
8495 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8496 * c-pragma.c (omp_pragmas): Add taskyield.
8497 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8498 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8499 PRAGMA_OMP_CLAUSE_MERGEABLE.
8500
770e5a2e
DS
85012011-07-25 Dodji Seketeli <dodji@redhat.com>
8502
8503 * c-common.h (set_underlying_type): Remove parm name from
8504 declaration.
8505
1baae426
RG
85062011-07-25 Romain Geissler <romain.geissler@gmail.com>
8507
8508 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8509
fcb21722
JM
85102011-07-22 Jason Merrill <jason@redhat.com>
8511
76f86d00
JM
8512 PR c++/49793
8513 * c.opt (Wnarrowing): New.
8514
3a636414
JM
8515 PR c++/30112
8516 * c-common.h: Declare c_linkage_bindings.
8517 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8518
fcb21722
JM
8519 PR c++/49813
8520 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8521 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8522 as flag_isoc99 for 'restrict'.
8523 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8524
02614448
ILT
85252011-07-21 Ian Lance Taylor <iant@google.com>
8526
8527 PR middle-end/49705
8528 * c-common.c (c_disable_warnings): New static function.
8529 (c_enable_warnings): New static function.
8530 (c_fully_fold_internal): Change local unused_p to bool. Call
8531 c_disable_warnings and c_enable_warnings rather than change
8532 c_inhibit_evaluation_warnings.
8533
34429675
JM
85342011-07-20 Jason Merrill <jason@redhat.com>
8535
8536 PR c++/6709 (DR 743)
8537 PR c++/42603 (DR 950)
8538 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8539 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8540 (CPP_DECLTYPE): New.
8541 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8542
5d49b6a7
RG
85432011-07-19 Richard Guenther <rguenther@suse.de>
8544
8545 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8546 * c-omp.c (c_finish_omp_for): Likewise.
8547
e84a58ff
EB
85482011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8549
8550 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8551 body on the next line.
8552
329af3c7
JM
85532011-07-08 Jason Merrill <jason@redhat.com>
8554
4063e61b
JM
8555 PR c++/45437
8556 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8557
329af3c7
JM
8558 PR c++/49673
8559 * c-common.c (c_apply_type_quals_to_decl): Don't check
8560 TYPE_NEEDS_CONSTRUCTING.
8561
1a072294
RG
85622011-07-06 Richard Guenther <rguenther@suse.de>
8563
8564 * c-common.c (c_common_nodes_and_builtins):
8565 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8566
fce5dddd
RG
85672011-07-05 Richard Guenther <rguenther@suse.de>
8568
8569 * c-common.c (c_common_nodes_and_builtins): Build all common
8570 tree nodes first.
8571
45d439ac
JJ
85722011-06-27 Jakub Jelinek <jakub@redhat.com>
8573
56300785
JJ
8574 * c-common.h (c_tree_chain_next): New static inline function.
8575
45d439ac
JJ
8576 * c-common.c (check_builtin_function_arguments): Handle
8577 BUILT_IN_ASSUME_ALIGNED.
8578
e0a8ecf2
AM
85792011-06-21 Andrew MacLeod <amacleod@redhat.com>
8580
8581 * c-common.c: Add sync_ or SYNC__ to builtin names.
8582 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8583
85842011-06-20 Pierre Vittet <piervit@pvittet.com>
8585
8586 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8587 handler.
8588 (gen_pragma_handler): New union.
8589 (internal_pragma_handler): New type.
8590 (c_register_pragma_with_data)
8591 (c_register_pragma_with_expansion_and_data): New functions.
8592
8593 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8594 (c_register_pragma, c_register_pragma_with_expansion)
8595 (c_invoke_pragma_handler): Changed to work with
8596 internal_pragma_handler.
8597 (c_register_pragma_with_data)
8598 (c_register_pragma_with_expansion_and_data): New functions.
8599
677f3fa8
JM
86002011-06-14 Joseph Myers <joseph@codesourcery.com>
8601
8602 * c-common.c: Include common/common-target.h.
8603 (handle_section_attribute): Use
8604 targetm_common.have_named_sections.
8605 * c-cppbuiltin.c: Include common/common-target.h.
8606 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8607
d7fc8c14
RG
86082011-06-10 Richard Guenther <rguenther@suse.de>
8609
8610 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8611 to print a IDENTIFIER_NODE.
8612
10e48e39
RO
86132011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8614 Joseph Myers <joseph@codesourcery.com>
8615
8616 * c.opt (fbuilding-libgcc): New option.
8617 * c-cppbuiltin.c (c_cpp_builtins): Define
8618 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8619
6976ae51
JM
86202011-06-07 Jason Merrill <jason@redhat.com>
8621
3ff60975
JM
8622 * c-common.c (max_tinst_depth): Lower default to 900.
8623
6976ae51
JM
8624 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8625
009db074
RG
86262011-06-07 Richard Guenther <rguenther@suse.de>
8627
8628 * c-common.c (c_common_nodes_and_builtins): Do not set
8629 size_type_node or call set_sizetype.
8630
b4592b92
DS
86312011-06-07 Dodji Seketeli <dodji@redhat.com>
8632
8633 PR debug/49130
8634 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8635 type when using pointer comparison to compare types.
b4592b92 8636
014ab419
JW
86372011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8638
8639 * c.opt: Add -Wdelete-non-virtual-dtor.
8640 * c-opts.c (c_common_handle_option): Include it in -Wall.
8641
4f60111f
NF
86422011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8643
8644 PR bootstrap/49190
8645
8646 Revert:
8647 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8648
8649 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8650 not tree_common.
8651
4cc4f2f4
JJ
86522011-05-27 Jakub Jelinek <jakub@redhat.com>
8653
8654 PR c++/49165
8655 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8656 C++ don't call c_common_truthvalue_conversion on void type arms.
8657
38e01f9e
NF
86582011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8659
8660 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8661 (stmt_list_stack): Define.
8662 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8663 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8664
92e948a8
NF
86652011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8666
8667 * c-common.c (warning_candidate_p): Check for BLOCKs.
8668
a2fc3e63
NF
86692011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8670
8671 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8672 not tree_common.
8673
0957c029
JJ
86742011-05-25 Jakub Jelinek <jakub@redhat.com>
8675
8676 * c-common.c (def_fn_type): Remove extra va_end.
8677
828fb3ba
JM
86782011-05-23 Jason Merrill <jason@redhat.com>
8679
8680 PR c++/48106
8681 * c-common.c (c_common_get_narrower): New.
8682 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8683
dde05067
NF
86842011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8685
8686 * c-common.h (check_function_arguments): Tweak prototype of
8687 check_function_arguments.
8688 * c-common.c (check_function_arguments): Likewise. Adjust
8689 calls to check_function_nonnull, check_function_format, and
8690 check_function_sentinel.
8691 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8692 separate attributes and typelist arguments. Use
8693 FOREACH_FUNCTION_ARGS to iterate over argument types.
8694
3c0d13bf
PC
86952011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8696
8697 * c-common.c (c_common_reswords): Reorder.
8698 * c-common.h (rid): Likewise.
8699
8242dd04
NF
87002011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8701
8702 * c-common.c (def_fn_type): Don't call build_function_type, call
8703 build_function_type_array or build_varargs_function_type_array
8704 instead.
8705 (c_common_nodes_and_builtins): Likewise.
8706
3d528853
NF
87072011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8708
8709 * c-common.c (c_add_case_label): Omit the loc argument to
8710 build_case_label.
8711 * c-common.h (build_case_label): Remove.
8712 * c-semantics.c (build_case_label): Remove.
8713
a04a722b
JM
87142011-05-05 Joseph Myers <joseph@codesourcery.com>
8715
8716 * c-objc.h (objc_start_method_definition): Update prototype.
8717 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8718
e19a18d4
NF
87192011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8720
8721 * c-common.c (check_main_parameter_types): Reindent. Don't use
8722 TYPE_ARG_TYPES directly.
8723 (handle_nonnull_attribute): Likewise.
8724 (sync_resolve_params): Likewise.
8725 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8726 to check_format_string.
8727 (handle_format_attribute): Likewise.
8728 (check_format_string): Take a function type to examine instead of
8729 a type list. Use a function_arg_iterator to step through argument
8730 types.
8731
c62c040f
RG
87322011-05-04 Richard Guenther <rguenther@suse.de>
8733
8734 * c-common.c (fix_string_type): Use size_int for index type bounds.
8735 (start_fname_decls): Do not pass NULL to build_int_cst.
8736 (c_init_attributes): Likewise.
8737 * c-lex.c (c_lex_with_flags): Likewise.
8738
c12ff9d8
JM
87392011-04-27 Jason Merrill <jason@redhat.com>
8740
8741 * c-common.c (make_tree_vector_from_list): New.
8742 * c-common.h: Declare it.
8743
304dfbe3
RG
87442011-04-26 Richard Guenther <rguenther@suse.de>
8745
8746 PR preprocessor/48248
8747 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8748 for output size with -P.
8749
3c0d13bf
PC
87502011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8751
8752 * c-common.c (struct c_common_resword): Add __underlying_type.
8753 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8754
04695783
JM
87552011-04-20 Jim Meyering <meyering@redhat.com>
8756
8757 * c-format.c (init_dollar_format_checking): Remove useless
8758 if-before-free.
8759
0dc33c3c
NP
87602011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8761
8762 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8763 (objc_detect_field_duplicates): New.
0dc33c3c 8764 * stub-objc.c: Likewise.
3c0d13bf 8765
c59633d9
NP
87662011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8767
8768 * stub-objc.c (objc_declare_protocols): Renamed to
8769 objc_declare_protocol.
8770 * c-objc.h: Likewise.
3c0d13bf 8771
32dabdaf
NP
87722011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8773
8774 * stub-objc.c (objc_declare_class): Updated argument name.
8775
81f653d6
NF
87762011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8777
8778 * c-common.h (c_common_init_ts): Declare.
8779 * c-common.c (c_common_init_ts): Define.
8780
eb345401
NP
87812011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8782
8783 * c-objc.h (objc_build_message_expr): Updated prototype.
8784 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8785
a358e188
MJ
87862011-04-12 Martin Jambor <mjambor@suse.cz>
8787
8788 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8789 of cgraph_node.
8790
e6313a78
RG
87912011-04-11 Richard Guenther <rguenther@suse.de>
8792
8793 * c-common.c (complete_array_type): Build a range type of
8794 proper type.
8795
dcf0c47e
NF
87962011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8797
8798 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8799 (handle_type_generic_attribute): Likewise.
8800
1ee44b26
JM
88012011-04-07 Jason Merrill <jason@redhat.com>
8802
8803 PR c++/48450
8804 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8805 conversion from C++0x scoped enum.
8806
acce4e77
JM
88072011-04-06 Joseph Myers <joseph@codesourcery.com>
8808
8809 * c-target-def.h: New file.
8810 * c-target.def: New file.
8811 * c-target.h: New file.
8812 * c-common.c (targetcm): Don't define here.
8813 * c-common.h (default_handle_c_option): Declare.
8814 * c-format.c: Include c-target.h instead of target.h.
8815 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8816 include tm.h.
8817 (default_handle_c_option): Move from targhooks.c.
8818
e2eefb55
JJ
88192011-03-29 Jakub Jelinek <jakub@redhat.com>
8820
8821 PR preprocessor/48248
8822 * c-ppoutput.c (print): Add src_file field.
8823 (init_pp_output): Initialize it.
8824 (maybe_print_line): Don't optimize by adding up to 8 newlines
8825 if map->to_file and print.src_file are different file.
8826 (print_line): Update print.src_file.
8827
ba78087b
KT
88282011-03-25 Kai Tietz <ktietz@redhat.com>
8829
8830 * c-ada-spec.c (compare_comment): Use filename_cmp
8831 instead of strcmp for filename.
8832
0edf1bb2
JL
88332011-03-25 Jeff Law <law@redhat.com>
8834
adfac8df 8835 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8836
c7dc8804
JM
88372011-03-25 Jason Merrill <jason@redhat.com>
8838
8839 * c.opt: Add -std=c++03.
8840
d1d879b1
EB
88412011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8842
8843 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8844
3f8257db 88452011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
8846
8847 PR target/12171
5050afdf
KT
8848 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8849 Display allowed attributes for function pointer types.
8850 (pp_c_attributes_display): New function to display
8851 attributes having affects_type_identity flag set to true.
8852 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8853
62d784f7
KT
8854 * c-common.c (c_common_attribute_table):
8855 Add new element.
8856 (c_common_format_attribute_table): Likewise.
8857
82d37118
JM
88582011-03-18 Jason Merrill <jason@redhat.com>
8859
49a000c3
JM
8860 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8861 * c-common.h: Don't declare it here.
8862 * c-common.c: Or define it here.
8863 * c-opts.c (c_common_handle_option): Or set it here.
8864
82d37118
JM
8865 PR c++/35315
8866 * c-common.c (handle_transparent_union_attribute): Don't
8867 make a duplicate type in C++.
8868
17bc631c
JM
88692011-03-15 Jason Merrill <jason@redhat.com>
8870
8871 * c-common.c (max_constexpr_depth): New.
8872 * c-common.h: Declare it.
8873 * c-opts.c (c_common_handle_option): Set it.
8874 * c.opt (fconstexpr-depth): New option.
8875
1b9b91a6
JM
88762011-03-11 Jason Merrill <jason@redhat.com>
8877
f231b5ff
JM
8878 * c-common.c (attribute_takes_identifier_p): Add missing const.
8879
1b9b91a6
JM
8880 PR c++/46803
8881 * c-common.c (attribute_takes_identifier_p): Assume that an
8882 unknown attribute takes an identifier.
8883
a19e4d44
NF
88842011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8885
8886 PR c/47786
8887 * c-common.c (c_type_hash): Call list_length instead of iterating
8888 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8889
982d62f6
JJ
88902011-02-19 Jakub Jelinek <jakub@redhat.com>
8891
8892 PR c/47809
8893 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8894
0a256240
NP
88952011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8896
8897 * c.opt (fobjc-abi-version=) New.
8898 (fobjc-nilcheck): New.
8899
ba9e6dd5
NF
89002011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8901
8902 PR c++/46890
8903 * c-common.h (keyword_is_decl_specifier): Declare.
8904 * c-common.c (keyword_is_decl_specifier): Define.
8905 (keyword_is_function_specifier): New function.
8906
7273813a
JJ
89072011-01-26 Jakub Jelinek <jakub@redhat.com>
8908
8909 PR c/47473
8910 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8911 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8912 REAL_TYPE.
8913
908ef79b
AC
89142011-01-26 Arnaud Charlet <charlet@adacore.com>
8915
8916 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8917
237e9384
JJ
89182011-01-26 Jakub Jelinek <jakub@redhat.com>
8919
8920 PR pch/47430
8921 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8922 after init_c_lex if pch_file is set.
8923
47ea1edf
DK
89242011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8925
d4dba752 8926 PR c++/43601
47ea1edf
DK
8927 * c.opt (-fkeep-inline-dllexport): New switch.
8928
2aa9c6ae
RG
89292011-01-12 Richard Guenther <rguenther@suse.de>
8930
8931 PR middle-end/32511
8932 * c-common.c (handle_weak_attribute): Warn instead of error
8933 on declaring an inline function weak.
8934
7bd11157
TT
89352011-01-05 Tom Tromey <tromey@redhat.com>
8936
8937 * c-common.h (lvalue_error): Update.
8938 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8939 not error.
8940
0e66e494 89412010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 8942
b4f588c4
NP
8943 PR objc/47075
8944 * c-objc.h (objc_finish_message_expr): Added argument to
8945 prototype.
8946
f4da8dce
NF
89472010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8948
8949 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8950 Use prototype_p.
8951
46270f14
NP
89522010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8953
8954 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 8955 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 8956
4816c593
NF
89572010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8958
8959 * c-common.h (readonly_error): Declare.
8960 * c-common.c (readonly_error): Define.
8961
7a6daeb0
NF
89622010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8963
8964 * c-common.h (invalid_indirection_error): Declare.
8965 * c-common.c (invalid_indirection_error): Define.
8966
892f6119
RG
89672010-12-03 Richard Guenther <rguenther@suse.de>
8968
8969 PR c/46745
8970 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8971 (pp_c_unary_expression): Likewise.
8972 (pp_c_expression): Likewise.
8973
6c39e757
NP
89742010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8975
8976 * c-common.h (objc_finish_function): New.
8977 (objc_non_volatilized_type): Removed.
8978 (objc_type_quals_match): Removed.
8979 * stub-objc.c (objc_finish_function): New.
8980 (objc_non_volatilized_type): Removed.
8981 (objc_type_quals_match): Removed.
9faeb493 8982
7c475d11
JM
89832010-11-30 Joseph Myers <joseph@codesourcery.com>
8984
8985 * c-common.h (parse_optimize_options): Declare.
8986 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8987 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8988
71f3e391
JM
89892010-11-29 Joseph Myers <joseph@codesourcery.com>
8990
8991 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8992 GET_ENVIRONMENT.
8993 * c-pch.c (O_BINARY): Don't define here.
8994 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8995
d5fabb58
JM
89962010-11-25 Joseph Myers <joseph@codesourcery.com>
8997
8998 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8999 targetm.except_unwind_info.
9000
299404a1
JM
90012010-11-23 Joseph Myers <joseph@codesourcery.com>
9002
9003 * c-opts.c (c_common_handle_option): Pass location to
9004 set_struct_debug_option.
9005
c98cd5bf
JM
90062010-11-23 Joseph Myers <joseph@codesourcery.com>
9007
9008 * c-common.c (visibility_options): Move from ../opts.c.
9009 * c-common.h (struct visibility_flags, visibility_options):
9010 Declare here.
9011 * c-opts.c (finish_options): Rename to c_finish_options.
9012 (c_common_init): Update call to finish_options.
9013
a9546771
NP
90142010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9015
9016 PR objc/34033
9017 * c-lex.c (lex_string): Check that each string in an Objective-C
9018 string concat sequence starts with either one or zero '@', and
9019 that there are no spurious '@' signs at the end.
9020
24a57808
JM
90212010-11-20 Joseph Myers <joseph@codesourcery.com>
9022
9023 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9024 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9025 HANDLE_PRAGMA_VISIBILITY.
9026 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9027 HANDLE_PRAGMA_VISIBILITY): Don't define.
9028 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9029
a9aa2c3a
NF
90302010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9031
9032 PR c++/16189
9033 PR c++/36888
9034 PR c++/45331
9035 * c-common.h (keyword_begins_type_specifier): Declare.
9036 (keyword_is_storage_class_specifier): Declare.
9037 (keyword_is_type_qualifier): Declare.
9038 * c-common.c (keyword_begins_type_specifier): New function.
9039 (keyword_is_storage_class_specifier): New function.
9040 (keyword_is_type_qualifier): Declare.
9041
5386338c
JM
90422010-11-19 Joseph Myers <joseph@codesourcery.com>
9043
9044 PR c/46547
9045 * c-common.c (in_late_binary_op): Define.
9046 (c_common_truthvalue_conversion): Check in_late_binary_op before
9047 calling c_save_expr.
9048 * c-common.h (in_late_binary_op): Declare.
9049
69ccdddb
JM
90502010-11-19 Joseph Myers <joseph@codesourcery.com>
9051
9052 * c-opts.c (c_common_handle_option): Update calls to
9053 set_struct_debug_option.
9054
6b192a09
NP
90552010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9056
9057 * c-common.h (objc_declare_protocols): Added additional argument.
9058 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9059
fb52b50a
NF
90602010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9061
9062 PR c/33193
9063 * c-common.h (build_real_imag_expr): Declare.
9064 * c-semantics.c (build_real_imag_expr): Define.
9065
b37421c6
JM
90662010-11-17 Joseph Myers <joseph@codesourcery.com>
9067
9068 * c-opts.c (c_common_parse_file): Take no arguments.
9069 * c-common.h (c_common_parse_file): Update prototype.
9070
07078664
JJ
90712010-11-16 Jakub Jelinek <jakub@redhat.com>
9072
9073 PR c++/46401
9074 * c-common.c (warning_candidate_p): Don't track non-const calls
9075 or STRING_CSTs.
9076
c6a13190
ILT
90772010-11-15 Ian Lance Taylor <iant@google.com>
9078
9079 * c-lex.c (init_c_lex): Set macro debug callbacks if
9080 flag_dump_go_spec is set.
9081
925e8657
NP
90822010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9083
9084 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9085 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9086
bb0a9581
NF
90872010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9088
9089 PR preprocessor/45038
9090 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9091 dialects.
9092
c5fa0890
JM
90932010-11-12 Joseph Myers <joseph@codesourcery.com>
9094
9095 * c-common.h (c_family_lang_mask): Declare.
9096 * c-opts.c (c_family_lang_mask): Make extern.
9097 * c-pragma.c (handle_pragma_diagnostic): Use
9098 control_warning_option.
9099
a4d8c676
JM
91002010-11-12 Joseph Myers <joseph@codesourcery.com>
9101
9102 * c-common.c (parse_optimize_options): Update call to
9103 decode_options.
9104 * c-common.h (c_common_handle_option): Update prototype.
9105 * c-opts.c (c_common_handle_option): Take location_t parameter and
9106 pass it to other functions.
9107
f954bd2c
JM
91082010-11-11 Joseph Myers <joseph@codesourcery.com>
9109
9110 * c-opts.c (warning_as_error_callback): Remove.
9111 (c_common_initialize_diagnostics): Don't call
9112 register_warning_as_error_callback.
9113 (c_common_handle_option): Handle -Werror=normalized= here.
9114
d8a07487
JM
91152010-11-10 Joseph Myers <joseph@codesourcery.com>
9116
9117 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9118 in diagnostic.
9119 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9120 letter.
9121 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9122 Remove trailing '.' from diagnostics.
9123 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9124
d5478783
JM
91252010-11-10 Joseph Myers <joseph@codesourcery.com>
9126
9127 * c-common.c (parse_optimize_options): Pass global_dc to
9128 decode_options.
9129 * c-opts.c (c_common_handle_option): Pass &global_options to
9130 set_Wstrict_aliasing.
9131 * c.opt (v): Don't mark Common or document here.
9132
91ebb981
IS
91332010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9134
9135 PR target/44981
9136 * c-format.c (format_type): New type gcc_objc_string_format_type.
9137 (valid_stringptr_type_p): New.
9138 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9139 (check_format_string): Pass expected type, use
91ebb981
IS
9140 valid_stringptr_type_p (), check that the format string types are
9141 consistent with the format specification.
9142 (decode_format_attr): Warn if NSString is used outside objective-c.
9143 (format_types_orig): Add NSString.
9144 (format_name): New.
9145 (format_flags): New.
9146 (check_format_arg): Handle format strings requiring an external parser.
9147 first_target_format_type: New variable.
9148 (handle_format_attribute): Set up first_target_format_type, pass the
9149 expected format arg string type to check_format_string().
9150 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9151 * stub-objc.c (objc_string_ref_type_p): New.
9152 (objc_check_format_arg): New.
9153
bede2adc
NP
91542010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9155
9faeb493 9156 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9157 * c-common.h (objc_build_class_component_ref): New.
9158 * stub-objc.c (objc_build_class_component_ref): New.
9159
9a179d01
NP
91602010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9161
9162 * c.opt (Wproperty-assign-default): New option.
9163
22d8d616
NP
91642010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9165
9166 Implemented -fobjc-std=objc1 flag.
9167 * c.opt (fobjc-std=objc1): New option.
9168
2debdb4f
NP
91692010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9170
9171 Implemented format and noreturn attributes for Objective-C methods.
9172 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9173 attribute for Objective-C methods.
9174
ec52b111
JM
91752010-10-31 Jason Merrill <jason@redhat.com>
9176
9177 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9178 EXPR_LOC_OR_HERE.
9179
46a88c12
NP
91802010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9181
9182 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9183 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9184 (objc_add_property_declaration): Removed arguments for copies and
9185 ivar.
9186 (objc_build_getter_call): Renamed to
9187 objc_maybe_build_component_ref.
9188 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9189 (objc_is_property_ref): New.
9190 * c-common.c (c_common_reswords): Removed copies and ivar.
9191 * stub-objc.c (objc_add_property_declaration): Removed arguments
9192 for copies and ivar.
9193 (objc_build_getter_call): Renamed to
9194 objc_maybe_build_component_ref.
9195 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9196 (objc_is_property_ref): New.
9faeb493 9197
1e4bf85b
AC
91982010-10-29 Arnaud Charlet <charlet@adacore.com>
9199 Matthew Gingell <gingell@adacore.com>
9200
9201 * c-ada-spec.c (separate_class_package): New function.
9202 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9203 name of their enclosing package.
9204 (print_ada_declaration): Use separate_class_package.
9205
81f0bab2
JM
92062010-10-27 Jason Merrill <jason@redhat.com>
9207
2b08f2c5
JM
9208 * c-common.c (c_common_reswords): Add __is_literal_type.
9209 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9210
81f0bab2
JM
9211 * c-common.c (check_case_value): Remove special C++ code.
9212
200290f2
NP
92132010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9214
9215 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9216 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9217 and RID_LAST_PATTR.
9218 (objc_add_property_declaration): Added additional arguments.
9219 (objc_property_attribute_kind): Removed.
9220 (objc_set_property_attr): Removed.
9221 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9222 copy and nonatomic.
9223 * stub-objc.c (objc_add_property_declaration): Added additional
9224 arguments.
9225 (objc_set_property_attr): Removed.
9faeb493 9226
f614132b
NP
92272010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9228
9229 * c-common.h (objc_add_property_variable): Renamed to
9230 objc_add_property_declaration. Added location argument.
9231 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9232
b8a18805
NP
92332010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9234
9235 * c-common.h (objc_maybe_printable_name): New.
9236 * stub-objc.c (objc_maybe_printable_name): New.
9237
3f8257db
JJ
92382010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9239 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9240
9241 * c-common.h (c_common_mark_addressable_vec): Declare.
9242 * c-common.c (c_common_mark_addressable_vec): New function.
9243
249a82c4
NP
92442010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9245
9246 * c-common.h (objc_set_method_type): Removed.
9247 (objc_add_method_declaration): Added boolean argument.
9248 (objc_start_method_definition): Same change.
9249 (objc_build_method_signature): Same change.
9250 * stub-objc.c (objc_set_method_type): Removed.
9251 (objc_add_method_declaration): Added boolean argument.
9252 (objc_start_method_definition): Same change.
9253 (objc_build_method_signature): Same change.
9254
977e30bc
NP
92552010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9256
9257 * c-common.h (finish_file): Removed.
9258 (objc_write_global_declarations): New.
9259 * c-opts.c (c_common_parse_file): Do not call finish_file.
9260 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9261
da57d1b9
NP
92622010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9263
9264 Implemented parsing @synthesize and @dynamic for
9265 Objective-C/Objective-C++.
9266 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9267 (objc_add_synthesize_declaration): New.
9268 (objc_add_dynamic_declaration): New.
9269 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9270 * stub-objc.c (objc_add_synthesize_declaration): New.
9271 (objc_add_dynamic_declaration): New.
9faeb493 9272
0069111f
MM
92732010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9274
9275 PR target/46041
9276 * c-cppbuiltin.c (mode_has_fma): Move function here from
9277 builtins.c. Don't use the fma optab, instead just use the
9278 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9279 using -save-temps.
9280
e426b47b
NP
92812010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9282
9283 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9284
3f8257db 9285 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9286
9faeb493 9287 Radar 4330422
e426b47b
NP
9288 * c-common.h (objc_non_volatilized_type): New declaration
9289 * stub-objc.c (objc_non_volatilized_type): New stub.
9290
90fbfdc3
NP
92912010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9292
e426b47b 9293 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9294
3f8257db 9295 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9296
9faeb493 9297 Radar 4133425
90fbfdc3 9298 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9299 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9300
c37d8c30
IS
93012010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9302
9303 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9304 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9305 (objc_ivar_visibility_kind): New enum.
9306 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9307 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9308 visibility enum.
9309
1b1562a5
MM
93102010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9311
9312 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9313 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9314 has the appropriate fma builtins.
9315 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9316
668ea4b1
IS
93172010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9318
1b1562a5 9319 merge from FSF apple 'trunk' branch.
3f8257db 9320 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9321
668ea4b1
IS
9322 Radars 4436866, 4505126, 4506903, 4517826
9323 * c-common.c (c_common_resword): Define @property and its attributes.
9324 * c-common.h: Define property attribute enum entries.
9325 (OBJC_IS_PATTR_KEYWORD): New.
9326 (objc_property_attribute_kind): New enum.
9327 Declare objc_set_property_attr (), objc_add_property_variable (),
9328 objc_build_getter_call () and objc_build_setter_call ().
9329 * stub-objc.c (objc_set_property_attr): New stub.
9330 (objc_add_property_variable): Likewise.
9331 (objc_build_getter_call): Likewise.
9332 (objc_build_setter_call) Likewise.
1b1562a5 9333
a1178b30
IS
93342010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9335
1b1562a5 9336 merge from FSF apple 'trunk' branch.
3f8257db 9337 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9338
9339 Radar 3803157 (method attributes)
9340 * c-common.c (handle_deprecated_attribute): Recognize
9341 objc methods as valid declarations.
9342 * c-common.h: Declare objc_method_decl ().
1b1562a5 9343 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9344
a75bfaa6
JM
93452010-10-08 Joseph Myers <joseph@codesourcery.com>
9346
9347 * c-common.c (parse_optimize_options): Call
9348 decode_cmdline_options_to_array_default_mask before
9349 decode_options. Update arguments to decode_options.
9350 * c-common.h (c_common_init_options_struct): Declare.
9351 * c-opts.c (c_common_init_options_struct): New. Split out from
9352 c_common_init_options.
9353
f05b9d93
NP
93542010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9355
9356 Implemented fast enumeration for Objective-C.
9357 * c-common.h (objc_finish_foreach_loop): New.
9358 * stub-objc.c (objc_finish_foreach_loop): New.
9359
1ebe4b4f
JM
93602010-10-05 Joseph Myers <joseph@codesourcery.com>
9361
9362 * c-common.h (struct diagnostic_context): Don't declare here.
9363 (c_common_initialize_diagnostics): Declare using
9364 diagnostic_context typedef.
9365 * c-opts.c (c_common_handle_option): Pass global_dc to
9366 handle_generated_option.
9367
d4d24ba4
JM
93682010-10-04 Joseph Myers <joseph@codesourcery.com>
9369
9370 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9371 handle_generated_option.
9372
478a1c5b
ILT
93732010-10-03 Ian Lance Taylor <iant@google.com>
9374
9375 * c.opt (-fplan9-extensions): New option.
9376
82a1c2fe
FXC
93772010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9378
9379 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9380 Remove.
9381 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9382 of duplicating code.
9383
92902b1b
IS
93842010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9385
9386 * c-common.c: Add two new entries for @optional
9387 and @required keywords.
9388
9389 merge from FSF 'apple/trunk' branch.
3f8257db 9390 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9391
9392 Radar 4386773
9393 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9394 objective-c keywords.
9395 (objc_set_method_opt): New declaration.
9396 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9397
46625112
JM
93982010-09-30 Joseph Myers <joseph@codesourcery.com>
9399
9400 * c-common.c (handle_optimize_attribute): Pass &global_options to
9401 cl_optimization_save and cl_optimization_restore.
9402 * c-opts.c (c_common_handle_option): Pass &global_options to
9403 handle_generated_option.
9404 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9405 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9406 &global_options to cl_optimization_restore.
9407
49b91f05
NP
94082010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9409
9410 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9411 Objective-C/Objective-C++ keywords.
9412
13ed556f 94132010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9414
9faeb493
UB
9415 Merge from 'apple/trunk' branch on FSF servers.
9416
3f8257db 9417 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9418
9419 Radar 4281748
9420 * c-common.h (objc_check_global_decl): New declaration.
9421 * stub-objc.c (objc_check_global_decl): New stub.
9422
f0036cca
JM
94232010-09-29 Joseph Myers <joseph@codesourcery.com>
9424
9425 * c.opt: Don't use VarExists.
9426
e3339d0f
JM
94272010-09-29 Joseph Myers <joseph@codesourcery.com>
9428
9429 * c-common.c (c_cpp_error): Update names of diagnostic_context
9430 members.
9431 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9432 cl_optimization members.
9433 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9434 sanitize_cpp_opts, finish_options): Update names of cpp_options
9435 members.
9436
1973201f
NP
94372010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9438
9439 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9440 (objc_is_reserved_word): Removed.
9441 * c-common.c: Updated comments.
9442 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9443 objc_is_reserved_word.
9444 * stub-objc.c (objc_is_reserved_word): Removed.
9445
f7e71da5
IS
94462010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9447
9faeb493 9448 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9449 include attributes.
9450 (objc_start_method_definition): Likewise.
9451 (objc_build_keyword_decl): Likewise.
9452 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9453 (objc_start_method_definition): Likewise.
9454 (objc_build_keyword_decl): Likewise.
9455
c165dca7
IS
94562010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9457
9458 * c-common.h (objc_start_class_interface): Adjust prototype.
9459 (objc_start_category_interface): Likewise.
9460 (objc_start_protocol): Likewise.
9461 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9462 (objc_start_class_interface): Likewise.
9463 (objc_start_category_interface): Likewise.
9464
7458026b
ILT
94652010-09-27 Ian Lance Taylor <iant@google.com>
9466
9467 * c-common.c (c_common_attribute_table): Add no_split_stack.
9468 (handle_no_split_stack_attribute): New static function.
9469
b581b85b
NP
94702010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9471
9faeb493 9472 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9473
3f8257db 9474 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9475
9faeb493 9476 Radar 4229905
b581b85b
NP
9477 * c-common.h (objc_have_common_type): New declaration.
9478 * stub-objc.c (objc_have_common_type): New stub.
9479
9480 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9481
9482 Radar 4154928
9483 * c-common.h (objc_common_type): New prototype.
9faeb493 9484 * stub-objc.c (objc_common_type): New stub.
b581b85b 9485
46a4da10
JH
94862010-09-24 Jan Hubicka <jh@suse.cz>
9487
9488 * c-common.c (handle_leaf_attribute): New function.
9489 (struct attribute_spec c_common_att): Add leaf.
9490
e200444e
JM
94912010-09-22 Joseph Myers <joseph@codesourcery.com>
9492
9493 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9494 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9495 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9496 -include-barrier, -include-directory, -include-directory=,
9497 -include-directory-after, -include-directory-after=,
9498 -include-prefix, -include-prefix=, -include-with-prefix,
9499 -include-with-prefix=, -include-with-prefix-after,
9500 -include-with-prefix-after=, -include-with-prefix-before,
9501 -include-with-prefix-before=, -no-integrated-cpp,
9502 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9503 -output=, -pedantic, -pedantic-errors, -preprocess,
9504 -print-missing-file-dependencies, -trace-includes, -traditional,
9505 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9506 -user-dependencies, -verbose, -write-dependencies,
9507 -write-user-dependencies, no-integrated-cpp, traditional): New.
9508
29a80ea6
NP
95092010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9510
9511 PR objc/23710
ac1fc2fc
NP
9512 * c-common.h (objc_start_method_definition): Return bool instead
9513 of void.
9514 * stub-objc.c (objc_start_method_definition): Return bool instead
9515 of void.
9516
95172010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9518
9519 PR objc/25965
9520 * c-common.h (objc_get_interface_ivars): New declaration.
9521 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9522
de621752
ILT
95232010-09-15 Ian Lance Taylor <iant@google.com>
9524
9525 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9526 messages. Remove period at end of warning message.
de621752 9527
ba885ec5
NS
95282010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9529
9530 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9531 (handle_alias_attribute): ... here.
9532 (handle_ifunc_attribute): New.
9533
c5ee1358
MM
95342010-09-06 Mark Mitchell <mark@codesourcery.com>
9535
9536 * c-common.h (do_warn_double_promotion): Declare.
9537 * c-common.c (do_warn_double_promotion): Define.
9538
0a0b3574
MM
95392010-09-05 Mark Mitchell <mark@codesourcery.com>
9540
9541 * c.opt (Wdouble-promotion): New.
9542
d1779886
JM
95432010-09-02 Joseph Myers <joseph@codesourcery.com>
9544
9545 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9546 fvtable-thunks, fxref): Mark no longer supported in help text.
9547
2d2bd949
JM
95482010-09-02 Joseph Myers <joseph@codesourcery.com>
9549
9550 * c.opt (Wimport, fall-virtual, falt-external-templates,
9551 fdefault-inline, fenum-int-equiv, fexternal-templates,
9552 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9553 fname-mangling-version-, fnew-abi, fnonnull-objects,
9554 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9555 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9556 applicable.
9557 (fhandle-exceptions): Mark with Alias and Warn.
9558 * c-opts.c (c_common_handle_option): Don't handle options marked
9559 as ignored.
9560
5de8299c
JM
95612010-09-02 Joseph Myers <joseph@codesourcery.com>
9562
9563 * c.opt (Wcomments, Werror-implicit-function-declaration,
9564 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9565 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9566 aliases.
9567 * c-common.c (option_codes): Use OPT_Wcomment instead of
9568 OPT_Wcomments.
9569 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9570 Don't handle options marked as aliases.
9571
0ceb0201
RG
95722010-08-25 Richard Guenther <rguenther@suse.de>
9573
9574 * c-common.c (c_common_get_alias_set): Remove special
9575 handling for pointers.
9576
ac47786e
NF
95772010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9578
9579 * c-common.c: Use FOR_EACH_VEC_ELT.
9580 * c-gimplify.c: Likewise.
9581 * c-pragma.c: Likewise.
9582
c878765b
JM
95832010-08-16 Joseph Myers <joseph@codesourcery.com>
9584
9585 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9586 RejectDriver.
9587 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9588 RejectDriver.
9589 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9590 instead of OPT_MDX and OPT_MMDX.
9591
603349bf
JM
95922010-08-16 Joseph Myers <joseph@codesourcery.com>
9593
9594 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9595
644fa7ac
JM
95962010-08-12 Joseph Myers <joseph@codesourcery.com>
9597
9598 * c.opt (MD, MMD): Change to MDX and MMDX.
9599 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9600
481e1176
JM
96012010-08-11 Joseph Myers <joseph@codesourcery.com>
9602
9603 * c-opts.c (c_common_handle_option): Call handle_generated_option
9604 instead of handle_option.
9605
ac8dc9f7
NF
96062010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9607
9608 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9609 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9610
4f8c876d
NF
96112010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9612
9613 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9614 (pending_redefine_extname): Change type to a VEC.
9615 (add_to_renaming_pragma_list): Update for new type of
9616 pending_redefine_extname.
ac8dc9f7 9617 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9618
3b0c690e
AC
96192010-08-04 Arnaud Charlet <charlet@adacore.com>
9620
9621 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9622 visited.
9623 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9624 decide whether a type has already been declared/seen.
9625 Do not go to the original type.
9626 (dump_nested_types): New parameter forward.
9627 Generate forward declaration if needed and mark type as visited.
9628 (print_ada_declaration): Call dump_nested_types if not already done.
9629 Mark types as visited.
9630
1890bccc
JM
96312010-08-03 Joseph Myers <joseph@codesourcery.com>
9632
9633 * c.opt (-print-pch-checksum): Remove option.
9634 * c-opts.c (c_common_handle_option): Don't handle
9635 OPT_print_pch_checksum.
9636
5f20c657
JM
96372010-07-27 Joseph Myers <joseph@codesourcery.com>
9638
9639 * c-common.h (c_common_handle_option): Update prototype and return
9640 value type.
9641 * c-opts.c (c_common_handle_option): Update prototype and return
9642 value type. Update calls to handle_option and
9643 enable_warning_as_error.
9644
f551f80c
JJ
96452010-07-27 Jakub Jelinek <jakub@redhat.com>
9646
9647 PR c/45079
9648 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9649
61ff2bdc
JM
96502010-07-27 Joseph Myers <joseph@codesourcery.com>
9651
9652 * c-common.h (c_common_missing_argument): Remove.
9653 * c-opts.c (c_common_missing_argument): Remove.
9654 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9655 idirafter, imacros, include, isysroot, isystem, iquote): Add
9656 MissingArgError.
9657 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9658
7a9bf9a4
JM
96592010-07-27 Joseph Myers <joseph@codesourcery.com>
9660
9661 * c-common.h (c_common_option_lang_mask,
9662 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9663 New.
9664 (c_common_init_options): Update prototype.
9665 * c-opts.c (c_common_option_lang_mask): New.
9666 (c_common_initialize_diagnostics): Split out of
9667 c_common_init_options.
9668 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9669 New.
9670 (c_common_init_options): Update prototype. Use decoded options in
9671 search for -lang-asm.
9672
910ad8de
NF
96732010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9674
9675 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9676 * c-format.c: Likewise.
9677
718f9c0f
MLI
96782010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9679
9680 * c-common.h: Include diagnostic-core.h. Error if already
9681 included.
9682 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9683
4d451982
MLI
96842010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9685
adfac8df 9686 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9687 Do not include expr.h
9688 (vector_mode_valid_p): Move here.
9689
119fe915
SB
96902010-06-21 DJ Delorie <dj@redhat.com>
9691
9692 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9693 allow these pragmas anywhere.
9694
96952010-06-14 Jakub Jelinek <jakub@redhat.com>
9696
9697 PR bootstrap/44509
9698 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9699 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9700 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9701 ggc_strdup instead of xstrdup.
9702
97032010-06-10 Jakub Jelinek <jakub@redhat.com>
9704
9705 * c-cppbuiltin.c: Include cpp-id-data.h.
9706 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9707 (lazy_hex_fp_value): New function.
9708 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9709
6662d794
MLI
97102010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9711
9712 * c-gimplify.c: Do not include tree-flow.h
9713
38f8b050
JR
97142010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9715
9716 PR other/44034
9717 * c-common.c: Rename targetm member:
9718 targetm.enum_va_list -> targetm.enum_va_list_p
9719
9589f23e
AS
97202010-06-28 Anatoly Sokolov <aesok@post.ru>
9721
9722 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9723
3b06d379
SB
97242010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9725
9726 * c-cppbuiltin.c: Do not include except.h.
9727
d166d4c3
AK
97282010-06-24 Andi Kleen <ak@linux.intel.com>
9729
9faeb493
UB
9730 * c-common.c (warn_for_omitted_condop): New.
9731 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9732
70cb8be6
JM
97332010-06-21 Joseph Myers <joseph@codesourcery.com>
9734
9735 * c.opt (lang-objc): Remove.
9736 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9737
a4c97feb
JR
97382010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9739
9740 * c-opts.c: Include "tm_p.h".
9741
6e2f1956
JM
97422010-06-20 Joseph Myers <joseph@codesourcery.com>
9743
9744 * c-common.c (parse_optimize_options): Update call to
9745 decode_options.
9746
bc87224e
NF
97472010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9748
9749 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9750 new type of types_used_by_cur_var_decl.
9751
b49cf425
JR
97522010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9753
9754 PR bootstrap/44512
9755 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9756 for C++ standard compliance.
9757
59f9c2ed
JM
97582010-06-16 Jason Merrill <jason@redhat.com>
9759
9760 * c.opt: Add -Wnoexcept.
9761
33766b66
RG
97622010-06-16 Richard Guenther <rguenther@suse.de>
9763
9764 PR c/44555
9765 * c-common.c (c_common_truthvalue_conversion): Remove
9766 premature and wrong optimization concering ADDR_EXPRs.
9767
eff7e30c
AC
97682010-06-15 Arnaud Charlet <charlet@adacore.com>
9769
9770 * c-ada-spec.c (dump_sloc): Remove column info.
9771 (is_simple_enum): New function.
9772 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9773 enum types when relevant.
9774
6312e84d
MLI
97752010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9776
9faeb493 9777 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9778 location.
9779
1cb42611
JM
97802010-06-10 Joseph Myers <joseph@codesourcery.com>
9781
9782 * c-opts.c (c_common_handle_option): Don't handle
9783 OPT_fshow_column.
9784
a9429e29
LB
97852010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9786
9787 * c-pragma.c (push_alignment): Use typed GC allocation.
9788 (handle_pragma_push_options): Likewise.
9789
9790 * c-common.c (parse_optimize_options): Likewise.
9791
9792 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9793 option.
9794
5498f011
JM
97952010-06-07 Joseph Myers <joseph@codesourcery.com>
9796
9797 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9798 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9799 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9800 flag_signed_bitfields, warn_strict_null_sentinel,
9801 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9802 flag_gen_declaration, flag_no_gnu_keywords,
9803 flag_implement_inlines, flag_implicit_templates,
9804 flag_implicit_inline_templates, flag_optional_diags,
9805 flag_elide_constructors, flag_default_inline, flag_rtti,
9806 flag_conserve_space, flag_access_control, flag_check_new,
9807 flag_new_for_scope, flag_weak, flag_working_directory,
9808 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9809 flag_enforce_eh_specs, flag_threadsafe_statics,
9810 flag_pretty_templates): Remove.
9811 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9812 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9813 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9814 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9815 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9816 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9817 flag_no_gnu_keywords, flag_implement_inlines,
9818 flag_implicit_templates, flag_implicit_inline_templates,
9819 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9820 flag_rtti, flag_conserve_space, flag_access_control,
9821 flag_check_new, flag_new_for_scope, flag_weak,
9822 flag_working_directory, flag_use_cxa_atexit,
9823 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9824 flag_threadsafe_statics, flag_pretty_templates,
9825 warn_strict_null_sentinel): Remove.
9826 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9827 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9828 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9829 fimplicit-inline-templates, fimplicit-templates,
9830 flax-vector-conversions, fms-extensions, fnil-receivers,
9831 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9832 frtti, fshort-double, fshort-enums, fshort-wchar,
9833 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9834 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9835 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9836 gen-decls, undef): Use Var.
9837 (fdefault-inline, foptional-diags): Document as doing nothing.
9838 * c-opts.c (c_common_handle_option): Remove cases for options now
9839 using Var. Mark ignored options as such.
9840
39dabefd
SB
98412010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9842
9faeb493 9843 * c-common.c: Moved to here from parent directory.
39dabefd
SB
9844 * c-common.def: Likewise.
9845 * c-common.h: Likewise.
9846 * c-cppbuiltin.c: Likewise.
9847 * c-dump.c: Likewise.
9848 * c-format.c: Likewise.
9849 * c-format.h : Likewise.
9850 * c-gimplify.c: Likewise.
9851 * c-lex.c: Likewise.
9852 * c-omp.c: Likewise.
9853 * c.opt: Likewise.
9854 * c-opts.c: Likewise.
9855 * c-pch.c: Likewise.
9856 * c-ppoutput.c: Likewise.
9857 * c-pragma.c: Likewise.
9858 * c-pragma.h: Likewise.
9859 * c-pretty-print.c: Likewise.
9860 * c-pretty-print.h: Likewise.
9861 * c-semantics.c: Likewise.
9862 * stub-objc.c: Likewise.
9863
9864 * c-common.c: Include gt-c-family-c-common.h.
9865 * c-pragma.c: Include gt-c-family-c-pragma.h.
9866\f
a5544970 9867Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
9868
9869Copying and distribution of this file, with or without modification,
9870are permitted in any medium without royalty provided the copyright
9871notice and this notice are preserved.