PR c++/87996 - size of array is negative error when SIZE_MAX/2 < sizeof(array) <...
[gcc.git] / gcc / c-family / ChangeLog
1 2019-02-11 Martin Sebor <msebor@redhat.com>
2
3 PR c++/87996
4 * c-common.c (invalid_array_size_error): New function.
5 (valid_array_size_p): Call it. Handle size as well as type.
6 * c-common.h (valid_constant_size_p): New function.
7 (enum cst_size_error): New type.
8
9 2019-01-31 David Malcolm <dmalcolm@redhat.com>
10
11 PR c/89122
12 * known-headers.cc (get_stdlib_header_for_name): Add
13 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
14
15 2019-01-31 Jakub Jelinek <jakub@redhat.com>
16
17 PR libstdc++/88170
18 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
19 a C cast in pp_c_flag_gnu_v3 mode.
20
21 2019-01-29 Jakub Jelinek <jakub@redhat.com>
22
23 PR c/86125
24 * c-common.c (c_common_nodes_and_builtins): Build type variants for
25 builtin_structptr_types types even for C.
26
27 2019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
28
29 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
30 when rhs is of array type correctly. Fix handling of nested structures.
31 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
32 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
33 type casts within nested compound expressions.
34
35 2019-01-22 Jakub Jelinek <jakub@redhat.com>
36
37 PR middle-end/88968
38 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
39 variable after using BIT_FIELD_REF.
40
41 2019-01-18 H.J. Lu <hongjiu.lu@intel.com>
42
43 PR c/51628
44 PR c/88664
45 * c-common.h (warn_for_address_or_pointer_of_packed_member):
46 Remove the boolean argument.
47 * c-warn.c (check_address_of_packed_member): Renamed to ...
48 (check_address_or_pointer_of_packed_member): This. Also
49 warn pointer conversion.
50 (check_and_warn_address_of_packed_member): Renamed to ...
51 (check_and_warn_address_or_pointer_of_packed_member): This.
52 Also warn pointer conversion.
53 (warn_for_address_or_pointer_of_packed_member): Remove the
54 boolean argument. Don't check pointer conversion here.
55
56 2019-01-15 Richard Sandiford <richard.sandiford@arm.com>
57
58 PR inline-asm/52813
59 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
60
61 2019-01-14 Jakub Jelinek <jakub@redhat.com>
62
63 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
64 and __cpp_nontype_template_parameter_auto. Add a comment that
65 __cpp_template_auto is deprecated.
66
67 2019-01-14 Tom Honermann <tom@honermann.net>
68
69 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
70 * c-common.c (c_common_reswords): Add char8_t.
71 (fix_string_type): Use char8_t for the type of u8 string literals.
72 (c_common_get_alias_set): char8_t doesn't alias.
73 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
74 C++.
75 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
76 (keyword_begins_type_specifier): Add RID_CHAR8.
77 * c-common.h (rid): Add RID_CHAR8.
78 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
79 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
80 Define char8_type_node and char8_array_type_node.
81 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
82 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
83 (c_cpp_builtins): Predefine __cpp_char8_t.
84 * c-lex.c (lex_string): Use char8_array_type_node as the type of
85 CPP_UTF8STRING.
86 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
87 * c-opts.c: If not otherwise specified, enable -fchar8_t when
88 targeting C++2a.
89 * c.opt: Add the -fchar8_t command line option.
90
91 2019-01-14 Martin Sebor <msebor@redhat.com>
92
93 PR target/88638
94 * c-attribs.c (positional_argument): Call valid_format_string_type_p
95 and issue errors if it fails.
96 * c-common.h (valid_format_string_type_p): Declare.
97 * c-format.c (valid_stringptr_type_p): Rename...
98 (valid_format_string_type_p): ...to this and make extern.
99 (handle_format_arg_attribute): Adjust to new name.
100 (check_format_string): Same.
101
102 2019-01-13 H.J. Lu <hongjiu.lu@intel.com>
103
104 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
105 Replace "may may" with "may" in warning message.
106
107 2019-01-07 Jakub Jelinek <jakub@redhat.com>
108
109 PR c++/85052
110 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
111 (c_build_vec_convert): Declare.
112 * c-common.c (c_build_vec_convert): New function.
113
114 2019-01-04 Martin Sebor <msebor@redhat.com>
115
116 PR c/88546
117 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
118 Handle C++ empty throw specification and C11 _Noreturn.
119 (has_attribute): Also handle C11 _Noreturn.
120
121 2019-01-04 Martin Sebor <msebor@redhat.com>
122
123 PR c/88363
124 * c-attribs.c (positional_argument): Also accept enumerated types.
125
126 2019-01-01 Jakub Jelinek <jakub@redhat.com>
127
128 Update copyright years.
129
130 2018-12-20 H.J. Lu <hongjiu.lu@intel.com>
131
132 PR c/51628
133 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
134 * c-warn.c (check_alignment_of_packed_member): New function.
135 (check_address_of_packed_member): Likewise.
136 (check_and_warn_address_of_packed_member): Likewise.
137 (warn_for_address_or_pointer_of_packed_member): Likewise.
138 * c.opt: Add -Wno-address-of-packed-member.
139
140 2018-12-20 David Malcolm <dmalcolm@redhat.com>
141
142 PR c++/87504
143 * c-warn.c (get_outermost_macro_expansion): New function.
144 (spelled_the_same_p): Use it to unwind the macro expansions, and
145 compare the outermost macro in each nested expansion, rather than
146 the innermost.
147
148 2018-12-19 David Malcolm <dmalcolm@redhat.com>
149
150 PR c++/87504
151 * c-common.h (warn_tautological_cmp): Convert 1st param from
152 location_t to const op_location_t &.
153 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
154 when testing for INTEGER_CST.
155 (warn_tautological_bitwise_comparison): Convert 1st param from
156 location_t to const op_location_t &; use it to build a
157 binary_op_rich_location, and use this.
158 (spelled_the_same_p): New function.
159 (warn_tautological_cmp): Convert 1st param from location_t to
160 const op_location_t &. Warn for macro expansions if
161 spelled_the_same_p. Use binary_op_rich_location.
162
163 2018-12-19 David Malcolm <dmalcolm@redhat.com>
164
165 PR c++/43064
166 PR c++/43486
167 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
168 (verify_tree): Handle location wrappers.
169 (c_common_truthvalue_conversion): Strip any location wrapper.
170 Handle CONST_DECL.
171 (fold_offsetof): Strip any location wrapper.
172 (complete_array_type): Likewise for initial_value.
173 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
174 index before checking for INTEGER_CST.
175 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
176 print parentheses around location wrappers.
177 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
178 before checking for INTEGER_CST.
179 (warn_tautological_bitwise_comparison): Call
180 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
181 before checking for INTEGER_CST.
182 (readonly_error): Strip any location wrapper.
183 (warn_array_subscript_with_type_char): Strip location wrappers
184 before checking for INTEGER_CST. Use the location of the index if
185 available.
186
187 2018-12-06 Jason Merrill <jason@redhat.com>
188
189 PR c++/88136 - -Wdeprecated-copy false positives
190 * c.opt (Wdeprecated-copy-dtor): New.
191 (Wdeprecated-copy): Move to -Wextra.
192
193 2018-11-29 Martin Sebor <msebor@redhat.com>
194
195 PR c/88172
196 PR testsuite/88208
197 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
198 alignments to values less than the target requires.
199 (has_attribute): For attribute aligned consider both the attribute
200 and the alignment bits.
201 * c-common.c (c_init_attributes): Optionally issue a warning for
202 zero alignment.
203
204 2018-11-28 Martin Sebor <msebor@redhat.com>
205
206 PR c/88065
207 PR c/87297
208 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
209 or destination is an error.
210
211 2018-11-28 Jakub Jelinek <jakub@redhat.com>
212
213 PR c++/88215
214 * c-ubsan.c: Include langhooks.h.
215 (ubsan_instrument_division): Change gcc_assert that main variants
216 of op0 and op1 types are equal to gcc_checking_assert that the
217 main variants are compatible types.
218
219 2018-11-27 Eric Botcazou <ebotcazou@adacore.com>
220
221 * c-ada-spec.c: Include stringpool.h.
222 (has_static_fields): Return false for incomplete types.
223 (is_tagged_type): Likewise.
224 (has_nontrivial_methods): Likewise.
225 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
226 (struct overloaded_name_hash): New structure.
227 (struct overloaded_name_hasher): Likewise.
228 (overloaded_names): New global variable.
229 (init_overloaded_names): New static function.
230 (overloaded_name_p): New predicate.
231 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
232 on the TYPE_STUB_DECL of the original type of a typedef, if any.
233 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
234 Remove always-true condition and dump forward types.
235 (dump_ada_specs): Delete overloaded_names.
236
237 2018-11-20 Martin Sebor <msebor@redhat.com>
238
239 * c-attribs.c (type_for_vector_size): New function.
240 (type_valid_for_vector_size): Same.
241 (handle_vector_size_attribute): Move code to the functions above
242 and call them.
243 (validate_attribute, has_attribute): New functions.
244 * c-common.h (has_attribute): Declare.
245 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
246 * c-common.c (c_common_resword): Same.
247
248 2018-11-16 Jason Merrill <jason@redhat.com>
249
250 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
251 * c-attribs.c (attr_cold_hot_exclusions): Make public.
252
253 2018-11-16 Jakub Jelinek <jakub@redhat.com>
254
255 PR middle-end/87854
256 * c-common.c (fix_string_type): Reject string literals larger than
257 TYPE_MAX_VALUE (ssizetype) bytes.
258
259 2018-11-15 Martin Sebor <msebor@redhat.com>
260
261 PR c++/87541
262 PR c++/87542
263 * c-attribs.c (positional_argument): New function.
264 (handle_alloc_size_attribute): Use it and simplify.
265 (handle_alloc_align_attribute): Same.
266 (handle_assume_aligned_attribute): Same.
267 (handle_nonnull_attribute): Same.
268 * c-common.c (check_function_arguments): Pass fntype to
269 check_function_format.
270 * c-common.h (check_function_format): Add an argument.
271 (PosArgFlags, positional_argument): Declare new type and function.
272 * c-format.c (decode_format_attr): Add arguments.
273 (check_format_string, get_constant): Same.
274 (convert_format_name_to_system_name): Adjust.
275
276 2018-11-15 David Malcolm <dmalcolm@redhat.com>
277
278 PR other/19165
279 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
280
281 2018-11-14 Jakub Jelinek <jakub@redhat.com>
282
283 P1236R1 - Signed integers are two's complement
284 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
285 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
286 with in-range second operand well defined for -std=c++2a.
287
288 PR other/88007
289 * c-common.c (parse_optimize_options): Allocate option string from
290 opts_obstack rather than as GC memory. Move the allocation after
291 warning for invalid option.
292
293 2018-11-13 David Malcolm <dmalcolm@redhat.com>
294
295 * c-common.c (c_get_substring_location): Update for renaming of
296 get_source_location_for_substring to get_location_within_string.
297 * c-lex.c: Replace "source_location" with "location_t".
298 * c-opts.c: Likewise.
299 * c-ppoutput.c: Likewise.
300
301 2018-11-13 Martin Sebor <msebor@redhat.com>
302
303 PR middle-end/81824
304 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
305 (handle_tls_model_attribute): Improve diagnostics.
306
307 2018-11-12 Jason Merrill <jason@redhat.com>
308
309 * c-cppbuiltin.c (c_cpp_builtins): Define
310 __cpp_impl_destroying_delete.
311
312 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
313 __cpp_conditional_explicit.
314
315 2018-11-09 Martin Sebor <msebor@redhat.com>
316
317 PR middle-end/81824
318 * c-attribs.c (handle_copy_attribute): New function.
319
320 2018-11-09 Martin Sebor <msebor@redhat.com>
321
322 PR c/87795
323 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
324
325 2018-11-08 Jakub Jelinek <jakub@redhat.com>
326
327 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
328 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
329 enum omp_memory_order MEMORY_ORDER.
330 (c_finish_omp_flush): Add MO argument.
331 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
332 (c_finish_omp_for): Add FINAL_P argument.
333 * c-omp.c: Include memmodel.h.
334 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
335 OMP_TASKGROUP_CLAUSES to it.
336 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
337 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
338 instead of OMP_ATOMIC_SEQ_CST.
339 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
340 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
341 __atomic_thread_fence call with the given value.
342 (check_omp_for_incr_expr): Formatting fixes.
343 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
344 even in OpenMP loops, diagnose if NE_EXPR and incr expression
345 is not constant expression 1 or -1. Transform NE_EXPR loops
346 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
347 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
348 loops too.
349 (c_omp_split_clauses): Add support for combined
350 #pragma omp parallel master and
351 #pragma omp {,parallel }master taskloop{, simd} constructs.
352 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
353 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
354 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
355 (c_omp_predetermined_sharing): Don't return
356 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
357 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
358 PRAGMA_OMP_REQUIRES.
359 * c-pragma.h (enum pragma_kind): Likewise.
360 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
361 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
362
363 2018-11-08 David Malcolm <dmalcolm@redhat.com>
364
365 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
366
367 2018-11-08 David Malcolm <dmalcolm@redhat.com>
368
369 * c-format.c (local_cgraph_node_ptr_node): New variable.
370 (gcc_dump_printf_char_table): Add entry for %C.
371 (get_pointer_to_named_type): New function, taken from the handling
372 code for "gimple *" from...
373 (init_dynamic_diag_info): ...here. Add handling for
374 "cgraph_node *".
375 * c-format.h (T_CGRAPH_NODE): New.
376
377 2018-10-19 Jason Merrill <jason@redhat.com>
378
379 * c-cppbuiltin.c (c_cpp_builtins): Add
380 __cpp_nontype_template_parameter_class.
381
382 2018-10-31 Nathan Sidwell <nathan@acm.org>
383
384 * c-opts.c (c_finish_options): Force command line macro
385 location. Refactor to avoid repeating main debug hook.
386 (push_command_line_include): Clarify comment.
387
388 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
389
390 2018-10-30 Martin Sebor <msebor@redhat.com>
391
392 PR middle-end/87041
393 * c-format.c (check_format_types): Avoid diagnosing null pointer
394 arguments to printf-family of functions.
395
396 2018-10-30 Marek Polacek <polacek@redhat.com>
397
398 Implement P0892R2, explicit(bool).
399 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
400
401 2018-10-29 David Malcolm <dmalcolm@redhat.com>
402
403 * name-hint.h (name_hint::take_deferred): New member function.
404
405 2018-10-29 David Malcolm <dmalcolm@redhat.com>
406
407 PR c++/56856
408 * c-common.c (check_function_sentinel): Call fold_for_warn on the
409 argument.
410 (check_function_restrict): Rename param "argarray" to
411 "unfolded_argarray", and make a copy named "argarray", calling
412 fold_for_warn on each argument.
413 (check_function_arguments): Add note about responsibility for
414 folding the arguments.
415
416 2018-10-17 Joseph Myers <joseph@codesourcery.com>
417
418 * c-common.c (flag_isoc2x): New variable.
419 * c-common.h (clk_c): Update comment to reference C2X.
420 (flag_isoc99, flag_isoc11): Update comments to reference future
421 standard versions in general.
422 (flag_isoc2x): Declare.
423 * c-opts.c (set_std_c2x): New function.
424 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
425 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
426 flag_isoc2x to 0.
427 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
428
429 2018-10-17 Joseph Myers <joseph@codesourcery.com>
430
431 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
432 (std=iso9899:2018): Document C17 as published in 2018.
433
434 2018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
435
436 PR c++/87364
437 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
438
439 2018-10-11 Will Wray <wjwray@gmail.com>
440
441 PR c++/87364
442 * c-pretty-print.h (pp_c_type_cast): Prototype.
443 (pp_c_integer_constant): Likewise.
444 * c-pretty-print.c (pp_c_type_cast): No longer static.
445 (pp_c_integer_constant): Likewise.
446 (pp_c_enumeration_constant): Fix loop termination when finding
447 name of constant. No longer returns a value. Call
448 pp_c_integer_constant.
449 (c_pretty_printer::constant): Update for changes to
450 pp_c_enumeration_constant.
451
452 2018-10-11 Jakub Jelinek <jakub@redhat.com>
453
454 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
455 for no_unique_address.
456
457 2018-10-09 David Malcolm <dmalcolm@redhat.com>
458
459 * c-common.c (c_option_controlling_cpp_error): Rename to...
460 (c_option_controlling_cpp_diagnostic): ...this, and convert
461 "reason" from int to enum.
462 (c_cpp_error): Rename to...
463 (c_cpp_diagnostic): ...this, converting level and reason to enums.
464 * c-common.h (c_cpp_error): Rename to...
465 (c_cpp_diagnostic): ...this, converting level and reason to enums.
466 * c-opts.c (c_common_init_options): Update for renaming.
467
468 2018-10-08 Richard Sandiford <richard.sandiford@arm.com>
469
470 PR c/87286
471 * c-common.c (vector_types_compatible_elements_p): Use
472 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
473
474 2018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
475
476 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
477 to generate constructor destructor priority warning.
478 * c.opt (-Wprio-ctor-dtor): New option.
479
480 2018-10-01 Jason Merrill <jason@redhat.com>
481
482 * c-lex.c (c_common_has_attribute): Add no_unique_address.
483
484 2018-10-01 Eric Botcazou <ebotcazou@adacore.com>
485
486 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
487 (dump_ada_node): Add const keyword.
488
489 2018-09-25 Martin Liska <mliska@suse.cz>
490
491 * c-common.c (c_common_truthvalue_conversion):
492 Remove Pascal from documentation.
493
494 2018-09-21 Eric Botcazou <ebotcazou@adacore.com>
495
496 * c-ada-spec.c: Include diagnostic.h.
497 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
498
499 2018-09-19 Marek Polacek <polacek@redhat.com>
500
501 * c.opt (Wclass-conversion): New.
502
503 2018-09-17 David Malcolm <dmalcolm@redhat.com>
504
505 * c-format.c (range_label_for_format_type_mismatch::get_text):
506 Update for new param.
507
508 2018-09-17 David Malcolm <dmalcolm@redhat.com>
509
510 * c-format.c (format_warning_at_char): Update for introduction of
511 format_string_diagnostic_t.
512 (format_type_warning): Likewise.
513
514 2018-09-17 Martin Jambor <mjambor@suse.cz>
515
516 PR c/63886
517 * c.opt (Wabsolute-value): New.
518
519 2018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
520
521 * c-common.c (complete_flexible_array_elts): New helper function.
522 * c-common.h (complete_flexible_array_elts): Declare.
523
524 2018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
525
526 * c-common.c (braced_list_to_string): Remove eval parameter.
527 Add some more checks. Always create zero-terminated STRING_CST.
528 * c-common.h (braced_list_to_string): Adjust prototype.
529
530 2018-08-27 David Malcolm <dmalcolm@redhat.com>
531
532 PR 87091
533 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
534 to a tri-state.
535 (maybe_suggest_missing_token_insertion): Likewise.
536 (maybe_add_include_fixit): Add param "override_location". If set,
537 and source-printing is enabled, then override the rich_location's
538 primary location with that of the insertion point for the fix-it
539 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
540 * c-common.h (extern void maybe_add_include_fixit): Add bool
541 param.
542 * c-format.c (selftest::test_type_mismatch_range_labels): Update
543 for conversion of show_caret_p to a tri-state.
544 * c-warn.c (warn_for_restrict): Likewise.
545 * known-headers.cc
546 (suggest_missing_header::~suggest_missing_header): Update call to
547 maybe_add_include_fixit to suggest overriding the location, as it
548 is for a note.
549
550 2018-08-27 Martin Liska <mliska@suse.cz>
551
552 * c-common.c (check_function_restrict): Use new function
553 fndecl_built_in_p and remove check for FUNCTION_DECL if
554 possible.
555 (check_builtin_function_arguments): Likewise.
556 (reject_gcc_builtin): Likewise.
557 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
558
559 2018-08-26 Marek Polacek <polacek@redhat.com>
560
561 PR c++/87029, Implement -Wredundant-move.
562 * c.opt (Wredundant-move): New option.
563
564 2018-08-21 Marek Polacek <polacek@redhat.com>
565
566 PR c++/86981, Implement -Wpessimizing-move.
567 * c.opt (Wpessimizing-move): New option.
568
569 2018-08-20 David Malcolm <dmalcolm@redhat.com>
570
571 PR other/84889
572 * c-attribs.c (common_handle_aligned_attribute): Add
573 auto_diagnostic_group instance.
574 * c-indentation.c (warn_for_misleading_indentation): Likewise.
575 * c-opts.c (c_common_post_options): Likewise.
576 * c-warn.c (warn_logical_not_parentheses): Likewise.
577 (warn_duplicated_cond_add_or_warn): Likewise.
578 (warn_for_multistatement_macros): Likewise.
579
580 2018-08-20 Nathan Sidwell <nathan@acm.org>
581
582 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
583 access.
584
585 2018-08-17 Nathan Sidwell <nathan@acm.org>
586
587 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
588 field.
589 (laxy_hex_fp_value_count): Make unsigned.
590 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
591 manipulate the macro.
592 (builtin_defin_with_hex_fp_value): Adjust callback name, use
593 cpp_define_lazily.
594
595 2018-08-17 David Malcolm <dmalcolm@redhat.com>
596
597 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
598 (gcc_dump_printf_length_specs): New.
599 (gcc_dump_printf_flag_pairs): New.
600 (gcc_dump_printf_flag_specs): New.
601 (gcc_dump_printf_char_table): New.
602 (format_types_orig): Add entry for "gcc_dump_printf".
603 (init_dynamic_diag_info): Set up length_char_specs and
604 conversion_specs for gcc_dump_printf_format_type.
605 (handle_format_attribute): Handle gcc_dump_printf_format_type.
606
607 2018-08-17 Nathan Sidwell <nathan@acm.org>
608
609 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
610
611 * c-ada-spec.c: Don't #include "cpp-id-data.h"
612 * c-cppbuiltin.c: Likewise.
613
614 2018-08-17 Martin Liska <mliska@suse.cz>
615
616 * c.opt: Remove Warn, Init and Report for options with
617 Ignore/Deprecated flag. Warning is done automatically for
618 Deprecated flags.
619
620 2018-08-16 David Malcolm <dmalcolm@redhat.com>
621
622 PR c++/70693
623 * c-common.c (selftest::c_family_tests): Call
624 selftest::c_indentation_c_tests.
625 * c-common.h (selftest::c_indentation_c_tests): New decl.
626 * c-indentation.c: Include "selftest.h".
627 (next_tab_stop): Add "tab_width" param, rather than accessing
628 cpp_opts.
629 (get_visual_column): Likewise. Clarify comment. Bulletproof
630 against reading past the end of the line.
631 (get_first_nws_vis_column): Add "tab_width" param.
632 (detect_intervening_unindent): Likewise.
633 (should_warn_for_misleading_indentation): Read tab width from
634 cpp_opts and pass around.
635 (selftest::test_next_tab_stop): New test.
636 (selftest::assert_get_visual_column_succeeds): New function.
637 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
638 (selftest::assert_get_visual_column_fails): New function.
639 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
640 (selftest::test_get_visual_column): New test.
641 (selftest::c_indentation_c_tests): New function.
642
643 2018-08-16 Nathan Sidwell <nathan@acm.org>
644
645 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
646 (store_ada_macro): Likewise.
647 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
648 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
649
650 2018-08-15 David Malcolm <dmalcolm@redhat.com>
651
652 * c-format.c: Include "selftest-diagnostic.h" and
653 "gcc-rich-location.h".
654 (format_warning_at_char): Pass NULL for new label params of
655 format_warning_va.
656 (class indirection_suffix): New class.
657 (class range_label_for_format_type_mismatch): New class.
658 (format_type_warning): Move logic for generating "*" suffix to
659 class indirection_suffix. Create "fmt_label" and "param_label"
660 to show their types, and pass them to the
661 format_warning_at_substring calls.
662 (selftest::test_type_mismatch_range_labels): New test.
663 (selftest::c_format_c_tests): Call it.
664
665 2018-08-13 Martin Sebor <msebor@redhat.com>
666
667 PR tree-optimization/71625
668 * c-common.c (braced_list_to_string): New function.
669 * c-common.h (braced_list_to_string): Declare it.
670
671 2018-08-08 Nathan Sidwell <nathan@acm.org>
672
673 * c-common.c (try_to_locate_new_include_inertion_point): Use
674 linemap_included_from_linemap.
675 * c-lex.c (fe_file_change): Use linemap_included_from.
676 * c-ppoutput.c (pp_file_change): Likewise.
677
678 2018-08-01 Martin Sebor <msebor@redhat.com>
679
680 PR tree-optimization/86650
681 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
682 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
683 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
684 * c-format.h (T89_G): Update to be "gimple *" rather than
685 "gcall *".
686 (local_gcall_ptr_node): Rename...
687 (local_gimple_ptr_node): ...to this.
688
689 2018-07-31 David Malcolm <dmalcolm@redhat.com>
690
691 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
692 table entries for gcc_diag_char_table, and the 'Z' entry from
693 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
694 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
695 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
696 adding missing "Z" for this table. Remove erroneous "G" and "K"
697 entries.
698 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
699 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
700 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
701
702 2018-07-31 Richard Earnshaw <rearnsha@arm.com>
703
704 * c-common.c (speculation_safe_resolve_call): New function.
705 (speculation_safe_resolve_params): New function.
706 (speculation_safe_resolve_return): New function.
707 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
708 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
709 __HAVE_SPECULATION_SAFE_VALUE.
710
711 2018-07-20 David Malcolm <dmalcolm@redhat.com>
712
713 * c-common.c (c_cpp_error): Remove redundant "line_table"
714 parameter from call to rich_location::set_range.
715 (maybe_suggest_missing_token_insertion): Likewise.
716
717 2018-07-20 Martin Sebor <msebor@redhat.com>
718
719 PR middle-end/82063
720 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
721
722 2018-07-20 Martin Sebor <msebor@redhat.com>
723
724 PR middle-end/82063
725 * c-common.h (c_common_handle_option): Change function argument
726 to HOST_WIDE_INT.
727 * c-opts.c (c_common_init_options): Same.
728 (c_common_handle_option): Same. Remove special handling of
729 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
730 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
731 options to take a HOST_WIDE_INT argument and accept a byte-size
732 suffix. Initialize.
733 (-Wvla-larger-than): Same.
734 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
735 (-Wno-vla-larger-than): Same.
736
737 2018-07-12 Jakub Jelinek <jakub@redhat.com>
738
739 * c-attribs.c (c_common_attribute_table): Add
740 "omp declare target implicit" attribute.
741
742 2018-07-12 Richard Biener <rguenther@suse.de>
743
744 PR c/86453
745 * c-attribs.c (handle_packed_attribute): Do not build a variant
746 type with TYPE_PACKED, instead ignore the attribute if we may
747 not apply to the original type.
748
749 2018-07-10 Jakub Jelinek <jakub@redhat.com>
750
751 PR c++/86443
752 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
753 to contain TREE_LIST for both the original class iterator and the
754 "last" helper var.
755
756 2018-07-07 Eric Botcazou <ebotcazou@adacore.com>
757
758 * c-ada-spec.c (to_ada_name): Remove index parameter.
759 (pp_ada_tree_identifier): Likewise.
760 (dump_ada_macros): Adjust call to to_ada_name.
761 (struct overloaded_name_hash): Delete.
762 (struct overloaded_name_hasher): Likewise.
763 (overloaded_names): Likewise.
764 (compute_overloading_index): Likewise.
765 (dump_ada_decl_name): Do not call compute_overloading_index and
766 adjust calls to pp_ada_tree_identifier.
767 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
768 (dump_ada_import): Add spc parameter and switch to aspect syntax.
769 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
770 (dump_ada_enum_type): Remove type and display_convention parameters.
771 Adjust calls to pp_ada_tree_identifier.
772 (dump_ada_node): Likewise and for dump_ada_structure.
773 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
774 and tidy up.
775 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
776 syntax.
777 (print_constructor): Adjust call to pp_ada_tree_identifier.
778 (print_destructor): Likewise.
779 (dump_ada_declaration): Switch to aspect syntax.
780 (dump_ada_structure): Likewise and tidy up. Replace display_convention
781 parameter with nested parameter.
782 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
783 (dump_ada_specs): Do not delete overloaded_names table.
784
785 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
786
787 PR target/86324
788 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
789 target hook.
790
791 2018-07-05 Nathan Sidwell <nathan@acm.org>
792
793 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
794 NO_IMPLICIT_EXTERN_C.
795
796 2018-06-28 Martin Liska <mliska@suse.cz>
797
798 * cppspec.c: Include opt-suggestions.h.
799
800 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
801 Thomas Schwinge <thomas@codesourcery.com>
802 Cesar Philippidis <cesar@codesourcery.com>
803
804 * c-pragma.h (enum pragma_omp_clause): Add
805 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
806 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
807
808 2018-06-20 Jakub Jelinek <jakub@redhat.com>
809
810 PR c++/86210
811 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
812 comment.
813
814 2018-06-18 Martin Sebor <msebor@redhat.com>
815
816 PR middle-end/85602
817 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
818 nonstring.
819
820 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
821
822 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
823
824 2018-06-13 Jason Merrill <jason@redhat.com>
825
826 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
827 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
828 handling.
829
830 PR c++/86094 - wrong code with defaulted move ctor.
831 * c-opts.c (c_common_post_options): Bump the current ABI version to
832 13. Set warn_abi_version and flag_abi_compat_version to the current
833 version rather than 0. Fix defaulting flag_abi_compat_version from
834 warn_abi_version.
835
836 2018-06-12 Martin Sebor <msebor@redhat.com>
837
838 PR c/85931
839 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
840 sizeof source and destination yields the same value.
841
842 2018-06-12 Martin Liska <mliska@suse.cz>
843
844 * c.opt: Make MPX-related options as Deprecated.
845
846 2018-06-08 David Malcolm <dmalcolm@redhat.com>
847
848 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
849 rather than 0.
850
851 2018-06-08 Martin Liska <mliska@suse.cz>
852
853 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
854 for MPX (macros, related functions, fields in cgraph_node, ...).
855 (handle_bnd_legacy): Likewise.
856 (handle_bnd_instrument): Likewise.
857 * c.opt: Likewise.
858
859 2018-06-06 Jakub Jelinek <jakub@redhat.com>
860
861 PR c++/86068
862 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
863 __cpp_transactional_memory to 201500 instead of 210500.
864
865 2018-06-06 Jason Merrill <jason@redhat.com>
866
867 PR c++/85710 - ICE with -Wmemset-elt-size.
868 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
869
870 2018-06-01 Jason Merrill <jason@redhat.com>
871
872 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
873 201703.
874
875 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
876
877 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
878 declaration for a typedef independently of whether the declaration of
879 the subtype is generated.
880
881 2018-05-31 Martin Sebor <msebor@redhat.com>
882
883 PR c/82063
884 * c.opt (-Wno-alloc-size-larger-than): New option.
885
886 2018-04-22 David Pagan <dave.pagan@oracle.com>
887
888 PR c/55976
889 * c-opts.c (c_common_post_options): Set default for warn_return_type
890 for C++/C++ with ObjC extensions only. For C, makes it possible to
891 differentiate between default (no option), -Wreturn-type, and
892 -Wno-return-type.
893
894 2018-05-29 Jason Merrill <jason@redhat.com>
895
896 * c.opt (Winit-list-lifetime): New flag.
897
898 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
899
900 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
901 splay_tree_delete_pointers.
902
903 2018-05-26 Jakub Jelinek <jakub@redhat.com>
904
905 PR bootstrap/85921
906 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
907 noinline variable to workaround broken kernel headers.
908
909 2018-05-18 Jason Merrill <jason@redhat.com>
910
911 * c.opt (Wdeprecated-copy): New flag.
912
913 2018-05-17 Martin Liska <mliska@suse.cz>
914
915 * c-warn.c (overflow_warning): Do not use
916 space in between 'G_' and '('.
917
918 2018-05-09 Jason Merrill <jason@redhat.com>
919
920 * c-common.c (valid_array_size_p): Add complain parameter.
921 * c-common.h: ...which defaults to true.
922
923 2018-05-11 Jakub Jelinek <jakub@redhat.com>
924
925 PR c/85696
926 * c-omp.c (c_omp_predetermined_sharing): Return
927 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
928
929 2018-05-11 Martin Liska <mliska@suse.cz>
930
931 PR sanitizer/85556
932 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
933 TREE_LIST values.
934
935 2018-05-10 Jakub Jelinek <jakub@redhat.com>
936
937 PR c++/85662
938 * c-common.h (fold_offsetof_1): Removed.
939 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
940 CTX argument defaulted to ERROR_MARK.
941 * c-common.c (fold_offsetof_1): Renamed to ...
942 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
943 argument, convert the pointer constant to TYPE and use size_binop
944 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
945 a pointer type. Adjust recursive calls.
946
947 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
948
949 PR c++/85400
950 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
951
952 2018-05-07 Nathan Sidwell <nathan@acm.org>
953
954 * c.opt (ffor-scope): Remove functionality, issue warning.
955
956 2018-05-03 Nathan Sidwell <nathan@acm.org>
957
958 * c.opt (ffriend-injection): Remove functionality, issue warning.
959
960 2018-05-01 David Malcolm <dmalcolm@redhat.com>
961
962 PR c/84258
963 * c-format.c (struct format_check_results): Add field
964 "number_non_char".
965 (check_format_info): Initialize it, and warn if encountered.
966 (check_format_arg): Distinguish between wide char and
967 everything else when detecting arrays of non-char.
968
969 2018-04-30 David Malcolm <dmalcolm@redhat.com>
970
971 * c-format.c (get_corrected_substring): Update for
972 location_get_source_line returning a char_span. Use a char_span
973 when handling the prefix of the correction.
974 * c-indentation.c (get_visual_column): Update for
975 location_get_source_line returning a char_span.
976 (get_first_nws_vis_column): Likewise.
977
978 2018-03-29 David Malcolm <dmalcolm@redhat.com>
979
980 PR c++/84269
981 * known-headers.cc (get_stdlib_header_for_name): Add various names
982 from <assert.h>, <string.h>, and <memory.h>; add more names from
983 <stdio.h>.
984
985 2018-03-27 Jakub Jelinek <jakub@redhat.com>
986
987 PR c++/85061
988 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
989 get_base_address of the second operand is a VAR_P, rather than the
990 operand itself, and use gcc_checking_assert instead of gcc_assert.
991
992 2018-03-23 Marek Polacek <polacek@redhat.com>
993
994 PR c++/85045
995 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
996 <case RDIV_EXPR>: Tweak condition.
997
998 2018-03-20 Eric Botcazou <ebotcazou@adacore.com>
999
1000 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1001
1002 2018-03-16 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c/84909
1005 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1006 diagnostics.
1007
1008 PR c/84910
1009 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1010 diagnostics.
1011
1012 2018-03-16 Richard Biener <rguenther@suse.de>
1013
1014 PR c/84873
1015 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1016 unshare the possibly folded expression.
1017
1018 2018-03-15 Richard Biener <rguenther@suse.de>
1019
1020 PR c/84873
1021 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1022
1023 2018-03-13 Martin Sebor <msebor@redhat.com>
1024
1025 PR tree-optimization/84725
1026 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1027 with all three narrow character types, including their qualified forms.
1028
1029 2018-03-12 Martin Sebor <msebor@redhat.com>
1030
1031 PR tree-optimization/83456
1032 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1033 Restore checking of bounded built-in functions.
1034 (check_function_arguments): Also return the result
1035 of warn_for_restrict.
1036 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1037 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1038
1039 2018-03-02 Marek Polacek <polacek@redhat.com>
1040
1041 PR c++/84171
1042 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1043 is erroneous.
1044
1045 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1046
1047 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1048 function".
1049
1050 2018-03-01 Marek Polacek <polacek@redhat.com>
1051
1052 PR c++/84639
1053 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1054 alignment in computation.
1055
1056 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1057
1058 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1059 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1060
1061 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1062
1063 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1064 (is_char_array): Take a type instead of a declaration.
1065 (dump_ada_array_type): Likewise.
1066 (is_simple_enum): Minor tweak.
1067 (dump_ada_enum_type): New function extracted from...
1068 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1069 <INTEGER_TYPE>: Remove unreachable code.
1070 <RECORD_TYPE>: Likewise. Minor tweaks.
1071 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1072 <ENUMERAL_TYPE>: New case.
1073 <RECORD_TYPE>: Factor out common code.
1074 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1075 Minor tweaks. Deal with enumeral types.
1076 (dump_ada_structure): Minor tweaks.
1077
1078 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1079
1080 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1081 address for incomplete structures.
1082 (dump_forward_type): Do not bail out for incomplete structures.
1083 (dump_ada_declaration): Do not special-case incomplete structures
1084 for subtypes. Dump them as null records for types.
1085
1086 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1087
1088 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1089 (is_char_array): Fix formatting.
1090 (dump_template_types): Likewise.
1091 (dump_generic_ada_node): Rename into...
1092 (dump_ada_node): ...this.
1093 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1094 incomplete structures and not for empty structures. Do not use it
1095 when forward declarations are needed.
1096 (dump_forward_type): New function.
1097 (dump_nested_types): Remove FORWARD parameter. Do not consider
1098 TREE_VISITED and do not generate a forward declaration. Only dump
1099 original nested types for nested declaration.
1100 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1101 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1102 <RECORD_TYPE>: Do not consider TREE_VISITED.
1103 (dump_ada_declaration): Use booleans and fix formatting throughout.
1104 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1105 Call dump_forward_type instead of dump_nested_types for a typedef.
1106 Remove superfluous check and adjust call to dump_nested_types.
1107 <POINTER_TYPE>: Call dump_forward_type and fall through.
1108 (dump_ada_struct_decl): Rename into...
1109 (dump_ada_structure): ...this. Do not special-case empty structures.
1110
1111 2018-02-27 Martin Sebor <msebor@redhat.com>
1112
1113 PR c++/83871
1114 * c.opt (-Wmissing-attributes): New option.
1115
1116 2018-02-21 Martin Liska <mliska@suse.cz>
1117
1118 * c.opt (Wcatch-value=): Add IntegerRange.
1119
1120 2018-02-15 Jason Merrill <jason@redhat.com>
1121
1122 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1123
1124 2018-02-09 Nathan Sidwell <nathan@acm.org>
1125
1126 PR c/84293
1127 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1128 arg.
1129 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1130 arg. Adjust.
1131
1132 2018-02-09 Martin Sebor <msebor@redhat.com>
1133
1134 PR lto/84212
1135 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1136 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1137 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1138 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1139 (-Wuninitialized): Same.
1140
1141 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1142
1143 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1144 keyword for components.
1145
1146 2018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1147
1148 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1149
1150 2018-02-02 Julia Koval <julia.koval@intel.com>
1151
1152 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1153
1154 2018-01-29 Marek Polacek <polacek@redhat.com>
1155
1156 PR c/83966
1157 * c-format.c (check_function_format): Check current_function_decl.
1158
1159 2018-01-27 Jakub Jelinek <jakub@redhat.com>
1160
1161 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1162 argument.
1163 (LAZY_HEX_FP_VALUES_CNT): Define.
1164 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1165 values rather than just 12.
1166 (builtin_define_with_hex_fp_value): Likewise.
1167
1168 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1169
1170 PR other/70268
1171 * c.opt (-fmacro-prefix-map): New option.
1172 * c-opts.c (c_common_handle_option): Handle it.
1173 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1174 * c-ppoutput.c (init_pp_output): Likewise.
1175
1176 2018-01-17 David Malcolm <dmalcolm@redhat.com>
1177
1178 PR c++/83814
1179 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1180
1181 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1182
1183 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1184 Skip 'f' and 'F' characters if it is true.
1185 (store_ada_macro): Minor tweak.
1186 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1187 <CPP_WSTRING>: Likewise.
1188 <CPP_STRING>: Output '&' in the buffer if not the first string.
1189 <CPP_NUMBER>: Adjust calls to dump_number.
1190
1191 2018-01-10 David Malcolm <dmalcolm@redhat.com>
1192
1193 PR c++/43486
1194 * c-common.c: Include "selftest.h".
1195 (get_atomic_generic_size): Perform the test for integral type
1196 before the range test for any integer constant, fixing indentation
1197 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1198 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1199 (selftest::test_fold_for_warn): New function.
1200 (selftest::c_common_c_tests): New function.
1201 (selftest::c_family_tests): Call it, and
1202 selftest::c_pretty_print_c_tests.
1203 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1204 * c-format.c (check_format_arg): Convert VAR_P check to a
1205 fold_for_warn.
1206 * c-pretty-print.c: Include "selftest.h".
1207 (pp_c_cast_expression): Don't print casts for location wrappers.
1208 (selftest::assert_c_pretty_printer_output): New function.
1209 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1210 (selftest::test_location_wrappers): New function.
1211 (selftest::c_pretty_print_c_tests): New function.
1212 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1213
1214 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1215 Alan Hayward <alan.hayward@arm.com>
1216 David Sherwood <david.sherwood@arm.com>
1217
1218 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1219
1220 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1221 Alan Hayward <alan.hayward@arm.com>
1222 David Sherwood <david.sherwood@arm.com>
1223
1224 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1225 as polynomial.
1226
1227 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1228 Alan Hayward <alan.hayward@arm.com>
1229 David Sherwood <david.sherwood@arm.com>
1230
1231 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1232 (convert_vector_to_array_for_subscript): Handle polynomial
1233 TYPE_VECTOR_SUBPARTS.
1234 (c_common_type_for_mode): Check valid_vector_subparts_p.
1235 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1236 VECTOR_CST_NELTS.
1237
1238 2018-01-03 Jakub Jelinek <jakub@redhat.com>
1239
1240 Update copyright years.
1241
1242 2017-12-22 Mike Stump <mikestump@comcast.net>
1243 Eric Botcazou <ebotcazou@adacore.com>
1244
1245 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1246 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1247
1248 2017-12-22 Alexandre Oliva <aoliva@redhat.com>
1249
1250 PR debug/83527
1251 PR debug/83419
1252 * c-semantics.c (only_debug_stmts_after_p): New.
1253 (pop_stmt_list): Clear side effects in debug-only stmt list.
1254 Check for single nondebug stmt followed by debug stmts only.
1255
1256 2017-12-21 Alexandre Oliva <aoliva@redhat.com>
1257
1258 PR debug/83419
1259 * c-semantics.c (pop_stmt_list): Propagate side effects from
1260 single nondebug stmt to container list.
1261
1262 2017-12-19 Jakub Jelinek <jakub@redhat.com>
1263
1264 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1265 conditions with typical order conditions.
1266
1267 2017-12-18 Marek Polacek <polacek@redhat.com>
1268
1269 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1270 not in effect.
1271
1272 2017-12-17 Martin Sebor <msebor@redhat.com>
1273
1274 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1275 an error for attribute warn_if_not_aligned.
1276
1277 2017-12-16 Martin Sebor <msebor@redhat.com>
1278
1279 PR tree-optimization/78918
1280 * c-common.c (check_function_restrict): Avoid checking built-ins.
1281 * c.opt (-Wrestrict): Include in -Wall.
1282
1283 2017-12-15 Jakub Jelinek <jakub@redhat.com>
1284
1285 * c-attribs.c (c_common_attribute_table,
1286 c_common_format_attribute_table): Swap affects_type_identity
1287 and handler fields, adjust comments.
1288
1289 2017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1290
1291 * c.opt (Wcast-function-type): New warning option.
1292 * c-lex.c (get_fileinfo): Avoid warning.
1293 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1294
1295 2017-12-14 Qing Zhao <qing.zhao@oracle.com>
1296
1297 PR middle_end/79538
1298 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1299 Adjust the size of buf1 and buf2, add a new buf to avoid
1300 format-overflow warning.
1301
1302 2017-12-12 Alexandre Oliva <aoliva@redhat.com>
1303
1304 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1305 subsequent statement list.
1306
1307 2017-12-07 Martin Sebor <msebor@redhat.com>
1308
1309 PR c/81544
1310 PR c/81566
1311 * c-attribs.c (attr_aligned_exclusions): New array.
1312 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1313 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1314 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1315 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1316 (attr_warn_unused_result_exclusions): Same.
1317 (handle_hot_attribute, handle_cold_attribute): Simplify.
1318 (handle_const_attribute): Warn on function returning void.
1319 (handle_pure_attribute): Same.
1320 (handle_aligned_attribute): Diagnose conflicting attribute
1321 specifications.
1322 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1323
1324 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1325
1326 PR c/83236
1327 * c-common.c (selftest::c_family_tests): Call
1328 selftest::c_spellcheck_cc_tests.
1329 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1330 * c-spellcheck.cc: Include "selftest.h".
1331 (name_reserved_for_implementation_p): New function.
1332 (should_suggest_as_macro_p): New function.
1333 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1334 should_suggest_as_macro_p and call it.
1335 (selftest::test_name_reserved_for_implementation_p): New function.
1336 (selftest::c_spellcheck_cc_tests): New function.
1337 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1338
1339 2017-12-06 David Malcolm <dmalcolm@redhat.com>
1340
1341 * c-spellcheck.cc: New file, taken from macro-handling code in
1342 spellcheck-tree.c.
1343 * c-spellcheck.h: New file, taken from macro-handling code in
1344 spellcheck-tree.h.
1345
1346 2017-12-01 Jakub Jelinek <jakub@redhat.com>
1347
1348 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1349 attribute.
1350 (handle_simd_attribute): Don't check for "cilk simd function"
1351 attribute. Reindent, formatting changes.
1352
1353 2017-11-30 Julia Koval <julia.koval@intel.com>
1354
1355 * c-common.h (inv_list): Remove.
1356
1357 2017-11-28 Jakub Jelinek <jakub@redhat.com>
1358
1359 PR sanitizer/81275
1360 * c-common.c (c_switch_covers_all_cases_p_1,
1361 c_switch_covers_all_cases_p): New functions.
1362 * c-common.h (c_switch_covers_all_cases_p): Declare.
1363
1364 2017-11-28 Julia Koval <julia.koval@intel.com>
1365 Sebastian Peryt <sebastian.peryt@intel.com>
1366
1367 * array-notation-common.c: Delete.
1368 * c-cilkplus.c: Ditto.
1369 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1370 * c-common.def (ARRAY_NOTATION_REF): Remove.
1371 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1372 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1373 c_validate_cilk_plus_loop, cilkplus_an_parts,
1374 cilk_ignorable_spawn_rhs_op,
1375 cilk_recognize_spawn): Remove.
1376 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1377 * c-omp.c: Remove CILK_SIMD check.
1378 * c-pragma.c: Ditto.
1379 * c-pragma.h: Remove CILK related pragmas.
1380 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1381 ARRAY_NOTATION_REF condition.
1382 (c_pretty_printer::expression): Ditto.
1383 * c.opt (fcilkplus): Remove.
1384 * cilk.c: Delete.
1385
1386 2017-11-21 Marc Glisse <marc.glisse@inria.fr>
1387
1388 * c-pretty-print.c (pp_c_additive_expression,
1389 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1390
1391 2017-11-21 Jakub Jelinek <jakub@redhat.com>
1392
1393 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1394
1395 PR c++/83059
1396 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1397 instead of tree_to_uhwi, formatting fix.
1398
1399 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1400
1401 PR c/81404
1402 * known-headers.cc: New file, based on material from c/c-decl.c.
1403 (suggest_missing_header): Copied as-is.
1404 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1405 heavily edited to add C++ support. Add some knowledge about
1406 <limits.h>, <stdint.h>, and <wchar.h>.
1407 * known-headers.h: Likewise.
1408
1409 2017-11-20 David Malcolm <dmalcolm@redhat.com>
1410
1411 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1412 (lookup_name_fuzzy): Likewise. Convert return type from
1413 const char * to name_hint. Add location_t param.
1414 * name-hint.h: New header.
1415
1416 2017-11-19 Jakub Jelinek <jakub@redhat.com>
1417
1418 PR c/66618
1419 PR c/69960
1420 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1421
1422 2017-11-16 Joseph Myers <joseph@codesourcery.com>
1423
1424 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1425 expected publication date of C17.
1426 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1427
1428 2017-11-15 Joseph Myers <joseph@codesourcery.com>
1429
1430 PR c/81156
1431 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1432 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1433
1434 2017-11-10 Martin Sebor <msebor@redhat.com>
1435
1436 PR c/81117
1437 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1438 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1439 * c.opt (-Wstringop-truncation): New option.
1440
1441 2017-11-06 Martin Liska <mliska@suse.cz>
1442
1443 PR middle-end/82404
1444 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1445 FE.
1446 * c.opt: Set default value of warn_return_type.
1447
1448 2017-10-31 David Malcolm <dmalcolm@redhat.com>
1449
1450 * c-common.c (binary_op_error): Update for renaming of
1451 error_at_rich_loc.
1452 (c_parse_error): Likewise.
1453 * c-warn.c (warn_logical_not_parentheses): Likewise for
1454 renaming of inform_at_rich_loc.
1455 (warn_for_restrict): Likewise for renaming of
1456 warning_at_rich_loc_n.
1457
1458 2017-10-30 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1461 * c-opts.c (set_std_c17): New function.
1462 (c_common_init_options): Use gnu17 as default C version.
1463 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1464
1465 2017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1466
1467 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1468 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1469 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1470 __FP_FAST_FMA<N>X.
1471
1472 2017-10-23 Marek Polacek <polacek@redhat.com>
1473
1474 PR c/82681
1475 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1476
1477 2017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1478
1479 * c-common.c (check_builtin_function_arguments): Also check arguments
1480 of __builtin_alloca_with_align_and_max.
1481
1482 2017-10-17 David Malcolm <dmalcolm@redhat.com>
1483
1484 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1485 rather than NULL to format_warning_va.
1486 (check_format_types): Likewise when calling format_type_warning.
1487 Remove code to extract source_ranges and source_range * in favor
1488 of just a location_t.
1489 (format_type_warning): Convert source_range * param to a
1490 location_t.
1491
1492 2017-10-13 Jakub Jelinek <jakub@redhat.com>
1493
1494 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1495 [LR]SHIFT_EXPR.
1496
1497 2017-10-12 David Malcolm <dmalcolm@redhat.com>
1498
1499 * c-common.c (enum missing_token_insertion_kind): New enum.
1500 (get_missing_token_insertion_kind): New function.
1501 (maybe_suggest_missing_token_insertion): New function.
1502 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1503
1504 2017-10-11 Nathan Sidwell <nathan@acm.org>
1505
1506 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1507 (c_common_handle_option): Update incpath_kind names.
1508
1509 2017-10-11 Martin Liska <mliska@suse.cz>
1510
1511 PR sanitizer/82490
1512 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1513 Wattributes warning.
1514
1515 2017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1516
1517 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1518 operating on trees as wide_ints.
1519 * c-common.c (pointer_int_sum): Likewise.
1520 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1521 * c-warn.c (match_case_to_enum_1): Likewise.
1522 (c_do_switch_warnings): Likewise.
1523 (maybe_warn_shift_overflow): Likewise.
1524
1525 2017-10-10 Jakub Jelinek <jakub@redhat.com>
1526
1527 PR c/82437
1528 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1529 instead of wide_int::from.
1530
1531 2017-10-06 Jakub Jelinek <jakub@redhat.com>
1532
1533 PR c/82437
1534 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1535 using to_widest use wide_int with the larger of the two precisions.
1536
1537 2017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1538
1539 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1540 functions.
1541
1542 2017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1543
1544 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1545 when combining the original unconverted comparison operands.
1546
1547 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1548
1549 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1550 attribute.
1551
1552 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1553
1554 * c-ada-spec.c (to_ada_name): Add index parameter.
1555 (pp_ada_tree_identifier): Likewise.
1556 (dump_ada_macros): Adjust call to to_ada_name.
1557 (struct overloaded_name_hash): New type.
1558 (struct overloaded_name_hasher): Likewise.
1559 (overloaded_names): New hash table.
1560 (compute_overloading_index): New function.
1561 (dump_ada_decl_name): Call it and pass the result to
1562 pp_ada_tree_identifier.
1563 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1564 (dump_ada_function_declaration): Likewise.
1565 (dump_generic_ada_node): Likewise.
1566 (print_constructor): Likewise.
1567 (print_destructor): Likewise.
1568 (dump_ada_specs): Delete overloaded_names table.
1569
1570 2017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1571
1572 * c-ada-spec.c (max_ada_macros): Move around.
1573 (store_ada_macro_index): Likewise.
1574 (source_file): Rename into...
1575 (macro_source_file): ...this.
1576 (count_ada_macro): Move around.
1577 (store_ada_macro): Likewise.
1578 (compare_macro): Likewise.
1579 (print_ada_macros): Merge in...
1580 (dump_ada_macros): ...this.
1581 (source_file_base): Rename into...
1582 (current_source_file): ...this.
1583 (print_comment): Move around.
1584 (dump_ada_nodes): Call dump_ada_declaration directly.
1585 (struct with): Change type of limited field to bool.
1586 (append_withs): Change type of limited_access parameter to bool.
1587 (pp_ada_tree_identifie): Likewise.
1588 (dump_ada_decl_nam): Likewise.
1589 (dump_generic_ada_node): Likewise. Do not print the return type.
1590 (to_ada_name): Change type of space_found parameter to bool.
1591 (dump_ada_function_declaration): Return void and change type of
1592 parameters to bool. Also print the return type for a function.
1593 (print_ada_methods): Rename into...
1594 (dump_ada_methods): ...this.
1595 (print_ada_declaration): Rename into ...
1596 (dump_ada_declaration): ...this. Do not print the return type.
1597 (print_ada_struct_decl): Rename into...
1598 (dump_ada_struct_decl): ...this.
1599
1600 2017-09-29 Jakub Jelinek <jakub@redhat.com>
1601
1602 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1603 rather than DECL_INITIAL.
1604 (common_handle_aligned_attribute): Likewise.
1605
1606 2017-09-20 Alexandre Oliva <aoliva@redhat.com>
1607
1608 * c.opt (gen-decls): Add RejectNegative.
1609
1610 2017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1611 Jakub Jelinek <jakub@redhat.com>
1612
1613 Add support for -std=c++2a.
1614 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1615 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1616 * c-opts.c (set_std_cxx2a): New.
1617 (c_common_handle_option): Set options when -std=c++2a is enabled.
1618 (c_common_post_options): Adjust comments.
1619 (set_std_cxx14, set_std_cxx17): Likewise.
1620
1621 2017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1622
1623 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1624 message for non-uniform endianness and issue a warning in C++.
1625
1626 2017-09-15 Jakub Jelinek <jakub@redhat.com>
1627
1628 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
1629 (Wc++17-compat): Change from undocumented alias to option.
1630 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
1631 change C++1z to C++17 in description.
1632 (std=c++1z, std=gnu++1z): Change from option to undocumented
1633 deprecated alias.
1634 (std=c++17, std=gnu++17): Change from undocumented alias to option.
1635 Adjust description.
1636 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
1637 * c-opts.c (set_std_cxx1z): Rename to ...
1638 (set_std_cxx17): ... this.
1639 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
1640 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
1641 caller.
1642 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
1643 comments.
1644
1645 2017-09-12 H.J. Lu <hongjiu.lu@intel.com>
1646
1647 * c-attribs.c (common_handle_aligned_attribute): Don't warn
1648 function alignment if warn_if_not_aligned_p is true.
1649
1650 2017-09-12 Nathan Sidwell <nathan@acm.org>
1651
1652 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
1653 resort_sorted_fields): Move to c/c-decl.c.
1654 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
1655 (struct sorted_fields_type): Move to c/c-lang.h.
1656
1657 2017-09-09 Jonathan Wakely <jwakely@redhat.com>
1658
1659 PR c++/81852
1660 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
1661
1662 2017-09-04 Marek Polacek <polacek@redhat.com>
1663
1664 PR c/81783
1665 * c-warn.c (warn_tautological_bitwise_comparison): New function.
1666 (warn_tautological_cmp): Call it.
1667
1668 2017-09-01 Boris Kolpackov <boris@codesynthesis.com>
1669
1670 * c-opts.c (c_common_finish): Write dependency information even if
1671 there are errors.
1672
1673 2017-09-01 Jakub Jelinek <jakub@redhat.com>
1674
1675 PR c/81887
1676 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
1677 (omp_pragmas_simd): ... here.
1678 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
1679 create new clauses list containing just simd clause.
1680
1681 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1682 Alan Hayward <alan.hayward@arm.com>
1683 David Sherwood <david.sherwood@arm.com>
1684
1685 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
1686 into scalar_mode_supported_p call.
1687 (handle_mode_attribute): Update call to scalar_mode_supported_p.
1688
1689 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1690 Alan Hayward <alan.hayward@arm.com>
1691 David Sherwood <david.sherwood@arm.com>
1692
1693 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
1694 for the mode iterator.
1695
1696 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1697 Alan Hayward <alan.hayward@arm.com>
1698 David Sherwood <david.sherwood@arm.com>
1699
1700 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
1701 * c-common.c (c_build_vec_perm_expr): Likewise.
1702
1703 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1704 Alan Hayward <alan.hayward@arm.com>
1705 David Sherwood <david.sherwood@arm.com>
1706
1707 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
1708
1709 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1710 Alan Hayward <alan.hayward@arm.com>
1711 David Sherwood <david.sherwood@arm.com>
1712
1713 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
1714 before calling targetm.addr_space.valid_pointer_mode.
1715
1716 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1717 Alan Hayward <alan.hayward@arm.com>
1718 David Sherwood <david.sherwood@arm.com>
1719
1720 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
1721
1722 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1723 Alan Hayward <alan.hayward@arm.com>
1724 David Sherwood <david.sherwood@arm.com>
1725
1726 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
1727 iterators.
1728 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
1729
1730 2017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
1731 Alan Hayward <alan.hayward@arm.com>
1732 David Sherwood <david.sherwood@arm.com>
1733
1734 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
1735 case statements.
1736
1737 2017-08-29 Martin Liska <mliska@suse.cz>
1738
1739 PR other/39851
1740 * c-common.c (parse_optimize_options): Add argument to function
1741 call.
1742 * c-pragma.c (handle_pragma_diagnostic): Likewise.
1743
1744 2017-08-24 David Malcolm <dmalcolm@redhat.com>
1745
1746 * c-lex.c (interpret_float): Use token location
1747 when building an EXCESS_PRECISION_EXPR.
1748
1749 2017-08-21 David Malcolm <dmalcolm@redhat.com>
1750
1751 * c-common.c (check_function_arguments): Add "arglogs" param; pass
1752 it to check_function_format.
1753 * c-common.h (check_function_arguments): Add vec<location_t> *
1754 param.
1755 (check_function_format): Likewise.
1756 * c-format.c (struct format_check_context): Add field "arglocs".
1757 (check_function_format): Add param "arglocs"; pass it to
1758 check_format_info.
1759 (check_format_info): Add param "arglocs"; use it to initialize
1760 new field of format_ctx.
1761 (check_format_arg): Pass format_ctx->arglocs to new param of
1762 check_format_info_main.
1763 (class argument_parser): New field "arglocs".
1764 (argument_parser::argument_parser): Add "arglocs_" param and use
1765 it to initialize new field.
1766 (argument_parser::check_argument_type): Pass new arglocs field to
1767 check_format_types.
1768 (check_format_info_main): Add param "arglocs", and use it when
1769 constructing arg_parser.
1770 (check_format_types): Add param "arglocs"; use it if non-NULL when
1771 !EXPR_HAS_LOCATION (cur_param) to get at location information.
1772
1773 2017-08-18 H.J. Lu <hongjiu.lu@intel.com>
1774
1775 PR c/53037
1776 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
1777 (c_common_attribute_table): Add warn_if_not_aligned.
1778 (handle_aligned_attribute): Renamed to ...
1779 (common_handle_aligned_attribute): Remove argument, name, and add
1780 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
1781 (handle_aligned_attribute): New.
1782 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
1783
1784 2017-08-14 Martin Sebor <msebor@redhat.com>
1785
1786 PR c/81117
1787 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
1788 (handle_nonstring_attribute): New function.
1789
1790 2017-08-14 Martin Sebor <msebor@redhat.com>
1791
1792 PR c/81117
1793 * c-format.h (T89_G): New macro.
1794 * c-format.c (local_gcall_ptr_node): New variable.
1795 (init_dynamic_diag_info): Initialize it.
1796
1797 2017-08-11 Martin Liska <mliska@suse.cz>
1798
1799 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
1800 TARGET_SUPPORTS_ALIASES.
1801
1802 2017-08-10 David Malcolm <dmalcolm@redhat.com>
1803
1804 * c-common.c (c_parse_error): Add rich_location * param, using it
1805 rather implicitly using input_location.
1806 * c-common.h (c_parse_error): Add rich_location * param.
1807
1808 2017-08-09 Marek Polacek <polacek@redhat.com>
1809
1810 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
1811 (c_common_truthvalue_conversion): Likewise.
1812 * c-omp.c (c_finish_omp_atomic): Likewise.
1813 * c-common.h (build_binary_op): Update declaration.
1814
1815 2017-08-08 Martin Liska <mliska@suse.cz>
1816
1817 * c-ada-spec.c: Include header files.
1818 * c-ubsan.c: Likewise.
1819 * c-warn.c: Likewise.
1820
1821 2017-08-07 Jakub Jelinek <jakub@redhat.com>
1822
1823 PR c/69389
1824 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
1825
1826 2017-08-07 Eric Botcazou <ebotcazou@adacore.com>
1827
1828 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
1829 (print_ada_methods): Likewise.
1830 (print_ada_declaration): Likewise.
1831
1832 2017-08-07 Martin Liska <mliska@suse.cz>
1833
1834 * array-notation-common.c: Add new includes.
1835 * c-format.c( handle_format_attribute): Canonicalize a format
1836 function name.
1837 * c-lex.c (c_common_has_attribute): Canonicalize name of an
1838 attribute.
1839 * c-pretty-print.c: Add new include.
1840
1841 2017-08-05 Eric Botcazou <ebotcazou@adacore.com>
1842
1843 * c-ada-spec.c (has_static_fields): Look only into variables.
1844 (print_constructor): Add TYPE parameter and use it for the name.
1845 (print_destructor): Likewise.
1846 (print_ada_declaration): Adjust to new constructor/destructor names.
1847 Adjust calls to print_constructor and print_destructor.
1848 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
1849 Look only into variables in the final loop.
1850
1851 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1852
1853 * c-ada-spec.c (has_static_fields): Look only into fields.
1854 (dump_generic_ada_node): Small tweak.
1855 (dump_nested_types): Look only into fields.
1856 (print_ada_declaration): Look only into methods. Small tweak.
1857 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
1858
1859 2017-08-01 Eric Botcazou <ebotcazou@adacore.com>
1860
1861 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
1862 (dump_ada_function_declaration): Likewise.
1863 (dump_generic_ada_node): Likewise.
1864 (print_ada_declaration): Add support for const-qualified variables.
1865
1866 2017-07-31 Martin Liska <mliska@suse.cz>
1867
1868 PR sanitize/81530
1869 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
1870 Guard condition with flag_sanitize_p also with current_function_decl
1871 non-null equality.
1872 (ubsan_maybe_instrument_reference_or_call): Likewise.
1873
1874 2017-07-30 Uros Bizjak <ubizjak@gmail.com>
1875
1876 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
1877
1878 2017-07-29 Eric Botcazou <ebotcazou@adacore.com>
1879
1880 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
1881 for enumeral types.
1882 (print_ada_declaration): Add missing guard for record types.
1883
1884 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR c/45784
1887 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
1888 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
1889 new COMPOUND_EXPRs around the rhs of the comparison.
1890
1891 2017-07-27 Marek Polacek <polacek@redhat.com>
1892
1893 PR c/81417
1894 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
1895 the types.
1896
1897 2017-07-27 Jakub Jelinek <jakub@redhat.com>
1898
1899 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
1900 (handle_noipa_attribute): New function.
1901
1902 2017-07-07 Torsten Duwe <duwe@suse.de>
1903
1904 * c-attribs.c (c_common_attribute_table): Add entry for
1905 "patchable_function_entry".
1906
1907 2017-07-20 Nathan Sidwell <nathan@acm.org>
1908
1909 Remove TYPE_METHODS.
1910 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
1911 dump_ada_template, print_ada_methods,
1912 print_ada_declaration): Member fns are on TYPE_FIELDS.
1913
1914 2017-07-18 Nathan Sidwell <nathan@acm.org>
1915
1916 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
1917
1918 2017-07-14 David Malcolm <dmalcolm@redhat.com>
1919
1920 * c-common.c (try_to_locate_new_include_insertion_point): New
1921 function.
1922 (per_file_includes_t): New typedef.
1923 (added_includes_t): New typedef.
1924 (added_includes): New variable.
1925 (maybe_add_include_fixit): New function.
1926 * c-common.h (maybe_add_include_fixit): New decl.
1927
1928 2017-07-10 Martin Sebor <msebor@redhat.com>
1929
1930 PR other/81345
1931 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
1932
1933 2017-07-06 David Malcolm <dmalcolm@redhat.com>
1934
1935 * c-common.c (selftest::c_family_tests): New.
1936 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
1937 (selftest::c_family_tests): New decl.
1938
1939 2017-07-04 Marek Polacek <polacek@redhat.com>
1940
1941 PR c/81231
1942 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
1943 types.
1944
1945 2017-07-04 Marek Polacek <polacek@redhat.com>
1946
1947 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
1948
1949 2017-06-28 Martin Liska <mliska@suse.cz>
1950
1951 PR ipa/81128
1952 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
1953 to a function declaration.
1954
1955 2017-06-28 Martin Liska <mliska@suse.cz>
1956
1957 PR driver/79659
1958 * c.opt: Add IntegerRange to various options.
1959
1960 2017-06-26 Marek Polacek <polacek@redhat.com>
1961
1962 PR c/80116
1963 * c-common.h (warn_for_multistatement_macros): Declare.
1964 * c-warn.c: Include "c-family/c-indentation.h".
1965 (warn_for_multistatement_macros): New function.
1966 * c.opt (Wmultistatement-macros): New option.
1967 * c-indentation.c (guard_tinfo_to_string): No longer static.
1968 Change the parameter type to "enum rid". Handle RID_SWITCH.
1969 * c-indentation.h (guard_tinfo_to_string): Declare.
1970
1971 2017-06-23 Marc Glisse <marc.glisse@inria.fr>
1972
1973 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
1974
1975 2017-06-15 Martin Sebor <msebor@redhat.com>
1976
1977 PR c++/80560
1978 * c.opt (-Wclass-memaccess): New option.
1979
1980 2017-06-14 Boris Kolpackov <boris@codesynthesis.com>
1981
1982 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
1983
1984 2017-06-13 Marek Polacek <polacek@redhat.com>
1985
1986 PR objc/80949
1987 * c-warn.c (do_warn_duplicated_branches): Return if any of the
1988 branches is null.
1989
1990 2017-06-13 Martin Liska <mliska@suse.cz>
1991
1992 PR sanitize/78204
1993 * c-attribs.c (add_no_sanitize_value): New function.
1994 (handle_no_sanitize_attribute): Likewise.
1995 (handle_no_sanitize_address_attribute): Use the function.
1996 (handle_no_sanitize_thread_attribute): New function.
1997 (handle_no_address_safety_analysis_attribute): Use
1998 add_no_sanitize_value.
1999 (handle_no_sanitize_undefined_attribute): Likewise.
2000 * c-common.h: Declare new functions.
2001 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2002 (ubsan_instrument_shift): Likewise.
2003 (ubsan_instrument_bounds): Likewise.
2004 (ubsan_maybe_instrument_array_ref): Likewise.
2005 (ubsan_maybe_instrument_reference_or_call): Likewise.
2006
2007 2017-06-11 Jason Merrill <jason@redhat.com>
2008
2009 * c-ada-spec.c, c-pragma.c: Use id_equal.
2010
2011 2017-06-04 Marek Polacek <polacek@redhat.com>
2012
2013 PR c/80919
2014 * c-format.c (matching_type_p): Return false if any of the types
2015 requires structural equality.
2016
2017 2017-06-02 Martin Sebor <msebor@redhat.com>
2018
2019 PR c/80892
2020 * c-warn.c (conversion_warning): Use -Wconversion for integer
2021 conversion and -Wfloat-conversion for floating one.
2022
2023 2017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2024
2025 * c.opt (Wsizeof-pointer-div): New warning option.
2026
2027 2017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2028
2029 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2030 (Wcatch-value=1): Enable by -Wall.
2031
2032 2017-05-30 David Malcolm <dmalcolm@redhat.com>
2033
2034 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2035 format_chars.
2036 * c.opt (fdiagnostics-show-template-tree): New option.
2037 (felide-type): New option.
2038
2039 2017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2040
2041 * c.opt (Wcatch-value=): New C++ warning flag.
2042
2043 2017-05-24 Nathan Sidwell <nathan@acm.org>
2044
2045 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2046 const casts to avoid warning.
2047
2048 2017-05-24 Martin Sebor <msebor@redhat.com>
2049
2050 PR c/80731
2051 * c-common.h (unsafe_conversion_p): Add a function argument.
2052 * c-common.c (unsafe_conversion_p): Same.
2053 Add type names and values to diagnostics.
2054 (scalar_to_vector): Adjust.
2055 * c-warn.c (constant_expression_error): Add a function argument.
2056 Add type names and values to diagnostics.
2057 (conversion_warning): Add a function argument.
2058 Add type names and values to diagnostics.
2059 (warnings_for_convert_and_check): Same.
2060
2061 2017-05-19 Jason Merrill <jason@redhat.com>
2062
2063 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2064 enumerators.
2065
2066 2017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2067
2068 * c-format.c (locus): Move out of function scope,
2069 add GTY attribute.
2070
2071 2017-05-19 Nathan Sidwell <nathan@acm.org>
2072
2073 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2074 (c_common_parse_file): Remove class dump handling.
2075 (get_dump_info): Likewise.
2076
2077 2017-05-19 Richard Biener <rguenther@suse.de>
2078
2079 PR c++/80593
2080 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2081 to alias-set zero memory.
2082
2083 2017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2084
2085 * c-format.c (local_tree_type_node): Add GTY attribute.
2086
2087 2017-05-18 Marek Polacek <polacek@redhat.com>
2088
2089 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2090 (c_common_fixed_point_type_for_size): Likewise.
2091 (c_common_type_for_mode): Likewise.
2092 (shorten_compare): Likewise.
2093 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2094 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2095
2096 2017-05-18 Marek Polacek <polacek@redhat.com>
2097
2098 * c-common.c (self_promoting_args_p): Change the return type to bool.
2099 Use false/true instead of 0/1.
2100 * c-common.h (self_promoting_args_p): Update.
2101
2102 2017-05-17 Marek Polacek <polacek@redhat.com>
2103
2104 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2105 * c-warn.c: Likewise.
2106
2107 2017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2108
2109 Implement new C++ intrinsics __is_assignable and __is_constructible.
2110 * c-common.c (__is_assignable, __is_constructible): New.
2111 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2112
2113 2017-05-17 Martin Liska <mliska@suse.cz>
2114
2115 * c-common.h: Introduce dump_flags_t type and
2116 use it instead of int type.
2117 * c-gimplify.c (c_genericize): Likewise.
2118 * c-opts.c: Likewise.
2119
2120 2017-05-17 Marek Polacek <polacek@redhat.com>
2121
2122 * c-common.c (c_save_expr): Remove.
2123 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2124 * c-common.h (c_save_expr): Remove declaration.
2125
2126 2017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2127
2128 PR c/35441
2129 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2130 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2131 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2132 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2133 RDIV_EXPR.
2134 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2135
2136 2017-05-09 Marek Polacek <polacek@redhat.com>
2137
2138 PR c/80525
2139 * c-warn.c (unwrap_c_maybe_const): New.
2140 (warn_logical_operator): Call it.
2141
2142 2017-05-09 Nathan Sidwell <nathan@acm.org>
2143
2144 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2145 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2146
2147 2017-05-08 Martin Sebor <msebor@redhat.com>
2148
2149 PR translation/80280
2150 * c-format.h (struct format_flag_spec): Add new member.
2151 (T89_T): New macro.
2152 * c-format.c (local_tree_type_node): New global.
2153 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2154 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2155 (strfmon_flag_specs): Likewise.
2156 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2157 with distinct quoting properties.
2158 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2159 (flag_chars_t::validate): Add argument and handle bad quoting.
2160 (check_format_info_main): Handle quoting problems.
2161 (init_dynamic_diag_info): Simplify.
2162
2163 2017-05-08 Jason Merrill <jason@redhat.com>
2164
2165 * c-opts.c (c_common_post_options): Update defaults for
2166 flag_abi_version and flag_abi_compat_version.
2167
2168 2017-05-05 David Malcolm <dmalcolm@redhat.com>
2169
2170 * c-common.c (c_cpp_error): Replace report_diagnostic
2171 with diagnostic_report_diagnostic.
2172
2173 2017-05-04 Martin Sebor <msebor@redhat.com>
2174
2175 PR translation/80280
2176 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2177 (handle_weakref_attribute): Same.
2178
2179 2017-05-03 Nathan Sidwell <nathan@acm.org>
2180
2181 Canonicalize canonical type hashing
2182 * c-common.c (complete_array_type): Use type_hash_canon.
2183
2184 2017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2185
2186 PR c++/80038
2187 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2188 prototype.
2189 (cilk_install_body_pedigree_operations): Likewise.
2190 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2191 detatched.
2192 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2193 (cilk_install_body_pedigree_operations): Likewise.
2194 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2195 unwrapping.
2196
2197 2017-04-27 Jakub Jelinek <jakub@redhat.com>
2198
2199 PR c++/80534
2200 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2201 flag on non-aggregate element types.
2202
2203 2017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2204
2205 * c-common.c (c_type_hasher, type_hash_table): Remove.
2206 (c_common_get_alias_set): Remove unreachable code.
2207 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2208
2209 2017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2210
2211 * c.opt (Wextra-semi): New C++ warning flag.
2212
2213 2017-04-20 Jakub Jelinek <jakub@redhat.com>
2214
2215 PR middle-end/80423
2216 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2217
2218 2017-04-18 Jakub Jelinek <jakub@redhat.com>
2219
2220 PR middle-end/79788
2221 PR middle-end/80375
2222 * c-common.c (c_common_type_for_mode): Don't handle
2223 widest_*_literal_type_node here.
2224 c_common_signed_or_unsigned_type): Likewise.
2225 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2226 to *intTI_type_node or *intDI_type_node depending on whether
2227 TImode is supported by the target or not.
2228
2229 2017-04-10 Martin Liska <mliska@suse.cz>
2230
2231 PR sanitizer/80350
2232 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2233 doing an UBSAN check.
2234
2235 2017-04-03 Jonathan Wakely <jwakely@redhat.com>
2236
2237 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2238
2239 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2240
2241 PR c++/79572
2242 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2243 tree *.
2244 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2245 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2246 REFERENCE_TYPE.
2247
2248 2017-03-31 David Malcolm <dmalcolm@redhat.com>
2249
2250 PR documentation/78732
2251 * c.opt (Wendif-labels): Fix description to refer to
2252 #else rather than #elif.
2253
2254 2017-03-31 Jakub Jelinek <jakub@redhat.com>
2255
2256 PR libstdc++/80251
2257 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2258 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2259
2260 2017-03-27 Jakub Jelinek <jakub@redhat.com>
2261
2262 PR middle-end/80162
2263 * c-common.c (c_common_mark_addressable_vec): Don't set
2264 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2265
2266 2017-03-21 Martin Sebor <msebor@redhat.com>
2267
2268 PR c++/79548
2269 * c-common.c (set_underlying_type): Mark type used only when
2270 original del is declared unused.
2271
2272 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2273
2274 PR translation/79848
2275 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2276 "%qs".
2277
2278 2017-03-10 David Malcolm <dmalcolm@redhat.com>
2279
2280 PR c/79921
2281 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2282 from inform's message, so that xgettext can locate it.
2283
2284 2017-03-09 Marek Polacek <polacek@redhat.com>
2285
2286 PR c++/79962
2287 PR c++/79984
2288 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2289 conversion to the attribute list.
2290
2291 2017-03-09 Martin Liska <mliska@suse.cz>
2292
2293 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2294
2295 2017-03-03 Jason Merrill <jason@redhat.com>
2296
2297 * c.opt (Wnoexcept-type): New.
2298
2299 2017-03-02 Richard Biener <rguenther@suse.de>
2300
2301 PR c/79756
2302 * c-common.c (c_common_mark_addressable_vec): Look through
2303 C_MAYBE_CONST_EXPR.
2304
2305 2017-02-28 Martin Liska <mliska@suse.cz>
2306
2307 * c.opt: Replace space with tabular for options of <number>
2308 type.
2309
2310 2017-02-28 Martin Liska <mliska@suse.cz>
2311
2312 * c.opt: Fix --help=option -Q for options which are of
2313 an enum type.
2314
2315 2017-02-24 Jakub Jelinek <jakub@redhat.com>
2316
2317 PR c++/79588
2318 * c-common.c (check_function_restrict): New function.
2319 (check_function_arguments): Add FNDECL argument. Call
2320 check_function_restrict if -Wrestrict.
2321 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2322 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2323 * c-common.h (check_function_arguments): Add FNDECL argument.
2324 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2325
2326 2017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2327
2328 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2329 treatment of parameters with pointer-to-tagged type and tidy up.
2330 (print_ada_methods): Remove the special treatment of C++ static member
2331 functions.
2332
2333 2017-02-22 Martin Liska <mliska@suse.cz>
2334
2335 * c.opt: Replace inequality signs with square brackets
2336 for -Wnornalized.
2337
2338 2017-02-21 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR c++/79641
2341 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2342 preserve quals.
2343
2344 2017-02-17 Joseph Myers <joseph@codesourcery.com>
2345
2346 * c-cppbuiltin.c (builtin_define_float_constants): Define
2347 __DECIMAL_DIG__ to the value for long double.
2348
2349 2017-02-15 Marek Polacek <polacek@redhat.com>
2350
2351 PR c/79515
2352 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2353 conversion has occured.
2354
2355 2017-01-24 David Malcolm <dmalcolm@redhat.com>
2356
2357 * c-common.c (c_common_reswords): Add "__RTL".
2358 * c-common.h (enum rid): Add RID_RTL.
2359
2360 2017-01-20 Marek Polacek <polacek@redhat.com>
2361
2362 PR c/64279
2363 * c-common.h (do_warn_duplicated_branches_r): Declare.
2364 * c-gimplify.c (c_genericize): Walk the function tree calling
2365 do_warn_duplicated_branches_r.
2366 * c-warn.c (expr_from_macro_expansion_r): New.
2367 (do_warn_duplicated_branches): New.
2368 (do_warn_duplicated_branches_r): New.
2369 * c.opt (Wduplicated-branches): New option.
2370
2371 2017-01-17 David Malcolm <dmalcolm@redhat.com>
2372
2373 PR c++/71497
2374 * c-indentation.c (warn_for_misleading_indentation): Use the past
2375 subjunctive in the note.
2376
2377 2017-01-17 Aldy Hernandez <aldyh@redhat.com>
2378
2379 PR c/79116
2380 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2381 start type to integer_type.
2382
2383 2017-01-16 Jakub Jelinek <jakub@redhat.com>
2384
2385 PR driver/49726
2386 * c.opt (gen-decls): Add Driver flag.
2387
2388 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2389
2390 Revert:
2391 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2392
2393 PR c++/71737
2394 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2395
2396 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2397
2398 PR c++/71737
2399 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2400
2401 2017-01-12 Martin Sebor <msebor@redhat.com>
2402
2403 (-Wformat-overflow): ...to this.
2404
2405 2017-01-11 Martin Sebor <msebor@redhat.com>
2406
2407 PR c/78768
2408 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2409 Also enable for LTO.
2410
2411 2017-01-10 Jason Merrill <jason@redhat.com>
2412
2413 Implement P0195R2, C++17 variadic using.
2414 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2415
2416 2017-01-09 Jakub Jelinek <jakub@redhat.com>
2417
2418 PR translation/79019
2419 PR translation/79020
2420 * c.opt (Wnormalized=): Fix typo in description.
2421
2422 2017-01-08 Martin Sebor <msebor@redhat.com>
2423
2424 PR middle-end/77708
2425 * c.opt (-Wformat-truncation): New option.
2426
2427 2017-01-06 Alexandre Oliva <aoliva@redhat.com>
2428
2429 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2430 value to unsigned short to fit in 4 hex digits without
2431 warnings.
2432
2433 2017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2434
2435 * c.opt (fsso-struct): Add 'native' value.
2436
2437 2017-01-05 Martin Liska <mliska@suse.cz>
2438
2439 PR pch/78970
2440 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2441 header.
2442
2443 2017-01-04 Marek Polacek <polacek@redhat.com>
2444
2445 PR c++/64767
2446 * c.opt (Wpointer-compare): New option.
2447
2448 2017-01-04 Jakub Jelinek <jakub@redhat.com>
2449
2450 PR driver/78957
2451 * c.opt (fsso-struct=): Add RejectNegative.
2452
2453 2017-01-01 Jakub Jelinek <jakub@redhat.com>
2454
2455 Update copyright years.
2456
2457 2016-12-29 Martin Liska <mliska@suse.cz>
2458
2459 PR c/78933
2460 * c.opt (strong-eval-order): Add RejectNegative keyword.
2461
2462 2016-12-22 Jason Merrill <jason@redhat.com>
2463
2464 Implement P0522R0, matching of template template arguments.
2465 * c-cppbuiltin.c (c_cpp_builtins): Define
2466 __cpp_template_template_args.
2467
2468 2016-12-21 Jakub Jelinek <jakub@redhat.com>
2469
2470 PR bootstrap/78817
2471 * c-common.c (struct nonnull_arg_ctx): New type.
2472 (check_function_nonnull): Return bool instead of void. Use
2473 nonnull_arg_ctx as context rather than just location_t.
2474 (check_nonnull_arg): Adjust for the new context type, set
2475 warned_p to true if a warning has been diagnosed.
2476 (check_function_arguments): Return bool instead of void.
2477 * c-common.h (check_function_arguments): Adjust prototype.
2478
2479 2016-12-21 Jason Merrill <jason@redhat.com>
2480
2481 * c.opt (-fnew-ttp-matching): New flag.
2482 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2483
2484 2016-12-14 Martin Jambor <mjambor@suse.cz>
2485
2486 * c-omp.c: Include omp-general.h instead of omp-low.h.
2487 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2488 name.
2489
2490 2016-12-14 Martin Sebor <msebor@redhat.com>
2491
2492 PR c/17308
2493 * c-common.c (check_nonnull_arg): Disable when optimization
2494 is enabled.
2495
2496 2016-12-12 Marek Polacek <polacek@redhat.com>
2497
2498 PR c++/78647
2499 * c-common.c (attribute_fallthrough_p): Return false for
2500 error_mark_node.
2501
2502 2016-12-08 Martin Sebor <msebor@redhat.com>
2503
2504 PR c/78284
2505 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2506
2507 2016-12-08 Martin Sebor <msebor@redhat.com>
2508
2509 PR c/78165
2510 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2511 suffix.
2512
2513 2016-12-07 Martin Sebor <msebor@redhat.com>
2514
2515 PR c/53562
2516 PR middle-end/77784
2517 PR middle-end/78149
2518 PR middle-end/78138
2519 * c.opt (-Wstringop-overflow): New option.
2520
2521 2016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2522
2523 * c-attribs.c (asan odr indicator): New attribute.
2524 (handle_asan_odr_indicator_attribute): New function.
2525
2526 2016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2527
2528 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2529 ptrdiff_type_node;
2530
2531 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2532
2533 * c-common.c (excess_precision_mode_join): New.
2534 (c_ts18661_flt_eval_method): New.
2535 (c_c11_flt_eval_method): Likewise.
2536 (c_flt_eval_method): Likewise.
2537 * c-common.h (excess_precision_mode_join): New.
2538 (c_flt_eval_method): Likewise.
2539 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2540 (cpp_iec_559_value): Call it.
2541 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2542 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2543 __FLT_EVAL_METHOD_TS_18661_3__.
2544
2545 2016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2546
2547 * c-opts.c (c_common_post_options): Add logic to handle the default
2548 case for -fpermitted-flt-eval-methods.
2549
2550 2016-11-23 Paolo Bonzini <bonzini@gnu.org>
2551
2552 * c.opt (Wexpansion-to-defined): New.
2553
2554 2016-11-23 Jakub Jelinek <jakub@redhat.com>
2555
2556 PR target/78451
2557 * c-pragma.c (handle_pragma_target): Don't replace
2558 current_target_pragma, but chainon the new args to the current one.
2559
2560 2016-11-22 Nathan Sidwell <nathan@acm.org>
2561
2562 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
2563 indentation and formatting.
2564
2565 2016-11-21 Martin Sebor <msebor@redhat.com>
2566
2567 * c.opt (-fprintf-return-value): Enable by default.
2568
2569 2016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2570
2571 PR c++/71973
2572 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2573 * c-common.c (c_common_nodes_and_builtins): Initialize
2574 const_tm_ptr_type_node.
2575
2576 2016-11-16 Marek Polacek <polacek@redhat.com>
2577
2578 PR c/78285
2579 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2580
2581 2016-11-14 Jakub Jelinek <jakub@redhat.com>
2582
2583 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2584
2585 2016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
2586 Richard Biener <rguenther@suse.de>
2587
2588 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2589 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2590 * c.opt (fgimple): New option.
2591
2592 2016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2593
2594 PR c/35503
2595 * c-common.h (warn_for_restrict): Declare.
2596 * c-warn.c: Include gcc-rich-location.h.
2597 (warn_for_restrict): New function.
2598 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2599 (gcc_cdiag_char_table): Likewise.
2600 (gcc_cxxdiag_char_table): Likewise.
2601 * c.opt (Wrestrict): New option.
2602
2603 2016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2604
2605 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2606 for nested types only if the type is a record or union and dump SLOC.
2607
2608 2016-11-09 Jason Merrill <jason@redhat.com>
2609
2610 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2611
2612 2016-11-09 Jakub Jelinek <jakub@redhat.com>
2613
2614 * c-ubsan.c (ubsan_instrument_shift): Handle split
2615 -fsanitize=shift-base and -fsanitize=shift-exponent.
2616
2617 2016-11-07 Jason Merrill <jason@redhat.com>
2618
2619 * c.opt (Wc++1z-compat): New.
2620 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2621
2622 2016-11-07 Martin Liska <mliska@suse.cz>
2623
2624 * c-warn.c (warn_for_unused_label): Save all labels used
2625 in goto or in &label.
2626
2627 2016-11-03 Jason Merrill <jason@redhat.com>
2628
2629 * c-cppbuiltin.c (c_cpp_builtins): Correct
2630 __cpp_inheriting_constructors.
2631
2632 2016-11-01 Jason Merrill <jason@redhat.com>
2633
2634 * c-cppbuiltin.c (c_cpp_builtins): Update
2635 __cpp_inheriting_constructors.
2636
2637 * c.opt (-fnew-inheriting-ctors): New.
2638 * c-opts.c: Default to on for ABI 11+.
2639
2640 2016-10-31 Jakub Jelinek <jakub@redhat.com>
2641
2642 PR c++/77948
2643 * c.opt (fext-numeric-literals): Add Var and Init.
2644 * c-opts.c (c_common_handle_option): Don't clear
2645 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
2646 (c_common_post_options): Clear it here if not set
2647 explicitly.
2648
2649 2016-10-28 Aldy Hernandez <aldyh@redhat.com>
2650
2651 PR debug/77773
2652 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
2653 if NULL.
2654
2655 2016-10-25 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
2658 * c-common.c (c_common_reswords): Add __builtin_launder.
2659
2660 2016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
2661
2662 * c-common.c (c_common_truthvalue_conversion): Warn for
2663 multiplications in boolean context. Fix the quoting of '<<' and '<'
2664 in the shift warning.
2665
2666 2016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
2667
2668 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
2669
2670 2016-10-20 Jason Merrill <jason@redhat.com>
2671
2672 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
2673
2674 2016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2675
2676 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
2677 integer shift ops in boolean context.
2678
2679 2016-10-18 Aldy Hernandez <aldyh@redhat.com>
2680
2681 * c.opt (Walloca): New.
2682 (Walloca-larger-than=): New.
2683 (Wvla-larger-than=): New.
2684
2685 2016-10-17 Marek Polacek <polacek@redhat.com>
2686
2687 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
2688 Return immediately when finding a match.
2689 (warn_tautological_cmp): Remove a boolean variable that is no longer
2690 needed.
2691
2692 2016-10-17 Marek Polacek <polacek@redhat.com>
2693
2694 * c-attribs.c: New file.
2695 * c-common.c: Move attributes handling to c-attribs.c.
2696 (get_nonnull_operand): No longer static.
2697 * c-common.h: Move the declarations from c-attribs.c to its own section.
2698
2699 2016-10-14 Jason Merrill <jason@redhat.com>
2700
2701 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
2702 and __cpp_deduction_guides.
2703
2704 2016-10-13 Jason Merrill <jason@redhat.com>
2705
2706 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
2707
2708 2016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
2709
2710 * c-cppbuiltin.c: Include memmodel.h.
2711 * c-opts.c: Likewise.
2712 * c-pragma.c: Likewise.
2713 * c-warn.c: Likewise.
2714
2715 2016-10-12 Jakub Jelinek <jakub@redhat.com>
2716
2717 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
2718 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
2719 * c-opts.c (sanitize_cpp_opts): Initialize
2720 cpp_opts->cpp_warn_implicit_fallthrough.
2721
2722 2016-10-11 Marek Polacek <polacek@redhat.com>
2723
2724 * c-common.c (warning_candidate_p): Change the return type to bool
2725 and return true/false instead of 1/0.
2726 (vector_mode_valid_p): Likewise.
2727
2728 2016-10-11 Marek Polacek <polacek@redhat.com>
2729
2730 * c-common.c (fold_for_warn): No longer static.
2731 (bool_promoted_to_int_p): Likewise.
2732 (c_common_get_narrower): Likewise.
2733 (constant_expression_warning): Move to c-warn.c.
2734 (constant_expression_error): Likewise.
2735 (overflow_warning): Likewise.
2736 (warn_logical_operator): Likewise.
2737 (find_array_ref_with_const_idx_r): Likewise.
2738 (warn_tautological_cmp): Likewise.
2739 (expr_has_boolean_operands_p): Likewise.
2740 (warn_logical_not_parentheses): Likewise.
2741 (warn_if_unused_value): Likewise.
2742 (strict_aliasing_warning): Likewise.
2743 (sizeof_pointer_memaccess_warning): Likewise.
2744 (check_main_parameter_types): Likewise.
2745 (conversion_warning): Likewise.
2746 (warnings_for_convert_and_check): Likewise.
2747 (match_case_to_enum_1): Likewise.
2748 (match_case_to_enum): Likewise.
2749 (c_do_switch_warnings): Likewise.
2750 (warn_for_omitted_condop): Likewise.
2751 (readonly_error): Likewise.
2752 (lvalue_error): Likewise.
2753 (invalid_indirection_error): Likewise.
2754 (warn_array_subscript_with_type_char): Likewise.
2755 (warn_about_parentheses): Likewise.
2756 (warn_for_unused_label): Likewise.
2757 (warn_for_div_by_zero): Likewise.
2758 (warn_for_memset): Likewise.
2759 (warn_for_sign_compare): Likewise.
2760 (do_warn_double_promotion): Likewise.
2761 (do_warn_unused_parameter): Likewise.
2762 (record_locally_defined_typedef): Likewise.
2763 (maybe_record_typedef_use): Likewise.
2764 (maybe_warn_unused_local_typedefs): Likewise.
2765 (maybe_warn_bool_compare): Likewise.
2766 (maybe_warn_shift_overflow): Likewise.
2767 (warn_duplicated_cond_add_or_warn): Likewise.
2768 (diagnose_mismatched_attributes): Likewise.
2769 * c-common.h: Move the declarations from c-warn.c to its own section.
2770 * c-warn.c: New file.
2771
2772 2016-10-08 Jason Merrill <jason@redhat.com>
2773
2774 * c-common.c (c_common_truthvalue_conversion): Don't distribute
2775 into COND_EXPR in C++.
2776
2777 2016-10-08 Jakub Jelinek <jakub@redhat.com>
2778
2779 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
2780 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
2781 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
2782
2783 2016-10-07 Jakub Jelinek <jakub@redhat.com>
2784
2785 Implement LWG2296 helper intrinsic
2786 * c-common.h (enum rid): Add RID_ADDRESSOF.
2787 * c-common.c (c_common_reswords): Add __builtin_addressof.
2788
2789 2016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
2790
2791 PR c++/77700
2792 * c-common.c (c_common_truthvalue_conversion): Warn also for
2793 suspicious enum values in boolean context.
2794
2795 2016-10-06 Jakub Jelinek <jakub@redhat.com>
2796
2797 Implement P0258R2 - helper for C++17
2798 std::has_unique_object_representations trait
2799 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
2800 * c-common.c (c_common_reswords): Add
2801 __has_unique_object_representations.
2802
2803 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR sanitizer/66343
2806 * c-ubsan.c (ubsan_instrument_return): Don't call
2807 initialize_sanitizer_builtins here.
2808
2809 2016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2810
2811 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
2812 conditional expression in boolean context when only one arm is
2813 non-boolean.
2814
2815 2016-10-05 Jakub Jelinek <jakub@redhat.com>
2816
2817 PR sanitizer/77823
2818 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
2819 is not integral.
2820
2821 * c-common.c (c_common_reswords): Update comment for C++11.
2822
2823 2016-10-04 Jason Merrill <jason@redhat.com>
2824
2825 * c-common.c (make_tree_vector_from_ctor): New.
2826 * c-common.h: Declare it.
2827
2828 2016-10-04 Jakub Jelinek <jakub@redhat.com>
2829
2830 * c-cppbuiltin.c (c_cpp_builtins): Don't define
2831 __LIBGCC_JCR_SECTION_NAME__.
2832
2833 2016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
2834
2835 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
2836 left shift in boolean context.
2837
2838 2016-09-29 Jakub Jelinek <jakub@redhat.com>
2839
2840 Implement P0001R1 - C++17 removal of register storage class specifier
2841 * c.opt (Wregister): New warning.
2842 * c-opts.c (c_common_post_options): Enable -Wregister by
2843 default for C++17.
2844
2845 2016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
2846
2847 * c-opts.c (c_common_post_options): Remove special case for
2848 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
2849 in C++.
2850
2851 2016-09-27 Jakub Jelinek <jakub@redhat.com>
2852
2853 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
2854 -std=c++1z.
2855
2856 * c-ada-spec.c (print_ada_declaration): Remove break after return.
2857
2858 2016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
2859
2860 * c-common.c: Include memmodel.h.
2861
2862 2016-09-26 Marek Polacek <polacek@redhat.com>
2863
2864 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
2865
2866 2016-09-26 Marek Polacek <polacek@redhat.com>
2867
2868 PR c/7652
2869 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
2870 (handle_fallthrough_attribute): New function.
2871 (attribute_fallthrough_p): New function.
2872 * c-common.h (attribute_fallthrough_p): Declare.
2873
2874 2016-09-24 Marek Polacek <polacek@redhat.com>
2875
2876 PR c/77490
2877 * c.opt (Wbool-operation): New.
2878
2879 2016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2880
2881 * c-common.c (c_common_truthvalue_conversion): Inhibit
2882 Wint-in-bool-context warning with from_macro_definition_at.
2883 Mention the expression will always evaluate to true.
2884
2885 2016-09-21 Martin Sebor <msebor@redhat.com>
2886
2887 PR bootstrap/77676
2888 * c.opt (fprintf-return-value): Temporarily initialize to zero
2889 to unblock bootstrap failures.
2890
2891 2016-09-21 Jakub Jelinek <jakub@redhat.com>
2892
2893 PR c++/77651
2894 * c.opt (Waligned-new=): Add RejectNegative.
2895 (faligned-new=): Likewise. Spelling fix - change
2896 aligned_new_threshhold to aligned_new_threshold.
2897 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
2898 to aligned_new_threshold.
2899
2900 2016-09-20 Martin Sebor <msebor@redhat.com>
2901
2902 PR middle-end/49905
2903 * c.opt: Add -Wformat-length and -fprintf-return-value.
2904
2905 2016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2906
2907 PR c++/77434
2908 * c.opt (Wint-in-bool-context): New warning.
2909 * c-common.c (c_common_truthvalue_conversion): Warn on integer
2910 constants in boolean context.
2911
2912 2016-09-19 Joseph Myers <joseph@codesourcery.com>
2913
2914 * c-common.c (max_align_t_align): Also consider alignment of
2915 float128_type_node.
2916
2917 2016-09-15 Jason Merrill <jason@redhat.com>
2918
2919 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
2920 DECL_EXTERNAL.
2921
2922 2016-09-14 Jason Merrill <jason@redhat.com>
2923
2924 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2925 limit FIELD_DECL, either.
2926
2927 2016-09-14 Marek Polacek <polacek@redhat.com>
2928
2929 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
2930 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
2931 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
2932
2933 2016-09-13 David Malcolm <dmalcolm@redhat.com>
2934
2935 * c-common.c (warn_logical_not_parentheses): Replace
2936 rich_location::add_fixit_insert calls with add_fixit_insert_before
2937 and add_fixit_insert_after, eliminating the "next_loc" calculation.
2938
2939 2016-09-13 Jason Merrill <jason@redhat.com>
2940 Tom de Vries <tom@codesourcery.com>
2941
2942 PR c++/77427
2943 * c-common.c (set_underlying_type): Don't treat array as builtin type.
2944
2945 2016-09-13 Jason Merrill <jason@redhat.com>
2946
2947 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
2948 limit types at all.
2949
2950 2016-09-12 Jason Merrill <jason@redhat.com>
2951
2952 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
2953 bit/byte confusion, allow large alignment for types.
2954
2955 2016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
2956
2957 PR c++/77496
2958 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
2959
2960 2016-09-12 David Malcolm <dmalcolm@redhat.com>
2961
2962 PR c/72858
2963 * c-format.c (argument_parser::check_argument_type): Add params
2964 "type_start" and "conversion_char". Use the former to generate
2965 offset_to_type_start and pass it and conversion_char to
2966 check_format_types.
2967 (check_format_info_main): Capture the start of the type
2968 information as "type_start", and pass it an format_char
2969 to arg_parser.check_argument_type.
2970 (check_format_types): Provide an example in the leading comment.
2971 Add params "offset_to_type_start" and "conversion_char"; pass
2972 them to format_type_warning calls.
2973 (test_get_modifier_for_format_len): Likewise.
2974 (matching_type_p): New function.
2975 (get_format_for_type): Add param "conversion_char" and move
2976 implementation into...
2977 (get_format_for_type_1): ...new function, called twice.
2978 Use new function matching_type_p rather than checking for
2979 TYPE_CANONICAL equality.
2980 (get_corrected_substring): New function.
2981 (format_type_warning): Provide an example in the leading comment.
2982 Add params "offset_to_type_start" and "conversion_char". Replace
2983 call to get_format_for_type with call to get_corrected_substring
2984 and move rejection of hints for widths/precisions there.
2985 (assert_format_for_type_streq): Add param "conversion_char".
2986 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
2987 (test_get_format_for_type_printf): Add conversion chars to the
2988 tests, adding coverage for various combinations of integer
2989 vs double conversions, and for preserving octal and hexadecimal
2990 conversions.
2991 (test_get_format_for_type_scanf): Add conversion chars to the
2992 tests.
2993
2994 2016-09-10 Tom de Vries <tom@codesourcery.com>
2995
2996 PR C/71602
2997 * c-common.c (build_va_arg): Handle more strict
2998 targetm.canonical_va_list_type. Replace first argument type error with
2999 assert.
3000
3001 2016-09-09 Martin Sebor <msebor@redhat.com>
3002
3003 PR c/77520
3004 PR c/77521
3005 * c-format.c (argument_parser::find_format_char_info): Use %qc
3006 format directive unconditionally.
3007
3008 2016-09-09 Jason Merrill <jason@redhat.com>
3009
3010 Implement C++17 new of over-aligned types.
3011 * c.opt: Add -faligned-new and -Waligned-new.
3012 * c-common.c (max_align_t_align): Split out from...
3013 (cxx_fundamental_alignment_p): ...here.
3014 * c-common.h: Declare it.
3015 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3016
3017 2016-09-09 Joseph Myers <joseph@codesourcery.com>
3018
3019 * c-cppbuiltin.c (builtin_define_type_width): New function.
3020 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3021 macros.
3022
3023 2016-09-07 David Malcolm <dmalcolm@redhat.com>
3024
3025 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3026 a POINTER_TYPE.
3027 (substring_loc::get_location): Move to substring-locations.c,
3028 keeping implementation as...
3029 (c_get_substring_location): New function, from the above, reworked
3030 to use accessors rather than member lookup.
3031 * c-common.h (class substring_loc): Move to substring-locations.h,
3032 replacing with a forward decl.
3033 (c_get_substring_location): New decl.
3034 * c-format.c: Include "substring-locations.h".
3035 (format_warning_va): Move to substring-locations.c.
3036 (format_warning_at_substring): Likewise.
3037
3038 2016-09-06 Martin Sebor <msebor@redhat.com>
3039
3040 PR c/77336
3041 * c-format.c (check_function_format): Avoid issuing warnings for
3042 functions unless they call format functions with non-constant
3043 format strings.
3044
3045 2016-09-06 Richard Biener <rguenther@suse.de>
3046
3047 PR c/77450
3048 * c-common.c (c_common_mark_addressable_vec): Handle
3049 COMPOUND_LITERAL_EXPR.
3050
3051 2016-09-05 Marek Polacek <polacek@redhat.com>
3052
3053 PR c/77423
3054 * c-common.c (bool_promoted_to_int_p): New function.
3055 (expr_has_boolean_operands_p): New function.
3056 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3057 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3058
3059 2016-09-04 Tom de Vries <tom@codesourcery.com>
3060
3061 revert:
3062 2016-08-29 Tom de Vries <tom@codesourcery.com>
3063
3064 * c-common.c (build_va_arg): Replace first argument type error
3065 with assert.
3066
3067 2016-09-02 Jakub Jelinek <jakub@redhat.com>
3068
3069 PR c/65467
3070 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3071 (c_finish_omp_for): Reject _Atomic qualified iterators.
3072
3073 2016-09-01 Martin Sebor <msebor@redhat.com>
3074
3075 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3076 size to guarantee it fits the output of the formatted function
3077 regardless of its arguments.
3078
3079 2016-09-01 Marek Polacek <polacek@redhat.com>
3080
3081 PR c/7652
3082 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3083 FALLTHRU comments.
3084
3085 2016-08-29 Marek Polacek <polacek@redhat.com>
3086
3087 PR c/77292
3088 * c-common.c (warn_logical_not_parentheses): Don't warn for
3089 a comparison or a logical operator.
3090
3091 2016-08-29 Tom de Vries <tom@codesourcery.com>
3092
3093 * c-common.c (build_va_arg): Fix type comparison assert.
3094
3095 2016-08-29 Tom de Vries <tom@codesourcery.com>
3096
3097 * c-common.c (build_va_arg): Replace first argument type error
3098 with assert.
3099
3100 2016-08-29 Tom de Vries <tom@codesourcery.com>
3101
3102 PR c/77398
3103 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3104 with error_mark_node as va_list instead of with illegal va_list.
3105
3106 2016-08-25 Marek Polacek <polacek@redhat.com>
3107 David Malcolm <dmalcolm@redhat.com>
3108
3109 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3110 * c-common.h (warn_logical_not_parentheses): Update declaration.
3111
3112 2016-08-22 Marek Polacek <polacek@redhat.com>
3113
3114 PR c++/77321
3115 * c-common.c (warn_for_memset): Check type for null.
3116
3117 2016-08-22 Joseph Myers <joseph@codesourcery.com>
3118
3119 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
3120 _FloatNx types for suffixes for built-in functions.
3121
3122 2016-08-19 Joseph Myers <joseph@codesourcery.com>
3123
3124 PR c/32187
3125 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3126 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3127 (RID_FLOAT128X): New enum rid values.
3128 (CASE_RID_FLOATN_NX): New macro.
3129 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3130 keywords.
3131 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3132 corresponding complex types.
3133 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3134 _FloatNx and corresponding complex types.
3135 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3136 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3137 and _FloatNx types for the widest type for determining
3138 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3139 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3140 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3141 and _FloatNx types.
3142 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3143 constants.
3144 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3145 _FloatNx types.
3146
3147 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3148
3149 * c-opts.c (c_diagnostic_finalizer): Update for change to
3150 diagnostic_show_locus.
3151
3152 2016-08-18 David Malcolm <dmalcolm@redhat.com>
3153
3154 * c-common.c: Include "spellcheck.h".
3155 (cb_get_suggestion): New function.
3156 * c-common.h (cb_get_suggestion): New decl.
3157 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3158 cb_get_suggestion.
3159
3160 2016-08-18 Marek Polacek <polacek@redhat.com>
3161
3162 PR c/71514
3163 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3164 and pointer-to-VLA.
3165
3166 2016-08-16 David Malcolm <dmalcolm@redhat.com>
3167
3168 PR c/72857
3169 * c-common.c (substring_loc::get_range): Rename to...
3170 (substring_loc::get_location): ...this, converting param from a
3171 source_range * to a location_t *. Call
3172 get_source_location_for_substring rather than
3173 get_source_range_for_substring, and pass in m_caret_idx.
3174 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3175 (substring_loc::get_range): Replace with...
3176 (substring_loc::get_location): ...this.
3177 (substring_loc::set_caret_index): New method.
3178 (substring_loc): Add field m_caret_idx.
3179 * c-format.c (format_warning_va): Update for above changes.
3180 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3181 clashing with type name.
3182 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3183 (check_argument_type): Likewise.
3184 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3185 Use a copy when emitting warnings, setting the caret index from TYPE.
3186
3187 2016-08-16 Eric Botcazou <ebotcazou@adacore.com>
3188 Arnaud Charlet <charlet@adacore.com>
3189
3190 * c-ada-spec.c (dump_number): New function.
3191 (handle_escape_character): Likewise.
3192 (print_ada_macros): Add handling of constant integers and strings.
3193
3194 2016-08-12 Marek Polacek <polacek@redhat.com>
3195
3196 PR c/7652
3197 * c-common.c (scalar_to_vector): Adjust fall through comment.
3198 * c-opts.c (c_common_handle_option): Likewise.
3199 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3200 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3201 fall through comment.
3202 * cilk.c (extract_free_variables): Add FALLTHRU.
3203
3204 2016-08-10 Jason Merrill <jason@redhat.com>
3205
3206 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3207
3208 2016-08-09 Jason Merrill <jason@redhat.com>
3209
3210 * c-common.c (c_common_attribute_table): vector_size affects type
3211 identity.
3212
3213 2016-08-09 Marek Polacek <polacek@redhat.com>
3214
3215 PR c/7652
3216 * c-ada-spec.c (dump_generic_ada_node): Add return.
3217
3218 2016-08-09 Jason Merrill <jason@redhat.com>
3219
3220 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3221 C++17 constexpr lambdas.
3222
3223 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3224
3225 PR c/64955
3226 * c-common.h (selftest::c_format_c_tests): New declaration.
3227 (selftest::run_c_tests): New declaration.
3228 * c-format.c: Include "selftest.h.
3229 (format_warning_va): Add param "corrected_substring" and use
3230 it to add a replacement fix-it hint.
3231 (format_warning_at_substring): Likewise.
3232 (format_warning_at_char): Update for new param of
3233 format_warning_va.
3234 (argument_parser::check_argument_type): Pass "fki" to
3235 check_format_types.
3236 (check_format_types): Add param "fki" and pass it to
3237 format_type_warning.
3238 (deref_n_times): New function.
3239 (get_modifier_for_format_len): New function.
3240 (selftest::test_get_modifier_for_format_len): New function.
3241 (get_format_for_type): New function.
3242 (format_type_warning): Add param "fki" and use it to attempt
3243 to provide hints for argument types when calling
3244 format_warning_at_substring.
3245 (selftest::get_info): New function.
3246 (selftest::assert_format_for_type_streq): New function.
3247 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3248 (selftest::test_get_format_for_type_printf): New function.
3249 (selftest::test_get_format_for_type_scanf): New function.
3250 (selftest::c_format_c_tests): New function.
3251
3252 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3253
3254 PR c/52952
3255 * c-format.c: Include "diagnostic.h".
3256 (location_column_from_byte_offset): Delete.
3257 (location_from_offset): Delete.
3258 (format_warning_va): New function.
3259 (format_warning_at_substring): New function.
3260 (format_warning_at_char): New function.
3261 (check_format_arg): Capture location of format_tree and pass to
3262 check_format_info_main.
3263 (argument_parser): Add fields "start_of_this_format" and
3264 "format_string_cst".
3265 (flag_chars_t::validate): Add param "format_string_cst". Convert
3266 warning_at call using location_from_offset to call to
3267 format_warning_at_char.
3268 (argument_parser::argument_parser): Add param "format_string_cst_"
3269 and use use it to initialize field "format_string_cst".
3270 Initialize new field "start_of_this_format".
3271 (argument_parser::read_format_flags): Convert warning_at call
3272 using location_from_offset to a call to format_warning_at_char.
3273 (argument_parser::read_any_format_left_precision): Likewise.
3274 (argument_parser::read_any_format_precision): Likewise.
3275 (argument_parser::read_any_other_modifier): Likewise.
3276 (argument_parser::find_format_char_info): Likewise, in three places.
3277 (argument_parser::parse_any_scan_set): Likewise, in one place.
3278 (argument_parser::handle_conversions): Likewise, in two places.
3279 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3280 and use it to make a substring_loc. Pass the latter to
3281 check_format_types.
3282 (check_format_info_main): Add params "fmt_param_loc" and
3283 "format_string_cst". Convert warning_at calls using
3284 location_from_offset to calls to format_warning_at_char. Pass the
3285 new params to the arg_parser ctor. Pass "format_string_cst" to
3286 flag_chars.validate. Pass "fmt_param_loc" to
3287 arg_parser.check_argument_type.
3288 (check_format_types): Convert first param from a location_t
3289 to a const substring_loc & and rename to "fmt_loc". Attempt
3290 to extract the range of the relevant parameter and pass it
3291 to format_type_warning.
3292 (format_type_warning): Convert first param from a location_t
3293 to a const substring_loc & and rename to "fmt_loc". Add
3294 params "param_range" and "type". Replace calls to warning_at
3295 with calls to format_warning_at_substring.
3296
3297 2016-08-08 David Malcolm <dmalcolm@redhat.com>
3298
3299 * c-format.c (class flag_chars_t): New class.
3300 (struct length_modifier): New struct.
3301 (class argument_parser): New class.
3302 (flag_chars_t::flag_chars_t): New ctor.
3303 (flag_chars_t::has_char_p): New method.
3304 (flag_chars_t::add_char): New method.
3305 (flag_chars_t::validate): New method.
3306 (flag_chars_t::get_alloc_flag): New method.
3307 (flag_chars_t::assignment_suppression_p): New method.
3308 (argument_parser::argument_parser): New ctor.
3309 (argument_parser::read_any_dollar): New method.
3310 (argument_parser::read_format_flags): New method.
3311 (argument_parser::read_any_format_width): New method.
3312 (argument_parser::read_any_format_left_precision): New method.
3313 (argument_parser::read_any_format_precision): New method.
3314 (argument_parser::handle_alloc_chars): New method.
3315 (argument_parser::read_any_length_modifier): New method.
3316 (argument_parser::read_any_other_modifier): New method.
3317 (argument_parser::find_format_char_info): New method.
3318 (argument_parser::validate_flag_pairs): New method.
3319 (argument_parser::give_y2k_warnings): New method.
3320 (argument_parser::parse_any_scan_set): New method.
3321 (argument_parser::handle_conversions): New method.
3322 (argument_parser::check_argument_type): New method.
3323 (check_format_info_main): Introduce classes argument_parser
3324 and flag_chars_t, moving the code within the loop into methods
3325 of these classes. Make various locals "const".
3326
3327 2016-08-05 David Malcolm <dmalcolm@redhat.com>
3328
3329 * c-common.c: Include "substring-locations.h".
3330 (get_cpp_ttype_from_string_type): New function.
3331 (g_string_concat_db): New global.
3332 (substring_loc::get_range): New method.
3333 * c-common.h (g_string_concat_db): New declaration.
3334 (class substring_loc): New class.
3335 * c-lex.c (lex_string): When concatenating strings, capture the
3336 locations of all tokens using a new obstack, and record the
3337 concatenation locations within g_string_concat_db.
3338 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3339 on the ggc-heap.
3340
3341 2016-07-29 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/71926
3344 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3345 parentheses warning.
3346
3347 PR c/71574
3348 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3349
3350 2016-07-28 Martin Liska <mliska@suse.cz>
3351
3352 PR gcov-profile/68025
3353 * c-common.c (handle_no_profile_instrument_function_attribute):
3354
3355 2016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3356
3357 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3358 BITS_PER_UNIT_LOG.
3359
3360 2016-07-25 Jason Merrill <jason@redhat.com>
3361
3362 PR c++/65970
3363 * c.opt (fconstexpr-loop-limit): New.
3364
3365 2016-07-22 Martin Sebor <msebor@redhat.com>
3366
3367 PR c++/71675
3368 * c-common.c (resolve_overloaded_builtin): Avoid converting
3369 __atomic_compare_exchange_n return type to that of what its
3370 first argument points to.
3371
3372 2016-07-22 Uros Bizjak <ubizjak@gmail.com>
3373
3374 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3375 ~(unsigned HOST_WIDE_INT) 0.
3376
3377 2016-07-22 Martin Liska <mliska@suse.cz>
3378
3379 PR gcov-profile/69028
3380 PR gcov-profile/62047
3381 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3382 to the current_function_decl.
3383
3384 2016-07-21 Jason Merrill <jason@redhat.com>
3385
3386 PR c++/65168
3387 * c-common.c (c_common_truthvalue_conversion): Check
3388 c_inhibit_evaluation_warnings for warning about address of
3389 reference.
3390
3391 2016-07-20 David Malcolm <dmalcolm@redhat.com>
3392
3393 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3394 const char *.
3395
3396 2016-07-15 Jason Merrill <jason@redhat.com>
3397
3398 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3399
3400 2016-07-15 Jakub Jelinek <jakub@redhat.com>
3401
3402 PR c/71858
3403 * c-common.h (enum lookup_name_fuzzy_kind): Add
3404 FUZZY_LOOKUP_FUNCTION_NAME.
3405
3406 2016-07-08 Jason Merrill <jason@redhat.com>
3407
3408 P0145: Refining Expression Order for C++.
3409 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3410 * c-opts.c: Adjust.
3411
3412 2016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3413
3414 PR c++/71214
3415 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3416
3417 2016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3418
3419 * c-pragma.h (enum pragma_kind): Rename
3420 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3421 users.
3422
3423 2016-06-29 Richard Biener <rguenther@suse.de>
3424
3425 PR middle-end/71002
3426 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3427
3428 2016-06-24 Jason Merrill <jason@redhat.com>
3429
3430 P0145R2: Refining Expression Order for C++.
3431 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3432 MODIFY_EXPR.
3433
3434 2016-06-24 Jakub Jelinek <jakub@redhat.com>
3435
3436 * c-common.c (check_builtin_function_arguments): Require last
3437 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3438 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3439 if the last argument is pointer to enumerated or boolean type.
3440
3441 2016-06-22 David Malcolm <dmalcolm@redhat.com>
3442
3443 PR c/70339
3444 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3445 (lookup_name_fuzzy): New prototype.
3446
3447 2016-06-21 John David Anglin <danglin@gcc.gnu.org>
3448
3449 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3450
3451 2016-06-14 Jason Merrill <jason@redhat.com>
3452
3453 P0145R2: Refining Expression Order for C++.
3454 * c.opt (fargs-in-order): New.
3455 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3456
3457 2016-06-13 Jakub Jelinek <jakub@redhat.com>
3458
3459 PR sanitizer/71498
3460 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3461 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3462
3463 PR preprocessor/71183
3464 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3465 to cb_get_source_date_epoch.
3466
3467 2016-06-10 Jakub Jelinek <jakub@redhat.com>
3468
3469 PR c/68657
3470 * c.opt (Wpsabi): Add Warning flag.
3471
3472 2016-06-10 Martin Sebor <msebor@redhat.com>
3473
3474 PR c/71392
3475 * c-common.c (handle_nonnull_attribute): Accept
3476 the nonnull attribute in type-generic builtins.
3477
3478 2016-06-09 Martin Sebor <msebor@redhat.com>
3479
3480 PR c/70883
3481 * c-common.c (builtin_function_validate_nargs): Make text of error
3482 message consistent with others like it.
3483
3484 2016-06-08 Martin Sebor <msebor@redhat.com>
3485 Jakub Jelinek <jakub@redhat.com>
3486
3487 PR c++/70507
3488 PR c/68120
3489 * c-common.c (check_builtin_function_arguments): Handle
3490 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3491
3492 2016-06-08 Richard Biener <rguenther@suse.de>
3493
3494 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3495
3496 2016-06-07 Richard Biener <rguenther@suse.de>
3497
3498 PR c/61564
3499 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3500 options and warn about others.
3501
3502 2016-06-01 Eduard Sanou <dhole@openmailbox.org>
3503
3504 * c-common.c (get_source_date_epoch): Rename to
3505 cb_get_source_date_epoch.
3506 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3507 message when the parsing fails. Use error_at instead of fatal_error.
3508 * c-common.h (get_source_date_epoch): Rename to
3509 cb_get_source_date_epoch.
3510 * c-common.h (cb_get_source_date_epoch): Prototype.
3511 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3512 * c-common.h (c_omp_region_type): Remove trailing comma.
3513 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3514 * c-lex.c (c_lex_with_flags): Remove initialization of
3515 pfile->source_date_epoch.
3516
3517 2016-05-30 Jakub Jelinek <jakub@redhat.com>
3518
3519 PR c++/71349
3520 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3521 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3522 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3523 instead of C_OMP_CLAUSE_SPLIT_FOR.
3524
3525 2016-05-24 Richard Biener <rguenther@suse.de>
3526
3527 PR middle-end/70434
3528 PR c/69504
3529 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3530 (convert_vector_to_array_for_subscript): ... this.
3531 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3532 VIEW_CONVERT_EXPR to an array type. Rename to ...
3533 (convert_vector_to_array_for_subscript): ... this.
3534
3535 2016-05-12 Marek Polacek <polacek@redhat.com>
3536
3537 PR c/70756
3538 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3539 size_in_bytes and pass LOC to it.
3540
3541 2016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3542
3543 PR c/43651
3544 * c.opt (Wduplicate-decl-specifier): New option.
3545
3546 2016-05-11 Marek Polacek <polacek@redhat.com>
3547
3548 PR c++/71024
3549 * c-common.c (diagnose_mismatched_attributes): New function.
3550 * c-common.h (diagnose_mismatched_attributes): Declare.
3551
3552 2016-05-04 Marek Polacek <polacek@redhat.com>
3553
3554 * c.opt (Wdangling-else): New option.
3555
3556 2016-05-03 Marek Polacek <polacek@redhat.com>
3557
3558 PR c/70859
3559 * c-common.c (builtin_function_validate_nargs): Add location
3560 parameter. Use it.
3561 (check_builtin_function_arguments): Add location and arguments
3562 parameters. Use them.
3563 * c-common.h (check_builtin_function_arguments): Update declaration.
3564
3565 2016-05-03 Richard Biener <rguenther@suse.de>
3566
3567 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3568 allow call args to gimplify to SSA names.
3569
3570 2016-05-03 Marek Polacek <polacek@redhat.com>
3571
3572 * c-common.h (enum c_omp_region_type): Remove stray comma.
3573
3574 2016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3575
3576 * c-common.h (enum c_omp_region_type): Define.
3577
3578 2016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3579
3580 * c-common.c (shorten_compare): Use wi::to_wide.
3581
3582 2016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3583
3584 PR middle-end/70626
3585 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3586 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3587 reduction clauses in acc parallel loops.
3588
3589 2016-04-29 Marek Polacek <polacek@redhat.com>
3590
3591 PR c/70852
3592 * c-common.c (warn_for_memset): Check domain before accessing it.
3593
3594 2016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3595
3596 PR/69089
3597 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3598 "aligned" attribute.
3599
3600 2016-04-28 Jason Merrill <jason@redhat.com>
3601
3602 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3603
3604 2016-04-28 Eduard Sanou <dhole@openmailbox.org>
3605 Matthias Klose <doko@debian.org>
3606
3607 * c-common.c (get_source_date_epoch): New function, gets the environment
3608 variable SOURCE_DATE_EPOCH and parses it as long long with error
3609 handling.
3610 * c-common.h (get_source_date_epoch): Prototype.
3611 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3612
3613 2015-04-27 Ryan Burn <contact@rnburn.com>
3614
3615 PR c++/69024
3616 PR c++/68997
3617 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3618 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3619 external linkage.
3620 (cilk_detect_and_unwrap): Corresponding changes.
3621 (extract_free_variables): Don't extract free variables from
3622 AGGR_INIT_EXPR slot.
3623 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3624 (cilk_recognize_spawn): Likewise.
3625
3626 2016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3627
3628 * c.opt (Wmemset-elt-size): New option.
3629 * c-common.c (warn_for_memset): New function.
3630 * c-common.h (warn_for_memset): Declare.
3631
3632 2016-04-25 Jason Merrill <jason@redhat.com>
3633
3634 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
3635 No longer static.
3636 * c-common.h: Declare it.
3637 * c-lex.c (c_common_has_attribute): Add maybe_unused.
3638
3639 2016-04-22 Jason Merrill <jason@redhat.com>
3640
3641 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
3642
3643 2016-04-20 Ilya Verbin <ilya.verbin@intel.com>
3644
3645 PR c++/69363
3646 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
3647 * c-common.h (c_finish_cilk_clauses): Remove declaration.
3648
3649 2016-04-18 Michael Matz <matz@suse.de>
3650
3651 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
3652 and SET_DECL_ALIGN.
3653
3654 2016-04-17 Eric Botcazou <ebotcazou@adacore.com>
3655
3656 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
3657 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
3658 to incomplete types.
3659 (dump_nested_type): Remove redundant tests and tidy up.
3660 (print_ada_declaration): Also set TREE_VISITED on the declaration of
3661 a type which is the typedef of an original type.
3662
3663 2016-04-15 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/70651
3666 * c-common.c (build_va_arg): Change two asserts into errors and return
3667 error_mark_node.
3668
3669 2016-04-13 Marek Polacek <polacek@redhat.com>
3670
3671 PR c++/70639
3672 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
3673 for switch statements, too.
3674
3675 2016-03-28 Jason Merrill <jason@redhat.com>
3676
3677 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
3678
3679 2016-03-23 Marek Polacek <polacek@redhat.com>
3680
3681 PR c++/69884
3682 * c.opt (Wignored-attributes): New option.
3683
3684 2016-03-22 David Malcolm <dmalcolm@redhat.com>
3685
3686 PR c/69993
3687 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
3688 diagnostic text, reversing the order of the warning and note so
3689 that they appear in source order.
3690
3691 2016-03-17 Marek Polacek <polacek@redhat.com>
3692
3693 PR c/69407
3694 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
3695 operations.
3696
3697 2016-03-14 Jason Merrill <jason@redhat.com>
3698
3699 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
3700
3701 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
3702
3703 2016-03-09 Richard Biener <rguenther@suse.de>
3704
3705 PR c/70143
3706 * c-common.c (strict_aliasing_warning): Add back
3707 alias_sets_conflict_p check.
3708
3709 2016-03-08 Jason Merrill <jason@redhat.com>
3710
3711 * c-opts.c (set_std_cxx1z): Don't enable concepts.
3712
3713 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3714
3715 PR c/68187
3716 * c-indentation.c (get_visual_column): Move code to determine next
3717 tab stop to...
3718 (next_tab_stop): ...this new function.
3719 (line_contains_hash_if): Delete function.
3720 (detect_preprocessor_logic): Delete function.
3721 (get_first_nws_vis_column): New function.
3722 (detect_intervening_unindent): New function.
3723 (should_warn_for_misleading_indentation): Replace call to
3724 detect_preprocessor_logic with a call to
3725 detect_intervening_unindent.
3726
3727 2016-03-04 David Malcolm <dmalcolm@redhat.com>
3728
3729 PR c/68187
3730 * c-indentation.c (should_warn_for_misleading_indentation): When
3731 suppressing warnings about cases where the guard and body are on
3732 the same column, only use the first non-whitespace column in place
3733 of the guard token column when dealing with "else" clauses.
3734 When rejecting aligned BODY and NEXT, loosen the requirement
3735 from equality with the first non-whitespace of guard to simply
3736 that they not be indented relative to it.
3737
3738 2016-03-04 Richard Biener <rguenther@suse.de>
3739
3740 PR c++/70054
3741 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
3742 instead of alias_sets_conflict_p.
3743
3744 2016-03-01 Marek Polacek <polacek@redhat.com>
3745
3746 PR c++/69795
3747 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
3748 any DECL.
3749
3750 2016-02-22 Martin Sebor <msebor@redhat.com>
3751
3752 PR middle-end/69780
3753 * c-common.c (check_builtin_function_arguments): Validate and
3754 reject invalid arguments to __builtin_alloca_with_align.
3755
3756 2016-02-20 Mark Wielaard <mjw@redhat.com>
3757
3758 PR c/28901
3759 * c.opt (Wunused-const-variable): Turn into Alias for...
3760 (Wunused-const-variable=): New option.
3761
3762 2016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3763
3764 PR c++/69865
3765 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
3766 here...
3767 (c_common_init_options): ...to here.
3768 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
3769
3770 2016-02-19 Jakub Jelinek <jakub@redhat.com>
3771
3772 PR c++/69826
3773 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
3774 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
3775 flag_preprocess_only.
3776
3777 2016-02-16 Jakub Jelinek <jakub@redhat.com>
3778
3779 PR c/69835
3780 * c.opt (Wnonnull-compare): Enable for -Wall.
3781
3782 2016-02-15 Jakub Jelinek <jakub@redhat.com>
3783
3784 PR c++/69797
3785 * c-common.c (sync_resolve_size): Diagnose too few arguments
3786 even when params is non-NULL empty vector.
3787
3788 2016-02-08 Bernd Schmidt <bschmidt@redhat.com>
3789
3790 PR target/60410
3791 * c.opt (fshort-double): Remove.
3792
3793 2016-02-05 Martin Sebor <msebor@redhat.com>
3794
3795 PR c++/69662
3796 * c.opt (Warning options): Update -Wplacement-new to take
3797 an optional argument.
3798
3799 2016-02-01 Jakub Jelinek <jakub@redhat.com>
3800
3801 PR preprocessor/69543
3802 PR c/69558
3803 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
3804 instead of loc to control_warning_option.
3805
3806 2016-02-01 Nathan Sidwell <nathan@codesourcery.com>
3807
3808 * c.opt (fopenacc-dim=): New option.
3809
3810 2016-01-27 Ryan Burn <contact@rnburn.com>
3811
3812 PR cilkplus/69267
3813 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
3814 gimplify_arg. Removed superfluous post_p argument.
3815 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
3816 superfluous post_p argument.
3817 * c-gimplify.c (c_gimplify_expr): Likewise.
3818
3819 2016-01-26 David Malcolm <dmalcolm@redhat.com>
3820
3821 PR other/69006
3822 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
3823 pp_newline_and_flush with pp_flush.
3824
3825 2016-01-20 Martin Sebor <msebor@redhat.com>
3826
3827 PR c/69405
3828 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
3829 an incompatible argument when the argument isn't a valid tree node.
3830
3831 2016-01-18 Jason Merrill <jason@redhat.com>
3832
3833 PR c++/68767
3834 * c-common.c (check_function_arguments_recurse): Fold the whole
3835 COND_EXPR, not just the condition.
3836
3837 2016-01-18 Tom de Vries <tom@codesourcery.com>
3838
3839 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
3840 classify as loop clause.
3841
3842 2016-01-15 Jakub Jelinek <jakub@redhat.com>
3843
3844 PR bootstrap/68271
3845 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
3846 C++ FE no longer has limit on number of pragmas.
3847
3848 2015-01-14 Ryan Burn <contact@rnburn.com>
3849
3850 PR c++/69048
3851 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
3852 to add missing cleanup point.
3853
3854 2016-01-14 David Malcolm <dmalcolm@redhat.com>
3855
3856 PR c++/68819
3857 * c-indentation.c (get_visual_column): Add location_t param.
3858 Handle the column number being zero by effectively disabling the
3859 warning, with an "inform".
3860 (should_warn_for_misleading_indentation): Add location_t argument
3861 for all uses of get_visual_column.
3862
3863 2016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
3864
3865 PR c++/69029
3866 * c-indentation.c (should_warn_for_misleading_indentation):
3867 Don't warn about do-while statements.
3868
3869 2016-01-07 Martin Sebor <msebor@redhat.com>
3870
3871 PR c/68966
3872 * c-common.c (sync_resolve_size): Reject first argument when it's
3873 a pointer to _Bool.
3874
3875 2016-01-05 David Malcolm <dmalcolm@redhat.com>
3876
3877 PR c/69122
3878 * c-indentation.c (get_visual_column): Remove default argument.
3879 (should_warn_for_misleading_indentation): For the multiline case,
3880 update call to get_visual_column for next_stmt_exploc so that it
3881 captures the location of the first non-whitespace character in the
3882 relevant line. Don't issue warnings if there is non-whitespace
3883 before the next statement.
3884
3885 2016-01-04 Jakub Jelinek <jakub@redhat.com>
3886
3887 Update copyright years.
3888
3889 2015-12-21 David Malcolm <dmalcolm@redhat.com>
3890
3891 * c-common.c (binary_op_error): Convert first param from
3892 location_t to rich_location * and use it when emitting an error.
3893 * c-common.h (binary_op_error): Convert first param from
3894 location_t to rich_location *.
3895
3896 2015-12-16 David Malcolm <dmalcolm@redhat.com>
3897
3898 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
3899 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
3900
3901 2015-12-15 Ilya Verbin <ilya.verbin@intel.com>
3902
3903 * c-common.c (c_common_attribute_table): Handle "omp declare target
3904 link" attribute.
3905
3906 2015-12-14 Jakub Jelinek <jakub@redhat.com>
3907
3908 PR c/68833
3909 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
3910
3911 2014-12-12 Tobias Burnus <burnus@net-b.de>
3912
3913 PR fortran/68815
3914 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
3915 specifiers (%d, %i,%u and %c).
3916
3917 2015-12-10 David Malcolm <dmalcolm@redhat.com>
3918
3919 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
3920
3921 2015-12-08 Jakub Jelinek <jakub@redhat.com>
3922
3923 PR c/48088
3924 PR c/68657
3925 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
3926 * c-pragma.c (handle_pragma_diagnostic): Adjust
3927 control_warning_option caller.
3928
3929 2015-12-07 David Malcolm <dmalcolm@redhat.com>
3930
3931 * c-common.c (c_cpp_error): Update for change to
3932 rich_location::set_range.
3933
3934 2015-12-04 Paolo Bonzini <bonzini@gnu.org>
3935
3936 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
3937 shifting 1 out of the sign bit.
3938
3939 2015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
3940
3941 * c-common.c (c_common_attribute_table[]): Update max arguments
3942 count for "simd" attribute.
3943 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
3944
3945 2015-12-03 Jakub Jelinek <jakub@redhat.com>
3946
3947 PR preprocessor/57580
3948 * c-ppoutput.c (print): Change printed field to bool.
3949 Move src_file last for smaller padding.
3950 (init_pp_output): Set print.printed to false instead of 0.
3951 (scan_translation_unit): Fix up formatting. Set print.printed
3952 to true after printing something other than newline.
3953 (scan_translation_unit_trad): Set print.printed to true instead of 1.
3954 (maybe_print_line_1): Set print.printed to false instead of 0.
3955 (print_line_1): Likewise.
3956 (do_line_change): Set print.printed to true instead of 1.
3957 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
3958 dump_macro): Set print.printed to false after printing newline.
3959
3960 2015-12-02 Jason Merrill <jason@redhat.com>
3961
3962 * c-common.c (fold_for_warn): New.
3963 (warn_logical_operator, warn_tautological_cmp)
3964 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
3965
3966 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
3967 (c_fully_fold_internal, decl_constant_value_for_optimization):
3968 Move to c/c-fold.c.
3969 * c-common.h: Don't declare decl_constant_value_for_optimization.
3970
3971 2015-12-02 Joseph Myers <joseph@codesourcery.com>
3972
3973 PR c/68162
3974 * c-common.h (c_build_qualified_type): Add extra default
3975 arguments.
3976
3977 2015-12-01 Julian Brown <julian@codesourcery.com>
3978 Cesar Philippidis <cesar@codesourcery.com>
3979 James Norris <James_Norris@mentor.com>
3980
3981 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
3982 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
3983 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
3984
3985 2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
3986
3987 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
3988 (decl_sloc_common): Delete and move bulk of processing to...
3989 (decl_sloc): ...here.
3990 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
3991 (dump_ada_double_name): Remove S parameter and compute the suffix.
3992 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
3993 element type and deal with an anonymous one.
3994 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
3995 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
3996 and remove reference to QUAL_UNION_TYPE.
3997 (dump_nested_types): Make 2 passes on the fields and move bulk to...
3998 (dump_nested_type): ...here. New function extracted from above.
3999 Generate a full declaration for anonymous element type of arrays.
4000 (print_ada_declaration): Really skip anonymous declarations. Remove
4001 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4002 Clean up processing of declarations of array types and objects.
4003 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4004 Remove obsolete code and tidy up.
4005
4006 2015-11-29 Jan Hubicka <hubicka@ucw.cz>
4007
4008 PR c/67581
4009 * c-common.c (handle_transparent_union_attribute): Update
4010 also type variants.
4011
4012 2015-11-27 Martin Liska <mliska@suse.cz>
4013
4014 PR c++/68312
4015 * array-notation-common.c (cilkplus_extract_an_triplets):
4016 Release vector of vectors.
4017 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4018
4019 2015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4020
4021 PR c++/68527
4022 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4023 (print_ada_struct_decl): Likewise.
4024
4025 2015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4026
4027 PR c++/68001
4028 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4029 * cilk.c (recognize_spawn): Determine location in a more precise
4030 way.
4031
4032 2015-11-19 Jason Merrill <jason@redhat.com>
4033
4034 * c-common.c (shorten_compare): But look through macros from
4035 system headers.
4036
4037 2015-11-18 Jason Merrill <jason@redhat.com>
4038
4039 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4040 non-constant operand comes from a macro.
4041
4042 2015-11-17 Jason Merrill <jason@redhat.com>
4043
4044 PR bootstrap/68346
4045 * c-common.c (warn_tautological_cmp): Fold before checking for
4046 constants.
4047
4048 2015-11-16 Marek Polacek <polacek@redhat.com>
4049
4050 PR c++/68362
4051 * c-common.c (check_case_bounds): Fold low and high cases.
4052
4053 2015-11-16 Marek Polacek <polacek@redhat.com>
4054
4055 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4056 * c-common.c (c_common_get_alias_set): Likewise.
4057 (handle_visibility_attribute): Likewise.
4058
4059 2015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4060
4061 * c-common.c (handle_simd_attribute): New.
4062 (struct attribute_spec): Add entry for "simd".
4063 (handle_simd_attribute): New.
4064
4065 2015-11-13 Kai Tietz <ktietz70@googlemail.com>
4066
4067 * c-lex.c (interpret_float): Use fold_convert.
4068
4069 2015-11-13 David Malcolm <dmalcolm@redhat.com>
4070
4071 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4072 and store it on the result.
4073 * c-opts.c (c_common_init_options): Set
4074 global_dc->colorize_source_p.
4075
4076 2015-11-12 James Norris <jnorris@codesourcery.com>
4077 Joseph Myers <joseph@codesourcery.com>
4078
4079 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
4080 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4081 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4082 PRAGMA_OACC_CLAUSE_LINK.
4083
4084 2015-11-11 Marek Polacek <polacek@redhat.com>
4085
4086 PR c/68107
4087 PR c++/68266
4088 * c-common.c (valid_array_size_p): New function.
4089 * c-common.h (valid_array_size_p): Declare.
4090
4091 2015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4092
4093 PR bootstrap/68271
4094 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4095
4096 2015-11-11 Andrew MacLeod <amacleod@redhat.com>
4097
4098 * array-notation-common.c: Remove unused header files.
4099 * c-ada-spec.c: Likewise.
4100 * c-cilkplus.c: Likewise.
4101 * c-common.c: Likewise.
4102 * c-cppbuiltin.c: Likewise.
4103 * c-dump.c: Likewise.
4104 * c-format.c: Likewise.
4105 * c-gimplify.c: Likewise.
4106 * c-indentation.c: Likewise.
4107 * c-lex.c: Likewise.
4108 * c-omp.c: Likewise.
4109 * c-opts.c: Likewise.
4110 * c-pch.c: Likewise.
4111 * c-ppoutput.c: Likewise.
4112 * c-pragma.c: Likewise.
4113 * c-pretty-print.c: Likewise.
4114 * c-semantics.c: Likewise.
4115 * c-ubsan.c: Likewise.
4116 * cilk.c: Likewise.
4117 * stub-objc.c: Likewise.
4118
4119 2015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4120 Cesar Philippidis <cesar@codesourcery.com>
4121 James Norris <jnorris@codesourcery.com>
4122 Julian Brown <julian@codesourcery.com>
4123 Nathan Sidwell <nathan@codesourcery.com>
4124
4125 * c-pragma.c (oacc_pragmas): Add "routine".
4126 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4127
4128 2015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4129
4130 * c-common.c (c_common_attributes): Add scalar_storage_order.
4131 (handle_scalar_storage_order_attribute): New function.
4132 * c-pragma.c (global_sso): New variable.
4133 (maybe_apply_pragma_scalar_storage_order): New function.
4134 (handle_pragma_scalar_storage_order): Likewise.
4135 (init_pragma): Register scalar_storage_order.
4136 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4137 * c.opt (Wscalar-storage-order): New warning.
4138 (fsso-struct=): New option.
4139
4140 2015-11-08 Martin Sebor <msebor@redhat.com>
4141
4142 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4143
4144 2015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4145
4146 * c-common.c: Don't undef DEF_BUILTIN.
4147
4148 2015-11-06 David Malcolm <dmalcolm@redhat.com>
4149
4150 * c-common.c (c_cpp_error): Convert parameter from location_t to
4151 rich_location *. Eliminate the "column_override" parameter and
4152 the call to diagnostic_override_column.
4153 Update the "done_lexing" clause to set range 0
4154 on the rich_location, rather than overwriting a location_t.
4155 * c-common.h (c_cpp_error): Convert parameter from location_t to
4156 rich_location *. Eliminate the "column_override" parameter.
4157
4158 2015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4159 Thomas Schwinge <thomas@codesourcery.com>
4160 James Norris <jnorris@codesourcery.com>
4161
4162 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4163 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4164 clauses with parallel and kernels and loops.
4165 * c-pragma.h (enum pragma_omp_clause): Add entries for
4166 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4167 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4168 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4169 INDEPENDENT,SEQ}.
4170 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4171
4172 2015-11-05 Martin Sebor <msebor@redhat.com>
4173
4174 PR c++/67942
4175 * c.opt (-Wplacement-new): New option.
4176
4177 2015-11-05 Jakub Jelinek <jakub@redhat.com>
4178
4179 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4180 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4181 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4182 save_expr or create_tmp_var* if TEST is true.
4183 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4184 Don't call add_stmt here.
4185 (struct c_omp_check_loop_iv_data): New type.
4186 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4187 c_omp_check_loop_iv_exprs): New functions.
4188 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4189 distribute.
4190 (c_omp_declare_simd_clauses_to_numbers): Change
4191 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4192 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4193 from numbers to PARM_DECLs.
4194
4195 2015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4196
4197 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4198 flag_checking.
4199
4200 2015-11-03 Bernd Schmidt <bschmidt@redhat.com>
4201
4202 PR c++-common/67882
4203 * c-common.h (fold_offsetof_1): Add argument.
4204 * c-common.c (fold_offsetof_1): Diagnose more invalid
4205 offsetof expressions that reference elements past the end of
4206 an array.
4207
4208 2015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4209 Chung-Lin Tang <cltang@codesourcery.com>
4210
4211 * c-pragma.c (oacc_pragmas): Add "atomic".
4212 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4213
4214 2015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4215
4216 * c-common.c (handle_target_clones_attribute): New.
4217 (c_common_attribute_table): Add handle_target_clones_attribute.
4218 (handle_always_inline_attribute): Add check on target_clones attribute.
4219 (handle_target_attribute): Ditto.
4220
4221 2015-10-29 Andrew MacLeod <amacleod@redhat.com>
4222
4223 * array-notation-common.c: Reorder #include's and remove duplicates.
4224 * c-ada-spec.c: Likewise.
4225 * c-cilkplus.c: Likewise.
4226 * c-common.c: Likewise.
4227 * c-cppbuiltin.c: Likewise.
4228 * c-dump.c: Likewise.
4229 * c-format.c: Likewise.
4230 * c-gimplify.c: Likewise.
4231 * c-indentation.c: Likewise.
4232 * c-lex.c: Likewise.
4233 * c-omp.c: Likewise.
4234 * c-opts.c: Likewise.
4235 * c-pch.c: Likewise.
4236 * c-ppoutput.c: Likewise.
4237 * c-pragma.c: Likewise.
4238 * c-pretty-print.c: Likewise.
4239 * c-semantics.c: Likewise.
4240 * c-ubsan.c: Likewise.
4241 * cilk.c: Likewise.
4242 * stub-objc.c: Likewise.
4243
4244 2015-10-28 Jason Merrill <jason@redhat.com>
4245
4246 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4247
4248 2015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4249 James Norris <jnorris@codesourcery.com>
4250 Cesar Philippidis <cesar@codesourcery.com>
4251
4252 PR c/64765
4253 PR c/64880
4254 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4255 * c-omp.c (c_oacc_split_loop_clauses): New function.
4256
4257 2015-10-21 Martin Sebor <msebor@redhat.com>
4258
4259 PR driver/68043
4260 * c.opt: End each sentence that describes an option with a period.
4261
4262 2015-10-20 Marek Polacek <polacek@redhat.com>
4263
4264 * array-notation-common.c (is_cilkplus_vector_p): Define.
4265 * c-common.h (is_cilkplus_vector_p): Declare.
4266
4267 2015-10-20 Marek Polacek <polacek@redhat.com>
4268
4269 * c.opt (std=gnu++11): Do not describe as experimental.
4270 (std=gnu++14): Likewise.
4271
4272 2015-10-19 Jason Merrill <jason@redhat.com>
4273
4274 * c-cppbuiltin.c (c_cpp_builtins): Define
4275 __cpp_nontype_template_args.
4276
4277 2015-10-19 Jason Merrill <jason@redhat.com>
4278
4279 * c-cppbuiltin.c (c_cpp_builtins): Define
4280 __cpp_enumerator_attributes, __cpp_fold_expressions,
4281 __cpp_unicode_characters.
4282
4283 2015-10-13 Jakub Jelinek <jakub@redhat.com>
4284 Aldy Hernandez <aldyh@redhat.com>
4285
4286 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4287 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4288 (c_define_builtins): Likewise.
4289 * c-common.h (enum c_omp_clause_split): Add
4290 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4291 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4292 (c_finish_omp_for): Add ORIG_DECLV argument.
4293 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4294 201511 instead of 201307.
4295 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4296 OMP_CRITICAL_CLAUSES to it.
4297 (c_finish_omp_ordered): Add CLAUSES argument, set
4298 OMP_ORDERED_CLAUSES to it.
4299 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4300 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4301 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4302 constructs and new OpenMP 4.5 clauses. Clear
4303 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4304 verification code.
4305 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4306 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4307 (enum pragma_omp_clause): Add
4308 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4309 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4310
4311 2015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4312
4313 * c-lex.c (interpret_float): Use real_equal instead of
4314 REAL_VALUES_EQUAL.
4315
4316 2015-10-04 Jason Merrill <jason@redhat.com>
4317
4318 Implement N4514, C++ Extensions for Transactional Memory.
4319 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4320 (c_common_attribute_table): Add transaction_safe_dynamic.
4321 transaction_safe now affects type identity.
4322 (handle_tm_attribute): Handle transaction_safe_dynamic.
4323 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4324 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4325 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4326 (D_TRANSMEM): New.
4327 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4328 * c-pretty-print.c (pp_c_attributes_display): Don't print
4329 transaction_safe in C++.
4330
4331 2015-10-02 Marek Polacek <polacek@redhat.com>
4332
4333 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4334
4335 2015-10-02 Marek Polacek <polacek@redhat.com>
4336
4337 PR c/64249
4338 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4339 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4340 * c.opt (Wduplicated-cond): New option.
4341
4342 2015-10-01 Joseph Myers <joseph@codesourcery.com>
4343
4344 * c.opt (std=c11): Do not describe as experimental.
4345 (std=gnu11): Likewise.
4346 (std=iso9899:2011): Likewise.
4347
4348 2015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4349
4350 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4351 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4352
4353 2015-09-25 Marek Polacek <polacek@redhat.com>
4354
4355 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4356 (ubsan_instrument_shift): Likewise.
4357
4358 2015-09-25 Marek Polacek <polacek@redhat.com>
4359
4360 PR sanitizer/64906
4361 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4362
4363 2015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4364
4365 * c-indentation.c (should_warn_for_misleading_indentation):
4366 Compare next_stmt_vis_column with guard_line_first_nws instead
4367 of with guard_line_vis_column.
4368
4369 2015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4370
4371 PR c/49654
4372 PR c/49655
4373 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4374 options and options not valid for the current language.
4375
4376 2015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4377
4378 * c-indentation.c (should_warn_for_misleading_indentation):
4379 Float out and consolidate the calls to get_visual_column that
4380 are passed guard_exploc as an argument. Compare
4381 next_stmt_vis_column with guard_line_first_nws instead of with
4382 body_line_first_nws.
4383
4384 2015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4385
4386 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4387 Wnamespaces): New C++ warnings.
4388
4389 2015-09-22 Jason Merrill <jason@redhat.com>
4390
4391 * c-common.h (abi_compat_version_crosses): New.
4392 (warn_abi_version): Declare.
4393 * c-common.c: Define it.
4394 * c-opts.c (c_common_post_options): Handle it.
4395 flag_abi_compat_version defaults to 8.
4396
4397 2015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4398
4399 Complete the implementation of N4230, Nested namespace definition.
4400 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4401 __cpp_nested_namespace_definitions.
4402
4403 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4404
4405 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4406
4407 2015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4408
4409 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4410 when warning.
4411 * c-pragma.h (pragma_lex): Add optional loc argument.
4412
4413 2015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4414
4415 * c-format.c (check_format_arg): Adjust to use common block size in all
4416 object pools.
4417
4418 2015-09-15 David Malcolm <dmalcolm@redhat.com>
4419
4420 * c-format.c (location_from_offset): Update for change in
4421 signature of location_get_source_line.
4422 * c-indentation.c (get_visual_column): Likewise.
4423 (line_contains_hash_if): Likewise.
4424
4425 2015-09-14 Marek Polacek <polacek@redhat.com>
4426
4427 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4428 setting various warnings.
4429
4430 2015-09-14 Marek Polacek <polacek@redhat.com>
4431
4432 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4433 a negative value.
4434
4435 2015-09-11 Mark Wielaard <mjw@redhat.com>
4436
4437 PR c/28901
4438 * c.opt (Wunused-variable): Option from common.opt.
4439 (Wunused-const-variable): New option.
4440
4441 2015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4442
4443 PR c++/53184
4444 * c.opt ([Wsubobject-linkage]): Add.
4445
4446 2015-09-03 Martin Sebor <msebor@redhat.com>
4447
4448 PR c/66516
4449 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4450 functions.
4451 * c-common.c (reject_gcc_builtin): Define.
4452
4453 2015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4454
4455 PR middle-end/60586
4456 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4457 prototype.
4458 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4459 cilk_gimplify_call_params_in_spawned_fn.
4460 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4461 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4462 unwrapping.
4463
4464 2015-08-25 Marek Polacek <polacek@redhat.com>
4465
4466 PR middle-end/67330
4467 * c-common.c (handle_weak_attribute): Don't check whether the
4468 visibility can be changed here.
4469
4470 2015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4471
4472 * c-lex.c (c_lex_with_flags): Use explicit locations.
4473
4474 2015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4475
4476 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4477 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4478
4479 2015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4480
4481 PR middle-end/36757
4482 * c-common.c (check_builtin_function_arguments): Add check
4483 for BUILT_IN_SIGNBIT argument.
4484
4485 2015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4486
4487 PR c++/67160
4488 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4489 in c++1z mode.
4490
4491 2015-08-17 Marek Polacek <polacek@redhat.com>
4492
4493 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4494 with whitespaces before qualifier names.
4495
4496 2015-08-12 Marek Polacek <polacek@redhat.com>
4497
4498 PR c++/55095
4499 * c-common.c (maybe_warn_shift_overflow): Properly handle
4500 left-shifting 1 into the sign bit.
4501
4502 2015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4503
4504 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4505
4506 2015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4507 Braden Obrzut <admin@maniacsvault.net>
4508 Jason Merrill <jason@redhat.com>
4509
4510 Add C++ Concepts TS support.
4511 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4512 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4513 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4514 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4515 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4516 * c.opt (fconcepts): New.
4517
4518 2015-08-02 Martin Sebor <msebor@redhat.com>
4519
4520 * c.opt (-Wframe-address): New warning option.
4521
4522 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4523
4524 * c-indentation.c (should_warn_for_misleading_indentation):
4525 Improve heuristics.
4526
4527 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4528
4529 * c-indentation.c (get_visual_column): Add parameter first_nws,
4530 use it. Update comment documenting the function.
4531 (is_first_nonwhitespace_on_line): Remove.
4532 (should_warn_for_misleading_indentation): Replace usage of
4533 of is_first_nonwhitespace_on_line with get_visual_column.
4534
4535 2015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4536
4537 * c-indentation.h (struct token_indent_info): Define.
4538 (get_token_indent_info): Define.
4539 (warn_for_misleading_information): Declare.
4540 * c-common.h (warn_for_misleading_information): Remove.
4541 * c-identation.c (warn_for_misleading_indentation):
4542 Change declaration to take three token_indent_infos. Adjust
4543 accordingly.
4544 * c-identation.c (should_warn_for_misleading_indentation):
4545 Likewise. Bail out early if the body is a compound statement.
4546 (guard_tinfo_to_string): Define.
4547
4548 2015-07-30 Jason Merrill <jason@redhat.com>
4549
4550 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4551 '*' for reference decay.
4552
4553 2015-07-30 Marek Polacek <polacek@redhat.com>
4554
4555 * c-common.c (warn_tautological_cmp): Bail for float types.
4556
4557 2015-07-27 Marek Polacek <polacek@redhat.com>
4558
4559 PR bootstrap/67030
4560 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4561
4562 2015-07-27 Marek Polacek <polacek@redhat.com>
4563
4564 PR c++/66555
4565 PR c/54979
4566 * c-common.c (find_array_ref_with_const_idx_r): New function.
4567 (warn_tautological_cmp): New function.
4568 * c-common.h (warn_tautological_cmp): Declare.
4569 * c.opt (Wtautological-compare): New option.
4570
4571 2015-07-23 Marek Polacek <polacek@redhat.com>
4572
4573 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4574 (ubsan_instrument_shift): Likewise.
4575
4576 2015-07-23 Marek Polacek <polacek@redhat.com>
4577
4578 PR sanitizer/66908
4579 * c-ubsan.c: Include gimplify.h.
4580 (ubsan_instrument_division): Unshare OP0 and OP1.
4581 (ubsan_instrument_shift): Likewise.
4582
4583 2015-07-20 Marek Polacek <polacek@redhat.com>
4584 Richard Sandiford <richard.sandiford@arm.com>
4585
4586 PR c++/55095
4587 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4588 Use EXPR_LOC_OR_LOC.
4589 (maybe_warn_shift_overflow): New function.
4590 * c-common.h (maybe_warn_shift_overflow): Declare.
4591 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4592 * c.opt (Wshift-overflow): New option.
4593
4594 2015-07-16 Martin Liska <mliska@suse.cz>
4595
4596 * c-format.c (static void check_format_info_main): Use
4597 object_allocator instead of pool_allocator.
4598 (check_format_arg): Likewise.
4599 (check_format_info_main): Likewise.
4600
4601 2015-07-15 Andrew MacLeod <amacleod@redhat.com>
4602
4603 * c-opts.c: Remove multiline #include comment.
4604
4605 2015-07-12 Aldy Hernandez <aldyh@redhat.com>
4606
4607 * c-common.c: Fix double word typos.
4608
4609 2015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4610
4611 * c-ada-spec.h (cpp_operation): Revert latest change.
4612 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4613 constructors and destructors.
4614
4615 2015-07-09 Andrew MacLeod <amacleod@redhat.com>
4616
4617 * c-common.h: Adjust includes for flags.h changes.
4618 * stub-objc.c: Likewise.
4619
4620 2015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4621
4622 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4623 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4624
4625 2015-07-08 Jakub Jelinek <jakub@redhat.com>
4626
4627 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4628 are to be removed, return NULL rather than original clauses list.
4629
4630 2015-07-07 Andrew MacLeod <amacleod@redhat.com>
4631
4632 * array-notation-common.c: Adjust includes.
4633 * c-ada-spec.c: Likewise.
4634 * c-cilkplus.c: Likewise.
4635 * c-common.h: Likewise.
4636 * c-cppbuiltin.c: Likewise.
4637 * c-dump.c: Likewise.
4638 * c-format.c: Likewise.
4639 * c-gimplify.c: Likewise.
4640 * c-indentation.c: Likewise.
4641 * c-lex.c: Likewise.
4642 * c-omp.c: Likewise.
4643 * c-opts.c: Likewise.
4644 * c-pch.c: Likewise.
4645 * c-ppoutput.c: Likewise.
4646 * c-pragma.c: Likewise.
4647 * c-pretty-print.c: Likewise.
4648 * c-semantics.c: Likewise.
4649 * c-ubsan.c: Likewise.
4650 * cilk.c: Likewise.
4651 * stub-objc.c: Likewise.
4652
4653 2015-07-07 Eric Botcazou <ebotcazou@adacore.com>
4654
4655 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
4656 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
4657
4658 2015-07-01 Jason Merrill <jason@redhat.com>
4659
4660 * c-common.h (D_CXX11): Rename from D_CXX0X.
4661 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
4662 * c-common.c: Adjust.
4663
4664 * c-opts.c (c_common_post_options): Default to C++14.
4665
4666 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
4667
4668 2015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
4669
4670 Implement N4197 - Adding u8 character literals
4671 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
4672 CPP_CHAR.
4673 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
4674 CPP_UTF8CHAR_USERDEF tokens.
4675 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
4676 and CPP_UTF8CHAR tokens.
4677 (lex_charconst): Treat CPP_UTF8CHAR token.
4678
4679 2015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
4680
4681 PR fortran/66605
4682 * c-common.c (do_warn_unused_parameter): Move here.
4683 * c-common.h (do_warn_unused_parameter): Declare.
4684
4685 2015-06-29 Marek Polacek <polacek@redhat.com>
4686
4687 PR c/66322
4688 * c-common.c (check_case_bounds): Add bool * parameter. Set
4689 OUTSIDE_RANGE_P.
4690 (c_add_case_label): Add bool * parameter. Pass it down to
4691 check_case_bounds.
4692 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
4693 warning here.
4694 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
4695 declarations.
4696
4697 2015-06-27 Marek Polacek <polacek@redhat.com>
4698
4699 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
4700 or VECTOR_INTEGER_TYPE_P throughout.
4701 * c-gimplify.c: Likewise.
4702
4703 2015-06-26 Marek Polacek <polacek@redhat.com>
4704
4705 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
4706 * c-common.c (c_fully_fold_internal): Likewise.
4707 (c_alignof_expr): Likewise.
4708 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
4709 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
4710 * cilk.c (create_parm_list): Likewise.
4711
4712 2015-06-26 Marek Polacek <polacek@redhat.com>
4713
4714 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
4715
4716 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4717
4718 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
4719 * c-gimplify.c: Likewise.
4720 * c-pragma.c: Likewise.
4721 * c-ubsan.c: Likewise.
4722 * cilk.c: Likewise.
4723
4724 2015-06-25 Richard Sandiford <richard.sandiford@arm.com>
4725
4726 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
4727 ggc_hasher.
4728
4729 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
4730
4731 * cilk.c: Move calls.h after tm.h in the include chain.
4732
4733 2015-06-25 Marek Polacek <polacek@redhat.com>
4734
4735 * array-notation-common.c: Use VAR_P throughout.
4736 * c-ada-spec.c: Likewise.
4737 * c-common.c: Likewise.
4738 * c-format.c: Likewise.
4739 * c-gimplify.c: Likewise.
4740 * c-omp.c: Likewise.
4741 * c-pragma.c: Likewise.
4742 * c-pretty-print.c: Likewise.
4743 * cilk.c: Likewise.
4744
4745 2015-06-25 Marek Polacek <polacek@redhat.com>
4746
4747 * cilk.c (extract_free_variables): Use is_global_var.
4748
4749 2015-06-23 Richard Sandiford <richard.sandiford@arm.com>
4750
4751 * c-common.c: Don't include target-def.h.
4752
4753 2015-06-23 Marek Polacek <polacek@redhat.com>
4754
4755 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
4756 when comparing INTEGER_CSTs.
4757
4758 2015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
4759
4760 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
4761 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
4762 (dump_ada_template): Skip partially specialized types.
4763
4764 2015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
4765
4766 * c-common.c (scalar_to_vector): Use std::swap instead of manually
4767 swapping.
4768
4769 2015-06-17 Andrew MacLeod <amacleod@redhat.com>
4770
4771 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
4772 * c-ada-spec.c: Likewise.
4773 * c-cilkplus.c: Likewise.
4774 * c-common.c: Likewise.
4775 * c-common.h: Likewise.
4776 * c-cppbuiltin.c: Likewise.
4777 * c-dump.c: Likewise.
4778 * c-format.c: Likewise.
4779 * c-gimplify.c: Likewise.
4780 * c-indentation.c: Likewise.
4781 * c-lex.c: Likewise.
4782 * c-omp.c: Likewise.
4783 * c-opts.c: Likewise.
4784 * c-pch.c: Likewise.
4785 * c-ppoutput.c: Likewise.
4786 * c-pragma.c: Likewise.
4787 * c-pretty-print.c: Likewise.
4788 * c-semantics.c: Likewise.
4789 * c-ubsan.c: Likewise.
4790 * cilk.c: Likewise.
4791 * stub-objc.c: Likewise.
4792
4793 2015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
4794
4795 PR c++/65168
4796 * c-common.c (c_common_truthvalue_conversion): Warn when
4797 converting an address of a reference to a truth value.
4798
4799 2015-06-08 Andrew MacLeod <amacleod@redhat.com>
4800
4801 * array-notation-common.c : Adjust include files.
4802 * c-ada-spec.c : Likewise.
4803 * c-cilkplus.c : Likewise.
4804 * c-common.c : Likewise.
4805 * c-common.h : Likewise.
4806 * c-cppbuiltin.c : Likewise.
4807 * c-dump.c : Likewise.
4808 * c-format.c : Likewise.
4809 * c-gimplify.c : Likewise.
4810 * c-indentation.c : Likewise.
4811 * c-lex.c : Likewise.
4812 * c-omp.c : Likewise.
4813 * c-opts.c : Likewise.
4814 * c-pch.c : Likewise.
4815 * c-ppoutput.c : Likewise.
4816 * c-pragma.c : Likewise.
4817 * c-pretty-print.c : Likewise.
4818 * c-semantics.c : Likewise.
4819 * c-ubsan.c : Likewise.
4820 * cilk.c : Likewise.
4821 * stub-objc.c : Likewise.
4822
4823 2015-06-08 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/66415
4826 * c-format.c (location_from_offset): Return LOC if LINE is null.
4827
4828 2015-06-05 Aldy Hernandez <aldyh@redhat.com>
4829
4830 * c-common.h (c_parse_final_cleanups): New prototype.
4831 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
4832
4833 2015-06-04 Sriraman Tallam <tmsriram@google.com>
4834
4835 * c-common.c (noplt): New attribute.
4836 (handle_noplt_attribute): New handler.
4837
4838 2015-06-04 Andrew MacLeod <amacleod@redhat.com>
4839
4840 * array-notation-common.c: Adjust includes for restructured coretypes.h.
4841 * c-ada-spec.c: Likewise.
4842 * c-cilkplus.c: Likewise.
4843 * c-common.c: Likewise.
4844 * c-common.h: Likewise.
4845 * c-cppbuiltin.c: Likewise.
4846 * c-dump.c: Likewise.
4847 * c-format.c: Likewise.
4848 * c-gimplify.c: Likewise.
4849 * c-indentation.c: Likewise.
4850 * c-lex.c: Likewise.
4851 * c-omp.c: Likewise.
4852 * c-opts.c: Likewise.
4853 * c-pch.c: Likewise.
4854 * c-ppoutput.c: Likewise.
4855 * c-pragma.c: Likewise.
4856 * c-pretty-print.c: Likewise.
4857 * c-semantics.c: Likewise.
4858 * c-ubsan.c: Likewise.
4859 * cilk.c: Likewise.
4860 * stub-objc.c: Likewise.
4861
4862 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4863
4864 PR c/66220:
4865 * c-indentation.c (should_warn_for_misleading_indentation): Use
4866 expand_location rather than expand_location_to_spelling_point.
4867 Don't warn if the guarding statement is more indented than the
4868 next/body stmts.
4869
4870 2015-06-02 David Malcolm <dmalcolm@redhat.com>
4871
4872 * c-indentation.c (warn_for_misleading_indentation): Bail out
4873 immediately if -Wmisleading-indentation isn't enabled.
4874
4875 2015-06-01 Martin Liska <mliska@suse.cz>
4876
4877 * c-format.c (check_format_arg):Use new type-based pool allocator.
4878 (check_format_info_main) Likewise.
4879
4880 2015-05-31 Eric Botcazou <ebotcazou@adacore.com>
4881
4882 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
4883 (has_nontrivial_methods): Likewise.
4884
4885 2015-05-25 Marek Polacek <polacek@redhat.com>
4886
4887 * c-ubsan.c (ubsan_instrument_shift): Use type0.
4888
4889 2015-05-22 Marek Polacek <polacek@redhat.com>
4890
4891 PR c/47043
4892 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
4893
4894 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4895
4896 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
4897 STACK_GROWS_DOWNWARD.
4898
4899 2015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
4900
4901 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
4902 STACK_GROWS_DOWNWARD rather than if it is defined.
4903
4904 2015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
4905
4906 PR c/52952
4907 * c-format.c (location_column_from_byte_offset): New.
4908 (location_from_offset): New.
4909 (struct format_wanted_type): Add offset_loc field.
4910 (check_format_info): Move handling of location for extra arguments
4911 closer to the point of warning.
4912 (check_format_info_main): Pass the result of location_from_offset
4913 to warning_at.
4914 (format_type_warning): Pass the result of location_from_offset
4915 to warning_at.
4916
4917 2015-05-20 Marek Polacek <polacek@redhat.com>
4918
4919 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
4920
4921 2015-05-20 Marek Polacek <polacek@redhat.com>
4922
4923 * c-ada-spec.c (dump_sloc): Use DECL_P.
4924
4925 2015-05-20 Marek Polacek <polacek@redhat.com>
4926
4927 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
4928 * c-common.c: Likewise.
4929
4930 2015-05-19 David Malcolm <dmalcolm@redhat.com>
4931
4932 * c-common.h (fe_file_change): Strengthen param from
4933 const line_map * to const line_map_ordinary *.
4934 (pp_file_change): Likewise.
4935 * c-lex.c (fe_file_change): Likewise.
4936 (cb_define): Use linemap_check_ordinary when invoking
4937 SOURCE_LINE.
4938 (cb_undef): Likewise.
4939 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
4940 invoking cb_file_change.
4941 (c_finish_options): Likewise.
4942 (push_command_line_include): Likewise.
4943 (cb_file_change): Strengthen param "new_map" from
4944 const line_map * to const line_map_ordinary *.
4945 * c-ppoutput.c (cb_define): Likewise for local "map".
4946 (pp_file_change): Likewise for param "map" and local "from".
4947
4948 2015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
4949
4950 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
4951
4952 2015-05-18 Tom de Vries <tom@codesourcery.com>
4953
4954 * c-common.c (build_va_arg_1): New function.
4955 (build_va_arg): Add address operator to va_list operand if necessary.
4956
4957 2015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
4958
4959 PR c/48956
4960 * c-common.c (int_safely_convertible_to_real_p): Define.
4961 (unsafe_conversion_p): Check conversions involving complex types.
4962 (conversion_warning): Add new warning message for conversions which
4963 discard imaginary component.
4964 * c-common.h: (enum conversion_safety): Add new enumerator for such
4965 conversions.
4966
4967 2015-05-14 Marek Polacek <polacek@redhat.com>
4968
4969 PR c/66066
4970 PR c/66127
4971 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
4972 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
4973 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
4974 use it. If FOR_INT_CONST, require that all evaluated operands be
4975 INTEGER_CSTs.
4976
4977 2015-05-12 David Malcolm <dmalcolm@redhat.com>
4978
4979 * c-common.h (warn_for_misleading_indentation): New prototype.
4980 * c-indentation.c: New file.
4981 * c.opt (Wmisleading-indentation): New option.
4982
4983 2015-05-12 Tom de Vries <tom@codesourcery.com>
4984
4985 PR tree-optimization/66010
4986 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
4987
4988 2015-05-09 Jason Merrill <jason@redhat.com>
4989
4990 * c-opts.c (c_common_post_options): Also clear
4991 cpp_opts->cpp_warn_cxx11_compat.
4992
4993 * c-common.h (enum cxx_dialect): Add cxx_unset.
4994 * c-common.c (cxx_dialect): Initialize to cxx_unset.
4995 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
4996
4997 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
4998 (std=gnu++0x): Mark as Undocumented.
4999 (std=gnu++1y): Add deprecated message.
5000
5001 2015-05-08 Jason Merrill <jason@redhat.com>
5002
5003 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5004 * c-opts.c: Adjust.
5005
5006 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5007
5008 2015-05-08 Marek Polacek <polacek@redhat.com>
5009
5010 PR c/64918
5011 * c.opt (Woverride-init-side-effects): New option.
5012
5013 2015-05-07 Marek Polacek <polacek@redhat.com>
5014
5015 PR c/65179
5016 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5017 negative value.
5018 * c.opt (Wshift-negative-value): New option.
5019 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5020 when -Wextra and C99/C++11 mode.
5021
5022 2015-05-07 Marek Polacek <polacek@redhat.com>
5023 Martin Uecker <uecker@eecs.berkeley.edu>
5024
5025 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5026 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5027
5028 2015-05-05 Jason Merrill <jason@redhat.com>
5029
5030 * c.opt (Wterminate): New.
5031
5032 2015-04-30 Marek Polacek <polacek@redhat.com>
5033
5034 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5035 require that the non-constant be of a boolean type.
5036
5037 2015-04-29 Josh Triplett <josh@joshtriplett.org>
5038
5039 * c-common.c (handle_section_attribute): Refactor to reduce
5040 nesting and distinguish between error cases.
5041
5042 2015-04-29 Marek Polacek <polacek@redhat.com>
5043
5044 PR c/64610
5045 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5046 with 0/1.
5047
5048 2015-04-29 Jakub Jelinek <jakub@redhat.com>
5049
5050 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5051 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5052 HOST_BITS_PER_WIDE_INT.
5053
5054 2015-04-28 Tom de Vries <tom@codesourcery.com>
5055
5056 PR tree-optimization/65887
5057 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5058
5059 2015-04-28 Eric Botcazou <ebotcazou@adacore.com>
5060 Pierre-Marie de Rodat <derodat@adacore.com>
5061
5062 * c-ada-spec.c (in_function): Delete.
5063 (dump_generic_ada_node): Do not change in_function and remove the
5064 redundant code dealing with it.
5065 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5066 (print_ada_methods): Output the static member functions in a nested
5067 package after the regular methods as well as associated renamings.
5068
5069 2015-04-24 Marek Polacek <polacek@redhat.com>
5070
5071 PR c/65830
5072 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5073 and OPT_Wshift_count_overflow.
5074
5075 PR c/63357
5076 * c-common.c (warn_logical_operator): Warn if the operands have the
5077 same expressions.
5078
5079 2015-04-24 Marek Polacek <polacek@redhat.com>
5080
5081 PR c/61534
5082 * c-common.c (warn_logical_operator): Bail if either operand comes
5083 from a macro expansion.
5084
5085 2015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5086
5087 PR target/55143
5088 * c-common.c (c_default_pointer_mode): Add definition.
5089 * c-common.h (c_default_pointer_mode): Add declaration.
5090
5091 2015-03-11 Jakub Jelinek <jakub@redhat.com>
5092
5093 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5094 on record_builtin_type argument.
5095
5096 2015-03-10 Jakub Jelinek <jakub@redhat.com>
5097
5098 PR c/65120
5099 * c-common.c (warn_logical_not_parentheses): Don't warn for
5100 !x == 0 or !x != 0.
5101
5102 2015-03-07 Marek Polacek <polacek@redhat.com>
5103
5104 PR sanitizer/65280
5105 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5106 before trying to figure out whether we have a flexible array member.
5107
5108 2015-03-06 Eric Botcazou <ebotcazou@adacore.com>
5109 Jonathan Wakely <jwakely.gcc@gmail.com>
5110
5111 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5112
5113 2015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5114
5115 PR ada/65319
5116 * c-ada-spec.c (print_destructor): Remove obsolete code.
5117
5118 2015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5119
5120 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5121 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5122 DECL_TEMPLATE_RESULT emulations.
5123 (dump_ada_template)): Add guard for TYPE_METHODS.
5124
5125 2015-02-27 Marek Polacek <polacek@redhat.com>
5126
5127 PR c/65040
5128 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5129
5130 2015-02-27 Kai Tietz <ktietz@redhat.com>
5131
5132 PR c/35330
5133 * c-pragma.c (handle_pragma_weak): Do not try to create
5134 weak/alias of declarations not being function, or variable
5135 declarations.
5136
5137 2015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5138
5139 PR libgomp/64625
5140 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5141 Remove macros.
5142 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5143
5144 2015-02-16 Marek Polacek <polacek@redhat.com>
5145
5146 PR c/65066
5147 * c-format.c (check_format_types): Handle null param.
5148
5149 2015-02-13 Marek Polacek <polacek@redhat.com>
5150
5151 PR c/65040
5152 * c-format.c (check_format_types): Don't warn about different
5153 signedness if the original value is in the range of WANTED_TYPE.
5154
5155 2015-02-12 Jason Merrill <jason@redhat.com>
5156
5157 PR c++/64956
5158 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5159 to the current highest version.
5160 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5161
5162 2015-02-04 Jakub Jelinek <jakub@redhat.com>
5163
5164 PR c/64824
5165 PR c/64868
5166 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5167 instead of RDIV_EXPR. Use build_binary_op instead of
5168 build2_loc.
5169
5170 2015-01-30 Joseph Myers <joseph@codesourcery.com>
5171
5172 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5173 to pass input_location as first argument.
5174
5175 2015-01-23 Tom de Vries <tom@codesourcery.com>
5176
5177 PR libgomp/64672
5178 * c.opt (fopenacc): Mark as LTO option.
5179
5180 2015-01-23 Tom de Vries <tom@codesourcery.com>
5181
5182 PR libgomp/64707
5183 * c.opt (fopenmp): Mark as LTO option.
5184
5185 2015-01-21 Jakub Jelinek <jakub@redhat.com>
5186
5187 PR c/63307
5188 * cilk.c (fill_decls_vec): Only put decls into vector v.
5189 (compare_decls): Fix up formatting.
5190
5191 2015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5192
5193 PR c/63307
5194 * cilk.c: Include vec.h.
5195 (struct cilk_decls): New structure.
5196 (wrapper_parm_cb): Split this function to...
5197 (fill_decls_vec): ...this...
5198 (create_parm_list): ...and this.
5199 (compare_decls): New function.
5200 (for_local_cb): Remove.
5201 (wrapper_local_cb): Ditto.
5202 (build_wrapper_type): For now first traverse and fill vector of
5203 declarations then sort it and then deal with sorted vector.
5204 (cilk_outline): Ditto.
5205 (declare_one_free_variable): Ditto.
5206
5207 2015-01-21 Jason Merrill <jason@redhat.com>
5208
5209 PR c++/64629
5210 * c-format.c (check_format_arg): Call decl_constant_value.
5211
5212 2015-01-19 Martin Liska <mliska@suse.cz>
5213
5214 * c-common.c (handle_noicf_attribute): New function.
5215
5216 2015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5217 Bernd Schmidt <bernds@codesourcery.com>
5218 James Norris <jnorris@codesourcery.com>
5219 Cesar Philippidis <cesar@codesourcery.com>
5220 Ilmir Usmanov <i.usmanov@samsung.com>
5221 Jakub Jelinek <jakub@redhat.com>
5222
5223 * c.opt (fopenacc): New option.
5224 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5225 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5226 New macros.
5227 * c-common.h (c_finish_oacc_wait): New prototype.
5228 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5229 (c_finish_oacc_wait): New function.
5230 * c-pragma.c (oacc_pragmas): New variable.
5231 (c_pp_lookup_pragma, init_pragma): Handle it.
5232 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5233 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5234 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5235 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5236 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5237 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5238 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5239 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5240 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5241 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5242 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5243 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5244 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5245 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5246 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5247 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5248 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5249 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5250 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5251 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5252 PRAGMA_OACC_CLAUSE_WORKER.
5253
5254 2015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5255
5256 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5257 for the new option fstack-protector_explicit.
5258 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5259 (handle_stack_protect_attribute): New function.
5260
5261 2015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
5262
5263 * c.opt: New option -Warray-bounds=.
5264
5265 2015-01-09 Michael Collison <michael.collison@linaro.org>
5266
5267 * array-notation-common.c: Include hash-set.h, machmode.h,
5268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5269 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5270 * c-ada-spec.c: Ditto.
5271 * c-cilkplus.c: Ditto.
5272 * c-common.c: Include input.h due to flattening of tree.h.
5273 Define macro GCC_C_COMMON_C.
5274 * c-common.h: Flatten tree.h header files into c-common.h.
5275 Remove include of tree-core.h.
5276 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5277 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5278 fold-const.h, wide-int.h, and inchash.h due to
5279 flattening of tree.h.
5280 * c-dump.c: Ditto.
5281 * c-format.c: Flatten tree.h header files into c-common.h.
5282 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5283 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5284 fold-const.h, wide-int.h, and inchash.h due to
5285 flattening of tree.h.
5286 * c-dump.c: Include hash-set.h, machmode.h,
5287 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5288 fold-const.h, wide-int.h, and inchash.h due to
5289 flattening of tree.h.
5290 * c-format.c: Include hash-set.h, machmode.h,
5291 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5292 fold-const.h, wide-int.h, inchash.h and real.h due to
5293 flattening of tree.h.
5294 * c-gimplify.c: Include hash-set.h, machmode.h,
5295 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5296 fold-const.h, wide-int.h, and inchash.h due to
5297 flattening of tree.h.
5298 * cilk.c: Ditto.
5299 * c-lex.c: Ditto.
5300 * c-omp.c: Ditto.
5301 * c-opts.c: Ditto.
5302 * c-pch.c: Ditto.
5303 * c-ppoutput.c: Ditto.
5304 * c-pragma.c: Ditto.
5305 * c-pretty-print.c: Ditto.
5306 * c-semantics.c: Ditto.
5307 * c-ubsan.c: Ditto.
5308 * stub-objc.c: Ditto.
5309
5310 2015-01-08 Jason Merrill <jason@redhat.com>
5311
5312 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5313 do_ubsan_in_current_function.
5314 (ubsan_maybe_instrument_reference_or_call): Likewise.
5315 * c-ubsan.h: Declare it.
5316
5317 2015-01-08 Mike Stump <mikestump@comcast.net>
5318
5319 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5320
5321 2015-01-07 Marek Polacek <polacek@redhat.com>
5322
5323 PR c/64440
5324 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5325 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5326
5327 2015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5328
5329 PR c++/31397
5330 * c.opt (Wsuggest-override): New option.
5331
5332 2015-01-05 Jakub Jelinek <jakub@redhat.com>
5333
5334 Update copyright years.
5335
5336 2015-01-05 Marek Polacek <polacek@redhat.com>
5337
5338 PR c/64423
5339 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5340 parameter. Use it.
5341 * c-common.h (warn_array_subscript_with_type_char): Update
5342 declaration.
5343
5344 2014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5345
5346 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5347 Control macro with flag_sized_deallocation.
5348
5349 2014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
5350
5351 * c.opt (Wdiscarded-array-qualifiers): New option.
5352
5353 2014-12-19 Jakub Jelinek <jakub@redhat.com>
5354
5355 PR preprocessor/63831
5356 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5357 and __has_cpp_attribute here.
5358 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5359 c_common_has_attribute.
5360 * c-common.h (c_common_has_attribute): New prototype.
5361 * c-lex.c (init_c_lex): Set cb->has_attribute to
5362 c_common_has_attribute instead of cb_has_attribute.
5363 (get_token_no_padding): New function.
5364 (cb_has_attribute): Renamed to ...
5365 (c_common_has_attribute): ... this. No longer static. Use
5366 get_token_no_padding, require ()s, don't build TREE_LIST
5367 unnecessarily, fix up formatting, adjust diagnostics, call
5368 init_attributes.
5369
5370 2014-12-15 Jason Merrill <jason@redhat.com>
5371
5372 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5373 (-Wsized-deallocation): New.
5374 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5375 to on in C++14 and up.
5376
5377 2014-12-11 Jason Merrill <jason@redhat.com>
5378
5379 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5380
5381 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5382 we aren't complaining about VLAs.
5383
5384 2014-12-06 Marek Polacek <polacek@redhat.com>
5385
5386 PR tree-optimization/64183
5387 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5388 shift-expression if it is integer_type_node. Use types_compatible_p.
5389
5390 2014-11-29 Jakub Jelinek <jakub@redhat.com>
5391
5392 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5393 last argument from create_tmp_var_raw and create_tmp_var calls.
5394 * cilk.c (gimplify_cilk_spawn): Likewise.
5395 * c-omp.c (c_finish_omp_atomic): Likewise.
5396
5397 2014-11-28 Marek Polacek <polacek@redhat.com>
5398
5399 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5400 instead of unsigned_type_node.
5401
5402 2014-11-28 Marek Polacek <polacek@redhat.com>
5403
5404 PR c/63862
5405 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5406 to op1_utype.
5407 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5408 expression to unsigned_type_node.
5409
5410 2014-11-20 Mark Wielaard <mjw@redhat.com>
5411
5412 PR debug/38757
5413 * c-opts.c (set_std_c89): Set lang_hooks.name.
5414 (set_std_c99): Likewise.
5415 (set_std_c11): Likewise.
5416 (set_std_cxx98): Likewise.
5417 (set_std_cxx11): Likewise.
5418 (set_std_cxx14): Likewise.
5419 (set_std_cxx1z): Likewise.
5420
5421 2014-11-21 Jakub Jelinek <jakub@redhat.com>
5422
5423 PR target/63764
5424 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5425 return type to bool.
5426 * c-common.c: Include gimple-expr.h.
5427 (convert_vector_to_pointer_for_subscript): Change return type to
5428 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5429 and copy it into a TARGET_EXPR and use that instead of *vecp
5430 directly.
5431
5432 2014-11-19 David Malcolm <dmalcolm@redhat.com>
5433
5434 Merger of git branch "gimple-classes-v2-option-3".
5435 * ChangeLog.gimple-classes: New.
5436 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5437 from being just a vec<gimple> to a vec<gbind *>.
5438
5439 2014-11-18 Jakub Jelinek <jakub@redhat.com>
5440
5441 PR sanitizer/63813
5442 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5443 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5444 get_pointer_alignment for non-pointers. Use ptype, or if it is
5445 reference type, corresponding pointer type, as type of kind
5446 argument.
5447 (ubsan_maybe_instrument_reference,
5448 ubsan_maybe_instrument_member_call): Adjust callers.
5449
5450 2014-11-15 Marek Polacek <polacek@redhat.com>
5451
5452 PR middle-end/63884
5453 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5454 for NULL fndecl.
5455 (extract_array_notation_exprs): Return for NULL node.
5456
5457 2014-11-12 Joseph Myers <joseph@codesourcery.com>
5458
5459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5460 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5461
5462 2014-11-12 Jakub Jelinek <jakub@redhat.com>
5463
5464 PR c/59708
5465 * c-common.c (check_builtin_function_arguments): Handle
5466 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5467
5468 2014-11-10 Andi Kleen <ak@linux.intel.com>
5469
5470 PR c/60804
5471 * c-common.h (check_no_cilk): Declare.
5472 * cilk.c (get_error_location): New function.
5473 (check_no_cilk): Dito.
5474
5475 2014-11-10 Andi Kleen <ak@linux.intel.com>
5476
5477 * cilk.c (recognize_spawn): Use expression location
5478 for error message.
5479
5480 2014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5481
5482 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5483
5484 2014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5485
5486 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5487 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5488 (__cpp_range_based_for, __cpp_initializer_lists,
5489 __cpp_delegating_constructors, __cpp_nsdmi,
5490 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5491 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5492 __has_cpp_attribute.
5493 * c-lex.c (cb_has_attribute): New callback CPP function;
5494 (init_c_lex): Set has_attribute callback.
5495
5496 2014-11-04 Richard Biener <rguenther@suse.de>
5497
5498 * c-common.c (shorten_compare): Do not shorten mixed
5499 DFP and non-DFP compares.
5500
5501 2014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5502
5503 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5504 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5505 Commentary and rearrangement of tests.
5506 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5507 Commentary and rearrangement of tests.
5508 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5509 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5510
5511 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5512
5513 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5514 enum from machine_mode.
5515
5516 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
5517
5518 * c-common.c: Adjust include files.
5519 * c-gimplify.c: Ditto.
5520 * cilk.c: Ditto.
5521 * c-pragma.c: Ditto.
5522 * c-ubsan.c: Ditto.
5523
5524 2014-10-27 Andrew MacLeod <amacleod@redhat.com>
5525
5526 * c-gimplify.c: Adjust include files.
5527
5528 2014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5529
5530 PR c++/53061
5531 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5532 c_common_initialize_diagnostics.
5533 * c-common.h: Likewise.
5534
5535 2014-10-24 Marek Polacek <polacek@redhat.com>
5536
5537 PR c/56980
5538 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5539 print "struct"/"union"/"enum" for typedefed names.
5540
5541 2014-10-23 Marek Polacek <polacek@redhat.com>
5542
5543 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5544 in unsigned type.
5545
5546 2014-10-22 Jakub Jelinek <jakub@redhat.com>
5547 Yury Gribov <y.gribov@samsung.com>
5548
5549 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5550 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5551 instead of flag_sanitize_recover as bool flag.
5552
5553 2014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5554
5555 * cilk.c: Revert previous change.
5556
5557 2014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5558
5559 PR c/63307
5560 * cilk.c: Include vec.h.
5561 (struct cilk_decls): New structure.
5562 (wrapper_parm_cb): Split this function to...
5563 (fill_decls_vec): ...this...
5564 (create_parm_list): ...and this.
5565 (compare_decls): New function.
5566 (for_local_cb): Remove.
5567 (wrapper_local_cb): Ditto.
5568 (build_wrapper_type): For now first traverse and fill vector of
5569 declarations then sort it and then deal with sorted vector.
5570 (cilk_outline): Ditto.
5571 (declare_one_free_variable): Ditto.
5572
5573 2014-10-17 Marek Polacek <polacek@redhat.com>
5574
5575 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5576 * c.opt (Wimplicit-int): Initialize to -1.
5577
5578 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
5579
5580 * c-pragma.c: Adjust include files.
5581 * c-semantics.c: Likewise.
5582
5583 2014-10-16 DJ Delorie <dj@redhat.com>
5584
5585 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5586 multiples of bytes.
5587
5588 2014-10-14 Jason Merrill <jason@redhat.com>
5589
5590 PR c++/63455
5591 * c-common.h (CPP_PREPARSED_EXPR): New.
5592 (N_CP_TTYPES): Adjust.
5593
5594 2014-10-15 Marek Polacek <polacek@redhat.com>
5595
5596 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5597
5598 2014-10-14 DJ Delorie <dj@redhat.com>
5599
5600 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5601 types, not just __int128.
5602 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5603 types, not just __int128.
5604 (cpp_atomic_builtins): Round pointer sizes up.
5605 (type_suffix): Use type precision, not specific types.
5606 * c-common.c (c_common_reswords): Remove __int128 special case.
5607 (c_common_type_for_size): Check for all __intN types, not just
5608 __int128.
5609 (c_common_type_for_mode): Likewise.
5610 (c_common_signed_or_unsigned_type): Likewise.
5611 (c_build_bitfield_integer_type): Likewise.
5612 (c_common_nodes_and_builtins): Likewise.
5613 (keyword_begins_type_specifier): Likewise.
5614 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5615 __intN variants.
5616
5617 2014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5618
5619 * c-common.c: Use hash_table instead of hashtab.
5620
5621 2014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5622
5623 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
5624 C++11 section.
5625
5626 2014-10-03 Marc Glisse <marc.glisse@inria.fr>
5627
5628 PR c++/54427
5629 PR c++/57198
5630 PR c++/58845
5631 * c-common.c (warn_logical_operator): Punt for vectors.
5632
5633 2014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5634
5635 Implement SD-6: SG10 Feature Test Recommendations
5636 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
5637 macros and the __has_header macro.
5638
5639 2014-09-30 Jason Merrill <jason@redhat.com>
5640
5641 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
5642 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
5643 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5644
5645 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
5646 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
5647
5648 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
5649 * c-common.c (c_common_reswords): Remove __is_convertible_to.
5650
5651 2014-09-24 Marek Polacek <polacek@redhat.com>
5652
5653 PR c/61405
5654 PR c/53874
5655 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
5656
5657 2014-09-23 Andi Kleen <ak@linux.intel.com>
5658
5659 * c-common.c (handle_no_reorder_attribute): New function.
5660 (c_common_attribute_table): Add no_reorder attribute.
5661
5662 2014-09-22 Joseph Myers <joseph@codesourcery.com>
5663
5664 * c-cppbuiltin.c (c_cpp_builtins): Define
5665 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
5666 modes.
5667
5668 2014-09-18 Joseph Myers <joseph@codesourcery.com>
5669
5670 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
5671 for supported floating-point modes.
5672
5673 2014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5674
5675 * c.opt (Wpsabi): Use LangEnabledBy.
5676 * c-opts.c (c_common_handle_option): Do not handle here.
5677
5678 2014-09-12 Joseph Myers <joseph@codesourcery.com>
5679
5680 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
5681 macros for floating-point modes.
5682
5683 2014-09-11 Marc Glisse <marc.glisse@inria.fr>
5684
5685 PR target/58757
5686 * c-cppbuiltin.c (builtin_define_float_constants): Correct
5687 __*_DENORM_MIN__ without denormals.
5688
5689 2014-09-10 Jakub Jelinek <jakub@redhat.com>
5690
5691 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5692 ubsan_instrument_vla, ubsan_instrument_return): Adjust
5693 ubsan_create_data callers.
5694 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
5695 index is constant or BIT_AND_EXPR with constant mask and is
5696 small enough for the bound.
5697 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
5698 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
5699
5700 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5701
5702 * c.opt: Add CppReason to various flags.
5703 (Wdate-time): Re-sort.
5704 * c-common.c: Include c-common.h earlier.
5705 (struct reason_option_codes_t): Delete.
5706 (c_option_controlling_cpp_error): Prefix global type and struct
5707 with cpp_.
5708
5709 2014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5710
5711 * c.opt (Wnormalized): New.
5712 (Wnormalized=): Use Enum and Reject Negative.
5713 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
5714
5715 2014-09-08 Joseph Myers <joseph@codesourcery.com>
5716
5717 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
5718 digits of floating-point modes if -fbuilding-libgcc.
5719
5720 2014-09-05 Joseph Myers <joseph@codesourcery.com>
5721
5722 * c-cppbuiltin.c (c_cpp_builtins): Also define
5723 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
5724 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
5725 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
5726 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
5727 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
5728 __LIBGCC_STACK_GROWS_DOWNWARD__,
5729 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
5730 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
5731 __LIBGCC_DWARF_FRAME_REGISTERS__,
5732 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
5733 __LIBGCC_STACK_POINTER_REGNUM__ and
5734 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
5735 (builtin_define_with_value): Handle backslash-escaping in string
5736 macro values.
5737
5738 2014-09-05 Richard Biener <rguenther@suse.de>
5739
5740 PR middle-end/63148
5741 * c-format.c (check_format_arg): Properly handle
5742 effectively signed POINTER_PLUS_EXPR offset.
5743
5744 2014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
5745
5746 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
5747 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
5748 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
5749 and Init.
5750 * c-opts.c (c_common_handle_option): Do not handle here.
5751 (sanitize_cpp_opts): Likewise.
5752 * c-common.c (struct reason_option_codes_t): Handle
5753 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
5754
5755 2014-09-03 Marek Polacek <polacek@redhat.com>
5756
5757 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
5758
5759 2014-09-02 Jakub Jelinek <jakub@redhat.com>
5760 Balaji V. Iyer <balaji.v.iyer@intel.com>
5761 Igor Zamyatin <igor.zamyatin@intel.com>
5762
5763 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
5764 * c-common.c (c_common_reswords): Added _Cilk_for.
5765 * c-common.h (enum rid): Added RID_CILK_FOR.
5766 (cilk_for_number_of_iterations): Add declaration.
5767 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
5768 CILK_FOR.
5769 * c-pragma.c (init_pragma): Register "grainsize" pragma.
5770 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
5771
5772 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5773
5774 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
5775 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
5776 Wundef): Use CPP, Var and Init.
5777 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
5778
5779 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5780
5781 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
5782 * c-opts.c (c_common_handle_option): Do not handle here.
5783
5784 2014-08-25 Jason Merrill <jason@redhat.com>
5785
5786 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
5787 -std=c++14 and -std=gnu++14, rather than the reverse.
5788 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
5789 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
5790 * c-common.h (cxx_dialect): Remove cxx1y.
5791
5792 2014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
5793
5794 * c-common.h (enum cxx_dialect): Add cxx14.
5795 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
5796 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
5797 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
5798
5799 2014-08-22 Jason Merrill <jason@redhat.com>
5800
5801 * c.opt (std=gnu++17): Fix alias.
5802
5803 2014-08-22 Marek Polacek <polacek@redhat.com>
5804
5805 PR c++/62199
5806 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
5807 check for vector types. Drop LHS argument.
5808 * c-common.h (warn_logical_not_parentheses): Adjust.
5809
5810 2014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5811
5812 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
5813 (Wmultichar): Likewise.
5814 (Wdate-time): Use C-family languages instead of Common. Use CPP
5815 and Var.
5816 * c-opts.c (c_common_handle_option): Do not handle the above
5817 options here.
5818 (sanitize_cpp_opts): Likewise.
5819
5820 2014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
5821
5822 PR fortran/44054
5823 * c-opts.c: Include tree-diagnostics.h.
5824 (c_diagnostic_finalizer): New.
5825 (c_common_initialize_diagnostics): Use it.
5826
5827 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5828
5829 PR preprocessor/51303
5830 * c-common.c (struct reason_option_codes_t option_codes):
5831 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
5832
5833 2014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
5834
5835 PR c/60975
5836 PR c/53063
5837 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
5838 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
5839 (c_common_post_options): Call init_global_opts_from_cpp.
5840 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
5841
5842 2014-08-19 Marek Polacek <polacek@redhat.com>
5843
5844 PR c++/62153
5845 * c-common.c (maybe_warn_bool_compare): New function.
5846 * c-common.h (maybe_warn_bool_compare): Declare.
5847 * c.opt (Wbool-compare): New option.
5848
5849 2014-08-19 Marek Polacek <polacek@redhat.com>
5850
5851 * c.opt (Wc99-c11-compat): New option.
5852
5853 2014-08-19 Marek Polacek <polacek@redhat.com>
5854
5855 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
5856 to warn_c90_c99_compat.
5857 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
5858 to -1.
5859
5860 2014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
5861 Steven Bosscher <steven@gcc.gnu.org>
5862
5863 PR c/52952
5864 * c-format.c: Add extra_arg_loc and format_string_loc to struct
5865 format_check_results.
5866 (check_function_format): Use true and add comment for boolean
5867 argument.
5868 (finish_dollar_format_checking): Use explicit location when warning.
5869 (check_format_info): Likewise.
5870 (check_format_arg): Set extra_arg_loc and format_string_loc.
5871 (check_format_info_main): Use explicit location when warning.
5872 (check_format_types): Pass explicit location.
5873 (format_type_warning): Likewise.
5874
5875 2014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
5876
5877 PR fortran/44054
5878 * c-format.c: Handle Fortran flags.
5879
5880 2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
5881
5882 PR other/61962
5883 * array-notation-common.c (find_rank): Added handling for other
5884 types of references.
5885
5886 2014-08-10 Marek Polacek <polacek@redhat.com>
5887
5888 PR c/51849
5889 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
5890 * c.opt (Wc90-c99-compat): Add option.
5891
5892 2014-08-07 Trevor Saunders <tsaunders@mozilla.com>
5893
5894 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
5895
5896 2014-08-03 Marek Polacek <polacek@redhat.com>
5897
5898 * c-common.c (check_case_value): Add location_t parameter. Use it.
5899 (c_add_case_label): Pass loc to check_case_value.
5900
5901 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5902
5903 * cilk.c: Use hash_map instead of pointer_map.
5904
5905 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
5906
5907 * c-gimplify.c: Use hash_set instead of pointer_set.
5908
5909 2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
5910
5911 PR middle-end/61455
5912 * array-notation-common.c (extract_array_notation_exprs): Handling
5913 of DECL_EXPR added.
5914
5915 2014-08-01 Jakub Jelinek <jakub@redhat.com>
5916
5917 * c-common.h (min_align_of_type): Removed prototype.
5918 * c-common.c (min_align_of_type): Removed.
5919 * c-ubsan.h (ubsan_maybe_instrument_reference,
5920 ubsan_maybe_instrument_member_call): New prototypes.
5921 * c-ubsan.c: Include stor-layout.h and builtins.h.
5922 (ubsan_maybe_instrument_reference_or_call,
5923 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
5924 functions.
5925
5926 2014-07-31 Marc Glisse <marc.glisse@inria.fr>
5927
5928 PR c++/60517
5929 * c.opt (-Wreturn-local-addr): Move to common.opt.
5930
5931 2014-07-30 Jason Merrill <jason@redhat.com>
5932
5933 PR c++/61659
5934 PR c++/61687
5935 Revert:
5936 * c.opt (-fuse-all-virtuals): New.
5937
5938 2014-07-30 Tom Tromey <tromey@redhat.com>
5939
5940 PR c/59855
5941 * c.opt (Wdesignated-init): New option.
5942 * c-common.c (c_common_attribute_table): Add "designated_init".
5943 (handle_designated_init): New function.
5944
5945 2014-07-24 Marek Polacek <polacek@redhat.com>
5946
5947 PR c/57653
5948 * c-opts.c (c_finish_options): If -imacros is in effect, return.
5949
5950 2014-07-16 Dodji Seketeli <dodji@redhat.com>
5951
5952 PR preprocessor/60723 - missing system-ness marks for macro tokens
5953 * c-ppoutput.c (struct print::prev_was_system_token): New data
5954 member.
5955 (init_pp_output): Initialize it.
5956 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
5957 (do_line_change): Return a flag saying if a line marker was
5958 emitted or not.
5959 (scan_translation_unit): Detect if the system-ness of the token we
5960 are about to emit is different from the one of the previously
5961 emitted token. If so, emit a line marker. Avoid emitting useless
5962 adjacent line markers. Avoid emitting line markers for tokens
5963 originating from the expansion of built-in macros.
5964 (scan_translation_unit_directives_only): Adjust.
5965
5966 2014-07-15 Marek Polacek <polacek@redhat.com>
5967
5968 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
5969 TYPE_MAX_VALUE is NULL.
5970
5971 2014-07-14 Jakub Jelinek <jakub@redhat.com>
5972
5973 PR middle-end/61294
5974 * c.opt (Wmemset-transposed-args): New warning.
5975
5976 2014-07-10 Jason Merrill <jason@redhat.com>
5977
5978 PR c++/61659
5979 PR c++/61687
5980 * c.opt (-fuse-all-virtuals): New.
5981
5982 2014-07-09 Richard Biener <rguenther@suse.de>
5983
5984 PR c-family/61741
5985 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
5986 using unsigned arithmetic if overflow does not wrap instead of
5987 if overflow is undefined.
5988
5989 2014-07-06 Marek Polacek <polacek@redhat.com>
5990
5991 PR c/6940
5992 * c.opt (Wsizeof-array-argument): New option.
5993
5994 2014-07-03 Jakub Jelinek <jakub@redhat.com>
5995
5996 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
5997 comments->count <= 1, as comments->entries might be NULL.
5998
5999 2014-07-01 Marek Polacek <polacek@redhat.com>
6000
6001 * c.opt (Wint-conversion): New option.
6002
6003 2014-07-01 Marek Polacek <polacek@redhat.com>
6004
6005 PR c/58286
6006 * c.opt (Wincompatible-pointer-types): New option.
6007
6008 2014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6009
6010 PR c++/51400
6011 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6012 Do not discard TYPE_QUALS of type.
6013
6014 2014-06-26 Jason Merrill <jason@redhat.com>
6015
6016 * c-common.h (enum cxx_dialect): Add cxx1z.
6017 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6018 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6019
6020 2014-06-26 Teresa Johnson <tejohnson@google.com>
6021
6022 * c-common.h (get_dump_info): Declare.
6023 * c-gimplify.c (c_genericize): Use saved dump files.
6024 * c-opts.c (c_common_parse_file): Begin and end dumps
6025 once around parsing invocation.
6026 (get_dump_info): New function.
6027
6028 2014-06-23 Marek Polacek <polacek@redhat.com>
6029 Andrew MacLeod <amacleod@redhat.com>
6030
6031 PR c/61553
6032 * c-common.c (get_atomic_generic_size): Don't segfault if the
6033 type doesn't have a size.
6034
6035 2014-06-20 Marek Polacek <polacek@redhat.com>
6036
6037 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6038 (ubsan_walk_array_refs_r): New function.
6039 (c_genericize): Instrument array bounds.
6040 * c-ubsan.c: Include "internal-fn.h".
6041 (ubsan_instrument_division): Mark instrumented arrays as having
6042 side effects. Adjust ubsan_type_descriptor call.
6043 (ubsan_instrument_shift): Likewise.
6044 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6045 (ubsan_instrument_bounds): New function.
6046 (ubsan_array_ref_instrumented_p): New function.
6047 (ubsan_maybe_instrument_array_ref): New function.
6048 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6049 (ubsan_array_ref_instrumented_p): Declare.
6050 (ubsan_maybe_instrument_array_ref): Declare.
6051
6052 2014-06-20 Hale Wang <hale.wang@arm.com>
6053
6054 PR lto/61123
6055 * c.opt (fshort-enums): Add to LTO.
6056 * c.opt (fshort-wchar): Likewise.
6057
6058 2014-06-16 Marek Polacek <polacek@redhat.com>
6059
6060 PR c/60439
6061 * c.opt (Wswitch-bool): Add Var.
6062
6063 2014-06-12 Jakub Jelinek <jakub@redhat.com>
6064
6065 PR middle-end/61486
6066 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6067 #pragma omp target teams or
6068 #pragma omp {,target }teams distribute simd.
6069
6070 2014-06-12 Jason Merrill <jason@redhat.com>
6071
6072 * c.opt (Wabi=, fabi-compat-version): New.
6073 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6074 (c_common_post_options): Handle flag_abi_compat_version default.
6075 Disallow -fabi-compat-version=1.
6076 * c-common.h (abi_version_crosses): New.
6077
6078 2014-06-11 Jan Hubicka <hubicka@ucw.cz>
6079
6080 * c-common.c (handle_section_attribute): Update handling for
6081 section names that are no longer trees.
6082
6083 2014-06-10 Jakub Jelinek <jakub@redhat.com>
6084
6085 PR fortran/60928
6086 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6087 (omp_pragmas): ... back here.
6088
6089 2014-06-05 Marek Polacek <polacek@redhat.com>
6090
6091 PR c/49706
6092 * c-common.c (warn_logical_not_parentheses): New function.
6093 * c-common.h (warn_logical_not_parentheses): Declare.
6094 * c.opt (Wlogical-not-parentheses): New option.
6095
6096 2014-06-04 Marek Polacek <polacek@redhat.com>
6097
6098 PR c/30020
6099 * c-common.c (check_case_bounds): Add location parameter.
6100 Use it.
6101 (c_add_case_label): Pass loc to check_case_bounds.
6102
6103 2014-06-03 Marek Polacek <polacek@redhat.com>
6104
6105 PR c/60439
6106 * c.opt (Wswitch-bool): New option.
6107
6108 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6109
6110 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6111 Remove prototypes.
6112 (record_types_used_by_current_var_decl): Move prototype to where
6113 it belongs.
6114
6115 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6116 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6117 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6118
6119 2014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6120
6121 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6122 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6123 void_zero_node.
6124 * c-pretty-print.c (pp_c_void_constant): New function.
6125 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6126 (c_pretty_printer::expression): Handle VOID_CST.
6127 * cilk.c (extract_free_variables): Likewise.
6128 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6129 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6130
6131 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6132
6133 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6134 * c-pragma.c (push_alignment): Adjust.
6135 (handle_pragma_push_options): Likewise.
6136
6137 2014-05-09 Marek Polacek <polacek@redhat.com>
6138
6139 PR c/50459
6140 * c-common.c (check_user_alignment): Return -1 if alignment is error
6141 node.
6142 (handle_aligned_attribute): Don't call default_conversion on
6143 FUNCTION_DECLs.
6144 (handle_vector_size_attribute): Likewise.
6145 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6146 (handle_sentinel_attribute): Call default_conversion and allow even
6147 integral types as an argument.
6148
6149 2014-05-08 Marek Polacek <polacek@redhat.com>
6150
6151 PR c/61053
6152 * c-common.c (min_align_of_type): New function factored out from...
6153 (c_sizeof_or_alignof_type): ...here.
6154 * c-common.h (min_align_of_type): Declare.
6155
6156 2014-05-08 Marek Polacek <polacek@redhat.com>
6157
6158 PR c/61077
6159 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6160 parameter type of main.
6161
6162 2014-05-07 DJ Delorie <dj@redhat.com>
6163
6164 * c-cppbuiltin.c (print_bits_of_hex): New.
6165 (builtin_define_type_minmax): Print values using hex so as not to
6166 require a pre-computed list of string values.
6167
6168 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6169 Mike Stump <mikestump@comcast.net>
6170 Richard Sandiford <rdsandiford@googlemail.com>
6171
6172 * c-ada-spec.c: Include wide-int.h.
6173 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6174 (dump_generic_ada_node): Use wide-int interfaces.
6175 * c-common.c: Include wide-int-print.h.
6176 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6177 (pointer_int_sum): Use wide-int interfaces.
6178 (c_common_nodes_and_builtins): Use make_int_cst.
6179 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6180 (handle_alloc_size_attribute): Use wide-int interfaces.
6181 (get_nonnull_operand): Likewise.
6182 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6183 * c-lex.c: Include wide-int.h.
6184 (narrowest_unsigned_type): Take a widest_int rather than two
6185 HOST_WIDE_INTs.
6186 (narrowest_signed_type): Likewise.
6187 (interpret_integer): Update accordingly. Use wide-int interfaces.
6188 (lex_charconst): Use wide-int interfaces.
6189 * c-pretty-print.c: Include wide-int.h.
6190 (pp_c_integer_constant): Use wide-int interfaces.
6191 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6192 INT_CST_LT_UNSIGNED.
6193
6194 2014-05-06 Richard Biener <rguenther@suse.de>
6195
6196 * c-opts.c (c_common_post_options): For -freestanding,
6197 -fno-hosted and -fno-builtin disable pattern recognition
6198 if not enabled explicitely.
6199
6200 2014-05-02 Marek Polacek <polacek@redhat.com>
6201
6202 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6203
6204 2014-05-01 Marek Polacek <polacek@redhat.com>
6205
6206 PR c/43245
6207 * c.opt (Wdiscarded-qualifiers): Add.
6208
6209 2014-04-30 Marek Polacek <polacek@redhat.com>
6210
6211 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6212 INT_MIN / -1 sanitization only for integer types.
6213
6214 2014-04-25 Marek Polacek <polacek@redhat.com>
6215
6216 PR c/18079
6217 * c-common.c (handle_noinline_attribute): Warn if the attribute
6218 conflicts with always_inline attribute.
6219 (handle_always_inline_attribute): Warn if the attribute conflicts
6220 with noinline attribute.
6221
6222 2014-04-25 Marek Polacek <polacek@redhat.com>
6223
6224 PR c/60156
6225 * c-common.c (check_main_parameter_types): Warn about variadic main.
6226
6227 2014-04-24 Mike Stump <mikestump@comcast.net>
6228
6229 * c.opt (Wshadow-ivar): Default to on.
6230
6231 2014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6232
6233 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6234
6235 2014-04-23 Marek Polacek <polacek@redhat.com>
6236
6237 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6238
6239 2014-04-22 Jakub Jelinek <jakub@redhat.com>
6240
6241 PR sanitizer/60275
6242 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6243 if flag_sanitize_undefined_trap_on_error.
6244 (ubsan_instrument_division, ubsan_instrument_shift,
6245 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6246 if !flag_sanitize_recover.
6247
6248 2014-04-22 Marc Glisse <marc.glisse@inria.fr>
6249
6250 PR libstdc++/43622
6251 * c-common.c (registered_builtin_types): Make non-static.
6252 * c-common.h (registered_builtin_types): Declare.
6253
6254 2014-04-14 Richard Biener <rguenther@suse.de>
6255 Marc Glisse <marc.glisse@inria.fr>
6256
6257 PR c/60819
6258 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6259 apply may-alias the scalar pointer type when applicable.
6260
6261 2014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6262
6263 PR middle-end/60467
6264 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6265 as possible argument for Cilk_spawn.
6266
6267 2014-04-11 Tobias Burnus <burnus@net-b.de>
6268
6269 PR c/60194
6270 * c.opt (Wformat-signedness): Add
6271 * c-format.c(check_format_types): Use it.
6272
6273 2014-04-11 Jason Merrill <jason@redhat.com>
6274
6275 PR c++/57926
6276 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6277 default_conversion for an array argument.
6278
6279 2014-04-08 Marek Polacek <polacek@redhat.com>
6280
6281 PR sanitizer/60745
6282 * c-ubsan.c: Include asan.h.
6283 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6284
6285 2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6286
6287 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6288
6289 2014-04-02 Marek Polacek <polacek@redhat.com>
6290
6291 * c-common.h (c_expand_expr): Remove declaration.
6292
6293 2014-03-28 Jakub Jelinek <jakub@redhat.com>
6294
6295 PR c++/60689
6296 * c-common.c (add_atomic_size_parameter): When creating new
6297 params vector, push the size argument first.
6298
6299 2014-03-26 Jakub Jelinek <jakub@redhat.com>
6300
6301 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6302 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6303 ubsan_create_data callers.
6304
6305 2014-03-22 Jakub Jelinek <jakub@redhat.com>
6306
6307 PR debug/60603
6308 * c-opts.c (c_finish_options): Restore cb_file_change call to
6309 <built-in>.
6310
6311 2014-03-13 Jakub Jelinek <jakub@redhat.com>
6312
6313 PR middle-end/36282
6314 * c-pragma.c (apply_pragma_weak): Only look at
6315 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6316 DECL_ASSEMBLER_NAME_SET_P (decl).
6317 (maybe_apply_pending_pragma_weaks): Exit early if
6318 vec_safe_is_empty (pending_weaks) rather than only when
6319 !pending_weaks.
6320 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6321 set assembler name back to NULL afterwards.
6322
6323 2014-03-11 Jason Merrill <jason@redhat.com>
6324
6325 * c.opt: Add -std=gnu++14.
6326
6327 2014-03-11 Ian Bolton <ian.bolton@arm.com>
6328
6329 * c-opts.c (c_common_post_options): Don't override
6330 -ffp-contract=fast if unsafe-math-optimizations is on.
6331
6332 2014-03-08 Paulo Matos <paulo@matos-sorge.com>
6333
6334 * c.opt: Enable LTO FE for fshort-double.
6335
6336 2014-03-07 Jason Merrill <jason@redhat.com>
6337
6338 * c.opt: Add -std=c++14.
6339
6340 2014-03-06 Marek Polacek <polacek@redhat.com>
6341
6342 PR c/60197
6343 * cilk.c (contains_cilk_spawn_stmt): New function.
6344 (contains_cilk_spawn_stmt_walker): Likewise.
6345 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6346 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6347
6348 2014-03-03 Jakub Jelinek <jakub@redhat.com>
6349
6350 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6351 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6352 even when flag_preprocess_only.
6353
6354 2014-02-26 Jason Merrill <jason@redhat.com>
6355
6356 PR c++/59231
6357 PR c++/11586
6358 * c-common.c (shorten_compare): Don't check
6359 c_inhibit_evaluation_warnings.
6360
6361 2014-02-19 Jakub Jelinek <jakub@redhat.com>
6362
6363 PR c/37743
6364 * c-common.c (c_common_nodes_and_builtins): When initializing
6365 c_uint{16,32,64}_type_node, also set corresponding
6366 uint{16,32,64}_type_node to the same value.
6367
6368 PR c++/60267
6369 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6370 for PRAGMA_IVDEP if flag_preprocess_only.
6371
6372 2014-02-12 Jakub Jelinek <jakub@redhat.com>
6373
6374 PR c/60101
6375 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6376 if false, add ADD itself, rather than vice versa.
6377 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6378 copy. For SAVE_EXPR, only call merge_tlist once.
6379
6380 2014-02-08 Jakub Jelinek <jakub@redhat.com>
6381
6382 PR middle-end/60092
6383 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6384 and tree_to_uhwi.
6385 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6386 functions.
6387 (c_common_attribute_table): Add alloc_align and assume_aligned
6388 attributes.
6389
6390 2014-02-06 Marek Polacek <polacek@redhat.com>
6391
6392 PR c/60087
6393 * c-common.c (warn_for_sign_compare): Call warning_at with location
6394 instead of warning.
6395
6396 2014-02-05 Marek Polacek <polacek@redhat.com>
6397
6398 PR c/53123
6399 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6400 statement.
6401
6402 2014-02-04 Marek Polacek <polacek@redhat.com>
6403
6404 PR c/60036
6405 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6406 SAVE_EXPR.
6407
6408 2014-02-03 Marc Glisse <marc.glisse@inria.fr>
6409
6410 PR c++/53017
6411 PR c++/59211
6412 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6413 handle_vector_size_attribute, handle_nonnull_attribute): Call
6414 default_conversion on the attribute argument.
6415 (handle_nonnull_attribute): Increment the argument number.
6416
6417 2014-01-31 Marek Polacek <polacek@redhat.com>
6418
6419 PR c/59963
6420 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6421 build_function_call_vec.
6422 (resolve_overloaded_builtin): Likewise.
6423 * c-common.h (build_function_call_vec): Adjust declaration.
6424
6425 2014-01-30 Marek Polacek <polacek@redhat.com>
6426
6427 PR c/59940
6428 * c-common.h (unsafe_conversion_p): Adjust declaration.
6429 (warnings_for_convert_and_check): Likewise.
6430 (convert_and_check): Likewise.
6431 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6432 expansion_point_location_if_in_system_header on it.
6433 (warnings_for_convert_and_check): Add location parameter. Call
6434 expansion_point_location_if_in_system_header on it. Use it.
6435 (convert_and_check): Add location parameter. Use it.
6436 (conversion_warning): Likewise.
6437 (c_add_case_label): Adjust convert_and_check calls.
6438 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6439
6440 2014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6441
6442 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6443 flag_cilkplus.
6444 * c-pragma.c (init_pragma): Likewise.
6445 * c.opt: Likewise.
6446
6447 2014-01-23 Marek Polacek <polacek@redhat.com>
6448
6449 PR c/59846
6450 * c-common.c (shorten_compare): Add location_t parameter.
6451 * c-common.h (shorten_binary_op): Adjust declaration.
6452
6453 2014-01-23 Marek Polacek <polacek@redhat.com>
6454
6455 PR c/58346
6456 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6457 * c-common.h: Declare it.
6458
6459 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6460
6461 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6462 * c-ada-spec.c (dump_ads): Likewise.
6463 (cpp_check): Likewise.
6464 (dump_ada_specs): Likewise.
6465
6466 2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
6467
6468 PR c++/49718
6469 * c-common.c (handle_no_instrument_function_attribute): Allow
6470 no_instrument_function attribute in class member
6471 definition/declaration.
6472
6473 2014-01-15 Jakub Jelinek <jakub@redhat.com>
6474
6475 PR c/58943
6476 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6477 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6478 being COMPOUND_EXPR.
6479 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6480 operand a SAVE_EXPR and second MODIFY_EXPR.
6481
6482 2014-01-09 Jakub Jelinek <jakub@redhat.com>
6483
6484 PR target/58115
6485 * c-pch.c (c_common_write_pch): Call
6486 prepare_target_option_nodes_for_pch.
6487
6488 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6489
6490 Update copyright years
6491
6492 2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6493
6494 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6495 the copyright notice.
6496
6497 2013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6498
6499 * c-ada-spec.c (print_constructor): New function.
6500 (print_destructor): Retrieve the origin of the destructor.
6501 (print_ada_declaration): Revamp handling of constructors/destructors.
6502
6503 2013-12-23 Stuart Hastings <stuart@apple.com>
6504 Bill Maddox <maddox@google.com>
6505 Jason Merrill <jason@redhat.com>
6506
6507 * c.opt: Add -fdeclone-ctor-dtor.
6508 * c-opts.c (c_common_post_options): Default to on iff -Os.
6509
6510 2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6511
6512 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6513 attribute.
6514 * c-pragma.h (enum pragma_cilk_clause): Remove.
6515 (enum pragma_omp_clause): Added the following fields:
6516 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6517 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6518 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6519 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6520 PRAGMA_CILK_CLAUSE_UNIFORM.
6521
6522
6523 2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6524
6525 * cilk.c (cilk_outline): Made this function non-static.
6526 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6527 (create_cilk_wrapper): Added a new parameter: a function pointer.
6528 (c_install_body_w_frame_cleanup): Remove
6529 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6530 * c-common.h (cilk_outline): New prototype.
6531 (gimplify_cilk_spawn): Removed two parameters.
6532 (cilk_install_body_with_frame_cleanup): New prototype.
6533 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6534 CILK_SPAWN_STMT case.
6535
6536 2013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6537
6538 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6539
6540 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6541 (int_array_type_node): Remove.
6542 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6543
6544 2013-12-05 Marek Polacek <polacek@redhat.com>
6545
6546 PR c/52023
6547 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6548 [ADJUST_FIELD_ALIGN].
6549
6550 2013-12-04 Joseph Myers <joseph@codesourcery.com>
6551
6552 PR c/52023
6553 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6554 and check field alignment if set.
6555 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6556 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6557
6558 2013-12-04 Jakub Jelinek <jakub@redhat.com>
6559 Marek Polacek <polacek@redhat.com>
6560
6561 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6562 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6563
6564 2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6565
6566 PR c/59309
6567 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6568 arguments.
6569
6570 2013-11-29 Jakub Jelinek <jakub@redhat.com>
6571
6572 PR c/59280
6573 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6574 goto invalid. If it is error_mark_node, don't issue further
6575 diagnostics.
6576
6577 2013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6578
6579 * c.opt (Wopenmp-simd): New.
6580
6581 2013-11-22 Jakub Jelinek <jakub@redhat.com>
6582
6583 * c-ubsan.h (ubsan_instrument_return): New prototype.
6584 * c-ubsan.c (ubsan_instrument_return): New function.
6585
6586 2013-11-22 Andrew MacLeod <amacleod@redhat.com>
6587
6588 * c-common.c: Add required include files from gimple.h.
6589 * c-gimplify.c: Likewise
6590 * cilk.c: Likewise
6591
6592 2013-11-22 David Malcolm <dmalcolm@redhat.com>
6593
6594 * c-common.c (unsafe_conversion_p): Remove use of
6595 EXPR_LOC_OR_HERE macro.
6596 (conversion_warning): Likewise.
6597 (warnings_for_convert_and_check): Likewise.
6598 (warn_for_collisions_1): Likewise.
6599 (shorten_compare): Likewise, and remove use of in_system_header
6600 macro, using the location from the former.
6601 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6602 (cb_def_pragma): Remove use of in_system_header macro.
6603 (lex_string): Likewise.
6604 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6605
6606 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6607 Mike Stump <mikestump@comcast.net>
6608 Richard Sandiford <rdsandiford@googlemail.com>
6609
6610 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6611 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6612 tree_fits_shwi_p or tree_fits_uhwi_p.
6613 (dump_generic_ada_node): Likewise.
6614 * c-format.c (check_format_arg): Likewise.
6615 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6616
6617 2013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6618
6619 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6620
6621 2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6622
6623 PR c/53001
6624 * c-common.c (unsafe_conversion_p): Make this function
6625 return an enumeration with more detail.
6626 (conversion_warning): Use the new return type of
6627 unsafe_conversion_p to separately warn either about conversions
6628 that lower floating point number precision or about the other
6629 kinds of conversions.
6630 * c-common.h (enum conversion_safety): New enumeration.
6631 (unsafe_conversion_p): switching return type to
6632 conversion_safety enumeration.
6633 * c.opt: Adding new warning -Wfloat-conversion and
6634 enabling it with -Wconversion.
6635
6636 2013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
6637
6638 * c-opts.c: Include plugin.h.
6639 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
6640
6641 2013-11-19 Marek Polacek <polacek@redhat.com>
6642
6643 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
6644 call.
6645 (ubsan_instrument_shift): Likewise.
6646 (ubsan_instrument_vla): Likewise.
6647
6648 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6649
6650 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
6651 cast to unsigned type.
6652
6653 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6654
6655 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
6656 tree_low_cst.
6657 (complete_array_type): Update comment to refer to tree_to_[su]hwi
6658 rather than tree_low_cst.
6659
6660 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6661
6662 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
6663 tree_to_uhwi throughout.
6664
6665 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6666
6667 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
6668 tree_low_cst (..., 0) with tree_to_shwi throughout.
6669
6670 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6671
6672 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
6673 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
6674
6675 2013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
6676
6677 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
6678 host_integerp (..., 0) with tree_fits_shwi_p throughout.
6679
6680 2013-11-15 Aldy Hernandez <aldyh@redhat.com>
6681
6682 * c-cilkplus.c: New file.
6683 * c-common.c (readonly_error): Add location argument.
6684 * c-common.h (readonly_error): Same.
6685 (c_finish_cilk_clauses): Protoize.
6686 (c_check_cilk_loop): Same.
6687 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
6688 Do not fail on error_mark_node.
6689 Abstract increment canonicalization to here...
6690 (c_omp_for_incr_canonicalize_ptr): New.
6691 c-pragma.c (init_pragma): Register "simd" pragma.
6692 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
6693 (enum pragma_cilk_clause): New.
6694
6695 2013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
6696
6697 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
6698 wchar_type and host_integerp checks.
6699
6700 2013-11-14 Andrew MacLeod <amacleod@redhat.com>
6701
6702 * c-common.c: Likewise.
6703 * c-gimplify.c: Likewise.
6704 * cilk.c: Likewise.
6705
6706 2013-11-14 Diego Novillo <dnovillo@google.com>
6707
6708 * c-common.c: Include fold-const.h.
6709 Include stor-layout.h.
6710 Include calls.h.
6711 Include stringpool.h.
6712 Include attribs.h.
6713 Include varasm.h.
6714 Include trans-mem.h.
6715 * c-cppbuiltin.c: Include stor-layout.h.
6716 Include stringpool.h.
6717 * c-format.c: Include stringpool.h.
6718 * c-lex.c: Include stringpool.h.
6719 Include stor-layout.h.
6720 * c-pragma.c: Include stringpool.h.
6721 Include attribs.h.
6722 Include varasm.h.
6723 Include gcc-symtab.h.
6724 * c-pretty-print.c: Include stor-layout.h.
6725 Include attribs.h.
6726 * cilk.c: Include stringpool.h.
6727 Include calls.h.
6728
6729 2013-11-13 Joseph Myers <joseph@codesourcery.com>
6730
6731 * c-common.h (enum rid): Add RID_AUTO_TYPE.
6732 * c-common.c (c_common_reswords): Add __auto_type.
6733 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
6734
6735 2013-11-12 Andrew MacLeod <amacleod@redhat.com>
6736
6737 * c-common.c: Include gimplify.h.
6738 * c-gimplify.c: Likewise.
6739 * cilk.c: Likewise.
6740 * c-omp.c: Include gimple-expr.h instead of gimple.h.
6741 * c-ubsan.c: Don't include gimple.h.
6742
6743 2013-11-12 Joseph Myers <joseph@codesourcery.com>
6744
6745 * c-common.c (c_common_reswords): Add _Thread_local.
6746
6747 2013-11-09 Joseph Myers <joseph@codesourcery.com>
6748
6749 * c-common.c (atomic_size_supported_p): New function.
6750 (resolve_overloaded_atomic_exchange)
6751 (resolve_overloaded_atomic_compare_exchange)
6752 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
6753 Use it instead of comparing size with a local list of sizes.
6754
6755 2013-11-07 Andrew MacLeod <amacleod@redhat.com>
6756 Joseph Myers <joseph@codesourcery.com>
6757
6758 * c-common.h (enum rid): Add RID_ATOMIC.
6759 * c-common.c (c_common_reswords): Add _Atomic.
6760 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
6761 (keyword_is_type_qualifier): Accept RID_ATOMIC.
6762 * c-format.c (check_format_types): Check for extra _Atomic
6763 qualifiers in format argument.
6764 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
6765 (pp_c_type_qualifier_list): Mention _Atomic in comment.
6766
6767 2013-11-06 Tobias Burnus <burnus@net-b.de>
6768
6769 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
6770
6771 2013-11-06 Joseph Myers <joseph@codesourcery.com>
6772
6773 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
6774 standards modes.
6775 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
6776 to mean lack of IEEE 754 support.
6777
6778 2013-11-05 Tobias Burnus <burnus@net-b.de>
6779
6780 * c.opt (-Wdate-time): New option
6781 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
6782
6783 2013-11-05 Joseph Myers <joseph@codesourcery.com>
6784
6785 * c-cppbuiltin.c (cpp_iec_559_value): Test
6786 flag_excess_precision_cmdline not flag_excess_precision.
6787
6788 2013-11-05 Tobias Burnus <burnus@net-b.de>
6789
6790 * c.opt (fopenmp-simd): New option.
6791 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
6792 (omp_pragmas): ... this new struct.
6793 (c_pp_lookup_pragma): Also walk omp_pragmas.
6794 (init_pragma): Init pragmas for -fopenmp-simd.
6795
6796 2013-11-04 Marek Polacek <polacek@redhat.com>
6797
6798 PR c++/58979
6799 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
6800
6801 2013-11-04 Joseph Myers <joseph@codesourcery.com>
6802
6803 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
6804 New functions.
6805 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
6806
6807 2013-11-04 Eric Botcazou <ebotcazou@adacore.com>
6808
6809 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
6810 (dump_ada_specs): Adjust prototype of second callback.
6811 * c-ada-spec.c (cpp_check): New global variable.
6812 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
6813 (print_generic_ada_decl): Likewise.
6814 (has_static_fields): Change return type to bool and add guard.
6815 (has_nontrivial_methods): New predicate.
6816 (is_tagged_type): Change return type to bool.
6817 (separate_class_package): Call has_nontrivial_methods.
6818 (pp_ada_tree_identifier): Minor tweaks.
6819 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
6820 (dump_ada_array_domains): Likewise.
6821 (dump_ada_array_type): Likewise.
6822 (dump_template_types): Remove cpp_check parameter and do not pass it to
6823 dump_generic_ada_node.
6824 (dump_ada_template): Likewise.
6825 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
6826 recursively.
6827 (print_ada_methods): Change return type to integer. Remove cpp_check
6828 parameter and do not pass it down.
6829 (dump_nested_types): Remove cpp_check parameter and do not pass it to
6830 dump_generic_ada_node.
6831 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
6832 accessing methods.
6833 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
6834 down. Use has_nontrivial_methods to recognize C++ classes. Use return
6835 value of print_ada_methods.
6836 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
6837 Set cpp_check to it before invoking dump_ada_nodes.
6838 (dump_ada_specs): Likewise.
6839
6840 2013-11-03 Marek Polacek <polacek@redhat.com>
6841
6842 * c-ubsan.c: Don't include hash-table.h.
6843 (ubsan_instrument_vla): New function.
6844 * c-ubsan.h: Declare it.
6845
6846 2013-10-31 David Malcolm <dmalcolm@redhat.com>
6847
6848 Automated part of renaming of symtab_node_base to symtab_node.
6849
6850 Patch autogenerated by rename_symtab.py from
6851 https://github.com/davidmalcolm/gcc-refactoring-scripts
6852 revision 58bb219cc090b2f4516a9297d868c245495ee622
6853
6854 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
6855 symtab_node_base to symtab_node.
6856
6857 2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
6858
6859 Implement C++14 digit separators.
6860 * c-lex.c (interpret_float): Remove digit separators from scratch string
6861 before building real literal.
6862
6863 2013-10-30 Jakub Jelinek <jakub@redhat.com>
6864
6865 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
6866
6867 2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
6868
6869 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
6870 fields.
6871 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
6872 enabled.
6873 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
6874 (insert_cilk_frame): New prototype.
6875 (cilk_init_builtins): Likewise.
6876 (gimplify_cilk_spawn): Likewise.
6877 (c_cilk_install_body_w_frame_cleanup): Likewise.
6878 (cilk_detect_spawn_and_unwrap): Likewise.
6879 (cilk_set_spawn_marker): Likewise.
6880 (build_cilk_sync): Likewise.
6881 (build_cilk_spawn): Likewise.
6882 * cilk.c: New file.
6883
6884 2013-10-29 David Malcolm <dmalcolm@redhat.com>
6885
6886 Patch autogenerated by refactor_symtab.py from
6887 https://github.com/davidmalcolm/gcc-refactoring-scripts
6888 revision 58bb219cc090b2f4516a9297d868c245495ee622
6889
6890 * c-gimplify.c (c_genericize): Update for conversion of symtab types
6891 to a true class hierarchy.
6892 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
6893
6894 2013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
6895
6896 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
6897
6898 2013-10-26 Jeff Law <law@redhat.com>
6899
6900 * c-common.c (c_define_builtins): Remove mudflap support.
6901 * c.opt: Ignore and warn for mudflap options.
6902
6903 2013-10-24 Tobias Burnus <burnus@net-b.de>
6904
6905 PR other/33426
6906 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
6907 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
6908
6909 2013-10-23 Jason Merrill <jason@redhat.com>
6910
6911 * c-format.c (gcc_cxxdiag_char_table): Add %X.
6912
6913 2013-10-11 Jakub Jelinek <jakub@redhat.com>
6914
6915 * c-common.h (omp_clause_mask::operator !=): New method.
6916 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
6917 instead of if (mask & something) tests everywhere.
6918
6919 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
6920 201307 instead of 201107.
6921 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
6922 (c_common_attribute_table): Add "omp declare target" and
6923 "omp declare simd" attributes.
6924 (handle_omp_declare_target_attribute,
6925 handle_omp_declare_simd_attribute): New functions.
6926 * c-omp.c: Include c-pragma.h.
6927 (c_finish_omp_taskgroup): New function.
6928 (c_finish_omp_atomic): Add swapped argument, if true,
6929 build the operation first with rhs, lhs arguments and use NOP_EXPR
6930 build_modify_expr.
6931 (c_finish_omp_for): Add code argument, pass it down to make_code.
6932 (c_omp_split_clauses): New function.
6933 (c_split_parallel_clauses): Removed.
6934 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
6935 c_omp_declare_simd_clauses_to_decls): New functions.
6936 * c-common.h (omp_clause_mask): New type.
6937 (OMP_CLAUSE_MASK_1): Define.
6938 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
6939 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
6940 omp_clause_mask::operator |, omp_clause_mask::operator &,
6941 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
6942 omp_clause_mask::operator ==): New methods.
6943 (enum c_omp_clause_split): New.
6944 (c_finish_omp_taskgroup): New prototype.
6945 (c_finish_omp_atomic): Add swapped argument.
6946 (c_finish_omp_for): Add code argument.
6947 (c_omp_split_clauses): New prototype.
6948 (c_split_parallel_clauses): Removed.
6949 (c_omp_declare_simd_clauses_to_numbers,
6950 c_omp_declare_simd_clauses_to_decls): New prototypes.
6951 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
6952 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
6953 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
6954 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
6955 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
6956 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
6957 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
6958 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
6959 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
6960 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
6961 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
6962 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
6963 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
6964 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
6965 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
6966 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
6967 PRAGMA_OMP_CLAUSE_UNIFORM.
6968
6969 2013-10-09 Marc Glisse <marc.glisse@inria.fr>
6970
6971 PR tree-optimization/20318
6972 * c-common.c (handle_returns_nonnull_attribute): New function.
6973 (c_common_attribute_table): Add returns_nonnull.
6974
6975 2013-10-03 Marc Glisse <marc.glisse@inria.fr>
6976
6977 PR c++/19476
6978 * c.opt (fcheck-new): Move to common.opt.
6979
6980 2013-09-25 Marek Polacek <polacek@redhat.com>
6981 Jakub Jelinek <jakub@redhat.com>
6982
6983 PR sanitizer/58413
6984 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
6985 an expression if we can prove it is correct.
6986 (ubsan_instrument_division): Likewise. Remove unnecessary
6987 check.
6988
6989 2013-09-18 Marek Polacek <polacek@redhat.com>
6990
6991 PR sanitizer/58411
6992 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
6993 Declare it.
6994 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
6995
6996 2013-09-14 Iain Sandoe <iain@codesourcery.com>
6997
6998 PR target/48094
6999 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7000 fobjc-gc, freplace-objc-classes): Accept for LTO.
7001
7002 2013-09-13 Jacek Caban <jacek@codeweavers.com>
7003
7004 * c-target.def: New hook
7005
7006 2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7007
7008 PR c++/43452
7009 * c.opt (Wdelete-incomplete): Add.
7010
7011 2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7012
7013 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7014 (vector_types_compatible_elements_p): New function.
7015 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7016 declaration.
7017 (vector_types_compatible_elements_p): Declare.
7018
7019 2013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7020
7021 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7022 a virtual member function.
7023 (pp_simple_type_specifier): Remove.
7024 (pp_c_type_specifier): Likewise.
7025 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7026 Rename from pp_c_type_specifier. Adjust.
7027 (c_pretty_printer::c_pretty_printer): Do not assign to
7028 simple_type_specifier.
7029
7030 2013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7031
7032 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7033 member function.
7034 (c_pretty_printer::storage_class_specifier): Likewise.
7035 (c_pretty_printer::initializer): Likewise.
7036 (pp_declaration): Remove.
7037 (pp_declaration_specifiers): Likewise.
7038 (pp_abstract_declarator): Likewise.
7039 (pp_declarator): Likewise.
7040 (pp_type_id): Likewise.
7041 (pp_statement): Likewise.
7042 (pp_constant): Likewise.
7043 (pp_id_expression): Likewise.
7044 (pp_primary_expression): Likewise.
7045 (pp_unary_expression): Likewise.
7046 (pp_multiplicative_expression): Likewise.
7047 (pp_conditional_expression): Likewise.
7048 (pp_assignment_expression): Likewise.
7049 (pp_expression): Likewise.
7050 (pp_c_type_id): Likewise.
7051 (pp_c_storage_class_specifier): Likewise.
7052 * c-pretty-print.c (pp_c_type_cast): Tidy.
7053 (pp_c_pointer): Likewise.
7054 (pp_c_type_specifier): Likewise.
7055 (pp_c_parameter_type_list): Likewise.
7056 (pp_c_function_definition): Likewise.
7057 (pp_c_init_declarator): Likewise.
7058 (pp_c_initializer_list): Likewise.
7059 (pp_c_constructor_elts): Likewise.
7060 (c_pretty_printer::direct_abstract_declarator): Likewise.
7061 (c_pretty_printer::declaration_specifiers): Likewise.
7062 (c_pretty_printer::primary_expression): Likewise.
7063 (c_pretty_printer::postfix_expression): Likewise.
7064 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7065 (c_pretty_printer::storage_class_specifier): Rename from
7066 pp_c_storage_class_specifier.
7067 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7068 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7069 storage_class_specifier, initializer, offset_list, flags.
7070
7071 2013-08-30 Marek Polacek <polacek@redhat.com>
7072
7073 * c-ubsan.c: New file.
7074 * c-ubsan.h: New file.
7075
7076 2013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7077
7078 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7079 member function.
7080 (c_pretty_printer::declaration_specifiers): Likewise.
7081 (c_pretty_printer::declarator): Likewise.
7082 (c_pretty_printer::abstract_declarator): Likewise.
7083 (c_pretty_printer::direct_abstract_declarator): Likewise.
7084 (c_pretty_printer::direct_declarator): Likewise.
7085 (c_pretty_printer::function_specifier): Likewise.
7086 (pp_declaration): Adjust.
7087 (pp_declaration_specifiers): Likewise.
7088 (pp_abstract_declarator): Likewise.
7089 (pp_direct_declarator): Likewise.
7090 (pp_function_specifier): Likewise.
7091 (pp_direct_abstract_declarator): Remove as unused.
7092 (pp_c_declaration): Remove.
7093 (pp_c_declaration_specifiers): Likewise.
7094 (pp_c_declarator): Likewise.
7095 (pp_c_direct_declarator): Likewise.
7096 (pp_c_function_specifier): Likewise.
7097 (pp_c_direct_abstract_declarator): Likewise.
7098 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7099 from pp_c_abstract_declarator. Adjust.
7100 (c_pretty_printer::direct_abstract_declarator): Rename from
7101 pp_c_direct_abstract_declarator. Adjust.
7102 (c_pretty_printer::function_specifier): Rename from
7103 pp_c_function_specifier. Adjust.
7104 (c_pretty_printer::declaration_specifiers): Rename from
7105 pp_c_declaration_specifiers. Adjust.
7106 (c_pretty_printer::direct_declarator): Rename from
7107 pp_c_direct_declarator. Adjust.
7108 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7109 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7110 (c_pretty_printer::c_pretty_printer): Do not assign to
7111 declaration, declaration_specifiers, declarator,
7112 direct_declarator, direct_abstract_declarator, function_specifier.
7113
7114 2013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7115
7116 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7117 virtual member function.
7118 (c_pretty_printer::multiplicative_expression): Likewise.
7119 (c_pretty_printer::conditional_expression): Likewise.
7120 (c_pretty_printer::assignment_expression): Likewise.
7121 (c_pretty_printer::expression): Likewise.
7122 (pp_unary_expression): Adjust.
7123 (pp_multiplicative_expression): Likewise.
7124 (pp_assignment_expression): Likewise.
7125 (pp_conditional_expression): Likewise.
7126 (pp_expression): Likewise.
7127 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7128 from pp_c_unary_expression. Adjust.
7129 (c_pretty_printer::multiplicative_expression): Rename from
7130 pp_c_multiplicative_expression. Adjust.
7131 (c_pretty_printer::conditional_expression): Rename from
7132 pp_c_conditional_expression. Adjust.
7133 (c_pretty_printer::assignment_expression): Rename from
7134 pp_c_assignment_expression. Adjust.
7135 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7136 (c_pretty_printer::c_pretty_printer): Do not assign to
7137 unary_expression, multiplicative_expression,
7138 conditional_expression, expression.
7139
7140 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7141
7142 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7143 virtual member function.
7144 (pp_postfix_expression): Adjust.
7145 (pp_c_postfix_expression): Remove.
7146 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7147 from pp_c_postfix_expression. Adjust.
7148 (c_pretty_printer::c_pretty_printer): Do not assign to
7149 postfix_expression.
7150
7151 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7152
7153 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7154 virtua member function.
7155 (pp_primary_expression): Adjust.
7156 (pp_c_primary_expression): Remove.
7157 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7158 from pp_c_primary_expression. Adjust.
7159 (pp_c_initializer_list): Use pp_primary_expression.
7160 (c_pretty_printer::c_pretty_printer): Do not assign to
7161 primary_expression.
7162
7163 2013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7164
7165 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7166 * c-pretty-print.c (M_): Remove.
7167 (c_pretty_printer::translate_string): Define.
7168 (pp_c_type_specifier): Use it.
7169 (pp_c_primary_expression): Likewise.
7170 (pp_c_expression): Likewise.
7171
7172 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7173
7174 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7175 virtual function.
7176 (pp_c_id_expression): Remove.
7177 (pp_id_expression): Adjust.
7178 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7179 pp_c_id_expression. Adjust.
7180 (pp_c_postfix_expression): Use pp_id_expression.
7181 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7182
7183 2013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7184
7185 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7186 member function.
7187 (pp_constant): Adjust.
7188 (pp_c_constant): Remove.
7189 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7190 pp_c_constant. Adjust.
7191 (pp_c_constant)
7192 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7193 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7194
7195 2013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7196
7197 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7198 (c_pretty_printer::c_pretty_printer): Declare.
7199 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7200 c_pretty_printer_init. Adjust.
7201 (print_c_tree): Do not call c_pretty_printer_init.
7202 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7203
7204 2013-08-09 Arnaud Charlet <charlet@adacore.com>
7205
7206 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7207
7208 2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7209
7210 PR c++/58080
7211 * c-common.c (pointer_int_sum): Add bool parameter.
7212 * c-common.h (pointer_int_sum): Adjust declaration.
7213
7214 2013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7215
7216 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7217 c_pretty_printer variable.
7218
7219 2013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7220
7221 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7222 (pp_base): Remove.
7223 (pp_c_base): Likewise. Adjust users.
7224 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7225 (pp_c_whitespace): Do not call pp_base.
7226 (pp_c_left_paren): Likewise.
7227 (pp_c_right_paren): Likewise.
7228 (pp_c_left_brace): Likewise.
7229 (pp_c_right_brace): Likewise.
7230 (pp_c_left_bracket): Likewise.
7231 (pp_c_right_bracket): Likewise.
7232 (pp_c_dot): Likewise.
7233 (pp_c_ampersand): Likewise.
7234 (pp_c_star): Likewise.
7235 (pp_c_arrow): Likewise.
7236 (pp_c_semicolon): Likewise.
7237 (pp_c_complement): Likewise.
7238 (pp_c_exclamation): Likewise.
7239 (pp_c_direct_declarator): Likewise.
7240 (pp_c_ws_string): Likewise.
7241 (pp_c_identifier): Likewise.
7242 (pp_c_statement): Likewise.
7243 (print_c_tree): Likewise.
7244
7245 2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7246
7247 PR c++/58072
7248 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7249 provide useful error strings.
7250
7251 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7252
7253 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7254 printer functions instead of pp_string or operators and punctuators.
7255 (dump_generic_ada_node): Likewise.
7256 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7257 (pp_c_relational_expression): Likewise.
7258 (pp_c_logical_or_expression): Likewise.
7259
7260 2013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7261
7262 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7263 functions instead of pp_character.
7264 (pp_ada_tree_identifier): Likewise.
7265 (dump_ada_double_name): Likewise.
7266 (dump_ada_function_declaration): Likewise.
7267 (dump_ada_array_domains): Likewise.
7268 (dump_template_types): Likewise.
7269 (dump_generic_ada_node): Likewise.
7270 (print_ada_declaration): Likewise.
7271 (print_ada_struct_decl): Likewise.
7272 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7273
7274 2013-07-23 Tom Tromey <tromey@redhat.com>
7275
7276 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7277 * c-common.c (c_common_reswords): Add _Generic.
7278
7279 2013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7280
7281 * c-common.c: Fix typos.
7282 * c-common.h: Likewise.
7283
7284 2013-07-13 Lubos Lunak <l.lunak@suse.cz>
7285
7286 PR c++/55203
7287 * c-common.c (c_common_attribute_table): Add warn_unused.
7288 (handle_warn_unused_attribute): New.
7289
7290 2013-07-10 Jakub Jelinek <jakub@redhat.com>
7291
7292 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7293 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7294
7295 2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7296
7297 PR c++/57869
7298 * c.opt: Add Wconditionally-supported.
7299
7300 2013-07-08 Graham Stott <graham.stott@btinternet.com>
7301
7302 * array-notation-common.c (length_mismatch_in_expr_p): Delete
7303 unused variables l_length and l_node.
7304
7305 2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
7306
7307 PR c/57821
7308 * c-common.c (complete_array_type): Delay folding first index
7309 like other indices. When folding, check for index overflow.
7310
7311 2013-06-27 Marc Glisse <marc.glisse@inria.fr>
7312
7313 PR c++/57509
7314 * c-common.h (c_build_vec_perm_expr): New complain argument.
7315 * c-common.c (c_build_vec_perm_expr): Likewise.
7316 Use save_expr also in C++.
7317
7318 2013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7319
7320 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7321 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7322 * c-opts.c (c_common_post_options): Likewise.
7323
7324 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7325
7326 * array-notation-common.c (length_mismatch_in_expr): Changed the
7327 parameter type's from a dynamic array to a vec_tree. Also removed
7328 the size parameters.
7329 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7330 the change above.
7331
7332 2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7333
7334 * c-common.h (struct cilkplus_an_parts): New structure.
7335 (struct cilkplus_an_loop_parts): Likewise.
7336 (cilkplus_extract_an_triplets): New prototype.
7337 (fix_sec_implicit_args): Likewise.
7338 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7339 (fix_sec_implicit_args): Likewise.
7340
7341 2013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7342
7343 * array-notation-common.c (find_inv_trees): Removed an unwanted
7344 typecasting.
7345 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7346 enum rid to enum tree_code.
7347
7348 2013-06-11 Jan Hubicka <jh@suse.cz>
7349
7350 * c-common.c (handle_alias_ifunc_attribute): Do not set
7351 DECL_EXTERNAL for weakref variables.
7352 * c-pragma.c (handle_pragma_weak): Make sure aliases
7353 are not declared as external.
7354
7355 2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7356
7357 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7358 function from c/c-array-notation.c.
7359 (is_cilkplus_reduce_builtin): Likewise.
7360 (find_rank): Likewise.
7361 (extract_array_notation_exprs): Likewise.
7362 (replace_array_notations): Likewise.
7363 (find_inv_trees): Likewise.
7364 (replace_inv_trees): Likewise.
7365 (contains_array_notation_expr): Likewise.
7366 (find_correct_array_notation_type): Likewise.
7367 * c-common.h (struct inv_list): Moved this struct from the file
7368 c/c-array-notation.c and added a new field called additional tcodes.
7369 (length_mismatch_in_expr_p): New prototype.
7370 (is_cilkplus_reduce_builtin): Likewise.
7371 (find_rank): Likewise.
7372 (extract_array_notation_exprs): Likewise.
7373 (replace_array_notation): Likewise.
7374 (find_inv_trees): Likewise.
7375 (replace_inv_trees): Likewise.
7376 (find_correct_array_notation_type): Likewise.
7377
7378 2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7379
7380 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7381 function array_notation_init_builtins is called.
7382 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7383 * c-common.def (ARRAY_NOTATION_REF): New tree.
7384 * c-common.h (build_array_notation_expr): New function declaration.
7385 (build_array_notation_ref): Likewise.
7386 (extract_sec_implicit_index_arg): New extern declaration.
7387 (is_sec_implicit_index_fn): Likewise.
7388 (ARRAY_NOTATION_CHECK): New define.
7389 (ARRAY_NOTATION_ARRAY): Likewise.
7390 (ARRAY_NOTATION_START): Likewise.
7391 (ARRAY_NOTATION_LENGTH): Likewise.
7392 (ARRAY_NOTATION_STRIDE): Likewise.
7393 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7394 ARRAY_NOTATION_REF.
7395 (pp_c_expression): Likewise.
7396 * c.opt (flag_enable_cilkplus): New flag.
7397 * array-notation-common.c: New file.
7398
7399 2013-05-14 Jakub Jelinek <jakub@redhat.com>
7400
7401 PR c++/57274
7402 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7403
7404 2013-05-10 Marc Glisse <marc.glisse@inria.fr>
7405
7406 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7407 vectors.
7408
7409 2013-05-07 Han Shen <shenhan@google.com>
7410
7411 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7412
7413 2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7414
7415 * c-common.c (check_user_alignment): Emit error for negative values.
7416
7417 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7418
7419 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7420
7421 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7422
7423 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7424 __GXX_EXPERIMENTAL_CXX1Y__.
7425
7426 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7427 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
7428
7429 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7430 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7431 to simply use OPT_Wpointer_arith.
7432 (c_sizeof_or_alignof_type): Likewise.
7433
7434 2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7435
7436 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7437
7438 2013-04-12 Jakub Jelinek <jakub@redhat.com>
7439
7440 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7441 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7442 specifiers.
7443
7444 2013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7445
7446 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7447
7448 2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7449
7450 * c-common.c (pointer_int_sum): Remove dead code.
7451
7452 2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7453
7454 PR middle-end/56524
7455 * c-common.c (handle_optimize_attribute): Don't call
7456 save_optabs_if_changed.
7457
7458 2013-03-05 Jakub Jelinek <jakub@redhat.com>
7459
7460 PR middle-end/56461
7461 * c-pch.c (pch_init): Free target_validity at the end.
7462
7463 2013-03-04 Jakub Jelinek <jakub@redhat.com>
7464
7465 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7466
7467 2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7468 Jakub Jelinek <jakub@redhat.com>
7469
7470 PR sanitizer/56454
7471 * c-common.c (handle_no_sanitize_address_attribute): New function.
7472 (c_common_attribute_table): Add no_sanitize_address attribute.
7473 (handle_no_address_safety_analysis_attribute): Add
7474 no_sanitize_address attribute, not no_address_safety_analysis
7475 attribute.
7476
7477 2013-02-18 Aldy Hernandez <aldyh@redhat.com>
7478
7479 PR target/52555
7480 * c-common.c (handle_optimize_attribute): Call
7481 save_optabs_if_changed.
7482
7483 2013-02-18 Jakub Jelinek <jakub@redhat.com>
7484 Steven Bosscher <steven@gcc.gnu.org>
7485
7486 PR pch/54117
7487 * c-opts.c (c_common_post_options): If debug info is enabled
7488 and non-dwarf*, refuse to load PCH files and when writing PCH
7489 file warn.
7490
7491 2013-02-05 Jakub Jelinek <jakub@redhat.com>
7492
7493 PR middle-end/56167
7494 * c-common.c (handle_error_attribute): Fix condition.
7495
7496 2013-01-30 Jakub Jelinek <jakub@redhat.com>
7497
7498 PR c++/55742
7499 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7500
7501 2013-01-18 Jason Merrill <jason@redhat.com>
7502
7503 PR target/54908
7504 * c.opt (-fextern-tls-init): New.
7505 * c-opts.c (c_common_post_options): Handle it.
7506
7507 2013-01-09 Jakub Jelinek <jakub@redhat.com>
7508
7509 PR c/48418
7510 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7511 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7512 and is either negative or bigger or equal to type precision
7513 of the first operand.
7514
7515 2012-12-03 Marek Polacek <polacek@redhat.com>
7516
7517 PR c/55570
7518 * c-common.c (check_user_alignment): Swap order of tests,
7519 check TREE_CODE first.
7520
7521 2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7522
7523 PR c++/52654
7524 * c-common.h (overflow_type): New enum.
7525 (build_userdef_literal): Add overflow_type argument.
7526 (tree_userdef_literal): Add overflow_type.
7527 (USERDEF_LITERAL_OVERFLOW): New access macro.
7528 * c-common.c (build_userdef_literal): Add overflow_type
7529 argument.
7530 * c-lex.c (c_lex_with_flags): Add overflow_type to
7531 build_userdef_literal calls.
7532 (interpret_integer, interpret_float): Add overflow_type argument.
7533
7534 2012-11-28 Richard Biener <rguenther@suse.de>
7535
7536 PR c/35634
7537 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7538 here and use a type with proper overflow behavior for types that would
7539 need to be promoted for the arithmetic.
7540
7541 2012-11-23 Jakub Jelinek <jakub@redhat.com>
7542
7543 PR sanitizer/55435
7544 * c-common.c (handle_no_address_safety_analysis_attribute): New
7545 function.
7546 (c_common_attribute_table): Add no_address_safety_analysis.
7547
7548 2012-11-16 Simon Baldwin <simonb@google.com>
7549
7550 * c.opt: Add f[no-]canonical-system-headers.
7551 * c-opts.c (c_common_handle_option): Handle
7552 OPT_fcanonical_system_headers.
7553
7554 2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7555
7556 PR c++/54413
7557 * c-opts.c (c_common_handle_option): Set new flags.
7558 * c.opt: Describe new flags.
7559
7560 2012-11-09 Jason Merrill <jason@redhat.com>
7561
7562 * c.opt (Wabi-tag): New.
7563
7564 2012-11-09 Andi Kleen <ak@linux.intel.com>
7565
7566 PR 55139
7567 * c-common.c (get_atomic_generic_size): Mask with
7568 MEMMODEL_MASK
7569
7570 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7571
7572 PR c/53063
7573 * c.opt (Wformat): Make it Alias Wformat=1.
7574 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7575 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7576 LangEnabledBy.
7577 (Wformat=): RejectNegative. Use LangEnabledBy.
7578 (Wnonnull): Use LangEnabledBy.
7579 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7580 * c-format.c (set_Wformat): Delete.
7581 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
7582 (maybe_read_dollar_number): Likewise.
7583 (avoid_dollar_number): Likewise.
7584 (finish_dollar_format_checking): Likewise.
7585 (check_format_info): Likewise.
7586 (check_format_info_main): Likewise.
7587 (check_format_types): Likewise.
7588 (format_type_warning): Likewise.
7589 * c-common.c (int): Likewise.
7590 (check_function_sentinel): Likewise.
7591 * c-common.h (warn_format,set_Wformat): Do not declare here.
7592
7593 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7594
7595 PR c/53063
7596 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7597 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7598 Use LangEnabledBy.
7599 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7600 common.opt.
7601 (Wvariadic-macros): Init(1).
7602 * c-opts.c (c_common_handle_option): Do not handle them
7603 explicitly.
7604 (c_common_post_options): Likewise.
7605 (sanitize_cpp_opts): warn_unused_macros is now
7606 cpp_warn_unused_macros.
7607 (push_command_line_include): Likewise.
7608 * c-common.c (warn_unknown_pragmas): Do not define.
7609 * c-common.h (warn_unknown_pragmas): Do not declare.
7610
7611 2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7612
7613 PR c/51294
7614 * c-common.c (conversion_warning): Handle conditional expressions.
7615
7616 2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7617
7618 PR c++/54930
7619 * c.opt (Wreturn_local_addr): Define new option.
7620
7621 2012-10-25 Jason Merrill <jason@redhat.com>
7622
7623 * c.opt (Wvirtual-move-assign): New.
7624
7625 * c.opt (Winherited-variadic-ctor): New.
7626
7627 2012-10-25 Marc Glisse <marc.glisse@inria.fr>
7628
7629 PR c++/54427
7630 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
7631
7632 2012-10-23 Joseph Myers <joseph@codesourcery.com>
7633
7634 * c-common.h (pch_cpp_save_state): Declare.
7635 * c-target.def (c_preinclude): New hook.
7636 * c-opts.c (done_preinclude): New.
7637 (push_command_line_include): Handle default preincluded header.
7638 (cb_file_change): Call pch_cpp_save_state when calling
7639 push_command_line_include.
7640 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
7641 (pch_cpp_save_state): New.
7642 (pch_init): Call pch_cpp_save_state conditionally, instead of
7643 calling cpp_save_state.
7644
7645 2012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
7646
7647 PR c/53063
7648 PR c/40989
7649 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
7650 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
7651 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
7652 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
7653 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
7654 * c-opts.c (c_common_handle_option): Remove explicit handling from
7655 here.
7656 (c_common_post_options): Likewise.
7657
7658 2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
7659
7660 * c-ada-spec.c (LOCATION_COL): Delete.
7661 (compare_location): New function.
7662 (compare_node): Use it.
7663 (compare_comment): Likewise.
7664
7665 2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
7666
7667 PR c/53063
7668 PR c/40989
7669 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
7670 * c-opts.c (c_common_handle_option): Do not set them here. Add
7671 comment.
7672 (c_common_post_options): Likewise.
7673
7674 2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
7675
7676 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
7677 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
7678 Remove POINTER_TYPE handling, add large unsigned handling and use
7679 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
7680
7681 2012-10-12 Jakub Jelinek <jakub@redhat.com>
7682
7683 PR c/54381
7684 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
7685 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
7686 locs and array of 3 trees instead of just single loc and single
7687 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
7688 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
7689 For *cmp* builtins that take two sources strings report warnings
7690 about first and second source, not about destination and source.
7691
7692 2012-10-12 Marc Glisse <marc.glisse@inria.fr>
7693
7694 PR c++/53055
7695 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
7696
7697 2012-10-11 Eric Botcazou <ebotcazou@adacore.com>
7698
7699 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
7700 declaring something coming from another file.
7701
7702 2012-10-10 Arnaud Charlet <charlet@adacore.com>
7703
7704 PR ada/54845
7705 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
7706
7707 2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
7708
7709 PR c++/54194
7710 * c-common.c (warn_about_parentheses): Add location_t parameter;
7711 use EXPR_LOC_OR_LOC.
7712 * c-common.h: Update declaration.
7713
7714 2012-10-09 Marc Glisse <marc.glisse@inria.fr>
7715
7716 PR c++/54427
7717 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
7718 more operations. Make error messages optional.
7719 * c-common.h (enum stv_conv): Moved from c-typeck.c.
7720 (scalar_to_vector): Declare.
7721
7722 2012-10-08 Jason Merrill <jason@redhat.com>
7723
7724 * c-common.c (c_common_reswords): Add thread_local.
7725
7726 2012-10-08 Dodji Seketeli <dodji@redhat.com>
7727
7728 PR c++/53528 C++11 attribute support
7729 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
7730 new functions.
7731 * c-common.c (check_cxx_fundamental_alignment_constraints): New
7732 static function.
7733 (handle_aligned_attribute): In choose strictest alignment
7734 among many. Use new check_cxx_fundamental_alignment_constraints.
7735 (handle_transparent_union_attribute): In c++11 attribute syntax,
7736 don't look through typedefs.
7737
7738 2012-10-04 Arnaud Charlet <charlet@adacore.com>
7739
7740 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
7741 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
7742 out of dumpfile.h.
7743
7744 2012-09-25 Dehao Chen <dehao@google.com>
7745
7746 PR middle-end/54645
7747 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
7748 map when read in the pch.
7749
7750 2012-09-18 Arnaud Charlet <charlet@adacore.com>
7751
7752 * c-ada-spec.c: Style fixes.
7753
7754 2012-09-18 Thomas Quinot <quinot@adacore.com>
7755
7756 * c.opt (-fada-spec-parent): Define new command line switch.
7757 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
7758 is specified, generate binding spec as a child of the specified unit.
7759
7760 2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
7761 Manuel López-Ibáñez <manu@gcc.gnu.org>
7762
7763 PR c++/53210
7764 * c.opt ([Winit-self]): Enabled by -Wall in C++.
7765
7766 2012-08-23 Arnaud Charlet <charlet@adacore.com>
7767
7768 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
7769 for pointers, and add missing Convention C pragma.
7770 (print_ada_struct_decl): Add missing aliased keyword.
7771 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
7772
7773 2012-08-17 Jakub Jelinek <jakub@redhat.com>
7774
7775 * c-common.c (sizeof_pointer_memaccess_warning): New function.
7776 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
7777 * c-opts.c (c_common_handle_option): Enable it for -Wall.
7778 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
7779 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
7780
7781 2012-08-10 Richard Guenther <rguenther@suse.de>
7782
7783 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
7784
7785 2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
7786
7787 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
7788 instead of separate pp_newline and pp_flush.
7789 (print_c_tree): Likewise.
7790
7791 2012-07-26 Richard Henderson <rth@redhat.com>
7792
7793 * c-common.c (handle_hot_attribute): Allow labels.
7794 (handle_cold_attribute): Likewise.
7795
7796 2012-07-20 Jakub Jelinek <jakub@redhat.com>
7797
7798 PR c++/28656
7799 * c-common.c (check_function_nonnull): Handle multiple nonnull
7800 attributes properly.
7801
7802 2012-07-16 Steven Bosscher <steven@gcc.gnu.org>
7803
7804 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
7805 * c-ada-spec.c: Likewise.
7806 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
7807
7808 2012-07-14 Steven Bosscher <steven@gcc.gnu.org>
7809
7810 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
7811 Remove code conditional on it.
7812
7813 2012-07-11 Steven Bosscher <steven@gcc.gnu.org>
7814
7815 * c-gimplify.c: Do not include basic-block.h.
7816 * c-common.c: Do not include linfuncs.h.
7817
7818 2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
7819
7820 * c-common.h: Include tree.h.
7821
7822 2012-07-02 Jason Merrill <jason@redhat.com>
7823
7824 PR c++/53524
7825 * c-common.c (get_priority): Call default_conversion.
7826
7827 2012-07-01 Uros Bizjak <ubizjak@gmail.com>
7828
7829 * c-pch.c (c_common_write_pch): Remove unused variables.
7830
7831 2012-06-29 Steven Bosscher <steven@gcc.gnu.org>
7832
7833 * cppspec.c: Moved from gcc/ to here.
7834
7835 2012-06-27 Kai Tietz <ktietz@redhat.com>
7836
7837 PR preprocessor/37215
7838 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
7839
7840 2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
7841
7842 * c-common.h (c_common_print_pch_checksum): Remove.
7843 * c-pch.c: Do not include output.h.
7844 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
7845 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
7846 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
7847 (struct c_pch_header): Remove.
7848 (get_ident): Update gpch version.
7849 (pch_init): Do not print executable_checksum to asm_out_file.
7850 Do not fail if there is no asm_out_file to read back from. Set
7851 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
7852 (c_common_write_pch): Verify that nothing was written to asm_out_file
7853 since pch_init was called. Do not write a c_pch_header, and do not
7854 copy from asm_out_file to the PCH.
7855 (c_common_read_pch): Do not read a c_pch_header, and do not restore
7856 the content of asm_out_file from the PCH.
7857 (c_common_print_pch_checksum): Remove.
7858 * c-opts.c (c_common_init): Print out executable_checksum directly.
7859
7860 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7861
7862 * c-target.def (objc_declare_unresolved_class_reference,
7863 objc_declare_class_definition): Add new hooks.
7864
7865 2012-06-19 Steven Bosscher <steven@gcc.gnu.org>
7866
7867 * c-lex.c: Do not include output.h.
7868 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
7869 Remove uses of ASM_OUTPUT_IDENT.
7870
7871 2012-06-15 Marc Glisse <marc.glisse@inria.fr>
7872
7873 PR c++/51033
7874 * c-common.h (c_build_vec_perm_expr): Move decl here.
7875 * c-common.c (c_build_vec_perm_expr): Move definition
7876 here.
7877
7878 2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
7879
7880 * c.opt (fconserve-space): Turn into a no-op.
7881
7882 2012-06-04 Sterling Augustine <saugustine@google.com>
7883
7884 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
7885 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
7886 both the start and end of the function.
7887
7888 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7889
7890 * c-common.c: Do not include output.h.
7891 * c-pragma.c: Likewise.
7892
7893 2012-06-04 Steven Bosscher <steven@gcc.gnu.org>
7894
7895 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
7896 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
7897 (lang_decl_name): Handle namespace decls.
7898
7899 2012-05-31 Steven Bosscher <steven@gcc.gnu.org>
7900
7901 * c-ada-spec.c: Do not include output.h.
7902 * c-semantics.c: Likewise.
7903
7904 2012-05-29 Joseph Myers <joseph@codesourcery.com>
7905
7906 * c-common.c: Fix typo.
7907
7908 2012-05-29 Michael Matz <matz@suse.de>
7909
7910 * c-common.h (c_expand_decl): Remove prototype.
7911
7912 2012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
7913
7914 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
7915 * c-opts.c (c_common_handle_option): Remove code handling
7916 warn_missing_braces.
7917
7918 2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
7919
7920 PR c++/25137
7921 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
7922 -Wmissing_braces.
7923
7924 2012-05-22 Dodji Seketeli <dodji@redhat.com>
7925
7926 PR c++/53322
7927 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
7928
7929 2012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
7930
7931 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
7932 * c-opts.c (c_common_handle_option): Do not handle explicitly
7933 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
7934
7935 2012-05-16 Dodji Seketeli <dodji@redhat.com>
7936
7937 PR preprocessor/7263
7938 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
7939 to cpp_classify_number. For diagnostics, use the precise location
7940 instead of the global input_location.
7941
7942 2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
7943
7944 PR c++/11856
7945 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
7946
7947 2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
7948
7949 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
7950
7951 2012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
7952
7953 PR 53063
7954 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
7955 Wreorder): Use LangEnabledBy.
7956 * c-opts.c (c_common_handle_option): Do not enable them
7957 explicitly. Call lang-specific generated functions.
7958 (c_common_post_options): Do not set them here.
7959
7960 2012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
7961
7962 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
7963 Wmissing-field-initializers,Wmissing-parameter-type,
7964 Wold-style-declaration,Woverride-init): Use EnabledBy.
7965 * c-opts.c (c_common_post_options): Do not set here explicitly.
7966
7967 2012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
7968
7969 PR 53063
7970 * c-opts.c (c_common_handle_option): Use handle_generated_option
7971 to enable sub-options.
7972
7973 2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
7974
7975 PR c++/53158
7976 * c-common.c (warnings_for_convert_and_check): Use warning_at.
7977
7978 2012-05-10 Richard Guenther <rguenther@suse.de>
7979
7980 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
7981 adjust commentary about TYPE_IS_SIZETYPE types.
7982
7983 2012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
7984
7985 PR c++/53261
7986 * c-common.c (warn_logical_operator): Check that argument of
7987 integer_zerop is not NULL.
7988
7989 2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
7990
7991 PR c/43772
7992 * c-common.c (warn_logical_operator): Do not warn if either side
7993 is already true or false.
7994
7995 2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
7996
7997 PR c/51712
7998 * c-common.c (expr_original_type): New.
7999 (shorten_compare): Do not warn for enumeration types.
8000
8001 2012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8002
8003 * c.opt (fpermissive): Add Var(flag_permissive).
8004
8005 2012-04-30 Marc Glisse <marc.glisse@inria.fr>
8006
8007 PR c++/51033
8008 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8009 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8010
8011 2012-04-30 Dodji Seketeli <dodji@redhat.com>
8012
8013 Add -Wvarargs option
8014 * c.opt (Wvarargs): Define new option.
8015
8016 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8017
8018 * c-common.c (check_function_arguments): Replace
8019 Wmissing-format-attribute with Wsuggest-attribute=format.
8020
8021 2012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8022
8023 * c.opt (Wsuggest-attribute=format): New. Alias of
8024 Wmissing-format-attribute.
8025 * c-format.c (decode_format_type): Replace
8026 Wmissing-format-attribute with Wsuggest-attribute=format.
8027 (check_function_format): Likewise.
8028
8029 2012-04-27 Ollie Wild <aaw@google.com>
8030
8031 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8032 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8033 * c.opt: Add Wliteral-suffix.
8034
8035 2012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8036
8037 PR c/44774
8038 * c.opt (Wpedantic): New.
8039 (pedantic): Alias Wpedantic.
8040 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8041 (c_common_post_options): Likewise.
8042 (sanitize_cpp_opts): Likewise.
8043 * c-lex.c (interpret_float): Likewise.
8044 * c-format.c (check_format_types): Likewise.
8045 * c-common.c (pointer_int_sum): Likewise.
8046 (c_sizeof_or_alignof_type): Likewise.
8047 (c_add_case_label): Likewise.
8048 (c_do_switch_warnings): Likewise.
8049 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8050
8051 2012-04-15 Jason Merrill <jason@redhat.com>
8052
8053 PR c++/52818
8054 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8055 (C_STD_NAME): Distinguish between C++98 and C++11.
8056
8057 2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8058
8059 PR target/52624
8060 * c-common.h (uint16_type_node): Rename into...
8061 (c_uint16_type_node): ...this.
8062 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8063 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8064
8065 2012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8066
8067 * c-common.c (warn_if_unused_value): Move definition to here.
8068 * c-common.h (warn_if_unused_value): Move declaration to here.
8069
8070 2012-03-23 William Bader <williambader@hotmail.com>
8071
8072 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8073
8074 2012-03-20 Jason Merrill <jason@redhat.com>
8075
8076 * c-common.h (enum cxx_dialect): Add cxx1y.
8077 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8078 test.
8079 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8080 * c-opts.c (c_common_post_options): Likewise.
8081 (set_std_cxx1y): New.
8082 (c_common_handle_option): Call it.
8083 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8084
8085 2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8086
8087 PR c++/14710
8088 * c.opt ([Wuseless-cast]): Add.
8089
8090 2012-03-16 Richard Guenther <rguenther@suse.de>
8091
8092 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8093
8094 2012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8095
8096 PR c++/44783
8097 * c.opt (ftemplate-backtrace-limit) Add.
8098
8099 2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8100
8101 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8102 handling.
8103 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8104 (init_pragma): Don't register extern_prefix.
8105
8106 2012-03-12 Richard Guenther <rguenther@suse.de>
8107
8108 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8109 (builtin_type_for_size): Likewise.
8110
8111 2012-02-13 Jakub Jelinek <jakub@redhat.com>
8112
8113 PR c++/52215
8114 * c-common.c (sync_resolve_params): Don't decide whether to convert
8115 or not based on TYPE_SIZE comparison, convert whenever arg_type
8116 is unsigned INTEGER_TYPE.
8117
8118 2012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8119
8120 PR c/52118
8121 * c.opt ([Wunused-local-typedefs]): Fix description.
8122
8123 2012-01-24 Mike Stump <mikestump@comcast.net>
8124
8125 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8126 exactly.
8127
8128 2012-01-18 Richard Guenther <rguenther@suse.de>
8129
8130 * c-opts.c (c_common_post_options): Reset LTO flags if
8131 we are about to generate a PCH.
8132
8133 2012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8134
8135 PR c++/51777
8136 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8137 use pp_unsigned_wide_integer.
8138
8139 2012-01-10 Richard Guenther <rguenther@suse.de>
8140
8141 PR middle-end/51806
8142 * c-opts.c (c_common_handle_option): Move -Werror handling
8143 to language independent code.
8144
8145 2012-01-05 Richard Guenther <rguenther@suse.de>
8146
8147 PR middle-end/51764
8148 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8149 from common.opt.
8150
8151 2011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8152
8153 PR c++/51316
8154 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8155 of array types with an unknown bound.
8156
8157 2011-12-20 Joseph Myers <joseph@codesourcery.com>
8158
8159 * c-common.c (flag_isoc99): Update comment to refer to C11.
8160 (flag_isoc1x): Change to flag_isoc11.
8161 * c-common.h (flag_isoc99): Update comment to refer to C11.
8162 (flag_isoc1x): Change to flag_isoc11.
8163 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8164 C11.
8165 * c-opts.c (set_std_c1x): Change to set_std_c11.
8166 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8167 Call set_std_c11.
8168 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8169 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8170 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8171 standard.
8172 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8173 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8174 (std=gnu1x): Make alias of std=gnu11.
8175
8176 2011-12-19 Jason Merrill <jason@redhat.com>
8177
8178 PR c++/51228
8179 * c-common.c (handle_transparent_union_attribute): Check the first
8180 field if the type is complete.
8181
8182 2011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8183
8184 PR libstdc++/51365
8185 * c-common.c (RID_IS_FINAL): Add.
8186 * c-common.h (RID_IS_FINAL): Add.
8187
8188 2011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8189
8190 * c.opt (fgnu-runtime): Provide full description.
8191 (fnext-runtime): Likewise.
8192 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8193
8194 2011-11-28 Andrew MacLeod <amacleod@redhat.com>
8195
8196 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8197 predefines in one place. Add LOCK_FREE predefines.
8198 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8199 new func.
8200
8201 2011-11-24 Andrew MacLeod <amacleod@redhat.com>
8202
8203 PR c/51256
8204 * c-common.c (get_atomic_generic_size): Check for various error
8205 conditions
8206 (resolve_overloaded_atomic_exchange,
8207 resolve_overloaded_atomic_compare_exchange,
8208 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8209 error_mark_node for error conditions.
8210
8211 2011-11-08 Richard Guenther <rguenther@suse.de>
8212
8213 PR middle-end/51010
8214 c-family/
8215
8216 2011-11-07 Richard Henderson <rth@redhat.com>
8217 Aldy Hernandez <aldyh@redhat.com>
8218 Torvald Riegel <triegel@redhat.com>
8219
8220 Merged from transactional-memory.
8221
8222 * c-common.c (handle_tm_wrap_attribute,
8223 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8224 (struct c_common_reswords): Added __transaction* keywords.
8225 (struct c_common_attribute_table): Added transaction* and tm_regparm
8226 attributes.
8227 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8228 masks.
8229 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8230 find_tm_attribute): Declare.
8231
8232 2011-11-07 Jason Merrill <jason@redhat.com>
8233
8234 PR c++/35688
8235 * c-common.c, c-common.h: Revert yesterday's changes.
8236
8237 2011-11-06 Jason Merrill <jason@redhat.com>
8238
8239 PR c++/35688
8240 * c-common.c (decl_has_visibility_attr): Split out from...
8241 (c_determine_visibility): ...here.
8242 * c-common.h: Declare it.
8243
8244 2011-11-06 Joseph Myers <joseph@codesourcery.com>
8245
8246 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8247 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8248 type.
8249 (check_user_alignment): New. Split out of
8250 handle_aligned_attribute. Disallow integer constants with
8251 noninteger types. Conditionally allow zero.
8252 (handle_aligned_attribute): Use check_user_alignment.
8253 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8254
8255 2011-11-06 Andrew MacLeod <amacleod@redhat.com>
8256 Richard Henderson <rth@redhat.com>
8257
8258 Merged from cxx-mem-model.
8259
8260 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
8261 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
8262 parameters that are the same type size.
8263 (get_atomic_generic_size): New. Find size of generic
8264 atomic function parameters and do typechecking.
8265 (add_atomic_size_parameter): New. Insert size into parameter list.
8266 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8267 either __atomic_exchange_n or external library call.
8268 (resolve_overloaded_atomic_compare_exchange): Restructure
8269 __atomic_compare_exchange to either _n variant or external library call.
8270 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
8271 __atomic_load_n or an external library call.
8272 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8273 __atomic_store_n or an external library call.
8274 (resolve_overloaded_builtin): Handle new __atomic builtins.
8275
8276 2011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8277
8278 PR c++/50608
8279 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8280 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8281 <INDIRECT_REF>: Return the argument.
8282 <ARRAY_REF>: Remove special code for negative offset.
8283 Call fold_build_pointer_plus instead of size_binop.
8284 (fold_offsetof): Remove STOP_REF argument and adjust.
8285 * c-common.h (fold_offsetof_1): Declare.
8286 (fold_offsetof): Remove STOP_REF argument.
8287
8288 2011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8289
8290 PR c++/50810
8291 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8292 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8293 Wnarrowing for C++0x and C++98.
8294 * c.opt ([Wnarrowing]): Update.
8295
8296 2011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8297
8298 PR c++/44277
8299 * c.opt: Add Wzero-as-null-pointer-constant.
8300
8301 2011-10-31 Jason Merrill <jason@redhat.com>
8302
8303 * c.opt (-fdeduce-init-list): Off by default.
8304
8305 PR c++/50920
8306 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8307 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8308 and -Wc++11-compat.
8309 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8310
8311 2011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8312
8313 PR c++/30066
8314 * c.opt (fvisibility-inlines-hidden): Description change.
8315
8316 2011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8317
8318 Implement C++11 user-defined literals.
8319 * c-common.c (build_userdef_literal): New.
8320 * c-common.def: New tree code.
8321 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8322 * c-lex.c (interpret_float): Add suffix parm.
8323 (c_lex_with_flags): Build literal tokens.
8324
8325 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8326
8327 PR c++/50841
8328 Revert:
8329 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8330
8331 PR c++/50810
8332 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8333 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8334 Wnarrowing for C++0x and C++98.
8335 * c.opt ([Wnarrowing]): Update.
8336
8337 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8338
8339 PR c++/50810
8340 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8341 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8342 Wnarrowing for C++0x and C++98.
8343 * c.opt ([Wnarrowing]): Update.
8344
8345 2011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8346
8347 PR c++/45385
8348 * c-common.c (conversion_warning): Remove code looking for
8349 artificial operands.
8350
8351 2011-10-18 Dodji Seketeli <dodji@redhat.com>
8352
8353 PR bootstrap/50760
8354 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
8355 !NO_IMPLICIT_EXTERN_C.
8356
8357 2011-10-17 Michael Spertus <mike_spertus@symantec.com>
8358
8359 * c-common.c (c_common_reswords): Add __bases,
8360 __direct_bases.
8361 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8362
8363 2011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8364
8365 PR c++/50757
8366 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8367
8368 2011-10-15 Tom Tromey <tromey@redhat.com>
8369 Dodji Seketeli <dodji@redhat.com>
8370
8371 * c.opt (fdebug-cpp): New option.
8372 * c-opts.c (c_common_handle_option): Handle the option.
8373 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8374 output stream in parameter. Factorized from ...
8375 (maybe_print_line): ... this. Dump location debug information when
8376 -fdebug-cpp is in effect.
8377 (print_line_1): New static function. Takes an output stream in
8378 parameter. Factorized from ...
8379 (print_line): ... here. Dump location information when -fdebug-cpp
8380 is in effect.
8381 (scan_translation_unit): Dump location information when
8382 -fdebug-cpp is in effect.
8383
8384 2011-10-15 Tom Tromey <tromey@redhat.com>
8385 Dodji Seketeli <dodji@redhat.com>
8386
8387 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8388 without argument.
8389 * c-opts.c (c_common_handle_option)<case
8390 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8391 cases. Handle -ftrack-macro-expansion with and without argument.
8392
8393 2011-10-15 Tom Tromey <tromey@redhat.com>
8394 Dodji Seketeli <dodji@redhat.com>
8395
8396 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8397 (print_line, cb_define, do_line_change): Adjust to avoid touching
8398 the internals of struct line_map. Use the public API instead.
8399 * c-pch.c (c_common_read_pch): Likewise.
8400 * c-lex.c (fe_file_change): Likewise.
8401
8402 2011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8403
8404 PR c++/17212
8405 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8406
8407 2011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8408
8409 PR c++/33067
8410 * c-pretty-print.c (pp_c_floating_constant): Output
8411 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8412
8413 2011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8414
8415 * c-common.c (def_builtin_1): Delete old interface with two
8416 parallel arrays to hold standard builtin declarations, and replace
8417 it with a function based interface that can support creating
8418 builtins on the fly in the future. Change all uses, and poison
8419 the old names. Make sure 0 is not a legitimate builtin index.
8420 * c-omp.c (c_finish_omp_barrier): Ditto.
8421 (c_finish_omp_taskwait): Ditto.
8422 (c_finish_omp_flush): Ditto.
8423
8424 2011-10-11 Tristan Gingold <gingold@adacore.com>
8425
8426 * c.opt: (fallow-parameterless-variadic-functions): New.
8427
8428 2011-09-08 Dodji Seketeli <dodji@redhat.com>
8429
8430 PR c++/33255 - Support -Wunused-local-typedefs warning
8431 * c-common.h (struct c_language_function::local_typedefs): New
8432 field.
8433 (record_locally_defined_typedef, maybe_record_typedef_use)
8434 (maybe_warn_unused_local_typedefs): Declare new functions.
8435 * c-common.c (record_locally_defined_typedef)
8436 (maybe_record_typedef_use)
8437 (maybe_warn_unused_local_typedefs): Define new functions.
8438 * c.opt: Declare new -Wunused-local-typedefs flag.
8439
8440 2011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8441
8442 PR middle-end/50266
8443 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8444 computations.
8445
8446 2011-09-05 Richard Guenther <rguenther@suse.de>
8447
8448 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8449 of integer_minus_one_node for empty array upper bounds.
8450
8451 2011-08-28 Dodji Seketeli <dodji@redhat.com>
8452
8453 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8454 it's the first time it's being called on this main TU.
8455
8456 2011-08-24 Richard Guenther <rguenther@suse.de>
8457
8458 PR c/49396
8459 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8460
8461 2011-08-22 Gabriel Charette <gchare@google.com>
8462
8463 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8464 defined in cpp_init_builtins and c_cpp_builtins.
8465
8466 2011-08-19 Joseph Myers <joseph@codesourcery.com>
8467
8468 * c-common.c (c_common_reswords): Add __builtin_complex.
8469 * c-common.h (RID_BUILTIN_COMPLEX): New.
8470
8471 2011-08-18 Joseph Myers <joseph@codesourcery.com>
8472
8473 * c-common.c (c_common_reswords): Add _Noreturn.
8474 (keyword_is_function_specifier): Handle RID_NORETURN.
8475 * c-common.h (RID_NORETURN): New.
8476
8477 2011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
8478
8479 * c-common.c (unsafe_conversion_p): New function. Check if it is
8480 unsafe to convert an expression to the type.
8481 (conversion_warning): Adjust, use unsafe_conversion_p.
8482 * c-common.h (unsafe_conversion_p): New function declaration.
8483
8484 2011-08-02 Jakub Jelinek <jakub@redhat.com>
8485
8486 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8487 (c_finish_omp_taskyield): New prototype.
8488 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8489 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8490 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8491 or RHS1 have side-effects, evaluate those too in the right spot,
8492 if it is a decl and LHS is also a decl, error out if they
8493 aren't the same.
8494 (c_finish_omp_taskyield): New function.
8495 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8496 * c-pragma.c (omp_pragmas): Add taskyield.
8497 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8498 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8499 PRAGMA_OMP_CLAUSE_MERGEABLE.
8500
8501 2011-07-25 Dodji Seketeli <dodji@redhat.com>
8502
8503 * c-common.h (set_underlying_type): Remove parm name from
8504 declaration.
8505
8506 2011-07-25 Romain Geissler <romain.geissler@gmail.com>
8507
8508 * c-pretty-print.h: Search c-common.h in c-family.
8509
8510 2011-07-22 Jason Merrill <jason@redhat.com>
8511
8512 PR c++/49793
8513 * c.opt (Wnarrowing): New.
8514
8515 PR c++/30112
8516 * c-common.h: Declare c_linkage_bindings.
8517 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8518
8519 PR c++/49813
8520 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8521 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8522 as flag_isoc99 for 'restrict'.
8523 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8524
8525 2011-07-21 Ian Lance Taylor <iant@google.com>
8526
8527 PR middle-end/49705
8528 * c-common.c (c_disable_warnings): New static function.
8529 (c_enable_warnings): New static function.
8530 (c_fully_fold_internal): Change local unused_p to bool. Call
8531 c_disable_warnings and c_enable_warnings rather than change
8532 c_inhibit_evaluation_warnings.
8533
8534 2011-07-20 Jason Merrill <jason@redhat.com>
8535
8536 PR c++/6709 (DR 743)
8537 PR c++/42603 (DR 950)
8538 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8539 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8540 (CPP_DECLTYPE): New.
8541 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8542
8543 2011-07-19 Richard Guenther <rguenther@suse.de>
8544
8545 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8546 * c-omp.c (c_finish_omp_for): Likewise.
8547
8548 2011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8549
8550 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8551 body on the next line.
8552
8553 2011-07-08 Jason Merrill <jason@redhat.com>
8554
8555 PR c++/45437
8556 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8557
8558 PR c++/49673
8559 * c-common.c (c_apply_type_quals_to_decl): Don't check
8560 TYPE_NEEDS_CONSTRUCTING.
8561
8562 2011-07-06 Richard Guenther <rguenther@suse.de>
8563
8564 * c-common.c (c_common_nodes_and_builtins):
8565 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8566
8567 2011-07-05 Richard Guenther <rguenther@suse.de>
8568
8569 * c-common.c (c_common_nodes_and_builtins): Build all common
8570 tree nodes first.
8571
8572 2011-06-27 Jakub Jelinek <jakub@redhat.com>
8573
8574 * c-common.h (c_tree_chain_next): New static inline function.
8575
8576 * c-common.c (check_builtin_function_arguments): Handle
8577 BUILT_IN_ASSUME_ALIGNED.
8578
8579 2011-06-21 Andrew MacLeod <amacleod@redhat.com>
8580
8581 * c-common.c: Add sync_ or SYNC__ to builtin names.
8582 * c-omp.c: Add sync_ or SYNC__ to builtin names.
8583
8584 2011-06-20 Pierre Vittet <piervit@pvittet.com>
8585
8586 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8587 handler.
8588 (gen_pragma_handler): New union.
8589 (internal_pragma_handler): New type.
8590 (c_register_pragma_with_data)
8591 (c_register_pragma_with_expansion_and_data): New functions.
8592
8593 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8594 (c_register_pragma, c_register_pragma_with_expansion)
8595 (c_invoke_pragma_handler): Changed to work with
8596 internal_pragma_handler.
8597 (c_register_pragma_with_data)
8598 (c_register_pragma_with_expansion_and_data): New functions.
8599
8600 2011-06-14 Joseph Myers <joseph@codesourcery.com>
8601
8602 * c-common.c: Include common/common-target.h.
8603 (handle_section_attribute): Use
8604 targetm_common.have_named_sections.
8605 * c-cppbuiltin.c: Include common/common-target.h.
8606 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8607
8608 2011-06-10 Richard Guenther <rguenther@suse.de>
8609
8610 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8611 to print a IDENTIFIER_NODE.
8612
8613 2011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8614 Joseph Myers <joseph@codesourcery.com>
8615
8616 * c.opt (fbuilding-libgcc): New option.
8617 * c-cppbuiltin.c (c_cpp_builtins): Define
8618 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8619
8620 2011-06-07 Jason Merrill <jason@redhat.com>
8621
8622 * c-common.c (max_tinst_depth): Lower default to 900.
8623
8624 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8625
8626 2011-06-07 Richard Guenther <rguenther@suse.de>
8627
8628 * c-common.c (c_common_nodes_and_builtins): Do not set
8629 size_type_node or call set_sizetype.
8630
8631 2011-06-07 Dodji Seketeli <dodji@redhat.com>
8632
8633 PR debug/49130
8634 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
8635 type when using pointer comparison to compare types.
8636
8637 2011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
8638
8639 * c.opt: Add -Wdelete-non-virtual-dtor.
8640 * c-opts.c (c_common_handle_option): Include it in -Wall.
8641
8642 2011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
8643
8644 PR bootstrap/49190
8645
8646 Revert:
8647 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8648
8649 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8650 not tree_common.
8651
8652 2011-05-27 Jakub Jelinek <jakub@redhat.com>
8653
8654 PR c++/49165
8655 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
8656 C++ don't call c_common_truthvalue_conversion on void type arms.
8657
8658 2011-05-27 Nathan Froyd <froydnj@codesourcery.com>
8659
8660 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
8661 (stmt_list_stack): Define.
8662 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
8663 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
8664
8665 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8666
8667 * c-common.c (warning_candidate_p): Check for BLOCKs.
8668
8669 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
8670
8671 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
8672 not tree_common.
8673
8674 2011-05-25 Jakub Jelinek <jakub@redhat.com>
8675
8676 * c-common.c (def_fn_type): Remove extra va_end.
8677
8678 2011-05-23 Jason Merrill <jason@redhat.com>
8679
8680 PR c++/48106
8681 * c-common.c (c_common_get_narrower): New.
8682 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
8683
8684 2011-05-23 Nathan Froyd <froydnj@codesourcery.com>
8685
8686 * c-common.h (check_function_arguments): Tweak prototype of
8687 check_function_arguments.
8688 * c-common.c (check_function_arguments): Likewise. Adjust
8689 calls to check_function_nonnull, check_function_format, and
8690 check_function_sentinel.
8691 (check_function_sentinel): Take a FUNCTION_TYPE rather than
8692 separate attributes and typelist arguments. Use
8693 FOREACH_FUNCTION_ARGS to iterate over argument types.
8694
8695 2011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8696
8697 * c-common.c (c_common_reswords): Reorder.
8698 * c-common.h (rid): Likewise.
8699
8700 2011-05-10 Nathan Froyd <froydnj@codesourcery.com>
8701
8702 * c-common.c (def_fn_type): Don't call build_function_type, call
8703 build_function_type_array or build_varargs_function_type_array
8704 instead.
8705 (c_common_nodes_and_builtins): Likewise.
8706
8707 2011-05-05 Nathan Froyd <froydnj@codesourcery.com>
8708
8709 * c-common.c (c_add_case_label): Omit the loc argument to
8710 build_case_label.
8711 * c-common.h (build_case_label): Remove.
8712 * c-semantics.c (build_case_label): Remove.
8713
8714 2011-05-05 Joseph Myers <joseph@codesourcery.com>
8715
8716 * c-objc.h (objc_start_method_definition): Update prototype.
8717 * stub-objc.c (objc_start_method_definition): Add extra parameter.
8718
8719 2011-05-04 Nathan Froyd <froydnj@codesourcery.com>
8720
8721 * c-common.c (check_main_parameter_types): Reindent. Don't use
8722 TYPE_ARG_TYPES directly.
8723 (handle_nonnull_attribute): Likewise.
8724 (sync_resolve_params): Likewise.
8725 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
8726 to check_format_string.
8727 (handle_format_attribute): Likewise.
8728 (check_format_string): Take a function type to examine instead of
8729 a type list. Use a function_arg_iterator to step through argument
8730 types.
8731
8732 2011-05-04 Richard Guenther <rguenther@suse.de>
8733
8734 * c-common.c (fix_string_type): Use size_int for index type bounds.
8735 (start_fname_decls): Do not pass NULL to build_int_cst.
8736 (c_init_attributes): Likewise.
8737 * c-lex.c (c_lex_with_flags): Likewise.
8738
8739 2011-04-27 Jason Merrill <jason@redhat.com>
8740
8741 * c-common.c (make_tree_vector_from_list): New.
8742 * c-common.h: Declare it.
8743
8744 2011-04-26 Richard Guenther <rguenther@suse.de>
8745
8746 PR preprocessor/48248
8747 * c-ppoutput.c (maybe_print_line): Always optimize newlines
8748 for output size with -P.
8749
8750 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
8751
8752 * c-common.c (struct c_common_resword): Add __underlying_type.
8753 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
8754
8755 2011-04-20 Jim Meyering <meyering@redhat.com>
8756
8757 * c-format.c (init_dollar_format_checking): Remove useless
8758 if-before-free.
8759
8760 2011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
8761
8762 * c-objc.h (objc_get_interface_ivars): Removed.
8763 (objc_detect_field_duplicates): New.
8764 * stub-objc.c: Likewise.
8765
8766 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8767
8768 * stub-objc.c (objc_declare_protocols): Renamed to
8769 objc_declare_protocol.
8770 * c-objc.h: Likewise.
8771
8772 2011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
8773
8774 * stub-objc.c (objc_declare_class): Updated argument name.
8775
8776 2011-04-12 Nathan Froyd <froydnj@codesourcery.com>
8777
8778 * c-common.h (c_common_init_ts): Declare.
8779 * c-common.c (c_common_init_ts): Define.
8780
8781 2011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
8782
8783 * c-objc.h (objc_build_message_expr): Updated prototype.
8784 * stub-objc.c (objc_build_message_expr): Likewise.
8785
8786 2011-04-12 Martin Jambor <mjambor@suse.cz>
8787
8788 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
8789 of cgraph_node.
8790
8791 2011-04-11 Richard Guenther <rguenther@suse.de>
8792
8793 * c-common.c (complete_array_type): Build a range type of
8794 proper type.
8795
8796 2011-04-08 Nathan Froyd <froydnj@codesourcery.com>
8797
8798 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
8799 (handle_type_generic_attribute): Likewise.
8800
8801 2011-04-07 Jason Merrill <jason@redhat.com>
8802
8803 PR c++/48450
8804 * c-common.c (c_common_truthvalue_conversion): Don't ignore
8805 conversion from C++0x scoped enum.
8806
8807 2011-04-06 Joseph Myers <joseph@codesourcery.com>
8808
8809 * c-target-def.h: New file.
8810 * c-target.def: New file.
8811 * c-target.h: New file.
8812 * c-common.c (targetcm): Don't define here.
8813 * c-common.h (default_handle_c_option): Declare.
8814 * c-format.c: Include c-target.h instead of target.h.
8815 * c-opts.c: Include c-target.h instead of target.h. Explicitly
8816 include tm.h.
8817 (default_handle_c_option): Move from targhooks.c.
8818
8819 2011-03-29 Jakub Jelinek <jakub@redhat.com>
8820
8821 PR preprocessor/48248
8822 * c-ppoutput.c (print): Add src_file field.
8823 (init_pp_output): Initialize it.
8824 (maybe_print_line): Don't optimize by adding up to 8 newlines
8825 if map->to_file and print.src_file are different file.
8826 (print_line): Update print.src_file.
8827
8828 2011-03-25 Kai Tietz <ktietz@redhat.com>
8829
8830 * c-ada-spec.c (compare_comment): Use filename_cmp
8831 instead of strcmp for filename.
8832
8833 2011-03-25 Jeff Law <law@redhat.com>
8834
8835 * c-common.c (def_fn_type): Add missing va_end.
8836
8837 2011-03-25 Jason Merrill <jason@redhat.com>
8838
8839 * c.opt: Add -std=c++03.
8840
8841 2011-03-22 Eric Botcazou <ebotcazou@adacore.com>
8842
8843 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
8844
8845 2011-03-17 Kai Tietz <ktietz@redhat.com>
8846
8847 PR target/12171
8848 * c-pretty-print.c (pp_c_specifier_qualifier_list):
8849 Display allowed attributes for function pointer types.
8850 (pp_c_attributes_display): New function to display
8851 attributes having affects_type_identity flag set to true.
8852 * c-pretty-print.h (pp_c_attributes_display): New prototype.
8853
8854 * c-common.c (c_common_attribute_table):
8855 Add new element.
8856 (c_common_format_attribute_table): Likewise.
8857
8858 2011-03-18 Jason Merrill <jason@redhat.com>
8859
8860 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
8861 * c-common.h: Don't declare it here.
8862 * c-common.c: Or define it here.
8863 * c-opts.c (c_common_handle_option): Or set it here.
8864
8865 PR c++/35315
8866 * c-common.c (handle_transparent_union_attribute): Don't
8867 make a duplicate type in C++.
8868
8869 2011-03-15 Jason Merrill <jason@redhat.com>
8870
8871 * c-common.c (max_constexpr_depth): New.
8872 * c-common.h: Declare it.
8873 * c-opts.c (c_common_handle_option): Set it.
8874 * c.opt (fconstexpr-depth): New option.
8875
8876 2011-03-11 Jason Merrill <jason@redhat.com>
8877
8878 * c-common.c (attribute_takes_identifier_p): Add missing const.
8879
8880 PR c++/46803
8881 * c-common.c (attribute_takes_identifier_p): Assume that an
8882 unknown attribute takes an identifier.
8883
8884 2011-03-07 Nathan Froyd <froydnj@codesourcery.com>
8885
8886 PR c/47786
8887 * c-common.c (c_type_hash): Call list_length instead of iterating
8888 through DECL_CHAIN. Rename 'i' to 'n_elements'.
8889
8890 2011-02-19 Jakub Jelinek <jakub@redhat.com>
8891
8892 PR c/47809
8893 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
8894
8895 2011-02-17 Iain Sandoe <iains@gcc.gnu.org>
8896
8897 * c.opt (fobjc-abi-version=) New.
8898 (fobjc-nilcheck): New.
8899
8900 2011-02-03 Nathan Froyd <froydnj@codesourcery.com>
8901
8902 PR c++/46890
8903 * c-common.h (keyword_is_decl_specifier): Declare.
8904 * c-common.c (keyword_is_decl_specifier): Define.
8905 (keyword_is_function_specifier): New function.
8906
8907 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8908
8909 PR c/47473
8910 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
8911 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
8912 REAL_TYPE.
8913
8914 2011-01-26 Arnaud Charlet <charlet@adacore.com>
8915
8916 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
8917
8918 2011-01-26 Jakub Jelinek <jakub@redhat.com>
8919
8920 PR pch/47430
8921 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
8922 after init_c_lex if pch_file is set.
8923
8924 2011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
8925
8926 PR c++/43601
8927 * c.opt (-fkeep-inline-dllexport): New switch.
8928
8929 2011-01-12 Richard Guenther <rguenther@suse.de>
8930
8931 PR middle-end/32511
8932 * c-common.c (handle_weak_attribute): Warn instead of error
8933 on declaring an inline function weak.
8934
8935 2011-01-05 Tom Tromey <tromey@redhat.com>
8936
8937 * c-common.h (lvalue_error): Update.
8938 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
8939 not error.
8940
8941 2010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
8942
8943 PR objc/47075
8944 * c-objc.h (objc_finish_message_expr): Added argument to
8945 prototype.
8946
8947 2010-12-22 Nathan Froyd <froydnj@codesourcery.com>
8948
8949 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
8950 Use prototype_p.
8951
8952 2010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
8953
8954 * c-objc.h (objc_maybe_warn_exceptions): New.
8955 * stub-objc.c (objc_maybe_warn_exceptions): New.
8956
8957 2010-12-10 Nathan Froyd <froydnj@codesourcery.com>
8958
8959 * c-common.h (readonly_error): Declare.
8960 * c-common.c (readonly_error): Define.
8961
8962 2010-12-09 Nathan Froyd <froydnj@codesourcery.com>
8963
8964 * c-common.h (invalid_indirection_error): Declare.
8965 * c-common.c (invalid_indirection_error): Define.
8966
8967 2010-12-03 Richard Guenther <rguenther@suse.de>
8968
8969 PR c/46745
8970 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
8971 (pp_c_unary_expression): Likewise.
8972 (pp_c_expression): Likewise.
8973
8974 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
8975
8976 * c-common.h (objc_finish_function): New.
8977 (objc_non_volatilized_type): Removed.
8978 (objc_type_quals_match): Removed.
8979 * stub-objc.c (objc_finish_function): New.
8980 (objc_non_volatilized_type): Removed.
8981 (objc_type_quals_match): Removed.
8982
8983 2010-11-30 Joseph Myers <joseph@codesourcery.com>
8984
8985 * c-common.h (parse_optimize_options): Declare.
8986 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
8987 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
8988
8989 2010-11-29 Joseph Myers <joseph@codesourcery.com>
8990
8991 * c-opts.c (check_deps_environment_vars): Use getenv instead of
8992 GET_ENVIRONMENT.
8993 * c-pch.c (O_BINARY): Don't define here.
8994 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
8995
8996 2010-11-25 Joseph Myers <joseph@codesourcery.com>
8997
8998 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
8999 targetm.except_unwind_info.
9000
9001 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9002
9003 * c-opts.c (c_common_handle_option): Pass location to
9004 set_struct_debug_option.
9005
9006 2010-11-23 Joseph Myers <joseph@codesourcery.com>
9007
9008 * c-common.c (visibility_options): Move from ../opts.c.
9009 * c-common.h (struct visibility_flags, visibility_options):
9010 Declare here.
9011 * c-opts.c (finish_options): Rename to c_finish_options.
9012 (c_common_init): Update call to finish_options.
9013
9014 2010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9015
9016 PR objc/34033
9017 * c-lex.c (lex_string): Check that each string in an Objective-C
9018 string concat sequence starts with either one or zero '@', and
9019 that there are no spurious '@' signs at the end.
9020
9021 2010-11-20 Joseph Myers <joseph@codesourcery.com>
9022
9023 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9024 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9025 HANDLE_PRAGMA_VISIBILITY.
9026 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9027 HANDLE_PRAGMA_VISIBILITY): Don't define.
9028 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9029
9030 2010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9031
9032 PR c++/16189
9033 PR c++/36888
9034 PR c++/45331
9035 * c-common.h (keyword_begins_type_specifier): Declare.
9036 (keyword_is_storage_class_specifier): Declare.
9037 (keyword_is_type_qualifier): Declare.
9038 * c-common.c (keyword_begins_type_specifier): New function.
9039 (keyword_is_storage_class_specifier): New function.
9040 (keyword_is_type_qualifier): Declare.
9041
9042 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9043
9044 PR c/46547
9045 * c-common.c (in_late_binary_op): Define.
9046 (c_common_truthvalue_conversion): Check in_late_binary_op before
9047 calling c_save_expr.
9048 * c-common.h (in_late_binary_op): Declare.
9049
9050 2010-11-19 Joseph Myers <joseph@codesourcery.com>
9051
9052 * c-opts.c (c_common_handle_option): Update calls to
9053 set_struct_debug_option.
9054
9055 2010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9056
9057 * c-common.h (objc_declare_protocols): Added additional argument.
9058 * stub-objc.c (objc_declare_protocol): Same change.
9059
9060 2010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9061
9062 PR c/33193
9063 * c-common.h (build_real_imag_expr): Declare.
9064 * c-semantics.c (build_real_imag_expr): Define.
9065
9066 2010-11-17 Joseph Myers <joseph@codesourcery.com>
9067
9068 * c-opts.c (c_common_parse_file): Take no arguments.
9069 * c-common.h (c_common_parse_file): Update prototype.
9070
9071 2010-11-16 Jakub Jelinek <jakub@redhat.com>
9072
9073 PR c++/46401
9074 * c-common.c (warning_candidate_p): Don't track non-const calls
9075 or STRING_CSTs.
9076
9077 2010-11-15 Ian Lance Taylor <iant@google.com>
9078
9079 * c-lex.c (init_c_lex): Set macro debug callbacks if
9080 flag_dump_go_spec is set.
9081
9082 2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9083
9084 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9085 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9086
9087 2010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9088
9089 PR preprocessor/45038
9090 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9091 dialects.
9092
9093 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9094
9095 * c-common.h (c_family_lang_mask): Declare.
9096 * c-opts.c (c_family_lang_mask): Make extern.
9097 * c-pragma.c (handle_pragma_diagnostic): Use
9098 control_warning_option.
9099
9100 2010-11-12 Joseph Myers <joseph@codesourcery.com>
9101
9102 * c-common.c (parse_optimize_options): Update call to
9103 decode_options.
9104 * c-common.h (c_common_handle_option): Update prototype.
9105 * c-opts.c (c_common_handle_option): Take location_t parameter and
9106 pass it to other functions.
9107
9108 2010-11-11 Joseph Myers <joseph@codesourcery.com>
9109
9110 * c-opts.c (warning_as_error_callback): Remove.
9111 (c_common_initialize_diagnostics): Don't call
9112 register_warning_as_error_callback.
9113 (c_common_handle_option): Handle -Werror=normalized= here.
9114
9115 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9116
9117 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9118 in diagnostic.
9119 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9120 letter.
9121 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9122 Remove trailing '.' from diagnostics.
9123 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9124
9125 2010-11-10 Joseph Myers <joseph@codesourcery.com>
9126
9127 * c-common.c (parse_optimize_options): Pass global_dc to
9128 decode_options.
9129 * c-opts.c (c_common_handle_option): Pass &global_options to
9130 set_Wstrict_aliasing.
9131 * c.opt (v): Don't mark Common or document here.
9132
9133 2010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9134
9135 PR target/44981
9136 * c-format.c (format_type): New type gcc_objc_string_format_type.
9137 (valid_stringptr_type_p): New.
9138 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9139 (check_format_string): Pass expected type, use
9140 valid_stringptr_type_p (), check that the format string types are
9141 consistent with the format specification.
9142 (decode_format_attr): Warn if NSString is used outside objective-c.
9143 (format_types_orig): Add NSString.
9144 (format_name): New.
9145 (format_flags): New.
9146 (check_format_arg): Handle format strings requiring an external parser.
9147 first_target_format_type: New variable.
9148 (handle_format_attribute): Set up first_target_format_type, pass the
9149 expected format arg string type to check_format_string().
9150 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9151 * stub-objc.c (objc_string_ref_type_p): New.
9152 (objc_check_format_arg): New.
9153
9154 2010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9155
9156 Fixed using the Objective-C 2.0 dot-syntax with class names.
9157 * c-common.h (objc_build_class_component_ref): New.
9158 * stub-objc.c (objc_build_class_component_ref): New.
9159
9160 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9161
9162 * c.opt (Wproperty-assign-default): New option.
9163
9164 2010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9165
9166 Implemented -fobjc-std=objc1 flag.
9167 * c.opt (fobjc-std=objc1): New option.
9168
9169 2010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9170
9171 Implemented format and noreturn attributes for Objective-C methods.
9172 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9173 attribute for Objective-C methods.
9174
9175 2010-10-31 Jason Merrill <jason@redhat.com>
9176
9177 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9178 EXPR_LOC_OR_HERE.
9179
9180 2010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9181
9182 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9183 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9184 (objc_add_property_declaration): Removed arguments for copies and
9185 ivar.
9186 (objc_build_getter_call): Renamed to
9187 objc_maybe_build_component_ref.
9188 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9189 (objc_is_property_ref): New.
9190 * c-common.c (c_common_reswords): Removed copies and ivar.
9191 * stub-objc.c (objc_add_property_declaration): Removed arguments
9192 for copies and ivar.
9193 (objc_build_getter_call): Renamed to
9194 objc_maybe_build_component_ref.
9195 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9196 (objc_is_property_ref): New.
9197
9198 2010-10-29 Arnaud Charlet <charlet@adacore.com>
9199 Matthew Gingell <gingell@adacore.com>
9200
9201 * c-ada-spec.c (separate_class_package): New function.
9202 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9203 name of their enclosing package.
9204 (print_ada_declaration): Use separate_class_package.
9205
9206 2010-10-27 Jason Merrill <jason@redhat.com>
9207
9208 * c-common.c (c_common_reswords): Add __is_literal_type.
9209 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9210
9211 * c-common.c (check_case_value): Remove special C++ code.
9212
9213 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9214
9215 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9216 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9217 and RID_LAST_PATTR.
9218 (objc_add_property_declaration): Added additional arguments.
9219 (objc_property_attribute_kind): Removed.
9220 (objc_set_property_attr): Removed.
9221 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9222 copy and nonatomic.
9223 * stub-objc.c (objc_add_property_declaration): Added additional
9224 arguments.
9225 (objc_set_property_attr): Removed.
9226
9227 2010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9228
9229 * c-common.h (objc_add_property_variable): Renamed to
9230 objc_add_property_declaration. Added location argument.
9231 * stub-objc.c (objc_add_property_variable): Same change.
9232
9233 2010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9234
9235 * c-common.h (objc_maybe_printable_name): New.
9236 * stub-objc.c (objc_maybe_printable_name): New.
9237
9238 2010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9239 Andrew Pinski <pinskia@gmail.com>
9240
9241 * c-common.h (c_common_mark_addressable_vec): Declare.
9242 * c-common.c (c_common_mark_addressable_vec): New function.
9243
9244 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9245
9246 * c-common.h (objc_set_method_type): Removed.
9247 (objc_add_method_declaration): Added boolean argument.
9248 (objc_start_method_definition): Same change.
9249 (objc_build_method_signature): Same change.
9250 * stub-objc.c (objc_set_method_type): Removed.
9251 (objc_add_method_declaration): Added boolean argument.
9252 (objc_start_method_definition): Same change.
9253 (objc_build_method_signature): Same change.
9254
9255 2010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9256
9257 * c-common.h (finish_file): Removed.
9258 (objc_write_global_declarations): New.
9259 * c-opts.c (c_common_parse_file): Do not call finish_file.
9260 * stub-objc.c (objc_write_global_declarations): New.
9261
9262 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9263
9264 Implemented parsing @synthesize and @dynamic for
9265 Objective-C/Objective-C++.
9266 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9267 (objc_add_synthesize_declaration): New.
9268 (objc_add_dynamic_declaration): New.
9269 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9270 * stub-objc.c (objc_add_synthesize_declaration): New.
9271 (objc_add_dynamic_declaration): New.
9272
9273 2010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9274
9275 PR target/46041
9276 * c-cppbuiltin.c (mode_has_fma): Move function here from
9277 builtins.c. Don't use the fma optab, instead just use the
9278 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9279 using -save-temps.
9280
9281 2010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9282
9283 Merge from 'apple/trunk' branch on FSF servers.
9284
9285 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
9286
9287 Radar 4330422
9288 * c-common.h (objc_non_volatilized_type): New declaration
9289 * stub-objc.c (objc_non_volatilized_type): New stub.
9290
9291 2010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9292
9293 Merge from 'apple/trunk' branch on FSF servers.
9294
9295 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
9296
9297 Radar 4133425
9298 * c-common.h (objc_diagnose_private_ivar): New decl.
9299 * stub-objc.c (objc_diagnose_private_ivar): New stub.
9300
9301 2010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9302
9303 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9304 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9305 (objc_ivar_visibility_kind): New enum.
9306 (objc_set_visibility): Adjust prototype to use visibility enum.
9307 * stub-objc.c (objc_set_visibility): Adjust stub to use
9308 visibility enum.
9309
9310 2010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9311
9312 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9313 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9314 has the appropriate fma builtins.
9315 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9316
9317 2010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9318
9319 merge from FSF apple 'trunk' branch.
9320 2006 Fariborz Jahanian <fjahanian@apple.com>
9321
9322 Radars 4436866, 4505126, 4506903, 4517826
9323 * c-common.c (c_common_resword): Define @property and its attributes.
9324 * c-common.h: Define property attribute enum entries.
9325 (OBJC_IS_PATTR_KEYWORD): New.
9326 (objc_property_attribute_kind): New enum.
9327 Declare objc_set_property_attr (), objc_add_property_variable (),
9328 objc_build_getter_call () and objc_build_setter_call ().
9329 * stub-objc.c (objc_set_property_attr): New stub.
9330 (objc_add_property_variable): Likewise.
9331 (objc_build_getter_call): Likewise.
9332 (objc_build_setter_call) Likewise.
9333
9334 2010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9335
9336 merge from FSF apple 'trunk' branch.
9337 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
9338
9339 Radar 3803157 (method attributes)
9340 * c-common.c (handle_deprecated_attribute): Recognize
9341 objc methods as valid declarations.
9342 * c-common.h: Declare objc_method_decl ().
9343 * stub-objc.c (objc_method_decl): New stub.
9344
9345 2010-10-08 Joseph Myers <joseph@codesourcery.com>
9346
9347 * c-common.c (parse_optimize_options): Call
9348 decode_cmdline_options_to_array_default_mask before
9349 decode_options. Update arguments to decode_options.
9350 * c-common.h (c_common_init_options_struct): Declare.
9351 * c-opts.c (c_common_init_options_struct): New. Split out from
9352 c_common_init_options.
9353
9354 2010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9355
9356 Implemented fast enumeration for Objective-C.
9357 * c-common.h (objc_finish_foreach_loop): New.
9358 * stub-objc.c (objc_finish_foreach_loop): New.
9359
9360 2010-10-05 Joseph Myers <joseph@codesourcery.com>
9361
9362 * c-common.h (struct diagnostic_context): Don't declare here.
9363 (c_common_initialize_diagnostics): Declare using
9364 diagnostic_context typedef.
9365 * c-opts.c (c_common_handle_option): Pass global_dc to
9366 handle_generated_option.
9367
9368 2010-10-04 Joseph Myers <joseph@codesourcery.com>
9369
9370 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9371 handle_generated_option.
9372
9373 2010-10-03 Ian Lance Taylor <iant@google.com>
9374
9375 * c.opt (-fplan9-extensions): New option.
9376
9377 2010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9378
9379 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9380 Remove.
9381 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9382 of duplicating code.
9383
9384 2010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9385
9386 * c-common.c: Add two new entries for @optional
9387 and @required keywords.
9388
9389 merge from FSF 'apple/trunk' branch.
9390 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
9391
9392 Radar 4386773
9393 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9394 objective-c keywords.
9395 (objc_set_method_opt): New declaration.
9396 * stub-objc.c (objc_set_method_opt): New stub.
9397
9398 2010-09-30 Joseph Myers <joseph@codesourcery.com>
9399
9400 * c-common.c (handle_optimize_attribute): Pass &global_options to
9401 cl_optimization_save and cl_optimization_restore.
9402 * c-opts.c (c_common_handle_option): Pass &global_options to
9403 handle_generated_option.
9404 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9405 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9406 &global_options to cl_optimization_restore.
9407
9408 2010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9409
9410 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9411 Objective-C/Objective-C++ keywords.
9412
9413 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9414
9415 Merge from 'apple/trunk' branch on FSF servers.
9416
9417 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
9418
9419 Radar 4281748
9420 * c-common.h (objc_check_global_decl): New declaration.
9421 * stub-objc.c (objc_check_global_decl): New stub.
9422
9423 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9424
9425 * c.opt: Don't use VarExists.
9426
9427 2010-09-29 Joseph Myers <joseph@codesourcery.com>
9428
9429 * c-common.c (c_cpp_error): Update names of diagnostic_context
9430 members.
9431 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9432 cl_optimization members.
9433 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9434 sanitize_cpp_opts, finish_options): Update names of cpp_options
9435 members.
9436
9437 2010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9438
9439 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9440 (objc_is_reserved_word): Removed.
9441 * c-common.c: Updated comments.
9442 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9443 objc_is_reserved_word.
9444 * stub-objc.c (objc_is_reserved_word): Removed.
9445
9446 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9447
9448 * c-common.h (objc_add_method_declaration): Adjust prototype to
9449 include attributes.
9450 (objc_start_method_definition): Likewise.
9451 (objc_build_keyword_decl): Likewise.
9452 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9453 (objc_start_method_definition): Likewise.
9454 (objc_build_keyword_decl): Likewise.
9455
9456 2010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9457
9458 * c-common.h (objc_start_class_interface): Adjust prototype.
9459 (objc_start_category_interface): Likewise.
9460 (objc_start_protocol): Likewise.
9461 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9462 (objc_start_class_interface): Likewise.
9463 (objc_start_category_interface): Likewise.
9464
9465 2010-09-27 Ian Lance Taylor <iant@google.com>
9466
9467 * c-common.c (c_common_attribute_table): Add no_split_stack.
9468 (handle_no_split_stack_attribute): New static function.
9469
9470 2010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9471
9472 Merge from 'apple/trunk' branch on FSF servers.
9473
9474 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
9475
9476 Radar 4229905
9477 * c-common.h (objc_have_common_type): New declaration.
9478 * stub-objc.c (objc_have_common_type): New stub.
9479
9480 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9481
9482 Radar 4154928
9483 * c-common.h (objc_common_type): New prototype.
9484 * stub-objc.c (objc_common_type): New stub.
9485
9486 2010-09-24 Jan Hubicka <jh@suse.cz>
9487
9488 * c-common.c (handle_leaf_attribute): New function.
9489 (struct attribute_spec c_common_att): Add leaf.
9490
9491 2010-09-22 Joseph Myers <joseph@codesourcery.com>
9492
9493 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9494 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9495 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9496 -include-barrier, -include-directory, -include-directory=,
9497 -include-directory-after, -include-directory-after=,
9498 -include-prefix, -include-prefix=, -include-with-prefix,
9499 -include-with-prefix=, -include-with-prefix-after,
9500 -include-with-prefix-after=, -include-with-prefix-before,
9501 -include-with-prefix-before=, -no-integrated-cpp,
9502 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9503 -output=, -pedantic, -pedantic-errors, -preprocess,
9504 -print-missing-file-dependencies, -trace-includes, -traditional,
9505 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9506 -user-dependencies, -verbose, -write-dependencies,
9507 -write-user-dependencies, no-integrated-cpp, traditional): New.
9508
9509 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9510
9511 PR objc/23710
9512 * c-common.h (objc_start_method_definition): Return bool instead
9513 of void.
9514 * stub-objc.c (objc_start_method_definition): Return bool instead
9515 of void.
9516
9517 2010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9518
9519 PR objc/25965
9520 * c-common.h (objc_get_interface_ivars): New declaration.
9521 * stub-objc.c (objc_get_interface_ivars): New stub.
9522
9523 2010-09-15 Ian Lance Taylor <iant@google.com>
9524
9525 * c-common.c (parse_optimize_options): Do not capitalize warning
9526 messages. Remove period at end of warning message.
9527
9528 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9529
9530 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9531 (handle_alias_attribute): ... here.
9532 (handle_ifunc_attribute): New.
9533
9534 2010-09-06 Mark Mitchell <mark@codesourcery.com>
9535
9536 * c-common.h (do_warn_double_promotion): Declare.
9537 * c-common.c (do_warn_double_promotion): Define.
9538
9539 2010-09-05 Mark Mitchell <mark@codesourcery.com>
9540
9541 * c.opt (Wdouble-promotion): New.
9542
9543 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9544
9545 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9546 fvtable-thunks, fxref): Mark no longer supported in help text.
9547
9548 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9549
9550 * c.opt (Wimport, fall-virtual, falt-external-templates,
9551 fdefault-inline, fenum-int-equiv, fexternal-templates,
9552 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9553 fname-mangling-version-, fnew-abi, fnonnull-objects,
9554 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9555 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9556 applicable.
9557 (fhandle-exceptions): Mark with Alias and Warn.
9558 * c-opts.c (c_common_handle_option): Don't handle options marked
9559 as ignored.
9560
9561 2010-09-02 Joseph Myers <joseph@codesourcery.com>
9562
9563 * c.opt (Wcomments, Werror-implicit-function-declaration,
9564 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9565 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9566 aliases.
9567 * c-common.c (option_codes): Use OPT_Wcomment instead of
9568 OPT_Wcomments.
9569 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9570 Don't handle options marked as aliases.
9571
9572 2010-08-25 Richard Guenther <rguenther@suse.de>
9573
9574 * c-common.c (c_common_get_alias_set): Remove special
9575 handling for pointers.
9576
9577 2010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9578
9579 * c-common.c: Use FOR_EACH_VEC_ELT.
9580 * c-gimplify.c: Likewise.
9581 * c-pragma.c: Likewise.
9582
9583 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9584
9585 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9586 RejectDriver.
9587 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9588 RejectDriver.
9589 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9590 instead of OPT_MDX and OPT_MMDX.
9591
9592 2010-08-16 Joseph Myers <joseph@codesourcery.com>
9593
9594 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9595
9596 2010-08-12 Joseph Myers <joseph@codesourcery.com>
9597
9598 * c.opt (MD, MMD): Change to MDX and MMDX.
9599 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9600
9601 2010-08-11 Joseph Myers <joseph@codesourcery.com>
9602
9603 * c-opts.c (c_common_handle_option): Call handle_generated_option
9604 instead of handle_option.
9605
9606 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9607
9608 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9609 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9610
9611 2010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9612
9613 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9614 (pending_redefine_extname): Change type to a VEC.
9615 (add_to_renaming_pragma_list): Update for new type of
9616 pending_redefine_extname.
9617 (maybe_apply_renaming_pragma): Likewise.
9618
9619 2010-08-04 Arnaud Charlet <charlet@adacore.com>
9620
9621 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9622 visited.
9623 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9624 decide whether a type has already been declared/seen.
9625 Do not go to the original type.
9626 (dump_nested_types): New parameter forward.
9627 Generate forward declaration if needed and mark type as visited.
9628 (print_ada_declaration): Call dump_nested_types if not already done.
9629 Mark types as visited.
9630
9631 2010-08-03 Joseph Myers <joseph@codesourcery.com>
9632
9633 * c.opt (-print-pch-checksum): Remove option.
9634 * c-opts.c (c_common_handle_option): Don't handle
9635 OPT_print_pch_checksum.
9636
9637 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9638
9639 * c-common.h (c_common_handle_option): Update prototype and return
9640 value type.
9641 * c-opts.c (c_common_handle_option): Update prototype and return
9642 value type. Update calls to handle_option and
9643 enable_warning_as_error.
9644
9645 2010-07-27 Jakub Jelinek <jakub@redhat.com>
9646
9647 PR c/45079
9648 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
9649
9650 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9651
9652 * c-common.h (c_common_missing_argument): Remove.
9653 * c-opts.c (c_common_missing_argument): Remove.
9654 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
9655 idirafter, imacros, include, isysroot, isystem, iquote): Add
9656 MissingArgError.
9657 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
9658
9659 2010-07-27 Joseph Myers <joseph@codesourcery.com>
9660
9661 * c-common.h (c_common_option_lang_mask,
9662 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
9663 New.
9664 (c_common_init_options): Update prototype.
9665 * c-opts.c (c_common_option_lang_mask): New.
9666 (c_common_initialize_diagnostics): Split out of
9667 c_common_init_options.
9668 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
9669 New.
9670 (c_common_init_options): Update prototype. Use decoded options in
9671 search for -lang-asm.
9672
9673 2010-07-15 Nathan Froyd <froydnj@codesourcery.com>
9674
9675 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
9676 * c-format.c: Likewise.
9677
9678 2010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
9679
9680 * c-common.h: Include diagnostic-core.h. Error if already
9681 included.
9682 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
9683
9684 2010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9685
9686 * c-common.c (IN_GCC_FRONTEND): Do not undef.
9687 Do not include expr.h
9688 (vector_mode_valid_p): Move here.
9689
9690 2010-06-21 DJ Delorie <dj@redhat.com>
9691
9692 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
9693 allow these pragmas anywhere.
9694
9695 2010-06-14 Jakub Jelinek <jakub@redhat.com>
9696
9697 PR bootstrap/44509
9698 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
9699 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
9700 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
9701 ggc_strdup instead of xstrdup.
9702
9703 2010-06-10 Jakub Jelinek <jakub@redhat.com>
9704
9705 * c-cppbuiltin.c: Include cpp-id-data.h.
9706 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
9707 (lazy_hex_fp_value): New function.
9708 (builtin_define_with_hex_fp_value): Provide definitions lazily.
9709
9710 2010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9711
9712 * c-gimplify.c: Do not include tree-flow.h
9713
9714 2010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
9715
9716 PR other/44034
9717 * c-common.c: Rename targetm member:
9718 targetm.enum_va_list -> targetm.enum_va_list_p
9719
9720 2010-06-28 Anatoly Sokolov <aesok@post.ru>
9721
9722 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
9723
9724 2010-06-28 Steven Bosscher <steven@gcc.gnu.org>
9725
9726 * c-cppbuiltin.c: Do not include except.h.
9727
9728 2010-06-24 Andi Kleen <ak@linux.intel.com>
9729
9730 * c-common.c (warn_for_omitted_condop): New.
9731 * c-common.h (warn_for_omitted_condop): Add prototype.
9732
9733 2010-06-21 Joseph Myers <joseph@codesourcery.com>
9734
9735 * c.opt (lang-objc): Remove.
9736 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
9737
9738 2010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
9739
9740 * c-opts.c: Include "tm_p.h".
9741
9742 2010-06-20 Joseph Myers <joseph@codesourcery.com>
9743
9744 * c-common.c (parse_optimize_options): Update call to
9745 decode_options.
9746
9747 2010-06-18 Nathan Froyd <froydnj@codesourcery.com>
9748
9749 * c-common.c (record_types_used_by_current_var_decl): Adjust for
9750 new type of types_used_by_cur_var_decl.
9751
9752 2010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
9753
9754 PR bootstrap/44512
9755 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
9756 for C++ standard compliance.
9757
9758 2010-06-16 Jason Merrill <jason@redhat.com>
9759
9760 * c.opt: Add -Wnoexcept.
9761
9762 2010-06-16 Richard Guenther <rguenther@suse.de>
9763
9764 PR c/44555
9765 * c-common.c (c_common_truthvalue_conversion): Remove
9766 premature and wrong optimization concering ADDR_EXPRs.
9767
9768 2010-06-15 Arnaud Charlet <charlet@adacore.com>
9769
9770 * c-ada-spec.c (dump_sloc): Remove column info.
9771 (is_simple_enum): New function.
9772 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
9773 enum types when relevant.
9774
9775 2010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
9776
9777 * c-common.c (conversion_warning): Warn at expression
9778 location.
9779
9780 2010-06-10 Joseph Myers <joseph@codesourcery.com>
9781
9782 * c-opts.c (c_common_handle_option): Don't handle
9783 OPT_fshow_column.
9784
9785 2010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
9786
9787 * c-pragma.c (push_alignment): Use typed GC allocation.
9788 (handle_pragma_push_options): Likewise.
9789
9790 * c-common.c (parse_optimize_options): Likewise.
9791
9792 * c-common.h (struct sorted_fields_type): Add variable_size GTY
9793 option.
9794
9795 2010-06-07 Joseph Myers <joseph@codesourcery.com>
9796
9797 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
9798 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9799 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9800 flag_signed_bitfields, warn_strict_null_sentinel,
9801 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
9802 flag_gen_declaration, flag_no_gnu_keywords,
9803 flag_implement_inlines, flag_implicit_templates,
9804 flag_implicit_inline_templates, flag_optional_diags,
9805 flag_elide_constructors, flag_default_inline, flag_rtti,
9806 flag_conserve_space, flag_access_control, flag_check_new,
9807 flag_new_for_scope, flag_weak, flag_working_directory,
9808 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
9809 flag_enforce_eh_specs, flag_threadsafe_statics,
9810 flag_pretty_templates): Remove.
9811 * c-common.h (flag_preprocess_only, flag_nil_receivers,
9812 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
9813 flag_replace_objc_classes, flag_undef, flag_no_builtin,
9814 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
9815 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
9816 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
9817 flag_no_gnu_keywords, flag_implement_inlines,
9818 flag_implicit_templates, flag_implicit_inline_templates,
9819 flag_optional_diags, flag_elide_constructors, flag_default_inline,
9820 flag_rtti, flag_conserve_space, flag_access_control,
9821 flag_check_new, flag_new_for_scope, flag_weak,
9822 flag_working_directory, flag_use_cxa_atexit,
9823 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
9824 flag_threadsafe_statics, flag_pretty_templates,
9825 warn_strict_null_sentinel): Remove.
9826 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
9827 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
9828 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
9829 fimplicit-inline-templates, fimplicit-templates,
9830 flax-vector-conversions, fms-extensions, fnil-receivers,
9831 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
9832 frtti, fshort-double, fshort-enums, fshort-wchar,
9833 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
9834 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
9835 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
9836 gen-decls, undef): Use Var.
9837 (fdefault-inline, foptional-diags): Document as doing nothing.
9838 * c-opts.c (c_common_handle_option): Remove cases for options now
9839 using Var. Mark ignored options as such.
9840
9841 2010-06-05 Steven Bosscher <steven@gcc.gnu.org>
9842
9843 * c-common.c: Moved to here from parent directory.
9844 * c-common.def: Likewise.
9845 * c-common.h: Likewise.
9846 * c-cppbuiltin.c: Likewise.
9847 * c-dump.c: Likewise.
9848 * c-format.c: Likewise.
9849 * c-format.h : Likewise.
9850 * c-gimplify.c: Likewise.
9851 * c-lex.c: Likewise.
9852 * c-omp.c: Likewise.
9853 * c.opt: Likewise.
9854 * c-opts.c: Likewise.
9855 * c-pch.c: Likewise.
9856 * c-ppoutput.c: Likewise.
9857 * c-pragma.c: Likewise.
9858 * c-pragma.h: Likewise.
9859 * c-pretty-print.c: Likewise.
9860 * c-pretty-print.h: Likewise.
9861 * c-semantics.c: Likewise.
9862 * stub-objc.c: Likewise.
9863
9864 * c-common.c: Include gt-c-family-c-common.h.
9865 * c-pragma.c: Include gt-c-family-c-pragma.h.
9866 \f
9867 Copyright (C) 2010-2019 Free Software Foundation, Inc.
9868
9869 Copying and distribution of this file, with or without modification,
9870 are permitted in any medium without royalty provided the copyright
9871 notice and this notice are preserved.