]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Make -flto=jobserver parallel again.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
14b7950f
MS
12019-08-22 Martin Sebor <msebor@redhat.com>
2
3 PR middle-end/91490
4 * c-common.c (braced_list_to_string): Add argument and overload.
5 Handle flexible length arrays and unions.
6
8bb2ee59
EB
72019-08-21 Eric Botcazou <ebotcazou@adacore.com>
8
9 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
10 function declarations where arguments are missing. Rename variables.
11
21c1e205
RB
122019-08-15 Richard Biener <rguenther@suse.de>
13
14 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
15 enabled, define __SIZETYPE__.
16
f0033821
CL
172019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
18
19 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
20 exclusion with "section" attribute.
21 (attr_noinit_exclusions): New table.
22 (handle_noinit_attribute): New function.
23
4d732405
RS
242019-08-13 Richard Sandiford <richard.sandiford@arm.com>
25
26 PR middle-end/91421
27 * c-common.c (resolve_overloaded_builtin): Use
28 copy_decl_built_in_function.
29
51ad8481
MS
302019-08-13 Martin Sebor <msebor@redhat.com>
31
32 PR c/80619
33 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
34 (asm_fprintf_length_spec): Same.
35 * c-format.h (format_lengths): Add FMT_LEN_w.
36
77eb117f
JJ
372019-08-10 Jakub Jelinek <jakub@redhat.com>
38
39 * c-pragma.h (enum pragma_omp_clause): Add
40 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
41
398e3feb
JJ
422019-08-07 Jakub Jelinek <jakub@redhat.com>
43
44 * c-pragma.h (enum pragma_omp_clause): Add
45 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
46 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
47 enumeration value.
48
ab574db6
MP
492019-08-05 Marek Polacek <polacek@redhat.com>
50
51 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
52 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
53 default for C++2a, unless -Wno-deprecated.
54 * c.opt (Wcomma-subscript): New warning.
55
554a530f
JJ
562019-07-20 Jakub Jelinek <jakub@redhat.com>
57
58 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
59 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
60 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
61 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
62 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
63 constructs with the loop construct.
64
1a888209
JJ
652019-07-13 Jakub Jelinek <jakub@redhat.com>
66
67 PR c/91149
68 * c-omp.c (c_omp_split_clauses): Fix a pasto in
69 OMP_CLAUSE_REDUCTION_TASK handling.
70
1fdd6f04
JJ
712019-07-12 Jakub Jelinek <jakub@redhat.com>
72
73 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
74 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
75
99b1c316
MS
762019-07-09 Martin Sebor <msebor@redhat.com>
77
78 PR c++/61339
1fdd6f04 79 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
80 and others to class.
81 * c-pretty-print.h: Same.
82
6c1dae73
MS
832019-07-09 Martin Sebor <msebor@redhat.com>
84
85 PR c++/61339
86 * c-format.c (check_argument_type): Change class-key from class to
87 struct and vice versa to match convention and avoid -Wclass-is-pod
88 and -Wstruct-no-pod.
89 * c-pretty-print.h: Same.
90
8ba6ea87
ML
912019-07-03 Martin Liska <mliska@suse.cz>
92
93 * c-common.c (try_to_locate_new_include_insertion_point): Remove
94 dead assignemts.
95
83eb9522
JJ
962019-07-03 Jakub Jelinek <jakub@redhat.com>
97
98 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
99 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
100 with OMP_PARALLEL.
101
1c6ffbab
QZ
1022019-07-02 qing zhao <qing.zhao@oracle.com>
103
104 PR preprocessor/90581
105 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
106 * c.opt: Add new option -fmax-include-depth.
107
7ffc7de5
JM
1082019-06-26 Jason Merrill <jason@redhat.com>
109
110 PR c++/55442 - memory-hog with highly recursive constexpr.
111 * c.opt (fconstexpr-loop-limit): New.
112
361af3e4
JJ
1132019-06-25 Jakub Jelinek <jakub@redhat.com>
114
115 PR sanitizer/90954
116 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
117 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
118
ab20d992
JJ
1192019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
120
121 * c-common.c (c_common_nodes_and_builtins): Define
122 alternate "__intN__" name for "__intN" types.
123
f4af4019
JH
1242019-06-24 Jan Hubicka <jh@suse.cz>
125
126 * c-common.c (braced_lists_to_strings): Check that
127 type is array or integer prior checking string flag.
128
da9e9b57
MB
1292019-06-21 Matthew Beliveau <mbelivea@redhat.com>
130
131 PR c++/90875 - added -Wswitch-outside-range option
132 * c.opt (Wswitch-outside-range): Added new option.
133 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
134
3f3d6a6f
MP
1352019-06-21 Marek Polacek <polacek@redhat.com>
136
137 PR c++/90953 - ICE with -Wmissing-format-attribute.
138 * c-common.c (check_function_arguments_recurse): Use
139 get_attribute_name.
140 (check_missing_format_attribute): Likewise.
141
1bf32c11
MP
1422019-06-19 Marek Polacek <polacek@redhat.com>
143
144 PR c++/60364 - noreturn after first decl not diagnosed.
145 * c-attribs.c (handle_noreturn_attribute): No longer static.
146 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
147 Declare.
148 * c-format.c (check_function_format): Use get_attribute_name.
149
a04c0734
MS
1502019-06-19 Martin Sebor <msebor@redhat.com>
151
152 PR translation/90156
153 * c-format.c (function_format_info::format_type): Adjust type.
154 (function_format_info::is_raw): New member.
155 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
156 (decode_format_attr): Adjust call to decode_format_type.
157 Avoid a redundant call to convert_format_name_to_system_name.
158 Avoid abbreviating the word "arguments" in a diagnostic.
159 (format_warning_substr): New function.
160 (avoid_dollar_number): Quote dollar sign in a diagnostic.
161 (finish_dollar_format_checking): Same.
162 (check_format_info): Same.
163 (struct baltoks_t): New.
164 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
165 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
166 functions.
167 (check_format_info_main): Call check_plain. Use baltoks_t. Call
168 maybe_diag_unbalanced_tokens.
169 (handle_format_attribute): Spell out the word "arguments" in
170 a diagnostic.
171
d3786ebb
MB
1722019-06-11 Matthew Beliveau <mbelivea@redhat.com>
173
174 PR c++/90449 - add -Winaccessible-base option.
175 * c.opt (Winaccessible-base): New option.
176
bf38f7e9
JJ
1772019-06-10 Jakub Jelinek <jakub@redhat.com>
178
179 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
180 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
181 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
182 combined/composite constructs where it is not allowed. Copy over
183 OMP_CLAUSE_REDUCTION_INSCAN.
184
0ecf545c
MS
1852019-06-05 Martin Sebor <msebor@redhat.com>
186
187 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
188 (handle_alias_ifunc_attribute): Same.
189 (handle_copy_attribute): Same.
190 (handle_weakref_attribute): Same.
191 (handle_nonnull_attribute): Same.
192 * c-warn.c (warn_for_sign_compare): Same.
193 (warn_for_restrict): Same.
194 * c.opt: Same.
195
36b34127
MS
1962019-06-05 Martin Sebor <msebor@redhat.com>
197
198 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
199 * c.opt (-Wformat-diag): Remove a spurious period.
200
357a352f
JJ
2012019-05-29 Jakub Jelinek <jakub@redhat.com>
202
203 PR c/90628
204 * c-common.c (check_builtin_function_arguments)
205 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
206 as last argument.
207
2b8235ea
EB
2082019-05-23 Eric Botcazou <ebotcazou@adacore.com>
209
210 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
211
6d86ddc4
ML
2122019-05-22 Martin Liska <mliska@suse.cz>
213
214 PR lto/90500
215 * c-attribs.c (handle_copy_attribute): Do not copy
216 target_clones attribute.
217
419ba5b9
EB
2182019-05-21 Eric Botcazou <ebotcazou@adacore.com>
219
220 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
221 * c-ada-spec.c (print_assignment_operator): New function.
222 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
223 assignment operators declared as methods and filter out the others.
224
e03436e7
TS
2252019-05-17 Thomas Schwinge <thomas@codesourcery.com>
226
227 PR c/89433
228 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
229 "omp declare target".
230
a9c697b8
MS
2312019-05-16 Martin Sebor <msebor@redhat.com>
232
ab20d992
JJ
233 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
234 keywords, operators, and types in diagnostics.
235 (handle_scalar_storage_order_attribute): Same.
236 (handle_mode_attribute): Same.
237 (handle_visibility_attribute): Same.
238 (handle_assume_aligned_attribute): Same.
239 (handle_no_split_stack_attribute): Same.
240 * c-common.c (shorten_compare): Same.
241 (c_common_truthvalue_conversion): Same.
242 (cb_get_source_date_epoch): Same.
243 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
244 in diagnostics.
245 (interpret_float): Same.
246 * c-omp.c (c_finish_omp_for): Same.
247 * c-opts.c (c_common_post_options): Same.
248 * c-pch.c (c_common_pch_pragma): Same.
249 * c-pragma.c (pop_alignment): Same.
250 (handle_pragma_pack): Same.
251 (apply_pragma_weak): Same.
252 (handle_pragma_weak): Same.
253 (handle_pragma_scalar_storage_order): Same.
254 (handle_pragma_redefine_extname): Same.
255 (add_to_renaming_pragma_list): Same.
256 (maybe_apply_renaming_pragma): Same.
257 (push_visibility): Same.
258 (handle_pragma_visibility): Same.
259 (handle_pragma_optimize): Same.
260 (handle_pragma_message): Same.
261 * c-warn.c (warn_for_omitted_condop): Same.
262 (lvalue_error): Same.
a9c697b8 263
6b943512
RB
2642019-05-15 Richard Biener <rguenther@suse.de>
265
266 PR c/90474
267 * c-common.c (c_common_mark_addressable_vec): Also mark
268 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
269 c_mark_addressable.
ab20d992 270
b744fc85
NS
2712019-05-06 Nathan Sidwell <nathan@acm.org>
272
273 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
274
598f50d7
NS
2752019-04-30 Nathan Sidwell <nathan@acm.org>
276
277 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
278
5bcc5a3b
ML
2792019-04-30 Martin Liska <mliska@suse.cz>
280
281 * c-pragma.c (handle_pragma_diagnostic): Provide hints
282 for unknown options.
283
e78a87f7
RS
2842019-04-26 Richard Sandiford <richard.sandiford@arm.com>
285
286 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
287 the pointer target rather than the pointer itself.
288
c280b7ee
JJ
2892019-04-19 Jakub Jelinek <jakub@redhat.com>
290
291 PR c/89888
292 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
293 arguments.
294 (c_do_switch_warnings): Remove outside_range_p argument.
295 * c-common.c (check_case_bounds): Removed.
296 (c_add_case_label): Remove orig_type and outside_range_p arguments.
297 Don't call check_case_bounds. Fold low_value as well as high_value.
298 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
299 Check for case labels outside of range of original type here and
300 adjust them.
301
8e8225e6
JJ
3022019-04-12 Jakub Jelinek <jakub@redhat.com>
303
63b8a166
JJ
304 PR translation/90041
305 * c.opt (-fhandle-exceptions): Use %< and %> around option names
306 in the Warn diagnostics.
307
8e8225e6
JJ
308 PR c/89946
309 * c-attribs.c (handle_patchable_function_entry_attribute): Add
310 function comment. Warn if arguments of the attribute are not positive
311 integer constants.
312
53a3f614
EB
3132019-04-09 Eric Botcazou <ebotcazou@adacore.com>
314
315 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
316 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
317
22be5873
EB
3182019-04-07 Eric Botcazou <ebotcazou@adacore.com>
319
320 * c-ada-spec.c (is_float128): New predicate extracted from...
321 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
322 <REAL_TYPE>: ...here. Call it.
323
34facf20
DM
3242019-04-05 David Malcolm <dmalcolm@redhat.com>
325
326 PR c/89985
327 * c-warn.c (check_address_or_pointer_of_packed_member): Add
328 auto_diagnostic_group. Guard inform calls by result of
329 warning_at call.
330
05564120
MP
3312019-04-05 Marek Polacek <polacek@redhat.com>
332
ab20d992 333 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
334 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
335 of RHS.
336
7a506c3c
JM
3372019-04-03 Jason Merrill <jason@redhat.com>
338
339 PR c++/86586 - -fcompare-debug=-Wsign-compare.
340 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
341
ddeae8c8
MS
3422019-04-01 Martin Sebor <msebor@redhat.com>
343
344 PR c/89685
345 * c-attribs.c (handle_copy_attribute): Handle references and
346 non-constant expressions.
347
a15ffa22
JJ
3482019-03-22 Jakub Jelinek <jakub@redhat.com>
349
350 PR c++/87481
351 * c.opt (-fconstexpr-ops-limit=): New option.
352
36a3a7a3
JJ
3532019-03-21 Jakub Jelinek <jakub@redhat.com>
354
355 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
356 template param.
357
bec1da64
MS
3582019-03-19 Martin Sebor <msebor@redhat.com>
359
360 PR tree-optimization/89688
361 * c-common.c (braced_list_to_string): Make static.
362 (braced_lists_to_strings): Define new function.
363 * c-common.h (braced_list_to_string): Remove.
364 (braced_lists_to_strings): Declare.
365
1fe61adf
ML
3662019-03-12 Martin Liska <mliska@suse.cz>
367
368 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
369
93964ebd
ML
3702019-03-11 Martin Liska <mliska@suse.cz>
371
372 * c-opts.c (c_common_post_options): Wrap apostrophes
373 in gcc internal format with %'.
374
a3f9f006
ML
3752019-03-11 Martin Liska <mliska@suse.cz>
376
377 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
378 in a string format message and fix GNU coding style.
379 * c-common.c (vector_types_convertible_p): Likewise.
380 (c_build_vec_perm_expr): Likewise.
381 * c-indentation.c (get_visual_column): Likewise.
382 * c-opts.c (c_common_handle_option): Likewise.
383 (c_common_post_options): Likewise.
384 (sanitize_cpp_opts): Likewise.
385 * c-pch.c (c_common_pch_pragma): Likewise.
386 * c-pragma.c (handle_pragma_pack): Likewise.
387
1db01ff9
JJ
3882019-03-08 Jakub Jelinek <jakub@redhat.com>
389
390 PR tree-optimization/89550
391 * c-common.c (c_common_truthvalue_conversion): Only set
392 TREE_NO_WARNING if warning_at returned true.
393 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
394
ba790e6f
JJ
3952019-02-25 Sandra Loosemore <sandra@codesourcery.com>
396 Martin Sebor <msebor@gmail.com>
397
398 * c.opt (Wmissing-attributes): Clean up doc string.
399
7da73ba7
JJ
4002019-02-25 Jakub Jelinek <jakub@redhat.com>
401
402 PR c/89495
403 * c-format.c (maybe_read_dollar_number): Compute nargnum in
404 HOST_WIDE_INT type to avoid overflows and change overflow_flag
405 checking.
406
921bb9d1
RB
4072019-02-22 Richard Biener <rguenther@suse.de>
408
409 * c-pch.c (no_checksum): Remove.
410 (pch_init): Remove assertion that executable_checksum is not
411 all zero.
412 (c_common_valid_pch): Likewise.
413
e2ebb05c
MS
4142019-02-18 Martin Sebor <msebor@redhat.com>
415
416 PR middle-end/89294
417 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
418
3fe53000
DM
4192019-02-16 David Malcolm <dmalcolm@redhat.com>
420
421 PR c++/88680
422 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
423 implementing -Wtype-limits.
424
28a8cef1
MS
4252019-02-11 Martin Sebor <msebor@redhat.com>
426
427 PR c++/87996
428 * c-common.c (invalid_array_size_error): New function.
429 (valid_array_size_p): Call it. Handle size as well as type.
430 * c-common.h (valid_constant_size_p): New function.
431 (enum cst_size_error): New type.
432
ec2be203
DM
4332019-01-31 David Malcolm <dmalcolm@redhat.com>
434
435 PR c/89122
436 * known-headers.cc (get_stdlib_header_for_name): Add
437 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
438
8936f047
JJ
4392019-01-31 Jakub Jelinek <jakub@redhat.com>
440
441 PR libstdc++/88170
442 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
443 a C cast in pp_c_flag_gnu_v3 mode.
444
6a335b96
JJ
4452019-01-29 Jakub Jelinek <jakub@redhat.com>
446
447 PR c/86125
448 * c-common.c (c_common_nodes_and_builtins): Build type variants for
449 builtin_structptr_types types even for C.
450
2a06eba5
BE
4512019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
452
453 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
454 when rhs is of array type correctly. Fix handling of nested structures.
455 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
456 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
457 type casts within nested compound expressions.
458
18a23298
JJ
4592019-01-22 Jakub Jelinek <jakub@redhat.com>
460
461 PR middle-end/88968
462 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
463 variable after using BIT_FIELD_REF.
464
420183d9
L
4652019-01-18 H.J. Lu <hongjiu.lu@intel.com>
466
467 PR c/51628
468 PR c/88664
469 * c-common.h (warn_for_address_or_pointer_of_packed_member):
470 Remove the boolean argument.
471 * c-warn.c (check_address_of_packed_member): Renamed to ...
472 (check_address_or_pointer_of_packed_member): This. Also
473 warn pointer conversion.
474 (check_and_warn_address_of_packed_member): Renamed to ...
475 (check_and_warn_address_or_pointer_of_packed_member): This.
476 Also warn pointer conversion.
477 (warn_for_address_or_pointer_of_packed_member): Remove the
478 boolean argument. Don't check pointer conversion here.
479
99063eee
RS
4802019-01-15 Richard Sandiford <richard.sandiford@arm.com>
481
482 PR inline-asm/52813
483 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
484
a30d0196
JJ
4852019-01-14 Jakub Jelinek <jakub@redhat.com>
486
487 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
488 and __cpp_nontype_template_parameter_auto. Add a comment that
489 __cpp_template_auto is deprecated.
490
2d91f79d
TH
4912019-01-14 Tom Honermann <tom@honermann.net>
492
493 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
494 * c-common.c (c_common_reswords): Add char8_t.
495 (fix_string_type): Use char8_t for the type of u8 string literals.
496 (c_common_get_alias_set): char8_t doesn't alias.
497 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
498 C++.
499 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
500 (keyword_begins_type_specifier): Add RID_CHAR8.
501 * c-common.h (rid): Add RID_CHAR8.
502 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
503 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
504 Define char8_type_node and char8_array_type_node.
505 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
506 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
507 (c_cpp_builtins): Predefine __cpp_char8_t.
508 * c-lex.c (lex_string): Use char8_array_type_node as the type of
509 CPP_UTF8STRING.
510 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
511 * c-opts.c: If not otherwise specified, enable -fchar8_t when
512 targeting C++2a.
513 * c.opt: Add the -fchar8_t command line option.
514
23db6ced
MS
5152019-01-14 Martin Sebor <msebor@redhat.com>
516
517 PR target/88638
518 * c-attribs.c (positional_argument): Call valid_format_string_type_p
519 and issue errors if it fails.
520 * c-common.h (valid_format_string_type_p): Declare.
521 * c-format.c (valid_stringptr_type_p): Rename...
522 (valid_format_string_type_p): ...to this and make extern.
523 (handle_format_arg_attribute): Adjust to new name.
524 (check_format_string): Same.
525
234c3818
L
5262019-01-13 H.J. Lu <hongjiu.lu@intel.com>
527
528 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
529 Replace "may may" with "may" in warning message.
530
d8fcab68
JJ
5312019-01-07 Jakub Jelinek <jakub@redhat.com>
532
533 PR c++/85052
534 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
535 (c_build_vec_convert): Declare.
536 * c-common.c (c_build_vec_convert): New function.
537
29d24852
MS
5382019-01-04 Martin Sebor <msebor@redhat.com>
539
540 PR c/88546
541 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
542 Handle C++ empty throw specification and C11 _Noreturn.
543 (has_attribute): Also handle C11 _Noreturn.
544
9069a4c9
MS
5452019-01-04 Martin Sebor <msebor@redhat.com>
546
547 PR c/88363
548 * c-attribs.c (positional_argument): Also accept enumerated types.
549
a5544970
JJ
5502019-01-01 Jakub Jelinek <jakub@redhat.com>
551
552 Update copyright years.
553
da77eace
L
5542018-12-20 H.J. Lu <hongjiu.lu@intel.com>
555
556 PR c/51628
557 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
558 * c-warn.c (check_alignment_of_packed_member): New function.
559 (check_address_of_packed_member): Likewise.
560 (check_and_warn_address_of_packed_member): Likewise.
561 (warn_for_address_or_pointer_of_packed_member): Likewise.
562 * c.opt: Add -Wno-address-of-packed-member.
563
573767d4
DM
5642018-12-20 David Malcolm <dmalcolm@redhat.com>
565
566 PR c++/87504
567 * c-warn.c (get_outermost_macro_expansion): New function.
568 (spelled_the_same_p): Use it to unwind the macro expansions, and
569 compare the outermost macro in each nested expansion, rather than
570 the innermost.
571
a14feb3c
DM
5722018-12-19 David Malcolm <dmalcolm@redhat.com>
573
574 PR c++/87504
575 * c-common.h (warn_tautological_cmp): Convert 1st param from
576 location_t to const op_location_t &.
577 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
578 when testing for INTEGER_CST.
579 (warn_tautological_bitwise_comparison): Convert 1st param from
580 location_t to const op_location_t &; use it to build a
581 binary_op_rich_location, and use this.
582 (spelled_the_same_p): New function.
583 (warn_tautological_cmp): Convert 1st param from location_t to
584 const op_location_t &. Warn for macro expansions if
585 spelled_the_same_p. Use binary_op_rich_location.
586
dfd7fdca
DM
5872018-12-19 David Malcolm <dmalcolm@redhat.com>
588
589 PR c++/43064
590 PR c++/43486
591 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
592 (verify_tree): Handle location wrappers.
593 (c_common_truthvalue_conversion): Strip any location wrapper.
594 Handle CONST_DECL.
595 (fold_offsetof): Strip any location wrapper.
596 (complete_array_type): Likewise for initial_value.
597 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
598 index before checking for INTEGER_CST.
599 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
600 print parentheses around location wrappers.
601 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
602 before checking for INTEGER_CST.
603 (warn_tautological_bitwise_comparison): Call
604 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
605 before checking for INTEGER_CST.
606 (readonly_error): Strip any location wrapper.
607 (warn_array_subscript_with_type_char): Strip location wrappers
608 before checking for INTEGER_CST. Use the location of the index if
609 available.
610
5c8b3702
JM
6112018-12-06 Jason Merrill <jason@redhat.com>
612
613 PR c++/88136 - -Wdeprecated-copy false positives
614 * c.opt (Wdeprecated-copy-dtor): New.
615 (Wdeprecated-copy): Move to -Wextra.
616
673670da
MS
6172018-11-29 Martin Sebor <msebor@redhat.com>
618
619 PR c/88172
620 PR testsuite/88208
621 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
622 alignments to values less than the target requires.
623 (has_attribute): For attribute aligned consider both the attribute
624 and the alignment bits.
625 * c-common.c (c_init_attributes): Optionally issue a warning for
626 zero alignment.
627
04864ec8
MS
6282018-11-28 Martin Sebor <msebor@redhat.com>
629
630 PR c/88065
631 PR c/87297
632 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
633 or destination is an error.
634
ace83db0
JJ
6352018-11-28 Jakub Jelinek <jakub@redhat.com>
636
637 PR c++/88215
638 * c-ubsan.c: Include langhooks.h.
639 (ubsan_instrument_division): Change gcc_assert that main variants
640 of op0 and op1 types are equal to gcc_checking_assert that the
641 main variants are compatible types.
642
da193a27
EB
6432018-11-27 Eric Botcazou <ebotcazou@adacore.com>
644
645 * c-ada-spec.c: Include stringpool.h.
646 (has_static_fields): Return false for incomplete types.
647 (is_tagged_type): Likewise.
648 (has_nontrivial_methods): Likewise.
649 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
650 (struct overloaded_name_hash): New structure.
651 (struct overloaded_name_hasher): Likewise.
652 (overloaded_names): New global variable.
653 (init_overloaded_names): New static function.
654 (overloaded_name_p): New predicate.
655 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
656 on the TYPE_STUB_DECL of the original type of a typedef, if any.
657 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
658 Remove always-true condition and dump forward types.
659 (dump_ada_specs): Delete overloaded_names.
660
98f08eb8
MS
6612018-11-20 Martin Sebor <msebor@redhat.com>
662
663 * c-attribs.c (type_for_vector_size): New function.
664 (type_valid_for_vector_size): Same.
665 (handle_vector_size_attribute): Move code to the functions above
666 and call them.
667 (validate_attribute, has_attribute): New functions.
668 * c-common.h (has_attribute): Declare.
669 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
670 * c-common.c (c_common_resword): Same.
671
2674fa47
JM
6722018-11-16 Jason Merrill <jason@redhat.com>
673
674 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
675 * c-attribs.c (attr_cold_hot_exclusions): Make public.
676
258b3854
JJ
6772018-11-16 Jakub Jelinek <jakub@redhat.com>
678
679 PR middle-end/87854
680 * c-common.c (fix_string_type): Reject string literals larger than
681 TYPE_MAX_VALUE (ssizetype) bytes.
682
1d249509
MS
6832018-11-15 Martin Sebor <msebor@redhat.com>
684
685 PR c++/87541
686 PR c++/87542
687 * c-attribs.c (positional_argument): New function.
688 (handle_alloc_size_attribute): Use it and simplify.
689 (handle_alloc_align_attribute): Same.
690 (handle_assume_aligned_attribute): Same.
691 (handle_nonnull_attribute): Same.
692 * c-common.c (check_function_arguments): Pass fntype to
693 check_function_format.
694 * c-common.h (check_function_format): Add an argument.
695 (PosArgFlags, positional_argument): Declare new type and function.
696 * c-format.c (decode_format_attr): Add arguments.
697 (check_format_string, get_constant): Same.
698 (convert_format_name_to_system_name): Adjust.
699
478dd60d
DM
7002018-11-15 David Malcolm <dmalcolm@redhat.com>
701
702 PR other/19165
703 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
704
8cca0163
JJ
7052018-11-14 Jakub Jelinek <jakub@redhat.com>
706
8ee09943
JJ
707 P1236R1 - Signed integers are two's complement
708 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
709 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
710 with in-range second operand well defined for -std=c++2a.
711
8cca0163
JJ
712 PR other/88007
713 * c-common.c (parse_optimize_options): Allocate option string from
714 opts_obstack rather than as GC memory. Move the allocation after
715 warning for invalid option.
716
620e594b
DM
7172018-11-13 David Malcolm <dmalcolm@redhat.com>
718
719 * c-common.c (c_get_substring_location): Update for renaming of
720 get_source_location_for_substring to get_location_within_string.
721 * c-lex.c: Replace "source_location" with "location_t".
722 * c-opts.c: Likewise.
723 * c-ppoutput.c: Likewise.
724
f9731de3
MS
7252018-11-13 Martin Sebor <msebor@redhat.com>
726
727 PR middle-end/81824
728 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
729 (handle_tls_model_attribute): Improve diagnostics.
730
e4bd6d5e
JM
7312018-11-12 Jason Merrill <jason@redhat.com>
732
a6bb6b07
JM
733 * c-cppbuiltin.c (c_cpp_builtins): Define
734 __cpp_impl_destroying_delete.
735
e4bd6d5e
JM
736 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
737 __cpp_conditional_explicit.
738
79a2c428
MS
7392018-11-09 Martin Sebor <msebor@redhat.com>
740
741 PR middle-end/81824
742 * c-attribs.c (handle_copy_attribute): New function.
743
4c7bd361
MS
7442018-11-09 Martin Sebor <msebor@redhat.com>
745
746 PR c/87795
747 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
748
28567c40
JJ
7492018-11-08 Jakub Jelinek <jakub@redhat.com>
750
751 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
752 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
753 enum omp_memory_order MEMORY_ORDER.
754 (c_finish_omp_flush): Add MO argument.
755 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
756 (c_finish_omp_for): Add FINAL_P argument.
757 * c-omp.c: Include memmodel.h.
758 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
759 OMP_TASKGROUP_CLAUSES to it.
760 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
761 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
762 instead of OMP_ATOMIC_SEQ_CST.
763 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
764 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
765 __atomic_thread_fence call with the given value.
766 (check_omp_for_incr_expr): Formatting fixes.
767 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
768 even in OpenMP loops, diagnose if NE_EXPR and incr expression
769 is not constant expression 1 or -1. Transform NE_EXPR loops
770 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
771 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
772 loops too.
773 (c_omp_split_clauses): Add support for combined
774 #pragma omp parallel master and
775 #pragma omp {,parallel }master taskloop{, simd} constructs.
776 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
777 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
778 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
779 (c_omp_predetermined_sharing): Don't return
780 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
781 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
782 PRAGMA_OMP_REQUIRES.
783 * c-pragma.h (enum pragma_kind): Likewise.
784 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
785 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
786
204839e7
DM
7872018-11-08 David Malcolm <dmalcolm@redhat.com>
788
789 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
790
d8010ee4
DM
7912018-11-08 David Malcolm <dmalcolm@redhat.com>
792
793 * c-format.c (local_cgraph_node_ptr_node): New variable.
794 (gcc_dump_printf_char_table): Add entry for %C.
795 (get_pointer_to_named_type): New function, taken from the handling
796 code for "gimple *" from...
797 (init_dynamic_diag_info): ...here. Add handling for
798 "cgraph_node *".
799 * c-format.h (T_CGRAPH_NODE): New.
800
4be5c72c
JM
8012018-10-19 Jason Merrill <jason@redhat.com>
802
803 * c-cppbuiltin.c (c_cpp_builtins): Add
804 __cpp_nontype_template_parameter_class.
805
f3f6029d
NS
8062018-10-31 Nathan Sidwell <nathan@acm.org>
807
ab5324fb
NS
808 * c-opts.c (c_finish_options): Force command line macro
809 location. Refactor to avoid repeating main debug hook.
810 (push_command_line_include): Clarify comment.
811
f3f6029d
NS
812 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
813
91e3ec29
MS
8142018-10-30 Martin Sebor <msebor@redhat.com>
815
816 PR middle-end/87041
817 * c-format.c (check_format_types): Avoid diagnosing null pointer
818 arguments to printf-family of functions.
819
b5ff4f5c
MP
8202018-10-30 Marek Polacek <polacek@redhat.com>
821
822 Implement P0892R2, explicit(bool).
823 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
824
7e2de6df
DM
8252018-10-29 David Malcolm <dmalcolm@redhat.com>
826
827 * name-hint.h (name_hint::take_deferred): New member function.
828
b2bf438c
DM
8292018-10-29 David Malcolm <dmalcolm@redhat.com>
830
831 PR c++/56856
832 * c-common.c (check_function_sentinel): Call fold_for_warn on the
833 argument.
834 (check_function_restrict): Rename param "argarray" to
835 "unfolded_argarray", and make a copy named "argarray", calling
836 fold_for_warn on each argument.
837 (check_function_arguments): Add note about responsibility for
838 folding the arguments.
839
9f936c86
JM
8402018-10-17 Joseph Myers <joseph@codesourcery.com>
841
842 * c-common.c (flag_isoc2x): New variable.
843 * c-common.h (clk_c): Update comment to reference C2X.
844 (flag_isoc99, flag_isoc11): Update comments to reference future
845 standard versions in general.
846 (flag_isoc2x): Declare.
847 * c-opts.c (set_std_c2x): New function.
848 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
849 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
850 flag_isoc2x to 0.
851 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
852
7a8a92c4
JM
8532018-10-17 Joseph Myers <joseph@codesourcery.com>
854
855 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
856 (std=iso9899:2018): Document C17 as published in 2018.
857
4dc003ff
CL
8582018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
859
860 PR c++/87364
861 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
862
79371671
WW
8632018-10-11 Will Wray <wjwray@gmail.com>
864
865 PR c++/87364
866 * c-pretty-print.h (pp_c_type_cast): Prototype.
867 (pp_c_integer_constant): Likewise.
868 * c-pretty-print.c (pp_c_type_cast): No longer static.
869 (pp_c_integer_constant): Likewise.
870 (pp_c_enumeration_constant): Fix loop termination when finding
871 name of constant. No longer returns a value. Call
872 pp_c_integer_constant.
873 (c_pretty_printer::constant): Update for changes to
874 pp_c_enumeration_constant.
875
46c62690
JJ
8762018-10-11 Jakub Jelinek <jakub@redhat.com>
877
878 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
879 for no_unique_address.
880
c24300ba
DM
8812018-10-09 David Malcolm <dmalcolm@redhat.com>
882
883 * c-common.c (c_option_controlling_cpp_error): Rename to...
884 (c_option_controlling_cpp_diagnostic): ...this, and convert
885 "reason" from int to enum.
886 (c_cpp_error): Rename to...
887 (c_cpp_diagnostic): ...this, converting level and reason to enums.
888 * c-common.h (c_cpp_error): Rename to...
889 (c_cpp_diagnostic): ...this, converting level and reason to enums.
890 * c-opts.c (c_common_init_options): Update for renaming.
891
8656dafa
RS
8922018-10-08 Richard Sandiford <richard.sandiford@arm.com>
893
894 PR c/87286
895 * c-common.c (vector_types_compatible_elements_p): Use
896 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
897
8cff0652
VK
8982018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
899
900 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
901 to generate constructor destructor priority warning.
902 * c.opt (-Wprio-ctor-dtor): New option.
903
bedf03a2
JM
9042018-10-01 Jason Merrill <jason@redhat.com>
905
906 * c-lex.c (c_common_has_attribute): Add no_unique_address.
907
6cc430c1
EB
9082018-10-01 Eric Botcazou <ebotcazou@adacore.com>
909
910 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
911 (dump_ada_node): Add const keyword.
912
87677ac7
ML
9132018-09-25 Martin Liska <mliska@suse.cz>
914
915 * c-common.c (c_common_truthvalue_conversion):
916 Remove Pascal from documentation.
917
518196cb
EB
9182018-09-21 Eric Botcazou <ebotcazou@adacore.com>
919
920 * c-ada-spec.c: Include diagnostic.h.
921 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
922
a599af84
MP
9232018-09-19 Marek Polacek <polacek@redhat.com>
924
925 * c.opt (Wclass-conversion): New.
926
9c4a4b3c
DM
9272018-09-17 David Malcolm <dmalcolm@redhat.com>
928
929 * c-format.c (range_label_for_format_type_mismatch::get_text):
930 Update for new param.
931
c896ecfe
DM
9322018-09-17 David Malcolm <dmalcolm@redhat.com>
933
934 * c-format.c (format_warning_at_char): Update for introduction of
935 format_string_diagnostic_t.
936 (format_type_warning): Likewise.
937
80c6d1f4
MJ
9382018-09-17 Martin Jambor <mjambor@suse.cz>
939
940 PR c/63886
941 * c.opt (Wabsolute-value): New.
942
6d900107
BE
9432018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
944
945 * c-common.c (complete_flexible_array_elts): New helper function.
946 * c-common.h (complete_flexible_array_elts): Declare.
947
b5764229
BE
9482018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
949
950 * c-common.c (braced_list_to_string): Remove eval parameter.
951 Add some more checks. Always create zero-terminated STRING_CST.
952 * c-common.h (braced_list_to_string): Adjust prototype.
953
85204e23
DM
9542018-08-27 David Malcolm <dmalcolm@redhat.com>
955
956 PR 87091
957 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
958 to a tri-state.
959 (maybe_suggest_missing_token_insertion): Likewise.
960 (maybe_add_include_fixit): Add param "override_location". If set,
961 and source-printing is enabled, then override the rich_location's
962 primary location with that of the insertion point for the fix-it
963 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
964 * c-common.h (extern void maybe_add_include_fixit): Add bool
965 param.
966 * c-format.c (selftest::test_type_mismatch_range_labels): Update
967 for conversion of show_caret_p to a tri-state.
968 * c-warn.c (warn_for_restrict): Likewise.
969 * known-headers.cc
970 (suggest_missing_header::~suggest_missing_header): Update call to
971 maybe_add_include_fixit to suggest overriding the location, as it
972 is for a note.
973
3d78e008
ML
9742018-08-27 Martin Liska <mliska@suse.cz>
975
976 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
977 fndecl_built_in_p and remove check for FUNCTION_DECL if
978 possible.
3d78e008
ML
979 (check_builtin_function_arguments): Likewise.
980 (reject_gcc_builtin): Likewise.
981 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
982
b5be6d0c
MP
9832018-08-26 Marek Polacek <polacek@redhat.com>
984
985 PR c++/87029, Implement -Wredundant-move.
986 * c.opt (Wredundant-move): New option.
987
79ca9c35
MP
9882018-08-21 Marek Polacek <polacek@redhat.com>
989
990 PR c++/86981, Implement -Wpessimizing-move.
991 * c.opt (Wpessimizing-move): New option.
992
097f82ec
DM
9932018-08-20 David Malcolm <dmalcolm@redhat.com>
994
995 PR other/84889
996 * c-attribs.c (common_handle_aligned_attribute): Add
997 auto_diagnostic_group instance.
998 * c-indentation.c (warn_for_misleading_indentation): Likewise.
999 * c-opts.c (c_common_post_options): Likewise.
1000 * c-warn.c (warn_logical_not_parentheses): Likewise.
1001 (warn_duplicated_cond_add_or_warn): Likewise.
1002 (warn_for_multistatement_macros): Likewise.
1003
3fb558b1
NS
10042018-08-20 Nathan Sidwell <nathan@acm.org>
1005
1006 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1007 access.
1008
800c0e98
NS
10092018-08-17 Nathan Sidwell <nathan@acm.org>
1010
1011 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1012 field.
1013 (laxy_hex_fp_value_count): Make unsigned.
1014 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1015 manipulate the macro.
1016 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1017 cpp_define_lazily.
1018
6f795a92
DM
10192018-08-17 David Malcolm <dmalcolm@redhat.com>
1020
1021 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1022 (gcc_dump_printf_length_specs): New.
1023 (gcc_dump_printf_flag_pairs): New.
1024 (gcc_dump_printf_flag_specs): New.
1025 (gcc_dump_printf_char_table): New.
1026 (format_types_orig): Add entry for "gcc_dump_printf".
1027 (init_dynamic_diag_info): Set up length_char_specs and
1028 conversion_specs for gcc_dump_printf_format_type.
1029 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1030
c5d725c0
NS
10312018-08-17 Nathan Sidwell <nathan@acm.org>
1032
10f04917
NS
1033 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1034
c5d725c0
NS
1035 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1036 * c-cppbuiltin.c: Likewise.
1037
c0c12356
ML
10382018-08-17 Martin Liska <mliska@suse.cz>
1039
1040 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1041 Ignore/Deprecated flag. Warning is done automatically for
1042 Deprecated flags.
c0c12356 1043
10fcc142
DM
10442018-08-16 David Malcolm <dmalcolm@redhat.com>
1045
1046 PR c++/70693
1047 * c-common.c (selftest::c_family_tests): Call
1048 selftest::c_indentation_c_tests.
1049 * c-common.h (selftest::c_indentation_c_tests): New decl.
1050 * c-indentation.c: Include "selftest.h".
1051 (next_tab_stop): Add "tab_width" param, rather than accessing
1052 cpp_opts.
1053 (get_visual_column): Likewise. Clarify comment. Bulletproof
1054 against reading past the end of the line.
1055 (get_first_nws_vis_column): Add "tab_width" param.
1056 (detect_intervening_unindent): Likewise.
1057 (should_warn_for_misleading_indentation): Read tab width from
1058 cpp_opts and pass around.
1059 (selftest::test_next_tab_stop): New test.
1060 (selftest::assert_get_visual_column_succeeds): New function.
1061 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1062 (selftest::assert_get_visual_column_fails): New function.
1063 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1064 (selftest::test_get_visual_column): New test.
1065 (selftest::c_indentation_c_tests): New function.
1066
3f6677f4
NS
10672018-08-16 Nathan Sidwell <nathan@acm.org>
1068
1069 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1070 (store_ada_macro): Likewise.
1071 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1072 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1073
96e6ae57
DM
10742018-08-15 David Malcolm <dmalcolm@redhat.com>
1075
1076 * c-format.c: Include "selftest-diagnostic.h" and
1077 "gcc-rich-location.h".
1078 (format_warning_at_char): Pass NULL for new label params of
1079 format_warning_va.
1080 (class indirection_suffix): New class.
1081 (class range_label_for_format_type_mismatch): New class.
1082 (format_type_warning): Move logic for generating "*" suffix to
1083 class indirection_suffix. Create "fmt_label" and "param_label"
1084 to show their types, and pass them to the
1085 format_warning_at_substring calls.
1086 (selftest::test_type_mismatch_range_labels): New test.
1087 (selftest::c_format_c_tests): Call it.
1088
23aa9f7c
MS
10892018-08-13 Martin Sebor <msebor@redhat.com>
1090
1091 PR tree-optimization/71625
1092 * c-common.c (braced_list_to_string): New function.
1093 * c-common.h (braced_list_to_string): Declare it.
1094
f10a9135
NS
10952018-08-08 Nathan Sidwell <nathan@acm.org>
1096
1097 * c-common.c (try_to_locate_new_include_inertion_point): Use
1098 linemap_included_from_linemap.
1099 * c-lex.c (fe_file_change): Use linemap_included_from.
1100 * c-ppoutput.c (pp_file_change): Likewise.
1101
8a45b051
MS
11022018-08-01 Martin Sebor <msebor@redhat.com>
1103
1104 PR tree-optimization/86650
ab20d992 1105 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1106 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1107 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1108 * c-format.h (T89_G): Update to be "gimple *" rather than
1109 "gcall *".
1110 (local_gcall_ptr_node): Rename...
1111 (local_gimple_ptr_node): ...to this.
1112
e540ccc0
DM
11132018-07-31 David Malcolm <dmalcolm@redhat.com>
1114
1115 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1116 table entries for gcc_diag_char_table, and the 'Z' entry from
1117 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1118 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1119 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1120 adding missing "Z" for this table. Remove erroneous "G" and "K"
1121 entries.
1122 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1123 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1124 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1125
425fc685
RE
11262018-07-31 Richard Earnshaw <rearnsha@arm.com>
1127
1128 * c-common.c (speculation_safe_resolve_call): New function.
1129 (speculation_safe_resolve_params): New function.
1130 (speculation_safe_resolve_return): New function.
1131 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1132 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1133 __HAVE_SPECULATION_SAFE_VALUE.
1134
181463c2
DM
11352018-07-20 David Malcolm <dmalcolm@redhat.com>
1136
1137 * c-common.c (c_cpp_error): Remove redundant "line_table"
1138 parameter from call to rich_location::set_range.
1139 (maybe_suggest_missing_token_insertion): Likewise.
1140
0d7f9065
MS
11412018-07-20 Martin Sebor <msebor@redhat.com>
1142
1143 PR middle-end/82063
ab20d992 1144 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1145
00abf86c
MS
11462018-07-20 Martin Sebor <msebor@redhat.com>
1147
1148 PR middle-end/82063
1149 * c-common.h (c_common_handle_option): Change function argument
1150 to HOST_WIDE_INT.
1151 * c-opts.c (c_common_init_options): Same.
1152 (c_common_handle_option): Same. Remove special handling of
1153 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1154 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1155 options to take a HOST_WIDE_INT argument and accept a byte-size
1156 suffix. Initialize.
1157 (-Wvla-larger-than): Same.
1158 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1159 (-Wno-vla-larger-than): Same.
1160
9b452033
JJ
11612018-07-12 Jakub Jelinek <jakub@redhat.com>
1162
1163 * c-attribs.c (c_common_attribute_table): Add
1164 "omp declare target implicit" attribute.
1165
cd0762f3
RB
11662018-07-12 Richard Biener <rguenther@suse.de>
1167
1168 PR c/86453
1169 * c-attribs.c (handle_packed_attribute): Do not build a variant
1170 type with TYPE_PACKED, instead ignore the attribute if we may
1171 not apply to the original type.
1172
0b27c3ed
JJ
11732018-07-10 Jakub Jelinek <jakub@redhat.com>
1174
1175 PR c++/86443
1176 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1177 to contain TREE_LIST for both the original class iterator and the
1178 "last" helper var.
1179
e730a0ef
EB
11802018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1181
1182 * c-ada-spec.c (to_ada_name): Remove index parameter.
1183 (pp_ada_tree_identifier): Likewise.
1184 (dump_ada_macros): Adjust call to to_ada_name.
1185 (struct overloaded_name_hash): Delete.
1186 (struct overloaded_name_hasher): Likewise.
1187 (overloaded_names): Likewise.
1188 (compute_overloading_index): Likewise.
1189 (dump_ada_decl_name): Do not call compute_overloading_index and
1190 adjust calls to pp_ada_tree_identifier.
1191 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1192 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1193 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1194 (dump_ada_enum_type): Remove type and display_convention parameters.
1195 Adjust calls to pp_ada_tree_identifier.
1196 (dump_ada_node): Likewise and for dump_ada_structure.
1197 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1198 and tidy up.
1199 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1200 syntax.
1201 (print_constructor): Adjust call to pp_ada_tree_identifier.
1202 (print_destructor): Likewise.
1203 (dump_ada_declaration): Switch to aspect syntax.
1204 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1205 parameter with nested parameter.
1206 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1207 (dump_ada_specs): Do not delete overloaded_names table.
1208
8de583fc
PB
12092018-07-06 Peter Bergner <bergner@linux.ibm.com>
1210
1211 PR target/86324
e730a0ef 1212 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1213 target hook.
1214
09cff37b
NS
12152018-07-05 Nathan Sidwell <nathan@acm.org>
1216
1217 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1218 NO_IMPLICIT_EXTERN_C.
1219
98086b2b
ML
12202018-06-28 Martin Liska <mliska@suse.cz>
1221
1222 * cppspec.c: Include opt-suggestions.h.
1223
ab20d992
JJ
12242018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1225 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1226 Cesar Philippidis <cesar@codesourcery.com>
1227
1228 * c-pragma.h (enum pragma_omp_clause): Add
1229 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1230 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1231
f41b7612
JJ
12322018-06-20 Jakub Jelinek <jakub@redhat.com>
1233
1234 PR c++/86210
1235 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1236 comment.
1237
4252ccd7
MS
12382018-06-18 Martin Sebor <msebor@redhat.com>
1239
1240 PR middle-end/85602
1241 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1242 nonstring.
1243
e197e64e
KV
12442018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1245
1246 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1247
34a7a230
JM
12482018-06-13 Jason Merrill <jason@redhat.com>
1249
5cef3733
JM
1250 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1251 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1252 handling.
1253
34a7a230
JM
1254 PR c++/86094 - wrong code with defaulted move ctor.
1255 * c-opts.c (c_common_post_options): Bump the current ABI version to
1256 13. Set warn_abi_version and flag_abi_compat_version to the current
1257 version rather than 0. Fix defaulting flag_abi_compat_version from
1258 warn_abi_version.
1259
bb0f14ae
MS
12602018-06-12 Martin Sebor <msebor@redhat.com>
1261
1262 PR c/85931
1263 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1264 sizeof source and destination yields the same value.
1265
3713f2e2
ML
12662018-06-12 Martin Liska <mliska@suse.cz>
1267
1268 * c.opt: Make MPX-related options as Deprecated.
1269
4af78ef8
DM
12702018-06-08 David Malcolm <dmalcolm@redhat.com>
1271
1272 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1273 rather than 0.
1274
31db0fe0
ML
12752018-06-08 Martin Liska <mliska@suse.cz>
1276
1277 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1278 for MPX (macros, related functions, fields in cgraph_node, ...).
1279 (handle_bnd_legacy): Likewise.
1280 (handle_bnd_instrument): Likewise.
1281 * c.opt: Likewise.
1282
fe16acf2
JJ
12832018-06-06 Jakub Jelinek <jakub@redhat.com>
1284
1285 PR c++/86068
1286 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1287 __cpp_transactional_memory to 201500 instead of 210500.
1288
4dbdb49b
JM
12892018-06-06 Jason Merrill <jason@redhat.com>
1290
1291 PR c++/85710 - ICE with -Wmemset-elt-size.
1292 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1293
f8ad043f
JM
12942018-06-01 Jason Merrill <jason@redhat.com>
1295
1296 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1297 201703.
1298
abc24d93
EB
12992018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1300
1301 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1302 declaration for a typedef independently of whether the declaration of
1303 the subtype is generated.
1304
d258f4aa
MS
13052018-05-31 Martin Sebor <msebor@redhat.com>
1306
1307 PR c/82063
1308 * c.opt (-Wno-alloc-size-larger-than): New option.
1309
b67b9225
DP
13102018-04-22 David Pagan <dave.pagan@oracle.com>
1311
1312 PR c/55976
1313 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1314 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1315 differentiate between default (no option), -Wreturn-type, and
1316 -Wno-return-type.
1317
04eb9c55
JM
13182018-05-29 Jason Merrill <jason@redhat.com>
1319
1320 * c.opt (Winit-list-lifetime): New flag.
1321
b0c31bc6
BE
13222018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1323
1324 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1325 splay_tree_delete_pointers.
1326
44284983
JJ
13272018-05-26 Jakub Jelinek <jakub@redhat.com>
1328
1329 PR bootstrap/85921
1330 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1331 noinline variable to workaround broken kernel headers.
1332
b46b715d
JM
13332018-05-18 Jason Merrill <jason@redhat.com>
1334
1335 * c.opt (Wdeprecated-copy): New flag.
1336
40659769
ML
13372018-05-17 Martin Liska <mliska@suse.cz>
1338
1339 * c-warn.c (overflow_warning): Do not use
1340 space in between 'G_' and '('.
1341
403962ea
JM
13422018-05-09 Jason Merrill <jason@redhat.com>
1343
1344 * c-common.c (valid_array_size_p): Add complain parameter.
1345 * c-common.h: ...which defaults to true.
1346
1c9ee609
JJ
13472018-05-11 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR c/85696
1350 * c-omp.c (c_omp_predetermined_sharing): Return
1351 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1352
19916065
ML
13532018-05-11 Martin Liska <mliska@suse.cz>
1354
92a285c1 1355 PR sanitizer/85556
19916065
ML
1356 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1357 TREE_LIST values.
1358
79e7b1fe
JJ
13592018-05-10 Jakub Jelinek <jakub@redhat.com>
1360
1361 PR c++/85662
1362 * c-common.h (fold_offsetof_1): Removed.
1363 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1364 CTX argument defaulted to ERROR_MARK.
1365 * c-common.c (fold_offsetof_1): Renamed to ...
1366 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1367 argument, convert the pointer constant to TYPE and use size_binop
1368 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1369 a pointer type. Adjust recursive calls.
1370
86c12f76
EB
13712018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1372
1373 PR c++/85400
1374 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1375
ee336e84
NS
13762018-05-07 Nathan Sidwell <nathan@acm.org>
1377
1378 * c.opt (ffor-scope): Remove functionality, issue warning.
1379
6c072e21
NS
13802018-05-03 Nathan Sidwell <nathan@acm.org>
1381
1382 * c.opt (ffriend-injection): Remove functionality, issue warning.
1383
2cc7d3a7
DM
13842018-05-01 David Malcolm <dmalcolm@redhat.com>
1385
1386 PR c/84258
1387 * c-format.c (struct format_check_results): Add field
1388 "number_non_char".
1389 (check_format_info): Initialize it, and warn if encountered.
1390 (check_format_arg): Distinguish between wide char and
1391 everything else when detecting arrays of non-char.
1392
7761dfbe
DM
13932018-04-30 David Malcolm <dmalcolm@redhat.com>
1394
1395 * c-format.c (get_corrected_substring): Update for
1396 location_get_source_line returning a char_span. Use a char_span
1397 when handling the prefix of the correction.
1398 * c-indentation.c (get_visual_column): Update for
1399 location_get_source_line returning a char_span.
1400 (get_first_nws_vis_column): Likewise.
1401
62e98ef1
DM
14022018-03-29 David Malcolm <dmalcolm@redhat.com>
1403
1404 PR c++/84269
1405 * known-headers.cc (get_stdlib_header_for_name): Add various names
1406 from <assert.h>, <string.h>, and <memory.h>; add more names from
1407 <stdio.h>.
1408
a7dea617
JJ
14092018-03-27 Jakub Jelinek <jakub@redhat.com>
1410
1411 PR c++/85061
1412 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1413 get_base_address of the second operand is a VAR_P, rather than the
1414 operand itself, and use gcc_checking_assert instead of gcc_assert.
1415
889a3a30
MP
14162018-03-23 Marek Polacek <polacek@redhat.com>
1417
1418 PR c++/85045
1419 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1420 <case RDIV_EXPR>: Tweak condition.
1421
452154b9
EB
14222018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1423
1424 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1425
63ecb626
JJ
14262018-03-16 Jakub Jelinek <jakub@redhat.com>
1427
ce811fc4
JJ
1428 PR c/84909
1429 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1430 diagnostics.
1431
63ecb626
JJ
1432 PR c/84910
1433 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1434 diagnostics.
1435
a1295eec
RB
14362018-03-16 Richard Biener <rguenther@suse.de>
1437
1438 PR c/84873
1439 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1440 unshare the possibly folded expression.
1441
919674fb
RB
14422018-03-15 Richard Biener <rguenther@suse.de>
1443
1444 PR c/84873
1445 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1446
f99309b2
MS
14472018-03-13 Martin Sebor <msebor@redhat.com>
1448
1449 PR tree-optimization/84725
1450 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1451 with all three narrow character types, including their qualified forms.
1452
e9b9fa4c
MS
14532018-03-12 Martin Sebor <msebor@redhat.com>
1454
1455 PR tree-optimization/83456
ab20d992 1456 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
1457 Restore checking of bounded built-in functions.
1458 (check_function_arguments): Also return the result
1459 of warn_for_restrict.
ab20d992
JJ
1460 * c-common.c (check_function_restrict): Return bool.
1461 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 1462
0805d020
MP
14632018-03-02 Marek Polacek <polacek@redhat.com>
1464
1465 PR c++/84171
1466 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1467 is erroneous.
1468
ed2a2f08
TS
14692018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1470
1471 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1472 function".
1473
90abdde0
MP
14742018-03-01 Marek Polacek <polacek@redhat.com>
1475
1476 PR c++/84639
1477 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1478 alignment in computation.
1479
c6db43fa
EB
14802018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1481
1482 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1483 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1484
9e25c7ed
EB
14852018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1486
1487 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1488 (is_char_array): Take a type instead of a declaration.
1489 (dump_ada_array_type): Likewise.
1490 (is_simple_enum): Minor tweak.
1491 (dump_ada_enum_type): New function extracted from...
1492 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1493 <INTEGER_TYPE>: Remove unreachable code.
1494 <RECORD_TYPE>: Likewise. Minor tweaks.
1495 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1496 <ENUMERAL_TYPE>: New case.
1497 <RECORD_TYPE>: Factor out common code.
1498 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1499 Minor tweaks. Deal with enumeral types.
1500 (dump_ada_structure): Minor tweaks.
1501
09de3550
EB
15022018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1503
1504 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1505 address for incomplete structures.
1506 (dump_forward_type): Do not bail out for incomplete structures.
1507 (dump_ada_declaration): Do not special-case incomplete structures
1508 for subtypes. Dump them as null records for types.
1509
095d8d4b
EB
15102018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1511
1512 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1513 (is_char_array): Fix formatting.
1514 (dump_template_types): Likewise.
1515 (dump_generic_ada_node): Rename into...
1516 (dump_ada_node): ...this.
1517 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1518 incomplete structures and not for empty structures. Do not use it
1519 when forward declarations are needed.
1520 (dump_forward_type): New function.
1521 (dump_nested_types): Remove FORWARD parameter. Do not consider
1522 TREE_VISITED and do not generate a forward declaration. Only dump
1523 original nested types for nested declaration.
1524 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1525 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1526 <RECORD_TYPE>: Do not consider TREE_VISITED.
1527 (dump_ada_declaration): Use booleans and fix formatting throughout.
1528 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1529 Call dump_forward_type instead of dump_nested_types for a typedef.
1530 Remove superfluous check and adjust call to dump_nested_types.
1531 <POINTER_TYPE>: Call dump_forward_type and fall through.
1532 (dump_ada_struct_decl): Rename into...
1533 (dump_ada_structure): ...this. Do not special-case empty structures.
1534
d4cfd486
MS
15352018-02-27 Martin Sebor <msebor@redhat.com>
1536
1537 PR c++/83871
1538 * c.opt (-Wmissing-attributes): New option.
1539
b22dbd03
ML
15402018-02-21 Martin Liska <mliska@suse.cz>
1541
1542 * c.opt (Wcatch-value=): Add IntegerRange.
1543
883dfe2a
JM
15442018-02-15 Jason Merrill <jason@redhat.com>
1545
1546 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1547
0444aa9c
NS
15482018-02-09 Nathan Sidwell <nathan@acm.org>
1549
1550 PR c/84293
1551 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1552 arg.
1553 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1554 arg. Adjust.
1555
cea71f0a
MS
15562018-02-09 Martin Sebor <msebor@redhat.com>
1557
1558 PR lto/84212
1559 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1560 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1561 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1562 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1563 (-Wuninitialized): Same.
1564
8c8b7be5
EB
15652018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1566
1567 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1568 keyword for components.
1569
7c30b12a
PC
15702018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1571
1572 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1573
eece7fe5
JK
15742018-02-02 Julia Koval <julia.koval@intel.com>
1575
1576 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1577
7d07a93a
MP
15782018-01-29 Marek Polacek <polacek@redhat.com>
1579
1580 PR c/83966
1581 * c-format.c (check_function_format): Check current_function_decl.
1582
53723269
JJ
15832018-01-27 Jakub Jelinek <jakub@redhat.com>
1584
1585 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1586 argument.
1587 (LAZY_HEX_FP_VALUES_CNT): Define.
1588 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1589 values rather than just 12.
1590 (builtin_define_with_hex_fp_value): Likewise.
1591
7365279f
BK
15922018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1593
92a285c1
ML
1594 PR other/70268
1595 * c.opt (-fmacro-prefix-map): New option.
1596 * c-opts.c (c_common_handle_option): Handle it.
1597 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1598 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1599
bb9869d5
DM
16002018-01-17 David Malcolm <dmalcolm@redhat.com>
1601
1602 PR c++/83814
1603 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1604
68dc87c3
EB
16052018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1606
1607 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1608 Skip 'f' and 'F' characters if it is true.
1609 (store_ada_macro): Minor tweak.
1610 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1611 <CPP_WSTRING>: Likewise.
1612 <CPP_STRING>: Output '&' in the buffer if not the first string.
1613 <CPP_NUMBER>: Adjust calls to dump_number.
1614
9a004410
DM
16152018-01-10 David Malcolm <dmalcolm@redhat.com>
1616
1617 PR c++/43486
1618 * c-common.c: Include "selftest.h".
1619 (get_atomic_generic_size): Perform the test for integral type
1620 before the range test for any integer constant, fixing indentation
1621 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1622 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1623 (selftest::test_fold_for_warn): New function.
1624 (selftest::c_common_c_tests): New function.
1625 (selftest::c_family_tests): Call it, and
1626 selftest::c_pretty_print_c_tests.
1627 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1628 * c-format.c (check_format_arg): Convert VAR_P check to a
1629 fold_for_warn.
1630 * c-pretty-print.c: Include "selftest.h".
1631 (pp_c_cast_expression): Don't print casts for location wrappers.
1632 (selftest::assert_c_pretty_printer_output): New function.
1633 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1634 (selftest::test_location_wrappers): New function.
1635 (selftest::c_pretty_print_c_tests): New function.
1636 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1637
5c0caeb3
RS
16382018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1639 Alan Hayward <alan.hayward@arm.com>
1640 David Sherwood <david.sherwood@arm.com>
1641
1642 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1643
73a699ae
RS
16442018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1645 Alan Hayward <alan.hayward@arm.com>
1646 David Sherwood <david.sherwood@arm.com>
1647
1648 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1649 as polynomial.
1650
928686b1
RS
16512018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1652 Alan Hayward <alan.hayward@arm.com>
1653 David Sherwood <david.sherwood@arm.com>
1654
1655 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1656 (convert_vector_to_array_for_subscript): Handle polynomial
1657 TYPE_VECTOR_SUBPARTS.
1658 (c_common_type_for_mode): Check valid_vector_subparts_p.
1659 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1660 VECTOR_CST_NELTS.
1661
85ec4feb
JJ
16622018-01-03 Jakub Jelinek <jakub@redhat.com>
1663
1664 Update copyright years.
1665
170a8bd6 16662017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1667 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1668
1669 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1670 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1671
ab20d992 16722017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
1673
1674 PR debug/83527
1675 PR debug/83419
1676 * c-semantics.c (only_debug_stmts_after_p): New.
1677 (pop_stmt_list): Clear side effects in debug-only stmt list.
1678 Check for single nondebug stmt followed by debug stmts only.
1679
c12d20d4
AO
16802017-12-21 Alexandre Oliva <aoliva@redhat.com>
1681
1682 PR debug/83419
1683 * c-semantics.c (pop_stmt_list): Propagate side effects from
1684 single nondebug stmt to container list.
1685
01512446
JJ
16862017-12-19 Jakub Jelinek <jakub@redhat.com>
1687
1688 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1689 conditions with typical order conditions.
1690
82cfbd01
MP
16912017-12-18 Marek Polacek <polacek@redhat.com>
1692
1693 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1694 not in effect.
1695
99da11ec
MS
16962017-12-17 Martin Sebor <msebor@redhat.com>
1697
1698 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1699 an error for attribute warn_if_not_aligned.
1700
cc8bea0a
MS
17012017-12-16 Martin Sebor <msebor@redhat.com>
1702
1703 PR tree-optimization/78918
1704 * c-common.c (check_function_restrict): Avoid checking built-ins.
1705 * c.opt (-Wrestrict): Include in -Wall.
1706
4849deb1
JJ
17072017-12-15 Jakub Jelinek <jakub@redhat.com>
1708
1709 * c-attribs.c (c_common_attribute_table,
1710 c_common_format_attribute_table): Swap affects_type_identity
1711 and handler fields, adjust comments.
1712
c65e18d3
BE
17132017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1714
1715 * c.opt (Wcast-function-type): New warning option.
1716 * c-lex.c (get_fileinfo): Avoid warning.
1717 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1718
2004617a
QZ
17192017-12-14 Qing Zhao <qing.zhao@oracle.com>
1720
7365279f 1721 PR middle_end/79538
2004617a
QZ
1722 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1723 Adjust the size of buf1 and buf2, add a new buf to avoid
1724 format-overflow warning.
1725
ab20d992 17262017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1727
1728 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1729 subsequent statement list.
1730
5d9ae53d
MS
17312017-12-07 Martin Sebor <msebor@redhat.com>
1732
1733 PR c/81544
1734 PR c/81566
1735 * c-attribs.c (attr_aligned_exclusions): New array.
1736 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1737 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1738 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1739 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1740 (attr_warn_unused_result_exclusions): Same.
1741 (handle_hot_attribute, handle_cold_attribute): Simplify.
1742 (handle_const_attribute): Warn on function returning void.
1743 (handle_pure_attribute): Same.
1744 (handle_aligned_attribute): Diagnose conflicting attribute
1745 specifications.
1746 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1747
c79144f8
DM
17482017-12-06 David Malcolm <dmalcolm@redhat.com>
1749
1750 PR c/83236
1751 * c-common.c (selftest::c_family_tests): Call
1752 selftest::c_spellcheck_cc_tests.
1753 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1754 * c-spellcheck.cc: Include "selftest.h".
1755 (name_reserved_for_implementation_p): New function.
1756 (should_suggest_as_macro_p): New function.
1757 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1758 should_suggest_as_macro_p and call it.
1759 (selftest::test_name_reserved_for_implementation_p): New function.
1760 (selftest::c_spellcheck_cc_tests): New function.
1761 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1762
613bc14f
DM
17632017-12-06 David Malcolm <dmalcolm@redhat.com>
1764
1765 * c-spellcheck.cc: New file, taken from macro-handling code in
1766 spellcheck-tree.c.
1767 * c-spellcheck.h: New file, taken from macro-handling code in
1768 spellcheck-tree.h.
1769
e76c7157
JJ
17702017-12-01 Jakub Jelinek <jakub@redhat.com>
1771
1772 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1773 attribute.
1774 (handle_simd_attribute): Don't check for "cilk simd function"
1775 attribute. Reindent, formatting changes.
1776
b0da4034
JK
17772017-11-30 Julia Koval <julia.koval@intel.com>
1778
1779 * c-common.h (inv_list): Remove.
1780
058f0b9e
JJ
17812017-11-28 Jakub Jelinek <jakub@redhat.com>
1782
1783 PR sanitizer/81275
1784 * c-common.c (c_switch_covers_all_cases_p_1,
1785 c_switch_covers_all_cases_p): New functions.
1786 * c-common.h (c_switch_covers_all_cases_p): Declare.
1787
5e9d6aa4 17882017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1789 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1790
1791 * array-notation-common.c: Delete.
1792 * c-cilkplus.c: Ditto.
1793 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1794 * c-common.def (ARRAY_NOTATION_REF): Remove.
1795 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1796 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1797 c_validate_cilk_plus_loop, cilkplus_an_parts,
1798 cilk_ignorable_spawn_rhs_op,
1799 cilk_recognize_spawn): Remove.
1800 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1801 * c-omp.c: Remove CILK_SIMD check.
1802 * c-pragma.c: Ditto.
1803 * c-pragma.h: Remove CILK related pragmas.
1804 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1805 ARRAY_NOTATION_REF condition.
1806 (c_pretty_printer::expression): Ditto.
1807 * c.opt (fcilkplus): Remove.
1808 * cilk.c: Delete.
1809
1af4ebf5
MG
18102017-11-21 Marc Glisse <marc.glisse@inria.fr>
1811
1812 * c-pretty-print.c (pp_c_additive_expression,
1813 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1814
d44ed508
JJ
18152017-11-21 Jakub Jelinek <jakub@redhat.com>
1816
7d2f0f9b
JJ
1817 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1818
d44ed508
JJ
1819 PR c++/83059
1820 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1821 instead of tree_to_uhwi, formatting fix.
1822
26edace6
DM
18232017-11-20 David Malcolm <dmalcolm@redhat.com>
1824
1825 PR c/81404
1826 * known-headers.cc: New file, based on material from c/c-decl.c.
1827 (suggest_missing_header): Copied as-is.
1828 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1829 heavily edited to add C++ support. Add some knowledge about
1830 <limits.h>, <stdint.h>, and <wchar.h>.
1831 * known-headers.h: Likewise.
1832
6c7a259b
DM
18332017-11-20 David Malcolm <dmalcolm@redhat.com>
1834
1835 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1836 (lookup_name_fuzzy): Likewise. Convert return type from
1837 const char * to name_hint. Add location_t param.
1838 * name-hint.h: New header.
1839
f9c59f7e
JJ
18402017-11-19 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR c/66618
1843 PR c/69960
1844 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1845
1e39313a
JM
18462017-11-16 Joseph Myers <joseph@codesourcery.com>
1847
1848 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1849 expected publication date of C17.
1850 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1851
3ca0dc60
JM
18522017-11-15 Joseph Myers <joseph@codesourcery.com>
1853
1854 PR c/81156
1855 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1856 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1857
025d57f0
MS
18582017-11-10 Martin Sebor <msebor@redhat.com>
1859
1860 PR c/81117
1861 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1862 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1863 * c.opt (-Wstringop-truncation): New option.
1864
1b6fa695
ML
18652017-11-06 Martin Liska <mliska@suse.cz>
1866
1867 PR middle-end/82404
1868 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1869 FE.
1870 * c.opt: Set default value of warn_return_type.
1871
64a5912c
DM
18722017-10-31 David Malcolm <dmalcolm@redhat.com>
1873
1874 * c-common.c (binary_op_error): Update for renaming of
1875 error_at_rich_loc.
1876 (c_parse_error): Likewise.
1877 * c-warn.c (warn_logical_not_parentheses): Likewise for
1878 renaming of inform_at_rich_loc.
1879 (warn_for_restrict): Likewise for renaming of
1880 warning_at_rich_loc_n.
1881
c76dc9c3
JM
18822017-10-30 Joseph Myers <joseph@codesourcery.com>
1883
1884 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1885 * c-opts.c (set_std_c17): New function.
1886 (c_common_init_options): Use gnu17 as default C version.
1887 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1888
ee5fd23a
MM
18892017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1890
1891 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1892 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1893 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1894 __FP_FAST_FMA<N>X.
1895
d1047465
MP
18962017-10-23 Marek Polacek <polacek@redhat.com>
1897
1898 PR c/82681
1899 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1900
9e878cf1
EB
19012017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1902
1903 * c-common.c (check_builtin_function_arguments): Also check arguments
1904 of __builtin_alloca_with_align_and_max.
1905
89b6abbb
DM
19062017-10-17 David Malcolm <dmalcolm@redhat.com>
1907
1908 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1909 rather than NULL to format_warning_va.
1910 (check_format_types): Likewise when calling format_type_warning.
1911 Remove code to extract source_ranges and source_range * in favor
1912 of just a location_t.
1913 (format_type_warning): Convert source_range * param to a
1914 location_t.
1915
39382c09
JJ
19162017-10-13 Jakub Jelinek <jakub@redhat.com>
1917
1918 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1919 [LR]SHIFT_EXPR.
1920
62e1c678
DM
19212017-10-12 David Malcolm <dmalcolm@redhat.com>
1922
1923 * c-common.c (enum missing_token_insertion_kind): New enum.
1924 (get_missing_token_insertion_kind): New function.
1925 (maybe_suggest_missing_token_insertion): New function.
1926 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1927
b90c9338
NS
19282017-10-11 Nathan Sidwell <nathan@acm.org>
1929
1930 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1931 (c_common_handle_option): Update incpath_kind names.
1932
3a266bcd
ML
19332017-10-11 Martin Liska <mliska@suse.cz>
1934
1935 PR sanitizer/82490
1936 * c-attribs.c (handle_no_sanitize_attribute): Report directly
1937 Wattributes warning.
1938
8e6cdc90
RS
19392017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
1940
1941 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
1942 operating on trees as wide_ints.
1943 * c-common.c (pointer_int_sum): Likewise.
1944 * c-pretty-print.c (pp_c_integer_constant): Likewise.
1945 * c-warn.c (match_case_to_enum_1): Likewise.
1946 (c_do_switch_warnings): Likewise.
1947 (maybe_warn_shift_overflow): Likewise.
1948
802b38c9
JJ
19492017-10-10 Jakub Jelinek <jakub@redhat.com>
1950
1951 PR c/82437
1952 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
1953 instead of wide_int::from.
1954
4e34b338
JJ
19552017-10-06 Jakub Jelinek <jakub@redhat.com>
1956
1957 PR c/82437
1958 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
1959 using to_widest use wide_int with the larger of the two precisions.
1960
4bc4b2b4
BE
19612017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
1962
1963 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
1964 functions.
1965
a1488398
RS
19662017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
1967
1968 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
1969 when combining the original unconverted comparison operands.
1970
01c9fb68
JJ
19712017-09-29 Jakub Jelinek <jakub@redhat.com>
1972
1973 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
1974 attribute.
1975
6e3e8419
EB
19762017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1977
1978 * c-ada-spec.c (to_ada_name): Add index parameter.
1979 (pp_ada_tree_identifier): Likewise.
1980 (dump_ada_macros): Adjust call to to_ada_name.
1981 (struct overloaded_name_hash): New type.
1982 (struct overloaded_name_hasher): Likewise.
1983 (overloaded_names): New hash table.
1984 (compute_overloading_index): New function.
1985 (dump_ada_decl_name): Call it and pass the result to
1986 pp_ada_tree_identifier.
1987 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1988 (dump_ada_function_declaration): Likewise.
1989 (dump_generic_ada_node): Likewise.
1990 (print_constructor): Likewise.
1991 (print_destructor): Likewise.
1992 (dump_ada_specs): Delete overloaded_names table.
1993
79310774
EB
19942017-09-29 Eric Botcazou <ebotcazou@adacore.com>
1995
1996 * c-ada-spec.c (max_ada_macros): Move around.
1997 (store_ada_macro_index): Likewise.
1998 (source_file): Rename into...
1999 (macro_source_file): ...this.
2000 (count_ada_macro): Move around.
2001 (store_ada_macro): Likewise.
2002 (compare_macro): Likewise.
2003 (print_ada_macros): Merge in...
2004 (dump_ada_macros): ...this.
2005 (source_file_base): Rename into...
2006 (current_source_file): ...this.
2007 (print_comment): Move around.
2008 (dump_ada_nodes): Call dump_ada_declaration directly.
2009 (struct with): Change type of limited field to bool.
2010 (append_withs): Change type of limited_access parameter to bool.
2011 (pp_ada_tree_identifie): Likewise.
2012 (dump_ada_decl_nam): Likewise.
2013 (dump_generic_ada_node): Likewise. Do not print the return type.
2014 (to_ada_name): Change type of space_found parameter to bool.
2015 (dump_ada_function_declaration): Return void and change type of
2016 parameters to bool. Also print the return type for a function.
2017 (print_ada_methods): Rename into...
2018 (dump_ada_methods): ...this.
2019 (print_ada_declaration): Rename into ...
2020 (dump_ada_declaration): ...this. Do not print the return type.
2021 (print_ada_struct_decl): Rename into...
2022 (dump_ada_struct_decl): ...this.
2023
7d386d45
JJ
20242017-09-29 Jakub Jelinek <jakub@redhat.com>
2025
2026 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2027 rather than DECL_INITIAL.
2028 (common_handle_aligned_attribute): Likewise.
2029
ab20d992 20302017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2031
2032 * c.opt (gen-decls): Add RejectNegative.
2033
026a79f7
AS
20342017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2035 Jakub Jelinek <jakub@redhat.com>
2036
2037 Add support for -std=c++2a.
2038 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2039 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2040 * c-opts.c (set_std_cxx2a): New.
2041 (c_common_handle_option): Set options when -std=c++2a is enabled.
2042 (c_common_post_options): Adjust comments.
2043 (set_std_cxx14, set_std_cxx17): Likewise.
2044
4a8ca690
EB
20452017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2046
2047 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2048 message for non-uniform endianness and issue a warning in C++.
2049
7b936140
JJ
20502017-09-15 Jakub Jelinek <jakub@redhat.com>
2051
2052 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2053 (Wc++17-compat): Change from undocumented alias to option.
2054 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2055 change C++1z to C++17 in description.
2056 (std=c++1z, std=gnu++1z): Change from option to undocumented
2057 deprecated alias.
2058 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2059 Adjust description.
2060 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2061 * c-opts.c (set_std_cxx1z): Rename to ...
2062 (set_std_cxx17): ... this.
2063 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2064 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2065 caller.
7b936140
JJ
2066 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2067 comments.
2068
12263f13
L
20692017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2070
2071 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2072 function alignment if warn_if_not_aligned_p is true.
2073
6836632e
NS
20742017-09-12 Nathan Sidwell <nathan@acm.org>
2075
2076 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2077 resort_sorted_fields): Move to c/c-decl.c.
2078 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2079 (struct sorted_fields_type): Move to c/c-lang.h.
2080
019bf9ad
JW
20812017-09-09 Jonathan Wakely <jwakely@redhat.com>
2082
2083 PR c++/81852
2084 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2085
bc7fe952
MP
20862017-09-04 Marek Polacek <polacek@redhat.com>
2087
2088 PR c/81783
2089 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2090 (warn_tautological_cmp): Call it.
2091
ab20d992 20922017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2093
2094 * c-opts.c (c_common_finish): Write dependency information even if
2095 there are errors.
2096
d2e05fcb
JJ
20972017-09-01 Jakub Jelinek <jakub@redhat.com>
2098
2099 PR c/81887
2100 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2101 (omp_pragmas_simd): ... here.
2102 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2103 create new clauses list containing just simd clause.
2104
18e2a8b8
RS
21052017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2106 Alan Hayward <alan.hayward@arm.com>
2107 David Sherwood <david.sherwood@arm.com>
2108
2109 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2110 into scalar_mode_supported_p call.
2111 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2112
16d22000
RS
21132017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2114 Alan Hayward <alan.hayward@arm.com>
2115 David Sherwood <david.sherwood@arm.com>
2116
2117 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2118 for the mode iterator.
2119
b397965c
RS
21202017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2121 Alan Hayward <alan.hayward@arm.com>
2122 David Sherwood <david.sherwood@arm.com>
2123
2124 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2125 * c-common.c (c_build_vec_perm_expr): Likewise.
2126
357b7604
RS
21272017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2128 Alan Hayward <alan.hayward@arm.com>
2129 David Sherwood <david.sherwood@arm.com>
2130
2131 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2132
e05c94ba
RS
21332017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2134 Alan Hayward <alan.hayward@arm.com>
2135 David Sherwood <david.sherwood@arm.com>
2136
2137 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2138 before calling targetm.addr_space.valid_pointer_mode.
2139
5c20c4af
RS
21402017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2141 Alan Hayward <alan.hayward@arm.com>
2142 David Sherwood <david.sherwood@arm.com>
2143
2144 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2145
c94843d2 21462017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2147 Alan Hayward <alan.hayward@arm.com>
2148 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2149
2150 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2151 iterators.
2152 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2153
4e10a5a7
RS
21542017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2155 Alan Hayward <alan.hayward@arm.com>
2156 David Sherwood <david.sherwood@arm.com>
2157
2158 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2159 case statements.
2160
130fcab0
ML
21612017-08-29 Martin Liska <mliska@suse.cz>
2162
2163 PR other/39851
2164 * c-common.c (parse_optimize_options): Add argument to function
2165 call.
2166 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2167
14e18d71
DM
21682017-08-24 David Malcolm <dmalcolm@redhat.com>
2169
2170 * c-lex.c (interpret_float): Use token location
2171 when building an EXCESS_PRECISION_EXPR.
2172
2f687306
DM
21732017-08-21 David Malcolm <dmalcolm@redhat.com>
2174
2175 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2176 it to check_function_format.
2177 * c-common.h (check_function_arguments): Add vec<location_t> *
2178 param.
2179 (check_function_format): Likewise.
2180 * c-format.c (struct format_check_context): Add field "arglocs".
2181 (check_function_format): Add param "arglocs"; pass it to
2182 check_format_info.
ab20d992 2183 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2184 new field of format_ctx.
2185 (check_format_arg): Pass format_ctx->arglocs to new param of
2186 check_format_info_main.
2187 (class argument_parser): New field "arglocs".
2188 (argument_parser::argument_parser): Add "arglocs_" param and use
2189 it to initialize new field.
2190 (argument_parser::check_argument_type): Pass new arglocs field to
2191 check_format_types.
2192 (check_format_info_main): Add param "arglocs", and use it when
2193 constructing arg_parser.
2194 (check_format_types): Add param "arglocs"; use it if non-NULL when
2195 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2196
00aa1fa2
L
21972017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2198
2199 PR c/53037
2200 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2201 (c_common_attribute_table): Add warn_if_not_aligned.
2202 (handle_aligned_attribute): Renamed to ...
2203 (common_handle_aligned_attribute): Remove argument, name, and add
2204 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2205 (handle_aligned_attribute): New.
2206 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2207
27be025d
MS
22082017-08-14 Martin Sebor <msebor@redhat.com>
2209
2210 PR c/81117
2211 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2212 (handle_nonstring_attribute): New function.
2213
da67acb9
MS
22142017-08-14 Martin Sebor <msebor@redhat.com>
2215
2216 PR c/81117
2217 * c-format.h (T89_G): New macro.
2218 * c-format.c (local_gcall_ptr_node): New variable.
2219 (init_dynamic_diag_info): Initialize it.
2220
a8b522b4
ML
22212017-08-11 Martin Liska <mliska@suse.cz>
2222
2223 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2224 TARGET_SUPPORTS_ALIASES.
2225
32129a17
DM
22262017-08-10 David Malcolm <dmalcolm@redhat.com>
2227
2228 * c-common.c (c_parse_error): Add rich_location * param, using it
2229 rather implicitly using input_location.
2230 * c-common.h (c_parse_error): Add rich_location * param.
2231
30af3a2b
MP
22322017-08-09 Marek Polacek <polacek@redhat.com>
2233
2234 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2235 (c_common_truthvalue_conversion): Likewise.
2236 * c-omp.c (c_finish_omp_atomic): Likewise.
2237 * c-common.h (build_binary_op): Update declaration.
2238
314e6352
ML
22392017-08-08 Martin Liska <mliska@suse.cz>
2240
2241 * c-ada-spec.c: Include header files.
2242 * c-ubsan.c: Likewise.
2243 * c-warn.c: Likewise.
2244
56b5041c
JJ
22452017-08-07 Jakub Jelinek <jakub@redhat.com>
2246
2247 PR c/69389
2248 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2249
db440138
EB
22502017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2251
2252 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2253 (print_ada_methods): Likewise.
2254 (print_ada_declaration): Likewise.
2255
577eec56
ML
22562017-08-07 Martin Liska <mliska@suse.cz>
2257
2258 * array-notation-common.c: Add new includes.
2259 * c-format.c( handle_format_attribute): Canonicalize a format
2260 function name.
2261 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2262 attribute.
2263 * c-pretty-print.c: Add new include.
2264
b854df3c
EB
22652017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2266
2267 * c-ada-spec.c (has_static_fields): Look only into variables.
2268 (print_constructor): Add TYPE parameter and use it for the name.
2269 (print_destructor): Likewise.
2270 (print_ada_declaration): Adjust to new constructor/destructor names.
2271 Adjust calls to print_constructor and print_destructor.
2272 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2273 Look only into variables in the final loop.
2274
9f2cb25e
EB
22752017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2276
2277 * c-ada-spec.c (has_static_fields): Look only into fields.
2278 (dump_generic_ada_node): Small tweak.
2279 (dump_nested_types): Look only into fields.
2280 (print_ada_declaration): Look only into methods. Small tweak.
2281 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2282
f4bcd9eb
EB
22832017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2284
2285 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2286 (dump_ada_function_declaration): Likewise.
2287 (dump_generic_ada_node): Likewise.
2288 (print_ada_declaration): Add support for const-qualified variables.
2289
f34ebeb2
ML
22902017-07-31 Martin Liska <mliska@suse.cz>
2291
2292 PR sanitize/81530
2293 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2294 Guard condition with flag_sanitize_p also with current_function_decl
2295 non-null equality.
2296 (ubsan_maybe_instrument_reference_or_call): Likewise.
2297
218e5d04
UB
22982017-07-30 Uros Bizjak <ubizjak@gmail.com>
2299
2300 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2301
942047f2
EB
23022017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2303
2304 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2305 for enumeral types.
2306 (print_ada_declaration): Add missing guard for record types.
2307
a40ff0ae
JJ
23082017-07-27 Jakub Jelinek <jakub@redhat.com>
2309
2310 PR c/45784
2311 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2312 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2313 new COMPOUND_EXPRs around the rhs of the comparison.
2314
06bd22f6
MP
23152017-07-27 Marek Polacek <polacek@redhat.com>
2316
2317 PR c/81417
2318 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2319 the types.
2320
036ea399
JJ
23212017-07-27 Jakub Jelinek <jakub@redhat.com>
2322
2323 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2324 (handle_noipa_attribute): New function.
2325
417ca011
TD
23262017-07-07 Torsten Duwe <duwe@suse.de>
2327
2328 * c-attribs.c (c_common_attribute_table): Add entry for
2329 "patchable_function_entry".
2330
5aaa8fb4
NS
23312017-07-20 Nathan Sidwell <nathan@acm.org>
2332
2333 Remove TYPE_METHODS.
2334 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2335 dump_ada_template, print_ada_methods,
2336 print_ada_declaration): Member fns are on TYPE_FIELDS.
2337
ff22eb12
NS
23382017-07-18 Nathan Sidwell <nathan@acm.org>
2339
2340 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2341
eea77d1f
DM
23422017-07-14 David Malcolm <dmalcolm@redhat.com>
2343
2344 * c-common.c (try_to_locate_new_include_insertion_point): New
2345 function.
2346 (per_file_includes_t): New typedef.
2347 (added_includes_t): New typedef.
2348 (added_includes): New variable.
2349 (maybe_add_include_fixit): New function.
2350 * c-common.h (maybe_add_include_fixit): New decl.
2351
281ac396
MS
23522017-07-10 Martin Sebor <msebor@redhat.com>
2353
2354 PR other/81345
2355 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2356
b6f43128
DM
23572017-07-06 David Malcolm <dmalcolm@redhat.com>
2358
2359 * c-common.c (selftest::c_family_tests): New.
2360 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2361 (selftest::c_family_tests): New decl.
2362
efbf55b0
MP
23632017-07-04 Marek Polacek <polacek@redhat.com>
2364
2365 PR c/81231
2366 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2367 types.
2368
6c86bd88
MP
23692017-07-04 Marek Polacek <polacek@redhat.com>
2370
2371 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2372
17a7218b
ML
23732017-06-28 Martin Liska <mliska@suse.cz>
2374
2375 PR ipa/81128
2376 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2377 to a function declaration.
2378
63010089
ML
23792017-06-28 Martin Liska <mliska@suse.cz>
2380
2381 PR driver/79659
2382 * c.opt: Add IntegerRange to various options.
2383
3e2becc4
MP
23842017-06-26 Marek Polacek <polacek@redhat.com>
2385
2386 PR c/80116
2387 * c-common.h (warn_for_multistatement_macros): Declare.
2388 * c-warn.c: Include "c-family/c-indentation.h".
2389 (warn_for_multistatement_macros): New function.
2390 * c.opt (Wmultistatement-macros): New option.
2391 * c-indentation.c (guard_tinfo_to_string): No longer static.
2392 Change the parameter type to "enum rid". Handle RID_SWITCH.
2393 * c-indentation.h (guard_tinfo_to_string): Declare.
2394
2db9b7cd
MG
23952017-06-23 Marc Glisse <marc.glisse@inria.fr>
2396
2397 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2398
c3684b7b
MS
23992017-06-15 Martin Sebor <msebor@redhat.com>
2400
2401 PR c++/80560
2402 * c.opt (-Wclass-memaccess): New option.
2403
e72c4afd
BK
24042017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2405
2406 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2407
8a516588
MP
24082017-06-13 Marek Polacek <polacek@redhat.com>
2409
2410 PR objc/80949
2411 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2412 branches is null.
2413
45b2222a
ML
24142017-06-13 Martin Liska <mliska@suse.cz>
2415
2416 PR sanitize/78204
2417 * c-attribs.c (add_no_sanitize_value): New function.
2418 (handle_no_sanitize_attribute): Likewise.
2419 (handle_no_sanitize_address_attribute): Use the function.
2420 (handle_no_sanitize_thread_attribute): New function.
2421 (handle_no_address_safety_analysis_attribute): Use
2422 add_no_sanitize_value.
2423 (handle_no_sanitize_undefined_attribute): Likewise.
2424 * c-common.h: Declare new functions.
2425 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2426 (ubsan_instrument_shift): Likewise.
2427 (ubsan_instrument_bounds): Likewise.
2428 (ubsan_maybe_instrument_array_ref): Likewise.
2429 (ubsan_maybe_instrument_reference_or_call): Likewise.
2430
a01f151f
JM
24312017-06-11 Jason Merrill <jason@redhat.com>
2432
2433 * c-ada-spec.c, c-pragma.c: Use id_equal.
2434
3de4ac6d
MP
24352017-06-04 Marek Polacek <polacek@redhat.com>
2436
2437 PR c/80919
2438 * c-format.c (matching_type_p): Return false if any of the types
2439 requires structural equality.
2440
2474f48f
MS
24412017-06-02 Martin Sebor <msebor@redhat.com>
2442
2443 PR c/80892
2444 * c-warn.c (conversion_warning): Use -Wconversion for integer
2445 conversion and -Wfloat-conversion for floating one.
2446
40ffd95f
BE
24472017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2448
2449 * c.opt (Wsizeof-pointer-div): New warning option.
2450
3fa4634c
VR
24512017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2452
2453 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2454 (Wcatch-value=1): Enable by -Wall.
2455
f012c8ef
DM
24562017-05-30 David Malcolm <dmalcolm@redhat.com>
2457
2458 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2459 format_chars.
2460 * c.opt (fdiagnostics-show-template-tree): New option.
2461 (felide-type): New option.
2462
63dbcd13
VR
24632017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2464
2465 * c.opt (Wcatch-value=): New C++ warning flag.
2466
be136b5c
NS
24672017-05-24 Nathan Sidwell <nathan@acm.org>
2468
2469 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2470 const casts to avoid warning.
2471
3cd211af
MS
24722017-05-24 Martin Sebor <msebor@redhat.com>
2473
2474 PR c/80731
2475 * c-common.h (unsafe_conversion_p): Add a function argument.
2476 * c-common.c (unsafe_conversion_p): Same.
2477 Add type names and values to diagnostics.
2478 (scalar_to_vector): Adjust.
2479 * c-warn.c (constant_expression_error): Add a function argument.
2480 Add type names and values to diagnostics.
2481 (conversion_warning): Add a function argument.
2482 Add type names and values to diagnostics.
2483 (warnings_for_convert_and_check): Same.
2484
1ff7be5a
JM
24852017-05-19 Jason Merrill <jason@redhat.com>
2486
2487 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2488 enumerators.
2489
ff502317
BE
24902017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2491
2492 * c-format.c (locus): Move out of function scope,
2493 add GTY attribute.
2494
2a8a8d7b
NS
24952017-05-19 Nathan Sidwell <nathan@acm.org>
2496
2497 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2498 (c_common_parse_file): Remove class dump handling.
2499 (get_dump_info): Likewise.
2500
39aac208
RB
25012017-05-19 Richard Biener <rguenther@suse.de>
2502
2503 PR c++/80593
2504 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2505 to alias-set zero memory.
2506
6ecd2339
BE
25072017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2508
2509 * c-format.c (local_tree_type_node): Add GTY attribute.
2510
6574d78e
MP
25112017-05-18 Marek Polacek <polacek@redhat.com>
2512
2513 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2514 (c_common_fixed_point_type_for_size): Likewise.
2515 (c_common_type_for_mode): Likewise.
2516 (shorten_compare): Likewise.
2517 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2518 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2519
e3455240
MP
25202017-05-18 Marek Polacek <polacek@redhat.com>
2521
2522 * c-common.c (self_promoting_args_p): Change the return type to bool.
2523 Use false/true instead of 0/1.
2524 * c-common.h (self_promoting_args_p): Update.
2525
3fa8871b
MP
25262017-05-17 Marek Polacek <polacek@redhat.com>
2527
2528 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2529 * c-warn.c: Likewise.
2530
b42cc3ca
VV
25312017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2532
2533 Implement new C++ intrinsics __is_assignable and __is_constructible.
2534 * c-common.c (__is_assignable, __is_constructible): New.
2535 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2536
1a817418
ML
25372017-05-17 Martin Liska <mliska@suse.cz>
2538
2539 * c-common.h: Introduce dump_flags_t type and
2540 use it instead of int type.
2541 * c-gimplify.c (c_genericize): Likewise.
2542 * c-opts.c: Likewise.
2543
b2fa0a8b
MP
25442017-05-17 Marek Polacek <polacek@redhat.com>
2545
2546 * c-common.c (c_save_expr): Remove.
2547 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2548 * c-common.h (c_save_expr): Remove declaration.
2549
31c2d57d
VR
25502017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2551
2552 PR c/35441
2553 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2554 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2555 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2556 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2557 RDIV_EXPR.
2558 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2559
684f84de
MP
25602017-05-09 Marek Polacek <polacek@redhat.com>
2561
2562 PR c/80525
2563 * c-warn.c (unwrap_c_maybe_const): New.
2564 (warn_logical_operator): Call it.
2565
641da50a
NS
25662017-05-09 Nathan Sidwell <nathan@acm.org>
2567
2568 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2569 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2570
631238ac
MS
25712017-05-08 Martin Sebor <msebor@redhat.com>
2572
2573 PR translation/80280
2574 * c-format.h (struct format_flag_spec): Add new member.
2575 (T89_T): New macro.
2576 * c-format.c (local_tree_type_node): New global.
2577 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2578 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2579 (strfmon_flag_specs): Likewise.
2580 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2581 with distinct quoting properties.
2582 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2583 (flag_chars_t::validate): Add argument and handle bad quoting.
2584 (check_format_info_main): Handle quoting problems.
2585 (init_dynamic_diag_info): Simplify.
2586
49f0c04c
JM
25872017-05-08 Jason Merrill <jason@redhat.com>
2588
2589 * c-opts.c (c_common_post_options): Update defaults for
2590 flag_abi_version and flag_abi_compat_version.
2591
56d35585
DM
25922017-05-05 David Malcolm <dmalcolm@redhat.com>
2593
2594 * c-common.c (c_cpp_error): Replace report_diagnostic
2595 with diagnostic_report_diagnostic.
2596
0f2c4a8f
MS
25972017-05-04 Martin Sebor <msebor@redhat.com>
2598
2599 PR translation/80280
2600 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2601 (handle_weakref_attribute): Same.
2602
6fe63fb4
NS
26032017-05-03 Nathan Sidwell <nathan@acm.org>
2604
2605 Canonicalize canonical type hashing
2606 * c-common.c (complete_array_type): Use type_hash_canon.
2607
815d9cc6
XR
26082017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2609
92a285c1 2610 PR c++/80038
815d9cc6
XR
2611 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2612 prototype.
2613 (cilk_install_body_pedigree_operations): Likewise.
2614 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2615 detatched.
2616 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2617 (cilk_install_body_pedigree_operations): Likewise.
2618 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2619 unwrapping.
2620
f8a36447
JJ
26212017-04-27 Jakub Jelinek <jakub@redhat.com>
2622
2623 PR c++/80534
2624 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2625 flag on non-aggregate element types.
2626
7c145456
BE
26272017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2628
2629 * c-common.c (c_type_hasher, type_hash_table): Remove.
2630 (c_common_get_alias_set): Remove unreachable code.
2631 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2632
c3cbcd45
VR
26332017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2634
2635 * c.opt (Wextra-semi): New C++ warning flag.
2636
8a59d466
JJ
26372017-04-20 Jakub Jelinek <jakub@redhat.com>
2638
2639 PR middle-end/80423
2640 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2641
8487c9a5
JJ
26422017-04-18 Jakub Jelinek <jakub@redhat.com>
2643
2644 PR middle-end/79788
2645 PR middle-end/80375
2646 * c-common.c (c_common_type_for_mode): Don't handle
2647 widest_*_literal_type_node here.
2648 c_common_signed_or_unsigned_type): Likewise.
2649 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2650 to *intTI_type_node or *intDI_type_node depending on whether
2651 TImode is supported by the target or not.
2652
3ee0fb02
ML
26532017-04-10 Martin Liska <mliska@suse.cz>
2654
2655 PR sanitizer/80350
2656 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2657 doing an UBSAN check.
2658
5764ee3c
JW
26592017-04-03 Jonathan Wakely <jwakely@redhat.com>
2660
2661 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2662
6f3af356
JJ
26632017-03-31 Jakub Jelinek <jakub@redhat.com>
2664
2665 PR c++/79572
2666 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2667 tree *.
2668 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2669 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2670 REFERENCE_TYPE.
2671
f6a7a9d5
DM
26722017-03-31 David Malcolm <dmalcolm@redhat.com>
2673
2674 PR documentation/78732
2675 * c.opt (Wendif-labels): Fix description to refer to
2676 #else rather than #elif.
2677
af88f557
JJ
26782017-03-31 Jakub Jelinek <jakub@redhat.com>
2679
2680 PR libstdc++/80251
2681 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2682 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2683
a9e4a1a5
JJ
26842017-03-27 Jakub Jelinek <jakub@redhat.com>
2685
2686 PR middle-end/80162
2687 * c-common.c (c_common_mark_addressable_vec): Don't set
2688 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2689
3f01b620
MS
26902017-03-21 Martin Sebor <msebor@redhat.com>
2691
2692 PR c++/79548
2693 * c-common.c (set_underlying_type): Mark type used only when
2694 original del is declared unused.
2695
2f6f187a
DM
26962017-03-10 David Malcolm <dmalcolm@redhat.com>
2697
2698 PR translation/79848
2699 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2700 "%qs".
2701
a02fa805
DM
27022017-03-10 David Malcolm <dmalcolm@redhat.com>
2703
2704 PR c/79921
2705 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2706 from inform's message, so that xgettext can locate it.
2707
822a132c
MP
27082017-03-09 Marek Polacek <polacek@redhat.com>
2709
2710 PR c++/79962
2711 PR c++/79984
2712 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2713 conversion to the attribute list.
2714
bba81f1c
ML
27152017-03-09 Martin Liska <mliska@suse.cz>
2716
2717 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2718
108154ff
JM
27192017-03-03 Jason Merrill <jason@redhat.com>
2720
2721 * c.opt (Wnoexcept-type): New.
2722
eb0e7c34
RB
27232017-03-02 Richard Biener <rguenther@suse.de>
2724
2725 PR c/79756
2726 * c-common.c (c_common_mark_addressable_vec): Look through
2727 C_MAYBE_CONST_EXPR.
2728
9453ba0a
ML
27292017-02-28 Martin Liska <mliska@suse.cz>
2730
2731 * c.opt: Replace space with tabular for options of <number>
2732 type.
2733
6a825afe
ML
27342017-02-28 Martin Liska <mliska@suse.cz>
2735
2736 * c.opt: Fix --help=option -Q for options which are of
2737 an enum type.
2738
4227c9ad
JJ
27392017-02-24 Jakub Jelinek <jakub@redhat.com>
2740
2741 PR c++/79588
2742 * c-common.c (check_function_restrict): New function.
2743 (check_function_arguments): Add FNDECL argument. Call
2744 check_function_restrict if -Wrestrict.
2745 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2746 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2747 * c-common.h (check_function_arguments): Add FNDECL argument.
2748 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2749
59909673
EB
27502017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2751
2752 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2753 treatment of parameters with pointer-to-tagged type and tidy up.
2754 (print_ada_methods): Remove the special treatment of C++ static member
2755 functions.
2756
54dcd526
ML
27572017-02-22 Martin Liska <mliska@suse.cz>
2758
2759 * c.opt: Replace inequality signs with square brackets
2760 for -Wnornalized.
2761
00bc9de3
JJ
27622017-02-21 Jakub Jelinek <jakub@redhat.com>
2763
2764 PR c++/79641
2765 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2766 preserve quals.
2767
97fcf744
JM
27682017-02-17 Joseph Myers <joseph@codesourcery.com>
2769
2770 * c-cppbuiltin.c (builtin_define_float_constants): Define
2771 __DECIMAL_DIG__ to the value for long double.
2772
c7545f1c
MP
27732017-02-15 Marek Polacek <polacek@redhat.com>
2774
2775 PR c/79515
2776 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2777 conversion has occured.
2778
c2e84327
DM
27792017-01-24 David Malcolm <dmalcolm@redhat.com>
2780
2781 * c-common.c (c_common_reswords): Add "__RTL".
2782 * c-common.h (enum rid): Add RID_RTL.
2783
2ebd93e1
MP
27842017-01-20 Marek Polacek <polacek@redhat.com>
2785
2786 PR c/64279
2787 * c-common.h (do_warn_duplicated_branches_r): Declare.
2788 * c-gimplify.c (c_genericize): Walk the function tree calling
2789 do_warn_duplicated_branches_r.
2790 * c-warn.c (expr_from_macro_expansion_r): New.
2791 (do_warn_duplicated_branches): New.
2792 (do_warn_duplicated_branches_r): New.
2793 * c.opt (Wduplicated-branches): New option.
2794
0d80ab91
DM
27952017-01-17 David Malcolm <dmalcolm@redhat.com>
2796
2797 PR c++/71497
2798 * c-indentation.c (warn_for_misleading_indentation): Use the past
2799 subjunctive in the note.
2800
7f991c36
AH
28012017-01-17 Aldy Hernandez <aldyh@redhat.com>
2802
2803 PR c/79116
2804 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2805 start type to integer_type.
2806
1c70261c
JJ
28072017-01-16 Jakub Jelinek <jakub@redhat.com>
2808
2809 PR driver/49726
2810 * c.opt (gen-decls): Add Driver flag.
2811
1ddca3f3
PC
28122017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2813
2814 Revert:
2815 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2816
2817 PR c++/71737
2818 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2819
7d2f3f1d
PC
28202017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2821
2822 PR c++/71737
2823 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2824
bce6f760
MS
28252017-01-12 Martin Sebor <msebor@redhat.com>
2826
2827 (-Wformat-overflow): ...to this.
2828
bf5fbf46
MS
28292017-01-11 Martin Sebor <msebor@redhat.com>
2830
2831 PR c/78768
2832 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2833 Also enable for LTO.
2834
e363df3f
JM
28352017-01-10 Jason Merrill <jason@redhat.com>
2836
2837 Implement P0195R2, C++17 variadic using.
2838 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2839
bd2c6270
JJ
28402017-01-09 Jakub Jelinek <jakub@redhat.com>
2841
2842 PR translation/79019
2843 PR translation/79020
2844 * c.opt (Wnormalized=): Fix typo in description.
2845
efcc8d38
MS
28462017-01-08 Martin Sebor <msebor@redhat.com>
2847
2848 PR middle-end/77708
2849 * c.opt (-Wformat-truncation): New option.
2850
ab20d992 28512017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
2852
2853 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2854 value to unsigned short to fit in 4 hex digits without
2855 warnings.
2856
4e89adf9
EB
28572017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2858
2859 * c.opt (fsso-struct): Add 'native' value.
2860
cd445b54
ML
28612017-01-05 Martin Liska <mliska@suse.cz>
2862
2863 PR pch/78970
2864 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2865 header.
2866
a9342885
MP
28672017-01-04 Marek Polacek <polacek@redhat.com>
2868
2869 PR c++/64767
2870 * c.opt (Wpointer-compare): New option.
2871
fc73e60c
JJ
28722017-01-04 Jakub Jelinek <jakub@redhat.com>
2873
2874 PR driver/78957
2875 * c.opt (fsso-struct=): Add RejectNegative.
2876
cbe34bb5
JJ
28772017-01-01 Jakub Jelinek <jakub@redhat.com>
2878
2879 Update copyright years.
2880
d4a6c0ea
ML
28812016-12-29 Martin Liska <mliska@suse.cz>
2882
2883 PR c/78933
2884 * c.opt (strong-eval-order): Add RejectNegative keyword.
2885
67a5ad7c
JM
28862016-12-22 Jason Merrill <jason@redhat.com>
2887
2888 Implement P0522R0, matching of template template arguments.
2889 * c-cppbuiltin.c (c_cpp_builtins): Define
2890 __cpp_template_template_args.
2891
0dba7960
JJ
28922016-12-21 Jakub Jelinek <jakub@redhat.com>
2893
2894 PR bootstrap/78817
2895 * c-common.c (struct nonnull_arg_ctx): New type.
2896 (check_function_nonnull): Return bool instead of void. Use
2897 nonnull_arg_ctx as context rather than just location_t.
2898 (check_nonnull_arg): Adjust for the new context type, set
2899 warned_p to true if a warning has been diagnosed.
2900 (check_function_arguments): Return bool instead of void.
2901 * c-common.h (check_function_arguments): Adjust prototype.
2902
31bfc9b9
JM
29032016-12-21 Jason Merrill <jason@redhat.com>
2904
2905 * c.opt (-fnew-ttp-matching): New flag.
2906 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2907
629b3d75
MJ
29082016-12-14 Martin Jambor <mjambor@suse.cz>
2909
2910 * c-omp.c: Include omp-general.h instead of omp-low.h.
2911 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2912 name.
2913
474da67e
MS
29142016-12-14 Martin Sebor <msebor@redhat.com>
2915
2916 PR c/17308
2917 * c-common.c (check_nonnull_arg): Disable when optimization
2918 is enabled.
2919
fe366b87
MP
29202016-12-12 Marek Polacek <polacek@redhat.com>
2921
2922 PR c++/78647
2923 * c-common.c (attribute_fallthrough_p): Return false for
2924 error_mark_node.
2925
8bd9f164
MS
29262016-12-08 Martin Sebor <msebor@redhat.com>
2927
2928 PR c/78284
2929 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2930
060162e0
MS
29312016-12-08 Martin Sebor <msebor@redhat.com>
2932
2933 PR c/78165
92a285c1
ML
2934 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2935 suffix.
060162e0 2936
ee92e7ba
MS
29372016-12-07 Martin Sebor <msebor@redhat.com>
2938
2939 PR c/53562
2940 PR middle-end/77784
2941 PR middle-end/78149
2942 PR middle-end/78138
2943 * c.opt (-Wstringop-overflow): New option.
2944
84b0769e
MO
29452016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
2946
2947 * c-attribs.c (asan odr indicator): New attribute.
2948 (handle_asan_odr_indicator_attribute): New function.
2949
7fa6a965
PK
29502016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2951
2952 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
2953 ptrdiff_type_node;
2954
56d8ffc1
JG
29552016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2956
2957 * c-common.c (excess_precision_mode_join): New.
2958 (c_ts18661_flt_eval_method): New.
2959 (c_c11_flt_eval_method): Likewise.
2960 (c_flt_eval_method): Likewise.
2961 * c-common.h (excess_precision_mode_join): New.
2962 (c_flt_eval_method): Likewise.
2963 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
2964 (cpp_iec_559_value): Call it.
2965 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
2966 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
2967 __FLT_EVAL_METHOD_TS_18661_3__.
2968
04f0fcf7
JG
29692016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
2970
2971 * c-opts.c (c_common_post_options): Add logic to handle the default
2972 case for -fpermitted-flt-eval-methods.
2973
fb2675cb
PB
29742016-11-23 Paolo Bonzini <bonzini@gnu.org>
2975
2976 * c.opt (Wexpansion-to-defined): New.
2977
ec1c5694
JJ
29782016-11-23 Jakub Jelinek <jakub@redhat.com>
2979
2980 PR target/78451
2981 * c-pragma.c (handle_pragma_target): Don't replace
2982 current_target_pragma, but chainon the new args to the current one.
2983
730c9e75
NS
29842016-11-22 Nathan Sidwell <nathan@acm.org>
2985
2986 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 2987 indentation and formatting.
730c9e75 2988
89990732
MS
29892016-11-21 Martin Sebor <msebor@redhat.com>
2990
2991 * c.opt (-fprintf-return-value): Enable by default.
2992
48330c93
BE
29932016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
2994
2995 PR c++/71973
2996 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
2997 * c-common.c (c_common_nodes_and_builtins): Initialize
2998 const_tm_ptr_type_node.
2999
0d939c95
MP
30002016-11-16 Marek Polacek <polacek@redhat.com>
3001
3002 PR c/78285
3003 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3004
8e745a17
JJ
30052016-11-14 Jakub Jelinek <jakub@redhat.com>
3006
3007 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3008
1ee62b92 30092016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3010 Richard Biener <rguenther@suse.de>
3011
3012 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3013 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3014 * c.opt (fgimple): New option.
1ee62b92 3015
22b15758
UB
30162016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3017
3018 PR c/35503
3019 * c-common.h (warn_for_restrict): Declare.
3020 * c-warn.c: Include gcc-rich-location.h.
3021 (warn_for_restrict): New function.
3022 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3023 (gcc_cdiag_char_table): Likewise.
3024 (gcc_cxxdiag_char_table): Likewise.
3025 * c.opt (Wrestrict): New option.
3026
4be719cd
EB
30272016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3028
3029 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3030 for nested types only if the type is a record or union and dump SLOC.
3031
4a826ca6
JM
30322016-11-09 Jason Merrill <jason@redhat.com>
3033
3034 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3035
2e955d50
JJ
30362016-11-09 Jakub Jelinek <jakub@redhat.com>
3037
3038 * c-ubsan.c (ubsan_instrument_shift): Handle split
3039 -fsanitize=shift-base and -fsanitize=shift-exponent.
3040
51dc6603
JM
30412016-11-07 Jason Merrill <jason@redhat.com>
3042
3043 * c.opt (Wc++1z-compat): New.
3044 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3045
6dc4a604
ML
30462016-11-07 Martin Liska <mliska@suse.cz>
3047
3048 * c-warn.c (warn_for_unused_label): Save all labels used
3049 in goto or in &label.
3050
b302001e
JM
30512016-11-03 Jason Merrill <jason@redhat.com>
3052
3053 * c-cppbuiltin.c (c_cpp_builtins): Correct
3054 __cpp_inheriting_constructors.
3055
31f7f784
JM
30562016-11-01 Jason Merrill <jason@redhat.com>
3057
2bc78e3c
JM
3058 * c-cppbuiltin.c (c_cpp_builtins): Update
3059 __cpp_inheriting_constructors.
3060
31f7f784
JM
3061 * c.opt (-fnew-inheriting-ctors): New.
3062 * c-opts.c: Default to on for ABI 11+.
3063
dcb466ec
JJ
30642016-10-31 Jakub Jelinek <jakub@redhat.com>
3065
3066 PR c++/77948
3067 * c.opt (fext-numeric-literals): Add Var and Init.
3068 * c-opts.c (c_common_handle_option): Don't clear
3069 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3070 (c_common_post_options): Clear it here if not set
3071 explicitly.
3072
52e1b91e
AH
30732016-10-28 Aldy Hernandez <aldyh@redhat.com>
3074
3075 PR debug/77773
3076 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3077 if NULL.
3078
e16f1cc7
JJ
30792016-10-25 Jakub Jelinek <jakub@redhat.com>
3080
3081 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3082 * c-common.c (c_common_reswords): Add __builtin_launder.
3083
f8348061
BE
30842016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3085
3086 * c-common.c (c_common_truthvalue_conversion): Warn for
3087 multiplications in boolean context. Fix the quoting of '<<' and '<'
3088 in the shift warning.
3089
eff89e01
BE
30902016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3091
3092 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3093
24bc7bf4
JM
30942016-10-20 Jason Merrill <jason@redhat.com>
3095
3096 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3097
4c712374
BE
30982016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3099
3100 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3101 integer shift ops in boolean context.
3102
31032016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3104
3105 * c.opt (Walloca): New.
3106 (Walloca-larger-than=): New.
3107 (Wvla-larger-than=): New.
3108
8fa18c06
MP
31092016-10-17 Marek Polacek <polacek@redhat.com>
3110
3111 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3112 Return immediately when finding a match.
3113 (warn_tautological_cmp): Remove a boolean variable that is no longer
3114 needed.
3115
b12b1915
MP
31162016-10-17 Marek Polacek <polacek@redhat.com>
3117
3118 * c-attribs.c: New file.
3119 * c-common.c: Move attributes handling to c-attribs.c.
3120 (get_nonnull_operand): No longer static.
3121 * c-common.h: Move the declarations from c-attribs.c to its own section.
3122
2045acd9
JM
31232016-10-14 Jason Merrill <jason@redhat.com>
3124
3125 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3126 and __cpp_deduction_guides.
3127
14a2c9aa
JM
31282016-10-13 Jason Merrill <jason@redhat.com>
3129
3130 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3131
4d0cdd0c
TP
31322016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3133
3134 * c-cppbuiltin.c: Include memmodel.h.
3135 * c-opts.c: Likewise.
3136 * c-pragma.c: Likewise.
3137 * c-warn.c: Likewise.
3138
70f6d5e1
JJ
31392016-10-12 Jakub Jelinek <jakub@redhat.com>
3140
3141 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3142 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3143 * c-opts.c (sanitize_cpp_opts): Initialize
3144 cpp_opts->cpp_warn_implicit_fallthrough.
3145
78f61294
MP
31462016-10-11 Marek Polacek <polacek@redhat.com>
3147
3148 * c-common.c (warning_candidate_p): Change the return type to bool
3149 and return true/false instead of 1/0.
3150 (vector_mode_valid_p): Likewise.
3151
038b5cc0
MP
31522016-10-11 Marek Polacek <polacek@redhat.com>
3153
3154 * c-common.c (fold_for_warn): No longer static.
3155 (bool_promoted_to_int_p): Likewise.
3156 (c_common_get_narrower): Likewise.
3157 (constant_expression_warning): Move to c-warn.c.
3158 (constant_expression_error): Likewise.
3159 (overflow_warning): Likewise.
3160 (warn_logical_operator): Likewise.
3161 (find_array_ref_with_const_idx_r): Likewise.
3162 (warn_tautological_cmp): Likewise.
3163 (expr_has_boolean_operands_p): Likewise.
3164 (warn_logical_not_parentheses): Likewise.
3165 (warn_if_unused_value): Likewise.
3166 (strict_aliasing_warning): Likewise.
3167 (sizeof_pointer_memaccess_warning): Likewise.
3168 (check_main_parameter_types): Likewise.
3169 (conversion_warning): Likewise.
3170 (warnings_for_convert_and_check): Likewise.
3171 (match_case_to_enum_1): Likewise.
3172 (match_case_to_enum): Likewise.
3173 (c_do_switch_warnings): Likewise.
3174 (warn_for_omitted_condop): Likewise.
3175 (readonly_error): Likewise.
3176 (lvalue_error): Likewise.
3177 (invalid_indirection_error): Likewise.
3178 (warn_array_subscript_with_type_char): Likewise.
3179 (warn_about_parentheses): Likewise.
3180 (warn_for_unused_label): Likewise.
3181 (warn_for_div_by_zero): Likewise.
3182 (warn_for_memset): Likewise.
3183 (warn_for_sign_compare): Likewise.
3184 (do_warn_double_promotion): Likewise.
3185 (do_warn_unused_parameter): Likewise.
3186 (record_locally_defined_typedef): Likewise.
3187 (maybe_record_typedef_use): Likewise.
3188 (maybe_warn_unused_local_typedefs): Likewise.
3189 (maybe_warn_bool_compare): Likewise.
3190 (maybe_warn_shift_overflow): Likewise.
3191 (warn_duplicated_cond_add_or_warn): Likewise.
3192 (diagnose_mismatched_attributes): Likewise.
3193 * c-common.h: Move the declarations from c-warn.c to its own section.
3194 * c-warn.c: New file.
3195
627be19f
JM
31962016-10-08 Jason Merrill <jason@redhat.com>
3197
3198 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3199 into COND_EXPR in C++.
3200
7bad794a
JJ
32012016-10-08 Jakub Jelinek <jakub@redhat.com>
3202
3203 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3204 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3205 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3206
be845b04
JJ
32072016-10-07 Jakub Jelinek <jakub@redhat.com>
3208
3209 Implement LWG2296 helper intrinsic
3210 * c-common.h (enum rid): Add RID_ADDRESSOF.
3211 * c-common.c (c_common_reswords): Add __builtin_addressof.
3212
c09c4992
BE
32132016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3214
3215 PR c++/77700
3216 * c-common.c (c_common_truthvalue_conversion): Warn also for
3217 suspicious enum values in boolean context.
3218
342cfb3e
JJ
32192016-10-06 Jakub Jelinek <jakub@redhat.com>
3220
3221 Implement P0258R2 - helper for C++17
3222 std::has_unique_object_representations trait
3223 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3224 * c-common.c (c_common_reswords): Add
3225 __has_unique_object_representations.
3226
2e69f143
JJ
32272016-10-05 Jakub Jelinek <jakub@redhat.com>
3228
3229 PR sanitizer/66343
3230 * c-ubsan.c (ubsan_instrument_return): Don't call
3231 initialize_sanitizer_builtins here.
3232
700fff34
BE
32332016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3234
3235 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3236 conditional expression in boolean context when only one arm is
3237 non-boolean.
3238
9563bfcd
JJ
32392016-10-05 Jakub Jelinek <jakub@redhat.com>
3240
04a32443
JJ
3241 PR sanitizer/77823
3242 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3243 is not integral.
3244
9563bfcd
JJ
3245 * c-common.c (c_common_reswords): Update comment for C++11.
3246
f1644724
JM
32472016-10-04 Jason Merrill <jason@redhat.com>
3248
3249 * c-common.c (make_tree_vector_from_ctor): New.
3250 * c-common.h: Declare it.
3251
5a79befb
JJ
32522016-10-04 Jakub Jelinek <jakub@redhat.com>
3253
3254 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3255 __LIBGCC_JCR_SECTION_NAME__.
3256
1633d3b9
BE
32572016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3258
3259 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3260 left shift in boolean context.
3261
a2c6e7f2
JJ
32622016-09-29 Jakub Jelinek <jakub@redhat.com>
3263
3264 Implement P0001R1 - C++17 removal of register storage class specifier
3265 * c.opt (Wregister): New warning.
3266 * c-opts.c (c_common_post_options): Enable -Wregister by
3267 default for C++17.
3268
75304c87
JG
32692016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3270
3271 * c-opts.c (c_common_post_options): Remove special case for
3272 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3273 in C++.
3274
bbfac6da
JJ
32752016-09-27 Jakub Jelinek <jakub@redhat.com>
3276
6e39060a
JJ
3277 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3278 -std=c++1z.
3279
bbfac6da
JJ
3280 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3281
e73cf9a2
TP
32822016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3283
3284 * c-common.c: Include memmodel.h.
3285
c6147dc4
MP
32862016-09-26 Marek Polacek <polacek@redhat.com>
3287
3288 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3289
81fea426
MP
32902016-09-26 Marek Polacek <polacek@redhat.com>
3291
3292 PR c/7652
3293 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3294 (handle_fallthrough_attribute): New function.
3295 (attribute_fallthrough_p): New function.
3296 * c-common.h (attribute_fallthrough_p): Declare.
3297
9a2300e9
MP
32982016-09-24 Marek Polacek <polacek@redhat.com>
3299
3300 PR c/77490
3301 * c.opt (Wbool-operation): New.
3302
a09e9e35
BE
33032016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3304
3305 * c-common.c (c_common_truthvalue_conversion): Inhibit
3306 Wint-in-bool-context warning with from_macro_definition_at.
3307 Mention the expression will always evaluate to true.
3308
d43b4ccc
MS
33092016-09-21 Martin Sebor <msebor@redhat.com>
3310
3311 PR bootstrap/77676
3312 * c.opt (fprintf-return-value): Temporarily initialize to zero
3313 to unblock bootstrap failures.
3314
2e1c20b1
JJ
33152016-09-21 Jakub Jelinek <jakub@redhat.com>
3316
3317 PR c++/77651
3318 * c.opt (Waligned-new=): Add RejectNegative.
3319 (faligned-new=): Likewise. Spelling fix - change
3320 aligned_new_threshhold to aligned_new_threshold.
3321 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3322 to aligned_new_threshold.
3323
88d0c3f0
MS
33242016-09-20 Martin Sebor <msebor@redhat.com>
3325
3326 PR middle-end/49905
3327 * c.opt: Add -Wformat-length and -fprintf-return-value.
3328
144a96e4
BE
33292016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3330
3331 PR c++/77434
3332 * c.opt (Wint-in-bool-context): New warning.
3333 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3334 constants in boolean context.
3335
63012d9a
JM
33362016-09-19 Joseph Myers <joseph@codesourcery.com>
3337
3338 * c-common.c (max_align_t_align): Also consider alignment of
3339 float128_type_node.
3340
931388ce
JM
33412016-09-15 Jason Merrill <jason@redhat.com>
3342
3343 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3344 DECL_EXTERNAL.
3345
38711381
JM
33462016-09-14 Jason Merrill <jason@redhat.com>
3347
3348 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3349 limit FIELD_DECL, either.
3350
e51fbec3
MP
33512016-09-14 Marek Polacek <polacek@redhat.com>
3352
3353 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3354 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3355 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3356
254830ba
DM
33572016-09-13 David Malcolm <dmalcolm@redhat.com>
3358
3359 * c-common.c (warn_logical_not_parentheses): Replace
3360 rich_location::add_fixit_insert calls with add_fixit_insert_before
3361 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3362
42763690
JM
33632016-09-13 Jason Merrill <jason@redhat.com>
3364 Tom de Vries <tom@codesourcery.com>
3365
3366 PR c++/77427
3367 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3368
9453eee9
JM
33692016-09-13 Jason Merrill <jason@redhat.com>
3370
3371 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3372 limit types at all.
3373
e96809e3
JM
33742016-09-12 Jason Merrill <jason@redhat.com>
3375
3376 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3377 bit/byte confusion, allow large alignment for types.
3378
54dcdb88
BE
33792016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3380
3381 PR c++/77496
3382 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3383
d1463eb9
DM
33842016-09-12 David Malcolm <dmalcolm@redhat.com>
3385
3386 PR c/72858
3387 * c-format.c (argument_parser::check_argument_type): Add params
3388 "type_start" and "conversion_char". Use the former to generate
3389 offset_to_type_start and pass it and conversion_char to
3390 check_format_types.
3391 (check_format_info_main): Capture the start of the type
3392 information as "type_start", and pass it an format_char
3393 to arg_parser.check_argument_type.
3394 (check_format_types): Provide an example in the leading comment.
3395 Add params "offset_to_type_start" and "conversion_char"; pass
3396 them to format_type_warning calls.
3397 (test_get_modifier_for_format_len): Likewise.
3398 (matching_type_p): New function.
3399 (get_format_for_type): Add param "conversion_char" and move
3400 implementation into...
3401 (get_format_for_type_1): ...new function, called twice.
3402 Use new function matching_type_p rather than checking for
3403 TYPE_CANONICAL equality.
3404 (get_corrected_substring): New function.
3405 (format_type_warning): Provide an example in the leading comment.
3406 Add params "offset_to_type_start" and "conversion_char". Replace
3407 call to get_format_for_type with call to get_corrected_substring
3408 and move rejection of hints for widths/precisions there.
3409 (assert_format_for_type_streq): Add param "conversion_char".
3410 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3411 (test_get_format_for_type_printf): Add conversion chars to the
3412 tests, adding coverage for various combinations of integer
3413 vs double conversions, and for preserving octal and hexadecimal
3414 conversions.
3415 (test_get_format_for_type_scanf): Add conversion chars to the
3416 tests.
3417
5b28efbb
TV
34182016-09-10 Tom de Vries <tom@codesourcery.com>
3419
3420 PR C/71602
3421 * c-common.c (build_va_arg): Handle more strict
3422 targetm.canonical_va_list_type. Replace first argument type error with
3423 assert.
3424
3f0177e7
MS
34252016-09-09 Martin Sebor <msebor@redhat.com>
3426
3427 PR c/77520
3428 PR c/77521
3429 * c-format.c (argument_parser::find_format_char_info): Use %qc
3430 format directive unconditionally.
3431
af63ba4b
JM
34322016-09-09 Jason Merrill <jason@redhat.com>
3433
3434 Implement C++17 new of over-aligned types.
3435 * c.opt: Add -faligned-new and -Waligned-new.
3436 * c-common.c (max_align_t_align): Split out from...
3437 (cxx_fundamental_alignment_p): ...here.
3438 * c-common.h: Declare it.
3439 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3440
c65248cb
JM
34412016-09-09 Joseph Myers <joseph@codesourcery.com>
3442
3443 * c-cppbuiltin.c (builtin_define_type_width): New function.
3444 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3445 macros.
3446
e5106e27
DM
34472016-09-07 David Malcolm <dmalcolm@redhat.com>
3448
3449 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3450 a POINTER_TYPE.
3451 (substring_loc::get_location): Move to substring-locations.c,
3452 keeping implementation as...
3453 (c_get_substring_location): New function, from the above, reworked
3454 to use accessors rather than member lookup.
3455 * c-common.h (class substring_loc): Move to substring-locations.h,
3456 replacing with a forward decl.
3457 (c_get_substring_location): New decl.
3458 * c-format.c: Include "substring-locations.h".
3459 (format_warning_va): Move to substring-locations.c.
3460 (format_warning_at_substring): Likewise.
3461
ab20d992 34622016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
3463
3464 PR c/77336
3465 * c-format.c (check_function_format): Avoid issuing warnings for
3466 functions unless they call format functions with non-constant
3467 format strings.
3468
b772a565
RB
34692016-09-06 Richard Biener <rguenther@suse.de>
3470
3471 PR c/77450
3472 * c-common.c (c_common_mark_addressable_vec): Handle
3473 COMPOUND_LITERAL_EXPR.
3474
25ff5dd3
MP
34752016-09-05 Marek Polacek <polacek@redhat.com>
3476
3477 PR c/77423
3478 * c-common.c (bool_promoted_to_int_p): New function.
3479 (expr_has_boolean_operands_p): New function.
3480 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3481 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3482
21234eb5
TV
34832016-09-04 Tom de Vries <tom@codesourcery.com>
3484
3485 revert:
3486 2016-08-29 Tom de Vries <tom@codesourcery.com>
3487
3488 * c-common.c (build_va_arg): Replace first argument type error
3489 with assert.
3490
9dc5773f
JJ
34912016-09-02 Jakub Jelinek <jakub@redhat.com>
3492
3493 PR c/65467
3494 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3495 (c_finish_omp_for): Reject _Atomic qualified iterators.
3496
34972016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3498
3499 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3500 size to guarantee it fits the output of the formatted function
3501 regardless of its arguments.
3502
295844f6
MP
35032016-09-01 Marek Polacek <polacek@redhat.com>
3504
3505 PR c/7652
3506 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3507 FALLTHRU comments.
3508
3d06b6f2
MP
35092016-08-29 Marek Polacek <polacek@redhat.com>
3510
3511 PR c/77292
3512 * c-common.c (warn_logical_not_parentheses): Don't warn for
3513 a comparison or a logical operator.
3514
34cedad5
TV
35152016-08-29 Tom de Vries <tom@codesourcery.com>
3516
3517 * c-common.c (build_va_arg): Fix type comparison assert.
3518
f162d717
TV
35192016-08-29 Tom de Vries <tom@codesourcery.com>
3520
3521 * c-common.c (build_va_arg): Replace first argument type error
3522 with assert.
3523
ba9bbd6f
TV
35242016-08-29 Tom de Vries <tom@codesourcery.com>
3525
3526 PR c/77398
3527 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3528 with error_mark_node as va_list instead of with illegal va_list.
3529
ebef225f
MP
35302016-08-25 Marek Polacek <polacek@redhat.com>
3531 David Malcolm <dmalcolm@redhat.com>
3532
3533 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3534 * c-common.h (warn_logical_not_parentheses): Update declaration.
3535
b00e6e75
MP
35362016-08-22 Marek Polacek <polacek@redhat.com>
3537
3538 PR c++/77321
3539 * c-common.c (warn_for_memset): Check type for null.
3540
6dc198e3
JM
35412016-08-22 Joseph Myers <joseph@codesourcery.com>
3542
14ec014e 3543 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3544 _FloatNx types for suffixes for built-in functions.
3545
c65699ef
JM
35462016-08-19 Joseph Myers <joseph@codesourcery.com>
3547
3548 PR c/32187
3549 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3550 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3551 (RID_FLOAT128X): New enum rid values.
3552 (CASE_RID_FLOATN_NX): New macro.
3553 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3554 keywords.
3555 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3556 corresponding complex types.
3557 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3558 _FloatNx and corresponding complex types.
3559 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3560 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3561 and _FloatNx types for the widest type for determining
3562 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3563 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3564 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3565 and _FloatNx types.
3566 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3567 constants.
3568 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3569 _FloatNx types.
3570
cc015f3a
DM
35712016-08-18 David Malcolm <dmalcolm@redhat.com>
3572
3573 * c-opts.c (c_diagnostic_finalizer): Update for change to
3574 diagnostic_show_locus.
3575
cb18fd07
DM
35762016-08-18 David Malcolm <dmalcolm@redhat.com>
3577
3578 * c-common.c: Include "spellcheck.h".
3579 (cb_get_suggestion): New function.
3580 * c-common.h (cb_get_suggestion): New decl.
3581 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3582 cb_get_suggestion.
3583
a76989dc
MP
35842016-08-18 Marek Polacek <polacek@redhat.com>
3585
3586 PR c/71514
3587 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3588 and pointer-to-VLA.
3589
65e736c0
DM
35902016-08-16 David Malcolm <dmalcolm@redhat.com>
3591
3592 PR c/72857
3593 * c-common.c (substring_loc::get_range): Rename to...
3594 (substring_loc::get_location): ...this, converting param from a
3595 source_range * to a location_t *. Call
3596 get_source_location_for_substring rather than
3597 get_source_range_for_substring, and pass in m_caret_idx.
3598 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3599 (substring_loc::get_range): Replace with...
3600 (substring_loc::get_location): ...this.
3601 (substring_loc::set_caret_index): New method.
3602 (substring_loc): Add field m_caret_idx.
3603 * c-format.c (format_warning_va): Update for above changes.
3604 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3605 clashing with type name.
3606 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3607 (check_argument_type): Likewise.
3608 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3609 Use a copy when emitting warnings, setting the caret index from TYPE.
3610
7e1dde14 36112016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3612 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3613
3614 * c-ada-spec.c (dump_number): New function.
3615 (handle_escape_character): Likewise.
3616 (print_ada_macros): Add handling of constant integers and strings.
3617
191816a3
MP
36182016-08-12 Marek Polacek <polacek@redhat.com>
3619
3620 PR c/7652
3621 * c-common.c (scalar_to_vector): Adjust fall through comment.
3622 * c-opts.c (c_common_handle_option): Likewise.
3623 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3624 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3625 fall through comment.
3626 * cilk.c (extract_free_variables): Add FALLTHRU.
3627
452df4a4
JM
36282016-08-10 Jason Merrill <jason@redhat.com>
3629
3630 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3631
f3365c12
JM
36322016-08-09 Jason Merrill <jason@redhat.com>
3633
3634 * c-common.c (c_common_attribute_table): vector_size affects type
3635 identity.
3636
f0bc3323
MP
36372016-08-09 Marek Polacek <polacek@redhat.com>
3638
3639 PR c/7652
3640 * c-ada-spec.c (dump_generic_ada_node): Add return.
3641
98e5a19a
JM
36422016-08-09 Jason Merrill <jason@redhat.com>
3643
3644 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3645 C++17 constexpr lambdas.
3646
895aa8e1
DM
36472016-08-08 David Malcolm <dmalcolm@redhat.com>
3648
3649 PR c/64955
3650 * c-common.h (selftest::c_format_c_tests): New declaration.
3651 (selftest::run_c_tests): New declaration.
3652 * c-format.c: Include "selftest.h.
3653 (format_warning_va): Add param "corrected_substring" and use
3654 it to add a replacement fix-it hint.
3655 (format_warning_at_substring): Likewise.
3656 (format_warning_at_char): Update for new param of
3657 format_warning_va.
3658 (argument_parser::check_argument_type): Pass "fki" to
3659 check_format_types.
3660 (check_format_types): Add param "fki" and pass it to
3661 format_type_warning.
3662 (deref_n_times): New function.
3663 (get_modifier_for_format_len): New function.
3664 (selftest::test_get_modifier_for_format_len): New function.
3665 (get_format_for_type): New function.
3666 (format_type_warning): Add param "fki" and use it to attempt
3667 to provide hints for argument types when calling
3668 format_warning_at_substring.
3669 (selftest::get_info): New function.
3670 (selftest::assert_format_for_type_streq): New function.
3671 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3672 (selftest::test_get_format_for_type_printf): New function.
3673 (selftest::test_get_format_for_type_scanf): New function.
3674 (selftest::c_format_c_tests): New function.
3675
e52ed3fe
DM
36762016-08-08 David Malcolm <dmalcolm@redhat.com>
3677
3678 PR c/52952
3679 * c-format.c: Include "diagnostic.h".
3680 (location_column_from_byte_offset): Delete.
3681 (location_from_offset): Delete.
3682 (format_warning_va): New function.
3683 (format_warning_at_substring): New function.
3684 (format_warning_at_char): New function.
3685 (check_format_arg): Capture location of format_tree and pass to
3686 check_format_info_main.
3687 (argument_parser): Add fields "start_of_this_format" and
3688 "format_string_cst".
3689 (flag_chars_t::validate): Add param "format_string_cst". Convert
3690 warning_at call using location_from_offset to call to
3691 format_warning_at_char.
3692 (argument_parser::argument_parser): Add param "format_string_cst_"
3693 and use use it to initialize field "format_string_cst".
3694 Initialize new field "start_of_this_format".
3695 (argument_parser::read_format_flags): Convert warning_at call
3696 using location_from_offset to a call to format_warning_at_char.
3697 (argument_parser::read_any_format_left_precision): Likewise.
3698 (argument_parser::read_any_format_precision): Likewise.
3699 (argument_parser::read_any_other_modifier): Likewise.
3700 (argument_parser::find_format_char_info): Likewise, in three places.
3701 (argument_parser::parse_any_scan_set): Likewise, in one place.
3702 (argument_parser::handle_conversions): Likewise, in two places.
3703 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3704 and use it to make a substring_loc. Pass the latter to
3705 check_format_types.
3706 (check_format_info_main): Add params "fmt_param_loc" and
3707 "format_string_cst". Convert warning_at calls using
3708 location_from_offset to calls to format_warning_at_char. Pass the
3709 new params to the arg_parser ctor. Pass "format_string_cst" to
3710 flag_chars.validate. Pass "fmt_param_loc" to
3711 arg_parser.check_argument_type.
3712 (check_format_types): Convert first param from a location_t
3713 to a const substring_loc & and rename to "fmt_loc". Attempt
3714 to extract the range of the relevant parameter and pass it
3715 to format_type_warning.
3716 (format_type_warning): Convert first param from a location_t
3717 to a const substring_loc & and rename to "fmt_loc". Add
3718 params "param_range" and "type". Replace calls to warning_at
3719 with calls to format_warning_at_substring.
3720
1c4d457e
DM
37212016-08-08 David Malcolm <dmalcolm@redhat.com>
3722
3723 * c-format.c (class flag_chars_t): New class.
3724 (struct length_modifier): New struct.
3725 (class argument_parser): New class.
3726 (flag_chars_t::flag_chars_t): New ctor.
3727 (flag_chars_t::has_char_p): New method.
3728 (flag_chars_t::add_char): New method.
3729 (flag_chars_t::validate): New method.
3730 (flag_chars_t::get_alloc_flag): New method.
3731 (flag_chars_t::assignment_suppression_p): New method.
3732 (argument_parser::argument_parser): New ctor.
3733 (argument_parser::read_any_dollar): New method.
3734 (argument_parser::read_format_flags): New method.
3735 (argument_parser::read_any_format_width): New method.
3736 (argument_parser::read_any_format_left_precision): New method.
3737 (argument_parser::read_any_format_precision): New method.
3738 (argument_parser::handle_alloc_chars): New method.
3739 (argument_parser::read_any_length_modifier): New method.
3740 (argument_parser::read_any_other_modifier): New method.
3741 (argument_parser::find_format_char_info): New method.
3742 (argument_parser::validate_flag_pairs): New method.
3743 (argument_parser::give_y2k_warnings): New method.
3744 (argument_parser::parse_any_scan_set): New method.
3745 (argument_parser::handle_conversions): New method.
3746 (argument_parser::check_argument_type): New method.
3747 (check_format_info_main): Introduce classes argument_parser
3748 and flag_chars_t, moving the code within the loop into methods
3749 of these classes. Make various locals "const".
3750
88fa5555
DM
37512016-08-05 David Malcolm <dmalcolm@redhat.com>
3752
3753 * c-common.c: Include "substring-locations.h".
3754 (get_cpp_ttype_from_string_type): New function.
3755 (g_string_concat_db): New global.
3756 (substring_loc::get_range): New method.
3757 * c-common.h (g_string_concat_db): New declaration.
3758 (class substring_loc): New class.
3759 * c-lex.c (lex_string): When concatenating strings, capture the
3760 locations of all tokens using a new obstack, and record the
3761 concatenation locations within g_string_concat_db.
3762 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3763 on the ggc-heap.
3764
78169471
MP
37652016-07-29 Marek Polacek <polacek@redhat.com>
3766
638fc14f
MP
3767 PR c/71926
3768 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3769 parentheses warning.
3770
78169471
MP
3771 PR c/71574
3772 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3773
1225d6b1
ML
37742016-07-28 Martin Liska <mliska@suse.cz>
3775
3776 PR gcov-profile/68025
3777 * c-common.c (handle_no_profile_instrument_function_attribute):
3778
ec1e2a40
BE
37792016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3780
3781 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3782 BITS_PER_UNIT_LOG.
3783
5ec2cd9f
JM
37842016-07-25 Jason Merrill <jason@redhat.com>
3785
3786 PR c++/65970
3787 * c.opt (fconstexpr-loop-limit): New.
3788
9dc5773f 37892016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3790
3791 PR c++/71675
3792 * c-common.c (resolve_overloaded_builtin): Avoid converting
3793 __atomic_compare_exchange_n return type to that of what its
3794 first argument points to.
3795
e3fe09c1
UB
37962016-07-22 Uros Bizjak <ubizjak@gmail.com>
3797
3798 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3799 ~(unsigned HOST_WIDE_INT) 0.
3800
bc91c436
ML
38012016-07-22 Martin Liska <mliska@suse.cz>
3802
3803 PR gcov-profile/69028
3804 PR gcov-profile/62047
3805 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3806 to the current_function_decl.
3807
451dcc66
JM
38082016-07-21 Jason Merrill <jason@redhat.com>
3809
3810 PR c++/65168
3811 * c-common.c (c_common_truthvalue_conversion): Check
3812 c_inhibit_evaluation_warnings for warning about address of
3813 reference.
3814
de6a69ee
DM
38152016-07-20 David Malcolm <dmalcolm@redhat.com>
3816
3817 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3818 const char *.
3819
d022c55a
JM
38202016-07-15 Jason Merrill <jason@redhat.com>
3821
3822 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3823
ddbbcb19
JJ
38242016-07-15 Jakub Jelinek <jakub@redhat.com>
3825
3826 PR c/71858
3827 * c-common.h (enum lookup_name_fuzzy_kind): Add
3828 FUZZY_LOOKUP_FUNCTION_NAME.
3829
d0cf395a
JM
38302016-07-08 Jason Merrill <jason@redhat.com>
3831
3832 P0145: Refining Expression Order for C++.
3833 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3834 * c-opts.c: Adjust.
3835
98d44e93
MT
38362016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3837
3838 PR c++/71214
3839 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3840
f9d8d994
TS
38412016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3842
3843 * c-pragma.h (enum pragma_kind): Rename
3844 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3845 users.
3846
4aa83879
RB
38472016-06-29 Richard Biener <rguenther@suse.de>
3848
3849 PR middle-end/71002
3850 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3851
a25bd9e6
JM
38522016-06-24 Jason Merrill <jason@redhat.com>
3853
3854 P0145R2: Refining Expression Order for C++.
3855 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3856 MODIFY_EXPR.
3857
a86451b9
JJ
38582016-06-24 Jakub Jelinek <jakub@redhat.com>
3859
3860 * c-common.c (check_builtin_function_arguments): Require last
3861 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3862 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3863 if the last argument is pointer to enumerated or boolean type.
3864
1a4f11c8
DM
38652016-06-22 David Malcolm <dmalcolm@redhat.com>
3866
3867 PR c/70339
3868 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3869 (lookup_name_fuzzy): New prototype.
3870
fe55692c
JDA
38712016-06-21 John David Anglin <danglin@gcc.gnu.org>
3872
3873 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3874
4eb24e01
JM
38752016-06-14 Jason Merrill <jason@redhat.com>
3876
3877 P0145R2: Refining Expression Order for C++.
3878 * c.opt (fargs-in-order): New.
3879 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3880
ef7cf206
JJ
38812016-06-13 Jakub Jelinek <jakub@redhat.com>
3882
0dda258b
JJ
3883 PR sanitizer/71498
3884 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3885 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3886
ef7cf206
JJ
3887 PR preprocessor/71183
3888 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3889 to cb_get_source_date_epoch.
3890
50b15873
JJ
38912016-06-10 Jakub Jelinek <jakub@redhat.com>
3892
3893 PR c/68657
3894 * c.opt (Wpsabi): Add Warning flag.
3895
4d926e34
MS
38962016-06-10 Martin Sebor <msebor@redhat.com>
3897
3898 PR c/71392
14ec014e 3899 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3900 the nonnull attribute in type-generic builtins.
3901
e01b4e16
MS
39022016-06-09 Martin Sebor <msebor@redhat.com>
3903
3904 PR c/70883
3905 * c-common.c (builtin_function_validate_nargs): Make text of error
3906 message consistent with others like it.
3907
44a845ca
MS
39082016-06-08 Martin Sebor <msebor@redhat.com>
3909 Jakub Jelinek <jakub@redhat.com>
3910
3911 PR c++/70507
3912 PR c/68120
3913 * c-common.c (check_builtin_function_arguments): Handle
3914 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3915
a80a7051
RB
39162016-06-08 Richard Biener <rguenther@suse.de>
3917
3918 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3919
bfd67b47
RB
39202016-06-07 Richard Biener <rguenther@suse.de>
3921
3922 PR c/61564
3923 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3924 options and warn about others.
3925
15c98b2e
ES
39262016-06-01 Eduard Sanou <dhole@openmailbox.org>
3927
3928 * c-common.c (get_source_date_epoch): Rename to
3929 cb_get_source_date_epoch.
3930 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3931 message when the parsing fails. Use error_at instead of fatal_error.
3932 * c-common.h (get_source_date_epoch): Rename to
3933 cb_get_source_date_epoch.
3934 * c-common.h (cb_get_source_date_epoch): Prototype.
3935 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
3936 * c-common.h (c_omp_region_type): Remove trailing comma.
3937 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
3938 * c-lex.c (c_lex_with_flags): Remove initialization of
3939 pfile->source_date_epoch.
3940
00631022
JJ
39412016-05-30 Jakub Jelinek <jakub@redhat.com>
3942
3943 PR c++/71349
3944 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
3945 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
3946 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
3947 instead of C_OMP_CLAUSE_SPLIT_FOR.
3948
f17a223d
RB
39492016-05-24 Richard Biener <rguenther@suse.de>
3950
3951 PR middle-end/70434
3952 PR c/69504
3953 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
3954 (convert_vector_to_array_for_subscript): ... this.
3955 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
3956 VIEW_CONVERT_EXPR to an array type. Rename to ...
3957 (convert_vector_to_array_for_subscript): ... this.
3958
4f2e1536
MP
39592016-05-12 Marek Polacek <polacek@redhat.com>
3960
3961 PR c/70756
3962 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
3963 size_in_bytes and pass LOC to it.
3964
d6e83a8d
MM
39652016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
3966
3967 PR c/43651
3968 * c.opt (Wduplicate-decl-specifier): New option.
3969
5c3a10fb
MP
39702016-05-11 Marek Polacek <polacek@redhat.com>
3971
3972 PR c++/71024
3973 * c-common.c (diagnose_mismatched_attributes): New function.
3974 * c-common.h (diagnose_mismatched_attributes): Declare.
3975
deef7113
MP
39762016-05-04 Marek Polacek <polacek@redhat.com>
3977
3978 * c.opt (Wdangling-else): New option.
3979
79ce98bc
MP
39802016-05-03 Marek Polacek <polacek@redhat.com>
3981
3982 PR c/70859
3983 * c-common.c (builtin_function_validate_nargs): Add location
3984 parameter. Use it.
3985 (check_builtin_function_arguments): Add location and arguments
3986 parameters. Use them.
3987 * c-common.h (check_builtin_function_arguments): Update declaration.
3988
381cdae4
RB
39892016-05-03 Richard Biener <rguenther@suse.de>
3990
3991 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
3992 allow call args to gimplify to SSA names.
3993
1d793c34
MP
39942016-05-03 Marek Polacek <polacek@redhat.com>
3995
3996 * c-common.h (enum c_omp_region_type): Remove stray comma.
3997
77886428
CP
39982016-05-02 Cesar Philippidis <cesar@codesourcery.com>
3999
4000 * c-common.h (enum c_omp_region_type): Define.
4001
697e0b28
RS
40022016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4003
4004 * c-common.c (shorten_compare): Use wi::to_wide.
4005
e7ff0319
CP
40062016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4007
4008 PR middle-end/70626
4009 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4010 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4011 reduction clauses in acc parallel loops.
4012
2fff3db8
MP
40132016-04-29 Marek Polacek <polacek@redhat.com>
4014
4015 PR c/70852
4016 * c-common.c (warn_for_memset): Check domain before accessing it.
4017
509063eb
DV
40182016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4019
4020 PR/69089
4021 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4022 "aligned" attribute.
4023
b632761d
JM
40242016-04-28 Jason Merrill <jason@redhat.com>
4025
4026 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4027
174f6622
ES
40282016-04-28 Eduard Sanou <dhole@openmailbox.org>
4029 Matthias Klose <doko@debian.org>
4030
4031 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4032 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4033 handling.
4034 * c-common.h (get_source_date_epoch): Prototype.
4035 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4036
6bc2bb18
RB
40372015-04-27 Ryan Burn <contact@rnburn.com>
4038
4039 PR c++/69024
4040 PR c++/68997
4041 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4042 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4043 external linkage.
4044 (cilk_detect_and_unwrap): Corresponding changes.
4045 (extract_free_variables): Don't extract free variables from
4046 AGGR_INIT_EXPR slot.
4047 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4048 (cilk_recognize_spawn): Likewise.
4049
c1e1f433
BS
40502016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4051
4052 * c.opt (Wmemset-elt-size): New option.
4053 * c-common.c (warn_for_memset): New function.
4054 * c-common.h (warn_for_memset): Declare.
4055
d067e05f
JM
40562016-04-25 Jason Merrill <jason@redhat.com>
4057
4058 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4059 No longer static.
4060 * c-common.h: Declare it.
4061 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4062
9aa36ae5
JM
40632016-04-22 Jason Merrill <jason@redhat.com>
4064
4065 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4066
477d4906
IV
40672016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4068
4069 PR c++/69363
4070 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4071 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4072
fe37c7af
MM
40732016-04-18 Michael Matz <matz@suse.de>
4074
4075 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4076 and SET_DECL_ALIGN.
4077
23f2660f
EB
40782016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4079
4080 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4081 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4082 to incomplete types.
4083 (dump_nested_type): Remove redundant tests and tidy up.
4084 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4085 a type which is the typedef of an original type.
4086
1e77281b
MP
40872016-04-15 Marek Polacek <polacek@redhat.com>
4088
4089 PR c/70651
4090 * c-common.c (build_va_arg): Change two asserts into errors and return
4091 error_mark_node.
4092
b3a77f21
MP
40932016-04-13 Marek Polacek <polacek@redhat.com>
4094
4095 PR c++/70639
4096 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4097 for switch statements, too.
4098
322b8466
JM
40992016-03-28 Jason Merrill <jason@redhat.com>
4100
4101 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4102
fbdb6baf
MP
41032016-03-23 Marek Polacek <polacek@redhat.com>
4104
4105 PR c++/69884
4106 * c.opt (Wignored-attributes): New option.
4107
5c240f4d
DM
41082016-03-22 David Malcolm <dmalcolm@redhat.com>
4109
4110 PR c/69993
4111 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4112 diagnostic text, reversing the order of the warning and note so
4113 that they appear in source order.
4114
14ba7b28
MP
41152016-03-17 Marek Polacek <polacek@redhat.com>
4116
4117 PR c/69407
4118 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4119 operations.
4120
08a1cadc
JM
41212016-03-14 Jason Merrill <jason@redhat.com>
4122
2aaeea19
JM
4123 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4124
08a1cadc
JM
4125 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4126
c06d25bb
RB
41272016-03-09 Richard Biener <rguenther@suse.de>
4128
4129 PR c/70143
4130 * c-common.c (strict_aliasing_warning): Add back
4131 alias_sets_conflict_p check.
4132
80aac5c8
JM
41332016-03-08 Jason Merrill <jason@redhat.com>
4134
4135 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4136
64b23c13
DM
41372016-03-04 David Malcolm <dmalcolm@redhat.com>
4138
4139 PR c/68187
4140 * c-indentation.c (get_visual_column): Move code to determine next
4141 tab stop to...
4142 (next_tab_stop): ...this new function.
4143 (line_contains_hash_if): Delete function.
4144 (detect_preprocessor_logic): Delete function.
4145 (get_first_nws_vis_column): New function.
4146 (detect_intervening_unindent): New function.
4147 (should_warn_for_misleading_indentation): Replace call to
4148 detect_preprocessor_logic with a call to
4149 detect_intervening_unindent.
4150
729526f5
DM
41512016-03-04 David Malcolm <dmalcolm@redhat.com>
4152
4153 PR c/68187
4154 * c-indentation.c (should_warn_for_misleading_indentation): When
4155 suppressing warnings about cases where the guard and body are on
4156 the same column, only use the first non-whitespace column in place
4157 of the guard token column when dealing with "else" clauses.
4158 When rejecting aligned BODY and NEXT, loosen the requirement
4159 from equality with the first non-whitespace of guard to simply
4160 that they not be indented relative to it.
4161
e9a35493
RB
41622016-03-04 Richard Biener <rguenther@suse.de>
4163
4164 PR c++/70054
4165 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4166 instead of alias_sets_conflict_p.
4167
1be56bc5
MP
41682016-03-01 Marek Polacek <polacek@redhat.com>
4169
4170 PR c++/69795
4171 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4172 any DECL.
4173
35886f0b
MS
41742016-02-22 Martin Sebor <msebor@redhat.com>
4175
4176 PR middle-end/69780
4177 * c-common.c (check_builtin_function_arguments): Validate and
4178 reject invalid arguments to __builtin_alloca_with_align.
4179
4246c8da
MW
41802016-02-20 Mark Wielaard <mjw@redhat.com>
4181
4182 PR c/28901
4183 * c.opt (Wunused-const-variable): Turn into Alias for...
4184 (Wunused-const-variable=): New option.
4185
268be88c
BE
41862016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4187
4188 PR c++/69865
4189 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4190 here...
4191 (c_common_init_options): ...to here.
4192 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4193
871b3f47
JJ
41942016-02-19 Jakub Jelinek <jakub@redhat.com>
4195
4196 PR c++/69826
4197 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4198 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4199 flag_preprocess_only.
4200
bf14eba2
JJ
42012016-02-16 Jakub Jelinek <jakub@redhat.com>
4202
4203 PR c/69835
4204 * c.opt (Wnonnull-compare): Enable for -Wall.
4205
ba6b3795
JJ
42062016-02-15 Jakub Jelinek <jakub@redhat.com>
4207
4208 PR c++/69797
4209 * c-common.c (sync_resolve_size): Diagnose too few arguments
4210 even when params is non-NULL empty vector.
4211
a011cd92
BS
42122016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4213
4214 PR target/60410
4215 * c.opt (fshort-double): Remove.
4216
46cb9332
MS
42172016-02-05 Martin Sebor <msebor@redhat.com>
4218
4219 PR c++/69662
4220 * c.opt (Warning options): Update -Wplacement-new to take
4221 an optional argument.
4222
e1b81f2b
JJ
42232016-02-01 Jakub Jelinek <jakub@redhat.com>
4224
4225 PR preprocessor/69543
4226 PR c/69558
4227 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4228 instead of loc to control_warning_option.
4229
b6adbb9f
NS
42302016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4231
4232 * c.opt (fopenacc-dim=): New option.
4233
5d70666e
RB
42342016-01-27 Ryan Burn <contact@rnburn.com>
4235
4236 PR cilkplus/69267
4237 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4238 gimplify_arg. Removed superfluous post_p argument.
4239 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4240 superfluous post_p argument.
4241 * c-gimplify.c (c_gimplify_expr): Likewise.
4242
01e1dea3
DM
42432016-01-26 David Malcolm <dmalcolm@redhat.com>
4244
4245 PR other/69006
4246 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4247 pp_newline_and_flush with pp_flush.
4248
9f04a53e
MS
42492016-01-20 Martin Sebor <msebor@redhat.com>
4250
4251 PR c/69405
4252 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4253 an incompatible argument when the argument isn't a valid tree node.
4254
7f26f7df
JM
42552016-01-18 Jason Merrill <jason@redhat.com>
4256
4257 PR c++/68767
4258 * c-common.c (check_function_arguments_recurse): Fold the whole
4259 COND_EXPR, not just the condition.
4260
f62bf092
TV
42612016-01-18 Tom de Vries <tom@codesourcery.com>
4262
4263 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4264 classify as loop clause.
4265
e0a575ff
JJ
42662016-01-15 Jakub Jelinek <jakub@redhat.com>
4267
4268 PR bootstrap/68271
4269 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4270 C++ FE no longer has limit on number of pragmas.
4271
42722015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4273
4274 PR c++/69048
4275 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4276 to add missing cleanup point.
b6e3db06 4277
c7df95d8
DM
42782016-01-14 David Malcolm <dmalcolm@redhat.com>
4279
4280 PR c++/68819
4281 * c-indentation.c (get_visual_column): Add location_t param.
4282 Handle the column number being zero by effectively disabling the
4283 warning, with an "inform".
4284 (should_warn_for_misleading_indentation): Add location_t argument
4285 for all uses of get_visual_column.
4286
21efdd80
PP
42872016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4288
4289 PR c++/69029
4290 * c-indentation.c (should_warn_for_misleading_indentation):
4291 Don't warn about do-while statements.
4292
7a127fa7
MS
42932016-01-07 Martin Sebor <msebor@redhat.com>
4294
4295 PR c/68966
4296 * c-common.c (sync_resolve_size): Reject first argument when it's
4297 a pointer to _Bool.
4298
c589e975
DM
42992016-01-05 David Malcolm <dmalcolm@redhat.com>
4300
4301 PR c/69122
4302 * c-indentation.c (get_visual_column): Remove default argument.
4303 (should_warn_for_misleading_indentation): For the multiline case,
4304 update call to get_visual_column for next_stmt_exploc so that it
4305 captures the location of the first non-whitespace character in the
4306 relevant line. Don't issue warnings if there is non-whitespace
4307 before the next statement.
4308
818ab71a
JJ
43092016-01-04 Jakub Jelinek <jakub@redhat.com>
4310
4311 Update copyright years.
4312
745e411d
DM
43132015-12-21 David Malcolm <dmalcolm@redhat.com>
4314
4315 * c-common.c (binary_op_error): Convert first param from
4316 location_t to rich_location * and use it when emitting an error.
4317 * c-common.h (binary_op_error): Convert first param from
4318 location_t to rich_location *.
4319
de67c4c3
DM
43202015-12-16 David Malcolm <dmalcolm@redhat.com>
4321
4322 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4323 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4324
4a38b02b
IV
43252015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4326
4327 * c-common.c (c_common_attribute_table): Handle "omp declare target
4328 link" attribute.
4329
54d62f51
JJ
43302015-12-14 Jakub Jelinek <jakub@redhat.com>
4331
4332 PR c/68833
4333 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4334
8d4227c8
TB
43352014-12-12 Tobias Burnus <burnus@net-b.de>
4336
4337 PR fortran/68815
4338 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4339 specifiers (%d, %i,%u and %c).
4340
f6069ccc
DM
43412015-12-10 David Malcolm <dmalcolm@redhat.com>
4342
4343 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4344
63bbf46d
JJ
43452015-12-08 Jakub Jelinek <jakub@redhat.com>
4346
4347 PR c/48088
4348 PR c/68657
4349 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4350 * c-pragma.c (handle_pragma_diagnostic): Adjust
4351 control_warning_option caller.
4352
f79520bb
DM
43532015-12-07 David Malcolm <dmalcolm@redhat.com>
4354
4355 * c-common.c (c_cpp_error): Update for change to
4356 rich_location::set_range.
4357
b3d5bc62
JJ
43582015-12-04 Paolo Bonzini <bonzini@gnu.org>
4359
4360 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4361 shifting 1 out of the sign bit.
4362
43632015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4364
4365 * c-common.c (c_common_attribute_table[]): Update max arguments
4366 count for "simd" attribute.
4367 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4368
6eb4a537
JJ
43692015-12-03 Jakub Jelinek <jakub@redhat.com>
4370
4371 PR preprocessor/57580
4372 * c-ppoutput.c (print): Change printed field to bool.
4373 Move src_file last for smaller padding.
4374 (init_pp_output): Set print.printed to false instead of 0.
4375 (scan_translation_unit): Fix up formatting. Set print.printed
4376 to true after printing something other than newline.
4377 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4378 (maybe_print_line_1): Set print.printed to false instead of 0.
4379 (print_line_1): Likewise.
4380 (do_line_change): Set print.printed to true instead of 1.
4381 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4382 dump_macro): Set print.printed to false after printing newline.
4383
4250754e
JM
43842015-12-02 Jason Merrill <jason@redhat.com>
4385
f479b43d
JM
4386 * c-common.c (fold_for_warn): New.
4387 (warn_logical_operator, warn_tautological_cmp)
4388 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4389
4250754e
JM
4390 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4391 (c_fully_fold_internal, decl_constant_value_for_optimization):
4392 Move to c/c-fold.c.
4393 * c-common.h: Don't declare decl_constant_value_for_optimization.
4394
e9e32ee6
JM
43952015-12-02 Joseph Myers <joseph@codesourcery.com>
4396
4397 PR c/68162
4398 * c-common.h (c_build_qualified_type): Add extra default
4399 arguments.
4400
37d5ad46
JB
44012015-12-01 Julian Brown <julian@codesourcery.com>
4402 Cesar Philippidis <cesar@codesourcery.com>
4403 James Norris <James_Norris@mentor.com>
4404
4405 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4406 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4407 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4408
f07862c7
EB
44092015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4410
4411 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4412 (decl_sloc_common): Delete and move bulk of processing to...
4413 (decl_sloc): ...here.
4414 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4415 (dump_ada_double_name): Remove S parameter and compute the suffix.
4416 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4417 element type and deal with an anonymous one.
4418 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4419 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4420 and remove reference to QUAL_UNION_TYPE.
4421 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4422 (dump_nested_type): ...here. New function extracted from above.
4423 Generate a full declaration for anonymous element type of arrays.
4424 (print_ada_declaration): Really skip anonymous declarations. Remove
4425 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4426 Clean up processing of declarations of array types and objects.
4427 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4428 Remove obsolete code and tidy up.
4429
75c8aac3
JH
44302015-11-29 Jan Hubicka <hubicka@ucw.cz>
4431
4432 PR c/67581
4433 * c-common.c (handle_transparent_union_attribute): Update
4434 also type variants.
4435
b58d3df2
ML
44362015-11-27 Martin Liska <mliska@suse.cz>
4437
4438 PR c++/68312
4439 * array-notation-common.c (cilkplus_extract_an_triplets):
4440 Release vector of vectors.
4441 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4442
89a01fcf
EB
44432015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4444
4445 PR c++/68527
4446 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4447 (print_ada_struct_decl): Likewise.
4448
cc5c5226
IZ
44492015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4450
4451 PR c++/68001
4452 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4453 * cilk.c (recognize_spawn): Determine location in a more precise
4454 way.
4455
269adb9d
JM
44562015-11-19 Jason Merrill <jason@redhat.com>
4457
4458 * c-common.c (shorten_compare): But look through macros from
4459 system headers.
4460
d0eccfcd
JM
44612015-11-18 Jason Merrill <jason@redhat.com>
4462
4463 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4464 non-constant operand comes from a macro.
4465
3e44547c
JM
44662015-11-17 Jason Merrill <jason@redhat.com>
4467
4468 PR bootstrap/68346
4469 * c-common.c (warn_tautological_cmp): Fold before checking for
4470 constants.
4471
0f62c7a0
MP
44722015-11-16 Marek Polacek <polacek@redhat.com>
4473
4474 PR c++/68362
4475 * c-common.c (check_case_bounds): Fold low and high cases.
4476
a868811e
MP
44772015-11-16 Marek Polacek <polacek@redhat.com>
4478
4479 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4480 * c-common.c (c_common_get_alias_set): Likewise.
4481 (handle_visibility_attribute): Likewise.
4482
fff77217
KY
44832015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4484
4485 * c-common.c (handle_simd_attribute): New.
4486 (struct attribute_spec): Add entry for "simd".
4487 (handle_simd_attribute): New.
4488
269e63b7
KT
44892015-11-13 Kai Tietz <ktietz70@googlemail.com>
4490
4491 * c-lex.c (interpret_float): Use fold_convert.
4492
ebedc9a3
DM
44932015-11-13 David Malcolm <dmalcolm@redhat.com>
4494
4495 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4496 and store it on the result.
4497 * c-opts.c (c_common_init_options): Set
4498 global_dc->colorize_source_p.
4499
6e232ba4
JN
45002015-11-12 James Norris <jnorris@codesourcery.com>
4501 Joseph Myers <joseph@codesourcery.com>
4502
7365279f 4503 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4504 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4505 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4506 PRAGMA_OACC_CLAUSE_LINK.
4507
e78bede6
MP
45082015-11-11 Marek Polacek <polacek@redhat.com>
4509
4510 PR c/68107
4511 PR c++/68266
4512 * c-common.c (valid_array_size_p): New function.
4513 * c-common.h (valid_array_size_p): Declare.
4514
3f8257db 45152015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4516
4517 PR bootstrap/68271
4518 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4519
69f293c9
AM
45202015-11-11 Andrew MacLeod <amacleod@redhat.com>
4521
4522 * array-notation-common.c: Remove unused header files.
4523 * c-ada-spec.c: Likewise.
4524 * c-cilkplus.c: Likewise.
4525 * c-common.c: Likewise.
4526 * c-cppbuiltin.c: Likewise.
4527 * c-dump.c: Likewise.
4528 * c-format.c: Likewise.
4529 * c-gimplify.c: Likewise.
4530 * c-indentation.c: Likewise.
4531 * c-lex.c: Likewise.
4532 * c-omp.c: Likewise.
4533 * c-opts.c: Likewise.
4534 * c-pch.c: Likewise.
4535 * c-ppoutput.c: Likewise.
4536 * c-pragma.c: Likewise.
4537 * c-pretty-print.c: Likewise.
4538 * c-semantics.c: Likewise.
4539 * c-ubsan.c: Likewise.
4540 * cilk.c: Likewise.
4541 * stub-objc.c: Likewise.
4542
3a40d81d
NS
45432015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4544 Cesar Philippidis <cesar@codesourcery.com>
4545 James Norris <jnorris@codesourcery.com>
4546 Julian Brown <julian@codesourcery.com>
4547 Nathan Sidwell <nathan@codesourcery.com>
4548
4549 * c-pragma.c (oacc_pragmas): Add "routine".
4550 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4551
ee45a32d
EB
45522015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4553
4554 * c-common.c (c_common_attributes): Add scalar_storage_order.
4555 (handle_scalar_storage_order_attribute): New function.
4556 * c-pragma.c (global_sso): New variable.
4557 (maybe_apply_pragma_scalar_storage_order): New function.
4558 (handle_pragma_scalar_storage_order): Likewise.
4559 (init_pragma): Register scalar_storage_order.
4560 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4561 * c.opt (Wscalar-storage-order): New warning.
4562 (fsso-struct=): New option.
4563
eb11eb15
MS
45642015-11-08 Martin Sebor <msebor@redhat.com>
4565
4566 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4567
0aad0198
RS
45682015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4569
4570 * c-common.c: Don't undef DEF_BUILTIN.
4571
8a645150
DM
45722015-11-06 David Malcolm <dmalcolm@redhat.com>
4573
4574 * c-common.c (c_cpp_error): Convert parameter from location_t to
4575 rich_location *. Eliminate the "column_override" parameter and
4576 the call to diagnostic_override_column.
4577 Update the "done_lexing" clause to set range 0
4578 on the rich_location, rather than overwriting a location_t.
4579 * c-common.h (c_cpp_error): Convert parameter from location_t to
4580 rich_location *. Eliminate the "column_override" parameter.
4581
7a5e4956
CP
45822015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4583 Thomas Schwinge <thomas@codesourcery.com>
4584 James Norris <jnorris@codesourcery.com>
4585
4586 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4587 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4588 clauses with parallel and kernels and loops.
4589 * c-pragma.h (enum pragma_omp_clause): Add entries for
4590 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4591 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4592 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4593 INDEPENDENT,SEQ}.
4594 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4595
e2f5cc96
MS
45962015-11-05 Martin Sebor <msebor@redhat.com>
4597
4598 PR c++/67942
4599 * c.opt (-Wplacement-new): New option.
4600
e01d41e5
JJ
46012015-11-05 Jakub Jelinek <jakub@redhat.com>
4602
4603 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4604 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4605 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4606 save_expr or create_tmp_var* if TEST is true.
4607 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4608 Don't call add_stmt here.
4609 (struct c_omp_check_loop_iv_data): New type.
4610 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4611 c_omp_check_loop_iv_exprs): New functions.
4612 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4613 distribute.
4614 (c_omp_declare_simd_clauses_to_numbers): Change
4615 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4616 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4617 from numbers to PARM_DECLs.
4618
595278be
MM
46192015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4620
4621 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4622 flag_checking.
4623
3f8257db 46242015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4625
4626 PR c++-common/67882
b3d5bc62
JJ
4627 * c-common.h (fold_offsetof_1): Add argument.
4628 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4629 offsetof expressions that reference elements past the end of
4630 an array.
4631
4bf9e5a8
TS
46322015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4633 Chung-Lin Tang <cltang@codesourcery.com>
4634
4635 * c-pragma.c (oacc_pragmas): Add "atomic".
4636 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4637
3b1661a9
ES
46382015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4639
4640 * c-common.c (handle_target_clones_attribute): New.
4641 (c_common_attribute_table): Add handle_target_clones_attribute.
4642 (handle_always_inline_attribute): Add check on target_clones attribute.
4643 (handle_target_attribute): Ditto.
4644
2adfab87
AM
46452015-10-29 Andrew MacLeod <amacleod@redhat.com>
4646
4647 * array-notation-common.c: Reorder #include's and remove duplicates.
4648 * c-ada-spec.c: Likewise.
4649 * c-cilkplus.c: Likewise.
4650 * c-common.c: Likewise.
4651 * c-cppbuiltin.c: Likewise.
4652 * c-dump.c: Likewise.
4653 * c-format.c: Likewise.
4654 * c-gimplify.c: Likewise.
4655 * c-indentation.c: Likewise.
4656 * c-lex.c: Likewise.
4657 * c-omp.c: Likewise.
4658 * c-opts.c: Likewise.
4659 * c-pch.c: Likewise.
4660 * c-ppoutput.c: Likewise.
4661 * c-pragma.c: Likewise.
4662 * c-pretty-print.c: Likewise.
4663 * c-semantics.c: Likewise.
4664 * c-ubsan.c: Likewise.
4665 * cilk.c: Likewise.
4666 * stub-objc.c: Likewise.
4667
d90ec4f2
JM
46682015-10-28 Jason Merrill <jason@redhat.com>
4669
4670 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4671
88bae6f4
TS
46722015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4673 James Norris <jnorris@codesourcery.com>
4674 Cesar Philippidis <cesar@codesourcery.com>
4675
4676 PR c/64765
4677 PR c/64880
4678 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4679 * c-omp.c (c_oacc_split_loop_clauses): New function.
4680
b1726d6c
MS
46812015-10-21 Martin Sebor <msebor@redhat.com>
4682
4683 PR driver/68043
4684 * c.opt: End each sentence that describes an option with a period.
4685
fa60eeb9
MP
46862015-10-20 Marek Polacek <polacek@redhat.com>
4687
4688 * array-notation-common.c (is_cilkplus_vector_p): Define.
4689 * c-common.h (is_cilkplus_vector_p): Declare.
4690
95979049
MP
46912015-10-20 Marek Polacek <polacek@redhat.com>
4692
4693 * c.opt (std=gnu++11): Do not describe as experimental.
4694 (std=gnu++14): Likewise.
4695
2a9fb712
JM
46962015-10-19 Jason Merrill <jason@redhat.com>
4697
4698 * c-cppbuiltin.c (c_cpp_builtins): Define
4699 __cpp_nontype_template_args.
4700
13b380a3
JM
47012015-10-19 Jason Merrill <jason@redhat.com>
4702
4703 * c-cppbuiltin.c (c_cpp_builtins): Define
4704 __cpp_enumerator_attributes, __cpp_fold_expressions,
4705 __cpp_unicode_characters.
4706
d9a6bd32
JJ
47072015-10-13 Jakub Jelinek <jakub@redhat.com>
4708 Aldy Hernandez <aldyh@redhat.com>
4709
4710 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4711 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4712 (c_define_builtins): Likewise.
4713 * c-common.h (enum c_omp_clause_split): Add
4714 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4715 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4716 (c_finish_omp_for): Add ORIG_DECLV argument.
4717 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4718 201511 instead of 201307.
4719 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4720 OMP_CRITICAL_CLAUSES to it.
4721 (c_finish_omp_ordered): Add CLAUSES argument, set
4722 OMP_ORDERED_CLAUSES to it.
4723 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4724 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4725 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4726 constructs and new OpenMP 4.5 clauses. Clear
4727 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4728 verification code.
4729 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4730 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4731 (enum pragma_omp_clause): Add
4732 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4733 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4734
624d31fe
RS
47352015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4736
4737 * c-lex.c (interpret_float): Use real_equal instead of
4738 REAL_VALUES_EQUAL.
4739
b8fd7909
JM
47402015-10-04 Jason Merrill <jason@redhat.com>
4741
4742 Implement N4514, C++ Extensions for Transactional Memory.
4743 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4744 (c_common_attribute_table): Add transaction_safe_dynamic.
4745 transaction_safe now affects type identity.
4746 (handle_tm_attribute): Handle transaction_safe_dynamic.
4747 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4748 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4749 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4750 (D_TRANSMEM): New.
4751 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4752 * c-pretty-print.c (pp_c_attributes_display): Don't print
4753 transaction_safe in C++.
4754
12651878
MP
47552015-10-02 Marek Polacek <polacek@redhat.com>
4756
4757 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4758
3e3b8d63
MP
47592015-10-02 Marek Polacek <polacek@redhat.com>
4760
4761 PR c/64249
4762 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4763 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4764 * c.opt (Wduplicated-cond): New option.
4765
0d1a8f75
JM
47662015-10-01 Joseph Myers <joseph@codesourcery.com>
4767
4768 * c.opt (std=c11): Do not describe as experimental.
4769 (std=gnu11): Likewise.
4770 (std=iso9899:2011): Likewise.
4771
3e32ee19
NS
47722015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4773
4774 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4775 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4776
974348ee
MP
47772015-09-25 Marek Polacek <polacek@redhat.com>
4778
4779 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4780 (ubsan_instrument_shift): Likewise.
4781
15dbc1a6
MP
47822015-09-25 Marek Polacek <polacek@redhat.com>
4783
4784 PR sanitizer/64906
4785 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4786
6b95d7cc
PP
47872015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4788
4789 * c-indentation.c (should_warn_for_misleading_indentation):
4790 Compare next_stmt_vis_column with guard_line_first_nws instead
4791 of with guard_line_vis_column.
4792
c1822f9c
MLI
47932015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4794
4795 PR c/49654
4796 PR c/49655
4797 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4798 options and options not valid for the current language.
4799
d5398058
PP
48002015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4801
4802 * c-indentation.c (should_warn_for_misleading_indentation):
4803 Float out and consolidate the calls to get_visual_column that
4804 are passed guard_exploc as an argument. Compare
4805 next_stmt_vis_column with guard_line_first_nws instead of with
4806 body_line_first_nws.
4807
6b333269
NS
48082015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4809
4810 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4811 Wnamespaces): New C++ warnings.
4812
a75f1574
JM
48132015-09-22 Jason Merrill <jason@redhat.com>
4814
4815 * c-common.h (abi_compat_version_crosses): New.
4816 (warn_abi_version): Declare.
4817 * c-common.c: Define it.
4818 * c-opts.c (c_common_post_options): Handle it.
4819 flag_abi_compat_version defaults to 8.
4820
bdaaa8b7
VV
48212015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4822
4823 Complete the implementation of N4230, Nested namespace definition.
4824 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4825 __cpp_nested_namespace_definitions.
4826
eaa797e8
MLI
48272015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4828
4829 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4830
c4914de6
MLI
48312015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4832
4833 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4834 when warning.
4835 * c-pragma.h (pragma_lex): Add optional loc argument.
4836
fcb87c50
MM
48372015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4838
4839 * c-format.c (check_format_arg): Adjust to use common block size in all
4840 object pools.
4841
31bdd08a
DM
48422015-09-15 David Malcolm <dmalcolm@redhat.com>
4843
4844 * c-format.c (location_from_offset): Update for change in
4845 signature of location_get_source_line.
4846 * c-indentation.c (get_visual_column): Likewise.
4847 (line_contains_hash_if): Likewise.
4848
aa9f4b4c
MP
48492015-09-14 Marek Polacek <polacek@redhat.com>
4850
4851 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4852 setting various warnings.
4853
aa256c4a
MP
48542015-09-14 Marek Polacek <polacek@redhat.com>
4855
4856 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4857 a negative value.
4858
0f876f22
MW
48592015-09-11 Mark Wielaard <mjw@redhat.com>
4860
4861 PR c/28901
4862 * c.opt (Wunused-variable): Option from common.opt.
4863 (Wunused-const-variable): New option.
4864
273aa49e
PC
48652015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4866
4867 PR c++/53184
4868 * c.opt ([Wsubobject-linkage]): Add.
4869
1807ffc1
MS
48702015-09-03 Martin Sebor <msebor@redhat.com>
4871
4872 PR c/66516
4873 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4874 functions.
4875 * c-common.c (reject_gcc_builtin): Define.
4876
38942840
BI
48772015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4878
4879 PR middle-end/60586
4880 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4881 prototype.
4882 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4883 cilk_gimplify_call_params_in_spawned_fn.
4884 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4885 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4886 unwrapping.
4887
c316b5e4
MP
48882015-08-25 Marek Polacek <polacek@redhat.com>
4889
4890 PR middle-end/67330
4891 * c-common.c (handle_weak_attribute): Don't check whether the
4892 visibility can be changed here.
4893
584a7c46
MLI
48942015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4895
4896 * c-lex.c (c_lex_with_flags): Use explicit locations.
4897
a79683d5
TS
48982015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4899
4900 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4901 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4902
61717a45
FXC
49032015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4904
4905 PR middle-end/36757
4906 * c-common.c (check_builtin_function_arguments): Add check
4907 for BUILT_IN_SIGNBIT argument.
4908
329524f5
PC
49092015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4910
4911 PR c++/67160
4912 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4913 in c++1z mode.
4914
4ee55665
MP
49152015-08-17 Marek Polacek <polacek@redhat.com>
4916
4917 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4918 with whitespaces before qualifier names.
4919
b893e375
MP
49202015-08-12 Marek Polacek <polacek@redhat.com>
4921
4922 PR c++/55095
4923 * c-common.c (maybe_warn_shift_overflow): Properly handle
4924 left-shifting 1 into the sign bit.
4925
c2d89095
MLI
49262015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4927
4928 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4929
971e17ff
AS
49302015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4931 Braden Obrzut <admin@maniacsvault.net>
4932 Jason Merrill <jason@redhat.com>
4933
4934 Add C++ Concepts TS support.
4935 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
4936 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
4937 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
4938 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
4939 * c-opts.c (set_std_cxx1z): Set flag_concepts.
4940 * c.opt (fconcepts): New.
4941
b3d5bc62
JJ
49422015-08-02 Martin Sebor <msebor@redhat.com>
4943
4944 * c.opt (-Wframe-address): New warning option.
4945
8ebca419
PP
49462015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4947
4948 * c-indentation.c (should_warn_for_misleading_indentation):
4949 Improve heuristics.
4950
1a1e101f
PP
49512015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4952
4953 * c-indentation.c (get_visual_column): Add parameter first_nws,
4954 use it. Update comment documenting the function.
4955 (is_first_nonwhitespace_on_line): Remove.
4956 (should_warn_for_misleading_indentation): Replace usage of
4957 of is_first_nonwhitespace_on_line with get_visual_column.
4958
992118a1
PP
49592015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
4960
4961 * c-indentation.h (struct token_indent_info): Define.
4962 (get_token_indent_info): Define.
4963 (warn_for_misleading_information): Declare.
4964 * c-common.h (warn_for_misleading_information): Remove.
4965 * c-identation.c (warn_for_misleading_indentation):
4966 Change declaration to take three token_indent_infos. Adjust
4967 accordingly.
4968 * c-identation.c (should_warn_for_misleading_indentation):
4969 Likewise. Bail out early if the body is a compound statement.
4970 (guard_tinfo_to_string): Define.
4971
e8fa3817
JM
49722015-07-30 Jason Merrill <jason@redhat.com>
4973
4974 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
4975 '*' for reference decay.
4976
173864e8
MP
49772015-07-30 Marek Polacek <polacek@redhat.com>
4978
4979 * c-common.c (warn_tautological_cmp): Bail for float types.
4980
f2afe6dd
MP
49812015-07-27 Marek Polacek <polacek@redhat.com>
4982
4983 PR bootstrap/67030
4984 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
4985
05b28fd6
MP
49862015-07-27 Marek Polacek <polacek@redhat.com>
4987
4988 PR c++/66555
4989 PR c/54979
4990 * c-common.c (find_array_ref_with_const_idx_r): New function.
4991 (warn_tautological_cmp): New function.
4992 * c-common.h (warn_tautological_cmp): Declare.
4993 * c.opt (Wtautological-compare): New option.
4994
5a5062b8
MP
49952015-07-23 Marek Polacek <polacek@redhat.com>
4996
4997 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
4998 (ubsan_instrument_shift): Likewise.
4999
dc891fe7
MP
50002015-07-23 Marek Polacek <polacek@redhat.com>
5001
5002 PR sanitizer/66908
5003 * c-ubsan.c: Include gimplify.h.
5004 (ubsan_instrument_division): Unshare OP0 and OP1.
5005 (ubsan_instrument_shift): Likewise.
5006
451b5e48
MP
50072015-07-20 Marek Polacek <polacek@redhat.com>
5008 Richard Sandiford <richard.sandiford@arm.com>
5009
5010 PR c++/55095
5011 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5012 Use EXPR_LOC_OR_LOC.
5013 (maybe_warn_shift_overflow): New function.
5014 * c-common.h (maybe_warn_shift_overflow): Declare.
5015 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5016 * c.opt (Wshift-overflow): New option.
5017
fb0b2914
ML
50182015-07-16 Martin Liska <mliska@suse.cz>
5019
5020 * c-format.c (static void check_format_info_main): Use
5021 object_allocator instead of pool_allocator.
5022 (check_format_arg): Likewise.
5023 (check_format_info_main): Likewise.
5024
903f5c23
AM
50252015-07-15 Andrew MacLeod <amacleod@redhat.com>
5026
5027 * c-opts.c: Remove multiline #include comment.
5028
026c3cfd
AH
50292015-07-12 Aldy Hernandez <aldyh@redhat.com>
5030
5031 * c-common.c: Fix double word typos.
5032
bb49ee66
EB
50332015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5034
5035 * c-ada-spec.h (cpp_operation): Revert latest change.
5036 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5037 constructors and destructors.
5038
1916bcb5
AM
50392015-07-09 Andrew MacLeod <amacleod@redhat.com>
5040
5041 * c-common.h: Adjust includes for flags.h changes.
5042 * stub-objc.c: Likewise.
026c3cfd 5043
a9dcd529
EB
50442015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5045
5046 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5047 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5048
b03b462f
JJ
50492015-07-08 Jakub Jelinek <jakub@redhat.com>
5050
5051 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5052 are to be removed, return NULL rather than original clauses list.
5053
c7131fb2
AM
50542015-07-07 Andrew MacLeod <amacleod@redhat.com>
5055
5056 * array-notation-common.c: Adjust includes.
5057 * c-ada-spec.c: Likewise.
5058 * c-cilkplus.c: Likewise.
5059 * c-common.h: Likewise.
5060 * c-cppbuiltin.c: Likewise.
5061 * c-dump.c: Likewise.
5062 * c-format.c: Likewise.
5063 * c-gimplify.c: Likewise.
5064 * c-indentation.c: Likewise.
5065 * c-lex.c: Likewise.
5066 * c-omp.c: Likewise.
5067 * c-opts.c: Likewise.
5068 * c-pch.c: Likewise.
5069 * c-ppoutput.c: Likewise.
5070 * c-pragma.c: Likewise.
5071 * c-pretty-print.c: Likewise.
5072 * c-semantics.c: Likewise.
5073 * c-ubsan.c: Likewise.
5074 * cilk.c: Likewise.
5075 * stub-objc.c: Likewise.
5076
2a7fb83f
EB
50772015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5078
5079 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5080 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5081
a03c9bf1
JM
50822015-07-01 Jason Merrill <jason@redhat.com>
5083
36a85135
JM
5084 * c-common.h (D_CXX11): Rename from D_CXX0X.
5085 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5086 * c-common.c: Adjust.
5087
e7fa68d5
JM
5088 * c-opts.c (c_common_post_options): Default to C++14.
5089
a03c9bf1
JM
5090 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5091
fe95b036
ESR
50922015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5093
5094 Implement N4197 - Adding u8 character literals
b3d5bc62 5095 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5096 CPP_CHAR.
b3d5bc62 5097 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5098 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5099 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5100 and CPP_UTF8CHAR tokens.
5101 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5102
da2e71c9
MLI
51032015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5104
5105 PR fortran/66605
5106 * c-common.c (do_warn_unused_parameter): Move here.
5107 * c-common.h (do_warn_unused_parameter): Declare.
5108
b155cfd9
MP
51092015-06-29 Marek Polacek <polacek@redhat.com>
5110
5111 PR c/66322
5112 * c-common.c (check_case_bounds): Add bool * parameter. Set
5113 OUTSIDE_RANGE_P.
5114 (c_add_case_label): Add bool * parameter. Pass it down to
5115 check_case_bounds.
5116 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5117 warning here.
5118 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5119 declarations.
5120
31521951
MP
51212015-06-27 Marek Polacek <polacek@redhat.com>
5122
5123 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5124 or VECTOR_INTEGER_TYPE_P throughout.
5125 * c-gimplify.c: Likewise.
5126
22d03525
MP
51272015-06-26 Marek Polacek <polacek@redhat.com>
5128
5129 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5130 * c-common.c (c_fully_fold_internal): Likewise.
5131 (c_alignof_expr): Likewise.
5132 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5133 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5134 * cilk.c (create_parm_list): Likewise.
22d03525 5135
af05e6e5
MP
51362015-06-26 Marek Polacek <polacek@redhat.com>
5137
5138 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5139
f0889939
AM
51402015-06-25 Andrew MacLeod <amacleod@redhat.com>
5141
5142 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5143 * c-gimplify.c: Likewise.
5144 * c-pragma.c: Likewise.
5145 * c-ubsan.c: Likewise.
5146 * cilk.c: Likewise.
5147
ca752f39
RS
51482015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5149
5150 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5151 ggc_hasher.
5152
16a16ec7
AM
51532015-06-25 Andrew MacLeod <amacleod@redhat.com>
5154
5155 * cilk.c: Move calls.h after tm.h in the include chain.
5156
0ae9bd27
MP
51572015-06-25 Marek Polacek <polacek@redhat.com>
5158
5159 * array-notation-common.c: Use VAR_P throughout.
5160 * c-ada-spec.c: Likewise.
5161 * c-common.c: Likewise.
5162 * c-format.c: Likewise.
5163 * c-gimplify.c: Likewise.
5164 * c-omp.c: Likewise.
5165 * c-pragma.c: Likewise.
5166 * c-pretty-print.c: Likewise.
5167 * cilk.c: Likewise.
5168
62f9079a
MP
51692015-06-25 Marek Polacek <polacek@redhat.com>
5170
5171 * cilk.c (extract_free_variables): Use is_global_var.
5172
0fa16060
RS
51732015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5174
5175 * c-common.c: Don't include target-def.h.
5176
a68ae2e1
MP
51772015-06-23 Marek Polacek <polacek@redhat.com>
5178
5179 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5180 when comparing INTEGER_CSTs.
5181
c6a2f2d9
PMR
51822015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5183
5184 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5185 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5186 (dump_ada_template): Skip partially specialized types.
5187
6b4db501
MM
51882015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5189
5190 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5191 swapping.
5192
abb226c9
AM
51932015-06-17 Andrew MacLeod <amacleod@redhat.com>
5194
5195 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5196 * c-ada-spec.c: Likewise.
5197 * c-cilkplus.c: Likewise.
5198 * c-common.c: Likewise.
5199 * c-common.h: Likewise.
5200 * c-cppbuiltin.c: Likewise.
5201 * c-dump.c: Likewise.
5202 * c-format.c: Likewise.
5203 * c-gimplify.c: Likewise.
5204 * c-indentation.c: Likewise.
5205 * c-lex.c: Likewise.
5206 * c-omp.c: Likewise.
5207 * c-opts.c: Likewise.
5208 * c-pch.c: Likewise.
5209 * c-ppoutput.c: Likewise.
5210 * c-pragma.c: Likewise.
5211 * c-pretty-print.c: Likewise.
5212 * c-semantics.c: Likewise.
5213 * c-ubsan.c: Likewise.
5214 * cilk.c: Likewise.
5215 * stub-objc.c: Likewise.
5216
076fecad
PP
52172015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5218
5219 PR c++/65168
5220 * c-common.c (c_common_truthvalue_conversion): Warn when
5221 converting an address of a reference to a truth value.
5222
13fdf2e2
AM
52232015-06-08 Andrew MacLeod <amacleod@redhat.com>
5224
5225 * array-notation-common.c : Adjust include files.
5226 * c-ada-spec.c : Likewise.
5227 * c-cilkplus.c : Likewise.
5228 * c-common.c : Likewise.
5229 * c-common.h : Likewise.
5230 * c-cppbuiltin.c : Likewise.
5231 * c-dump.c : Likewise.
5232 * c-format.c : Likewise.
5233 * c-gimplify.c : Likewise.
5234 * c-indentation.c : Likewise.
5235 * c-lex.c : Likewise.
5236 * c-omp.c : Likewise.
5237 * c-opts.c : Likewise.
5238 * c-pch.c : Likewise.
5239 * c-ppoutput.c : Likewise.
5240 * c-pragma.c : Likewise.
5241 * c-pretty-print.c : Likewise.
5242 * c-semantics.c : Likewise.
5243 * c-ubsan.c : Likewise.
5244 * cilk.c : Likewise.
5245 * stub-objc.c : Likewise.
5246
a1661b90
MP
52472015-06-08 Marek Polacek <polacek@redhat.com>
5248
5249 PR c/66415
5250 * c-format.c (location_from_offset): Return LOC if LINE is null.
5251
d7438551
AH
52522015-06-05 Aldy Hernandez <aldyh@redhat.com>
5253
5254 * c-common.h (c_parse_final_cleanups): New prototype.
5255 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5256
b3d5bc62
JJ
52572015-06-04 Sriraman Tallam <tmsriram@google.com>
5258
5259 * c-common.c (noplt): New attribute.
5260 (handle_noplt_attribute): New handler.
5261
ecb9f223
AM
52622015-06-04 Andrew MacLeod <amacleod@redhat.com>
5263
5264 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5265 * c-ada-spec.c: Likewise.
5266 * c-cilkplus.c: Likewise.
5267 * c-common.c: Likewise.
5268 * c-common.h: Likewise.
5269 * c-cppbuiltin.c: Likewise.
5270 * c-dump.c: Likewise.
5271 * c-format.c: Likewise.
5272 * c-gimplify.c: Likewise.
5273 * c-indentation.c: Likewise.
5274 * c-lex.c: Likewise.
5275 * c-omp.c: Likewise.
5276 * c-opts.c: Likewise.
5277 * c-pch.c: Likewise.
5278 * c-ppoutput.c: Likewise.
5279 * c-pragma.c: Likewise.
5280 * c-pretty-print.c: Likewise.
5281 * c-semantics.c: Likewise.
5282 * c-ubsan.c: Likewise.
5283 * cilk.c: Likewise.
5284 * stub-objc.c: Likewise.
5285
6ac48155
DM
52862015-06-02 David Malcolm <dmalcolm@redhat.com>
5287
5288 PR c/66220:
5289 * c-indentation.c (should_warn_for_misleading_indentation): Use
5290 expand_location rather than expand_location_to_spelling_point.
5291 Don't warn if the guarding statement is more indented than the
5292 next/body stmts.
5293
773ce42e
DM
52942015-06-02 David Malcolm <dmalcolm@redhat.com>
5295
5296 * c-indentation.c (warn_for_misleading_indentation): Bail out
5297 immediately if -Wmisleading-indentation isn't enabled.
5298
4fef8379
ML
52992015-06-01 Martin Liska <mliska@suse.cz>
5300
5301 * c-format.c (check_format_arg):Use new type-based pool allocator.
5302 (check_format_info_main) Likewise.
5303
1edfb384
EB
53042015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5305
5306 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5307 (has_nontrivial_methods): Likewise.
5308
9677ef52
MP
53092015-05-25 Marek Polacek <polacek@redhat.com>
5310
5311 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5312
fd5c817a
MP
53132015-05-22 Marek Polacek <polacek@redhat.com>
5314
5315 PR c/47043
5316 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5317
a2f45fe6 53182015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5319
5320 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5321 STACK_GROWS_DOWNWARD.
5322
a2f45fe6 53232015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5324
5325 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5326 STACK_GROWS_DOWNWARD rather than if it is defined.
5327
0fee2ac2 53282015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5329
0fee2ac2
MLI
5330 PR c/52952
5331 * c-format.c (location_column_from_byte_offset): New.
5332 (location_from_offset): New.
5333 (struct format_wanted_type): Add offset_loc field.
5334 (check_format_info): Move handling of location for extra arguments
5335 closer to the point of warning.
5336 (check_format_info_main): Pass the result of location_from_offset
5337 to warning_at.
5338 (format_type_warning): Pass the result of location_from_offset
5339 to warning_at.
5340
cf4ef6f7
MP
53412015-05-20 Marek Polacek <polacek@redhat.com>
5342
5343 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5344
3a65ee74
MP
53452015-05-20 Marek Polacek <polacek@redhat.com>
5346
5347 * c-ada-spec.c (dump_sloc): Use DECL_P.
5348
21b634ae
MP
53492015-05-20 Marek Polacek <polacek@redhat.com>
5350
5351 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5352 * c-common.c: Likewise.
5353
0e50b624
DM
53542015-05-19 David Malcolm <dmalcolm@redhat.com>
5355
5356 * c-common.h (fe_file_change): Strengthen param from
5357 const line_map * to const line_map_ordinary *.
5358 (pp_file_change): Likewise.
5359 * c-lex.c (fe_file_change): Likewise.
5360 (cb_define): Use linemap_check_ordinary when invoking
5361 SOURCE_LINE.
5362 (cb_undef): Likewise.
5363 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5364 invoking cb_file_change.
5365 (c_finish_options): Likewise.
5366 (push_command_line_include): Likewise.
5367 (cb_file_change): Strengthen param "new_map" from
5368 const line_map * to const line_map_ordinary *.
5369 * c-ppoutput.c (cb_define): Likewise for local "map".
5370 (pp_file_change): Likewise for param "map" and local "from".
5371
fab27f52
MM
53722015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5373
5374 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5375
2fe1d762
TV
53762015-05-18 Tom de Vries <tom@codesourcery.com>
5377
5378 * c-common.c (build_va_arg_1): New function.
5379 (build_va_arg): Add address operator to va_list operand if necessary.
5380
7a37fa90
MM
53812015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5382
5383 PR c/48956
5384 * c-common.c (int_safely_convertible_to_real_p): Define.
5385 (unsafe_conversion_p): Check conversions involving complex types.
5386 (conversion_warning): Add new warning message for conversions which
5387 discard imaginary component.
5388 * c-common.h: (enum conversion_safety): Add new enumerator for such
5389 conversions.
5390
3aa3c9fc
MP
53912015-05-14 Marek Polacek <polacek@redhat.com>
5392
5393 PR c/66066
5394 PR c/66127
5395 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5396 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5397 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5398 use it. If FOR_INT_CONST, require that all evaluated operands be
5399 INTEGER_CSTs.
5400
c3388e62
DM
54012015-05-12 David Malcolm <dmalcolm@redhat.com>
5402
5403 * c-common.h (warn_for_misleading_indentation): New prototype.
5404 * c-indentation.c: New file.
5405 * c.opt (Wmisleading-indentation): New option.
5406
c7b38fd5
TV
54072015-05-12 Tom de Vries <tom@codesourcery.com>
5408
5409 PR tree-optimization/66010
5410 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5411
381bf11e
JM
54122015-05-09 Jason Merrill <jason@redhat.com>
5413
edff0c06
JM
5414 * c-opts.c (c_common_post_options): Also clear
5415 cpp_opts->cpp_warn_cxx11_compat.
5416
129211bc
JM
5417 * c-common.h (enum cxx_dialect): Add cxx_unset.
5418 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5419 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5420
381bf11e
JM
5421 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5422 (std=gnu++0x): Mark as Undocumented.
5423 (std=gnu++1y): Add deprecated message.
5424
fe191308
JM
54252015-05-08 Jason Merrill <jason@redhat.com>
5426
765189ff
JM
5427 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5428 * c-opts.c: Adjust.
5429
fe191308
JM
5430 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5431
755e528f
MP
54322015-05-08 Marek Polacek <polacek@redhat.com>
5433
5434 PR c/64918
5435 * c.opt (Woverride-init-side-effects): New option.
5436
0173bd2a
MP
54372015-05-07 Marek Polacek <polacek@redhat.com>
5438
5439 PR c/65179
5440 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5441 negative value.
5442 * c.opt (Wshift-negative-value): New option.
5443 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5444 when -Wextra and C99/C++11 mode.
5445
e0f0d3b9
MP
54462015-05-07 Marek Polacek <polacek@redhat.com>
5447 Martin Uecker <uecker@eecs.berkeley.edu>
5448
5449 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5450 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5451
8243e2a9
JM
54522015-05-05 Jason Merrill <jason@redhat.com>
5453
5454 * c.opt (Wterminate): New.
5455
577cd070
MP
54562015-04-30 Marek Polacek <polacek@redhat.com>
5457
5458 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5459 require that the non-constant be of a boolean type.
5460
0373796b
JT
54612015-04-29 Josh Triplett <josh@joshtriplett.org>
5462
e0f0d3b9
MP
5463 * c-common.c (handle_section_attribute): Refactor to reduce
5464 nesting and distinguish between error cases.
0373796b 5465
716c0ba6
MP
54662015-04-29 Marek Polacek <polacek@redhat.com>
5467
5468 PR c/64610
5469 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5470 with 0/1.
5471
8848828b
JJ
54722015-04-29 Jakub Jelinek <jakub@redhat.com>
5473
5474 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5475 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5476 HOST_BITS_PER_WIDE_INT.
5477
ecd0e562
TV
54782015-04-28 Tom de Vries <tom@codesourcery.com>
5479
5480 PR tree-optimization/65887
5481 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5482
2a877204 54832015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5484 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5485
5486 * c-ada-spec.c (in_function): Delete.
5487 (dump_generic_ada_node): Do not change in_function and remove the
5488 redundant code dealing with it.
5489 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5490 (print_ada_methods): Output the static member functions in a nested
5491 package after the regular methods as well as associated renamings.
5492
4853031e
MP
54932015-04-24 Marek Polacek <polacek@redhat.com>
5494
5495 PR c/65830
5496 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5497 and OPT_Wshift_count_overflow.
5498
8c2b7f79
MP
5499 PR c/63357
5500 * c-common.c (warn_logical_operator): Warn if the operands have the
5501 same expressions.
5502
b8787813
MP
55032015-04-24 Marek Polacek <polacek@redhat.com>
5504
5505 PR c/61534
5506 * c-common.c (warn_logical_operator): Bail if either operand comes
5507 from a macro expansion.
5508
8fba1830
BRF
55092015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5510
5511 PR target/55143
5512 * c-common.c (c_default_pointer_mode): Add definition.
5513 * c-common.h (c_default_pointer_mode): Add declaration.
5514
17958621
JJ
55152015-03-11 Jakub Jelinek <jakub@redhat.com>
5516
5517 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5518 on record_builtin_type argument.
5519
7ccb1a11
JJ
55202015-03-10 Jakub Jelinek <jakub@redhat.com>
5521
5522 PR c/65120
5523 * c-common.c (warn_logical_not_parentheses): Don't warn for
5524 !x == 0 or !x != 0.
5525
04fd785e
MP
55262015-03-07 Marek Polacek <polacek@redhat.com>
5527
5528 PR sanitizer/65280
5529 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5530 before trying to figure out whether we have a flexible array member.
5531
a4e26206 55322015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5533 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5534
5535 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5536
0d2489f4
EB
55372015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5538
5539 PR ada/65319
5540 * c-ada-spec.c (print_destructor): Remove obsolete code.
5541
83ed54d7
EB
55422015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5543
5544 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5545 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5546 DECL_TEMPLATE_RESULT emulations.
5547 (dump_ada_template)): Add guard for TYPE_METHODS.
5548
7631f0e2
MP
55492015-02-27 Marek Polacek <polacek@redhat.com>
5550
5551 PR c/65040
5552 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5553
d1783ae5
KT
55542015-02-27 Kai Tietz <ktietz@redhat.com>
5555
5556 PR c/35330
5557 * c-pragma.c (handle_pragma_weak): Do not try to create
5558 weak/alias of declarations not being function, or variable
5559 declarations.
5560
56a9f6bc
TS
55612015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5562
5563 PR libgomp/64625
5564 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5565 Remove macros.
5566 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5567
3d5cb23d
MP
55682015-02-16 Marek Polacek <polacek@redhat.com>
5569
5570 PR c/65066
5571 * c-format.c (check_format_types): Handle null param.
5572
fa008882
MP
55732015-02-13 Marek Polacek <polacek@redhat.com>
5574
5575 PR c/65040
5576 * c-format.c (check_format_types): Don't warn about different
5577 signedness if the original value is in the range of WANTED_TYPE.
5578
785f21af
JM
55792015-02-12 Jason Merrill <jason@redhat.com>
5580
5581 PR c++/64956
5582 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5583 to the current highest version.
5584 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5585
4886ec8e
JJ
55862015-02-04 Jakub Jelinek <jakub@redhat.com>
5587
5588 PR c/64824
5589 PR c/64868
5590 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5591 instead of RDIV_EXPR. Use build_binary_op instead of
5592 build2_loc.
5593
40fecdd6
JM
55942015-01-30 Joseph Myers <joseph@codesourcery.com>
5595
5596 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5597 to pass input_location as first argument.
5598
a0c88d06
TV
55992015-01-23 Tom de Vries <tom@codesourcery.com>
5600
5601 PR libgomp/64672
5602 * c.opt (fopenacc): Mark as LTO option.
5603
1506ae0e
TV
56042015-01-23 Tom de Vries <tom@codesourcery.com>
5605
5606 PR libgomp/64707
5607 * c.opt (fopenmp): Mark as LTO option.
5608
31be63ab
JJ
56092015-01-21 Jakub Jelinek <jakub@redhat.com>
5610
5611 PR c/63307
b1726d6c 5612 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5613 (compare_decls): Fix up formatting.
5614
56152015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5616
5617 PR c/63307
5618 * cilk.c: Include vec.h.
5619 (struct cilk_decls): New structure.
5620 (wrapper_parm_cb): Split this function to...
5621 (fill_decls_vec): ...this...
5622 (create_parm_list): ...and this.
5623 (compare_decls): New function.
5624 (for_local_cb): Remove.
5625 (wrapper_local_cb): Ditto.
5626 (build_wrapper_type): For now first traverse and fill vector of
5627 declarations then sort it and then deal with sorted vector.
5628 (cilk_outline): Ditto.
5629 (declare_one_free_variable): Ditto.
5630
6875457f
JM
56312015-01-21 Jason Merrill <jason@redhat.com>
5632
5633 PR c++/64629
5634 * c-format.c (check_format_arg): Call decl_constant_value.
5635
185c9e56
ML
56362015-01-19 Martin Liska <mliska@suse.cz>
5637
5638 * c-common.c (handle_noicf_attribute): New function.
5639
41dbbb37
TS
56402015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5641 Bernd Schmidt <bernds@codesourcery.com>
5642 James Norris <jnorris@codesourcery.com>
5643 Cesar Philippidis <cesar@codesourcery.com>
5644 Ilmir Usmanov <i.usmanov@samsung.com>
5645 Jakub Jelinek <jakub@redhat.com>
5646
5647 * c.opt (fopenacc): New option.
5648 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5649 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5650 New macros.
5651 * c-common.h (c_finish_oacc_wait): New prototype.
5652 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5653 (c_finish_oacc_wait): New function.
5654 * c-pragma.c (oacc_pragmas): New variable.
5655 (c_pp_lookup_pragma, init_pragma): Handle it.
5656 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5657 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5658 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5659 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5660 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5661 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5662 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5663 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5664 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5665 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5666 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5667 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5668 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5669 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5670 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5671 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5672 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5673 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5674 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5675 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5676 PRAGMA_OACC_CLAUSE_WORKER.
5677
3f8257db 56782015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5679
5680 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5681 for the new option fstack-protector_explicit.
5682 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5683 (handle_stack_protect_attribute): New function.
5684
3f8257db 56852015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5686
5687 * c.opt: New option -Warray-bounds=.
5688
adfac8df
JJ
56892015-01-09 Michael Collison <michael.collison@linaro.org>
5690
5691 * array-notation-common.c: Include hash-set.h, machmode.h,
5692 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5693 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5694 * c-ada-spec.c: Ditto.
5695 * c-cilkplus.c: Ditto.
5696 * c-common.c: Include input.h due to flattening of tree.h.
5697 Define macro GCC_C_COMMON_C.
5698 * c-common.h: Flatten tree.h header files into c-common.h.
5699 Remove include of tree-core.h.
5700 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5701 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5702 fold-const.h, wide-int.h, and inchash.h due to
5703 flattening of tree.h.
5704 * c-dump.c: Ditto.
5705 * c-format.c: Flatten tree.h header files into c-common.h.
5706 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5707 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5708 fold-const.h, wide-int.h, and inchash.h due to
5709 flattening of tree.h.
5710 * c-dump.c: Include hash-set.h, machmode.h,
5711 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5712 fold-const.h, wide-int.h, and inchash.h due to
5713 flattening of tree.h.
5714 * c-format.c: Include hash-set.h, machmode.h,
5715 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5716 fold-const.h, wide-int.h, inchash.h and real.h due to
5717 flattening of tree.h.
5718 * c-gimplify.c: Include hash-set.h, machmode.h,
5719 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5720 fold-const.h, wide-int.h, and inchash.h due to
5721 flattening of tree.h.
5722 * cilk.c: Ditto.
5723 * c-lex.c: Ditto.
5724 * c-omp.c: Ditto.
5725 * c-opts.c: Ditto.
5726 * c-pch.c: Ditto.
5727 * c-ppoutput.c: Ditto.
5728 * c-pragma.c: Ditto.
5729 * c-pretty-print.c: Ditto.
5730 * c-semantics.c: Ditto.
5731 * c-ubsan.c: Ditto.
5732 * stub-objc.c: Ditto.
5733
f5481fc4
JM
57342015-01-08 Jason Merrill <jason@redhat.com>
5735
5736 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5737 do_ubsan_in_current_function.
5738 (ubsan_maybe_instrument_reference_or_call): Likewise.
5739 * c-ubsan.h: Declare it.
5740
de35aa66
MS
57412015-01-08 Mike Stump <mikestump@comcast.net>
5742
5743 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5744
4a9a42ab
MP
57452015-01-07 Marek Polacek <polacek@redhat.com>
5746
5747 PR c/64440
5748 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5749 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5750
2f42e5de
TS
57512015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5752
5753 PR c++/31397
5754 * c.opt (Wsuggest-override): New option.
5755
5624e564
JJ
57562015-01-05 Jakub Jelinek <jakub@redhat.com>
5757
5758 Update copyright years.
5759
5bd012f8
MP
57602015-01-05 Marek Polacek <polacek@redhat.com>
5761
5762 PR c/64423
5763 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5764 parameter. Use it.
5765 * c-common.h (warn_array_subscript_with_type_char): Update
5766 declaration.
5767
a7fa8d18
ESR
57682014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5769
5770 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5771 Control macro with flag_sized_deallocation.
5772
3f8257db 57732014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5774
5775 * c.opt (Wdiscarded-array-qualifiers): New option.
5776
1f8d3e84
JJ
57772014-12-19 Jakub Jelinek <jakub@redhat.com>
5778
5779 PR preprocessor/63831
5780 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5781 and __has_cpp_attribute here.
5782 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5783 c_common_has_attribute.
5784 * c-common.h (c_common_has_attribute): New prototype.
5785 * c-lex.c (init_c_lex): Set cb->has_attribute to
5786 c_common_has_attribute instead of cb_has_attribute.
5787 (get_token_no_padding): New function.
5788 (cb_has_attribute): Renamed to ...
5789 (c_common_has_attribute): ... this. No longer static. Use
5790 get_token_no_padding, require ()s, don't build TREE_LIST
5791 unnecessarily, fix up formatting, adjust diagnostics, call
5792 init_attributes.
5793
20b06add
JM
57942014-12-15 Jason Merrill <jason@redhat.com>
5795
5796 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5797 (-Wsized-deallocation): New.
5798 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5799 to on in C++14 and up.
5800
94a073b2
JM
58012014-12-11 Jason Merrill <jason@redhat.com>
5802
acaa5911
JM
5803 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5804
94a073b2
JM
5805 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5806 we aren't complaining about VLAs.
5807
7fb66c15
MP
58082014-12-06 Marek Polacek <polacek@redhat.com>
5809
5810 PR tree-optimization/64183
5811 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5812 shift-expression if it is integer_type_node. Use types_compatible_p.
5813
b731b390
JJ
58142014-11-29 Jakub Jelinek <jakub@redhat.com>
5815
5816 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5817 last argument from create_tmp_var_raw and create_tmp_var calls.
5818 * cilk.c (gimplify_cilk_spawn): Likewise.
5819 * c-omp.c (c_finish_omp_atomic): Likewise.
5820
6a4da643
MP
58212014-11-28 Marek Polacek <polacek@redhat.com>
5822
5823 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5824 instead of unsigned_type_node.
5825
541e35a6
MP
58262014-11-28 Marek Polacek <polacek@redhat.com>
5827
5828 PR c/63862
5829 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5830 to op1_utype.
5831 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5832 expression to unsigned_type_node.
5833
dcc97066
MW
58342014-11-20 Mark Wielaard <mjw@redhat.com>
5835
5836 PR debug/38757
5837 * c-opts.c (set_std_c89): Set lang_hooks.name.
5838 (set_std_c99): Likewise.
5839 (set_std_c11): Likewise.
5840 (set_std_cxx98): Likewise.
5841 (set_std_cxx11): Likewise.
5842 (set_std_cxx14): Likewise.
5843 (set_std_cxx1z): Likewise.
5844
aa7da51a
JJ
58452014-11-21 Jakub Jelinek <jakub@redhat.com>
5846
5847 PR target/63764
5848 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5849 return type to bool.
009a3480 5850 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5851 (convert_vector_to_pointer_for_subscript): Change return type to
5852 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5853 and copy it into a TARGET_EXPR and use that instead of *vecp
5854 directly.
5855
538dd0b7
DM
58562014-11-19 David Malcolm <dmalcolm@redhat.com>
5857
5858 Merger of git branch "gimple-classes-v2-option-3".
5859 * ChangeLog.gimple-classes: New.
5860 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5861 from being just a vec<gimple> to a vec<gbind *>.
5862
c39a5e99
JJ
58632014-11-18 Jakub Jelinek <jakub@redhat.com>
5864
5865 PR sanitizer/63813
5866 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5867 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5868 get_pointer_alignment for non-pointers. Use ptype, or if it is
5869 reference type, corresponding pointer type, as type of kind
5870 argument.
5871 (ubsan_maybe_instrument_reference,
5872 ubsan_maybe_instrument_member_call): Adjust callers.
5873
8537a4a9
MP
58742014-11-15 Marek Polacek <polacek@redhat.com>
5875
5876 PR middle-end/63884
5877 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5878 for NULL fndecl.
5879 (extract_array_notation_exprs): Return for NULL node.
5880
2079956a
JM
58812014-11-12 Joseph Myers <joseph@codesourcery.com>
5882
5883 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5884 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5885
1304953e
JJ
58862014-11-12 Jakub Jelinek <jakub@redhat.com>
5887
5888 PR c/59708
5889 * c-common.c (check_builtin_function_arguments): Handle
5890 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5891
e5e44252
AK
58922014-11-10 Andi Kleen <ak@linux.intel.com>
5893
5894 PR c/60804
5895 * c-common.h (check_no_cilk): Declare.
5896 * cilk.c (get_error_location): New function.
5897 (check_no_cilk): Dito.
5898
e64b984d
AK
58992014-11-10 Andi Kleen <ak@linux.intel.com>
5900
5901 * cilk.c (recognize_spawn): Use expression location
5902 for error message.
5903
13c21655
PC
59042014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5905
5906 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5907
42fd12b1
ESR
59082014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5909
5910 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5911 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5912 (__cpp_range_based_for, __cpp_initializer_lists,
5913 __cpp_delegating_constructors, __cpp_nsdmi,
5914 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5915 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5916 __has_cpp_attribute.
5917 * c-lex.c (cb_has_attribute): New callback CPP function;
5918 (init_c_lex): Set has_attribute callback.
5919
6f450181
RB
59202014-11-04 Richard Biener <rguenther@suse.de>
5921
5922 * c-common.c (shorten_compare): Do not shorten mixed
5923 DFP and non-DFP compares.
5924
26f0e1d6
ESR
59252014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5926
5927 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5928 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5929 Commentary and rearrangement of tests.
5930 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5931 Commentary and rearrangement of tests.
ab20d992 5932 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
5933 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5934
ef4bddc2
RS
59352014-10-29 Richard Sandiford <richard.sandiford@arm.com>
5936
5937 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
5938 enum from machine_mode.
5939
c582198b
AM
59402014-10-28 Andrew MacLeod <amacleod@redhat.com>
5941
adfac8df
JJ
5942 * c-common.c: Adjust include files.
5943 * c-gimplify.c: Ditto.
5944 * cilk.c: Ditto.
5945 * c-pragma.c: Ditto.
5946 * c-ubsan.c: Ditto.
c582198b 5947
60393bbc
AM
59482014-10-27 Andrew MacLeod <amacleod@redhat.com>
5949
5950 * c-gimplify.c: Adjust include files.
5951
d723bb7c
MLI
59522014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
5953
5954 PR c++/53061
5955 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
5956 c_common_initialize_diagnostics.
5957 * c-common.h: Likewise.
5958
90f3520e
MP
59592014-10-24 Marek Polacek <polacek@redhat.com>
5960
5961 PR c/56980
5962 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
5963 print "struct"/"union"/"enum" for typedefed names.
5964
59d7607a
MP
59652014-10-23 Marek Polacek <polacek@redhat.com>
5966
5967 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
5968 in unsigned type.
5969
d95a2703
JJ
59702014-10-22 Jakub Jelinek <jakub@redhat.com>
5971 Yury Gribov <y.gribov@samsung.com>
5972
5973 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
5974 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
5975 instead of flag_sanitize_recover as bool flag.
5976
8e6ef852
KY
59772014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
5978
5979 * cilk.c: Revert previous change.
5980
948cf550
IZ
59812014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
5982
5983 PR c/63307
5984 * cilk.c: Include vec.h.
5985 (struct cilk_decls): New structure.
5986 (wrapper_parm_cb): Split this function to...
5987 (fill_decls_vec): ...this...
5988 (create_parm_list): ...and this.
5989 (compare_decls): New function.
5990 (for_local_cb): Remove.
5991 (wrapper_local_cb): Ditto.
5992 (build_wrapper_type): For now first traverse and fill vector of
5993 declarations then sort it and then deal with sorted vector.
5994 (cilk_outline): Ditto.
5995 (declare_one_free_variable): Ditto.
5996
92574c7c
MP
59972014-10-17 Marek Polacek <polacek@redhat.com>
5998
5999 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6000 * c.opt (Wimplicit-int): Initialize to -1.
6001
83685514
AM
60022014-10-16 Andrew MacLeod <amacleod@redhat.com>
6003
6004 * c-pragma.c: Adjust include files.
6005 * c-semantics.c: Likewise.
6006
5b8300ea
DD
60072014-10-16 DJ Delorie <dj@redhat.com>
6008
6009 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6010 multiples of bytes.
6011
5f83e90b
JM
60122014-10-14 Jason Merrill <jason@redhat.com>
6013
6014 PR c++/63455
6015 * c-common.h (CPP_PREPARSED_EXPR): New.
6016 (N_CP_TTYPES): Adjust.
6017
d73326ca
MP
60182014-10-15 Marek Polacek <polacek@redhat.com>
6019
6020 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6021
78a7c317
DD
60222014-10-14 DJ Delorie <dj@redhat.com>
6023
6024 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6025 types, not just __int128.
6026 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6027 types, not just __int128.
6028 (cpp_atomic_builtins): Round pointer sizes up.
6029 (type_suffix): Use type precision, not specific types.
6030 * c-common.c (c_common_reswords): Remove __int128 special case.
6031 (c_common_type_for_size): Check for all __intN types, not just
6032 __int128.
6033 (c_common_type_for_mode): Likewise.
6034 (c_common_signed_or_unsigned_type): Likewise.
6035 (c_build_bitfield_integer_type): Likewise.
6036 (c_common_nodes_and_builtins): Likewise.
6037 (keyword_begins_type_specifier): Likewise.
6038 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6039 __intN variants.
6040
2a22f99c
TS
60412014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6042
6043 * c-common.c: Use hash_table instead of hashtab.
6044
2a8ef767
ESR
60452014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6046
adfac8df 6047 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6048 C++11 section.
6049
3c9aabbd
MG
60502014-10-03 Marc Glisse <marc.glisse@inria.fr>
6051
6052 PR c++/54427
6053 PR c++/57198
6054 PR c++/58845
6055 * c-common.c (warn_logical_operator): Punt for vectors.
6056
a15f7cb8
ESR
60572014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6058
6059 Implement SD-6: SG10 Feature Test Recommendations
6060 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6061 macros and the __has_header macro.
6062
8d0cf15e
JM
60632014-09-30 Jason Merrill <jason@redhat.com>
6064
dd5d5481
JM
6065 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6066 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6067 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6068
b752325e
JM
6069 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6070 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6071
8d0cf15e
JM
6072 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6073 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6074
083e891e
MP
60752014-09-24 Marek Polacek <polacek@redhat.com>
6076
6077 PR c/61405
6078 PR c/53874
6079 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6080
7861b648
AK
60812014-09-23 Andi Kleen <ak@linux.intel.com>
6082
6083 * c-common.c (handle_no_reorder_attribute): New function.
6084 (c_common_attribute_table): Add no_reorder attribute.
6085
9a79452d
JM
60862014-09-22 Joseph Myers <joseph@codesourcery.com>
6087
6088 * c-cppbuiltin.c (c_cpp_builtins): Define
6089 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6090 modes.
6091
dd69f047
JM
60922014-09-18 Joseph Myers <joseph@codesourcery.com>
6093
6094 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6095 for supported floating-point modes.
6096
737a4826
MLI
60972014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6098
6099 * c.opt (Wpsabi): Use LangEnabledBy.
6100 * c-opts.c (c_common_handle_option): Do not handle here.
6101
8cc4b7a2
JM
61022014-09-12 Joseph Myers <joseph@codesourcery.com>
6103
6104 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6105 macros for floating-point modes.
6106
179b5a55
MG
61072014-09-11 Marc Glisse <marc.glisse@inria.fr>
6108
6109 PR target/58757
6110 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6111 __*_DENORM_MIN__ without denormals.
6112
570a11fe
JJ
61132014-09-10 Jakub Jelinek <jakub@redhat.com>
6114
6115 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6116 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6117 ubsan_create_data callers.
6118 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6119 index is constant or BIT_AND_EXPR with constant mask and is
6120 small enough for the bound.
6121 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6122 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6123
b559c810
MLI
61242014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6125
6126 * c.opt: Add CppReason to various flags.
6127 (Wdate-time): Re-sort.
6128 * c-common.c: Include c-common.h earlier.
6129 (struct reason_option_codes_t): Delete.
6130 (c_option_controlling_cpp_error): Prefix global type and struct
6131 with cpp_.
6132
1ef33fd4
MLI
61332014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6134
6135 * c.opt (Wnormalized): New.
6136 (Wnormalized=): Use Enum and Reject Negative.
6137 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6138
66bb34c0
JM
61392014-09-08 Joseph Myers <joseph@codesourcery.com>
6140
6141 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6142 digits of floating-point modes if -fbuilding-libgcc.
6143
53d68b9f
JM
61442014-09-05 Joseph Myers <joseph@codesourcery.com>
6145
6146 * c-cppbuiltin.c (c_cpp_builtins): Also define
6147 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6148 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6149 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6150 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6151 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6152 __LIBGCC_STACK_GROWS_DOWNWARD__,
6153 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6154 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6155 __LIBGCC_DWARF_FRAME_REGISTERS__,
6156 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6157 __LIBGCC_STACK_POINTER_REGNUM__ and
6158 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6159 (builtin_define_with_value): Handle backslash-escaping in string
6160 macro values.
6161
f65586dc
RB
61622014-09-05 Richard Biener <rguenther@suse.de>
6163
6164 PR middle-end/63148
6165 * c-format.c (check_format_arg): Properly handle
6166 effectively signed POINTER_PLUS_EXPR offset.
6167
2b71f4a4
MLI
61682014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6169
6170 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6171 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6172 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6173 and Init.
6174 * c-opts.c (c_common_handle_option): Do not handle here.
6175 (sanitize_cpp_opts): Likewise.
6176 * c-common.c (struct reason_option_codes_t): Handle
6177 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6178
d2e4feca
MP
61792014-09-03 Marek Polacek <polacek@redhat.com>
6180
6181 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6182
9a771876
JJ
61832014-09-02 Jakub Jelinek <jakub@redhat.com>
6184 Balaji V. Iyer <balaji.v.iyer@intel.com>
6185 Igor Zamyatin <igor.zamyatin@intel.com>
6186
6187 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6188 * c-common.c (c_common_reswords): Added _Cilk_for.
6189 * c-common.h (enum rid): Added RID_CILK_FOR.
6190 (cilk_for_number_of_iterations): Add declaration.
6191 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6192 CILK_FOR.
6193 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6194 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6195
81b5d104
MLI
61962014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6197
6198 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6199 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6200 Wundef): Use CPP, Var and Init.
6201 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6202
b753b37b
MLI
62032014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6204
6205 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6206 * c-opts.c (c_common_handle_option): Do not handle here.
6207
028aee17
JM
62082014-08-25 Jason Merrill <jason@redhat.com>
6209
6210 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6211 -std=c++14 and -std=gnu++14, rather than the reverse.
6212 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6213 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6214 * c-common.h (cxx_dialect): Remove cxx1y.
6215
e4276ba5
ESR
62162014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6217
6218 * c-common.h (enum cxx_dialect): Add cxx14.
6219 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6220 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6221 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6222
a545cacd
JM
62232014-08-22 Jason Merrill <jason@redhat.com>
6224
6225 * c.opt (std=gnu++17): Fix alias.
6226
59ea0364
MP
62272014-08-22 Marek Polacek <polacek@redhat.com>
6228
6229 PR c++/62199
6230 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6231 check for vector types. Drop LHS argument.
6232 * c-common.h (warn_logical_not_parentheses): Adjust.
6233
596e808c
MLI
62342014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6235
6236 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6237 (Wmultichar): Likewise.
6238 (Wdate-time): Use C-family languages instead of Common. Use CPP
6239 and Var.
6240 * c-opts.c (c_common_handle_option): Do not handle the above
6241 options here.
6242 (sanitize_cpp_opts): Likewise.
6243
18767f65
MLI
62442014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6245
6246 PR fortran/44054
6247 * c-opts.c: Include tree-diagnostics.h.
6248 (c_diagnostic_finalizer): New.
6249 (c_common_initialize_diagnostics): Use it.
6250
b4413594
MLI
62512014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6252
6253 PR preprocessor/51303
6254 * c-common.c (struct reason_option_codes_t option_codes):
6255 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6256
43f9a13c
MLI
62572014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6258
6259 PR c/60975
6260 PR c/53063
6261 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6262 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6263 (c_common_post_options): Call init_global_opts_from_cpp.
6264 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6265
04159acf
MP
62662014-08-19 Marek Polacek <polacek@redhat.com>
6267
6268 PR c++/62153
6269 * c-common.c (maybe_warn_bool_compare): New function.
6270 * c-common.h (maybe_warn_bool_compare): Declare.
6271 * c.opt (Wbool-compare): New option.
6272
35aff4fb
MP
62732014-08-19 Marek Polacek <polacek@redhat.com>
6274
6275 * c.opt (Wc99-c11-compat): New option.
6276
177cce46
MP
62772014-08-19 Marek Polacek <polacek@redhat.com>
6278
6279 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6280 to warn_c90_c99_compat.
6281 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6282 to -1.
6283
6ae9194f
MLI
62842014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6285 Steven Bosscher <steven@gcc.gnu.org>
6286
6287 PR c/52952
6288 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6289 format_check_results.
6290 (check_function_format): Use true and add comment for boolean
6291 argument.
6292 (finish_dollar_format_checking): Use explicit location when warning.
6293 (check_format_info): Likewise.
6294 (check_format_arg): Set extra_arg_loc and format_string_loc.
6295 (check_format_info_main): Use explicit location when warning.
6296 (check_format_types): Pass explicit location.
6297 (format_type_warning): Likewise.
6298
8e54f6d3
MLI
62992014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6300
6301 PR fortran/44054
6302 * c-format.c: Handle Fortran flags.
6303
cd4e76fc
IZ
63042014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6305
6306 PR other/61962
6307 * array-notation-common.c (find_rank): Added handling for other
6308 types of references.
6309
f3bede71
MP
63102014-08-10 Marek Polacek <polacek@redhat.com>
6311
6312 PR c/51849
6313 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6314 * c.opt (Wc90-c99-compat): Add option.
6315
9f25a338
TS
63162014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6317
6318 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6319
62e4eb35
MP
63202014-08-03 Marek Polacek <polacek@redhat.com>
6321
ab20d992 6322 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6323 (c_add_case_label): Pass loc to check_case_value.
6324
b787e7a2
TS
63252014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6326
6327 * cilk.c: Use hash_map instead of pointer_map.
6328
6e2830c3
TS
63292014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6330
6331 * c-gimplify.c: Use hash_set instead of pointer_set.
6332
a7ee52fb
IZ
63332014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6334
6335 PR middle-end/61455
6336 * array-notation-common.c (extract_array_notation_exprs): Handling
6337 of DECL_EXPR added.
6338
944fa280
JJ
63392014-08-01 Jakub Jelinek <jakub@redhat.com>
6340
6341 * c-common.h (min_align_of_type): Removed prototype.
6342 * c-common.c (min_align_of_type): Removed.
6343 * c-ubsan.h (ubsan_maybe_instrument_reference,
6344 ubsan_maybe_instrument_member_call): New prototypes.
6345 * c-ubsan.c: Include stor-layout.h and builtins.h.
6346 (ubsan_maybe_instrument_reference_or_call,
6347 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6348 functions.
6349
b4dfdc11
MG
63502014-07-31 Marc Glisse <marc.glisse@inria.fr>
6351
6352 PR c++/60517
6353 * c.opt (-Wreturn-local-addr): Move to common.opt.
6354
a41844e5
JM
63552014-07-30 Jason Merrill <jason@redhat.com>
6356
6357 PR c++/61659
6358 PR c++/61687
6359 Revert:
6360 * c.opt (-fuse-all-virtuals): New.
6361
976d5a22
TT
63622014-07-30 Tom Tromey <tromey@redhat.com>
6363
6364 PR c/59855
6365 * c.opt (Wdesignated-init): New option.
6366 * c-common.c (c_common_attribute_table): Add "designated_init".
6367 (handle_designated_init): New function.
6368
cdc94aca
MP
63692014-07-24 Marek Polacek <polacek@redhat.com>
6370
6371 PR c/57653
6372 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6373
f41373b6
DS
63742014-07-16 Dodji Seketeli <dodji@redhat.com>
6375
6376 PR preprocessor/60723 - missing system-ness marks for macro tokens
6377 * c-ppoutput.c (struct print::prev_was_system_token): New data
6378 member.
6379 (init_pp_output): Initialize it.
6380 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6381 (do_line_change): Return a flag saying if a line marker was
6382 emitted or not.
6383 (scan_translation_unit): Detect if the system-ness of the token we
6384 are about to emit is different from the one of the previously
6385 emitted token. If so, emit a line marker. Avoid emitting useless
6386 adjacent line markers. Avoid emitting line markers for tokens
6387 originating from the expansion of built-in macros.
6388 (scan_translation_unit_directives_only): Adjust.
6389
4d661eaa
MP
63902014-07-15 Marek Polacek <polacek@redhat.com>
6391
6392 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6393 TYPE_MAX_VALUE is NULL.
6394
b108f48f
JJ
63952014-07-14 Jakub Jelinek <jakub@redhat.com>
6396
6397 PR middle-end/61294
6398 * c.opt (Wmemset-transposed-args): New warning.
6399
c0221884
JM
64002014-07-10 Jason Merrill <jason@redhat.com>
6401
6402 PR c++/61659
6403 PR c++/61687
6404 * c.opt (-fuse-all-virtuals): New.
6405
63dfbb95
RB
64062014-07-09 Richard Biener <rguenther@suse.de>
6407
6408 PR c-family/61741
6409 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6410 using unsigned arithmetic if overflow does not wrap instead of
6411 if overflow is undefined.
6412
773ec47f
MP
64132014-07-06 Marek Polacek <polacek@redhat.com>
6414
6415 PR c/6940
6416 * c.opt (Wsizeof-array-argument): New option.
6417
00a7ba58
JJ
64182014-07-03 Jakub Jelinek <jakub@redhat.com>
6419
b1726d6c 6420 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6421 comments->count <= 1, as comments->entries might be NULL.
6422
52ec0ea3
MP
64232014-07-01 Marek Polacek <polacek@redhat.com>
6424
6425 * c.opt (Wint-conversion): New option.
6426
d5c3d343
MP
64272014-07-01 Marek Polacek <polacek@redhat.com>
6428
6429 PR c/58286
6430 * c.opt (Wincompatible-pointer-types): New option.
6431
6e7ceb17
PC
64322014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6433
6434 PR c++/51400
6435 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6436 Do not discard TYPE_QUALS of type.
6437
da73100b
JM
64382014-06-26 Jason Merrill <jason@redhat.com>
6439
6440 * c-common.h (enum cxx_dialect): Add cxx1z.
6441 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6442 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6443
08eedf75
TJ
64442014-06-26 Teresa Johnson <tejohnson@google.com>
6445
6446 * c-common.h (get_dump_info): Declare.
6447 * c-gimplify.c (c_genericize): Use saved dump files.
6448 * c-opts.c (c_common_parse_file): Begin and end dumps
6449 once around parsing invocation.
6450 (get_dump_info): New function.
6451
7b56b2f8
MP
64522014-06-23 Marek Polacek <polacek@redhat.com>
6453 Andrew MacLeod <amacleod@redhat.com>
6454
6455 PR c/61553
6456 * c-common.c (get_atomic_generic_size): Don't segfault if the
6457 type doesn't have a size.
6458
0e37a2f3
MP
64592014-06-20 Marek Polacek <polacek@redhat.com>
6460
6461 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6462 (ubsan_walk_array_refs_r): New function.
6463 (c_genericize): Instrument array bounds.
6464 * c-ubsan.c: Include "internal-fn.h".
6465 (ubsan_instrument_division): Mark instrumented arrays as having
6466 side effects. Adjust ubsan_type_descriptor call.
6467 (ubsan_instrument_shift): Likewise.
6468 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6469 (ubsan_instrument_bounds): New function.
6470 (ubsan_array_ref_instrumented_p): New function.
6471 (ubsan_maybe_instrument_array_ref): New function.
6472 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6473 (ubsan_array_ref_instrumented_p): Declare.
6474 (ubsan_maybe_instrument_array_ref): Declare.
6475
64762014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6477
6478 PR lto/61123
6479 * c.opt (fshort-enums): Add to LTO.
6480 * c.opt (fshort-wchar): Likewise.
6481
5c3d09f7
MP
64822014-06-16 Marek Polacek <polacek@redhat.com>
6483
6484 PR c/60439
6485 * c.opt (Wswitch-bool): Add Var.
6486
9cf32741
JJ
64872014-06-12 Jakub Jelinek <jakub@redhat.com>
6488
6489 PR middle-end/61486
6490 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6491 #pragma omp target teams or
6492 #pragma omp {,target }teams distribute simd.
6493
62984918
JM
64942014-06-12 Jason Merrill <jason@redhat.com>
6495
6496 * c.opt (Wabi=, fabi-compat-version): New.
6497 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6498 (c_common_post_options): Handle flag_abi_compat_version default.
6499 Disallow -fabi-compat-version=1.
6500 * c-common.h (abi_version_crosses): New.
6501
f961457f
JH
65022014-06-11 Jan Hubicka <hubicka@ucw.cz>
6503
adfac8df 6504 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6505 section names that are no longer trees.
6506
92d28cbb
JJ
65072014-06-10 Jakub Jelinek <jakub@redhat.com>
6508
6509 PR fortran/60928
6510 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6511 (omp_pragmas): ... back here.
6512
742938c9
MP
65132014-06-05 Marek Polacek <polacek@redhat.com>
6514
6515 PR c/49706
6516 * c-common.c (warn_logical_not_parentheses): New function.
6517 * c-common.h (warn_logical_not_parentheses): Declare.
6518 * c.opt (Wlogical-not-parentheses): New option.
6519
9d548dfb
MP
65202014-06-04 Marek Polacek <polacek@redhat.com>
6521
6522 PR c/30020
6523 * c-common.c (check_case_bounds): Add location parameter.
6524 Use it.
6525 (c_add_case_label): Pass loc to check_case_bounds.
6526
fedfecef
MP
65272014-06-03 Marek Polacek <polacek@redhat.com>
6528
6529 PR c/60439
6530 * c.opt (Wswitch-bool): New option.
6531
f6a7cffc
TS
65322014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6533
040d18b6
TS
6534 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6535 Remove prototypes.
6536 (record_types_used_by_current_var_decl): Move prototype to where
6537 it belongs.
6538
f6a7cffc
TS
6539 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6540 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6541 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6542
632f2871
RS
65432014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6544
6545 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6546 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6547 void_zero_node.
6548 * c-pretty-print.c (pp_c_void_constant): New function.
6549 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6550 (c_pretty_printer::expression): Handle VOID_CST.
6551 * cilk.c (extract_free_variables): Likewise.
6552 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6553 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6554
766090c2
TS
65552014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6556
6557 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6558 * c-pragma.c (push_alignment): Adjust.
6559 (handle_pragma_push_options): Likewise.
6560
661a0813
MP
65612014-05-09 Marek Polacek <polacek@redhat.com>
6562
6563 PR c/50459
6564 * c-common.c (check_user_alignment): Return -1 if alignment is error
6565 node.
6566 (handle_aligned_attribute): Don't call default_conversion on
6567 FUNCTION_DECLs.
6568 (handle_vector_size_attribute): Likewise.
6569 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6570 (handle_sentinel_attribute): Call default_conversion and allow even
6571 integral types as an argument.
6572
2793eeab
MP
65732014-05-08 Marek Polacek <polacek@redhat.com>
6574
6575 PR c/61053
6576 * c-common.c (min_align_of_type): New function factored out from...
6577 (c_sizeof_or_alignof_type): ...here.
6578 * c-common.h (min_align_of_type): Declare.
6579
f827930a
MP
65802014-05-08 Marek Polacek <polacek@redhat.com>
6581
6582 PR c/61077
6583 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6584 parameter type of main.
6585
ca49b74e
DD
65862014-05-07 DJ Delorie <dj@redhat.com>
6587
6588 * c-cppbuiltin.c (print_bits_of_hex): New.
6589 (builtin_define_type_minmax): Print values using hex so as not to
6590 require a pre-computed list of string values.
6591
1d60af08
KZ
65922014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6593 Mike Stump <mikestump@comcast.net>
6594 Richard Sandiford <rdsandiford@googlemail.com>
6595
6596 * c-ada-spec.c: Include wide-int.h.
6597 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6598 (dump_generic_ada_node): Use wide-int interfaces.
6599 * c-common.c: Include wide-int-print.h.
6600 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6601 (pointer_int_sum): Use wide-int interfaces.
6602 (c_common_nodes_and_builtins): Use make_int_cst.
6603 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6604 (handle_alloc_size_attribute): Use wide-int interfaces.
6605 (get_nonnull_operand): Likewise.
6606 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6607 * c-lex.c: Include wide-int.h.
6608 (narrowest_unsigned_type): Take a widest_int rather than two
6609 HOST_WIDE_INTs.
6610 (narrowest_signed_type): Likewise.
6611 (interpret_integer): Update accordingly. Use wide-int interfaces.
6612 (lex_charconst): Use wide-int interfaces.
6613 * c-pretty-print.c: Include wide-int.h.
6614 (pp_c_integer_constant): Use wide-int interfaces.
6615 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6616 INT_CST_LT_UNSIGNED.
6617
b15458be
RB
66182014-05-06 Richard Biener <rguenther@suse.de>
6619
6620 * c-opts.c (c_common_post_options): For -freestanding,
6621 -fno-hosted and -fno-builtin disable pattern recognition
6622 if not enabled explicitely.
6623
6577374e
MP
66242014-05-02 Marek Polacek <polacek@redhat.com>
6625
6626 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6627
d00887e8
MP
66282014-05-01 Marek Polacek <polacek@redhat.com>
6629
6630 PR c/43245
6631 * c.opt (Wdiscarded-qualifiers): Add.
6632
f8ed5150
MP
66332014-04-30 Marek Polacek <polacek@redhat.com>
6634
6635 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6636 INT_MIN / -1 sanitization only for integer types.
6637
45484dcf
MP
66382014-04-25 Marek Polacek <polacek@redhat.com>
6639
6640 PR c/18079
6641 * c-common.c (handle_noinline_attribute): Warn if the attribute
6642 conflicts with always_inline attribute.
6643 (handle_always_inline_attribute): Warn if the attribute conflicts
6644 with noinline attribute.
6645
38e514c0
MP
66462014-04-25 Marek Polacek <polacek@redhat.com>
6647
6648 PR c/60156
6649 * c-common.c (check_main_parameter_types): Warn about variadic main.
6650
44875f92
MS
66512014-04-24 Mike Stump <mikestump@comcast.net>
6652
6653 * c.opt (Wshadow-ivar): Default to on.
6654
dcaaa5a0
DP
66552014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6656
6657 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6658
c07d7c02
MP
66592014-04-23 Marek Polacek <polacek@redhat.com>
6660
6661 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6662
1c33c9b7
JJ
66632014-04-22 Jakub Jelinek <jakub@redhat.com>
6664
6665 PR sanitizer/60275
6666 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6667 if flag_sanitize_undefined_trap_on_error.
6668 (ubsan_instrument_division, ubsan_instrument_shift,
6669 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6670 if !flag_sanitize_recover.
6671
793c625f
MG
66722014-04-22 Marc Glisse <marc.glisse@inria.fr>
6673
6674 PR libstdc++/43622
6675 * c-common.c (registered_builtin_types): Make non-static.
6676 * c-common.h (registered_builtin_types): Declare.
6677
b0f1bf36 66782014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 6679 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
6680
6681 PR c/60819
6682 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6683 apply may-alias the scalar pointer type when applicable.
6684
3b07fa4a
IZ
66852014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6686
6687 PR middle-end/60467
6688 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6689 as possible argument for Cilk_spawn.
6690
cbbd2b1c
TB
66912014-04-11 Tobias Burnus <burnus@net-b.de>
6692
6693 PR c/60194
6694 * c.opt (Wformat-signedness): Add
6695 * c-format.c(check_format_types): Use it.
6696
6415bd5d
JM
66972014-04-11 Jason Merrill <jason@redhat.com>
6698
6699 PR c++/57926
6700 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6701 default_conversion for an array argument.
6702
6525783a
MP
67032014-04-08 Marek Polacek <polacek@redhat.com>
6704
6705 PR sanitizer/60745
6706 * c-ubsan.c: Include asan.h.
6707 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6708
880a467b
NS
67092014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6710
6711 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6712
7b59ff2d
MP
67132014-04-02 Marek Polacek <polacek@redhat.com>
6714
6715 * c-common.h (c_expand_expr): Remove declaration.
6716
8edbfaa6
JJ
67172014-03-28 Jakub Jelinek <jakub@redhat.com>
6718
6719 PR c++/60689
6720 * c-common.c (add_atomic_size_parameter): When creating new
6721 params vector, push the size argument first.
6722
07d72e1d
JJ
67232014-03-26 Jakub Jelinek <jakub@redhat.com>
6724
6725 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6726 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6727 ubsan_create_data callers.
6728
b35e0fa0
JJ
67292014-03-22 Jakub Jelinek <jakub@redhat.com>
6730
6731 PR debug/60603
6732 * c-opts.c (c_finish_options): Restore cb_file_change call to
6733 <built-in>.
6734
39a1ebb3
JJ
67352014-03-13 Jakub Jelinek <jakub@redhat.com>
6736
6737 PR middle-end/36282
6738 * c-pragma.c (apply_pragma_weak): Only look at
6739 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6740 DECL_ASSEMBLER_NAME_SET_P (decl).
6741 (maybe_apply_pending_pragma_weaks): Exit early if
6742 vec_safe_is_empty (pending_weaks) rather than only when
6743 !pending_weaks.
6744 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6745 set assembler name back to NULL afterwards.
6746
a07f6ed2
JM
67472014-03-11 Jason Merrill <jason@redhat.com>
6748
6749 * c.opt: Add -std=gnu++14.
6750
75b107f5
IB
67512014-03-11 Ian Bolton <ian.bolton@arm.com>
6752
6753 * c-opts.c (c_common_post_options): Don't override
6754 -ffp-contract=fast if unsafe-math-optimizations is on.
6755
f42c637e
PM
67562014-03-08 Paulo Matos <paulo@matos-sorge.com>
6757
22b15758 6758 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6759
70e24808
JM
67602014-03-07 Jason Merrill <jason@redhat.com>
6761
6762 * c.opt: Add -std=c++14.
6763
3af9c5e9
MP
67642014-03-06 Marek Polacek <polacek@redhat.com>
6765
6766 PR c/60197
6767 * cilk.c (contains_cilk_spawn_stmt): New function.
6768 (contains_cilk_spawn_stmt_walker): Likewise.
6769 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6770 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6771
b3bdf019
JJ
67722014-03-03 Jakub Jelinek <jakub@redhat.com>
6773
6774 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6775 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6776 even when flag_preprocess_only.
6777
ca7e759d
JM
67782014-02-26 Jason Merrill <jason@redhat.com>
6779
6780 PR c++/59231
6781 PR c++/11586
6782 * c-common.c (shorten_compare): Don't check
6783 c_inhibit_evaluation_warnings.
6784
28e41874
JJ
67852014-02-19 Jakub Jelinek <jakub@redhat.com>
6786
cca615af
JJ
6787 PR c/37743
6788 * c-common.c (c_common_nodes_and_builtins): When initializing
6789 c_uint{16,32,64}_type_node, also set corresponding
6790 uint{16,32,64}_type_node to the same value.
6791
28e41874
JJ
6792 PR c++/60267
6793 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6794 for PRAGMA_IVDEP if flag_preprocess_only.
6795
c2bf53a1
JJ
67962014-02-12 Jakub Jelinek <jakub@redhat.com>
6797
6798 PR c/60101
6799 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6800 if false, add ADD itself, rather than vice versa.
6801 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6802 copy. For SAVE_EXPR, only call merge_tlist once.
6803
8fcbce72
JJ
68042014-02-08 Jakub Jelinek <jakub@redhat.com>
6805
6806 PR middle-end/60092
6807 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6808 and tree_to_uhwi.
6809 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6810 functions.
6811 (c_common_attribute_table): Add alloc_align and assume_aligned
6812 attributes.
6813
0a756a3f
MP
68142014-02-06 Marek Polacek <polacek@redhat.com>
6815
6816 PR c/60087
6817 * c-common.c (warn_for_sign_compare): Call warning_at with location
6818 instead of warning.
6819
7ec4847a
MP
68202014-02-05 Marek Polacek <polacek@redhat.com>
6821
6822 PR c/53123
6823 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6824 statement.
6825
66f20604
MP
68262014-02-04 Marek Polacek <polacek@redhat.com>
6827
6828 PR c/60036
6829 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6830 SAVE_EXPR.
6831
5d77fb19
MG
68322014-02-03 Marc Glisse <marc.glisse@inria.fr>
6833
6834 PR c++/53017
6835 PR c++/59211
6836 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6837 handle_vector_size_attribute, handle_nonnull_attribute): Call
6838 default_conversion on the attribute argument.
6839 (handle_nonnull_attribute): Increment the argument number.
6840
81e5eca8
MP
68412014-01-31 Marek Polacek <polacek@redhat.com>
6842
6843 PR c/59963
6844 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6845 build_function_call_vec.
6846 (resolve_overloaded_builtin): Likewise.
6847 * c-common.h (build_function_call_vec): Adjust declaration.
6848
68fca595
MP
68492014-01-30 Marek Polacek <polacek@redhat.com>
6850
6851 PR c/59940
6852 * c-common.h (unsafe_conversion_p): Adjust declaration.
6853 (warnings_for_convert_and_check): Likewise.
6854 (convert_and_check): Likewise.
6855 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6856 expansion_point_location_if_in_system_header on it.
6857 (warnings_for_convert_and_check): Add location parameter. Call
6858 expansion_point_location_if_in_system_header on it. Use it.
6859 (convert_and_check): Add location parameter. Use it.
6860 (conversion_warning): Likewise.
6861 (c_add_case_label): Adjust convert_and_check calls.
6862 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6863
b72271b9
BI
68642014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6865
6866 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6867 flag_cilkplus.
6868 * c-pragma.c (init_pragma): Likewise.
6869 * c.opt: Likewise.
6870
393e8e8b
MP
68712014-01-23 Marek Polacek <polacek@redhat.com>
6872
6873 PR c/59846
6874 * c-common.c (shorten_compare): Add location_t parameter.
6875 * c-common.h (shorten_binary_op): Adjust declaration.
6876
f04dda30
MP
68772014-01-23 Marek Polacek <polacek@redhat.com>
6878
6879 PR c/58346
6880 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6881 * c-common.h: Declare it.
6882
621955cb
EB
68832014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6884
6885 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6886 * c-ada-spec.c (dump_ads): Likewise.
6887 (cpp_check): Likewise.
6888 (dump_ada_specs): Likewise.
6889
68902014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6891
6892 PR c++/49718
6893 * c-common.c (handle_no_instrument_function_attribute): Allow
6894 no_instrument_function attribute in class member
6895 definition/declaration.
6896
241f845a
JJ
68972014-01-15 Jakub Jelinek <jakub@redhat.com>
6898
6899 PR c/58943
6900 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6901 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6902 being COMPOUND_EXPR.
6903 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6904 operand a SAVE_EXPR and second MODIFY_EXPR.
6905
e83b8e2e
JJ
69062014-01-09 Jakub Jelinek <jakub@redhat.com>
6907
6908 PR target/58115
6909 * c-pch.c (c_common_write_pch): Call
6910 prepare_target_option_nodes_for_pch.
6911
23a5b65a
RS
69122014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6913
6914 Update copyright years
6915
f9030485
RS
69162014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6917
6918 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6919 the copyright notice.
6920
f2aa696b
EB
69212013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6922
6923 * c-ada-spec.c (print_constructor): New function.
6924 (print_destructor): Retrieve the origin of the destructor.
6925 (print_ada_declaration): Revamp handling of constructors/destructors.
6926
3f8257db 69272013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6928 Bill Maddox <maddox@google.com>
6929 Jason Merrill <jason@redhat.com>
6930
6931 * c.opt: Add -fdeclone-ctor-dtor.
6932 * c-opts.c (c_common_post_options): Default to on iff -Os.
6933
41958c28
BI
69342013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6935
6936 * c-common.c (c_common_attribute_table): Added "cilk simd function"
6937 attribute.
6938 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 6939 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
6940 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
6941 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
6942 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
6943 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
6944 PRAGMA_CILK_CLAUSE_UNIFORM.
6945
b1726d6c 6946
12893402
BI
69472013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
6948
6949 * cilk.c (cilk_outline): Made this function non-static.
6950 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
6951 (create_cilk_wrapper): Added a new parameter: a function pointer.
6952 (c_install_body_w_frame_cleanup): Remove
6953 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
6954 * c-common.h (cilk_outline): New prototype.
6955 (gimplify_cilk_spawn): Removed two parameters.
6956 (cilk_install_body_with_frame_cleanup): New prototype.
6957 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
6958 CILK_SPAWN_STMT case.
6959
085b42ed
BS
69602013-12-11 Bernd Schmidt <bernds@codesourcery.com>
6961
2ce064c3
BS
6962 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
6963
085b42ed
BS
6964 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
6965 (int_array_type_node): Remove.
6966 * c-common.c (c_common_nodes_and_builtins): Don't build it.
6967
9e36c9ed
MP
69682013-12-05 Marek Polacek <polacek@redhat.com>
6969
6970 PR c/52023
6971 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
6972 [ADJUST_FIELD_ALIGN].
6973
296674db
JM
69742013-12-04 Joseph Myers <joseph@codesourcery.com>
6975
6976 PR c/52023
6977 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
6978 and check field alignment if set.
6979 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
6980 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
6981
b1726d6c 69822013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
6983 Marek Polacek <polacek@redhat.com>
6984
6985 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
6986 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
6987
d7947e19
L
69882013-11-29 H.J. Lu <hongjiu.lu@intel.com>
6989
6990 PR c/59309
6991 * cilk.c (gimplify_cilk_spawn): Properly handle function without
6992 arguments.
6993
fad7652e
JJ
69942013-11-29 Jakub Jelinek <jakub@redhat.com>
6995
6996 PR c/59280
6997 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
6998 goto invalid. If it is error_mark_node, don't issue further
6999 diagnostics.
7000
8b5e1202
SO
70012013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7002
7003 * c.opt (Wopenmp-simd): New.
7004
0a508bb6
JJ
70052013-11-22 Jakub Jelinek <jakub@redhat.com>
7006
7007 * c-ubsan.h (ubsan_instrument_return): New prototype.
7008 * c-ubsan.c (ubsan_instrument_return): New function.
7009
2fb9a547
AM
70102013-11-22 Andrew MacLeod <amacleod@redhat.com>
7011
7012 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7013 * c-gimplify.c: Likewise.
7014 * cilk.c: Likewise.
2fb9a547 7015
8400e75e
DM
70162013-11-22 David Malcolm <dmalcolm@redhat.com>
7017
7018 * c-common.c (unsafe_conversion_p): Remove use of
7019 EXPR_LOC_OR_HERE macro.
7020 (conversion_warning): Likewise.
7021 (warnings_for_convert_and_check): Likewise.
7022 (warn_for_collisions_1): Likewise.
7023 (shorten_compare): Likewise, and remove use of in_system_header
7024 macro, using the location from the former.
7025 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7026 (cb_def_pragma): Remove use of in_system_header macro.
7027 (lex_string): Likewise.
7028 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7029
eb1ce453
KZ
70302013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7031 Mike Stump <mikestump@comcast.net>
7032 Richard Sandiford <rdsandiford@googlemail.com>
7033
7034 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7035 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7036 tree_fits_shwi_p or tree_fits_uhwi_p.
7037 (dump_generic_ada_node): Likewise.
7038 * c-format.c (check_format_arg): Likewise.
7039 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7040
6b3b8c27
KZ
70412013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7042
7043 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7044
49b0aa18
JC
70452013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7046
7047 PR c/53001
7048 * c-common.c (unsafe_conversion_p): Make this function
7049 return an enumeration with more detail.
7050 (conversion_warning): Use the new return type of
7051 unsafe_conversion_p to separately warn either about conversions
7052 that lower floating point number precision or about the other
7053 kinds of conversions.
7054 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7055 (unsafe_conversion_p): switching return type to
7056 conversion_safety enumeration.
49b0aa18
JC
7057 * c.opt: Adding new warning -Wfloat-conversion and
7058 enabling it with -Wconversion.
7059
b826515a
BS
70602013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7061
8e745a17
JJ
7062 * c-opts.c: Include plugin.h.
7063 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7064
b9a55b13
MP
70652013-11-19 Marek Polacek <polacek@redhat.com>
7066
7067 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7068 call.
7069 (ubsan_instrument_shift): Likewise.
7070 (ubsan_instrument_vla): Likewise.
7071
7d362f6c
RS
70722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7073
7074 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7075 cast to unsigned type.
7076
386b1f1f
RS
70772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7078
7079 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7080 tree_low_cst.
7081 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7082 rather than tree_low_cst.
7083
ae7e9ddd
RS
70842013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7085
7086 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7087 tree_to_uhwi throughout.
7088
9439e9a1
RS
70892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7090
7091 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7092 tree_low_cst (..., 0) with tree_to_shwi throughout.
7093
cc269bb6
RS
70942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7095
7096 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7097 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7098
9541ffee
RS
70992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7100
7101 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7102 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7103
c02065fc
AH
71042013-11-15 Aldy Hernandez <aldyh@redhat.com>
7105
7106 * c-cilkplus.c: New file.
7107 * c-common.c (readonly_error): Add location argument.
7108 * c-common.h (readonly_error): Same.
7109 (c_finish_cilk_clauses): Protoize.
7110 (c_check_cilk_loop): Same.
7111 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7112 Do not fail on error_mark_node.
7113 Abstract increment canonicalization to here...
7114 (c_omp_for_incr_canonicalize_ptr): New.
7115 c-pragma.c (init_pragma): Register "simd" pragma.
7116 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7117 (enum pragma_cilk_clause): New.
7118
9cc65f15
RS
71192013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7120
7121 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7122 wchar_type and host_integerp checks.
7123
18f429e2
AM
71242013-11-14 Andrew MacLeod <amacleod@redhat.com>
7125
7126 * c-common.c: Likewise.
7127 * c-gimplify.c: Likewise.
7128 * cilk.c: Likewise.
7129
d8a2d370
DN
71302013-11-14 Diego Novillo <dnovillo@google.com>
7131
7132 * c-common.c: Include fold-const.h.
7133 Include stor-layout.h.
7134 Include calls.h.
7135 Include stringpool.h.
7136 Include attribs.h.
7137 Include varasm.h.
7138 Include trans-mem.h.
7139 * c-cppbuiltin.c: Include stor-layout.h.
7140 Include stringpool.h.
7141 * c-format.c: Include stringpool.h.
7142 * c-lex.c: Include stringpool.h.
7143 Include stor-layout.h.
7144 * c-pragma.c: Include stringpool.h.
7145 Include attribs.h.
7146 Include varasm.h.
7147 Include gcc-symtab.h.
7148 * c-pretty-print.c: Include stor-layout.h.
7149 Include attribs.h.
7150 * cilk.c: Include stringpool.h.
7151 Include calls.h.
7152
38b7bc7f
JM
71532013-11-13 Joseph Myers <joseph@codesourcery.com>
7154
7155 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7156 * c-common.c (c_common_reswords): Add __auto_type.
7157 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7158
45b0be94
AM
71592013-11-12 Andrew MacLeod <amacleod@redhat.com>
7160
18f429e2
AM
7161 * c-common.c: Include gimplify.h.
7162 * c-gimplify.c: Likewise.
7163 * cilk.c: Likewise.
7164 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7165 * c-ubsan.c: Don't include gimple.h.
45b0be94 7166
582d9b50
JM
71672013-11-12 Joseph Myers <joseph@codesourcery.com>
7168
7169 * c-common.c (c_common_reswords): Add _Thread_local.
7170
6b28e197
JM
71712013-11-09 Joseph Myers <joseph@codesourcery.com>
7172
7173 * c-common.c (atomic_size_supported_p): New function.
7174 (resolve_overloaded_atomic_exchange)
7175 (resolve_overloaded_atomic_compare_exchange)
7176 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7177 Use it instead of comparing size with a local list of sizes.
7178
267bac10
JM
71792013-11-07 Andrew MacLeod <amacleod@redhat.com>
7180 Joseph Myers <joseph@codesourcery.com>
7181
7182 * c-common.h (enum rid): Add RID_ATOMIC.
7183 * c-common.c (c_common_reswords): Add _Atomic.
7184 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7185 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7186 * c-format.c (check_format_types): Check for extra _Atomic
7187 qualifiers in format argument.
7188 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7189 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7190
5157b91e
TB
71912013-11-06 Tobias Burnus <burnus@net-b.de>
7192
7193 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7194
6dbe0958
JM
71952013-11-06 Joseph Myers <joseph@codesourcery.com>
7196
7197 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7198 standards modes.
7199 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7200 to mean lack of IEEE 754 support.
7201
e8ff5196
TB
72022013-11-05 Tobias Burnus <burnus@net-b.de>
7203
7204 * c.opt (-Wdate-time): New option
7205 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7206
254a0760
JM
72072013-11-05 Joseph Myers <joseph@codesourcery.com>
7208
7209 * c-cppbuiltin.c (cpp_iec_559_value): Test
7210 flag_excess_precision_cmdline not flag_excess_precision.
7211
6d7f7e0a
TB
72122013-11-05 Tobias Burnus <burnus@net-b.de>
7213
7214 * c.opt (fopenmp-simd): New option.
7215 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7216 (omp_pragmas): ... this new struct.
7217 (c_pp_lookup_pragma): Also walk omp_pragmas.
7218 (init_pragma): Init pragmas for -fopenmp-simd.
7219
55a7f02f
MP
72202013-11-04 Marek Polacek <polacek@redhat.com>
7221
7222 PR c++/58979
7223 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7224
9193fb05
JM
72252013-11-04 Joseph Myers <joseph@codesourcery.com>
7226
7227 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7228 New functions.
7229 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7230
94159ecf
EB
72312013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7232
7233 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7234 (dump_ada_specs): Adjust prototype of second callback.
7235 * c-ada-spec.c (cpp_check): New global variable.
7236 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7237 (print_generic_ada_decl): Likewise.
7238 (has_static_fields): Change return type to bool and add guard.
7239 (has_nontrivial_methods): New predicate.
7240 (is_tagged_type): Change return type to bool.
7241 (separate_class_package): Call has_nontrivial_methods.
7242 (pp_ada_tree_identifier): Minor tweaks.
7243 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7244 (dump_ada_array_domains): Likewise.
7245 (dump_ada_array_type): Likewise.
7246 (dump_template_types): Remove cpp_check parameter and do not pass it to
7247 dump_generic_ada_node.
7248 (dump_ada_template): Likewise.
7249 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7250 recursively.
7251 (print_ada_methods): Change return type to integer. Remove cpp_check
7252 parameter and do not pass it down.
7253 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7254 dump_generic_ada_node.
7255 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7256 accessing methods.
7257 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7258 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7259 value of print_ada_methods.
7260 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7261 Set cpp_check to it before invoking dump_ada_nodes.
7262 (dump_ada_specs): Likewise.
7263
b906f4ca
MP
72642013-11-03 Marek Polacek <polacek@redhat.com>
7265
7266 * c-ubsan.c: Don't include hash-table.h.
7267 (ubsan_instrument_vla): New function.
7268 * c-ubsan.h: Declare it.
7269
5e20cdc9
DM
72702013-10-31 David Malcolm <dmalcolm@redhat.com>
7271
7272 Automated part of renaming of symtab_node_base to symtab_node.
7273
7274 Patch autogenerated by rename_symtab.py from
7275 https://github.com/davidmalcolm/gcc-refactoring-scripts
7276 revision 58bb219cc090b2f4516a9297d868c245495ee622
7277
7278 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7279 symtab_node_base to symtab_node.
7280
7057e645
ESR
72812013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7282
8e745a17 7283 Implement C++14 digit separators.
7057e645
ESR
7284 * c-lex.c (interpret_float): Remove digit separators from scratch string
7285 before building real literal.
7286
193ea7bc
JJ
72872013-10-30 Jakub Jelinek <jakub@redhat.com>
7288
7289 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7290
939b37da
BI
72912013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7292
7293 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7294 fields.
7295 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7296 enabled.
7297 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7298 (insert_cilk_frame): New prototype.
7299 (cilk_init_builtins): Likewise.
7300 (gimplify_cilk_spawn): Likewise.
7301 (c_cilk_install_body_w_frame_cleanup): Likewise.
7302 (cilk_detect_spawn_and_unwrap): Likewise.
7303 (cilk_set_spawn_marker): Likewise.
7304 (build_cilk_sync): Likewise.
7305 (build_cilk_spawn): Likewise.
7306 * cilk.c: New file.
7307
67348ccc
DM
73082013-10-29 David Malcolm <dmalcolm@redhat.com>
7309
7310 Patch autogenerated by refactor_symtab.py from
7311 https://github.com/davidmalcolm/gcc-refactoring-scripts
7312 revision 58bb219cc090b2f4516a9297d868c245495ee622
7313
7314 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7315 to a true class hierarchy.
7316 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7317
d570872d
RS
73182013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7319
7320 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7321
98906124
JL
73222013-10-26 Jeff Law <law@redhat.com>
7323
adfac8df
JJ
7324 * c-common.c (c_define_builtins): Remove mudflap support.
7325 * c.opt: Ignore and warn for mudflap options.
98906124 7326
d73749df 73272013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7328
7329 PR other/33426
7330 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7331 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7332
3f04b1bb
JM
73332013-10-23 Jason Merrill <jason@redhat.com>
7334
7335 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7336
acf0174b
JJ
73372013-10-11 Jakub Jelinek <jakub@redhat.com>
7338
acd15a28
JJ
7339 * c-common.h (omp_clause_mask::operator !=): New method.
7340 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7341 instead of if (mask & something) tests everywhere.
7342
acf0174b
JJ
7343 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7344 201307 instead of 201107.
7345 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7346 (c_common_attribute_table): Add "omp declare target" and
7347 "omp declare simd" attributes.
7348 (handle_omp_declare_target_attribute,
7349 handle_omp_declare_simd_attribute): New functions.
7350 * c-omp.c: Include c-pragma.h.
7351 (c_finish_omp_taskgroup): New function.
7352 (c_finish_omp_atomic): Add swapped argument, if true,
7353 build the operation first with rhs, lhs arguments and use NOP_EXPR
7354 build_modify_expr.
7355 (c_finish_omp_for): Add code argument, pass it down to make_code.
7356 (c_omp_split_clauses): New function.
7357 (c_split_parallel_clauses): Removed.
7358 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7359 c_omp_declare_simd_clauses_to_decls): New functions.
7360 * c-common.h (omp_clause_mask): New type.
7361 (OMP_CLAUSE_MASK_1): Define.
7362 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7363 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7364 omp_clause_mask::operator |, omp_clause_mask::operator &,
7365 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7366 omp_clause_mask::operator ==): New methods.
7367 (enum c_omp_clause_split): New.
7368 (c_finish_omp_taskgroup): New prototype.
7369 (c_finish_omp_atomic): Add swapped argument.
7370 (c_finish_omp_for): Add code argument.
7371 (c_omp_split_clauses): New prototype.
7372 (c_split_parallel_clauses): Removed.
7373 (c_omp_declare_simd_clauses_to_numbers,
7374 c_omp_declare_simd_clauses_to_decls): New prototypes.
7375 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7376 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7377 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7378 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7379 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7380 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7381 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7382 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7383 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7384 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7385 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7386 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7387 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7388 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7389 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7390 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7391 PRAGMA_OMP_CLAUSE_UNIFORM.
7392
826cacfe
MG
73932013-10-09 Marc Glisse <marc.glisse@inria.fr>
7394
7395 PR tree-optimization/20318
7396 * c-common.c (handle_returns_nonnull_attribute): New function.
7397 (c_common_attribute_table): Add returns_nonnull.
7398
2284b034
MG
73992013-10-03 Marc Glisse <marc.glisse@inria.fr>
7400
7401 PR c++/19476
7402 * c.opt (fcheck-new): Move to common.opt.
7403
b56e9788
MP
74042013-09-25 Marek Polacek <polacek@redhat.com>
7405 Jakub Jelinek <jakub@redhat.com>
7406
7407 PR sanitizer/58413
7408 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7409 an expression if we can prove it is correct.
7410 (ubsan_instrument_division): Likewise. Remove unnecessary
7411 check.
7412
ce6923c5
MP
74132013-09-18 Marek Polacek <polacek@redhat.com>
7414
7415 PR sanitizer/58411
7416 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7417 Declare it.
7418 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7419
fb5610fb
IS
74202013-09-14 Iain Sandoe <iain@codesourcery.com>
7421
7422 PR target/48094
7423 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7424 fobjc-gc, freplace-objc-classes): Accept for LTO.
7425
88b0e79e
JC
74262013-09-13 Jacek Caban <jacek@codeweavers.com>
7427
7428 * c-target.def: New hook
7429
c9b0866a
PC
74302013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7431
7432 PR c++/43452
7433 * c.opt (Wdelete-incomplete): Add.
7434
0af94e6f
JR
74352013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7436
7437 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7438 (vector_types_compatible_elements_p): New function.
7439 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7440 declaration.
7441 (vector_types_compatible_elements_p): Declare.
7442
7c26172c
GDR
74432013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7444
7445 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7446 a virtual member function.
7447 (pp_simple_type_specifier): Remove.
7448 (pp_c_type_specifier): Likewise.
7449 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7450 Rename from pp_c_type_specifier. Adjust.
7451 (c_pretty_printer::c_pretty_printer): Do not assign to
7452 simple_type_specifier.
7453
20059c8b
GDR
74542013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7455
7456 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7457 member function.
7458 (c_pretty_printer::storage_class_specifier): Likewise.
7459 (c_pretty_printer::initializer): Likewise.
7460 (pp_declaration): Remove.
7461 (pp_declaration_specifiers): Likewise.
7462 (pp_abstract_declarator): Likewise.
7463 (pp_declarator): Likewise.
7464 (pp_type_id): Likewise.
7465 (pp_statement): Likewise.
7466 (pp_constant): Likewise.
7467 (pp_id_expression): Likewise.
7468 (pp_primary_expression): Likewise.
7469 (pp_unary_expression): Likewise.
7470 (pp_multiplicative_expression): Likewise.
7471 (pp_conditional_expression): Likewise.
7472 (pp_assignment_expression): Likewise.
7473 (pp_expression): Likewise.
7474 (pp_c_type_id): Likewise.
7475 (pp_c_storage_class_specifier): Likewise.
7476 * c-pretty-print.c (pp_c_type_cast): Tidy.
7477 (pp_c_pointer): Likewise.
7478 (pp_c_type_specifier): Likewise.
7479 (pp_c_parameter_type_list): Likewise.
7480 (pp_c_function_definition): Likewise.
7481 (pp_c_init_declarator): Likewise.
7482 (pp_c_initializer_list): Likewise.
7483 (pp_c_constructor_elts): Likewise.
7484 (c_pretty_printer::direct_abstract_declarator): Likewise.
7485 (c_pretty_printer::declaration_specifiers): Likewise.
7486 (c_pretty_printer::primary_expression): Likewise.
7487 (c_pretty_printer::postfix_expression): Likewise.
7488 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7489 (c_pretty_printer::storage_class_specifier): Rename from
7490 pp_c_storage_class_specifier.
7491 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7492 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7493 storage_class_specifier, initializer, offset_list, flags.
7494
de5a5fa1
MP
74952013-08-30 Marek Polacek <polacek@redhat.com>
7496
7497 * c-ubsan.c: New file.
7498 * c-ubsan.h: New file.
7499
8f0e4d72
GDR
75002013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7501
7502 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7503 member function.
7504 (c_pretty_printer::declaration_specifiers): Likewise.
7505 (c_pretty_printer::declarator): Likewise.
7506 (c_pretty_printer::abstract_declarator): Likewise.
7507 (c_pretty_printer::direct_abstract_declarator): Likewise.
7508 (c_pretty_printer::direct_declarator): Likewise.
7509 (c_pretty_printer::function_specifier): Likewise.
7510 (pp_declaration): Adjust.
7511 (pp_declaration_specifiers): Likewise.
7512 (pp_abstract_declarator): Likewise.
7513 (pp_direct_declarator): Likewise.
7514 (pp_function_specifier): Likewise.
7515 (pp_direct_abstract_declarator): Remove as unused.
7516 (pp_c_declaration): Remove.
7517 (pp_c_declaration_specifiers): Likewise.
7518 (pp_c_declarator): Likewise.
7519 (pp_c_direct_declarator): Likewise.
7520 (pp_c_function_specifier): Likewise.
7521 (pp_c_direct_abstract_declarator): Likewise.
7522 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7523 from pp_c_abstract_declarator. Adjust.
ab20d992 7524 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
7525 pp_c_direct_abstract_declarator. Adjust.
7526 (c_pretty_printer::function_specifier): Rename from
7527 pp_c_function_specifier. Adjust.
7528 (c_pretty_printer::declaration_specifiers): Rename from
7529 pp_c_declaration_specifiers. Adjust.
7530 (c_pretty_printer::direct_declarator): Rename from
7531 pp_c_direct_declarator. Adjust.
7532 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7533 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7534 (c_pretty_printer::c_pretty_printer): Do not assign to
7535 declaration, declaration_specifiers, declarator,
7536 direct_declarator, direct_abstract_declarator, function_specifier.
7537
00d34d3a
GDR
75382013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7539
7540 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7541 virtual member function.
7542 (c_pretty_printer::multiplicative_expression): Likewise.
7543 (c_pretty_printer::conditional_expression): Likewise.
7544 (c_pretty_printer::assignment_expression): Likewise.
7545 (c_pretty_printer::expression): Likewise.
7546 (pp_unary_expression): Adjust.
7547 (pp_multiplicative_expression): Likewise.
7548 (pp_assignment_expression): Likewise.
7549 (pp_conditional_expression): Likewise.
7550 (pp_expression): Likewise.
7551 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7552 from pp_c_unary_expression. Adjust.
7553 (c_pretty_printer::multiplicative_expression): Rename from
7554 pp_c_multiplicative_expression. Adjust.
7555 (c_pretty_printer::conditional_expression): Rename from
7556 pp_c_conditional_expression. Adjust.
7557 (c_pretty_printer::assignment_expression): Rename from
7558 pp_c_assignment_expression. Adjust.
7559 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7560 (c_pretty_printer::c_pretty_printer): Do not assign to
7561 unary_expression, multiplicative_expression,
7562 conditional_expression, expression.
7563
fb22178f
GDR
75642013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7565
7566 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7567 virtual member function.
7568 (pp_postfix_expression): Adjust.
7569 (pp_c_postfix_expression): Remove.
7570 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7571 from pp_c_postfix_expression. Adjust.
7572 (c_pretty_printer::c_pretty_printer): Do not assign to
7573 postfix_expression.
7574
7ecc2600
GDR
75752013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7576
7577 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7578 virtua member function.
7579 (pp_primary_expression): Adjust.
7580 (pp_c_primary_expression): Remove.
7581 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7582 from pp_c_primary_expression. Adjust.
7583 (pp_c_initializer_list): Use pp_primary_expression.
7584 (c_pretty_printer::c_pretty_printer): Do not assign to
7585 primary_expression.
7586
0691175f
GDR
75872013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7588
7589 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7590 * c-pretty-print.c (M_): Remove.
7591 (c_pretty_printer::translate_string): Define.
7592 (pp_c_type_specifier): Use it.
7593 (pp_c_primary_expression): Likewise.
7594 (pp_c_expression): Likewise.
7595
66dfe4c4
GDR
75962013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7597
7598 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7599 virtual function.
7600 (pp_c_id_expression): Remove.
7601 (pp_id_expression): Adjust.
7602 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7603 pp_c_id_expression. Adjust.
7604 (pp_c_postfix_expression): Use pp_id_expression.
7605 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7606
ca43e9d5
GDR
76072013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7608
7609 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7610 member function.
7611 (pp_constant): Adjust.
7612 (pp_c_constant): Remove.
7613 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7614 pp_c_constant. Adjust.
7615 (pp_c_constant)
7616 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7617 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7618
da6ca2b5
GDR
76192013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7620
7621 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7622 (c_pretty_printer::c_pretty_printer): Declare.
7623 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7624 c_pretty_printer_init. Adjust.
7625 (print_c_tree): Do not call c_pretty_printer_init.
7626 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7627
65a372f4
AC
76282013-08-09 Arnaud Charlet <charlet@adacore.com>
7629
7630 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7631
fd9b0f32
PC
76322013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7633
7634 PR c++/58080
7635 * c-common.c (pointer_int_sum): Add bool parameter.
7636 * c-common.h (pointer_int_sum): Adjust declaration.
7637
e0aec1e9
GDR
76382013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7639
7640 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7641 c_pretty_printer variable.
7642
b066401f
GDR
76432013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7644
7645 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7646 (pp_base): Remove.
7647 (pp_c_base): Likewise. Adjust users.
7648 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7649 (pp_c_whitespace): Do not call pp_base.
7650 (pp_c_left_paren): Likewise.
7651 (pp_c_right_paren): Likewise.
7652 (pp_c_left_brace): Likewise.
7653 (pp_c_right_brace): Likewise.
7654 (pp_c_left_bracket): Likewise.
7655 (pp_c_right_bracket): Likewise.
7656 (pp_c_dot): Likewise.
7657 (pp_c_ampersand): Likewise.
7658 (pp_c_star): Likewise.
7659 (pp_c_arrow): Likewise.
7660 (pp_c_semicolon): Likewise.
7661 (pp_c_complement): Likewise.
7662 (pp_c_exclamation): Likewise.
7663 (pp_c_direct_declarator): Likewise.
7664 (pp_c_ws_string): Likewise.
7665 (pp_c_identifier): Likewise.
7666 (pp_c_statement): Likewise.
7667 (print_c_tree): Likewise.
7668
65e5a578
ESR
76692013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7670
7671 PR c++/58072
7672 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7673 provide useful error strings.
7674
137a1a27
GDR
76752013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7676
7677 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7678 printer functions instead of pp_string or operators and punctuators.
7679 (dump_generic_ada_node): Likewise.
7680 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7681 (pp_c_relational_expression): Likewise.
7682 (pp_c_logical_or_expression): Likewise.
7683
07838b13
GDR
76842013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7685
7686 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7687 functions instead of pp_character.
7688 (pp_ada_tree_identifier): Likewise.
7689 (dump_ada_double_name): Likewise.
7690 (dump_ada_function_declaration): Likewise.
7691 (dump_ada_array_domains): Likewise.
7692 (dump_template_types): Likewise.
7693 (dump_generic_ada_node): Likewise.
7694 (print_ada_declaration): Likewise.
7695 (print_ada_struct_decl): Likewise.
7696 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7697
433cc7b0
TT
76982013-07-23 Tom Tromey <tromey@redhat.com>
7699
7700 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7701 * c-common.c (c_common_reswords): Add _Generic.
7702
688010ba
OB
77032013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7704
7705 * c-common.c: Fix typos.
7706 * c-common.h: Likewise.
7707
2a99e5e6
LL
77082013-07-13 Lubos Lunak <l.lunak@suse.cz>
7709
7710 PR c++/55203
7711 * c-common.c (c_common_attribute_table): Add warn_unused.
7712 (handle_warn_unused_attribute): New.
7713
c26302d5
JJ
77142013-07-10 Jakub Jelinek <jakub@redhat.com>
7715
7716 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7717 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7718
dfeadaa0
PC
77192013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7720
7721 PR c++/57869
7722 * c.opt: Add Wconditionally-supported.
7723
6a2fa4b2
GS
77242013-07-08 Graham Stott <graham.stott@btinternet.com>
7725
adfac8df 7726 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7727 unused variables l_length and l_node.
7728
ecdbd01a 77292013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7730
7731 PR c/57821
7732 * c-common.c (complete_array_type): Delay folding first index
7733 like other indices. When folding, check for index overflow.
7734
bedc293e
MG
77352013-06-27 Marc Glisse <marc.glisse@inria.fr>
7736
7737 PR c++/57509
7738 * c-common.h (c_build_vec_perm_expr): New complain argument.
7739 * c-common.c (c_build_vec_perm_expr): Likewise.
7740 Use save_expr also in C++.
7741
604b2bfc
GDR
77422013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7743
7744 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7745 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7746 * c-opts.c (c_common_post_options): Likewise.
7747
dfeadaa0 77482013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7749
7750 * array-notation-common.c (length_mismatch_in_expr): Changed the
7751 parameter type's from a dynamic array to a vec_tree. Also removed
7752 the size parameters.
7753 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7754 the change above.
7755
2ce86d2e
BI
77562013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7757
7758 * c-common.h (struct cilkplus_an_parts): New structure.
7759 (struct cilkplus_an_loop_parts): Likewise.
7760 (cilkplus_extract_an_triplets): New prototype.
7761 (fix_sec_implicit_args): Likewise.
7762 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7763 (fix_sec_implicit_args): Likewise.
604b2bfc 7764
07a6825b
BI
77652013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7766
7767 * array-notation-common.c (find_inv_trees): Removed an unwanted
7768 typecasting.
7769 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7770 enum rid to enum tree_code.
7771
08346abd
JH
77722013-06-11 Jan Hubicka <jh@suse.cz>
7773
7774 * c-common.c (handle_alias_ifunc_attribute): Do not set
7775 DECL_EXTERNAL for weakref variables.
7776 * c-pragma.c (handle_pragma_weak): Make sure aliases
7777 are not declared as external.
7778
d60f1706
BI
77792013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7780
7781 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7782 function from c/c-array-notation.c.
7783 (is_cilkplus_reduce_builtin): Likewise.
7784 (find_rank): Likewise.
7785 (extract_array_notation_exprs): Likewise.
7786 (replace_array_notations): Likewise.
7787 (find_inv_trees): Likewise.
7788 (replace_inv_trees): Likewise.
7789 (contains_array_notation_expr): Likewise.
7790 (find_correct_array_notation_type): Likewise.
7791 * c-common.h (struct inv_list): Moved this struct from the file
7792 c/c-array-notation.c and added a new field called additional tcodes.
7793 (length_mismatch_in_expr_p): New prototype.
7794 (is_cilkplus_reduce_builtin): Likewise.
7795 (find_rank): Likewise.
7796 (extract_array_notation_exprs): Likewise.
7797 (replace_array_notation): Likewise.
7798 (find_inv_trees): Likewise.
7799 (replace_inv_trees): Likewise.
7800 (find_correct_array_notation_type): Likewise.
dfeadaa0 7801
36536d79
BI
78022013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7803
7804 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7805 function array_notation_init_builtins is called.
7806 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7807 * c-common.def (ARRAY_NOTATION_REF): New tree.
7808 * c-common.h (build_array_notation_expr): New function declaration.
7809 (build_array_notation_ref): Likewise.
7810 (extract_sec_implicit_index_arg): New extern declaration.
7811 (is_sec_implicit_index_fn): Likewise.
7812 (ARRAY_NOTATION_CHECK): New define.
7813 (ARRAY_NOTATION_ARRAY): Likewise.
7814 (ARRAY_NOTATION_START): Likewise.
7815 (ARRAY_NOTATION_LENGTH): Likewise.
7816 (ARRAY_NOTATION_STRIDE): Likewise.
7817 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7818 ARRAY_NOTATION_REF.
7819 (pp_c_expression): Likewise.
7820 * c.opt (flag_enable_cilkplus): New flag.
7821 * array-notation-common.c: New file.
7822
f7716d57
JJ
78232013-05-14 Jakub Jelinek <jakub@redhat.com>
7824
7825 PR c++/57274
7826 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7827
a5e0cd1d
MG
78282013-05-10 Marc Glisse <marc.glisse@inria.fr>
7829
7830 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7831 vectors.
7832
f6bc1c4a
HS
78332013-05-07 Han Shen <shenhan@google.com>
7834
7835 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7836
3f12f6e9
SKS
78372013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7838
7839 * c-common.c (check_user_alignment): Emit error for negative values.
7840
61949153
PC
78412013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7842
7843 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7844
e93e18e9
PC
78452013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7846
7847 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7848 __GXX_EXPERIMENTAL_CXX1Y__.
7849
44d90fe1 78502013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7851 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7852
7853 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7854 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7855 to simply use OPT_Wpointer_arith.
7856 (c_sizeof_or_alignof_type): Likewise.
7857
13f39b2e
PC
78582013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7859
7860 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7861
4b84d650
JJ
78622013-04-12 Jakub Jelinek <jakub@redhat.com>
7863
7864 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7865 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7866 specifiers.
7867
fb037b5d
SB
78682013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7869
7870 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7871
4e856798
PC
78722013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7873
7874 * c-common.c (pointer_int_sum): Remove dead code.
7875
4b1baac8
RS
78762013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7877
7878 PR middle-end/56524
7879 * c-common.c (handle_optimize_attribute): Don't call
7880 save_optabs_if_changed.
7881
0b50e654
JJ
78822013-03-05 Jakub Jelinek <jakub@redhat.com>
7883
7884 PR middle-end/56461
7885 * c-pch.c (pch_init): Free target_validity at the end.
7886
48c41403
JJ
78872013-03-04 Jakub Jelinek <jakub@redhat.com>
7888
7889 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7890
e664c61c
KS
78912013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7892 Jakub Jelinek <jakub@redhat.com>
7893
7894 PR sanitizer/56454
7895 * c-common.c (handle_no_sanitize_address_attribute): New function.
7896 (c_common_attribute_table): Add no_sanitize_address attribute.
7897 (handle_no_address_safety_analysis_attribute): Add
7898 no_sanitize_address attribute, not no_address_safety_analysis
7899 attribute.
7900
a475fd3d 79012013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7902
7903 PR target/52555
7904 * c-common.c (handle_optimize_attribute): Call
7905 save_optabs_if_changed.
7906
f6007d99
JJ
79072013-02-18 Jakub Jelinek <jakub@redhat.com>
7908 Steven Bosscher <steven@gcc.gnu.org>
7909
7910 PR pch/54117
7911 * c-opts.c (c_common_post_options): If debug info is enabled
7912 and non-dwarf*, refuse to load PCH files and when writing PCH
7913 file warn.
7914
cf35e2b1
JJ
79152013-02-05 Jakub Jelinek <jakub@redhat.com>
7916
7917 PR middle-end/56167
7918 * c-common.c (handle_error_attribute): Fix condition.
7919
32887460
JJ
79202013-01-30 Jakub Jelinek <jakub@redhat.com>
7921
7922 PR c++/55742
7923 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7924
5af057d8
JM
79252013-01-18 Jason Merrill <jason@redhat.com>
7926
7927 PR target/54908
7928 * c.opt (-fextern-tls-init): New.
7929 * c-opts.c (c_common_post_options): Handle it.
7930
cc83c823
JJ
79312013-01-09 Jakub Jelinek <jakub@redhat.com>
7932
7933 PR c/48418
7934 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7935 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
7936 and is either negative or bigger or equal to type precision
7937 of the first operand.
7938
a859517f
MP
79392012-12-03 Marek Polacek <polacek@redhat.com>
7940
7941 PR c/55570
7942 * c-common.c (check_user_alignment): Swap order of tests,
7943 check TREE_CODE first.
7944
2d7aa578
ESR
79452012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
7946
7947 PR c++/52654
7948 * c-common.h (overflow_type): New enum.
7949 (build_userdef_literal): Add overflow_type argument.
7950 (tree_userdef_literal): Add overflow_type.
7951 (USERDEF_LITERAL_OVERFLOW): New access macro.
7952 * c-common.c (build_userdef_literal): Add overflow_type
7953 argument.
7954 * c-lex.c (c_lex_with_flags): Add overflow_type to
7955 build_userdef_literal calls.
7956 (interpret_integer, interpret_float): Add overflow_type argument.
7957
cc3c4f62
RB
79582012-11-28 Richard Biener <rguenther@suse.de>
7959
7960 PR c/35634
7961 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7962 here and use a type with proper overflow behavior for types that would
7963 need to be promoted for the arithmetic.
7964
77bc5132
JJ
79652012-11-23 Jakub Jelinek <jakub@redhat.com>
7966
7967 PR sanitizer/55435
7968 * c-common.c (handle_no_address_safety_analysis_attribute): New
7969 function.
7970 (c_common_attribute_table): Add no_address_safety_analysis.
7971
5dc99c46
SB
79722012-11-16 Simon Baldwin <simonb@google.com>
7973
7974 * c.opt: Add f[no-]canonical-system-headers.
7975 * c-opts.c (c_common_handle_option): Handle
7976 OPT_fcanonical_system_headers.
7977
a4a0016d
ESR
79782012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
7979
7980 PR c++/54413
7981 * c-opts.c (c_common_handle_option): Set new flags.
7982 * c.opt: Describe new flags.
7983
7dbb85a7
JM
79842012-11-09 Jason Merrill <jason@redhat.com>
7985
7986 * c.opt (Wabi-tag): New.
7987
ad7bac31
AK
79882012-11-09 Andi Kleen <ak@linux.intel.com>
7989
7990 PR 55139
7991 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 7992 MEMMODEL_MASK
ad7bac31 7993
7332899a
MLI
79942012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
7995
7996 PR c/53063
7997 * c.opt (Wformat): Make it Alias Wformat=1.
7998 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
7999 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8000 LangEnabledBy.
8001 (Wformat=): RejectNegative. Use LangEnabledBy.
8002 (Wnonnull): Use LangEnabledBy.
8003 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8004 * c-format.c (set_Wformat): Delete.
8005 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8006 (maybe_read_dollar_number): Likewise.
8007 (avoid_dollar_number): Likewise.
8008 (finish_dollar_format_checking): Likewise.
8009 (check_format_info): Likewise.
8010 (check_format_info_main): Likewise.
8011 (check_format_types): Likewise.
8012 (format_type_warning): Likewise.
8013 * c-common.c (int): Likewise.
8014 (check_function_sentinel): Likewise.
8e745a17 8015 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8016
34a180a6
MLI
80172012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8018
8019 PR c/53063
8020 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8021 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8022 Use LangEnabledBy.
8023 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8024 common.opt.
8025 (Wvariadic-macros): Init(1).
8026 * c-opts.c (c_common_handle_option): Do not handle them
8027 explicitly.
8028 (c_common_post_options): Likewise.
8029 (sanitize_cpp_opts): warn_unused_macros is now
8030 cpp_warn_unused_macros.
8031 (push_command_line_include): Likewise.
8032 * c-common.c (warn_unknown_pragmas): Do not define.
8033 * c-common.h (warn_unknown_pragmas): Do not declare.
8034
3f46d6a5
MLI
80352012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8036
8037 PR c/51294
8038 * c-common.c (conversion_warning): Handle conditional expressions.
8039
880661a4
JW
80402012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8041
8042 PR c++/54930
8043 * c.opt (Wreturn_local_addr): Define new option.
8044
4514a96b
JM
80452012-10-25 Jason Merrill <jason@redhat.com>
8046
f14edc1a
JM
8047 * c.opt (Wvirtual-move-assign): New.
8048
4514a96b
JM
8049 * c.opt (Winherited-variadic-ctor): New.
8050
93100c6b
MG
80512012-10-25 Marc Glisse <marc.glisse@inria.fr>
8052
8053 PR c++/54427
8054 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8055
1efcb8c6
JM
80562012-10-23 Joseph Myers <joseph@codesourcery.com>
8057
8058 * c-common.h (pch_cpp_save_state): Declare.
8059 * c-target.def (c_preinclude): New hook.
8060 * c-opts.c (done_preinclude): New.
8061 (push_command_line_include): Handle default preincluded header.
8062 (cb_file_change): Call pch_cpp_save_state when calling
8063 push_command_line_include.
8064 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8065 (pch_cpp_save_state): New.
8066 (pch_init): Call pch_cpp_save_state conditionally, instead of
8067 calling cpp_save_state.
8068
4a0ae68e
MLI
80692012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8070
8071 PR c/53063
8072 PR c/40989
8073 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8074 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8075 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8076 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8077 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8078 * c-opts.c (c_common_handle_option): Remove explicit handling from
8079 here.
8080 (c_common_post_options): Likewise.
8081
67e4210b
EB
80822012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8083
8084 * c-ada-spec.c (LOCATION_COL): Delete.
8085 (compare_location): New function.
8086 (compare_node): Use it.
8087 (compare_comment): Likewise.
8088
65d4f2cd
MLI
80892012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8090
8091 PR c/53063
8092 PR c/40989
8093 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8094 * c-opts.c (c_common_handle_option): Do not set them here. Add
8095 comment.
8096 (c_common_post_options): Likewise.
8097
909881cb
EB
80982012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8099
8100 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8101 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8102 Remove POINTER_TYPE handling, add large unsigned handling and use
8103 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8104
3a785c97
JJ
81052012-10-12 Jakub Jelinek <jakub@redhat.com>
8106
8107 PR c/54381
8108 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8109 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8110 locs and array of 3 trees instead of just single loc and single
8111 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8112 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8113 For *cmp* builtins that take two sources strings report warnings
8114 about first and second source, not about destination and source.
8115
5e54f81d
MG
81162012-10-12 Marc Glisse <marc.glisse@inria.fr>
8117
8118 PR c++/53055
8119 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8120
f5b02f1e
EB
81212012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8122
8123 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8124 declaring something coming from another file.
8125
b46dbc6c
AC
81262012-10-10 Arnaud Charlet <charlet@adacore.com>
8127
f5b02f1e 8128 PR ada/54845
b46dbc6c
AC
8129 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8130
5d9de0d0
PC
81312012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8132
8133 PR c++/54194
8134 * c-common.c (warn_about_parentheses): Add location_t parameter;
8135 use EXPR_LOC_OR_LOC.
8136 * c-common.h: Update declaration.
8137
a212e43f
MG
81382012-10-09 Marc Glisse <marc.glisse@inria.fr>
8139
8140 PR c++/54427
8141 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8142 more operations. Make error messages optional.
8143 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8144 (scalar_to_vector): Declare.
8145
b1db7f91
JM
81462012-10-08 Jason Merrill <jason@redhat.com>
8147
8148 * c-common.c (c_common_reswords): Add thread_local.
8149
e28d52cf
DS
81502012-10-08 Dodji Seketeli <dodji@redhat.com>
8151
8152 PR c++/53528 C++11 attribute support
8153 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8154 new functions.
8155 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8156 static function.
8157 (handle_aligned_attribute): In choose strictest alignment
8158 among many. Use new check_cxx_fundamental_alignment_constraints.
8159 (handle_transparent_union_attribute): In c++11 attribute syntax,
8160 don't look through typedefs.
8161
3b78de56
AC
81622012-10-04 Arnaud Charlet <charlet@adacore.com>
8163
8164 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8165 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8166 out of dumpfile.h.
8167
6040bb5f
DC
81682012-09-25 Dehao Chen <dehao@google.com>
8169
8170 PR middle-end/54645
3b78de56 8171 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8172 map when read in the pch.
8173
3f8257db 81742012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8175
8176 * c-ada-spec.c: Style fixes.
8177
3f8257db 81782012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8179
8180 * c.opt (-fada-spec-parent): Define new command line switch.
8181 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8182 is specified, generate binding spec as a child of the specified unit.
8183
0ccb505d
PC
81842012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8185 Manuel López-Ibáñez <manu@gcc.gnu.org>
8186
8187 PR c++/53210
8188 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8189
c583af79
AC
81902012-08-23 Arnaud Charlet <charlet@adacore.com>
8191
8192 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8193 for pointers, and add missing Convention C pragma.
8194 (print_ada_struct_decl): Add missing aliased keyword.
8195 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8196
1a4049e7
JJ
81972012-08-17 Jakub Jelinek <jakub@redhat.com>
8198
8199 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8200 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8201 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8202 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8203 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8204
70b5e7dc
RG
82052012-08-10 Richard Guenther <rguenther@suse.de>
8206
8207 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8208
f8923f7e
SB
82092012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8210
8211 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8212 instead of separate pp_newline and pp_flush.
8213 (print_c_tree): Likewise.
8214
e45abe1f
RH
82152012-07-26 Richard Henderson <rth@redhat.com>
8216
8217 * c-common.c (handle_hot_attribute): Allow labels.
8218 (handle_cold_attribute): Likewise.
8219
332f1d24
JJ
82202012-07-20 Jakub Jelinek <jakub@redhat.com>
8221
8222 PR c++/28656
8223 * c-common.c (check_function_nonnull): Handle multiple nonnull
8224 attributes properly.
8225
7ee2468b
SB
82262012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8227
8228 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8229 * c-ada-spec.c: Likewise.
8230 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8231
ee7b28eb
SB
82322012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8233
8234 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8235 Remove code conditional on it.
8236
6bdf3519
SB
82372012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8238
8239 * c-gimplify.c: Do not include basic-block.h.
8240 * c-common.c: Do not include linfuncs.h.
8241
532aafad
SB
82422012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8243
8244 * c-common.h: Include tree.h.
8245
8d0d1915
JM
82462012-07-02 Jason Merrill <jason@redhat.com>
8247
8248 PR c++/53524
8249 * c-common.c (get_priority): Call default_conversion.
8250
fbc873ad
UB
82512012-07-01 Uros Bizjak <ubizjak@gmail.com>
8252
8253 * c-pch.c (c_common_write_pch): Remove unused variables.
8254
d4a10d0a
SB
82552012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8256
8257 * cppspec.c: Moved from gcc/ to here.
8258
6f3a2e23
KT
82592012-06-27 Kai Tietz <ktietz@redhat.com>
8260
8261 PR preprocessor/37215
8262 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8263
8ca92d04
SB
82642012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8265
8266 * c-common.h (c_common_print_pch_checksum): Remove.
8267 * c-pch.c: Do not include output.h.
8268 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8269 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8270 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8271 (struct c_pch_header): Remove.
8272 (get_ident): Update gpch version.
8273 (pch_init): Do not print executable_checksum to asm_out_file.
8274 Do not fail if there is no asm_out_file to read back from. Set
8275 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8276 (c_common_write_pch): Verify that nothing was written to asm_out_file
8277 since pch_init was called. Do not write a c_pch_header, and do not
8278 copy from asm_out_file to the PCH.
8279 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8280 the content of asm_out_file from the PCH.
8281 (c_common_print_pch_checksum): Remove.
8282 * c-opts.c (c_common_init): Print out executable_checksum directly.
8283
70f42967
SB
82842012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8285
8286 * c-target.def (objc_declare_unresolved_class_reference,
8287 objc_declare_class_definition): Add new hooks.
8288
a8781821
SB
82892012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8290
8291 * c-lex.c: Do not include output.h.
8292 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8293 Remove uses of ASM_OUTPUT_IDENT.
8294
9e1a8dd1
RR
82952012-06-15 Marc Glisse <marc.glisse@inria.fr>
8296
8297 PR c++/51033
8298 * c-common.h (c_build_vec_perm_expr): Move decl here.
8299 * c-common.c (c_build_vec_perm_expr): Move definition
8300 here.
8301
6f07a821
SB
83022012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8303
8304 * c.opt (fconserve-space): Turn into a no-op.
8305
9faeb493 83062012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8307
8308 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8309 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8310 both the start and end of the function.
8311
a4b7d13c
SB
83122012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8313
8314 * c-common.c: Do not include output.h.
8315 * c-pragma.c: Likewise.
8316
c265f413
SA
83172012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8318
8319 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8320 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8321 (lang_decl_name): Handle namespace decls.
8322
be7a421e
SB
83232012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8324
8325 * c-ada-spec.c: Do not include output.h.
8326 * c-semantics.c: Likewise.
8327
65de6659
JM
83282012-05-29 Joseph Myers <joseph@codesourcery.com>
8329
8330 * c-common.c: Fix typo.
8331
ca5f4331
MM
83322012-05-29 Michael Matz <matz@suse.de>
8333
8334 * c-common.h (c_expand_decl): Remove prototype.
8335
4f7f7aca
MLI
83362012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8337
8338 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8339 * c-opts.c (c_common_handle_option): Remove code handling
8340 warn_missing_braces.
8341
4a792f9b
PC
83422012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8343
8344 PR c++/25137
8345 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8346 -Wmissing_braces.
8347
650dc14a
DS
83482012-05-22 Dodji Seketeli <dodji@redhat.com>
8349
8350 PR c++/53322
8351 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8352
9b095bf1
MLI
83532012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8354
8355 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8356 * c-opts.c (c_common_handle_option): Do not handle explicitly
8357 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8358
0b2c4be5
DS
83592012-05-16 Dodji Seketeli <dodji@redhat.com>
8360
8361 PR preprocessor/7263
ab20d992 8362 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8363 to cpp_classify_number. For diagnostics, use the precise location
8364 instead of the global input_location.
8365
a1bde5af
PC
83662012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8367
d02924ef 8368 PR c++/11856
a1bde5af
PC
8369 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8370
d1ede5f4
BS
83712012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8372
a1bde5af 8373 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8374
f2bc201f
MLI
83752012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8376
8377 PR 53063
8378 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8379 Wreorder): Use LangEnabledBy.
8380 * c-opts.c (c_common_handle_option): Do not enable them
8381 explicitly. Call lang-specific generated functions.
8382 (c_common_post_options): Do not set them here.
8383
95744782
MLI
83842012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8385
8386 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8387 Wmissing-field-initializers,Wmissing-parameter-type,
8388 Wold-style-declaration,Woverride-init): Use EnabledBy.
8389 * c-opts.c (c_common_post_options): Do not set here explicitly.
8390
7d5a5747
MLI
83912012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8392
8393 PR 53063
8394 * c-opts.c (c_common_handle_option): Use handle_generated_option
8395 to enable sub-options.
8396
5a3c9cf2
PC
83972012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8398
8399 PR c++/53158
8400 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8401
3ac8781c
RG
84022012-05-10 Richard Guenther <rguenther@suse.de>
8403
8404 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8405 adjust commentary about TYPE_IS_SIZETYPE types.
8406
1e537948
MLI
84072012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8408
8409 PR c++/53261
8410 * c-common.c (warn_logical_operator): Check that argument of
8411 integer_zerop is not NULL.
8412
f2c4a785
MLI
84132012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8414
8415 PR c/43772
8416 * c-common.c (warn_logical_operator): Do not warn if either side
8417 is already true or false.
8418
50f305ca
MLI
84192012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8420
8421 PR c/51712
8422 * c-common.c (expr_original_type): New.
8423 (shorten_compare): Do not warn for enumeration types.
8424
0c3641b0
MLI
84252012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8426
8427 * c.opt (fpermissive): Add Var(flag_permissive).
8428
7edaa4d2
MG
84292012-04-30 Marc Glisse <marc.glisse@inria.fr>
8430
8431 PR c++/51033
8432 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8433 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8434
b9c8da34
DS
84352012-04-30 Dodji Seketeli <dodji@redhat.com>
8436
8437 Add -Wvarargs option
ab20d992 8438 * c.opt (Wvarargs): Define new option.
b9c8da34 8439
e6c69da0
MLI
84402012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8441
8442 * c-common.c (check_function_arguments): Replace
8443 Wmissing-format-attribute with Wsuggest-attribute=format.
8444
90137d8f
MLI
84452012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8446
8447 * c.opt (Wsuggest-attribute=format): New. Alias of
8448 Wmissing-format-attribute.
8449 * c-format.c (decode_format_type): Replace
8450 Wmissing-format-attribute with Wsuggest-attribute=format.
8451 (check_function_format): Likewise.
8452
9faeb493 84532012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8454
8455 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8456 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8457 * c.opt: Add Wliteral-suffix.
8458
c1771a20
MLI
84592012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8460
8461 PR c/44774
8462 * c.opt (Wpedantic): New.
8463 (pedantic): Alias Wpedantic.
8464 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8465 (c_common_post_options): Likewise.
8466 (sanitize_cpp_opts): Likewise.
8467 * c-lex.c (interpret_float): Likewise.
8468 * c-format.c (check_format_types): Likewise.
8469 * c-common.c (pointer_int_sum): Likewise.
8470 (c_sizeof_or_alignof_type): Likewise.
8471 (c_add_case_label): Likewise.
8472 (c_do_switch_warnings): Likewise.
8473 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8474
04b391c1
JM
84752012-04-15 Jason Merrill <jason@redhat.com>
8476
8477 PR c++/52818
8478 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8479 (C_STD_NAME): Distinguish between C++98 and C++11.
8480
ac868f29
EB
84812012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8482
8483 PR target/52624
8484 * c-common.h (uint16_type_node): Rename into...
8485 (c_uint16_type_node): ...this.
8486 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8487 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8488
fd4116f4
MLI
84892012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8490
8491 * c-common.c (warn_if_unused_value): Move definition to here.
8492 * c-common.h (warn_if_unused_value): Move declaration to here.
8493
573ac65e
WB
84942012-03-23 William Bader <williambader@hotmail.com>
8495
8496 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8497
552b8185
JM
84982012-03-20 Jason Merrill <jason@redhat.com>
8499
8500 * c-common.h (enum cxx_dialect): Add cxx1y.
8501 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8502 test.
8503 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8504 * c-opts.c (c_common_post_options): Likewise.
8505 (set_std_cxx1y): New.
8506 (c_common_handle_option): Call it.
8507 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8508
04398fa8
PC
85092012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8510
8511 PR c++/14710
8512 * c.opt ([Wuseless-cast]): Add.
8513
d2a12ae7
RG
85142012-03-16 Richard Guenther <rguenther@suse.de>
8515
8516 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8517
a12bf402
MLI
85182012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8519
8520 PR c++/44783
8521 * c.opt (ftemplate-backtrace-limit) Add.
8522
5c30094f
RO
85232012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8524
8525 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8526 handling.
8527 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8528 (init_pragma): Don't register extern_prefix.
8529
21fa2faf
RG
85302012-03-12 Richard Guenther <rguenther@suse.de>
8531
8532 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8533 (builtin_type_for_size): Likewise.
8534
e3793c6f
JJ
85352012-02-13 Jakub Jelinek <jakub@redhat.com>
8536
8537 PR c++/52215
8538 * c-common.c (sync_resolve_params): Don't decide whether to convert
8539 or not based on TYPE_SIZE comparison, convert whenever arg_type
8540 is unsigned INTEGER_TYPE.
8541
93286335
PC
85422012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8543
8544 PR c/52118
8545 * c.opt ([Wunused-local-typedefs]): Fix description.
8546
7a421706
MS
85472012-01-24 Mike Stump <mikestump@comcast.net>
8548
8549 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8550 exactly.
8551
ba9b1f11
RG
85522012-01-18 Richard Guenther <rguenther@suse.de>
8553
8554 * c-opts.c (c_common_post_options): Reset LTO flags if
8555 we are about to generate a PCH.
8556
465406be
PC
85572012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8558
8559 PR c++/51777
8560 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8561 use pp_unsigned_wide_integer.
8562
aee15221
RG
85632012-01-10 Richard Guenther <rguenther@suse.de>
8564
8565 PR middle-end/51806
8566 * c-opts.c (c_common_handle_option): Move -Werror handling
8567 to language independent code.
8568
5720c0dc
RG
85692012-01-05 Richard Guenther <rguenther@suse.de>
8570
8571 PR middle-end/51764
8572 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8573 from common.opt.
8574
73ac190a
PC
85752011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8576
8577 PR c++/51316
8578 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8579 of array types with an unknown bound.
8580
48b0b196
JM
85812011-12-20 Joseph Myers <joseph@codesourcery.com>
8582
8583 * c-common.c (flag_isoc99): Update comment to refer to C11.
8584 (flag_isoc1x): Change to flag_isoc11.
8585 * c-common.h (flag_isoc99): Update comment to refer to C11.
8586 (flag_isoc1x): Change to flag_isoc11.
8587 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8588 C11.
8589 * c-opts.c (set_std_c1x): Change to set_std_c11.
8590 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8591 Call set_std_c11.
8592 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8593 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8594 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8595 standard.
8596 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8597 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8598 (std=gnu1x): Make alias of std=gnu11.
8599
d58d6eb5
JM
86002011-12-19 Jason Merrill <jason@redhat.com>
8601
8602 PR c++/51228
8603 * c-common.c (handle_transparent_union_attribute): Check the first
8604 field if the type is complete.
8605
b3908fcc
JW
86062011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8607
8608 PR libstdc++/51365
8609 * c-common.c (RID_IS_FINAL): Add.
8610 * c-common.h (RID_IS_FINAL): Add.
8611
fea3ca91
IS
86122011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8613
8614 * c.opt (fgnu-runtime): Provide full description.
8615 (fnext-runtime): Likewise.
8616 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8617
62bad7cd
AM
86182011-11-28 Andrew MacLeod <amacleod@redhat.com>
8619
8620 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8621 predefines in one place. Add LOCK_FREE predefines.
8622 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8623 new func.
8624
c466c4ff
AM
86252011-11-24 Andrew MacLeod <amacleod@redhat.com>
8626
8627 PR c/51256
9faeb493 8628 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8629 conditions
9faeb493
UB
8630 (resolve_overloaded_atomic_exchange,
8631 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8632 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8633 error_mark_node for error conditions.
9faeb493 8634
a5952633
RG
86352011-11-08 Richard Guenther <rguenther@suse.de>
8636
8637 PR middle-end/51010
ab20d992 8638 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 8639
0a35513e
AH
86402011-11-07 Richard Henderson <rth@redhat.com>
8641 Aldy Hernandez <aldyh@redhat.com>
8642 Torvald Riegel <triegel@redhat.com>
8643
8644 Merged from transactional-memory.
8645
8646 * c-common.c (handle_tm_wrap_attribute,
8647 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8648 (struct c_common_reswords): Added __transaction* keywords.
8649 (struct c_common_attribute_table): Added transaction* and tm_regparm
8650 attributes.
8651 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8652 masks.
8653 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8654 find_tm_attribute): Declare.
8655
6d87092d
JM
86562011-11-07 Jason Merrill <jason@redhat.com>
8657
8658 PR c++/35688
8659 * c-common.c, c-common.h: Revert yesterday's changes.
8660
8e7860a1
JM
86612011-11-06 Jason Merrill <jason@redhat.com>
8662
8663 PR c++/35688
8664 * c-common.c (decl_has_visibility_attr): Split out from...
8665 (c_determine_visibility): ...here.
8666 * c-common.h: Declare it.
8667
d19fa6b5
JM
86682011-11-06 Joseph Myers <joseph@codesourcery.com>
8669
8670 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8671 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8672 type.
8673 (check_user_alignment): New. Split out of
8674 handle_aligned_attribute. Disallow integer constants with
8675 noninteger types. Conditionally allow zero.
8676 (handle_aligned_attribute): Use check_user_alignment.
8677 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8678
86951993
AM
86792011-11-06 Andrew MacLeod <amacleod@redhat.com>
8680 Richard Henderson <rth@redhat.com>
8681
8682 Merged from cxx-mem-model.
8683
8684 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8685 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8686 parameters that are the same type size.
8687 (get_atomic_generic_size): New. Find size of generic
8688 atomic function parameters and do typechecking.
8689 (add_atomic_size_parameter): New. Insert size into parameter list.
8690 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8691 either __atomic_exchange_n or external library call.
9faeb493 8692 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8693 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8694 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8695 __atomic_load_n or an external library call.
8696 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8697 __atomic_store_n or an external library call.
8698 (resolve_overloaded_builtin): Handle new __atomic builtins.
8699
cf9e9959
EB
87002011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8701
8702 PR c++/50608
8703 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8704 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8705 <INDIRECT_REF>: Return the argument.
8706 <ARRAY_REF>: Remove special code for negative offset.
8707 Call fold_build_pointer_plus instead of size_binop.
8708 (fold_offsetof): Remove STOP_REF argument and adjust.
8709 * c-common.h (fold_offsetof_1): Declare.
8710 (fold_offsetof): Remove STOP_REF argument.
8711
25339f10
JM
87122011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8713
8714 PR c++/50810
8715 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8716 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8717 Wnarrowing for C++0x and C++98.
8718 * c.opt ([Wnarrowing]): Update.
8719
89401152
PC
87202011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8721
8722 PR c++/44277
8723 * c.opt: Add Wzero-as-null-pointer-constant.
8724
97e3ad20
JM
87252011-10-31 Jason Merrill <jason@redhat.com>
8726
15694fdd
JM
8727 * c.opt (-fdeduce-init-list): Off by default.
8728
97e3ad20
JM
8729 PR c++/50920
8730 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8731 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8732 and -Wc++11-compat.
8733 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8734
fb9120e3
RAV
87352011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8736
8737 PR c++/30066
8738 * c.opt (fvisibility-inlines-hidden): Description change.
8739
3ce4f9e4
ESR
87402011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8741
8742 Implement C++11 user-defined literals.
8743 * c-common.c (build_userdef_literal): New.
8744 * c-common.def: New tree code.
8745 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8746 * c-lex.c (interpret_float): Add suffix parm.
8747 (c_lex_with_flags): Build literal tokens.
8748
5f53c243
PC
87492011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8750
8751 PR c++/50841
8752 Revert:
8753 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8754
8755 PR c++/50810
8756 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8757 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8758 Wnarrowing for C++0x and C++98.
8759 * c.opt ([Wnarrowing]): Update.
8760
263734e1
PC
87612011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8762
8763 PR c++/50810
8764 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8765 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8766 Wnarrowing for C++0x and C++98.
8767 * c.opt ([Wnarrowing]): Update.
8768
d2e312d7
PC
87692011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8770
8771 PR c++/45385
8772 * c-common.c (conversion_warning): Remove code looking for
8773 artificial operands.
8774
d17687f6
DS
87752011-10-18 Dodji Seketeli <dodji@redhat.com>
8776
8777 PR bootstrap/50760
8778 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8779 !NO_IMPLICIT_EXTERN_C.
d17687f6 8780
fc8396e9
PC
87812011-10-17 Michael Spertus <mike_spertus@symantec.com>
8782
8783 * c-common.c (c_common_reswords): Add __bases,
8784 __direct_bases.
8785 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8786
87872011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8788
8789 PR c++/50757
8790 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8791
847e697a
TT
87922011-10-15 Tom Tromey <tromey@redhat.com>
8793 Dodji Seketeli <dodji@redhat.com>
8794
8795 * c.opt (fdebug-cpp): New option.
8796 * c-opts.c (c_common_handle_option): Handle the option.
8797 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8798 output stream in parameter. Factorized from ...
8799 (maybe_print_line): ... this. Dump location debug information when
8800 -fdebug-cpp is in effect.
8801 (print_line_1): New static function. Takes an output stream in
8802 parameter. Factorized from ...
8803 (print_line): ... here. Dump location information when -fdebug-cpp
8804 is in effect.
8805 (scan_translation_unit): Dump location information when
8806 -fdebug-cpp is in effect.
8807
92582b75
TT
88082011-10-15 Tom Tromey <tromey@redhat.com>
8809 Dodji Seketeli <dodji@redhat.com>
8810
8811 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8812 without argument.
8813 * c-opts.c (c_common_handle_option)<case
8814 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8815 cases. Handle -ftrack-macro-expansion with and without argument.
8816
46427374
TT
88172011-10-15 Tom Tromey <tromey@redhat.com>
8818 Dodji Seketeli <dodji@redhat.com>
8819
8820 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8821 (print_line, cb_define, do_line_change): Adjust to avoid touching
8822 the internals of struct line_map. Use the public API instead.
8823 * c-pch.c (c_common_read_pch): Likewise.
8824 * c-lex.c (fe_file_change): Likewise.
8825
fc8396e9
PC
88262011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8827
8828 PR c++/17212
8829 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8830
88312011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8832
8833 PR c++/33067
8834 * c-pretty-print.c (pp_c_floating_constant): Output
8835 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8836
e79983f4
MM
88372011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8838
8839 * c-common.c (def_builtin_1): Delete old interface with two
8840 parallel arrays to hold standard builtin declarations, and replace
8841 it with a function based interface that can support creating
8842 builtins on the fly in the future. Change all uses, and poison
8843 the old names. Make sure 0 is not a legitimate builtin index.
8844 * c-omp.c (c_finish_omp_barrier): Ditto.
8845 (c_finish_omp_taskwait): Ditto.
8846 (c_finish_omp_flush): Ditto.
8847
6637388f
TG
88482011-10-11 Tristan Gingold <gingold@adacore.com>
8849
8850 * c.opt: (fallow-parameterless-variadic-functions): New.
8851
3797cb21
DS
88522011-09-08 Dodji Seketeli <dodji@redhat.com>
8853
8854 PR c++/33255 - Support -Wunused-local-typedefs warning
8855 * c-common.h (struct c_language_function::local_typedefs): New
8856 field.
9faeb493
UB
8857 (record_locally_defined_typedef, maybe_record_typedef_use)
8858 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8859 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8860 (maybe_record_typedef_use)
8861 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8862 * c.opt: Declare new -Wunused-local-typedefs flag.
8863
693ddb1b
EB
88642011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8865
8866 PR middle-end/50266
8867 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8868 computations.
8869
830c740f
RG
88702011-09-05 Richard Guenther <rguenther@suse.de>
8871
8872 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8873 of integer_minus_one_node for empty array upper bounds.
8874
892a371f
DS
88752011-08-28 Dodji Seketeli <dodji@redhat.com>
8876
8877 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8878 it's the first time it's being called on this main TU.
8879
0e3fdb48
RB
88802011-08-24 Richard Guenther <rguenther@suse.de>
8881
8882 PR c/49396
8883 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8884
88852011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8886
8887 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8888 defined in cpp_init_builtins and c_cpp_builtins.
8889
d4a83c10
JM
88902011-08-19 Joseph Myers <joseph@codesourcery.com>
8891
8892 * c-common.c (c_common_reswords): Add __builtin_complex.
8893 * c-common.h (RID_BUILTIN_COMPLEX): New.
8894
bbceee64
JM
88952011-08-18 Joseph Myers <joseph@codesourcery.com>
8896
8897 * c-common.c (c_common_reswords): Add _Noreturn.
8898 (keyword_is_function_specifier): Handle RID_NORETURN.
8899 * c-common.h (RID_NORETURN): New.
8900
3f8257db 89012011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8902
8903 * c-common.c (unsafe_conversion_p): New function. Check if it is
8904 unsafe to convert an expression to the type.
8905 (conversion_warning): Adjust, use unsafe_conversion_p.
8906 * c-common.h (unsafe_conversion_p): New function declaration.
8907
20906c66
JJ
89082011-08-02 Jakub Jelinek <jakub@redhat.com>
8909
8910 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8911 (c_finish_omp_taskyield): New prototype.
8912 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8913 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8914 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8915 or RHS1 have side-effects, evaluate those too in the right spot,
8916 if it is a decl and LHS is also a decl, error out if they
8917 aren't the same.
8918 (c_finish_omp_taskyield): New function.
8919 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8920 * c-pragma.c (omp_pragmas): Add taskyield.
8921 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8922 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8923 PRAGMA_OMP_CLAUSE_MERGEABLE.
8924
770e5a2e
DS
89252011-07-25 Dodji Seketeli <dodji@redhat.com>
8926
8927 * c-common.h (set_underlying_type): Remove parm name from
8928 declaration.
8929
1baae426
RG
89302011-07-25 Romain Geissler <romain.geissler@gmail.com>
8931
8932 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8933
fcb21722
JM
89342011-07-22 Jason Merrill <jason@redhat.com>
8935
76f86d00
JM
8936 PR c++/49793
8937 * c.opt (Wnarrowing): New.
8938
3a636414
JM
8939 PR c++/30112
8940 * c-common.h: Declare c_linkage_bindings.
8941 * c-pragma.c (handle_pragma_redefine_extname): Use it.
8942
fcb21722
JM
8943 PR c++/49813
8944 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
8945 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
8946 as flag_isoc99 for 'restrict'.
8947 (pp_c_specifier_qualifier_list): Likewise for _Complex.
8948
02614448
ILT
89492011-07-21 Ian Lance Taylor <iant@google.com>
8950
8951 PR middle-end/49705
8952 * c-common.c (c_disable_warnings): New static function.
8953 (c_enable_warnings): New static function.
8954 (c_fully_fold_internal): Change local unused_p to bool. Call
8955 c_disable_warnings and c_enable_warnings rather than change
8956 c_inhibit_evaluation_warnings.
8957
34429675
JM
89582011-07-20 Jason Merrill <jason@redhat.com>
8959
8960 PR c++/6709 (DR 743)
8961 PR c++/42603 (DR 950)
8962 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
8963 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
8964 (CPP_DECLTYPE): New.
8965 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
8966
5d49b6a7
RG
89672011-07-19 Richard Guenther <rguenther@suse.de>
8968
8969 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
8970 * c-omp.c (c_finish_omp_for): Likewise.
8971
e84a58ff
EB
89722011-07-12 Eric Botcazou <ebotcazou@adacore.com>
8973
8974 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
8975 body on the next line.
8976
329af3c7
JM
89772011-07-08 Jason Merrill <jason@redhat.com>
8978
4063e61b
JM
8979 PR c++/45437
8980 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
8981
329af3c7
JM
8982 PR c++/49673
8983 * c-common.c (c_apply_type_quals_to_decl): Don't check
8984 TYPE_NEEDS_CONSTRUCTING.
8985
1a072294
RG
89862011-07-06 Richard Guenther <rguenther@suse.de>
8987
8988 * c-common.c (c_common_nodes_and_builtins):
8989 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
8990
fce5dddd
RG
89912011-07-05 Richard Guenther <rguenther@suse.de>
8992
8993 * c-common.c (c_common_nodes_and_builtins): Build all common
8994 tree nodes first.
8995
45d439ac
JJ
89962011-06-27 Jakub Jelinek <jakub@redhat.com>
8997
56300785
JJ
8998 * c-common.h (c_tree_chain_next): New static inline function.
8999
45d439ac
JJ
9000 * c-common.c (check_builtin_function_arguments): Handle
9001 BUILT_IN_ASSUME_ALIGNED.
9002
e0a8ecf2
AM
90032011-06-21 Andrew MacLeod <amacleod@redhat.com>
9004
9005 * c-common.c: Add sync_ or SYNC__ to builtin names.
9006 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9007
90082011-06-20 Pierre Vittet <piervit@pvittet.com>
9009
9010 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9011 handler.
9012 (gen_pragma_handler): New union.
9013 (internal_pragma_handler): New type.
9014 (c_register_pragma_with_data)
9015 (c_register_pragma_with_expansion_and_data): New functions.
9016
9017 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9018 (c_register_pragma, c_register_pragma_with_expansion)
9019 (c_invoke_pragma_handler): Changed to work with
9020 internal_pragma_handler.
9021 (c_register_pragma_with_data)
9022 (c_register_pragma_with_expansion_and_data): New functions.
9023
677f3fa8
JM
90242011-06-14 Joseph Myers <joseph@codesourcery.com>
9025
9026 * c-common.c: Include common/common-target.h.
9027 (handle_section_attribute): Use
9028 targetm_common.have_named_sections.
9029 * c-cppbuiltin.c: Include common/common-target.h.
9030 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9031
d7fc8c14
RG
90322011-06-10 Richard Guenther <rguenther@suse.de>
9033
9034 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9035 to print a IDENTIFIER_NODE.
9036
10e48e39
RO
90372011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9038 Joseph Myers <joseph@codesourcery.com>
9039
9040 * c.opt (fbuilding-libgcc): New option.
9041 * c-cppbuiltin.c (c_cpp_builtins): Define
9042 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9043
6976ae51
JM
90442011-06-07 Jason Merrill <jason@redhat.com>
9045
3ff60975
JM
9046 * c-common.c (max_tinst_depth): Lower default to 900.
9047
6976ae51
JM
9048 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9049
009db074
RG
90502011-06-07 Richard Guenther <rguenther@suse.de>
9051
9052 * c-common.c (c_common_nodes_and_builtins): Do not set
9053 size_type_node or call set_sizetype.
9054
b4592b92
DS
90552011-06-07 Dodji Seketeli <dodji@redhat.com>
9056
9057 PR debug/49130
9058 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9059 type when using pointer comparison to compare types.
b4592b92 9060
014ab419
JW
90612011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9062
9063 * c.opt: Add -Wdelete-non-virtual-dtor.
9064 * c-opts.c (c_common_handle_option): Include it in -Wall.
9065
4f60111f
NF
90662011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9067
9068 PR bootstrap/49190
9069
9070 Revert:
9071 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9072
9073 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9074 not tree_common.
9075
4cc4f2f4
JJ
90762011-05-27 Jakub Jelinek <jakub@redhat.com>
9077
9078 PR c++/49165
9079 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9080 C++ don't call c_common_truthvalue_conversion on void type arms.
9081
38e01f9e
NF
90822011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9083
9084 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9085 (stmt_list_stack): Define.
9086 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9087 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9088
92e948a8
NF
90892011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9090
9091 * c-common.c (warning_candidate_p): Check for BLOCKs.
9092
a2fc3e63
NF
90932011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9094
9095 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9096 not tree_common.
9097
0957c029
JJ
90982011-05-25 Jakub Jelinek <jakub@redhat.com>
9099
9100 * c-common.c (def_fn_type): Remove extra va_end.
9101
828fb3ba
JM
91022011-05-23 Jason Merrill <jason@redhat.com>
9103
9104 PR c++/48106
9105 * c-common.c (c_common_get_narrower): New.
9106 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9107
dde05067
NF
91082011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9109
9110 * c-common.h (check_function_arguments): Tweak prototype of
9111 check_function_arguments.
9112 * c-common.c (check_function_arguments): Likewise. Adjust
9113 calls to check_function_nonnull, check_function_format, and
9114 check_function_sentinel.
9115 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9116 separate attributes and typelist arguments. Use
9117 FOREACH_FUNCTION_ARGS to iterate over argument types.
9118
3c0d13bf
PC
91192011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9120
9121 * c-common.c (c_common_reswords): Reorder.
9122 * c-common.h (rid): Likewise.
9123
8242dd04
NF
91242011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9125
9126 * c-common.c (def_fn_type): Don't call build_function_type, call
9127 build_function_type_array or build_varargs_function_type_array
9128 instead.
9129 (c_common_nodes_and_builtins): Likewise.
9130
3d528853
NF
91312011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9132
9133 * c-common.c (c_add_case_label): Omit the loc argument to
9134 build_case_label.
9135 * c-common.h (build_case_label): Remove.
9136 * c-semantics.c (build_case_label): Remove.
9137
a04a722b
JM
91382011-05-05 Joseph Myers <joseph@codesourcery.com>
9139
9140 * c-objc.h (objc_start_method_definition): Update prototype.
9141 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9142
e19a18d4
NF
91432011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9144
9145 * c-common.c (check_main_parameter_types): Reindent. Don't use
9146 TYPE_ARG_TYPES directly.
9147 (handle_nonnull_attribute): Likewise.
9148 (sync_resolve_params): Likewise.
9149 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9150 to check_format_string.
9151 (handle_format_attribute): Likewise.
9152 (check_format_string): Take a function type to examine instead of
9153 a type list. Use a function_arg_iterator to step through argument
9154 types.
9155
c62c040f
RG
91562011-05-04 Richard Guenther <rguenther@suse.de>
9157
9158 * c-common.c (fix_string_type): Use size_int for index type bounds.
9159 (start_fname_decls): Do not pass NULL to build_int_cst.
9160 (c_init_attributes): Likewise.
9161 * c-lex.c (c_lex_with_flags): Likewise.
9162
c12ff9d8
JM
91632011-04-27 Jason Merrill <jason@redhat.com>
9164
9165 * c-common.c (make_tree_vector_from_list): New.
9166 * c-common.h: Declare it.
9167
304dfbe3
RG
91682011-04-26 Richard Guenther <rguenther@suse.de>
9169
9170 PR preprocessor/48248
9171 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9172 for output size with -P.
9173
3c0d13bf
PC
91742011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9175
9176 * c-common.c (struct c_common_resword): Add __underlying_type.
9177 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9178
04695783
JM
91792011-04-20 Jim Meyering <meyering@redhat.com>
9180
9181 * c-format.c (init_dollar_format_checking): Remove useless
9182 if-before-free.
9183
0dc33c3c
NP
91842011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9185
9186 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9187 (objc_detect_field_duplicates): New.
0dc33c3c 9188 * stub-objc.c: Likewise.
3c0d13bf 9189
c59633d9
NP
91902011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9191
9192 * stub-objc.c (objc_declare_protocols): Renamed to
9193 objc_declare_protocol.
9194 * c-objc.h: Likewise.
3c0d13bf 9195
32dabdaf
NP
91962011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9197
9198 * stub-objc.c (objc_declare_class): Updated argument name.
9199
81f653d6
NF
92002011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9201
9202 * c-common.h (c_common_init_ts): Declare.
9203 * c-common.c (c_common_init_ts): Define.
9204
eb345401
NP
92052011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9206
9207 * c-objc.h (objc_build_message_expr): Updated prototype.
9208 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9209
a358e188
MJ
92102011-04-12 Martin Jambor <mjambor@suse.cz>
9211
9212 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9213 of cgraph_node.
9214
e6313a78
RG
92152011-04-11 Richard Guenther <rguenther@suse.de>
9216
9217 * c-common.c (complete_array_type): Build a range type of
9218 proper type.
9219
dcf0c47e
NF
92202011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9221
9222 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9223 (handle_type_generic_attribute): Likewise.
9224
1ee44b26
JM
92252011-04-07 Jason Merrill <jason@redhat.com>
9226
9227 PR c++/48450
9228 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9229 conversion from C++0x scoped enum.
9230
acce4e77
JM
92312011-04-06 Joseph Myers <joseph@codesourcery.com>
9232
9233 * c-target-def.h: New file.
9234 * c-target.def: New file.
9235 * c-target.h: New file.
9236 * c-common.c (targetcm): Don't define here.
9237 * c-common.h (default_handle_c_option): Declare.
9238 * c-format.c: Include c-target.h instead of target.h.
9239 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9240 include tm.h.
9241 (default_handle_c_option): Move from targhooks.c.
9242
e2eefb55
JJ
92432011-03-29 Jakub Jelinek <jakub@redhat.com>
9244
9245 PR preprocessor/48248
9246 * c-ppoutput.c (print): Add src_file field.
9247 (init_pp_output): Initialize it.
9248 (maybe_print_line): Don't optimize by adding up to 8 newlines
9249 if map->to_file and print.src_file are different file.
9250 (print_line): Update print.src_file.
9251
ba78087b
KT
92522011-03-25 Kai Tietz <ktietz@redhat.com>
9253
9254 * c-ada-spec.c (compare_comment): Use filename_cmp
9255 instead of strcmp for filename.
9256
0edf1bb2
JL
92572011-03-25 Jeff Law <law@redhat.com>
9258
adfac8df 9259 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9260
c7dc8804
JM
92612011-03-25 Jason Merrill <jason@redhat.com>
9262
9263 * c.opt: Add -std=c++03.
9264
d1d879b1
EB
92652011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9266
9267 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9268
3f8257db 92692011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9270
9271 PR target/12171
5050afdf
KT
9272 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9273 Display allowed attributes for function pointer types.
9274 (pp_c_attributes_display): New function to display
9275 attributes having affects_type_identity flag set to true.
9276 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9277
62d784f7
KT
9278 * c-common.c (c_common_attribute_table):
9279 Add new element.
9280 (c_common_format_attribute_table): Likewise.
9281
82d37118
JM
92822011-03-18 Jason Merrill <jason@redhat.com>
9283
49a000c3
JM
9284 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9285 * c-common.h: Don't declare it here.
9286 * c-common.c: Or define it here.
9287 * c-opts.c (c_common_handle_option): Or set it here.
9288
82d37118
JM
9289 PR c++/35315
9290 * c-common.c (handle_transparent_union_attribute): Don't
9291 make a duplicate type in C++.
9292
17bc631c
JM
92932011-03-15 Jason Merrill <jason@redhat.com>
9294
9295 * c-common.c (max_constexpr_depth): New.
9296 * c-common.h: Declare it.
9297 * c-opts.c (c_common_handle_option): Set it.
9298 * c.opt (fconstexpr-depth): New option.
9299
1b9b91a6
JM
93002011-03-11 Jason Merrill <jason@redhat.com>
9301
f231b5ff
JM
9302 * c-common.c (attribute_takes_identifier_p): Add missing const.
9303
1b9b91a6
JM
9304 PR c++/46803
9305 * c-common.c (attribute_takes_identifier_p): Assume that an
9306 unknown attribute takes an identifier.
9307
a19e4d44
NF
93082011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9309
9310 PR c/47786
9311 * c-common.c (c_type_hash): Call list_length instead of iterating
9312 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9313
982d62f6
JJ
93142011-02-19 Jakub Jelinek <jakub@redhat.com>
9315
9316 PR c/47809
9317 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9318
0a256240
NP
93192011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9320
9321 * c.opt (fobjc-abi-version=) New.
9322 (fobjc-nilcheck): New.
9323
ba9e6dd5
NF
93242011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9325
9326 PR c++/46890
9327 * c-common.h (keyword_is_decl_specifier): Declare.
9328 * c-common.c (keyword_is_decl_specifier): Define.
9329 (keyword_is_function_specifier): New function.
9330
7273813a
JJ
93312011-01-26 Jakub Jelinek <jakub@redhat.com>
9332
9333 PR c/47473
9334 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9335 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9336 REAL_TYPE.
9337
908ef79b
AC
93382011-01-26 Arnaud Charlet <charlet@adacore.com>
9339
9340 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9341
237e9384
JJ
93422011-01-26 Jakub Jelinek <jakub@redhat.com>
9343
9344 PR pch/47430
9345 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9346 after init_c_lex if pch_file is set.
9347
47ea1edf
DK
93482011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9349
d4dba752 9350 PR c++/43601
47ea1edf
DK
9351 * c.opt (-fkeep-inline-dllexport): New switch.
9352
2aa9c6ae
RG
93532011-01-12 Richard Guenther <rguenther@suse.de>
9354
9355 PR middle-end/32511
9356 * c-common.c (handle_weak_attribute): Warn instead of error
9357 on declaring an inline function weak.
9358
7bd11157
TT
93592011-01-05 Tom Tromey <tromey@redhat.com>
9360
9361 * c-common.h (lvalue_error): Update.
9362 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9363 not error.
9364
0e66e494 93652010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9366
b4f588c4
NP
9367 PR objc/47075
9368 * c-objc.h (objc_finish_message_expr): Added argument to
9369 prototype.
9370
f4da8dce
NF
93712010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9372
9373 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9374 Use prototype_p.
9375
46270f14
NP
93762010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9377
9378 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9379 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9380
4816c593
NF
93812010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9382
9383 * c-common.h (readonly_error): Declare.
9384 * c-common.c (readonly_error): Define.
9385
7a6daeb0
NF
93862010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9387
9388 * c-common.h (invalid_indirection_error): Declare.
9389 * c-common.c (invalid_indirection_error): Define.
9390
892f6119
RG
93912010-12-03 Richard Guenther <rguenther@suse.de>
9392
9393 PR c/46745
9394 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9395 (pp_c_unary_expression): Likewise.
9396 (pp_c_expression): Likewise.
9397
6c39e757
NP
93982010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9399
9400 * c-common.h (objc_finish_function): New.
9401 (objc_non_volatilized_type): Removed.
9402 (objc_type_quals_match): Removed.
9403 * stub-objc.c (objc_finish_function): New.
9404 (objc_non_volatilized_type): Removed.
9405 (objc_type_quals_match): Removed.
9faeb493 9406
7c475d11
JM
94072010-11-30 Joseph Myers <joseph@codesourcery.com>
9408
9409 * c-common.h (parse_optimize_options): Declare.
9410 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9411 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9412
71f3e391
JM
94132010-11-29 Joseph Myers <joseph@codesourcery.com>
9414
9415 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9416 GET_ENVIRONMENT.
9417 * c-pch.c (O_BINARY): Don't define here.
9418 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9419
d5fabb58
JM
94202010-11-25 Joseph Myers <joseph@codesourcery.com>
9421
9422 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9423 targetm.except_unwind_info.
9424
299404a1
JM
94252010-11-23 Joseph Myers <joseph@codesourcery.com>
9426
9427 * c-opts.c (c_common_handle_option): Pass location to
9428 set_struct_debug_option.
9429
c98cd5bf
JM
94302010-11-23 Joseph Myers <joseph@codesourcery.com>
9431
9432 * c-common.c (visibility_options): Move from ../opts.c.
9433 * c-common.h (struct visibility_flags, visibility_options):
9434 Declare here.
9435 * c-opts.c (finish_options): Rename to c_finish_options.
9436 (c_common_init): Update call to finish_options.
9437
a9546771
NP
94382010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9439
9440 PR objc/34033
9441 * c-lex.c (lex_string): Check that each string in an Objective-C
9442 string concat sequence starts with either one or zero '@', and
9443 that there are no spurious '@' signs at the end.
9444
24a57808
JM
94452010-11-20 Joseph Myers <joseph@codesourcery.com>
9446
9447 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9448 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9449 HANDLE_PRAGMA_VISIBILITY.
9450 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9451 HANDLE_PRAGMA_VISIBILITY): Don't define.
9452 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9453
a9aa2c3a
NF
94542010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9455
9456 PR c++/16189
9457 PR c++/36888
9458 PR c++/45331
9459 * c-common.h (keyword_begins_type_specifier): Declare.
9460 (keyword_is_storage_class_specifier): Declare.
9461 (keyword_is_type_qualifier): Declare.
9462 * c-common.c (keyword_begins_type_specifier): New function.
9463 (keyword_is_storage_class_specifier): New function.
9464 (keyword_is_type_qualifier): Declare.
9465
5386338c
JM
94662010-11-19 Joseph Myers <joseph@codesourcery.com>
9467
9468 PR c/46547
9469 * c-common.c (in_late_binary_op): Define.
9470 (c_common_truthvalue_conversion): Check in_late_binary_op before
9471 calling c_save_expr.
9472 * c-common.h (in_late_binary_op): Declare.
9473
69ccdddb
JM
94742010-11-19 Joseph Myers <joseph@codesourcery.com>
9475
9476 * c-opts.c (c_common_handle_option): Update calls to
9477 set_struct_debug_option.
9478
6b192a09
NP
94792010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9480
9481 * c-common.h (objc_declare_protocols): Added additional argument.
9482 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9483
fb52b50a
NF
94842010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9485
9486 PR c/33193
9487 * c-common.h (build_real_imag_expr): Declare.
9488 * c-semantics.c (build_real_imag_expr): Define.
9489
b37421c6
JM
94902010-11-17 Joseph Myers <joseph@codesourcery.com>
9491
9492 * c-opts.c (c_common_parse_file): Take no arguments.
9493 * c-common.h (c_common_parse_file): Update prototype.
9494
07078664
JJ
94952010-11-16 Jakub Jelinek <jakub@redhat.com>
9496
9497 PR c++/46401
9498 * c-common.c (warning_candidate_p): Don't track non-const calls
9499 or STRING_CSTs.
9500
c6a13190
ILT
95012010-11-15 Ian Lance Taylor <iant@google.com>
9502
9503 * c-lex.c (init_c_lex): Set macro debug callbacks if
9504 flag_dump_go_spec is set.
9505
925e8657
NP
95062010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9507
9508 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9509 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9510
bb0a9581
NF
95112010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9512
9513 PR preprocessor/45038
9514 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9515 dialects.
9516
c5fa0890
JM
95172010-11-12 Joseph Myers <joseph@codesourcery.com>
9518
9519 * c-common.h (c_family_lang_mask): Declare.
9520 * c-opts.c (c_family_lang_mask): Make extern.
9521 * c-pragma.c (handle_pragma_diagnostic): Use
9522 control_warning_option.
9523
a4d8c676
JM
95242010-11-12 Joseph Myers <joseph@codesourcery.com>
9525
9526 * c-common.c (parse_optimize_options): Update call to
9527 decode_options.
9528 * c-common.h (c_common_handle_option): Update prototype.
9529 * c-opts.c (c_common_handle_option): Take location_t parameter and
9530 pass it to other functions.
9531
f954bd2c
JM
95322010-11-11 Joseph Myers <joseph@codesourcery.com>
9533
9534 * c-opts.c (warning_as_error_callback): Remove.
9535 (c_common_initialize_diagnostics): Don't call
9536 register_warning_as_error_callback.
9537 (c_common_handle_option): Handle -Werror=normalized= here.
9538
d8a07487
JM
95392010-11-10 Joseph Myers <joseph@codesourcery.com>
9540
9541 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9542 in diagnostic.
9543 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9544 letter.
9545 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9546 Remove trailing '.' from diagnostics.
9547 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9548
d5478783
JM
95492010-11-10 Joseph Myers <joseph@codesourcery.com>
9550
9551 * c-common.c (parse_optimize_options): Pass global_dc to
9552 decode_options.
9553 * c-opts.c (c_common_handle_option): Pass &global_options to
9554 set_Wstrict_aliasing.
9555 * c.opt (v): Don't mark Common or document here.
9556
91ebb981
IS
95572010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9558
9559 PR target/44981
9560 * c-format.c (format_type): New type gcc_objc_string_format_type.
9561 (valid_stringptr_type_p): New.
9562 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9563 (check_format_string): Pass expected type, use
91ebb981
IS
9564 valid_stringptr_type_p (), check that the format string types are
9565 consistent with the format specification.
9566 (decode_format_attr): Warn if NSString is used outside objective-c.
9567 (format_types_orig): Add NSString.
9568 (format_name): New.
9569 (format_flags): New.
9570 (check_format_arg): Handle format strings requiring an external parser.
9571 first_target_format_type: New variable.
9572 (handle_format_attribute): Set up first_target_format_type, pass the
9573 expected format arg string type to check_format_string().
ab20d992 9574 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
9575 * stub-objc.c (objc_string_ref_type_p): New.
9576 (objc_check_format_arg): New.
9577
bede2adc
NP
95782010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9579
9faeb493 9580 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9581 * c-common.h (objc_build_class_component_ref): New.
9582 * stub-objc.c (objc_build_class_component_ref): New.
9583
9a179d01
NP
95842010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9585
9586 * c.opt (Wproperty-assign-default): New option.
9587
22d8d616
NP
95882010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9589
9590 Implemented -fobjc-std=objc1 flag.
9591 * c.opt (fobjc-std=objc1): New option.
9592
2debdb4f
NP
95932010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9594
9595 Implemented format and noreturn attributes for Objective-C methods.
9596 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9597 attribute for Objective-C methods.
9598
ec52b111
JM
95992010-10-31 Jason Merrill <jason@redhat.com>
9600
9601 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9602 EXPR_LOC_OR_HERE.
9603
46a88c12
NP
96042010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9605
9606 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9607 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9608 (objc_add_property_declaration): Removed arguments for copies and
9609 ivar.
9610 (objc_build_getter_call): Renamed to
9611 objc_maybe_build_component_ref.
9612 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9613 (objc_is_property_ref): New.
9614 * c-common.c (c_common_reswords): Removed copies and ivar.
9615 * stub-objc.c (objc_add_property_declaration): Removed arguments
9616 for copies and ivar.
9617 (objc_build_getter_call): Renamed to
9618 objc_maybe_build_component_ref.
9619 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9620 (objc_is_property_ref): New.
9faeb493 9621
1e4bf85b
AC
96222010-10-29 Arnaud Charlet <charlet@adacore.com>
9623 Matthew Gingell <gingell@adacore.com>
9624
9625 * c-ada-spec.c (separate_class_package): New function.
9626 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9627 name of their enclosing package.
9628 (print_ada_declaration): Use separate_class_package.
9629
81f0bab2
JM
96302010-10-27 Jason Merrill <jason@redhat.com>
9631
2b08f2c5
JM
9632 * c-common.c (c_common_reswords): Add __is_literal_type.
9633 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9634
81f0bab2
JM
9635 * c-common.c (check_case_value): Remove special C++ code.
9636
200290f2
NP
96372010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9638
9639 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9640 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9641 and RID_LAST_PATTR.
9642 (objc_add_property_declaration): Added additional arguments.
9643 (objc_property_attribute_kind): Removed.
9644 (objc_set_property_attr): Removed.
9645 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9646 copy and nonatomic.
9647 * stub-objc.c (objc_add_property_declaration): Added additional
9648 arguments.
9649 (objc_set_property_attr): Removed.
9faeb493 9650
f614132b
NP
96512010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9652
9653 * c-common.h (objc_add_property_variable): Renamed to
9654 objc_add_property_declaration. Added location argument.
9655 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9656
b8a18805
NP
96572010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9658
9659 * c-common.h (objc_maybe_printable_name): New.
9660 * stub-objc.c (objc_maybe_printable_name): New.
9661
3f8257db
JJ
96622010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9663 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9664
9665 * c-common.h (c_common_mark_addressable_vec): Declare.
9666 * c-common.c (c_common_mark_addressable_vec): New function.
9667
249a82c4
NP
96682010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9669
9670 * c-common.h (objc_set_method_type): Removed.
9671 (objc_add_method_declaration): Added boolean argument.
9672 (objc_start_method_definition): Same change.
9673 (objc_build_method_signature): Same change.
9674 * stub-objc.c (objc_set_method_type): Removed.
9675 (objc_add_method_declaration): Added boolean argument.
9676 (objc_start_method_definition): Same change.
9677 (objc_build_method_signature): Same change.
9678
977e30bc
NP
96792010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9680
9681 * c-common.h (finish_file): Removed.
9682 (objc_write_global_declarations): New.
9683 * c-opts.c (c_common_parse_file): Do not call finish_file.
9684 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9685
da57d1b9
NP
96862010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9687
9688 Implemented parsing @synthesize and @dynamic for
9689 Objective-C/Objective-C++.
9690 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9691 (objc_add_synthesize_declaration): New.
9692 (objc_add_dynamic_declaration): New.
9693 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9694 * stub-objc.c (objc_add_synthesize_declaration): New.
9695 (objc_add_dynamic_declaration): New.
9faeb493 9696
0069111f
MM
96972010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9698
9699 PR target/46041
9700 * c-cppbuiltin.c (mode_has_fma): Move function here from
9701 builtins.c. Don't use the fma optab, instead just use the
9702 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9703 using -save-temps.
9704
e426b47b
NP
97052010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9706
9707 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9708
3f8257db 9709 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9710
9faeb493 9711 Radar 4330422
e426b47b
NP
9712 * c-common.h (objc_non_volatilized_type): New declaration
9713 * stub-objc.c (objc_non_volatilized_type): New stub.
9714
90fbfdc3
NP
97152010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9716
e426b47b 9717 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9718
ab20d992 9719 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9720
9faeb493 9721 Radar 4133425
90fbfdc3 9722 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9723 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9724
c37d8c30
IS
97252010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9726
9727 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9728 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9729 (objc_ivar_visibility_kind): New enum.
9730 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9731 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9732 visibility enum.
9733
1b1562a5
MM
97342010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9735
9736 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9737 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9738 has the appropriate fma builtins.
9739 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9740
668ea4b1
IS
97412010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9742
1b1562a5 9743 merge from FSF apple 'trunk' branch.
3f8257db 9744 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9745
668ea4b1
IS
9746 Radars 4436866, 4505126, 4506903, 4517826
9747 * c-common.c (c_common_resword): Define @property and its attributes.
9748 * c-common.h: Define property attribute enum entries.
9749 (OBJC_IS_PATTR_KEYWORD): New.
9750 (objc_property_attribute_kind): New enum.
9751 Declare objc_set_property_attr (), objc_add_property_variable (),
9752 objc_build_getter_call () and objc_build_setter_call ().
9753 * stub-objc.c (objc_set_property_attr): New stub.
9754 (objc_add_property_variable): Likewise.
9755 (objc_build_getter_call): Likewise.
9756 (objc_build_setter_call) Likewise.
1b1562a5 9757
a1178b30
IS
97582010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9759
1b1562a5 9760 merge from FSF apple 'trunk' branch.
ab20d992 9761 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9762
9763 Radar 3803157 (method attributes)
9764 * c-common.c (handle_deprecated_attribute): Recognize
9765 objc methods as valid declarations.
9766 * c-common.h: Declare objc_method_decl ().
1b1562a5 9767 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9768
a75bfaa6
JM
97692010-10-08 Joseph Myers <joseph@codesourcery.com>
9770
9771 * c-common.c (parse_optimize_options): Call
9772 decode_cmdline_options_to_array_default_mask before
9773 decode_options. Update arguments to decode_options.
9774 * c-common.h (c_common_init_options_struct): Declare.
9775 * c-opts.c (c_common_init_options_struct): New. Split out from
9776 c_common_init_options.
9777
f05b9d93
NP
97782010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9779
9780 Implemented fast enumeration for Objective-C.
9781 * c-common.h (objc_finish_foreach_loop): New.
9782 * stub-objc.c (objc_finish_foreach_loop): New.
9783
1ebe4b4f
JM
97842010-10-05 Joseph Myers <joseph@codesourcery.com>
9785
9786 * c-common.h (struct diagnostic_context): Don't declare here.
9787 (c_common_initialize_diagnostics): Declare using
9788 diagnostic_context typedef.
9789 * c-opts.c (c_common_handle_option): Pass global_dc to
9790 handle_generated_option.
9791
d4d24ba4
JM
97922010-10-04 Joseph Myers <joseph@codesourcery.com>
9793
9794 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9795 handle_generated_option.
9796
478a1c5b
ILT
97972010-10-03 Ian Lance Taylor <iant@google.com>
9798
9799 * c.opt (-fplan9-extensions): New option.
9800
82a1c2fe
FXC
98012010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9802
9803 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9804 Remove.
9805 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9806 of duplicating code.
9807
92902b1b
IS
98082010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9809
9810 * c-common.c: Add two new entries for @optional
9811 and @required keywords.
9812
9813 merge from FSF 'apple/trunk' branch.
3f8257db 9814 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9815
9816 Radar 4386773
9817 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9818 objective-c keywords.
9819 (objc_set_method_opt): New declaration.
9820 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9821
46625112
JM
98222010-09-30 Joseph Myers <joseph@codesourcery.com>
9823
9824 * c-common.c (handle_optimize_attribute): Pass &global_options to
9825 cl_optimization_save and cl_optimization_restore.
9826 * c-opts.c (c_common_handle_option): Pass &global_options to
9827 handle_generated_option.
9828 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9829 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9830 &global_options to cl_optimization_restore.
9831
49b91f05
NP
98322010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9833
9834 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9835 Objective-C/Objective-C++ keywords.
9836
13ed556f 98372010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9838
9faeb493
UB
9839 Merge from 'apple/trunk' branch on FSF servers.
9840
3f8257db 9841 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9842
9843 Radar 4281748
9844 * c-common.h (objc_check_global_decl): New declaration.
9845 * stub-objc.c (objc_check_global_decl): New stub.
9846
f0036cca
JM
98472010-09-29 Joseph Myers <joseph@codesourcery.com>
9848
9849 * c.opt: Don't use VarExists.
9850
e3339d0f
JM
98512010-09-29 Joseph Myers <joseph@codesourcery.com>
9852
9853 * c-common.c (c_cpp_error): Update names of diagnostic_context
9854 members.
9855 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9856 cl_optimization members.
9857 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9858 sanitize_cpp_opts, finish_options): Update names of cpp_options
9859 members.
9860
1973201f
NP
98612010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9862
9863 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9864 (objc_is_reserved_word): Removed.
9865 * c-common.c: Updated comments.
9866 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9867 objc_is_reserved_word.
9868 * stub-objc.c (objc_is_reserved_word): Removed.
9869
f7e71da5
IS
98702010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9871
9faeb493 9872 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9873 include attributes.
9874 (objc_start_method_definition): Likewise.
9875 (objc_build_keyword_decl): Likewise.
9876 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9877 (objc_start_method_definition): Likewise.
9878 (objc_build_keyword_decl): Likewise.
9879
c165dca7
IS
98802010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9881
9882 * c-common.h (objc_start_class_interface): Adjust prototype.
9883 (objc_start_category_interface): Likewise.
9884 (objc_start_protocol): Likewise.
9885 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9886 (objc_start_class_interface): Likewise.
9887 (objc_start_category_interface): Likewise.
9888
7458026b
ILT
98892010-09-27 Ian Lance Taylor <iant@google.com>
9890
9891 * c-common.c (c_common_attribute_table): Add no_split_stack.
9892 (handle_no_split_stack_attribute): New static function.
9893
b581b85b
NP
98942010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9895
9faeb493 9896 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9897
3f8257db 9898 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9899
9faeb493 9900 Radar 4229905
b581b85b
NP
9901 * c-common.h (objc_have_common_type): New declaration.
9902 * stub-objc.c (objc_have_common_type): New stub.
9903
9904 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9905
9906 Radar 4154928
9907 * c-common.h (objc_common_type): New prototype.
9faeb493 9908 * stub-objc.c (objc_common_type): New stub.
b581b85b 9909
46a4da10
JH
99102010-09-24 Jan Hubicka <jh@suse.cz>
9911
9912 * c-common.c (handle_leaf_attribute): New function.
9913 (struct attribute_spec c_common_att): Add leaf.
9914
e200444e
JM
99152010-09-22 Joseph Myers <joseph@codesourcery.com>
9916
9917 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9918 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9919 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9920 -include-barrier, -include-directory, -include-directory=,
9921 -include-directory-after, -include-directory-after=,
9922 -include-prefix, -include-prefix=, -include-with-prefix,
9923 -include-with-prefix=, -include-with-prefix-after,
9924 -include-with-prefix-after=, -include-with-prefix-before,
9925 -include-with-prefix-before=, -no-integrated-cpp,
9926 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9927 -output=, -pedantic, -pedantic-errors, -preprocess,
9928 -print-missing-file-dependencies, -trace-includes, -traditional,
9929 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9930 -user-dependencies, -verbose, -write-dependencies,
9931 -write-user-dependencies, no-integrated-cpp, traditional): New.
9932
29a80ea6
NP
99332010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9934
9935 PR objc/23710
ac1fc2fc
NP
9936 * c-common.h (objc_start_method_definition): Return bool instead
9937 of void.
9938 * stub-objc.c (objc_start_method_definition): Return bool instead
9939 of void.
9940
99412010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9942
9943 PR objc/25965
9944 * c-common.h (objc_get_interface_ivars): New declaration.
9945 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 9946
de621752
ILT
99472010-09-15 Ian Lance Taylor <iant@google.com>
9948
9949 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 9950 messages. Remove period at end of warning message.
de621752 9951
ba885ec5
NS
99522010-09-09 Nathan Sidwell <nathan@codesourcery.com>
9953
9954 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
9955 (handle_alias_attribute): ... here.
9956 (handle_ifunc_attribute): New.
9957
c5ee1358
MM
99582010-09-06 Mark Mitchell <mark@codesourcery.com>
9959
9960 * c-common.h (do_warn_double_promotion): Declare.
9961 * c-common.c (do_warn_double_promotion): Define.
9962
0a0b3574
MM
99632010-09-05 Mark Mitchell <mark@codesourcery.com>
9964
9965 * c.opt (Wdouble-promotion): New.
9966
d1779886
JM
99672010-09-02 Joseph Myers <joseph@codesourcery.com>
9968
9969 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
9970 fvtable-thunks, fxref): Mark no longer supported in help text.
9971
2d2bd949
JM
99722010-09-02 Joseph Myers <joseph@codesourcery.com>
9973
9974 * c.opt (Wimport, fall-virtual, falt-external-templates,
9975 fdefault-inline, fenum-int-equiv, fexternal-templates,
9976 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
9977 fname-mangling-version-, fnew-abi, fnonnull-objects,
9978 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
9979 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
9980 applicable.
9981 (fhandle-exceptions): Mark with Alias and Warn.
9982 * c-opts.c (c_common_handle_option): Don't handle options marked
9983 as ignored.
9984
5de8299c
JM
99852010-09-02 Joseph Myers <joseph@codesourcery.com>
9986
9987 * c.opt (Wcomments, Werror-implicit-function-declaration,
9988 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
9989 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
9990 aliases.
9991 * c-common.c (option_codes): Use OPT_Wcomment instead of
9992 OPT_Wcomments.
9993 * c-opts.c (warning_as_error_callback, c_common_handle_option):
9994 Don't handle options marked as aliases.
9995
0ceb0201
RG
99962010-08-25 Richard Guenther <rguenther@suse.de>
9997
9998 * c-common.c (c_common_get_alias_set): Remove special
9999 handling for pointers.
10000
ac47786e
NF
100012010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10002
10003 * c-common.c: Use FOR_EACH_VEC_ELT.
10004 * c-gimplify.c: Likewise.
10005 * c-pragma.c: Likewise.
10006
c878765b
JM
100072010-08-16 Joseph Myers <joseph@codesourcery.com>
10008
10009 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10010 RejectDriver.
10011 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10012 RejectDriver.
10013 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10014 instead of OPT_MDX and OPT_MMDX.
10015
603349bf
JM
100162010-08-16 Joseph Myers <joseph@codesourcery.com>
10017
10018 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10019
644fa7ac
JM
100202010-08-12 Joseph Myers <joseph@codesourcery.com>
10021
10022 * c.opt (MD, MMD): Change to MDX and MMDX.
10023 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10024
481e1176
JM
100252010-08-11 Joseph Myers <joseph@codesourcery.com>
10026
10027 * c-opts.c (c_common_handle_option): Call handle_generated_option
10028 instead of handle_option.
10029
ac8dc9f7
NF
100302010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10031
10032 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10033 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10034
4f8c876d
NF
100352010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10036
10037 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10038 (pending_redefine_extname): Change type to a VEC.
10039 (add_to_renaming_pragma_list): Update for new type of
10040 pending_redefine_extname.
ac8dc9f7 10041 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10042
3b0c690e
AC
100432010-08-04 Arnaud Charlet <charlet@adacore.com>
10044
10045 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10046 visited.
10047 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10048 decide whether a type has already been declared/seen.
10049 Do not go to the original type.
10050 (dump_nested_types): New parameter forward.
10051 Generate forward declaration if needed and mark type as visited.
10052 (print_ada_declaration): Call dump_nested_types if not already done.
10053 Mark types as visited.
10054
1890bccc
JM
100552010-08-03 Joseph Myers <joseph@codesourcery.com>
10056
10057 * c.opt (-print-pch-checksum): Remove option.
10058 * c-opts.c (c_common_handle_option): Don't handle
10059 OPT_print_pch_checksum.
10060
5f20c657
JM
100612010-07-27 Joseph Myers <joseph@codesourcery.com>
10062
10063 * c-common.h (c_common_handle_option): Update prototype and return
10064 value type.
10065 * c-opts.c (c_common_handle_option): Update prototype and return
10066 value type. Update calls to handle_option and
10067 enable_warning_as_error.
10068
f551f80c
JJ
100692010-07-27 Jakub Jelinek <jakub@redhat.com>
10070
10071 PR c/45079
10072 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10073
61ff2bdc
JM
100742010-07-27 Joseph Myers <joseph@codesourcery.com>
10075
10076 * c-common.h (c_common_missing_argument): Remove.
10077 * c-opts.c (c_common_missing_argument): Remove.
10078 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10079 idirafter, imacros, include, isysroot, isystem, iquote): Add
10080 MissingArgError.
10081 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10082
7a9bf9a4
JM
100832010-07-27 Joseph Myers <joseph@codesourcery.com>
10084
10085 * c-common.h (c_common_option_lang_mask,
10086 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10087 New.
10088 (c_common_init_options): Update prototype.
10089 * c-opts.c (c_common_option_lang_mask): New.
10090 (c_common_initialize_diagnostics): Split out of
10091 c_common_init_options.
10092 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10093 New.
10094 (c_common_init_options): Update prototype. Use decoded options in
10095 search for -lang-asm.
10096
910ad8de
NF
100972010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10098
10099 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10100 * c-format.c: Likewise.
10101
718f9c0f
MLI
101022010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10103
10104 * c-common.h: Include diagnostic-core.h. Error if already
10105 included.
10106 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10107
4d451982
MLI
101082010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10109
adfac8df 10110 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10111 Do not include expr.h
10112 (vector_mode_valid_p): Move here.
10113
119fe915
SB
101142010-06-21 DJ Delorie <dj@redhat.com>
10115
10116 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10117 allow these pragmas anywhere.
10118
101192010-06-14 Jakub Jelinek <jakub@redhat.com>
10120
10121 PR bootstrap/44509
10122 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10123 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10124 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10125 ggc_strdup instead of xstrdup.
10126
101272010-06-10 Jakub Jelinek <jakub@redhat.com>
10128
10129 * c-cppbuiltin.c: Include cpp-id-data.h.
10130 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10131 (lazy_hex_fp_value): New function.
10132 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10133
6662d794
MLI
101342010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10135
10136 * c-gimplify.c: Do not include tree-flow.h
10137
38f8b050
JR
101382010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10139
10140 PR other/44034
10141 * c-common.c: Rename targetm member:
10142 targetm.enum_va_list -> targetm.enum_va_list_p
10143
9589f23e
AS
101442010-06-28 Anatoly Sokolov <aesok@post.ru>
10145
10146 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10147
3b06d379
SB
101482010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10149
10150 * c-cppbuiltin.c: Do not include except.h.
10151
d166d4c3
AK
101522010-06-24 Andi Kleen <ak@linux.intel.com>
10153
9faeb493
UB
10154 * c-common.c (warn_for_omitted_condop): New.
10155 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10156
70cb8be6
JM
101572010-06-21 Joseph Myers <joseph@codesourcery.com>
10158
10159 * c.opt (lang-objc): Remove.
10160 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10161
a4c97feb
JR
101622010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10163
10164 * c-opts.c: Include "tm_p.h".
10165
6e2f1956
JM
101662010-06-20 Joseph Myers <joseph@codesourcery.com>
10167
10168 * c-common.c (parse_optimize_options): Update call to
10169 decode_options.
10170
bc87224e
NF
101712010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10172
10173 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10174 new type of types_used_by_cur_var_decl.
10175
b49cf425
JR
101762010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10177
10178 PR bootstrap/44512
10179 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10180 for C++ standard compliance.
10181
59f9c2ed
JM
101822010-06-16 Jason Merrill <jason@redhat.com>
10183
10184 * c.opt: Add -Wnoexcept.
10185
33766b66
RG
101862010-06-16 Richard Guenther <rguenther@suse.de>
10187
10188 PR c/44555
10189 * c-common.c (c_common_truthvalue_conversion): Remove
10190 premature and wrong optimization concering ADDR_EXPRs.
10191
eff7e30c
AC
101922010-06-15 Arnaud Charlet <charlet@adacore.com>
10193
10194 * c-ada-spec.c (dump_sloc): Remove column info.
10195 (is_simple_enum): New function.
10196 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10197 enum types when relevant.
10198
6312e84d
MLI
101992010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10200
9faeb493 10201 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10202 location.
10203
1cb42611
JM
102042010-06-10 Joseph Myers <joseph@codesourcery.com>
10205
10206 * c-opts.c (c_common_handle_option): Don't handle
10207 OPT_fshow_column.
10208
a9429e29
LB
102092010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10210
10211 * c-pragma.c (push_alignment): Use typed GC allocation.
10212 (handle_pragma_push_options): Likewise.
10213
10214 * c-common.c (parse_optimize_options): Likewise.
10215
10216 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10217 option.
10218
5498f011
JM
102192010-06-07 Joseph Myers <joseph@codesourcery.com>
10220
10221 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10222 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10223 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10224 flag_signed_bitfields, warn_strict_null_sentinel,
10225 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10226 flag_gen_declaration, flag_no_gnu_keywords,
10227 flag_implement_inlines, flag_implicit_templates,
10228 flag_implicit_inline_templates, flag_optional_diags,
10229 flag_elide_constructors, flag_default_inline, flag_rtti,
10230 flag_conserve_space, flag_access_control, flag_check_new,
10231 flag_new_for_scope, flag_weak, flag_working_directory,
10232 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10233 flag_enforce_eh_specs, flag_threadsafe_statics,
10234 flag_pretty_templates): Remove.
10235 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10236 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10237 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10238 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10239 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10240 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10241 flag_no_gnu_keywords, flag_implement_inlines,
10242 flag_implicit_templates, flag_implicit_inline_templates,
10243 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10244 flag_rtti, flag_conserve_space, flag_access_control,
10245 flag_check_new, flag_new_for_scope, flag_weak,
10246 flag_working_directory, flag_use_cxa_atexit,
10247 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10248 flag_threadsafe_statics, flag_pretty_templates,
10249 warn_strict_null_sentinel): Remove.
10250 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10251 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10252 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10253 fimplicit-inline-templates, fimplicit-templates,
10254 flax-vector-conversions, fms-extensions, fnil-receivers,
10255 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10256 frtti, fshort-double, fshort-enums, fshort-wchar,
10257 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10258 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10259 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10260 gen-decls, undef): Use Var.
10261 (fdefault-inline, foptional-diags): Document as doing nothing.
10262 * c-opts.c (c_common_handle_option): Remove cases for options now
10263 using Var. Mark ignored options as such.
10264
39dabefd
SB
102652010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10266
9faeb493 10267 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10268 * c-common.def: Likewise.
10269 * c-common.h: Likewise.
10270 * c-cppbuiltin.c: Likewise.
10271 * c-dump.c: Likewise.
10272 * c-format.c: Likewise.
10273 * c-format.h : Likewise.
10274 * c-gimplify.c: Likewise.
10275 * c-lex.c: Likewise.
10276 * c-omp.c: Likewise.
10277 * c.opt: Likewise.
10278 * c-opts.c: Likewise.
10279 * c-pch.c: Likewise.
10280 * c-ppoutput.c: Likewise.
10281 * c-pragma.c: Likewise.
10282 * c-pragma.h: Likewise.
10283 * c-pretty-print.c: Likewise.
10284 * c-pretty-print.h: Likewise.
10285 * c-semantics.c: Likewise.
10286 * stub-objc.c: Likewise.
10287
10288 * c-common.c: Include gt-c-family-c-common.h.
10289 * c-pragma.c: Include gt-c-family-c-pragma.h.
10290\f
a5544970 10291Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10292
10293Copying and distribution of this file, with or without modification,
10294are permitted in any medium without royalty provided the copyright
10295notice and this notice are preserved.