]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
rs6000: support vector int type rotatert
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
ab574db6
MP
12019-08-05 Marek Polacek <polacek@redhat.com>
2
3 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
4 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
5 default for C++2a, unless -Wno-deprecated.
6 * c.opt (Wcomma-subscript): New warning.
7
554a530f
JJ
82019-07-20 Jakub Jelinek <jakub@redhat.com>
9
10 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
11 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
12 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
13 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
14 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
15 constructs with the loop construct.
16
1a888209
JJ
172019-07-13 Jakub Jelinek <jakub@redhat.com>
18
19 PR c/91149
20 * c-omp.c (c_omp_split_clauses): Fix a pasto in
21 OMP_CLAUSE_REDUCTION_TASK handling.
22
1fdd6f04
JJ
232019-07-12 Jakub Jelinek <jakub@redhat.com>
24
25 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
26 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
27
99b1c316
MS
282019-07-09 Martin Sebor <msebor@redhat.com>
29
30 PR c++/61339
1fdd6f04 31 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
32 and others to class.
33 * c-pretty-print.h: Same.
34
6c1dae73
MS
352019-07-09 Martin Sebor <msebor@redhat.com>
36
37 PR c++/61339
38 * c-format.c (check_argument_type): Change class-key from class to
39 struct and vice versa to match convention and avoid -Wclass-is-pod
40 and -Wstruct-no-pod.
41 * c-pretty-print.h: Same.
42
8ba6ea87
ML
432019-07-03 Martin Liska <mliska@suse.cz>
44
45 * c-common.c (try_to_locate_new_include_insertion_point): Remove
46 dead assignemts.
47
83eb9522
JJ
482019-07-03 Jakub Jelinek <jakub@redhat.com>
49
50 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
51 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
52 with OMP_PARALLEL.
53
1c6ffbab
QZ
542019-07-02 qing zhao <qing.zhao@oracle.com>
55
56 PR preprocessor/90581
57 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
58 * c.opt: Add new option -fmax-include-depth.
59
7ffc7de5
JM
602019-06-26 Jason Merrill <jason@redhat.com>
61
62 PR c++/55442 - memory-hog with highly recursive constexpr.
63 * c.opt (fconstexpr-loop-limit): New.
64
361af3e4
JJ
652019-06-25 Jakub Jelinek <jakub@redhat.com>
66
67 PR sanitizer/90954
68 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
69 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
70
f4af4019
JH
712019-06-24 Jan Hubicka <jh@suse.cz>
72
73 * c-common.c (braced_lists_to_strings): Check that
74 type is array or integer prior checking string flag.
75
da9e9b57
MB
762019-06-21 Matthew Beliveau <mbelivea@redhat.com>
77
78 PR c++/90875 - added -Wswitch-outside-range option
79 * c.opt (Wswitch-outside-range): Added new option.
80 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
81
3f3d6a6f
MP
822019-06-21 Marek Polacek <polacek@redhat.com>
83
84 PR c++/90953 - ICE with -Wmissing-format-attribute.
85 * c-common.c (check_function_arguments_recurse): Use
86 get_attribute_name.
87 (check_missing_format_attribute): Likewise.
88
1bf32c11
MP
892019-06-19 Marek Polacek <polacek@redhat.com>
90
91 PR c++/60364 - noreturn after first decl not diagnosed.
92 * c-attribs.c (handle_noreturn_attribute): No longer static.
93 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
94 Declare.
95 * c-format.c (check_function_format): Use get_attribute_name.
96
a04c0734
MS
972019-06-19 Martin Sebor <msebor@redhat.com>
98
99 PR translation/90156
100 * c-format.c (function_format_info::format_type): Adjust type.
101 (function_format_info::is_raw): New member.
102 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
103 (decode_format_attr): Adjust call to decode_format_type.
104 Avoid a redundant call to convert_format_name_to_system_name.
105 Avoid abbreviating the word "arguments" in a diagnostic.
106 (format_warning_substr): New function.
107 (avoid_dollar_number): Quote dollar sign in a diagnostic.
108 (finish_dollar_format_checking): Same.
109 (check_format_info): Same.
110 (struct baltoks_t): New.
111 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
112 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
113 functions.
114 (check_format_info_main): Call check_plain. Use baltoks_t. Call
115 maybe_diag_unbalanced_tokens.
116 (handle_format_attribute): Spell out the word "arguments" in
117 a diagnostic.
118
d3786ebb
MB
1192019-06-11 Matthew Beliveau <mbelivea@redhat.com>
120
121 PR c++/90449 - add -Winaccessible-base option.
122 * c.opt (Winaccessible-base): New option.
123
bf38f7e9
JJ
1242019-06-10 Jakub Jelinek <jakub@redhat.com>
125
126 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
127 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
128 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
129 combined/composite constructs where it is not allowed. Copy over
130 OMP_CLAUSE_REDUCTION_INSCAN.
131
0ecf545c
MS
1322019-06-05 Martin Sebor <msebor@redhat.com>
133
134 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
135 (handle_alias_ifunc_attribute): Same.
136 (handle_copy_attribute): Same.
137 (handle_weakref_attribute): Same.
138 (handle_nonnull_attribute): Same.
139 * c-warn.c (warn_for_sign_compare): Same.
140 (warn_for_restrict): Same.
141 * c.opt: Same.
142
36b34127
MS
1432019-06-05 Martin Sebor <msebor@redhat.com>
144
145 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
146 * c.opt (-Wformat-diag): Remove a spurious period.
147
357a352f
JJ
1482019-05-29 Jakub Jelinek <jakub@redhat.com>
149
150 PR c/90628
151 * c-common.c (check_builtin_function_arguments)
152 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
153 as last argument.
154
2b8235ea
EB
1552019-05-23 Eric Botcazou <ebotcazou@adacore.com>
156
157 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
158
6d86ddc4
ML
1592019-05-22 Martin Liska <mliska@suse.cz>
160
161 PR lto/90500
162 * c-attribs.c (handle_copy_attribute): Do not copy
163 target_clones attribute.
164
419ba5b9
EB
1652019-05-21 Eric Botcazou <ebotcazou@adacore.com>
166
167 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
168 * c-ada-spec.c (print_assignment_operator): New function.
169 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
170 assignment operators declared as methods and filter out the others.
171
e03436e7
TS
1722019-05-17 Thomas Schwinge <thomas@codesourcery.com>
173
174 PR c/89433
175 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
176 "omp declare target".
177
a9c697b8
MS
1782019-05-16 Martin Sebor <msebor@redhat.com>
179
180 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
181 keywords, operators, and types in diagnostics.
182 (handle_scalar_storage_order_attribute): Same.
183 (handle_mode_attribute): Same.
184 (handle_visibility_attribute): Same.
185 (handle_assume_aligned_attribute): Same.
186 (handle_no_split_stack_attribute): Same.
187 * c-common.c (shorten_compare): Same.
188 (c_common_truthvalue_conversion): Same.
189 (cb_get_source_date_epoch): Same.
190 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
191 in diagnostics.
192 (interpret_float): Same.
193 * c-omp.c (c_finish_omp_for): Same.
194 * c-opts.c (c_common_post_options): Same.
195 * c-pch.c (c_common_pch_pragma): Same.
196 * c-pragma.c (pop_alignment): Same.
197 (handle_pragma_pack): Same.
198 (apply_pragma_weak): Same.
199 (handle_pragma_weak): Same.
200 (handle_pragma_scalar_storage_order): Same.
201 (handle_pragma_redefine_extname): Same.
202 (add_to_renaming_pragma_list): Same.
203 (maybe_apply_renaming_pragma): Same.
204 (push_visibility): Same.
205 (handle_pragma_visibility): Same.
206 (handle_pragma_optimize): Same.
207 (handle_pragma_message): Same.
208 * c-warn.c (warn_for_omitted_condop): Same.
209 (lvalue_error): Same.
210
6b943512
RB
2112019-05-15 Richard Biener <rguenther@suse.de>
212
213 PR c/90474
214 * c-common.c (c_common_mark_addressable_vec): Also mark
215 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
216 c_mark_addressable.
217
b744fc85
NS
2182019-05-06 Nathan Sidwell <nathan@acm.org>
219
220 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
221
598f50d7
NS
2222019-04-30 Nathan Sidwell <nathan@acm.org>
223
224 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
225
5bcc5a3b
ML
2262019-04-30 Martin Liska <mliska@suse.cz>
227
228 * c-pragma.c (handle_pragma_diagnostic): Provide hints
229 for unknown options.
230
e78a87f7
RS
2312019-04-26 Richard Sandiford <richard.sandiford@arm.com>
232
233 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
234 the pointer target rather than the pointer itself.
235
c280b7ee
JJ
2362019-04-19 Jakub Jelinek <jakub@redhat.com>
237
238 PR c/89888
239 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
240 arguments.
241 (c_do_switch_warnings): Remove outside_range_p argument.
242 * c-common.c (check_case_bounds): Removed.
243 (c_add_case_label): Remove orig_type and outside_range_p arguments.
244 Don't call check_case_bounds. Fold low_value as well as high_value.
245 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
246 Check for case labels outside of range of original type here and
247 adjust them.
248
8e8225e6
JJ
2492019-04-12 Jakub Jelinek <jakub@redhat.com>
250
63b8a166
JJ
251 PR translation/90041
252 * c.opt (-fhandle-exceptions): Use %< and %> around option names
253 in the Warn diagnostics.
254
8e8225e6
JJ
255 PR c/89946
256 * c-attribs.c (handle_patchable_function_entry_attribute): Add
257 function comment. Warn if arguments of the attribute are not positive
258 integer constants.
259
53a3f614
EB
2602019-04-09 Eric Botcazou <ebotcazou@adacore.com>
261
262 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
263 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
264
22be5873
EB
2652019-04-07 Eric Botcazou <ebotcazou@adacore.com>
266
267 * c-ada-spec.c (is_float128): New predicate extracted from...
268 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
269 <REAL_TYPE>: ...here. Call it.
270
34facf20
DM
2712019-04-05 David Malcolm <dmalcolm@redhat.com>
272
273 PR c/89985
274 * c-warn.c (check_address_or_pointer_of_packed_member): Add
275 auto_diagnostic_group. Guard inform calls by result of
276 warning_at call.
277
05564120
MP
2782019-04-05 Marek Polacek <polacek@redhat.com>
279
280 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
281 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
282 of RHS.
283
7a506c3c
JM
2842019-04-03 Jason Merrill <jason@redhat.com>
285
286 PR c++/86586 - -fcompare-debug=-Wsign-compare.
287 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
288
ddeae8c8
MS
2892019-04-01 Martin Sebor <msebor@redhat.com>
290
291 PR c/89685
292 * c-attribs.c (handle_copy_attribute): Handle references and
293 non-constant expressions.
294
a15ffa22
JJ
2952019-03-22 Jakub Jelinek <jakub@redhat.com>
296
297 PR c++/87481
298 * c.opt (-fconstexpr-ops-limit=): New option.
299
36a3a7a3
JJ
3002019-03-21 Jakub Jelinek <jakub@redhat.com>
301
302 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
303 template param.
304
bec1da64
MS
3052019-03-19 Martin Sebor <msebor@redhat.com>
306
307 PR tree-optimization/89688
308 * c-common.c (braced_list_to_string): Make static.
309 (braced_lists_to_strings): Define new function.
310 * c-common.h (braced_list_to_string): Remove.
311 (braced_lists_to_strings): Declare.
312
1fe61adf
ML
3132019-03-12 Martin Liska <mliska@suse.cz>
314
315 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
316
93964ebd
ML
3172019-03-11 Martin Liska <mliska@suse.cz>
318
319 * c-opts.c (c_common_post_options): Wrap apostrophes
320 in gcc internal format with %'.
321
a3f9f006
ML
3222019-03-11 Martin Liska <mliska@suse.cz>
323
324 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
325 in a string format message and fix GNU coding style.
326 * c-common.c (vector_types_convertible_p): Likewise.
327 (c_build_vec_perm_expr): Likewise.
328 * c-indentation.c (get_visual_column): Likewise.
329 * c-opts.c (c_common_handle_option): Likewise.
330 (c_common_post_options): Likewise.
331 (sanitize_cpp_opts): Likewise.
332 * c-pch.c (c_common_pch_pragma): Likewise.
333 * c-pragma.c (handle_pragma_pack): Likewise.
334
1db01ff9
JJ
3352019-03-08 Jakub Jelinek <jakub@redhat.com>
336
337 PR tree-optimization/89550
338 * c-common.c (c_common_truthvalue_conversion): Only set
339 TREE_NO_WARNING if warning_at returned true.
340 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
341
ba790e6f
JJ
3422019-02-25 Sandra Loosemore <sandra@codesourcery.com>
343 Martin Sebor <msebor@gmail.com>
344
345 * c.opt (Wmissing-attributes): Clean up doc string.
346
7da73ba7
JJ
3472019-02-25 Jakub Jelinek <jakub@redhat.com>
348
349 PR c/89495
350 * c-format.c (maybe_read_dollar_number): Compute nargnum in
351 HOST_WIDE_INT type to avoid overflows and change overflow_flag
352 checking.
353
921bb9d1
RB
3542019-02-22 Richard Biener <rguenther@suse.de>
355
356 * c-pch.c (no_checksum): Remove.
357 (pch_init): Remove assertion that executable_checksum is not
358 all zero.
359 (c_common_valid_pch): Likewise.
360
e2ebb05c
MS
3612019-02-18 Martin Sebor <msebor@redhat.com>
362
363 PR middle-end/89294
364 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
365
3fe53000
DM
3662019-02-16 David Malcolm <dmalcolm@redhat.com>
367
368 PR c++/88680
369 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
370 implementing -Wtype-limits.
371
28a8cef1
MS
3722019-02-11 Martin Sebor <msebor@redhat.com>
373
374 PR c++/87996
375 * c-common.c (invalid_array_size_error): New function.
376 (valid_array_size_p): Call it. Handle size as well as type.
377 * c-common.h (valid_constant_size_p): New function.
378 (enum cst_size_error): New type.
379
ec2be203
DM
3802019-01-31 David Malcolm <dmalcolm@redhat.com>
381
382 PR c/89122
383 * known-headers.cc (get_stdlib_header_for_name): Add
384 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
385
8936f047
JJ
3862019-01-31 Jakub Jelinek <jakub@redhat.com>
387
388 PR libstdc++/88170
389 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
390 a C cast in pp_c_flag_gnu_v3 mode.
391
6a335b96
JJ
3922019-01-29 Jakub Jelinek <jakub@redhat.com>
393
394 PR c/86125
395 * c-common.c (c_common_nodes_and_builtins): Build type variants for
396 builtin_structptr_types types even for C.
397
2a06eba5
BE
3982019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
399
400 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
401 when rhs is of array type correctly. Fix handling of nested structures.
402 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
403 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
404 type casts within nested compound expressions.
405
18a23298
JJ
4062019-01-22 Jakub Jelinek <jakub@redhat.com>
407
408 PR middle-end/88968
409 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
410 variable after using BIT_FIELD_REF.
411
420183d9
L
4122019-01-18 H.J. Lu <hongjiu.lu@intel.com>
413
414 PR c/51628
415 PR c/88664
416 * c-common.h (warn_for_address_or_pointer_of_packed_member):
417 Remove the boolean argument.
418 * c-warn.c (check_address_of_packed_member): Renamed to ...
419 (check_address_or_pointer_of_packed_member): This. Also
420 warn pointer conversion.
421 (check_and_warn_address_of_packed_member): Renamed to ...
422 (check_and_warn_address_or_pointer_of_packed_member): This.
423 Also warn pointer conversion.
424 (warn_for_address_or_pointer_of_packed_member): Remove the
425 boolean argument. Don't check pointer conversion here.
426
99063eee
RS
4272019-01-15 Richard Sandiford <richard.sandiford@arm.com>
428
429 PR inline-asm/52813
430 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
431
a30d0196
JJ
4322019-01-14 Jakub Jelinek <jakub@redhat.com>
433
434 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
435 and __cpp_nontype_template_parameter_auto. Add a comment that
436 __cpp_template_auto is deprecated.
437
2d91f79d
TH
4382019-01-14 Tom Honermann <tom@honermann.net>
439
440 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
441 * c-common.c (c_common_reswords): Add char8_t.
442 (fix_string_type): Use char8_t for the type of u8 string literals.
443 (c_common_get_alias_set): char8_t doesn't alias.
444 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
445 C++.
446 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
447 (keyword_begins_type_specifier): Add RID_CHAR8.
448 * c-common.h (rid): Add RID_CHAR8.
449 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
450 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
451 Define char8_type_node and char8_array_type_node.
452 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
453 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
454 (c_cpp_builtins): Predefine __cpp_char8_t.
455 * c-lex.c (lex_string): Use char8_array_type_node as the type of
456 CPP_UTF8STRING.
457 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
458 * c-opts.c: If not otherwise specified, enable -fchar8_t when
459 targeting C++2a.
460 * c.opt: Add the -fchar8_t command line option.
461
23db6ced
MS
4622019-01-14 Martin Sebor <msebor@redhat.com>
463
464 PR target/88638
465 * c-attribs.c (positional_argument): Call valid_format_string_type_p
466 and issue errors if it fails.
467 * c-common.h (valid_format_string_type_p): Declare.
468 * c-format.c (valid_stringptr_type_p): Rename...
469 (valid_format_string_type_p): ...to this and make extern.
470 (handle_format_arg_attribute): Adjust to new name.
471 (check_format_string): Same.
472
234c3818
L
4732019-01-13 H.J. Lu <hongjiu.lu@intel.com>
474
475 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
476 Replace "may may" with "may" in warning message.
477
d8fcab68
JJ
4782019-01-07 Jakub Jelinek <jakub@redhat.com>
479
480 PR c++/85052
481 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
482 (c_build_vec_convert): Declare.
483 * c-common.c (c_build_vec_convert): New function.
484
29d24852
MS
4852019-01-04 Martin Sebor <msebor@redhat.com>
486
487 PR c/88546
488 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
489 Handle C++ empty throw specification and C11 _Noreturn.
490 (has_attribute): Also handle C11 _Noreturn.
491
9069a4c9
MS
4922019-01-04 Martin Sebor <msebor@redhat.com>
493
494 PR c/88363
495 * c-attribs.c (positional_argument): Also accept enumerated types.
496
a5544970
JJ
4972019-01-01 Jakub Jelinek <jakub@redhat.com>
498
499 Update copyright years.
500
da77eace
L
5012018-12-20 H.J. Lu <hongjiu.lu@intel.com>
502
503 PR c/51628
504 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
505 * c-warn.c (check_alignment_of_packed_member): New function.
506 (check_address_of_packed_member): Likewise.
507 (check_and_warn_address_of_packed_member): Likewise.
508 (warn_for_address_or_pointer_of_packed_member): Likewise.
509 * c.opt: Add -Wno-address-of-packed-member.
510
573767d4
DM
5112018-12-20 David Malcolm <dmalcolm@redhat.com>
512
513 PR c++/87504
514 * c-warn.c (get_outermost_macro_expansion): New function.
515 (spelled_the_same_p): Use it to unwind the macro expansions, and
516 compare the outermost macro in each nested expansion, rather than
517 the innermost.
518
a14feb3c
DM
5192018-12-19 David Malcolm <dmalcolm@redhat.com>
520
521 PR c++/87504
522 * c-common.h (warn_tautological_cmp): Convert 1st param from
523 location_t to const op_location_t &.
524 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
525 when testing for INTEGER_CST.
526 (warn_tautological_bitwise_comparison): Convert 1st param from
527 location_t to const op_location_t &; use it to build a
528 binary_op_rich_location, and use this.
529 (spelled_the_same_p): New function.
530 (warn_tautological_cmp): Convert 1st param from location_t to
531 const op_location_t &. Warn for macro expansions if
532 spelled_the_same_p. Use binary_op_rich_location.
533
dfd7fdca
DM
5342018-12-19 David Malcolm <dmalcolm@redhat.com>
535
536 PR c++/43064
537 PR c++/43486
538 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
539 (verify_tree): Handle location wrappers.
540 (c_common_truthvalue_conversion): Strip any location wrapper.
541 Handle CONST_DECL.
542 (fold_offsetof): Strip any location wrapper.
543 (complete_array_type): Likewise for initial_value.
544 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
545 index before checking for INTEGER_CST.
546 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
547 print parentheses around location wrappers.
548 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
549 before checking for INTEGER_CST.
550 (warn_tautological_bitwise_comparison): Call
551 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
552 before checking for INTEGER_CST.
553 (readonly_error): Strip any location wrapper.
554 (warn_array_subscript_with_type_char): Strip location wrappers
555 before checking for INTEGER_CST. Use the location of the index if
556 available.
557
5c8b3702
JM
5582018-12-06 Jason Merrill <jason@redhat.com>
559
560 PR c++/88136 - -Wdeprecated-copy false positives
561 * c.opt (Wdeprecated-copy-dtor): New.
562 (Wdeprecated-copy): Move to -Wextra.
563
673670da
MS
5642018-11-29 Martin Sebor <msebor@redhat.com>
565
566 PR c/88172
567 PR testsuite/88208
568 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
569 alignments to values less than the target requires.
570 (has_attribute): For attribute aligned consider both the attribute
571 and the alignment bits.
572 * c-common.c (c_init_attributes): Optionally issue a warning for
573 zero alignment.
574
04864ec8
MS
5752018-11-28 Martin Sebor <msebor@redhat.com>
576
577 PR c/88065
578 PR c/87297
579 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
580 or destination is an error.
581
ace83db0
JJ
5822018-11-28 Jakub Jelinek <jakub@redhat.com>
583
584 PR c++/88215
585 * c-ubsan.c: Include langhooks.h.
586 (ubsan_instrument_division): Change gcc_assert that main variants
587 of op0 and op1 types are equal to gcc_checking_assert that the
588 main variants are compatible types.
589
da193a27
EB
5902018-11-27 Eric Botcazou <ebotcazou@adacore.com>
591
592 * c-ada-spec.c: Include stringpool.h.
593 (has_static_fields): Return false for incomplete types.
594 (is_tagged_type): Likewise.
595 (has_nontrivial_methods): Likewise.
596 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
597 (struct overloaded_name_hash): New structure.
598 (struct overloaded_name_hasher): Likewise.
599 (overloaded_names): New global variable.
600 (init_overloaded_names): New static function.
601 (overloaded_name_p): New predicate.
602 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
603 on the TYPE_STUB_DECL of the original type of a typedef, if any.
604 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
605 Remove always-true condition and dump forward types.
606 (dump_ada_specs): Delete overloaded_names.
607
98f08eb8
MS
6082018-11-20 Martin Sebor <msebor@redhat.com>
609
610 * c-attribs.c (type_for_vector_size): New function.
611 (type_valid_for_vector_size): Same.
612 (handle_vector_size_attribute): Move code to the functions above
613 and call them.
614 (validate_attribute, has_attribute): New functions.
615 * c-common.h (has_attribute): Declare.
616 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
617 * c-common.c (c_common_resword): Same.
618
2674fa47
JM
6192018-11-16 Jason Merrill <jason@redhat.com>
620
621 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
622 * c-attribs.c (attr_cold_hot_exclusions): Make public.
623
258b3854
JJ
6242018-11-16 Jakub Jelinek <jakub@redhat.com>
625
626 PR middle-end/87854
627 * c-common.c (fix_string_type): Reject string literals larger than
628 TYPE_MAX_VALUE (ssizetype) bytes.
629
1d249509
MS
6302018-11-15 Martin Sebor <msebor@redhat.com>
631
632 PR c++/87541
633 PR c++/87542
634 * c-attribs.c (positional_argument): New function.
635 (handle_alloc_size_attribute): Use it and simplify.
636 (handle_alloc_align_attribute): Same.
637 (handle_assume_aligned_attribute): Same.
638 (handle_nonnull_attribute): Same.
639 * c-common.c (check_function_arguments): Pass fntype to
640 check_function_format.
641 * c-common.h (check_function_format): Add an argument.
642 (PosArgFlags, positional_argument): Declare new type and function.
643 * c-format.c (decode_format_attr): Add arguments.
644 (check_format_string, get_constant): Same.
645 (convert_format_name_to_system_name): Adjust.
646
478dd60d
DM
6472018-11-15 David Malcolm <dmalcolm@redhat.com>
648
649 PR other/19165
650 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
651
8cca0163
JJ
6522018-11-14 Jakub Jelinek <jakub@redhat.com>
653
8ee09943
JJ
654 P1236R1 - Signed integers are two's complement
655 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
656 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
657 with in-range second operand well defined for -std=c++2a.
658
8cca0163
JJ
659 PR other/88007
660 * c-common.c (parse_optimize_options): Allocate option string from
661 opts_obstack rather than as GC memory. Move the allocation after
662 warning for invalid option.
663
620e594b
DM
6642018-11-13 David Malcolm <dmalcolm@redhat.com>
665
666 * c-common.c (c_get_substring_location): Update for renaming of
667 get_source_location_for_substring to get_location_within_string.
668 * c-lex.c: Replace "source_location" with "location_t".
669 * c-opts.c: Likewise.
670 * c-ppoutput.c: Likewise.
671
f9731de3
MS
6722018-11-13 Martin Sebor <msebor@redhat.com>
673
674 PR middle-end/81824
675 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
676 (handle_tls_model_attribute): Improve diagnostics.
677
e4bd6d5e
JM
6782018-11-12 Jason Merrill <jason@redhat.com>
679
a6bb6b07
JM
680 * c-cppbuiltin.c (c_cpp_builtins): Define
681 __cpp_impl_destroying_delete.
682
e4bd6d5e
JM
683 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
684 __cpp_conditional_explicit.
685
79a2c428
MS
6862018-11-09 Martin Sebor <msebor@redhat.com>
687
688 PR middle-end/81824
689 * c-attribs.c (handle_copy_attribute): New function.
690
4c7bd361
MS
6912018-11-09 Martin Sebor <msebor@redhat.com>
692
693 PR c/87795
694 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
695
28567c40
JJ
6962018-11-08 Jakub Jelinek <jakub@redhat.com>
697
698 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
699 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
700 enum omp_memory_order MEMORY_ORDER.
701 (c_finish_omp_flush): Add MO argument.
702 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
703 (c_finish_omp_for): Add FINAL_P argument.
704 * c-omp.c: Include memmodel.h.
705 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
706 OMP_TASKGROUP_CLAUSES to it.
707 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
708 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
709 instead of OMP_ATOMIC_SEQ_CST.
710 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
711 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
712 __atomic_thread_fence call with the given value.
713 (check_omp_for_incr_expr): Formatting fixes.
714 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
715 even in OpenMP loops, diagnose if NE_EXPR and incr expression
716 is not constant expression 1 or -1. Transform NE_EXPR loops
717 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
718 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
719 loops too.
720 (c_omp_split_clauses): Add support for combined
721 #pragma omp parallel master and
722 #pragma omp {,parallel }master taskloop{, simd} constructs.
723 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
724 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
725 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
726 (c_omp_predetermined_sharing): Don't return
727 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
728 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
729 PRAGMA_OMP_REQUIRES.
730 * c-pragma.h (enum pragma_kind): Likewise.
731 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
732 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
733
204839e7
DM
7342018-11-08 David Malcolm <dmalcolm@redhat.com>
735
736 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
737
d8010ee4
DM
7382018-11-08 David Malcolm <dmalcolm@redhat.com>
739
740 * c-format.c (local_cgraph_node_ptr_node): New variable.
741 (gcc_dump_printf_char_table): Add entry for %C.
742 (get_pointer_to_named_type): New function, taken from the handling
743 code for "gimple *" from...
744 (init_dynamic_diag_info): ...here. Add handling for
745 "cgraph_node *".
746 * c-format.h (T_CGRAPH_NODE): New.
747
4be5c72c
JM
7482018-10-19 Jason Merrill <jason@redhat.com>
749
750 * c-cppbuiltin.c (c_cpp_builtins): Add
751 __cpp_nontype_template_parameter_class.
752
f3f6029d
NS
7532018-10-31 Nathan Sidwell <nathan@acm.org>
754
ab5324fb
NS
755 * c-opts.c (c_finish_options): Force command line macro
756 location. Refactor to avoid repeating main debug hook.
757 (push_command_line_include): Clarify comment.
758
f3f6029d
NS
759 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
760
91e3ec29
MS
7612018-10-30 Martin Sebor <msebor@redhat.com>
762
763 PR middle-end/87041
764 * c-format.c (check_format_types): Avoid diagnosing null pointer
765 arguments to printf-family of functions.
766
b5ff4f5c
MP
7672018-10-30 Marek Polacek <polacek@redhat.com>
768
769 Implement P0892R2, explicit(bool).
770 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
771
7e2de6df
DM
7722018-10-29 David Malcolm <dmalcolm@redhat.com>
773
774 * name-hint.h (name_hint::take_deferred): New member function.
775
b2bf438c
DM
7762018-10-29 David Malcolm <dmalcolm@redhat.com>
777
778 PR c++/56856
779 * c-common.c (check_function_sentinel): Call fold_for_warn on the
780 argument.
781 (check_function_restrict): Rename param "argarray" to
782 "unfolded_argarray", and make a copy named "argarray", calling
783 fold_for_warn on each argument.
784 (check_function_arguments): Add note about responsibility for
785 folding the arguments.
786
9f936c86
JM
7872018-10-17 Joseph Myers <joseph@codesourcery.com>
788
789 * c-common.c (flag_isoc2x): New variable.
790 * c-common.h (clk_c): Update comment to reference C2X.
791 (flag_isoc99, flag_isoc11): Update comments to reference future
792 standard versions in general.
793 (flag_isoc2x): Declare.
794 * c-opts.c (set_std_c2x): New function.
795 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
796 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
797 flag_isoc2x to 0.
798 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
799
7a8a92c4
JM
8002018-10-17 Joseph Myers <joseph@codesourcery.com>
801
802 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
803 (std=iso9899:2018): Document C17 as published in 2018.
804
4dc003ff
CL
8052018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
806
807 PR c++/87364
808 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
809
79371671
WW
8102018-10-11 Will Wray <wjwray@gmail.com>
811
812 PR c++/87364
813 * c-pretty-print.h (pp_c_type_cast): Prototype.
814 (pp_c_integer_constant): Likewise.
815 * c-pretty-print.c (pp_c_type_cast): No longer static.
816 (pp_c_integer_constant): Likewise.
817 (pp_c_enumeration_constant): Fix loop termination when finding
818 name of constant. No longer returns a value. Call
819 pp_c_integer_constant.
820 (c_pretty_printer::constant): Update for changes to
821 pp_c_enumeration_constant.
822
46c62690
JJ
8232018-10-11 Jakub Jelinek <jakub@redhat.com>
824
825 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
826 for no_unique_address.
827
c24300ba
DM
8282018-10-09 David Malcolm <dmalcolm@redhat.com>
829
830 * c-common.c (c_option_controlling_cpp_error): Rename to...
831 (c_option_controlling_cpp_diagnostic): ...this, and convert
832 "reason" from int to enum.
833 (c_cpp_error): Rename to...
834 (c_cpp_diagnostic): ...this, converting level and reason to enums.
835 * c-common.h (c_cpp_error): Rename to...
836 (c_cpp_diagnostic): ...this, converting level and reason to enums.
837 * c-opts.c (c_common_init_options): Update for renaming.
838
8656dafa
RS
8392018-10-08 Richard Sandiford <richard.sandiford@arm.com>
840
841 PR c/87286
842 * c-common.c (vector_types_compatible_elements_p): Use
843 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
844
8cff0652
VK
8452018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
846
847 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
848 to generate constructor destructor priority warning.
849 * c.opt (-Wprio-ctor-dtor): New option.
850
bedf03a2
JM
8512018-10-01 Jason Merrill <jason@redhat.com>
852
853 * c-lex.c (c_common_has_attribute): Add no_unique_address.
854
6cc430c1
EB
8552018-10-01 Eric Botcazou <ebotcazou@adacore.com>
856
857 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
858 (dump_ada_node): Add const keyword.
859
87677ac7
ML
8602018-09-25 Martin Liska <mliska@suse.cz>
861
862 * c-common.c (c_common_truthvalue_conversion):
863 Remove Pascal from documentation.
864
518196cb
EB
8652018-09-21 Eric Botcazou <ebotcazou@adacore.com>
866
867 * c-ada-spec.c: Include diagnostic.h.
868 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
869
a599af84
MP
8702018-09-19 Marek Polacek <polacek@redhat.com>
871
872 * c.opt (Wclass-conversion): New.
873
9c4a4b3c
DM
8742018-09-17 David Malcolm <dmalcolm@redhat.com>
875
876 * c-format.c (range_label_for_format_type_mismatch::get_text):
877 Update for new param.
878
c896ecfe
DM
8792018-09-17 David Malcolm <dmalcolm@redhat.com>
880
881 * c-format.c (format_warning_at_char): Update for introduction of
882 format_string_diagnostic_t.
883 (format_type_warning): Likewise.
884
80c6d1f4
MJ
8852018-09-17 Martin Jambor <mjambor@suse.cz>
886
887 PR c/63886
888 * c.opt (Wabsolute-value): New.
889
6d900107
BE
8902018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
891
892 * c-common.c (complete_flexible_array_elts): New helper function.
893 * c-common.h (complete_flexible_array_elts): Declare.
894
b5764229
BE
8952018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
896
897 * c-common.c (braced_list_to_string): Remove eval parameter.
898 Add some more checks. Always create zero-terminated STRING_CST.
899 * c-common.h (braced_list_to_string): Adjust prototype.
900
85204e23
DM
9012018-08-27 David Malcolm <dmalcolm@redhat.com>
902
903 PR 87091
904 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
905 to a tri-state.
906 (maybe_suggest_missing_token_insertion): Likewise.
907 (maybe_add_include_fixit): Add param "override_location". If set,
908 and source-printing is enabled, then override the rich_location's
909 primary location with that of the insertion point for the fix-it
910 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
911 * c-common.h (extern void maybe_add_include_fixit): Add bool
912 param.
913 * c-format.c (selftest::test_type_mismatch_range_labels): Update
914 for conversion of show_caret_p to a tri-state.
915 * c-warn.c (warn_for_restrict): Likewise.
916 * known-headers.cc
917 (suggest_missing_header::~suggest_missing_header): Update call to
918 maybe_add_include_fixit to suggest overriding the location, as it
919 is for a note.
920
3d78e008
ML
9212018-08-27 Martin Liska <mliska@suse.cz>
922
923 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
924 fndecl_built_in_p and remove check for FUNCTION_DECL if
925 possible.
3d78e008
ML
926 (check_builtin_function_arguments): Likewise.
927 (reject_gcc_builtin): Likewise.
928 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
929
b5be6d0c
MP
9302018-08-26 Marek Polacek <polacek@redhat.com>
931
932 PR c++/87029, Implement -Wredundant-move.
933 * c.opt (Wredundant-move): New option.
934
79ca9c35
MP
9352018-08-21 Marek Polacek <polacek@redhat.com>
936
937 PR c++/86981, Implement -Wpessimizing-move.
938 * c.opt (Wpessimizing-move): New option.
939
097f82ec
DM
9402018-08-20 David Malcolm <dmalcolm@redhat.com>
941
942 PR other/84889
943 * c-attribs.c (common_handle_aligned_attribute): Add
944 auto_diagnostic_group instance.
945 * c-indentation.c (warn_for_misleading_indentation): Likewise.
946 * c-opts.c (c_common_post_options): Likewise.
947 * c-warn.c (warn_logical_not_parentheses): Likewise.
948 (warn_duplicated_cond_add_or_warn): Likewise.
949 (warn_for_multistatement_macros): Likewise.
950
3fb558b1
NS
9512018-08-20 Nathan Sidwell <nathan@acm.org>
952
953 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
954 access.
955
800c0e98
NS
9562018-08-17 Nathan Sidwell <nathan@acm.org>
957
958 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
959 field.
960 (laxy_hex_fp_value_count): Make unsigned.
961 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
962 manipulate the macro.
963 (builtin_defin_with_hex_fp_value): Adjust callback name, use
964 cpp_define_lazily.
965
6f795a92
DM
9662018-08-17 David Malcolm <dmalcolm@redhat.com>
967
968 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
969 (gcc_dump_printf_length_specs): New.
970 (gcc_dump_printf_flag_pairs): New.
971 (gcc_dump_printf_flag_specs): New.
972 (gcc_dump_printf_char_table): New.
973 (format_types_orig): Add entry for "gcc_dump_printf".
974 (init_dynamic_diag_info): Set up length_char_specs and
975 conversion_specs for gcc_dump_printf_format_type.
976 (handle_format_attribute): Handle gcc_dump_printf_format_type.
977
c5d725c0
NS
9782018-08-17 Nathan Sidwell <nathan@acm.org>
979
10f04917
NS
980 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
981
c5d725c0
NS
982 * c-ada-spec.c: Don't #include "cpp-id-data.h"
983 * c-cppbuiltin.c: Likewise.
984
c0c12356
ML
9852018-08-17 Martin Liska <mliska@suse.cz>
986
987 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
988 Ignore/Deprecated flag. Warning is done automatically for
989 Deprecated flags.
c0c12356 990
10fcc142
DM
9912018-08-16 David Malcolm <dmalcolm@redhat.com>
992
993 PR c++/70693
994 * c-common.c (selftest::c_family_tests): Call
995 selftest::c_indentation_c_tests.
996 * c-common.h (selftest::c_indentation_c_tests): New decl.
997 * c-indentation.c: Include "selftest.h".
998 (next_tab_stop): Add "tab_width" param, rather than accessing
999 cpp_opts.
1000 (get_visual_column): Likewise. Clarify comment. Bulletproof
1001 against reading past the end of the line.
1002 (get_first_nws_vis_column): Add "tab_width" param.
1003 (detect_intervening_unindent): Likewise.
1004 (should_warn_for_misleading_indentation): Read tab width from
1005 cpp_opts and pass around.
1006 (selftest::test_next_tab_stop): New test.
1007 (selftest::assert_get_visual_column_succeeds): New function.
1008 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1009 (selftest::assert_get_visual_column_fails): New function.
1010 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1011 (selftest::test_get_visual_column): New test.
1012 (selftest::c_indentation_c_tests): New function.
1013
3f6677f4
NS
10142018-08-16 Nathan Sidwell <nathan@acm.org>
1015
1016 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1017 (store_ada_macro): Likewise.
1018 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1019 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1020
96e6ae57
DM
10212018-08-15 David Malcolm <dmalcolm@redhat.com>
1022
1023 * c-format.c: Include "selftest-diagnostic.h" and
1024 "gcc-rich-location.h".
1025 (format_warning_at_char): Pass NULL for new label params of
1026 format_warning_va.
1027 (class indirection_suffix): New class.
1028 (class range_label_for_format_type_mismatch): New class.
1029 (format_type_warning): Move logic for generating "*" suffix to
1030 class indirection_suffix. Create "fmt_label" and "param_label"
1031 to show their types, and pass them to the
1032 format_warning_at_substring calls.
1033 (selftest::test_type_mismatch_range_labels): New test.
1034 (selftest::c_format_c_tests): Call it.
1035
23aa9f7c
MS
10362018-08-13 Martin Sebor <msebor@redhat.com>
1037
1038 PR tree-optimization/71625
1039 * c-common.c (braced_list_to_string): New function.
1040 * c-common.h (braced_list_to_string): Declare it.
1041
f10a9135
NS
10422018-08-08 Nathan Sidwell <nathan@acm.org>
1043
1044 * c-common.c (try_to_locate_new_include_inertion_point): Use
1045 linemap_included_from_linemap.
1046 * c-lex.c (fe_file_change): Use linemap_included_from.
1047 * c-ppoutput.c (pp_file_change): Likewise.
1048
8a45b051
MS
10492018-08-01 Martin Sebor <msebor@redhat.com>
1050
1051 PR tree-optimization/86650
1052 * c-family/c-format.c (gcc_tdiag_char_table): Update comment for "%G".
1053 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1054 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1055 * c-format.h (T89_G): Update to be "gimple *" rather than
1056 "gcall *".
1057 (local_gcall_ptr_node): Rename...
1058 (local_gimple_ptr_node): ...to this.
1059
e540ccc0
DM
10602018-07-31 David Malcolm <dmalcolm@redhat.com>
1061
1062 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1063 table entries for gcc_diag_char_table, and the 'Z' entry from
1064 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1065 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1066 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1067 adding missing "Z" for this table. Remove erroneous "G" and "K"
1068 entries.
1069 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1070 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1071 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1072
425fc685
RE
10732018-07-31 Richard Earnshaw <rearnsha@arm.com>
1074
1075 * c-common.c (speculation_safe_resolve_call): New function.
1076 (speculation_safe_resolve_params): New function.
1077 (speculation_safe_resolve_return): New function.
1078 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1079 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1080 __HAVE_SPECULATION_SAFE_VALUE.
1081
181463c2
DM
10822018-07-20 David Malcolm <dmalcolm@redhat.com>
1083
1084 * c-common.c (c_cpp_error): Remove redundant "line_table"
1085 parameter from call to rich_location::set_range.
1086 (maybe_suggest_missing_token_insertion): Likewise.
1087
0d7f9065
MS
10882018-07-20 Martin Sebor <msebor@redhat.com>
1089
1090 PR middle-end/82063
1091 * gcc/c-family/c.opt (-Warray-bounds): Remove redundant -Wall.
1092
00abf86c
MS
10932018-07-20 Martin Sebor <msebor@redhat.com>
1094
1095 PR middle-end/82063
1096 * c-common.h (c_common_handle_option): Change function argument
1097 to HOST_WIDE_INT.
1098 * c-opts.c (c_common_init_options): Same.
1099 (c_common_handle_option): Same. Remove special handling of
1100 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1101 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1102 options to take a HOST_WIDE_INT argument and accept a byte-size
1103 suffix. Initialize.
1104 (-Wvla-larger-than): Same.
1105 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1106 (-Wno-vla-larger-than): Same.
1107
9b452033
JJ
11082018-07-12 Jakub Jelinek <jakub@redhat.com>
1109
1110 * c-attribs.c (c_common_attribute_table): Add
1111 "omp declare target implicit" attribute.
1112
cd0762f3
RB
11132018-07-12 Richard Biener <rguenther@suse.de>
1114
1115 PR c/86453
1116 * c-attribs.c (handle_packed_attribute): Do not build a variant
1117 type with TYPE_PACKED, instead ignore the attribute if we may
1118 not apply to the original type.
1119
0b27c3ed
JJ
11202018-07-10 Jakub Jelinek <jakub@redhat.com>
1121
1122 PR c++/86443
1123 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1124 to contain TREE_LIST for both the original class iterator and the
1125 "last" helper var.
1126
e730a0ef
EB
11272018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1128
1129 * c-ada-spec.c (to_ada_name): Remove index parameter.
1130 (pp_ada_tree_identifier): Likewise.
1131 (dump_ada_macros): Adjust call to to_ada_name.
1132 (struct overloaded_name_hash): Delete.
1133 (struct overloaded_name_hasher): Likewise.
1134 (overloaded_names): Likewise.
1135 (compute_overloading_index): Likewise.
1136 (dump_ada_decl_name): Do not call compute_overloading_index and
1137 adjust calls to pp_ada_tree_identifier.
1138 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1139 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1140 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1141 (dump_ada_enum_type): Remove type and display_convention parameters.
1142 Adjust calls to pp_ada_tree_identifier.
1143 (dump_ada_node): Likewise and for dump_ada_structure.
1144 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1145 and tidy up.
1146 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1147 syntax.
1148 (print_constructor): Adjust call to pp_ada_tree_identifier.
1149 (print_destructor): Likewise.
1150 (dump_ada_declaration): Switch to aspect syntax.
1151 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1152 parameter with nested parameter.
1153 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1154 (dump_ada_specs): Do not delete overloaded_names table.
1155
8de583fc
PB
11562018-07-06 Peter Bergner <bergner@linux.ibm.com>
1157
1158 PR target/86324
e730a0ef 1159 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1160 target hook.
1161
09cff37b
NS
11622018-07-05 Nathan Sidwell <nathan@acm.org>
1163
1164 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1165 NO_IMPLICIT_EXTERN_C.
1166
98086b2b
ML
11672018-06-28 Martin Liska <mliska@suse.cz>
1168
1169 * cppspec.c: Include opt-suggestions.h.
1170
829c6349
CLT
11712018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1172 Thomas Schwinge <thomas@codesourcery.com>
1173 Cesar Philippidis <cesar@codesourcery.com>
1174
1175 * c-pragma.h (enum pragma_omp_clause): Add
1176 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1177 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1178
f41b7612
JJ
11792018-06-20 Jakub Jelinek <jakub@redhat.com>
1180
1181 PR c++/86210
1182 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1183 comment.
1184
4252ccd7
MS
11852018-06-18 Martin Sebor <msebor@redhat.com>
1186
1187 PR middle-end/85602
1188 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1189 nonstring.
1190
e197e64e
KV
11912018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1192
1193 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1194
34a7a230
JM
11952018-06-13 Jason Merrill <jason@redhat.com>
1196
5cef3733
JM
1197 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1198 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1199 handling.
1200
34a7a230
JM
1201 PR c++/86094 - wrong code with defaulted move ctor.
1202 * c-opts.c (c_common_post_options): Bump the current ABI version to
1203 13. Set warn_abi_version and flag_abi_compat_version to the current
1204 version rather than 0. Fix defaulting flag_abi_compat_version from
1205 warn_abi_version.
1206
bb0f14ae
MS
12072018-06-12 Martin Sebor <msebor@redhat.com>
1208
1209 PR c/85931
1210 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1211 sizeof source and destination yields the same value.
1212
3713f2e2
ML
12132018-06-12 Martin Liska <mliska@suse.cz>
1214
1215 * c.opt: Make MPX-related options as Deprecated.
1216
4af78ef8
DM
12172018-06-08 David Malcolm <dmalcolm@redhat.com>
1218
1219 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1220 rather than 0.
1221
31db0fe0
ML
12222018-06-08 Martin Liska <mliska@suse.cz>
1223
1224 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1225 for MPX (macros, related functions, fields in cgraph_node, ...).
1226 (handle_bnd_legacy): Likewise.
1227 (handle_bnd_instrument): Likewise.
1228 * c.opt: Likewise.
1229
fe16acf2
JJ
12302018-06-06 Jakub Jelinek <jakub@redhat.com>
1231
1232 PR c++/86068
1233 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1234 __cpp_transactional_memory to 201500 instead of 210500.
1235
4dbdb49b
JM
12362018-06-06 Jason Merrill <jason@redhat.com>
1237
1238 PR c++/85710 - ICE with -Wmemset-elt-size.
1239 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1240
f8ad043f
JM
12412018-06-01 Jason Merrill <jason@redhat.com>
1242
1243 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1244 201703.
1245
abc24d93
EB
12462018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1247
1248 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1249 declaration for a typedef independently of whether the declaration of
1250 the subtype is generated.
1251
d258f4aa
MS
12522018-05-31 Martin Sebor <msebor@redhat.com>
1253
1254 PR c/82063
1255 * c.opt (-Wno-alloc-size-larger-than): New option.
1256
b67b9225
DP
12572018-04-22 David Pagan <dave.pagan@oracle.com>
1258
1259 PR c/55976
1260 * c-opts.c (c_common_post_options): Set default for warn_return_type
1261 for C++/C++ with ObjC extensions only. For C, makes it possible to
1262 differentiate between default (no option), -Wreturn-type, and
1263 -Wno-return-type.
1264
04eb9c55
JM
12652018-05-29 Jason Merrill <jason@redhat.com>
1266
1267 * c.opt (Winit-list-lifetime): New flag.
1268
b0c31bc6
BE
12692018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1270
1271 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1272 splay_tree_delete_pointers.
1273
44284983
JJ
12742018-05-26 Jakub Jelinek <jakub@redhat.com>
1275
1276 PR bootstrap/85921
1277 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1278 noinline variable to workaround broken kernel headers.
1279
b46b715d
JM
12802018-05-18 Jason Merrill <jason@redhat.com>
1281
1282 * c.opt (Wdeprecated-copy): New flag.
1283
40659769
ML
12842018-05-17 Martin Liska <mliska@suse.cz>
1285
1286 * c-warn.c (overflow_warning): Do not use
1287 space in between 'G_' and '('.
1288
403962ea
JM
12892018-05-09 Jason Merrill <jason@redhat.com>
1290
1291 * c-common.c (valid_array_size_p): Add complain parameter.
1292 * c-common.h: ...which defaults to true.
1293
1c9ee609
JJ
12942018-05-11 Jakub Jelinek <jakub@redhat.com>
1295
1296 PR c/85696
1297 * c-omp.c (c_omp_predetermined_sharing): Return
1298 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1299
19916065
ML
13002018-05-11 Martin Liska <mliska@suse.cz>
1301
92a285c1 1302 PR sanitizer/85556
19916065
ML
1303 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1304 TREE_LIST values.
1305
79e7b1fe
JJ
13062018-05-10 Jakub Jelinek <jakub@redhat.com>
1307
1308 PR c++/85662
1309 * c-common.h (fold_offsetof_1): Removed.
1310 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1311 CTX argument defaulted to ERROR_MARK.
1312 * c-common.c (fold_offsetof_1): Renamed to ...
1313 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1314 argument, convert the pointer constant to TYPE and use size_binop
1315 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1316 a pointer type. Adjust recursive calls.
1317
86c12f76
EB
13182018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1319
1320 PR c++/85400
1321 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1322
ee336e84
NS
13232018-05-07 Nathan Sidwell <nathan@acm.org>
1324
1325 * c.opt (ffor-scope): Remove functionality, issue warning.
1326
6c072e21
NS
13272018-05-03 Nathan Sidwell <nathan@acm.org>
1328
1329 * c.opt (ffriend-injection): Remove functionality, issue warning.
1330
2cc7d3a7
DM
13312018-05-01 David Malcolm <dmalcolm@redhat.com>
1332
1333 PR c/84258
1334 * c-format.c (struct format_check_results): Add field
1335 "number_non_char".
1336 (check_format_info): Initialize it, and warn if encountered.
1337 (check_format_arg): Distinguish between wide char and
1338 everything else when detecting arrays of non-char.
1339
7761dfbe
DM
13402018-04-30 David Malcolm <dmalcolm@redhat.com>
1341
1342 * c-format.c (get_corrected_substring): Update for
1343 location_get_source_line returning a char_span. Use a char_span
1344 when handling the prefix of the correction.
1345 * c-indentation.c (get_visual_column): Update for
1346 location_get_source_line returning a char_span.
1347 (get_first_nws_vis_column): Likewise.
1348
62e98ef1
DM
13492018-03-29 David Malcolm <dmalcolm@redhat.com>
1350
1351 PR c++/84269
1352 * known-headers.cc (get_stdlib_header_for_name): Add various names
1353 from <assert.h>, <string.h>, and <memory.h>; add more names from
1354 <stdio.h>.
1355
a7dea617
JJ
13562018-03-27 Jakub Jelinek <jakub@redhat.com>
1357
1358 PR c++/85061
1359 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1360 get_base_address of the second operand is a VAR_P, rather than the
1361 operand itself, and use gcc_checking_assert instead of gcc_assert.
1362
889a3a30
MP
13632018-03-23 Marek Polacek <polacek@redhat.com>
1364
1365 PR c++/85045
1366 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1367 <case RDIV_EXPR>: Tweak condition.
1368
452154b9
EB
13692018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1370
1371 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1372
63ecb626
JJ
13732018-03-16 Jakub Jelinek <jakub@redhat.com>
1374
ce811fc4
JJ
1375 PR c/84909
1376 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1377 diagnostics.
1378
63ecb626
JJ
1379 PR c/84910
1380 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1381 diagnostics.
1382
a1295eec
RB
13832018-03-16 Richard Biener <rguenther@suse.de>
1384
1385 PR c/84873
1386 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1387 unshare the possibly folded expression.
1388
919674fb
RB
13892018-03-15 Richard Biener <rguenther@suse.de>
1390
1391 PR c/84873
1392 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1393
f99309b2
MS
13942018-03-13 Martin Sebor <msebor@redhat.com>
1395
1396 PR tree-optimization/84725
1397 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1398 with all three narrow character types, including their qualified forms.
1399
e9b9fa4c
MS
14002018-03-12 Martin Sebor <msebor@redhat.com>
1401
1402 PR tree-optimization/83456
1403 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1404 Restore checking of bounded built-in functions.
1405 (check_function_arguments): Also return the result
1406 of warn_for_restrict.
1407 * gcc/c-family/c-common.c (check_function_restrict): Return bool.
1408 * gcc/c-family/c-warn.c (warn_for_restrict): Return bool.
1409
0805d020
MP
14102018-03-02 Marek Polacek <polacek@redhat.com>
1411
1412 PR c++/84171
1413 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1414 is erroneous.
1415
ed2a2f08
TS
14162018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1417
1418 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1419 function".
1420
90abdde0
MP
14212018-03-01 Marek Polacek <polacek@redhat.com>
1422
1423 PR c++/84639
1424 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1425 alignment in computation.
1426
c6db43fa
EB
14272018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1428
1429 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1430 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1431
9e25c7ed
EB
14322018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1433
1434 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1435 (is_char_array): Take a type instead of a declaration.
1436 (dump_ada_array_type): Likewise.
1437 (is_simple_enum): Minor tweak.
1438 (dump_ada_enum_type): New function extracted from...
1439 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1440 <INTEGER_TYPE>: Remove unreachable code.
1441 <RECORD_TYPE>: Likewise. Minor tweaks.
1442 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1443 <ENUMERAL_TYPE>: New case.
1444 <RECORD_TYPE>: Factor out common code.
1445 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1446 Minor tweaks. Deal with enumeral types.
1447 (dump_ada_structure): Minor tweaks.
1448
09de3550
EB
14492018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1450
1451 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1452 address for incomplete structures.
1453 (dump_forward_type): Do not bail out for incomplete structures.
1454 (dump_ada_declaration): Do not special-case incomplete structures
1455 for subtypes. Dump them as null records for types.
1456
095d8d4b
EB
14572018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1458
1459 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1460 (is_char_array): Fix formatting.
1461 (dump_template_types): Likewise.
1462 (dump_generic_ada_node): Rename into...
1463 (dump_ada_node): ...this.
1464 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1465 incomplete structures and not for empty structures. Do not use it
1466 when forward declarations are needed.
1467 (dump_forward_type): New function.
1468 (dump_nested_types): Remove FORWARD parameter. Do not consider
1469 TREE_VISITED and do not generate a forward declaration. Only dump
1470 original nested types for nested declaration.
1471 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1472 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1473 <RECORD_TYPE>: Do not consider TREE_VISITED.
1474 (dump_ada_declaration): Use booleans and fix formatting throughout.
1475 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1476 Call dump_forward_type instead of dump_nested_types for a typedef.
1477 Remove superfluous check and adjust call to dump_nested_types.
1478 <POINTER_TYPE>: Call dump_forward_type and fall through.
1479 (dump_ada_struct_decl): Rename into...
1480 (dump_ada_structure): ...this. Do not special-case empty structures.
1481
d4cfd486
MS
14822018-02-27 Martin Sebor <msebor@redhat.com>
1483
1484 PR c++/83871
1485 * c.opt (-Wmissing-attributes): New option.
1486
b22dbd03
ML
14872018-02-21 Martin Liska <mliska@suse.cz>
1488
1489 * c.opt (Wcatch-value=): Add IntegerRange.
1490
883dfe2a
JM
14912018-02-15 Jason Merrill <jason@redhat.com>
1492
1493 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1494
0444aa9c
NS
14952018-02-09 Nathan Sidwell <nathan@acm.org>
1496
1497 PR c/84293
1498 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1499 arg.
1500 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1501 arg. Adjust.
1502
cea71f0a
MS
15032018-02-09 Martin Sebor <msebor@redhat.com>
1504
1505 PR lto/84212
1506 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1507 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1508 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1509 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1510 (-Wuninitialized): Same.
1511
8c8b7be5
EB
15122018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1513
1514 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1515 keyword for components.
1516
7c30b12a
PC
15172018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1518
1519 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1520
eece7fe5
JK
15212018-02-02 Julia Koval <julia.koval@intel.com>
1522
1523 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1524
7d07a93a
MP
15252018-01-29 Marek Polacek <polacek@redhat.com>
1526
1527 PR c/83966
1528 * c-format.c (check_function_format): Check current_function_decl.
1529
53723269
JJ
15302018-01-27 Jakub Jelinek <jakub@redhat.com>
1531
1532 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1533 argument.
1534 (LAZY_HEX_FP_VALUES_CNT): Define.
1535 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1536 values rather than just 12.
1537 (builtin_define_with_hex_fp_value): Likewise.
1538
7365279f
BK
15392018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1540
92a285c1
ML
1541 PR other/70268
1542 * c.opt (-fmacro-prefix-map): New option.
1543 * c-opts.c (c_common_handle_option): Handle it.
1544 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1545 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1546
bb9869d5
DM
15472018-01-17 David Malcolm <dmalcolm@redhat.com>
1548
1549 PR c++/83814
1550 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1551
68dc87c3
EB
15522018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1553
1554 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1555 Skip 'f' and 'F' characters if it is true.
1556 (store_ada_macro): Minor tweak.
1557 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1558 <CPP_WSTRING>: Likewise.
1559 <CPP_STRING>: Output '&' in the buffer if not the first string.
1560 <CPP_NUMBER>: Adjust calls to dump_number.
1561
9a004410
DM
15622018-01-10 David Malcolm <dmalcolm@redhat.com>
1563
1564 PR c++/43486
1565 * c-common.c: Include "selftest.h".
1566 (get_atomic_generic_size): Perform the test for integral type
1567 before the range test for any integer constant, fixing indentation
1568 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1569 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1570 (selftest::test_fold_for_warn): New function.
1571 (selftest::c_common_c_tests): New function.
1572 (selftest::c_family_tests): Call it, and
1573 selftest::c_pretty_print_c_tests.
1574 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1575 * c-format.c (check_format_arg): Convert VAR_P check to a
1576 fold_for_warn.
1577 * c-pretty-print.c: Include "selftest.h".
1578 (pp_c_cast_expression): Don't print casts for location wrappers.
1579 (selftest::assert_c_pretty_printer_output): New function.
1580 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1581 (selftest::test_location_wrappers): New function.
1582 (selftest::c_pretty_print_c_tests): New function.
1583 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1584
5c0caeb3
RS
15852018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1586 Alan Hayward <alan.hayward@arm.com>
1587 David Sherwood <david.sherwood@arm.com>
1588
1589 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1590
73a699ae
RS
15912018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1592 Alan Hayward <alan.hayward@arm.com>
1593 David Sherwood <david.sherwood@arm.com>
1594
1595 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1596 as polynomial.
1597
928686b1
RS
15982018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1599 Alan Hayward <alan.hayward@arm.com>
1600 David Sherwood <david.sherwood@arm.com>
1601
1602 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1603 (convert_vector_to_array_for_subscript): Handle polynomial
1604 TYPE_VECTOR_SUBPARTS.
1605 (c_common_type_for_mode): Check valid_vector_subparts_p.
1606 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1607 VECTOR_CST_NELTS.
1608
85ec4feb
JJ
16092018-01-03 Jakub Jelinek <jakub@redhat.com>
1610
1611 Update copyright years.
1612
170a8bd6 16132017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1614 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1615
1616 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1617 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1618
18408e96
AO
16192017-12-22 Alexandre Oliva <aoliva@redhat.com>
1620
1621 PR debug/83527
1622 PR debug/83419
1623 * c-semantics.c (only_debug_stmts_after_p): New.
1624 (pop_stmt_list): Clear side effects in debug-only stmt list.
1625 Check for single nondebug stmt followed by debug stmts only.
1626
c12d20d4
AO
16272017-12-21 Alexandre Oliva <aoliva@redhat.com>
1628
1629 PR debug/83419
1630 * c-semantics.c (pop_stmt_list): Propagate side effects from
1631 single nondebug stmt to container list.
1632
01512446
JJ
16332017-12-19 Jakub Jelinek <jakub@redhat.com>
1634
1635 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1636 conditions with typical order conditions.
1637
82cfbd01
MP
16382017-12-18 Marek Polacek <polacek@redhat.com>
1639
1640 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1641 not in effect.
1642
99da11ec
MS
16432017-12-17 Martin Sebor <msebor@redhat.com>
1644
1645 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1646 an error for attribute warn_if_not_aligned.
1647
cc8bea0a
MS
16482017-12-16 Martin Sebor <msebor@redhat.com>
1649
1650 PR tree-optimization/78918
1651 * c-common.c (check_function_restrict): Avoid checking built-ins.
1652 * c.opt (-Wrestrict): Include in -Wall.
1653
4849deb1
JJ
16542017-12-15 Jakub Jelinek <jakub@redhat.com>
1655
1656 * c-attribs.c (c_common_attribute_table,
1657 c_common_format_attribute_table): Swap affects_type_identity
1658 and handler fields, adjust comments.
1659
c65e18d3
BE
16602017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1661
1662 * c.opt (Wcast-function-type): New warning option.
1663 * c-lex.c (get_fileinfo): Avoid warning.
1664 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1665
2004617a
QZ
16662017-12-14 Qing Zhao <qing.zhao@oracle.com>
1667
7365279f 1668 PR middle_end/79538
2004617a
QZ
1669 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1670 Adjust the size of buf1 and buf2, add a new buf to avoid
1671 format-overflow warning.
1672
96a95ac1
AO
16732017-12-12 Alexandre Oliva <aoliva@redhat.com>
1674
1675 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1676 subsequent statement list.
1677
5d9ae53d
MS
16782017-12-07 Martin Sebor <msebor@redhat.com>
1679
1680 PR c/81544
1681 PR c/81566
1682 * c-attribs.c (attr_aligned_exclusions): New array.
1683 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1684 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1685 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1686 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1687 (attr_warn_unused_result_exclusions): Same.
1688 (handle_hot_attribute, handle_cold_attribute): Simplify.
1689 (handle_const_attribute): Warn on function returning void.
1690 (handle_pure_attribute): Same.
1691 (handle_aligned_attribute): Diagnose conflicting attribute
1692 specifications.
1693 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1694
c79144f8
DM
16952017-12-06 David Malcolm <dmalcolm@redhat.com>
1696
1697 PR c/83236
1698 * c-common.c (selftest::c_family_tests): Call
1699 selftest::c_spellcheck_cc_tests.
1700 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1701 * c-spellcheck.cc: Include "selftest.h".
1702 (name_reserved_for_implementation_p): New function.
1703 (should_suggest_as_macro_p): New function.
1704 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1705 should_suggest_as_macro_p and call it.
1706 (selftest::test_name_reserved_for_implementation_p): New function.
1707 (selftest::c_spellcheck_cc_tests): New function.
1708 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1709
613bc14f
DM
17102017-12-06 David Malcolm <dmalcolm@redhat.com>
1711
1712 * c-spellcheck.cc: New file, taken from macro-handling code in
1713 spellcheck-tree.c.
1714 * c-spellcheck.h: New file, taken from macro-handling code in
1715 spellcheck-tree.h.
1716
e76c7157
JJ
17172017-12-01 Jakub Jelinek <jakub@redhat.com>
1718
1719 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1720 attribute.
1721 (handle_simd_attribute): Don't check for "cilk simd function"
1722 attribute. Reindent, formatting changes.
1723
b0da4034
JK
17242017-11-30 Julia Koval <julia.koval@intel.com>
1725
1726 * c-common.h (inv_list): Remove.
1727
058f0b9e
JJ
17282017-11-28 Jakub Jelinek <jakub@redhat.com>
1729
1730 PR sanitizer/81275
1731 * c-common.c (c_switch_covers_all_cases_p_1,
1732 c_switch_covers_all_cases_p): New functions.
1733 * c-common.h (c_switch_covers_all_cases_p): Declare.
1734
5e9d6aa4 17352017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1736 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1737
1738 * array-notation-common.c: Delete.
1739 * c-cilkplus.c: Ditto.
1740 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1741 * c-common.def (ARRAY_NOTATION_REF): Remove.
1742 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1743 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1744 c_validate_cilk_plus_loop, cilkplus_an_parts,
1745 cilk_ignorable_spawn_rhs_op,
1746 cilk_recognize_spawn): Remove.
1747 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1748 * c-omp.c: Remove CILK_SIMD check.
1749 * c-pragma.c: Ditto.
1750 * c-pragma.h: Remove CILK related pragmas.
1751 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1752 ARRAY_NOTATION_REF condition.
1753 (c_pretty_printer::expression): Ditto.
1754 * c.opt (fcilkplus): Remove.
1755 * cilk.c: Delete.
1756
1af4ebf5
MG
17572017-11-21 Marc Glisse <marc.glisse@inria.fr>
1758
1759 * c-pretty-print.c (pp_c_additive_expression,
1760 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1761
d44ed508
JJ
17622017-11-21 Jakub Jelinek <jakub@redhat.com>
1763
7d2f0f9b
JJ
1764 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1765
d44ed508
JJ
1766 PR c++/83059
1767 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1768 instead of tree_to_uhwi, formatting fix.
1769
26edace6
DM
17702017-11-20 David Malcolm <dmalcolm@redhat.com>
1771
1772 PR c/81404
1773 * known-headers.cc: New file, based on material from c/c-decl.c.
1774 (suggest_missing_header): Copied as-is.
1775 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1776 heavily edited to add C++ support. Add some knowledge about
1777 <limits.h>, <stdint.h>, and <wchar.h>.
1778 * known-headers.h: Likewise.
1779
6c7a259b
DM
17802017-11-20 David Malcolm <dmalcolm@redhat.com>
1781
1782 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1783 (lookup_name_fuzzy): Likewise. Convert return type from
1784 const char * to name_hint. Add location_t param.
1785 * name-hint.h: New header.
1786
f9c59f7e
JJ
17872017-11-19 Jakub Jelinek <jakub@redhat.com>
1788
1789 PR c/66618
1790 PR c/69960
1791 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1792
1e39313a
JM
17932017-11-16 Joseph Myers <joseph@codesourcery.com>
1794
1795 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1796 expected publication date of C17.
1797 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1798
3ca0dc60
JM
17992017-11-15 Joseph Myers <joseph@codesourcery.com>
1800
1801 PR c/81156
1802 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1803 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1804
025d57f0
MS
18052017-11-10 Martin Sebor <msebor@redhat.com>
1806
1807 PR c/81117
1808 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1809 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1810 * c.opt (-Wstringop-truncation): New option.
1811
1b6fa695
ML
18122017-11-06 Martin Liska <mliska@suse.cz>
1813
1814 PR middle-end/82404
1815 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1816 FE.
1817 * c.opt: Set default value of warn_return_type.
1818
64a5912c
DM
18192017-10-31 David Malcolm <dmalcolm@redhat.com>
1820
1821 * c-common.c (binary_op_error): Update for renaming of
1822 error_at_rich_loc.
1823 (c_parse_error): Likewise.
1824 * c-warn.c (warn_logical_not_parentheses): Likewise for
1825 renaming of inform_at_rich_loc.
1826 (warn_for_restrict): Likewise for renaming of
1827 warning_at_rich_loc_n.
1828
c76dc9c3
JM
18292017-10-30 Joseph Myers <joseph@codesourcery.com>
1830
1831 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1832 * c-opts.c (set_std_c17): New function.
1833 (c_common_init_options): Use gnu17 as default C version.
1834 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1835
ee5fd23a
MM
18362017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1837
1838 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1839 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1840 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1841 __FP_FAST_FMA<N>X.
1842
d1047465
MP
18432017-10-23 Marek Polacek <polacek@redhat.com>
1844
1845 PR c/82681
1846 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1847
9e878cf1
EB
18482017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1849
1850 * c-common.c (check_builtin_function_arguments): Also check arguments
1851 of __builtin_alloca_with_align_and_max.
1852
89b6abbb
DM
18532017-10-17 David Malcolm <dmalcolm@redhat.com>
1854
1855 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1856 rather than NULL to format_warning_va.
1857 (check_format_types): Likewise when calling format_type_warning.
1858 Remove code to extract source_ranges and source_range * in favor
1859 of just a location_t.
1860 (format_type_warning): Convert source_range * param to a
1861 location_t.
1862
39382c09
JJ
18632017-10-13 Jakub Jelinek <jakub@redhat.com>
1864
1865 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1866 [LR]SHIFT_EXPR.
1867
62e1c678
DM
18682017-10-12 David Malcolm <dmalcolm@redhat.com>
1869
1870 * c-common.c (enum missing_token_insertion_kind): New enum.
1871 (get_missing_token_insertion_kind): New function.
1872 (maybe_suggest_missing_token_insertion): New function.
1873 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1874
b90c9338
NS
18752017-10-11 Nathan Sidwell <nathan@acm.org>
1876
1877 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1878 (c_common_handle_option): Update incpath_kind names.
1879
3a266bcd
ML
18802017-10-11 Martin Liska <mliska@suse.cz>
1881
1882 PR sanitizer/82490
1883 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1884 Wattributes warning.
1885
8e6cdc90
RS
18862017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1887
1888 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1889 operating on trees as wide_ints.
1890 * c-common.c (pointer_int_sum): Likewise.
1891 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1892 * c-warn.c (match_case_to_enum_1): Likewise.
1893 (c_do_switch_warnings): Likewise.
1894 (maybe_warn_shift_overflow): Likewise.
1895
802b38c9
JJ
18962017-10-10 Jakub Jelinek <jakub@redhat.com>
1897
1898 PR c/82437
1899 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1900 instead of wide_int::from.
1901
4e34b338
JJ
19022017-10-06 Jakub Jelinek <jakub@redhat.com>
1903
1904 PR c/82437
1905 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1906 using to_widest use wide_int with the larger of the two precisions.
1907
4bc4b2b4
BE
19082017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1909
1910 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1911 functions.
1912
a1488398
RS
19132017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1914
1915 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1916 when combining the original unconverted comparison operands.
1917
01c9fb68
JJ
19182017-09-29 Jakub Jelinek <jakub@redhat.com>
1919
1920 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1921 attribute.
1922
6e3e8419
EB
19232017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1924
1925 * c-ada-spec.c (to_ada_name): Add index parameter.
1926 (pp_ada_tree_identifier): Likewise.
1927 (dump_ada_macros): Adjust call to to_ada_name.
1928 (struct overloaded_name_hash): New type.
1929 (struct overloaded_name_hasher): Likewise.
1930 (overloaded_names): New hash table.
1931 (compute_overloading_index): New function.
1932 (dump_ada_decl_name): Call it and pass the result to
1933 pp_ada_tree_identifier.
1934 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1935 (dump_ada_function_declaration): Likewise.
1936 (dump_generic_ada_node): Likewise.
1937 (print_constructor): Likewise.
1938 (print_destructor): Likewise.
1939 (dump_ada_specs): Delete overloaded_names table.
1940
79310774
EB
19412017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1942
1943 * c-ada-spec.c (max_ada_macros): Move around.
1944 (store_ada_macro_index): Likewise.
1945 (source_file): Rename into...
1946 (macro_source_file): ...this.
1947 (count_ada_macro): Move around.
1948 (store_ada_macro): Likewise.
1949 (compare_macro): Likewise.
1950 (print_ada_macros): Merge in...
1951 (dump_ada_macros): ...this.
1952 (source_file_base): Rename into...
1953 (current_source_file): ...this.
1954 (print_comment): Move around.
1955 (dump_ada_nodes): Call dump_ada_declaration directly.
1956 (struct with): Change type of limited field to bool.
1957 (append_withs): Change type of limited_access parameter to bool.
1958 (pp_ada_tree_identifie): Likewise.
1959 (dump_ada_decl_nam): Likewise.
1960 (dump_generic_ada_node): Likewise. Do not print the return type.
1961 (to_ada_name): Change type of space_found parameter to bool.
1962 (dump_ada_function_declaration): Return void and change type of
1963 parameters to bool. Also print the return type for a function.
1964 (print_ada_methods): Rename into...
1965 (dump_ada_methods): ...this.
1966 (print_ada_declaration): Rename into ...
1967 (dump_ada_declaration): ...this. Do not print the return type.
1968 (print_ada_struct_decl): Rename into...
1969 (dump_ada_struct_decl): ...this.
1970
7d386d45
JJ
19712017-09-29 Jakub Jelinek <jakub@redhat.com>
1972
1973 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
1974 rather than DECL_INITIAL.
1975 (common_handle_aligned_attribute): Likewise.
1976
9ed32e27
AO
19772017-09-20 Alexandre Oliva <aoliva@redhat.com>
1978
1979 * c.opt (gen-decls): Add RejectNegative.
1980
026a79f7
AS
19812017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
1982 Jakub Jelinek <jakub@redhat.com>
1983
1984 Add support for -std=c++2a.
1985 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
1986 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
1987 * c-opts.c (set_std_cxx2a): New.
1988 (c_common_handle_option): Set options when -std=c++2a is enabled.
1989 (c_common_post_options): Adjust comments.
1990 (set_std_cxx14, set_std_cxx17): Likewise.
1991
4a8ca690
EB
19922017-09-15 Eric Botcazou <ebotcazou@adacore.com>
1993
1994 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
1995 message for non-uniform endianness and issue a warning in C++.
1996
7b936140
JJ
19972017-09-15 Jakub Jelinek <jakub@redhat.com>
1998
1999 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2000 (Wc++17-compat): Change from undocumented alias to option.
2001 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2002 change C++1z to C++17 in description.
2003 (std=c++1z, std=gnu++1z): Change from option to undocumented
2004 deprecated alias.
2005 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2006 Adjust description.
2007 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2008 * c-opts.c (set_std_cxx1z): Rename to ...
2009 (set_std_cxx17): ... this.
2010 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2011 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2012 caller.
7b936140
JJ
2013 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2014 comments.
2015
12263f13
L
20162017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2017
2018 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2019 function alignment if warn_if_not_aligned_p is true.
2020
6836632e
NS
20212017-09-12 Nathan Sidwell <nathan@acm.org>
2022
2023 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2024 resort_sorted_fields): Move to c/c-decl.c.
2025 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2026 (struct sorted_fields_type): Move to c/c-lang.h.
2027
019bf9ad
JW
20282017-09-09 Jonathan Wakely <jwakely@redhat.com>
2029
2030 PR c++/81852
2031 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2032
bc7fe952
MP
20332017-09-04 Marek Polacek <polacek@redhat.com>
2034
2035 PR c/81783
2036 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2037 (warn_tautological_cmp): Call it.
2038
de7c2c6a
BK
20392017-09-01 Boris Kolpackov <boris@codesynthesis.com>
2040
2041 * c-opts.c (c_common_finish): Write dependency information even if
2042 there are errors.
2043
d2e05fcb
JJ
20442017-09-01 Jakub Jelinek <jakub@redhat.com>
2045
2046 PR c/81887
2047 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2048 (omp_pragmas_simd): ... here.
2049 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2050 create new clauses list containing just simd clause.
2051
18e2a8b8
RS
20522017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2053 Alan Hayward <alan.hayward@arm.com>
2054 David Sherwood <david.sherwood@arm.com>
2055
2056 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2057 into scalar_mode_supported_p call.
2058 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2059
16d22000
RS
20602017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2061 Alan Hayward <alan.hayward@arm.com>
2062 David Sherwood <david.sherwood@arm.com>
2063
2064 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2065 for the mode iterator.
2066
b397965c
RS
20672017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2068 Alan Hayward <alan.hayward@arm.com>
2069 David Sherwood <david.sherwood@arm.com>
2070
2071 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2072 * c-common.c (c_build_vec_perm_expr): Likewise.
2073
357b7604
RS
20742017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2075 Alan Hayward <alan.hayward@arm.com>
2076 David Sherwood <david.sherwood@arm.com>
2077
2078 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2079
e05c94ba
RS
20802017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2081 Alan Hayward <alan.hayward@arm.com>
2082 David Sherwood <david.sherwood@arm.com>
2083
2084 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2085 before calling targetm.addr_space.valid_pointer_mode.
2086
5c20c4af
RS
20872017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2088 Alan Hayward <alan.hayward@arm.com>
2089 David Sherwood <david.sherwood@arm.com>
2090
2091 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2092
c94843d2 20932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2094 Alan Hayward <alan.hayward@arm.com>
2095 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2096
2097 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2098 iterators.
2099 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2100
4e10a5a7
RS
21012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2102 Alan Hayward <alan.hayward@arm.com>
2103 David Sherwood <david.sherwood@arm.com>
2104
2105 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2106 case statements.
2107
130fcab0
ML
21082017-08-29 Martin Liska <mliska@suse.cz>
2109
2110 PR other/39851
2111 * c-common.c (parse_optimize_options): Add argument to function
2112 call.
2113 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2114
14e18d71
DM
21152017-08-24 David Malcolm <dmalcolm@redhat.com>
2116
2117 * c-lex.c (interpret_float): Use token location
2118 when building an EXCESS_PRECISION_EXPR.
2119
2f687306
DM
21202017-08-21 David Malcolm <dmalcolm@redhat.com>
2121
2122 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2123 it to check_function_format.
2124 * c-common.h (check_function_arguments): Add vec<location_t> *
2125 param.
2126 (check_function_format): Likewise.
2127 * c-format.c (struct format_check_context): Add field "arglocs".
2128 (check_function_format): Add param "arglocs"; pass it to
2129 check_format_info.
2130 (check_format_info): Add param "arglocs"; use it to initialize
2131 new field of format_ctx.
2132 (check_format_arg): Pass format_ctx->arglocs to new param of
2133 check_format_info_main.
2134 (class argument_parser): New field "arglocs".
2135 (argument_parser::argument_parser): Add "arglocs_" param and use
2136 it to initialize new field.
2137 (argument_parser::check_argument_type): Pass new arglocs field to
2138 check_format_types.
2139 (check_format_info_main): Add param "arglocs", and use it when
2140 constructing arg_parser.
2141 (check_format_types): Add param "arglocs"; use it if non-NULL when
2142 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2143
00aa1fa2
L
21442017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2145
2146 PR c/53037
2147 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2148 (c_common_attribute_table): Add warn_if_not_aligned.
2149 (handle_aligned_attribute): Renamed to ...
2150 (common_handle_aligned_attribute): Remove argument, name, and add
2151 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2152 (handle_aligned_attribute): New.
2153 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2154
27be025d
MS
21552017-08-14 Martin Sebor <msebor@redhat.com>
2156
2157 PR c/81117
2158 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2159 (handle_nonstring_attribute): New function.
2160
da67acb9
MS
21612017-08-14 Martin Sebor <msebor@redhat.com>
2162
2163 PR c/81117
2164 * c-format.h (T89_G): New macro.
2165 * c-format.c (local_gcall_ptr_node): New variable.
2166 (init_dynamic_diag_info): Initialize it.
2167
a8b522b4
ML
21682017-08-11 Martin Liska <mliska@suse.cz>
2169
2170 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2171 TARGET_SUPPORTS_ALIASES.
2172
32129a17
DM
21732017-08-10 David Malcolm <dmalcolm@redhat.com>
2174
2175 * c-common.c (c_parse_error): Add rich_location * param, using it
2176 rather implicitly using input_location.
2177 * c-common.h (c_parse_error): Add rich_location * param.
2178
30af3a2b
MP
21792017-08-09 Marek Polacek <polacek@redhat.com>
2180
2181 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2182 (c_common_truthvalue_conversion): Likewise.
2183 * c-omp.c (c_finish_omp_atomic): Likewise.
2184 * c-common.h (build_binary_op): Update declaration.
2185
314e6352
ML
21862017-08-08 Martin Liska <mliska@suse.cz>
2187
2188 * c-ada-spec.c: Include header files.
2189 * c-ubsan.c: Likewise.
2190 * c-warn.c: Likewise.
2191
56b5041c
JJ
21922017-08-07 Jakub Jelinek <jakub@redhat.com>
2193
2194 PR c/69389
2195 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2196
db440138
EB
21972017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2198
2199 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2200 (print_ada_methods): Likewise.
2201 (print_ada_declaration): Likewise.
2202
577eec56
ML
22032017-08-07 Martin Liska <mliska@suse.cz>
2204
2205 * array-notation-common.c: Add new includes.
2206 * c-format.c( handle_format_attribute): Canonicalize a format
2207 function name.
2208 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2209 attribute.
2210 * c-pretty-print.c: Add new include.
2211
b854df3c
EB
22122017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2213
2214 * c-ada-spec.c (has_static_fields): Look only into variables.
2215 (print_constructor): Add TYPE parameter and use it for the name.
2216 (print_destructor): Likewise.
2217 (print_ada_declaration): Adjust to new constructor/destructor names.
2218 Adjust calls to print_constructor and print_destructor.
2219 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2220 Look only into variables in the final loop.
2221
9f2cb25e
EB
22222017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2223
2224 * c-ada-spec.c (has_static_fields): Look only into fields.
2225 (dump_generic_ada_node): Small tweak.
2226 (dump_nested_types): Look only into fields.
2227 (print_ada_declaration): Look only into methods. Small tweak.
2228 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2229
f4bcd9eb
EB
22302017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2231
2232 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2233 (dump_ada_function_declaration): Likewise.
2234 (dump_generic_ada_node): Likewise.
2235 (print_ada_declaration): Add support for const-qualified variables.
2236
f34ebeb2
ML
22372017-07-31 Martin Liska <mliska@suse.cz>
2238
2239 PR sanitize/81530
2240 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2241 Guard condition with flag_sanitize_p also with current_function_decl
2242 non-null equality.
2243 (ubsan_maybe_instrument_reference_or_call): Likewise.
2244
218e5d04
UB
22452017-07-30 Uros Bizjak <ubizjak@gmail.com>
2246
2247 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2248
942047f2
EB
22492017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2250
2251 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2252 for enumeral types.
2253 (print_ada_declaration): Add missing guard for record types.
2254
a40ff0ae
JJ
22552017-07-27 Jakub Jelinek <jakub@redhat.com>
2256
2257 PR c/45784
2258 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2259 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2260 new COMPOUND_EXPRs around the rhs of the comparison.
2261
06bd22f6
MP
22622017-07-27 Marek Polacek <polacek@redhat.com>
2263
2264 PR c/81417
2265 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2266 the types.
2267
036ea399
JJ
22682017-07-27 Jakub Jelinek <jakub@redhat.com>
2269
2270 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2271 (handle_noipa_attribute): New function.
2272
417ca011
TD
22732017-07-07 Torsten Duwe <duwe@suse.de>
2274
2275 * c-attribs.c (c_common_attribute_table): Add entry for
2276 "patchable_function_entry".
2277
5aaa8fb4
NS
22782017-07-20 Nathan Sidwell <nathan@acm.org>
2279
2280 Remove TYPE_METHODS.
2281 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2282 dump_ada_template, print_ada_methods,
2283 print_ada_declaration): Member fns are on TYPE_FIELDS.
2284
ff22eb12
NS
22852017-07-18 Nathan Sidwell <nathan@acm.org>
2286
2287 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2288
eea77d1f
DM
22892017-07-14 David Malcolm <dmalcolm@redhat.com>
2290
2291 * c-common.c (try_to_locate_new_include_insertion_point): New
2292 function.
2293 (per_file_includes_t): New typedef.
2294 (added_includes_t): New typedef.
2295 (added_includes): New variable.
2296 (maybe_add_include_fixit): New function.
2297 * c-common.h (maybe_add_include_fixit): New decl.
2298
281ac396
MS
22992017-07-10 Martin Sebor <msebor@redhat.com>
2300
2301 PR other/81345
2302 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2303
b6f43128
DM
23042017-07-06 David Malcolm <dmalcolm@redhat.com>
2305
2306 * c-common.c (selftest::c_family_tests): New.
2307 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2308 (selftest::c_family_tests): New decl.
2309
efbf55b0
MP
23102017-07-04 Marek Polacek <polacek@redhat.com>
2311
2312 PR c/81231
2313 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2314 types.
2315
6c86bd88
MP
23162017-07-04 Marek Polacek <polacek@redhat.com>
2317
2318 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2319
17a7218b
ML
23202017-06-28 Martin Liska <mliska@suse.cz>
2321
2322 PR ipa/81128
2323 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2324 to a function declaration.
2325
63010089
ML
23262017-06-28 Martin Liska <mliska@suse.cz>
2327
2328 PR driver/79659
2329 * c.opt: Add IntegerRange to various options.
2330
3e2becc4
MP
23312017-06-26 Marek Polacek <polacek@redhat.com>
2332
2333 PR c/80116
2334 * c-common.h (warn_for_multistatement_macros): Declare.
2335 * c-warn.c: Include "c-family/c-indentation.h".
2336 (warn_for_multistatement_macros): New function.
2337 * c.opt (Wmultistatement-macros): New option.
2338 * c-indentation.c (guard_tinfo_to_string): No longer static.
2339 Change the parameter type to "enum rid". Handle RID_SWITCH.
2340 * c-indentation.h (guard_tinfo_to_string): Declare.
2341
2db9b7cd
MG
23422017-06-23 Marc Glisse <marc.glisse@inria.fr>
2343
2344 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2345
c3684b7b
MS
23462017-06-15 Martin Sebor <msebor@redhat.com>
2347
2348 PR c++/80560
2349 * c.opt (-Wclass-memaccess): New option.
2350
e72c4afd
BK
23512017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2352
2353 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2354
8a516588
MP
23552017-06-13 Marek Polacek <polacek@redhat.com>
2356
2357 PR objc/80949
2358 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2359 branches is null.
2360
45b2222a
ML
23612017-06-13 Martin Liska <mliska@suse.cz>
2362
2363 PR sanitize/78204
2364 * c-attribs.c (add_no_sanitize_value): New function.
2365 (handle_no_sanitize_attribute): Likewise.
2366 (handle_no_sanitize_address_attribute): Use the function.
2367 (handle_no_sanitize_thread_attribute): New function.
2368 (handle_no_address_safety_analysis_attribute): Use
2369 add_no_sanitize_value.
2370 (handle_no_sanitize_undefined_attribute): Likewise.
2371 * c-common.h: Declare new functions.
2372 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2373 (ubsan_instrument_shift): Likewise.
2374 (ubsan_instrument_bounds): Likewise.
2375 (ubsan_maybe_instrument_array_ref): Likewise.
2376 (ubsan_maybe_instrument_reference_or_call): Likewise.
2377
a01f151f
JM
23782017-06-11 Jason Merrill <jason@redhat.com>
2379
2380 * c-ada-spec.c, c-pragma.c: Use id_equal.
2381
3de4ac6d
MP
23822017-06-04 Marek Polacek <polacek@redhat.com>
2383
2384 PR c/80919
2385 * c-format.c (matching_type_p): Return false if any of the types
2386 requires structural equality.
2387
2474f48f
MS
23882017-06-02 Martin Sebor <msebor@redhat.com>
2389
2390 PR c/80892
2391 * c-warn.c (conversion_warning): Use -Wconversion for integer
2392 conversion and -Wfloat-conversion for floating one.
2393
40ffd95f
BE
23942017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2395
2396 * c.opt (Wsizeof-pointer-div): New warning option.
2397
3fa4634c
VR
23982017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2399
2400 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2401 (Wcatch-value=1): Enable by -Wall.
2402
f012c8ef
DM
24032017-05-30 David Malcolm <dmalcolm@redhat.com>
2404
2405 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2406 format_chars.
2407 * c.opt (fdiagnostics-show-template-tree): New option.
2408 (felide-type): New option.
2409
63dbcd13
VR
24102017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2411
2412 * c.opt (Wcatch-value=): New C++ warning flag.
2413
be136b5c
NS
24142017-05-24 Nathan Sidwell <nathan@acm.org>
2415
2416 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2417 const casts to avoid warning.
2418
3cd211af
MS
24192017-05-24 Martin Sebor <msebor@redhat.com>
2420
2421 PR c/80731
2422 * c-common.h (unsafe_conversion_p): Add a function argument.
2423 * c-common.c (unsafe_conversion_p): Same.
2424 Add type names and values to diagnostics.
2425 (scalar_to_vector): Adjust.
2426 * c-warn.c (constant_expression_error): Add a function argument.
2427 Add type names and values to diagnostics.
2428 (conversion_warning): Add a function argument.
2429 Add type names and values to diagnostics.
2430 (warnings_for_convert_and_check): Same.
2431
1ff7be5a
JM
24322017-05-19 Jason Merrill <jason@redhat.com>
2433
2434 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2435 enumerators.
2436
ff502317
BE
24372017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2438
2439 * c-format.c (locus): Move out of function scope,
2440 add GTY attribute.
2441
2a8a8d7b
NS
24422017-05-19 Nathan Sidwell <nathan@acm.org>
2443
2444 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2445 (c_common_parse_file): Remove class dump handling.
2446 (get_dump_info): Likewise.
2447
39aac208
RB
24482017-05-19 Richard Biener <rguenther@suse.de>
2449
2450 PR c++/80593
2451 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2452 to alias-set zero memory.
2453
6ecd2339
BE
24542017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2455
2456 * c-format.c (local_tree_type_node): Add GTY attribute.
2457
6574d78e
MP
24582017-05-18 Marek Polacek <polacek@redhat.com>
2459
2460 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2461 (c_common_fixed_point_type_for_size): Likewise.
2462 (c_common_type_for_mode): Likewise.
2463 (shorten_compare): Likewise.
2464 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2465 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2466
e3455240
MP
24672017-05-18 Marek Polacek <polacek@redhat.com>
2468
2469 * c-common.c (self_promoting_args_p): Change the return type to bool.
2470 Use false/true instead of 0/1.
2471 * c-common.h (self_promoting_args_p): Update.
2472
3fa8871b
MP
24732017-05-17 Marek Polacek <polacek@redhat.com>
2474
2475 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2476 * c-warn.c: Likewise.
2477
b42cc3ca
VV
24782017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2479
2480 Implement new C++ intrinsics __is_assignable and __is_constructible.
2481 * c-common.c (__is_assignable, __is_constructible): New.
2482 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2483
1a817418
ML
24842017-05-17 Martin Liska <mliska@suse.cz>
2485
2486 * c-common.h: Introduce dump_flags_t type and
2487 use it instead of int type.
2488 * c-gimplify.c (c_genericize): Likewise.
2489 * c-opts.c: Likewise.
2490
b2fa0a8b
MP
24912017-05-17 Marek Polacek <polacek@redhat.com>
2492
2493 * c-common.c (c_save_expr): Remove.
2494 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2495 * c-common.h (c_save_expr): Remove declaration.
2496
31c2d57d
VR
24972017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2498
2499 PR c/35441
2500 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2501 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2502 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2503 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2504 RDIV_EXPR.
2505 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2506
684f84de
MP
25072017-05-09 Marek Polacek <polacek@redhat.com>
2508
2509 PR c/80525
2510 * c-warn.c (unwrap_c_maybe_const): New.
2511 (warn_logical_operator): Call it.
2512
641da50a
NS
25132017-05-09 Nathan Sidwell <nathan@acm.org>
2514
2515 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2516 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2517
631238ac
MS
25182017-05-08 Martin Sebor <msebor@redhat.com>
2519
2520 PR translation/80280
2521 * c-format.h (struct format_flag_spec): Add new member.
2522 (T89_T): New macro.
2523 * c-format.c (local_tree_type_node): New global.
2524 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2525 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2526 (strfmon_flag_specs): Likewise.
2527 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2528 with distinct quoting properties.
2529 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2530 (flag_chars_t::validate): Add argument and handle bad quoting.
2531 (check_format_info_main): Handle quoting problems.
2532 (init_dynamic_diag_info): Simplify.
2533
49f0c04c
JM
25342017-05-08 Jason Merrill <jason@redhat.com>
2535
2536 * c-opts.c (c_common_post_options): Update defaults for
2537 flag_abi_version and flag_abi_compat_version.
2538
56d35585
DM
25392017-05-05 David Malcolm <dmalcolm@redhat.com>
2540
2541 * c-common.c (c_cpp_error): Replace report_diagnostic
2542 with diagnostic_report_diagnostic.
2543
0f2c4a8f
MS
25442017-05-04 Martin Sebor <msebor@redhat.com>
2545
2546 PR translation/80280
2547 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2548 (handle_weakref_attribute): Same.
2549
6fe63fb4
NS
25502017-05-03 Nathan Sidwell <nathan@acm.org>
2551
2552 Canonicalize canonical type hashing
2553 * c-common.c (complete_array_type): Use type_hash_canon.
2554
815d9cc6
XR
25552017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2556
92a285c1 2557 PR c++/80038
815d9cc6
XR
2558 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2559 prototype.
2560 (cilk_install_body_pedigree_operations): Likewise.
2561 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2562 detatched.
2563 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2564 (cilk_install_body_pedigree_operations): Likewise.
2565 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2566 unwrapping.
2567
f8a36447
JJ
25682017-04-27 Jakub Jelinek <jakub@redhat.com>
2569
2570 PR c++/80534
2571 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2572 flag on non-aggregate element types.
2573
7c145456
BE
25742017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2575
2576 * c-common.c (c_type_hasher, type_hash_table): Remove.
2577 (c_common_get_alias_set): Remove unreachable code.
2578 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2579
c3cbcd45
VR
25802017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2581
2582 * c.opt (Wextra-semi): New C++ warning flag.
2583
8a59d466
JJ
25842017-04-20 Jakub Jelinek <jakub@redhat.com>
2585
2586 PR middle-end/80423
2587 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2588
8487c9a5
JJ
25892017-04-18 Jakub Jelinek <jakub@redhat.com>
2590
2591 PR middle-end/79788
2592 PR middle-end/80375
2593 * c-common.c (c_common_type_for_mode): Don't handle
2594 widest_*_literal_type_node here.
2595 c_common_signed_or_unsigned_type): Likewise.
2596 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2597 to *intTI_type_node or *intDI_type_node depending on whether
2598 TImode is supported by the target or not.
2599
3ee0fb02
ML
26002017-04-10 Martin Liska <mliska@suse.cz>
2601
2602 PR sanitizer/80350
2603 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2604 doing an UBSAN check.
2605
5764ee3c
JW
26062017-04-03 Jonathan Wakely <jwakely@redhat.com>
2607
2608 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2609
6f3af356
JJ
26102017-03-31 Jakub Jelinek <jakub@redhat.com>
2611
2612 PR c++/79572
2613 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2614 tree *.
2615 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2616 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2617 REFERENCE_TYPE.
2618
f6a7a9d5
DM
26192017-03-31 David Malcolm <dmalcolm@redhat.com>
2620
2621 PR documentation/78732
2622 * c.opt (Wendif-labels): Fix description to refer to
2623 #else rather than #elif.
2624
af88f557
JJ
26252017-03-31 Jakub Jelinek <jakub@redhat.com>
2626
2627 PR libstdc++/80251
2628 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2629 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2630
a9e4a1a5
JJ
26312017-03-27 Jakub Jelinek <jakub@redhat.com>
2632
2633 PR middle-end/80162
2634 * c-common.c (c_common_mark_addressable_vec): Don't set
2635 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2636
3f01b620
MS
26372017-03-21 Martin Sebor <msebor@redhat.com>
2638
2639 PR c++/79548
2640 * c-common.c (set_underlying_type): Mark type used only when
2641 original del is declared unused.
2642
2f6f187a
DM
26432017-03-10 David Malcolm <dmalcolm@redhat.com>
2644
2645 PR translation/79848
2646 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2647 "%qs".
2648
a02fa805
DM
26492017-03-10 David Malcolm <dmalcolm@redhat.com>
2650
2651 PR c/79921
2652 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2653 from inform's message, so that xgettext can locate it.
2654
822a132c
MP
26552017-03-09 Marek Polacek <polacek@redhat.com>
2656
2657 PR c++/79962
2658 PR c++/79984
2659 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2660 conversion to the attribute list.
2661
bba81f1c
ML
26622017-03-09 Martin Liska <mliska@suse.cz>
2663
2664 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2665
108154ff
JM
26662017-03-03 Jason Merrill <jason@redhat.com>
2667
2668 * c.opt (Wnoexcept-type): New.
2669
eb0e7c34
RB
26702017-03-02 Richard Biener <rguenther@suse.de>
2671
2672 PR c/79756
2673 * c-common.c (c_common_mark_addressable_vec): Look through
2674 C_MAYBE_CONST_EXPR.
2675
9453ba0a
ML
26762017-02-28 Martin Liska <mliska@suse.cz>
2677
2678 * c.opt: Replace space with tabular for options of <number>
2679 type.
2680
6a825afe
ML
26812017-02-28 Martin Liska <mliska@suse.cz>
2682
2683 * c.opt: Fix --help=option -Q for options which are of
2684 an enum type.
2685
4227c9ad
JJ
26862017-02-24 Jakub Jelinek <jakub@redhat.com>
2687
2688 PR c++/79588
2689 * c-common.c (check_function_restrict): New function.
2690 (check_function_arguments): Add FNDECL argument. Call
2691 check_function_restrict if -Wrestrict.
2692 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2693 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2694 * c-common.h (check_function_arguments): Add FNDECL argument.
2695 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2696
59909673
EB
26972017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2698
2699 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2700 treatment of parameters with pointer-to-tagged type and tidy up.
2701 (print_ada_methods): Remove the special treatment of C++ static member
2702 functions.
2703
54dcd526
ML
27042017-02-22 Martin Liska <mliska@suse.cz>
2705
2706 * c.opt: Replace inequality signs with square brackets
2707 for -Wnornalized.
2708
00bc9de3
JJ
27092017-02-21 Jakub Jelinek <jakub@redhat.com>
2710
2711 PR c++/79641
2712 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2713 preserve quals.
2714
97fcf744
JM
27152017-02-17 Joseph Myers <joseph@codesourcery.com>
2716
2717 * c-cppbuiltin.c (builtin_define_float_constants): Define
2718 __DECIMAL_DIG__ to the value for long double.
2719
c7545f1c
MP
27202017-02-15 Marek Polacek <polacek@redhat.com>
2721
2722 PR c/79515
2723 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2724 conversion has occured.
2725
c2e84327
DM
27262017-01-24 David Malcolm <dmalcolm@redhat.com>
2727
2728 * c-common.c (c_common_reswords): Add "__RTL".
2729 * c-common.h (enum rid): Add RID_RTL.
2730
2ebd93e1
MP
27312017-01-20 Marek Polacek <polacek@redhat.com>
2732
2733 PR c/64279
2734 * c-common.h (do_warn_duplicated_branches_r): Declare.
2735 * c-gimplify.c (c_genericize): Walk the function tree calling
2736 do_warn_duplicated_branches_r.
2737 * c-warn.c (expr_from_macro_expansion_r): New.
2738 (do_warn_duplicated_branches): New.
2739 (do_warn_duplicated_branches_r): New.
2740 * c.opt (Wduplicated-branches): New option.
2741
0d80ab91
DM
27422017-01-17 David Malcolm <dmalcolm@redhat.com>
2743
2744 PR c++/71497
2745 * c-indentation.c (warn_for_misleading_indentation): Use the past
2746 subjunctive in the note.
2747
7f991c36
AH
27482017-01-17 Aldy Hernandez <aldyh@redhat.com>
2749
2750 PR c/79116
2751 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2752 start type to integer_type.
2753
1c70261c
JJ
27542017-01-16 Jakub Jelinek <jakub@redhat.com>
2755
2756 PR driver/49726
2757 * c.opt (gen-decls): Add Driver flag.
2758
1ddca3f3
PC
27592017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2760
2761 Revert:
2762 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2763
2764 PR c++/71737
2765 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2766
7d2f3f1d
PC
27672017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2768
2769 PR c++/71737
2770 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2771
bce6f760
MS
27722017-01-12 Martin Sebor <msebor@redhat.com>
2773
2774 (-Wformat-overflow): ...to this.
2775
bf5fbf46
MS
27762017-01-11 Martin Sebor <msebor@redhat.com>
2777
2778 PR c/78768
2779 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2780 Also enable for LTO.
2781
e363df3f
JM
27822017-01-10 Jason Merrill <jason@redhat.com>
2783
2784 Implement P0195R2, C++17 variadic using.
2785 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2786
bd2c6270
JJ
27872017-01-09 Jakub Jelinek <jakub@redhat.com>
2788
2789 PR translation/79019
2790 PR translation/79020
2791 * c.opt (Wnormalized=): Fix typo in description.
2792
efcc8d38
MS
27932017-01-08 Martin Sebor <msebor@redhat.com>
2794
2795 PR middle-end/77708
2796 * c.opt (-Wformat-truncation): New option.
2797
435f3f7a
AO
27982017-01-06 Alexandre Oliva <aoliva@redhat.com>
2799
2800 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2801 value to unsigned short to fit in 4 hex digits without
2802 warnings.
2803
4e89adf9
EB
28042017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2805
2806 * c.opt (fsso-struct): Add 'native' value.
2807
cd445b54
ML
28082017-01-05 Martin Liska <mliska@suse.cz>
2809
2810 PR pch/78970
2811 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2812 header.
2813
a9342885
MP
28142017-01-04 Marek Polacek <polacek@redhat.com>
2815
2816 PR c++/64767
2817 * c.opt (Wpointer-compare): New option.
2818
fc73e60c
JJ
28192017-01-04 Jakub Jelinek <jakub@redhat.com>
2820
2821 PR driver/78957
2822 * c.opt (fsso-struct=): Add RejectNegative.
2823
cbe34bb5
JJ
28242017-01-01 Jakub Jelinek <jakub@redhat.com>
2825
2826 Update copyright years.
2827
d4a6c0ea
ML
28282016-12-29 Martin Liska <mliska@suse.cz>
2829
2830 PR c/78933
2831 * c.opt (strong-eval-order): Add RejectNegative keyword.
2832
67a5ad7c
JM
28332016-12-22 Jason Merrill <jason@redhat.com>
2834
2835 Implement P0522R0, matching of template template arguments.
2836 * c-cppbuiltin.c (c_cpp_builtins): Define
2837 __cpp_template_template_args.
2838
0dba7960
JJ
28392016-12-21 Jakub Jelinek <jakub@redhat.com>
2840
2841 PR bootstrap/78817
2842 * c-common.c (struct nonnull_arg_ctx): New type.
2843 (check_function_nonnull): Return bool instead of void. Use
2844 nonnull_arg_ctx as context rather than just location_t.
2845 (check_nonnull_arg): Adjust for the new context type, set
2846 warned_p to true if a warning has been diagnosed.
2847 (check_function_arguments): Return bool instead of void.
2848 * c-common.h (check_function_arguments): Adjust prototype.
2849
31bfc9b9
JM
28502016-12-21 Jason Merrill <jason@redhat.com>
2851
2852 * c.opt (-fnew-ttp-matching): New flag.
2853 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2854
629b3d75
MJ
28552016-12-14 Martin Jambor <mjambor@suse.cz>
2856
2857 * c-omp.c: Include omp-general.h instead of omp-low.h.
2858 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2859 name.
2860
474da67e
MS
28612016-12-14 Martin Sebor <msebor@redhat.com>
2862
2863 PR c/17308
2864 * c-common.c (check_nonnull_arg): Disable when optimization
2865 is enabled.
2866
fe366b87
MP
28672016-12-12 Marek Polacek <polacek@redhat.com>
2868
2869 PR c++/78647
2870 * c-common.c (attribute_fallthrough_p): Return false for
2871 error_mark_node.
2872
8bd9f164
MS
28732016-12-08 Martin Sebor <msebor@redhat.com>
2874
2875 PR c/78284
2876 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2877
060162e0
MS
28782016-12-08 Martin Sebor <msebor@redhat.com>
2879
2880 PR c/78165
92a285c1
ML
2881 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2882 suffix.
060162e0 2883
ee92e7ba
MS
28842016-12-07 Martin Sebor <msebor@redhat.com>
2885
2886 PR c/53562
2887 PR middle-end/77784
2888 PR middle-end/78149
2889 PR middle-end/78138
2890 * c.opt (-Wstringop-overflow): New option.
2891
84b0769e
MO
28922016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2893
2894 * c-attribs.c (asan odr indicator): New attribute.
2895 (handle_asan_odr_indicator_attribute): New function.
2896
7fa6a965
PK
28972016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2898
2899 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2900 ptrdiff_type_node;
2901
56d8ffc1
JG
29022016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2903
2904 * c-common.c (excess_precision_mode_join): New.
2905 (c_ts18661_flt_eval_method): New.
2906 (c_c11_flt_eval_method): Likewise.
2907 (c_flt_eval_method): Likewise.
2908 * c-common.h (excess_precision_mode_join): New.
2909 (c_flt_eval_method): Likewise.
2910 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2911 (cpp_iec_559_value): Call it.
2912 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2913 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2914 __FLT_EVAL_METHOD_TS_18661_3__.
2915
04f0fcf7
JG
29162016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2917
2918 * c-opts.c (c_common_post_options): Add logic to handle the default
2919 case for -fpermitted-flt-eval-methods.
2920
fb2675cb
PB
29212016-11-23 Paolo Bonzini <bonzini@gnu.org>
2922
2923 * c.opt (Wexpansion-to-defined): New.
2924
ec1c5694
JJ
29252016-11-23 Jakub Jelinek <jakub@redhat.com>
2926
2927 PR target/78451
2928 * c-pragma.c (handle_pragma_target): Don't replace
2929 current_target_pragma, but chainon the new args to the current one.
2930
730c9e75
NS
29312016-11-22 Nathan Sidwell <nathan@acm.org>
2932
2933 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2934 indentation and formatting.
730c9e75 2935
89990732
MS
29362016-11-21 Martin Sebor <msebor@redhat.com>
2937
2938 * c.opt (-fprintf-return-value): Enable by default.
2939
48330c93
BE
29402016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2941
2942 PR c++/71973
2943 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2944 * c-common.c (c_common_nodes_and_builtins): Initialize
2945 const_tm_ptr_type_node.
2946
0d939c95
MP
29472016-11-16 Marek Polacek <polacek@redhat.com>
2948
2949 PR c/78285
2950 * c-common.c (c_add_case_label): Turn error_at calls into inform.
2951
8e745a17
JJ
29522016-11-14 Jakub Jelinek <jakub@redhat.com>
2953
2954 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
2955
1ee62b92 29562016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
2957 Richard Biener <rguenther@suse.de>
2958
2959 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
2960 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
2961 * c.opt (fgimple): New option.
1ee62b92 2962
22b15758
UB
29632016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2964
2965 PR c/35503
2966 * c-common.h (warn_for_restrict): Declare.
2967 * c-warn.c: Include gcc-rich-location.h.
2968 (warn_for_restrict): New function.
2969 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
2970 (gcc_cdiag_char_table): Likewise.
2971 (gcc_cxxdiag_char_table): Likewise.
2972 * c.opt (Wrestrict): New option.
2973
4be719cd
EB
29742016-11-13 Eric Botcazou <ebotcazou@adacore.com>
2975
2976 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
2977 for nested types only if the type is a record or union and dump SLOC.
2978
4a826ca6
JM
29792016-11-09 Jason Merrill <jason@redhat.com>
2980
2981 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
2982
2e955d50
JJ
29832016-11-09 Jakub Jelinek <jakub@redhat.com>
2984
2985 * c-ubsan.c (ubsan_instrument_shift): Handle split
2986 -fsanitize=shift-base and -fsanitize=shift-exponent.
2987
51dc6603
JM
29882016-11-07 Jason Merrill <jason@redhat.com>
2989
2990 * c.opt (Wc++1z-compat): New.
2991 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
2992
6dc4a604
ML
29932016-11-07 Martin Liska <mliska@suse.cz>
2994
2995 * c-warn.c (warn_for_unused_label): Save all labels used
2996 in goto or in &label.
2997
b302001e
JM
29982016-11-03 Jason Merrill <jason@redhat.com>
2999
3000 * c-cppbuiltin.c (c_cpp_builtins): Correct
3001 __cpp_inheriting_constructors.
3002
31f7f784
JM
30032016-11-01 Jason Merrill <jason@redhat.com>
3004
2bc78e3c
JM
3005 * c-cppbuiltin.c (c_cpp_builtins): Update
3006 __cpp_inheriting_constructors.
3007
31f7f784
JM
3008 * c.opt (-fnew-inheriting-ctors): New.
3009 * c-opts.c: Default to on for ABI 11+.
3010
dcb466ec
JJ
30112016-10-31 Jakub Jelinek <jakub@redhat.com>
3012
3013 PR c++/77948
3014 * c.opt (fext-numeric-literals): Add Var and Init.
3015 * c-opts.c (c_common_handle_option): Don't clear
3016 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3017 (c_common_post_options): Clear it here if not set
3018 explicitly.
3019
52e1b91e
AH
30202016-10-28 Aldy Hernandez <aldyh@redhat.com>
3021
3022 PR debug/77773
3023 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3024 if NULL.
3025
e16f1cc7
JJ
30262016-10-25 Jakub Jelinek <jakub@redhat.com>
3027
3028 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3029 * c-common.c (c_common_reswords): Add __builtin_launder.
3030
f8348061
BE
30312016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3032
3033 * c-common.c (c_common_truthvalue_conversion): Warn for
3034 multiplications in boolean context. Fix the quoting of '<<' and '<'
3035 in the shift warning.
3036
eff89e01
BE
30372016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3038
3039 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3040
24bc7bf4
JM
30412016-10-20 Jason Merrill <jason@redhat.com>
3042
3043 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3044
4c712374
BE
30452016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3046
3047 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3048 integer shift ops in boolean context.
3049
30502016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3051
3052 * c.opt (Walloca): New.
3053 (Walloca-larger-than=): New.
3054 (Wvla-larger-than=): New.
3055
8fa18c06
MP
30562016-10-17 Marek Polacek <polacek@redhat.com>
3057
3058 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3059 Return immediately when finding a match.
3060 (warn_tautological_cmp): Remove a boolean variable that is no longer
3061 needed.
3062
b12b1915
MP
30632016-10-17 Marek Polacek <polacek@redhat.com>
3064
3065 * c-attribs.c: New file.
3066 * c-common.c: Move attributes handling to c-attribs.c.
3067 (get_nonnull_operand): No longer static.
3068 * c-common.h: Move the declarations from c-attribs.c to its own section.
3069
2045acd9
JM
30702016-10-14 Jason Merrill <jason@redhat.com>
3071
3072 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3073 and __cpp_deduction_guides.
3074
14a2c9aa
JM
30752016-10-13 Jason Merrill <jason@redhat.com>
3076
3077 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3078
4d0cdd0c
TP
30792016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3080
3081 * c-cppbuiltin.c: Include memmodel.h.
3082 * c-opts.c: Likewise.
3083 * c-pragma.c: Likewise.
3084 * c-warn.c: Likewise.
3085
70f6d5e1
JJ
30862016-10-12 Jakub Jelinek <jakub@redhat.com>
3087
3088 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3089 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3090 * c-opts.c (sanitize_cpp_opts): Initialize
3091 cpp_opts->cpp_warn_implicit_fallthrough.
3092
78f61294
MP
30932016-10-11 Marek Polacek <polacek@redhat.com>
3094
3095 * c-common.c (warning_candidate_p): Change the return type to bool
3096 and return true/false instead of 1/0.
3097 (vector_mode_valid_p): Likewise.
3098
038b5cc0
MP
30992016-10-11 Marek Polacek <polacek@redhat.com>
3100
3101 * c-common.c (fold_for_warn): No longer static.
3102 (bool_promoted_to_int_p): Likewise.
3103 (c_common_get_narrower): Likewise.
3104 (constant_expression_warning): Move to c-warn.c.
3105 (constant_expression_error): Likewise.
3106 (overflow_warning): Likewise.
3107 (warn_logical_operator): Likewise.
3108 (find_array_ref_with_const_idx_r): Likewise.
3109 (warn_tautological_cmp): Likewise.
3110 (expr_has_boolean_operands_p): Likewise.
3111 (warn_logical_not_parentheses): Likewise.
3112 (warn_if_unused_value): Likewise.
3113 (strict_aliasing_warning): Likewise.
3114 (sizeof_pointer_memaccess_warning): Likewise.
3115 (check_main_parameter_types): Likewise.
3116 (conversion_warning): Likewise.
3117 (warnings_for_convert_and_check): Likewise.
3118 (match_case_to_enum_1): Likewise.
3119 (match_case_to_enum): Likewise.
3120 (c_do_switch_warnings): Likewise.
3121 (warn_for_omitted_condop): Likewise.
3122 (readonly_error): Likewise.
3123 (lvalue_error): Likewise.
3124 (invalid_indirection_error): Likewise.
3125 (warn_array_subscript_with_type_char): Likewise.
3126 (warn_about_parentheses): Likewise.
3127 (warn_for_unused_label): Likewise.
3128 (warn_for_div_by_zero): Likewise.
3129 (warn_for_memset): Likewise.
3130 (warn_for_sign_compare): Likewise.
3131 (do_warn_double_promotion): Likewise.
3132 (do_warn_unused_parameter): Likewise.
3133 (record_locally_defined_typedef): Likewise.
3134 (maybe_record_typedef_use): Likewise.
3135 (maybe_warn_unused_local_typedefs): Likewise.
3136 (maybe_warn_bool_compare): Likewise.
3137 (maybe_warn_shift_overflow): Likewise.
3138 (warn_duplicated_cond_add_or_warn): Likewise.
3139 (diagnose_mismatched_attributes): Likewise.
3140 * c-common.h: Move the declarations from c-warn.c to its own section.
3141 * c-warn.c: New file.
3142
627be19f
JM
31432016-10-08 Jason Merrill <jason@redhat.com>
3144
3145 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3146 into COND_EXPR in C++.
3147
7bad794a
JJ
31482016-10-08 Jakub Jelinek <jakub@redhat.com>
3149
3150 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3151 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3152 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3153
be845b04
JJ
31542016-10-07 Jakub Jelinek <jakub@redhat.com>
3155
3156 Implement LWG2296 helper intrinsic
3157 * c-common.h (enum rid): Add RID_ADDRESSOF.
3158 * c-common.c (c_common_reswords): Add __builtin_addressof.
3159
c09c4992
BE
31602016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3161
3162 PR c++/77700
3163 * c-common.c (c_common_truthvalue_conversion): Warn also for
3164 suspicious enum values in boolean context.
3165
342cfb3e
JJ
31662016-10-06 Jakub Jelinek <jakub@redhat.com>
3167
3168 Implement P0258R2 - helper for C++17
3169 std::has_unique_object_representations trait
3170 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3171 * c-common.c (c_common_reswords): Add
3172 __has_unique_object_representations.
3173
2e69f143
JJ
31742016-10-05 Jakub Jelinek <jakub@redhat.com>
3175
3176 PR sanitizer/66343
3177 * c-ubsan.c (ubsan_instrument_return): Don't call
3178 initialize_sanitizer_builtins here.
3179
700fff34
BE
31802016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3181
3182 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3183 conditional expression in boolean context when only one arm is
3184 non-boolean.
3185
9563bfcd
JJ
31862016-10-05 Jakub Jelinek <jakub@redhat.com>
3187
04a32443
JJ
3188 PR sanitizer/77823
3189 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3190 is not integral.
3191
9563bfcd
JJ
3192 * c-common.c (c_common_reswords): Update comment for C++11.
3193
f1644724
JM
31942016-10-04 Jason Merrill <jason@redhat.com>
3195
3196 * c-common.c (make_tree_vector_from_ctor): New.
3197 * c-common.h: Declare it.
3198
5a79befb
JJ
31992016-10-04 Jakub Jelinek <jakub@redhat.com>
3200
3201 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3202 __LIBGCC_JCR_SECTION_NAME__.
3203
1633d3b9
BE
32042016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3205
3206 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3207 left shift in boolean context.
3208
a2c6e7f2
JJ
32092016-09-29 Jakub Jelinek <jakub@redhat.com>
3210
3211 Implement P0001R1 - C++17 removal of register storage class specifier
3212 * c.opt (Wregister): New warning.
3213 * c-opts.c (c_common_post_options): Enable -Wregister by
3214 default for C++17.
3215
75304c87
JG
32162016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3217
3218 * c-opts.c (c_common_post_options): Remove special case for
3219 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3220 in C++.
3221
bbfac6da
JJ
32222016-09-27 Jakub Jelinek <jakub@redhat.com>
3223
6e39060a
JJ
3224 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3225 -std=c++1z.
3226
bbfac6da
JJ
3227 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3228
e73cf9a2
TP
32292016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3230
3231 * c-common.c: Include memmodel.h.
3232
c6147dc4
MP
32332016-09-26 Marek Polacek <polacek@redhat.com>
3234
3235 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3236
81fea426
MP
32372016-09-26 Marek Polacek <polacek@redhat.com>
3238
3239 PR c/7652
3240 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3241 (handle_fallthrough_attribute): New function.
3242 (attribute_fallthrough_p): New function.
3243 * c-common.h (attribute_fallthrough_p): Declare.
3244
9a2300e9
MP
32452016-09-24 Marek Polacek <polacek@redhat.com>
3246
3247 PR c/77490
3248 * c.opt (Wbool-operation): New.
3249
a09e9e35
BE
32502016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3251
3252 * c-common.c (c_common_truthvalue_conversion): Inhibit
3253 Wint-in-bool-context warning with from_macro_definition_at.
3254 Mention the expression will always evaluate to true.
3255
d43b4ccc
MS
32562016-09-21 Martin Sebor <msebor@redhat.com>
3257
3258 PR bootstrap/77676
3259 * c.opt (fprintf-return-value): Temporarily initialize to zero
3260 to unblock bootstrap failures.
3261
2e1c20b1
JJ
32622016-09-21 Jakub Jelinek <jakub@redhat.com>
3263
3264 PR c++/77651
3265 * c.opt (Waligned-new=): Add RejectNegative.
3266 (faligned-new=): Likewise. Spelling fix - change
3267 aligned_new_threshhold to aligned_new_threshold.
3268 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3269 to aligned_new_threshold.
3270
88d0c3f0
MS
32712016-09-20 Martin Sebor <msebor@redhat.com>
3272
3273 PR middle-end/49905
3274 * c.opt: Add -Wformat-length and -fprintf-return-value.
3275
144a96e4
BE
32762016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3277
3278 PR c++/77434
3279 * c.opt (Wint-in-bool-context): New warning.
3280 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3281 constants in boolean context.
3282
63012d9a
JM
32832016-09-19 Joseph Myers <joseph@codesourcery.com>
3284
3285 * c-common.c (max_align_t_align): Also consider alignment of
3286 float128_type_node.
3287
931388ce
JM
32882016-09-15 Jason Merrill <jason@redhat.com>
3289
3290 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3291 DECL_EXTERNAL.
3292
38711381
JM
32932016-09-14 Jason Merrill <jason@redhat.com>
3294
3295 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3296 limit FIELD_DECL, either.
3297
e51fbec3
MP
32982016-09-14 Marek Polacek <polacek@redhat.com>
3299
3300 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3301 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3302 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3303
254830ba
DM
33042016-09-13 David Malcolm <dmalcolm@redhat.com>
3305
3306 * c-common.c (warn_logical_not_parentheses): Replace
3307 rich_location::add_fixit_insert calls with add_fixit_insert_before
3308 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3309
42763690
JM
33102016-09-13 Jason Merrill <jason@redhat.com>
3311 Tom de Vries <tom@codesourcery.com>
3312
3313 PR c++/77427
3314 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3315
9453eee9
JM
33162016-09-13 Jason Merrill <jason@redhat.com>
3317
3318 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3319 limit types at all.
3320
e96809e3
JM
33212016-09-12 Jason Merrill <jason@redhat.com>
3322
3323 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3324 bit/byte confusion, allow large alignment for types.
3325
54dcdb88
BE
33262016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3327
3328 PR c++/77496
3329 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3330
d1463eb9
DM
33312016-09-12 David Malcolm <dmalcolm@redhat.com>
3332
3333 PR c/72858
3334 * c-format.c (argument_parser::check_argument_type): Add params
3335 "type_start" and "conversion_char". Use the former to generate
3336 offset_to_type_start and pass it and conversion_char to
3337 check_format_types.
3338 (check_format_info_main): Capture the start of the type
3339 information as "type_start", and pass it an format_char
3340 to arg_parser.check_argument_type.
3341 (check_format_types): Provide an example in the leading comment.
3342 Add params "offset_to_type_start" and "conversion_char"; pass
3343 them to format_type_warning calls.
3344 (test_get_modifier_for_format_len): Likewise.
3345 (matching_type_p): New function.
3346 (get_format_for_type): Add param "conversion_char" and move
3347 implementation into...
3348 (get_format_for_type_1): ...new function, called twice.
3349 Use new function matching_type_p rather than checking for
3350 TYPE_CANONICAL equality.
3351 (get_corrected_substring): New function.
3352 (format_type_warning): Provide an example in the leading comment.
3353 Add params "offset_to_type_start" and "conversion_char". Replace
3354 call to get_format_for_type with call to get_corrected_substring
3355 and move rejection of hints for widths/precisions there.
3356 (assert_format_for_type_streq): Add param "conversion_char".
3357 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3358 (test_get_format_for_type_printf): Add conversion chars to the
3359 tests, adding coverage for various combinations of integer
3360 vs double conversions, and for preserving octal and hexadecimal
3361 conversions.
3362 (test_get_format_for_type_scanf): Add conversion chars to the
3363 tests.
3364
5b28efbb
TV
33652016-09-10 Tom de Vries <tom@codesourcery.com>
3366
3367 PR C/71602
3368 * c-common.c (build_va_arg): Handle more strict
3369 targetm.canonical_va_list_type. Replace first argument type error with
3370 assert.
3371
3f0177e7
MS
33722016-09-09 Martin Sebor <msebor@redhat.com>
3373
3374 PR c/77520
3375 PR c/77521
3376 * c-format.c (argument_parser::find_format_char_info): Use %qc
3377 format directive unconditionally.
3378
af63ba4b
JM
33792016-09-09 Jason Merrill <jason@redhat.com>
3380
3381 Implement C++17 new of over-aligned types.
3382 * c.opt: Add -faligned-new and -Waligned-new.
3383 * c-common.c (max_align_t_align): Split out from...
3384 (cxx_fundamental_alignment_p): ...here.
3385 * c-common.h: Declare it.
3386 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3387
c65248cb
JM
33882016-09-09 Joseph Myers <joseph@codesourcery.com>
3389
3390 * c-cppbuiltin.c (builtin_define_type_width): New function.
3391 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3392 macros.
3393
e5106e27
DM
33942016-09-07 David Malcolm <dmalcolm@redhat.com>
3395
3396 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3397 a POINTER_TYPE.
3398 (substring_loc::get_location): Move to substring-locations.c,
3399 keeping implementation as...
3400 (c_get_substring_location): New function, from the above, reworked
3401 to use accessors rather than member lookup.
3402 * c-common.h (class substring_loc): Move to substring-locations.h,
3403 replacing with a forward decl.
3404 (c_get_substring_location): New decl.
3405 * c-format.c: Include "substring-locations.h".
3406 (format_warning_va): Move to substring-locations.c.
3407 (format_warning_at_substring): Likewise.
3408
a42e7952
MS
34092016-09-06 Martin Sebor <msebor@redhat.com>
3410
3411 PR c/77336
3412 * c-format.c (check_function_format): Avoid issuing warnings for
3413 functions unless they call format functions with non-constant
3414 format strings.
3415
b772a565
RB
34162016-09-06 Richard Biener <rguenther@suse.de>
3417
3418 PR c/77450
3419 * c-common.c (c_common_mark_addressable_vec): Handle
3420 COMPOUND_LITERAL_EXPR.
3421
25ff5dd3
MP
34222016-09-05 Marek Polacek <polacek@redhat.com>
3423
3424 PR c/77423
3425 * c-common.c (bool_promoted_to_int_p): New function.
3426 (expr_has_boolean_operands_p): New function.
3427 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3428 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3429
21234eb5
TV
34302016-09-04 Tom de Vries <tom@codesourcery.com>
3431
3432 revert:
3433 2016-08-29 Tom de Vries <tom@codesourcery.com>
3434
3435 * c-common.c (build_va_arg): Replace first argument type error
3436 with assert.
3437
9dc5773f
JJ
34382016-09-02 Jakub Jelinek <jakub@redhat.com>
3439
3440 PR c/65467
3441 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3442 (c_finish_omp_for): Reject _Atomic qualified iterators.
3443
34442016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3445
3446 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3447 size to guarantee it fits the output of the formatted function
3448 regardless of its arguments.
3449
295844f6
MP
34502016-09-01 Marek Polacek <polacek@redhat.com>
3451
3452 PR c/7652
3453 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3454 FALLTHRU comments.
3455
3d06b6f2
MP
34562016-08-29 Marek Polacek <polacek@redhat.com>
3457
3458 PR c/77292
3459 * c-common.c (warn_logical_not_parentheses): Don't warn for
3460 a comparison or a logical operator.
3461
34cedad5
TV
34622016-08-29 Tom de Vries <tom@codesourcery.com>
3463
3464 * c-common.c (build_va_arg): Fix type comparison assert.
3465
f162d717
TV
34662016-08-29 Tom de Vries <tom@codesourcery.com>
3467
3468 * c-common.c (build_va_arg): Replace first argument type error
3469 with assert.
3470
ba9bbd6f
TV
34712016-08-29 Tom de Vries <tom@codesourcery.com>
3472
3473 PR c/77398
3474 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3475 with error_mark_node as va_list instead of with illegal va_list.
3476
ebef225f
MP
34772016-08-25 Marek Polacek <polacek@redhat.com>
3478 David Malcolm <dmalcolm@redhat.com>
3479
3480 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3481 * c-common.h (warn_logical_not_parentheses): Update declaration.
3482
b00e6e75
MP
34832016-08-22 Marek Polacek <polacek@redhat.com>
3484
3485 PR c++/77321
3486 * c-common.c (warn_for_memset): Check type for null.
3487
6dc198e3
JM
34882016-08-22 Joseph Myers <joseph@codesourcery.com>
3489
14ec014e 3490 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3491 _FloatNx types for suffixes for built-in functions.
3492
c65699ef
JM
34932016-08-19 Joseph Myers <joseph@codesourcery.com>
3494
3495 PR c/32187
3496 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3497 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3498 (RID_FLOAT128X): New enum rid values.
3499 (CASE_RID_FLOATN_NX): New macro.
3500 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3501 keywords.
3502 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3503 corresponding complex types.
3504 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3505 _FloatNx and corresponding complex types.
3506 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3507 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3508 and _FloatNx types for the widest type for determining
3509 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3510 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3511 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3512 and _FloatNx types.
3513 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3514 constants.
3515 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3516 _FloatNx types.
3517
cc015f3a
DM
35182016-08-18 David Malcolm <dmalcolm@redhat.com>
3519
3520 * c-opts.c (c_diagnostic_finalizer): Update for change to
3521 diagnostic_show_locus.
3522
cb18fd07
DM
35232016-08-18 David Malcolm <dmalcolm@redhat.com>
3524
3525 * c-common.c: Include "spellcheck.h".
3526 (cb_get_suggestion): New function.
3527 * c-common.h (cb_get_suggestion): New decl.
3528 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3529 cb_get_suggestion.
3530
a76989dc
MP
35312016-08-18 Marek Polacek <polacek@redhat.com>
3532
3533 PR c/71514
3534 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3535 and pointer-to-VLA.
3536
65e736c0
DM
35372016-08-16 David Malcolm <dmalcolm@redhat.com>
3538
3539 PR c/72857
3540 * c-common.c (substring_loc::get_range): Rename to...
3541 (substring_loc::get_location): ...this, converting param from a
3542 source_range * to a location_t *. Call
3543 get_source_location_for_substring rather than
3544 get_source_range_for_substring, and pass in m_caret_idx.
3545 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3546 (substring_loc::get_range): Replace with...
3547 (substring_loc::get_location): ...this.
3548 (substring_loc::set_caret_index): New method.
3549 (substring_loc): Add field m_caret_idx.
3550 * c-format.c (format_warning_va): Update for above changes.
3551 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3552 clashing with type name.
3553 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3554 (check_argument_type): Likewise.
3555 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3556 Use a copy when emitting warnings, setting the caret index from TYPE.
3557
7e1dde14 35582016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3559 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3560
3561 * c-ada-spec.c (dump_number): New function.
3562 (handle_escape_character): Likewise.
3563 (print_ada_macros): Add handling of constant integers and strings.
3564
191816a3
MP
35652016-08-12 Marek Polacek <polacek@redhat.com>
3566
3567 PR c/7652
3568 * c-common.c (scalar_to_vector): Adjust fall through comment.
3569 * c-opts.c (c_common_handle_option): Likewise.
3570 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3571 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3572 fall through comment.
3573 * cilk.c (extract_free_variables): Add FALLTHRU.
3574
452df4a4
JM
35752016-08-10 Jason Merrill <jason@redhat.com>
3576
3577 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3578
f3365c12
JM
35792016-08-09 Jason Merrill <jason@redhat.com>
3580
3581 * c-common.c (c_common_attribute_table): vector_size affects type
3582 identity.
3583
f0bc3323
MP
35842016-08-09 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/7652
3587 * c-ada-spec.c (dump_generic_ada_node): Add return.
3588
98e5a19a
JM
35892016-08-09 Jason Merrill <jason@redhat.com>
3590
3591 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3592 C++17 constexpr lambdas.
3593
895aa8e1
DM
35942016-08-08 David Malcolm <dmalcolm@redhat.com>
3595
3596 PR c/64955
3597 * c-common.h (selftest::c_format_c_tests): New declaration.
3598 (selftest::run_c_tests): New declaration.
3599 * c-format.c: Include "selftest.h.
3600 (format_warning_va): Add param "corrected_substring" and use
3601 it to add a replacement fix-it hint.
3602 (format_warning_at_substring): Likewise.
3603 (format_warning_at_char): Update for new param of
3604 format_warning_va.
3605 (argument_parser::check_argument_type): Pass "fki" to
3606 check_format_types.
3607 (check_format_types): Add param "fki" and pass it to
3608 format_type_warning.
3609 (deref_n_times): New function.
3610 (get_modifier_for_format_len): New function.
3611 (selftest::test_get_modifier_for_format_len): New function.
3612 (get_format_for_type): New function.
3613 (format_type_warning): Add param "fki" and use it to attempt
3614 to provide hints for argument types when calling
3615 format_warning_at_substring.
3616 (selftest::get_info): New function.
3617 (selftest::assert_format_for_type_streq): New function.
3618 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3619 (selftest::test_get_format_for_type_printf): New function.
3620 (selftest::test_get_format_for_type_scanf): New function.
3621 (selftest::c_format_c_tests): New function.
3622
e52ed3fe
DM
36232016-08-08 David Malcolm <dmalcolm@redhat.com>
3624
3625 PR c/52952
3626 * c-format.c: Include "diagnostic.h".
3627 (location_column_from_byte_offset): Delete.
3628 (location_from_offset): Delete.
3629 (format_warning_va): New function.
3630 (format_warning_at_substring): New function.
3631 (format_warning_at_char): New function.
3632 (check_format_arg): Capture location of format_tree and pass to
3633 check_format_info_main.
3634 (argument_parser): Add fields "start_of_this_format" and
3635 "format_string_cst".
3636 (flag_chars_t::validate): Add param "format_string_cst". Convert
3637 warning_at call using location_from_offset to call to
3638 format_warning_at_char.
3639 (argument_parser::argument_parser): Add param "format_string_cst_"
3640 and use use it to initialize field "format_string_cst".
3641 Initialize new field "start_of_this_format".
3642 (argument_parser::read_format_flags): Convert warning_at call
3643 using location_from_offset to a call to format_warning_at_char.
3644 (argument_parser::read_any_format_left_precision): Likewise.
3645 (argument_parser::read_any_format_precision): Likewise.
3646 (argument_parser::read_any_other_modifier): Likewise.
3647 (argument_parser::find_format_char_info): Likewise, in three places.
3648 (argument_parser::parse_any_scan_set): Likewise, in one place.
3649 (argument_parser::handle_conversions): Likewise, in two places.
3650 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3651 and use it to make a substring_loc. Pass the latter to
3652 check_format_types.
3653 (check_format_info_main): Add params "fmt_param_loc" and
3654 "format_string_cst". Convert warning_at calls using
3655 location_from_offset to calls to format_warning_at_char. Pass the
3656 new params to the arg_parser ctor. Pass "format_string_cst" to
3657 flag_chars.validate. Pass "fmt_param_loc" to
3658 arg_parser.check_argument_type.
3659 (check_format_types): Convert first param from a location_t
3660 to a const substring_loc & and rename to "fmt_loc". Attempt
3661 to extract the range of the relevant parameter and pass it
3662 to format_type_warning.
3663 (format_type_warning): Convert first param from a location_t
3664 to a const substring_loc & and rename to "fmt_loc". Add
3665 params "param_range" and "type". Replace calls to warning_at
3666 with calls to format_warning_at_substring.
3667
1c4d457e
DM
36682016-08-08 David Malcolm <dmalcolm@redhat.com>
3669
3670 * c-format.c (class flag_chars_t): New class.
3671 (struct length_modifier): New struct.
3672 (class argument_parser): New class.
3673 (flag_chars_t::flag_chars_t): New ctor.
3674 (flag_chars_t::has_char_p): New method.
3675 (flag_chars_t::add_char): New method.
3676 (flag_chars_t::validate): New method.
3677 (flag_chars_t::get_alloc_flag): New method.
3678 (flag_chars_t::assignment_suppression_p): New method.
3679 (argument_parser::argument_parser): New ctor.
3680 (argument_parser::read_any_dollar): New method.
3681 (argument_parser::read_format_flags): New method.
3682 (argument_parser::read_any_format_width): New method.
3683 (argument_parser::read_any_format_left_precision): New method.
3684 (argument_parser::read_any_format_precision): New method.
3685 (argument_parser::handle_alloc_chars): New method.
3686 (argument_parser::read_any_length_modifier): New method.
3687 (argument_parser::read_any_other_modifier): New method.
3688 (argument_parser::find_format_char_info): New method.
3689 (argument_parser::validate_flag_pairs): New method.
3690 (argument_parser::give_y2k_warnings): New method.
3691 (argument_parser::parse_any_scan_set): New method.
3692 (argument_parser::handle_conversions): New method.
3693 (argument_parser::check_argument_type): New method.
3694 (check_format_info_main): Introduce classes argument_parser
3695 and flag_chars_t, moving the code within the loop into methods
3696 of these classes. Make various locals "const".
3697
88fa5555
DM
36982016-08-05 David Malcolm <dmalcolm@redhat.com>
3699
3700 * c-common.c: Include "substring-locations.h".
3701 (get_cpp_ttype_from_string_type): New function.
3702 (g_string_concat_db): New global.
3703 (substring_loc::get_range): New method.
3704 * c-common.h (g_string_concat_db): New declaration.
3705 (class substring_loc): New class.
3706 * c-lex.c (lex_string): When concatenating strings, capture the
3707 locations of all tokens using a new obstack, and record the
3708 concatenation locations within g_string_concat_db.
3709 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3710 on the ggc-heap.
3711
78169471
MP
37122016-07-29 Marek Polacek <polacek@redhat.com>
3713
638fc14f
MP
3714 PR c/71926
3715 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3716 parentheses warning.
3717
78169471
MP
3718 PR c/71574
3719 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3720
1225d6b1
ML
37212016-07-28 Martin Liska <mliska@suse.cz>
3722
3723 PR gcov-profile/68025
3724 * c-common.c (handle_no_profile_instrument_function_attribute):
3725
ec1e2a40
BE
37262016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3727
3728 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3729 BITS_PER_UNIT_LOG.
3730
5ec2cd9f
JM
37312016-07-25 Jason Merrill <jason@redhat.com>
3732
3733 PR c++/65970
3734 * c.opt (fconstexpr-loop-limit): New.
3735
9dc5773f 37362016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3737
3738 PR c++/71675
3739 * c-common.c (resolve_overloaded_builtin): Avoid converting
3740 __atomic_compare_exchange_n return type to that of what its
3741 first argument points to.
3742
e3fe09c1
UB
37432016-07-22 Uros Bizjak <ubizjak@gmail.com>
3744
3745 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3746 ~(unsigned HOST_WIDE_INT) 0.
3747
bc91c436
ML
37482016-07-22 Martin Liska <mliska@suse.cz>
3749
3750 PR gcov-profile/69028
3751 PR gcov-profile/62047
3752 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3753 to the current_function_decl.
3754
451dcc66
JM
37552016-07-21 Jason Merrill <jason@redhat.com>
3756
3757 PR c++/65168
3758 * c-common.c (c_common_truthvalue_conversion): Check
3759 c_inhibit_evaluation_warnings for warning about address of
3760 reference.
3761
de6a69ee
DM
37622016-07-20 David Malcolm <dmalcolm@redhat.com>
3763
3764 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3765 const char *.
3766
d022c55a
JM
37672016-07-15 Jason Merrill <jason@redhat.com>
3768
3769 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3770
ddbbcb19
JJ
37712016-07-15 Jakub Jelinek <jakub@redhat.com>
3772
3773 PR c/71858
3774 * c-common.h (enum lookup_name_fuzzy_kind): Add
3775 FUZZY_LOOKUP_FUNCTION_NAME.
3776
d0cf395a
JM
37772016-07-08 Jason Merrill <jason@redhat.com>
3778
3779 P0145: Refining Expression Order for C++.
3780 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3781 * c-opts.c: Adjust.
3782
98d44e93
MT
37832016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3784
3785 PR c++/71214
3786 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3787
f9d8d994
TS
37882016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3789
3790 * c-pragma.h (enum pragma_kind): Rename
3791 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3792 users.
3793
4aa83879
RB
37942016-06-29 Richard Biener <rguenther@suse.de>
3795
3796 PR middle-end/71002
3797 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3798
a25bd9e6
JM
37992016-06-24 Jason Merrill <jason@redhat.com>
3800
3801 P0145R2: Refining Expression Order for C++.
3802 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3803 MODIFY_EXPR.
3804
a86451b9
JJ
38052016-06-24 Jakub Jelinek <jakub@redhat.com>
3806
3807 * c-common.c (check_builtin_function_arguments): Require last
3808 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3809 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3810 if the last argument is pointer to enumerated or boolean type.
3811
1a4f11c8
DM
38122016-06-22 David Malcolm <dmalcolm@redhat.com>
3813
3814 PR c/70339
3815 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3816 (lookup_name_fuzzy): New prototype.
3817
fe55692c
JDA
38182016-06-21 John David Anglin <danglin@gcc.gnu.org>
3819
3820 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3821
4eb24e01
JM
38222016-06-14 Jason Merrill <jason@redhat.com>
3823
3824 P0145R2: Refining Expression Order for C++.
3825 * c.opt (fargs-in-order): New.
3826 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3827
ef7cf206
JJ
38282016-06-13 Jakub Jelinek <jakub@redhat.com>
3829
0dda258b
JJ
3830 PR sanitizer/71498
3831 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3832 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3833
ef7cf206
JJ
3834 PR preprocessor/71183
3835 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3836 to cb_get_source_date_epoch.
3837
50b15873
JJ
38382016-06-10 Jakub Jelinek <jakub@redhat.com>
3839
3840 PR c/68657
3841 * c.opt (Wpsabi): Add Warning flag.
3842
4d926e34
MS
38432016-06-10 Martin Sebor <msebor@redhat.com>
3844
3845 PR c/71392
14ec014e 3846 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3847 the nonnull attribute in type-generic builtins.
3848
e01b4e16
MS
38492016-06-09 Martin Sebor <msebor@redhat.com>
3850
3851 PR c/70883
3852 * c-common.c (builtin_function_validate_nargs): Make text of error
3853 message consistent with others like it.
3854
44a845ca
MS
38552016-06-08 Martin Sebor <msebor@redhat.com>
3856 Jakub Jelinek <jakub@redhat.com>
3857
3858 PR c++/70507
3859 PR c/68120
3860 * c-common.c (check_builtin_function_arguments): Handle
3861 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3862
a80a7051
RB
38632016-06-08 Richard Biener <rguenther@suse.de>
3864
3865 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3866
bfd67b47
RB
38672016-06-07 Richard Biener <rguenther@suse.de>
3868
3869 PR c/61564
3870 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3871 options and warn about others.
3872
15c98b2e
ES
38732016-06-01 Eduard Sanou <dhole@openmailbox.org>
3874
3875 * c-common.c (get_source_date_epoch): Rename to
3876 cb_get_source_date_epoch.
3877 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3878 message when the parsing fails. Use error_at instead of fatal_error.
3879 * c-common.h (get_source_date_epoch): Rename to
3880 cb_get_source_date_epoch.
3881 * c-common.h (cb_get_source_date_epoch): Prototype.
3882 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3883 * c-common.h (c_omp_region_type): Remove trailing comma.
3884 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3885 * c-lex.c (c_lex_with_flags): Remove initialization of
3886 pfile->source_date_epoch.
3887
00631022
JJ
38882016-05-30 Jakub Jelinek <jakub@redhat.com>
3889
3890 PR c++/71349
3891 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3892 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3893 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3894 instead of C_OMP_CLAUSE_SPLIT_FOR.
3895
f17a223d
RB
38962016-05-24 Richard Biener <rguenther@suse.de>
3897
3898 PR middle-end/70434
3899 PR c/69504
3900 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3901 (convert_vector_to_array_for_subscript): ... this.
3902 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3903 VIEW_CONVERT_EXPR to an array type. Rename to ...
3904 (convert_vector_to_array_for_subscript): ... this.
3905
4f2e1536
MP
39062016-05-12 Marek Polacek <polacek@redhat.com>
3907
3908 PR c/70756
3909 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3910 size_in_bytes and pass LOC to it.
3911
d6e83a8d
MM
39122016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3913
3914 PR c/43651
3915 * c.opt (Wduplicate-decl-specifier): New option.
3916
5c3a10fb
MP
39172016-05-11 Marek Polacek <polacek@redhat.com>
3918
3919 PR c++/71024
3920 * c-common.c (diagnose_mismatched_attributes): New function.
3921 * c-common.h (diagnose_mismatched_attributes): Declare.
3922
deef7113
MP
39232016-05-04 Marek Polacek <polacek@redhat.com>
3924
3925 * c.opt (Wdangling-else): New option.
3926
79ce98bc
MP
39272016-05-03 Marek Polacek <polacek@redhat.com>
3928
3929 PR c/70859
3930 * c-common.c (builtin_function_validate_nargs): Add location
3931 parameter. Use it.
3932 (check_builtin_function_arguments): Add location and arguments
3933 parameters. Use them.
3934 * c-common.h (check_builtin_function_arguments): Update declaration.
3935
381cdae4
RB
39362016-05-03 Richard Biener <rguenther@suse.de>
3937
3938 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3939 allow call args to gimplify to SSA names.
3940
1d793c34
MP
39412016-05-03 Marek Polacek <polacek@redhat.com>
3942
3943 * c-common.h (enum c_omp_region_type): Remove stray comma.
3944
77886428
CP
39452016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3946
3947 * c-common.h (enum c_omp_region_type): Define.
3948
697e0b28
RS
39492016-05-02 Richard Sandiford <richard.sandiford@arm.com>
3950
3951 * c-common.c (shorten_compare): Use wi::to_wide.
3952
e7ff0319
CP
39532016-04-29 Cesar Philippidis <cesar@codesourcery.com>
3954
3955 PR middle-end/70626
3956 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
3957 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
3958 reduction clauses in acc parallel loops.
3959
2fff3db8
MP
39602016-04-29 Marek Polacek <polacek@redhat.com>
3961
3962 PR c/70852
3963 * c-common.c (warn_for_memset): Check domain before accessing it.
3964
509063eb
DV
39652016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
3966
3967 PR/69089
3968 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
3969 "aligned" attribute.
3970
b632761d
JM
39712016-04-28 Jason Merrill <jason@redhat.com>
3972
3973 * c-lex.c (c_common_has_attribute): Handle nodiscard.
3974
174f6622
ES
39752016-04-28 Eduard Sanou <dhole@openmailbox.org>
3976 Matthias Klose <doko@debian.org>
3977
3978 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 3979 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
3980 handling.
3981 * c-common.h (get_source_date_epoch): Prototype.
3982 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
3983
6bc2bb18
RB
39842015-04-27 Ryan Burn <contact@rnburn.com>
3985
3986 PR c++/69024
3987 PR c++/68997
3988 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
3989 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
3990 external linkage.
3991 (cilk_detect_and_unwrap): Corresponding changes.
3992 (extract_free_variables): Don't extract free variables from
3993 AGGR_INIT_EXPR slot.
3994 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
3995 (cilk_recognize_spawn): Likewise.
3996
c1e1f433
BS
39972016-04-27 Bernd Schmidt <bschmidt@redhat.com>
3998
3999 * c.opt (Wmemset-elt-size): New option.
4000 * c-common.c (warn_for_memset): New function.
4001 * c-common.h (warn_for_memset): Declare.
4002
d067e05f
JM
40032016-04-25 Jason Merrill <jason@redhat.com>
4004
4005 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4006 No longer static.
4007 * c-common.h: Declare it.
4008 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4009
9aa36ae5
JM
40102016-04-22 Jason Merrill <jason@redhat.com>
4011
4012 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4013
477d4906
IV
40142016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4015
4016 PR c++/69363
4017 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4018 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4019
fe37c7af
MM
40202016-04-18 Michael Matz <matz@suse.de>
4021
4022 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4023 and SET_DECL_ALIGN.
4024
23f2660f
EB
40252016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4026
4027 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4028 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4029 to incomplete types.
4030 (dump_nested_type): Remove redundant tests and tidy up.
4031 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4032 a type which is the typedef of an original type.
4033
1e77281b
MP
40342016-04-15 Marek Polacek <polacek@redhat.com>
4035
4036 PR c/70651
4037 * c-common.c (build_va_arg): Change two asserts into errors and return
4038 error_mark_node.
4039
b3a77f21
MP
40402016-04-13 Marek Polacek <polacek@redhat.com>
4041
4042 PR c++/70639
4043 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4044 for switch statements, too.
4045
322b8466
JM
40462016-03-28 Jason Merrill <jason@redhat.com>
4047
4048 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4049
fbdb6baf
MP
40502016-03-23 Marek Polacek <polacek@redhat.com>
4051
4052 PR c++/69884
4053 * c.opt (Wignored-attributes): New option.
4054
5c240f4d
DM
40552016-03-22 David Malcolm <dmalcolm@redhat.com>
4056
4057 PR c/69993
4058 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4059 diagnostic text, reversing the order of the warning and note so
4060 that they appear in source order.
4061
14ba7b28
MP
40622016-03-17 Marek Polacek <polacek@redhat.com>
4063
4064 PR c/69407
4065 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4066 operations.
4067
08a1cadc
JM
40682016-03-14 Jason Merrill <jason@redhat.com>
4069
2aaeea19
JM
4070 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4071
08a1cadc
JM
4072 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4073
c06d25bb
RB
40742016-03-09 Richard Biener <rguenther@suse.de>
4075
4076 PR c/70143
4077 * c-common.c (strict_aliasing_warning): Add back
4078 alias_sets_conflict_p check.
4079
80aac5c8
JM
40802016-03-08 Jason Merrill <jason@redhat.com>
4081
4082 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4083
64b23c13
DM
40842016-03-04 David Malcolm <dmalcolm@redhat.com>
4085
4086 PR c/68187
4087 * c-indentation.c (get_visual_column): Move code to determine next
4088 tab stop to...
4089 (next_tab_stop): ...this new function.
4090 (line_contains_hash_if): Delete function.
4091 (detect_preprocessor_logic): Delete function.
4092 (get_first_nws_vis_column): New function.
4093 (detect_intervening_unindent): New function.
4094 (should_warn_for_misleading_indentation): Replace call to
4095 detect_preprocessor_logic with a call to
4096 detect_intervening_unindent.
4097
729526f5
DM
40982016-03-04 David Malcolm <dmalcolm@redhat.com>
4099
4100 PR c/68187
4101 * c-indentation.c (should_warn_for_misleading_indentation): When
4102 suppressing warnings about cases where the guard and body are on
4103 the same column, only use the first non-whitespace column in place
4104 of the guard token column when dealing with "else" clauses.
4105 When rejecting aligned BODY and NEXT, loosen the requirement
4106 from equality with the first non-whitespace of guard to simply
4107 that they not be indented relative to it.
4108
e9a35493
RB
41092016-03-04 Richard Biener <rguenther@suse.de>
4110
4111 PR c++/70054
4112 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4113 instead of alias_sets_conflict_p.
4114
1be56bc5
MP
41152016-03-01 Marek Polacek <polacek@redhat.com>
4116
4117 PR c++/69795
4118 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4119 any DECL.
4120
35886f0b
MS
41212016-02-22 Martin Sebor <msebor@redhat.com>
4122
4123 PR middle-end/69780
4124 * c-common.c (check_builtin_function_arguments): Validate and
4125 reject invalid arguments to __builtin_alloca_with_align.
4126
4246c8da
MW
41272016-02-20 Mark Wielaard <mjw@redhat.com>
4128
4129 PR c/28901
4130 * c.opt (Wunused-const-variable): Turn into Alias for...
4131 (Wunused-const-variable=): New option.
4132
268be88c
BE
41332016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4134
4135 PR c++/69865
4136 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4137 here...
4138 (c_common_init_options): ...to here.
4139 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4140
871b3f47
JJ
41412016-02-19 Jakub Jelinek <jakub@redhat.com>
4142
4143 PR c++/69826
4144 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4145 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4146 flag_preprocess_only.
4147
bf14eba2
JJ
41482016-02-16 Jakub Jelinek <jakub@redhat.com>
4149
4150 PR c/69835
4151 * c.opt (Wnonnull-compare): Enable for -Wall.
4152
ba6b3795
JJ
41532016-02-15 Jakub Jelinek <jakub@redhat.com>
4154
4155 PR c++/69797
4156 * c-common.c (sync_resolve_size): Diagnose too few arguments
4157 even when params is non-NULL empty vector.
4158
a011cd92
BS
41592016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4160
4161 PR target/60410
4162 * c.opt (fshort-double): Remove.
4163
46cb9332
MS
41642016-02-05 Martin Sebor <msebor@redhat.com>
4165
4166 PR c++/69662
4167 * c.opt (Warning options): Update -Wplacement-new to take
4168 an optional argument.
4169
e1b81f2b
JJ
41702016-02-01 Jakub Jelinek <jakub@redhat.com>
4171
4172 PR preprocessor/69543
4173 PR c/69558
4174 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4175 instead of loc to control_warning_option.
4176
b6adbb9f
NS
41772016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4178
4179 * c.opt (fopenacc-dim=): New option.
4180
5d70666e
RB
41812016-01-27 Ryan Burn <contact@rnburn.com>
4182
4183 PR cilkplus/69267
4184 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4185 gimplify_arg. Removed superfluous post_p argument.
4186 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4187 superfluous post_p argument.
4188 * c-gimplify.c (c_gimplify_expr): Likewise.
4189
01e1dea3
DM
41902016-01-26 David Malcolm <dmalcolm@redhat.com>
4191
4192 PR other/69006
4193 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4194 pp_newline_and_flush with pp_flush.
4195
9f04a53e
MS
41962016-01-20 Martin Sebor <msebor@redhat.com>
4197
4198 PR c/69405
4199 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4200 an incompatible argument when the argument isn't a valid tree node.
4201
7f26f7df
JM
42022016-01-18 Jason Merrill <jason@redhat.com>
4203
4204 PR c++/68767
4205 * c-common.c (check_function_arguments_recurse): Fold the whole
4206 COND_EXPR, not just the condition.
4207
f62bf092
TV
42082016-01-18 Tom de Vries <tom@codesourcery.com>
4209
4210 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4211 classify as loop clause.
4212
e0a575ff
JJ
42132016-01-15 Jakub Jelinek <jakub@redhat.com>
4214
4215 PR bootstrap/68271
4216 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4217 C++ FE no longer has limit on number of pragmas.
4218
42192015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4220
4221 PR c++/69048
4222 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4223 to add missing cleanup point.
b6e3db06 4224
c7df95d8
DM
42252016-01-14 David Malcolm <dmalcolm@redhat.com>
4226
4227 PR c++/68819
4228 * c-indentation.c (get_visual_column): Add location_t param.
4229 Handle the column number being zero by effectively disabling the
4230 warning, with an "inform".
4231 (should_warn_for_misleading_indentation): Add location_t argument
4232 for all uses of get_visual_column.
4233
21efdd80
PP
42342016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4235
4236 PR c++/69029
4237 * c-indentation.c (should_warn_for_misleading_indentation):
4238 Don't warn about do-while statements.
4239
7a127fa7
MS
42402016-01-07 Martin Sebor <msebor@redhat.com>
4241
4242 PR c/68966
4243 * c-common.c (sync_resolve_size): Reject first argument when it's
4244 a pointer to _Bool.
4245
c589e975
DM
42462016-01-05 David Malcolm <dmalcolm@redhat.com>
4247
4248 PR c/69122
4249 * c-indentation.c (get_visual_column): Remove default argument.
4250 (should_warn_for_misleading_indentation): For the multiline case,
4251 update call to get_visual_column for next_stmt_exploc so that it
4252 captures the location of the first non-whitespace character in the
4253 relevant line. Don't issue warnings if there is non-whitespace
4254 before the next statement.
4255
818ab71a
JJ
42562016-01-04 Jakub Jelinek <jakub@redhat.com>
4257
4258 Update copyright years.
4259
745e411d
DM
42602015-12-21 David Malcolm <dmalcolm@redhat.com>
4261
4262 * c-common.c (binary_op_error): Convert first param from
4263 location_t to rich_location * and use it when emitting an error.
4264 * c-common.h (binary_op_error): Convert first param from
4265 location_t to rich_location *.
4266
de67c4c3
DM
42672015-12-16 David Malcolm <dmalcolm@redhat.com>
4268
4269 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4270 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4271
4a38b02b
IV
42722015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4273
4274 * c-common.c (c_common_attribute_table): Handle "omp declare target
4275 link" attribute.
4276
54d62f51
JJ
42772015-12-14 Jakub Jelinek <jakub@redhat.com>
4278
4279 PR c/68833
4280 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4281
8d4227c8
TB
42822014-12-12 Tobias Burnus <burnus@net-b.de>
4283
4284 PR fortran/68815
4285 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4286 specifiers (%d, %i,%u and %c).
4287
f6069ccc
DM
42882015-12-10 David Malcolm <dmalcolm@redhat.com>
4289
4290 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4291
63bbf46d
JJ
42922015-12-08 Jakub Jelinek <jakub@redhat.com>
4293
4294 PR c/48088
4295 PR c/68657
4296 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4297 * c-pragma.c (handle_pragma_diagnostic): Adjust
4298 control_warning_option caller.
4299
f79520bb
DM
43002015-12-07 David Malcolm <dmalcolm@redhat.com>
4301
4302 * c-common.c (c_cpp_error): Update for change to
4303 rich_location::set_range.
4304
b3d5bc62
JJ
43052015-12-04 Paolo Bonzini <bonzini@gnu.org>
4306
4307 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4308 shifting 1 out of the sign bit.
4309
43102015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4311
4312 * c-common.c (c_common_attribute_table[]): Update max arguments
4313 count for "simd" attribute.
4314 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4315
6eb4a537
JJ
43162015-12-03 Jakub Jelinek <jakub@redhat.com>
4317
4318 PR preprocessor/57580
4319 * c-ppoutput.c (print): Change printed field to bool.
4320 Move src_file last for smaller padding.
4321 (init_pp_output): Set print.printed to false instead of 0.
4322 (scan_translation_unit): Fix up formatting. Set print.printed
4323 to true after printing something other than newline.
4324 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4325 (maybe_print_line_1): Set print.printed to false instead of 0.
4326 (print_line_1): Likewise.
4327 (do_line_change): Set print.printed to true instead of 1.
4328 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4329 dump_macro): Set print.printed to false after printing newline.
4330
4250754e
JM
43312015-12-02 Jason Merrill <jason@redhat.com>
4332
f479b43d
JM
4333 * c-common.c (fold_for_warn): New.
4334 (warn_logical_operator, warn_tautological_cmp)
4335 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4336
4250754e
JM
4337 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4338 (c_fully_fold_internal, decl_constant_value_for_optimization):
4339 Move to c/c-fold.c.
4340 * c-common.h: Don't declare decl_constant_value_for_optimization.
4341
e9e32ee6
JM
43422015-12-02 Joseph Myers <joseph@codesourcery.com>
4343
4344 PR c/68162
4345 * c-common.h (c_build_qualified_type): Add extra default
4346 arguments.
4347
37d5ad46
JB
43482015-12-01 Julian Brown <julian@codesourcery.com>
4349 Cesar Philippidis <cesar@codesourcery.com>
4350 James Norris <James_Norris@mentor.com>
4351
4352 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4353 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4354 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4355
f07862c7
EB
43562015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4357
4358 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4359 (decl_sloc_common): Delete and move bulk of processing to...
4360 (decl_sloc): ...here.
4361 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4362 (dump_ada_double_name): Remove S parameter and compute the suffix.
4363 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4364 element type and deal with an anonymous one.
4365 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4366 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4367 and remove reference to QUAL_UNION_TYPE.
4368 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4369 (dump_nested_type): ...here. New function extracted from above.
4370 Generate a full declaration for anonymous element type of arrays.
4371 (print_ada_declaration): Really skip anonymous declarations. Remove
4372 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4373 Clean up processing of declarations of array types and objects.
4374 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4375 Remove obsolete code and tidy up.
4376
75c8aac3
JH
43772015-11-29 Jan Hubicka <hubicka@ucw.cz>
4378
4379 PR c/67581
4380 * c-common.c (handle_transparent_union_attribute): Update
4381 also type variants.
4382
b58d3df2
ML
43832015-11-27 Martin Liska <mliska@suse.cz>
4384
4385 PR c++/68312
4386 * array-notation-common.c (cilkplus_extract_an_triplets):
4387 Release vector of vectors.
4388 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4389
89a01fcf
EB
43902015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4391
4392 PR c++/68527
4393 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4394 (print_ada_struct_decl): Likewise.
4395
cc5c5226
IZ
43962015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4397
4398 PR c++/68001
4399 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4400 * cilk.c (recognize_spawn): Determine location in a more precise
4401 way.
4402
269adb9d
JM
44032015-11-19 Jason Merrill <jason@redhat.com>
4404
4405 * c-common.c (shorten_compare): But look through macros from
4406 system headers.
4407
d0eccfcd
JM
44082015-11-18 Jason Merrill <jason@redhat.com>
4409
4410 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4411 non-constant operand comes from a macro.
4412
3e44547c
JM
44132015-11-17 Jason Merrill <jason@redhat.com>
4414
4415 PR bootstrap/68346
4416 * c-common.c (warn_tautological_cmp): Fold before checking for
4417 constants.
4418
0f62c7a0
MP
44192015-11-16 Marek Polacek <polacek@redhat.com>
4420
4421 PR c++/68362
4422 * c-common.c (check_case_bounds): Fold low and high cases.
4423
a868811e
MP
44242015-11-16 Marek Polacek <polacek@redhat.com>
4425
4426 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4427 * c-common.c (c_common_get_alias_set): Likewise.
4428 (handle_visibility_attribute): Likewise.
4429
fff77217
KY
44302015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4431
4432 * c-common.c (handle_simd_attribute): New.
4433 (struct attribute_spec): Add entry for "simd".
4434 (handle_simd_attribute): New.
4435
269e63b7
KT
44362015-11-13 Kai Tietz <ktietz70@googlemail.com>
4437
4438 * c-lex.c (interpret_float): Use fold_convert.
4439
ebedc9a3
DM
44402015-11-13 David Malcolm <dmalcolm@redhat.com>
4441
4442 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4443 and store it on the result.
4444 * c-opts.c (c_common_init_options): Set
4445 global_dc->colorize_source_p.
4446
6e232ba4
JN
44472015-11-12 James Norris <jnorris@codesourcery.com>
4448 Joseph Myers <joseph@codesourcery.com>
4449
7365279f 4450 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4451 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4452 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4453 PRAGMA_OACC_CLAUSE_LINK.
4454
e78bede6
MP
44552015-11-11 Marek Polacek <polacek@redhat.com>
4456
4457 PR c/68107
4458 PR c++/68266
4459 * c-common.c (valid_array_size_p): New function.
4460 * c-common.h (valid_array_size_p): Declare.
4461
3f8257db 44622015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4463
4464 PR bootstrap/68271
4465 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4466
69f293c9
AM
44672015-11-11 Andrew MacLeod <amacleod@redhat.com>
4468
4469 * array-notation-common.c: Remove unused header files.
4470 * c-ada-spec.c: Likewise.
4471 * c-cilkplus.c: Likewise.
4472 * c-common.c: Likewise.
4473 * c-cppbuiltin.c: Likewise.
4474 * c-dump.c: Likewise.
4475 * c-format.c: Likewise.
4476 * c-gimplify.c: Likewise.
4477 * c-indentation.c: Likewise.
4478 * c-lex.c: Likewise.
4479 * c-omp.c: Likewise.
4480 * c-opts.c: Likewise.
4481 * c-pch.c: Likewise.
4482 * c-ppoutput.c: Likewise.
4483 * c-pragma.c: Likewise.
4484 * c-pretty-print.c: Likewise.
4485 * c-semantics.c: Likewise.
4486 * c-ubsan.c: Likewise.
4487 * cilk.c: Likewise.
4488 * stub-objc.c: Likewise.
4489
3a40d81d
NS
44902015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4491 Cesar Philippidis <cesar@codesourcery.com>
4492 James Norris <jnorris@codesourcery.com>
4493 Julian Brown <julian@codesourcery.com>
4494 Nathan Sidwell <nathan@codesourcery.com>
4495
4496 * c-pragma.c (oacc_pragmas): Add "routine".
4497 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4498
ee45a32d
EB
44992015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4500
4501 * c-common.c (c_common_attributes): Add scalar_storage_order.
4502 (handle_scalar_storage_order_attribute): New function.
4503 * c-pragma.c (global_sso): New variable.
4504 (maybe_apply_pragma_scalar_storage_order): New function.
4505 (handle_pragma_scalar_storage_order): Likewise.
4506 (init_pragma): Register scalar_storage_order.
4507 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4508 * c.opt (Wscalar-storage-order): New warning.
4509 (fsso-struct=): New option.
4510
eb11eb15
MS
45112015-11-08 Martin Sebor <msebor@redhat.com>
4512
4513 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4514
0aad0198
RS
45152015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4516
4517 * c-common.c: Don't undef DEF_BUILTIN.
4518
8a645150
DM
45192015-11-06 David Malcolm <dmalcolm@redhat.com>
4520
4521 * c-common.c (c_cpp_error): Convert parameter from location_t to
4522 rich_location *. Eliminate the "column_override" parameter and
4523 the call to diagnostic_override_column.
4524 Update the "done_lexing" clause to set range 0
4525 on the rich_location, rather than overwriting a location_t.
4526 * c-common.h (c_cpp_error): Convert parameter from location_t to
4527 rich_location *. Eliminate the "column_override" parameter.
4528
7a5e4956
CP
45292015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4530 Thomas Schwinge <thomas@codesourcery.com>
4531 James Norris <jnorris@codesourcery.com>
4532
4533 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4534 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4535 clauses with parallel and kernels and loops.
4536 * c-pragma.h (enum pragma_omp_clause): Add entries for
4537 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4538 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4539 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4540 INDEPENDENT,SEQ}.
4541 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4542
e2f5cc96
MS
45432015-11-05 Martin Sebor <msebor@redhat.com>
4544
4545 PR c++/67942
4546 * c.opt (-Wplacement-new): New option.
4547
e01d41e5
JJ
45482015-11-05 Jakub Jelinek <jakub@redhat.com>
4549
4550 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4551 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4552 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4553 save_expr or create_tmp_var* if TEST is true.
4554 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4555 Don't call add_stmt here.
4556 (struct c_omp_check_loop_iv_data): New type.
4557 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4558 c_omp_check_loop_iv_exprs): New functions.
4559 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4560 distribute.
4561 (c_omp_declare_simd_clauses_to_numbers): Change
4562 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4563 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4564 from numbers to PARM_DECLs.
4565
595278be
MM
45662015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4567
4568 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4569 flag_checking.
4570
3f8257db 45712015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4572
4573 PR c++-common/67882
b3d5bc62
JJ
4574 * c-common.h (fold_offsetof_1): Add argument.
4575 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4576 offsetof expressions that reference elements past the end of
4577 an array.
4578
4bf9e5a8
TS
45792015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4580 Chung-Lin Tang <cltang@codesourcery.com>
4581
4582 * c-pragma.c (oacc_pragmas): Add "atomic".
4583 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4584
3b1661a9
ES
45852015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4586
4587 * c-common.c (handle_target_clones_attribute): New.
4588 (c_common_attribute_table): Add handle_target_clones_attribute.
4589 (handle_always_inline_attribute): Add check on target_clones attribute.
4590 (handle_target_attribute): Ditto.
4591
2adfab87
AM
45922015-10-29 Andrew MacLeod <amacleod@redhat.com>
4593
4594 * array-notation-common.c: Reorder #include's and remove duplicates.
4595 * c-ada-spec.c: Likewise.
4596 * c-cilkplus.c: Likewise.
4597 * c-common.c: Likewise.
4598 * c-cppbuiltin.c: Likewise.
4599 * c-dump.c: Likewise.
4600 * c-format.c: Likewise.
4601 * c-gimplify.c: Likewise.
4602 * c-indentation.c: Likewise.
4603 * c-lex.c: Likewise.
4604 * c-omp.c: Likewise.
4605 * c-opts.c: Likewise.
4606 * c-pch.c: Likewise.
4607 * c-ppoutput.c: Likewise.
4608 * c-pragma.c: Likewise.
4609 * c-pretty-print.c: Likewise.
4610 * c-semantics.c: Likewise.
4611 * c-ubsan.c: Likewise.
4612 * cilk.c: Likewise.
4613 * stub-objc.c: Likewise.
4614
d90ec4f2
JM
46152015-10-28 Jason Merrill <jason@redhat.com>
4616
4617 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4618
88bae6f4
TS
46192015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4620 James Norris <jnorris@codesourcery.com>
4621 Cesar Philippidis <cesar@codesourcery.com>
4622
4623 PR c/64765
4624 PR c/64880
4625 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4626 * c-omp.c (c_oacc_split_loop_clauses): New function.
4627
b1726d6c
MS
46282015-10-21 Martin Sebor <msebor@redhat.com>
4629
4630 PR driver/68043
4631 * c.opt: End each sentence that describes an option with a period.
4632
fa60eeb9
MP
46332015-10-20 Marek Polacek <polacek@redhat.com>
4634
4635 * array-notation-common.c (is_cilkplus_vector_p): Define.
4636 * c-common.h (is_cilkplus_vector_p): Declare.
4637
95979049
MP
46382015-10-20 Marek Polacek <polacek@redhat.com>
4639
4640 * c.opt (std=gnu++11): Do not describe as experimental.
4641 (std=gnu++14): Likewise.
4642
2a9fb712
JM
46432015-10-19 Jason Merrill <jason@redhat.com>
4644
4645 * c-cppbuiltin.c (c_cpp_builtins): Define
4646 __cpp_nontype_template_args.
4647
13b380a3
JM
46482015-10-19 Jason Merrill <jason@redhat.com>
4649
4650 * c-cppbuiltin.c (c_cpp_builtins): Define
4651 __cpp_enumerator_attributes, __cpp_fold_expressions,
4652 __cpp_unicode_characters.
4653
d9a6bd32
JJ
46542015-10-13 Jakub Jelinek <jakub@redhat.com>
4655 Aldy Hernandez <aldyh@redhat.com>
4656
4657 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4658 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4659 (c_define_builtins): Likewise.
4660 * c-common.h (enum c_omp_clause_split): Add
4661 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4662 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4663 (c_finish_omp_for): Add ORIG_DECLV argument.
4664 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4665 201511 instead of 201307.
4666 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4667 OMP_CRITICAL_CLAUSES to it.
4668 (c_finish_omp_ordered): Add CLAUSES argument, set
4669 OMP_ORDERED_CLAUSES to it.
4670 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4671 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4672 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4673 constructs and new OpenMP 4.5 clauses. Clear
4674 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4675 verification code.
4676 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4677 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4678 (enum pragma_omp_clause): Add
4679 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4680 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4681
624d31fe
RS
46822015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4683
4684 * c-lex.c (interpret_float): Use real_equal instead of
4685 REAL_VALUES_EQUAL.
4686
b8fd7909
JM
46872015-10-04 Jason Merrill <jason@redhat.com>
4688
4689 Implement N4514, C++ Extensions for Transactional Memory.
4690 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4691 (c_common_attribute_table): Add transaction_safe_dynamic.
4692 transaction_safe now affects type identity.
4693 (handle_tm_attribute): Handle transaction_safe_dynamic.
4694 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4695 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4696 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4697 (D_TRANSMEM): New.
4698 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4699 * c-pretty-print.c (pp_c_attributes_display): Don't print
4700 transaction_safe in C++.
4701
12651878
MP
47022015-10-02 Marek Polacek <polacek@redhat.com>
4703
4704 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4705
3e3b8d63
MP
47062015-10-02 Marek Polacek <polacek@redhat.com>
4707
4708 PR c/64249
4709 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4710 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4711 * c.opt (Wduplicated-cond): New option.
4712
0d1a8f75
JM
47132015-10-01 Joseph Myers <joseph@codesourcery.com>
4714
4715 * c.opt (std=c11): Do not describe as experimental.
4716 (std=gnu11): Likewise.
4717 (std=iso9899:2011): Likewise.
4718
3e32ee19
NS
47192015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4720
4721 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4722 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4723
974348ee
MP
47242015-09-25 Marek Polacek <polacek@redhat.com>
4725
4726 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4727 (ubsan_instrument_shift): Likewise.
4728
15dbc1a6
MP
47292015-09-25 Marek Polacek <polacek@redhat.com>
4730
4731 PR sanitizer/64906
4732 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4733
6b95d7cc
PP
47342015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4735
4736 * c-indentation.c (should_warn_for_misleading_indentation):
4737 Compare next_stmt_vis_column with guard_line_first_nws instead
4738 of with guard_line_vis_column.
4739
c1822f9c
MLI
47402015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4741
4742 PR c/49654
4743 PR c/49655
4744 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4745 options and options not valid for the current language.
4746
d5398058
PP
47472015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4748
4749 * c-indentation.c (should_warn_for_misleading_indentation):
4750 Float out and consolidate the calls to get_visual_column that
4751 are passed guard_exploc as an argument. Compare
4752 next_stmt_vis_column with guard_line_first_nws instead of with
4753 body_line_first_nws.
4754
6b333269
NS
47552015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4756
4757 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4758 Wnamespaces): New C++ warnings.
4759
a75f1574
JM
47602015-09-22 Jason Merrill <jason@redhat.com>
4761
4762 * c-common.h (abi_compat_version_crosses): New.
4763 (warn_abi_version): Declare.
4764 * c-common.c: Define it.
4765 * c-opts.c (c_common_post_options): Handle it.
4766 flag_abi_compat_version defaults to 8.
4767
bdaaa8b7
VV
47682015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4769
4770 Complete the implementation of N4230, Nested namespace definition.
4771 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4772 __cpp_nested_namespace_definitions.
4773
eaa797e8
MLI
47742015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4775
4776 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4777
c4914de6
MLI
47782015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4779
4780 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4781 when warning.
4782 * c-pragma.h (pragma_lex): Add optional loc argument.
4783
fcb87c50
MM
47842015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4785
4786 * c-format.c (check_format_arg): Adjust to use common block size in all
4787 object pools.
4788
31bdd08a
DM
47892015-09-15 David Malcolm <dmalcolm@redhat.com>
4790
4791 * c-format.c (location_from_offset): Update for change in
4792 signature of location_get_source_line.
4793 * c-indentation.c (get_visual_column): Likewise.
4794 (line_contains_hash_if): Likewise.
4795
aa9f4b4c
MP
47962015-09-14 Marek Polacek <polacek@redhat.com>
4797
4798 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4799 setting various warnings.
4800
aa256c4a
MP
48012015-09-14 Marek Polacek <polacek@redhat.com>
4802
4803 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4804 a negative value.
4805
0f876f22
MW
48062015-09-11 Mark Wielaard <mjw@redhat.com>
4807
4808 PR c/28901
4809 * c.opt (Wunused-variable): Option from common.opt.
4810 (Wunused-const-variable): New option.
4811
273aa49e
PC
48122015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4813
4814 PR c++/53184
4815 * c.opt ([Wsubobject-linkage]): Add.
4816
1807ffc1
MS
48172015-09-03 Martin Sebor <msebor@redhat.com>
4818
4819 PR c/66516
4820 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4821 functions.
4822 * c-common.c (reject_gcc_builtin): Define.
4823
38942840
BI
48242015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4825
4826 PR middle-end/60586
4827 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4828 prototype.
4829 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4830 cilk_gimplify_call_params_in_spawned_fn.
4831 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4832 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4833 unwrapping.
4834
c316b5e4
MP
48352015-08-25 Marek Polacek <polacek@redhat.com>
4836
4837 PR middle-end/67330
4838 * c-common.c (handle_weak_attribute): Don't check whether the
4839 visibility can be changed here.
4840
584a7c46
MLI
48412015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4842
4843 * c-lex.c (c_lex_with_flags): Use explicit locations.
4844
a79683d5
TS
48452015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4846
4847 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4848 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4849
61717a45
FXC
48502015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4851
4852 PR middle-end/36757
4853 * c-common.c (check_builtin_function_arguments): Add check
4854 for BUILT_IN_SIGNBIT argument.
4855
329524f5
PC
48562015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4857
4858 PR c++/67160
4859 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4860 in c++1z mode.
4861
4ee55665
MP
48622015-08-17 Marek Polacek <polacek@redhat.com>
4863
4864 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4865 with whitespaces before qualifier names.
4866
b893e375
MP
48672015-08-12 Marek Polacek <polacek@redhat.com>
4868
4869 PR c++/55095
4870 * c-common.c (maybe_warn_shift_overflow): Properly handle
4871 left-shifting 1 into the sign bit.
4872
c2d89095
MLI
48732015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4874
4875 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4876
971e17ff
AS
48772015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4878 Braden Obrzut <admin@maniacsvault.net>
4879 Jason Merrill <jason@redhat.com>
4880
4881 Add C++ Concepts TS support.
4882 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4883 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4884 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4885 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4886 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4887 * c.opt (fconcepts): New.
4888
b3d5bc62
JJ
48892015-08-02 Martin Sebor <msebor@redhat.com>
4890
4891 * c.opt (-Wframe-address): New warning option.
4892
8ebca419
PP
48932015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4894
4895 * c-indentation.c (should_warn_for_misleading_indentation):
4896 Improve heuristics.
4897
1a1e101f
PP
48982015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4899
4900 * c-indentation.c (get_visual_column): Add parameter first_nws,
4901 use it. Update comment documenting the function.
4902 (is_first_nonwhitespace_on_line): Remove.
4903 (should_warn_for_misleading_indentation): Replace usage of
4904 of is_first_nonwhitespace_on_line with get_visual_column.
4905
992118a1
PP
49062015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4907
4908 * c-indentation.h (struct token_indent_info): Define.
4909 (get_token_indent_info): Define.
4910 (warn_for_misleading_information): Declare.
4911 * c-common.h (warn_for_misleading_information): Remove.
4912 * c-identation.c (warn_for_misleading_indentation):
4913 Change declaration to take three token_indent_infos. Adjust
4914 accordingly.
4915 * c-identation.c (should_warn_for_misleading_indentation):
4916 Likewise. Bail out early if the body is a compound statement.
4917 (guard_tinfo_to_string): Define.
4918
e8fa3817
JM
49192015-07-30 Jason Merrill <jason@redhat.com>
4920
4921 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4922 '*' for reference decay.
4923
173864e8
MP
49242015-07-30 Marek Polacek <polacek@redhat.com>
4925
4926 * c-common.c (warn_tautological_cmp): Bail for float types.
4927
f2afe6dd
MP
49282015-07-27 Marek Polacek <polacek@redhat.com>
4929
4930 PR bootstrap/67030
4931 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4932
05b28fd6
MP
49332015-07-27 Marek Polacek <polacek@redhat.com>
4934
4935 PR c++/66555
4936 PR c/54979
4937 * c-common.c (find_array_ref_with_const_idx_r): New function.
4938 (warn_tautological_cmp): New function.
4939 * c-common.h (warn_tautological_cmp): Declare.
4940 * c.opt (Wtautological-compare): New option.
4941
5a5062b8
MP
49422015-07-23 Marek Polacek <polacek@redhat.com>
4943
4944 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4945 (ubsan_instrument_shift): Likewise.
4946
dc891fe7
MP
49472015-07-23 Marek Polacek <polacek@redhat.com>
4948
4949 PR sanitizer/66908
4950 * c-ubsan.c: Include gimplify.h.
4951 (ubsan_instrument_division): Unshare OP0 and OP1.
4952 (ubsan_instrument_shift): Likewise.
4953
451b5e48
MP
49542015-07-20 Marek Polacek <polacek@redhat.com>
4955 Richard Sandiford <richard.sandiford@arm.com>
4956
4957 PR c++/55095
4958 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
4959 Use EXPR_LOC_OR_LOC.
4960 (maybe_warn_shift_overflow): New function.
4961 * c-common.h (maybe_warn_shift_overflow): Declare.
4962 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
4963 * c.opt (Wshift-overflow): New option.
4964
fb0b2914
ML
49652015-07-16 Martin Liska <mliska@suse.cz>
4966
4967 * c-format.c (static void check_format_info_main): Use
4968 object_allocator instead of pool_allocator.
4969 (check_format_arg): Likewise.
4970 (check_format_info_main): Likewise.
4971
903f5c23
AM
49722015-07-15 Andrew MacLeod <amacleod@redhat.com>
4973
4974 * c-opts.c: Remove multiline #include comment.
4975
026c3cfd
AH
49762015-07-12 Aldy Hernandez <aldyh@redhat.com>
4977
4978 * c-common.c: Fix double word typos.
4979
bb49ee66
EB
49802015-07-10 Eric Botcazou <ebotcazou@adacore.com>
4981
4982 * c-ada-spec.h (cpp_operation): Revert latest change.
4983 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
4984 constructors and destructors.
4985
1916bcb5
AM
49862015-07-09 Andrew MacLeod <amacleod@redhat.com>
4987
4988 * c-common.h: Adjust includes for flags.h changes.
4989 * stub-objc.c: Likewise.
026c3cfd 4990
a9dcd529
EB
49912015-07-08 Eric Botcazou <ebotcazou@adacore.com>
4992
4993 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
4994 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
4995
b03b462f
JJ
49962015-07-08 Jakub Jelinek <jakub@redhat.com>
4997
4998 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
4999 are to be removed, return NULL rather than original clauses list.
5000
c7131fb2
AM
50012015-07-07 Andrew MacLeod <amacleod@redhat.com>
5002
5003 * array-notation-common.c: Adjust includes.
5004 * c-ada-spec.c: Likewise.
5005 * c-cilkplus.c: Likewise.
5006 * c-common.h: Likewise.
5007 * c-cppbuiltin.c: Likewise.
5008 * c-dump.c: Likewise.
5009 * c-format.c: Likewise.
5010 * c-gimplify.c: Likewise.
5011 * c-indentation.c: Likewise.
5012 * c-lex.c: Likewise.
5013 * c-omp.c: Likewise.
5014 * c-opts.c: Likewise.
5015 * c-pch.c: Likewise.
5016 * c-ppoutput.c: Likewise.
5017 * c-pragma.c: Likewise.
5018 * c-pretty-print.c: Likewise.
5019 * c-semantics.c: Likewise.
5020 * c-ubsan.c: Likewise.
5021 * cilk.c: Likewise.
5022 * stub-objc.c: Likewise.
5023
2a7fb83f
EB
50242015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5025
5026 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5027 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5028
a03c9bf1
JM
50292015-07-01 Jason Merrill <jason@redhat.com>
5030
36a85135
JM
5031 * c-common.h (D_CXX11): Rename from D_CXX0X.
5032 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5033 * c-common.c: Adjust.
5034
e7fa68d5
JM
5035 * c-opts.c (c_common_post_options): Default to C++14.
5036
a03c9bf1
JM
5037 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5038
fe95b036
ESR
50392015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5040
5041 Implement N4197 - Adding u8 character literals
b3d5bc62 5042 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5043 CPP_CHAR.
b3d5bc62 5044 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5045 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5046 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5047 and CPP_UTF8CHAR tokens.
5048 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5049
da2e71c9
MLI
50502015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5051
5052 PR fortran/66605
5053 * c-common.c (do_warn_unused_parameter): Move here.
5054 * c-common.h (do_warn_unused_parameter): Declare.
5055
b155cfd9
MP
50562015-06-29 Marek Polacek <polacek@redhat.com>
5057
5058 PR c/66322
5059 * c-common.c (check_case_bounds): Add bool * parameter. Set
5060 OUTSIDE_RANGE_P.
5061 (c_add_case_label): Add bool * parameter. Pass it down to
5062 check_case_bounds.
5063 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5064 warning here.
5065 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5066 declarations.
5067
31521951
MP
50682015-06-27 Marek Polacek <polacek@redhat.com>
5069
5070 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5071 or VECTOR_INTEGER_TYPE_P throughout.
5072 * c-gimplify.c: Likewise.
5073
22d03525
MP
50742015-06-26 Marek Polacek <polacek@redhat.com>
5075
5076 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5077 * c-common.c (c_fully_fold_internal): Likewise.
5078 (c_alignof_expr): Likewise.
5079 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5080 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5081 * cilk.c (create_parm_list): Likewise.
22d03525 5082
af05e6e5
MP
50832015-06-26 Marek Polacek <polacek@redhat.com>
5084
5085 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5086
f0889939
AM
50872015-06-25 Andrew MacLeod <amacleod@redhat.com>
5088
5089 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5090 * c-gimplify.c: Likewise.
5091 * c-pragma.c: Likewise.
5092 * c-ubsan.c: Likewise.
5093 * cilk.c: Likewise.
5094
ca752f39
RS
50952015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5096
5097 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5098 ggc_hasher.
5099
16a16ec7
AM
51002015-06-25 Andrew MacLeod <amacleod@redhat.com>
5101
5102 * cilk.c: Move calls.h after tm.h in the include chain.
5103
0ae9bd27
MP
51042015-06-25 Marek Polacek <polacek@redhat.com>
5105
5106 * array-notation-common.c: Use VAR_P throughout.
5107 * c-ada-spec.c: Likewise.
5108 * c-common.c: Likewise.
5109 * c-format.c: Likewise.
5110 * c-gimplify.c: Likewise.
5111 * c-omp.c: Likewise.
5112 * c-pragma.c: Likewise.
5113 * c-pretty-print.c: Likewise.
5114 * cilk.c: Likewise.
5115
62f9079a
MP
51162015-06-25 Marek Polacek <polacek@redhat.com>
5117
5118 * cilk.c (extract_free_variables): Use is_global_var.
5119
0fa16060
RS
51202015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5121
5122 * c-common.c: Don't include target-def.h.
5123
a68ae2e1
MP
51242015-06-23 Marek Polacek <polacek@redhat.com>
5125
5126 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5127 when comparing INTEGER_CSTs.
5128
c6a2f2d9
PMR
51292015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5130
5131 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5132 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5133 (dump_ada_template): Skip partially specialized types.
5134
6b4db501
MM
51352015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5136
5137 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5138 swapping.
5139
abb226c9
AM
51402015-06-17 Andrew MacLeod <amacleod@redhat.com>
5141
5142 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5143 * c-ada-spec.c: Likewise.
5144 * c-cilkplus.c: Likewise.
5145 * c-common.c: Likewise.
5146 * c-common.h: Likewise.
5147 * c-cppbuiltin.c: Likewise.
5148 * c-dump.c: Likewise.
5149 * c-format.c: Likewise.
5150 * c-gimplify.c: Likewise.
5151 * c-indentation.c: Likewise.
5152 * c-lex.c: Likewise.
5153 * c-omp.c: Likewise.
5154 * c-opts.c: Likewise.
5155 * c-pch.c: Likewise.
5156 * c-ppoutput.c: Likewise.
5157 * c-pragma.c: Likewise.
5158 * c-pretty-print.c: Likewise.
5159 * c-semantics.c: Likewise.
5160 * c-ubsan.c: Likewise.
5161 * cilk.c: Likewise.
5162 * stub-objc.c: Likewise.
5163
076fecad
PP
51642015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5165
5166 PR c++/65168
5167 * c-common.c (c_common_truthvalue_conversion): Warn when
5168 converting an address of a reference to a truth value.
5169
13fdf2e2
AM
51702015-06-08 Andrew MacLeod <amacleod@redhat.com>
5171
5172 * array-notation-common.c : Adjust include files.
5173 * c-ada-spec.c : Likewise.
5174 * c-cilkplus.c : Likewise.
5175 * c-common.c : Likewise.
5176 * c-common.h : Likewise.
5177 * c-cppbuiltin.c : Likewise.
5178 * c-dump.c : Likewise.
5179 * c-format.c : Likewise.
5180 * c-gimplify.c : Likewise.
5181 * c-indentation.c : Likewise.
5182 * c-lex.c : Likewise.
5183 * c-omp.c : Likewise.
5184 * c-opts.c : Likewise.
5185 * c-pch.c : Likewise.
5186 * c-ppoutput.c : Likewise.
5187 * c-pragma.c : Likewise.
5188 * c-pretty-print.c : Likewise.
5189 * c-semantics.c : Likewise.
5190 * c-ubsan.c : Likewise.
5191 * cilk.c : Likewise.
5192 * stub-objc.c : Likewise.
5193
a1661b90
MP
51942015-06-08 Marek Polacek <polacek@redhat.com>
5195
5196 PR c/66415
5197 * c-format.c (location_from_offset): Return LOC if LINE is null.
5198
d7438551
AH
51992015-06-05 Aldy Hernandez <aldyh@redhat.com>
5200
5201 * c-common.h (c_parse_final_cleanups): New prototype.
5202 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5203
b3d5bc62
JJ
52042015-06-04 Sriraman Tallam <tmsriram@google.com>
5205
5206 * c-common.c (noplt): New attribute.
5207 (handle_noplt_attribute): New handler.
5208
ecb9f223
AM
52092015-06-04 Andrew MacLeod <amacleod@redhat.com>
5210
5211 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5212 * c-ada-spec.c: Likewise.
5213 * c-cilkplus.c: Likewise.
5214 * c-common.c: Likewise.
5215 * c-common.h: Likewise.
5216 * c-cppbuiltin.c: Likewise.
5217 * c-dump.c: Likewise.
5218 * c-format.c: Likewise.
5219 * c-gimplify.c: Likewise.
5220 * c-indentation.c: Likewise.
5221 * c-lex.c: Likewise.
5222 * c-omp.c: Likewise.
5223 * c-opts.c: Likewise.
5224 * c-pch.c: Likewise.
5225 * c-ppoutput.c: Likewise.
5226 * c-pragma.c: Likewise.
5227 * c-pretty-print.c: Likewise.
5228 * c-semantics.c: Likewise.
5229 * c-ubsan.c: Likewise.
5230 * cilk.c: Likewise.
5231 * stub-objc.c: Likewise.
5232
6ac48155
DM
52332015-06-02 David Malcolm <dmalcolm@redhat.com>
5234
5235 PR c/66220:
5236 * c-indentation.c (should_warn_for_misleading_indentation): Use
5237 expand_location rather than expand_location_to_spelling_point.
5238 Don't warn if the guarding statement is more indented than the
5239 next/body stmts.
5240
773ce42e
DM
52412015-06-02 David Malcolm <dmalcolm@redhat.com>
5242
5243 * c-indentation.c (warn_for_misleading_indentation): Bail out
5244 immediately if -Wmisleading-indentation isn't enabled.
5245
4fef8379
ML
52462015-06-01 Martin Liska <mliska@suse.cz>
5247
5248 * c-format.c (check_format_arg):Use new type-based pool allocator.
5249 (check_format_info_main) Likewise.
5250
1edfb384
EB
52512015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5252
5253 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5254 (has_nontrivial_methods): Likewise.
5255
9677ef52
MP
52562015-05-25 Marek Polacek <polacek@redhat.com>
5257
5258 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5259
fd5c817a
MP
52602015-05-22 Marek Polacek <polacek@redhat.com>
5261
5262 PR c/47043
5263 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5264
a2f45fe6 52652015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5266
5267 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5268 STACK_GROWS_DOWNWARD.
5269
a2f45fe6 52702015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5271
5272 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5273 STACK_GROWS_DOWNWARD rather than if it is defined.
5274
0fee2ac2 52752015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5276
0fee2ac2
MLI
5277 PR c/52952
5278 * c-format.c (location_column_from_byte_offset): New.
5279 (location_from_offset): New.
5280 (struct format_wanted_type): Add offset_loc field.
5281 (check_format_info): Move handling of location for extra arguments
5282 closer to the point of warning.
5283 (check_format_info_main): Pass the result of location_from_offset
5284 to warning_at.
5285 (format_type_warning): Pass the result of location_from_offset
5286 to warning_at.
5287
cf4ef6f7
MP
52882015-05-20 Marek Polacek <polacek@redhat.com>
5289
5290 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5291
3a65ee74
MP
52922015-05-20 Marek Polacek <polacek@redhat.com>
5293
5294 * c-ada-spec.c (dump_sloc): Use DECL_P.
5295
21b634ae
MP
52962015-05-20 Marek Polacek <polacek@redhat.com>
5297
5298 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5299 * c-common.c: Likewise.
5300
0e50b624
DM
53012015-05-19 David Malcolm <dmalcolm@redhat.com>
5302
5303 * c-common.h (fe_file_change): Strengthen param from
5304 const line_map * to const line_map_ordinary *.
5305 (pp_file_change): Likewise.
5306 * c-lex.c (fe_file_change): Likewise.
5307 (cb_define): Use linemap_check_ordinary when invoking
5308 SOURCE_LINE.
5309 (cb_undef): Likewise.
5310 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5311 invoking cb_file_change.
5312 (c_finish_options): Likewise.
5313 (push_command_line_include): Likewise.
5314 (cb_file_change): Strengthen param "new_map" from
5315 const line_map * to const line_map_ordinary *.
5316 * c-ppoutput.c (cb_define): Likewise for local "map".
5317 (pp_file_change): Likewise for param "map" and local "from".
5318
fab27f52
MM
53192015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5320
5321 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5322
2fe1d762
TV
53232015-05-18 Tom de Vries <tom@codesourcery.com>
5324
5325 * c-common.c (build_va_arg_1): New function.
5326 (build_va_arg): Add address operator to va_list operand if necessary.
5327
7a37fa90
MM
53282015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5329
5330 PR c/48956
5331 * c-common.c (int_safely_convertible_to_real_p): Define.
5332 (unsafe_conversion_p): Check conversions involving complex types.
5333 (conversion_warning): Add new warning message for conversions which
5334 discard imaginary component.
5335 * c-common.h: (enum conversion_safety): Add new enumerator for such
5336 conversions.
5337
3aa3c9fc
MP
53382015-05-14 Marek Polacek <polacek@redhat.com>
5339
5340 PR c/66066
5341 PR c/66127
5342 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5343 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5344 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5345 use it. If FOR_INT_CONST, require that all evaluated operands be
5346 INTEGER_CSTs.
5347
c3388e62
DM
53482015-05-12 David Malcolm <dmalcolm@redhat.com>
5349
5350 * c-common.h (warn_for_misleading_indentation): New prototype.
5351 * c-indentation.c: New file.
5352 * c.opt (Wmisleading-indentation): New option.
5353
c7b38fd5
TV
53542015-05-12 Tom de Vries <tom@codesourcery.com>
5355
5356 PR tree-optimization/66010
5357 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5358
381bf11e
JM
53592015-05-09 Jason Merrill <jason@redhat.com>
5360
edff0c06
JM
5361 * c-opts.c (c_common_post_options): Also clear
5362 cpp_opts->cpp_warn_cxx11_compat.
5363
129211bc
JM
5364 * c-common.h (enum cxx_dialect): Add cxx_unset.
5365 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5366 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5367
381bf11e
JM
5368 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5369 (std=gnu++0x): Mark as Undocumented.
5370 (std=gnu++1y): Add deprecated message.
5371
fe191308
JM
53722015-05-08 Jason Merrill <jason@redhat.com>
5373
765189ff
JM
5374 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5375 * c-opts.c: Adjust.
5376
fe191308
JM
5377 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5378
755e528f
MP
53792015-05-08 Marek Polacek <polacek@redhat.com>
5380
5381 PR c/64918
5382 * c.opt (Woverride-init-side-effects): New option.
5383
0173bd2a
MP
53842015-05-07 Marek Polacek <polacek@redhat.com>
5385
5386 PR c/65179
5387 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5388 negative value.
5389 * c.opt (Wshift-negative-value): New option.
5390 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5391 when -Wextra and C99/C++11 mode.
5392
e0f0d3b9
MP
53932015-05-07 Marek Polacek <polacek@redhat.com>
5394 Martin Uecker <uecker@eecs.berkeley.edu>
5395
5396 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5397 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5398
8243e2a9
JM
53992015-05-05 Jason Merrill <jason@redhat.com>
5400
5401 * c.opt (Wterminate): New.
5402
577cd070
MP
54032015-04-30 Marek Polacek <polacek@redhat.com>
5404
5405 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5406 require that the non-constant be of a boolean type.
5407
0373796b
JT
54082015-04-29 Josh Triplett <josh@joshtriplett.org>
5409
e0f0d3b9
MP
5410 * c-common.c (handle_section_attribute): Refactor to reduce
5411 nesting and distinguish between error cases.
0373796b 5412
716c0ba6
MP
54132015-04-29 Marek Polacek <polacek@redhat.com>
5414
5415 PR c/64610
5416 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5417 with 0/1.
5418
8848828b
JJ
54192015-04-29 Jakub Jelinek <jakub@redhat.com>
5420
5421 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5422 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5423 HOST_BITS_PER_WIDE_INT.
5424
ecd0e562
TV
54252015-04-28 Tom de Vries <tom@codesourcery.com>
5426
5427 PR tree-optimization/65887
5428 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5429
2a877204 54302015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5431 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5432
5433 * c-ada-spec.c (in_function): Delete.
5434 (dump_generic_ada_node): Do not change in_function and remove the
5435 redundant code dealing with it.
5436 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5437 (print_ada_methods): Output the static member functions in a nested
5438 package after the regular methods as well as associated renamings.
5439
4853031e
MP
54402015-04-24 Marek Polacek <polacek@redhat.com>
5441
5442 PR c/65830
5443 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5444 and OPT_Wshift_count_overflow.
5445
8c2b7f79
MP
5446 PR c/63357
5447 * c-common.c (warn_logical_operator): Warn if the operands have the
5448 same expressions.
5449
b8787813
MP
54502015-04-24 Marek Polacek <polacek@redhat.com>
5451
5452 PR c/61534
5453 * c-common.c (warn_logical_operator): Bail if either operand comes
5454 from a macro expansion.
5455
8fba1830
BRF
54562015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5457
5458 PR target/55143
5459 * c-common.c (c_default_pointer_mode): Add definition.
5460 * c-common.h (c_default_pointer_mode): Add declaration.
5461
17958621
JJ
54622015-03-11 Jakub Jelinek <jakub@redhat.com>
5463
5464 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5465 on record_builtin_type argument.
5466
7ccb1a11
JJ
54672015-03-10 Jakub Jelinek <jakub@redhat.com>
5468
5469 PR c/65120
5470 * c-common.c (warn_logical_not_parentheses): Don't warn for
5471 !x == 0 or !x != 0.
5472
04fd785e
MP
54732015-03-07 Marek Polacek <polacek@redhat.com>
5474
5475 PR sanitizer/65280
5476 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5477 before trying to figure out whether we have a flexible array member.
5478
a4e26206 54792015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5480 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5481
5482 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5483
0d2489f4
EB
54842015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5485
5486 PR ada/65319
5487 * c-ada-spec.c (print_destructor): Remove obsolete code.
5488
83ed54d7
EB
54892015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5490
5491 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5492 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5493 DECL_TEMPLATE_RESULT emulations.
5494 (dump_ada_template)): Add guard for TYPE_METHODS.
5495
7631f0e2
MP
54962015-02-27 Marek Polacek <polacek@redhat.com>
5497
5498 PR c/65040
5499 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5500
d1783ae5
KT
55012015-02-27 Kai Tietz <ktietz@redhat.com>
5502
5503 PR c/35330
5504 * c-pragma.c (handle_pragma_weak): Do not try to create
5505 weak/alias of declarations not being function, or variable
5506 declarations.
5507
56a9f6bc
TS
55082015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5509
5510 PR libgomp/64625
5511 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5512 Remove macros.
5513 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5514
3d5cb23d
MP
55152015-02-16 Marek Polacek <polacek@redhat.com>
5516
5517 PR c/65066
5518 * c-format.c (check_format_types): Handle null param.
5519
fa008882
MP
55202015-02-13 Marek Polacek <polacek@redhat.com>
5521
5522 PR c/65040
5523 * c-format.c (check_format_types): Don't warn about different
5524 signedness if the original value is in the range of WANTED_TYPE.
5525
785f21af
JM
55262015-02-12 Jason Merrill <jason@redhat.com>
5527
5528 PR c++/64956
5529 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5530 to the current highest version.
5531 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5532
4886ec8e
JJ
55332015-02-04 Jakub Jelinek <jakub@redhat.com>
5534
5535 PR c/64824
5536 PR c/64868
5537 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5538 instead of RDIV_EXPR. Use build_binary_op instead of
5539 build2_loc.
5540
40fecdd6
JM
55412015-01-30 Joseph Myers <joseph@codesourcery.com>
5542
5543 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5544 to pass input_location as first argument.
5545
a0c88d06
TV
55462015-01-23 Tom de Vries <tom@codesourcery.com>
5547
5548 PR libgomp/64672
5549 * c.opt (fopenacc): Mark as LTO option.
5550
1506ae0e
TV
55512015-01-23 Tom de Vries <tom@codesourcery.com>
5552
5553 PR libgomp/64707
5554 * c.opt (fopenmp): Mark as LTO option.
5555
31be63ab
JJ
55562015-01-21 Jakub Jelinek <jakub@redhat.com>
5557
5558 PR c/63307
b1726d6c 5559 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5560 (compare_decls): Fix up formatting.
5561
55622015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5563
5564 PR c/63307
5565 * cilk.c: Include vec.h.
5566 (struct cilk_decls): New structure.
5567 (wrapper_parm_cb): Split this function to...
5568 (fill_decls_vec): ...this...
5569 (create_parm_list): ...and this.
5570 (compare_decls): New function.
5571 (for_local_cb): Remove.
5572 (wrapper_local_cb): Ditto.
5573 (build_wrapper_type): For now first traverse and fill vector of
5574 declarations then sort it and then deal with sorted vector.
5575 (cilk_outline): Ditto.
5576 (declare_one_free_variable): Ditto.
5577
6875457f
JM
55782015-01-21 Jason Merrill <jason@redhat.com>
5579
5580 PR c++/64629
5581 * c-format.c (check_format_arg): Call decl_constant_value.
5582
185c9e56
ML
55832015-01-19 Martin Liska <mliska@suse.cz>
5584
5585 * c-common.c (handle_noicf_attribute): New function.
5586
41dbbb37
TS
55872015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5588 Bernd Schmidt <bernds@codesourcery.com>
5589 James Norris <jnorris@codesourcery.com>
5590 Cesar Philippidis <cesar@codesourcery.com>
5591 Ilmir Usmanov <i.usmanov@samsung.com>
5592 Jakub Jelinek <jakub@redhat.com>
5593
5594 * c.opt (fopenacc): New option.
5595 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5596 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5597 New macros.
5598 * c-common.h (c_finish_oacc_wait): New prototype.
5599 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5600 (c_finish_oacc_wait): New function.
5601 * c-pragma.c (oacc_pragmas): New variable.
5602 (c_pp_lookup_pragma, init_pragma): Handle it.
5603 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5604 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5605 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5606 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5607 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5608 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5609 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5610 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5611 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5612 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5613 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5614 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5615 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5616 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5617 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5618 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5619 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5620 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5621 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5622 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5623 PRAGMA_OACC_CLAUSE_WORKER.
5624
3f8257db 56252015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5626
5627 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5628 for the new option fstack-protector_explicit.
5629 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5630 (handle_stack_protect_attribute): New function.
5631
3f8257db 56322015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5633
5634 * c.opt: New option -Warray-bounds=.
5635
adfac8df
JJ
56362015-01-09 Michael Collison <michael.collison@linaro.org>
5637
5638 * array-notation-common.c: Include hash-set.h, machmode.h,
5639 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5640 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5641 * c-ada-spec.c: Ditto.
5642 * c-cilkplus.c: Ditto.
5643 * c-common.c: Include input.h due to flattening of tree.h.
5644 Define macro GCC_C_COMMON_C.
5645 * c-common.h: Flatten tree.h header files into c-common.h.
5646 Remove include of tree-core.h.
5647 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5648 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5649 fold-const.h, wide-int.h, and inchash.h due to
5650 flattening of tree.h.
5651 * c-dump.c: Ditto.
5652 * c-format.c: Flatten tree.h header files into c-common.h.
5653 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5654 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5655 fold-const.h, wide-int.h, and inchash.h due to
5656 flattening of tree.h.
5657 * c-dump.c: Include hash-set.h, machmode.h,
5658 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5659 fold-const.h, wide-int.h, and inchash.h due to
5660 flattening of tree.h.
5661 * c-format.c: Include hash-set.h, machmode.h,
5662 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5663 fold-const.h, wide-int.h, inchash.h and real.h due to
5664 flattening of tree.h.
5665 * c-gimplify.c: Include hash-set.h, machmode.h,
5666 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5667 fold-const.h, wide-int.h, and inchash.h due to
5668 flattening of tree.h.
5669 * cilk.c: Ditto.
5670 * c-lex.c: Ditto.
5671 * c-omp.c: Ditto.
5672 * c-opts.c: Ditto.
5673 * c-pch.c: Ditto.
5674 * c-ppoutput.c: Ditto.
5675 * c-pragma.c: Ditto.
5676 * c-pretty-print.c: Ditto.
5677 * c-semantics.c: Ditto.
5678 * c-ubsan.c: Ditto.
5679 * stub-objc.c: Ditto.
5680
f5481fc4
JM
56812015-01-08 Jason Merrill <jason@redhat.com>
5682
5683 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5684 do_ubsan_in_current_function.
5685 (ubsan_maybe_instrument_reference_or_call): Likewise.
5686 * c-ubsan.h: Declare it.
5687
de35aa66
MS
56882015-01-08 Mike Stump <mikestump@comcast.net>
5689
5690 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5691
4a9a42ab
MP
56922015-01-07 Marek Polacek <polacek@redhat.com>
5693
5694 PR c/64440
5695 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5696 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5697
2f42e5de
TS
56982015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5699
5700 PR c++/31397
5701 * c.opt (Wsuggest-override): New option.
5702
5624e564
JJ
57032015-01-05 Jakub Jelinek <jakub@redhat.com>
5704
5705 Update copyright years.
5706
5bd012f8
MP
57072015-01-05 Marek Polacek <polacek@redhat.com>
5708
5709 PR c/64423
5710 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5711 parameter. Use it.
5712 * c-common.h (warn_array_subscript_with_type_char): Update
5713 declaration.
5714
a7fa8d18
ESR
57152014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5716
5717 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5718 Control macro with flag_sized_deallocation.
5719
3f8257db 57202014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5721
5722 * c.opt (Wdiscarded-array-qualifiers): New option.
5723
1f8d3e84
JJ
57242014-12-19 Jakub Jelinek <jakub@redhat.com>
5725
5726 PR preprocessor/63831
5727 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5728 and __has_cpp_attribute here.
5729 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5730 c_common_has_attribute.
5731 * c-common.h (c_common_has_attribute): New prototype.
5732 * c-lex.c (init_c_lex): Set cb->has_attribute to
5733 c_common_has_attribute instead of cb_has_attribute.
5734 (get_token_no_padding): New function.
5735 (cb_has_attribute): Renamed to ...
5736 (c_common_has_attribute): ... this. No longer static. Use
5737 get_token_no_padding, require ()s, don't build TREE_LIST
5738 unnecessarily, fix up formatting, adjust diagnostics, call
5739 init_attributes.
5740
20b06add
JM
57412014-12-15 Jason Merrill <jason@redhat.com>
5742
5743 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5744 (-Wsized-deallocation): New.
5745 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5746 to on in C++14 and up.
5747
94a073b2
JM
57482014-12-11 Jason Merrill <jason@redhat.com>
5749
acaa5911
JM
5750 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5751
94a073b2
JM
5752 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5753 we aren't complaining about VLAs.
5754
7fb66c15
MP
57552014-12-06 Marek Polacek <polacek@redhat.com>
5756
5757 PR tree-optimization/64183
5758 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5759 shift-expression if it is integer_type_node. Use types_compatible_p.
5760
b731b390
JJ
57612014-11-29 Jakub Jelinek <jakub@redhat.com>
5762
5763 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5764 last argument from create_tmp_var_raw and create_tmp_var calls.
5765 * cilk.c (gimplify_cilk_spawn): Likewise.
5766 * c-omp.c (c_finish_omp_atomic): Likewise.
5767
6a4da643
MP
57682014-11-28 Marek Polacek <polacek@redhat.com>
5769
5770 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5771 instead of unsigned_type_node.
5772
541e35a6
MP
57732014-11-28 Marek Polacek <polacek@redhat.com>
5774
5775 PR c/63862
5776 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5777 to op1_utype.
5778 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5779 expression to unsigned_type_node.
5780
dcc97066
MW
57812014-11-20 Mark Wielaard <mjw@redhat.com>
5782
5783 PR debug/38757
5784 * c-opts.c (set_std_c89): Set lang_hooks.name.
5785 (set_std_c99): Likewise.
5786 (set_std_c11): Likewise.
5787 (set_std_cxx98): Likewise.
5788 (set_std_cxx11): Likewise.
5789 (set_std_cxx14): Likewise.
5790 (set_std_cxx1z): Likewise.
5791
aa7da51a
JJ
57922014-11-21 Jakub Jelinek <jakub@redhat.com>
5793
5794 PR target/63764
5795 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5796 return type to bool.
009a3480 5797 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5798 (convert_vector_to_pointer_for_subscript): Change return type to
5799 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5800 and copy it into a TARGET_EXPR and use that instead of *vecp
5801 directly.
5802
538dd0b7
DM
58032014-11-19 David Malcolm <dmalcolm@redhat.com>
5804
5805 Merger of git branch "gimple-classes-v2-option-3".
5806 * ChangeLog.gimple-classes: New.
5807 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5808 from being just a vec<gimple> to a vec<gbind *>.
5809
c39a5e99
JJ
58102014-11-18 Jakub Jelinek <jakub@redhat.com>
5811
5812 PR sanitizer/63813
5813 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5814 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5815 get_pointer_alignment for non-pointers. Use ptype, or if it is
5816 reference type, corresponding pointer type, as type of kind
5817 argument.
5818 (ubsan_maybe_instrument_reference,
5819 ubsan_maybe_instrument_member_call): Adjust callers.
5820
8537a4a9
MP
58212014-11-15 Marek Polacek <polacek@redhat.com>
5822
5823 PR middle-end/63884
5824 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5825 for NULL fndecl.
5826 (extract_array_notation_exprs): Return for NULL node.
5827
2079956a
JM
58282014-11-12 Joseph Myers <joseph@codesourcery.com>
5829
5830 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5831 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5832
1304953e
JJ
58332014-11-12 Jakub Jelinek <jakub@redhat.com>
5834
5835 PR c/59708
5836 * c-common.c (check_builtin_function_arguments): Handle
5837 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5838
e5e44252
AK
58392014-11-10 Andi Kleen <ak@linux.intel.com>
5840
5841 PR c/60804
5842 * c-common.h (check_no_cilk): Declare.
5843 * cilk.c (get_error_location): New function.
5844 (check_no_cilk): Dito.
5845
e64b984d
AK
58462014-11-10 Andi Kleen <ak@linux.intel.com>
5847
5848 * cilk.c (recognize_spawn): Use expression location
5849 for error message.
5850
13c21655
PC
58512014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5852
5853 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5854
42fd12b1
ESR
58552014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5856
5857 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5858 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5859 (__cpp_range_based_for, __cpp_initializer_lists,
5860 __cpp_delegating_constructors, __cpp_nsdmi,
5861 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5862 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5863 __has_cpp_attribute.
5864 * c-lex.c (cb_has_attribute): New callback CPP function;
5865 (init_c_lex): Set has_attribute callback.
5866
6f450181
RB
58672014-11-04 Richard Biener <rguenther@suse.de>
5868
5869 * c-common.c (shorten_compare): Do not shorten mixed
5870 DFP and non-DFP compares.
5871
26f0e1d6
ESR
58722014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5873
5874 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5875 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5876 Commentary and rearrangement of tests.
5877 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5878 Commentary and rearrangement of tests.
5879 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto
5880 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5881
ef4bddc2
RS
58822014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5883
5884 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5885 enum from machine_mode.
5886
c582198b
AM
58872014-10-28 Andrew MacLeod <amacleod@redhat.com>
5888
adfac8df
JJ
5889 * c-common.c: Adjust include files.
5890 * c-gimplify.c: Ditto.
5891 * cilk.c: Ditto.
5892 * c-pragma.c: Ditto.
5893 * c-ubsan.c: Ditto.
c582198b 5894
60393bbc
AM
58952014-10-27 Andrew MacLeod <amacleod@redhat.com>
5896
5897 * c-gimplify.c: Adjust include files.
5898
d723bb7c
MLI
58992014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5900
5901 PR c++/53061
5902 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5903 c_common_initialize_diagnostics.
5904 * c-common.h: Likewise.
5905
90f3520e
MP
59062014-10-24 Marek Polacek <polacek@redhat.com>
5907
5908 PR c/56980
5909 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5910 print "struct"/"union"/"enum" for typedefed names.
5911
59d7607a
MP
59122014-10-23 Marek Polacek <polacek@redhat.com>
5913
5914 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5915 in unsigned type.
5916
d95a2703
JJ
59172014-10-22 Jakub Jelinek <jakub@redhat.com>
5918 Yury Gribov <y.gribov@samsung.com>
5919
5920 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5921 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5922 instead of flag_sanitize_recover as bool flag.
5923
8e6ef852
KY
59242014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5925
5926 * cilk.c: Revert previous change.
5927
948cf550
IZ
59282014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5929
5930 PR c/63307
5931 * cilk.c: Include vec.h.
5932 (struct cilk_decls): New structure.
5933 (wrapper_parm_cb): Split this function to...
5934 (fill_decls_vec): ...this...
5935 (create_parm_list): ...and this.
5936 (compare_decls): New function.
5937 (for_local_cb): Remove.
5938 (wrapper_local_cb): Ditto.
5939 (build_wrapper_type): For now first traverse and fill vector of
5940 declarations then sort it and then deal with sorted vector.
5941 (cilk_outline): Ditto.
5942 (declare_one_free_variable): Ditto.
5943
92574c7c
MP
59442014-10-17 Marek Polacek <polacek@redhat.com>
5945
5946 * c-opts.c (c_common_post_options): Set warn_implicit_int.
5947 * c.opt (Wimplicit-int): Initialize to -1.
5948
83685514
AM
59492014-10-16 Andrew MacLeod <amacleod@redhat.com>
5950
5951 * c-pragma.c: Adjust include files.
5952 * c-semantics.c: Likewise.
5953
5b8300ea
DD
59542014-10-16 DJ Delorie <dj@redhat.com>
5955
5956 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
5957 multiples of bytes.
5958
5f83e90b
JM
59592014-10-14 Jason Merrill <jason@redhat.com>
5960
5961 PR c++/63455
5962 * c-common.h (CPP_PREPARSED_EXPR): New.
5963 (N_CP_TTYPES): Adjust.
5964
d73326ca
MP
59652014-10-15 Marek Polacek <polacek@redhat.com>
5966
5967 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
5968
78a7c317
DD
59692014-10-14 DJ Delorie <dj@redhat.com>
5970
5971 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
5972 types, not just __int128.
5973 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
5974 types, not just __int128.
5975 (cpp_atomic_builtins): Round pointer sizes up.
5976 (type_suffix): Use type precision, not specific types.
5977 * c-common.c (c_common_reswords): Remove __int128 special case.
5978 (c_common_type_for_size): Check for all __intN types, not just
5979 __int128.
5980 (c_common_type_for_mode): Likewise.
5981 (c_common_signed_or_unsigned_type): Likewise.
5982 (c_build_bitfield_integer_type): Likewise.
5983 (c_common_nodes_and_builtins): Likewise.
5984 (keyword_begins_type_specifier): Likewise.
5985 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
5986 __intN variants.
5987
2a22f99c
TS
59882014-10-12 Trevor Saunders <tsaunders@mozilla.com>
5989
5990 * c-common.c: Use hash_table instead of hashtab.
5991
2a8ef767
ESR
59922014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
5993
adfac8df 5994 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
5995 C++11 section.
5996
3c9aabbd
MG
59972014-10-03 Marc Glisse <marc.glisse@inria.fr>
5998
5999 PR c++/54427
6000 PR c++/57198
6001 PR c++/58845
6002 * c-common.c (warn_logical_operator): Punt for vectors.
6003
a15f7cb8
ESR
60042014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6005
6006 Implement SD-6: SG10 Feature Test Recommendations
6007 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6008 macros and the __has_header macro.
6009
8d0cf15e
JM
60102014-09-30 Jason Merrill <jason@redhat.com>
6011
dd5d5481
JM
6012 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6013 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6014 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6015
b752325e
JM
6016 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6017 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6018
8d0cf15e
JM
6019 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6020 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6021
083e891e
MP
60222014-09-24 Marek Polacek <polacek@redhat.com>
6023
6024 PR c/61405
6025 PR c/53874
6026 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6027
7861b648
AK
60282014-09-23 Andi Kleen <ak@linux.intel.com>
6029
6030 * c-common.c (handle_no_reorder_attribute): New function.
6031 (c_common_attribute_table): Add no_reorder attribute.
6032
9a79452d
JM
60332014-09-22 Joseph Myers <joseph@codesourcery.com>
6034
6035 * c-cppbuiltin.c (c_cpp_builtins): Define
6036 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6037 modes.
6038
dd69f047
JM
60392014-09-18 Joseph Myers <joseph@codesourcery.com>
6040
6041 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6042 for supported floating-point modes.
6043
737a4826
MLI
60442014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6045
6046 * c.opt (Wpsabi): Use LangEnabledBy.
6047 * c-opts.c (c_common_handle_option): Do not handle here.
6048
8cc4b7a2
JM
60492014-09-12 Joseph Myers <joseph@codesourcery.com>
6050
6051 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6052 macros for floating-point modes.
6053
179b5a55
MG
60542014-09-11 Marc Glisse <marc.glisse@inria.fr>
6055
6056 PR target/58757
6057 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6058 __*_DENORM_MIN__ without denormals.
6059
570a11fe
JJ
60602014-09-10 Jakub Jelinek <jakub@redhat.com>
6061
6062 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6063 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6064 ubsan_create_data callers.
6065 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6066 index is constant or BIT_AND_EXPR with constant mask and is
6067 small enough for the bound.
6068 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6069 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6070
b559c810
MLI
60712014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6072
6073 * c.opt: Add CppReason to various flags.
6074 (Wdate-time): Re-sort.
6075 * c-common.c: Include c-common.h earlier.
6076 (struct reason_option_codes_t): Delete.
6077 (c_option_controlling_cpp_error): Prefix global type and struct
6078 with cpp_.
6079
1ef33fd4
MLI
60802014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6081
6082 * c.opt (Wnormalized): New.
6083 (Wnormalized=): Use Enum and Reject Negative.
6084 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6085
66bb34c0
JM
60862014-09-08 Joseph Myers <joseph@codesourcery.com>
6087
6088 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6089 digits of floating-point modes if -fbuilding-libgcc.
6090
53d68b9f
JM
60912014-09-05 Joseph Myers <joseph@codesourcery.com>
6092
6093 * c-cppbuiltin.c (c_cpp_builtins): Also define
6094 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6095 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6096 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6097 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6098 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6099 __LIBGCC_STACK_GROWS_DOWNWARD__,
6100 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6101 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6102 __LIBGCC_DWARF_FRAME_REGISTERS__,
6103 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6104 __LIBGCC_STACK_POINTER_REGNUM__ and
6105 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6106 (builtin_define_with_value): Handle backslash-escaping in string
6107 macro values.
6108
f65586dc
RB
61092014-09-05 Richard Biener <rguenther@suse.de>
6110
6111 PR middle-end/63148
6112 * c-format.c (check_format_arg): Properly handle
6113 effectively signed POINTER_PLUS_EXPR offset.
6114
2b71f4a4
MLI
61152014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6116
6117 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6118 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6119 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6120 and Init.
6121 * c-opts.c (c_common_handle_option): Do not handle here.
6122 (sanitize_cpp_opts): Likewise.
6123 * c-common.c (struct reason_option_codes_t): Handle
6124 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6125
d2e4feca
MP
61262014-09-03 Marek Polacek <polacek@redhat.com>
6127
6128 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6129
9a771876
JJ
61302014-09-02 Jakub Jelinek <jakub@redhat.com>
6131 Balaji V. Iyer <balaji.v.iyer@intel.com>
6132 Igor Zamyatin <igor.zamyatin@intel.com>
6133
6134 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6135 * c-common.c (c_common_reswords): Added _Cilk_for.
6136 * c-common.h (enum rid): Added RID_CILK_FOR.
6137 (cilk_for_number_of_iterations): Add declaration.
6138 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6139 CILK_FOR.
6140 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6141 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6142
81b5d104
MLI
61432014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6144
6145 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6146 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6147 Wundef): Use CPP, Var and Init.
6148 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6149
b753b37b
MLI
61502014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6151
6152 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6153 * c-opts.c (c_common_handle_option): Do not handle here.
6154
028aee17
JM
61552014-08-25 Jason Merrill <jason@redhat.com>
6156
6157 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6158 -std=c++14 and -std=gnu++14, rather than the reverse.
6159 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6160 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6161 * c-common.h (cxx_dialect): Remove cxx1y.
6162
e4276ba5
ESR
61632014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6164
6165 * c-common.h (enum cxx_dialect): Add cxx14.
6166 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6167 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6168 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6169
a545cacd
JM
61702014-08-22 Jason Merrill <jason@redhat.com>
6171
6172 * c.opt (std=gnu++17): Fix alias.
6173
59ea0364
MP
61742014-08-22 Marek Polacek <polacek@redhat.com>
6175
6176 PR c++/62199
6177 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6178 check for vector types. Drop LHS argument.
6179 * c-common.h (warn_logical_not_parentheses): Adjust.
6180
596e808c
MLI
61812014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6182
6183 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6184 (Wmultichar): Likewise.
6185 (Wdate-time): Use C-family languages instead of Common. Use CPP
6186 and Var.
6187 * c-opts.c (c_common_handle_option): Do not handle the above
6188 options here.
6189 (sanitize_cpp_opts): Likewise.
6190
18767f65
MLI
61912014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6192
6193 PR fortran/44054
6194 * c-opts.c: Include tree-diagnostics.h.
6195 (c_diagnostic_finalizer): New.
6196 (c_common_initialize_diagnostics): Use it.
6197
b4413594
MLI
61982014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6199
6200 PR preprocessor/51303
6201 * c-common.c (struct reason_option_codes_t option_codes):
6202 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6203
43f9a13c
MLI
62042014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6205
6206 PR c/60975
6207 PR c/53063
6208 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6209 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6210 (c_common_post_options): Call init_global_opts_from_cpp.
6211 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6212
04159acf
MP
62132014-08-19 Marek Polacek <polacek@redhat.com>
6214
6215 PR c++/62153
6216 * c-common.c (maybe_warn_bool_compare): New function.
6217 * c-common.h (maybe_warn_bool_compare): Declare.
6218 * c.opt (Wbool-compare): New option.
6219
35aff4fb
MP
62202014-08-19 Marek Polacek <polacek@redhat.com>
6221
6222 * c.opt (Wc99-c11-compat): New option.
6223
177cce46
MP
62242014-08-19 Marek Polacek <polacek@redhat.com>
6225
6226 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6227 to warn_c90_c99_compat.
6228 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6229 to -1.
6230
6ae9194f
MLI
62312014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6232 Steven Bosscher <steven@gcc.gnu.org>
6233
6234 PR c/52952
6235 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6236 format_check_results.
6237 (check_function_format): Use true and add comment for boolean
6238 argument.
6239 (finish_dollar_format_checking): Use explicit location when warning.
6240 (check_format_info): Likewise.
6241 (check_format_arg): Set extra_arg_loc and format_string_loc.
6242 (check_format_info_main): Use explicit location when warning.
6243 (check_format_types): Pass explicit location.
6244 (format_type_warning): Likewise.
6245
8e54f6d3
MLI
62462014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6247
6248 PR fortran/44054
6249 * c-format.c: Handle Fortran flags.
6250
cd4e76fc
IZ
62512014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6252
6253 PR other/61962
6254 * array-notation-common.c (find_rank): Added handling for other
6255 types of references.
6256
f3bede71
MP
62572014-08-10 Marek Polacek <polacek@redhat.com>
6258
6259 PR c/51849
6260 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6261 * c.opt (Wc90-c99-compat): Add option.
6262
9f25a338
TS
62632014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6264
6265 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6266
62e4eb35
MP
62672014-08-03 Marek Polacek <polacek@redhat.com>
6268
6269 * c-common.c (check_case_value): Add location_t parameter. Use it.
6270 (c_add_case_label): Pass loc to check_case_value.
6271
b787e7a2
TS
62722014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6273
6274 * cilk.c: Use hash_map instead of pointer_map.
6275
6e2830c3
TS
62762014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6277
6278 * c-gimplify.c: Use hash_set instead of pointer_set.
6279
a7ee52fb
IZ
62802014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6281
6282 PR middle-end/61455
6283 * array-notation-common.c (extract_array_notation_exprs): Handling
6284 of DECL_EXPR added.
6285
944fa280
JJ
62862014-08-01 Jakub Jelinek <jakub@redhat.com>
6287
6288 * c-common.h (min_align_of_type): Removed prototype.
6289 * c-common.c (min_align_of_type): Removed.
6290 * c-ubsan.h (ubsan_maybe_instrument_reference,
6291 ubsan_maybe_instrument_member_call): New prototypes.
6292 * c-ubsan.c: Include stor-layout.h and builtins.h.
6293 (ubsan_maybe_instrument_reference_or_call,
6294 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6295 functions.
6296
b4dfdc11
MG
62972014-07-31 Marc Glisse <marc.glisse@inria.fr>
6298
6299 PR c++/60517
6300 * c.opt (-Wreturn-local-addr): Move to common.opt.
6301
a41844e5
JM
63022014-07-30 Jason Merrill <jason@redhat.com>
6303
6304 PR c++/61659
6305 PR c++/61687
6306 Revert:
6307 * c.opt (-fuse-all-virtuals): New.
6308
976d5a22
TT
63092014-07-30 Tom Tromey <tromey@redhat.com>
6310
6311 PR c/59855
6312 * c.opt (Wdesignated-init): New option.
6313 * c-common.c (c_common_attribute_table): Add "designated_init".
6314 (handle_designated_init): New function.
6315
cdc94aca
MP
63162014-07-24 Marek Polacek <polacek@redhat.com>
6317
6318 PR c/57653
6319 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6320
f41373b6
DS
63212014-07-16 Dodji Seketeli <dodji@redhat.com>
6322
6323 PR preprocessor/60723 - missing system-ness marks for macro tokens
6324 * c-ppoutput.c (struct print::prev_was_system_token): New data
6325 member.
6326 (init_pp_output): Initialize it.
6327 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6328 (do_line_change): Return a flag saying if a line marker was
6329 emitted or not.
6330 (scan_translation_unit): Detect if the system-ness of the token we
6331 are about to emit is different from the one of the previously
6332 emitted token. If so, emit a line marker. Avoid emitting useless
6333 adjacent line markers. Avoid emitting line markers for tokens
6334 originating from the expansion of built-in macros.
6335 (scan_translation_unit_directives_only): Adjust.
6336
4d661eaa
MP
63372014-07-15 Marek Polacek <polacek@redhat.com>
6338
6339 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6340 TYPE_MAX_VALUE is NULL.
6341
b108f48f
JJ
63422014-07-14 Jakub Jelinek <jakub@redhat.com>
6343
6344 PR middle-end/61294
6345 * c.opt (Wmemset-transposed-args): New warning.
6346
c0221884
JM
63472014-07-10 Jason Merrill <jason@redhat.com>
6348
6349 PR c++/61659
6350 PR c++/61687
6351 * c.opt (-fuse-all-virtuals): New.
6352
63dfbb95
RB
63532014-07-09 Richard Biener <rguenther@suse.de>
6354
6355 PR c-family/61741
6356 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6357 using unsigned arithmetic if overflow does not wrap instead of
6358 if overflow is undefined.
6359
773ec47f
MP
63602014-07-06 Marek Polacek <polacek@redhat.com>
6361
6362 PR c/6940
6363 * c.opt (Wsizeof-array-argument): New option.
6364
00a7ba58
JJ
63652014-07-03 Jakub Jelinek <jakub@redhat.com>
6366
b1726d6c 6367 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6368 comments->count <= 1, as comments->entries might be NULL.
6369
52ec0ea3
MP
63702014-07-01 Marek Polacek <polacek@redhat.com>
6371
6372 * c.opt (Wint-conversion): New option.
6373
d5c3d343
MP
63742014-07-01 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/58286
6377 * c.opt (Wincompatible-pointer-types): New option.
6378
6e7ceb17
PC
63792014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6380
6381 PR c++/51400
6382 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6383 Do not discard TYPE_QUALS of type.
6384
da73100b
JM
63852014-06-26 Jason Merrill <jason@redhat.com>
6386
6387 * c-common.h (enum cxx_dialect): Add cxx1z.
6388 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6389 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6390
08eedf75
TJ
63912014-06-26 Teresa Johnson <tejohnson@google.com>
6392
6393 * c-common.h (get_dump_info): Declare.
6394 * c-gimplify.c (c_genericize): Use saved dump files.
6395 * c-opts.c (c_common_parse_file): Begin and end dumps
6396 once around parsing invocation.
6397 (get_dump_info): New function.
6398
7b56b2f8
MP
63992014-06-23 Marek Polacek <polacek@redhat.com>
6400 Andrew MacLeod <amacleod@redhat.com>
6401
6402 PR c/61553
6403 * c-common.c (get_atomic_generic_size): Don't segfault if the
6404 type doesn't have a size.
6405
0e37a2f3
MP
64062014-06-20 Marek Polacek <polacek@redhat.com>
6407
6408 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6409 (ubsan_walk_array_refs_r): New function.
6410 (c_genericize): Instrument array bounds.
6411 * c-ubsan.c: Include "internal-fn.h".
6412 (ubsan_instrument_division): Mark instrumented arrays as having
6413 side effects. Adjust ubsan_type_descriptor call.
6414 (ubsan_instrument_shift): Likewise.
6415 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6416 (ubsan_instrument_bounds): New function.
6417 (ubsan_array_ref_instrumented_p): New function.
6418 (ubsan_maybe_instrument_array_ref): New function.
6419 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6420 (ubsan_array_ref_instrumented_p): Declare.
6421 (ubsan_maybe_instrument_array_ref): Declare.
6422
64232014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6424
6425 PR lto/61123
6426 * c.opt (fshort-enums): Add to LTO.
6427 * c.opt (fshort-wchar): Likewise.
6428
5c3d09f7
MP
64292014-06-16 Marek Polacek <polacek@redhat.com>
6430
6431 PR c/60439
6432 * c.opt (Wswitch-bool): Add Var.
6433
9cf32741
JJ
64342014-06-12 Jakub Jelinek <jakub@redhat.com>
6435
6436 PR middle-end/61486
6437 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6438 #pragma omp target teams or
6439 #pragma omp {,target }teams distribute simd.
6440
62984918
JM
64412014-06-12 Jason Merrill <jason@redhat.com>
6442
6443 * c.opt (Wabi=, fabi-compat-version): New.
6444 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6445 (c_common_post_options): Handle flag_abi_compat_version default.
6446 Disallow -fabi-compat-version=1.
6447 * c-common.h (abi_version_crosses): New.
6448
f961457f
JH
64492014-06-11 Jan Hubicka <hubicka@ucw.cz>
6450
adfac8df 6451 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6452 section names that are no longer trees.
6453
92d28cbb
JJ
64542014-06-10 Jakub Jelinek <jakub@redhat.com>
6455
6456 PR fortran/60928
6457 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6458 (omp_pragmas): ... back here.
6459
742938c9
MP
64602014-06-05 Marek Polacek <polacek@redhat.com>
6461
6462 PR c/49706
6463 * c-common.c (warn_logical_not_parentheses): New function.
6464 * c-common.h (warn_logical_not_parentheses): Declare.
6465 * c.opt (Wlogical-not-parentheses): New option.
6466
9d548dfb
MP
64672014-06-04 Marek Polacek <polacek@redhat.com>
6468
6469 PR c/30020
6470 * c-common.c (check_case_bounds): Add location parameter.
6471 Use it.
6472 (c_add_case_label): Pass loc to check_case_bounds.
6473
fedfecef
MP
64742014-06-03 Marek Polacek <polacek@redhat.com>
6475
6476 PR c/60439
6477 * c.opt (Wswitch-bool): New option.
6478
f6a7cffc
TS
64792014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6480
040d18b6
TS
6481 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6482 Remove prototypes.
6483 (record_types_used_by_current_var_decl): Move prototype to where
6484 it belongs.
6485
f6a7cffc
TS
6486 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6487 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6488 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6489
632f2871
RS
64902014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6491
6492 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6493 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6494 void_zero_node.
6495 * c-pretty-print.c (pp_c_void_constant): New function.
6496 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6497 (c_pretty_printer::expression): Handle VOID_CST.
6498 * cilk.c (extract_free_variables): Likewise.
6499 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6500 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6501
766090c2
TS
65022014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6503
6504 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6505 * c-pragma.c (push_alignment): Adjust.
6506 (handle_pragma_push_options): Likewise.
6507
661a0813
MP
65082014-05-09 Marek Polacek <polacek@redhat.com>
6509
6510 PR c/50459
6511 * c-common.c (check_user_alignment): Return -1 if alignment is error
6512 node.
6513 (handle_aligned_attribute): Don't call default_conversion on
6514 FUNCTION_DECLs.
6515 (handle_vector_size_attribute): Likewise.
6516 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6517 (handle_sentinel_attribute): Call default_conversion and allow even
6518 integral types as an argument.
6519
2793eeab
MP
65202014-05-08 Marek Polacek <polacek@redhat.com>
6521
6522 PR c/61053
6523 * c-common.c (min_align_of_type): New function factored out from...
6524 (c_sizeof_or_alignof_type): ...here.
6525 * c-common.h (min_align_of_type): Declare.
6526
f827930a
MP
65272014-05-08 Marek Polacek <polacek@redhat.com>
6528
6529 PR c/61077
6530 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6531 parameter type of main.
6532
ca49b74e
DD
65332014-05-07 DJ Delorie <dj@redhat.com>
6534
6535 * c-cppbuiltin.c (print_bits_of_hex): New.
6536 (builtin_define_type_minmax): Print values using hex so as not to
6537 require a pre-computed list of string values.
6538
1d60af08
KZ
65392014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6540 Mike Stump <mikestump@comcast.net>
6541 Richard Sandiford <rdsandiford@googlemail.com>
6542
6543 * c-ada-spec.c: Include wide-int.h.
6544 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6545 (dump_generic_ada_node): Use wide-int interfaces.
6546 * c-common.c: Include wide-int-print.h.
6547 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6548 (pointer_int_sum): Use wide-int interfaces.
6549 (c_common_nodes_and_builtins): Use make_int_cst.
6550 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6551 (handle_alloc_size_attribute): Use wide-int interfaces.
6552 (get_nonnull_operand): Likewise.
6553 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6554 * c-lex.c: Include wide-int.h.
6555 (narrowest_unsigned_type): Take a widest_int rather than two
6556 HOST_WIDE_INTs.
6557 (narrowest_signed_type): Likewise.
6558 (interpret_integer): Update accordingly. Use wide-int interfaces.
6559 (lex_charconst): Use wide-int interfaces.
6560 * c-pretty-print.c: Include wide-int.h.
6561 (pp_c_integer_constant): Use wide-int interfaces.
6562 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6563 INT_CST_LT_UNSIGNED.
6564
b15458be
RB
65652014-05-06 Richard Biener <rguenther@suse.de>
6566
6567 * c-opts.c (c_common_post_options): For -freestanding,
6568 -fno-hosted and -fno-builtin disable pattern recognition
6569 if not enabled explicitely.
6570
6577374e
MP
65712014-05-02 Marek Polacek <polacek@redhat.com>
6572
6573 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6574
d00887e8
MP
65752014-05-01 Marek Polacek <polacek@redhat.com>
6576
6577 PR c/43245
6578 * c.opt (Wdiscarded-qualifiers): Add.
6579
f8ed5150
MP
65802014-04-30 Marek Polacek <polacek@redhat.com>
6581
6582 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6583 INT_MIN / -1 sanitization only for integer types.
6584
45484dcf
MP
65852014-04-25 Marek Polacek <polacek@redhat.com>
6586
6587 PR c/18079
6588 * c-common.c (handle_noinline_attribute): Warn if the attribute
6589 conflicts with always_inline attribute.
6590 (handle_always_inline_attribute): Warn if the attribute conflicts
6591 with noinline attribute.
6592
38e514c0
MP
65932014-04-25 Marek Polacek <polacek@redhat.com>
6594
6595 PR c/60156
6596 * c-common.c (check_main_parameter_types): Warn about variadic main.
6597
44875f92
MS
65982014-04-24 Mike Stump <mikestump@comcast.net>
6599
6600 * c.opt (Wshadow-ivar): Default to on.
6601
dcaaa5a0
DP
66022014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6603
6604 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6605
c07d7c02
MP
66062014-04-23 Marek Polacek <polacek@redhat.com>
6607
6608 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6609
1c33c9b7
JJ
66102014-04-22 Jakub Jelinek <jakub@redhat.com>
6611
6612 PR sanitizer/60275
6613 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6614 if flag_sanitize_undefined_trap_on_error.
6615 (ubsan_instrument_division, ubsan_instrument_shift,
6616 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6617 if !flag_sanitize_recover.
6618
793c625f
MG
66192014-04-22 Marc Glisse <marc.glisse@inria.fr>
6620
6621 PR libstdc++/43622
6622 * c-common.c (registered_builtin_types): Make non-static.
6623 * c-common.h (registered_builtin_types): Declare.
6624
b0f1bf36
RB
66252014-04-14 Richard Biener <rguenther@suse.de>
6626 Marc Glisse <marc.glisse@inria.fr>
6627
6628 PR c/60819
6629 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6630 apply may-alias the scalar pointer type when applicable.
6631
3b07fa4a
IZ
66322014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6633
6634 PR middle-end/60467
6635 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6636 as possible argument for Cilk_spawn.
6637
cbbd2b1c
TB
66382014-04-11 Tobias Burnus <burnus@net-b.de>
6639
6640 PR c/60194
6641 * c.opt (Wformat-signedness): Add
6642 * c-format.c(check_format_types): Use it.
6643
6415bd5d
JM
66442014-04-11 Jason Merrill <jason@redhat.com>
6645
6646 PR c++/57926
6647 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6648 default_conversion for an array argument.
6649
6525783a
MP
66502014-04-08 Marek Polacek <polacek@redhat.com>
6651
6652 PR sanitizer/60745
6653 * c-ubsan.c: Include asan.h.
6654 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6655
880a467b
NS
66562014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6657
6658 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6659
7b59ff2d
MP
66602014-04-02 Marek Polacek <polacek@redhat.com>
6661
6662 * c-common.h (c_expand_expr): Remove declaration.
6663
8edbfaa6
JJ
66642014-03-28 Jakub Jelinek <jakub@redhat.com>
6665
6666 PR c++/60689
6667 * c-common.c (add_atomic_size_parameter): When creating new
6668 params vector, push the size argument first.
6669
07d72e1d
JJ
66702014-03-26 Jakub Jelinek <jakub@redhat.com>
6671
6672 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6673 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6674 ubsan_create_data callers.
6675
b35e0fa0
JJ
66762014-03-22 Jakub Jelinek <jakub@redhat.com>
6677
6678 PR debug/60603
6679 * c-opts.c (c_finish_options): Restore cb_file_change call to
6680 <built-in>.
6681
39a1ebb3
JJ
66822014-03-13 Jakub Jelinek <jakub@redhat.com>
6683
6684 PR middle-end/36282
6685 * c-pragma.c (apply_pragma_weak): Only look at
6686 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6687 DECL_ASSEMBLER_NAME_SET_P (decl).
6688 (maybe_apply_pending_pragma_weaks): Exit early if
6689 vec_safe_is_empty (pending_weaks) rather than only when
6690 !pending_weaks.
6691 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6692 set assembler name back to NULL afterwards.
6693
a07f6ed2
JM
66942014-03-11 Jason Merrill <jason@redhat.com>
6695
6696 * c.opt: Add -std=gnu++14.
6697
75b107f5
IB
66982014-03-11 Ian Bolton <ian.bolton@arm.com>
6699
6700 * c-opts.c (c_common_post_options): Don't override
6701 -ffp-contract=fast if unsafe-math-optimizations is on.
6702
f42c637e
PM
67032014-03-08 Paulo Matos <paulo@matos-sorge.com>
6704
22b15758 6705 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6706
70e24808
JM
67072014-03-07 Jason Merrill <jason@redhat.com>
6708
6709 * c.opt: Add -std=c++14.
6710
3af9c5e9
MP
67112014-03-06 Marek Polacek <polacek@redhat.com>
6712
6713 PR c/60197
6714 * cilk.c (contains_cilk_spawn_stmt): New function.
6715 (contains_cilk_spawn_stmt_walker): Likewise.
6716 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6717 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6718
b3bdf019
JJ
67192014-03-03 Jakub Jelinek <jakub@redhat.com>
6720
6721 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6722 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6723 even when flag_preprocess_only.
6724
ca7e759d
JM
67252014-02-26 Jason Merrill <jason@redhat.com>
6726
6727 PR c++/59231
6728 PR c++/11586
6729 * c-common.c (shorten_compare): Don't check
6730 c_inhibit_evaluation_warnings.
6731
28e41874
JJ
67322014-02-19 Jakub Jelinek <jakub@redhat.com>
6733
cca615af
JJ
6734 PR c/37743
6735 * c-common.c (c_common_nodes_and_builtins): When initializing
6736 c_uint{16,32,64}_type_node, also set corresponding
6737 uint{16,32,64}_type_node to the same value.
6738
28e41874
JJ
6739 PR c++/60267
6740 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6741 for PRAGMA_IVDEP if flag_preprocess_only.
6742
c2bf53a1
JJ
67432014-02-12 Jakub Jelinek <jakub@redhat.com>
6744
6745 PR c/60101
6746 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6747 if false, add ADD itself, rather than vice versa.
6748 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6749 copy. For SAVE_EXPR, only call merge_tlist once.
6750
8fcbce72
JJ
67512014-02-08 Jakub Jelinek <jakub@redhat.com>
6752
6753 PR middle-end/60092
6754 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6755 and tree_to_uhwi.
6756 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6757 functions.
6758 (c_common_attribute_table): Add alloc_align and assume_aligned
6759 attributes.
6760
0a756a3f
MP
67612014-02-06 Marek Polacek <polacek@redhat.com>
6762
6763 PR c/60087
6764 * c-common.c (warn_for_sign_compare): Call warning_at with location
6765 instead of warning.
6766
7ec4847a
MP
67672014-02-05 Marek Polacek <polacek@redhat.com>
6768
6769 PR c/53123
6770 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6771 statement.
6772
66f20604
MP
67732014-02-04 Marek Polacek <polacek@redhat.com>
6774
6775 PR c/60036
6776 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6777 SAVE_EXPR.
6778
5d77fb19
MG
67792014-02-03 Marc Glisse <marc.glisse@inria.fr>
6780
6781 PR c++/53017
6782 PR c++/59211
6783 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6784 handle_vector_size_attribute, handle_nonnull_attribute): Call
6785 default_conversion on the attribute argument.
6786 (handle_nonnull_attribute): Increment the argument number.
6787
81e5eca8
MP
67882014-01-31 Marek Polacek <polacek@redhat.com>
6789
6790 PR c/59963
6791 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6792 build_function_call_vec.
6793 (resolve_overloaded_builtin): Likewise.
6794 * c-common.h (build_function_call_vec): Adjust declaration.
6795
68fca595
MP
67962014-01-30 Marek Polacek <polacek@redhat.com>
6797
6798 PR c/59940
6799 * c-common.h (unsafe_conversion_p): Adjust declaration.
6800 (warnings_for_convert_and_check): Likewise.
6801 (convert_and_check): Likewise.
6802 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6803 expansion_point_location_if_in_system_header on it.
6804 (warnings_for_convert_and_check): Add location parameter. Call
6805 expansion_point_location_if_in_system_header on it. Use it.
6806 (convert_and_check): Add location parameter. Use it.
6807 (conversion_warning): Likewise.
6808 (c_add_case_label): Adjust convert_and_check calls.
6809 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6810
b72271b9
BI
68112014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6812
6813 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6814 flag_cilkplus.
6815 * c-pragma.c (init_pragma): Likewise.
6816 * c.opt: Likewise.
6817
393e8e8b
MP
68182014-01-23 Marek Polacek <polacek@redhat.com>
6819
6820 PR c/59846
6821 * c-common.c (shorten_compare): Add location_t parameter.
6822 * c-common.h (shorten_binary_op): Adjust declaration.
6823
f04dda30
MP
68242014-01-23 Marek Polacek <polacek@redhat.com>
6825
6826 PR c/58346
6827 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6828 * c-common.h: Declare it.
6829
621955cb
EB
68302014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6831
6832 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6833 * c-ada-spec.c (dump_ads): Likewise.
6834 (cpp_check): Likewise.
6835 (dump_ada_specs): Likewise.
6836
68372014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6838
6839 PR c++/49718
6840 * c-common.c (handle_no_instrument_function_attribute): Allow
6841 no_instrument_function attribute in class member
6842 definition/declaration.
6843
241f845a
JJ
68442014-01-15 Jakub Jelinek <jakub@redhat.com>
6845
6846 PR c/58943
6847 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6848 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6849 being COMPOUND_EXPR.
6850 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6851 operand a SAVE_EXPR and second MODIFY_EXPR.
6852
e83b8e2e
JJ
68532014-01-09 Jakub Jelinek <jakub@redhat.com>
6854
6855 PR target/58115
6856 * c-pch.c (c_common_write_pch): Call
6857 prepare_target_option_nodes_for_pch.
6858
23a5b65a
RS
68592014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6860
6861 Update copyright years
6862
f9030485
RS
68632014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6864
6865 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6866 the copyright notice.
6867
f2aa696b
EB
68682013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6869
6870 * c-ada-spec.c (print_constructor): New function.
6871 (print_destructor): Retrieve the origin of the destructor.
6872 (print_ada_declaration): Revamp handling of constructors/destructors.
6873
3f8257db 68742013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6875 Bill Maddox <maddox@google.com>
6876 Jason Merrill <jason@redhat.com>
6877
6878 * c.opt: Add -fdeclone-ctor-dtor.
6879 * c-opts.c (c_common_post_options): Default to on iff -Os.
6880
41958c28
BI
68812013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6882
6883 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6884 attribute.
6885 * c-pragma.h (enum pragma_cilk_clause): Remove.
6886 (enum pragma_omp_clause): Added the following fields:
6887 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6888 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6889 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6890 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6891 PRAGMA_CILK_CLAUSE_UNIFORM.
6892
b1726d6c 6893
12893402
BI
68942013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6895
6896 * cilk.c (cilk_outline): Made this function non-static.
6897 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6898 (create_cilk_wrapper): Added a new parameter: a function pointer.
6899 (c_install_body_w_frame_cleanup): Remove
6900 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6901 * c-common.h (cilk_outline): New prototype.
6902 (gimplify_cilk_spawn): Removed two parameters.
6903 (cilk_install_body_with_frame_cleanup): New prototype.
6904 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6905 CILK_SPAWN_STMT case.
6906
085b42ed
BS
69072013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6908
2ce064c3
BS
6909 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6910
085b42ed
BS
6911 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6912 (int_array_type_node): Remove.
6913 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6914
9e36c9ed
MP
69152013-12-05 Marek Polacek <polacek@redhat.com>
6916
6917 PR c/52023
6918 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6919 [ADJUST_FIELD_ALIGN].
6920
296674db
JM
69212013-12-04 Joseph Myers <joseph@codesourcery.com>
6922
6923 PR c/52023
6924 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6925 and check field alignment if set.
6926 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6927 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6928
b1726d6c 69292013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6930 Marek Polacek <polacek@redhat.com>
6931
6932 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6933 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6934
d7947e19
L
69352013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6936
6937 PR c/59309
6938 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6939 arguments.
6940
fad7652e
JJ
69412013-11-29 Jakub Jelinek <jakub@redhat.com>
6942
6943 PR c/59280
6944 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6945 goto invalid. If it is error_mark_node, don't issue further
6946 diagnostics.
6947
8b5e1202
SO
69482013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
6949
6950 * c.opt (Wopenmp-simd): New.
6951
0a508bb6
JJ
69522013-11-22 Jakub Jelinek <jakub@redhat.com>
6953
6954 * c-ubsan.h (ubsan_instrument_return): New prototype.
6955 * c-ubsan.c (ubsan_instrument_return): New function.
6956
2fb9a547
AM
69572013-11-22 Andrew MacLeod <amacleod@redhat.com>
6958
6959 * c-common.c: Add required include files from gimple.h.
6960 * c-gimplify.c: Likewise
6961 * cilk.c: Likewise
6962
8400e75e
DM
69632013-11-22 David Malcolm <dmalcolm@redhat.com>
6964
6965 * c-common.c (unsafe_conversion_p): Remove use of
6966 EXPR_LOC_OR_HERE macro.
6967 (conversion_warning): Likewise.
6968 (warnings_for_convert_and_check): Likewise.
6969 (warn_for_collisions_1): Likewise.
6970 (shorten_compare): Likewise, and remove use of in_system_header
6971 macro, using the location from the former.
6972 * c-lex.c (dump_one_header): Remove use of input_filename macro.
6973 (cb_def_pragma): Remove use of in_system_header macro.
6974 (lex_string): Likewise.
6975 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
6976
eb1ce453
KZ
69772013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6978 Mike Stump <mikestump@comcast.net>
6979 Richard Sandiford <rdsandiford@googlemail.com>
6980
6981 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
6982 instead of TREE_INT_CST_LOW, in cases where there is a protecting
6983 tree_fits_shwi_p or tree_fits_uhwi_p.
6984 (dump_generic_ada_node): Likewise.
6985 * c-format.c (check_format_arg): Likewise.
6986 * c-pretty-print.c (pp_c_integer_constant): Likewise.
6987
6b3b8c27
KZ
69882013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
6989
6990 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
6991
49b0aa18
JC
69922013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
6993
6994 PR c/53001
6995 * c-common.c (unsafe_conversion_p): Make this function
6996 return an enumeration with more detail.
6997 (conversion_warning): Use the new return type of
6998 unsafe_conversion_p to separately warn either about conversions
6999 that lower floating point number precision or about the other
7000 kinds of conversions.
7001 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7002 (unsafe_conversion_p): switching return type to
7003 conversion_safety enumeration.
49b0aa18
JC
7004 * c.opt: Adding new warning -Wfloat-conversion and
7005 enabling it with -Wconversion.
7006
b826515a
BS
70072013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7008
8e745a17
JJ
7009 * c-opts.c: Include plugin.h.
7010 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7011
b9a55b13
MP
70122013-11-19 Marek Polacek <polacek@redhat.com>
7013
7014 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7015 call.
7016 (ubsan_instrument_shift): Likewise.
7017 (ubsan_instrument_vla): Likewise.
7018
7d362f6c
RS
70192013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7020
7021 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7022 cast to unsigned type.
7023
386b1f1f
RS
70242013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7025
7026 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7027 tree_low_cst.
7028 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7029 rather than tree_low_cst.
7030
ae7e9ddd
RS
70312013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7032
7033 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7034 tree_to_uhwi throughout.
7035
9439e9a1
RS
70362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7037
7038 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7039 tree_low_cst (..., 0) with tree_to_shwi throughout.
7040
cc269bb6
RS
70412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7042
7043 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7044 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7045
9541ffee
RS
70462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7047
7048 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7049 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7050
c02065fc
AH
70512013-11-15 Aldy Hernandez <aldyh@redhat.com>
7052
7053 * c-cilkplus.c: New file.
7054 * c-common.c (readonly_error): Add location argument.
7055 * c-common.h (readonly_error): Same.
7056 (c_finish_cilk_clauses): Protoize.
7057 (c_check_cilk_loop): Same.
7058 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7059 Do not fail on error_mark_node.
7060 Abstract increment canonicalization to here...
7061 (c_omp_for_incr_canonicalize_ptr): New.
7062 c-pragma.c (init_pragma): Register "simd" pragma.
7063 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7064 (enum pragma_cilk_clause): New.
7065
9cc65f15
RS
70662013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7067
7068 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7069 wchar_type and host_integerp checks.
7070
18f429e2
AM
70712013-11-14 Andrew MacLeod <amacleod@redhat.com>
7072
7073 * c-common.c: Likewise.
7074 * c-gimplify.c: Likewise.
7075 * cilk.c: Likewise.
7076
d8a2d370
DN
70772013-11-14 Diego Novillo <dnovillo@google.com>
7078
7079 * c-common.c: Include fold-const.h.
7080 Include stor-layout.h.
7081 Include calls.h.
7082 Include stringpool.h.
7083 Include attribs.h.
7084 Include varasm.h.
7085 Include trans-mem.h.
7086 * c-cppbuiltin.c: Include stor-layout.h.
7087 Include stringpool.h.
7088 * c-format.c: Include stringpool.h.
7089 * c-lex.c: Include stringpool.h.
7090 Include stor-layout.h.
7091 * c-pragma.c: Include stringpool.h.
7092 Include attribs.h.
7093 Include varasm.h.
7094 Include gcc-symtab.h.
7095 * c-pretty-print.c: Include stor-layout.h.
7096 Include attribs.h.
7097 * cilk.c: Include stringpool.h.
7098 Include calls.h.
7099
38b7bc7f
JM
71002013-11-13 Joseph Myers <joseph@codesourcery.com>
7101
7102 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7103 * c-common.c (c_common_reswords): Add __auto_type.
7104 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7105
45b0be94
AM
71062013-11-12 Andrew MacLeod <amacleod@redhat.com>
7107
18f429e2
AM
7108 * c-common.c: Include gimplify.h.
7109 * c-gimplify.c: Likewise.
7110 * cilk.c: Likewise.
7111 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7112 * c-ubsan.c: Don't include gimple.h.
45b0be94 7113
582d9b50
JM
71142013-11-12 Joseph Myers <joseph@codesourcery.com>
7115
7116 * c-common.c (c_common_reswords): Add _Thread_local.
7117
6b28e197
JM
71182013-11-09 Joseph Myers <joseph@codesourcery.com>
7119
7120 * c-common.c (atomic_size_supported_p): New function.
7121 (resolve_overloaded_atomic_exchange)
7122 (resolve_overloaded_atomic_compare_exchange)
7123 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7124 Use it instead of comparing size with a local list of sizes.
7125
267bac10
JM
71262013-11-07 Andrew MacLeod <amacleod@redhat.com>
7127 Joseph Myers <joseph@codesourcery.com>
7128
7129 * c-common.h (enum rid): Add RID_ATOMIC.
7130 * c-common.c (c_common_reswords): Add _Atomic.
7131 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7132 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7133 * c-format.c (check_format_types): Check for extra _Atomic
7134 qualifiers in format argument.
7135 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7136 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7137
5157b91e
TB
71382013-11-06 Tobias Burnus <burnus@net-b.de>
7139
7140 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7141
6dbe0958
JM
71422013-11-06 Joseph Myers <joseph@codesourcery.com>
7143
7144 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7145 standards modes.
7146 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7147 to mean lack of IEEE 754 support.
7148
e8ff5196
TB
71492013-11-05 Tobias Burnus <burnus@net-b.de>
7150
7151 * c.opt (-Wdate-time): New option
7152 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7153
254a0760
JM
71542013-11-05 Joseph Myers <joseph@codesourcery.com>
7155
7156 * c-cppbuiltin.c (cpp_iec_559_value): Test
7157 flag_excess_precision_cmdline not flag_excess_precision.
7158
6d7f7e0a
TB
71592013-11-05 Tobias Burnus <burnus@net-b.de>
7160
7161 * c.opt (fopenmp-simd): New option.
7162 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7163 (omp_pragmas): ... this new struct.
7164 (c_pp_lookup_pragma): Also walk omp_pragmas.
7165 (init_pragma): Init pragmas for -fopenmp-simd.
7166
55a7f02f
MP
71672013-11-04 Marek Polacek <polacek@redhat.com>
7168
7169 PR c++/58979
7170 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7171
9193fb05
JM
71722013-11-04 Joseph Myers <joseph@codesourcery.com>
7173
7174 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7175 New functions.
7176 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7177
94159ecf
EB
71782013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7179
7180 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7181 (dump_ada_specs): Adjust prototype of second callback.
7182 * c-ada-spec.c (cpp_check): New global variable.
7183 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7184 (print_generic_ada_decl): Likewise.
7185 (has_static_fields): Change return type to bool and add guard.
7186 (has_nontrivial_methods): New predicate.
7187 (is_tagged_type): Change return type to bool.
7188 (separate_class_package): Call has_nontrivial_methods.
7189 (pp_ada_tree_identifier): Minor tweaks.
7190 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7191 (dump_ada_array_domains): Likewise.
7192 (dump_ada_array_type): Likewise.
7193 (dump_template_types): Remove cpp_check parameter and do not pass it to
7194 dump_generic_ada_node.
7195 (dump_ada_template): Likewise.
7196 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7197 recursively.
7198 (print_ada_methods): Change return type to integer. Remove cpp_check
7199 parameter and do not pass it down.
7200 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7201 dump_generic_ada_node.
7202 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7203 accessing methods.
7204 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7205 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7206 value of print_ada_methods.
7207 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7208 Set cpp_check to it before invoking dump_ada_nodes.
7209 (dump_ada_specs): Likewise.
7210
b906f4ca
MP
72112013-11-03 Marek Polacek <polacek@redhat.com>
7212
7213 * c-ubsan.c: Don't include hash-table.h.
7214 (ubsan_instrument_vla): New function.
7215 * c-ubsan.h: Declare it.
7216
5e20cdc9
DM
72172013-10-31 David Malcolm <dmalcolm@redhat.com>
7218
7219 Automated part of renaming of symtab_node_base to symtab_node.
7220
7221 Patch autogenerated by rename_symtab.py from
7222 https://github.com/davidmalcolm/gcc-refactoring-scripts
7223 revision 58bb219cc090b2f4516a9297d868c245495ee622
7224
7225 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7226 symtab_node_base to symtab_node.
7227
7057e645
ESR
72282013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7229
8e745a17 7230 Implement C++14 digit separators.
7057e645
ESR
7231 * c-lex.c (interpret_float): Remove digit separators from scratch string
7232 before building real literal.
7233
193ea7bc
JJ
72342013-10-30 Jakub Jelinek <jakub@redhat.com>
7235
7236 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7237
939b37da
BI
72382013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7239
7240 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7241 fields.
7242 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7243 enabled.
7244 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7245 (insert_cilk_frame): New prototype.
7246 (cilk_init_builtins): Likewise.
7247 (gimplify_cilk_spawn): Likewise.
7248 (c_cilk_install_body_w_frame_cleanup): Likewise.
7249 (cilk_detect_spawn_and_unwrap): Likewise.
7250 (cilk_set_spawn_marker): Likewise.
7251 (build_cilk_sync): Likewise.
7252 (build_cilk_spawn): Likewise.
7253 * cilk.c: New file.
7254
67348ccc
DM
72552013-10-29 David Malcolm <dmalcolm@redhat.com>
7256
7257 Patch autogenerated by refactor_symtab.py from
7258 https://github.com/davidmalcolm/gcc-refactoring-scripts
7259 revision 58bb219cc090b2f4516a9297d868c245495ee622
7260
7261 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7262 to a true class hierarchy.
7263 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7264
d570872d
RS
72652013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7266
7267 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7268
98906124
JL
72692013-10-26 Jeff Law <law@redhat.com>
7270
adfac8df
JJ
7271 * c-common.c (c_define_builtins): Remove mudflap support.
7272 * c.opt: Ignore and warn for mudflap options.
98906124 7273
d73749df 72742013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7275
7276 PR other/33426
7277 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7278 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7279
3f04b1bb
JM
72802013-10-23 Jason Merrill <jason@redhat.com>
7281
7282 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7283
acf0174b
JJ
72842013-10-11 Jakub Jelinek <jakub@redhat.com>
7285
acd15a28
JJ
7286 * c-common.h (omp_clause_mask::operator !=): New method.
7287 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7288 instead of if (mask & something) tests everywhere.
7289
acf0174b
JJ
7290 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7291 201307 instead of 201107.
7292 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7293 (c_common_attribute_table): Add "omp declare target" and
7294 "omp declare simd" attributes.
7295 (handle_omp_declare_target_attribute,
7296 handle_omp_declare_simd_attribute): New functions.
7297 * c-omp.c: Include c-pragma.h.
7298 (c_finish_omp_taskgroup): New function.
7299 (c_finish_omp_atomic): Add swapped argument, if true,
7300 build the operation first with rhs, lhs arguments and use NOP_EXPR
7301 build_modify_expr.
7302 (c_finish_omp_for): Add code argument, pass it down to make_code.
7303 (c_omp_split_clauses): New function.
7304 (c_split_parallel_clauses): Removed.
7305 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7306 c_omp_declare_simd_clauses_to_decls): New functions.
7307 * c-common.h (omp_clause_mask): New type.
7308 (OMP_CLAUSE_MASK_1): Define.
7309 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7310 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7311 omp_clause_mask::operator |, omp_clause_mask::operator &,
7312 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7313 omp_clause_mask::operator ==): New methods.
7314 (enum c_omp_clause_split): New.
7315 (c_finish_omp_taskgroup): New prototype.
7316 (c_finish_omp_atomic): Add swapped argument.
7317 (c_finish_omp_for): Add code argument.
7318 (c_omp_split_clauses): New prototype.
7319 (c_split_parallel_clauses): Removed.
7320 (c_omp_declare_simd_clauses_to_numbers,
7321 c_omp_declare_simd_clauses_to_decls): New prototypes.
7322 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7323 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7324 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7325 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7326 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7327 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7328 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7329 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7330 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7331 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7332 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7333 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7334 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7335 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7336 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7337 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7338 PRAGMA_OMP_CLAUSE_UNIFORM.
7339
826cacfe
MG
73402013-10-09 Marc Glisse <marc.glisse@inria.fr>
7341
7342 PR tree-optimization/20318
7343 * c-common.c (handle_returns_nonnull_attribute): New function.
7344 (c_common_attribute_table): Add returns_nonnull.
7345
2284b034
MG
73462013-10-03 Marc Glisse <marc.glisse@inria.fr>
7347
7348 PR c++/19476
7349 * c.opt (fcheck-new): Move to common.opt.
7350
b56e9788
MP
73512013-09-25 Marek Polacek <polacek@redhat.com>
7352 Jakub Jelinek <jakub@redhat.com>
7353
7354 PR sanitizer/58413
7355 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7356 an expression if we can prove it is correct.
7357 (ubsan_instrument_division): Likewise. Remove unnecessary
7358 check.
7359
ce6923c5
MP
73602013-09-18 Marek Polacek <polacek@redhat.com>
7361
7362 PR sanitizer/58411
7363 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7364 Declare it.
7365 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7366
fb5610fb
IS
73672013-09-14 Iain Sandoe <iain@codesourcery.com>
7368
7369 PR target/48094
7370 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7371 fobjc-gc, freplace-objc-classes): Accept for LTO.
7372
88b0e79e
JC
73732013-09-13 Jacek Caban <jacek@codeweavers.com>
7374
7375 * c-target.def: New hook
7376
c9b0866a
PC
73772013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7378
7379 PR c++/43452
7380 * c.opt (Wdelete-incomplete): Add.
7381
0af94e6f
JR
73822013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7383
7384 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7385 (vector_types_compatible_elements_p): New function.
7386 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7387 declaration.
7388 (vector_types_compatible_elements_p): Declare.
7389
7c26172c
GDR
73902013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7391
7392 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7393 a virtual member function.
7394 (pp_simple_type_specifier): Remove.
7395 (pp_c_type_specifier): Likewise.
7396 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7397 Rename from pp_c_type_specifier. Adjust.
7398 (c_pretty_printer::c_pretty_printer): Do not assign to
7399 simple_type_specifier.
7400
20059c8b
GDR
74012013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7402
7403 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7404 member function.
7405 (c_pretty_printer::storage_class_specifier): Likewise.
7406 (c_pretty_printer::initializer): Likewise.
7407 (pp_declaration): Remove.
7408 (pp_declaration_specifiers): Likewise.
7409 (pp_abstract_declarator): Likewise.
7410 (pp_declarator): Likewise.
7411 (pp_type_id): Likewise.
7412 (pp_statement): Likewise.
7413 (pp_constant): Likewise.
7414 (pp_id_expression): Likewise.
7415 (pp_primary_expression): Likewise.
7416 (pp_unary_expression): Likewise.
7417 (pp_multiplicative_expression): Likewise.
7418 (pp_conditional_expression): Likewise.
7419 (pp_assignment_expression): Likewise.
7420 (pp_expression): Likewise.
7421 (pp_c_type_id): Likewise.
7422 (pp_c_storage_class_specifier): Likewise.
7423 * c-pretty-print.c (pp_c_type_cast): Tidy.
7424 (pp_c_pointer): Likewise.
7425 (pp_c_type_specifier): Likewise.
7426 (pp_c_parameter_type_list): Likewise.
7427 (pp_c_function_definition): Likewise.
7428 (pp_c_init_declarator): Likewise.
7429 (pp_c_initializer_list): Likewise.
7430 (pp_c_constructor_elts): Likewise.
7431 (c_pretty_printer::direct_abstract_declarator): Likewise.
7432 (c_pretty_printer::declaration_specifiers): Likewise.
7433 (c_pretty_printer::primary_expression): Likewise.
7434 (c_pretty_printer::postfix_expression): Likewise.
7435 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7436 (c_pretty_printer::storage_class_specifier): Rename from
7437 pp_c_storage_class_specifier.
7438 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7439 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7440 storage_class_specifier, initializer, offset_list, flags.
7441
de5a5fa1
MP
74422013-08-30 Marek Polacek <polacek@redhat.com>
7443
7444 * c-ubsan.c: New file.
7445 * c-ubsan.h: New file.
7446
8f0e4d72
GDR
74472013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7448
7449 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7450 member function.
7451 (c_pretty_printer::declaration_specifiers): Likewise.
7452 (c_pretty_printer::declarator): Likewise.
7453 (c_pretty_printer::abstract_declarator): Likewise.
7454 (c_pretty_printer::direct_abstract_declarator): Likewise.
7455 (c_pretty_printer::direct_declarator): Likewise.
7456 (c_pretty_printer::function_specifier): Likewise.
7457 (pp_declaration): Adjust.
7458 (pp_declaration_specifiers): Likewise.
7459 (pp_abstract_declarator): Likewise.
7460 (pp_direct_declarator): Likewise.
7461 (pp_function_specifier): Likewise.
7462 (pp_direct_abstract_declarator): Remove as unused.
7463 (pp_c_declaration): Remove.
7464 (pp_c_declaration_specifiers): Likewise.
7465 (pp_c_declarator): Likewise.
7466 (pp_c_direct_declarator): Likewise.
7467 (pp_c_function_specifier): Likewise.
7468 (pp_c_direct_abstract_declarator): Likewise.
7469 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7470 from pp_c_abstract_declarator. Adjust.
7471 (c_pretty_printer::direct_abstract_declarator): Rename from
7472 pp_c_direct_abstract_declarator. Adjust.
7473 (c_pretty_printer::function_specifier): Rename from
7474 pp_c_function_specifier. Adjust.
7475 (c_pretty_printer::declaration_specifiers): Rename from
7476 pp_c_declaration_specifiers. Adjust.
7477 (c_pretty_printer::direct_declarator): Rename from
7478 pp_c_direct_declarator. Adjust.
7479 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7480 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7481 (c_pretty_printer::c_pretty_printer): Do not assign to
7482 declaration, declaration_specifiers, declarator,
7483 direct_declarator, direct_abstract_declarator, function_specifier.
7484
00d34d3a
GDR
74852013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7486
7487 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7488 virtual member function.
7489 (c_pretty_printer::multiplicative_expression): Likewise.
7490 (c_pretty_printer::conditional_expression): Likewise.
7491 (c_pretty_printer::assignment_expression): Likewise.
7492 (c_pretty_printer::expression): Likewise.
7493 (pp_unary_expression): Adjust.
7494 (pp_multiplicative_expression): Likewise.
7495 (pp_assignment_expression): Likewise.
7496 (pp_conditional_expression): Likewise.
7497 (pp_expression): Likewise.
7498 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7499 from pp_c_unary_expression. Adjust.
7500 (c_pretty_printer::multiplicative_expression): Rename from
7501 pp_c_multiplicative_expression. Adjust.
7502 (c_pretty_printer::conditional_expression): Rename from
7503 pp_c_conditional_expression. Adjust.
7504 (c_pretty_printer::assignment_expression): Rename from
7505 pp_c_assignment_expression. Adjust.
7506 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7507 (c_pretty_printer::c_pretty_printer): Do not assign to
7508 unary_expression, multiplicative_expression,
7509 conditional_expression, expression.
7510
fb22178f
GDR
75112013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7512
7513 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7514 virtual member function.
7515 (pp_postfix_expression): Adjust.
7516 (pp_c_postfix_expression): Remove.
7517 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7518 from pp_c_postfix_expression. Adjust.
7519 (c_pretty_printer::c_pretty_printer): Do not assign to
7520 postfix_expression.
7521
7ecc2600
GDR
75222013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7523
7524 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7525 virtua member function.
7526 (pp_primary_expression): Adjust.
7527 (pp_c_primary_expression): Remove.
7528 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7529 from pp_c_primary_expression. Adjust.
7530 (pp_c_initializer_list): Use pp_primary_expression.
7531 (c_pretty_printer::c_pretty_printer): Do not assign to
7532 primary_expression.
7533
0691175f
GDR
75342013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7535
7536 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7537 * c-pretty-print.c (M_): Remove.
7538 (c_pretty_printer::translate_string): Define.
7539 (pp_c_type_specifier): Use it.
7540 (pp_c_primary_expression): Likewise.
7541 (pp_c_expression): Likewise.
7542
66dfe4c4
GDR
75432013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7544
7545 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7546 virtual function.
7547 (pp_c_id_expression): Remove.
7548 (pp_id_expression): Adjust.
7549 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7550 pp_c_id_expression. Adjust.
7551 (pp_c_postfix_expression): Use pp_id_expression.
7552 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7553
ca43e9d5
GDR
75542013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7555
7556 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7557 member function.
7558 (pp_constant): Adjust.
7559 (pp_c_constant): Remove.
7560 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7561 pp_c_constant. Adjust.
7562 (pp_c_constant)
7563 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7564 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7565
da6ca2b5
GDR
75662013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7567
7568 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7569 (c_pretty_printer::c_pretty_printer): Declare.
7570 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7571 c_pretty_printer_init. Adjust.
7572 (print_c_tree): Do not call c_pretty_printer_init.
7573 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7574
65a372f4
AC
75752013-08-09 Arnaud Charlet <charlet@adacore.com>
7576
7577 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7578
fd9b0f32
PC
75792013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7580
7581 PR c++/58080
7582 * c-common.c (pointer_int_sum): Add bool parameter.
7583 * c-common.h (pointer_int_sum): Adjust declaration.
7584
e0aec1e9
GDR
75852013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7586
7587 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7588 c_pretty_printer variable.
7589
b066401f
GDR
75902013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7591
7592 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7593 (pp_base): Remove.
7594 (pp_c_base): Likewise. Adjust users.
7595 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7596 (pp_c_whitespace): Do not call pp_base.
7597 (pp_c_left_paren): Likewise.
7598 (pp_c_right_paren): Likewise.
7599 (pp_c_left_brace): Likewise.
7600 (pp_c_right_brace): Likewise.
7601 (pp_c_left_bracket): Likewise.
7602 (pp_c_right_bracket): Likewise.
7603 (pp_c_dot): Likewise.
7604 (pp_c_ampersand): Likewise.
7605 (pp_c_star): Likewise.
7606 (pp_c_arrow): Likewise.
7607 (pp_c_semicolon): Likewise.
7608 (pp_c_complement): Likewise.
7609 (pp_c_exclamation): Likewise.
7610 (pp_c_direct_declarator): Likewise.
7611 (pp_c_ws_string): Likewise.
7612 (pp_c_identifier): Likewise.
7613 (pp_c_statement): Likewise.
7614 (print_c_tree): Likewise.
7615
65e5a578
ESR
76162013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7617
7618 PR c++/58072
7619 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7620 provide useful error strings.
7621
137a1a27
GDR
76222013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7623
7624 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7625 printer functions instead of pp_string or operators and punctuators.
7626 (dump_generic_ada_node): Likewise.
7627 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7628 (pp_c_relational_expression): Likewise.
7629 (pp_c_logical_or_expression): Likewise.
7630
07838b13
GDR
76312013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7632
7633 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7634 functions instead of pp_character.
7635 (pp_ada_tree_identifier): Likewise.
7636 (dump_ada_double_name): Likewise.
7637 (dump_ada_function_declaration): Likewise.
7638 (dump_ada_array_domains): Likewise.
7639 (dump_template_types): Likewise.
7640 (dump_generic_ada_node): Likewise.
7641 (print_ada_declaration): Likewise.
7642 (print_ada_struct_decl): Likewise.
7643 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7644
433cc7b0
TT
76452013-07-23 Tom Tromey <tromey@redhat.com>
7646
7647 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7648 * c-common.c (c_common_reswords): Add _Generic.
7649
688010ba
OB
76502013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7651
7652 * c-common.c: Fix typos.
7653 * c-common.h: Likewise.
7654
2a99e5e6
LL
76552013-07-13 Lubos Lunak <l.lunak@suse.cz>
7656
7657 PR c++/55203
7658 * c-common.c (c_common_attribute_table): Add warn_unused.
7659 (handle_warn_unused_attribute): New.
7660
c26302d5
JJ
76612013-07-10 Jakub Jelinek <jakub@redhat.com>
7662
7663 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7664 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7665
dfeadaa0
PC
76662013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7667
7668 PR c++/57869
7669 * c.opt: Add Wconditionally-supported.
7670
6a2fa4b2
GS
76712013-07-08 Graham Stott <graham.stott@btinternet.com>
7672
adfac8df 7673 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7674 unused variables l_length and l_node.
7675
ecdbd01a 76762013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7677
7678 PR c/57821
7679 * c-common.c (complete_array_type): Delay folding first index
7680 like other indices. When folding, check for index overflow.
7681
bedc293e
MG
76822013-06-27 Marc Glisse <marc.glisse@inria.fr>
7683
7684 PR c++/57509
7685 * c-common.h (c_build_vec_perm_expr): New complain argument.
7686 * c-common.c (c_build_vec_perm_expr): Likewise.
7687 Use save_expr also in C++.
7688
604b2bfc
GDR
76892013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7690
7691 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7692 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7693 * c-opts.c (c_common_post_options): Likewise.
7694
dfeadaa0 76952013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7696
7697 * array-notation-common.c (length_mismatch_in_expr): Changed the
7698 parameter type's from a dynamic array to a vec_tree. Also removed
7699 the size parameters.
7700 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7701 the change above.
7702
2ce86d2e
BI
77032013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7704
7705 * c-common.h (struct cilkplus_an_parts): New structure.
7706 (struct cilkplus_an_loop_parts): Likewise.
7707 (cilkplus_extract_an_triplets): New prototype.
7708 (fix_sec_implicit_args): Likewise.
7709 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7710 (fix_sec_implicit_args): Likewise.
604b2bfc 7711
07a6825b
BI
77122013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7713
7714 * array-notation-common.c (find_inv_trees): Removed an unwanted
7715 typecasting.
7716 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7717 enum rid to enum tree_code.
7718
08346abd
JH
77192013-06-11 Jan Hubicka <jh@suse.cz>
7720
7721 * c-common.c (handle_alias_ifunc_attribute): Do not set
7722 DECL_EXTERNAL for weakref variables.
7723 * c-pragma.c (handle_pragma_weak): Make sure aliases
7724 are not declared as external.
7725
d60f1706
BI
77262013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7727
7728 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7729 function from c/c-array-notation.c.
7730 (is_cilkplus_reduce_builtin): Likewise.
7731 (find_rank): Likewise.
7732 (extract_array_notation_exprs): Likewise.
7733 (replace_array_notations): Likewise.
7734 (find_inv_trees): Likewise.
7735 (replace_inv_trees): Likewise.
7736 (contains_array_notation_expr): Likewise.
7737 (find_correct_array_notation_type): Likewise.
7738 * c-common.h (struct inv_list): Moved this struct from the file
7739 c/c-array-notation.c and added a new field called additional tcodes.
7740 (length_mismatch_in_expr_p): New prototype.
7741 (is_cilkplus_reduce_builtin): Likewise.
7742 (find_rank): Likewise.
7743 (extract_array_notation_exprs): Likewise.
7744 (replace_array_notation): Likewise.
7745 (find_inv_trees): Likewise.
7746 (replace_inv_trees): Likewise.
7747 (find_correct_array_notation_type): Likewise.
dfeadaa0 7748
36536d79
BI
77492013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7750
7751 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7752 function array_notation_init_builtins is called.
7753 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7754 * c-common.def (ARRAY_NOTATION_REF): New tree.
7755 * c-common.h (build_array_notation_expr): New function declaration.
7756 (build_array_notation_ref): Likewise.
7757 (extract_sec_implicit_index_arg): New extern declaration.
7758 (is_sec_implicit_index_fn): Likewise.
7759 (ARRAY_NOTATION_CHECK): New define.
7760 (ARRAY_NOTATION_ARRAY): Likewise.
7761 (ARRAY_NOTATION_START): Likewise.
7762 (ARRAY_NOTATION_LENGTH): Likewise.
7763 (ARRAY_NOTATION_STRIDE): Likewise.
7764 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7765 ARRAY_NOTATION_REF.
7766 (pp_c_expression): Likewise.
7767 * c.opt (flag_enable_cilkplus): New flag.
7768 * array-notation-common.c: New file.
7769
f7716d57
JJ
77702013-05-14 Jakub Jelinek <jakub@redhat.com>
7771
7772 PR c++/57274
7773 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7774
a5e0cd1d
MG
77752013-05-10 Marc Glisse <marc.glisse@inria.fr>
7776
7777 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7778 vectors.
7779
f6bc1c4a
HS
77802013-05-07 Han Shen <shenhan@google.com>
7781
7782 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7783
3f12f6e9
SKS
77842013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7785
7786 * c-common.c (check_user_alignment): Emit error for negative values.
7787
61949153
PC
77882013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7789
7790 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7791
e93e18e9
PC
77922013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7793
7794 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7795 __GXX_EXPERIMENTAL_CXX1Y__.
7796
44d90fe1 77972013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7798 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7799
7800 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7801 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7802 to simply use OPT_Wpointer_arith.
7803 (c_sizeof_or_alignof_type): Likewise.
7804
13f39b2e
PC
78052013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7806
7807 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7808
4b84d650
JJ
78092013-04-12 Jakub Jelinek <jakub@redhat.com>
7810
7811 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7812 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7813 specifiers.
7814
fb037b5d
SB
78152013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7816
7817 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7818
4e856798
PC
78192013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7820
7821 * c-common.c (pointer_int_sum): Remove dead code.
7822
4b1baac8
RS
78232013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7824
7825 PR middle-end/56524
7826 * c-common.c (handle_optimize_attribute): Don't call
7827 save_optabs_if_changed.
7828
0b50e654
JJ
78292013-03-05 Jakub Jelinek <jakub@redhat.com>
7830
7831 PR middle-end/56461
7832 * c-pch.c (pch_init): Free target_validity at the end.
7833
48c41403
JJ
78342013-03-04 Jakub Jelinek <jakub@redhat.com>
7835
7836 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7837
e664c61c
KS
78382013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7839 Jakub Jelinek <jakub@redhat.com>
7840
7841 PR sanitizer/56454
7842 * c-common.c (handle_no_sanitize_address_attribute): New function.
7843 (c_common_attribute_table): Add no_sanitize_address attribute.
7844 (handle_no_address_safety_analysis_attribute): Add
7845 no_sanitize_address attribute, not no_address_safety_analysis
7846 attribute.
7847
a475fd3d 78482013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7849
7850 PR target/52555
7851 * c-common.c (handle_optimize_attribute): Call
7852 save_optabs_if_changed.
7853
f6007d99
JJ
78542013-02-18 Jakub Jelinek <jakub@redhat.com>
7855 Steven Bosscher <steven@gcc.gnu.org>
7856
7857 PR pch/54117
7858 * c-opts.c (c_common_post_options): If debug info is enabled
7859 and non-dwarf*, refuse to load PCH files and when writing PCH
7860 file warn.
7861
cf35e2b1
JJ
78622013-02-05 Jakub Jelinek <jakub@redhat.com>
7863
7864 PR middle-end/56167
7865 * c-common.c (handle_error_attribute): Fix condition.
7866
32887460
JJ
78672013-01-30 Jakub Jelinek <jakub@redhat.com>
7868
7869 PR c++/55742
7870 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7871
5af057d8
JM
78722013-01-18 Jason Merrill <jason@redhat.com>
7873
7874 PR target/54908
7875 * c.opt (-fextern-tls-init): New.
7876 * c-opts.c (c_common_post_options): Handle it.
7877
cc83c823
JJ
78782013-01-09 Jakub Jelinek <jakub@redhat.com>
7879
7880 PR c/48418
7881 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7882 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7883 and is either negative or bigger or equal to type precision
7884 of the first operand.
7885
a859517f
MP
78862012-12-03 Marek Polacek <polacek@redhat.com>
7887
7888 PR c/55570
7889 * c-common.c (check_user_alignment): Swap order of tests,
7890 check TREE_CODE first.
7891
2d7aa578
ESR
78922012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7893
7894 PR c++/52654
7895 * c-common.h (overflow_type): New enum.
7896 (build_userdef_literal): Add overflow_type argument.
7897 (tree_userdef_literal): Add overflow_type.
7898 (USERDEF_LITERAL_OVERFLOW): New access macro.
7899 * c-common.c (build_userdef_literal): Add overflow_type
7900 argument.
7901 * c-lex.c (c_lex_with_flags): Add overflow_type to
7902 build_userdef_literal calls.
7903 (interpret_integer, interpret_float): Add overflow_type argument.
7904
cc3c4f62
RB
79052012-11-28 Richard Biener <rguenther@suse.de>
7906
7907 PR c/35634
7908 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7909 here and use a type with proper overflow behavior for types that would
7910 need to be promoted for the arithmetic.
7911
77bc5132
JJ
79122012-11-23 Jakub Jelinek <jakub@redhat.com>
7913
7914 PR sanitizer/55435
7915 * c-common.c (handle_no_address_safety_analysis_attribute): New
7916 function.
7917 (c_common_attribute_table): Add no_address_safety_analysis.
7918
5dc99c46
SB
79192012-11-16 Simon Baldwin <simonb@google.com>
7920
7921 * c.opt: Add f[no-]canonical-system-headers.
7922 * c-opts.c (c_common_handle_option): Handle
7923 OPT_fcanonical_system_headers.
7924
a4a0016d
ESR
79252012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7926
7927 PR c++/54413
7928 * c-opts.c (c_common_handle_option): Set new flags.
7929 * c.opt: Describe new flags.
7930
7dbb85a7
JM
79312012-11-09 Jason Merrill <jason@redhat.com>
7932
7933 * c.opt (Wabi-tag): New.
7934
ad7bac31
AK
79352012-11-09 Andi Kleen <ak@linux.intel.com>
7936
7937 PR 55139
7938 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7939 MEMMODEL_MASK
ad7bac31 7940
7332899a
MLI
79412012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7942
7943 PR c/53063
7944 * c.opt (Wformat): Make it Alias Wformat=1.
7945 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7946 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
7947 LangEnabledBy.
7948 (Wformat=): RejectNegative. Use LangEnabledBy.
7949 (Wnonnull): Use LangEnabledBy.
7950 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
7951 * c-format.c (set_Wformat): Delete.
7952 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
8e745a17
JJ
7953 (maybe_read_dollar_number): Likewise.
7954 (avoid_dollar_number): Likewise.
7955 (finish_dollar_format_checking): Likewise.
7956 (check_format_info): Likewise.
7957 (check_format_info_main): Likewise.
7958 (check_format_types): Likewise.
7959 (format_type_warning): Likewise.
7960 * c-common.c (int): Likewise.
7961 (check_function_sentinel): Likewise.
7962 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 7963
34a180a6
MLI
79642012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7965
7966 PR c/53063
7967 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
7968 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
7969 Use LangEnabledBy.
7970 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
7971 common.opt.
7972 (Wvariadic-macros): Init(1).
7973 * c-opts.c (c_common_handle_option): Do not handle them
7974 explicitly.
7975 (c_common_post_options): Likewise.
7976 (sanitize_cpp_opts): warn_unused_macros is now
7977 cpp_warn_unused_macros.
7978 (push_command_line_include): Likewise.
7979 * c-common.c (warn_unknown_pragmas): Do not define.
7980 * c-common.h (warn_unknown_pragmas): Do not declare.
7981
3f46d6a5
MLI
79822012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7983
7984 PR c/51294
7985 * c-common.c (conversion_warning): Handle conditional expressions.
7986
880661a4
JW
79872012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
7988
7989 PR c++/54930
7990 * c.opt (Wreturn_local_addr): Define new option.
7991
4514a96b
JM
79922012-10-25 Jason Merrill <jason@redhat.com>
7993
f14edc1a
JM
7994 * c.opt (Wvirtual-move-assign): New.
7995
4514a96b
JM
7996 * c.opt (Winherited-variadic-ctor): New.
7997
93100c6b
MG
79982012-10-25 Marc Glisse <marc.glisse@inria.fr>
7999
8000 PR c++/54427
8001 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8002
1efcb8c6
JM
80032012-10-23 Joseph Myers <joseph@codesourcery.com>
8004
8005 * c-common.h (pch_cpp_save_state): Declare.
8006 * c-target.def (c_preinclude): New hook.
8007 * c-opts.c (done_preinclude): New.
8008 (push_command_line_include): Handle default preincluded header.
8009 (cb_file_change): Call pch_cpp_save_state when calling
8010 push_command_line_include.
8011 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8012 (pch_cpp_save_state): New.
8013 (pch_init): Call pch_cpp_save_state conditionally, instead of
8014 calling cpp_save_state.
8015
4a0ae68e
MLI
80162012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8017
8018 PR c/53063
8019 PR c/40989
8020 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8021 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8022 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8023 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8024 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8025 * c-opts.c (c_common_handle_option): Remove explicit handling from
8026 here.
8027 (c_common_post_options): Likewise.
8028
67e4210b
EB
80292012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8030
8031 * c-ada-spec.c (LOCATION_COL): Delete.
8032 (compare_location): New function.
8033 (compare_node): Use it.
8034 (compare_comment): Likewise.
8035
65d4f2cd
MLI
80362012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8037
8038 PR c/53063
8039 PR c/40989
8040 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8041 * c-opts.c (c_common_handle_option): Do not set them here. Add
8042 comment.
8043 (c_common_post_options): Likewise.
8044
909881cb
EB
80452012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8046
8047 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8048 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8049 Remove POINTER_TYPE handling, add large unsigned handling and use
8050 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8051
3a785c97
JJ
80522012-10-12 Jakub Jelinek <jakub@redhat.com>
8053
8054 PR c/54381
8055 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8056 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8057 locs and array of 3 trees instead of just single loc and single
8058 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8059 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8060 For *cmp* builtins that take two sources strings report warnings
8061 about first and second source, not about destination and source.
8062
5e54f81d
MG
80632012-10-12 Marc Glisse <marc.glisse@inria.fr>
8064
8065 PR c++/53055
8066 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8067
f5b02f1e
EB
80682012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8069
8070 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8071 declaring something coming from another file.
8072
b46dbc6c
AC
80732012-10-10 Arnaud Charlet <charlet@adacore.com>
8074
f5b02f1e 8075 PR ada/54845
b46dbc6c
AC
8076 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8077
5d9de0d0
PC
80782012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8079
8080 PR c++/54194
8081 * c-common.c (warn_about_parentheses): Add location_t parameter;
8082 use EXPR_LOC_OR_LOC.
8083 * c-common.h: Update declaration.
8084
a212e43f
MG
80852012-10-09 Marc Glisse <marc.glisse@inria.fr>
8086
8087 PR c++/54427
8088 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8089 more operations. Make error messages optional.
8090 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8091 (scalar_to_vector): Declare.
8092
b1db7f91
JM
80932012-10-08 Jason Merrill <jason@redhat.com>
8094
8095 * c-common.c (c_common_reswords): Add thread_local.
8096
e28d52cf
DS
80972012-10-08 Dodji Seketeli <dodji@redhat.com>
8098
8099 PR c++/53528 C++11 attribute support
8100 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8101 new functions.
8102 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8103 static function.
8104 (handle_aligned_attribute): In choose strictest alignment
8105 among many. Use new check_cxx_fundamental_alignment_constraints.
8106 (handle_transparent_union_attribute): In c++11 attribute syntax,
8107 don't look through typedefs.
8108
3b78de56
AC
81092012-10-04 Arnaud Charlet <charlet@adacore.com>
8110
8111 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8112 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8113 out of dumpfile.h.
8114
6040bb5f
DC
81152012-09-25 Dehao Chen <dehao@google.com>
8116
8117 PR middle-end/54645
3b78de56 8118 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8119 map when read in the pch.
8120
3f8257db 81212012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8122
8123 * c-ada-spec.c: Style fixes.
8124
3f8257db 81252012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8126
8127 * c.opt (-fada-spec-parent): Define new command line switch.
8128 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8129 is specified, generate binding spec as a child of the specified unit.
8130
0ccb505d
PC
81312012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8132 Manuel López-Ibáñez <manu@gcc.gnu.org>
8133
8134 PR c++/53210
8135 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8136
c583af79
AC
81372012-08-23 Arnaud Charlet <charlet@adacore.com>
8138
8139 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8140 for pointers, and add missing Convention C pragma.
8141 (print_ada_struct_decl): Add missing aliased keyword.
8142 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8143
1a4049e7
JJ
81442012-08-17 Jakub Jelinek <jakub@redhat.com>
8145
8146 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8147 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8148 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8149 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8150 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8151
70b5e7dc
RG
81522012-08-10 Richard Guenther <rguenther@suse.de>
8153
8154 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8155
f8923f7e
SB
81562012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8157
8158 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8159 instead of separate pp_newline and pp_flush.
8160 (print_c_tree): Likewise.
8161
e45abe1f
RH
81622012-07-26 Richard Henderson <rth@redhat.com>
8163
8164 * c-common.c (handle_hot_attribute): Allow labels.
8165 (handle_cold_attribute): Likewise.
8166
332f1d24
JJ
81672012-07-20 Jakub Jelinek <jakub@redhat.com>
8168
8169 PR c++/28656
8170 * c-common.c (check_function_nonnull): Handle multiple nonnull
8171 attributes properly.
8172
7ee2468b
SB
81732012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8174
8175 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8176 * c-ada-spec.c: Likewise.
8177 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8178
ee7b28eb
SB
81792012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8180
8181 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8182 Remove code conditional on it.
8183
6bdf3519
SB
81842012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8185
8186 * c-gimplify.c: Do not include basic-block.h.
8187 * c-common.c: Do not include linfuncs.h.
8188
532aafad
SB
81892012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8190
8191 * c-common.h: Include tree.h.
8192
8d0d1915
JM
81932012-07-02 Jason Merrill <jason@redhat.com>
8194
8195 PR c++/53524
8196 * c-common.c (get_priority): Call default_conversion.
8197
fbc873ad
UB
81982012-07-01 Uros Bizjak <ubizjak@gmail.com>
8199
8200 * c-pch.c (c_common_write_pch): Remove unused variables.
8201
d4a10d0a
SB
82022012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8203
8204 * cppspec.c: Moved from gcc/ to here.
8205
6f3a2e23
KT
82062012-06-27 Kai Tietz <ktietz@redhat.com>
8207
8208 PR preprocessor/37215
8209 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8210
8ca92d04
SB
82112012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8212
8213 * c-common.h (c_common_print_pch_checksum): Remove.
8214 * c-pch.c: Do not include output.h.
8215 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8216 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8217 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8218 (struct c_pch_header): Remove.
8219 (get_ident): Update gpch version.
8220 (pch_init): Do not print executable_checksum to asm_out_file.
8221 Do not fail if there is no asm_out_file to read back from. Set
8222 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8223 (c_common_write_pch): Verify that nothing was written to asm_out_file
8224 since pch_init was called. Do not write a c_pch_header, and do not
8225 copy from asm_out_file to the PCH.
8226 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8227 the content of asm_out_file from the PCH.
8228 (c_common_print_pch_checksum): Remove.
8229 * c-opts.c (c_common_init): Print out executable_checksum directly.
8230
70f42967
SB
82312012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8232
8233 * c-target.def (objc_declare_unresolved_class_reference,
8234 objc_declare_class_definition): Add new hooks.
8235
a8781821
SB
82362012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8237
8238 * c-lex.c: Do not include output.h.
8239 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8240 Remove uses of ASM_OUTPUT_IDENT.
8241
9e1a8dd1
RR
82422012-06-15 Marc Glisse <marc.glisse@inria.fr>
8243
8244 PR c++/51033
8245 * c-common.h (c_build_vec_perm_expr): Move decl here.
8246 * c-common.c (c_build_vec_perm_expr): Move definition
8247 here.
8248
6f07a821
SB
82492012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8250
8251 * c.opt (fconserve-space): Turn into a no-op.
8252
9faeb493 82532012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8254
8255 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8256 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8257 both the start and end of the function.
8258
a4b7d13c
SB
82592012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8260
8261 * c-common.c: Do not include output.h.
8262 * c-pragma.c: Likewise.
8263
c265f413
SA
82642012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8265
8266 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8267 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8268 (lang_decl_name): Handle namespace decls.
8269
be7a421e
SB
82702012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8271
8272 * c-ada-spec.c: Do not include output.h.
8273 * c-semantics.c: Likewise.
8274
65de6659
JM
82752012-05-29 Joseph Myers <joseph@codesourcery.com>
8276
8277 * c-common.c: Fix typo.
8278
ca5f4331
MM
82792012-05-29 Michael Matz <matz@suse.de>
8280
8281 * c-common.h (c_expand_decl): Remove prototype.
8282
4f7f7aca
MLI
82832012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8284
8285 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8286 * c-opts.c (c_common_handle_option): Remove code handling
8287 warn_missing_braces.
8288
4a792f9b
PC
82892012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8290
8291 PR c++/25137
8292 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8293 -Wmissing_braces.
8294
650dc14a
DS
82952012-05-22 Dodji Seketeli <dodji@redhat.com>
8296
8297 PR c++/53322
8298 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8299
9b095bf1
MLI
83002012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8301
8302 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8303 * c-opts.c (c_common_handle_option): Do not handle explicitly
8304 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8305
0b2c4be5
DS
83062012-05-16 Dodji Seketeli <dodji@redhat.com>
8307
8308 PR preprocessor/7263
8309 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
8310 to cpp_classify_number. For diagnostics, use the precise location
8311 instead of the global input_location.
8312
a1bde5af
PC
83132012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8314
d02924ef 8315 PR c++/11856
a1bde5af
PC
8316 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8317
d1ede5f4
BS
83182012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8319
a1bde5af 8320 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8321
f2bc201f
MLI
83222012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8323
8324 PR 53063
8325 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8326 Wreorder): Use LangEnabledBy.
8327 * c-opts.c (c_common_handle_option): Do not enable them
8328 explicitly. Call lang-specific generated functions.
8329 (c_common_post_options): Do not set them here.
8330
95744782
MLI
83312012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8332
8333 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8334 Wmissing-field-initializers,Wmissing-parameter-type,
8335 Wold-style-declaration,Woverride-init): Use EnabledBy.
8336 * c-opts.c (c_common_post_options): Do not set here explicitly.
8337
7d5a5747
MLI
83382012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8339
8340 PR 53063
8341 * c-opts.c (c_common_handle_option): Use handle_generated_option
8342 to enable sub-options.
8343
5a3c9cf2
PC
83442012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8345
8346 PR c++/53158
8347 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8348
3ac8781c
RG
83492012-05-10 Richard Guenther <rguenther@suse.de>
8350
8351 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8352 adjust commentary about TYPE_IS_SIZETYPE types.
8353
1e537948
MLI
83542012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8355
8356 PR c++/53261
8357 * c-common.c (warn_logical_operator): Check that argument of
8358 integer_zerop is not NULL.
8359
f2c4a785
MLI
83602012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8361
8362 PR c/43772
8363 * c-common.c (warn_logical_operator): Do not warn if either side
8364 is already true or false.
8365
50f305ca
MLI
83662012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8367
8368 PR c/51712
8369 * c-common.c (expr_original_type): New.
8370 (shorten_compare): Do not warn for enumeration types.
8371
0c3641b0
MLI
83722012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8373
8374 * c.opt (fpermissive): Add Var(flag_permissive).
8375
7edaa4d2
MG
83762012-04-30 Marc Glisse <marc.glisse@inria.fr>
8377
8378 PR c++/51033
8379 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8380 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8381
b9c8da34
DS
83822012-04-30 Dodji Seketeli <dodji@redhat.com>
8383
8384 Add -Wvarargs option
8385 * c.opt (Wvarargs): Define new option.
8386
e6c69da0
MLI
83872012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8388
8389 * c-common.c (check_function_arguments): Replace
8390 Wmissing-format-attribute with Wsuggest-attribute=format.
8391
90137d8f
MLI
83922012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8393
8394 * c.opt (Wsuggest-attribute=format): New. Alias of
8395 Wmissing-format-attribute.
8396 * c-format.c (decode_format_type): Replace
8397 Wmissing-format-attribute with Wsuggest-attribute=format.
8398 (check_function_format): Likewise.
8399
9faeb493 84002012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8401
8402 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8403 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8404 * c.opt: Add Wliteral-suffix.
8405
c1771a20
MLI
84062012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8407
8408 PR c/44774
8409 * c.opt (Wpedantic): New.
8410 (pedantic): Alias Wpedantic.
8411 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8412 (c_common_post_options): Likewise.
8413 (sanitize_cpp_opts): Likewise.
8414 * c-lex.c (interpret_float): Likewise.
8415 * c-format.c (check_format_types): Likewise.
8416 * c-common.c (pointer_int_sum): Likewise.
8417 (c_sizeof_or_alignof_type): Likewise.
8418 (c_add_case_label): Likewise.
8419 (c_do_switch_warnings): Likewise.
8420 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8421
04b391c1
JM
84222012-04-15 Jason Merrill <jason@redhat.com>
8423
8424 PR c++/52818
8425 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8426 (C_STD_NAME): Distinguish between C++98 and C++11.
8427
ac868f29
EB
84282012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8429
8430 PR target/52624
8431 * c-common.h (uint16_type_node): Rename into...
8432 (c_uint16_type_node): ...this.
8433 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8434 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8435
fd4116f4
MLI
84362012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8437
8438 * c-common.c (warn_if_unused_value): Move definition to here.
8439 * c-common.h (warn_if_unused_value): Move declaration to here.
8440
573ac65e
WB
84412012-03-23 William Bader <williambader@hotmail.com>
8442
8443 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8444
552b8185
JM
84452012-03-20 Jason Merrill <jason@redhat.com>
8446
8447 * c-common.h (enum cxx_dialect): Add cxx1y.
8448 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8449 test.
8450 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8451 * c-opts.c (c_common_post_options): Likewise.
8452 (set_std_cxx1y): New.
8453 (c_common_handle_option): Call it.
8454 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8455
04398fa8
PC
84562012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8457
8458 PR c++/14710
8459 * c.opt ([Wuseless-cast]): Add.
8460
d2a12ae7
RG
84612012-03-16 Richard Guenther <rguenther@suse.de>
8462
8463 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8464
a12bf402
MLI
84652012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8466
8467 PR c++/44783
8468 * c.opt (ftemplate-backtrace-limit) Add.
8469
5c30094f
RO
84702012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8471
8472 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8473 handling.
8474 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8475 (init_pragma): Don't register extern_prefix.
8476
21fa2faf
RG
84772012-03-12 Richard Guenther <rguenther@suse.de>
8478
8479 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8480 (builtin_type_for_size): Likewise.
8481
e3793c6f
JJ
84822012-02-13 Jakub Jelinek <jakub@redhat.com>
8483
8484 PR c++/52215
8485 * c-common.c (sync_resolve_params): Don't decide whether to convert
8486 or not based on TYPE_SIZE comparison, convert whenever arg_type
8487 is unsigned INTEGER_TYPE.
8488
93286335
PC
84892012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8490
8491 PR c/52118
8492 * c.opt ([Wunused-local-typedefs]): Fix description.
8493
7a421706
MS
84942012-01-24 Mike Stump <mikestump@comcast.net>
8495
8496 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8497 exactly.
8498
ba9b1f11
RG
84992012-01-18 Richard Guenther <rguenther@suse.de>
8500
8501 * c-opts.c (c_common_post_options): Reset LTO flags if
8502 we are about to generate a PCH.
8503
465406be
PC
85042012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8505
8506 PR c++/51777
8507 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8508 use pp_unsigned_wide_integer.
8509
aee15221
RG
85102012-01-10 Richard Guenther <rguenther@suse.de>
8511
8512 PR middle-end/51806
8513 * c-opts.c (c_common_handle_option): Move -Werror handling
8514 to language independent code.
8515
5720c0dc
RG
85162012-01-05 Richard Guenther <rguenther@suse.de>
8517
8518 PR middle-end/51764
8519 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8520 from common.opt.
8521
73ac190a
PC
85222011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8523
8524 PR c++/51316
8525 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8526 of array types with an unknown bound.
8527
48b0b196
JM
85282011-12-20 Joseph Myers <joseph@codesourcery.com>
8529
8530 * c-common.c (flag_isoc99): Update comment to refer to C11.
8531 (flag_isoc1x): Change to flag_isoc11.
8532 * c-common.h (flag_isoc99): Update comment to refer to C11.
8533 (flag_isoc1x): Change to flag_isoc11.
8534 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8535 C11.
8536 * c-opts.c (set_std_c1x): Change to set_std_c11.
8537 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8538 Call set_std_c11.
8539 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8540 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8541 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8542 standard.
8543 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8544 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8545 (std=gnu1x): Make alias of std=gnu11.
8546
d58d6eb5
JM
85472011-12-19 Jason Merrill <jason@redhat.com>
8548
8549 PR c++/51228
8550 * c-common.c (handle_transparent_union_attribute): Check the first
8551 field if the type is complete.
8552
b3908fcc
JW
85532011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8554
8555 PR libstdc++/51365
8556 * c-common.c (RID_IS_FINAL): Add.
8557 * c-common.h (RID_IS_FINAL): Add.
8558
fea3ca91
IS
85592011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8560
8561 * c.opt (fgnu-runtime): Provide full description.
8562 (fnext-runtime): Likewise.
8563 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8564
62bad7cd
AM
85652011-11-28 Andrew MacLeod <amacleod@redhat.com>
8566
8567 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8568 predefines in one place. Add LOCK_FREE predefines.
8569 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8570 new func.
8571
c466c4ff
AM
85722011-11-24 Andrew MacLeod <amacleod@redhat.com>
8573
8574 PR c/51256
9faeb493 8575 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8576 conditions
9faeb493
UB
8577 (resolve_overloaded_atomic_exchange,
8578 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8579 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8580 error_mark_node for error conditions.
9faeb493 8581
a5952633
RG
85822011-11-08 Richard Guenther <rguenther@suse.de>
8583
8584 PR middle-end/51010
8585 c-family/
8586
0a35513e
AH
85872011-11-07 Richard Henderson <rth@redhat.com>
8588 Aldy Hernandez <aldyh@redhat.com>
8589 Torvald Riegel <triegel@redhat.com>
8590
8591 Merged from transactional-memory.
8592
8593 * c-common.c (handle_tm_wrap_attribute,
8594 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8595 (struct c_common_reswords): Added __transaction* keywords.
8596 (struct c_common_attribute_table): Added transaction* and tm_regparm
8597 attributes.
8598 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8599 masks.
8600 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8601 find_tm_attribute): Declare.
8602
6d87092d
JM
86032011-11-07 Jason Merrill <jason@redhat.com>
8604
8605 PR c++/35688
8606 * c-common.c, c-common.h: Revert yesterday's changes.
8607
8e7860a1
JM
86082011-11-06 Jason Merrill <jason@redhat.com>
8609
8610 PR c++/35688
8611 * c-common.c (decl_has_visibility_attr): Split out from...
8612 (c_determine_visibility): ...here.
8613 * c-common.h: Declare it.
8614
d19fa6b5
JM
86152011-11-06 Joseph Myers <joseph@codesourcery.com>
8616
8617 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8618 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8619 type.
8620 (check_user_alignment): New. Split out of
8621 handle_aligned_attribute. Disallow integer constants with
8622 noninteger types. Conditionally allow zero.
8623 (handle_aligned_attribute): Use check_user_alignment.
8624 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8625
86951993
AM
86262011-11-06 Andrew MacLeod <amacleod@redhat.com>
8627 Richard Henderson <rth@redhat.com>
8628
8629 Merged from cxx-mem-model.
8630
8631 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8632 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8633 parameters that are the same type size.
8634 (get_atomic_generic_size): New. Find size of generic
8635 atomic function parameters and do typechecking.
8636 (add_atomic_size_parameter): New. Insert size into parameter list.
8637 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8638 either __atomic_exchange_n or external library call.
9faeb493 8639 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8640 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8641 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8642 __atomic_load_n or an external library call.
8643 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8644 __atomic_store_n or an external library call.
8645 (resolve_overloaded_builtin): Handle new __atomic builtins.
8646
cf9e9959
EB
86472011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8648
8649 PR c++/50608
8650 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8651 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8652 <INDIRECT_REF>: Return the argument.
8653 <ARRAY_REF>: Remove special code for negative offset.
8654 Call fold_build_pointer_plus instead of size_binop.
8655 (fold_offsetof): Remove STOP_REF argument and adjust.
8656 * c-common.h (fold_offsetof_1): Declare.
8657 (fold_offsetof): Remove STOP_REF argument.
8658
25339f10
JM
86592011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8660
8661 PR c++/50810
8662 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8663 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8664 Wnarrowing for C++0x and C++98.
8665 * c.opt ([Wnarrowing]): Update.
8666
89401152
PC
86672011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8668
8669 PR c++/44277
8670 * c.opt: Add Wzero-as-null-pointer-constant.
8671
97e3ad20
JM
86722011-10-31 Jason Merrill <jason@redhat.com>
8673
15694fdd
JM
8674 * c.opt (-fdeduce-init-list): Off by default.
8675
97e3ad20
JM
8676 PR c++/50920
8677 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8678 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8679 and -Wc++11-compat.
8680 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8681
fb9120e3
RAV
86822011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8683
8684 PR c++/30066
8685 * c.opt (fvisibility-inlines-hidden): Description change.
8686
3ce4f9e4
ESR
86872011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8688
8689 Implement C++11 user-defined literals.
8690 * c-common.c (build_userdef_literal): New.
8691 * c-common.def: New tree code.
8692 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8693 * c-lex.c (interpret_float): Add suffix parm.
8694 (c_lex_with_flags): Build literal tokens.
8695
5f53c243
PC
86962011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8697
8698 PR c++/50841
8699 Revert:
8700 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8701
8702 PR c++/50810
8703 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8704 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8705 Wnarrowing for C++0x and C++98.
8706 * c.opt ([Wnarrowing]): Update.
8707
263734e1
PC
87082011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8709
8710 PR c++/50810
8711 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8712 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8713 Wnarrowing for C++0x and C++98.
8714 * c.opt ([Wnarrowing]): Update.
8715
d2e312d7
PC
87162011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8717
8718 PR c++/45385
8719 * c-common.c (conversion_warning): Remove code looking for
8720 artificial operands.
8721
d17687f6
DS
87222011-10-18 Dodji Seketeli <dodji@redhat.com>
8723
8724 PR bootstrap/50760
8725 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8726 !NO_IMPLICIT_EXTERN_C.
d17687f6 8727
fc8396e9
PC
87282011-10-17 Michael Spertus <mike_spertus@symantec.com>
8729
8730 * c-common.c (c_common_reswords): Add __bases,
8731 __direct_bases.
8732 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8733
87342011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8735
8736 PR c++/50757
8737 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8738
847e697a
TT
87392011-10-15 Tom Tromey <tromey@redhat.com>
8740 Dodji Seketeli <dodji@redhat.com>
8741
8742 * c.opt (fdebug-cpp): New option.
8743 * c-opts.c (c_common_handle_option): Handle the option.
8744 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8745 output stream in parameter. Factorized from ...
8746 (maybe_print_line): ... this. Dump location debug information when
8747 -fdebug-cpp is in effect.
8748 (print_line_1): New static function. Takes an output stream in
8749 parameter. Factorized from ...
8750 (print_line): ... here. Dump location information when -fdebug-cpp
8751 is in effect.
8752 (scan_translation_unit): Dump location information when
8753 -fdebug-cpp is in effect.
8754
92582b75
TT
87552011-10-15 Tom Tromey <tromey@redhat.com>
8756 Dodji Seketeli <dodji@redhat.com>
8757
8758 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8759 without argument.
8760 * c-opts.c (c_common_handle_option)<case
8761 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8762 cases. Handle -ftrack-macro-expansion with and without argument.
8763
46427374
TT
87642011-10-15 Tom Tromey <tromey@redhat.com>
8765 Dodji Seketeli <dodji@redhat.com>
8766
8767 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8768 (print_line, cb_define, do_line_change): Adjust to avoid touching
8769 the internals of struct line_map. Use the public API instead.
8770 * c-pch.c (c_common_read_pch): Likewise.
8771 * c-lex.c (fe_file_change): Likewise.
8772
fc8396e9
PC
87732011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8774
8775 PR c++/17212
8776 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8777
87782011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8779
8780 PR c++/33067
8781 * c-pretty-print.c (pp_c_floating_constant): Output
8782 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8783
e79983f4
MM
87842011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8785
8786 * c-common.c (def_builtin_1): Delete old interface with two
8787 parallel arrays to hold standard builtin declarations, and replace
8788 it with a function based interface that can support creating
8789 builtins on the fly in the future. Change all uses, and poison
8790 the old names. Make sure 0 is not a legitimate builtin index.
8791 * c-omp.c (c_finish_omp_barrier): Ditto.
8792 (c_finish_omp_taskwait): Ditto.
8793 (c_finish_omp_flush): Ditto.
8794
6637388f
TG
87952011-10-11 Tristan Gingold <gingold@adacore.com>
8796
8797 * c.opt: (fallow-parameterless-variadic-functions): New.
8798
3797cb21
DS
87992011-09-08 Dodji Seketeli <dodji@redhat.com>
8800
8801 PR c++/33255 - Support -Wunused-local-typedefs warning
8802 * c-common.h (struct c_language_function::local_typedefs): New
8803 field.
9faeb493
UB
8804 (record_locally_defined_typedef, maybe_record_typedef_use)
8805 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8806 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8807 (maybe_record_typedef_use)
8808 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8809 * c.opt: Declare new -Wunused-local-typedefs flag.
8810
693ddb1b
EB
88112011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8812
8813 PR middle-end/50266
8814 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8815 computations.
8816
830c740f
RG
88172011-09-05 Richard Guenther <rguenther@suse.de>
8818
8819 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8820 of integer_minus_one_node for empty array upper bounds.
8821
892a371f
DS
88222011-08-28 Dodji Seketeli <dodji@redhat.com>
8823
8824 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8825 it's the first time it's being called on this main TU.
8826
0e3fdb48
RB
88272011-08-24 Richard Guenther <rguenther@suse.de>
8828
8829 PR c/49396
8830 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8831
88322011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8833
8834 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8835 defined in cpp_init_builtins and c_cpp_builtins.
8836
d4a83c10
JM
88372011-08-19 Joseph Myers <joseph@codesourcery.com>
8838
8839 * c-common.c (c_common_reswords): Add __builtin_complex.
8840 * c-common.h (RID_BUILTIN_COMPLEX): New.
8841
bbceee64
JM
88422011-08-18 Joseph Myers <joseph@codesourcery.com>
8843
8844 * c-common.c (c_common_reswords): Add _Noreturn.
8845 (keyword_is_function_specifier): Handle RID_NORETURN.
8846 * c-common.h (RID_NORETURN): New.
8847
3f8257db 88482011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8849
8850 * c-common.c (unsafe_conversion_p): New function. Check if it is
8851 unsafe to convert an expression to the type.
8852 (conversion_warning): Adjust, use unsafe_conversion_p.
8853 * c-common.h (unsafe_conversion_p): New function declaration.
8854
20906c66
JJ
88552011-08-02 Jakub Jelinek <jakub@redhat.com>
8856
8857 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8858 (c_finish_omp_taskyield): New prototype.
8859 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8860 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8861 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8862 or RHS1 have side-effects, evaluate those too in the right spot,
8863 if it is a decl and LHS is also a decl, error out if they
8864 aren't the same.
8865 (c_finish_omp_taskyield): New function.
8866 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8867 * c-pragma.c (omp_pragmas): Add taskyield.
8868 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8869 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8870 PRAGMA_OMP_CLAUSE_MERGEABLE.
8871
770e5a2e
DS
88722011-07-25 Dodji Seketeli <dodji@redhat.com>
8873
8874 * c-common.h (set_underlying_type): Remove parm name from
8875 declaration.
8876
1baae426
RG
88772011-07-25 Romain Geissler <romain.geissler@gmail.com>
8878
8879 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8880
fcb21722
JM
88812011-07-22 Jason Merrill <jason@redhat.com>
8882
76f86d00
JM
8883 PR c++/49793
8884 * c.opt (Wnarrowing): New.
8885
3a636414
JM
8886 PR c++/30112
8887 * c-common.h: Declare c_linkage_bindings.
8888 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8889
fcb21722
JM
8890 PR c++/49813
8891 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8892 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8893 as flag_isoc99 for 'restrict'.
8894 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8895
02614448
ILT
88962011-07-21 Ian Lance Taylor <iant@google.com>
8897
8898 PR middle-end/49705
8899 * c-common.c (c_disable_warnings): New static function.
8900 (c_enable_warnings): New static function.
8901 (c_fully_fold_internal): Change local unused_p to bool. Call
8902 c_disable_warnings and c_enable_warnings rather than change
8903 c_inhibit_evaluation_warnings.
8904
34429675
JM
89052011-07-20 Jason Merrill <jason@redhat.com>
8906
8907 PR c++/6709 (DR 743)
8908 PR c++/42603 (DR 950)
8909 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8910 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8911 (CPP_DECLTYPE): New.
8912 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8913
5d49b6a7
RG
89142011-07-19 Richard Guenther <rguenther@suse.de>
8915
8916 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8917 * c-omp.c (c_finish_omp_for): Likewise.
8918
e84a58ff
EB
89192011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8920
8921 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8922 body on the next line.
8923
329af3c7
JM
89242011-07-08 Jason Merrill <jason@redhat.com>
8925
4063e61b
JM
8926 PR c++/45437
8927 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8928
329af3c7
JM
8929 PR c++/49673
8930 * c-common.c (c_apply_type_quals_to_decl): Don't check
8931 TYPE_NEEDS_CONSTRUCTING.
8932
1a072294
RG
89332011-07-06 Richard Guenther <rguenther@suse.de>
8934
8935 * c-common.c (c_common_nodes_and_builtins):
8936 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8937
fce5dddd
RG
89382011-07-05 Richard Guenther <rguenther@suse.de>
8939
8940 * c-common.c (c_common_nodes_and_builtins): Build all common
8941 tree nodes first.
8942
45d439ac
JJ
89432011-06-27 Jakub Jelinek <jakub@redhat.com>
8944
56300785
JJ
8945 * c-common.h (c_tree_chain_next): New static inline function.
8946
45d439ac
JJ
8947 * c-common.c (check_builtin_function_arguments): Handle
8948 BUILT_IN_ASSUME_ALIGNED.
8949
e0a8ecf2
AM
89502011-06-21 Andrew MacLeod <amacleod@redhat.com>
8951
8952 * c-common.c: Add sync_ or SYNC__ to builtin names.
8953 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
8954
89552011-06-20 Pierre Vittet <piervit@pvittet.com>
8956
8957 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
8958 handler.
8959 (gen_pragma_handler): New union.
8960 (internal_pragma_handler): New type.
8961 (c_register_pragma_with_data)
8962 (c_register_pragma_with_expansion_and_data): New functions.
8963
8964 * c-pragma.c (registered_pragmas, c_register_pragma_1)
8965 (c_register_pragma, c_register_pragma_with_expansion)
8966 (c_invoke_pragma_handler): Changed to work with
8967 internal_pragma_handler.
8968 (c_register_pragma_with_data)
8969 (c_register_pragma_with_expansion_and_data): New functions.
8970
677f3fa8
JM
89712011-06-14 Joseph Myers <joseph@codesourcery.com>
8972
8973 * c-common.c: Include common/common-target.h.
8974 (handle_section_attribute): Use
8975 targetm_common.have_named_sections.
8976 * c-cppbuiltin.c: Include common/common-target.h.
8977 (c_cpp_builtins): Use targetm_common.except_unwind_info.
8978
d7fc8c14
RG
89792011-06-10 Richard Guenther <rguenther@suse.de>
8980
8981 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
8982 to print a IDENTIFIER_NODE.
8983
10e48e39
RO
89842011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8985 Joseph Myers <joseph@codesourcery.com>
8986
8987 * c.opt (fbuilding-libgcc): New option.
8988 * c-cppbuiltin.c (c_cpp_builtins): Define
8989 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
8990
6976ae51
JM
89912011-06-07 Jason Merrill <jason@redhat.com>
8992
3ff60975
JM
8993 * c-common.c (max_tinst_depth): Lower default to 900.
8994
6976ae51
JM
8995 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
8996
009db074
RG
89972011-06-07 Richard Guenther <rguenther@suse.de>
8998
8999 * c-common.c (c_common_nodes_and_builtins): Do not set
9000 size_type_node or call set_sizetype.
9001
b4592b92
DS
90022011-06-07 Dodji Seketeli <dodji@redhat.com>
9003
9004 PR debug/49130
9005 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9006 type when using pointer comparison to compare types.
b4592b92 9007
014ab419
JW
90082011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9009
9010 * c.opt: Add -Wdelete-non-virtual-dtor.
9011 * c-opts.c (c_common_handle_option): Include it in -Wall.
9012
4f60111f
NF
90132011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9014
9015 PR bootstrap/49190
9016
9017 Revert:
9018 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9019
9020 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9021 not tree_common.
9022
4cc4f2f4
JJ
90232011-05-27 Jakub Jelinek <jakub@redhat.com>
9024
9025 PR c++/49165
9026 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9027 C++ don't call c_common_truthvalue_conversion on void type arms.
9028
38e01f9e
NF
90292011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9030
9031 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9032 (stmt_list_stack): Define.
9033 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9034 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9035
92e948a8
NF
90362011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9037
9038 * c-common.c (warning_candidate_p): Check for BLOCKs.
9039
a2fc3e63
NF
90402011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9041
9042 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9043 not tree_common.
9044
0957c029
JJ
90452011-05-25 Jakub Jelinek <jakub@redhat.com>
9046
9047 * c-common.c (def_fn_type): Remove extra va_end.
9048
828fb3ba
JM
90492011-05-23 Jason Merrill <jason@redhat.com>
9050
9051 PR c++/48106
9052 * c-common.c (c_common_get_narrower): New.
9053 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9054
dde05067
NF
90552011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9056
9057 * c-common.h (check_function_arguments): Tweak prototype of
9058 check_function_arguments.
9059 * c-common.c (check_function_arguments): Likewise. Adjust
9060 calls to check_function_nonnull, check_function_format, and
9061 check_function_sentinel.
9062 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9063 separate attributes and typelist arguments. Use
9064 FOREACH_FUNCTION_ARGS to iterate over argument types.
9065
3c0d13bf
PC
90662011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9067
9068 * c-common.c (c_common_reswords): Reorder.
9069 * c-common.h (rid): Likewise.
9070
8242dd04
NF
90712011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9072
9073 * c-common.c (def_fn_type): Don't call build_function_type, call
9074 build_function_type_array or build_varargs_function_type_array
9075 instead.
9076 (c_common_nodes_and_builtins): Likewise.
9077
3d528853
NF
90782011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9079
9080 * c-common.c (c_add_case_label): Omit the loc argument to
9081 build_case_label.
9082 * c-common.h (build_case_label): Remove.
9083 * c-semantics.c (build_case_label): Remove.
9084
a04a722b
JM
90852011-05-05 Joseph Myers <joseph@codesourcery.com>
9086
9087 * c-objc.h (objc_start_method_definition): Update prototype.
9088 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9089
e19a18d4
NF
90902011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9091
9092 * c-common.c (check_main_parameter_types): Reindent. Don't use
9093 TYPE_ARG_TYPES directly.
9094 (handle_nonnull_attribute): Likewise.
9095 (sync_resolve_params): Likewise.
9096 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9097 to check_format_string.
9098 (handle_format_attribute): Likewise.
9099 (check_format_string): Take a function type to examine instead of
9100 a type list. Use a function_arg_iterator to step through argument
9101 types.
9102
c62c040f
RG
91032011-05-04 Richard Guenther <rguenther@suse.de>
9104
9105 * c-common.c (fix_string_type): Use size_int for index type bounds.
9106 (start_fname_decls): Do not pass NULL to build_int_cst.
9107 (c_init_attributes): Likewise.
9108 * c-lex.c (c_lex_with_flags): Likewise.
9109
c12ff9d8
JM
91102011-04-27 Jason Merrill <jason@redhat.com>
9111
9112 * c-common.c (make_tree_vector_from_list): New.
9113 * c-common.h: Declare it.
9114
304dfbe3
RG
91152011-04-26 Richard Guenther <rguenther@suse.de>
9116
9117 PR preprocessor/48248
9118 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9119 for output size with -P.
9120
3c0d13bf
PC
91212011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9122
9123 * c-common.c (struct c_common_resword): Add __underlying_type.
9124 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9125
04695783
JM
91262011-04-20 Jim Meyering <meyering@redhat.com>
9127
9128 * c-format.c (init_dollar_format_checking): Remove useless
9129 if-before-free.
9130
0dc33c3c
NP
91312011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9132
9133 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9134 (objc_detect_field_duplicates): New.
0dc33c3c 9135 * stub-objc.c: Likewise.
3c0d13bf 9136
c59633d9
NP
91372011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9138
9139 * stub-objc.c (objc_declare_protocols): Renamed to
9140 objc_declare_protocol.
9141 * c-objc.h: Likewise.
3c0d13bf 9142
32dabdaf
NP
91432011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9144
9145 * stub-objc.c (objc_declare_class): Updated argument name.
9146
81f653d6
NF
91472011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9148
9149 * c-common.h (c_common_init_ts): Declare.
9150 * c-common.c (c_common_init_ts): Define.
9151
eb345401
NP
91522011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9153
9154 * c-objc.h (objc_build_message_expr): Updated prototype.
9155 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9156
a358e188
MJ
91572011-04-12 Martin Jambor <mjambor@suse.cz>
9158
9159 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9160 of cgraph_node.
9161
e6313a78
RG
91622011-04-11 Richard Guenther <rguenther@suse.de>
9163
9164 * c-common.c (complete_array_type): Build a range type of
9165 proper type.
9166
dcf0c47e
NF
91672011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9168
9169 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9170 (handle_type_generic_attribute): Likewise.
9171
1ee44b26
JM
91722011-04-07 Jason Merrill <jason@redhat.com>
9173
9174 PR c++/48450
9175 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9176 conversion from C++0x scoped enum.
9177
acce4e77
JM
91782011-04-06 Joseph Myers <joseph@codesourcery.com>
9179
9180 * c-target-def.h: New file.
9181 * c-target.def: New file.
9182 * c-target.h: New file.
9183 * c-common.c (targetcm): Don't define here.
9184 * c-common.h (default_handle_c_option): Declare.
9185 * c-format.c: Include c-target.h instead of target.h.
9186 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9187 include tm.h.
9188 (default_handle_c_option): Move from targhooks.c.
9189
e2eefb55
JJ
91902011-03-29 Jakub Jelinek <jakub@redhat.com>
9191
9192 PR preprocessor/48248
9193 * c-ppoutput.c (print): Add src_file field.
9194 (init_pp_output): Initialize it.
9195 (maybe_print_line): Don't optimize by adding up to 8 newlines
9196 if map->to_file and print.src_file are different file.
9197 (print_line): Update print.src_file.
9198
ba78087b
KT
91992011-03-25 Kai Tietz <ktietz@redhat.com>
9200
9201 * c-ada-spec.c (compare_comment): Use filename_cmp
9202 instead of strcmp for filename.
9203
0edf1bb2
JL
92042011-03-25 Jeff Law <law@redhat.com>
9205
adfac8df 9206 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9207
c7dc8804
JM
92082011-03-25 Jason Merrill <jason@redhat.com>
9209
9210 * c.opt: Add -std=c++03.
9211
d1d879b1
EB
92122011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9213
9214 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9215
3f8257db 92162011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9217
9218 PR target/12171
5050afdf
KT
9219 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9220 Display allowed attributes for function pointer types.
9221 (pp_c_attributes_display): New function to display
9222 attributes having affects_type_identity flag set to true.
9223 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9224
62d784f7
KT
9225 * c-common.c (c_common_attribute_table):
9226 Add new element.
9227 (c_common_format_attribute_table): Likewise.
9228
82d37118
JM
92292011-03-18 Jason Merrill <jason@redhat.com>
9230
49a000c3
JM
9231 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9232 * c-common.h: Don't declare it here.
9233 * c-common.c: Or define it here.
9234 * c-opts.c (c_common_handle_option): Or set it here.
9235
82d37118
JM
9236 PR c++/35315
9237 * c-common.c (handle_transparent_union_attribute): Don't
9238 make a duplicate type in C++.
9239
17bc631c
JM
92402011-03-15 Jason Merrill <jason@redhat.com>
9241
9242 * c-common.c (max_constexpr_depth): New.
9243 * c-common.h: Declare it.
9244 * c-opts.c (c_common_handle_option): Set it.
9245 * c.opt (fconstexpr-depth): New option.
9246
1b9b91a6
JM
92472011-03-11 Jason Merrill <jason@redhat.com>
9248
f231b5ff
JM
9249 * c-common.c (attribute_takes_identifier_p): Add missing const.
9250
1b9b91a6
JM
9251 PR c++/46803
9252 * c-common.c (attribute_takes_identifier_p): Assume that an
9253 unknown attribute takes an identifier.
9254
a19e4d44
NF
92552011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9256
9257 PR c/47786
9258 * c-common.c (c_type_hash): Call list_length instead of iterating
9259 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9260
982d62f6
JJ
92612011-02-19 Jakub Jelinek <jakub@redhat.com>
9262
9263 PR c/47809
9264 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9265
0a256240
NP
92662011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9267
9268 * c.opt (fobjc-abi-version=) New.
9269 (fobjc-nilcheck): New.
9270
ba9e6dd5
NF
92712011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9272
9273 PR c++/46890
9274 * c-common.h (keyword_is_decl_specifier): Declare.
9275 * c-common.c (keyword_is_decl_specifier): Define.
9276 (keyword_is_function_specifier): New function.
9277
7273813a
JJ
92782011-01-26 Jakub Jelinek <jakub@redhat.com>
9279
9280 PR c/47473
9281 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9282 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9283 REAL_TYPE.
9284
908ef79b
AC
92852011-01-26 Arnaud Charlet <charlet@adacore.com>
9286
9287 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9288
237e9384
JJ
92892011-01-26 Jakub Jelinek <jakub@redhat.com>
9290
9291 PR pch/47430
9292 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9293 after init_c_lex if pch_file is set.
9294
47ea1edf
DK
92952011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9296
d4dba752 9297 PR c++/43601
47ea1edf
DK
9298 * c.opt (-fkeep-inline-dllexport): New switch.
9299
2aa9c6ae
RG
93002011-01-12 Richard Guenther <rguenther@suse.de>
9301
9302 PR middle-end/32511
9303 * c-common.c (handle_weak_attribute): Warn instead of error
9304 on declaring an inline function weak.
9305
7bd11157
TT
93062011-01-05 Tom Tromey <tromey@redhat.com>
9307
9308 * c-common.h (lvalue_error): Update.
9309 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9310 not error.
9311
0e66e494 93122010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9313
b4f588c4
NP
9314 PR objc/47075
9315 * c-objc.h (objc_finish_message_expr): Added argument to
9316 prototype.
9317
f4da8dce
NF
93182010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9319
9320 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9321 Use prototype_p.
9322
46270f14
NP
93232010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9324
9325 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9326 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9327
4816c593
NF
93282010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9329
9330 * c-common.h (readonly_error): Declare.
9331 * c-common.c (readonly_error): Define.
9332
7a6daeb0
NF
93332010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9334
9335 * c-common.h (invalid_indirection_error): Declare.
9336 * c-common.c (invalid_indirection_error): Define.
9337
892f6119
RG
93382010-12-03 Richard Guenther <rguenther@suse.de>
9339
9340 PR c/46745
9341 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9342 (pp_c_unary_expression): Likewise.
9343 (pp_c_expression): Likewise.
9344
6c39e757
NP
93452010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9346
9347 * c-common.h (objc_finish_function): New.
9348 (objc_non_volatilized_type): Removed.
9349 (objc_type_quals_match): Removed.
9350 * stub-objc.c (objc_finish_function): New.
9351 (objc_non_volatilized_type): Removed.
9352 (objc_type_quals_match): Removed.
9faeb493 9353
7c475d11
JM
93542010-11-30 Joseph Myers <joseph@codesourcery.com>
9355
9356 * c-common.h (parse_optimize_options): Declare.
9357 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9358 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9359
71f3e391
JM
93602010-11-29 Joseph Myers <joseph@codesourcery.com>
9361
9362 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9363 GET_ENVIRONMENT.
9364 * c-pch.c (O_BINARY): Don't define here.
9365 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9366
d5fabb58
JM
93672010-11-25 Joseph Myers <joseph@codesourcery.com>
9368
9369 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9370 targetm.except_unwind_info.
9371
299404a1
JM
93722010-11-23 Joseph Myers <joseph@codesourcery.com>
9373
9374 * c-opts.c (c_common_handle_option): Pass location to
9375 set_struct_debug_option.
9376
c98cd5bf
JM
93772010-11-23 Joseph Myers <joseph@codesourcery.com>
9378
9379 * c-common.c (visibility_options): Move from ../opts.c.
9380 * c-common.h (struct visibility_flags, visibility_options):
9381 Declare here.
9382 * c-opts.c (finish_options): Rename to c_finish_options.
9383 (c_common_init): Update call to finish_options.
9384
a9546771
NP
93852010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9386
9387 PR objc/34033
9388 * c-lex.c (lex_string): Check that each string in an Objective-C
9389 string concat sequence starts with either one or zero '@', and
9390 that there are no spurious '@' signs at the end.
9391
24a57808
JM
93922010-11-20 Joseph Myers <joseph@codesourcery.com>
9393
9394 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9395 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9396 HANDLE_PRAGMA_VISIBILITY.
9397 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9398 HANDLE_PRAGMA_VISIBILITY): Don't define.
9399 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9400
a9aa2c3a
NF
94012010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9402
9403 PR c++/16189
9404 PR c++/36888
9405 PR c++/45331
9406 * c-common.h (keyword_begins_type_specifier): Declare.
9407 (keyword_is_storage_class_specifier): Declare.
9408 (keyword_is_type_qualifier): Declare.
9409 * c-common.c (keyword_begins_type_specifier): New function.
9410 (keyword_is_storage_class_specifier): New function.
9411 (keyword_is_type_qualifier): Declare.
9412
5386338c
JM
94132010-11-19 Joseph Myers <joseph@codesourcery.com>
9414
9415 PR c/46547
9416 * c-common.c (in_late_binary_op): Define.
9417 (c_common_truthvalue_conversion): Check in_late_binary_op before
9418 calling c_save_expr.
9419 * c-common.h (in_late_binary_op): Declare.
9420
69ccdddb
JM
94212010-11-19 Joseph Myers <joseph@codesourcery.com>
9422
9423 * c-opts.c (c_common_handle_option): Update calls to
9424 set_struct_debug_option.
9425
6b192a09
NP
94262010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9427
9428 * c-common.h (objc_declare_protocols): Added additional argument.
9429 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9430
fb52b50a
NF
94312010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9432
9433 PR c/33193
9434 * c-common.h (build_real_imag_expr): Declare.
9435 * c-semantics.c (build_real_imag_expr): Define.
9436
b37421c6
JM
94372010-11-17 Joseph Myers <joseph@codesourcery.com>
9438
9439 * c-opts.c (c_common_parse_file): Take no arguments.
9440 * c-common.h (c_common_parse_file): Update prototype.
9441
07078664
JJ
94422010-11-16 Jakub Jelinek <jakub@redhat.com>
9443
9444 PR c++/46401
9445 * c-common.c (warning_candidate_p): Don't track non-const calls
9446 or STRING_CSTs.
9447
c6a13190
ILT
94482010-11-15 Ian Lance Taylor <iant@google.com>
9449
9450 * c-lex.c (init_c_lex): Set macro debug callbacks if
9451 flag_dump_go_spec is set.
9452
925e8657
NP
94532010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9454
9455 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9456 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9457
bb0a9581
NF
94582010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9459
9460 PR preprocessor/45038
9461 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9462 dialects.
9463
c5fa0890
JM
94642010-11-12 Joseph Myers <joseph@codesourcery.com>
9465
9466 * c-common.h (c_family_lang_mask): Declare.
9467 * c-opts.c (c_family_lang_mask): Make extern.
9468 * c-pragma.c (handle_pragma_diagnostic): Use
9469 control_warning_option.
9470
a4d8c676
JM
94712010-11-12 Joseph Myers <joseph@codesourcery.com>
9472
9473 * c-common.c (parse_optimize_options): Update call to
9474 decode_options.
9475 * c-common.h (c_common_handle_option): Update prototype.
9476 * c-opts.c (c_common_handle_option): Take location_t parameter and
9477 pass it to other functions.
9478
f954bd2c
JM
94792010-11-11 Joseph Myers <joseph@codesourcery.com>
9480
9481 * c-opts.c (warning_as_error_callback): Remove.
9482 (c_common_initialize_diagnostics): Don't call
9483 register_warning_as_error_callback.
9484 (c_common_handle_option): Handle -Werror=normalized= here.
9485
d8a07487
JM
94862010-11-10 Joseph Myers <joseph@codesourcery.com>
9487
9488 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9489 in diagnostic.
9490 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9491 letter.
9492 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9493 Remove trailing '.' from diagnostics.
9494 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9495
d5478783
JM
94962010-11-10 Joseph Myers <joseph@codesourcery.com>
9497
9498 * c-common.c (parse_optimize_options): Pass global_dc to
9499 decode_options.
9500 * c-opts.c (c_common_handle_option): Pass &global_options to
9501 set_Wstrict_aliasing.
9502 * c.opt (v): Don't mark Common or document here.
9503
91ebb981
IS
95042010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9505
9506 PR target/44981
9507 * c-format.c (format_type): New type gcc_objc_string_format_type.
9508 (valid_stringptr_type_p): New.
9509 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9510 (check_format_string): Pass expected type, use
91ebb981
IS
9511 valid_stringptr_type_p (), check that the format string types are
9512 consistent with the format specification.
9513 (decode_format_attr): Warn if NSString is used outside objective-c.
9514 (format_types_orig): Add NSString.
9515 (format_name): New.
9516 (format_flags): New.
9517 (check_format_arg): Handle format strings requiring an external parser.
9518 first_target_format_type: New variable.
9519 (handle_format_attribute): Set up first_target_format_type, pass the
9520 expected format arg string type to check_format_string().
9521 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
9522 * stub-objc.c (objc_string_ref_type_p): New.
9523 (objc_check_format_arg): New.
9524
bede2adc
NP
95252010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9526
9faeb493 9527 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9528 * c-common.h (objc_build_class_component_ref): New.
9529 * stub-objc.c (objc_build_class_component_ref): New.
9530
9a179d01
NP
95312010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9532
9533 * c.opt (Wproperty-assign-default): New option.
9534
22d8d616
NP
95352010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9536
9537 Implemented -fobjc-std=objc1 flag.
9538 * c.opt (fobjc-std=objc1): New option.
9539
2debdb4f
NP
95402010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9541
9542 Implemented format and noreturn attributes for Objective-C methods.
9543 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9544 attribute for Objective-C methods.
9545
ec52b111
JM
95462010-10-31 Jason Merrill <jason@redhat.com>
9547
9548 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9549 EXPR_LOC_OR_HERE.
9550
46a88c12
NP
95512010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9552
9553 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9554 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9555 (objc_add_property_declaration): Removed arguments for copies and
9556 ivar.
9557 (objc_build_getter_call): Renamed to
9558 objc_maybe_build_component_ref.
9559 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9560 (objc_is_property_ref): New.
9561 * c-common.c (c_common_reswords): Removed copies and ivar.
9562 * stub-objc.c (objc_add_property_declaration): Removed arguments
9563 for copies and ivar.
9564 (objc_build_getter_call): Renamed to
9565 objc_maybe_build_component_ref.
9566 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9567 (objc_is_property_ref): New.
9faeb493 9568
1e4bf85b
AC
95692010-10-29 Arnaud Charlet <charlet@adacore.com>
9570 Matthew Gingell <gingell@adacore.com>
9571
9572 * c-ada-spec.c (separate_class_package): New function.
9573 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9574 name of their enclosing package.
9575 (print_ada_declaration): Use separate_class_package.
9576
81f0bab2
JM
95772010-10-27 Jason Merrill <jason@redhat.com>
9578
2b08f2c5
JM
9579 * c-common.c (c_common_reswords): Add __is_literal_type.
9580 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9581
81f0bab2
JM
9582 * c-common.c (check_case_value): Remove special C++ code.
9583
200290f2
NP
95842010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9585
9586 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9587 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9588 and RID_LAST_PATTR.
9589 (objc_add_property_declaration): Added additional arguments.
9590 (objc_property_attribute_kind): Removed.
9591 (objc_set_property_attr): Removed.
9592 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9593 copy and nonatomic.
9594 * stub-objc.c (objc_add_property_declaration): Added additional
9595 arguments.
9596 (objc_set_property_attr): Removed.
9faeb493 9597
f614132b
NP
95982010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9599
9600 * c-common.h (objc_add_property_variable): Renamed to
9601 objc_add_property_declaration. Added location argument.
9602 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9603
b8a18805
NP
96042010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9605
9606 * c-common.h (objc_maybe_printable_name): New.
9607 * stub-objc.c (objc_maybe_printable_name): New.
9608
3f8257db
JJ
96092010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9610 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9611
9612 * c-common.h (c_common_mark_addressable_vec): Declare.
9613 * c-common.c (c_common_mark_addressable_vec): New function.
9614
249a82c4
NP
96152010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9616
9617 * c-common.h (objc_set_method_type): Removed.
9618 (objc_add_method_declaration): Added boolean argument.
9619 (objc_start_method_definition): Same change.
9620 (objc_build_method_signature): Same change.
9621 * stub-objc.c (objc_set_method_type): Removed.
9622 (objc_add_method_declaration): Added boolean argument.
9623 (objc_start_method_definition): Same change.
9624 (objc_build_method_signature): Same change.
9625
977e30bc
NP
96262010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9627
9628 * c-common.h (finish_file): Removed.
9629 (objc_write_global_declarations): New.
9630 * c-opts.c (c_common_parse_file): Do not call finish_file.
9631 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9632
da57d1b9
NP
96332010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9634
9635 Implemented parsing @synthesize and @dynamic for
9636 Objective-C/Objective-C++.
9637 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9638 (objc_add_synthesize_declaration): New.
9639 (objc_add_dynamic_declaration): New.
9640 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9641 * stub-objc.c (objc_add_synthesize_declaration): New.
9642 (objc_add_dynamic_declaration): New.
9faeb493 9643
0069111f
MM
96442010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9645
9646 PR target/46041
9647 * c-cppbuiltin.c (mode_has_fma): Move function here from
9648 builtins.c. Don't use the fma optab, instead just use the
9649 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9650 using -save-temps.
9651
e426b47b
NP
96522010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9653
9654 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9655
3f8257db 9656 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9657
9faeb493 9658 Radar 4330422
e426b47b
NP
9659 * c-common.h (objc_non_volatilized_type): New declaration
9660 * stub-objc.c (objc_non_volatilized_type): New stub.
9661
90fbfdc3
NP
96622010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9663
e426b47b 9664 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9665
3f8257db 9666 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9667
9faeb493 9668 Radar 4133425
90fbfdc3 9669 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9670 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9671
c37d8c30
IS
96722010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9673
9674 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9675 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9676 (objc_ivar_visibility_kind): New enum.
9677 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9678 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9679 visibility enum.
9680
1b1562a5
MM
96812010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9682
9683 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9684 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9685 has the appropriate fma builtins.
9686 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9687
668ea4b1
IS
96882010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9689
1b1562a5 9690 merge from FSF apple 'trunk' branch.
3f8257db 9691 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9692
668ea4b1
IS
9693 Radars 4436866, 4505126, 4506903, 4517826
9694 * c-common.c (c_common_resword): Define @property and its attributes.
9695 * c-common.h: Define property attribute enum entries.
9696 (OBJC_IS_PATTR_KEYWORD): New.
9697 (objc_property_attribute_kind): New enum.
9698 Declare objc_set_property_attr (), objc_add_property_variable (),
9699 objc_build_getter_call () and objc_build_setter_call ().
9700 * stub-objc.c (objc_set_property_attr): New stub.
9701 (objc_add_property_variable): Likewise.
9702 (objc_build_getter_call): Likewise.
9703 (objc_build_setter_call) Likewise.
1b1562a5 9704
a1178b30
IS
97052010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9706
1b1562a5 9707 merge from FSF apple 'trunk' branch.
3f8257db 9708 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9709
9710 Radar 3803157 (method attributes)
9711 * c-common.c (handle_deprecated_attribute): Recognize
9712 objc methods as valid declarations.
9713 * c-common.h: Declare objc_method_decl ().
1b1562a5 9714 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9715
a75bfaa6
JM
97162010-10-08 Joseph Myers <joseph@codesourcery.com>
9717
9718 * c-common.c (parse_optimize_options): Call
9719 decode_cmdline_options_to_array_default_mask before
9720 decode_options. Update arguments to decode_options.
9721 * c-common.h (c_common_init_options_struct): Declare.
9722 * c-opts.c (c_common_init_options_struct): New. Split out from
9723 c_common_init_options.
9724
f05b9d93
NP
97252010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9726
9727 Implemented fast enumeration for Objective-C.
9728 * c-common.h (objc_finish_foreach_loop): New.
9729 * stub-objc.c (objc_finish_foreach_loop): New.
9730
1ebe4b4f
JM
97312010-10-05 Joseph Myers <joseph@codesourcery.com>
9732
9733 * c-common.h (struct diagnostic_context): Don't declare here.
9734 (c_common_initialize_diagnostics): Declare using
9735 diagnostic_context typedef.
9736 * c-opts.c (c_common_handle_option): Pass global_dc to
9737 handle_generated_option.
9738
d4d24ba4
JM
97392010-10-04 Joseph Myers <joseph@codesourcery.com>
9740
9741 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9742 handle_generated_option.
9743
478a1c5b
ILT
97442010-10-03 Ian Lance Taylor <iant@google.com>
9745
9746 * c.opt (-fplan9-extensions): New option.
9747
82a1c2fe
FXC
97482010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9749
9750 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9751 Remove.
9752 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9753 of duplicating code.
9754
92902b1b
IS
97552010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9756
9757 * c-common.c: Add two new entries for @optional
9758 and @required keywords.
9759
9760 merge from FSF 'apple/trunk' branch.
3f8257db 9761 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9762
9763 Radar 4386773
9764 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9765 objective-c keywords.
9766 (objc_set_method_opt): New declaration.
9767 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9768
46625112
JM
97692010-09-30 Joseph Myers <joseph@codesourcery.com>
9770
9771 * c-common.c (handle_optimize_attribute): Pass &global_options to
9772 cl_optimization_save and cl_optimization_restore.
9773 * c-opts.c (c_common_handle_option): Pass &global_options to
9774 handle_generated_option.
9775 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9776 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9777 &global_options to cl_optimization_restore.
9778
49b91f05
NP
97792010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9780
9781 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9782 Objective-C/Objective-C++ keywords.
9783
13ed556f 97842010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9785
9faeb493
UB
9786 Merge from 'apple/trunk' branch on FSF servers.
9787
3f8257db 9788 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9789
9790 Radar 4281748
9791 * c-common.h (objc_check_global_decl): New declaration.
9792 * stub-objc.c (objc_check_global_decl): New stub.
9793
f0036cca
JM
97942010-09-29 Joseph Myers <joseph@codesourcery.com>
9795
9796 * c.opt: Don't use VarExists.
9797
e3339d0f
JM
97982010-09-29 Joseph Myers <joseph@codesourcery.com>
9799
9800 * c-common.c (c_cpp_error): Update names of diagnostic_context
9801 members.
9802 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9803 cl_optimization members.
9804 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9805 sanitize_cpp_opts, finish_options): Update names of cpp_options
9806 members.
9807
1973201f
NP
98082010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9809
9810 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9811 (objc_is_reserved_word): Removed.
9812 * c-common.c: Updated comments.
9813 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9814 objc_is_reserved_word.
9815 * stub-objc.c (objc_is_reserved_word): Removed.
9816
f7e71da5
IS
98172010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9818
9faeb493 9819 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9820 include attributes.
9821 (objc_start_method_definition): Likewise.
9822 (objc_build_keyword_decl): Likewise.
9823 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9824 (objc_start_method_definition): Likewise.
9825 (objc_build_keyword_decl): Likewise.
9826
c165dca7
IS
98272010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9828
9829 * c-common.h (objc_start_class_interface): Adjust prototype.
9830 (objc_start_category_interface): Likewise.
9831 (objc_start_protocol): Likewise.
9832 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9833 (objc_start_class_interface): Likewise.
9834 (objc_start_category_interface): Likewise.
9835
7458026b
ILT
98362010-09-27 Ian Lance Taylor <iant@google.com>
9837
9838 * c-common.c (c_common_attribute_table): Add no_split_stack.
9839 (handle_no_split_stack_attribute): New static function.
9840
b581b85b
NP
98412010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9842
9faeb493 9843 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9844
3f8257db 9845 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9846
9faeb493 9847 Radar 4229905
b581b85b
NP
9848 * c-common.h (objc_have_common_type): New declaration.
9849 * stub-objc.c (objc_have_common_type): New stub.
9850
9851 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9852
9853 Radar 4154928
9854 * c-common.h (objc_common_type): New prototype.
9faeb493 9855 * stub-objc.c (objc_common_type): New stub.
b581b85b 9856
46a4da10
JH
98572010-09-24 Jan Hubicka <jh@suse.cz>
9858
9859 * c-common.c (handle_leaf_attribute): New function.
9860 (struct attribute_spec c_common_att): Add leaf.
9861
e200444e
JM
98622010-09-22 Joseph Myers <joseph@codesourcery.com>
9863
9864 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9865 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9866 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9867 -include-barrier, -include-directory, -include-directory=,
9868 -include-directory-after, -include-directory-after=,
9869 -include-prefix, -include-prefix=, -include-with-prefix,
9870 -include-with-prefix=, -include-with-prefix-after,
9871 -include-with-prefix-after=, -include-with-prefix-before,
9872 -include-with-prefix-before=, -no-integrated-cpp,
9873 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9874 -output=, -pedantic, -pedantic-errors, -preprocess,
9875 -print-missing-file-dependencies, -trace-includes, -traditional,
9876 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9877 -user-dependencies, -verbose, -write-dependencies,
9878 -write-user-dependencies, no-integrated-cpp, traditional): New.
9879
29a80ea6
NP
98802010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9881
9882 PR objc/23710
ac1fc2fc
NP
9883 * c-common.h (objc_start_method_definition): Return bool instead
9884 of void.
9885 * stub-objc.c (objc_start_method_definition): Return bool instead
9886 of void.
9887
98882010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9889
9890 PR objc/25965
9891 * c-common.h (objc_get_interface_ivars): New declaration.
9892 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9893
de621752
ILT
98942010-09-15 Ian Lance Taylor <iant@google.com>
9895
9896 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9897 messages. Remove period at end of warning message.
de621752 9898
ba885ec5
NS
98992010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9900
9901 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9902 (handle_alias_attribute): ... here.
9903 (handle_ifunc_attribute): New.
9904
c5ee1358
MM
99052010-09-06 Mark Mitchell <mark@codesourcery.com>
9906
9907 * c-common.h (do_warn_double_promotion): Declare.
9908 * c-common.c (do_warn_double_promotion): Define.
9909
0a0b3574
MM
99102010-09-05 Mark Mitchell <mark@codesourcery.com>
9911
9912 * c.opt (Wdouble-promotion): New.
9913
d1779886
JM
99142010-09-02 Joseph Myers <joseph@codesourcery.com>
9915
9916 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9917 fvtable-thunks, fxref): Mark no longer supported in help text.
9918
2d2bd949
JM
99192010-09-02 Joseph Myers <joseph@codesourcery.com>
9920
9921 * c.opt (Wimport, fall-virtual, falt-external-templates,
9922 fdefault-inline, fenum-int-equiv, fexternal-templates,
9923 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9924 fname-mangling-version-, fnew-abi, fnonnull-objects,
9925 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9926 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9927 applicable.
9928 (fhandle-exceptions): Mark with Alias and Warn.
9929 * c-opts.c (c_common_handle_option): Don't handle options marked
9930 as ignored.
9931
5de8299c
JM
99322010-09-02 Joseph Myers <joseph@codesourcery.com>
9933
9934 * c.opt (Wcomments, Werror-implicit-function-declaration,
9935 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9936 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9937 aliases.
9938 * c-common.c (option_codes): Use OPT_Wcomment instead of
9939 OPT_Wcomments.
9940 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9941 Don't handle options marked as aliases.
9942
0ceb0201
RG
99432010-08-25 Richard Guenther <rguenther@suse.de>
9944
9945 * c-common.c (c_common_get_alias_set): Remove special
9946 handling for pointers.
9947
ac47786e
NF
99482010-08-20 Nathan Froyd <froydnj@codesourcery.com>
9949
9950 * c-common.c: Use FOR_EACH_VEC_ELT.
9951 * c-gimplify.c: Likewise.
9952 * c-pragma.c: Likewise.
9953
c878765b
JM
99542010-08-16 Joseph Myers <joseph@codesourcery.com>
9955
9956 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
9957 RejectDriver.
9958 (MMDX): Change back to MMD. Mark NoDriverArg instead of
9959 RejectDriver.
9960 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
9961 instead of OPT_MDX and OPT_MMDX.
9962
603349bf
JM
99632010-08-16 Joseph Myers <joseph@codesourcery.com>
9964
9965 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
9966
644fa7ac
JM
99672010-08-12 Joseph Myers <joseph@codesourcery.com>
9968
9969 * c.opt (MD, MMD): Change to MDX and MMDX.
9970 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
9971
481e1176
JM
99722010-08-11 Joseph Myers <joseph@codesourcery.com>
9973
9974 * c-opts.c (c_common_handle_option): Call handle_generated_option
9975 instead of handle_option.
9976
ac8dc9f7
NF
99772010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9978
9979 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
9980 (maybe_apply_renaming_pragma): Delete unneeded declarations.
9981
4f8c876d
NF
99822010-08-08 Nathan Froyd <froydnj@codesourcery.com>
9983
9984 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
9985 (pending_redefine_extname): Change type to a VEC.
9986 (add_to_renaming_pragma_list): Update for new type of
9987 pending_redefine_extname.
ac8dc9f7 9988 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 9989
3b0c690e
AC
99902010-08-04 Arnaud Charlet <charlet@adacore.com>
9991
9992 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
9993 visited.
9994 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
9995 decide whether a type has already been declared/seen.
9996 Do not go to the original type.
9997 (dump_nested_types): New parameter forward.
9998 Generate forward declaration if needed and mark type as visited.
9999 (print_ada_declaration): Call dump_nested_types if not already done.
10000 Mark types as visited.
10001
1890bccc
JM
100022010-08-03 Joseph Myers <joseph@codesourcery.com>
10003
10004 * c.opt (-print-pch-checksum): Remove option.
10005 * c-opts.c (c_common_handle_option): Don't handle
10006 OPT_print_pch_checksum.
10007
5f20c657
JM
100082010-07-27 Joseph Myers <joseph@codesourcery.com>
10009
10010 * c-common.h (c_common_handle_option): Update prototype and return
10011 value type.
10012 * c-opts.c (c_common_handle_option): Update prototype and return
10013 value type. Update calls to handle_option and
10014 enable_warning_as_error.
10015
f551f80c
JJ
100162010-07-27 Jakub Jelinek <jakub@redhat.com>
10017
10018 PR c/45079
10019 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10020
61ff2bdc
JM
100212010-07-27 Joseph Myers <joseph@codesourcery.com>
10022
10023 * c-common.h (c_common_missing_argument): Remove.
10024 * c-opts.c (c_common_missing_argument): Remove.
10025 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10026 idirafter, imacros, include, isysroot, isystem, iquote): Add
10027 MissingArgError.
10028 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10029
7a9bf9a4
JM
100302010-07-27 Joseph Myers <joseph@codesourcery.com>
10031
10032 * c-common.h (c_common_option_lang_mask,
10033 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10034 New.
10035 (c_common_init_options): Update prototype.
10036 * c-opts.c (c_common_option_lang_mask): New.
10037 (c_common_initialize_diagnostics): Split out of
10038 c_common_init_options.
10039 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10040 New.
10041 (c_common_init_options): Update prototype. Use decoded options in
10042 search for -lang-asm.
10043
910ad8de
NF
100442010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10045
10046 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10047 * c-format.c: Likewise.
10048
718f9c0f
MLI
100492010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10050
10051 * c-common.h: Include diagnostic-core.h. Error if already
10052 included.
10053 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10054
4d451982
MLI
100552010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10056
adfac8df 10057 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10058 Do not include expr.h
10059 (vector_mode_valid_p): Move here.
10060
119fe915
SB
100612010-06-21 DJ Delorie <dj@redhat.com>
10062
10063 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10064 allow these pragmas anywhere.
10065
100662010-06-14 Jakub Jelinek <jakub@redhat.com>
10067
10068 PR bootstrap/44509
10069 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10070 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10071 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10072 ggc_strdup instead of xstrdup.
10073
100742010-06-10 Jakub Jelinek <jakub@redhat.com>
10075
10076 * c-cppbuiltin.c: Include cpp-id-data.h.
10077 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10078 (lazy_hex_fp_value): New function.
10079 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10080
6662d794
MLI
100812010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10082
10083 * c-gimplify.c: Do not include tree-flow.h
10084
38f8b050
JR
100852010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10086
10087 PR other/44034
10088 * c-common.c: Rename targetm member:
10089 targetm.enum_va_list -> targetm.enum_va_list_p
10090
9589f23e
AS
100912010-06-28 Anatoly Sokolov <aesok@post.ru>
10092
10093 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10094
3b06d379
SB
100952010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10096
10097 * c-cppbuiltin.c: Do not include except.h.
10098
d166d4c3
AK
100992010-06-24 Andi Kleen <ak@linux.intel.com>
10100
9faeb493
UB
10101 * c-common.c (warn_for_omitted_condop): New.
10102 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10103
70cb8be6
JM
101042010-06-21 Joseph Myers <joseph@codesourcery.com>
10105
10106 * c.opt (lang-objc): Remove.
10107 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10108
a4c97feb
JR
101092010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10110
10111 * c-opts.c: Include "tm_p.h".
10112
6e2f1956
JM
101132010-06-20 Joseph Myers <joseph@codesourcery.com>
10114
10115 * c-common.c (parse_optimize_options): Update call to
10116 decode_options.
10117
bc87224e
NF
101182010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10119
10120 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10121 new type of types_used_by_cur_var_decl.
10122
b49cf425
JR
101232010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10124
10125 PR bootstrap/44512
10126 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10127 for C++ standard compliance.
10128
59f9c2ed
JM
101292010-06-16 Jason Merrill <jason@redhat.com>
10130
10131 * c.opt: Add -Wnoexcept.
10132
33766b66
RG
101332010-06-16 Richard Guenther <rguenther@suse.de>
10134
10135 PR c/44555
10136 * c-common.c (c_common_truthvalue_conversion): Remove
10137 premature and wrong optimization concering ADDR_EXPRs.
10138
eff7e30c
AC
101392010-06-15 Arnaud Charlet <charlet@adacore.com>
10140
10141 * c-ada-spec.c (dump_sloc): Remove column info.
10142 (is_simple_enum): New function.
10143 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10144 enum types when relevant.
10145
6312e84d
MLI
101462010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10147
9faeb493 10148 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10149 location.
10150
1cb42611
JM
101512010-06-10 Joseph Myers <joseph@codesourcery.com>
10152
10153 * c-opts.c (c_common_handle_option): Don't handle
10154 OPT_fshow_column.
10155
a9429e29
LB
101562010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10157
10158 * c-pragma.c (push_alignment): Use typed GC allocation.
10159 (handle_pragma_push_options): Likewise.
10160
10161 * c-common.c (parse_optimize_options): Likewise.
10162
10163 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10164 option.
10165
5498f011
JM
101662010-06-07 Joseph Myers <joseph@codesourcery.com>
10167
10168 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10169 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10170 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10171 flag_signed_bitfields, warn_strict_null_sentinel,
10172 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10173 flag_gen_declaration, flag_no_gnu_keywords,
10174 flag_implement_inlines, flag_implicit_templates,
10175 flag_implicit_inline_templates, flag_optional_diags,
10176 flag_elide_constructors, flag_default_inline, flag_rtti,
10177 flag_conserve_space, flag_access_control, flag_check_new,
10178 flag_new_for_scope, flag_weak, flag_working_directory,
10179 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10180 flag_enforce_eh_specs, flag_threadsafe_statics,
10181 flag_pretty_templates): Remove.
10182 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10183 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10184 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10185 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10186 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10187 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10188 flag_no_gnu_keywords, flag_implement_inlines,
10189 flag_implicit_templates, flag_implicit_inline_templates,
10190 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10191 flag_rtti, flag_conserve_space, flag_access_control,
10192 flag_check_new, flag_new_for_scope, flag_weak,
10193 flag_working_directory, flag_use_cxa_atexit,
10194 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10195 flag_threadsafe_statics, flag_pretty_templates,
10196 warn_strict_null_sentinel): Remove.
10197 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10198 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10199 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10200 fimplicit-inline-templates, fimplicit-templates,
10201 flax-vector-conversions, fms-extensions, fnil-receivers,
10202 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10203 frtti, fshort-double, fshort-enums, fshort-wchar,
10204 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10205 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10206 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10207 gen-decls, undef): Use Var.
10208 (fdefault-inline, foptional-diags): Document as doing nothing.
10209 * c-opts.c (c_common_handle_option): Remove cases for options now
10210 using Var. Mark ignored options as such.
10211
39dabefd
SB
102122010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10213
9faeb493 10214 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10215 * c-common.def: Likewise.
10216 * c-common.h: Likewise.
10217 * c-cppbuiltin.c: Likewise.
10218 * c-dump.c: Likewise.
10219 * c-format.c: Likewise.
10220 * c-format.h : Likewise.
10221 * c-gimplify.c: Likewise.
10222 * c-lex.c: Likewise.
10223 * c-omp.c: Likewise.
10224 * c.opt: Likewise.
10225 * c-opts.c: Likewise.
10226 * c-pch.c: Likewise.
10227 * c-ppoutput.c: Likewise.
10228 * c-pragma.c: Likewise.
10229 * c-pragma.h: Likewise.
10230 * c-pretty-print.c: Likewise.
10231 * c-pretty-print.h: Likewise.
10232 * c-semantics.c: Likewise.
10233 * stub-objc.c: Likewise.
10234
10235 * c-common.c: Include gt-c-family-c-common.h.
10236 * c-pragma.c: Include gt-c-family-c-pragma.h.
10237\f
a5544970 10238Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10239
10240Copying and distribution of this file, with or without modification,
10241are permitted in any medium without royalty provided the copyright
10242notice and this notice are preserved.