]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
re PR debug/88046 (ICE in add_data_member_location_attribute at gcc/dwarf2out.c:19237...
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
a30d0196
JJ
12019-01-14 Jakub Jelinek <jakub@redhat.com>
2
3 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
4 and __cpp_nontype_template_parameter_auto. Add a comment that
5 __cpp_template_auto is deprecated.
6
2d91f79d
TH
72019-01-14 Tom Honermann <tom@honermann.net>
8
9 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
10 * c-common.c (c_common_reswords): Add char8_t.
11 (fix_string_type): Use char8_t for the type of u8 string literals.
12 (c_common_get_alias_set): char8_t doesn't alias.
13 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
14 C++.
15 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
16 (keyword_begins_type_specifier): Add RID_CHAR8.
17 * c-common.h (rid): Add RID_CHAR8.
18 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
19 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
20 Define char8_type_node and char8_array_type_node.
21 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
22 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
23 (c_cpp_builtins): Predefine __cpp_char8_t.
24 * c-lex.c (lex_string): Use char8_array_type_node as the type of
25 CPP_UTF8STRING.
26 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
27 * c-opts.c: If not otherwise specified, enable -fchar8_t when
28 targeting C++2a.
29 * c.opt: Add the -fchar8_t command line option.
30
23db6ced
MS
312019-01-14 Martin Sebor <msebor@redhat.com>
32
33 PR target/88638
34 * c-attribs.c (positional_argument): Call valid_format_string_type_p
35 and issue errors if it fails.
36 * c-common.h (valid_format_string_type_p): Declare.
37 * c-format.c (valid_stringptr_type_p): Rename...
38 (valid_format_string_type_p): ...to this and make extern.
39 (handle_format_arg_attribute): Adjust to new name.
40 (check_format_string): Same.
41
234c3818
L
422019-01-13 H.J. Lu <hongjiu.lu@intel.com>
43
44 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
45 Replace "may may" with "may" in warning message.
46
d8fcab68
JJ
472019-01-07 Jakub Jelinek <jakub@redhat.com>
48
49 PR c++/85052
50 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
51 (c_build_vec_convert): Declare.
52 * c-common.c (c_build_vec_convert): New function.
53
29d24852
MS
542019-01-04 Martin Sebor <msebor@redhat.com>
55
56 PR c/88546
57 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
58 Handle C++ empty throw specification and C11 _Noreturn.
59 (has_attribute): Also handle C11 _Noreturn.
60
9069a4c9
MS
612019-01-04 Martin Sebor <msebor@redhat.com>
62
63 PR c/88363
64 * c-attribs.c (positional_argument): Also accept enumerated types.
65
a5544970
JJ
662019-01-01 Jakub Jelinek <jakub@redhat.com>
67
68 Update copyright years.
69
da77eace
L
702018-12-20 H.J. Lu <hongjiu.lu@intel.com>
71
72 PR c/51628
73 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
74 * c-warn.c (check_alignment_of_packed_member): New function.
75 (check_address_of_packed_member): Likewise.
76 (check_and_warn_address_of_packed_member): Likewise.
77 (warn_for_address_or_pointer_of_packed_member): Likewise.
78 * c.opt: Add -Wno-address-of-packed-member.
79
573767d4
DM
802018-12-20 David Malcolm <dmalcolm@redhat.com>
81
82 PR c++/87504
83 * c-warn.c (get_outermost_macro_expansion): New function.
84 (spelled_the_same_p): Use it to unwind the macro expansions, and
85 compare the outermost macro in each nested expansion, rather than
86 the innermost.
87
a14feb3c
DM
882018-12-19 David Malcolm <dmalcolm@redhat.com>
89
90 PR c++/87504
91 * c-common.h (warn_tautological_cmp): Convert 1st param from
92 location_t to const op_location_t &.
93 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
94 when testing for INTEGER_CST.
95 (warn_tautological_bitwise_comparison): Convert 1st param from
96 location_t to const op_location_t &; use it to build a
97 binary_op_rich_location, and use this.
98 (spelled_the_same_p): New function.
99 (warn_tautological_cmp): Convert 1st param from location_t to
100 const op_location_t &. Warn for macro expansions if
101 spelled_the_same_p. Use binary_op_rich_location.
102
dfd7fdca
DM
1032018-12-19 David Malcolm <dmalcolm@redhat.com>
104
105 PR c++/43064
106 PR c++/43486
107 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
108 (verify_tree): Handle location wrappers.
109 (c_common_truthvalue_conversion): Strip any location wrapper.
110 Handle CONST_DECL.
111 (fold_offsetof): Strip any location wrapper.
112 (complete_array_type): Likewise for initial_value.
113 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
114 index before checking for INTEGER_CST.
115 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
116 print parentheses around location wrappers.
117 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
118 before checking for INTEGER_CST.
119 (warn_tautological_bitwise_comparison): Call
120 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
121 before checking for INTEGER_CST.
122 (readonly_error): Strip any location wrapper.
123 (warn_array_subscript_with_type_char): Strip location wrappers
124 before checking for INTEGER_CST. Use the location of the index if
125 available.
126
5c8b3702
JM
1272018-12-06 Jason Merrill <jason@redhat.com>
128
129 PR c++/88136 - -Wdeprecated-copy false positives
130 * c.opt (Wdeprecated-copy-dtor): New.
131 (Wdeprecated-copy): Move to -Wextra.
132
673670da
MS
1332018-11-29 Martin Sebor <msebor@redhat.com>
134
135 PR c/88172
136 PR testsuite/88208
137 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
138 alignments to values less than the target requires.
139 (has_attribute): For attribute aligned consider both the attribute
140 and the alignment bits.
141 * c-common.c (c_init_attributes): Optionally issue a warning for
142 zero alignment.
143
04864ec8
MS
1442018-11-28 Martin Sebor <msebor@redhat.com>
145
146 PR c/88065
147 PR c/87297
148 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
149 or destination is an error.
150
ace83db0
JJ
1512018-11-28 Jakub Jelinek <jakub@redhat.com>
152
153 PR c++/88215
154 * c-ubsan.c: Include langhooks.h.
155 (ubsan_instrument_division): Change gcc_assert that main variants
156 of op0 and op1 types are equal to gcc_checking_assert that the
157 main variants are compatible types.
158
da193a27
EB
1592018-11-27 Eric Botcazou <ebotcazou@adacore.com>
160
161 * c-ada-spec.c: Include stringpool.h.
162 (has_static_fields): Return false for incomplete types.
163 (is_tagged_type): Likewise.
164 (has_nontrivial_methods): Likewise.
165 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
166 (struct overloaded_name_hash): New structure.
167 (struct overloaded_name_hasher): Likewise.
168 (overloaded_names): New global variable.
169 (init_overloaded_names): New static function.
170 (overloaded_name_p): New predicate.
171 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
172 on the TYPE_STUB_DECL of the original type of a typedef, if any.
173 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
174 Remove always-true condition and dump forward types.
175 (dump_ada_specs): Delete overloaded_names.
176
98f08eb8
MS
1772018-11-20 Martin Sebor <msebor@redhat.com>
178
179 * c-attribs.c (type_for_vector_size): New function.
180 (type_valid_for_vector_size): Same.
181 (handle_vector_size_attribute): Move code to the functions above
182 and call them.
183 (validate_attribute, has_attribute): New functions.
184 * c-common.h (has_attribute): Declare.
185 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
186 * c-common.c (c_common_resword): Same.
187
2674fa47
JM
1882018-11-16 Jason Merrill <jason@redhat.com>
189
190 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
191 * c-attribs.c (attr_cold_hot_exclusions): Make public.
192
258b3854
JJ
1932018-11-16 Jakub Jelinek <jakub@redhat.com>
194
195 PR middle-end/87854
196 * c-common.c (fix_string_type): Reject string literals larger than
197 TYPE_MAX_VALUE (ssizetype) bytes.
198
1d249509
MS
1992018-11-15 Martin Sebor <msebor@redhat.com>
200
201 PR c++/87541
202 PR c++/87542
203 * c-attribs.c (positional_argument): New function.
204 (handle_alloc_size_attribute): Use it and simplify.
205 (handle_alloc_align_attribute): Same.
206 (handle_assume_aligned_attribute): Same.
207 (handle_nonnull_attribute): Same.
208 * c-common.c (check_function_arguments): Pass fntype to
209 check_function_format.
210 * c-common.h (check_function_format): Add an argument.
211 (PosArgFlags, positional_argument): Declare new type and function.
212 * c-format.c (decode_format_attr): Add arguments.
213 (check_format_string, get_constant): Same.
214 (convert_format_name_to_system_name): Adjust.
215
478dd60d
DM
2162018-11-15 David Malcolm <dmalcolm@redhat.com>
217
218 PR other/19165
219 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
220
8cca0163
JJ
2212018-11-14 Jakub Jelinek <jakub@redhat.com>
222
8ee09943
JJ
223 P1236R1 - Signed integers are two's complement
224 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
225 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
226 with in-range second operand well defined for -std=c++2a.
227
8cca0163
JJ
228 PR other/88007
229 * c-common.c (parse_optimize_options): Allocate option string from
230 opts_obstack rather than as GC memory. Move the allocation after
231 warning for invalid option.
232
620e594b
DM
2332018-11-13 David Malcolm <dmalcolm@redhat.com>
234
235 * c-common.c (c_get_substring_location): Update for renaming of
236 get_source_location_for_substring to get_location_within_string.
237 * c-lex.c: Replace "source_location" with "location_t".
238 * c-opts.c: Likewise.
239 * c-ppoutput.c: Likewise.
240
f9731de3
MS
2412018-11-13 Martin Sebor <msebor@redhat.com>
242
243 PR middle-end/81824
244 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
245 (handle_tls_model_attribute): Improve diagnostics.
246
e4bd6d5e
JM
2472018-11-12 Jason Merrill <jason@redhat.com>
248
a6bb6b07
JM
249 * c-cppbuiltin.c (c_cpp_builtins): Define
250 __cpp_impl_destroying_delete.
251
e4bd6d5e
JM
252 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
253 __cpp_conditional_explicit.
254
79a2c428
MS
2552018-11-09 Martin Sebor <msebor@redhat.com>
256
257 PR middle-end/81824
258 * c-attribs.c (handle_copy_attribute): New function.
259
4c7bd361
MS
2602018-11-09 Martin Sebor <msebor@redhat.com>
261
262 PR c/87795
263 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
264
28567c40
JJ
2652018-11-08 Jakub Jelinek <jakub@redhat.com>
266
267 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
268 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
269 enum omp_memory_order MEMORY_ORDER.
270 (c_finish_omp_flush): Add MO argument.
271 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
272 (c_finish_omp_for): Add FINAL_P argument.
273 * c-omp.c: Include memmodel.h.
274 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
275 OMP_TASKGROUP_CLAUSES to it.
276 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
277 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
278 instead of OMP_ATOMIC_SEQ_CST.
279 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
280 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
281 __atomic_thread_fence call with the given value.
282 (check_omp_for_incr_expr): Formatting fixes.
283 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
284 even in OpenMP loops, diagnose if NE_EXPR and incr expression
285 is not constant expression 1 or -1. Transform NE_EXPR loops
286 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
287 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
288 loops too.
289 (c_omp_split_clauses): Add support for combined
290 #pragma omp parallel master and
291 #pragma omp {,parallel }master taskloop{, simd} constructs.
292 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
293 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
294 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
295 (c_omp_predetermined_sharing): Don't return
296 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
297 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
298 PRAGMA_OMP_REQUIRES.
299 * c-pragma.h (enum pragma_kind): Likewise.
300 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
301 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
302
204839e7
DM
3032018-11-08 David Malcolm <dmalcolm@redhat.com>
304
305 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
306
d8010ee4
DM
3072018-11-08 David Malcolm <dmalcolm@redhat.com>
308
309 * c-format.c (local_cgraph_node_ptr_node): New variable.
310 (gcc_dump_printf_char_table): Add entry for %C.
311 (get_pointer_to_named_type): New function, taken from the handling
312 code for "gimple *" from...
313 (init_dynamic_diag_info): ...here. Add handling for
314 "cgraph_node *".
315 * c-format.h (T_CGRAPH_NODE): New.
316
4be5c72c
JM
3172018-10-19 Jason Merrill <jason@redhat.com>
318
319 * c-cppbuiltin.c (c_cpp_builtins): Add
320 __cpp_nontype_template_parameter_class.
321
f3f6029d
NS
3222018-10-31 Nathan Sidwell <nathan@acm.org>
323
ab5324fb
NS
324 * c-opts.c (c_finish_options): Force command line macro
325 location. Refactor to avoid repeating main debug hook.
326 (push_command_line_include): Clarify comment.
327
f3f6029d
NS
328 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
329
91e3ec29
MS
3302018-10-30 Martin Sebor <msebor@redhat.com>
331
332 PR middle-end/87041
333 * c-format.c (check_format_types): Avoid diagnosing null pointer
334 arguments to printf-family of functions.
335
b5ff4f5c
MP
3362018-10-30 Marek Polacek <polacek@redhat.com>
337
338 Implement P0892R2, explicit(bool).
339 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
340
7e2de6df
DM
3412018-10-29 David Malcolm <dmalcolm@redhat.com>
342
343 * name-hint.h (name_hint::take_deferred): New member function.
344
b2bf438c
DM
3452018-10-29 David Malcolm <dmalcolm@redhat.com>
346
347 PR c++/56856
348 * c-common.c (check_function_sentinel): Call fold_for_warn on the
349 argument.
350 (check_function_restrict): Rename param "argarray" to
351 "unfolded_argarray", and make a copy named "argarray", calling
352 fold_for_warn on each argument.
353 (check_function_arguments): Add note about responsibility for
354 folding the arguments.
355
9f936c86
JM
3562018-10-17 Joseph Myers <joseph@codesourcery.com>
357
358 * c-common.c (flag_isoc2x): New variable.
359 * c-common.h (clk_c): Update comment to reference C2X.
360 (flag_isoc99, flag_isoc11): Update comments to reference future
361 standard versions in general.
362 (flag_isoc2x): Declare.
363 * c-opts.c (set_std_c2x): New function.
364 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
365 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
366 flag_isoc2x to 0.
367 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
368
7a8a92c4
JM
3692018-10-17 Joseph Myers <joseph@codesourcery.com>
370
371 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
372 (std=iso9899:2018): Document C17 as published in 2018.
373
4dc003ff
CL
3742018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
375
376 PR c++/87364
377 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
378
79371671
WW
3792018-10-11 Will Wray <wjwray@gmail.com>
380
381 PR c++/87364
382 * c-pretty-print.h (pp_c_type_cast): Prototype.
383 (pp_c_integer_constant): Likewise.
384 * c-pretty-print.c (pp_c_type_cast): No longer static.
385 (pp_c_integer_constant): Likewise.
386 (pp_c_enumeration_constant): Fix loop termination when finding
387 name of constant. No longer returns a value. Call
388 pp_c_integer_constant.
389 (c_pretty_printer::constant): Update for changes to
390 pp_c_enumeration_constant.
391
46c62690
JJ
3922018-10-11 Jakub Jelinek <jakub@redhat.com>
393
394 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
395 for no_unique_address.
396
c24300ba
DM
3972018-10-09 David Malcolm <dmalcolm@redhat.com>
398
399 * c-common.c (c_option_controlling_cpp_error): Rename to...
400 (c_option_controlling_cpp_diagnostic): ...this, and convert
401 "reason" from int to enum.
402 (c_cpp_error): Rename to...
403 (c_cpp_diagnostic): ...this, converting level and reason to enums.
404 * c-common.h (c_cpp_error): Rename to...
405 (c_cpp_diagnostic): ...this, converting level and reason to enums.
406 * c-opts.c (c_common_init_options): Update for renaming.
407
8656dafa
RS
4082018-10-08 Richard Sandiford <richard.sandiford@arm.com>
409
410 PR c/87286
411 * c-common.c (vector_types_compatible_elements_p): Use
412 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
413
8cff0652
VK
4142018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
415
416 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
417 to generate constructor destructor priority warning.
418 * c.opt (-Wprio-ctor-dtor): New option.
419
bedf03a2
JM
4202018-10-01 Jason Merrill <jason@redhat.com>
421
422 * c-lex.c (c_common_has_attribute): Add no_unique_address.
423
6cc430c1
EB
4242018-10-01 Eric Botcazou <ebotcazou@adacore.com>
425
426 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
427 (dump_ada_node): Add const keyword.
428
87677ac7
ML
4292018-09-25 Martin Liska <mliska@suse.cz>
430
431 * c-common.c (c_common_truthvalue_conversion):
432 Remove Pascal from documentation.
433
518196cb
EB
4342018-09-21 Eric Botcazou <ebotcazou@adacore.com>
435
436 * c-ada-spec.c: Include diagnostic.h.
437 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
438
a599af84
MP
4392018-09-19 Marek Polacek <polacek@redhat.com>
440
441 * c.opt (Wclass-conversion): New.
442
9c4a4b3c
DM
4432018-09-17 David Malcolm <dmalcolm@redhat.com>
444
445 * c-format.c (range_label_for_format_type_mismatch::get_text):
446 Update for new param.
447
c896ecfe
DM
4482018-09-17 David Malcolm <dmalcolm@redhat.com>
449
450 * c-format.c (format_warning_at_char): Update for introduction of
451 format_string_diagnostic_t.
452 (format_type_warning): Likewise.
453
80c6d1f4
MJ
4542018-09-17 Martin Jambor <mjambor@suse.cz>
455
456 PR c/63886
457 * c.opt (Wabsolute-value): New.
458
6d900107
BE
4592018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
460
461 * c-common.c (complete_flexible_array_elts): New helper function.
462 * c-common.h (complete_flexible_array_elts): Declare.
463
b5764229
BE
4642018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
465
466 * c-common.c (braced_list_to_string): Remove eval parameter.
467 Add some more checks. Always create zero-terminated STRING_CST.
468 * c-common.h (braced_list_to_string): Adjust prototype.
469
85204e23
DM
4702018-08-27 David Malcolm <dmalcolm@redhat.com>
471
472 PR 87091
473 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
474 to a tri-state.
475 (maybe_suggest_missing_token_insertion): Likewise.
476 (maybe_add_include_fixit): Add param "override_location". If set,
477 and source-printing is enabled, then override the rich_location's
478 primary location with that of the insertion point for the fix-it
479 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
480 * c-common.h (extern void maybe_add_include_fixit): Add bool
481 param.
482 * c-format.c (selftest::test_type_mismatch_range_labels): Update
483 for conversion of show_caret_p to a tri-state.
484 * c-warn.c (warn_for_restrict): Likewise.
485 * known-headers.cc
486 (suggest_missing_header::~suggest_missing_header): Update call to
487 maybe_add_include_fixit to suggest overriding the location, as it
488 is for a note.
489
3d78e008
ML
4902018-08-27 Martin Liska <mliska@suse.cz>
491
492 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
493 fndecl_built_in_p and remove check for FUNCTION_DECL if
494 possible.
3d78e008
ML
495 (check_builtin_function_arguments): Likewise.
496 (reject_gcc_builtin): Likewise.
497 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
498
b5be6d0c
MP
4992018-08-26 Marek Polacek <polacek@redhat.com>
500
501 PR c++/87029, Implement -Wredundant-move.
502 * c.opt (Wredundant-move): New option.
503
79ca9c35
MP
5042018-08-21 Marek Polacek <polacek@redhat.com>
505
506 PR c++/86981, Implement -Wpessimizing-move.
507 * c.opt (Wpessimizing-move): New option.
508
097f82ec
DM
5092018-08-20 David Malcolm <dmalcolm@redhat.com>
510
511 PR other/84889
512 * c-attribs.c (common_handle_aligned_attribute): Add
513 auto_diagnostic_group instance.
514 * c-indentation.c (warn_for_misleading_indentation): Likewise.
515 * c-opts.c (c_common_post_options): Likewise.
516 * c-warn.c (warn_logical_not_parentheses): Likewise.
517 (warn_duplicated_cond_add_or_warn): Likewise.
518 (warn_for_multistatement_macros): Likewise.
519
3fb558b1
NS
5202018-08-20 Nathan Sidwell <nathan@acm.org>
521
522 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
523 access.
524
800c0e98
NS
5252018-08-17 Nathan Sidwell <nathan@acm.org>
526
527 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
528 field.
529 (laxy_hex_fp_value_count): Make unsigned.
530 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
531 manipulate the macro.
532 (builtin_defin_with_hex_fp_value): Adjust callback name, use
533 cpp_define_lazily.
534
6f795a92
DM
5352018-08-17 David Malcolm <dmalcolm@redhat.com>
536
537 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
538 (gcc_dump_printf_length_specs): New.
539 (gcc_dump_printf_flag_pairs): New.
540 (gcc_dump_printf_flag_specs): New.
541 (gcc_dump_printf_char_table): New.
542 (format_types_orig): Add entry for "gcc_dump_printf".
543 (init_dynamic_diag_info): Set up length_char_specs and
544 conversion_specs for gcc_dump_printf_format_type.
545 (handle_format_attribute): Handle gcc_dump_printf_format_type.
546
c5d725c0
NS
5472018-08-17 Nathan Sidwell <nathan@acm.org>
548
10f04917
NS
549 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
550
c5d725c0
NS
551 * c-ada-spec.c: Don't #include "cpp-id-data.h"
552 * c-cppbuiltin.c: Likewise.
553
c0c12356
ML
5542018-08-17 Martin Liska <mliska@suse.cz>
555
556 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
557 Ignore/Deprecated flag. Warning is done automatically for
558 Deprecated flags.
c0c12356 559
10fcc142
DM
5602018-08-16 David Malcolm <dmalcolm@redhat.com>
561
562 PR c++/70693
563 * c-common.c (selftest::c_family_tests): Call
564 selftest::c_indentation_c_tests.
565 * c-common.h (selftest::c_indentation_c_tests): New decl.
566 * c-indentation.c: Include "selftest.h".
567 (next_tab_stop): Add "tab_width" param, rather than accessing
568 cpp_opts.
569 (get_visual_column): Likewise. Clarify comment. Bulletproof
570 against reading past the end of the line.
571 (get_first_nws_vis_column): Add "tab_width" param.
572 (detect_intervening_unindent): Likewise.
573 (should_warn_for_misleading_indentation): Read tab width from
574 cpp_opts and pass around.
575 (selftest::test_next_tab_stop): New test.
576 (selftest::assert_get_visual_column_succeeds): New function.
577 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
578 (selftest::assert_get_visual_column_fails): New function.
579 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
580 (selftest::test_get_visual_column): New test.
581 (selftest::c_indentation_c_tests): New function.
582
3f6677f4
NS
5832018-08-16 Nathan Sidwell <nathan@acm.org>
584
585 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
586 (store_ada_macro): Likewise.
587 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
588 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
589
96e6ae57
DM
5902018-08-15 David Malcolm <dmalcolm@redhat.com>
591
592 * c-format.c: Include "selftest-diagnostic.h" and
593 "gcc-rich-location.h".
594 (format_warning_at_char): Pass NULL for new label params of
595 format_warning_va.
596 (class indirection_suffix): New class.
597 (class range_label_for_format_type_mismatch): New class.
598 (format_type_warning): Move logic for generating "*" suffix to
599 class indirection_suffix. Create "fmt_label" and "param_label"
600 to show their types, and pass them to the
601 format_warning_at_substring calls.
602 (selftest::test_type_mismatch_range_labels): New test.
603 (selftest::c_format_c_tests): Call it.
604
23aa9f7c
MS
6052018-08-13 Martin Sebor <msebor@redhat.com>
606
607 PR tree-optimization/71625
608 * c-common.c (braced_list_to_string): New function.
609 * c-common.h (braced_list_to_string): Declare it.
610
f10a9135
NS
6112018-08-08 Nathan Sidwell <nathan@acm.org>
612
613 * c-common.c (try_to_locate_new_include_inertion_point): Use
614 linemap_included_from_linemap.
615 * c-lex.c (fe_file_change): Use linemap_included_from.
616 * c-ppoutput.c (pp_file_change): Likewise.
617
8a45b051
MS
6182018-08-01 Martin Sebor <msebor@redhat.com>
619
620 PR tree-optimization/86650
621 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
622 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
623 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
624 * c-format.h (T89_G): Update to be "gimple *" rather than
625 "gcall *".
626 (local_gcall_ptr_node): Rename...
627 (local_gimple_ptr_node): ...to this.
628
e540ccc0
DM
6292018-07-31 David Malcolm <dmalcolm@redhat.com>
630
631 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
632 table entries for gcc_diag_char_table, and the 'Z' entry from
633 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
634 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
635 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
636 adding missing "Z" for this table. Remove erroneous "G" and "K"
637 entries.
638 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
639 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
640 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
641
425fc685
RE
6422018-07-31 Richard Earnshaw <rearnsha@arm.com>
643
644 * c-common.c (speculation_safe_resolve_call): New function.
645 (speculation_safe_resolve_params): New function.
646 (speculation_safe_resolve_return): New function.
647 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
648 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
649 __HAVE_SPECULATION_SAFE_VALUE.
650
181463c2
DM
6512018-07-20 David Malcolm <dmalcolm@redhat.com>
652
653 * c-common.c (c_cpp_error): Remove redundant "line_table"
654 parameter from call to rich_location::set_range.
655 (maybe_suggest_missing_token_insertion): Likewise.
656
0d7f9065
MS
6572018-07-20 Martin Sebor <msebor@redhat.com>
658
659 PR middle-end/82063
660 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
661
00abf86c
MS
6622018-07-20 Martin Sebor <msebor@redhat.com>
663
664 PR middle-end/82063
665 * c-common.h (c_common_handle_option): Change function argument
666 to HOST_WIDE_INT.
667 * c-opts.c (c_common_init_options): Same.
668 (c_common_handle_option): Same. Remove special handling of
669 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
670 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
671 options to take a HOST_WIDE_INT argument and accept a byte-size
672 suffix. Initialize.
673 (-Wvla-larger-than): Same.
674 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
675 (-Wno-vla-larger-than): Same.
676
9b452033
JJ
6772018-07-12 Jakub Jelinek <jakub@redhat.com>
678
679 * c-attribs.c (c_common_attribute_table): Add
680 "omp declare target implicit" attribute.
681
cd0762f3
RB
6822018-07-12 Richard Biener <rguenther@suse.de>
683
684 PR c/86453
685 * c-attribs.c (handle_packed_attribute): Do not build a variant
686 type with TYPE_PACKED, instead ignore the attribute if we may
687 not apply to the original type.
688
0b27c3ed
JJ
6892018-07-10 Jakub Jelinek <jakub@redhat.com>
690
691 PR c++/86443
692 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
693 to contain TREE_LIST for both the original class iterator and the
694 "last" helper var.
695
e730a0ef
EB
6962018-07-07 Eric Botcazou <ebotcazou@adacore.com>
697
698 * c-ada-spec.c (to_ada_name): Remove index parameter.
699 (pp_ada_tree_identifier): Likewise.
700 (dump_ada_macros): Adjust call to to_ada_name.
701 (struct overloaded_name_hash): Delete.
702 (struct overloaded_name_hasher): Likewise.
703 (overloaded_names): Likewise.
704 (compute_overloading_index): Likewise.
705 (dump_ada_decl_name): Do not call compute_overloading_index and
706 adjust calls to pp_ada_tree_identifier.
707 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
708 (dump_ada_import): Add spc parameter and switch to aspect syntax.
709 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
710 (dump_ada_enum_type): Remove type and display_convention parameters.
711 Adjust calls to pp_ada_tree_identifier.
712 (dump_ada_node): Likewise and for dump_ada_structure.
713 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
714 and tidy up.
715 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
716 syntax.
717 (print_constructor): Adjust call to pp_ada_tree_identifier.
718 (print_destructor): Likewise.
719 (dump_ada_declaration): Switch to aspect syntax.
720 (dump_ada_structure): Likewise and tidy up. Replace display_convention
721 parameter with nested parameter.
722 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
723 (dump_ada_specs): Do not delete overloaded_names table.
724
8de583fc
PB
7252018-07-06 Peter Bergner <bergner@linux.ibm.com>
726
727 PR target/86324
e730a0ef 728 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
729 target hook.
730
09cff37b
NS
7312018-07-05 Nathan Sidwell <nathan@acm.org>
732
733 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
734 NO_IMPLICIT_EXTERN_C.
735
98086b2b
ML
7362018-06-28 Martin Liska <mliska@suse.cz>
737
738 * cppspec.c: Include opt-suggestions.h.
739
829c6349
CLT
7402018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
741 Thomas Schwinge <thomas@codesourcery.com>
742 Cesar Philippidis <cesar@codesourcery.com>
743
744 * c-pragma.h (enum pragma_omp_clause): Add
745 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
746 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
747
f41b7612
JJ
7482018-06-20 Jakub Jelinek <jakub@redhat.com>
749
750 PR c++/86210
751 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
752 comment.
753
4252ccd7
MS
7542018-06-18 Martin Sebor <msebor@redhat.com>
755
756 PR middle-end/85602
757 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
758 nonstring.
759
e197e64e
KV
7602018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
761
762 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
763
34a7a230
JM
7642018-06-13 Jason Merrill <jason@redhat.com>
765
5cef3733
JM
766 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
767 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
768 handling.
769
34a7a230
JM
770 PR c++/86094 - wrong code with defaulted move ctor.
771 * c-opts.c (c_common_post_options): Bump the current ABI version to
772 13. Set warn_abi_version and flag_abi_compat_version to the current
773 version rather than 0. Fix defaulting flag_abi_compat_version from
774 warn_abi_version.
775
bb0f14ae
MS
7762018-06-12 Martin Sebor <msebor@redhat.com>
777
778 PR c/85931
779 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
780 sizeof source and destination yields the same value.
781
3713f2e2
ML
7822018-06-12 Martin Liska <mliska@suse.cz>
783
784 * c.opt: Make MPX-related options as Deprecated.
785
4af78ef8
DM
7862018-06-08 David Malcolm <dmalcolm@redhat.com>
787
788 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
789 rather than 0.
790
31db0fe0
ML
7912018-06-08 Martin Liska <mliska@suse.cz>
792
793 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
794 for MPX (macros, related functions, fields in cgraph_node, ...).
795 (handle_bnd_legacy): Likewise.
796 (handle_bnd_instrument): Likewise.
797 * c.opt: Likewise.
798
fe16acf2
JJ
7992018-06-06 Jakub Jelinek <jakub@redhat.com>
800
801 PR c++/86068
802 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
803 __cpp_transactional_memory to 201500 instead of 210500.
804
4dbdb49b
JM
8052018-06-06 Jason Merrill <jason@redhat.com>
806
807 PR c++/85710 - ICE with -Wmemset-elt-size.
808 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
809
f8ad043f
JM
8102018-06-01 Jason Merrill <jason@redhat.com>
811
812 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
813 201703.
814
abc24d93
EB
8152018-06-01 Eric Botcazou <ebotcazou@adacore.com>
816
817 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
818 declaration for a typedef independently of whether the declaration of
819 the subtype is generated.
820
d258f4aa
MS
8212018-05-31 Martin Sebor <msebor@redhat.com>
822
823 PR c/82063
824 * c.opt (-Wno-alloc-size-larger-than): New option.
825
b67b9225
DP
8262018-04-22 David Pagan <dave.pagan@oracle.com>
827
828 PR c/55976
829 * c-opts.c (c_common_post_options): Set default for warn_return_type
830 for C++/C++ with ObjC extensions only. For C, makes it possible to
831 differentiate between default (no option), -Wreturn-type, and
832 -Wno-return-type.
833
04eb9c55
JM
8342018-05-29 Jason Merrill <jason@redhat.com>
835
836 * c.opt (Winit-list-lifetime): New flag.
837
b0c31bc6
BE
8382018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
839
840 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
841 splay_tree_delete_pointers.
842
44284983
JJ
8432018-05-26 Jakub Jelinek <jakub@redhat.com>
844
845 PR bootstrap/85921
846 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
847 noinline variable to workaround broken kernel headers.
848
b46b715d
JM
8492018-05-18 Jason Merrill <jason@redhat.com>
850
851 * c.opt (Wdeprecated-copy): New flag.
852
40659769
ML
8532018-05-17 Martin Liska <mliska@suse.cz>
854
855 * c-warn.c (overflow_warning): Do not use
856 space in between 'G_' and '('.
857
403962ea
JM
8582018-05-09 Jason Merrill <jason@redhat.com>
859
860 * c-common.c (valid_array_size_p): Add complain parameter.
861 * c-common.h: ...which defaults to true.
862
1c9ee609
JJ
8632018-05-11 Jakub Jelinek <jakub@redhat.com>
864
865 PR c/85696
866 * c-omp.c (c_omp_predetermined_sharing): Return
867 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
868
19916065
ML
8692018-05-11 Martin Liska <mliska@suse.cz>
870
92a285c1 871 PR sanitizer/85556
19916065
ML
872 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
873 TREE_LIST values.
874
79e7b1fe
JJ
8752018-05-10 Jakub Jelinek <jakub@redhat.com>
876
877 PR c++/85662
878 * c-common.h (fold_offsetof_1): Removed.
879 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
880 CTX argument defaulted to ERROR_MARK.
881 * c-common.c (fold_offsetof_1): Renamed to ...
882 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
883 argument, convert the pointer constant to TYPE and use size_binop
884 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
885 a pointer type. Adjust recursive calls.
886
86c12f76
EB
8872018-05-10 Eric Botcazou <ebotcazou@adacore.com>
888
889 PR c++/85400
890 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
891
ee336e84
NS
8922018-05-07 Nathan Sidwell <nathan@acm.org>
893
894 * c.opt (ffor-scope): Remove functionality, issue warning.
895
6c072e21
NS
8962018-05-03 Nathan Sidwell <nathan@acm.org>
897
898 * c.opt (ffriend-injection): Remove functionality, issue warning.
899
2cc7d3a7
DM
9002018-05-01 David Malcolm <dmalcolm@redhat.com>
901
902 PR c/84258
903 * c-format.c (struct format_check_results): Add field
904 "number_non_char".
905 (check_format_info): Initialize it, and warn if encountered.
906 (check_format_arg): Distinguish between wide char and
907 everything else when detecting arrays of non-char.
908
7761dfbe
DM
9092018-04-30 David Malcolm <dmalcolm@redhat.com>
910
911 * c-format.c (get_corrected_substring): Update for
912 location_get_source_line returning a char_span. Use a char_span
913 when handling the prefix of the correction.
914 * c-indentation.c (get_visual_column): Update for
915 location_get_source_line returning a char_span.
916 (get_first_nws_vis_column): Likewise.
917
62e98ef1
DM
9182018-03-29 David Malcolm <dmalcolm@redhat.com>
919
920 PR c++/84269
921 * known-headers.cc (get_stdlib_header_for_name): Add various names
922 from <assert.h>, <string.h>, and <memory.h>; add more names from
923 <stdio.h>.
924
a7dea617
JJ
9252018-03-27 Jakub Jelinek <jakub@redhat.com>
926
927 PR c++/85061
928 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
929 get_base_address of the second operand is a VAR_P, rather than the
930 operand itself, and use gcc_checking_assert instead of gcc_assert.
931
889a3a30
MP
9322018-03-23 Marek Polacek <polacek@redhat.com>
933
934 PR c++/85045
935 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
936 <case RDIV_EXPR>: Tweak condition.
937
452154b9
EB
9382018-03-20 Eric Botcazou <ebotcazou@adacore.com>
939
940 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
941
63ecb626
JJ
9422018-03-16 Jakub Jelinek <jakub@redhat.com>
943
ce811fc4
JJ
944 PR c/84909
945 * c-warn.c (conversion_warning): Replace "to to" with "to" in
946 diagnostics.
947
63ecb626
JJ
948 PR c/84910
949 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
950 diagnostics.
951
a1295eec
RB
9522018-03-16 Richard Biener <rguenther@suse.de>
953
954 PR c/84873
955 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
956 unshare the possibly folded expression.
957
919674fb
RB
9582018-03-15 Richard Biener <rguenther@suse.de>
959
960 PR c/84873
961 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
962
f99309b2
MS
9632018-03-13 Martin Sebor <msebor@redhat.com>
964
965 PR tree-optimization/84725
966 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
967 with all three narrow character types, including their qualified forms.
968
e9b9fa4c
MS
9692018-03-12 Martin Sebor <msebor@redhat.com>
970
971 PR tree-optimization/83456
972 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
973 Restore checking of bounded built-in functions.
974 (check_function_arguments): Also return the result
975 of warn_for_restrict.
976 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
977 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
978
0805d020
MP
9792018-03-02 Marek Polacek <polacek@redhat.com>
980
981 PR c++/84171
982 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
983 is erroneous.
984
ed2a2f08
TS
9852018-03-02 Thomas Schwinge <thomas@codesourcery.com>
986
987 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
988 function".
989
90abdde0
MP
9902018-03-01 Marek Polacek <polacek@redhat.com>
991
992 PR c++/84639
993 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
994 alignment in computation.
995
c6db43fa
EB
9962018-02-28 Eric Botcazou <ebotcazou@adacore.com>
997
998 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
999 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1000
9e25c7ed
EB
10012018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1002
1003 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1004 (is_char_array): Take a type instead of a declaration.
1005 (dump_ada_array_type): Likewise.
1006 (is_simple_enum): Minor tweak.
1007 (dump_ada_enum_type): New function extracted from...
1008 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1009 <INTEGER_TYPE>: Remove unreachable code.
1010 <RECORD_TYPE>: Likewise. Minor tweaks.
1011 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1012 <ENUMERAL_TYPE>: New case.
1013 <RECORD_TYPE>: Factor out common code.
1014 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1015 Minor tweaks. Deal with enumeral types.
1016 (dump_ada_structure): Minor tweaks.
1017
09de3550
EB
10182018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1019
1020 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1021 address for incomplete structures.
1022 (dump_forward_type): Do not bail out for incomplete structures.
1023 (dump_ada_declaration): Do not special-case incomplete structures
1024 for subtypes. Dump them as null records for types.
1025
095d8d4b
EB
10262018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1027
1028 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1029 (is_char_array): Fix formatting.
1030 (dump_template_types): Likewise.
1031 (dump_generic_ada_node): Rename into...
1032 (dump_ada_node): ...this.
1033 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1034 incomplete structures and not for empty structures. Do not use it
1035 when forward declarations are needed.
1036 (dump_forward_type): New function.
1037 (dump_nested_types): Remove FORWARD parameter. Do not consider
1038 TREE_VISITED and do not generate a forward declaration. Only dump
1039 original nested types for nested declaration.
1040 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1041 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1042 <RECORD_TYPE>: Do not consider TREE_VISITED.
1043 (dump_ada_declaration): Use booleans and fix formatting throughout.
1044 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1045 Call dump_forward_type instead of dump_nested_types for a typedef.
1046 Remove superfluous check and adjust call to dump_nested_types.
1047 <POINTER_TYPE>: Call dump_forward_type and fall through.
1048 (dump_ada_struct_decl): Rename into...
1049 (dump_ada_structure): ...this. Do not special-case empty structures.
1050
d4cfd486
MS
10512018-02-27 Martin Sebor <msebor@redhat.com>
1052
1053 PR c++/83871
1054 * c.opt (-Wmissing-attributes): New option.
1055
b22dbd03
ML
10562018-02-21 Martin Liska <mliska@suse.cz>
1057
1058 * c.opt (Wcatch-value=): Add IntegerRange.
1059
883dfe2a
JM
10602018-02-15 Jason Merrill <jason@redhat.com>
1061
1062 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1063
0444aa9c
NS
10642018-02-09 Nathan Sidwell <nathan@acm.org>
1065
1066 PR c/84293
1067 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1068 arg.
1069 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1070 arg. Adjust.
1071
cea71f0a
MS
10722018-02-09 Martin Sebor <msebor@redhat.com>
1073
1074 PR lto/84212
1075 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1076 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1077 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1078 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1079 (-Wuninitialized): Same.
1080
8c8b7be5
EB
10812018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1082
1083 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1084 keyword for components.
1085
7c30b12a
PC
10862018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1087
1088 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1089
eece7fe5
JK
10902018-02-02 Julia Koval <julia.koval@intel.com>
1091
1092 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1093
7d07a93a
MP
10942018-01-29 Marek Polacek <polacek@redhat.com>
1095
1096 PR c/83966
1097 * c-format.c (check_function_format): Check current_function_decl.
1098
53723269
JJ
10992018-01-27 Jakub Jelinek <jakub@redhat.com>
1100
1101 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1102 argument.
1103 (LAZY_HEX_FP_VALUES_CNT): Define.
1104 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1105 values rather than just 12.
1106 (builtin_define_with_hex_fp_value): Likewise.
1107
7365279f
BK
11082018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1109
92a285c1
ML
1110 PR other/70268
1111 * c.opt (-fmacro-prefix-map): New option.
1112 * c-opts.c (c_common_handle_option): Handle it.
1113 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1114 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1115
bb9869d5
DM
11162018-01-17 David Malcolm <dmalcolm@redhat.com>
1117
1118 PR c++/83814
1119 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1120
68dc87c3
EB
11212018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1122
1123 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1124 Skip 'f' and 'F' characters if it is true.
1125 (store_ada_macro): Minor tweak.
1126 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1127 <CPP_WSTRING>: Likewise.
1128 <CPP_STRING>: Output '&' in the buffer if not the first string.
1129 <CPP_NUMBER>: Adjust calls to dump_number.
1130
9a004410
DM
11312018-01-10 David Malcolm <dmalcolm@redhat.com>
1132
1133 PR c++/43486
1134 * c-common.c: Include "selftest.h".
1135 (get_atomic_generic_size): Perform the test for integral type
1136 before the range test for any integer constant, fixing indentation
1137 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1138 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1139 (selftest::test_fold_for_warn): New function.
1140 (selftest::c_common_c_tests): New function.
1141 (selftest::c_family_tests): Call it, and
1142 selftest::c_pretty_print_c_tests.
1143 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1144 * c-format.c (check_format_arg): Convert VAR_P check to a
1145 fold_for_warn.
1146 * c-pretty-print.c: Include "selftest.h".
1147 (pp_c_cast_expression): Don't print casts for location wrappers.
1148 (selftest::assert_c_pretty_printer_output): New function.
1149 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1150 (selftest::test_location_wrappers): New function.
1151 (selftest::c_pretty_print_c_tests): New function.
1152 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1153
5c0caeb3
RS
11542018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1155 Alan Hayward <alan.hayward@arm.com>
1156 David Sherwood <david.sherwood@arm.com>
1157
1158 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1159
73a699ae
RS
11602018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1161 Alan Hayward <alan.hayward@arm.com>
1162 David Sherwood <david.sherwood@arm.com>
1163
1164 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1165 as polynomial.
1166
928686b1
RS
11672018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1168 Alan Hayward <alan.hayward@arm.com>
1169 David Sherwood <david.sherwood@arm.com>
1170
1171 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1172 (convert_vector_to_array_for_subscript): Handle polynomial
1173 TYPE_VECTOR_SUBPARTS.
1174 (c_common_type_for_mode): Check valid_vector_subparts_p.
1175 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1176 VECTOR_CST_NELTS.
1177
85ec4feb
JJ
11782018-01-03 Jakub Jelinek <jakub@redhat.com>
1179
1180 Update copyright years.
1181
170a8bd6 11822017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1183 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1184
1185 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1186 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1187
18408e96
AO
11882017-12-22 Alexandre Oliva <aoliva@redhat.com>
1189
1190 PR debug/83527
1191 PR debug/83419
1192 * c-semantics.c (only_debug_stmts_after_p): New.
1193 (pop_stmt_list): Clear side effects in debug-only stmt list.
1194 Check for single nondebug stmt followed by debug stmts only.
1195
c12d20d4
AO
11962017-12-21 Alexandre Oliva <aoliva@redhat.com>
1197
1198 PR debug/83419
1199 * c-semantics.c (pop_stmt_list): Propagate side effects from
1200 single nondebug stmt to container list.
1201
01512446
JJ
12022017-12-19 Jakub Jelinek <jakub@redhat.com>
1203
1204 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1205 conditions with typical order conditions.
1206
82cfbd01
MP
12072017-12-18 Marek Polacek <polacek@redhat.com>
1208
1209 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1210 not in effect.
1211
99da11ec
MS
12122017-12-17 Martin Sebor <msebor@redhat.com>
1213
1214 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1215 an error for attribute warn_if_not_aligned.
1216
cc8bea0a
MS
12172017-12-16 Martin Sebor <msebor@redhat.com>
1218
1219 PR tree-optimization/78918
1220 * c-common.c (check_function_restrict): Avoid checking built-ins.
1221 * c.opt (-Wrestrict): Include in -Wall.
1222
4849deb1
JJ
12232017-12-15 Jakub Jelinek <jakub@redhat.com>
1224
1225 * c-attribs.c (c_common_attribute_table,
1226 c_common_format_attribute_table): Swap affects_type_identity
1227 and handler fields, adjust comments.
1228
c65e18d3
BE
12292017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1230
1231 * c.opt (Wcast-function-type): New warning option.
1232 * c-lex.c (get_fileinfo): Avoid warning.
1233 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1234
2004617a
QZ
12352017-12-14 Qing Zhao <qing.zhao@oracle.com>
1236
7365279f 1237 PR middle_end/79538
2004617a
QZ
1238 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1239 Adjust the size of buf1 and buf2, add a new buf to avoid
1240 format-overflow warning.
1241
96a95ac1
AO
12422017-12-12 Alexandre Oliva <aoliva@redhat.com>
1243
1244 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1245 subsequent statement list.
1246
5d9ae53d
MS
12472017-12-07 Martin Sebor <msebor@redhat.com>
1248
1249 PR c/81544
1250 PR c/81566
1251 * c-attribs.c (attr_aligned_exclusions): New array.
1252 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1253 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1254 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1255 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1256 (attr_warn_unused_result_exclusions): Same.
1257 (handle_hot_attribute, handle_cold_attribute): Simplify.
1258 (handle_const_attribute): Warn on function returning void.
1259 (handle_pure_attribute): Same.
1260 (handle_aligned_attribute): Diagnose conflicting attribute
1261 specifications.
1262 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1263
c79144f8
DM
12642017-12-06 David Malcolm <dmalcolm@redhat.com>
1265
1266 PR c/83236
1267 * c-common.c (selftest::c_family_tests): Call
1268 selftest::c_spellcheck_cc_tests.
1269 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1270 * c-spellcheck.cc: Include "selftest.h".
1271 (name_reserved_for_implementation_p): New function.
1272 (should_suggest_as_macro_p): New function.
1273 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1274 should_suggest_as_macro_p and call it.
1275 (selftest::test_name_reserved_for_implementation_p): New function.
1276 (selftest::c_spellcheck_cc_tests): New function.
1277 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1278
613bc14f
DM
12792017-12-06 David Malcolm <dmalcolm@redhat.com>
1280
1281 * c-spellcheck.cc: New file, taken from macro-handling code in
1282 spellcheck-tree.c.
1283 * c-spellcheck.h: New file, taken from macro-handling code in
1284 spellcheck-tree.h.
1285
e76c7157
JJ
12862017-12-01 Jakub Jelinek <jakub@redhat.com>
1287
1288 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1289 attribute.
1290 (handle_simd_attribute): Don't check for "cilk simd function"
1291 attribute. Reindent, formatting changes.
1292
b0da4034
JK
12932017-11-30 Julia Koval <julia.koval@intel.com>
1294
1295 * c-common.h (inv_list): Remove.
1296
058f0b9e
JJ
12972017-11-28 Jakub Jelinek <jakub@redhat.com>
1298
1299 PR sanitizer/81275
1300 * c-common.c (c_switch_covers_all_cases_p_1,
1301 c_switch_covers_all_cases_p): New functions.
1302 * c-common.h (c_switch_covers_all_cases_p): Declare.
1303
5e9d6aa4 13042017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1305 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1306
1307 * array-notation-common.c: Delete.
1308 * c-cilkplus.c: Ditto.
1309 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1310 * c-common.def (ARRAY_NOTATION_REF): Remove.
1311 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1312 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1313 c_validate_cilk_plus_loop, cilkplus_an_parts,
1314 cilk_ignorable_spawn_rhs_op,
1315 cilk_recognize_spawn): Remove.
1316 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1317 * c-omp.c: Remove CILK_SIMD check.
1318 * c-pragma.c: Ditto.
1319 * c-pragma.h: Remove CILK related pragmas.
1320 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1321 ARRAY_NOTATION_REF condition.
1322 (c_pretty_printer::expression): Ditto.
1323 * c.opt (fcilkplus): Remove.
1324 * cilk.c: Delete.
1325
1af4ebf5
MG
13262017-11-21 Marc Glisse <marc.glisse@inria.fr>
1327
1328 * c-pretty-print.c (pp_c_additive_expression,
1329 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1330
d44ed508
JJ
13312017-11-21 Jakub Jelinek <jakub@redhat.com>
1332
7d2f0f9b
JJ
1333 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1334
d44ed508
JJ
1335 PR c++/83059
1336 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1337 instead of tree_to_uhwi, formatting fix.
1338
26edace6
DM
13392017-11-20 David Malcolm <dmalcolm@redhat.com>
1340
1341 PR c/81404
1342 * known-headers.cc: New file, based on material from c/c-decl.c.
1343 (suggest_missing_header): Copied as-is.
1344 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1345 heavily edited to add C++ support. Add some knowledge about
1346 <limits.h>, <stdint.h>, and <wchar.h>.
1347 * known-headers.h: Likewise.
1348
6c7a259b
DM
13492017-11-20 David Malcolm <dmalcolm@redhat.com>
1350
1351 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1352 (lookup_name_fuzzy): Likewise. Convert return type from
1353 const char * to name_hint. Add location_t param.
1354 * name-hint.h: New header.
1355
f9c59f7e
JJ
13562017-11-19 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR c/66618
1359 PR c/69960
1360 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1361
1e39313a
JM
13622017-11-16 Joseph Myers <joseph@codesourcery.com>
1363
1364 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1365 expected publication date of C17.
1366 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1367
3ca0dc60
JM
13682017-11-15 Joseph Myers <joseph@codesourcery.com>
1369
1370 PR c/81156
1371 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1372 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1373
025d57f0
MS
13742017-11-10 Martin Sebor <msebor@redhat.com>
1375
1376 PR c/81117
1377 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1378 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1379 * c.opt (-Wstringop-truncation): New option.
1380
1b6fa695
ML
13812017-11-06 Martin Liska <mliska@suse.cz>
1382
1383 PR middle-end/82404
1384 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1385 FE.
1386 * c.opt: Set default value of warn_return_type.
1387
64a5912c
DM
13882017-10-31 David Malcolm <dmalcolm@redhat.com>
1389
1390 * c-common.c (binary_op_error): Update for renaming of
1391 error_at_rich_loc.
1392 (c_parse_error): Likewise.
1393 * c-warn.c (warn_logical_not_parentheses): Likewise for
1394 renaming of inform_at_rich_loc.
1395 (warn_for_restrict): Likewise for renaming of
1396 warning_at_rich_loc_n.
1397
c76dc9c3
JM
13982017-10-30 Joseph Myers <joseph@codesourcery.com>
1399
1400 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1401 * c-opts.c (set_std_c17): New function.
1402 (c_common_init_options): Use gnu17 as default C version.
1403 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1404
ee5fd23a
MM
14052017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1406
1407 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1408 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1409 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1410 __FP_FAST_FMA<N>X.
1411
d1047465
MP
14122017-10-23 Marek Polacek <polacek@redhat.com>
1413
1414 PR c/82681
1415 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1416
9e878cf1
EB
14172017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1418
1419 * c-common.c (check_builtin_function_arguments): Also check arguments
1420 of __builtin_alloca_with_align_and_max.
1421
89b6abbb
DM
14222017-10-17 David Malcolm <dmalcolm@redhat.com>
1423
1424 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1425 rather than NULL to format_warning_va.
1426 (check_format_types): Likewise when calling format_type_warning.
1427 Remove code to extract source_ranges and source_range * in favor
1428 of just a location_t.
1429 (format_type_warning): Convert source_range * param to a
1430 location_t.
1431
39382c09
JJ
14322017-10-13 Jakub Jelinek <jakub@redhat.com>
1433
1434 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1435 [LR]SHIFT_EXPR.
1436
62e1c678
DM
14372017-10-12 David Malcolm <dmalcolm@redhat.com>
1438
1439 * c-common.c (enum missing_token_insertion_kind): New enum.
1440 (get_missing_token_insertion_kind): New function.
1441 (maybe_suggest_missing_token_insertion): New function.
1442 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1443
b90c9338
NS
14442017-10-11 Nathan Sidwell <nathan@acm.org>
1445
1446 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1447 (c_common_handle_option): Update incpath_kind names.
1448
3a266bcd
ML
14492017-10-11 Martin Liska <mliska@suse.cz>
1450
1451 PR sanitizer/82490
1452 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1453 Wattributes warning.
1454
8e6cdc90
RS
14552017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1456
1457 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1458 operating on trees as wide_ints.
1459 * c-common.c (pointer_int_sum): Likewise.
1460 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1461 * c-warn.c (match_case_to_enum_1): Likewise.
1462 (c_do_switch_warnings): Likewise.
1463 (maybe_warn_shift_overflow): Likewise.
1464
802b38c9
JJ
14652017-10-10 Jakub Jelinek <jakub@redhat.com>
1466
1467 PR c/82437
1468 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1469 instead of wide_int::from.
1470
4e34b338
JJ
14712017-10-06 Jakub Jelinek <jakub@redhat.com>
1472
1473 PR c/82437
1474 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1475 using to_widest use wide_int with the larger of the two precisions.
1476
4bc4b2b4
BE
14772017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1478
1479 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1480 functions.
1481
a1488398
RS
14822017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1483
1484 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1485 when combining the original unconverted comparison operands.
1486
01c9fb68
JJ
14872017-09-29 Jakub Jelinek <jakub@redhat.com>
1488
1489 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1490 attribute.
1491
6e3e8419
EB
14922017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1493
1494 * c-ada-spec.c (to_ada_name): Add index parameter.
1495 (pp_ada_tree_identifier): Likewise.
1496 (dump_ada_macros): Adjust call to to_ada_name.
1497 (struct overloaded_name_hash): New type.
1498 (struct overloaded_name_hasher): Likewise.
1499 (overloaded_names): New hash table.
1500 (compute_overloading_index): New function.
1501 (dump_ada_decl_name): Call it and pass the result to
1502 pp_ada_tree_identifier.
1503 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1504 (dump_ada_function_declaration): Likewise.
1505 (dump_generic_ada_node): Likewise.
1506 (print_constructor): Likewise.
1507 (print_destructor): Likewise.
1508 (dump_ada_specs): Delete overloaded_names table.
1509
79310774
EB
15102017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1511
1512 * c-ada-spec.c (max_ada_macros): Move around.
1513 (store_ada_macro_index): Likewise.
1514 (source_file): Rename into...
1515 (macro_source_file): ...this.
1516 (count_ada_macro): Move around.
1517 (store_ada_macro): Likewise.
1518 (compare_macro): Likewise.
1519 (print_ada_macros): Merge in...
1520 (dump_ada_macros): ...this.
1521 (source_file_base): Rename into...
1522 (current_source_file): ...this.
1523 (print_comment): Move around.
1524 (dump_ada_nodes): Call dump_ada_declaration directly.
1525 (struct with): Change type of limited field to bool.
1526 (append_withs): Change type of limited_access parameter to bool.
1527 (pp_ada_tree_identifie): Likewise.
1528 (dump_ada_decl_nam): Likewise.
1529 (dump_generic_ada_node): Likewise. Do not print the return type.
1530 (to_ada_name): Change type of space_found parameter to bool.
1531 (dump_ada_function_declaration): Return void and change type of
1532 parameters to bool. Also print the return type for a function.
1533 (print_ada_methods): Rename into...
1534 (dump_ada_methods): ...this.
1535 (print_ada_declaration): Rename into ...
1536 (dump_ada_declaration): ...this. Do not print the return type.
1537 (print_ada_struct_decl): Rename into...
1538 (dump_ada_struct_decl): ...this.
1539
7d386d45
JJ
15402017-09-29 Jakub Jelinek <jakub@redhat.com>
1541
1542 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1543 rather than DECL_INITIAL.
1544 (common_handle_aligned_attribute): Likewise.
1545
9ed32e27
AO
15462017-09-20 Alexandre Oliva <aoliva@redhat.com>
1547
1548 * c.opt (gen-decls): Add RejectNegative.
1549
026a79f7
AS
15502017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1551 Jakub Jelinek <jakub@redhat.com>
1552
1553 Add support for -std=c++2a.
1554 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1555 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1556 * c-opts.c (set_std_cxx2a): New.
1557 (c_common_handle_option): Set options when -std=c++2a is enabled.
1558 (c_common_post_options): Adjust comments.
1559 (set_std_cxx14, set_std_cxx17): Likewise.
1560
4a8ca690
EB
15612017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1562
1563 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1564 message for non-uniform endianness and issue a warning in C++.
1565
7b936140
JJ
15662017-09-15 Jakub Jelinek <jakub@redhat.com>
1567
1568 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1569 (Wc++17-compat): Change from undocumented alias to option.
1570 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1571 change C++1z to C++17 in description.
1572 (std=c++1z, std=gnu++1z): Change from option to undocumented
1573 deprecated alias.
1574 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1575 Adjust description.
1576 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1577 * c-opts.c (set_std_cxx1z): Rename to ...
1578 (set_std_cxx17): ... this.
1579 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1580 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 1581 caller.
7b936140
JJ
1582 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1583 comments.
1584
12263f13
L
15852017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1586
1587 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1588 function alignment if warn_if_not_aligned_p is true.
1589
6836632e
NS
15902017-09-12 Nathan Sidwell <nathan@acm.org>
1591
1592 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1593 resort_sorted_fields): Move to c/c-decl.c.
1594 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1595 (struct sorted_fields_type): Move to c/c-lang.h.
1596
019bf9ad
JW
15972017-09-09 Jonathan Wakely <jwakely@redhat.com>
1598
1599 PR c++/81852
1600 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1601
bc7fe952
MP
16022017-09-04 Marek Polacek <polacek@redhat.com>
1603
1604 PR c/81783
1605 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1606 (warn_tautological_cmp): Call it.
1607
de7c2c6a
BK
16082017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1609
1610 * c-opts.c (c_common_finish): Write dependency information even if
1611 there are errors.
1612
d2e05fcb
JJ
16132017-09-01 Jakub Jelinek <jakub@redhat.com>
1614
1615 PR c/81887
1616 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1617 (omp_pragmas_simd): ... here.
1618 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1619 create new clauses list containing just simd clause.
1620
18e2a8b8
RS
16212017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1622 Alan Hayward <alan.hayward@arm.com>
1623 David Sherwood <david.sherwood@arm.com>
1624
1625 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1626 into scalar_mode_supported_p call.
1627 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1628
16d22000
RS
16292017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1630 Alan Hayward <alan.hayward@arm.com>
1631 David Sherwood <david.sherwood@arm.com>
1632
1633 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1634 for the mode iterator.
1635
b397965c
RS
16362017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1637 Alan Hayward <alan.hayward@arm.com>
1638 David Sherwood <david.sherwood@arm.com>
1639
1640 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1641 * c-common.c (c_build_vec_perm_expr): Likewise.
1642
357b7604
RS
16432017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1644 Alan Hayward <alan.hayward@arm.com>
1645 David Sherwood <david.sherwood@arm.com>
1646
1647 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1648
e05c94ba
RS
16492017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1650 Alan Hayward <alan.hayward@arm.com>
1651 David Sherwood <david.sherwood@arm.com>
1652
1653 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1654 before calling targetm.addr_space.valid_pointer_mode.
1655
5c20c4af
RS
16562017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1657 Alan Hayward <alan.hayward@arm.com>
1658 David Sherwood <david.sherwood@arm.com>
1659
1660 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1661
c94843d2 16622017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
1663 Alan Hayward <alan.hayward@arm.com>
1664 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
1665
1666 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1667 iterators.
1668 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1669
4e10a5a7
RS
16702017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1671 Alan Hayward <alan.hayward@arm.com>
1672 David Sherwood <david.sherwood@arm.com>
1673
1674 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1675 case statements.
1676
130fcab0
ML
16772017-08-29 Martin Liska <mliska@suse.cz>
1678
1679 PR other/39851
1680 * c-common.c (parse_optimize_options): Add argument to function
1681 call.
1682 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1683
14e18d71
DM
16842017-08-24 David Malcolm <dmalcolm@redhat.com>
1685
1686 * c-lex.c (interpret_float): Use token location
1687 when building an EXCESS_PRECISION_EXPR.
1688
2f687306
DM
16892017-08-21 David Malcolm <dmalcolm@redhat.com>
1690
1691 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1692 it to check_function_format.
1693 * c-common.h (check_function_arguments): Add vec<location_t> *
1694 param.
1695 (check_function_format): Likewise.
1696 * c-format.c (struct format_check_context): Add field "arglocs".
1697 (check_function_format): Add param "arglocs"; pass it to
1698 check_format_info.
1699 (check_format_info): Add param "arglocs"; use it to initialize
1700 new field of format_ctx.
1701 (check_format_arg): Pass format_ctx->arglocs to new param of
1702 check_format_info_main.
1703 (class argument_parser): New field "arglocs".
1704 (argument_parser::argument_parser): Add "arglocs_" param and use
1705 it to initialize new field.
1706 (argument_parser::check_argument_type): Pass new arglocs field to
1707 check_format_types.
1708 (check_format_info_main): Add param "arglocs", and use it when
1709 constructing arg_parser.
1710 (check_format_types): Add param "arglocs"; use it if non-NULL when
1711 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1712
00aa1fa2
L
17132017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1714
1715 PR c/53037
1716 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1717 (c_common_attribute_table): Add warn_if_not_aligned.
1718 (handle_aligned_attribute): Renamed to ...
1719 (common_handle_aligned_attribute): Remove argument, name, and add
1720 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1721 (handle_aligned_attribute): New.
1722 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1723
27be025d
MS
17242017-08-14 Martin Sebor <msebor@redhat.com>
1725
1726 PR c/81117
1727 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1728 (handle_nonstring_attribute): New function.
1729
da67acb9
MS
17302017-08-14 Martin Sebor <msebor@redhat.com>
1731
1732 PR c/81117
1733 * c-format.h (T89_G): New macro.
1734 * c-format.c (local_gcall_ptr_node): New variable.
1735 (init_dynamic_diag_info): Initialize it.
1736
a8b522b4
ML
17372017-08-11 Martin Liska <mliska@suse.cz>
1738
1739 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1740 TARGET_SUPPORTS_ALIASES.
1741
32129a17
DM
17422017-08-10 David Malcolm <dmalcolm@redhat.com>
1743
1744 * c-common.c (c_parse_error): Add rich_location * param, using it
1745 rather implicitly using input_location.
1746 * c-common.h (c_parse_error): Add rich_location * param.
1747
30af3a2b
MP
17482017-08-09 Marek Polacek <polacek@redhat.com>
1749
1750 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1751 (c_common_truthvalue_conversion): Likewise.
1752 * c-omp.c (c_finish_omp_atomic): Likewise.
1753 * c-common.h (build_binary_op): Update declaration.
1754
314e6352
ML
17552017-08-08 Martin Liska <mliska@suse.cz>
1756
1757 * c-ada-spec.c: Include header files.
1758 * c-ubsan.c: Likewise.
1759 * c-warn.c: Likewise.
1760
56b5041c
JJ
17612017-08-07 Jakub Jelinek <jakub@redhat.com>
1762
1763 PR c/69389
1764 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1765
db440138
EB
17662017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1767
1768 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1769 (print_ada_methods): Likewise.
1770 (print_ada_declaration): Likewise.
1771
577eec56
ML
17722017-08-07 Martin Liska <mliska@suse.cz>
1773
1774 * array-notation-common.c: Add new includes.
1775 * c-format.c( handle_format_attribute): Canonicalize a format
1776 function name.
1777 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1778 attribute.
1779 * c-pretty-print.c: Add new include.
1780
b854df3c
EB
17812017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1782
1783 * c-ada-spec.c (has_static_fields): Look only into variables.
1784 (print_constructor): Add TYPE parameter and use it for the name.
1785 (print_destructor): Likewise.
1786 (print_ada_declaration): Adjust to new constructor/destructor names.
1787 Adjust calls to print_constructor and print_destructor.
1788 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1789 Look only into variables in the final loop.
1790
9f2cb25e
EB
17912017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1792
1793 * c-ada-spec.c (has_static_fields): Look only into fields.
1794 (dump_generic_ada_node): Small tweak.
1795 (dump_nested_types): Look only into fields.
1796 (print_ada_declaration): Look only into methods. Small tweak.
1797 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1798
f4bcd9eb
EB
17992017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1800
1801 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1802 (dump_ada_function_declaration): Likewise.
1803 (dump_generic_ada_node): Likewise.
1804 (print_ada_declaration): Add support for const-qualified variables.
1805
f34ebeb2
ML
18062017-07-31 Martin Liska <mliska@suse.cz>
1807
1808 PR sanitize/81530
1809 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1810 Guard condition with flag_sanitize_p also with current_function_decl
1811 non-null equality.
1812 (ubsan_maybe_instrument_reference_or_call): Likewise.
1813
218e5d04
UB
18142017-07-30 Uros Bizjak <ubizjak@gmail.com>
1815
1816 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1817
942047f2
EB
18182017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1819
1820 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1821 for enumeral types.
1822 (print_ada_declaration): Add missing guard for record types.
1823
a40ff0ae
JJ
18242017-07-27 Jakub Jelinek <jakub@redhat.com>
1825
1826 PR c/45784
1827 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1828 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1829 new COMPOUND_EXPRs around the rhs of the comparison.
1830
06bd22f6
MP
18312017-07-27 Marek Polacek <polacek@redhat.com>
1832
1833 PR c/81417
1834 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1835 the types.
1836
036ea399
JJ
18372017-07-27 Jakub Jelinek <jakub@redhat.com>
1838
1839 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1840 (handle_noipa_attribute): New function.
1841
417ca011
TD
18422017-07-07 Torsten Duwe <duwe@suse.de>
1843
1844 * c-attribs.c (c_common_attribute_table): Add entry for
1845 "patchable_function_entry".
1846
5aaa8fb4
NS
18472017-07-20 Nathan Sidwell <nathan@acm.org>
1848
1849 Remove TYPE_METHODS.
1850 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1851 dump_ada_template, print_ada_methods,
1852 print_ada_declaration): Member fns are on TYPE_FIELDS.
1853
ff22eb12
NS
18542017-07-18 Nathan Sidwell <nathan@acm.org>
1855
1856 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1857
eea77d1f
DM
18582017-07-14 David Malcolm <dmalcolm@redhat.com>
1859
1860 * c-common.c (try_to_locate_new_include_insertion_point): New
1861 function.
1862 (per_file_includes_t): New typedef.
1863 (added_includes_t): New typedef.
1864 (added_includes): New variable.
1865 (maybe_add_include_fixit): New function.
1866 * c-common.h (maybe_add_include_fixit): New decl.
1867
281ac396
MS
18682017-07-10 Martin Sebor <msebor@redhat.com>
1869
1870 PR other/81345
1871 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1872
b6f43128
DM
18732017-07-06 David Malcolm <dmalcolm@redhat.com>
1874
1875 * c-common.c (selftest::c_family_tests): New.
1876 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1877 (selftest::c_family_tests): New decl.
1878
efbf55b0
MP
18792017-07-04 Marek Polacek <polacek@redhat.com>
1880
1881 PR c/81231
1882 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1883 types.
1884
6c86bd88
MP
18852017-07-04 Marek Polacek <polacek@redhat.com>
1886
1887 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1888
17a7218b
ML
18892017-06-28 Martin Liska <mliska@suse.cz>
1890
1891 PR ipa/81128
1892 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1893 to a function declaration.
1894
63010089
ML
18952017-06-28 Martin Liska <mliska@suse.cz>
1896
1897 PR driver/79659
1898 * c.opt: Add IntegerRange to various options.
1899
3e2becc4
MP
19002017-06-26 Marek Polacek <polacek@redhat.com>
1901
1902 PR c/80116
1903 * c-common.h (warn_for_multistatement_macros): Declare.
1904 * c-warn.c: Include "c-family/c-indentation.h".
1905 (warn_for_multistatement_macros): New function.
1906 * c.opt (Wmultistatement-macros): New option.
1907 * c-indentation.c (guard_tinfo_to_string): No longer static.
1908 Change the parameter type to "enum rid". Handle RID_SWITCH.
1909 * c-indentation.h (guard_tinfo_to_string): Declare.
1910
2db9b7cd
MG
19112017-06-23 Marc Glisse <marc.glisse@inria.fr>
1912
1913 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1914
c3684b7b
MS
19152017-06-15 Martin Sebor <msebor@redhat.com>
1916
1917 PR c++/80560
1918 * c.opt (-Wclass-memaccess): New option.
1919
e72c4afd
BK
19202017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1921
1922 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1923
8a516588
MP
19242017-06-13 Marek Polacek <polacek@redhat.com>
1925
1926 PR objc/80949
1927 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1928 branches is null.
1929
45b2222a
ML
19302017-06-13 Martin Liska <mliska@suse.cz>
1931
1932 PR sanitize/78204
1933 * c-attribs.c (add_no_sanitize_value): New function.
1934 (handle_no_sanitize_attribute): Likewise.
1935 (handle_no_sanitize_address_attribute): Use the function.
1936 (handle_no_sanitize_thread_attribute): New function.
1937 (handle_no_address_safety_analysis_attribute): Use
1938 add_no_sanitize_value.
1939 (handle_no_sanitize_undefined_attribute): Likewise.
1940 * c-common.h: Declare new functions.
1941 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
1942 (ubsan_instrument_shift): Likewise.
1943 (ubsan_instrument_bounds): Likewise.
1944 (ubsan_maybe_instrument_array_ref): Likewise.
1945 (ubsan_maybe_instrument_reference_or_call): Likewise.
1946
a01f151f
JM
19472017-06-11 Jason Merrill <jason@redhat.com>
1948
1949 * c-ada-spec.c, c-pragma.c: Use id_equal.
1950
3de4ac6d
MP
19512017-06-04 Marek Polacek <polacek@redhat.com>
1952
1953 PR c/80919
1954 * c-format.c (matching_type_p): Return false if any of the types
1955 requires structural equality.
1956
2474f48f
MS
19572017-06-02 Martin Sebor <msebor@redhat.com>
1958
1959 PR c/80892
1960 * c-warn.c (conversion_warning): Use -Wconversion for integer
1961 conversion and -Wfloat-conversion for floating one.
1962
40ffd95f
BE
19632017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1964
1965 * c.opt (Wsizeof-pointer-div): New warning option.
1966
3fa4634c
VR
19672017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
1968
1969 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
1970 (Wcatch-value=1): Enable by -Wall.
1971
f012c8ef
DM
19722017-05-30 David Malcolm <dmalcolm@redhat.com>
1973
1974 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
1975 format_chars.
1976 * c.opt (fdiagnostics-show-template-tree): New option.
1977 (felide-type): New option.
1978
63dbcd13
VR
19792017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
1980
1981 * c.opt (Wcatch-value=): New C++ warning flag.
1982
be136b5c
NS
19832017-05-24 Nathan Sidwell <nathan@acm.org>
1984
1985 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
1986 const casts to avoid warning.
1987
3cd211af
MS
19882017-05-24 Martin Sebor <msebor@redhat.com>
1989
1990 PR c/80731
1991 * c-common.h (unsafe_conversion_p): Add a function argument.
1992 * c-common.c (unsafe_conversion_p): Same.
1993 Add type names and values to diagnostics.
1994 (scalar_to_vector): Adjust.
1995 * c-warn.c (constant_expression_error): Add a function argument.
1996 Add type names and values to diagnostics.
1997 (conversion_warning): Add a function argument.
1998 Add type names and values to diagnostics.
1999 (warnings_for_convert_and_check): Same.
2000
1ff7be5a
JM
20012017-05-19 Jason Merrill <jason@redhat.com>
2002
2003 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2004 enumerators.
2005
ff502317
BE
20062017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2007
2008 * c-format.c (locus): Move out of function scope,
2009 add GTY attribute.
2010
2a8a8d7b
NS
20112017-05-19 Nathan Sidwell <nathan@acm.org>
2012
2013 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2014 (c_common_parse_file): Remove class dump handling.
2015 (get_dump_info): Likewise.
2016
39aac208
RB
20172017-05-19 Richard Biener <rguenther@suse.de>
2018
2019 PR c++/80593
2020 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2021 to alias-set zero memory.
2022
6ecd2339
BE
20232017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2024
2025 * c-format.c (local_tree_type_node): Add GTY attribute.
2026
6574d78e
MP
20272017-05-18 Marek Polacek <polacek@redhat.com>
2028
2029 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2030 (c_common_fixed_point_type_for_size): Likewise.
2031 (c_common_type_for_mode): Likewise.
2032 (shorten_compare): Likewise.
2033 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2034 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2035
e3455240
MP
20362017-05-18 Marek Polacek <polacek@redhat.com>
2037
2038 * c-common.c (self_promoting_args_p): Change the return type to bool.
2039 Use false/true instead of 0/1.
2040 * c-common.h (self_promoting_args_p): Update.
2041
3fa8871b
MP
20422017-05-17 Marek Polacek <polacek@redhat.com>
2043
2044 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2045 * c-warn.c: Likewise.
2046
b42cc3ca
VV
20472017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2048
2049 Implement new C++ intrinsics __is_assignable and __is_constructible.
2050 * c-common.c (__is_assignable, __is_constructible): New.
2051 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2052
1a817418
ML
20532017-05-17 Martin Liska <mliska@suse.cz>
2054
2055 * c-common.h: Introduce dump_flags_t type and
2056 use it instead of int type.
2057 * c-gimplify.c (c_genericize): Likewise.
2058 * c-opts.c: Likewise.
2059
b2fa0a8b
MP
20602017-05-17 Marek Polacek <polacek@redhat.com>
2061
2062 * c-common.c (c_save_expr): Remove.
2063 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2064 * c-common.h (c_save_expr): Remove declaration.
2065
31c2d57d
VR
20662017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2067
2068 PR c/35441
2069 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2070 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2071 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2072 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2073 RDIV_EXPR.
2074 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2075
684f84de
MP
20762017-05-09 Marek Polacek <polacek@redhat.com>
2077
2078 PR c/80525
2079 * c-warn.c (unwrap_c_maybe_const): New.
2080 (warn_logical_operator): Call it.
2081
641da50a
NS
20822017-05-09 Nathan Sidwell <nathan@acm.org>
2083
2084 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2085 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2086
631238ac
MS
20872017-05-08 Martin Sebor <msebor@redhat.com>
2088
2089 PR translation/80280
2090 * c-format.h (struct format_flag_spec): Add new member.
2091 (T89_T): New macro.
2092 * c-format.c (local_tree_type_node): New global.
2093 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2094 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2095 (strfmon_flag_specs): Likewise.
2096 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2097 with distinct quoting properties.
2098 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2099 (flag_chars_t::validate): Add argument and handle bad quoting.
2100 (check_format_info_main): Handle quoting problems.
2101 (init_dynamic_diag_info): Simplify.
2102
49f0c04c
JM
21032017-05-08 Jason Merrill <jason@redhat.com>
2104
2105 * c-opts.c (c_common_post_options): Update defaults for
2106 flag_abi_version and flag_abi_compat_version.
2107
56d35585
DM
21082017-05-05 David Malcolm <dmalcolm@redhat.com>
2109
2110 * c-common.c (c_cpp_error): Replace report_diagnostic
2111 with diagnostic_report_diagnostic.
2112
0f2c4a8f
MS
21132017-05-04 Martin Sebor <msebor@redhat.com>
2114
2115 PR translation/80280
2116 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2117 (handle_weakref_attribute): Same.
2118
6fe63fb4
NS
21192017-05-03 Nathan Sidwell <nathan@acm.org>
2120
2121 Canonicalize canonical type hashing
2122 * c-common.c (complete_array_type): Use type_hash_canon.
2123
815d9cc6
XR
21242017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2125
92a285c1 2126 PR c++/80038
815d9cc6
XR
2127 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2128 prototype.
2129 (cilk_install_body_pedigree_operations): Likewise.
2130 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2131 detatched.
2132 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2133 (cilk_install_body_pedigree_operations): Likewise.
2134 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2135 unwrapping.
2136
f8a36447
JJ
21372017-04-27 Jakub Jelinek <jakub@redhat.com>
2138
2139 PR c++/80534
2140 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2141 flag on non-aggregate element types.
2142
7c145456
BE
21432017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2144
2145 * c-common.c (c_type_hasher, type_hash_table): Remove.
2146 (c_common_get_alias_set): Remove unreachable code.
2147 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2148
c3cbcd45
VR
21492017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2150
2151 * c.opt (Wextra-semi): New C++ warning flag.
2152
8a59d466
JJ
21532017-04-20 Jakub Jelinek <jakub@redhat.com>
2154
2155 PR middle-end/80423
2156 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2157
8487c9a5
JJ
21582017-04-18 Jakub Jelinek <jakub@redhat.com>
2159
2160 PR middle-end/79788
2161 PR middle-end/80375
2162 * c-common.c (c_common_type_for_mode): Don't handle
2163 widest_*_literal_type_node here.
2164 c_common_signed_or_unsigned_type): Likewise.
2165 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2166 to *intTI_type_node or *intDI_type_node depending on whether
2167 TImode is supported by the target or not.
2168
3ee0fb02
ML
21692017-04-10 Martin Liska <mliska@suse.cz>
2170
2171 PR sanitizer/80350
2172 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2173 doing an UBSAN check.
2174
5764ee3c
JW
21752017-04-03 Jonathan Wakely <jwakely@redhat.com>
2176
2177 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2178
6f3af356
JJ
21792017-03-31 Jakub Jelinek <jakub@redhat.com>
2180
2181 PR c++/79572
2182 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2183 tree *.
2184 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2185 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2186 REFERENCE_TYPE.
2187
f6a7a9d5
DM
21882017-03-31 David Malcolm <dmalcolm@redhat.com>
2189
2190 PR documentation/78732
2191 * c.opt (Wendif-labels): Fix description to refer to
2192 #else rather than #elif.
2193
af88f557
JJ
21942017-03-31 Jakub Jelinek <jakub@redhat.com>
2195
2196 PR libstdc++/80251
2197 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2198 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2199
a9e4a1a5
JJ
22002017-03-27 Jakub Jelinek <jakub@redhat.com>
2201
2202 PR middle-end/80162
2203 * c-common.c (c_common_mark_addressable_vec): Don't set
2204 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2205
3f01b620
MS
22062017-03-21 Martin Sebor <msebor@redhat.com>
2207
2208 PR c++/79548
2209 * c-common.c (set_underlying_type): Mark type used only when
2210 original del is declared unused.
2211
2f6f187a
DM
22122017-03-10 David Malcolm <dmalcolm@redhat.com>
2213
2214 PR translation/79848
2215 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2216 "%qs".
2217
a02fa805
DM
22182017-03-10 David Malcolm <dmalcolm@redhat.com>
2219
2220 PR c/79921
2221 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2222 from inform's message, so that xgettext can locate it.
2223
822a132c
MP
22242017-03-09 Marek Polacek <polacek@redhat.com>
2225
2226 PR c++/79962
2227 PR c++/79984
2228 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2229 conversion to the attribute list.
2230
bba81f1c
ML
22312017-03-09 Martin Liska <mliska@suse.cz>
2232
2233 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2234
108154ff
JM
22352017-03-03 Jason Merrill <jason@redhat.com>
2236
2237 * c.opt (Wnoexcept-type): New.
2238
eb0e7c34
RB
22392017-03-02 Richard Biener <rguenther@suse.de>
2240
2241 PR c/79756
2242 * c-common.c (c_common_mark_addressable_vec): Look through
2243 C_MAYBE_CONST_EXPR.
2244
9453ba0a
ML
22452017-02-28 Martin Liska <mliska@suse.cz>
2246
2247 * c.opt: Replace space with tabular for options of <number>
2248 type.
2249
6a825afe
ML
22502017-02-28 Martin Liska <mliska@suse.cz>
2251
2252 * c.opt: Fix --help=option -Q for options which are of
2253 an enum type.
2254
4227c9ad
JJ
22552017-02-24 Jakub Jelinek <jakub@redhat.com>
2256
2257 PR c++/79588
2258 * c-common.c (check_function_restrict): New function.
2259 (check_function_arguments): Add FNDECL argument. Call
2260 check_function_restrict if -Wrestrict.
2261 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2262 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2263 * c-common.h (check_function_arguments): Add FNDECL argument.
2264 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2265
59909673
EB
22662017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2267
2268 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2269 treatment of parameters with pointer-to-tagged type and tidy up.
2270 (print_ada_methods): Remove the special treatment of C++ static member
2271 functions.
2272
54dcd526
ML
22732017-02-22 Martin Liska <mliska@suse.cz>
2274
2275 * c.opt: Replace inequality signs with square brackets
2276 for -Wnornalized.
2277
00bc9de3
JJ
22782017-02-21 Jakub Jelinek <jakub@redhat.com>
2279
2280 PR c++/79641
2281 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2282 preserve quals.
2283
97fcf744
JM
22842017-02-17 Joseph Myers <joseph@codesourcery.com>
2285
2286 * c-cppbuiltin.c (builtin_define_float_constants): Define
2287 __DECIMAL_DIG__ to the value for long double.
2288
c7545f1c
MP
22892017-02-15 Marek Polacek <polacek@redhat.com>
2290
2291 PR c/79515
2292 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2293 conversion has occured.
2294
c2e84327
DM
22952017-01-24 David Malcolm <dmalcolm@redhat.com>
2296
2297 * c-common.c (c_common_reswords): Add "__RTL".
2298 * c-common.h (enum rid): Add RID_RTL.
2299
2ebd93e1
MP
23002017-01-20 Marek Polacek <polacek@redhat.com>
2301
2302 PR c/64279
2303 * c-common.h (do_warn_duplicated_branches_r): Declare.
2304 * c-gimplify.c (c_genericize): Walk the function tree calling
2305 do_warn_duplicated_branches_r.
2306 * c-warn.c (expr_from_macro_expansion_r): New.
2307 (do_warn_duplicated_branches): New.
2308 (do_warn_duplicated_branches_r): New.
2309 * c.opt (Wduplicated-branches): New option.
2310
0d80ab91
DM
23112017-01-17 David Malcolm <dmalcolm@redhat.com>
2312
2313 PR c++/71497
2314 * c-indentation.c (warn_for_misleading_indentation): Use the past
2315 subjunctive in the note.
2316
7f991c36
AH
23172017-01-17 Aldy Hernandez <aldyh@redhat.com>
2318
2319 PR c/79116
2320 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2321 start type to integer_type.
2322
1c70261c
JJ
23232017-01-16 Jakub Jelinek <jakub@redhat.com>
2324
2325 PR driver/49726
2326 * c.opt (gen-decls): Add Driver flag.
2327
1ddca3f3
PC
23282017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2329
2330 Revert:
2331 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2332
2333 PR c++/71737
2334 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2335
7d2f3f1d
PC
23362017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2337
2338 PR c++/71737
2339 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2340
bce6f760
MS
23412017-01-12 Martin Sebor <msebor@redhat.com>
2342
2343 (-Wformat-overflow): ...to this.
2344
bf5fbf46
MS
23452017-01-11 Martin Sebor <msebor@redhat.com>
2346
2347 PR c/78768
2348 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2349 Also enable for LTO.
2350
e363df3f
JM
23512017-01-10 Jason Merrill <jason@redhat.com>
2352
2353 Implement P0195R2, C++17 variadic using.
2354 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2355
bd2c6270
JJ
23562017-01-09 Jakub Jelinek <jakub@redhat.com>
2357
2358 PR translation/79019
2359 PR translation/79020
2360 * c.opt (Wnormalized=): Fix typo in description.
2361
efcc8d38
MS
23622017-01-08 Martin Sebor <msebor@redhat.com>
2363
2364 PR middle-end/77708
2365 * c.opt (-Wformat-truncation): New option.
2366
435f3f7a
AO
23672017-01-06 Alexandre Oliva <aoliva@redhat.com>
2368
2369 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2370 value to unsigned short to fit in 4 hex digits without
2371 warnings.
2372
4e89adf9
EB
23732017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2374
2375 * c.opt (fsso-struct): Add 'native' value.
2376
cd445b54
ML
23772017-01-05 Martin Liska <mliska@suse.cz>
2378
2379 PR pch/78970
2380 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2381 header.
2382
a9342885
MP
23832017-01-04 Marek Polacek <polacek@redhat.com>
2384
2385 PR c++/64767
2386 * c.opt (Wpointer-compare): New option.
2387
fc73e60c
JJ
23882017-01-04 Jakub Jelinek <jakub@redhat.com>
2389
2390 PR driver/78957
2391 * c.opt (fsso-struct=): Add RejectNegative.
2392
cbe34bb5
JJ
23932017-01-01 Jakub Jelinek <jakub@redhat.com>
2394
2395 Update copyright years.
2396
d4a6c0ea
ML
23972016-12-29 Martin Liska <mliska@suse.cz>
2398
2399 PR c/78933
2400 * c.opt (strong-eval-order): Add RejectNegative keyword.
2401
67a5ad7c
JM
24022016-12-22 Jason Merrill <jason@redhat.com>
2403
2404 Implement P0522R0, matching of template template arguments.
2405 * c-cppbuiltin.c (c_cpp_builtins): Define
2406 __cpp_template_template_args.
2407
0dba7960
JJ
24082016-12-21 Jakub Jelinek <jakub@redhat.com>
2409
2410 PR bootstrap/78817
2411 * c-common.c (struct nonnull_arg_ctx): New type.
2412 (check_function_nonnull): Return bool instead of void. Use
2413 nonnull_arg_ctx as context rather than just location_t.
2414 (check_nonnull_arg): Adjust for the new context type, set
2415 warned_p to true if a warning has been diagnosed.
2416 (check_function_arguments): Return bool instead of void.
2417 * c-common.h (check_function_arguments): Adjust prototype.
2418
31bfc9b9
JM
24192016-12-21 Jason Merrill <jason@redhat.com>
2420
2421 * c.opt (-fnew-ttp-matching): New flag.
2422 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2423
629b3d75
MJ
24242016-12-14 Martin Jambor <mjambor@suse.cz>
2425
2426 * c-omp.c: Include omp-general.h instead of omp-low.h.
2427 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2428 name.
2429
474da67e
MS
24302016-12-14 Martin Sebor <msebor@redhat.com>
2431
2432 PR c/17308
2433 * c-common.c (check_nonnull_arg): Disable when optimization
2434 is enabled.
2435
fe366b87
MP
24362016-12-12 Marek Polacek <polacek@redhat.com>
2437
2438 PR c++/78647
2439 * c-common.c (attribute_fallthrough_p): Return false for
2440 error_mark_node.
2441
8bd9f164
MS
24422016-12-08 Martin Sebor <msebor@redhat.com>
2443
2444 PR c/78284
2445 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2446
060162e0
MS
24472016-12-08 Martin Sebor <msebor@redhat.com>
2448
2449 PR c/78165
92a285c1
ML
2450 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2451 suffix.
060162e0 2452
ee92e7ba
MS
24532016-12-07 Martin Sebor <msebor@redhat.com>
2454
2455 PR c/53562
2456 PR middle-end/77784
2457 PR middle-end/78149
2458 PR middle-end/78138
2459 * c.opt (-Wstringop-overflow): New option.
2460
84b0769e
MO
24612016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2462
2463 * c-attribs.c (asan odr indicator): New attribute.
2464 (handle_asan_odr_indicator_attribute): New function.
2465
7fa6a965
PK
24662016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2467
2468 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2469 ptrdiff_type_node;
2470
56d8ffc1
JG
24712016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2472
2473 * c-common.c (excess_precision_mode_join): New.
2474 (c_ts18661_flt_eval_method): New.
2475 (c_c11_flt_eval_method): Likewise.
2476 (c_flt_eval_method): Likewise.
2477 * c-common.h (excess_precision_mode_join): New.
2478 (c_flt_eval_method): Likewise.
2479 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2480 (cpp_iec_559_value): Call it.
2481 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2482 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2483 __FLT_EVAL_METHOD_TS_18661_3__.
2484
04f0fcf7
JG
24852016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2486
2487 * c-opts.c (c_common_post_options): Add logic to handle the default
2488 case for -fpermitted-flt-eval-methods.
2489
fb2675cb
PB
24902016-11-23 Paolo Bonzini <bonzini@gnu.org>
2491
2492 * c.opt (Wexpansion-to-defined): New.
2493
ec1c5694
JJ
24942016-11-23 Jakub Jelinek <jakub@redhat.com>
2495
2496 PR target/78451
2497 * c-pragma.c (handle_pragma_target): Don't replace
2498 current_target_pragma, but chainon the new args to the current one.
2499
730c9e75
NS
25002016-11-22 Nathan Sidwell <nathan@acm.org>
2501
2502 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2503 indentation and formatting.
730c9e75 2504
89990732
MS
25052016-11-21 Martin Sebor <msebor@redhat.com>
2506
2507 * c.opt (-fprintf-return-value): Enable by default.
2508
48330c93
BE
25092016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2510
2511 PR c++/71973
2512 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2513 * c-common.c (c_common_nodes_and_builtins): Initialize
2514 const_tm_ptr_type_node.
2515
0d939c95
MP
25162016-11-16 Marek Polacek <polacek@redhat.com>
2517
2518 PR c/78285
2519 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2520
8e745a17
JJ
25212016-11-14 Jakub Jelinek <jakub@redhat.com>
2522
2523 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2524
1ee62b92 25252016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2526 Richard Biener <rguenther@suse.de>
2527
2528 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2529 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2530 * c.opt (fgimple): New option.
1ee62b92 2531
22b15758
UB
25322016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2533
2534 PR c/35503
2535 * c-common.h (warn_for_restrict): Declare.
2536 * c-warn.c: Include gcc-rich-location.h.
2537 (warn_for_restrict): New function.
2538 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2539 (gcc_cdiag_char_table): Likewise.
2540 (gcc_cxxdiag_char_table): Likewise.
2541 * c.opt (Wrestrict): New option.
2542
4be719cd
EB
25432016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2544
2545 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2546 for nested types only if the type is a record or union and dump SLOC.
2547
4a826ca6
JM
25482016-11-09 Jason Merrill <jason@redhat.com>
2549
2550 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2551
2e955d50
JJ
25522016-11-09 Jakub Jelinek <jakub@redhat.com>
2553
2554 * c-ubsan.c (ubsan_instrument_shift): Handle split
2555 -fsanitize=shift-base and -fsanitize=shift-exponent.
2556
51dc6603
JM
25572016-11-07 Jason Merrill <jason@redhat.com>
2558
2559 * c.opt (Wc++1z-compat): New.
2560 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2561
6dc4a604
ML
25622016-11-07 Martin Liska <mliska@suse.cz>
2563
2564 * c-warn.c (warn_for_unused_label): Save all labels used
2565 in goto or in &label.
2566
b302001e
JM
25672016-11-03 Jason Merrill <jason@redhat.com>
2568
2569 * c-cppbuiltin.c (c_cpp_builtins): Correct
2570 __cpp_inheriting_constructors.
2571
31f7f784
JM
25722016-11-01 Jason Merrill <jason@redhat.com>
2573
2bc78e3c
JM
2574 * c-cppbuiltin.c (c_cpp_builtins): Update
2575 __cpp_inheriting_constructors.
2576
31f7f784
JM
2577 * c.opt (-fnew-inheriting-ctors): New.
2578 * c-opts.c: Default to on for ABI 11+.
2579
dcb466ec
JJ
25802016-10-31 Jakub Jelinek <jakub@redhat.com>
2581
2582 PR c++/77948
2583 * c.opt (fext-numeric-literals): Add Var and Init.
2584 * c-opts.c (c_common_handle_option): Don't clear
2585 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2586 (c_common_post_options): Clear it here if not set
2587 explicitly.
2588
52e1b91e
AH
25892016-10-28 Aldy Hernandez <aldyh@redhat.com>
2590
2591 PR debug/77773
2592 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2593 if NULL.
2594
e16f1cc7
JJ
25952016-10-25 Jakub Jelinek <jakub@redhat.com>
2596
2597 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2598 * c-common.c (c_common_reswords): Add __builtin_launder.
2599
f8348061
BE
26002016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2601
2602 * c-common.c (c_common_truthvalue_conversion): Warn for
2603 multiplications in boolean context. Fix the quoting of '<<' and '<'
2604 in the shift warning.
2605
eff89e01
BE
26062016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2607
2608 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2609
24bc7bf4
JM
26102016-10-20 Jason Merrill <jason@redhat.com>
2611
2612 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2613
4c712374
BE
26142016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2615
2616 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2617 integer shift ops in boolean context.
2618
26192016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
2620
2621 * c.opt (Walloca): New.
2622 (Walloca-larger-than=): New.
2623 (Wvla-larger-than=): New.
2624
8fa18c06
MP
26252016-10-17 Marek Polacek <polacek@redhat.com>
2626
2627 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2628 Return immediately when finding a match.
2629 (warn_tautological_cmp): Remove a boolean variable that is no longer
2630 needed.
2631
b12b1915
MP
26322016-10-17 Marek Polacek <polacek@redhat.com>
2633
2634 * c-attribs.c: New file.
2635 * c-common.c: Move attributes handling to c-attribs.c.
2636 (get_nonnull_operand): No longer static.
2637 * c-common.h: Move the declarations from c-attribs.c to its own section.
2638
2045acd9
JM
26392016-10-14 Jason Merrill <jason@redhat.com>
2640
2641 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2642 and __cpp_deduction_guides.
2643
14a2c9aa
JM
26442016-10-13 Jason Merrill <jason@redhat.com>
2645
2646 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2647
4d0cdd0c
TP
26482016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2649
2650 * c-cppbuiltin.c: Include memmodel.h.
2651 * c-opts.c: Likewise.
2652 * c-pragma.c: Likewise.
2653 * c-warn.c: Likewise.
2654
70f6d5e1
JJ
26552016-10-12 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2658 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2659 * c-opts.c (sanitize_cpp_opts): Initialize
2660 cpp_opts->cpp_warn_implicit_fallthrough.
2661
78f61294
MP
26622016-10-11 Marek Polacek <polacek@redhat.com>
2663
2664 * c-common.c (warning_candidate_p): Change the return type to bool
2665 and return true/false instead of 1/0.
2666 (vector_mode_valid_p): Likewise.
2667
038b5cc0
MP
26682016-10-11 Marek Polacek <polacek@redhat.com>
2669
2670 * c-common.c (fold_for_warn): No longer static.
2671 (bool_promoted_to_int_p): Likewise.
2672 (c_common_get_narrower): Likewise.
2673 (constant_expression_warning): Move to c-warn.c.
2674 (constant_expression_error): Likewise.
2675 (overflow_warning): Likewise.
2676 (warn_logical_operator): Likewise.
2677 (find_array_ref_with_const_idx_r): Likewise.
2678 (warn_tautological_cmp): Likewise.
2679 (expr_has_boolean_operands_p): Likewise.
2680 (warn_logical_not_parentheses): Likewise.
2681 (warn_if_unused_value): Likewise.
2682 (strict_aliasing_warning): Likewise.
2683 (sizeof_pointer_memaccess_warning): Likewise.
2684 (check_main_parameter_types): Likewise.
2685 (conversion_warning): Likewise.
2686 (warnings_for_convert_and_check): Likewise.
2687 (match_case_to_enum_1): Likewise.
2688 (match_case_to_enum): Likewise.
2689 (c_do_switch_warnings): Likewise.
2690 (warn_for_omitted_condop): Likewise.
2691 (readonly_error): Likewise.
2692 (lvalue_error): Likewise.
2693 (invalid_indirection_error): Likewise.
2694 (warn_array_subscript_with_type_char): Likewise.
2695 (warn_about_parentheses): Likewise.
2696 (warn_for_unused_label): Likewise.
2697 (warn_for_div_by_zero): Likewise.
2698 (warn_for_memset): Likewise.
2699 (warn_for_sign_compare): Likewise.
2700 (do_warn_double_promotion): Likewise.
2701 (do_warn_unused_parameter): Likewise.
2702 (record_locally_defined_typedef): Likewise.
2703 (maybe_record_typedef_use): Likewise.
2704 (maybe_warn_unused_local_typedefs): Likewise.
2705 (maybe_warn_bool_compare): Likewise.
2706 (maybe_warn_shift_overflow): Likewise.
2707 (warn_duplicated_cond_add_or_warn): Likewise.
2708 (diagnose_mismatched_attributes): Likewise.
2709 * c-common.h: Move the declarations from c-warn.c to its own section.
2710 * c-warn.c: New file.
2711
627be19f
JM
27122016-10-08 Jason Merrill <jason@redhat.com>
2713
2714 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2715 into COND_EXPR in C++.
2716
7bad794a
JJ
27172016-10-08 Jakub Jelinek <jakub@redhat.com>
2718
2719 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2720 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2721 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2722
be845b04
JJ
27232016-10-07 Jakub Jelinek <jakub@redhat.com>
2724
2725 Implement LWG2296 helper intrinsic
2726 * c-common.h (enum rid): Add RID_ADDRESSOF.
2727 * c-common.c (c_common_reswords): Add __builtin_addressof.
2728
c09c4992
BE
27292016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2730
2731 PR c++/77700
2732 * c-common.c (c_common_truthvalue_conversion): Warn also for
2733 suspicious enum values in boolean context.
2734
342cfb3e
JJ
27352016-10-06 Jakub Jelinek <jakub@redhat.com>
2736
2737 Implement P0258R2 - helper for C++17
2738 std::has_unique_object_representations trait
2739 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2740 * c-common.c (c_common_reswords): Add
2741 __has_unique_object_representations.
2742
2e69f143
JJ
27432016-10-05 Jakub Jelinek <jakub@redhat.com>
2744
2745 PR sanitizer/66343
2746 * c-ubsan.c (ubsan_instrument_return): Don't call
2747 initialize_sanitizer_builtins here.
2748
700fff34
BE
27492016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2750
2751 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2752 conditional expression in boolean context when only one arm is
2753 non-boolean.
2754
9563bfcd
JJ
27552016-10-05 Jakub Jelinek <jakub@redhat.com>
2756
04a32443
JJ
2757 PR sanitizer/77823
2758 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2759 is not integral.
2760
9563bfcd
JJ
2761 * c-common.c (c_common_reswords): Update comment for C++11.
2762
f1644724
JM
27632016-10-04 Jason Merrill <jason@redhat.com>
2764
2765 * c-common.c (make_tree_vector_from_ctor): New.
2766 * c-common.h: Declare it.
2767
5a79befb
JJ
27682016-10-04 Jakub Jelinek <jakub@redhat.com>
2769
2770 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2771 __LIBGCC_JCR_SECTION_NAME__.
2772
1633d3b9
BE
27732016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2774
2775 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2776 left shift in boolean context.
2777
a2c6e7f2
JJ
27782016-09-29 Jakub Jelinek <jakub@redhat.com>
2779
2780 Implement P0001R1 - C++17 removal of register storage class specifier
2781 * c.opt (Wregister): New warning.
2782 * c-opts.c (c_common_post_options): Enable -Wregister by
2783 default for C++17.
2784
75304c87
JG
27852016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2786
2787 * c-opts.c (c_common_post_options): Remove special case for
2788 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2789 in C++.
2790
bbfac6da
JJ
27912016-09-27 Jakub Jelinek <jakub@redhat.com>
2792
6e39060a
JJ
2793 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2794 -std=c++1z.
2795
bbfac6da
JJ
2796 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2797
e73cf9a2
TP
27982016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2799
2800 * c-common.c: Include memmodel.h.
2801
c6147dc4
MP
28022016-09-26 Marek Polacek <polacek@redhat.com>
2803
2804 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2805
81fea426
MP
28062016-09-26 Marek Polacek <polacek@redhat.com>
2807
2808 PR c/7652
2809 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2810 (handle_fallthrough_attribute): New function.
2811 (attribute_fallthrough_p): New function.
2812 * c-common.h (attribute_fallthrough_p): Declare.
2813
9a2300e9
MP
28142016-09-24 Marek Polacek <polacek@redhat.com>
2815
2816 PR c/77490
2817 * c.opt (Wbool-operation): New.
2818
a09e9e35
BE
28192016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2820
2821 * c-common.c (c_common_truthvalue_conversion): Inhibit
2822 Wint-in-bool-context warning with from_macro_definition_at.
2823 Mention the expression will always evaluate to true.
2824
d43b4ccc
MS
28252016-09-21 Martin Sebor <msebor@redhat.com>
2826
2827 PR bootstrap/77676
2828 * c.opt (fprintf-return-value): Temporarily initialize to zero
2829 to unblock bootstrap failures.
2830
2e1c20b1
JJ
28312016-09-21 Jakub Jelinek <jakub@redhat.com>
2832
2833 PR c++/77651
2834 * c.opt (Waligned-new=): Add RejectNegative.
2835 (faligned-new=): Likewise. Spelling fix - change
2836 aligned_new_threshhold to aligned_new_threshold.
2837 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2838 to aligned_new_threshold.
2839
88d0c3f0
MS
28402016-09-20 Martin Sebor <msebor@redhat.com>
2841
2842 PR middle-end/49905
2843 * c.opt: Add -Wformat-length and -fprintf-return-value.
2844
144a96e4
BE
28452016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2846
2847 PR c++/77434
2848 * c.opt (Wint-in-bool-context): New warning.
2849 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2850 constants in boolean context.
2851
63012d9a
JM
28522016-09-19 Joseph Myers <joseph@codesourcery.com>
2853
2854 * c-common.c (max_align_t_align): Also consider alignment of
2855 float128_type_node.
2856
931388ce
JM
28572016-09-15 Jason Merrill <jason@redhat.com>
2858
2859 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2860 DECL_EXTERNAL.
2861
38711381
JM
28622016-09-14 Jason Merrill <jason@redhat.com>
2863
2864 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2865 limit FIELD_DECL, either.
2866
e51fbec3
MP
28672016-09-14 Marek Polacek <polacek@redhat.com>
2868
2869 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2870 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2871 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2872
254830ba
DM
28732016-09-13 David Malcolm <dmalcolm@redhat.com>
2874
2875 * c-common.c (warn_logical_not_parentheses): Replace
2876 rich_location::add_fixit_insert calls with add_fixit_insert_before
2877 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2878
42763690
JM
28792016-09-13 Jason Merrill <jason@redhat.com>
2880 Tom de Vries <tom@codesourcery.com>
2881
2882 PR c++/77427
2883 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2884
9453eee9
JM
28852016-09-13 Jason Merrill <jason@redhat.com>
2886
2887 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2888 limit types at all.
2889
e96809e3
JM
28902016-09-12 Jason Merrill <jason@redhat.com>
2891
2892 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2893 bit/byte confusion, allow large alignment for types.
2894
54dcdb88
BE
28952016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2896
2897 PR c++/77496
2898 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2899
d1463eb9
DM
29002016-09-12 David Malcolm <dmalcolm@redhat.com>
2901
2902 PR c/72858
2903 * c-format.c (argument_parser::check_argument_type): Add params
2904 "type_start" and "conversion_char". Use the former to generate
2905 offset_to_type_start and pass it and conversion_char to
2906 check_format_types.
2907 (check_format_info_main): Capture the start of the type
2908 information as "type_start", and pass it an format_char
2909 to arg_parser.check_argument_type.
2910 (check_format_types): Provide an example in the leading comment.
2911 Add params "offset_to_type_start" and "conversion_char"; pass
2912 them to format_type_warning calls.
2913 (test_get_modifier_for_format_len): Likewise.
2914 (matching_type_p): New function.
2915 (get_format_for_type): Add param "conversion_char" and move
2916 implementation into...
2917 (get_format_for_type_1): ...new function, called twice.
2918 Use new function matching_type_p rather than checking for
2919 TYPE_CANONICAL equality.
2920 (get_corrected_substring): New function.
2921 (format_type_warning): Provide an example in the leading comment.
2922 Add params "offset_to_type_start" and "conversion_char". Replace
2923 call to get_format_for_type with call to get_corrected_substring
2924 and move rejection of hints for widths/precisions there.
2925 (assert_format_for_type_streq): Add param "conversion_char".
2926 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2927 (test_get_format_for_type_printf): Add conversion chars to the
2928 tests, adding coverage for various combinations of integer
2929 vs double conversions, and for preserving octal and hexadecimal
2930 conversions.
2931 (test_get_format_for_type_scanf): Add conversion chars to the
2932 tests.
2933
5b28efbb
TV
29342016-09-10 Tom de Vries <tom@codesourcery.com>
2935
2936 PR C/71602
2937 * c-common.c (build_va_arg): Handle more strict
2938 targetm.canonical_va_list_type. Replace first argument type error with
2939 assert.
2940
3f0177e7
MS
29412016-09-09 Martin Sebor <msebor@redhat.com>
2942
2943 PR c/77520
2944 PR c/77521
2945 * c-format.c (argument_parser::find_format_char_info): Use %qc
2946 format directive unconditionally.
2947
af63ba4b
JM
29482016-09-09 Jason Merrill <jason@redhat.com>
2949
2950 Implement C++17 new of over-aligned types.
2951 * c.opt: Add -faligned-new and -Waligned-new.
2952 * c-common.c (max_align_t_align): Split out from...
2953 (cxx_fundamental_alignment_p): ...here.
2954 * c-common.h: Declare it.
2955 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
2956
c65248cb
JM
29572016-09-09 Joseph Myers <joseph@codesourcery.com>
2958
2959 * c-cppbuiltin.c (builtin_define_type_width): New function.
2960 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
2961 macros.
2962
e5106e27
DM
29632016-09-07 David Malcolm <dmalcolm@redhat.com>
2964
2965 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
2966 a POINTER_TYPE.
2967 (substring_loc::get_location): Move to substring-locations.c,
2968 keeping implementation as...
2969 (c_get_substring_location): New function, from the above, reworked
2970 to use accessors rather than member lookup.
2971 * c-common.h (class substring_loc): Move to substring-locations.h,
2972 replacing with a forward decl.
2973 (c_get_substring_location): New decl.
2974 * c-format.c: Include "substring-locations.h".
2975 (format_warning_va): Move to substring-locations.c.
2976 (format_warning_at_substring): Likewise.
2977
a42e7952
MS
29782016-09-06 Martin Sebor <msebor@redhat.com>
2979
2980 PR c/77336
2981 * c-format.c (check_function_format): Avoid issuing warnings for
2982 functions unless they call format functions with non-constant
2983 format strings.
2984
b772a565
RB
29852016-09-06 Richard Biener <rguenther@suse.de>
2986
2987 PR c/77450
2988 * c-common.c (c_common_mark_addressable_vec): Handle
2989 COMPOUND_LITERAL_EXPR.
2990
25ff5dd3
MP
29912016-09-05 Marek Polacek <polacek@redhat.com>
2992
2993 PR c/77423
2994 * c-common.c (bool_promoted_to_int_p): New function.
2995 (expr_has_boolean_operands_p): New function.
2996 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
2997 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
2998
21234eb5
TV
29992016-09-04 Tom de Vries <tom@codesourcery.com>
3000
3001 revert:
3002 2016-08-29 Tom de Vries <tom@codesourcery.com>
3003
3004 * c-common.c (build_va_arg): Replace first argument type error
3005 with assert.
3006
9dc5773f
JJ
30072016-09-02 Jakub Jelinek <jakub@redhat.com>
3008
3009 PR c/65467
3010 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3011 (c_finish_omp_for): Reject _Atomic qualified iterators.
3012
30132016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3014
3015 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3016 size to guarantee it fits the output of the formatted function
3017 regardless of its arguments.
3018
295844f6
MP
30192016-09-01 Marek Polacek <polacek@redhat.com>
3020
3021 PR c/7652
3022 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3023 FALLTHRU comments.
3024
3d06b6f2
MP
30252016-08-29 Marek Polacek <polacek@redhat.com>
3026
3027 PR c/77292
3028 * c-common.c (warn_logical_not_parentheses): Don't warn for
3029 a comparison or a logical operator.
3030
34cedad5
TV
30312016-08-29 Tom de Vries <tom@codesourcery.com>
3032
3033 * c-common.c (build_va_arg): Fix type comparison assert.
3034
f162d717
TV
30352016-08-29 Tom de Vries <tom@codesourcery.com>
3036
3037 * c-common.c (build_va_arg): Replace first argument type error
3038 with assert.
3039
ba9bbd6f
TV
30402016-08-29 Tom de Vries <tom@codesourcery.com>
3041
3042 PR c/77398
3043 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3044 with error_mark_node as va_list instead of with illegal va_list.
3045
ebef225f
MP
30462016-08-25 Marek Polacek <polacek@redhat.com>
3047 David Malcolm <dmalcolm@redhat.com>
3048
3049 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3050 * c-common.h (warn_logical_not_parentheses): Update declaration.
3051
b00e6e75
MP
30522016-08-22 Marek Polacek <polacek@redhat.com>
3053
3054 PR c++/77321
3055 * c-common.c (warn_for_memset): Check type for null.
3056
6dc198e3
JM
30572016-08-22 Joseph Myers <joseph@codesourcery.com>
3058
14ec014e 3059 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3060 _FloatNx types for suffixes for built-in functions.
3061
c65699ef
JM
30622016-08-19 Joseph Myers <joseph@codesourcery.com>
3063
3064 PR c/32187
3065 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3066 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3067 (RID_FLOAT128X): New enum rid values.
3068 (CASE_RID_FLOATN_NX): New macro.
3069 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3070 keywords.
3071 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3072 corresponding complex types.
3073 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3074 _FloatNx and corresponding complex types.
3075 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3076 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3077 and _FloatNx types for the widest type for determining
3078 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3079 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3080 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3081 and _FloatNx types.
3082 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3083 constants.
3084 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3085 _FloatNx types.
3086
cc015f3a
DM
30872016-08-18 David Malcolm <dmalcolm@redhat.com>
3088
3089 * c-opts.c (c_diagnostic_finalizer): Update for change to
3090 diagnostic_show_locus.
3091
cb18fd07
DM
30922016-08-18 David Malcolm <dmalcolm@redhat.com>
3093
3094 * c-common.c: Include "spellcheck.h".
3095 (cb_get_suggestion): New function.
3096 * c-common.h (cb_get_suggestion): New decl.
3097 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3098 cb_get_suggestion.
3099
a76989dc
MP
31002016-08-18 Marek Polacek <polacek@redhat.com>
3101
3102 PR c/71514
3103 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3104 and pointer-to-VLA.
3105
65e736c0
DM
31062016-08-16 David Malcolm <dmalcolm@redhat.com>
3107
3108 PR c/72857
3109 * c-common.c (substring_loc::get_range): Rename to...
3110 (substring_loc::get_location): ...this, converting param from a
3111 source_range * to a location_t *. Call
3112 get_source_location_for_substring rather than
3113 get_source_range_for_substring, and pass in m_caret_idx.
3114 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3115 (substring_loc::get_range): Replace with...
3116 (substring_loc::get_location): ...this.
3117 (substring_loc::set_caret_index): New method.
3118 (substring_loc): Add field m_caret_idx.
3119 * c-format.c (format_warning_va): Update for above changes.
3120 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3121 clashing with type name.
3122 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3123 (check_argument_type): Likewise.
3124 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3125 Use a copy when emitting warnings, setting the caret index from TYPE.
3126
7e1dde14 31272016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3128 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3129
3130 * c-ada-spec.c (dump_number): New function.
3131 (handle_escape_character): Likewise.
3132 (print_ada_macros): Add handling of constant integers and strings.
3133
191816a3
MP
31342016-08-12 Marek Polacek <polacek@redhat.com>
3135
3136 PR c/7652
3137 * c-common.c (scalar_to_vector): Adjust fall through comment.
3138 * c-opts.c (c_common_handle_option): Likewise.
3139 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3140 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3141 fall through comment.
3142 * cilk.c (extract_free_variables): Add FALLTHRU.
3143
452df4a4
JM
31442016-08-10 Jason Merrill <jason@redhat.com>
3145
3146 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3147
f3365c12
JM
31482016-08-09 Jason Merrill <jason@redhat.com>
3149
3150 * c-common.c (c_common_attribute_table): vector_size affects type
3151 identity.
3152
f0bc3323
MP
31532016-08-09 Marek Polacek <polacek@redhat.com>
3154
3155 PR c/7652
3156 * c-ada-spec.c (dump_generic_ada_node): Add return.
3157
98e5a19a
JM
31582016-08-09 Jason Merrill <jason@redhat.com>
3159
3160 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3161 C++17 constexpr lambdas.
3162
895aa8e1
DM
31632016-08-08 David Malcolm <dmalcolm@redhat.com>
3164
3165 PR c/64955
3166 * c-common.h (selftest::c_format_c_tests): New declaration.
3167 (selftest::run_c_tests): New declaration.
3168 * c-format.c: Include "selftest.h.
3169 (format_warning_va): Add param "corrected_substring" and use
3170 it to add a replacement fix-it hint.
3171 (format_warning_at_substring): Likewise.
3172 (format_warning_at_char): Update for new param of
3173 format_warning_va.
3174 (argument_parser::check_argument_type): Pass "fki" to
3175 check_format_types.
3176 (check_format_types): Add param "fki" and pass it to
3177 format_type_warning.
3178 (deref_n_times): New function.
3179 (get_modifier_for_format_len): New function.
3180 (selftest::test_get_modifier_for_format_len): New function.
3181 (get_format_for_type): New function.
3182 (format_type_warning): Add param "fki" and use it to attempt
3183 to provide hints for argument types when calling
3184 format_warning_at_substring.
3185 (selftest::get_info): New function.
3186 (selftest::assert_format_for_type_streq): New function.
3187 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3188 (selftest::test_get_format_for_type_printf): New function.
3189 (selftest::test_get_format_for_type_scanf): New function.
3190 (selftest::c_format_c_tests): New function.
3191
e52ed3fe
DM
31922016-08-08 David Malcolm <dmalcolm@redhat.com>
3193
3194 PR c/52952
3195 * c-format.c: Include "diagnostic.h".
3196 (location_column_from_byte_offset): Delete.
3197 (location_from_offset): Delete.
3198 (format_warning_va): New function.
3199 (format_warning_at_substring): New function.
3200 (format_warning_at_char): New function.
3201 (check_format_arg): Capture location of format_tree and pass to
3202 check_format_info_main.
3203 (argument_parser): Add fields "start_of_this_format" and
3204 "format_string_cst".
3205 (flag_chars_t::validate): Add param "format_string_cst". Convert
3206 warning_at call using location_from_offset to call to
3207 format_warning_at_char.
3208 (argument_parser::argument_parser): Add param "format_string_cst_"
3209 and use use it to initialize field "format_string_cst".
3210 Initialize new field "start_of_this_format".
3211 (argument_parser::read_format_flags): Convert warning_at call
3212 using location_from_offset to a call to format_warning_at_char.
3213 (argument_parser::read_any_format_left_precision): Likewise.
3214 (argument_parser::read_any_format_precision): Likewise.
3215 (argument_parser::read_any_other_modifier): Likewise.
3216 (argument_parser::find_format_char_info): Likewise, in three places.
3217 (argument_parser::parse_any_scan_set): Likewise, in one place.
3218 (argument_parser::handle_conversions): Likewise, in two places.
3219 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3220 and use it to make a substring_loc. Pass the latter to
3221 check_format_types.
3222 (check_format_info_main): Add params "fmt_param_loc" and
3223 "format_string_cst". Convert warning_at calls using
3224 location_from_offset to calls to format_warning_at_char. Pass the
3225 new params to the arg_parser ctor. Pass "format_string_cst" to
3226 flag_chars.validate. Pass "fmt_param_loc" to
3227 arg_parser.check_argument_type.
3228 (check_format_types): Convert first param from a location_t
3229 to a const substring_loc & and rename to "fmt_loc". Attempt
3230 to extract the range of the relevant parameter and pass it
3231 to format_type_warning.
3232 (format_type_warning): Convert first param from a location_t
3233 to a const substring_loc & and rename to "fmt_loc". Add
3234 params "param_range" and "type". Replace calls to warning_at
3235 with calls to format_warning_at_substring.
3236
1c4d457e
DM
32372016-08-08 David Malcolm <dmalcolm@redhat.com>
3238
3239 * c-format.c (class flag_chars_t): New class.
3240 (struct length_modifier): New struct.
3241 (class argument_parser): New class.
3242 (flag_chars_t::flag_chars_t): New ctor.
3243 (flag_chars_t::has_char_p): New method.
3244 (flag_chars_t::add_char): New method.
3245 (flag_chars_t::validate): New method.
3246 (flag_chars_t::get_alloc_flag): New method.
3247 (flag_chars_t::assignment_suppression_p): New method.
3248 (argument_parser::argument_parser): New ctor.
3249 (argument_parser::read_any_dollar): New method.
3250 (argument_parser::read_format_flags): New method.
3251 (argument_parser::read_any_format_width): New method.
3252 (argument_parser::read_any_format_left_precision): New method.
3253 (argument_parser::read_any_format_precision): New method.
3254 (argument_parser::handle_alloc_chars): New method.
3255 (argument_parser::read_any_length_modifier): New method.
3256 (argument_parser::read_any_other_modifier): New method.
3257 (argument_parser::find_format_char_info): New method.
3258 (argument_parser::validate_flag_pairs): New method.
3259 (argument_parser::give_y2k_warnings): New method.
3260 (argument_parser::parse_any_scan_set): New method.
3261 (argument_parser::handle_conversions): New method.
3262 (argument_parser::check_argument_type): New method.
3263 (check_format_info_main): Introduce classes argument_parser
3264 and flag_chars_t, moving the code within the loop into methods
3265 of these classes. Make various locals "const".
3266
88fa5555
DM
32672016-08-05 David Malcolm <dmalcolm@redhat.com>
3268
3269 * c-common.c: Include "substring-locations.h".
3270 (get_cpp_ttype_from_string_type): New function.
3271 (g_string_concat_db): New global.
3272 (substring_loc::get_range): New method.
3273 * c-common.h (g_string_concat_db): New declaration.
3274 (class substring_loc): New class.
3275 * c-lex.c (lex_string): When concatenating strings, capture the
3276 locations of all tokens using a new obstack, and record the
3277 concatenation locations within g_string_concat_db.
3278 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3279 on the ggc-heap.
3280
78169471
MP
32812016-07-29 Marek Polacek <polacek@redhat.com>
3282
638fc14f
MP
3283 PR c/71926
3284 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3285 parentheses warning.
3286
78169471
MP
3287 PR c/71574
3288 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3289
1225d6b1
ML
32902016-07-28 Martin Liska <mliska@suse.cz>
3291
3292 PR gcov-profile/68025
3293 * c-common.c (handle_no_profile_instrument_function_attribute):
3294
ec1e2a40
BE
32952016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3296
3297 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3298 BITS_PER_UNIT_LOG.
3299
5ec2cd9f
JM
33002016-07-25 Jason Merrill <jason@redhat.com>
3301
3302 PR c++/65970
3303 * c.opt (fconstexpr-loop-limit): New.
3304
9dc5773f 33052016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3306
3307 PR c++/71675
3308 * c-common.c (resolve_overloaded_builtin): Avoid converting
3309 __atomic_compare_exchange_n return type to that of what its
3310 first argument points to.
3311
e3fe09c1
UB
33122016-07-22 Uros Bizjak <ubizjak@gmail.com>
3313
3314 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3315 ~(unsigned HOST_WIDE_INT) 0.
3316
bc91c436
ML
33172016-07-22 Martin Liska <mliska@suse.cz>
3318
3319 PR gcov-profile/69028
3320 PR gcov-profile/62047
3321 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3322 to the current_function_decl.
3323
451dcc66
JM
33242016-07-21 Jason Merrill <jason@redhat.com>
3325
3326 PR c++/65168
3327 * c-common.c (c_common_truthvalue_conversion): Check
3328 c_inhibit_evaluation_warnings for warning about address of
3329 reference.
3330
de6a69ee
DM
33312016-07-20 David Malcolm <dmalcolm@redhat.com>
3332
3333 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3334 const char *.
3335
d022c55a
JM
33362016-07-15 Jason Merrill <jason@redhat.com>
3337
3338 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3339
ddbbcb19
JJ
33402016-07-15 Jakub Jelinek <jakub@redhat.com>
3341
3342 PR c/71858
3343 * c-common.h (enum lookup_name_fuzzy_kind): Add
3344 FUZZY_LOOKUP_FUNCTION_NAME.
3345
d0cf395a
JM
33462016-07-08 Jason Merrill <jason@redhat.com>
3347
3348 P0145: Refining Expression Order for C++.
3349 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3350 * c-opts.c: Adjust.
3351
98d44e93
MT
33522016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3353
3354 PR c++/71214
3355 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3356
f9d8d994
TS
33572016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3358
3359 * c-pragma.h (enum pragma_kind): Rename
3360 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3361 users.
3362
4aa83879
RB
33632016-06-29 Richard Biener <rguenther@suse.de>
3364
3365 PR middle-end/71002
3366 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3367
a25bd9e6
JM
33682016-06-24 Jason Merrill <jason@redhat.com>
3369
3370 P0145R2: Refining Expression Order for C++.
3371 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3372 MODIFY_EXPR.
3373
a86451b9
JJ
33742016-06-24 Jakub Jelinek <jakub@redhat.com>
3375
3376 * c-common.c (check_builtin_function_arguments): Require last
3377 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3378 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3379 if the last argument is pointer to enumerated or boolean type.
3380
1a4f11c8
DM
33812016-06-22 David Malcolm <dmalcolm@redhat.com>
3382
3383 PR c/70339
3384 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3385 (lookup_name_fuzzy): New prototype.
3386
fe55692c
JDA
33872016-06-21 John David Anglin <danglin@gcc.gnu.org>
3388
3389 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3390
4eb24e01
JM
33912016-06-14 Jason Merrill <jason@redhat.com>
3392
3393 P0145R2: Refining Expression Order for C++.
3394 * c.opt (fargs-in-order): New.
3395 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3396
ef7cf206
JJ
33972016-06-13 Jakub Jelinek <jakub@redhat.com>
3398
0dda258b
JJ
3399 PR sanitizer/71498
3400 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3401 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3402
ef7cf206
JJ
3403 PR preprocessor/71183
3404 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3405 to cb_get_source_date_epoch.
3406
50b15873
JJ
34072016-06-10 Jakub Jelinek <jakub@redhat.com>
3408
3409 PR c/68657
3410 * c.opt (Wpsabi): Add Warning flag.
3411
4d926e34
MS
34122016-06-10 Martin Sebor <msebor@redhat.com>
3413
3414 PR c/71392
14ec014e 3415 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3416 the nonnull attribute in type-generic builtins.
3417
e01b4e16
MS
34182016-06-09 Martin Sebor <msebor@redhat.com>
3419
3420 PR c/70883
3421 * c-common.c (builtin_function_validate_nargs): Make text of error
3422 message consistent with others like it.
3423
44a845ca
MS
34242016-06-08 Martin Sebor <msebor@redhat.com>
3425 Jakub Jelinek <jakub@redhat.com>
3426
3427 PR c++/70507
3428 PR c/68120
3429 * c-common.c (check_builtin_function_arguments): Handle
3430 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3431
a80a7051
RB
34322016-06-08 Richard Biener <rguenther@suse.de>
3433
3434 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3435
bfd67b47
RB
34362016-06-07 Richard Biener <rguenther@suse.de>
3437
3438 PR c/61564
3439 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3440 options and warn about others.
3441
15c98b2e
ES
34422016-06-01 Eduard Sanou <dhole@openmailbox.org>
3443
3444 * c-common.c (get_source_date_epoch): Rename to
3445 cb_get_source_date_epoch.
3446 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3447 message when the parsing fails. Use error_at instead of fatal_error.
3448 * c-common.h (get_source_date_epoch): Rename to
3449 cb_get_source_date_epoch.
3450 * c-common.h (cb_get_source_date_epoch): Prototype.
3451 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3452 * c-common.h (c_omp_region_type): Remove trailing comma.
3453 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3454 * c-lex.c (c_lex_with_flags): Remove initialization of
3455 pfile->source_date_epoch.
3456
00631022
JJ
34572016-05-30 Jakub Jelinek <jakub@redhat.com>
3458
3459 PR c++/71349
3460 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3461 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3462 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3463 instead of C_OMP_CLAUSE_SPLIT_FOR.
3464
f17a223d
RB
34652016-05-24 Richard Biener <rguenther@suse.de>
3466
3467 PR middle-end/70434
3468 PR c/69504
3469 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3470 (convert_vector_to_array_for_subscript): ... this.
3471 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3472 VIEW_CONVERT_EXPR to an array type. Rename to ...
3473 (convert_vector_to_array_for_subscript): ... this.
3474
4f2e1536
MP
34752016-05-12 Marek Polacek <polacek@redhat.com>
3476
3477 PR c/70756
3478 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3479 size_in_bytes and pass LOC to it.
3480
d6e83a8d
MM
34812016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3482
3483 PR c/43651
3484 * c.opt (Wduplicate-decl-specifier): New option.
3485
5c3a10fb
MP
34862016-05-11 Marek Polacek <polacek@redhat.com>
3487
3488 PR c++/71024
3489 * c-common.c (diagnose_mismatched_attributes): New function.
3490 * c-common.h (diagnose_mismatched_attributes): Declare.
3491
deef7113
MP
34922016-05-04 Marek Polacek <polacek@redhat.com>
3493
3494 * c.opt (Wdangling-else): New option.
3495
79ce98bc
MP
34962016-05-03 Marek Polacek <polacek@redhat.com>
3497
3498 PR c/70859
3499 * c-common.c (builtin_function_validate_nargs): Add location
3500 parameter. Use it.
3501 (check_builtin_function_arguments): Add location and arguments
3502 parameters. Use them.
3503 * c-common.h (check_builtin_function_arguments): Update declaration.
3504
381cdae4
RB
35052016-05-03 Richard Biener <rguenther@suse.de>
3506
3507 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3508 allow call args to gimplify to SSA names.
3509
1d793c34
MP
35102016-05-03 Marek Polacek <polacek@redhat.com>
3511
3512 * c-common.h (enum c_omp_region_type): Remove stray comma.
3513
77886428
CP
35142016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3515
3516 * c-common.h (enum c_omp_region_type): Define.
3517
697e0b28
RS
35182016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3519
3520 * c-common.c (shorten_compare): Use wi::to_wide.
3521
e7ff0319
CP
35222016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3523
3524 PR middle-end/70626
3525 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3526 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3527 reduction clauses in acc parallel loops.
3528
2fff3db8
MP
35292016-04-29 Marek Polacek <polacek@redhat.com>
3530
3531 PR c/70852
3532 * c-common.c (warn_for_memset): Check domain before accessing it.
3533
509063eb
DV
35342016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3535
3536 PR/69089
3537 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3538 "aligned" attribute.
3539
b632761d
JM
35402016-04-28 Jason Merrill <jason@redhat.com>
3541
3542 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3543
174f6622
ES
35442016-04-28 Eduard Sanou <dhole@openmailbox.org>
3545 Matthias Klose <doko@debian.org>
3546
3547 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3548 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3549 handling.
3550 * c-common.h (get_source_date_epoch): Prototype.
3551 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3552
6bc2bb18
RB
35532015-04-27 Ryan Burn <contact@rnburn.com>
3554
3555 PR c++/69024
3556 PR c++/68997
3557 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3558 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3559 external linkage.
3560 (cilk_detect_and_unwrap): Corresponding changes.
3561 (extract_free_variables): Don't extract free variables from
3562 AGGR_INIT_EXPR slot.
3563 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3564 (cilk_recognize_spawn): Likewise.
3565
c1e1f433
BS
35662016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3567
3568 * c.opt (Wmemset-elt-size): New option.
3569 * c-common.c (warn_for_memset): New function.
3570 * c-common.h (warn_for_memset): Declare.
3571
d067e05f
JM
35722016-04-25 Jason Merrill <jason@redhat.com>
3573
3574 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3575 No longer static.
3576 * c-common.h: Declare it.
3577 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3578
9aa36ae5
JM
35792016-04-22 Jason Merrill <jason@redhat.com>
3580
3581 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3582
477d4906
IV
35832016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3584
3585 PR c++/69363
3586 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3587 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3588
fe37c7af
MM
35892016-04-18 Michael Matz <matz@suse.de>
3590
3591 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3592 and SET_DECL_ALIGN.
3593
23f2660f
EB
35942016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3595
3596 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3597 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3598 to incomplete types.
3599 (dump_nested_type): Remove redundant tests and tidy up.
3600 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3601 a type which is the typedef of an original type.
3602
1e77281b
MP
36032016-04-15 Marek Polacek <polacek@redhat.com>
3604
3605 PR c/70651
3606 * c-common.c (build_va_arg): Change two asserts into errors and return
3607 error_mark_node.
3608
b3a77f21
MP
36092016-04-13 Marek Polacek <polacek@redhat.com>
3610
3611 PR c++/70639
3612 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3613 for switch statements, too.
3614
322b8466
JM
36152016-03-28 Jason Merrill <jason@redhat.com>
3616
3617 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3618
fbdb6baf
MP
36192016-03-23 Marek Polacek <polacek@redhat.com>
3620
3621 PR c++/69884
3622 * c.opt (Wignored-attributes): New option.
3623
5c240f4d
DM
36242016-03-22 David Malcolm <dmalcolm@redhat.com>
3625
3626 PR c/69993
3627 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3628 diagnostic text, reversing the order of the warning and note so
3629 that they appear in source order.
3630
14ba7b28
MP
36312016-03-17 Marek Polacek <polacek@redhat.com>
3632
3633 PR c/69407
3634 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3635 operations.
3636
08a1cadc
JM
36372016-03-14 Jason Merrill <jason@redhat.com>
3638
2aaeea19
JM
3639 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3640
08a1cadc
JM
3641 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3642
c06d25bb
RB
36432016-03-09 Richard Biener <rguenther@suse.de>
3644
3645 PR c/70143
3646 * c-common.c (strict_aliasing_warning): Add back
3647 alias_sets_conflict_p check.
3648
80aac5c8
JM
36492016-03-08 Jason Merrill <jason@redhat.com>
3650
3651 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3652
64b23c13
DM
36532016-03-04 David Malcolm <dmalcolm@redhat.com>
3654
3655 PR c/68187
3656 * c-indentation.c (get_visual_column): Move code to determine next
3657 tab stop to...
3658 (next_tab_stop): ...this new function.
3659 (line_contains_hash_if): Delete function.
3660 (detect_preprocessor_logic): Delete function.
3661 (get_first_nws_vis_column): New function.
3662 (detect_intervening_unindent): New function.
3663 (should_warn_for_misleading_indentation): Replace call to
3664 detect_preprocessor_logic with a call to
3665 detect_intervening_unindent.
3666
729526f5
DM
36672016-03-04 David Malcolm <dmalcolm@redhat.com>
3668
3669 PR c/68187
3670 * c-indentation.c (should_warn_for_misleading_indentation): When
3671 suppressing warnings about cases where the guard and body are on
3672 the same column, only use the first non-whitespace column in place
3673 of the guard token column when dealing with "else" clauses.
3674 When rejecting aligned BODY and NEXT, loosen the requirement
3675 from equality with the first non-whitespace of guard to simply
3676 that they not be indented relative to it.
3677
e9a35493
RB
36782016-03-04 Richard Biener <rguenther@suse.de>
3679
3680 PR c++/70054
3681 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3682 instead of alias_sets_conflict_p.
3683
1be56bc5
MP
36842016-03-01 Marek Polacek <polacek@redhat.com>
3685
3686 PR c++/69795
3687 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3688 any DECL.
3689
35886f0b
MS
36902016-02-22 Martin Sebor <msebor@redhat.com>
3691
3692 PR middle-end/69780
3693 * c-common.c (check_builtin_function_arguments): Validate and
3694 reject invalid arguments to __builtin_alloca_with_align.
3695
4246c8da
MW
36962016-02-20 Mark Wielaard <mjw@redhat.com>
3697
3698 PR c/28901
3699 * c.opt (Wunused-const-variable): Turn into Alias for...
3700 (Wunused-const-variable=): New option.
3701
268be88c
BE
37022016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3703
3704 PR c++/69865
3705 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3706 here...
3707 (c_common_init_options): ...to here.
3708 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3709
871b3f47
JJ
37102016-02-19 Jakub Jelinek <jakub@redhat.com>
3711
3712 PR c++/69826
3713 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3714 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3715 flag_preprocess_only.
3716
bf14eba2
JJ
37172016-02-16 Jakub Jelinek <jakub@redhat.com>
3718
3719 PR c/69835
3720 * c.opt (Wnonnull-compare): Enable for -Wall.
3721
ba6b3795
JJ
37222016-02-15 Jakub Jelinek <jakub@redhat.com>
3723
3724 PR c++/69797
3725 * c-common.c (sync_resolve_size): Diagnose too few arguments
3726 even when params is non-NULL empty vector.
3727
a011cd92
BS
37282016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3729
3730 PR target/60410
3731 * c.opt (fshort-double): Remove.
3732
46cb9332
MS
37332016-02-05 Martin Sebor <msebor@redhat.com>
3734
3735 PR c++/69662
3736 * c.opt (Warning options): Update -Wplacement-new to take
3737 an optional argument.
3738
e1b81f2b
JJ
37392016-02-01 Jakub Jelinek <jakub@redhat.com>
3740
3741 PR preprocessor/69543
3742 PR c/69558
3743 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3744 instead of loc to control_warning_option.
3745
b6adbb9f
NS
37462016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3747
3748 * c.opt (fopenacc-dim=): New option.
3749
5d70666e
RB
37502016-01-27 Ryan Burn <contact@rnburn.com>
3751
3752 PR cilkplus/69267
3753 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3754 gimplify_arg. Removed superfluous post_p argument.
3755 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3756 superfluous post_p argument.
3757 * c-gimplify.c (c_gimplify_expr): Likewise.
3758
01e1dea3
DM
37592016-01-26 David Malcolm <dmalcolm@redhat.com>
3760
3761 PR other/69006
3762 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3763 pp_newline_and_flush with pp_flush.
3764
9f04a53e
MS
37652016-01-20 Martin Sebor <msebor@redhat.com>
3766
3767 PR c/69405
3768 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3769 an incompatible argument when the argument isn't a valid tree node.
3770
7f26f7df
JM
37712016-01-18 Jason Merrill <jason@redhat.com>
3772
3773 PR c++/68767
3774 * c-common.c (check_function_arguments_recurse): Fold the whole
3775 COND_EXPR, not just the condition.
3776
f62bf092
TV
37772016-01-18 Tom de Vries <tom@codesourcery.com>
3778
3779 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3780 classify as loop clause.
3781
e0a575ff
JJ
37822016-01-15 Jakub Jelinek <jakub@redhat.com>
3783
3784 PR bootstrap/68271
3785 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3786 C++ FE no longer has limit on number of pragmas.
3787
37882015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
3789
3790 PR c++/69048
3791 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 3792 to add missing cleanup point.
b6e3db06 3793
c7df95d8
DM
37942016-01-14 David Malcolm <dmalcolm@redhat.com>
3795
3796 PR c++/68819
3797 * c-indentation.c (get_visual_column): Add location_t param.
3798 Handle the column number being zero by effectively disabling the
3799 warning, with an "inform".
3800 (should_warn_for_misleading_indentation): Add location_t argument
3801 for all uses of get_visual_column.
3802
21efdd80
PP
38032016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3804
3805 PR c++/69029
3806 * c-indentation.c (should_warn_for_misleading_indentation):
3807 Don't warn about do-while statements.
3808
7a127fa7
MS
38092016-01-07 Martin Sebor <msebor@redhat.com>
3810
3811 PR c/68966
3812 * c-common.c (sync_resolve_size): Reject first argument when it's
3813 a pointer to _Bool.
3814
c589e975
DM
38152016-01-05 David Malcolm <dmalcolm@redhat.com>
3816
3817 PR c/69122
3818 * c-indentation.c (get_visual_column): Remove default argument.
3819 (should_warn_for_misleading_indentation): For the multiline case,
3820 update call to get_visual_column for next_stmt_exploc so that it
3821 captures the location of the first non-whitespace character in the
3822 relevant line. Don't issue warnings if there is non-whitespace
3823 before the next statement.
3824
818ab71a
JJ
38252016-01-04 Jakub Jelinek <jakub@redhat.com>
3826
3827 Update copyright years.
3828
745e411d
DM
38292015-12-21 David Malcolm <dmalcolm@redhat.com>
3830
3831 * c-common.c (binary_op_error): Convert first param from
3832 location_t to rich_location * and use it when emitting an error.
3833 * c-common.h (binary_op_error): Convert first param from
3834 location_t to rich_location *.
3835
de67c4c3
DM
38362015-12-16 David Malcolm <dmalcolm@redhat.com>
3837
3838 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3839 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3840
4a38b02b
IV
38412015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3842
3843 * c-common.c (c_common_attribute_table): Handle "omp declare target
3844 link" attribute.
3845
54d62f51
JJ
38462015-12-14 Jakub Jelinek <jakub@redhat.com>
3847
3848 PR c/68833
3849 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3850
8d4227c8
TB
38512014-12-12 Tobias Burnus <burnus@net-b.de>
3852
3853 PR fortran/68815
3854 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3855 specifiers (%d, %i,%u and %c).
3856
f6069ccc
DM
38572015-12-10 David Malcolm <dmalcolm@redhat.com>
3858
3859 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3860
63bbf46d
JJ
38612015-12-08 Jakub Jelinek <jakub@redhat.com>
3862
3863 PR c/48088
3864 PR c/68657
3865 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3866 * c-pragma.c (handle_pragma_diagnostic): Adjust
3867 control_warning_option caller.
3868
f79520bb
DM
38692015-12-07 David Malcolm <dmalcolm@redhat.com>
3870
3871 * c-common.c (c_cpp_error): Update for change to
3872 rich_location::set_range.
3873
b3d5bc62
JJ
38742015-12-04 Paolo Bonzini <bonzini@gnu.org>
3875
3876 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3877 shifting 1 out of the sign bit.
3878
38792015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3880
3881 * c-common.c (c_common_attribute_table[]): Update max arguments
3882 count for "simd" attribute.
3883 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3884
6eb4a537
JJ
38852015-12-03 Jakub Jelinek <jakub@redhat.com>
3886
3887 PR preprocessor/57580
3888 * c-ppoutput.c (print): Change printed field to bool.
3889 Move src_file last for smaller padding.
3890 (init_pp_output): Set print.printed to false instead of 0.
3891 (scan_translation_unit): Fix up formatting. Set print.printed
3892 to true after printing something other than newline.
3893 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3894 (maybe_print_line_1): Set print.printed to false instead of 0.
3895 (print_line_1): Likewise.
3896 (do_line_change): Set print.printed to true instead of 1.
3897 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3898 dump_macro): Set print.printed to false after printing newline.
3899
4250754e
JM
39002015-12-02 Jason Merrill <jason@redhat.com>
3901
f479b43d
JM
3902 * c-common.c (fold_for_warn): New.
3903 (warn_logical_operator, warn_tautological_cmp)
3904 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3905
4250754e
JM
3906 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3907 (c_fully_fold_internal, decl_constant_value_for_optimization):
3908 Move to c/c-fold.c.
3909 * c-common.h: Don't declare decl_constant_value_for_optimization.
3910
e9e32ee6
JM
39112015-12-02 Joseph Myers <joseph@codesourcery.com>
3912
3913 PR c/68162
3914 * c-common.h (c_build_qualified_type): Add extra default
3915 arguments.
3916
37d5ad46
JB
39172015-12-01 Julian Brown <julian@codesourcery.com>
3918 Cesar Philippidis <cesar@codesourcery.com>
3919 James Norris <James_Norris@mentor.com>
3920
3921 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3922 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3923 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3924
f07862c7
EB
39252015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3926
3927 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3928 (decl_sloc_common): Delete and move bulk of processing to...
3929 (decl_sloc): ...here.
3930 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3931 (dump_ada_double_name): Remove S parameter and compute the suffix.
3932 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3933 element type and deal with an anonymous one.
3934 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3935 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3936 and remove reference to QUAL_UNION_TYPE.
3937 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3938 (dump_nested_type): ...here. New function extracted from above.
3939 Generate a full declaration for anonymous element type of arrays.
3940 (print_ada_declaration): Really skip anonymous declarations. Remove
3941 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
3942 Clean up processing of declarations of array types and objects.
3943 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
3944 Remove obsolete code and tidy up.
3945
75c8aac3
JH
39462015-11-29 Jan Hubicka <hubicka@ucw.cz>
3947
3948 PR c/67581
3949 * c-common.c (handle_transparent_union_attribute): Update
3950 also type variants.
3951
b58d3df2
ML
39522015-11-27 Martin Liska <mliska@suse.cz>
3953
3954 PR c++/68312
3955 * array-notation-common.c (cilkplus_extract_an_triplets):
3956 Release vector of vectors.
3957 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
3958
89a01fcf
EB
39592015-11-26 Eric Botcazou <ebotcazou@adacore.com>
3960
3961 PR c++/68527
3962 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
3963 (print_ada_struct_decl): Likewise.
3964
cc5c5226
IZ
39652015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
3966
3967 PR c++/68001
3968 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
3969 * cilk.c (recognize_spawn): Determine location in a more precise
3970 way.
3971
269adb9d
JM
39722015-11-19 Jason Merrill <jason@redhat.com>
3973
3974 * c-common.c (shorten_compare): But look through macros from
3975 system headers.
3976
d0eccfcd
JM
39772015-11-18 Jason Merrill <jason@redhat.com>
3978
3979 * c-common.c (shorten_compare): Don't -Wtype-limits if the
3980 non-constant operand comes from a macro.
3981
3e44547c
JM
39822015-11-17 Jason Merrill <jason@redhat.com>
3983
3984 PR bootstrap/68346
3985 * c-common.c (warn_tautological_cmp): Fold before checking for
3986 constants.
3987
0f62c7a0
MP
39882015-11-16 Marek Polacek <polacek@redhat.com>
3989
3990 PR c++/68362
3991 * c-common.c (check_case_bounds): Fold low and high cases.
3992
a868811e
MP
39932015-11-16 Marek Polacek <polacek@redhat.com>
3994
3995 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
3996 * c-common.c (c_common_get_alias_set): Likewise.
3997 (handle_visibility_attribute): Likewise.
3998
fff77217
KY
39992015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4000
4001 * c-common.c (handle_simd_attribute): New.
4002 (struct attribute_spec): Add entry for "simd".
4003 (handle_simd_attribute): New.
4004
269e63b7
KT
40052015-11-13 Kai Tietz <ktietz70@googlemail.com>
4006
4007 * c-lex.c (interpret_float): Use fold_convert.
4008
ebedc9a3
DM
40092015-11-13 David Malcolm <dmalcolm@redhat.com>
4010
4011 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4012 and store it on the result.
4013 * c-opts.c (c_common_init_options): Set
4014 global_dc->colorize_source_p.
4015
6e232ba4
JN
40162015-11-12 James Norris <jnorris@codesourcery.com>
4017 Joseph Myers <joseph@codesourcery.com>
4018
7365279f 4019 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4020 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4021 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4022 PRAGMA_OACC_CLAUSE_LINK.
4023
e78bede6
MP
40242015-11-11 Marek Polacek <polacek@redhat.com>
4025
4026 PR c/68107
4027 PR c++/68266
4028 * c-common.c (valid_array_size_p): New function.
4029 * c-common.h (valid_array_size_p): Declare.
4030
3f8257db 40312015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4032
4033 PR bootstrap/68271
4034 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4035
69f293c9
AM
40362015-11-11 Andrew MacLeod <amacleod@redhat.com>
4037
4038 * array-notation-common.c: Remove unused header files.
4039 * c-ada-spec.c: Likewise.
4040 * c-cilkplus.c: Likewise.
4041 * c-common.c: Likewise.
4042 * c-cppbuiltin.c: Likewise.
4043 * c-dump.c: Likewise.
4044 * c-format.c: Likewise.
4045 * c-gimplify.c: Likewise.
4046 * c-indentation.c: Likewise.
4047 * c-lex.c: Likewise.
4048 * c-omp.c: Likewise.
4049 * c-opts.c: Likewise.
4050 * c-pch.c: Likewise.
4051 * c-ppoutput.c: Likewise.
4052 * c-pragma.c: Likewise.
4053 * c-pretty-print.c: Likewise.
4054 * c-semantics.c: Likewise.
4055 * c-ubsan.c: Likewise.
4056 * cilk.c: Likewise.
4057 * stub-objc.c: Likewise.
4058
3a40d81d
NS
40592015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4060 Cesar Philippidis <cesar@codesourcery.com>
4061 James Norris <jnorris@codesourcery.com>
4062 Julian Brown <julian@codesourcery.com>
4063 Nathan Sidwell <nathan@codesourcery.com>
4064
4065 * c-pragma.c (oacc_pragmas): Add "routine".
4066 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4067
ee45a32d
EB
40682015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4069
4070 * c-common.c (c_common_attributes): Add scalar_storage_order.
4071 (handle_scalar_storage_order_attribute): New function.
4072 * c-pragma.c (global_sso): New variable.
4073 (maybe_apply_pragma_scalar_storage_order): New function.
4074 (handle_pragma_scalar_storage_order): Likewise.
4075 (init_pragma): Register scalar_storage_order.
4076 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4077 * c.opt (Wscalar-storage-order): New warning.
4078 (fsso-struct=): New option.
4079
eb11eb15
MS
40802015-11-08 Martin Sebor <msebor@redhat.com>
4081
4082 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4083
0aad0198
RS
40842015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4085
4086 * c-common.c: Don't undef DEF_BUILTIN.
4087
8a645150
DM
40882015-11-06 David Malcolm <dmalcolm@redhat.com>
4089
4090 * c-common.c (c_cpp_error): Convert parameter from location_t to
4091 rich_location *. Eliminate the "column_override" parameter and
4092 the call to diagnostic_override_column.
4093 Update the "done_lexing" clause to set range 0
4094 on the rich_location, rather than overwriting a location_t.
4095 * c-common.h (c_cpp_error): Convert parameter from location_t to
4096 rich_location *. Eliminate the "column_override" parameter.
4097
7a5e4956
CP
40982015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4099 Thomas Schwinge <thomas@codesourcery.com>
4100 James Norris <jnorris@codesourcery.com>
4101
4102 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4103 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4104 clauses with parallel and kernels and loops.
4105 * c-pragma.h (enum pragma_omp_clause): Add entries for
4106 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4107 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4108 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4109 INDEPENDENT,SEQ}.
4110 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4111
e2f5cc96
MS
41122015-11-05 Martin Sebor <msebor@redhat.com>
4113
4114 PR c++/67942
4115 * c.opt (-Wplacement-new): New option.
4116
e01d41e5
JJ
41172015-11-05 Jakub Jelinek <jakub@redhat.com>
4118
4119 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4120 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4121 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4122 save_expr or create_tmp_var* if TEST is true.
4123 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4124 Don't call add_stmt here.
4125 (struct c_omp_check_loop_iv_data): New type.
4126 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4127 c_omp_check_loop_iv_exprs): New functions.
4128 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4129 distribute.
4130 (c_omp_declare_simd_clauses_to_numbers): Change
4131 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4132 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4133 from numbers to PARM_DECLs.
4134
595278be
MM
41352015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4136
4137 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4138 flag_checking.
4139
3f8257db 41402015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4141
4142 PR c++-common/67882
b3d5bc62
JJ
4143 * c-common.h (fold_offsetof_1): Add argument.
4144 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4145 offsetof expressions that reference elements past the end of
4146 an array.
4147
4bf9e5a8
TS
41482015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4149 Chung-Lin Tang <cltang@codesourcery.com>
4150
4151 * c-pragma.c (oacc_pragmas): Add "atomic".
4152 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4153
3b1661a9
ES
41542015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4155
4156 * c-common.c (handle_target_clones_attribute): New.
4157 (c_common_attribute_table): Add handle_target_clones_attribute.
4158 (handle_always_inline_attribute): Add check on target_clones attribute.
4159 (handle_target_attribute): Ditto.
4160
2adfab87
AM
41612015-10-29 Andrew MacLeod <amacleod@redhat.com>
4162
4163 * array-notation-common.c: Reorder #include's and remove duplicates.
4164 * c-ada-spec.c: Likewise.
4165 * c-cilkplus.c: Likewise.
4166 * c-common.c: Likewise.
4167 * c-cppbuiltin.c: Likewise.
4168 * c-dump.c: Likewise.
4169 * c-format.c: Likewise.
4170 * c-gimplify.c: Likewise.
4171 * c-indentation.c: Likewise.
4172 * c-lex.c: Likewise.
4173 * c-omp.c: Likewise.
4174 * c-opts.c: Likewise.
4175 * c-pch.c: Likewise.
4176 * c-ppoutput.c: Likewise.
4177 * c-pragma.c: Likewise.
4178 * c-pretty-print.c: Likewise.
4179 * c-semantics.c: Likewise.
4180 * c-ubsan.c: Likewise.
4181 * cilk.c: Likewise.
4182 * stub-objc.c: Likewise.
4183
d90ec4f2
JM
41842015-10-28 Jason Merrill <jason@redhat.com>
4185
4186 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4187
88bae6f4
TS
41882015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4189 James Norris <jnorris@codesourcery.com>
4190 Cesar Philippidis <cesar@codesourcery.com>
4191
4192 PR c/64765
4193 PR c/64880
4194 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4195 * c-omp.c (c_oacc_split_loop_clauses): New function.
4196
b1726d6c
MS
41972015-10-21 Martin Sebor <msebor@redhat.com>
4198
4199 PR driver/68043
4200 * c.opt: End each sentence that describes an option with a period.
4201
fa60eeb9
MP
42022015-10-20 Marek Polacek <polacek@redhat.com>
4203
4204 * array-notation-common.c (is_cilkplus_vector_p): Define.
4205 * c-common.h (is_cilkplus_vector_p): Declare.
4206
95979049
MP
42072015-10-20 Marek Polacek <polacek@redhat.com>
4208
4209 * c.opt (std=gnu++11): Do not describe as experimental.
4210 (std=gnu++14): Likewise.
4211
2a9fb712
JM
42122015-10-19 Jason Merrill <jason@redhat.com>
4213
4214 * c-cppbuiltin.c (c_cpp_builtins): Define
4215 __cpp_nontype_template_args.
4216
13b380a3
JM
42172015-10-19 Jason Merrill <jason@redhat.com>
4218
4219 * c-cppbuiltin.c (c_cpp_builtins): Define
4220 __cpp_enumerator_attributes, __cpp_fold_expressions,
4221 __cpp_unicode_characters.
4222
d9a6bd32
JJ
42232015-10-13 Jakub Jelinek <jakub@redhat.com>
4224 Aldy Hernandez <aldyh@redhat.com>
4225
4226 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4227 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4228 (c_define_builtins): Likewise.
4229 * c-common.h (enum c_omp_clause_split): Add
4230 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4231 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4232 (c_finish_omp_for): Add ORIG_DECLV argument.
4233 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4234 201511 instead of 201307.
4235 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4236 OMP_CRITICAL_CLAUSES to it.
4237 (c_finish_omp_ordered): Add CLAUSES argument, set
4238 OMP_ORDERED_CLAUSES to it.
4239 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4240 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4241 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4242 constructs and new OpenMP 4.5 clauses. Clear
4243 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4244 verification code.
4245 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4246 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4247 (enum pragma_omp_clause): Add
4248 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4249 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4250
624d31fe
RS
42512015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4252
4253 * c-lex.c (interpret_float): Use real_equal instead of
4254 REAL_VALUES_EQUAL.
4255
b8fd7909
JM
42562015-10-04 Jason Merrill <jason@redhat.com>
4257
4258 Implement N4514, C++ Extensions for Transactional Memory.
4259 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4260 (c_common_attribute_table): Add transaction_safe_dynamic.
4261 transaction_safe now affects type identity.
4262 (handle_tm_attribute): Handle transaction_safe_dynamic.
4263 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4264 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4265 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4266 (D_TRANSMEM): New.
4267 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4268 * c-pretty-print.c (pp_c_attributes_display): Don't print
4269 transaction_safe in C++.
4270
12651878
MP
42712015-10-02 Marek Polacek <polacek@redhat.com>
4272
4273 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4274
3e3b8d63
MP
42752015-10-02 Marek Polacek <polacek@redhat.com>
4276
4277 PR c/64249
4278 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4279 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4280 * c.opt (Wduplicated-cond): New option.
4281
0d1a8f75
JM
42822015-10-01 Joseph Myers <joseph@codesourcery.com>
4283
4284 * c.opt (std=c11): Do not describe as experimental.
4285 (std=gnu11): Likewise.
4286 (std=iso9899:2011): Likewise.
4287
3e32ee19
NS
42882015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4289
4290 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4291 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4292
974348ee
MP
42932015-09-25 Marek Polacek <polacek@redhat.com>
4294
4295 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4296 (ubsan_instrument_shift): Likewise.
4297
15dbc1a6
MP
42982015-09-25 Marek Polacek <polacek@redhat.com>
4299
4300 PR sanitizer/64906
4301 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4302
6b95d7cc
PP
43032015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4304
4305 * c-indentation.c (should_warn_for_misleading_indentation):
4306 Compare next_stmt_vis_column with guard_line_first_nws instead
4307 of with guard_line_vis_column.
4308
c1822f9c
MLI
43092015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4310
4311 PR c/49654
4312 PR c/49655
4313 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4314 options and options not valid for the current language.
4315
d5398058
PP
43162015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4317
4318 * c-indentation.c (should_warn_for_misleading_indentation):
4319 Float out and consolidate the calls to get_visual_column that
4320 are passed guard_exploc as an argument. Compare
4321 next_stmt_vis_column with guard_line_first_nws instead of with
4322 body_line_first_nws.
4323
6b333269
NS
43242015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4325
4326 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4327 Wnamespaces): New C++ warnings.
4328
a75f1574
JM
43292015-09-22 Jason Merrill <jason@redhat.com>
4330
4331 * c-common.h (abi_compat_version_crosses): New.
4332 (warn_abi_version): Declare.
4333 * c-common.c: Define it.
4334 * c-opts.c (c_common_post_options): Handle it.
4335 flag_abi_compat_version defaults to 8.
4336
bdaaa8b7
VV
43372015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4338
4339 Complete the implementation of N4230, Nested namespace definition.
4340 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4341 __cpp_nested_namespace_definitions.
4342
eaa797e8
MLI
43432015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4344
4345 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4346
c4914de6
MLI
43472015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4348
4349 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4350 when warning.
4351 * c-pragma.h (pragma_lex): Add optional loc argument.
4352
fcb87c50
MM
43532015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4354
4355 * c-format.c (check_format_arg): Adjust to use common block size in all
4356 object pools.
4357
31bdd08a
DM
43582015-09-15 David Malcolm <dmalcolm@redhat.com>
4359
4360 * c-format.c (location_from_offset): Update for change in
4361 signature of location_get_source_line.
4362 * c-indentation.c (get_visual_column): Likewise.
4363 (line_contains_hash_if): Likewise.
4364
aa9f4b4c
MP
43652015-09-14 Marek Polacek <polacek@redhat.com>
4366
4367 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4368 setting various warnings.
4369
aa256c4a
MP
43702015-09-14 Marek Polacek <polacek@redhat.com>
4371
4372 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4373 a negative value.
4374
0f876f22
MW
43752015-09-11 Mark Wielaard <mjw@redhat.com>
4376
4377 PR c/28901
4378 * c.opt (Wunused-variable): Option from common.opt.
4379 (Wunused-const-variable): New option.
4380
273aa49e
PC
43812015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4382
4383 PR c++/53184
4384 * c.opt ([Wsubobject-linkage]): Add.
4385
1807ffc1
MS
43862015-09-03 Martin Sebor <msebor@redhat.com>
4387
4388 PR c/66516
4389 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4390 functions.
4391 * c-common.c (reject_gcc_builtin): Define.
4392
38942840
BI
43932015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4394
4395 PR middle-end/60586
4396 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4397 prototype.
4398 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4399 cilk_gimplify_call_params_in_spawned_fn.
4400 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4401 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4402 unwrapping.
4403
c316b5e4
MP
44042015-08-25 Marek Polacek <polacek@redhat.com>
4405
4406 PR middle-end/67330
4407 * c-common.c (handle_weak_attribute): Don't check whether the
4408 visibility can be changed here.
4409
584a7c46
MLI
44102015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4411
4412 * c-lex.c (c_lex_with_flags): Use explicit locations.
4413
a79683d5
TS
44142015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4415
4416 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4417 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4418
61717a45
FXC
44192015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4420
4421 PR middle-end/36757
4422 * c-common.c (check_builtin_function_arguments): Add check
4423 for BUILT_IN_SIGNBIT argument.
4424
329524f5
PC
44252015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4426
4427 PR c++/67160
4428 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4429 in c++1z mode.
4430
4ee55665
MP
44312015-08-17 Marek Polacek <polacek@redhat.com>
4432
4433 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4434 with whitespaces before qualifier names.
4435
b893e375
MP
44362015-08-12 Marek Polacek <polacek@redhat.com>
4437
4438 PR c++/55095
4439 * c-common.c (maybe_warn_shift_overflow): Properly handle
4440 left-shifting 1 into the sign bit.
4441
c2d89095
MLI
44422015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4443
4444 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4445
971e17ff
AS
44462015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4447 Braden Obrzut <admin@maniacsvault.net>
4448 Jason Merrill <jason@redhat.com>
4449
4450 Add C++ Concepts TS support.
4451 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4452 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4453 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4454 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4455 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4456 * c.opt (fconcepts): New.
4457
b3d5bc62
JJ
44582015-08-02 Martin Sebor <msebor@redhat.com>
4459
4460 * c.opt (-Wframe-address): New warning option.
4461
8ebca419
PP
44622015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4463
4464 * c-indentation.c (should_warn_for_misleading_indentation):
4465 Improve heuristics.
4466
1a1e101f
PP
44672015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4468
4469 * c-indentation.c (get_visual_column): Add parameter first_nws,
4470 use it. Update comment documenting the function.
4471 (is_first_nonwhitespace_on_line): Remove.
4472 (should_warn_for_misleading_indentation): Replace usage of
4473 of is_first_nonwhitespace_on_line with get_visual_column.
4474
992118a1
PP
44752015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4476
4477 * c-indentation.h (struct token_indent_info): Define.
4478 (get_token_indent_info): Define.
4479 (warn_for_misleading_information): Declare.
4480 * c-common.h (warn_for_misleading_information): Remove.
4481 * c-identation.c (warn_for_misleading_indentation):
4482 Change declaration to take three token_indent_infos. Adjust
4483 accordingly.
4484 * c-identation.c (should_warn_for_misleading_indentation):
4485 Likewise. Bail out early if the body is a compound statement.
4486 (guard_tinfo_to_string): Define.
4487
e8fa3817
JM
44882015-07-30 Jason Merrill <jason@redhat.com>
4489
4490 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4491 '*' for reference decay.
4492
173864e8
MP
44932015-07-30 Marek Polacek <polacek@redhat.com>
4494
4495 * c-common.c (warn_tautological_cmp): Bail for float types.
4496
f2afe6dd
MP
44972015-07-27 Marek Polacek <polacek@redhat.com>
4498
4499 PR bootstrap/67030
4500 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4501
05b28fd6
MP
45022015-07-27 Marek Polacek <polacek@redhat.com>
4503
4504 PR c++/66555
4505 PR c/54979
4506 * c-common.c (find_array_ref_with_const_idx_r): New function.
4507 (warn_tautological_cmp): New function.
4508 * c-common.h (warn_tautological_cmp): Declare.
4509 * c.opt (Wtautological-compare): New option.
4510
5a5062b8
MP
45112015-07-23 Marek Polacek <polacek@redhat.com>
4512
4513 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4514 (ubsan_instrument_shift): Likewise.
4515
dc891fe7
MP
45162015-07-23 Marek Polacek <polacek@redhat.com>
4517
4518 PR sanitizer/66908
4519 * c-ubsan.c: Include gimplify.h.
4520 (ubsan_instrument_division): Unshare OP0 and OP1.
4521 (ubsan_instrument_shift): Likewise.
4522
451b5e48
MP
45232015-07-20 Marek Polacek <polacek@redhat.com>
4524 Richard Sandiford <richard.sandiford@arm.com>
4525
4526 PR c++/55095
4527 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4528 Use EXPR_LOC_OR_LOC.
4529 (maybe_warn_shift_overflow): New function.
4530 * c-common.h (maybe_warn_shift_overflow): Declare.
4531 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4532 * c.opt (Wshift-overflow): New option.
4533
fb0b2914
ML
45342015-07-16 Martin Liska <mliska@suse.cz>
4535
4536 * c-format.c (static void check_format_info_main): Use
4537 object_allocator instead of pool_allocator.
4538 (check_format_arg): Likewise.
4539 (check_format_info_main): Likewise.
4540
903f5c23
AM
45412015-07-15 Andrew MacLeod <amacleod@redhat.com>
4542
4543 * c-opts.c: Remove multiline #include comment.
4544
026c3cfd
AH
45452015-07-12 Aldy Hernandez <aldyh@redhat.com>
4546
4547 * c-common.c: Fix double word typos.
4548
bb49ee66
EB
45492015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4550
4551 * c-ada-spec.h (cpp_operation): Revert latest change.
4552 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4553 constructors and destructors.
4554
1916bcb5
AM
45552015-07-09 Andrew MacLeod <amacleod@redhat.com>
4556
4557 * c-common.h: Adjust includes for flags.h changes.
4558 * stub-objc.c: Likewise.
026c3cfd 4559
a9dcd529
EB
45602015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4561
4562 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4563 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4564
b03b462f
JJ
45652015-07-08 Jakub Jelinek <jakub@redhat.com>
4566
4567 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4568 are to be removed, return NULL rather than original clauses list.
4569
c7131fb2
AM
45702015-07-07 Andrew MacLeod <amacleod@redhat.com>
4571
4572 * array-notation-common.c: Adjust includes.
4573 * c-ada-spec.c: Likewise.
4574 * c-cilkplus.c: Likewise.
4575 * c-common.h: Likewise.
4576 * c-cppbuiltin.c: Likewise.
4577 * c-dump.c: Likewise.
4578 * c-format.c: Likewise.
4579 * c-gimplify.c: Likewise.
4580 * c-indentation.c: Likewise.
4581 * c-lex.c: Likewise.
4582 * c-omp.c: Likewise.
4583 * c-opts.c: Likewise.
4584 * c-pch.c: Likewise.
4585 * c-ppoutput.c: Likewise.
4586 * c-pragma.c: Likewise.
4587 * c-pretty-print.c: Likewise.
4588 * c-semantics.c: Likewise.
4589 * c-ubsan.c: Likewise.
4590 * cilk.c: Likewise.
4591 * stub-objc.c: Likewise.
4592
2a7fb83f
EB
45932015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4594
4595 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4596 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4597
a03c9bf1
JM
45982015-07-01 Jason Merrill <jason@redhat.com>
4599
36a85135
JM
4600 * c-common.h (D_CXX11): Rename from D_CXX0X.
4601 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4602 * c-common.c: Adjust.
4603
e7fa68d5
JM
4604 * c-opts.c (c_common_post_options): Default to C++14.
4605
a03c9bf1
JM
4606 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4607
fe95b036
ESR
46082015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4609
4610 Implement N4197 - Adding u8 character literals
b3d5bc62 4611 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 4612 CPP_CHAR.
b3d5bc62 4613 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 4614 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 4615 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
4616 and CPP_UTF8CHAR tokens.
4617 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 4618
da2e71c9
MLI
46192015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4620
4621 PR fortran/66605
4622 * c-common.c (do_warn_unused_parameter): Move here.
4623 * c-common.h (do_warn_unused_parameter): Declare.
4624
b155cfd9
MP
46252015-06-29 Marek Polacek <polacek@redhat.com>
4626
4627 PR c/66322
4628 * c-common.c (check_case_bounds): Add bool * parameter. Set
4629 OUTSIDE_RANGE_P.
4630 (c_add_case_label): Add bool * parameter. Pass it down to
4631 check_case_bounds.
4632 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4633 warning here.
4634 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4635 declarations.
4636
31521951
MP
46372015-06-27 Marek Polacek <polacek@redhat.com>
4638
4639 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4640 or VECTOR_INTEGER_TYPE_P throughout.
4641 * c-gimplify.c: Likewise.
4642
22d03525
MP
46432015-06-26 Marek Polacek <polacek@redhat.com>
4644
4645 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4646 * c-common.c (c_fully_fold_internal): Likewise.
4647 (c_alignof_expr): Likewise.
4648 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4649 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 4650 * cilk.c (create_parm_list): Likewise.
22d03525 4651
af05e6e5
MP
46522015-06-26 Marek Polacek <polacek@redhat.com>
4653
4654 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4655
f0889939
AM
46562015-06-25 Andrew MacLeod <amacleod@redhat.com>
4657
4658 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4659 * c-gimplify.c: Likewise.
4660 * c-pragma.c: Likewise.
4661 * c-ubsan.c: Likewise.
4662 * cilk.c: Likewise.
4663
ca752f39
RS
46642015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4665
4666 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4667 ggc_hasher.
4668
16a16ec7
AM
46692015-06-25 Andrew MacLeod <amacleod@redhat.com>
4670
4671 * cilk.c: Move calls.h after tm.h in the include chain.
4672
0ae9bd27
MP
46732015-06-25 Marek Polacek <polacek@redhat.com>
4674
4675 * array-notation-common.c: Use VAR_P throughout.
4676 * c-ada-spec.c: Likewise.
4677 * c-common.c: Likewise.
4678 * c-format.c: Likewise.
4679 * c-gimplify.c: Likewise.
4680 * c-omp.c: Likewise.
4681 * c-pragma.c: Likewise.
4682 * c-pretty-print.c: Likewise.
4683 * cilk.c: Likewise.
4684
62f9079a
MP
46852015-06-25 Marek Polacek <polacek@redhat.com>
4686
4687 * cilk.c (extract_free_variables): Use is_global_var.
4688
0fa16060
RS
46892015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4690
4691 * c-common.c: Don't include target-def.h.
4692
a68ae2e1
MP
46932015-06-23 Marek Polacek <polacek@redhat.com>
4694
4695 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4696 when comparing INTEGER_CSTs.
4697
c6a2f2d9
PMR
46982015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4699
4700 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4701 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4702 (dump_ada_template): Skip partially specialized types.
4703
6b4db501
MM
47042015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4705
4706 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4707 swapping.
4708
abb226c9
AM
47092015-06-17 Andrew MacLeod <amacleod@redhat.com>
4710
4711 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4712 * c-ada-spec.c: Likewise.
4713 * c-cilkplus.c: Likewise.
4714 * c-common.c: Likewise.
4715 * c-common.h: Likewise.
4716 * c-cppbuiltin.c: Likewise.
4717 * c-dump.c: Likewise.
4718 * c-format.c: Likewise.
4719 * c-gimplify.c: Likewise.
4720 * c-indentation.c: Likewise.
4721 * c-lex.c: Likewise.
4722 * c-omp.c: Likewise.
4723 * c-opts.c: Likewise.
4724 * c-pch.c: Likewise.
4725 * c-ppoutput.c: Likewise.
4726 * c-pragma.c: Likewise.
4727 * c-pretty-print.c: Likewise.
4728 * c-semantics.c: Likewise.
4729 * c-ubsan.c: Likewise.
4730 * cilk.c: Likewise.
4731 * stub-objc.c: Likewise.
4732
076fecad
PP
47332015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4734
4735 PR c++/65168
4736 * c-common.c (c_common_truthvalue_conversion): Warn when
4737 converting an address of a reference to a truth value.
4738
13fdf2e2
AM
47392015-06-08 Andrew MacLeod <amacleod@redhat.com>
4740
4741 * array-notation-common.c : Adjust include files.
4742 * c-ada-spec.c : Likewise.
4743 * c-cilkplus.c : Likewise.
4744 * c-common.c : Likewise.
4745 * c-common.h : Likewise.
4746 * c-cppbuiltin.c : Likewise.
4747 * c-dump.c : Likewise.
4748 * c-format.c : Likewise.
4749 * c-gimplify.c : Likewise.
4750 * c-indentation.c : Likewise.
4751 * c-lex.c : Likewise.
4752 * c-omp.c : Likewise.
4753 * c-opts.c : Likewise.
4754 * c-pch.c : Likewise.
4755 * c-ppoutput.c : Likewise.
4756 * c-pragma.c : Likewise.
4757 * c-pretty-print.c : Likewise.
4758 * c-semantics.c : Likewise.
4759 * c-ubsan.c : Likewise.
4760 * cilk.c : Likewise.
4761 * stub-objc.c : Likewise.
4762
a1661b90
MP
47632015-06-08 Marek Polacek <polacek@redhat.com>
4764
4765 PR c/66415
4766 * c-format.c (location_from_offset): Return LOC if LINE is null.
4767
d7438551
AH
47682015-06-05 Aldy Hernandez <aldyh@redhat.com>
4769
4770 * c-common.h (c_parse_final_cleanups): New prototype.
4771 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4772
b3d5bc62
JJ
47732015-06-04 Sriraman Tallam <tmsriram@google.com>
4774
4775 * c-common.c (noplt): New attribute.
4776 (handle_noplt_attribute): New handler.
4777
ecb9f223
AM
47782015-06-04 Andrew MacLeod <amacleod@redhat.com>
4779
4780 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4781 * c-ada-spec.c: Likewise.
4782 * c-cilkplus.c: Likewise.
4783 * c-common.c: Likewise.
4784 * c-common.h: Likewise.
4785 * c-cppbuiltin.c: Likewise.
4786 * c-dump.c: Likewise.
4787 * c-format.c: Likewise.
4788 * c-gimplify.c: Likewise.
4789 * c-indentation.c: Likewise.
4790 * c-lex.c: Likewise.
4791 * c-omp.c: Likewise.
4792 * c-opts.c: Likewise.
4793 * c-pch.c: Likewise.
4794 * c-ppoutput.c: Likewise.
4795 * c-pragma.c: Likewise.
4796 * c-pretty-print.c: Likewise.
4797 * c-semantics.c: Likewise.
4798 * c-ubsan.c: Likewise.
4799 * cilk.c: Likewise.
4800 * stub-objc.c: Likewise.
4801
6ac48155
DM
48022015-06-02 David Malcolm <dmalcolm@redhat.com>
4803
4804 PR c/66220:
4805 * c-indentation.c (should_warn_for_misleading_indentation): Use
4806 expand_location rather than expand_location_to_spelling_point.
4807 Don't warn if the guarding statement is more indented than the
4808 next/body stmts.
4809
773ce42e
DM
48102015-06-02 David Malcolm <dmalcolm@redhat.com>
4811
4812 * c-indentation.c (warn_for_misleading_indentation): Bail out
4813 immediately if -Wmisleading-indentation isn't enabled.
4814
4fef8379
ML
48152015-06-01 Martin Liska <mliska@suse.cz>
4816
4817 * c-format.c (check_format_arg):Use new type-based pool allocator.
4818 (check_format_info_main) Likewise.
4819
1edfb384
EB
48202015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4821
4822 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4823 (has_nontrivial_methods): Likewise.
4824
9677ef52
MP
48252015-05-25 Marek Polacek <polacek@redhat.com>
4826
4827 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4828
fd5c817a
MP
48292015-05-22 Marek Polacek <polacek@redhat.com>
4830
4831 PR c/47043
4832 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4833
a2f45fe6 48342015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
4835
4836 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4837 STACK_GROWS_DOWNWARD.
4838
a2f45fe6 48392015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
4840
4841 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4842 STACK_GROWS_DOWNWARD rather than if it is defined.
4843
0fee2ac2 48442015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 4845
0fee2ac2
MLI
4846 PR c/52952
4847 * c-format.c (location_column_from_byte_offset): New.
4848 (location_from_offset): New.
4849 (struct format_wanted_type): Add offset_loc field.
4850 (check_format_info): Move handling of location for extra arguments
4851 closer to the point of warning.
4852 (check_format_info_main): Pass the result of location_from_offset
4853 to warning_at.
4854 (format_type_warning): Pass the result of location_from_offset
4855 to warning_at.
4856
cf4ef6f7
MP
48572015-05-20 Marek Polacek <polacek@redhat.com>
4858
4859 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4860
3a65ee74
MP
48612015-05-20 Marek Polacek <polacek@redhat.com>
4862
4863 * c-ada-spec.c (dump_sloc): Use DECL_P.
4864
21b634ae
MP
48652015-05-20 Marek Polacek <polacek@redhat.com>
4866
4867 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4868 * c-common.c: Likewise.
4869
0e50b624
DM
48702015-05-19 David Malcolm <dmalcolm@redhat.com>
4871
4872 * c-common.h (fe_file_change): Strengthen param from
4873 const line_map * to const line_map_ordinary *.
4874 (pp_file_change): Likewise.
4875 * c-lex.c (fe_file_change): Likewise.
4876 (cb_define): Use linemap_check_ordinary when invoking
4877 SOURCE_LINE.
4878 (cb_undef): Likewise.
4879 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4880 invoking cb_file_change.
4881 (c_finish_options): Likewise.
4882 (push_command_line_include): Likewise.
4883 (cb_file_change): Strengthen param "new_map" from
4884 const line_map * to const line_map_ordinary *.
4885 * c-ppoutput.c (cb_define): Likewise for local "map".
4886 (pp_file_change): Likewise for param "map" and local "from".
4887
fab27f52
MM
48882015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4889
4890 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4891
2fe1d762
TV
48922015-05-18 Tom de Vries <tom@codesourcery.com>
4893
4894 * c-common.c (build_va_arg_1): New function.
4895 (build_va_arg): Add address operator to va_list operand if necessary.
4896
7a37fa90
MM
48972015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4898
4899 PR c/48956
4900 * c-common.c (int_safely_convertible_to_real_p): Define.
4901 (unsafe_conversion_p): Check conversions involving complex types.
4902 (conversion_warning): Add new warning message for conversions which
4903 discard imaginary component.
4904 * c-common.h: (enum conversion_safety): Add new enumerator for such
4905 conversions.
4906
3aa3c9fc
MP
49072015-05-14 Marek Polacek <polacek@redhat.com>
4908
4909 PR c/66066
4910 PR c/66127
4911 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4912 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4913 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4914 use it. If FOR_INT_CONST, require that all evaluated operands be
4915 INTEGER_CSTs.
4916
c3388e62
DM
49172015-05-12 David Malcolm <dmalcolm@redhat.com>
4918
4919 * c-common.h (warn_for_misleading_indentation): New prototype.
4920 * c-indentation.c: New file.
4921 * c.opt (Wmisleading-indentation): New option.
4922
c7b38fd5
TV
49232015-05-12 Tom de Vries <tom@codesourcery.com>
4924
4925 PR tree-optimization/66010
4926 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4927
381bf11e
JM
49282015-05-09 Jason Merrill <jason@redhat.com>
4929
edff0c06
JM
4930 * c-opts.c (c_common_post_options): Also clear
4931 cpp_opts->cpp_warn_cxx11_compat.
4932
129211bc
JM
4933 * c-common.h (enum cxx_dialect): Add cxx_unset.
4934 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4935 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4936
381bf11e
JM
4937 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4938 (std=gnu++0x): Mark as Undocumented.
4939 (std=gnu++1y): Add deprecated message.
4940
fe191308
JM
49412015-05-08 Jason Merrill <jason@redhat.com>
4942
765189ff
JM
4943 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
4944 * c-opts.c: Adjust.
4945
fe191308
JM
4946 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
4947
755e528f
MP
49482015-05-08 Marek Polacek <polacek@redhat.com>
4949
4950 PR c/64918
4951 * c.opt (Woverride-init-side-effects): New option.
4952
0173bd2a
MP
49532015-05-07 Marek Polacek <polacek@redhat.com>
4954
4955 PR c/65179
4956 * c-common.c (c_fully_fold_internal): Warn when left shifting a
4957 negative value.
4958 * c.opt (Wshift-negative-value): New option.
4959 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
4960 when -Wextra and C99/C++11 mode.
4961
e0f0d3b9
MP
49622015-05-07 Marek Polacek <polacek@redhat.com>
4963 Martin Uecker <uecker@eecs.berkeley.edu>
4964
4965 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
4966 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
4967
8243e2a9
JM
49682015-05-05 Jason Merrill <jason@redhat.com>
4969
4970 * c.opt (Wterminate): New.
4971
577cd070
MP
49722015-04-30 Marek Polacek <polacek@redhat.com>
4973
4974 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
4975 require that the non-constant be of a boolean type.
4976
0373796b
JT
49772015-04-29 Josh Triplett <josh@joshtriplett.org>
4978
e0f0d3b9
MP
4979 * c-common.c (handle_section_attribute): Refactor to reduce
4980 nesting and distinguish between error cases.
0373796b 4981
716c0ba6
MP
49822015-04-29 Marek Polacek <polacek@redhat.com>
4983
4984 PR c/64610
4985 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
4986 with 0/1.
4987
8848828b
JJ
49882015-04-29 Jakub Jelinek <jakub@redhat.com>
4989
4990 * c-common.h (omp_clause_mask): Unconditionally define as a class.
4991 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
4992 HOST_BITS_PER_WIDE_INT.
4993
ecd0e562
TV
49942015-04-28 Tom de Vries <tom@codesourcery.com>
4995
4996 PR tree-optimization/65887
4997 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
4998
2a877204 49992015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5000 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5001
5002 * c-ada-spec.c (in_function): Delete.
5003 (dump_generic_ada_node): Do not change in_function and remove the
5004 redundant code dealing with it.
5005 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5006 (print_ada_methods): Output the static member functions in a nested
5007 package after the regular methods as well as associated renamings.
5008
4853031e
MP
50092015-04-24 Marek Polacek <polacek@redhat.com>
5010
5011 PR c/65830
5012 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5013 and OPT_Wshift_count_overflow.
5014
8c2b7f79
MP
5015 PR c/63357
5016 * c-common.c (warn_logical_operator): Warn if the operands have the
5017 same expressions.
5018
b8787813
MP
50192015-04-24 Marek Polacek <polacek@redhat.com>
5020
5021 PR c/61534
5022 * c-common.c (warn_logical_operator): Bail if either operand comes
5023 from a macro expansion.
5024
8fba1830
BRF
50252015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5026
5027 PR target/55143
5028 * c-common.c (c_default_pointer_mode): Add definition.
5029 * c-common.h (c_default_pointer_mode): Add declaration.
5030
17958621
JJ
50312015-03-11 Jakub Jelinek <jakub@redhat.com>
5032
5033 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5034 on record_builtin_type argument.
5035
7ccb1a11
JJ
50362015-03-10 Jakub Jelinek <jakub@redhat.com>
5037
5038 PR c/65120
5039 * c-common.c (warn_logical_not_parentheses): Don't warn for
5040 !x == 0 or !x != 0.
5041
04fd785e
MP
50422015-03-07 Marek Polacek <polacek@redhat.com>
5043
5044 PR sanitizer/65280
5045 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5046 before trying to figure out whether we have a flexible array member.
5047
a4e26206 50482015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5049 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5050
5051 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5052
0d2489f4
EB
50532015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5054
5055 PR ada/65319
5056 * c-ada-spec.c (print_destructor): Remove obsolete code.
5057
83ed54d7
EB
50582015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5059
5060 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5061 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5062 DECL_TEMPLATE_RESULT emulations.
5063 (dump_ada_template)): Add guard for TYPE_METHODS.
5064
7631f0e2
MP
50652015-02-27 Marek Polacek <polacek@redhat.com>
5066
5067 PR c/65040
5068 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5069
d1783ae5
KT
50702015-02-27 Kai Tietz <ktietz@redhat.com>
5071
5072 PR c/35330
5073 * c-pragma.c (handle_pragma_weak): Do not try to create
5074 weak/alias of declarations not being function, or variable
5075 declarations.
5076
56a9f6bc
TS
50772015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5078
5079 PR libgomp/64625
5080 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5081 Remove macros.
5082 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5083
3d5cb23d
MP
50842015-02-16 Marek Polacek <polacek@redhat.com>
5085
5086 PR c/65066
5087 * c-format.c (check_format_types): Handle null param.
5088
fa008882
MP
50892015-02-13 Marek Polacek <polacek@redhat.com>
5090
5091 PR c/65040
5092 * c-format.c (check_format_types): Don't warn about different
5093 signedness if the original value is in the range of WANTED_TYPE.
5094
785f21af
JM
50952015-02-12 Jason Merrill <jason@redhat.com>
5096
5097 PR c++/64956
5098 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5099 to the current highest version.
5100 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5101
4886ec8e
JJ
51022015-02-04 Jakub Jelinek <jakub@redhat.com>
5103
5104 PR c/64824
5105 PR c/64868
5106 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5107 instead of RDIV_EXPR. Use build_binary_op instead of
5108 build2_loc.
5109
40fecdd6
JM
51102015-01-30 Joseph Myers <joseph@codesourcery.com>
5111
5112 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5113 to pass input_location as first argument.
5114
a0c88d06
TV
51152015-01-23 Tom de Vries <tom@codesourcery.com>
5116
5117 PR libgomp/64672
5118 * c.opt (fopenacc): Mark as LTO option.
5119
1506ae0e
TV
51202015-01-23 Tom de Vries <tom@codesourcery.com>
5121
5122 PR libgomp/64707
5123 * c.opt (fopenmp): Mark as LTO option.
5124
31be63ab
JJ
51252015-01-21 Jakub Jelinek <jakub@redhat.com>
5126
5127 PR c/63307
b1726d6c 5128 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5129 (compare_decls): Fix up formatting.
5130
51312015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5132
5133 PR c/63307
5134 * cilk.c: Include vec.h.
5135 (struct cilk_decls): New structure.
5136 (wrapper_parm_cb): Split this function to...
5137 (fill_decls_vec): ...this...
5138 (create_parm_list): ...and this.
5139 (compare_decls): New function.
5140 (for_local_cb): Remove.
5141 (wrapper_local_cb): Ditto.
5142 (build_wrapper_type): For now first traverse and fill vector of
5143 declarations then sort it and then deal with sorted vector.
5144 (cilk_outline): Ditto.
5145 (declare_one_free_variable): Ditto.
5146
6875457f
JM
51472015-01-21 Jason Merrill <jason@redhat.com>
5148
5149 PR c++/64629
5150 * c-format.c (check_format_arg): Call decl_constant_value.
5151
185c9e56
ML
51522015-01-19 Martin Liska <mliska@suse.cz>
5153
5154 * c-common.c (handle_noicf_attribute): New function.
5155
41dbbb37
TS
51562015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5157 Bernd Schmidt <bernds@codesourcery.com>
5158 James Norris <jnorris@codesourcery.com>
5159 Cesar Philippidis <cesar@codesourcery.com>
5160 Ilmir Usmanov <i.usmanov@samsung.com>
5161 Jakub Jelinek <jakub@redhat.com>
5162
5163 * c.opt (fopenacc): New option.
5164 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5165 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5166 New macros.
5167 * c-common.h (c_finish_oacc_wait): New prototype.
5168 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5169 (c_finish_oacc_wait): New function.
5170 * c-pragma.c (oacc_pragmas): New variable.
5171 (c_pp_lookup_pragma, init_pragma): Handle it.
5172 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5173 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5174 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5175 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5176 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5177 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5178 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5179 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5180 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5181 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5182 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5183 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5184 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5185 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5186 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5187 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5188 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5189 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5190 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5191 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5192 PRAGMA_OACC_CLAUSE_WORKER.
5193
3f8257db 51942015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5195
5196 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5197 for the new option fstack-protector_explicit.
5198 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5199 (handle_stack_protect_attribute): New function.
5200
3f8257db 52012015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5202
5203 * c.opt: New option -Warray-bounds=.
5204
adfac8df
JJ
52052015-01-09 Michael Collison <michael.collison@linaro.org>
5206
5207 * array-notation-common.c: Include hash-set.h, machmode.h,
5208 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5209 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5210 * c-ada-spec.c: Ditto.
5211 * c-cilkplus.c: Ditto.
5212 * c-common.c: Include input.h due to flattening of tree.h.
5213 Define macro GCC_C_COMMON_C.
5214 * c-common.h: Flatten tree.h header files into c-common.h.
5215 Remove include of tree-core.h.
5216 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5217 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5218 fold-const.h, wide-int.h, and inchash.h due to
5219 flattening of tree.h.
5220 * c-dump.c: Ditto.
5221 * c-format.c: Flatten tree.h header files into c-common.h.
5222 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5223 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5224 fold-const.h, wide-int.h, and inchash.h due to
5225 flattening of tree.h.
5226 * c-dump.c: Include hash-set.h, machmode.h,
5227 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5228 fold-const.h, wide-int.h, and inchash.h due to
5229 flattening of tree.h.
5230 * c-format.c: Include hash-set.h, machmode.h,
5231 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5232 fold-const.h, wide-int.h, inchash.h and real.h due to
5233 flattening of tree.h.
5234 * c-gimplify.c: Include hash-set.h, machmode.h,
5235 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5236 fold-const.h, wide-int.h, and inchash.h due to
5237 flattening of tree.h.
5238 * cilk.c: Ditto.
5239 * c-lex.c: Ditto.
5240 * c-omp.c: Ditto.
5241 * c-opts.c: Ditto.
5242 * c-pch.c: Ditto.
5243 * c-ppoutput.c: Ditto.
5244 * c-pragma.c: Ditto.
5245 * c-pretty-print.c: Ditto.
5246 * c-semantics.c: Ditto.
5247 * c-ubsan.c: Ditto.
5248 * stub-objc.c: Ditto.
5249
f5481fc4
JM
52502015-01-08 Jason Merrill <jason@redhat.com>
5251
5252 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5253 do_ubsan_in_current_function.
5254 (ubsan_maybe_instrument_reference_or_call): Likewise.
5255 * c-ubsan.h: Declare it.
5256
de35aa66
MS
52572015-01-08 Mike Stump <mikestump@comcast.net>
5258
5259 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5260
4a9a42ab
MP
52612015-01-07 Marek Polacek <polacek@redhat.com>
5262
5263 PR c/64440
5264 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5265 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5266
2f42e5de
TS
52672015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5268
5269 PR c++/31397
5270 * c.opt (Wsuggest-override): New option.
5271
5624e564
JJ
52722015-01-05 Jakub Jelinek <jakub@redhat.com>
5273
5274 Update copyright years.
5275
5bd012f8
MP
52762015-01-05 Marek Polacek <polacek@redhat.com>
5277
5278 PR c/64423
5279 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5280 parameter. Use it.
5281 * c-common.h (warn_array_subscript_with_type_char): Update
5282 declaration.
5283
a7fa8d18
ESR
52842014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5285
5286 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5287 Control macro with flag_sized_deallocation.
5288
3f8257db 52892014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5290
5291 * c.opt (Wdiscarded-array-qualifiers): New option.
5292
1f8d3e84
JJ
52932014-12-19 Jakub Jelinek <jakub@redhat.com>
5294
5295 PR preprocessor/63831
5296 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5297 and __has_cpp_attribute here.
5298 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5299 c_common_has_attribute.
5300 * c-common.h (c_common_has_attribute): New prototype.
5301 * c-lex.c (init_c_lex): Set cb->has_attribute to
5302 c_common_has_attribute instead of cb_has_attribute.
5303 (get_token_no_padding): New function.
5304 (cb_has_attribute): Renamed to ...
5305 (c_common_has_attribute): ... this. No longer static. Use
5306 get_token_no_padding, require ()s, don't build TREE_LIST
5307 unnecessarily, fix up formatting, adjust diagnostics, call
5308 init_attributes.
5309
20b06add
JM
53102014-12-15 Jason Merrill <jason@redhat.com>
5311
5312 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5313 (-Wsized-deallocation): New.
5314 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5315 to on in C++14 and up.
5316
94a073b2
JM
53172014-12-11 Jason Merrill <jason@redhat.com>
5318
acaa5911
JM
5319 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5320
94a073b2
JM
5321 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5322 we aren't complaining about VLAs.
5323
7fb66c15
MP
53242014-12-06 Marek Polacek <polacek@redhat.com>
5325
5326 PR tree-optimization/64183
5327 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5328 shift-expression if it is integer_type_node. Use types_compatible_p.
5329
b731b390
JJ
53302014-11-29 Jakub Jelinek <jakub@redhat.com>
5331
5332 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5333 last argument from create_tmp_var_raw and create_tmp_var calls.
5334 * cilk.c (gimplify_cilk_spawn): Likewise.
5335 * c-omp.c (c_finish_omp_atomic): Likewise.
5336
6a4da643
MP
53372014-11-28 Marek Polacek <polacek@redhat.com>
5338
5339 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5340 instead of unsigned_type_node.
5341
541e35a6
MP
53422014-11-28 Marek Polacek <polacek@redhat.com>
5343
5344 PR c/63862
5345 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5346 to op1_utype.
5347 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5348 expression to unsigned_type_node.
5349
dcc97066
MW
53502014-11-20 Mark Wielaard <mjw@redhat.com>
5351
5352 PR debug/38757
5353 * c-opts.c (set_std_c89): Set lang_hooks.name.
5354 (set_std_c99): Likewise.
5355 (set_std_c11): Likewise.
5356 (set_std_cxx98): Likewise.
5357 (set_std_cxx11): Likewise.
5358 (set_std_cxx14): Likewise.
5359 (set_std_cxx1z): Likewise.
5360
aa7da51a
JJ
53612014-11-21 Jakub Jelinek <jakub@redhat.com>
5362
5363 PR target/63764
5364 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5365 return type to bool.
009a3480 5366 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5367 (convert_vector_to_pointer_for_subscript): Change return type to
5368 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5369 and copy it into a TARGET_EXPR and use that instead of *vecp
5370 directly.
5371
538dd0b7
DM
53722014-11-19 David Malcolm <dmalcolm@redhat.com>
5373
5374 Merger of git branch "gimple-classes-v2-option-3".
5375 * ChangeLog.gimple-classes: New.
5376 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5377 from being just a vec<gimple> to a vec<gbind *>.
5378
c39a5e99
JJ
53792014-11-18 Jakub Jelinek <jakub@redhat.com>
5380
5381 PR sanitizer/63813
5382 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5383 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5384 get_pointer_alignment for non-pointers. Use ptype, or if it is
5385 reference type, corresponding pointer type, as type of kind
5386 argument.
5387 (ubsan_maybe_instrument_reference,
5388 ubsan_maybe_instrument_member_call): Adjust callers.
5389
8537a4a9
MP
53902014-11-15 Marek Polacek <polacek@redhat.com>
5391
5392 PR middle-end/63884
5393 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5394 for NULL fndecl.
5395 (extract_array_notation_exprs): Return for NULL node.
5396
2079956a
JM
53972014-11-12 Joseph Myers <joseph@codesourcery.com>
5398
5399 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5400 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5401
1304953e
JJ
54022014-11-12 Jakub Jelinek <jakub@redhat.com>
5403
5404 PR c/59708
5405 * c-common.c (check_builtin_function_arguments): Handle
5406 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5407
e5e44252
AK
54082014-11-10 Andi Kleen <ak@linux.intel.com>
5409
5410 PR c/60804
5411 * c-common.h (check_no_cilk): Declare.
5412 * cilk.c (get_error_location): New function.
5413 (check_no_cilk): Dito.
5414
e64b984d
AK
54152014-11-10 Andi Kleen <ak@linux.intel.com>
5416
5417 * cilk.c (recognize_spawn): Use expression location
5418 for error message.
5419
13c21655
PC
54202014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5421
5422 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5423
42fd12b1
ESR
54242014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5425
5426 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5427 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5428 (__cpp_range_based_for, __cpp_initializer_lists,
5429 __cpp_delegating_constructors, __cpp_nsdmi,
5430 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5431 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5432 __has_cpp_attribute.
5433 * c-lex.c (cb_has_attribute): New callback CPP function;
5434 (init_c_lex): Set has_attribute callback.
5435
6f450181
RB
54362014-11-04 Richard Biener <rguenther@suse.de>
5437
5438 * c-common.c (shorten_compare): Do not shorten mixed
5439 DFP and non-DFP compares.
5440
26f0e1d6
ESR
54412014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5442
5443 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5444 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5445 Commentary and rearrangement of tests.
5446 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5447 Commentary and rearrangement of tests.
5448 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5449 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5450
ef4bddc2
RS
54512014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5452
5453 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5454 enum from machine_mode.
5455
c582198b
AM
54562014-10-28 Andrew MacLeod <amacleod@redhat.com>
5457
adfac8df
JJ
5458 * c-common.c: Adjust include files.
5459 * c-gimplify.c: Ditto.
5460 * cilk.c: Ditto.
5461 * c-pragma.c: Ditto.
5462 * c-ubsan.c: Ditto.
c582198b 5463
60393bbc
AM
54642014-10-27 Andrew MacLeod <amacleod@redhat.com>
5465
5466 * c-gimplify.c: Adjust include files.
5467
d723bb7c
MLI
54682014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5469
5470 PR c++/53061
5471 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5472 c_common_initialize_diagnostics.
5473 * c-common.h: Likewise.
5474
90f3520e
MP
54752014-10-24 Marek Polacek <polacek@redhat.com>
5476
5477 PR c/56980
5478 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5479 print "struct"/"union"/"enum" for typedefed names.
5480
59d7607a
MP
54812014-10-23 Marek Polacek <polacek@redhat.com>
5482
5483 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5484 in unsigned type.
5485
d95a2703
JJ
54862014-10-22 Jakub Jelinek <jakub@redhat.com>
5487 Yury Gribov <y.gribov@samsung.com>
5488
5489 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5490 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5491 instead of flag_sanitize_recover as bool flag.
5492
8e6ef852
KY
54932014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5494
5495 * cilk.c: Revert previous change.
5496
948cf550
IZ
54972014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5498
5499 PR c/63307
5500 * cilk.c: Include vec.h.
5501 (struct cilk_decls): New structure.
5502 (wrapper_parm_cb): Split this function to...
5503 (fill_decls_vec): ...this...
5504 (create_parm_list): ...and this.
5505 (compare_decls): New function.
5506 (for_local_cb): Remove.
5507 (wrapper_local_cb): Ditto.
5508 (build_wrapper_type): For now first traverse and fill vector of
5509 declarations then sort it and then deal with sorted vector.
5510 (cilk_outline): Ditto.
5511 (declare_one_free_variable): Ditto.
5512
92574c7c
MP
55132014-10-17 Marek Polacek <polacek@redhat.com>
5514
5515 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5516 * c.opt (Wimplicit-int): Initialize to -1.
5517
83685514
AM
55182014-10-16 Andrew MacLeod <amacleod@redhat.com>
5519
5520 * c-pragma.c: Adjust include files.
5521 * c-semantics.c: Likewise.
5522
5b8300ea
DD
55232014-10-16 DJ Delorie <dj@redhat.com>
5524
5525 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5526 multiples of bytes.
5527
5f83e90b
JM
55282014-10-14 Jason Merrill <jason@redhat.com>
5529
5530 PR c++/63455
5531 * c-common.h (CPP_PREPARSED_EXPR): New.
5532 (N_CP_TTYPES): Adjust.
5533
d73326ca
MP
55342014-10-15 Marek Polacek <polacek@redhat.com>
5535
5536 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5537
78a7c317
DD
55382014-10-14 DJ Delorie <dj@redhat.com>
5539
5540 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5541 types, not just __int128.
5542 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5543 types, not just __int128.
5544 (cpp_atomic_builtins): Round pointer sizes up.
5545 (type_suffix): Use type precision, not specific types.
5546 * c-common.c (c_common_reswords): Remove __int128 special case.
5547 (c_common_type_for_size): Check for all __intN types, not just
5548 __int128.
5549 (c_common_type_for_mode): Likewise.
5550 (c_common_signed_or_unsigned_type): Likewise.
5551 (c_build_bitfield_integer_type): Likewise.
5552 (c_common_nodes_and_builtins): Likewise.
5553 (keyword_begins_type_specifier): Likewise.
5554 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5555 __intN variants.
5556
2a22f99c
TS
55572014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5558
5559 * c-common.c: Use hash_table instead of hashtab.
5560
2a8ef767
ESR
55612014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5562
adfac8df 5563 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5564 C++11 section.
5565
3c9aabbd
MG
55662014-10-03 Marc Glisse <marc.glisse@inria.fr>
5567
5568 PR c++/54427
5569 PR c++/57198
5570 PR c++/58845
5571 * c-common.c (warn_logical_operator): Punt for vectors.
5572
a15f7cb8
ESR
55732014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5574
5575 Implement SD-6: SG10 Feature Test Recommendations
5576 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5577 macros and the __has_header macro.
5578
8d0cf15e
JM
55792014-09-30 Jason Merrill <jason@redhat.com>
5580
dd5d5481
JM
5581 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5582 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5583 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5584
b752325e
JM
5585 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5586 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5587
8d0cf15e
JM
5588 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5589 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5590
083e891e
MP
55912014-09-24 Marek Polacek <polacek@redhat.com>
5592
5593 PR c/61405
5594 PR c/53874
5595 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5596
7861b648
AK
55972014-09-23 Andi Kleen <ak@linux.intel.com>
5598
5599 * c-common.c (handle_no_reorder_attribute): New function.
5600 (c_common_attribute_table): Add no_reorder attribute.
5601
9a79452d
JM
56022014-09-22 Joseph Myers <joseph@codesourcery.com>
5603
5604 * c-cppbuiltin.c (c_cpp_builtins): Define
5605 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5606 modes.
5607
dd69f047
JM
56082014-09-18 Joseph Myers <joseph@codesourcery.com>
5609
5610 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5611 for supported floating-point modes.
5612
737a4826
MLI
56132014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5614
5615 * c.opt (Wpsabi): Use LangEnabledBy.
5616 * c-opts.c (c_common_handle_option): Do not handle here.
5617
8cc4b7a2
JM
56182014-09-12 Joseph Myers <joseph@codesourcery.com>
5619
5620 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5621 macros for floating-point modes.
5622
179b5a55
MG
56232014-09-11 Marc Glisse <marc.glisse@inria.fr>
5624
5625 PR target/58757
5626 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5627 __*_DENORM_MIN__ without denormals.
5628
570a11fe
JJ
56292014-09-10 Jakub Jelinek <jakub@redhat.com>
5630
5631 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5632 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5633 ubsan_create_data callers.
5634 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5635 index is constant or BIT_AND_EXPR with constant mask and is
5636 small enough for the bound.
5637 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5638 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5639
b559c810
MLI
56402014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5641
5642 * c.opt: Add CppReason to various flags.
5643 (Wdate-time): Re-sort.
5644 * c-common.c: Include c-common.h earlier.
5645 (struct reason_option_codes_t): Delete.
5646 (c_option_controlling_cpp_error): Prefix global type and struct
5647 with cpp_.
5648
1ef33fd4
MLI
56492014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5650
5651 * c.opt (Wnormalized): New.
5652 (Wnormalized=): Use Enum and Reject Negative.
5653 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5654
66bb34c0
JM
56552014-09-08 Joseph Myers <joseph@codesourcery.com>
5656
5657 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5658 digits of floating-point modes if -fbuilding-libgcc.
5659
53d68b9f
JM
56602014-09-05 Joseph Myers <joseph@codesourcery.com>
5661
5662 * c-cppbuiltin.c (c_cpp_builtins): Also define
5663 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5664 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5665 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5666 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5667 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5668 __LIBGCC_STACK_GROWS_DOWNWARD__,
5669 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5670 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5671 __LIBGCC_DWARF_FRAME_REGISTERS__,
5672 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5673 __LIBGCC_STACK_POINTER_REGNUM__ and
5674 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5675 (builtin_define_with_value): Handle backslash-escaping in string
5676 macro values.
5677
f65586dc
RB
56782014-09-05 Richard Biener <rguenther@suse.de>
5679
5680 PR middle-end/63148
5681 * c-format.c (check_format_arg): Properly handle
5682 effectively signed POINTER_PLUS_EXPR offset.
5683
2b71f4a4
MLI
56842014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5685
5686 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5687 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5688 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5689 and Init.
5690 * c-opts.c (c_common_handle_option): Do not handle here.
5691 (sanitize_cpp_opts): Likewise.
5692 * c-common.c (struct reason_option_codes_t): Handle
5693 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5694
d2e4feca
MP
56952014-09-03 Marek Polacek <polacek@redhat.com>
5696
5697 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5698
9a771876
JJ
56992014-09-02 Jakub Jelinek <jakub@redhat.com>
5700 Balaji V. Iyer <balaji.v.iyer@intel.com>
5701 Igor Zamyatin <igor.zamyatin@intel.com>
5702
5703 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5704 * c-common.c (c_common_reswords): Added _Cilk_for.
5705 * c-common.h (enum rid): Added RID_CILK_FOR.
5706 (cilk_for_number_of_iterations): Add declaration.
5707 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5708 CILK_FOR.
5709 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5710 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5711
81b5d104
MLI
57122014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5713
5714 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5715 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5716 Wundef): Use CPP, Var and Init.
5717 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5718
b753b37b
MLI
57192014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5720
5721 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5722 * c-opts.c (c_common_handle_option): Do not handle here.
5723
028aee17
JM
57242014-08-25 Jason Merrill <jason@redhat.com>
5725
5726 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5727 -std=c++14 and -std=gnu++14, rather than the reverse.
5728 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5729 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5730 * c-common.h (cxx_dialect): Remove cxx1y.
5731
e4276ba5
ESR
57322014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5733
5734 * c-common.h (enum cxx_dialect): Add cxx14.
5735 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5736 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5737 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5738
a545cacd
JM
57392014-08-22 Jason Merrill <jason@redhat.com>
5740
5741 * c.opt (std=gnu++17): Fix alias.
5742
59ea0364
MP
57432014-08-22 Marek Polacek <polacek@redhat.com>
5744
5745 PR c++/62199
5746 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5747 check for vector types. Drop LHS argument.
5748 * c-common.h (warn_logical_not_parentheses): Adjust.
5749
596e808c
MLI
57502014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5751
5752 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5753 (Wmultichar): Likewise.
5754 (Wdate-time): Use C-family languages instead of Common. Use CPP
5755 and Var.
5756 * c-opts.c (c_common_handle_option): Do not handle the above
5757 options here.
5758 (sanitize_cpp_opts): Likewise.
5759
18767f65
MLI
57602014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5761
5762 PR fortran/44054
5763 * c-opts.c: Include tree-diagnostics.h.
5764 (c_diagnostic_finalizer): New.
5765 (c_common_initialize_diagnostics): Use it.
5766
b4413594
MLI
57672014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5768
5769 PR preprocessor/51303
5770 * c-common.c (struct reason_option_codes_t option_codes):
5771 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5772
43f9a13c
MLI
57732014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5774
5775 PR c/60975
5776 PR c/53063
5777 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5778 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5779 (c_common_post_options): Call init_global_opts_from_cpp.
5780 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5781
04159acf
MP
57822014-08-19 Marek Polacek <polacek@redhat.com>
5783
5784 PR c++/62153
5785 * c-common.c (maybe_warn_bool_compare): New function.
5786 * c-common.h (maybe_warn_bool_compare): Declare.
5787 * c.opt (Wbool-compare): New option.
5788
35aff4fb
MP
57892014-08-19 Marek Polacek <polacek@redhat.com>
5790
5791 * c.opt (Wc99-c11-compat): New option.
5792
177cce46
MP
57932014-08-19 Marek Polacek <polacek@redhat.com>
5794
5795 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5796 to warn_c90_c99_compat.
5797 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5798 to -1.
5799
6ae9194f
MLI
58002014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5801 Steven Bosscher <steven@gcc.gnu.org>
5802
5803 PR c/52952
5804 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5805 format_check_results.
5806 (check_function_format): Use true and add comment for boolean
5807 argument.
5808 (finish_dollar_format_checking): Use explicit location when warning.
5809 (check_format_info): Likewise.
5810 (check_format_arg): Set extra_arg_loc and format_string_loc.
5811 (check_format_info_main): Use explicit location when warning.
5812 (check_format_types): Pass explicit location.
5813 (format_type_warning): Likewise.
5814
8e54f6d3
MLI
58152014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5816
5817 PR fortran/44054
5818 * c-format.c: Handle Fortran flags.
5819
cd4e76fc
IZ
58202014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5821
5822 PR other/61962
5823 * array-notation-common.c (find_rank): Added handling for other
5824 types of references.
5825
f3bede71
MP
58262014-08-10 Marek Polacek <polacek@redhat.com>
5827
5828 PR c/51849
5829 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5830 * c.opt (Wc90-c99-compat): Add option.
5831
9f25a338
TS
58322014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5833
5834 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5835
62e4eb35
MP
58362014-08-03 Marek Polacek <polacek@redhat.com>
5837
5838 * c-common.c (check_case_value): Add location_t parameter. Use it.
5839 (c_add_case_label): Pass loc to check_case_value.
5840
b787e7a2
TS
58412014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5842
5843 * cilk.c: Use hash_map instead of pointer_map.
5844
6e2830c3
TS
58452014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5846
5847 * c-gimplify.c: Use hash_set instead of pointer_set.
5848
a7ee52fb
IZ
58492014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5850
5851 PR middle-end/61455
5852 * array-notation-common.c (extract_array_notation_exprs): Handling
5853 of DECL_EXPR added.
5854
944fa280
JJ
58552014-08-01 Jakub Jelinek <jakub@redhat.com>
5856
5857 * c-common.h (min_align_of_type): Removed prototype.
5858 * c-common.c (min_align_of_type): Removed.
5859 * c-ubsan.h (ubsan_maybe_instrument_reference,
5860 ubsan_maybe_instrument_member_call): New prototypes.
5861 * c-ubsan.c: Include stor-layout.h and builtins.h.
5862 (ubsan_maybe_instrument_reference_or_call,
5863 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5864 functions.
5865
b4dfdc11
MG
58662014-07-31 Marc Glisse <marc.glisse@inria.fr>
5867
5868 PR c++/60517
5869 * c.opt (-Wreturn-local-addr): Move to common.opt.
5870
a41844e5
JM
58712014-07-30 Jason Merrill <jason@redhat.com>
5872
5873 PR c++/61659
5874 PR c++/61687
5875 Revert:
5876 * c.opt (-fuse-all-virtuals): New.
5877
976d5a22
TT
58782014-07-30 Tom Tromey <tromey@redhat.com>
5879
5880 PR c/59855
5881 * c.opt (Wdesignated-init): New option.
5882 * c-common.c (c_common_attribute_table): Add "designated_init".
5883 (handle_designated_init): New function.
5884
cdc94aca
MP
58852014-07-24 Marek Polacek <polacek@redhat.com>
5886
5887 PR c/57653
5888 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5889
f41373b6
DS
58902014-07-16 Dodji Seketeli <dodji@redhat.com>
5891
5892 PR preprocessor/60723 - missing system-ness marks for macro tokens
5893 * c-ppoutput.c (struct print::prev_was_system_token): New data
5894 member.
5895 (init_pp_output): Initialize it.
5896 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5897 (do_line_change): Return a flag saying if a line marker was
5898 emitted or not.
5899 (scan_translation_unit): Detect if the system-ness of the token we
5900 are about to emit is different from the one of the previously
5901 emitted token. If so, emit a line marker. Avoid emitting useless
5902 adjacent line markers. Avoid emitting line markers for tokens
5903 originating from the expansion of built-in macros.
5904 (scan_translation_unit_directives_only): Adjust.
5905
4d661eaa
MP
59062014-07-15 Marek Polacek <polacek@redhat.com>
5907
5908 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5909 TYPE_MAX_VALUE is NULL.
5910
b108f48f
JJ
59112014-07-14 Jakub Jelinek <jakub@redhat.com>
5912
5913 PR middle-end/61294
5914 * c.opt (Wmemset-transposed-args): New warning.
5915
c0221884
JM
59162014-07-10 Jason Merrill <jason@redhat.com>
5917
5918 PR c++/61659
5919 PR c++/61687
5920 * c.opt (-fuse-all-virtuals): New.
5921
63dfbb95
RB
59222014-07-09 Richard Biener <rguenther@suse.de>
5923
5924 PR c-family/61741
5925 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5926 using unsigned arithmetic if overflow does not wrap instead of
5927 if overflow is undefined.
5928
773ec47f
MP
59292014-07-06 Marek Polacek <polacek@redhat.com>
5930
5931 PR c/6940
5932 * c.opt (Wsizeof-array-argument): New option.
5933
00a7ba58
JJ
59342014-07-03 Jakub Jelinek <jakub@redhat.com>
5935
b1726d6c 5936 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
5937 comments->count <= 1, as comments->entries might be NULL.
5938
52ec0ea3
MP
59392014-07-01 Marek Polacek <polacek@redhat.com>
5940
5941 * c.opt (Wint-conversion): New option.
5942
d5c3d343
MP
59432014-07-01 Marek Polacek <polacek@redhat.com>
5944
5945 PR c/58286
5946 * c.opt (Wincompatible-pointer-types): New option.
5947
6e7ceb17
PC
59482014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
5949
5950 PR c++/51400
5951 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
5952 Do not discard TYPE_QUALS of type.
5953
da73100b
JM
59542014-06-26 Jason Merrill <jason@redhat.com>
5955
5956 * c-common.h (enum cxx_dialect): Add cxx1z.
5957 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
5958 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
5959
08eedf75
TJ
59602014-06-26 Teresa Johnson <tejohnson@google.com>
5961
5962 * c-common.h (get_dump_info): Declare.
5963 * c-gimplify.c (c_genericize): Use saved dump files.
5964 * c-opts.c (c_common_parse_file): Begin and end dumps
5965 once around parsing invocation.
5966 (get_dump_info): New function.
5967
7b56b2f8
MP
59682014-06-23 Marek Polacek <polacek@redhat.com>
5969 Andrew MacLeod <amacleod@redhat.com>
5970
5971 PR c/61553
5972 * c-common.c (get_atomic_generic_size): Don't segfault if the
5973 type doesn't have a size.
5974
0e37a2f3
MP
59752014-06-20 Marek Polacek <polacek@redhat.com>
5976
5977 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
5978 (ubsan_walk_array_refs_r): New function.
5979 (c_genericize): Instrument array bounds.
5980 * c-ubsan.c: Include "internal-fn.h".
5981 (ubsan_instrument_division): Mark instrumented arrays as having
5982 side effects. Adjust ubsan_type_descriptor call.
5983 (ubsan_instrument_shift): Likewise.
5984 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
5985 (ubsan_instrument_bounds): New function.
5986 (ubsan_array_ref_instrumented_p): New function.
5987 (ubsan_maybe_instrument_array_ref): New function.
5988 * c-ubsan.h (ubsan_instrument_bounds): Declare.
5989 (ubsan_array_ref_instrumented_p): Declare.
5990 (ubsan_maybe_instrument_array_ref): Declare.
5991
59922014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
5993
5994 PR lto/61123
5995 * c.opt (fshort-enums): Add to LTO.
5996 * c.opt (fshort-wchar): Likewise.
5997
5c3d09f7
MP
59982014-06-16 Marek Polacek <polacek@redhat.com>
5999
6000 PR c/60439
6001 * c.opt (Wswitch-bool): Add Var.
6002
9cf32741
JJ
60032014-06-12 Jakub Jelinek <jakub@redhat.com>
6004
6005 PR middle-end/61486
6006 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6007 #pragma omp target teams or
6008 #pragma omp {,target }teams distribute simd.
6009
62984918
JM
60102014-06-12 Jason Merrill <jason@redhat.com>
6011
6012 * c.opt (Wabi=, fabi-compat-version): New.
6013 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6014 (c_common_post_options): Handle flag_abi_compat_version default.
6015 Disallow -fabi-compat-version=1.
6016 * c-common.h (abi_version_crosses): New.
6017
f961457f
JH
60182014-06-11 Jan Hubicka <hubicka@ucw.cz>
6019
adfac8df 6020 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6021 section names that are no longer trees.
6022
92d28cbb
JJ
60232014-06-10 Jakub Jelinek <jakub@redhat.com>
6024
6025 PR fortran/60928
6026 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6027 (omp_pragmas): ... back here.
6028
742938c9
MP
60292014-06-05 Marek Polacek <polacek@redhat.com>
6030
6031 PR c/49706
6032 * c-common.c (warn_logical_not_parentheses): New function.
6033 * c-common.h (warn_logical_not_parentheses): Declare.
6034 * c.opt (Wlogical-not-parentheses): New option.
6035
9d548dfb
MP
60362014-06-04 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/30020
6039 * c-common.c (check_case_bounds): Add location parameter.
6040 Use it.
6041 (c_add_case_label): Pass loc to check_case_bounds.
6042
fedfecef
MP
60432014-06-03 Marek Polacek <polacek@redhat.com>
6044
6045 PR c/60439
6046 * c.opt (Wswitch-bool): New option.
6047
f6a7cffc
TS
60482014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6049
040d18b6
TS
6050 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6051 Remove prototypes.
6052 (record_types_used_by_current_var_decl): Move prototype to where
6053 it belongs.
6054
f6a7cffc
TS
6055 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6056 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6057 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6058
632f2871
RS
60592014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6060
6061 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6062 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6063 void_zero_node.
6064 * c-pretty-print.c (pp_c_void_constant): New function.
6065 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6066 (c_pretty_printer::expression): Handle VOID_CST.
6067 * cilk.c (extract_free_variables): Likewise.
6068 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6069 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6070
766090c2
TS
60712014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6072
6073 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6074 * c-pragma.c (push_alignment): Adjust.
6075 (handle_pragma_push_options): Likewise.
6076
661a0813
MP
60772014-05-09 Marek Polacek <polacek@redhat.com>
6078
6079 PR c/50459
6080 * c-common.c (check_user_alignment): Return -1 if alignment is error
6081 node.
6082 (handle_aligned_attribute): Don't call default_conversion on
6083 FUNCTION_DECLs.
6084 (handle_vector_size_attribute): Likewise.
6085 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6086 (handle_sentinel_attribute): Call default_conversion and allow even
6087 integral types as an argument.
6088
2793eeab
MP
60892014-05-08 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/61053
6092 * c-common.c (min_align_of_type): New function factored out from...
6093 (c_sizeof_or_alignof_type): ...here.
6094 * c-common.h (min_align_of_type): Declare.
6095
f827930a
MP
60962014-05-08 Marek Polacek <polacek@redhat.com>
6097
6098 PR c/61077
6099 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6100 parameter type of main.
6101
ca49b74e
DD
61022014-05-07 DJ Delorie <dj@redhat.com>
6103
6104 * c-cppbuiltin.c (print_bits_of_hex): New.
6105 (builtin_define_type_minmax): Print values using hex so as not to
6106 require a pre-computed list of string values.
6107
1d60af08
KZ
61082014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6109 Mike Stump <mikestump@comcast.net>
6110 Richard Sandiford <rdsandiford@googlemail.com>
6111
6112 * c-ada-spec.c: Include wide-int.h.
6113 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6114 (dump_generic_ada_node): Use wide-int interfaces.
6115 * c-common.c: Include wide-int-print.h.
6116 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6117 (pointer_int_sum): Use wide-int interfaces.
6118 (c_common_nodes_and_builtins): Use make_int_cst.
6119 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6120 (handle_alloc_size_attribute): Use wide-int interfaces.
6121 (get_nonnull_operand): Likewise.
6122 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6123 * c-lex.c: Include wide-int.h.
6124 (narrowest_unsigned_type): Take a widest_int rather than two
6125 HOST_WIDE_INTs.
6126 (narrowest_signed_type): Likewise.
6127 (interpret_integer): Update accordingly. Use wide-int interfaces.
6128 (lex_charconst): Use wide-int interfaces.
6129 * c-pretty-print.c: Include wide-int.h.
6130 (pp_c_integer_constant): Use wide-int interfaces.
6131 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6132 INT_CST_LT_UNSIGNED.
6133
b15458be
RB
61342014-05-06 Richard Biener <rguenther@suse.de>
6135
6136 * c-opts.c (c_common_post_options): For -freestanding,
6137 -fno-hosted and -fno-builtin disable pattern recognition
6138 if not enabled explicitely.
6139
6577374e
MP
61402014-05-02 Marek Polacek <polacek@redhat.com>
6141
6142 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6143
d00887e8
MP
61442014-05-01 Marek Polacek <polacek@redhat.com>
6145
6146 PR c/43245
6147 * c.opt (Wdiscarded-qualifiers): Add.
6148
f8ed5150
MP
61492014-04-30 Marek Polacek <polacek@redhat.com>
6150
6151 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6152 INT_MIN / -1 sanitization only for integer types.
6153
45484dcf
MP
61542014-04-25 Marek Polacek <polacek@redhat.com>
6155
6156 PR c/18079
6157 * c-common.c (handle_noinline_attribute): Warn if the attribute
6158 conflicts with always_inline attribute.
6159 (handle_always_inline_attribute): Warn if the attribute conflicts
6160 with noinline attribute.
6161
38e514c0
MP
61622014-04-25 Marek Polacek <polacek@redhat.com>
6163
6164 PR c/60156
6165 * c-common.c (check_main_parameter_types): Warn about variadic main.
6166
44875f92
MS
61672014-04-24 Mike Stump <mikestump@comcast.net>
6168
6169 * c.opt (Wshadow-ivar): Default to on.
6170
dcaaa5a0
DP
61712014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6172
6173 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6174
c07d7c02
MP
61752014-04-23 Marek Polacek <polacek@redhat.com>
6176
6177 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6178
1c33c9b7
JJ
61792014-04-22 Jakub Jelinek <jakub@redhat.com>
6180
6181 PR sanitizer/60275
6182 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6183 if flag_sanitize_undefined_trap_on_error.
6184 (ubsan_instrument_division, ubsan_instrument_shift,
6185 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6186 if !flag_sanitize_recover.
6187
793c625f
MG
61882014-04-22 Marc Glisse <marc.glisse@inria.fr>
6189
6190 PR libstdc++/43622
6191 * c-common.c (registered_builtin_types): Make non-static.
6192 * c-common.h (registered_builtin_types): Declare.
6193
b0f1bf36
RB
61942014-04-14 Richard Biener <rguenther@suse.de>
6195 Marc Glisse <marc.glisse@inria.fr>
6196
6197 PR c/60819
6198 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6199 apply may-alias the scalar pointer type when applicable.
6200
3b07fa4a
IZ
62012014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6202
6203 PR middle-end/60467
6204 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6205 as possible argument for Cilk_spawn.
6206
cbbd2b1c
TB
62072014-04-11 Tobias Burnus <burnus@net-b.de>
6208
6209 PR c/60194
6210 * c.opt (Wformat-signedness): Add
6211 * c-format.c(check_format_types): Use it.
6212
6415bd5d
JM
62132014-04-11 Jason Merrill <jason@redhat.com>
6214
6215 PR c++/57926
6216 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6217 default_conversion for an array argument.
6218
6525783a
MP
62192014-04-08 Marek Polacek <polacek@redhat.com>
6220
6221 PR sanitizer/60745
6222 * c-ubsan.c: Include asan.h.
6223 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6224
880a467b
NS
62252014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6226
6227 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6228
7b59ff2d
MP
62292014-04-02 Marek Polacek <polacek@redhat.com>
6230
6231 * c-common.h (c_expand_expr): Remove declaration.
6232
8edbfaa6
JJ
62332014-03-28 Jakub Jelinek <jakub@redhat.com>
6234
6235 PR c++/60689
6236 * c-common.c (add_atomic_size_parameter): When creating new
6237 params vector, push the size argument first.
6238
07d72e1d
JJ
62392014-03-26 Jakub Jelinek <jakub@redhat.com>
6240
6241 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6242 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6243 ubsan_create_data callers.
6244
b35e0fa0
JJ
62452014-03-22 Jakub Jelinek <jakub@redhat.com>
6246
6247 PR debug/60603
6248 * c-opts.c (c_finish_options): Restore cb_file_change call to
6249 <built-in>.
6250
39a1ebb3
JJ
62512014-03-13 Jakub Jelinek <jakub@redhat.com>
6252
6253 PR middle-end/36282
6254 * c-pragma.c (apply_pragma_weak): Only look at
6255 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6256 DECL_ASSEMBLER_NAME_SET_P (decl).
6257 (maybe_apply_pending_pragma_weaks): Exit early if
6258 vec_safe_is_empty (pending_weaks) rather than only when
6259 !pending_weaks.
6260 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6261 set assembler name back to NULL afterwards.
6262
a07f6ed2
JM
62632014-03-11 Jason Merrill <jason@redhat.com>
6264
6265 * c.opt: Add -std=gnu++14.
6266
75b107f5
IB
62672014-03-11 Ian Bolton <ian.bolton@arm.com>
6268
6269 * c-opts.c (c_common_post_options): Don't override
6270 -ffp-contract=fast if unsafe-math-optimizations is on.
6271
f42c637e
PM
62722014-03-08 Paulo Matos <paulo@matos-sorge.com>
6273
22b15758 6274 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6275
70e24808
JM
62762014-03-07 Jason Merrill <jason@redhat.com>
6277
6278 * c.opt: Add -std=c++14.
6279
3af9c5e9
MP
62802014-03-06 Marek Polacek <polacek@redhat.com>
6281
6282 PR c/60197
6283 * cilk.c (contains_cilk_spawn_stmt): New function.
6284 (contains_cilk_spawn_stmt_walker): Likewise.
6285 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6286 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6287
b3bdf019
JJ
62882014-03-03 Jakub Jelinek <jakub@redhat.com>
6289
6290 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6291 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6292 even when flag_preprocess_only.
6293
ca7e759d
JM
62942014-02-26 Jason Merrill <jason@redhat.com>
6295
6296 PR c++/59231
6297 PR c++/11586
6298 * c-common.c (shorten_compare): Don't check
6299 c_inhibit_evaluation_warnings.
6300
28e41874
JJ
63012014-02-19 Jakub Jelinek <jakub@redhat.com>
6302
cca615af
JJ
6303 PR c/37743
6304 * c-common.c (c_common_nodes_and_builtins): When initializing
6305 c_uint{16,32,64}_type_node, also set corresponding
6306 uint{16,32,64}_type_node to the same value.
6307
28e41874
JJ
6308 PR c++/60267
6309 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6310 for PRAGMA_IVDEP if flag_preprocess_only.
6311
c2bf53a1
JJ
63122014-02-12 Jakub Jelinek <jakub@redhat.com>
6313
6314 PR c/60101
6315 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6316 if false, add ADD itself, rather than vice versa.
6317 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6318 copy. For SAVE_EXPR, only call merge_tlist once.
6319
8fcbce72
JJ
63202014-02-08 Jakub Jelinek <jakub@redhat.com>
6321
6322 PR middle-end/60092
6323 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6324 and tree_to_uhwi.
6325 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6326 functions.
6327 (c_common_attribute_table): Add alloc_align and assume_aligned
6328 attributes.
6329
0a756a3f
MP
63302014-02-06 Marek Polacek <polacek@redhat.com>
6331
6332 PR c/60087
6333 * c-common.c (warn_for_sign_compare): Call warning_at with location
6334 instead of warning.
6335
7ec4847a
MP
63362014-02-05 Marek Polacek <polacek@redhat.com>
6337
6338 PR c/53123
6339 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6340 statement.
6341
66f20604
MP
63422014-02-04 Marek Polacek <polacek@redhat.com>
6343
6344 PR c/60036
6345 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6346 SAVE_EXPR.
6347
5d77fb19
MG
63482014-02-03 Marc Glisse <marc.glisse@inria.fr>
6349
6350 PR c++/53017
6351 PR c++/59211
6352 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6353 handle_vector_size_attribute, handle_nonnull_attribute): Call
6354 default_conversion on the attribute argument.
6355 (handle_nonnull_attribute): Increment the argument number.
6356
81e5eca8
MP
63572014-01-31 Marek Polacek <polacek@redhat.com>
6358
6359 PR c/59963
6360 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6361 build_function_call_vec.
6362 (resolve_overloaded_builtin): Likewise.
6363 * c-common.h (build_function_call_vec): Adjust declaration.
6364
68fca595
MP
63652014-01-30 Marek Polacek <polacek@redhat.com>
6366
6367 PR c/59940
6368 * c-common.h (unsafe_conversion_p): Adjust declaration.
6369 (warnings_for_convert_and_check): Likewise.
6370 (convert_and_check): Likewise.
6371 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6372 expansion_point_location_if_in_system_header on it.
6373 (warnings_for_convert_and_check): Add location parameter. Call
6374 expansion_point_location_if_in_system_header on it. Use it.
6375 (convert_and_check): Add location parameter. Use it.
6376 (conversion_warning): Likewise.
6377 (c_add_case_label): Adjust convert_and_check calls.
6378 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6379
b72271b9
BI
63802014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6381
6382 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6383 flag_cilkplus.
6384 * c-pragma.c (init_pragma): Likewise.
6385 * c.opt: Likewise.
6386
393e8e8b
MP
63872014-01-23 Marek Polacek <polacek@redhat.com>
6388
6389 PR c/59846
6390 * c-common.c (shorten_compare): Add location_t parameter.
6391 * c-common.h (shorten_binary_op): Adjust declaration.
6392
f04dda30
MP
63932014-01-23 Marek Polacek <polacek@redhat.com>
6394
6395 PR c/58346
6396 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6397 * c-common.h: Declare it.
6398
621955cb
EB
63992014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6400
6401 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6402 * c-ada-spec.c (dump_ads): Likewise.
6403 (cpp_check): Likewise.
6404 (dump_ada_specs): Likewise.
6405
64062014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6407
6408 PR c++/49718
6409 * c-common.c (handle_no_instrument_function_attribute): Allow
6410 no_instrument_function attribute in class member
6411 definition/declaration.
6412
241f845a
JJ
64132014-01-15 Jakub Jelinek <jakub@redhat.com>
6414
6415 PR c/58943
6416 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6417 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6418 being COMPOUND_EXPR.
6419 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6420 operand a SAVE_EXPR and second MODIFY_EXPR.
6421
e83b8e2e
JJ
64222014-01-09 Jakub Jelinek <jakub@redhat.com>
6423
6424 PR target/58115
6425 * c-pch.c (c_common_write_pch): Call
6426 prepare_target_option_nodes_for_pch.
6427
23a5b65a
RS
64282014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6429
6430 Update copyright years
6431
f9030485
RS
64322014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6433
6434 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6435 the copyright notice.
6436
f2aa696b
EB
64372013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6438
6439 * c-ada-spec.c (print_constructor): New function.
6440 (print_destructor): Retrieve the origin of the destructor.
6441 (print_ada_declaration): Revamp handling of constructors/destructors.
6442
3f8257db 64432013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6444 Bill Maddox <maddox@google.com>
6445 Jason Merrill <jason@redhat.com>
6446
6447 * c.opt: Add -fdeclone-ctor-dtor.
6448 * c-opts.c (c_common_post_options): Default to on iff -Os.
6449
41958c28
BI
64502013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6451
6452 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6453 attribute.
6454 * c-pragma.h (enum pragma_cilk_clause): Remove.
6455 (enum pragma_omp_clause): Added the following fields:
6456 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6457 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6458 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6459 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6460 PRAGMA_CILK_CLAUSE_UNIFORM.
6461
b1726d6c 6462
12893402
BI
64632013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6464
6465 * cilk.c (cilk_outline): Made this function non-static.
6466 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6467 (create_cilk_wrapper): Added a new parameter: a function pointer.
6468 (c_install_body_w_frame_cleanup): Remove
6469 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6470 * c-common.h (cilk_outline): New prototype.
6471 (gimplify_cilk_spawn): Removed two parameters.
6472 (cilk_install_body_with_frame_cleanup): New prototype.
6473 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6474 CILK_SPAWN_STMT case.
6475
085b42ed
BS
64762013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6477
2ce064c3
BS
6478 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6479
085b42ed
BS
6480 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6481 (int_array_type_node): Remove.
6482 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6483
9e36c9ed
MP
64842013-12-05 Marek Polacek <polacek@redhat.com>
6485
6486 PR c/52023
6487 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6488 [ADJUST_FIELD_ALIGN].
6489
296674db
JM
64902013-12-04 Joseph Myers <joseph@codesourcery.com>
6491
6492 PR c/52023
6493 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6494 and check field alignment if set.
6495 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6496 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6497
b1726d6c 64982013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6499 Marek Polacek <polacek@redhat.com>
6500
6501 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6502 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6503
d7947e19
L
65042013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6505
6506 PR c/59309
6507 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6508 arguments.
6509
fad7652e
JJ
65102013-11-29 Jakub Jelinek <jakub@redhat.com>
6511
6512 PR c/59280
6513 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6514 goto invalid. If it is error_mark_node, don't issue further
6515 diagnostics.
6516
8b5e1202
SO
65172013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6518
6519 * c.opt (Wopenmp-simd): New.
6520
0a508bb6
JJ
65212013-11-22 Jakub Jelinek <jakub@redhat.com>
6522
6523 * c-ubsan.h (ubsan_instrument_return): New prototype.
6524 * c-ubsan.c (ubsan_instrument_return): New function.
6525
2fb9a547
AM
65262013-11-22 Andrew MacLeod <amacleod@redhat.com>
6527
6528 * c-common.c: Add required include files from gimple.h.
6529 * c-gimplify.c: Likewise
6530 * cilk.c: Likewise
6531
8400e75e
DM
65322013-11-22 David Malcolm <dmalcolm@redhat.com>
6533
6534 * c-common.c (unsafe_conversion_p): Remove use of
6535 EXPR_LOC_OR_HERE macro.
6536 (conversion_warning): Likewise.
6537 (warnings_for_convert_and_check): Likewise.
6538 (warn_for_collisions_1): Likewise.
6539 (shorten_compare): Likewise, and remove use of in_system_header
6540 macro, using the location from the former.
6541 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6542 (cb_def_pragma): Remove use of in_system_header macro.
6543 (lex_string): Likewise.
6544 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6545
eb1ce453
KZ
65462013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6547 Mike Stump <mikestump@comcast.net>
6548 Richard Sandiford <rdsandiford@googlemail.com>
6549
6550 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6551 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6552 tree_fits_shwi_p or tree_fits_uhwi_p.
6553 (dump_generic_ada_node): Likewise.
6554 * c-format.c (check_format_arg): Likewise.
6555 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6556
6b3b8c27
KZ
65572013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6558
6559 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6560
49b0aa18
JC
65612013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6562
6563 PR c/53001
6564 * c-common.c (unsafe_conversion_p): Make this function
6565 return an enumeration with more detail.
6566 (conversion_warning): Use the new return type of
6567 unsafe_conversion_p to separately warn either about conversions
6568 that lower floating point number precision or about the other
6569 kinds of conversions.
6570 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
6571 (unsafe_conversion_p): switching return type to
6572 conversion_safety enumeration.
49b0aa18
JC
6573 * c.opt: Adding new warning -Wfloat-conversion and
6574 enabling it with -Wconversion.
6575
b826515a
BS
65762013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6577
8e745a17
JJ
6578 * c-opts.c: Include plugin.h.
6579 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 6580
b9a55b13
MP
65812013-11-19 Marek Polacek <polacek@redhat.com>
6582
6583 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6584 call.
6585 (ubsan_instrument_shift): Likewise.
6586 (ubsan_instrument_vla): Likewise.
6587
7d362f6c
RS
65882013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6589
6590 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6591 cast to unsigned type.
6592
386b1f1f
RS
65932013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6594
6595 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6596 tree_low_cst.
6597 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6598 rather than tree_low_cst.
6599
ae7e9ddd
RS
66002013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6601
6602 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6603 tree_to_uhwi throughout.
6604
9439e9a1
RS
66052013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6606
6607 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6608 tree_low_cst (..., 0) with tree_to_shwi throughout.
6609
cc269bb6
RS
66102013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6611
6612 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6613 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6614
9541ffee
RS
66152013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6616
6617 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6618 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6619
c02065fc
AH
66202013-11-15 Aldy Hernandez <aldyh@redhat.com>
6621
6622 * c-cilkplus.c: New file.
6623 * c-common.c (readonly_error): Add location argument.
6624 * c-common.h (readonly_error): Same.
6625 (c_finish_cilk_clauses): Protoize.
6626 (c_check_cilk_loop): Same.
6627 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6628 Do not fail on error_mark_node.
6629 Abstract increment canonicalization to here...
6630 (c_omp_for_incr_canonicalize_ptr): New.
6631 c-pragma.c (init_pragma): Register "simd" pragma.
6632 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6633 (enum pragma_cilk_clause): New.
6634
9cc65f15
RS
66352013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6636
6637 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6638 wchar_type and host_integerp checks.
6639
18f429e2
AM
66402013-11-14 Andrew MacLeod <amacleod@redhat.com>
6641
6642 * c-common.c: Likewise.
6643 * c-gimplify.c: Likewise.
6644 * cilk.c: Likewise.
6645
d8a2d370
DN
66462013-11-14 Diego Novillo <dnovillo@google.com>
6647
6648 * c-common.c: Include fold-const.h.
6649 Include stor-layout.h.
6650 Include calls.h.
6651 Include stringpool.h.
6652 Include attribs.h.
6653 Include varasm.h.
6654 Include trans-mem.h.
6655 * c-cppbuiltin.c: Include stor-layout.h.
6656 Include stringpool.h.
6657 * c-format.c: Include stringpool.h.
6658 * c-lex.c: Include stringpool.h.
6659 Include stor-layout.h.
6660 * c-pragma.c: Include stringpool.h.
6661 Include attribs.h.
6662 Include varasm.h.
6663 Include gcc-symtab.h.
6664 * c-pretty-print.c: Include stor-layout.h.
6665 Include attribs.h.
6666 * cilk.c: Include stringpool.h.
6667 Include calls.h.
6668
38b7bc7f
JM
66692013-11-13 Joseph Myers <joseph@codesourcery.com>
6670
6671 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6672 * c-common.c (c_common_reswords): Add __auto_type.
6673 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6674
45b0be94
AM
66752013-11-12 Andrew MacLeod <amacleod@redhat.com>
6676
18f429e2
AM
6677 * c-common.c: Include gimplify.h.
6678 * c-gimplify.c: Likewise.
6679 * cilk.c: Likewise.
6680 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6681 * c-ubsan.c: Don't include gimple.h.
45b0be94 6682
582d9b50
JM
66832013-11-12 Joseph Myers <joseph@codesourcery.com>
6684
6685 * c-common.c (c_common_reswords): Add _Thread_local.
6686
6b28e197
JM
66872013-11-09 Joseph Myers <joseph@codesourcery.com>
6688
6689 * c-common.c (atomic_size_supported_p): New function.
6690 (resolve_overloaded_atomic_exchange)
6691 (resolve_overloaded_atomic_compare_exchange)
6692 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6693 Use it instead of comparing size with a local list of sizes.
6694
267bac10
JM
66952013-11-07 Andrew MacLeod <amacleod@redhat.com>
6696 Joseph Myers <joseph@codesourcery.com>
6697
6698 * c-common.h (enum rid): Add RID_ATOMIC.
6699 * c-common.c (c_common_reswords): Add _Atomic.
6700 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6701 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6702 * c-format.c (check_format_types): Check for extra _Atomic
6703 qualifiers in format argument.
6704 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6705 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6706
5157b91e
TB
67072013-11-06 Tobias Burnus <burnus@net-b.de>
6708
6709 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6710
6dbe0958
JM
67112013-11-06 Joseph Myers <joseph@codesourcery.com>
6712
6713 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6714 standards modes.
6715 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6716 to mean lack of IEEE 754 support.
6717
e8ff5196
TB
67182013-11-05 Tobias Burnus <burnus@net-b.de>
6719
6720 * c.opt (-Wdate-time): New option
6721 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6722
254a0760
JM
67232013-11-05 Joseph Myers <joseph@codesourcery.com>
6724
6725 * c-cppbuiltin.c (cpp_iec_559_value): Test
6726 flag_excess_precision_cmdline not flag_excess_precision.
6727
6d7f7e0a
TB
67282013-11-05 Tobias Burnus <burnus@net-b.de>
6729
6730 * c.opt (fopenmp-simd): New option.
6731 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6732 (omp_pragmas): ... this new struct.
6733 (c_pp_lookup_pragma): Also walk omp_pragmas.
6734 (init_pragma): Init pragmas for -fopenmp-simd.
6735
55a7f02f
MP
67362013-11-04 Marek Polacek <polacek@redhat.com>
6737
6738 PR c++/58979
6739 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6740
9193fb05
JM
67412013-11-04 Joseph Myers <joseph@codesourcery.com>
6742
6743 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6744 New functions.
6745 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6746
94159ecf
EB
67472013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6748
6749 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6750 (dump_ada_specs): Adjust prototype of second callback.
6751 * c-ada-spec.c (cpp_check): New global variable.
6752 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6753 (print_generic_ada_decl): Likewise.
6754 (has_static_fields): Change return type to bool and add guard.
6755 (has_nontrivial_methods): New predicate.
6756 (is_tagged_type): Change return type to bool.
6757 (separate_class_package): Call has_nontrivial_methods.
6758 (pp_ada_tree_identifier): Minor tweaks.
6759 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6760 (dump_ada_array_domains): Likewise.
6761 (dump_ada_array_type): Likewise.
6762 (dump_template_types): Remove cpp_check parameter and do not pass it to
6763 dump_generic_ada_node.
6764 (dump_ada_template): Likewise.
6765 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6766 recursively.
6767 (print_ada_methods): Change return type to integer. Remove cpp_check
6768 parameter and do not pass it down.
6769 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6770 dump_generic_ada_node.
6771 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6772 accessing methods.
6773 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6774 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6775 value of print_ada_methods.
6776 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6777 Set cpp_check to it before invoking dump_ada_nodes.
6778 (dump_ada_specs): Likewise.
6779
b906f4ca
MP
67802013-11-03 Marek Polacek <polacek@redhat.com>
6781
6782 * c-ubsan.c: Don't include hash-table.h.
6783 (ubsan_instrument_vla): New function.
6784 * c-ubsan.h: Declare it.
6785
5e20cdc9
DM
67862013-10-31 David Malcolm <dmalcolm@redhat.com>
6787
6788 Automated part of renaming of symtab_node_base to symtab_node.
6789
6790 Patch autogenerated by rename_symtab.py from
6791 https://github.com/davidmalcolm/gcc-refactoring-scripts
6792 revision 58bb219cc090b2f4516a9297d868c245495ee622
6793
6794 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6795 symtab_node_base to symtab_node.
6796
7057e645
ESR
67972013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6798
8e745a17 6799 Implement C++14 digit separators.
7057e645
ESR
6800 * c-lex.c (interpret_float): Remove digit separators from scratch string
6801 before building real literal.
6802
193ea7bc
JJ
68032013-10-30 Jakub Jelinek <jakub@redhat.com>
6804
6805 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6806
939b37da
BI
68072013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6808
6809 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6810 fields.
6811 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6812 enabled.
6813 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6814 (insert_cilk_frame): New prototype.
6815 (cilk_init_builtins): Likewise.
6816 (gimplify_cilk_spawn): Likewise.
6817 (c_cilk_install_body_w_frame_cleanup): Likewise.
6818 (cilk_detect_spawn_and_unwrap): Likewise.
6819 (cilk_set_spawn_marker): Likewise.
6820 (build_cilk_sync): Likewise.
6821 (build_cilk_spawn): Likewise.
6822 * cilk.c: New file.
6823
67348ccc
DM
68242013-10-29 David Malcolm <dmalcolm@redhat.com>
6825
6826 Patch autogenerated by refactor_symtab.py from
6827 https://github.com/davidmalcolm/gcc-refactoring-scripts
6828 revision 58bb219cc090b2f4516a9297d868c245495ee622
6829
6830 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6831 to a true class hierarchy.
6832 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6833
d570872d
RS
68342013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6835
6836 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6837
98906124
JL
68382013-10-26 Jeff Law <law@redhat.com>
6839
adfac8df
JJ
6840 * c-common.c (c_define_builtins): Remove mudflap support.
6841 * c.opt: Ignore and warn for mudflap options.
98906124 6842
d73749df 68432013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
6844
6845 PR other/33426
6846 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6847 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6848
3f04b1bb
JM
68492013-10-23 Jason Merrill <jason@redhat.com>
6850
6851 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6852
acf0174b
JJ
68532013-10-11 Jakub Jelinek <jakub@redhat.com>
6854
acd15a28
JJ
6855 * c-common.h (omp_clause_mask::operator !=): New method.
6856 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6857 instead of if (mask & something) tests everywhere.
6858
acf0174b
JJ
6859 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6860 201307 instead of 201107.
6861 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6862 (c_common_attribute_table): Add "omp declare target" and
6863 "omp declare simd" attributes.
6864 (handle_omp_declare_target_attribute,
6865 handle_omp_declare_simd_attribute): New functions.
6866 * c-omp.c: Include c-pragma.h.
6867 (c_finish_omp_taskgroup): New function.
6868 (c_finish_omp_atomic): Add swapped argument, if true,
6869 build the operation first with rhs, lhs arguments and use NOP_EXPR
6870 build_modify_expr.
6871 (c_finish_omp_for): Add code argument, pass it down to make_code.
6872 (c_omp_split_clauses): New function.
6873 (c_split_parallel_clauses): Removed.
6874 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6875 c_omp_declare_simd_clauses_to_decls): New functions.
6876 * c-common.h (omp_clause_mask): New type.
6877 (OMP_CLAUSE_MASK_1): Define.
6878 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6879 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6880 omp_clause_mask::operator |, omp_clause_mask::operator &,
6881 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6882 omp_clause_mask::operator ==): New methods.
6883 (enum c_omp_clause_split): New.
6884 (c_finish_omp_taskgroup): New prototype.
6885 (c_finish_omp_atomic): Add swapped argument.
6886 (c_finish_omp_for): Add code argument.
6887 (c_omp_split_clauses): New prototype.
6888 (c_split_parallel_clauses): Removed.
6889 (c_omp_declare_simd_clauses_to_numbers,
6890 c_omp_declare_simd_clauses_to_decls): New prototypes.
6891 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6892 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6893 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6894 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6895 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6896 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6897 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6898 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6899 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6900 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6901 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6902 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6903 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6904 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6905 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6906 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6907 PRAGMA_OMP_CLAUSE_UNIFORM.
6908
826cacfe
MG
69092013-10-09 Marc Glisse <marc.glisse@inria.fr>
6910
6911 PR tree-optimization/20318
6912 * c-common.c (handle_returns_nonnull_attribute): New function.
6913 (c_common_attribute_table): Add returns_nonnull.
6914
2284b034
MG
69152013-10-03 Marc Glisse <marc.glisse@inria.fr>
6916
6917 PR c++/19476
6918 * c.opt (fcheck-new): Move to common.opt.
6919
b56e9788
MP
69202013-09-25 Marek Polacek <polacek@redhat.com>
6921 Jakub Jelinek <jakub@redhat.com>
6922
6923 PR sanitizer/58413
6924 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6925 an expression if we can prove it is correct.
6926 (ubsan_instrument_division): Likewise. Remove unnecessary
6927 check.
6928
ce6923c5
MP
69292013-09-18 Marek Polacek <polacek@redhat.com>
6930
6931 PR sanitizer/58411
6932 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6933 Declare it.
6934 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6935
fb5610fb
IS
69362013-09-14 Iain Sandoe <iain@codesourcery.com>
6937
6938 PR target/48094
6939 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
6940 fobjc-gc, freplace-objc-classes): Accept for LTO.
6941
88b0e79e
JC
69422013-09-13 Jacek Caban <jacek@codeweavers.com>
6943
6944 * c-target.def: New hook
6945
c9b0866a
PC
69462013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
6947
6948 PR c++/43452
6949 * c.opt (Wdelete-incomplete): Add.
6950
0af94e6f
JR
69512013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
6952
6953 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
6954 (vector_types_compatible_elements_p): New function.
6955 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
6956 declaration.
6957 (vector_types_compatible_elements_p): Declare.
6958
7c26172c
GDR
69592013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
6960
6961 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
6962 a virtual member function.
6963 (pp_simple_type_specifier): Remove.
6964 (pp_c_type_specifier): Likewise.
6965 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
6966 Rename from pp_c_type_specifier. Adjust.
6967 (c_pretty_printer::c_pretty_printer): Do not assign to
6968 simple_type_specifier.
6969
20059c8b
GDR
69702013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
6971
6972 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
6973 member function.
6974 (c_pretty_printer::storage_class_specifier): Likewise.
6975 (c_pretty_printer::initializer): Likewise.
6976 (pp_declaration): Remove.
6977 (pp_declaration_specifiers): Likewise.
6978 (pp_abstract_declarator): Likewise.
6979 (pp_declarator): Likewise.
6980 (pp_type_id): Likewise.
6981 (pp_statement): Likewise.
6982 (pp_constant): Likewise.
6983 (pp_id_expression): Likewise.
6984 (pp_primary_expression): Likewise.
6985 (pp_unary_expression): Likewise.
6986 (pp_multiplicative_expression): Likewise.
6987 (pp_conditional_expression): Likewise.
6988 (pp_assignment_expression): Likewise.
6989 (pp_expression): Likewise.
6990 (pp_c_type_id): Likewise.
6991 (pp_c_storage_class_specifier): Likewise.
6992 * c-pretty-print.c (pp_c_type_cast): Tidy.
6993 (pp_c_pointer): Likewise.
6994 (pp_c_type_specifier): Likewise.
6995 (pp_c_parameter_type_list): Likewise.
6996 (pp_c_function_definition): Likewise.
6997 (pp_c_init_declarator): Likewise.
6998 (pp_c_initializer_list): Likewise.
6999 (pp_c_constructor_elts): Likewise.
7000 (c_pretty_printer::direct_abstract_declarator): Likewise.
7001 (c_pretty_printer::declaration_specifiers): Likewise.
7002 (c_pretty_printer::primary_expression): Likewise.
7003 (c_pretty_printer::postfix_expression): Likewise.
7004 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7005 (c_pretty_printer::storage_class_specifier): Rename from
7006 pp_c_storage_class_specifier.
7007 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7008 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7009 storage_class_specifier, initializer, offset_list, flags.
7010
de5a5fa1
MP
70112013-08-30 Marek Polacek <polacek@redhat.com>
7012
7013 * c-ubsan.c: New file.
7014 * c-ubsan.h: New file.
7015
8f0e4d72
GDR
70162013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7017
7018 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7019 member function.
7020 (c_pretty_printer::declaration_specifiers): Likewise.
7021 (c_pretty_printer::declarator): Likewise.
7022 (c_pretty_printer::abstract_declarator): Likewise.
7023 (c_pretty_printer::direct_abstract_declarator): Likewise.
7024 (c_pretty_printer::direct_declarator): Likewise.
7025 (c_pretty_printer::function_specifier): Likewise.
7026 (pp_declaration): Adjust.
7027 (pp_declaration_specifiers): Likewise.
7028 (pp_abstract_declarator): Likewise.
7029 (pp_direct_declarator): Likewise.
7030 (pp_function_specifier): Likewise.
7031 (pp_direct_abstract_declarator): Remove as unused.
7032 (pp_c_declaration): Remove.
7033 (pp_c_declaration_specifiers): Likewise.
7034 (pp_c_declarator): Likewise.
7035 (pp_c_direct_declarator): Likewise.
7036 (pp_c_function_specifier): Likewise.
7037 (pp_c_direct_abstract_declarator): Likewise.
7038 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7039 from pp_c_abstract_declarator. Adjust.
7040 (c_pretty_printer::direct_abstract_declarator): Rename from
7041 pp_c_direct_abstract_declarator. Adjust.
7042 (c_pretty_printer::function_specifier): Rename from
7043 pp_c_function_specifier. Adjust.
7044 (c_pretty_printer::declaration_specifiers): Rename from
7045 pp_c_declaration_specifiers. Adjust.
7046 (c_pretty_printer::direct_declarator): Rename from
7047 pp_c_direct_declarator. Adjust.
7048 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7049 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7050 (c_pretty_printer::c_pretty_printer): Do not assign to
7051 declaration, declaration_specifiers, declarator,
7052 direct_declarator, direct_abstract_declarator, function_specifier.
7053
00d34d3a
GDR
70542013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7055
7056 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7057 virtual member function.
7058 (c_pretty_printer::multiplicative_expression): Likewise.
7059 (c_pretty_printer::conditional_expression): Likewise.
7060 (c_pretty_printer::assignment_expression): Likewise.
7061 (c_pretty_printer::expression): Likewise.
7062 (pp_unary_expression): Adjust.
7063 (pp_multiplicative_expression): Likewise.
7064 (pp_assignment_expression): Likewise.
7065 (pp_conditional_expression): Likewise.
7066 (pp_expression): Likewise.
7067 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7068 from pp_c_unary_expression. Adjust.
7069 (c_pretty_printer::multiplicative_expression): Rename from
7070 pp_c_multiplicative_expression. Adjust.
7071 (c_pretty_printer::conditional_expression): Rename from
7072 pp_c_conditional_expression. Adjust.
7073 (c_pretty_printer::assignment_expression): Rename from
7074 pp_c_assignment_expression. Adjust.
7075 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7076 (c_pretty_printer::c_pretty_printer): Do not assign to
7077 unary_expression, multiplicative_expression,
7078 conditional_expression, expression.
7079
fb22178f
GDR
70802013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7081
7082 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7083 virtual member function.
7084 (pp_postfix_expression): Adjust.
7085 (pp_c_postfix_expression): Remove.
7086 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7087 from pp_c_postfix_expression. Adjust.
7088 (c_pretty_printer::c_pretty_printer): Do not assign to
7089 postfix_expression.
7090
7ecc2600
GDR
70912013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7092
7093 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7094 virtua member function.
7095 (pp_primary_expression): Adjust.
7096 (pp_c_primary_expression): Remove.
7097 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7098 from pp_c_primary_expression. Adjust.
7099 (pp_c_initializer_list): Use pp_primary_expression.
7100 (c_pretty_printer::c_pretty_printer): Do not assign to
7101 primary_expression.
7102
0691175f
GDR
71032013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7104
7105 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7106 * c-pretty-print.c (M_): Remove.
7107 (c_pretty_printer::translate_string): Define.
7108 (pp_c_type_specifier): Use it.
7109 (pp_c_primary_expression): Likewise.
7110 (pp_c_expression): Likewise.
7111
66dfe4c4
GDR
71122013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7113
7114 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7115 virtual function.
7116 (pp_c_id_expression): Remove.
7117 (pp_id_expression): Adjust.
7118 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7119 pp_c_id_expression. Adjust.
7120 (pp_c_postfix_expression): Use pp_id_expression.
7121 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7122
ca43e9d5
GDR
71232013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7124
7125 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7126 member function.
7127 (pp_constant): Adjust.
7128 (pp_c_constant): Remove.
7129 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7130 pp_c_constant. Adjust.
7131 (pp_c_constant)
7132 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7133 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7134
da6ca2b5
GDR
71352013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7136
7137 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7138 (c_pretty_printer::c_pretty_printer): Declare.
7139 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7140 c_pretty_printer_init. Adjust.
7141 (print_c_tree): Do not call c_pretty_printer_init.
7142 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7143
65a372f4
AC
71442013-08-09 Arnaud Charlet <charlet@adacore.com>
7145
7146 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7147
fd9b0f32
PC
71482013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7149
7150 PR c++/58080
7151 * c-common.c (pointer_int_sum): Add bool parameter.
7152 * c-common.h (pointer_int_sum): Adjust declaration.
7153
e0aec1e9
GDR
71542013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7155
7156 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7157 c_pretty_printer variable.
7158
b066401f
GDR
71592013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7160
7161 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7162 (pp_base): Remove.
7163 (pp_c_base): Likewise. Adjust users.
7164 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7165 (pp_c_whitespace): Do not call pp_base.
7166 (pp_c_left_paren): Likewise.
7167 (pp_c_right_paren): Likewise.
7168 (pp_c_left_brace): Likewise.
7169 (pp_c_right_brace): Likewise.
7170 (pp_c_left_bracket): Likewise.
7171 (pp_c_right_bracket): Likewise.
7172 (pp_c_dot): Likewise.
7173 (pp_c_ampersand): Likewise.
7174 (pp_c_star): Likewise.
7175 (pp_c_arrow): Likewise.
7176 (pp_c_semicolon): Likewise.
7177 (pp_c_complement): Likewise.
7178 (pp_c_exclamation): Likewise.
7179 (pp_c_direct_declarator): Likewise.
7180 (pp_c_ws_string): Likewise.
7181 (pp_c_identifier): Likewise.
7182 (pp_c_statement): Likewise.
7183 (print_c_tree): Likewise.
7184
65e5a578
ESR
71852013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7186
7187 PR c++/58072
7188 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7189 provide useful error strings.
7190
137a1a27
GDR
71912013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7192
7193 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7194 printer functions instead of pp_string or operators and punctuators.
7195 (dump_generic_ada_node): Likewise.
7196 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7197 (pp_c_relational_expression): Likewise.
7198 (pp_c_logical_or_expression): Likewise.
7199
07838b13
GDR
72002013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7201
7202 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7203 functions instead of pp_character.
7204 (pp_ada_tree_identifier): Likewise.
7205 (dump_ada_double_name): Likewise.
7206 (dump_ada_function_declaration): Likewise.
7207 (dump_ada_array_domains): Likewise.
7208 (dump_template_types): Likewise.
7209 (dump_generic_ada_node): Likewise.
7210 (print_ada_declaration): Likewise.
7211 (print_ada_struct_decl): Likewise.
7212 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7213
433cc7b0
TT
72142013-07-23 Tom Tromey <tromey@redhat.com>
7215
7216 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7217 * c-common.c (c_common_reswords): Add _Generic.
7218
688010ba
OB
72192013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7220
7221 * c-common.c: Fix typos.
7222 * c-common.h: Likewise.
7223
2a99e5e6
LL
72242013-07-13 Lubos Lunak <l.lunak@suse.cz>
7225
7226 PR c++/55203
7227 * c-common.c (c_common_attribute_table): Add warn_unused.
7228 (handle_warn_unused_attribute): New.
7229
c26302d5
JJ
72302013-07-10 Jakub Jelinek <jakub@redhat.com>
7231
7232 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7233 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7234
dfeadaa0
PC
72352013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7236
7237 PR c++/57869
7238 * c.opt: Add Wconditionally-supported.
7239
6a2fa4b2
GS
72402013-07-08 Graham Stott <graham.stott@btinternet.com>
7241
adfac8df 7242 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7243 unused variables l_length and l_node.
7244
ecdbd01a 72452013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7246
7247 PR c/57821
7248 * c-common.c (complete_array_type): Delay folding first index
7249 like other indices. When folding, check for index overflow.
7250
bedc293e
MG
72512013-06-27 Marc Glisse <marc.glisse@inria.fr>
7252
7253 PR c++/57509
7254 * c-common.h (c_build_vec_perm_expr): New complain argument.
7255 * c-common.c (c_build_vec_perm_expr): Likewise.
7256 Use save_expr also in C++.
7257
604b2bfc
GDR
72582013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7259
7260 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7261 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7262 * c-opts.c (c_common_post_options): Likewise.
7263
dfeadaa0 72642013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7265
7266 * array-notation-common.c (length_mismatch_in_expr): Changed the
7267 parameter type's from a dynamic array to a vec_tree. Also removed
7268 the size parameters.
7269 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7270 the change above.
7271
2ce86d2e
BI
72722013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7273
7274 * c-common.h (struct cilkplus_an_parts): New structure.
7275 (struct cilkplus_an_loop_parts): Likewise.
7276 (cilkplus_extract_an_triplets): New prototype.
7277 (fix_sec_implicit_args): Likewise.
7278 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7279 (fix_sec_implicit_args): Likewise.
604b2bfc 7280
07a6825b
BI
72812013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7282
7283 * array-notation-common.c (find_inv_trees): Removed an unwanted
7284 typecasting.
7285 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7286 enum rid to enum tree_code.
7287
08346abd
JH
72882013-06-11 Jan Hubicka <jh@suse.cz>
7289
7290 * c-common.c (handle_alias_ifunc_attribute): Do not set
7291 DECL_EXTERNAL for weakref variables.
7292 * c-pragma.c (handle_pragma_weak): Make sure aliases
7293 are not declared as external.
7294
d60f1706
BI
72952013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7296
7297 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7298 function from c/c-array-notation.c.
7299 (is_cilkplus_reduce_builtin): Likewise.
7300 (find_rank): Likewise.
7301 (extract_array_notation_exprs): Likewise.
7302 (replace_array_notations): Likewise.
7303 (find_inv_trees): Likewise.
7304 (replace_inv_trees): Likewise.
7305 (contains_array_notation_expr): Likewise.
7306 (find_correct_array_notation_type): Likewise.
7307 * c-common.h (struct inv_list): Moved this struct from the file
7308 c/c-array-notation.c and added a new field called additional tcodes.
7309 (length_mismatch_in_expr_p): New prototype.
7310 (is_cilkplus_reduce_builtin): Likewise.
7311 (find_rank): Likewise.
7312 (extract_array_notation_exprs): Likewise.
7313 (replace_array_notation): Likewise.
7314 (find_inv_trees): Likewise.
7315 (replace_inv_trees): Likewise.
7316 (find_correct_array_notation_type): Likewise.
dfeadaa0 7317
36536d79
BI
73182013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7319
7320 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7321 function array_notation_init_builtins is called.
7322 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7323 * c-common.def (ARRAY_NOTATION_REF): New tree.
7324 * c-common.h (build_array_notation_expr): New function declaration.
7325 (build_array_notation_ref): Likewise.
7326 (extract_sec_implicit_index_arg): New extern declaration.
7327 (is_sec_implicit_index_fn): Likewise.
7328 (ARRAY_NOTATION_CHECK): New define.
7329 (ARRAY_NOTATION_ARRAY): Likewise.
7330 (ARRAY_NOTATION_START): Likewise.
7331 (ARRAY_NOTATION_LENGTH): Likewise.
7332 (ARRAY_NOTATION_STRIDE): Likewise.
7333 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7334 ARRAY_NOTATION_REF.
7335 (pp_c_expression): Likewise.
7336 * c.opt (flag_enable_cilkplus): New flag.
7337 * array-notation-common.c: New file.
7338
f7716d57
JJ
73392013-05-14 Jakub Jelinek <jakub@redhat.com>
7340
7341 PR c++/57274
7342 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7343
a5e0cd1d
MG
73442013-05-10 Marc Glisse <marc.glisse@inria.fr>
7345
7346 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7347 vectors.
7348
f6bc1c4a
HS
73492013-05-07 Han Shen <shenhan@google.com>
7350
7351 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7352
3f12f6e9
SKS
73532013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7354
7355 * c-common.c (check_user_alignment): Emit error for negative values.
7356
61949153
PC
73572013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7358
7359 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7360
e93e18e9
PC
73612013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7362
7363 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7364 __GXX_EXPERIMENTAL_CXX1Y__.
7365
44d90fe1 73662013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7367 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7368
7369 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7370 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7371 to simply use OPT_Wpointer_arith.
7372 (c_sizeof_or_alignof_type): Likewise.
7373
13f39b2e
PC
73742013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7375
7376 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7377
4b84d650
JJ
73782013-04-12 Jakub Jelinek <jakub@redhat.com>
7379
7380 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7381 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7382 specifiers.
7383
fb037b5d
SB
73842013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7385
7386 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7387
4e856798
PC
73882013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7389
7390 * c-common.c (pointer_int_sum): Remove dead code.
7391
4b1baac8
RS
73922013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7393
7394 PR middle-end/56524
7395 * c-common.c (handle_optimize_attribute): Don't call
7396 save_optabs_if_changed.
7397
0b50e654
JJ
73982013-03-05 Jakub Jelinek <jakub@redhat.com>
7399
7400 PR middle-end/56461
7401 * c-pch.c (pch_init): Free target_validity at the end.
7402
48c41403
JJ
74032013-03-04 Jakub Jelinek <jakub@redhat.com>
7404
7405 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7406
e664c61c
KS
74072013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7408 Jakub Jelinek <jakub@redhat.com>
7409
7410 PR sanitizer/56454
7411 * c-common.c (handle_no_sanitize_address_attribute): New function.
7412 (c_common_attribute_table): Add no_sanitize_address attribute.
7413 (handle_no_address_safety_analysis_attribute): Add
7414 no_sanitize_address attribute, not no_address_safety_analysis
7415 attribute.
7416
a475fd3d 74172013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7418
7419 PR target/52555
7420 * c-common.c (handle_optimize_attribute): Call
7421 save_optabs_if_changed.
7422
f6007d99
JJ
74232013-02-18 Jakub Jelinek <jakub@redhat.com>
7424 Steven Bosscher <steven@gcc.gnu.org>
7425
7426 PR pch/54117
7427 * c-opts.c (c_common_post_options): If debug info is enabled
7428 and non-dwarf*, refuse to load PCH files and when writing PCH
7429 file warn.
7430
cf35e2b1
JJ
74312013-02-05 Jakub Jelinek <jakub@redhat.com>
7432
7433 PR middle-end/56167
7434 * c-common.c (handle_error_attribute): Fix condition.
7435
32887460
JJ
74362013-01-30 Jakub Jelinek <jakub@redhat.com>
7437
7438 PR c++/55742
7439 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7440
5af057d8
JM
74412013-01-18 Jason Merrill <jason@redhat.com>
7442
7443 PR target/54908
7444 * c.opt (-fextern-tls-init): New.
7445 * c-opts.c (c_common_post_options): Handle it.
7446
cc83c823
JJ
74472013-01-09 Jakub Jelinek <jakub@redhat.com>
7448
7449 PR c/48418
7450 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7451 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7452 and is either negative or bigger or equal to type precision
7453 of the first operand.
7454
a859517f
MP
74552012-12-03 Marek Polacek <polacek@redhat.com>
7456
7457 PR c/55570
7458 * c-common.c (check_user_alignment): Swap order of tests,
7459 check TREE_CODE first.
7460
2d7aa578
ESR
74612012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7462
7463 PR c++/52654
7464 * c-common.h (overflow_type): New enum.
7465 (build_userdef_literal): Add overflow_type argument.
7466 (tree_userdef_literal): Add overflow_type.
7467 (USERDEF_LITERAL_OVERFLOW): New access macro.
7468 * c-common.c (build_userdef_literal): Add overflow_type
7469 argument.
7470 * c-lex.c (c_lex_with_flags): Add overflow_type to
7471 build_userdef_literal calls.
7472 (interpret_integer, interpret_float): Add overflow_type argument.
7473
cc3c4f62
RB
74742012-11-28 Richard Biener <rguenther@suse.de>
7475
7476 PR c/35634
7477 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7478 here and use a type with proper overflow behavior for types that would
7479 need to be promoted for the arithmetic.
7480
77bc5132
JJ
74812012-11-23 Jakub Jelinek <jakub@redhat.com>
7482
7483 PR sanitizer/55435
7484 * c-common.c (handle_no_address_safety_analysis_attribute): New
7485 function.
7486 (c_common_attribute_table): Add no_address_safety_analysis.
7487
5dc99c46
SB
74882012-11-16 Simon Baldwin <simonb@google.com>
7489
7490 * c.opt: Add f[no-]canonical-system-headers.
7491 * c-opts.c (c_common_handle_option): Handle
7492 OPT_fcanonical_system_headers.
7493
a4a0016d
ESR
74942012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7495
7496 PR c++/54413
7497 * c-opts.c (c_common_handle_option): Set new flags.
7498 * c.opt: Describe new flags.
7499
7dbb85a7
JM
75002012-11-09 Jason Merrill <jason@redhat.com>
7501
7502 * c.opt (Wabi-tag): New.
7503
ad7bac31
AK
75042012-11-09 Andi Kleen <ak@linux.intel.com>
7505
7506 PR 55139
7507 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7508 MEMMODEL_MASK
ad7bac31 7509
7332899a
MLI
75102012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7511
7512 PR c/53063
7513 * c.opt (Wformat): Make it Alias Wformat=1.
7514 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7515 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7516 LangEnabledBy.
7517 (Wformat=): RejectNegative. Use LangEnabledBy.
7518 (Wnonnull): Use LangEnabledBy.
7519 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7520 * c-format.c (set_Wformat): Delete.
7521 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7522 (maybe_read_dollar_number): Likewise.
7523 (avoid_dollar_number): Likewise.
7524 (finish_dollar_format_checking): Likewise.
7525 (check_format_info): Likewise.
7526 (check_format_info_main): Likewise.
7527 (check_format_types): Likewise.
7528 (format_type_warning): Likewise.
7529 * c-common.c (int): Likewise.
7530 (check_function_sentinel): Likewise.
7531 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7532
34a180a6
MLI
75332012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7534
7535 PR c/53063
7536 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7537 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7538 Use LangEnabledBy.
7539 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7540 common.opt.
7541 (Wvariadic-macros): Init(1).
7542 * c-opts.c (c_common_handle_option): Do not handle them
7543 explicitly.
7544 (c_common_post_options): Likewise.
7545 (sanitize_cpp_opts): warn_unused_macros is now
7546 cpp_warn_unused_macros.
7547 (push_command_line_include): Likewise.
7548 * c-common.c (warn_unknown_pragmas): Do not define.
7549 * c-common.h (warn_unknown_pragmas): Do not declare.
7550
3f46d6a5
MLI
75512012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7552
7553 PR c/51294
7554 * c-common.c (conversion_warning): Handle conditional expressions.
7555
880661a4
JW
75562012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7557
7558 PR c++/54930
7559 * c.opt (Wreturn_local_addr): Define new option.
7560
4514a96b
JM
75612012-10-25 Jason Merrill <jason@redhat.com>
7562
f14edc1a
JM
7563 * c.opt (Wvirtual-move-assign): New.
7564
4514a96b
JM
7565 * c.opt (Winherited-variadic-ctor): New.
7566
93100c6b
MG
75672012-10-25 Marc Glisse <marc.glisse@inria.fr>
7568
7569 PR c++/54427
7570 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7571
1efcb8c6
JM
75722012-10-23 Joseph Myers <joseph@codesourcery.com>
7573
7574 * c-common.h (pch_cpp_save_state): Declare.
7575 * c-target.def (c_preinclude): New hook.
7576 * c-opts.c (done_preinclude): New.
7577 (push_command_line_include): Handle default preincluded header.
7578 (cb_file_change): Call pch_cpp_save_state when calling
7579 push_command_line_include.
7580 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7581 (pch_cpp_save_state): New.
7582 (pch_init): Call pch_cpp_save_state conditionally, instead of
7583 calling cpp_save_state.
7584
4a0ae68e
MLI
75852012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7586
7587 PR c/53063
7588 PR c/40989
7589 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7590 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7591 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7592 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7593 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7594 * c-opts.c (c_common_handle_option): Remove explicit handling from
7595 here.
7596 (c_common_post_options): Likewise.
7597
67e4210b
EB
75982012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7599
7600 * c-ada-spec.c (LOCATION_COL): Delete.
7601 (compare_location): New function.
7602 (compare_node): Use it.
7603 (compare_comment): Likewise.
7604
65d4f2cd
MLI
76052012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7606
7607 PR c/53063
7608 PR c/40989
7609 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7610 * c-opts.c (c_common_handle_option): Do not set them here. Add
7611 comment.
7612 (c_common_post_options): Likewise.
7613
909881cb
EB
76142012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7615
7616 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7617 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7618 Remove POINTER_TYPE handling, add large unsigned handling and use
7619 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7620
3a785c97
JJ
76212012-10-12 Jakub Jelinek <jakub@redhat.com>
7622
7623 PR c/54381
7624 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7625 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7626 locs and array of 3 trees instead of just single loc and single
7627 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7628 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7629 For *cmp* builtins that take two sources strings report warnings
7630 about first and second source, not about destination and source.
7631
5e54f81d
MG
76322012-10-12 Marc Glisse <marc.glisse@inria.fr>
7633
7634 PR c++/53055
7635 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7636
f5b02f1e
EB
76372012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7638
7639 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7640 declaring something coming from another file.
7641
b46dbc6c
AC
76422012-10-10 Arnaud Charlet <charlet@adacore.com>
7643
f5b02f1e 7644 PR ada/54845
b46dbc6c
AC
7645 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7646
5d9de0d0
PC
76472012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7648
7649 PR c++/54194
7650 * c-common.c (warn_about_parentheses): Add location_t parameter;
7651 use EXPR_LOC_OR_LOC.
7652 * c-common.h: Update declaration.
7653
a212e43f
MG
76542012-10-09 Marc Glisse <marc.glisse@inria.fr>
7655
7656 PR c++/54427
7657 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7658 more operations. Make error messages optional.
7659 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7660 (scalar_to_vector): Declare.
7661
b1db7f91
JM
76622012-10-08 Jason Merrill <jason@redhat.com>
7663
7664 * c-common.c (c_common_reswords): Add thread_local.
7665
e28d52cf
DS
76662012-10-08 Dodji Seketeli <dodji@redhat.com>
7667
7668 PR c++/53528 C++11 attribute support
7669 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7670 new functions.
7671 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7672 static function.
7673 (handle_aligned_attribute): In choose strictest alignment
7674 among many. Use new check_cxx_fundamental_alignment_constraints.
7675 (handle_transparent_union_attribute): In c++11 attribute syntax,
7676 don't look through typedefs.
7677
3b78de56
AC
76782012-10-04 Arnaud Charlet <charlet@adacore.com>
7679
7680 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7681 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7682 out of dumpfile.h.
7683
6040bb5f
DC
76842012-09-25 Dehao Chen <dehao@google.com>
7685
7686 PR middle-end/54645
3b78de56 7687 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
7688 map when read in the pch.
7689
3f8257db 76902012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
7691
7692 * c-ada-spec.c: Style fixes.
7693
3f8257db 76942012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
7695
7696 * c.opt (-fada-spec-parent): Define new command line switch.
7697 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7698 is specified, generate binding spec as a child of the specified unit.
7699
0ccb505d
PC
77002012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7701 Manuel López-Ibáñez <manu@gcc.gnu.org>
7702
7703 PR c++/53210
7704 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7705
c583af79
AC
77062012-08-23 Arnaud Charlet <charlet@adacore.com>
7707
7708 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7709 for pointers, and add missing Convention C pragma.
7710 (print_ada_struct_decl): Add missing aliased keyword.
7711 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7712
1a4049e7
JJ
77132012-08-17 Jakub Jelinek <jakub@redhat.com>
7714
7715 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7716 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7717 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7718 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7719 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7720
70b5e7dc
RG
77212012-08-10 Richard Guenther <rguenther@suse.de>
7722
7723 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7724
f8923f7e
SB
77252012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7726
7727 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7728 instead of separate pp_newline and pp_flush.
7729 (print_c_tree): Likewise.
7730
e45abe1f
RH
77312012-07-26 Richard Henderson <rth@redhat.com>
7732
7733 * c-common.c (handle_hot_attribute): Allow labels.
7734 (handle_cold_attribute): Likewise.
7735
332f1d24
JJ
77362012-07-20 Jakub Jelinek <jakub@redhat.com>
7737
7738 PR c++/28656
7739 * c-common.c (check_function_nonnull): Handle multiple nonnull
7740 attributes properly.
7741
7ee2468b
SB
77422012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7743
7744 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7745 * c-ada-spec.c: Likewise.
7746 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7747
ee7b28eb
SB
77482012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7749
7750 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7751 Remove code conditional on it.
7752
6bdf3519
SB
77532012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7754
7755 * c-gimplify.c: Do not include basic-block.h.
7756 * c-common.c: Do not include linfuncs.h.
7757
532aafad
SB
77582012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7759
7760 * c-common.h: Include tree.h.
7761
8d0d1915
JM
77622012-07-02 Jason Merrill <jason@redhat.com>
7763
7764 PR c++/53524
7765 * c-common.c (get_priority): Call default_conversion.
7766
fbc873ad
UB
77672012-07-01 Uros Bizjak <ubizjak@gmail.com>
7768
7769 * c-pch.c (c_common_write_pch): Remove unused variables.
7770
d4a10d0a
SB
77712012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7772
7773 * cppspec.c: Moved from gcc/ to here.
7774
6f3a2e23
KT
77752012-06-27 Kai Tietz <ktietz@redhat.com>
7776
7777 PR preprocessor/37215
7778 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7779
8ca92d04
SB
77802012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7781
7782 * c-common.h (c_common_print_pch_checksum): Remove.
7783 * c-pch.c: Do not include output.h.
7784 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7785 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7786 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7787 (struct c_pch_header): Remove.
7788 (get_ident): Update gpch version.
7789 (pch_init): Do not print executable_checksum to asm_out_file.
7790 Do not fail if there is no asm_out_file to read back from. Set
7791 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7792 (c_common_write_pch): Verify that nothing was written to asm_out_file
7793 since pch_init was called. Do not write a c_pch_header, and do not
7794 copy from asm_out_file to the PCH.
7795 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7796 the content of asm_out_file from the PCH.
7797 (c_common_print_pch_checksum): Remove.
7798 * c-opts.c (c_common_init): Print out executable_checksum directly.
7799
70f42967
SB
78002012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7801
7802 * c-target.def (objc_declare_unresolved_class_reference,
7803 objc_declare_class_definition): Add new hooks.
7804
a8781821
SB
78052012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7806
7807 * c-lex.c: Do not include output.h.
7808 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7809 Remove uses of ASM_OUTPUT_IDENT.
7810
9e1a8dd1
RR
78112012-06-15 Marc Glisse <marc.glisse@inria.fr>
7812
7813 PR c++/51033
7814 * c-common.h (c_build_vec_perm_expr): Move decl here.
7815 * c-common.c (c_build_vec_perm_expr): Move definition
7816 here.
7817
6f07a821
SB
78182012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7819
7820 * c.opt (fconserve-space): Turn into a no-op.
7821
9faeb493 78222012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
7823
7824 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7825 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7826 both the start and end of the function.
7827
a4b7d13c
SB
78282012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7829
7830 * c-common.c: Do not include output.h.
7831 * c-pragma.c: Likewise.
7832
c265f413
SA
78332012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7834
7835 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7836 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7837 (lang_decl_name): Handle namespace decls.
7838
be7a421e
SB
78392012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7840
7841 * c-ada-spec.c: Do not include output.h.
7842 * c-semantics.c: Likewise.
7843
65de6659
JM
78442012-05-29 Joseph Myers <joseph@codesourcery.com>
7845
7846 * c-common.c: Fix typo.
7847
ca5f4331
MM
78482012-05-29 Michael Matz <matz@suse.de>
7849
7850 * c-common.h (c_expand_decl): Remove prototype.
7851
4f7f7aca
MLI
78522012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7853
7854 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7855 * c-opts.c (c_common_handle_option): Remove code handling
7856 warn_missing_braces.
7857
4a792f9b
PC
78582012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7859
7860 PR c++/25137
7861 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7862 -Wmissing_braces.
7863
650dc14a
DS
78642012-05-22 Dodji Seketeli <dodji@redhat.com>
7865
7866 PR c++/53322
7867 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7868
9b095bf1
MLI
78692012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7870
7871 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7872 * c-opts.c (c_common_handle_option): Do not handle explicitly
7873 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7874
0b2c4be5
DS
78752012-05-16 Dodji Seketeli <dodji@redhat.com>
7876
7877 PR preprocessor/7263
7878 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7879 to cpp_classify_number. For diagnostics, use the precise location
7880 instead of the global input_location.
7881
a1bde5af
PC
78822012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7883
d02924ef 7884 PR c++/11856
a1bde5af
PC
7885 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7886
d1ede5f4
BS
78872012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7888
a1bde5af 7889 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 7890
f2bc201f
MLI
78912012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7892
7893 PR 53063
7894 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7895 Wreorder): Use LangEnabledBy.
7896 * c-opts.c (c_common_handle_option): Do not enable them
7897 explicitly. Call lang-specific generated functions.
7898 (c_common_post_options): Do not set them here.
7899
95744782
MLI
79002012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7901
7902 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7903 Wmissing-field-initializers,Wmissing-parameter-type,
7904 Wold-style-declaration,Woverride-init): Use EnabledBy.
7905 * c-opts.c (c_common_post_options): Do not set here explicitly.
7906
7d5a5747
MLI
79072012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7908
7909 PR 53063
7910 * c-opts.c (c_common_handle_option): Use handle_generated_option
7911 to enable sub-options.
7912
5a3c9cf2
PC
79132012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7914
7915 PR c++/53158
7916 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7917
3ac8781c
RG
79182012-05-10 Richard Guenther <rguenther@suse.de>
7919
7920 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7921 adjust commentary about TYPE_IS_SIZETYPE types.
7922
1e537948
MLI
79232012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7924
7925 PR c++/53261
7926 * c-common.c (warn_logical_operator): Check that argument of
7927 integer_zerop is not NULL.
7928
f2c4a785
MLI
79292012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7930
7931 PR c/43772
7932 * c-common.c (warn_logical_operator): Do not warn if either side
7933 is already true or false.
7934
50f305ca
MLI
79352012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7936
7937 PR c/51712
7938 * c-common.c (expr_original_type): New.
7939 (shorten_compare): Do not warn for enumeration types.
7940
0c3641b0
MLI
79412012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
7942
7943 * c.opt (fpermissive): Add Var(flag_permissive).
7944
7edaa4d2
MG
79452012-04-30 Marc Glisse <marc.glisse@inria.fr>
7946
7947 PR c++/51033
7948 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
7949 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
7950
b9c8da34
DS
79512012-04-30 Dodji Seketeli <dodji@redhat.com>
7952
7953 Add -Wvarargs option
7954 * c.opt (Wvarargs): Define new option.
7955
e6c69da0
MLI
79562012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7957
7958 * c-common.c (check_function_arguments): Replace
7959 Wmissing-format-attribute with Wsuggest-attribute=format.
7960
90137d8f
MLI
79612012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
7962
7963 * c.opt (Wsuggest-attribute=format): New. Alias of
7964 Wmissing-format-attribute.
7965 * c-format.c (decode_format_type): Replace
7966 Wmissing-format-attribute with Wsuggest-attribute=format.
7967 (check_function_format): Likewise.
7968
9faeb493 79692012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
7970
7971 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
7972 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
7973 * c.opt: Add Wliteral-suffix.
7974
c1771a20
MLI
79752012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
7976
7977 PR c/44774
7978 * c.opt (Wpedantic): New.
7979 (pedantic): Alias Wpedantic.
7980 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
7981 (c_common_post_options): Likewise.
7982 (sanitize_cpp_opts): Likewise.
7983 * c-lex.c (interpret_float): Likewise.
7984 * c-format.c (check_format_types): Likewise.
7985 * c-common.c (pointer_int_sum): Likewise.
7986 (c_sizeof_or_alignof_type): Likewise.
7987 (c_add_case_label): Likewise.
7988 (c_do_switch_warnings): Likewise.
7989 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7990
04b391c1
JM
79912012-04-15 Jason Merrill <jason@redhat.com>
7992
7993 PR c++/52818
7994 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
7995 (C_STD_NAME): Distinguish between C++98 and C++11.
7996
ac868f29
EB
79972012-04-11 Eric Botcazou <ebotcazou@adacore.com>
7998
7999 PR target/52624
8000 * c-common.h (uint16_type_node): Rename into...
8001 (c_uint16_type_node): ...this.
8002 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8003 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8004
fd4116f4
MLI
80052012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8006
8007 * c-common.c (warn_if_unused_value): Move definition to here.
8008 * c-common.h (warn_if_unused_value): Move declaration to here.
8009
573ac65e
WB
80102012-03-23 William Bader <williambader@hotmail.com>
8011
8012 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8013
552b8185
JM
80142012-03-20 Jason Merrill <jason@redhat.com>
8015
8016 * c-common.h (enum cxx_dialect): Add cxx1y.
8017 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8018 test.
8019 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8020 * c-opts.c (c_common_post_options): Likewise.
8021 (set_std_cxx1y): New.
8022 (c_common_handle_option): Call it.
8023 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8024
04398fa8
PC
80252012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8026
8027 PR c++/14710
8028 * c.opt ([Wuseless-cast]): Add.
8029
d2a12ae7
RG
80302012-03-16 Richard Guenther <rguenther@suse.de>
8031
8032 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8033
a12bf402
MLI
80342012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8035
8036 PR c++/44783
8037 * c.opt (ftemplate-backtrace-limit) Add.
8038
5c30094f
RO
80392012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8040
8041 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8042 handling.
8043 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8044 (init_pragma): Don't register extern_prefix.
8045
21fa2faf
RG
80462012-03-12 Richard Guenther <rguenther@suse.de>
8047
8048 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8049 (builtin_type_for_size): Likewise.
8050
e3793c6f
JJ
80512012-02-13 Jakub Jelinek <jakub@redhat.com>
8052
8053 PR c++/52215
8054 * c-common.c (sync_resolve_params): Don't decide whether to convert
8055 or not based on TYPE_SIZE comparison, convert whenever arg_type
8056 is unsigned INTEGER_TYPE.
8057
93286335
PC
80582012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8059
8060 PR c/52118
8061 * c.opt ([Wunused-local-typedefs]): Fix description.
8062
7a421706
MS
80632012-01-24 Mike Stump <mikestump@comcast.net>
8064
8065 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8066 exactly.
8067
ba9b1f11
RG
80682012-01-18 Richard Guenther <rguenther@suse.de>
8069
8070 * c-opts.c (c_common_post_options): Reset LTO flags if
8071 we are about to generate a PCH.
8072
465406be
PC
80732012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8074
8075 PR c++/51777
8076 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8077 use pp_unsigned_wide_integer.
8078
aee15221
RG
80792012-01-10 Richard Guenther <rguenther@suse.de>
8080
8081 PR middle-end/51806
8082 * c-opts.c (c_common_handle_option): Move -Werror handling
8083 to language independent code.
8084
5720c0dc
RG
80852012-01-05 Richard Guenther <rguenther@suse.de>
8086
8087 PR middle-end/51764
8088 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8089 from common.opt.
8090
73ac190a
PC
80912011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8092
8093 PR c++/51316
8094 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8095 of array types with an unknown bound.
8096
48b0b196
JM
80972011-12-20 Joseph Myers <joseph@codesourcery.com>
8098
8099 * c-common.c (flag_isoc99): Update comment to refer to C11.
8100 (flag_isoc1x): Change to flag_isoc11.
8101 * c-common.h (flag_isoc99): Update comment to refer to C11.
8102 (flag_isoc1x): Change to flag_isoc11.
8103 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8104 C11.
8105 * c-opts.c (set_std_c1x): Change to set_std_c11.
8106 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8107 Call set_std_c11.
8108 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8109 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8110 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8111 standard.
8112 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8113 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8114 (std=gnu1x): Make alias of std=gnu11.
8115
d58d6eb5
JM
81162011-12-19 Jason Merrill <jason@redhat.com>
8117
8118 PR c++/51228
8119 * c-common.c (handle_transparent_union_attribute): Check the first
8120 field if the type is complete.
8121
b3908fcc
JW
81222011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8123
8124 PR libstdc++/51365
8125 * c-common.c (RID_IS_FINAL): Add.
8126 * c-common.h (RID_IS_FINAL): Add.
8127
fea3ca91
IS
81282011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8129
8130 * c.opt (fgnu-runtime): Provide full description.
8131 (fnext-runtime): Likewise.
8132 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8133
62bad7cd
AM
81342011-11-28 Andrew MacLeod <amacleod@redhat.com>
8135
8136 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8137 predefines in one place. Add LOCK_FREE predefines.
8138 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8139 new func.
8140
c466c4ff
AM
81412011-11-24 Andrew MacLeod <amacleod@redhat.com>
8142
8143 PR c/51256
9faeb493 8144 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8145 conditions
9faeb493
UB
8146 (resolve_overloaded_atomic_exchange,
8147 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8148 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8149 error_mark_node for error conditions.
9faeb493 8150
a5952633
RG
81512011-11-08 Richard Guenther <rguenther@suse.de>
8152
8153 PR middle-end/51010
8154 c-family/
8155
0a35513e
AH
81562011-11-07 Richard Henderson <rth@redhat.com>
8157 Aldy Hernandez <aldyh@redhat.com>
8158 Torvald Riegel <triegel@redhat.com>
8159
8160 Merged from transactional-memory.
8161
8162 * c-common.c (handle_tm_wrap_attribute,
8163 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8164 (struct c_common_reswords): Added __transaction* keywords.
8165 (struct c_common_attribute_table): Added transaction* and tm_regparm
8166 attributes.
8167 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8168 masks.
8169 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8170 find_tm_attribute): Declare.
8171
6d87092d
JM
81722011-11-07 Jason Merrill <jason@redhat.com>
8173
8174 PR c++/35688
8175 * c-common.c, c-common.h: Revert yesterday's changes.
8176
8e7860a1
JM
81772011-11-06 Jason Merrill <jason@redhat.com>
8178
8179 PR c++/35688
8180 * c-common.c (decl_has_visibility_attr): Split out from...
8181 (c_determine_visibility): ...here.
8182 * c-common.h: Declare it.
8183
d19fa6b5
JM
81842011-11-06 Joseph Myers <joseph@codesourcery.com>
8185
8186 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8187 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8188 type.
8189 (check_user_alignment): New. Split out of
8190 handle_aligned_attribute. Disallow integer constants with
8191 noninteger types. Conditionally allow zero.
8192 (handle_aligned_attribute): Use check_user_alignment.
8193 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8194
86951993
AM
81952011-11-06 Andrew MacLeod <amacleod@redhat.com>
8196 Richard Henderson <rth@redhat.com>
8197
8198 Merged from cxx-mem-model.
8199
8200 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8201 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8202 parameters that are the same type size.
8203 (get_atomic_generic_size): New. Find size of generic
8204 atomic function parameters and do typechecking.
8205 (add_atomic_size_parameter): New. Insert size into parameter list.
8206 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8207 either __atomic_exchange_n or external library call.
9faeb493 8208 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8209 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8210 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8211 __atomic_load_n or an external library call.
8212 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8213 __atomic_store_n or an external library call.
8214 (resolve_overloaded_builtin): Handle new __atomic builtins.
8215
cf9e9959
EB
82162011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8217
8218 PR c++/50608
8219 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8220 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8221 <INDIRECT_REF>: Return the argument.
8222 <ARRAY_REF>: Remove special code for negative offset.
8223 Call fold_build_pointer_plus instead of size_binop.
8224 (fold_offsetof): Remove STOP_REF argument and adjust.
8225 * c-common.h (fold_offsetof_1): Declare.
8226 (fold_offsetof): Remove STOP_REF argument.
8227
25339f10
JM
82282011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8229
8230 PR c++/50810
8231 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8232 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8233 Wnarrowing for C++0x and C++98.
8234 * c.opt ([Wnarrowing]): Update.
8235
89401152
PC
82362011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8237
8238 PR c++/44277
8239 * c.opt: Add Wzero-as-null-pointer-constant.
8240
97e3ad20
JM
82412011-10-31 Jason Merrill <jason@redhat.com>
8242
15694fdd
JM
8243 * c.opt (-fdeduce-init-list): Off by default.
8244
97e3ad20
JM
8245 PR c++/50920
8246 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8247 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8248 and -Wc++11-compat.
8249 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8250
fb9120e3
RAV
82512011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8252
8253 PR c++/30066
8254 * c.opt (fvisibility-inlines-hidden): Description change.
8255
3ce4f9e4
ESR
82562011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8257
8258 Implement C++11 user-defined literals.
8259 * c-common.c (build_userdef_literal): New.
8260 * c-common.def: New tree code.
8261 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8262 * c-lex.c (interpret_float): Add suffix parm.
8263 (c_lex_with_flags): Build literal tokens.
8264
5f53c243
PC
82652011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8266
8267 PR c++/50841
8268 Revert:
8269 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8270
8271 PR c++/50810
8272 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8273 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8274 Wnarrowing for C++0x and C++98.
8275 * c.opt ([Wnarrowing]): Update.
8276
263734e1
PC
82772011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8278
8279 PR c++/50810
8280 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8281 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8282 Wnarrowing for C++0x and C++98.
8283 * c.opt ([Wnarrowing]): Update.
8284
d2e312d7
PC
82852011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8286
8287 PR c++/45385
8288 * c-common.c (conversion_warning): Remove code looking for
8289 artificial operands.
8290
d17687f6
DS
82912011-10-18 Dodji Seketeli <dodji@redhat.com>
8292
8293 PR bootstrap/50760
8294 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8295 !NO_IMPLICIT_EXTERN_C.
d17687f6 8296
fc8396e9
PC
82972011-10-17 Michael Spertus <mike_spertus@symantec.com>
8298
8299 * c-common.c (c_common_reswords): Add __bases,
8300 __direct_bases.
8301 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8302
83032011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8304
8305 PR c++/50757
8306 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8307
847e697a
TT
83082011-10-15 Tom Tromey <tromey@redhat.com>
8309 Dodji Seketeli <dodji@redhat.com>
8310
8311 * c.opt (fdebug-cpp): New option.
8312 * c-opts.c (c_common_handle_option): Handle the option.
8313 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8314 output stream in parameter. Factorized from ...
8315 (maybe_print_line): ... this. Dump location debug information when
8316 -fdebug-cpp is in effect.
8317 (print_line_1): New static function. Takes an output stream in
8318 parameter. Factorized from ...
8319 (print_line): ... here. Dump location information when -fdebug-cpp
8320 is in effect.
8321 (scan_translation_unit): Dump location information when
8322 -fdebug-cpp is in effect.
8323
92582b75
TT
83242011-10-15 Tom Tromey <tromey@redhat.com>
8325 Dodji Seketeli <dodji@redhat.com>
8326
8327 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8328 without argument.
8329 * c-opts.c (c_common_handle_option)<case
8330 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8331 cases. Handle -ftrack-macro-expansion with and without argument.
8332
46427374
TT
83332011-10-15 Tom Tromey <tromey@redhat.com>
8334 Dodji Seketeli <dodji@redhat.com>
8335
8336 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8337 (print_line, cb_define, do_line_change): Adjust to avoid touching
8338 the internals of struct line_map. Use the public API instead.
8339 * c-pch.c (c_common_read_pch): Likewise.
8340 * c-lex.c (fe_file_change): Likewise.
8341
fc8396e9
PC
83422011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8343
8344 PR c++/17212
8345 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8346
83472011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8348
8349 PR c++/33067
8350 * c-pretty-print.c (pp_c_floating_constant): Output
8351 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8352
e79983f4
MM
83532011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8354
8355 * c-common.c (def_builtin_1): Delete old interface with two
8356 parallel arrays to hold standard builtin declarations, and replace
8357 it with a function based interface that can support creating
8358 builtins on the fly in the future. Change all uses, and poison
8359 the old names. Make sure 0 is not a legitimate builtin index.
8360 * c-omp.c (c_finish_omp_barrier): Ditto.
8361 (c_finish_omp_taskwait): Ditto.
8362 (c_finish_omp_flush): Ditto.
8363
6637388f
TG
83642011-10-11 Tristan Gingold <gingold@adacore.com>
8365
8366 * c.opt: (fallow-parameterless-variadic-functions): New.
8367
3797cb21
DS
83682011-09-08 Dodji Seketeli <dodji@redhat.com>
8369
8370 PR c++/33255 - Support -Wunused-local-typedefs warning
8371 * c-common.h (struct c_language_function::local_typedefs): New
8372 field.
9faeb493
UB
8373 (record_locally_defined_typedef, maybe_record_typedef_use)
8374 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8375 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8376 (maybe_record_typedef_use)
8377 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8378 * c.opt: Declare new -Wunused-local-typedefs flag.
8379
693ddb1b
EB
83802011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8381
8382 PR middle-end/50266
8383 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8384 computations.
8385
830c740f
RG
83862011-09-05 Richard Guenther <rguenther@suse.de>
8387
8388 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8389 of integer_minus_one_node for empty array upper bounds.
8390
892a371f
DS
83912011-08-28 Dodji Seketeli <dodji@redhat.com>
8392
8393 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8394 it's the first time it's being called on this main TU.
8395
0e3fdb48
RB
83962011-08-24 Richard Guenther <rguenther@suse.de>
8397
8398 PR c/49396
8399 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8400
84012011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8402
8403 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8404 defined in cpp_init_builtins and c_cpp_builtins.
8405
d4a83c10
JM
84062011-08-19 Joseph Myers <joseph@codesourcery.com>
8407
8408 * c-common.c (c_common_reswords): Add __builtin_complex.
8409 * c-common.h (RID_BUILTIN_COMPLEX): New.
8410
bbceee64
JM
84112011-08-18 Joseph Myers <joseph@codesourcery.com>
8412
8413 * c-common.c (c_common_reswords): Add _Noreturn.
8414 (keyword_is_function_specifier): Handle RID_NORETURN.
8415 * c-common.h (RID_NORETURN): New.
8416
3f8257db 84172011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8418
8419 * c-common.c (unsafe_conversion_p): New function. Check if it is
8420 unsafe to convert an expression to the type.
8421 (conversion_warning): Adjust, use unsafe_conversion_p.
8422 * c-common.h (unsafe_conversion_p): New function declaration.
8423
20906c66
JJ
84242011-08-02 Jakub Jelinek <jakub@redhat.com>
8425
8426 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8427 (c_finish_omp_taskyield): New prototype.
8428 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8429 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8430 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8431 or RHS1 have side-effects, evaluate those too in the right spot,
8432 if it is a decl and LHS is also a decl, error out if they
8433 aren't the same.
8434 (c_finish_omp_taskyield): New function.
8435 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8436 * c-pragma.c (omp_pragmas): Add taskyield.
8437 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8438 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8439 PRAGMA_OMP_CLAUSE_MERGEABLE.
8440
770e5a2e
DS
84412011-07-25 Dodji Seketeli <dodji@redhat.com>
8442
8443 * c-common.h (set_underlying_type): Remove parm name from
8444 declaration.
8445
1baae426
RG
84462011-07-25 Romain Geissler <romain.geissler@gmail.com>
8447
8448 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8449
fcb21722
JM
84502011-07-22 Jason Merrill <jason@redhat.com>
8451
76f86d00
JM
8452 PR c++/49793
8453 * c.opt (Wnarrowing): New.
8454
3a636414
JM
8455 PR c++/30112
8456 * c-common.h: Declare c_linkage_bindings.
8457 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8458
fcb21722
JM
8459 PR c++/49813
8460 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8461 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8462 as flag_isoc99 for 'restrict'.
8463 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8464
02614448
ILT
84652011-07-21 Ian Lance Taylor <iant@google.com>
8466
8467 PR middle-end/49705
8468 * c-common.c (c_disable_warnings): New static function.
8469 (c_enable_warnings): New static function.
8470 (c_fully_fold_internal): Change local unused_p to bool. Call
8471 c_disable_warnings and c_enable_warnings rather than change
8472 c_inhibit_evaluation_warnings.
8473
34429675
JM
84742011-07-20 Jason Merrill <jason@redhat.com>
8475
8476 PR c++/6709 (DR 743)
8477 PR c++/42603 (DR 950)
8478 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8479 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8480 (CPP_DECLTYPE): New.
8481 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8482
5d49b6a7
RG
84832011-07-19 Richard Guenther <rguenther@suse.de>
8484
8485 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8486 * c-omp.c (c_finish_omp_for): Likewise.
8487
e84a58ff
EB
84882011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8489
8490 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8491 body on the next line.
8492
329af3c7
JM
84932011-07-08 Jason Merrill <jason@redhat.com>
8494
4063e61b
JM
8495 PR c++/45437
8496 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8497
329af3c7
JM
8498 PR c++/49673
8499 * c-common.c (c_apply_type_quals_to_decl): Don't check
8500 TYPE_NEEDS_CONSTRUCTING.
8501
1a072294
RG
85022011-07-06 Richard Guenther <rguenther@suse.de>
8503
8504 * c-common.c (c_common_nodes_and_builtins):
8505 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8506
fce5dddd
RG
85072011-07-05 Richard Guenther <rguenther@suse.de>
8508
8509 * c-common.c (c_common_nodes_and_builtins): Build all common
8510 tree nodes first.
8511
45d439ac
JJ
85122011-06-27 Jakub Jelinek <jakub@redhat.com>
8513
56300785
JJ
8514 * c-common.h (c_tree_chain_next): New static inline function.
8515
45d439ac
JJ
8516 * c-common.c (check_builtin_function_arguments): Handle
8517 BUILT_IN_ASSUME_ALIGNED.
8518
e0a8ecf2
AM
85192011-06-21 Andrew MacLeod <amacleod@redhat.com>
8520
8521 * c-common.c: Add sync_ or SYNC__ to builtin names.
8522 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8523
85242011-06-20 Pierre Vittet <piervit@pvittet.com>
8525
8526 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8527 handler.
8528 (gen_pragma_handler): New union.
8529 (internal_pragma_handler): New type.
8530 (c_register_pragma_with_data)
8531 (c_register_pragma_with_expansion_and_data): New functions.
8532
8533 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8534 (c_register_pragma, c_register_pragma_with_expansion)
8535 (c_invoke_pragma_handler): Changed to work with
8536 internal_pragma_handler.
8537 (c_register_pragma_with_data)
8538 (c_register_pragma_with_expansion_and_data): New functions.
8539
677f3fa8
JM
85402011-06-14 Joseph Myers <joseph@codesourcery.com>
8541
8542 * c-common.c: Include common/common-target.h.
8543 (handle_section_attribute): Use
8544 targetm_common.have_named_sections.
8545 * c-cppbuiltin.c: Include common/common-target.h.
8546 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8547
d7fc8c14
RG
85482011-06-10 Richard Guenther <rguenther@suse.de>
8549
8550 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8551 to print a IDENTIFIER_NODE.
8552
10e48e39
RO
85532011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8554 Joseph Myers <joseph@codesourcery.com>
8555
8556 * c.opt (fbuilding-libgcc): New option.
8557 * c-cppbuiltin.c (c_cpp_builtins): Define
8558 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8559
6976ae51
JM
85602011-06-07 Jason Merrill <jason@redhat.com>
8561
3ff60975
JM
8562 * c-common.c (max_tinst_depth): Lower default to 900.
8563
6976ae51
JM
8564 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8565
009db074
RG
85662011-06-07 Richard Guenther <rguenther@suse.de>
8567
8568 * c-common.c (c_common_nodes_and_builtins): Do not set
8569 size_type_node or call set_sizetype.
8570
b4592b92
DS
85712011-06-07 Dodji Seketeli <dodji@redhat.com>
8572
8573 PR debug/49130
8574 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 8575 type when using pointer comparison to compare types.
b4592b92 8576
014ab419
JW
85772011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8578
8579 * c.opt: Add -Wdelete-non-virtual-dtor.
8580 * c-opts.c (c_common_handle_option): Include it in -Wall.
8581
4f60111f
NF
85822011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8583
8584 PR bootstrap/49190
8585
8586 Revert:
8587 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8588
8589 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8590 not tree_common.
8591
4cc4f2f4
JJ
85922011-05-27 Jakub Jelinek <jakub@redhat.com>
8593
8594 PR c++/49165
8595 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8596 C++ don't call c_common_truthvalue_conversion on void type arms.
8597
38e01f9e
NF
85982011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8599
8600 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8601 (stmt_list_stack): Define.
8602 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8603 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8604
92e948a8
NF
86052011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8606
8607 * c-common.c (warning_candidate_p): Check for BLOCKs.
8608
a2fc3e63
NF
86092011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8610
8611 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8612 not tree_common.
8613
0957c029
JJ
86142011-05-25 Jakub Jelinek <jakub@redhat.com>
8615
8616 * c-common.c (def_fn_type): Remove extra va_end.
8617
828fb3ba
JM
86182011-05-23 Jason Merrill <jason@redhat.com>
8619
8620 PR c++/48106
8621 * c-common.c (c_common_get_narrower): New.
8622 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8623
dde05067
NF
86242011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8625
8626 * c-common.h (check_function_arguments): Tweak prototype of
8627 check_function_arguments.
8628 * c-common.c (check_function_arguments): Likewise. Adjust
8629 calls to check_function_nonnull, check_function_format, and
8630 check_function_sentinel.
8631 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8632 separate attributes and typelist arguments. Use
8633 FOREACH_FUNCTION_ARGS to iterate over argument types.
8634
3c0d13bf
PC
86352011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8636
8637 * c-common.c (c_common_reswords): Reorder.
8638 * c-common.h (rid): Likewise.
8639
8242dd04
NF
86402011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8641
8642 * c-common.c (def_fn_type): Don't call build_function_type, call
8643 build_function_type_array or build_varargs_function_type_array
8644 instead.
8645 (c_common_nodes_and_builtins): Likewise.
8646
3d528853
NF
86472011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8648
8649 * c-common.c (c_add_case_label): Omit the loc argument to
8650 build_case_label.
8651 * c-common.h (build_case_label): Remove.
8652 * c-semantics.c (build_case_label): Remove.
8653
a04a722b
JM
86542011-05-05 Joseph Myers <joseph@codesourcery.com>
8655
8656 * c-objc.h (objc_start_method_definition): Update prototype.
8657 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8658
e19a18d4
NF
86592011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8660
8661 * c-common.c (check_main_parameter_types): Reindent. Don't use
8662 TYPE_ARG_TYPES directly.
8663 (handle_nonnull_attribute): Likewise.
8664 (sync_resolve_params): Likewise.
8665 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8666 to check_format_string.
8667 (handle_format_attribute): Likewise.
8668 (check_format_string): Take a function type to examine instead of
8669 a type list. Use a function_arg_iterator to step through argument
8670 types.
8671
c62c040f
RG
86722011-05-04 Richard Guenther <rguenther@suse.de>
8673
8674 * c-common.c (fix_string_type): Use size_int for index type bounds.
8675 (start_fname_decls): Do not pass NULL to build_int_cst.
8676 (c_init_attributes): Likewise.
8677 * c-lex.c (c_lex_with_flags): Likewise.
8678
c12ff9d8
JM
86792011-04-27 Jason Merrill <jason@redhat.com>
8680
8681 * c-common.c (make_tree_vector_from_list): New.
8682 * c-common.h: Declare it.
8683
304dfbe3
RG
86842011-04-26 Richard Guenther <rguenther@suse.de>
8685
8686 PR preprocessor/48248
8687 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8688 for output size with -P.
8689
3c0d13bf
PC
86902011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8691
8692 * c-common.c (struct c_common_resword): Add __underlying_type.
8693 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8694
04695783
JM
86952011-04-20 Jim Meyering <meyering@redhat.com>
8696
8697 * c-format.c (init_dollar_format_checking): Remove useless
8698 if-before-free.
8699
0dc33c3c
NP
87002011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8701
8702 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 8703 (objc_detect_field_duplicates): New.
0dc33c3c 8704 * stub-objc.c: Likewise.
3c0d13bf 8705
c59633d9
NP
87062011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8707
8708 * stub-objc.c (objc_declare_protocols): Renamed to
8709 objc_declare_protocol.
8710 * c-objc.h: Likewise.
3c0d13bf 8711
32dabdaf
NP
87122011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8713
8714 * stub-objc.c (objc_declare_class): Updated argument name.
8715
81f653d6
NF
87162011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8717
8718 * c-common.h (c_common_init_ts): Declare.
8719 * c-common.c (c_common_init_ts): Define.
8720
eb345401
NP
87212011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8722
8723 * c-objc.h (objc_build_message_expr): Updated prototype.
8724 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 8725
a358e188
MJ
87262011-04-12 Martin Jambor <mjambor@suse.cz>
8727
8728 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8729 of cgraph_node.
8730
e6313a78
RG
87312011-04-11 Richard Guenther <rguenther@suse.de>
8732
8733 * c-common.c (complete_array_type): Build a range type of
8734 proper type.
8735
dcf0c47e
NF
87362011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8737
8738 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8739 (handle_type_generic_attribute): Likewise.
8740
1ee44b26
JM
87412011-04-07 Jason Merrill <jason@redhat.com>
8742
8743 PR c++/48450
8744 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8745 conversion from C++0x scoped enum.
8746
acce4e77
JM
87472011-04-06 Joseph Myers <joseph@codesourcery.com>
8748
8749 * c-target-def.h: New file.
8750 * c-target.def: New file.
8751 * c-target.h: New file.
8752 * c-common.c (targetcm): Don't define here.
8753 * c-common.h (default_handle_c_option): Declare.
8754 * c-format.c: Include c-target.h instead of target.h.
8755 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8756 include tm.h.
8757 (default_handle_c_option): Move from targhooks.c.
8758
e2eefb55
JJ
87592011-03-29 Jakub Jelinek <jakub@redhat.com>
8760
8761 PR preprocessor/48248
8762 * c-ppoutput.c (print): Add src_file field.
8763 (init_pp_output): Initialize it.
8764 (maybe_print_line): Don't optimize by adding up to 8 newlines
8765 if map->to_file and print.src_file are different file.
8766 (print_line): Update print.src_file.
8767
ba78087b
KT
87682011-03-25 Kai Tietz <ktietz@redhat.com>
8769
8770 * c-ada-spec.c (compare_comment): Use filename_cmp
8771 instead of strcmp for filename.
8772
0edf1bb2
JL
87732011-03-25 Jeff Law <law@redhat.com>
8774
adfac8df 8775 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 8776
c7dc8804
JM
87772011-03-25 Jason Merrill <jason@redhat.com>
8778
8779 * c.opt: Add -std=c++03.
8780
d1d879b1
EB
87812011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8782
8783 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8784
3f8257db 87852011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
8786
8787 PR target/12171
5050afdf
KT
8788 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8789 Display allowed attributes for function pointer types.
8790 (pp_c_attributes_display): New function to display
8791 attributes having affects_type_identity flag set to true.
8792 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8793
62d784f7
KT
8794 * c-common.c (c_common_attribute_table):
8795 Add new element.
8796 (c_common_format_attribute_table): Likewise.
8797
82d37118
JM
87982011-03-18 Jason Merrill <jason@redhat.com>
8799
49a000c3
JM
8800 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8801 * c-common.h: Don't declare it here.
8802 * c-common.c: Or define it here.
8803 * c-opts.c (c_common_handle_option): Or set it here.
8804
82d37118
JM
8805 PR c++/35315
8806 * c-common.c (handle_transparent_union_attribute): Don't
8807 make a duplicate type in C++.
8808
17bc631c
JM
88092011-03-15 Jason Merrill <jason@redhat.com>
8810
8811 * c-common.c (max_constexpr_depth): New.
8812 * c-common.h: Declare it.
8813 * c-opts.c (c_common_handle_option): Set it.
8814 * c.opt (fconstexpr-depth): New option.
8815
1b9b91a6
JM
88162011-03-11 Jason Merrill <jason@redhat.com>
8817
f231b5ff
JM
8818 * c-common.c (attribute_takes_identifier_p): Add missing const.
8819
1b9b91a6
JM
8820 PR c++/46803
8821 * c-common.c (attribute_takes_identifier_p): Assume that an
8822 unknown attribute takes an identifier.
8823
a19e4d44
NF
88242011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8825
8826 PR c/47786
8827 * c-common.c (c_type_hash): Call list_length instead of iterating
8828 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8829
982d62f6
JJ
88302011-02-19 Jakub Jelinek <jakub@redhat.com>
8831
8832 PR c/47809
8833 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8834
0a256240
NP
88352011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8836
8837 * c.opt (fobjc-abi-version=) New.
8838 (fobjc-nilcheck): New.
8839
ba9e6dd5
NF
88402011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8841
8842 PR c++/46890
8843 * c-common.h (keyword_is_decl_specifier): Declare.
8844 * c-common.c (keyword_is_decl_specifier): Define.
8845 (keyword_is_function_specifier): New function.
8846
7273813a
JJ
88472011-01-26 Jakub Jelinek <jakub@redhat.com>
8848
8849 PR c/47473
8850 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8851 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8852 REAL_TYPE.
8853
908ef79b
AC
88542011-01-26 Arnaud Charlet <charlet@adacore.com>
8855
8856 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8857
237e9384
JJ
88582011-01-26 Jakub Jelinek <jakub@redhat.com>
8859
8860 PR pch/47430
8861 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8862 after init_c_lex if pch_file is set.
8863
47ea1edf
DK
88642011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8865
d4dba752 8866 PR c++/43601
47ea1edf
DK
8867 * c.opt (-fkeep-inline-dllexport): New switch.
8868
2aa9c6ae
RG
88692011-01-12 Richard Guenther <rguenther@suse.de>
8870
8871 PR middle-end/32511
8872 * c-common.c (handle_weak_attribute): Warn instead of error
8873 on declaring an inline function weak.
8874
7bd11157
TT
88752011-01-05 Tom Tromey <tromey@redhat.com>
8876
8877 * c-common.h (lvalue_error): Update.
8878 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8879 not error.
8880
0e66e494 88812010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 8882
b4f588c4
NP
8883 PR objc/47075
8884 * c-objc.h (objc_finish_message_expr): Added argument to
8885 prototype.
8886
f4da8dce
NF
88872010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8888
8889 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8890 Use prototype_p.
8891
46270f14
NP
88922010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8893
8894 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 8895 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 8896
4816c593
NF
88972010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8898
8899 * c-common.h (readonly_error): Declare.
8900 * c-common.c (readonly_error): Define.
8901
7a6daeb0
NF
89022010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8903
8904 * c-common.h (invalid_indirection_error): Declare.
8905 * c-common.c (invalid_indirection_error): Define.
8906
892f6119
RG
89072010-12-03 Richard Guenther <rguenther@suse.de>
8908
8909 PR c/46745
8910 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8911 (pp_c_unary_expression): Likewise.
8912 (pp_c_expression): Likewise.
8913
6c39e757
NP
89142010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8915
8916 * c-common.h (objc_finish_function): New.
8917 (objc_non_volatilized_type): Removed.
8918 (objc_type_quals_match): Removed.
8919 * stub-objc.c (objc_finish_function): New.
8920 (objc_non_volatilized_type): Removed.
8921 (objc_type_quals_match): Removed.
9faeb493 8922
7c475d11
JM
89232010-11-30 Joseph Myers <joseph@codesourcery.com>
8924
8925 * c-common.h (parse_optimize_options): Declare.
8926 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8927 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8928
71f3e391
JM
89292010-11-29 Joseph Myers <joseph@codesourcery.com>
8930
8931 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8932 GET_ENVIRONMENT.
8933 * c-pch.c (O_BINARY): Don't define here.
8934 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8935
d5fabb58
JM
89362010-11-25 Joseph Myers <joseph@codesourcery.com>
8937
8938 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8939 targetm.except_unwind_info.
8940
299404a1
JM
89412010-11-23 Joseph Myers <joseph@codesourcery.com>
8942
8943 * c-opts.c (c_common_handle_option): Pass location to
8944 set_struct_debug_option.
8945
c98cd5bf
JM
89462010-11-23 Joseph Myers <joseph@codesourcery.com>
8947
8948 * c-common.c (visibility_options): Move from ../opts.c.
8949 * c-common.h (struct visibility_flags, visibility_options):
8950 Declare here.
8951 * c-opts.c (finish_options): Rename to c_finish_options.
8952 (c_common_init): Update call to finish_options.
8953
a9546771
NP
89542010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
8955
8956 PR objc/34033
8957 * c-lex.c (lex_string): Check that each string in an Objective-C
8958 string concat sequence starts with either one or zero '@', and
8959 that there are no spurious '@' signs at the end.
8960
24a57808
JM
89612010-11-20 Joseph Myers <joseph@codesourcery.com>
8962
8963 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
8964 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
8965 HANDLE_PRAGMA_VISIBILITY.
8966 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
8967 HANDLE_PRAGMA_VISIBILITY): Don't define.
8968 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
8969
a9aa2c3a
NF
89702010-11-20 Nathan Froyd <froydnj@codesourcery.com>
8971
8972 PR c++/16189
8973 PR c++/36888
8974 PR c++/45331
8975 * c-common.h (keyword_begins_type_specifier): Declare.
8976 (keyword_is_storage_class_specifier): Declare.
8977 (keyword_is_type_qualifier): Declare.
8978 * c-common.c (keyword_begins_type_specifier): New function.
8979 (keyword_is_storage_class_specifier): New function.
8980 (keyword_is_type_qualifier): Declare.
8981
5386338c
JM
89822010-11-19 Joseph Myers <joseph@codesourcery.com>
8983
8984 PR c/46547
8985 * c-common.c (in_late_binary_op): Define.
8986 (c_common_truthvalue_conversion): Check in_late_binary_op before
8987 calling c_save_expr.
8988 * c-common.h (in_late_binary_op): Declare.
8989
69ccdddb
JM
89902010-11-19 Joseph Myers <joseph@codesourcery.com>
8991
8992 * c-opts.c (c_common_handle_option): Update calls to
8993 set_struct_debug_option.
8994
6b192a09
NP
89952010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
8996
8997 * c-common.h (objc_declare_protocols): Added additional argument.
8998 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 8999
fb52b50a
NF
90002010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9001
9002 PR c/33193
9003 * c-common.h (build_real_imag_expr): Declare.
9004 * c-semantics.c (build_real_imag_expr): Define.
9005
b37421c6
JM
90062010-11-17 Joseph Myers <joseph@codesourcery.com>
9007
9008 * c-opts.c (c_common_parse_file): Take no arguments.
9009 * c-common.h (c_common_parse_file): Update prototype.
9010
07078664
JJ
90112010-11-16 Jakub Jelinek <jakub@redhat.com>
9012
9013 PR c++/46401
9014 * c-common.c (warning_candidate_p): Don't track non-const calls
9015 or STRING_CSTs.
9016
c6a13190
ILT
90172010-11-15 Ian Lance Taylor <iant@google.com>
9018
9019 * c-lex.c (init_c_lex): Set macro debug callbacks if
9020 flag_dump_go_spec is set.
9021
925e8657
NP
90222010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9023
9024 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9025 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9026
bb0a9581
NF
90272010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9028
9029 PR preprocessor/45038
9030 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9031 dialects.
9032
c5fa0890
JM
90332010-11-12 Joseph Myers <joseph@codesourcery.com>
9034
9035 * c-common.h (c_family_lang_mask): Declare.
9036 * c-opts.c (c_family_lang_mask): Make extern.
9037 * c-pragma.c (handle_pragma_diagnostic): Use
9038 control_warning_option.
9039
a4d8c676
JM
90402010-11-12 Joseph Myers <joseph@codesourcery.com>
9041
9042 * c-common.c (parse_optimize_options): Update call to
9043 decode_options.
9044 * c-common.h (c_common_handle_option): Update prototype.
9045 * c-opts.c (c_common_handle_option): Take location_t parameter and
9046 pass it to other functions.
9047
f954bd2c
JM
90482010-11-11 Joseph Myers <joseph@codesourcery.com>
9049
9050 * c-opts.c (warning_as_error_callback): Remove.
9051 (c_common_initialize_diagnostics): Don't call
9052 register_warning_as_error_callback.
9053 (c_common_handle_option): Handle -Werror=normalized= here.
9054
d8a07487
JM
90552010-11-10 Joseph Myers <joseph@codesourcery.com>
9056
9057 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9058 in diagnostic.
9059 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9060 letter.
9061 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9062 Remove trailing '.' from diagnostics.
9063 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9064
d5478783
JM
90652010-11-10 Joseph Myers <joseph@codesourcery.com>
9066
9067 * c-common.c (parse_optimize_options): Pass global_dc to
9068 decode_options.
9069 * c-opts.c (c_common_handle_option): Pass &global_options to
9070 set_Wstrict_aliasing.
9071 * c.opt (v): Don't mark Common or document here.
9072
91ebb981
IS
90732010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9074
9075 PR target/44981
9076 * c-format.c (format_type): New type gcc_objc_string_format_type.
9077 (valid_stringptr_type_p): New.
9078 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9079 (check_format_string): Pass expected type, use
91ebb981
IS
9080 valid_stringptr_type_p (), check that the format string types are
9081 consistent with the format specification.
9082 (decode_format_attr): Warn if NSString is used outside objective-c.
9083 (format_types_orig): Add NSString.
9084 (format_name): New.
9085 (format_flags): New.
9086 (check_format_arg): Handle format strings requiring an external parser.
9087 first_target_format_type: New variable.
9088 (handle_format_attribute): Set up first_target_format_type, pass the
9089 expected format arg string type to check_format_string().
9090 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9091 * stub-objc.c (objc_string_ref_type_p): New.
9092 (objc_check_format_arg): New.
9093
bede2adc
NP
90942010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9095
9faeb493 9096 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9097 * c-common.h (objc_build_class_component_ref): New.
9098 * stub-objc.c (objc_build_class_component_ref): New.
9099
9a179d01
NP
91002010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9101
9102 * c.opt (Wproperty-assign-default): New option.
9103
22d8d616
NP
91042010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9105
9106 Implemented -fobjc-std=objc1 flag.
9107 * c.opt (fobjc-std=objc1): New option.
9108
2debdb4f
NP
91092010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9110
9111 Implemented format and noreturn attributes for Objective-C methods.
9112 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9113 attribute for Objective-C methods.
9114
ec52b111
JM
91152010-10-31 Jason Merrill <jason@redhat.com>
9116
9117 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9118 EXPR_LOC_OR_HERE.
9119
46a88c12
NP
91202010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9121
9122 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9123 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9124 (objc_add_property_declaration): Removed arguments for copies and
9125 ivar.
9126 (objc_build_getter_call): Renamed to
9127 objc_maybe_build_component_ref.
9128 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9129 (objc_is_property_ref): New.
9130 * c-common.c (c_common_reswords): Removed copies and ivar.
9131 * stub-objc.c (objc_add_property_declaration): Removed arguments
9132 for copies and ivar.
9133 (objc_build_getter_call): Renamed to
9134 objc_maybe_build_component_ref.
9135 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9136 (objc_is_property_ref): New.
9faeb493 9137
1e4bf85b
AC
91382010-10-29 Arnaud Charlet <charlet@adacore.com>
9139 Matthew Gingell <gingell@adacore.com>
9140
9141 * c-ada-spec.c (separate_class_package): New function.
9142 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9143 name of their enclosing package.
9144 (print_ada_declaration): Use separate_class_package.
9145
81f0bab2
JM
91462010-10-27 Jason Merrill <jason@redhat.com>
9147
2b08f2c5
JM
9148 * c-common.c (c_common_reswords): Add __is_literal_type.
9149 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9150
81f0bab2
JM
9151 * c-common.c (check_case_value): Remove special C++ code.
9152
200290f2
NP
91532010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9154
9155 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9156 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9157 and RID_LAST_PATTR.
9158 (objc_add_property_declaration): Added additional arguments.
9159 (objc_property_attribute_kind): Removed.
9160 (objc_set_property_attr): Removed.
9161 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9162 copy and nonatomic.
9163 * stub-objc.c (objc_add_property_declaration): Added additional
9164 arguments.
9165 (objc_set_property_attr): Removed.
9faeb493 9166
f614132b
NP
91672010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9168
9169 * c-common.h (objc_add_property_variable): Renamed to
9170 objc_add_property_declaration. Added location argument.
9171 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9172
b8a18805
NP
91732010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9174
9175 * c-common.h (objc_maybe_printable_name): New.
9176 * stub-objc.c (objc_maybe_printable_name): New.
9177
3f8257db
JJ
91782010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9179 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9180
9181 * c-common.h (c_common_mark_addressable_vec): Declare.
9182 * c-common.c (c_common_mark_addressable_vec): New function.
9183
249a82c4
NP
91842010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9185
9186 * c-common.h (objc_set_method_type): Removed.
9187 (objc_add_method_declaration): Added boolean argument.
9188 (objc_start_method_definition): Same change.
9189 (objc_build_method_signature): Same change.
9190 * stub-objc.c (objc_set_method_type): Removed.
9191 (objc_add_method_declaration): Added boolean argument.
9192 (objc_start_method_definition): Same change.
9193 (objc_build_method_signature): Same change.
9194
977e30bc
NP
91952010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9196
9197 * c-common.h (finish_file): Removed.
9198 (objc_write_global_declarations): New.
9199 * c-opts.c (c_common_parse_file): Do not call finish_file.
9200 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9201
da57d1b9
NP
92022010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9203
9204 Implemented parsing @synthesize and @dynamic for
9205 Objective-C/Objective-C++.
9206 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9207 (objc_add_synthesize_declaration): New.
9208 (objc_add_dynamic_declaration): New.
9209 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9210 * stub-objc.c (objc_add_synthesize_declaration): New.
9211 (objc_add_dynamic_declaration): New.
9faeb493 9212
0069111f
MM
92132010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9214
9215 PR target/46041
9216 * c-cppbuiltin.c (mode_has_fma): Move function here from
9217 builtins.c. Don't use the fma optab, instead just use the
9218 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9219 using -save-temps.
9220
e426b47b
NP
92212010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9222
9223 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9224
3f8257db 9225 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9226
9faeb493 9227 Radar 4330422
e426b47b
NP
9228 * c-common.h (objc_non_volatilized_type): New declaration
9229 * stub-objc.c (objc_non_volatilized_type): New stub.
9230
90fbfdc3
NP
92312010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9232
e426b47b 9233 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9234
3f8257db 9235 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9236
9faeb493 9237 Radar 4133425
90fbfdc3 9238 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9239 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9240
c37d8c30
IS
92412010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9242
9243 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9244 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9245 (objc_ivar_visibility_kind): New enum.
9246 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9247 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9248 visibility enum.
9249
1b1562a5
MM
92502010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9251
9252 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9253 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9254 has the appropriate fma builtins.
9255 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9256
668ea4b1
IS
92572010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9258
1b1562a5 9259 merge from FSF apple 'trunk' branch.
3f8257db 9260 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9261
668ea4b1
IS
9262 Radars 4436866, 4505126, 4506903, 4517826
9263 * c-common.c (c_common_resword): Define @property and its attributes.
9264 * c-common.h: Define property attribute enum entries.
9265 (OBJC_IS_PATTR_KEYWORD): New.
9266 (objc_property_attribute_kind): New enum.
9267 Declare objc_set_property_attr (), objc_add_property_variable (),
9268 objc_build_getter_call () and objc_build_setter_call ().
9269 * stub-objc.c (objc_set_property_attr): New stub.
9270 (objc_add_property_variable): Likewise.
9271 (objc_build_getter_call): Likewise.
9272 (objc_build_setter_call) Likewise.
1b1562a5 9273
a1178b30
IS
92742010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9275
1b1562a5 9276 merge from FSF apple 'trunk' branch.
3f8257db 9277 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9278
9279 Radar 3803157 (method attributes)
9280 * c-common.c (handle_deprecated_attribute): Recognize
9281 objc methods as valid declarations.
9282 * c-common.h: Declare objc_method_decl ().
1b1562a5 9283 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9284
a75bfaa6
JM
92852010-10-08 Joseph Myers <joseph@codesourcery.com>
9286
9287 * c-common.c (parse_optimize_options): Call
9288 decode_cmdline_options_to_array_default_mask before
9289 decode_options. Update arguments to decode_options.
9290 * c-common.h (c_common_init_options_struct): Declare.
9291 * c-opts.c (c_common_init_options_struct): New. Split out from
9292 c_common_init_options.
9293
f05b9d93
NP
92942010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9295
9296 Implemented fast enumeration for Objective-C.
9297 * c-common.h (objc_finish_foreach_loop): New.
9298 * stub-objc.c (objc_finish_foreach_loop): New.
9299
1ebe4b4f
JM
93002010-10-05 Joseph Myers <joseph@codesourcery.com>
9301
9302 * c-common.h (struct diagnostic_context): Don't declare here.
9303 (c_common_initialize_diagnostics): Declare using
9304 diagnostic_context typedef.
9305 * c-opts.c (c_common_handle_option): Pass global_dc to
9306 handle_generated_option.
9307
d4d24ba4
JM
93082010-10-04 Joseph Myers <joseph@codesourcery.com>
9309
9310 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9311 handle_generated_option.
9312
478a1c5b
ILT
93132010-10-03 Ian Lance Taylor <iant@google.com>
9314
9315 * c.opt (-fplan9-extensions): New option.
9316
82a1c2fe
FXC
93172010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9318
9319 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9320 Remove.
9321 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9322 of duplicating code.
9323
92902b1b
IS
93242010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9325
9326 * c-common.c: Add two new entries for @optional
9327 and @required keywords.
9328
9329 merge from FSF 'apple/trunk' branch.
3f8257db 9330 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9331
9332 Radar 4386773
9333 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9334 objective-c keywords.
9335 (objc_set_method_opt): New declaration.
9336 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9337
46625112
JM
93382010-09-30 Joseph Myers <joseph@codesourcery.com>
9339
9340 * c-common.c (handle_optimize_attribute): Pass &global_options to
9341 cl_optimization_save and cl_optimization_restore.
9342 * c-opts.c (c_common_handle_option): Pass &global_options to
9343 handle_generated_option.
9344 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9345 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9346 &global_options to cl_optimization_restore.
9347
49b91f05
NP
93482010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9349
9350 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9351 Objective-C/Objective-C++ keywords.
9352
13ed556f 93532010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9354
9faeb493
UB
9355 Merge from 'apple/trunk' branch on FSF servers.
9356
3f8257db 9357 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9358
9359 Radar 4281748
9360 * c-common.h (objc_check_global_decl): New declaration.
9361 * stub-objc.c (objc_check_global_decl): New stub.
9362
f0036cca
JM
93632010-09-29 Joseph Myers <joseph@codesourcery.com>
9364
9365 * c.opt: Don't use VarExists.
9366
e3339d0f
JM
93672010-09-29 Joseph Myers <joseph@codesourcery.com>
9368
9369 * c-common.c (c_cpp_error): Update names of diagnostic_context
9370 members.
9371 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9372 cl_optimization members.
9373 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9374 sanitize_cpp_opts, finish_options): Update names of cpp_options
9375 members.
9376
1973201f
NP
93772010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9378
9379 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9380 (objc_is_reserved_word): Removed.
9381 * c-common.c: Updated comments.
9382 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9383 objc_is_reserved_word.
9384 * stub-objc.c (objc_is_reserved_word): Removed.
9385
f7e71da5
IS
93862010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9387
9faeb493 9388 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9389 include attributes.
9390 (objc_start_method_definition): Likewise.
9391 (objc_build_keyword_decl): Likewise.
9392 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9393 (objc_start_method_definition): Likewise.
9394 (objc_build_keyword_decl): Likewise.
9395
c165dca7
IS
93962010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9397
9398 * c-common.h (objc_start_class_interface): Adjust prototype.
9399 (objc_start_category_interface): Likewise.
9400 (objc_start_protocol): Likewise.
9401 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9402 (objc_start_class_interface): Likewise.
9403 (objc_start_category_interface): Likewise.
9404
7458026b
ILT
94052010-09-27 Ian Lance Taylor <iant@google.com>
9406
9407 * c-common.c (c_common_attribute_table): Add no_split_stack.
9408 (handle_no_split_stack_attribute): New static function.
9409
b581b85b
NP
94102010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9411
9faeb493 9412 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9413
3f8257db 9414 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9415
9faeb493 9416 Radar 4229905
b581b85b
NP
9417 * c-common.h (objc_have_common_type): New declaration.
9418 * stub-objc.c (objc_have_common_type): New stub.
9419
9420 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9421
9422 Radar 4154928
9423 * c-common.h (objc_common_type): New prototype.
9faeb493 9424 * stub-objc.c (objc_common_type): New stub.
b581b85b 9425
46a4da10
JH
94262010-09-24 Jan Hubicka <jh@suse.cz>
9427
9428 * c-common.c (handle_leaf_attribute): New function.
9429 (struct attribute_spec c_common_att): Add leaf.
9430
e200444e
JM
94312010-09-22 Joseph Myers <joseph@codesourcery.com>
9432
9433 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9434 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9435 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9436 -include-barrier, -include-directory, -include-directory=,
9437 -include-directory-after, -include-directory-after=,
9438 -include-prefix, -include-prefix=, -include-with-prefix,
9439 -include-with-prefix=, -include-with-prefix-after,
9440 -include-with-prefix-after=, -include-with-prefix-before,
9441 -include-with-prefix-before=, -no-integrated-cpp,
9442 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9443 -output=, -pedantic, -pedantic-errors, -preprocess,
9444 -print-missing-file-dependencies, -trace-includes, -traditional,
9445 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9446 -user-dependencies, -verbose, -write-dependencies,
9447 -write-user-dependencies, no-integrated-cpp, traditional): New.
9448
29a80ea6
NP
94492010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9450
9451 PR objc/23710
ac1fc2fc
NP
9452 * c-common.h (objc_start_method_definition): Return bool instead
9453 of void.
9454 * stub-objc.c (objc_start_method_definition): Return bool instead
9455 of void.
9456
94572010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9458
9459 PR objc/25965
9460 * c-common.h (objc_get_interface_ivars): New declaration.
9461 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9462
de621752
ILT
94632010-09-15 Ian Lance Taylor <iant@google.com>
9464
9465 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9466 messages. Remove period at end of warning message.
de621752 9467
ba885ec5
NS
94682010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9469
9470 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9471 (handle_alias_attribute): ... here.
9472 (handle_ifunc_attribute): New.
9473
c5ee1358
MM
94742010-09-06 Mark Mitchell <mark@codesourcery.com>
9475
9476 * c-common.h (do_warn_double_promotion): Declare.
9477 * c-common.c (do_warn_double_promotion): Define.
9478
0a0b3574
MM
94792010-09-05 Mark Mitchell <mark@codesourcery.com>
9480
9481 * c.opt (Wdouble-promotion): New.
9482
d1779886
JM
94832010-09-02 Joseph Myers <joseph@codesourcery.com>
9484
9485 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9486 fvtable-thunks, fxref): Mark no longer supported in help text.
9487
2d2bd949
JM
94882010-09-02 Joseph Myers <joseph@codesourcery.com>
9489
9490 * c.opt (Wimport, fall-virtual, falt-external-templates,
9491 fdefault-inline, fenum-int-equiv, fexternal-templates,
9492 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9493 fname-mangling-version-, fnew-abi, fnonnull-objects,
9494 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9495 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9496 applicable.
9497 (fhandle-exceptions): Mark with Alias and Warn.
9498 * c-opts.c (c_common_handle_option): Don't handle options marked
9499 as ignored.
9500
5de8299c
JM
95012010-09-02 Joseph Myers <joseph@codesourcery.com>
9502
9503 * c.opt (Wcomments, Werror-implicit-function-declaration,
9504 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9505 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9506 aliases.
9507 * c-common.c (option_codes): Use OPT_Wcomment instead of
9508 OPT_Wcomments.
9509 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9510 Don't handle options marked as aliases.
9511
0ceb0201
RG
95122010-08-25 Richard Guenther <rguenther@suse.de>
9513
9514 * c-common.c (c_common_get_alias_set): Remove special
9515 handling for pointers.
9516
ac47786e
NF
95172010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9518
9519 * c-common.c: Use FOR_EACH_VEC_ELT.
9520 * c-gimplify.c: Likewise.
9521 * c-pragma.c: Likewise.
9522
c878765b
JM
95232010-08-16 Joseph Myers <joseph@codesourcery.com>
9524
9525 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9526 RejectDriver.
9527 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9528 RejectDriver.
9529 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9530 instead of OPT_MDX and OPT_MMDX.
9531
603349bf
JM
95322010-08-16 Joseph Myers <joseph@codesourcery.com>
9533
9534 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9535
644fa7ac
JM
95362010-08-12 Joseph Myers <joseph@codesourcery.com>
9537
9538 * c.opt (MD, MMD): Change to MDX and MMDX.
9539 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9540
481e1176
JM
95412010-08-11 Joseph Myers <joseph@codesourcery.com>
9542
9543 * c-opts.c (c_common_handle_option): Call handle_generated_option
9544 instead of handle_option.
9545
ac8dc9f7
NF
95462010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9547
9548 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9549 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9550
4f8c876d
NF
95512010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9552
9553 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9554 (pending_redefine_extname): Change type to a VEC.
9555 (add_to_renaming_pragma_list): Update for new type of
9556 pending_redefine_extname.
ac8dc9f7 9557 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9558
3b0c690e
AC
95592010-08-04 Arnaud Charlet <charlet@adacore.com>
9560
9561 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9562 visited.
9563 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9564 decide whether a type has already been declared/seen.
9565 Do not go to the original type.
9566 (dump_nested_types): New parameter forward.
9567 Generate forward declaration if needed and mark type as visited.
9568 (print_ada_declaration): Call dump_nested_types if not already done.
9569 Mark types as visited.
9570
1890bccc
JM
95712010-08-03 Joseph Myers <joseph@codesourcery.com>
9572
9573 * c.opt (-print-pch-checksum): Remove option.
9574 * c-opts.c (c_common_handle_option): Don't handle
9575 OPT_print_pch_checksum.
9576
5f20c657
JM
95772010-07-27 Joseph Myers <joseph@codesourcery.com>
9578
9579 * c-common.h (c_common_handle_option): Update prototype and return
9580 value type.
9581 * c-opts.c (c_common_handle_option): Update prototype and return
9582 value type. Update calls to handle_option and
9583 enable_warning_as_error.
9584
f551f80c
JJ
95852010-07-27 Jakub Jelinek <jakub@redhat.com>
9586
9587 PR c/45079
9588 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9589
61ff2bdc
JM
95902010-07-27 Joseph Myers <joseph@codesourcery.com>
9591
9592 * c-common.h (c_common_missing_argument): Remove.
9593 * c-opts.c (c_common_missing_argument): Remove.
9594 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9595 idirafter, imacros, include, isysroot, isystem, iquote): Add
9596 MissingArgError.
9597 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9598
7a9bf9a4
JM
95992010-07-27 Joseph Myers <joseph@codesourcery.com>
9600
9601 * c-common.h (c_common_option_lang_mask,
9602 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9603 New.
9604 (c_common_init_options): Update prototype.
9605 * c-opts.c (c_common_option_lang_mask): New.
9606 (c_common_initialize_diagnostics): Split out of
9607 c_common_init_options.
9608 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9609 New.
9610 (c_common_init_options): Update prototype. Use decoded options in
9611 search for -lang-asm.
9612
910ad8de
NF
96132010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9614
9615 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9616 * c-format.c: Likewise.
9617
718f9c0f
MLI
96182010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9619
9620 * c-common.h: Include diagnostic-core.h. Error if already
9621 included.
9622 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9623
4d451982
MLI
96242010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9625
adfac8df 9626 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
9627 Do not include expr.h
9628 (vector_mode_valid_p): Move here.
9629
119fe915
SB
96302010-06-21 DJ Delorie <dj@redhat.com>
9631
9632 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9633 allow these pragmas anywhere.
9634
96352010-06-14 Jakub Jelinek <jakub@redhat.com>
9636
9637 PR bootstrap/44509
9638 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9639 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9640 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9641 ggc_strdup instead of xstrdup.
9642
96432010-06-10 Jakub Jelinek <jakub@redhat.com>
9644
9645 * c-cppbuiltin.c: Include cpp-id-data.h.
9646 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9647 (lazy_hex_fp_value): New function.
9648 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9649
6662d794
MLI
96502010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9651
9652 * c-gimplify.c: Do not include tree-flow.h
9653
38f8b050
JR
96542010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9655
9656 PR other/44034
9657 * c-common.c: Rename targetm member:
9658 targetm.enum_va_list -> targetm.enum_va_list_p
9659
9589f23e
AS
96602010-06-28 Anatoly Sokolov <aesok@post.ru>
9661
9662 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9663
3b06d379
SB
96642010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9665
9666 * c-cppbuiltin.c: Do not include except.h.
9667
d166d4c3
AK
96682010-06-24 Andi Kleen <ak@linux.intel.com>
9669
9faeb493
UB
9670 * c-common.c (warn_for_omitted_condop): New.
9671 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 9672
70cb8be6
JM
96732010-06-21 Joseph Myers <joseph@codesourcery.com>
9674
9675 * c.opt (lang-objc): Remove.
9676 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9677
a4c97feb
JR
96782010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9679
9680 * c-opts.c: Include "tm_p.h".
9681
6e2f1956
JM
96822010-06-20 Joseph Myers <joseph@codesourcery.com>
9683
9684 * c-common.c (parse_optimize_options): Update call to
9685 decode_options.
9686
bc87224e
NF
96872010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9688
9689 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9690 new type of types_used_by_cur_var_decl.
9691
b49cf425
JR
96922010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9693
9694 PR bootstrap/44512
9695 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9696 for C++ standard compliance.
9697
59f9c2ed
JM
96982010-06-16 Jason Merrill <jason@redhat.com>
9699
9700 * c.opt: Add -Wnoexcept.
9701
33766b66
RG
97022010-06-16 Richard Guenther <rguenther@suse.de>
9703
9704 PR c/44555
9705 * c-common.c (c_common_truthvalue_conversion): Remove
9706 premature and wrong optimization concering ADDR_EXPRs.
9707
eff7e30c
AC
97082010-06-15 Arnaud Charlet <charlet@adacore.com>
9709
9710 * c-ada-spec.c (dump_sloc): Remove column info.
9711 (is_simple_enum): New function.
9712 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9713 enum types when relevant.
9714
6312e84d
MLI
97152010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9716
9faeb493 9717 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
9718 location.
9719
1cb42611
JM
97202010-06-10 Joseph Myers <joseph@codesourcery.com>
9721
9722 * c-opts.c (c_common_handle_option): Don't handle
9723 OPT_fshow_column.
9724
a9429e29
LB
97252010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9726
9727 * c-pragma.c (push_alignment): Use typed GC allocation.
9728 (handle_pragma_push_options): Likewise.
9729
9730 * c-common.c (parse_optimize_options): Likewise.
9731
9732 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9733 option.
9734
5498f011
JM
97352010-06-07 Joseph Myers <joseph@codesourcery.com>
9736
9737 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9738 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9739 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9740 flag_signed_bitfields, warn_strict_null_sentinel,
9741 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9742 flag_gen_declaration, flag_no_gnu_keywords,
9743 flag_implement_inlines, flag_implicit_templates,
9744 flag_implicit_inline_templates, flag_optional_diags,
9745 flag_elide_constructors, flag_default_inline, flag_rtti,
9746 flag_conserve_space, flag_access_control, flag_check_new,
9747 flag_new_for_scope, flag_weak, flag_working_directory,
9748 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9749 flag_enforce_eh_specs, flag_threadsafe_statics,
9750 flag_pretty_templates): Remove.
9751 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9752 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9753 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9754 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9755 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9756 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9757 flag_no_gnu_keywords, flag_implement_inlines,
9758 flag_implicit_templates, flag_implicit_inline_templates,
9759 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9760 flag_rtti, flag_conserve_space, flag_access_control,
9761 flag_check_new, flag_new_for_scope, flag_weak,
9762 flag_working_directory, flag_use_cxa_atexit,
9763 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9764 flag_threadsafe_statics, flag_pretty_templates,
9765 warn_strict_null_sentinel): Remove.
9766 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9767 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9768 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9769 fimplicit-inline-templates, fimplicit-templates,
9770 flax-vector-conversions, fms-extensions, fnil-receivers,
9771 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9772 frtti, fshort-double, fshort-enums, fshort-wchar,
9773 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9774 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9775 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9776 gen-decls, undef): Use Var.
9777 (fdefault-inline, foptional-diags): Document as doing nothing.
9778 * c-opts.c (c_common_handle_option): Remove cases for options now
9779 using Var. Mark ignored options as such.
9780
39dabefd
SB
97812010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9782
9faeb493 9783 * c-common.c: Moved to here from parent directory.
39dabefd
SB
9784 * c-common.def: Likewise.
9785 * c-common.h: Likewise.
9786 * c-cppbuiltin.c: Likewise.
9787 * c-dump.c: Likewise.
9788 * c-format.c: Likewise.
9789 * c-format.h : Likewise.
9790 * c-gimplify.c: Likewise.
9791 * c-lex.c: Likewise.
9792 * c-omp.c: Likewise.
9793 * c.opt: Likewise.
9794 * c-opts.c: Likewise.
9795 * c-pch.c: Likewise.
9796 * c-ppoutput.c: Likewise.
9797 * c-pragma.c: Likewise.
9798 * c-pragma.h: Likewise.
9799 * c-pretty-print.c: Likewise.
9800 * c-pretty-print.h: Likewise.
9801 * c-semantics.c: Likewise.
9802 * stub-objc.c: Likewise.
9803
9804 * c-common.c: Include gt-c-family-c-common.h.
9805 * c-pragma.c: Include gt-c-family-c-pragma.h.
9806\f
a5544970 9807Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
9808
9809Copying and distribution of this file, with or without modification,
9810are permitted in any medium without royalty provided the copyright
9811notice and this notice are preserved.