]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
* fi.po: Update.
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
27dfdc0f
JM
12019-10-10 Joseph Myers <joseph@codesourcery.com>
2
3 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
4 types if DFP not supported.
5
94e7f906
JJ
62019-10-10 Jakub Jelinek <jakub@redhat.com>
7
8 * c-common.h (c_omp_check_context_selector,
9 c_omp_get_context_selector): Declare.
10 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
11 in diagnostic message.
12 (c_omp_check_context_selector, c_omp_get_context_selector): New
13 functions.
14 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
15 attribute.
16 (handle_omp_declare_variant_attribute): New function.
17
a7160771
MS
182019-10-09 Martin Sebor <msebor@redhat.com>
19
20 PR tree-optimization/90879
21 * c.opt (-Wstring-compare): New option.
22
cb57504a
JM
232019-10-08 Andrew Sutton <asutton@lock3software.com>
24 Jason Merrill <jason@redhat.com>
25
26 Update the concepts implementation to conform to the C++20
27 specification, improve compile times, and generally clean up
28 the implementation.
29
30 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
31 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
32 * c.opt: Add -Wconcepts-ts.
33 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
34 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
35 (set_std_cxx2a): Enable concepts by default.
36
fbb2a6dc
JM
372019-10-08 Joseph Myers <joseph@codesourcery.com>
38
39 * c-opts.c (c_common_post_options): Set
40 -fno-fp-int-builtin-inexact for C2X.
41
8e007055
JJ
422019-10-05 Jakub Jelinek <jakub@redhat.com>
43
44 PR c++/91369 - Implement P0784R7: constexpr new
45 * c-cppbuiltin.c (c_cpp_builtins): Predefine
46 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
47
843f104d
JM
482019-10-04 Joseph Myers <joseph@codesourcery.com>
49
50 PR c/82752
51 * c-format.c (C_STD_VER): Handle C2x.
52 (C_STD_NAME): Likewise.
53 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
54 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
55 modifier allowed and 'p' flag.
56 * c-format.h (enum format_std_version): Add STD_C2X.
57 (struct format_char_info): Mention 'p' in comment on flags2.
58
e9c9a142
DM
592019-10-01 David Malcolm <dmalcolm@redhat.com>
60
61 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
62 calling diagnostic_show_locus, rather than destroying it afterwards.
63
7552c36a
JJ
642019-10-01 Jakub Jelinek <jakub@redhat.com>
65
66 PR c++/91925
67 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
68 with NULL DECL_FIELD_OFFSET.
69
8209db25
RS
702019-10-01 Richard Sandiford <richard.sandiford@arm.com>
71
72 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
73 has a type name, use it in preference to the __vector syntax.
74
9343bf99
RS
752019-09-30 Richard Sandiford <richard.sandiford@arm.com>
76
77 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
78 two spaces between a comma and "...".
79
59bc434a
JJ
802019-09-27 Jakub Jelinek <jakub@redhat.com>
81
82 PR c++/88203
83 * c-common.h (c_omp_predefined_variable): Declare.
84 * c-omp.c (c_omp_predefined_variable): New function.
85 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
86 for predefined variables.
87
c6447c20
RS
882019-09-27 Richard Sandiford <richard.sandiford@arm.com>
89
90 * c-common.h (build_function_call_vec): Take the original
91 function decl as an optional final parameter.
92 (check_builtin_function_arguments): Take the original function decl.
93 * c-common.c (check_builtin_function_arguments): Likewise.
94 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
95 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
96
c4438114
JM
972019-09-15 Jason Merrill <jason@redhat.com>
98
99 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
100 fold_for_warn in "|| mask" warning.
101
68a57628
ML
1022019-09-10 Martin Liska <mliska@suse.cz>
103
104 * c.opt: Use newly added WarnRemoved.
105
f48ef52e
ML
1062019-09-09 Martin Liska <mliska@suse.cz>
107
108 * c.opt: Update comment of removed
109 options that are preserved only for backward
110 compatibility.
111
67f6e649
ML
1122019-09-06 Martin Liska <mliska@suse.cz>
113
114 PR c++/91125
115 * c-common.c: Remove definition of flag_use_repository.
116 * c-common.h: Likewise.
117 * c-opts.c (c_common_handle_option):
118 Do not handle OPT_frepo option.
119 * c.opt: Mark the option with Deprecated.
120
db9d2274
MP
1212019-09-04 Marek Polacek <polacek@redhat.com>
122
123 * c.opt (fdeduce-init-list): Ignored.
124
68e2c199
PK
1252019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
126
127 PR c/78736
128 * c.opt (Wenum-conversion): New option.
129
7a4418a5
JL
1302019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
131
132 * c-attribs.c (handle_section_attribute): Call the
133 handle_generic_attribute target hook after performing target
134 independent processing.
135 (handle_noinit_attribute): Likewise.
136
5f76ab15
ILT
1372019-09-03 Ian Lance Taylor <iant@golang.org>
138
139 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
140 when using -fgo-dump-spec.
141
ae0d3f6a
ML
1422019-09-02 Martin Liska <mliska@suse.cz>
143
144 PR c++/91155
145 * c-common.c (fname_as_string): Use cxx_printable_name for
146 __PRETTY_FUNCTION__ same as was used before r265711.
147
8a902edb
MP
1482019-08-28 Marek Polacek <polacek@redhat.com>
149
150 Implement P1152R4: Deprecating some uses of volatile.
151 PR c++/91361
152 * c-opts.c (c_common_post_options): Enable -Wvolatile by
153 default for C++2a, unless -Wno-deprecated.
154 * c.opt (Wvolatile): New warning.
155
4742dbe7
MP
1562019-08-28 Marek Polacek <polacek@redhat.com>
157
158 PR c++/91360 - Implement C++20 P1143R2: constinit.
159 * c-common.c (c_common_reswords): Add constinit and __constinit.
160 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
161 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
162 RID_LAST_CXX20.
163 (D_CXX20): Define.
164 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
165 * c-format.c (cxx_keywords): Add "constinit".
166 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
167
6a074892
JJ
1682019-08-27 Jakub Jelinek <jakub@redhat.com>
169
170 PR c++/91415
171 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
172 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
173 like COMPOUND_EXPR rather than normal expression.
174
22f8849d
IS
1752019-08-23 Iain Sandoe <iain@sandoe.co.uk>
176
177 PR pch/61250
178 * c-lex.c (c_lex_with_flags): Don't call
179 c_common_no_more_pch () from here.
180
df375b03
JJ
1812019-08-23 Jakub Jelinek <jakub@redhat.com>
182
183 PR middle-end/91283
184 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
185 instead of flag_excess_precision_cmdline.
186 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
187 * c-opts.c (c_common_post_options): Likewise.
188
14b7950f
MS
1892019-08-22 Martin Sebor <msebor@redhat.com>
190
191 PR middle-end/91490
192 * c-common.c (braced_list_to_string): Add argument and overload.
193 Handle flexible length arrays and unions.
194
8bb2ee59
EB
1952019-08-21 Eric Botcazou <ebotcazou@adacore.com>
196
197 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
198 function declarations where arguments are missing. Rename variables.
199
21c1e205
RB
2002019-08-15 Richard Biener <rguenther@suse.de>
201
202 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
203 enabled, define __SIZETYPE__.
204
f0033821
CL
2052019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
206
207 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
208 exclusion with "section" attribute.
209 (attr_noinit_exclusions): New table.
210 (handle_noinit_attribute): New function.
211
4d732405
RS
2122019-08-13 Richard Sandiford <richard.sandiford@arm.com>
213
214 PR middle-end/91421
215 * c-common.c (resolve_overloaded_builtin): Use
216 copy_decl_built_in_function.
217
51ad8481
MS
2182019-08-13 Martin Sebor <msebor@redhat.com>
219
220 PR c/80619
221 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
222 (asm_fprintf_length_spec): Same.
223 * c-format.h (format_lengths): Add FMT_LEN_w.
224
77eb117f
JJ
2252019-08-10 Jakub Jelinek <jakub@redhat.com>
226
227 * c-pragma.h (enum pragma_omp_clause): Add
228 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
229
398e3feb
JJ
2302019-08-07 Jakub Jelinek <jakub@redhat.com>
231
232 * c-pragma.h (enum pragma_omp_clause): Add
233 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
234 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
235 enumeration value.
236
ab574db6
MP
2372019-08-05 Marek Polacek <polacek@redhat.com>
238
239 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
240 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
241 default for C++2a, unless -Wno-deprecated.
242 * c.opt (Wcomma-subscript): New warning.
243
554a530f
JJ
2442019-07-20 Jakub Jelinek <jakub@redhat.com>
245
246 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
247 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
248 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
249 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
250 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
251 constructs with the loop construct.
252
1a888209
JJ
2532019-07-13 Jakub Jelinek <jakub@redhat.com>
254
255 PR c/91149
256 * c-omp.c (c_omp_split_clauses): Fix a pasto in
257 OMP_CLAUSE_REDUCTION_TASK handling.
258
1fdd6f04
JJ
2592019-07-12 Jakub Jelinek <jakub@redhat.com>
260
261 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
262 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
263
99b1c316
MS
2642019-07-09 Martin Sebor <msebor@redhat.com>
265
266 PR c++/61339
1fdd6f04 267 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
268 and others to class.
269 * c-pretty-print.h: Same.
270
6c1dae73
MS
2712019-07-09 Martin Sebor <msebor@redhat.com>
272
273 PR c++/61339
274 * c-format.c (check_argument_type): Change class-key from class to
275 struct and vice versa to match convention and avoid -Wclass-is-pod
276 and -Wstruct-no-pod.
277 * c-pretty-print.h: Same.
278
8ba6ea87
ML
2792019-07-03 Martin Liska <mliska@suse.cz>
280
281 * c-common.c (try_to_locate_new_include_insertion_point): Remove
282 dead assignemts.
283
83eb9522
JJ
2842019-07-03 Jakub Jelinek <jakub@redhat.com>
285
286 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
287 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
288 with OMP_PARALLEL.
289
1c6ffbab
QZ
2902019-07-02 qing zhao <qing.zhao@oracle.com>
291
292 PR preprocessor/90581
293 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
294 * c.opt: Add new option -fmax-include-depth.
295
7ffc7de5
JM
2962019-06-26 Jason Merrill <jason@redhat.com>
297
298 PR c++/55442 - memory-hog with highly recursive constexpr.
299 * c.opt (fconstexpr-loop-limit): New.
300
361af3e4
JJ
3012019-06-25 Jakub Jelinek <jakub@redhat.com>
302
303 PR sanitizer/90954
304 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
305 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
306
ab20d992
JJ
3072019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
308
309 * c-common.c (c_common_nodes_and_builtins): Define
310 alternate "__intN__" name for "__intN" types.
311
f4af4019
JH
3122019-06-24 Jan Hubicka <jh@suse.cz>
313
314 * c-common.c (braced_lists_to_strings): Check that
315 type is array or integer prior checking string flag.
316
da9e9b57
MB
3172019-06-21 Matthew Beliveau <mbelivea@redhat.com>
318
319 PR c++/90875 - added -Wswitch-outside-range option
320 * c.opt (Wswitch-outside-range): Added new option.
321 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
322
3f3d6a6f
MP
3232019-06-21 Marek Polacek <polacek@redhat.com>
324
325 PR c++/90953 - ICE with -Wmissing-format-attribute.
326 * c-common.c (check_function_arguments_recurse): Use
327 get_attribute_name.
328 (check_missing_format_attribute): Likewise.
329
1bf32c11
MP
3302019-06-19 Marek Polacek <polacek@redhat.com>
331
332 PR c++/60364 - noreturn after first decl not diagnosed.
333 * c-attribs.c (handle_noreturn_attribute): No longer static.
334 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
335 Declare.
336 * c-format.c (check_function_format): Use get_attribute_name.
337
a04c0734
MS
3382019-06-19 Martin Sebor <msebor@redhat.com>
339
340 PR translation/90156
341 * c-format.c (function_format_info::format_type): Adjust type.
342 (function_format_info::is_raw): New member.
343 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
344 (decode_format_attr): Adjust call to decode_format_type.
345 Avoid a redundant call to convert_format_name_to_system_name.
346 Avoid abbreviating the word "arguments" in a diagnostic.
347 (format_warning_substr): New function.
348 (avoid_dollar_number): Quote dollar sign in a diagnostic.
349 (finish_dollar_format_checking): Same.
350 (check_format_info): Same.
351 (struct baltoks_t): New.
352 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
353 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
354 functions.
355 (check_format_info_main): Call check_plain. Use baltoks_t. Call
356 maybe_diag_unbalanced_tokens.
357 (handle_format_attribute): Spell out the word "arguments" in
358 a diagnostic.
359
d3786ebb
MB
3602019-06-11 Matthew Beliveau <mbelivea@redhat.com>
361
362 PR c++/90449 - add -Winaccessible-base option.
363 * c.opt (Winaccessible-base): New option.
364
bf38f7e9
JJ
3652019-06-10 Jakub Jelinek <jakub@redhat.com>
366
367 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
368 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
369 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
370 combined/composite constructs where it is not allowed. Copy over
371 OMP_CLAUSE_REDUCTION_INSCAN.
372
0ecf545c
MS
3732019-06-05 Martin Sebor <msebor@redhat.com>
374
375 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
376 (handle_alias_ifunc_attribute): Same.
377 (handle_copy_attribute): Same.
378 (handle_weakref_attribute): Same.
379 (handle_nonnull_attribute): Same.
380 * c-warn.c (warn_for_sign_compare): Same.
381 (warn_for_restrict): Same.
382 * c.opt: Same.
383
36b34127
MS
3842019-06-05 Martin Sebor <msebor@redhat.com>
385
386 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
387 * c.opt (-Wformat-diag): Remove a spurious period.
388
357a352f
JJ
3892019-05-29 Jakub Jelinek <jakub@redhat.com>
390
391 PR c/90628
392 * c-common.c (check_builtin_function_arguments)
393 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
394 as last argument.
395
2b8235ea
EB
3962019-05-23 Eric Botcazou <ebotcazou@adacore.com>
397
398 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
399
6d86ddc4
ML
4002019-05-22 Martin Liska <mliska@suse.cz>
401
402 PR lto/90500
403 * c-attribs.c (handle_copy_attribute): Do not copy
404 target_clones attribute.
405
419ba5b9
EB
4062019-05-21 Eric Botcazou <ebotcazou@adacore.com>
407
408 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
409 * c-ada-spec.c (print_assignment_operator): New function.
410 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
411 assignment operators declared as methods and filter out the others.
412
e03436e7
TS
4132019-05-17 Thomas Schwinge <thomas@codesourcery.com>
414
415 PR c/89433
416 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
417 "omp declare target".
418
a9c697b8
MS
4192019-05-16 Martin Sebor <msebor@redhat.com>
420
ab20d992
JJ
421 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
422 keywords, operators, and types in diagnostics.
423 (handle_scalar_storage_order_attribute): Same.
424 (handle_mode_attribute): Same.
425 (handle_visibility_attribute): Same.
426 (handle_assume_aligned_attribute): Same.
427 (handle_no_split_stack_attribute): Same.
428 * c-common.c (shorten_compare): Same.
429 (c_common_truthvalue_conversion): Same.
430 (cb_get_source_date_epoch): Same.
431 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
432 in diagnostics.
433 (interpret_float): Same.
434 * c-omp.c (c_finish_omp_for): Same.
435 * c-opts.c (c_common_post_options): Same.
436 * c-pch.c (c_common_pch_pragma): Same.
437 * c-pragma.c (pop_alignment): Same.
438 (handle_pragma_pack): Same.
439 (apply_pragma_weak): Same.
440 (handle_pragma_weak): Same.
441 (handle_pragma_scalar_storage_order): Same.
442 (handle_pragma_redefine_extname): Same.
443 (add_to_renaming_pragma_list): Same.
444 (maybe_apply_renaming_pragma): Same.
445 (push_visibility): Same.
446 (handle_pragma_visibility): Same.
447 (handle_pragma_optimize): Same.
448 (handle_pragma_message): Same.
449 * c-warn.c (warn_for_omitted_condop): Same.
450 (lvalue_error): Same.
a9c697b8 451
6b943512
RB
4522019-05-15 Richard Biener <rguenther@suse.de>
453
454 PR c/90474
455 * c-common.c (c_common_mark_addressable_vec): Also mark
456 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
457 c_mark_addressable.
ab20d992 458
b744fc85
NS
4592019-05-06 Nathan Sidwell <nathan@acm.org>
460
461 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
462
598f50d7
NS
4632019-04-30 Nathan Sidwell <nathan@acm.org>
464
465 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
466
5bcc5a3b
ML
4672019-04-30 Martin Liska <mliska@suse.cz>
468
469 * c-pragma.c (handle_pragma_diagnostic): Provide hints
470 for unknown options.
471
e78a87f7
RS
4722019-04-26 Richard Sandiford <richard.sandiford@arm.com>
473
474 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
475 the pointer target rather than the pointer itself.
476
c280b7ee
JJ
4772019-04-19 Jakub Jelinek <jakub@redhat.com>
478
479 PR c/89888
480 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
481 arguments.
482 (c_do_switch_warnings): Remove outside_range_p argument.
483 * c-common.c (check_case_bounds): Removed.
484 (c_add_case_label): Remove orig_type and outside_range_p arguments.
485 Don't call check_case_bounds. Fold low_value as well as high_value.
486 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
487 Check for case labels outside of range of original type here and
488 adjust them.
489
8e8225e6
JJ
4902019-04-12 Jakub Jelinek <jakub@redhat.com>
491
63b8a166
JJ
492 PR translation/90041
493 * c.opt (-fhandle-exceptions): Use %< and %> around option names
494 in the Warn diagnostics.
495
8e8225e6
JJ
496 PR c/89946
497 * c-attribs.c (handle_patchable_function_entry_attribute): Add
498 function comment. Warn if arguments of the attribute are not positive
499 integer constants.
500
53a3f614
EB
5012019-04-09 Eric Botcazou <ebotcazou@adacore.com>
502
503 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
504 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
505
22be5873
EB
5062019-04-07 Eric Botcazou <ebotcazou@adacore.com>
507
508 * c-ada-spec.c (is_float128): New predicate extracted from...
509 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
510 <REAL_TYPE>: ...here. Call it.
511
34facf20
DM
5122019-04-05 David Malcolm <dmalcolm@redhat.com>
513
514 PR c/89985
515 * c-warn.c (check_address_or_pointer_of_packed_member): Add
516 auto_diagnostic_group. Guard inform calls by result of
517 warning_at call.
518
05564120
MP
5192019-04-05 Marek Polacek <polacek@redhat.com>
520
ab20d992 521 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
522 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
523 of RHS.
524
7a506c3c
JM
5252019-04-03 Jason Merrill <jason@redhat.com>
526
527 PR c++/86586 - -fcompare-debug=-Wsign-compare.
528 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
529
ddeae8c8
MS
5302019-04-01 Martin Sebor <msebor@redhat.com>
531
532 PR c/89685
533 * c-attribs.c (handle_copy_attribute): Handle references and
534 non-constant expressions.
535
a15ffa22
JJ
5362019-03-22 Jakub Jelinek <jakub@redhat.com>
537
538 PR c++/87481
539 * c.opt (-fconstexpr-ops-limit=): New option.
540
36a3a7a3
JJ
5412019-03-21 Jakub Jelinek <jakub@redhat.com>
542
543 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
544 template param.
545
bec1da64
MS
5462019-03-19 Martin Sebor <msebor@redhat.com>
547
548 PR tree-optimization/89688
549 * c-common.c (braced_list_to_string): Make static.
550 (braced_lists_to_strings): Define new function.
551 * c-common.h (braced_list_to_string): Remove.
552 (braced_lists_to_strings): Declare.
553
1fe61adf
ML
5542019-03-12 Martin Liska <mliska@suse.cz>
555
556 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
557
93964ebd
ML
5582019-03-11 Martin Liska <mliska@suse.cz>
559
560 * c-opts.c (c_common_post_options): Wrap apostrophes
561 in gcc internal format with %'.
562
a3f9f006
ML
5632019-03-11 Martin Liska <mliska@suse.cz>
564
565 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
566 in a string format message and fix GNU coding style.
567 * c-common.c (vector_types_convertible_p): Likewise.
568 (c_build_vec_perm_expr): Likewise.
569 * c-indentation.c (get_visual_column): Likewise.
570 * c-opts.c (c_common_handle_option): Likewise.
571 (c_common_post_options): Likewise.
572 (sanitize_cpp_opts): Likewise.
573 * c-pch.c (c_common_pch_pragma): Likewise.
574 * c-pragma.c (handle_pragma_pack): Likewise.
575
1db01ff9
JJ
5762019-03-08 Jakub Jelinek <jakub@redhat.com>
577
578 PR tree-optimization/89550
579 * c-common.c (c_common_truthvalue_conversion): Only set
580 TREE_NO_WARNING if warning_at returned true.
581 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
582
ba790e6f
JJ
5832019-02-25 Sandra Loosemore <sandra@codesourcery.com>
584 Martin Sebor <msebor@gmail.com>
585
586 * c.opt (Wmissing-attributes): Clean up doc string.
587
7da73ba7
JJ
5882019-02-25 Jakub Jelinek <jakub@redhat.com>
589
590 PR c/89495
591 * c-format.c (maybe_read_dollar_number): Compute nargnum in
592 HOST_WIDE_INT type to avoid overflows and change overflow_flag
593 checking.
594
921bb9d1
RB
5952019-02-22 Richard Biener <rguenther@suse.de>
596
597 * c-pch.c (no_checksum): Remove.
598 (pch_init): Remove assertion that executable_checksum is not
599 all zero.
600 (c_common_valid_pch): Likewise.
601
e2ebb05c
MS
6022019-02-18 Martin Sebor <msebor@redhat.com>
603
604 PR middle-end/89294
605 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
606
3fe53000
DM
6072019-02-16 David Malcolm <dmalcolm@redhat.com>
608
609 PR c++/88680
610 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
611 implementing -Wtype-limits.
612
28a8cef1
MS
6132019-02-11 Martin Sebor <msebor@redhat.com>
614
615 PR c++/87996
616 * c-common.c (invalid_array_size_error): New function.
617 (valid_array_size_p): Call it. Handle size as well as type.
618 * c-common.h (valid_constant_size_p): New function.
619 (enum cst_size_error): New type.
620
ec2be203
DM
6212019-01-31 David Malcolm <dmalcolm@redhat.com>
622
623 PR c/89122
624 * known-headers.cc (get_stdlib_header_for_name): Add
625 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
626
8936f047
JJ
6272019-01-31 Jakub Jelinek <jakub@redhat.com>
628
629 PR libstdc++/88170
630 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
631 a C cast in pp_c_flag_gnu_v3 mode.
632
6a335b96
JJ
6332019-01-29 Jakub Jelinek <jakub@redhat.com>
634
635 PR c/86125
636 * c-common.c (c_common_nodes_and_builtins): Build type variants for
637 builtin_structptr_types types even for C.
638
2a06eba5
BE
6392019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
640
641 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
642 when rhs is of array type correctly. Fix handling of nested structures.
643 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
644 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
645 type casts within nested compound expressions.
646
18a23298
JJ
6472019-01-22 Jakub Jelinek <jakub@redhat.com>
648
649 PR middle-end/88968
650 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
651 variable after using BIT_FIELD_REF.
652
420183d9
L
6532019-01-18 H.J. Lu <hongjiu.lu@intel.com>
654
655 PR c/51628
656 PR c/88664
657 * c-common.h (warn_for_address_or_pointer_of_packed_member):
658 Remove the boolean argument.
659 * c-warn.c (check_address_of_packed_member): Renamed to ...
660 (check_address_or_pointer_of_packed_member): This. Also
661 warn pointer conversion.
662 (check_and_warn_address_of_packed_member): Renamed to ...
663 (check_and_warn_address_or_pointer_of_packed_member): This.
664 Also warn pointer conversion.
665 (warn_for_address_or_pointer_of_packed_member): Remove the
666 boolean argument. Don't check pointer conversion here.
667
99063eee
RS
6682019-01-15 Richard Sandiford <richard.sandiford@arm.com>
669
670 PR inline-asm/52813
671 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
672
a30d0196
JJ
6732019-01-14 Jakub Jelinek <jakub@redhat.com>
674
675 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
676 and __cpp_nontype_template_parameter_auto. Add a comment that
677 __cpp_template_auto is deprecated.
678
2d91f79d
TH
6792019-01-14 Tom Honermann <tom@honermann.net>
680
681 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
682 * c-common.c (c_common_reswords): Add char8_t.
683 (fix_string_type): Use char8_t for the type of u8 string literals.
684 (c_common_get_alias_set): char8_t doesn't alias.
685 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
686 C++.
687 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
688 (keyword_begins_type_specifier): Add RID_CHAR8.
689 * c-common.h (rid): Add RID_CHAR8.
690 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
691 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
692 Define char8_type_node and char8_array_type_node.
693 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
694 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
695 (c_cpp_builtins): Predefine __cpp_char8_t.
696 * c-lex.c (lex_string): Use char8_array_type_node as the type of
697 CPP_UTF8STRING.
698 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
699 * c-opts.c: If not otherwise specified, enable -fchar8_t when
700 targeting C++2a.
701 * c.opt: Add the -fchar8_t command line option.
702
23db6ced
MS
7032019-01-14 Martin Sebor <msebor@redhat.com>
704
705 PR target/88638
706 * c-attribs.c (positional_argument): Call valid_format_string_type_p
707 and issue errors if it fails.
708 * c-common.h (valid_format_string_type_p): Declare.
709 * c-format.c (valid_stringptr_type_p): Rename...
710 (valid_format_string_type_p): ...to this and make extern.
711 (handle_format_arg_attribute): Adjust to new name.
712 (check_format_string): Same.
713
234c3818
L
7142019-01-13 H.J. Lu <hongjiu.lu@intel.com>
715
716 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
717 Replace "may may" with "may" in warning message.
718
d8fcab68
JJ
7192019-01-07 Jakub Jelinek <jakub@redhat.com>
720
721 PR c++/85052
722 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
723 (c_build_vec_convert): Declare.
724 * c-common.c (c_build_vec_convert): New function.
725
29d24852
MS
7262019-01-04 Martin Sebor <msebor@redhat.com>
727
728 PR c/88546
729 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
730 Handle C++ empty throw specification and C11 _Noreturn.
731 (has_attribute): Also handle C11 _Noreturn.
732
9069a4c9
MS
7332019-01-04 Martin Sebor <msebor@redhat.com>
734
735 PR c/88363
736 * c-attribs.c (positional_argument): Also accept enumerated types.
737
a5544970
JJ
7382019-01-01 Jakub Jelinek <jakub@redhat.com>
739
740 Update copyright years.
741
da77eace
L
7422018-12-20 H.J. Lu <hongjiu.lu@intel.com>
743
744 PR c/51628
745 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
746 * c-warn.c (check_alignment_of_packed_member): New function.
747 (check_address_of_packed_member): Likewise.
748 (check_and_warn_address_of_packed_member): Likewise.
749 (warn_for_address_or_pointer_of_packed_member): Likewise.
750 * c.opt: Add -Wno-address-of-packed-member.
751
573767d4
DM
7522018-12-20 David Malcolm <dmalcolm@redhat.com>
753
754 PR c++/87504
755 * c-warn.c (get_outermost_macro_expansion): New function.
756 (spelled_the_same_p): Use it to unwind the macro expansions, and
757 compare the outermost macro in each nested expansion, rather than
758 the innermost.
759
a14feb3c
DM
7602018-12-19 David Malcolm <dmalcolm@redhat.com>
761
762 PR c++/87504
763 * c-common.h (warn_tautological_cmp): Convert 1st param from
764 location_t to const op_location_t &.
765 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
766 when testing for INTEGER_CST.
767 (warn_tautological_bitwise_comparison): Convert 1st param from
768 location_t to const op_location_t &; use it to build a
769 binary_op_rich_location, and use this.
770 (spelled_the_same_p): New function.
771 (warn_tautological_cmp): Convert 1st param from location_t to
772 const op_location_t &. Warn for macro expansions if
773 spelled_the_same_p. Use binary_op_rich_location.
774
dfd7fdca
DM
7752018-12-19 David Malcolm <dmalcolm@redhat.com>
776
777 PR c++/43064
778 PR c++/43486
779 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
780 (verify_tree): Handle location wrappers.
781 (c_common_truthvalue_conversion): Strip any location wrapper.
782 Handle CONST_DECL.
783 (fold_offsetof): Strip any location wrapper.
784 (complete_array_type): Likewise for initial_value.
785 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
786 index before checking for INTEGER_CST.
787 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
788 print parentheses around location wrappers.
789 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
790 before checking for INTEGER_CST.
791 (warn_tautological_bitwise_comparison): Call
792 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
793 before checking for INTEGER_CST.
794 (readonly_error): Strip any location wrapper.
795 (warn_array_subscript_with_type_char): Strip location wrappers
796 before checking for INTEGER_CST. Use the location of the index if
797 available.
798
5c8b3702
JM
7992018-12-06 Jason Merrill <jason@redhat.com>
800
801 PR c++/88136 - -Wdeprecated-copy false positives
802 * c.opt (Wdeprecated-copy-dtor): New.
803 (Wdeprecated-copy): Move to -Wextra.
804
673670da
MS
8052018-11-29 Martin Sebor <msebor@redhat.com>
806
807 PR c/88172
808 PR testsuite/88208
809 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
810 alignments to values less than the target requires.
811 (has_attribute): For attribute aligned consider both the attribute
812 and the alignment bits.
813 * c-common.c (c_init_attributes): Optionally issue a warning for
814 zero alignment.
815
04864ec8
MS
8162018-11-28 Martin Sebor <msebor@redhat.com>
817
818 PR c/88065
819 PR c/87297
820 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
821 or destination is an error.
822
ace83db0
JJ
8232018-11-28 Jakub Jelinek <jakub@redhat.com>
824
825 PR c++/88215
826 * c-ubsan.c: Include langhooks.h.
827 (ubsan_instrument_division): Change gcc_assert that main variants
828 of op0 and op1 types are equal to gcc_checking_assert that the
829 main variants are compatible types.
830
da193a27
EB
8312018-11-27 Eric Botcazou <ebotcazou@adacore.com>
832
833 * c-ada-spec.c: Include stringpool.h.
834 (has_static_fields): Return false for incomplete types.
835 (is_tagged_type): Likewise.
836 (has_nontrivial_methods): Likewise.
837 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
838 (struct overloaded_name_hash): New structure.
839 (struct overloaded_name_hasher): Likewise.
840 (overloaded_names): New global variable.
841 (init_overloaded_names): New static function.
842 (overloaded_name_p): New predicate.
843 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
844 on the TYPE_STUB_DECL of the original type of a typedef, if any.
845 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
846 Remove always-true condition and dump forward types.
847 (dump_ada_specs): Delete overloaded_names.
848
98f08eb8
MS
8492018-11-20 Martin Sebor <msebor@redhat.com>
850
851 * c-attribs.c (type_for_vector_size): New function.
852 (type_valid_for_vector_size): Same.
853 (handle_vector_size_attribute): Move code to the functions above
854 and call them.
855 (validate_attribute, has_attribute): New functions.
856 * c-common.h (has_attribute): Declare.
857 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
858 * c-common.c (c_common_resword): Same.
859
2674fa47
JM
8602018-11-16 Jason Merrill <jason@redhat.com>
861
862 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
863 * c-attribs.c (attr_cold_hot_exclusions): Make public.
864
258b3854
JJ
8652018-11-16 Jakub Jelinek <jakub@redhat.com>
866
867 PR middle-end/87854
868 * c-common.c (fix_string_type): Reject string literals larger than
869 TYPE_MAX_VALUE (ssizetype) bytes.
870
1d249509
MS
8712018-11-15 Martin Sebor <msebor@redhat.com>
872
873 PR c++/87541
874 PR c++/87542
875 * c-attribs.c (positional_argument): New function.
876 (handle_alloc_size_attribute): Use it and simplify.
877 (handle_alloc_align_attribute): Same.
878 (handle_assume_aligned_attribute): Same.
879 (handle_nonnull_attribute): Same.
880 * c-common.c (check_function_arguments): Pass fntype to
881 check_function_format.
882 * c-common.h (check_function_format): Add an argument.
883 (PosArgFlags, positional_argument): Declare new type and function.
884 * c-format.c (decode_format_attr): Add arguments.
885 (check_format_string, get_constant): Same.
886 (convert_format_name_to_system_name): Adjust.
887
478dd60d
DM
8882018-11-15 David Malcolm <dmalcolm@redhat.com>
889
890 PR other/19165
891 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
892
8cca0163
JJ
8932018-11-14 Jakub Jelinek <jakub@redhat.com>
894
8ee09943
JJ
895 P1236R1 - Signed integers are two's complement
896 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
897 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
898 with in-range second operand well defined for -std=c++2a.
899
8cca0163
JJ
900 PR other/88007
901 * c-common.c (parse_optimize_options): Allocate option string from
902 opts_obstack rather than as GC memory. Move the allocation after
903 warning for invalid option.
904
620e594b
DM
9052018-11-13 David Malcolm <dmalcolm@redhat.com>
906
907 * c-common.c (c_get_substring_location): Update for renaming of
908 get_source_location_for_substring to get_location_within_string.
909 * c-lex.c: Replace "source_location" with "location_t".
910 * c-opts.c: Likewise.
911 * c-ppoutput.c: Likewise.
912
f9731de3
MS
9132018-11-13 Martin Sebor <msebor@redhat.com>
914
915 PR middle-end/81824
916 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
917 (handle_tls_model_attribute): Improve diagnostics.
918
e4bd6d5e
JM
9192018-11-12 Jason Merrill <jason@redhat.com>
920
a6bb6b07
JM
921 * c-cppbuiltin.c (c_cpp_builtins): Define
922 __cpp_impl_destroying_delete.
923
e4bd6d5e
JM
924 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
925 __cpp_conditional_explicit.
926
79a2c428
MS
9272018-11-09 Martin Sebor <msebor@redhat.com>
928
929 PR middle-end/81824
930 * c-attribs.c (handle_copy_attribute): New function.
931
4c7bd361
MS
9322018-11-09 Martin Sebor <msebor@redhat.com>
933
934 PR c/87795
935 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
936
28567c40
JJ
9372018-11-08 Jakub Jelinek <jakub@redhat.com>
938
939 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
940 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
941 enum omp_memory_order MEMORY_ORDER.
942 (c_finish_omp_flush): Add MO argument.
943 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
944 (c_finish_omp_for): Add FINAL_P argument.
945 * c-omp.c: Include memmodel.h.
946 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
947 OMP_TASKGROUP_CLAUSES to it.
948 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
949 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
950 instead of OMP_ATOMIC_SEQ_CST.
951 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
952 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
953 __atomic_thread_fence call with the given value.
954 (check_omp_for_incr_expr): Formatting fixes.
955 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
956 even in OpenMP loops, diagnose if NE_EXPR and incr expression
957 is not constant expression 1 or -1. Transform NE_EXPR loops
958 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
959 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
960 loops too.
961 (c_omp_split_clauses): Add support for combined
962 #pragma omp parallel master and
963 #pragma omp {,parallel }master taskloop{, simd} constructs.
964 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
965 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
966 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
967 (c_omp_predetermined_sharing): Don't return
968 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
969 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
970 PRAGMA_OMP_REQUIRES.
971 * c-pragma.h (enum pragma_kind): Likewise.
972 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
973 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
974
204839e7
DM
9752018-11-08 David Malcolm <dmalcolm@redhat.com>
976
977 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
978
d8010ee4
DM
9792018-11-08 David Malcolm <dmalcolm@redhat.com>
980
981 * c-format.c (local_cgraph_node_ptr_node): New variable.
982 (gcc_dump_printf_char_table): Add entry for %C.
983 (get_pointer_to_named_type): New function, taken from the handling
984 code for "gimple *" from...
985 (init_dynamic_diag_info): ...here. Add handling for
986 "cgraph_node *".
987 * c-format.h (T_CGRAPH_NODE): New.
988
4be5c72c
JM
9892018-10-19 Jason Merrill <jason@redhat.com>
990
991 * c-cppbuiltin.c (c_cpp_builtins): Add
992 __cpp_nontype_template_parameter_class.
993
f3f6029d
NS
9942018-10-31 Nathan Sidwell <nathan@acm.org>
995
ab5324fb
NS
996 * c-opts.c (c_finish_options): Force command line macro
997 location. Refactor to avoid repeating main debug hook.
998 (push_command_line_include): Clarify comment.
999
f3f6029d
NS
1000 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1001
91e3ec29
MS
10022018-10-30 Martin Sebor <msebor@redhat.com>
1003
1004 PR middle-end/87041
1005 * c-format.c (check_format_types): Avoid diagnosing null pointer
1006 arguments to printf-family of functions.
1007
b5ff4f5c
MP
10082018-10-30 Marek Polacek <polacek@redhat.com>
1009
1010 Implement P0892R2, explicit(bool).
1011 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1012
7e2de6df
DM
10132018-10-29 David Malcolm <dmalcolm@redhat.com>
1014
1015 * name-hint.h (name_hint::take_deferred): New member function.
1016
b2bf438c
DM
10172018-10-29 David Malcolm <dmalcolm@redhat.com>
1018
1019 PR c++/56856
1020 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1021 argument.
1022 (check_function_restrict): Rename param "argarray" to
1023 "unfolded_argarray", and make a copy named "argarray", calling
1024 fold_for_warn on each argument.
1025 (check_function_arguments): Add note about responsibility for
1026 folding the arguments.
1027
9f936c86
JM
10282018-10-17 Joseph Myers <joseph@codesourcery.com>
1029
1030 * c-common.c (flag_isoc2x): New variable.
1031 * c-common.h (clk_c): Update comment to reference C2X.
1032 (flag_isoc99, flag_isoc11): Update comments to reference future
1033 standard versions in general.
1034 (flag_isoc2x): Declare.
1035 * c-opts.c (set_std_c2x): New function.
1036 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1037 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1038 flag_isoc2x to 0.
1039 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1040
7a8a92c4
JM
10412018-10-17 Joseph Myers <joseph@codesourcery.com>
1042
1043 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1044 (std=iso9899:2018): Document C17 as published in 2018.
1045
4dc003ff
CL
10462018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1047
1048 PR c++/87364
1049 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1050
79371671
WW
10512018-10-11 Will Wray <wjwray@gmail.com>
1052
1053 PR c++/87364
1054 * c-pretty-print.h (pp_c_type_cast): Prototype.
1055 (pp_c_integer_constant): Likewise.
1056 * c-pretty-print.c (pp_c_type_cast): No longer static.
1057 (pp_c_integer_constant): Likewise.
1058 (pp_c_enumeration_constant): Fix loop termination when finding
1059 name of constant. No longer returns a value. Call
1060 pp_c_integer_constant.
1061 (c_pretty_printer::constant): Update for changes to
1062 pp_c_enumeration_constant.
1063
46c62690
JJ
10642018-10-11 Jakub Jelinek <jakub@redhat.com>
1065
1066 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1067 for no_unique_address.
1068
c24300ba
DM
10692018-10-09 David Malcolm <dmalcolm@redhat.com>
1070
1071 * c-common.c (c_option_controlling_cpp_error): Rename to...
1072 (c_option_controlling_cpp_diagnostic): ...this, and convert
1073 "reason" from int to enum.
1074 (c_cpp_error): Rename to...
1075 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1076 * c-common.h (c_cpp_error): Rename to...
1077 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1078 * c-opts.c (c_common_init_options): Update for renaming.
1079
8656dafa
RS
10802018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1081
1082 PR c/87286
1083 * c-common.c (vector_types_compatible_elements_p): Use
1084 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1085
8cff0652
VK
10862018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1087
1088 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1089 to generate constructor destructor priority warning.
1090 * c.opt (-Wprio-ctor-dtor): New option.
1091
bedf03a2
JM
10922018-10-01 Jason Merrill <jason@redhat.com>
1093
1094 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1095
6cc430c1
EB
10962018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1097
1098 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1099 (dump_ada_node): Add const keyword.
1100
87677ac7
ML
11012018-09-25 Martin Liska <mliska@suse.cz>
1102
1103 * c-common.c (c_common_truthvalue_conversion):
1104 Remove Pascal from documentation.
1105
518196cb
EB
11062018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1107
1108 * c-ada-spec.c: Include diagnostic.h.
1109 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1110
a599af84
MP
11112018-09-19 Marek Polacek <polacek@redhat.com>
1112
1113 * c.opt (Wclass-conversion): New.
1114
9c4a4b3c
DM
11152018-09-17 David Malcolm <dmalcolm@redhat.com>
1116
1117 * c-format.c (range_label_for_format_type_mismatch::get_text):
1118 Update for new param.
1119
c896ecfe
DM
11202018-09-17 David Malcolm <dmalcolm@redhat.com>
1121
1122 * c-format.c (format_warning_at_char): Update for introduction of
1123 format_string_diagnostic_t.
1124 (format_type_warning): Likewise.
1125
80c6d1f4
MJ
11262018-09-17 Martin Jambor <mjambor@suse.cz>
1127
1128 PR c/63886
1129 * c.opt (Wabsolute-value): New.
1130
6d900107
BE
11312018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1132
1133 * c-common.c (complete_flexible_array_elts): New helper function.
1134 * c-common.h (complete_flexible_array_elts): Declare.
1135
b5764229
BE
11362018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1137
1138 * c-common.c (braced_list_to_string): Remove eval parameter.
1139 Add some more checks. Always create zero-terminated STRING_CST.
1140 * c-common.h (braced_list_to_string): Adjust prototype.
1141
85204e23
DM
11422018-08-27 David Malcolm <dmalcolm@redhat.com>
1143
1144 PR 87091
1145 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1146 to a tri-state.
1147 (maybe_suggest_missing_token_insertion): Likewise.
1148 (maybe_add_include_fixit): Add param "override_location". If set,
1149 and source-printing is enabled, then override the rich_location's
1150 primary location with that of the insertion point for the fix-it
1151 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1152 * c-common.h (extern void maybe_add_include_fixit): Add bool
1153 param.
1154 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1155 for conversion of show_caret_p to a tri-state.
1156 * c-warn.c (warn_for_restrict): Likewise.
1157 * known-headers.cc
1158 (suggest_missing_header::~suggest_missing_header): Update call to
1159 maybe_add_include_fixit to suggest overriding the location, as it
1160 is for a note.
1161
3d78e008
ML
11622018-08-27 Martin Liska <mliska@suse.cz>
1163
1164 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1165 fndecl_built_in_p and remove check for FUNCTION_DECL if
1166 possible.
3d78e008
ML
1167 (check_builtin_function_arguments): Likewise.
1168 (reject_gcc_builtin): Likewise.
1169 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1170
b5be6d0c
MP
11712018-08-26 Marek Polacek <polacek@redhat.com>
1172
1173 PR c++/87029, Implement -Wredundant-move.
1174 * c.opt (Wredundant-move): New option.
1175
79ca9c35
MP
11762018-08-21 Marek Polacek <polacek@redhat.com>
1177
1178 PR c++/86981, Implement -Wpessimizing-move.
1179 * c.opt (Wpessimizing-move): New option.
1180
097f82ec
DM
11812018-08-20 David Malcolm <dmalcolm@redhat.com>
1182
1183 PR other/84889
1184 * c-attribs.c (common_handle_aligned_attribute): Add
1185 auto_diagnostic_group instance.
1186 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1187 * c-opts.c (c_common_post_options): Likewise.
1188 * c-warn.c (warn_logical_not_parentheses): Likewise.
1189 (warn_duplicated_cond_add_or_warn): Likewise.
1190 (warn_for_multistatement_macros): Likewise.
1191
3fb558b1
NS
11922018-08-20 Nathan Sidwell <nathan@acm.org>
1193
1194 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1195 access.
1196
800c0e98
NS
11972018-08-17 Nathan Sidwell <nathan@acm.org>
1198
1199 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1200 field.
1201 (laxy_hex_fp_value_count): Make unsigned.
1202 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1203 manipulate the macro.
1204 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1205 cpp_define_lazily.
1206
6f795a92
DM
12072018-08-17 David Malcolm <dmalcolm@redhat.com>
1208
1209 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1210 (gcc_dump_printf_length_specs): New.
1211 (gcc_dump_printf_flag_pairs): New.
1212 (gcc_dump_printf_flag_specs): New.
1213 (gcc_dump_printf_char_table): New.
1214 (format_types_orig): Add entry for "gcc_dump_printf".
1215 (init_dynamic_diag_info): Set up length_char_specs and
1216 conversion_specs for gcc_dump_printf_format_type.
1217 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1218
c5d725c0
NS
12192018-08-17 Nathan Sidwell <nathan@acm.org>
1220
10f04917
NS
1221 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1222
c5d725c0
NS
1223 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1224 * c-cppbuiltin.c: Likewise.
1225
c0c12356
ML
12262018-08-17 Martin Liska <mliska@suse.cz>
1227
1228 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1229 Ignore/Deprecated flag. Warning is done automatically for
1230 Deprecated flags.
c0c12356 1231
10fcc142
DM
12322018-08-16 David Malcolm <dmalcolm@redhat.com>
1233
1234 PR c++/70693
1235 * c-common.c (selftest::c_family_tests): Call
1236 selftest::c_indentation_c_tests.
1237 * c-common.h (selftest::c_indentation_c_tests): New decl.
1238 * c-indentation.c: Include "selftest.h".
1239 (next_tab_stop): Add "tab_width" param, rather than accessing
1240 cpp_opts.
1241 (get_visual_column): Likewise. Clarify comment. Bulletproof
1242 against reading past the end of the line.
1243 (get_first_nws_vis_column): Add "tab_width" param.
1244 (detect_intervening_unindent): Likewise.
1245 (should_warn_for_misleading_indentation): Read tab width from
1246 cpp_opts and pass around.
1247 (selftest::test_next_tab_stop): New test.
1248 (selftest::assert_get_visual_column_succeeds): New function.
1249 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1250 (selftest::assert_get_visual_column_fails): New function.
1251 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1252 (selftest::test_get_visual_column): New test.
1253 (selftest::c_indentation_c_tests): New function.
1254
3f6677f4
NS
12552018-08-16 Nathan Sidwell <nathan@acm.org>
1256
1257 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1258 (store_ada_macro): Likewise.
1259 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1260 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1261
96e6ae57
DM
12622018-08-15 David Malcolm <dmalcolm@redhat.com>
1263
1264 * c-format.c: Include "selftest-diagnostic.h" and
1265 "gcc-rich-location.h".
1266 (format_warning_at_char): Pass NULL for new label params of
1267 format_warning_va.
1268 (class indirection_suffix): New class.
1269 (class range_label_for_format_type_mismatch): New class.
1270 (format_type_warning): Move logic for generating "*" suffix to
1271 class indirection_suffix. Create "fmt_label" and "param_label"
1272 to show their types, and pass them to the
1273 format_warning_at_substring calls.
1274 (selftest::test_type_mismatch_range_labels): New test.
1275 (selftest::c_format_c_tests): Call it.
1276
23aa9f7c
MS
12772018-08-13 Martin Sebor <msebor@redhat.com>
1278
1279 PR tree-optimization/71625
1280 * c-common.c (braced_list_to_string): New function.
1281 * c-common.h (braced_list_to_string): Declare it.
1282
f10a9135
NS
12832018-08-08 Nathan Sidwell <nathan@acm.org>
1284
1285 * c-common.c (try_to_locate_new_include_inertion_point): Use
1286 linemap_included_from_linemap.
1287 * c-lex.c (fe_file_change): Use linemap_included_from.
1288 * c-ppoutput.c (pp_file_change): Likewise.
1289
8a45b051
MS
12902018-08-01 Martin Sebor <msebor@redhat.com>
1291
1292 PR tree-optimization/86650
ab20d992 1293 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1294 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1295 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1296 * c-format.h (T89_G): Update to be "gimple *" rather than
1297 "gcall *".
1298 (local_gcall_ptr_node): Rename...
1299 (local_gimple_ptr_node): ...to this.
1300
e540ccc0
DM
13012018-07-31 David Malcolm <dmalcolm@redhat.com>
1302
1303 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1304 table entries for gcc_diag_char_table, and the 'Z' entry from
1305 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1306 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1307 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1308 adding missing "Z" for this table. Remove erroneous "G" and "K"
1309 entries.
1310 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1311 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1312 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1313
425fc685
RE
13142018-07-31 Richard Earnshaw <rearnsha@arm.com>
1315
1316 * c-common.c (speculation_safe_resolve_call): New function.
1317 (speculation_safe_resolve_params): New function.
1318 (speculation_safe_resolve_return): New function.
1319 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1320 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1321 __HAVE_SPECULATION_SAFE_VALUE.
1322
181463c2
DM
13232018-07-20 David Malcolm <dmalcolm@redhat.com>
1324
1325 * c-common.c (c_cpp_error): Remove redundant "line_table"
1326 parameter from call to rich_location::set_range.
1327 (maybe_suggest_missing_token_insertion): Likewise.
1328
0d7f9065
MS
13292018-07-20 Martin Sebor <msebor@redhat.com>
1330
1331 PR middle-end/82063
ab20d992 1332 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1333
00abf86c
MS
13342018-07-20 Martin Sebor <msebor@redhat.com>
1335
1336 PR middle-end/82063
1337 * c-common.h (c_common_handle_option): Change function argument
1338 to HOST_WIDE_INT.
1339 * c-opts.c (c_common_init_options): Same.
1340 (c_common_handle_option): Same. Remove special handling of
1341 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1342 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1343 options to take a HOST_WIDE_INT argument and accept a byte-size
1344 suffix. Initialize.
1345 (-Wvla-larger-than): Same.
1346 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1347 (-Wno-vla-larger-than): Same.
1348
9b452033
JJ
13492018-07-12 Jakub Jelinek <jakub@redhat.com>
1350
1351 * c-attribs.c (c_common_attribute_table): Add
1352 "omp declare target implicit" attribute.
1353
cd0762f3
RB
13542018-07-12 Richard Biener <rguenther@suse.de>
1355
1356 PR c/86453
1357 * c-attribs.c (handle_packed_attribute): Do not build a variant
1358 type with TYPE_PACKED, instead ignore the attribute if we may
1359 not apply to the original type.
1360
0b27c3ed
JJ
13612018-07-10 Jakub Jelinek <jakub@redhat.com>
1362
1363 PR c++/86443
1364 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1365 to contain TREE_LIST for both the original class iterator and the
1366 "last" helper var.
1367
e730a0ef
EB
13682018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1369
1370 * c-ada-spec.c (to_ada_name): Remove index parameter.
1371 (pp_ada_tree_identifier): Likewise.
1372 (dump_ada_macros): Adjust call to to_ada_name.
1373 (struct overloaded_name_hash): Delete.
1374 (struct overloaded_name_hasher): Likewise.
1375 (overloaded_names): Likewise.
1376 (compute_overloading_index): Likewise.
1377 (dump_ada_decl_name): Do not call compute_overloading_index and
1378 adjust calls to pp_ada_tree_identifier.
1379 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1380 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1381 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1382 (dump_ada_enum_type): Remove type and display_convention parameters.
1383 Adjust calls to pp_ada_tree_identifier.
1384 (dump_ada_node): Likewise and for dump_ada_structure.
1385 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1386 and tidy up.
1387 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1388 syntax.
1389 (print_constructor): Adjust call to pp_ada_tree_identifier.
1390 (print_destructor): Likewise.
1391 (dump_ada_declaration): Switch to aspect syntax.
1392 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1393 parameter with nested parameter.
1394 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1395 (dump_ada_specs): Do not delete overloaded_names table.
1396
8de583fc
PB
13972018-07-06 Peter Bergner <bergner@linux.ibm.com>
1398
1399 PR target/86324
e730a0ef 1400 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1401 target hook.
1402
09cff37b
NS
14032018-07-05 Nathan Sidwell <nathan@acm.org>
1404
1405 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1406 NO_IMPLICIT_EXTERN_C.
1407
98086b2b
ML
14082018-06-28 Martin Liska <mliska@suse.cz>
1409
1410 * cppspec.c: Include opt-suggestions.h.
1411
ab20d992
JJ
14122018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1413 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1414 Cesar Philippidis <cesar@codesourcery.com>
1415
1416 * c-pragma.h (enum pragma_omp_clause): Add
1417 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1418 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1419
f41b7612
JJ
14202018-06-20 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR c++/86210
1423 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1424 comment.
1425
4252ccd7
MS
14262018-06-18 Martin Sebor <msebor@redhat.com>
1427
1428 PR middle-end/85602
1429 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1430 nonstring.
1431
e197e64e
KV
14322018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1433
1434 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1435
34a7a230
JM
14362018-06-13 Jason Merrill <jason@redhat.com>
1437
5cef3733
JM
1438 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1439 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1440 handling.
1441
34a7a230
JM
1442 PR c++/86094 - wrong code with defaulted move ctor.
1443 * c-opts.c (c_common_post_options): Bump the current ABI version to
1444 13. Set warn_abi_version and flag_abi_compat_version to the current
1445 version rather than 0. Fix defaulting flag_abi_compat_version from
1446 warn_abi_version.
1447
bb0f14ae
MS
14482018-06-12 Martin Sebor <msebor@redhat.com>
1449
1450 PR c/85931
1451 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1452 sizeof source and destination yields the same value.
1453
3713f2e2
ML
14542018-06-12 Martin Liska <mliska@suse.cz>
1455
1456 * c.opt: Make MPX-related options as Deprecated.
1457
4af78ef8
DM
14582018-06-08 David Malcolm <dmalcolm@redhat.com>
1459
1460 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1461 rather than 0.
1462
31db0fe0
ML
14632018-06-08 Martin Liska <mliska@suse.cz>
1464
1465 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1466 for MPX (macros, related functions, fields in cgraph_node, ...).
1467 (handle_bnd_legacy): Likewise.
1468 (handle_bnd_instrument): Likewise.
1469 * c.opt: Likewise.
1470
fe16acf2
JJ
14712018-06-06 Jakub Jelinek <jakub@redhat.com>
1472
1473 PR c++/86068
1474 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1475 __cpp_transactional_memory to 201500 instead of 210500.
1476
4dbdb49b
JM
14772018-06-06 Jason Merrill <jason@redhat.com>
1478
1479 PR c++/85710 - ICE with -Wmemset-elt-size.
1480 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1481
f8ad043f
JM
14822018-06-01 Jason Merrill <jason@redhat.com>
1483
1484 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1485 201703.
1486
abc24d93
EB
14872018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1488
1489 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1490 declaration for a typedef independently of whether the declaration of
1491 the subtype is generated.
1492
d258f4aa
MS
14932018-05-31 Martin Sebor <msebor@redhat.com>
1494
1495 PR c/82063
1496 * c.opt (-Wno-alloc-size-larger-than): New option.
1497
b67b9225
DP
14982018-04-22 David Pagan <dave.pagan@oracle.com>
1499
1500 PR c/55976
1501 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1502 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1503 differentiate between default (no option), -Wreturn-type, and
1504 -Wno-return-type.
1505
04eb9c55
JM
15062018-05-29 Jason Merrill <jason@redhat.com>
1507
1508 * c.opt (Winit-list-lifetime): New flag.
1509
b0c31bc6
BE
15102018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1511
1512 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1513 splay_tree_delete_pointers.
1514
44284983
JJ
15152018-05-26 Jakub Jelinek <jakub@redhat.com>
1516
1517 PR bootstrap/85921
1518 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1519 noinline variable to workaround broken kernel headers.
1520
b46b715d
JM
15212018-05-18 Jason Merrill <jason@redhat.com>
1522
1523 * c.opt (Wdeprecated-copy): New flag.
1524
40659769
ML
15252018-05-17 Martin Liska <mliska@suse.cz>
1526
1527 * c-warn.c (overflow_warning): Do not use
1528 space in between 'G_' and '('.
1529
403962ea
JM
15302018-05-09 Jason Merrill <jason@redhat.com>
1531
1532 * c-common.c (valid_array_size_p): Add complain parameter.
1533 * c-common.h: ...which defaults to true.
1534
1c9ee609
JJ
15352018-05-11 Jakub Jelinek <jakub@redhat.com>
1536
1537 PR c/85696
1538 * c-omp.c (c_omp_predetermined_sharing): Return
1539 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1540
19916065
ML
15412018-05-11 Martin Liska <mliska@suse.cz>
1542
92a285c1 1543 PR sanitizer/85556
19916065
ML
1544 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1545 TREE_LIST values.
1546
79e7b1fe
JJ
15472018-05-10 Jakub Jelinek <jakub@redhat.com>
1548
1549 PR c++/85662
1550 * c-common.h (fold_offsetof_1): Removed.
1551 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1552 CTX argument defaulted to ERROR_MARK.
1553 * c-common.c (fold_offsetof_1): Renamed to ...
1554 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1555 argument, convert the pointer constant to TYPE and use size_binop
1556 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1557 a pointer type. Adjust recursive calls.
1558
86c12f76
EB
15592018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1560
1561 PR c++/85400
1562 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1563
ee336e84
NS
15642018-05-07 Nathan Sidwell <nathan@acm.org>
1565
1566 * c.opt (ffor-scope): Remove functionality, issue warning.
1567
6c072e21
NS
15682018-05-03 Nathan Sidwell <nathan@acm.org>
1569
1570 * c.opt (ffriend-injection): Remove functionality, issue warning.
1571
2cc7d3a7
DM
15722018-05-01 David Malcolm <dmalcolm@redhat.com>
1573
1574 PR c/84258
1575 * c-format.c (struct format_check_results): Add field
1576 "number_non_char".
1577 (check_format_info): Initialize it, and warn if encountered.
1578 (check_format_arg): Distinguish between wide char and
1579 everything else when detecting arrays of non-char.
1580
7761dfbe
DM
15812018-04-30 David Malcolm <dmalcolm@redhat.com>
1582
1583 * c-format.c (get_corrected_substring): Update for
1584 location_get_source_line returning a char_span. Use a char_span
1585 when handling the prefix of the correction.
1586 * c-indentation.c (get_visual_column): Update for
1587 location_get_source_line returning a char_span.
1588 (get_first_nws_vis_column): Likewise.
1589
62e98ef1
DM
15902018-03-29 David Malcolm <dmalcolm@redhat.com>
1591
1592 PR c++/84269
1593 * known-headers.cc (get_stdlib_header_for_name): Add various names
1594 from <assert.h>, <string.h>, and <memory.h>; add more names from
1595 <stdio.h>.
1596
a7dea617
JJ
15972018-03-27 Jakub Jelinek <jakub@redhat.com>
1598
1599 PR c++/85061
1600 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1601 get_base_address of the second operand is a VAR_P, rather than the
1602 operand itself, and use gcc_checking_assert instead of gcc_assert.
1603
889a3a30
MP
16042018-03-23 Marek Polacek <polacek@redhat.com>
1605
1606 PR c++/85045
1607 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1608 <case RDIV_EXPR>: Tweak condition.
1609
452154b9
EB
16102018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1611
1612 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1613
63ecb626
JJ
16142018-03-16 Jakub Jelinek <jakub@redhat.com>
1615
ce811fc4
JJ
1616 PR c/84909
1617 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1618 diagnostics.
1619
63ecb626
JJ
1620 PR c/84910
1621 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1622 diagnostics.
1623
a1295eec
RB
16242018-03-16 Richard Biener <rguenther@suse.de>
1625
1626 PR c/84873
1627 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1628 unshare the possibly folded expression.
1629
919674fb
RB
16302018-03-15 Richard Biener <rguenther@suse.de>
1631
1632 PR c/84873
1633 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1634
f99309b2
MS
16352018-03-13 Martin Sebor <msebor@redhat.com>
1636
1637 PR tree-optimization/84725
1638 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1639 with all three narrow character types, including their qualified forms.
1640
e9b9fa4c
MS
16412018-03-12 Martin Sebor <msebor@redhat.com>
1642
1643 PR tree-optimization/83456
ab20d992 1644 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
1645 Restore checking of bounded built-in functions.
1646 (check_function_arguments): Also return the result
1647 of warn_for_restrict.
ab20d992
JJ
1648 * c-common.c (check_function_restrict): Return bool.
1649 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 1650
0805d020
MP
16512018-03-02 Marek Polacek <polacek@redhat.com>
1652
1653 PR c++/84171
1654 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1655 is erroneous.
1656
ed2a2f08
TS
16572018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1658
1659 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1660 function".
1661
90abdde0
MP
16622018-03-01 Marek Polacek <polacek@redhat.com>
1663
1664 PR c++/84639
1665 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1666 alignment in computation.
1667
c6db43fa
EB
16682018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1669
1670 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1671 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1672
9e25c7ed
EB
16732018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1674
1675 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1676 (is_char_array): Take a type instead of a declaration.
1677 (dump_ada_array_type): Likewise.
1678 (is_simple_enum): Minor tweak.
1679 (dump_ada_enum_type): New function extracted from...
1680 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1681 <INTEGER_TYPE>: Remove unreachable code.
1682 <RECORD_TYPE>: Likewise. Minor tweaks.
1683 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1684 <ENUMERAL_TYPE>: New case.
1685 <RECORD_TYPE>: Factor out common code.
1686 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1687 Minor tweaks. Deal with enumeral types.
1688 (dump_ada_structure): Minor tweaks.
1689
09de3550
EB
16902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1691
1692 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1693 address for incomplete structures.
1694 (dump_forward_type): Do not bail out for incomplete structures.
1695 (dump_ada_declaration): Do not special-case incomplete structures
1696 for subtypes. Dump them as null records for types.
1697
095d8d4b
EB
16982018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1699
1700 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1701 (is_char_array): Fix formatting.
1702 (dump_template_types): Likewise.
1703 (dump_generic_ada_node): Rename into...
1704 (dump_ada_node): ...this.
1705 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1706 incomplete structures and not for empty structures. Do not use it
1707 when forward declarations are needed.
1708 (dump_forward_type): New function.
1709 (dump_nested_types): Remove FORWARD parameter. Do not consider
1710 TREE_VISITED and do not generate a forward declaration. Only dump
1711 original nested types for nested declaration.
1712 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1713 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1714 <RECORD_TYPE>: Do not consider TREE_VISITED.
1715 (dump_ada_declaration): Use booleans and fix formatting throughout.
1716 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1717 Call dump_forward_type instead of dump_nested_types for a typedef.
1718 Remove superfluous check and adjust call to dump_nested_types.
1719 <POINTER_TYPE>: Call dump_forward_type and fall through.
1720 (dump_ada_struct_decl): Rename into...
1721 (dump_ada_structure): ...this. Do not special-case empty structures.
1722
d4cfd486
MS
17232018-02-27 Martin Sebor <msebor@redhat.com>
1724
1725 PR c++/83871
1726 * c.opt (-Wmissing-attributes): New option.
1727
b22dbd03
ML
17282018-02-21 Martin Liska <mliska@suse.cz>
1729
1730 * c.opt (Wcatch-value=): Add IntegerRange.
1731
883dfe2a
JM
17322018-02-15 Jason Merrill <jason@redhat.com>
1733
1734 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1735
0444aa9c
NS
17362018-02-09 Nathan Sidwell <nathan@acm.org>
1737
1738 PR c/84293
1739 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1740 arg.
1741 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1742 arg. Adjust.
1743
cea71f0a
MS
17442018-02-09 Martin Sebor <msebor@redhat.com>
1745
1746 PR lto/84212
1747 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1748 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1749 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1750 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1751 (-Wuninitialized): Same.
1752
8c8b7be5
EB
17532018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1754
1755 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1756 keyword for components.
1757
7c30b12a
PC
17582018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1759
1760 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1761
eece7fe5
JK
17622018-02-02 Julia Koval <julia.koval@intel.com>
1763
1764 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1765
7d07a93a
MP
17662018-01-29 Marek Polacek <polacek@redhat.com>
1767
1768 PR c/83966
1769 * c-format.c (check_function_format): Check current_function_decl.
1770
53723269
JJ
17712018-01-27 Jakub Jelinek <jakub@redhat.com>
1772
1773 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1774 argument.
1775 (LAZY_HEX_FP_VALUES_CNT): Define.
1776 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1777 values rather than just 12.
1778 (builtin_define_with_hex_fp_value): Likewise.
1779
7365279f
BK
17802018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1781
92a285c1
ML
1782 PR other/70268
1783 * c.opt (-fmacro-prefix-map): New option.
1784 * c-opts.c (c_common_handle_option): Handle it.
1785 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1786 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1787
bb9869d5
DM
17882018-01-17 David Malcolm <dmalcolm@redhat.com>
1789
1790 PR c++/83814
1791 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1792
68dc87c3
EB
17932018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1794
1795 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1796 Skip 'f' and 'F' characters if it is true.
1797 (store_ada_macro): Minor tweak.
1798 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1799 <CPP_WSTRING>: Likewise.
1800 <CPP_STRING>: Output '&' in the buffer if not the first string.
1801 <CPP_NUMBER>: Adjust calls to dump_number.
1802
9a004410
DM
18032018-01-10 David Malcolm <dmalcolm@redhat.com>
1804
1805 PR c++/43486
1806 * c-common.c: Include "selftest.h".
1807 (get_atomic_generic_size): Perform the test for integral type
1808 before the range test for any integer constant, fixing indentation
1809 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1810 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1811 (selftest::test_fold_for_warn): New function.
1812 (selftest::c_common_c_tests): New function.
1813 (selftest::c_family_tests): Call it, and
1814 selftest::c_pretty_print_c_tests.
1815 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1816 * c-format.c (check_format_arg): Convert VAR_P check to a
1817 fold_for_warn.
1818 * c-pretty-print.c: Include "selftest.h".
1819 (pp_c_cast_expression): Don't print casts for location wrappers.
1820 (selftest::assert_c_pretty_printer_output): New function.
1821 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1822 (selftest::test_location_wrappers): New function.
1823 (selftest::c_pretty_print_c_tests): New function.
1824 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1825
5c0caeb3
RS
18262018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1827 Alan Hayward <alan.hayward@arm.com>
1828 David Sherwood <david.sherwood@arm.com>
1829
1830 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1831
73a699ae
RS
18322018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1833 Alan Hayward <alan.hayward@arm.com>
1834 David Sherwood <david.sherwood@arm.com>
1835
1836 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1837 as polynomial.
1838
928686b1
RS
18392018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1840 Alan Hayward <alan.hayward@arm.com>
1841 David Sherwood <david.sherwood@arm.com>
1842
1843 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1844 (convert_vector_to_array_for_subscript): Handle polynomial
1845 TYPE_VECTOR_SUBPARTS.
1846 (c_common_type_for_mode): Check valid_vector_subparts_p.
1847 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1848 VECTOR_CST_NELTS.
1849
85ec4feb
JJ
18502018-01-03 Jakub Jelinek <jakub@redhat.com>
1851
1852 Update copyright years.
1853
170a8bd6 18542017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1855 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1856
1857 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1858 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1859
ab20d992 18602017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
1861
1862 PR debug/83527
1863 PR debug/83419
1864 * c-semantics.c (only_debug_stmts_after_p): New.
1865 (pop_stmt_list): Clear side effects in debug-only stmt list.
1866 Check for single nondebug stmt followed by debug stmts only.
1867
c12d20d4
AO
18682017-12-21 Alexandre Oliva <aoliva@redhat.com>
1869
1870 PR debug/83419
1871 * c-semantics.c (pop_stmt_list): Propagate side effects from
1872 single nondebug stmt to container list.
1873
01512446
JJ
18742017-12-19 Jakub Jelinek <jakub@redhat.com>
1875
1876 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1877 conditions with typical order conditions.
1878
82cfbd01
MP
18792017-12-18 Marek Polacek <polacek@redhat.com>
1880
1881 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1882 not in effect.
1883
99da11ec
MS
18842017-12-17 Martin Sebor <msebor@redhat.com>
1885
1886 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1887 an error for attribute warn_if_not_aligned.
1888
cc8bea0a
MS
18892017-12-16 Martin Sebor <msebor@redhat.com>
1890
1891 PR tree-optimization/78918
1892 * c-common.c (check_function_restrict): Avoid checking built-ins.
1893 * c.opt (-Wrestrict): Include in -Wall.
1894
4849deb1
JJ
18952017-12-15 Jakub Jelinek <jakub@redhat.com>
1896
1897 * c-attribs.c (c_common_attribute_table,
1898 c_common_format_attribute_table): Swap affects_type_identity
1899 and handler fields, adjust comments.
1900
c65e18d3
BE
19012017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1902
1903 * c.opt (Wcast-function-type): New warning option.
1904 * c-lex.c (get_fileinfo): Avoid warning.
1905 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1906
2004617a
QZ
19072017-12-14 Qing Zhao <qing.zhao@oracle.com>
1908
7365279f 1909 PR middle_end/79538
2004617a
QZ
1910 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1911 Adjust the size of buf1 and buf2, add a new buf to avoid
1912 format-overflow warning.
1913
ab20d992 19142017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1915
1916 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1917 subsequent statement list.
1918
5d9ae53d
MS
19192017-12-07 Martin Sebor <msebor@redhat.com>
1920
1921 PR c/81544
1922 PR c/81566
1923 * c-attribs.c (attr_aligned_exclusions): New array.
1924 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1925 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1926 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1927 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1928 (attr_warn_unused_result_exclusions): Same.
1929 (handle_hot_attribute, handle_cold_attribute): Simplify.
1930 (handle_const_attribute): Warn on function returning void.
1931 (handle_pure_attribute): Same.
1932 (handle_aligned_attribute): Diagnose conflicting attribute
1933 specifications.
1934 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1935
c79144f8
DM
19362017-12-06 David Malcolm <dmalcolm@redhat.com>
1937
1938 PR c/83236
1939 * c-common.c (selftest::c_family_tests): Call
1940 selftest::c_spellcheck_cc_tests.
1941 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1942 * c-spellcheck.cc: Include "selftest.h".
1943 (name_reserved_for_implementation_p): New function.
1944 (should_suggest_as_macro_p): New function.
1945 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1946 should_suggest_as_macro_p and call it.
1947 (selftest::test_name_reserved_for_implementation_p): New function.
1948 (selftest::c_spellcheck_cc_tests): New function.
1949 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1950
613bc14f
DM
19512017-12-06 David Malcolm <dmalcolm@redhat.com>
1952
1953 * c-spellcheck.cc: New file, taken from macro-handling code in
1954 spellcheck-tree.c.
1955 * c-spellcheck.h: New file, taken from macro-handling code in
1956 spellcheck-tree.h.
1957
e76c7157
JJ
19582017-12-01 Jakub Jelinek <jakub@redhat.com>
1959
1960 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1961 attribute.
1962 (handle_simd_attribute): Don't check for "cilk simd function"
1963 attribute. Reindent, formatting changes.
1964
b0da4034
JK
19652017-11-30 Julia Koval <julia.koval@intel.com>
1966
1967 * c-common.h (inv_list): Remove.
1968
058f0b9e
JJ
19692017-11-28 Jakub Jelinek <jakub@redhat.com>
1970
1971 PR sanitizer/81275
1972 * c-common.c (c_switch_covers_all_cases_p_1,
1973 c_switch_covers_all_cases_p): New functions.
1974 * c-common.h (c_switch_covers_all_cases_p): Declare.
1975
5e9d6aa4 19762017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1977 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1978
1979 * array-notation-common.c: Delete.
1980 * c-cilkplus.c: Ditto.
1981 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1982 * c-common.def (ARRAY_NOTATION_REF): Remove.
1983 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1984 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1985 c_validate_cilk_plus_loop, cilkplus_an_parts,
1986 cilk_ignorable_spawn_rhs_op,
1987 cilk_recognize_spawn): Remove.
1988 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1989 * c-omp.c: Remove CILK_SIMD check.
1990 * c-pragma.c: Ditto.
1991 * c-pragma.h: Remove CILK related pragmas.
1992 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1993 ARRAY_NOTATION_REF condition.
1994 (c_pretty_printer::expression): Ditto.
1995 * c.opt (fcilkplus): Remove.
1996 * cilk.c: Delete.
1997
1af4ebf5
MG
19982017-11-21 Marc Glisse <marc.glisse@inria.fr>
1999
2000 * c-pretty-print.c (pp_c_additive_expression,
2001 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2002
d44ed508
JJ
20032017-11-21 Jakub Jelinek <jakub@redhat.com>
2004
7d2f0f9b
JJ
2005 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2006
d44ed508
JJ
2007 PR c++/83059
2008 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2009 instead of tree_to_uhwi, formatting fix.
2010
26edace6
DM
20112017-11-20 David Malcolm <dmalcolm@redhat.com>
2012
2013 PR c/81404
2014 * known-headers.cc: New file, based on material from c/c-decl.c.
2015 (suggest_missing_header): Copied as-is.
2016 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2017 heavily edited to add C++ support. Add some knowledge about
2018 <limits.h>, <stdint.h>, and <wchar.h>.
2019 * known-headers.h: Likewise.
2020
6c7a259b
DM
20212017-11-20 David Malcolm <dmalcolm@redhat.com>
2022
2023 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2024 (lookup_name_fuzzy): Likewise. Convert return type from
2025 const char * to name_hint. Add location_t param.
2026 * name-hint.h: New header.
2027
f9c59f7e
JJ
20282017-11-19 Jakub Jelinek <jakub@redhat.com>
2029
2030 PR c/66618
2031 PR c/69960
2032 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2033
1e39313a
JM
20342017-11-16 Joseph Myers <joseph@codesourcery.com>
2035
2036 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2037 expected publication date of C17.
2038 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2039
3ca0dc60
JM
20402017-11-15 Joseph Myers <joseph@codesourcery.com>
2041
2042 PR c/81156
2043 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2044 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2045
025d57f0
MS
20462017-11-10 Martin Sebor <msebor@redhat.com>
2047
2048 PR c/81117
2049 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2050 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2051 * c.opt (-Wstringop-truncation): New option.
2052
1b6fa695
ML
20532017-11-06 Martin Liska <mliska@suse.cz>
2054
2055 PR middle-end/82404
2056 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2057 FE.
2058 * c.opt: Set default value of warn_return_type.
2059
64a5912c
DM
20602017-10-31 David Malcolm <dmalcolm@redhat.com>
2061
2062 * c-common.c (binary_op_error): Update for renaming of
2063 error_at_rich_loc.
2064 (c_parse_error): Likewise.
2065 * c-warn.c (warn_logical_not_parentheses): Likewise for
2066 renaming of inform_at_rich_loc.
2067 (warn_for_restrict): Likewise for renaming of
2068 warning_at_rich_loc_n.
2069
c76dc9c3
JM
20702017-10-30 Joseph Myers <joseph@codesourcery.com>
2071
2072 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2073 * c-opts.c (set_std_c17): New function.
2074 (c_common_init_options): Use gnu17 as default C version.
2075 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2076
ee5fd23a
MM
20772017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2078
2079 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2080 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2081 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2082 __FP_FAST_FMA<N>X.
2083
d1047465
MP
20842017-10-23 Marek Polacek <polacek@redhat.com>
2085
2086 PR c/82681
2087 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2088
9e878cf1
EB
20892017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2090
2091 * c-common.c (check_builtin_function_arguments): Also check arguments
2092 of __builtin_alloca_with_align_and_max.
2093
89b6abbb
DM
20942017-10-17 David Malcolm <dmalcolm@redhat.com>
2095
2096 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2097 rather than NULL to format_warning_va.
2098 (check_format_types): Likewise when calling format_type_warning.
2099 Remove code to extract source_ranges and source_range * in favor
2100 of just a location_t.
2101 (format_type_warning): Convert source_range * param to a
2102 location_t.
2103
39382c09
JJ
21042017-10-13 Jakub Jelinek <jakub@redhat.com>
2105
2106 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2107 [LR]SHIFT_EXPR.
2108
62e1c678
DM
21092017-10-12 David Malcolm <dmalcolm@redhat.com>
2110
2111 * c-common.c (enum missing_token_insertion_kind): New enum.
2112 (get_missing_token_insertion_kind): New function.
2113 (maybe_suggest_missing_token_insertion): New function.
2114 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2115
b90c9338
NS
21162017-10-11 Nathan Sidwell <nathan@acm.org>
2117
2118 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2119 (c_common_handle_option): Update incpath_kind names.
2120
3a266bcd
ML
21212017-10-11 Martin Liska <mliska@suse.cz>
2122
2123 PR sanitizer/82490
2124 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2125 Wattributes warning.
2126
8e6cdc90
RS
21272017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2128
2129 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2130 operating on trees as wide_ints.
2131 * c-common.c (pointer_int_sum): Likewise.
2132 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2133 * c-warn.c (match_case_to_enum_1): Likewise.
2134 (c_do_switch_warnings): Likewise.
2135 (maybe_warn_shift_overflow): Likewise.
2136
802b38c9
JJ
21372017-10-10 Jakub Jelinek <jakub@redhat.com>
2138
2139 PR c/82437
2140 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2141 instead of wide_int::from.
2142
4e34b338
JJ
21432017-10-06 Jakub Jelinek <jakub@redhat.com>
2144
2145 PR c/82437
2146 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2147 using to_widest use wide_int with the larger of the two precisions.
2148
4bc4b2b4
BE
21492017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2150
2151 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2152 functions.
2153
a1488398
RS
21542017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2155
2156 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2157 when combining the original unconverted comparison operands.
2158
01c9fb68
JJ
21592017-09-29 Jakub Jelinek <jakub@redhat.com>
2160
2161 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2162 attribute.
2163
6e3e8419
EB
21642017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2165
2166 * c-ada-spec.c (to_ada_name): Add index parameter.
2167 (pp_ada_tree_identifier): Likewise.
2168 (dump_ada_macros): Adjust call to to_ada_name.
2169 (struct overloaded_name_hash): New type.
2170 (struct overloaded_name_hasher): Likewise.
2171 (overloaded_names): New hash table.
2172 (compute_overloading_index): New function.
2173 (dump_ada_decl_name): Call it and pass the result to
2174 pp_ada_tree_identifier.
2175 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2176 (dump_ada_function_declaration): Likewise.
2177 (dump_generic_ada_node): Likewise.
2178 (print_constructor): Likewise.
2179 (print_destructor): Likewise.
2180 (dump_ada_specs): Delete overloaded_names table.
2181
79310774
EB
21822017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2183
2184 * c-ada-spec.c (max_ada_macros): Move around.
2185 (store_ada_macro_index): Likewise.
2186 (source_file): Rename into...
2187 (macro_source_file): ...this.
2188 (count_ada_macro): Move around.
2189 (store_ada_macro): Likewise.
2190 (compare_macro): Likewise.
2191 (print_ada_macros): Merge in...
2192 (dump_ada_macros): ...this.
2193 (source_file_base): Rename into...
2194 (current_source_file): ...this.
2195 (print_comment): Move around.
2196 (dump_ada_nodes): Call dump_ada_declaration directly.
2197 (struct with): Change type of limited field to bool.
2198 (append_withs): Change type of limited_access parameter to bool.
2199 (pp_ada_tree_identifie): Likewise.
2200 (dump_ada_decl_nam): Likewise.
2201 (dump_generic_ada_node): Likewise. Do not print the return type.
2202 (to_ada_name): Change type of space_found parameter to bool.
2203 (dump_ada_function_declaration): Return void and change type of
2204 parameters to bool. Also print the return type for a function.
2205 (print_ada_methods): Rename into...
2206 (dump_ada_methods): ...this.
2207 (print_ada_declaration): Rename into ...
2208 (dump_ada_declaration): ...this. Do not print the return type.
2209 (print_ada_struct_decl): Rename into...
2210 (dump_ada_struct_decl): ...this.
2211
7d386d45
JJ
22122017-09-29 Jakub Jelinek <jakub@redhat.com>
2213
2214 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2215 rather than DECL_INITIAL.
2216 (common_handle_aligned_attribute): Likewise.
2217
ab20d992 22182017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2219
2220 * c.opt (gen-decls): Add RejectNegative.
2221
026a79f7
AS
22222017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2223 Jakub Jelinek <jakub@redhat.com>
2224
2225 Add support for -std=c++2a.
2226 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2227 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2228 * c-opts.c (set_std_cxx2a): New.
2229 (c_common_handle_option): Set options when -std=c++2a is enabled.
2230 (c_common_post_options): Adjust comments.
2231 (set_std_cxx14, set_std_cxx17): Likewise.
2232
4a8ca690
EB
22332017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2234
2235 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2236 message for non-uniform endianness and issue a warning in C++.
2237
7b936140
JJ
22382017-09-15 Jakub Jelinek <jakub@redhat.com>
2239
2240 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2241 (Wc++17-compat): Change from undocumented alias to option.
2242 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2243 change C++1z to C++17 in description.
2244 (std=c++1z, std=gnu++1z): Change from option to undocumented
2245 deprecated alias.
2246 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2247 Adjust description.
2248 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2249 * c-opts.c (set_std_cxx1z): Rename to ...
2250 (set_std_cxx17): ... this.
2251 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2252 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2253 caller.
7b936140
JJ
2254 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2255 comments.
2256
12263f13
L
22572017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2258
2259 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2260 function alignment if warn_if_not_aligned_p is true.
2261
6836632e
NS
22622017-09-12 Nathan Sidwell <nathan@acm.org>
2263
2264 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2265 resort_sorted_fields): Move to c/c-decl.c.
2266 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2267 (struct sorted_fields_type): Move to c/c-lang.h.
2268
019bf9ad
JW
22692017-09-09 Jonathan Wakely <jwakely@redhat.com>
2270
2271 PR c++/81852
2272 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2273
bc7fe952
MP
22742017-09-04 Marek Polacek <polacek@redhat.com>
2275
2276 PR c/81783
2277 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2278 (warn_tautological_cmp): Call it.
2279
ab20d992 22802017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2281
2282 * c-opts.c (c_common_finish): Write dependency information even if
2283 there are errors.
2284
d2e05fcb
JJ
22852017-09-01 Jakub Jelinek <jakub@redhat.com>
2286
2287 PR c/81887
2288 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2289 (omp_pragmas_simd): ... here.
2290 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2291 create new clauses list containing just simd clause.
2292
18e2a8b8
RS
22932017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2294 Alan Hayward <alan.hayward@arm.com>
2295 David Sherwood <david.sherwood@arm.com>
2296
2297 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2298 into scalar_mode_supported_p call.
2299 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2300
16d22000
RS
23012017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2302 Alan Hayward <alan.hayward@arm.com>
2303 David Sherwood <david.sherwood@arm.com>
2304
2305 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2306 for the mode iterator.
2307
b397965c
RS
23082017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2309 Alan Hayward <alan.hayward@arm.com>
2310 David Sherwood <david.sherwood@arm.com>
2311
2312 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2313 * c-common.c (c_build_vec_perm_expr): Likewise.
2314
357b7604
RS
23152017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2316 Alan Hayward <alan.hayward@arm.com>
2317 David Sherwood <david.sherwood@arm.com>
2318
2319 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2320
e05c94ba
RS
23212017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2322 Alan Hayward <alan.hayward@arm.com>
2323 David Sherwood <david.sherwood@arm.com>
2324
2325 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2326 before calling targetm.addr_space.valid_pointer_mode.
2327
5c20c4af
RS
23282017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2329 Alan Hayward <alan.hayward@arm.com>
2330 David Sherwood <david.sherwood@arm.com>
2331
2332 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2333
c94843d2 23342017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2335 Alan Hayward <alan.hayward@arm.com>
2336 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2337
2338 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2339 iterators.
2340 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2341
4e10a5a7
RS
23422017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2343 Alan Hayward <alan.hayward@arm.com>
2344 David Sherwood <david.sherwood@arm.com>
2345
2346 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2347 case statements.
2348
130fcab0
ML
23492017-08-29 Martin Liska <mliska@suse.cz>
2350
2351 PR other/39851
2352 * c-common.c (parse_optimize_options): Add argument to function
2353 call.
2354 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2355
14e18d71
DM
23562017-08-24 David Malcolm <dmalcolm@redhat.com>
2357
2358 * c-lex.c (interpret_float): Use token location
2359 when building an EXCESS_PRECISION_EXPR.
2360
2f687306
DM
23612017-08-21 David Malcolm <dmalcolm@redhat.com>
2362
2363 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2364 it to check_function_format.
2365 * c-common.h (check_function_arguments): Add vec<location_t> *
2366 param.
2367 (check_function_format): Likewise.
2368 * c-format.c (struct format_check_context): Add field "arglocs".
2369 (check_function_format): Add param "arglocs"; pass it to
2370 check_format_info.
ab20d992 2371 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2372 new field of format_ctx.
2373 (check_format_arg): Pass format_ctx->arglocs to new param of
2374 check_format_info_main.
2375 (class argument_parser): New field "arglocs".
2376 (argument_parser::argument_parser): Add "arglocs_" param and use
2377 it to initialize new field.
2378 (argument_parser::check_argument_type): Pass new arglocs field to
2379 check_format_types.
2380 (check_format_info_main): Add param "arglocs", and use it when
2381 constructing arg_parser.
2382 (check_format_types): Add param "arglocs"; use it if non-NULL when
2383 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2384
00aa1fa2
L
23852017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2386
2387 PR c/53037
2388 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2389 (c_common_attribute_table): Add warn_if_not_aligned.
2390 (handle_aligned_attribute): Renamed to ...
2391 (common_handle_aligned_attribute): Remove argument, name, and add
2392 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2393 (handle_aligned_attribute): New.
2394 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2395
27be025d
MS
23962017-08-14 Martin Sebor <msebor@redhat.com>
2397
2398 PR c/81117
2399 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2400 (handle_nonstring_attribute): New function.
2401
da67acb9
MS
24022017-08-14 Martin Sebor <msebor@redhat.com>
2403
2404 PR c/81117
2405 * c-format.h (T89_G): New macro.
2406 * c-format.c (local_gcall_ptr_node): New variable.
2407 (init_dynamic_diag_info): Initialize it.
2408
a8b522b4
ML
24092017-08-11 Martin Liska <mliska@suse.cz>
2410
2411 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2412 TARGET_SUPPORTS_ALIASES.
2413
32129a17
DM
24142017-08-10 David Malcolm <dmalcolm@redhat.com>
2415
2416 * c-common.c (c_parse_error): Add rich_location * param, using it
2417 rather implicitly using input_location.
2418 * c-common.h (c_parse_error): Add rich_location * param.
2419
30af3a2b
MP
24202017-08-09 Marek Polacek <polacek@redhat.com>
2421
2422 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2423 (c_common_truthvalue_conversion): Likewise.
2424 * c-omp.c (c_finish_omp_atomic): Likewise.
2425 * c-common.h (build_binary_op): Update declaration.
2426
314e6352
ML
24272017-08-08 Martin Liska <mliska@suse.cz>
2428
2429 * c-ada-spec.c: Include header files.
2430 * c-ubsan.c: Likewise.
2431 * c-warn.c: Likewise.
2432
56b5041c
JJ
24332017-08-07 Jakub Jelinek <jakub@redhat.com>
2434
2435 PR c/69389
2436 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2437
db440138
EB
24382017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2439
2440 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2441 (print_ada_methods): Likewise.
2442 (print_ada_declaration): Likewise.
2443
577eec56
ML
24442017-08-07 Martin Liska <mliska@suse.cz>
2445
2446 * array-notation-common.c: Add new includes.
2447 * c-format.c( handle_format_attribute): Canonicalize a format
2448 function name.
2449 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2450 attribute.
2451 * c-pretty-print.c: Add new include.
2452
b854df3c
EB
24532017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2454
2455 * c-ada-spec.c (has_static_fields): Look only into variables.
2456 (print_constructor): Add TYPE parameter and use it for the name.
2457 (print_destructor): Likewise.
2458 (print_ada_declaration): Adjust to new constructor/destructor names.
2459 Adjust calls to print_constructor and print_destructor.
2460 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2461 Look only into variables in the final loop.
2462
9f2cb25e
EB
24632017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2464
2465 * c-ada-spec.c (has_static_fields): Look only into fields.
2466 (dump_generic_ada_node): Small tweak.
2467 (dump_nested_types): Look only into fields.
2468 (print_ada_declaration): Look only into methods. Small tweak.
2469 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2470
f4bcd9eb
EB
24712017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2472
2473 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2474 (dump_ada_function_declaration): Likewise.
2475 (dump_generic_ada_node): Likewise.
2476 (print_ada_declaration): Add support for const-qualified variables.
2477
f34ebeb2
ML
24782017-07-31 Martin Liska <mliska@suse.cz>
2479
2480 PR sanitize/81530
2481 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2482 Guard condition with flag_sanitize_p also with current_function_decl
2483 non-null equality.
2484 (ubsan_maybe_instrument_reference_or_call): Likewise.
2485
218e5d04
UB
24862017-07-30 Uros Bizjak <ubizjak@gmail.com>
2487
2488 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2489
942047f2
EB
24902017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2491
2492 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2493 for enumeral types.
2494 (print_ada_declaration): Add missing guard for record types.
2495
a40ff0ae
JJ
24962017-07-27 Jakub Jelinek <jakub@redhat.com>
2497
2498 PR c/45784
2499 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2500 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2501 new COMPOUND_EXPRs around the rhs of the comparison.
2502
06bd22f6
MP
25032017-07-27 Marek Polacek <polacek@redhat.com>
2504
2505 PR c/81417
2506 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2507 the types.
2508
036ea399
JJ
25092017-07-27 Jakub Jelinek <jakub@redhat.com>
2510
2511 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2512 (handle_noipa_attribute): New function.
2513
417ca011
TD
25142017-07-07 Torsten Duwe <duwe@suse.de>
2515
2516 * c-attribs.c (c_common_attribute_table): Add entry for
2517 "patchable_function_entry".
2518
5aaa8fb4
NS
25192017-07-20 Nathan Sidwell <nathan@acm.org>
2520
2521 Remove TYPE_METHODS.
2522 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2523 dump_ada_template, print_ada_methods,
2524 print_ada_declaration): Member fns are on TYPE_FIELDS.
2525
ff22eb12
NS
25262017-07-18 Nathan Sidwell <nathan@acm.org>
2527
2528 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2529
eea77d1f
DM
25302017-07-14 David Malcolm <dmalcolm@redhat.com>
2531
2532 * c-common.c (try_to_locate_new_include_insertion_point): New
2533 function.
2534 (per_file_includes_t): New typedef.
2535 (added_includes_t): New typedef.
2536 (added_includes): New variable.
2537 (maybe_add_include_fixit): New function.
2538 * c-common.h (maybe_add_include_fixit): New decl.
2539
281ac396
MS
25402017-07-10 Martin Sebor <msebor@redhat.com>
2541
2542 PR other/81345
2543 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2544
b6f43128
DM
25452017-07-06 David Malcolm <dmalcolm@redhat.com>
2546
2547 * c-common.c (selftest::c_family_tests): New.
2548 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2549 (selftest::c_family_tests): New decl.
2550
efbf55b0
MP
25512017-07-04 Marek Polacek <polacek@redhat.com>
2552
2553 PR c/81231
2554 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2555 types.
2556
6c86bd88
MP
25572017-07-04 Marek Polacek <polacek@redhat.com>
2558
2559 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2560
17a7218b
ML
25612017-06-28 Martin Liska <mliska@suse.cz>
2562
2563 PR ipa/81128
2564 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2565 to a function declaration.
2566
63010089
ML
25672017-06-28 Martin Liska <mliska@suse.cz>
2568
2569 PR driver/79659
2570 * c.opt: Add IntegerRange to various options.
2571
3e2becc4
MP
25722017-06-26 Marek Polacek <polacek@redhat.com>
2573
2574 PR c/80116
2575 * c-common.h (warn_for_multistatement_macros): Declare.
2576 * c-warn.c: Include "c-family/c-indentation.h".
2577 (warn_for_multistatement_macros): New function.
2578 * c.opt (Wmultistatement-macros): New option.
2579 * c-indentation.c (guard_tinfo_to_string): No longer static.
2580 Change the parameter type to "enum rid". Handle RID_SWITCH.
2581 * c-indentation.h (guard_tinfo_to_string): Declare.
2582
2db9b7cd
MG
25832017-06-23 Marc Glisse <marc.glisse@inria.fr>
2584
2585 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2586
c3684b7b
MS
25872017-06-15 Martin Sebor <msebor@redhat.com>
2588
2589 PR c++/80560
2590 * c.opt (-Wclass-memaccess): New option.
2591
e72c4afd
BK
25922017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2593
2594 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2595
8a516588
MP
25962017-06-13 Marek Polacek <polacek@redhat.com>
2597
2598 PR objc/80949
2599 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2600 branches is null.
2601
45b2222a
ML
26022017-06-13 Martin Liska <mliska@suse.cz>
2603
2604 PR sanitize/78204
2605 * c-attribs.c (add_no_sanitize_value): New function.
2606 (handle_no_sanitize_attribute): Likewise.
2607 (handle_no_sanitize_address_attribute): Use the function.
2608 (handle_no_sanitize_thread_attribute): New function.
2609 (handle_no_address_safety_analysis_attribute): Use
2610 add_no_sanitize_value.
2611 (handle_no_sanitize_undefined_attribute): Likewise.
2612 * c-common.h: Declare new functions.
2613 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2614 (ubsan_instrument_shift): Likewise.
2615 (ubsan_instrument_bounds): Likewise.
2616 (ubsan_maybe_instrument_array_ref): Likewise.
2617 (ubsan_maybe_instrument_reference_or_call): Likewise.
2618
a01f151f
JM
26192017-06-11 Jason Merrill <jason@redhat.com>
2620
2621 * c-ada-spec.c, c-pragma.c: Use id_equal.
2622
3de4ac6d
MP
26232017-06-04 Marek Polacek <polacek@redhat.com>
2624
2625 PR c/80919
2626 * c-format.c (matching_type_p): Return false if any of the types
2627 requires structural equality.
2628
2474f48f
MS
26292017-06-02 Martin Sebor <msebor@redhat.com>
2630
2631 PR c/80892
2632 * c-warn.c (conversion_warning): Use -Wconversion for integer
2633 conversion and -Wfloat-conversion for floating one.
2634
40ffd95f
BE
26352017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2636
2637 * c.opt (Wsizeof-pointer-div): New warning option.
2638
3fa4634c
VR
26392017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2640
2641 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2642 (Wcatch-value=1): Enable by -Wall.
2643
f012c8ef
DM
26442017-05-30 David Malcolm <dmalcolm@redhat.com>
2645
2646 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2647 format_chars.
2648 * c.opt (fdiagnostics-show-template-tree): New option.
2649 (felide-type): New option.
2650
63dbcd13
VR
26512017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2652
2653 * c.opt (Wcatch-value=): New C++ warning flag.
2654
be136b5c
NS
26552017-05-24 Nathan Sidwell <nathan@acm.org>
2656
2657 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2658 const casts to avoid warning.
2659
3cd211af
MS
26602017-05-24 Martin Sebor <msebor@redhat.com>
2661
2662 PR c/80731
2663 * c-common.h (unsafe_conversion_p): Add a function argument.
2664 * c-common.c (unsafe_conversion_p): Same.
2665 Add type names and values to diagnostics.
2666 (scalar_to_vector): Adjust.
2667 * c-warn.c (constant_expression_error): Add a function argument.
2668 Add type names and values to diagnostics.
2669 (conversion_warning): Add a function argument.
2670 Add type names and values to diagnostics.
2671 (warnings_for_convert_and_check): Same.
2672
1ff7be5a
JM
26732017-05-19 Jason Merrill <jason@redhat.com>
2674
2675 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2676 enumerators.
2677
ff502317
BE
26782017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2679
2680 * c-format.c (locus): Move out of function scope,
2681 add GTY attribute.
2682
2a8a8d7b
NS
26832017-05-19 Nathan Sidwell <nathan@acm.org>
2684
2685 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2686 (c_common_parse_file): Remove class dump handling.
2687 (get_dump_info): Likewise.
2688
39aac208
RB
26892017-05-19 Richard Biener <rguenther@suse.de>
2690
2691 PR c++/80593
2692 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2693 to alias-set zero memory.
2694
6ecd2339
BE
26952017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2696
2697 * c-format.c (local_tree_type_node): Add GTY attribute.
2698
6574d78e
MP
26992017-05-18 Marek Polacek <polacek@redhat.com>
2700
2701 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2702 (c_common_fixed_point_type_for_size): Likewise.
2703 (c_common_type_for_mode): Likewise.
2704 (shorten_compare): Likewise.
2705 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2706 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2707
e3455240
MP
27082017-05-18 Marek Polacek <polacek@redhat.com>
2709
2710 * c-common.c (self_promoting_args_p): Change the return type to bool.
2711 Use false/true instead of 0/1.
2712 * c-common.h (self_promoting_args_p): Update.
2713
3fa8871b
MP
27142017-05-17 Marek Polacek <polacek@redhat.com>
2715
2716 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2717 * c-warn.c: Likewise.
2718
b42cc3ca
VV
27192017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2720
2721 Implement new C++ intrinsics __is_assignable and __is_constructible.
2722 * c-common.c (__is_assignable, __is_constructible): New.
2723 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2724
1a817418
ML
27252017-05-17 Martin Liska <mliska@suse.cz>
2726
2727 * c-common.h: Introduce dump_flags_t type and
2728 use it instead of int type.
2729 * c-gimplify.c (c_genericize): Likewise.
2730 * c-opts.c: Likewise.
2731
b2fa0a8b
MP
27322017-05-17 Marek Polacek <polacek@redhat.com>
2733
2734 * c-common.c (c_save_expr): Remove.
2735 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2736 * c-common.h (c_save_expr): Remove declaration.
2737
31c2d57d
VR
27382017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2739
2740 PR c/35441
2741 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2742 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2743 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2744 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2745 RDIV_EXPR.
2746 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2747
684f84de
MP
27482017-05-09 Marek Polacek <polacek@redhat.com>
2749
2750 PR c/80525
2751 * c-warn.c (unwrap_c_maybe_const): New.
2752 (warn_logical_operator): Call it.
2753
641da50a
NS
27542017-05-09 Nathan Sidwell <nathan@acm.org>
2755
2756 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2757 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2758
631238ac
MS
27592017-05-08 Martin Sebor <msebor@redhat.com>
2760
2761 PR translation/80280
2762 * c-format.h (struct format_flag_spec): Add new member.
2763 (T89_T): New macro.
2764 * c-format.c (local_tree_type_node): New global.
2765 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2766 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2767 (strfmon_flag_specs): Likewise.
2768 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2769 with distinct quoting properties.
2770 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2771 (flag_chars_t::validate): Add argument and handle bad quoting.
2772 (check_format_info_main): Handle quoting problems.
2773 (init_dynamic_diag_info): Simplify.
2774
49f0c04c
JM
27752017-05-08 Jason Merrill <jason@redhat.com>
2776
2777 * c-opts.c (c_common_post_options): Update defaults for
2778 flag_abi_version and flag_abi_compat_version.
2779
56d35585
DM
27802017-05-05 David Malcolm <dmalcolm@redhat.com>
2781
2782 * c-common.c (c_cpp_error): Replace report_diagnostic
2783 with diagnostic_report_diagnostic.
2784
0f2c4a8f
MS
27852017-05-04 Martin Sebor <msebor@redhat.com>
2786
2787 PR translation/80280
2788 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2789 (handle_weakref_attribute): Same.
2790
6fe63fb4
NS
27912017-05-03 Nathan Sidwell <nathan@acm.org>
2792
2793 Canonicalize canonical type hashing
2794 * c-common.c (complete_array_type): Use type_hash_canon.
2795
815d9cc6
XR
27962017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2797
92a285c1 2798 PR c++/80038
815d9cc6
XR
2799 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2800 prototype.
2801 (cilk_install_body_pedigree_operations): Likewise.
2802 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2803 detatched.
2804 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2805 (cilk_install_body_pedigree_operations): Likewise.
2806 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2807 unwrapping.
2808
f8a36447
JJ
28092017-04-27 Jakub Jelinek <jakub@redhat.com>
2810
2811 PR c++/80534
2812 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2813 flag on non-aggregate element types.
2814
7c145456
BE
28152017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2816
2817 * c-common.c (c_type_hasher, type_hash_table): Remove.
2818 (c_common_get_alias_set): Remove unreachable code.
2819 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2820
c3cbcd45
VR
28212017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2822
2823 * c.opt (Wextra-semi): New C++ warning flag.
2824
8a59d466
JJ
28252017-04-20 Jakub Jelinek <jakub@redhat.com>
2826
2827 PR middle-end/80423
2828 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2829
8487c9a5
JJ
28302017-04-18 Jakub Jelinek <jakub@redhat.com>
2831
2832 PR middle-end/79788
2833 PR middle-end/80375
2834 * c-common.c (c_common_type_for_mode): Don't handle
2835 widest_*_literal_type_node here.
2836 c_common_signed_or_unsigned_type): Likewise.
2837 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2838 to *intTI_type_node or *intDI_type_node depending on whether
2839 TImode is supported by the target or not.
2840
3ee0fb02
ML
28412017-04-10 Martin Liska <mliska@suse.cz>
2842
2843 PR sanitizer/80350
2844 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2845 doing an UBSAN check.
2846
5764ee3c
JW
28472017-04-03 Jonathan Wakely <jwakely@redhat.com>
2848
2849 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2850
6f3af356
JJ
28512017-03-31 Jakub Jelinek <jakub@redhat.com>
2852
2853 PR c++/79572
2854 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2855 tree *.
2856 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2857 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2858 REFERENCE_TYPE.
2859
f6a7a9d5
DM
28602017-03-31 David Malcolm <dmalcolm@redhat.com>
2861
2862 PR documentation/78732
2863 * c.opt (Wendif-labels): Fix description to refer to
2864 #else rather than #elif.
2865
af88f557
JJ
28662017-03-31 Jakub Jelinek <jakub@redhat.com>
2867
2868 PR libstdc++/80251
2869 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2870 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2871
a9e4a1a5
JJ
28722017-03-27 Jakub Jelinek <jakub@redhat.com>
2873
2874 PR middle-end/80162
2875 * c-common.c (c_common_mark_addressable_vec): Don't set
2876 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2877
3f01b620
MS
28782017-03-21 Martin Sebor <msebor@redhat.com>
2879
2880 PR c++/79548
2881 * c-common.c (set_underlying_type): Mark type used only when
2882 original del is declared unused.
2883
2f6f187a
DM
28842017-03-10 David Malcolm <dmalcolm@redhat.com>
2885
2886 PR translation/79848
2887 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2888 "%qs".
2889
a02fa805
DM
28902017-03-10 David Malcolm <dmalcolm@redhat.com>
2891
2892 PR c/79921
2893 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2894 from inform's message, so that xgettext can locate it.
2895
822a132c
MP
28962017-03-09 Marek Polacek <polacek@redhat.com>
2897
2898 PR c++/79962
2899 PR c++/79984
2900 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2901 conversion to the attribute list.
2902
bba81f1c
ML
29032017-03-09 Martin Liska <mliska@suse.cz>
2904
2905 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2906
108154ff
JM
29072017-03-03 Jason Merrill <jason@redhat.com>
2908
2909 * c.opt (Wnoexcept-type): New.
2910
eb0e7c34
RB
29112017-03-02 Richard Biener <rguenther@suse.de>
2912
2913 PR c/79756
2914 * c-common.c (c_common_mark_addressable_vec): Look through
2915 C_MAYBE_CONST_EXPR.
2916
9453ba0a
ML
29172017-02-28 Martin Liska <mliska@suse.cz>
2918
2919 * c.opt: Replace space with tabular for options of <number>
2920 type.
2921
6a825afe
ML
29222017-02-28 Martin Liska <mliska@suse.cz>
2923
2924 * c.opt: Fix --help=option -Q for options which are of
2925 an enum type.
2926
4227c9ad
JJ
29272017-02-24 Jakub Jelinek <jakub@redhat.com>
2928
2929 PR c++/79588
2930 * c-common.c (check_function_restrict): New function.
2931 (check_function_arguments): Add FNDECL argument. Call
2932 check_function_restrict if -Wrestrict.
2933 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2934 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2935 * c-common.h (check_function_arguments): Add FNDECL argument.
2936 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2937
59909673
EB
29382017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2939
2940 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2941 treatment of parameters with pointer-to-tagged type and tidy up.
2942 (print_ada_methods): Remove the special treatment of C++ static member
2943 functions.
2944
54dcd526
ML
29452017-02-22 Martin Liska <mliska@suse.cz>
2946
2947 * c.opt: Replace inequality signs with square brackets
2948 for -Wnornalized.
2949
00bc9de3
JJ
29502017-02-21 Jakub Jelinek <jakub@redhat.com>
2951
2952 PR c++/79641
2953 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2954 preserve quals.
2955
97fcf744
JM
29562017-02-17 Joseph Myers <joseph@codesourcery.com>
2957
2958 * c-cppbuiltin.c (builtin_define_float_constants): Define
2959 __DECIMAL_DIG__ to the value for long double.
2960
c7545f1c
MP
29612017-02-15 Marek Polacek <polacek@redhat.com>
2962
2963 PR c/79515
2964 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2965 conversion has occured.
2966
c2e84327
DM
29672017-01-24 David Malcolm <dmalcolm@redhat.com>
2968
2969 * c-common.c (c_common_reswords): Add "__RTL".
2970 * c-common.h (enum rid): Add RID_RTL.
2971
2ebd93e1
MP
29722017-01-20 Marek Polacek <polacek@redhat.com>
2973
2974 PR c/64279
2975 * c-common.h (do_warn_duplicated_branches_r): Declare.
2976 * c-gimplify.c (c_genericize): Walk the function tree calling
2977 do_warn_duplicated_branches_r.
2978 * c-warn.c (expr_from_macro_expansion_r): New.
2979 (do_warn_duplicated_branches): New.
2980 (do_warn_duplicated_branches_r): New.
2981 * c.opt (Wduplicated-branches): New option.
2982
0d80ab91
DM
29832017-01-17 David Malcolm <dmalcolm@redhat.com>
2984
2985 PR c++/71497
2986 * c-indentation.c (warn_for_misleading_indentation): Use the past
2987 subjunctive in the note.
2988
7f991c36
AH
29892017-01-17 Aldy Hernandez <aldyh@redhat.com>
2990
2991 PR c/79116
2992 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2993 start type to integer_type.
2994
1c70261c
JJ
29952017-01-16 Jakub Jelinek <jakub@redhat.com>
2996
2997 PR driver/49726
2998 * c.opt (gen-decls): Add Driver flag.
2999
1ddca3f3
PC
30002017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3001
3002 Revert:
3003 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3004
3005 PR c++/71737
3006 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3007
7d2f3f1d
PC
30082017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3009
3010 PR c++/71737
3011 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3012
bce6f760
MS
30132017-01-12 Martin Sebor <msebor@redhat.com>
3014
3015 (-Wformat-overflow): ...to this.
3016
bf5fbf46
MS
30172017-01-11 Martin Sebor <msebor@redhat.com>
3018
3019 PR c/78768
3020 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3021 Also enable for LTO.
3022
e363df3f
JM
30232017-01-10 Jason Merrill <jason@redhat.com>
3024
3025 Implement P0195R2, C++17 variadic using.
3026 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3027
bd2c6270
JJ
30282017-01-09 Jakub Jelinek <jakub@redhat.com>
3029
3030 PR translation/79019
3031 PR translation/79020
3032 * c.opt (Wnormalized=): Fix typo in description.
3033
efcc8d38
MS
30342017-01-08 Martin Sebor <msebor@redhat.com>
3035
3036 PR middle-end/77708
3037 * c.opt (-Wformat-truncation): New option.
3038
ab20d992 30392017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3040
3041 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3042 value to unsigned short to fit in 4 hex digits without
3043 warnings.
3044
4e89adf9
EB
30452017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3046
3047 * c.opt (fsso-struct): Add 'native' value.
3048
cd445b54
ML
30492017-01-05 Martin Liska <mliska@suse.cz>
3050
3051 PR pch/78970
3052 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3053 header.
3054
a9342885
MP
30552017-01-04 Marek Polacek <polacek@redhat.com>
3056
3057 PR c++/64767
3058 * c.opt (Wpointer-compare): New option.
3059
fc73e60c
JJ
30602017-01-04 Jakub Jelinek <jakub@redhat.com>
3061
3062 PR driver/78957
3063 * c.opt (fsso-struct=): Add RejectNegative.
3064
cbe34bb5
JJ
30652017-01-01 Jakub Jelinek <jakub@redhat.com>
3066
3067 Update copyright years.
3068
d4a6c0ea
ML
30692016-12-29 Martin Liska <mliska@suse.cz>
3070
3071 PR c/78933
3072 * c.opt (strong-eval-order): Add RejectNegative keyword.
3073
67a5ad7c
JM
30742016-12-22 Jason Merrill <jason@redhat.com>
3075
3076 Implement P0522R0, matching of template template arguments.
3077 * c-cppbuiltin.c (c_cpp_builtins): Define
3078 __cpp_template_template_args.
3079
0dba7960
JJ
30802016-12-21 Jakub Jelinek <jakub@redhat.com>
3081
3082 PR bootstrap/78817
3083 * c-common.c (struct nonnull_arg_ctx): New type.
3084 (check_function_nonnull): Return bool instead of void. Use
3085 nonnull_arg_ctx as context rather than just location_t.
3086 (check_nonnull_arg): Adjust for the new context type, set
3087 warned_p to true if a warning has been diagnosed.
3088 (check_function_arguments): Return bool instead of void.
3089 * c-common.h (check_function_arguments): Adjust prototype.
3090
31bfc9b9
JM
30912016-12-21 Jason Merrill <jason@redhat.com>
3092
3093 * c.opt (-fnew-ttp-matching): New flag.
3094 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3095
629b3d75
MJ
30962016-12-14 Martin Jambor <mjambor@suse.cz>
3097
3098 * c-omp.c: Include omp-general.h instead of omp-low.h.
3099 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3100 name.
3101
474da67e
MS
31022016-12-14 Martin Sebor <msebor@redhat.com>
3103
3104 PR c/17308
3105 * c-common.c (check_nonnull_arg): Disable when optimization
3106 is enabled.
3107
fe366b87
MP
31082016-12-12 Marek Polacek <polacek@redhat.com>
3109
3110 PR c++/78647
3111 * c-common.c (attribute_fallthrough_p): Return false for
3112 error_mark_node.
3113
8bd9f164
MS
31142016-12-08 Martin Sebor <msebor@redhat.com>
3115
3116 PR c/78284
3117 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3118
060162e0
MS
31192016-12-08 Martin Sebor <msebor@redhat.com>
3120
3121 PR c/78165
92a285c1
ML
3122 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3123 suffix.
060162e0 3124
ee92e7ba
MS
31252016-12-07 Martin Sebor <msebor@redhat.com>
3126
3127 PR c/53562
3128 PR middle-end/77784
3129 PR middle-end/78149
3130 PR middle-end/78138
3131 * c.opt (-Wstringop-overflow): New option.
3132
84b0769e
MO
31332016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3134
3135 * c-attribs.c (asan odr indicator): New attribute.
3136 (handle_asan_odr_indicator_attribute): New function.
3137
7fa6a965
PK
31382016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3139
3140 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3141 ptrdiff_type_node;
3142
56d8ffc1
JG
31432016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3144
3145 * c-common.c (excess_precision_mode_join): New.
3146 (c_ts18661_flt_eval_method): New.
3147 (c_c11_flt_eval_method): Likewise.
3148 (c_flt_eval_method): Likewise.
3149 * c-common.h (excess_precision_mode_join): New.
3150 (c_flt_eval_method): Likewise.
3151 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3152 (cpp_iec_559_value): Call it.
3153 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3154 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3155 __FLT_EVAL_METHOD_TS_18661_3__.
3156
04f0fcf7
JG
31572016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3158
3159 * c-opts.c (c_common_post_options): Add logic to handle the default
3160 case for -fpermitted-flt-eval-methods.
3161
fb2675cb
PB
31622016-11-23 Paolo Bonzini <bonzini@gnu.org>
3163
3164 * c.opt (Wexpansion-to-defined): New.
3165
ec1c5694
JJ
31662016-11-23 Jakub Jelinek <jakub@redhat.com>
3167
3168 PR target/78451
3169 * c-pragma.c (handle_pragma_target): Don't replace
3170 current_target_pragma, but chainon the new args to the current one.
3171
730c9e75
NS
31722016-11-22 Nathan Sidwell <nathan@acm.org>
3173
3174 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3175 indentation and formatting.
730c9e75 3176
89990732
MS
31772016-11-21 Martin Sebor <msebor@redhat.com>
3178
3179 * c.opt (-fprintf-return-value): Enable by default.
3180
48330c93
BE
31812016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3182
3183 PR c++/71973
3184 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3185 * c-common.c (c_common_nodes_and_builtins): Initialize
3186 const_tm_ptr_type_node.
3187
0d939c95
MP
31882016-11-16 Marek Polacek <polacek@redhat.com>
3189
3190 PR c/78285
3191 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3192
8e745a17
JJ
31932016-11-14 Jakub Jelinek <jakub@redhat.com>
3194
3195 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3196
1ee62b92 31972016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3198 Richard Biener <rguenther@suse.de>
3199
3200 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3201 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3202 * c.opt (fgimple): New option.
1ee62b92 3203
22b15758
UB
32042016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3205
3206 PR c/35503
3207 * c-common.h (warn_for_restrict): Declare.
3208 * c-warn.c: Include gcc-rich-location.h.
3209 (warn_for_restrict): New function.
3210 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3211 (gcc_cdiag_char_table): Likewise.
3212 (gcc_cxxdiag_char_table): Likewise.
3213 * c.opt (Wrestrict): New option.
3214
4be719cd
EB
32152016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3216
3217 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3218 for nested types only if the type is a record or union and dump SLOC.
3219
4a826ca6
JM
32202016-11-09 Jason Merrill <jason@redhat.com>
3221
3222 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3223
2e955d50
JJ
32242016-11-09 Jakub Jelinek <jakub@redhat.com>
3225
3226 * c-ubsan.c (ubsan_instrument_shift): Handle split
3227 -fsanitize=shift-base and -fsanitize=shift-exponent.
3228
51dc6603
JM
32292016-11-07 Jason Merrill <jason@redhat.com>
3230
3231 * c.opt (Wc++1z-compat): New.
3232 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3233
6dc4a604
ML
32342016-11-07 Martin Liska <mliska@suse.cz>
3235
3236 * c-warn.c (warn_for_unused_label): Save all labels used
3237 in goto or in &label.
3238
b302001e
JM
32392016-11-03 Jason Merrill <jason@redhat.com>
3240
3241 * c-cppbuiltin.c (c_cpp_builtins): Correct
3242 __cpp_inheriting_constructors.
3243
31f7f784
JM
32442016-11-01 Jason Merrill <jason@redhat.com>
3245
2bc78e3c
JM
3246 * c-cppbuiltin.c (c_cpp_builtins): Update
3247 __cpp_inheriting_constructors.
3248
31f7f784
JM
3249 * c.opt (-fnew-inheriting-ctors): New.
3250 * c-opts.c: Default to on for ABI 11+.
3251
dcb466ec
JJ
32522016-10-31 Jakub Jelinek <jakub@redhat.com>
3253
3254 PR c++/77948
3255 * c.opt (fext-numeric-literals): Add Var and Init.
3256 * c-opts.c (c_common_handle_option): Don't clear
3257 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3258 (c_common_post_options): Clear it here if not set
3259 explicitly.
3260
52e1b91e
AH
32612016-10-28 Aldy Hernandez <aldyh@redhat.com>
3262
3263 PR debug/77773
3264 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3265 if NULL.
3266
e16f1cc7
JJ
32672016-10-25 Jakub Jelinek <jakub@redhat.com>
3268
3269 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3270 * c-common.c (c_common_reswords): Add __builtin_launder.
3271
f8348061
BE
32722016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3273
3274 * c-common.c (c_common_truthvalue_conversion): Warn for
3275 multiplications in boolean context. Fix the quoting of '<<' and '<'
3276 in the shift warning.
3277
eff89e01
BE
32782016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3279
3280 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3281
24bc7bf4
JM
32822016-10-20 Jason Merrill <jason@redhat.com>
3283
3284 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3285
4c712374
BE
32862016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3287
3288 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3289 integer shift ops in boolean context.
3290
32912016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3292
3293 * c.opt (Walloca): New.
3294 (Walloca-larger-than=): New.
3295 (Wvla-larger-than=): New.
3296
8fa18c06
MP
32972016-10-17 Marek Polacek <polacek@redhat.com>
3298
3299 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3300 Return immediately when finding a match.
3301 (warn_tautological_cmp): Remove a boolean variable that is no longer
3302 needed.
3303
b12b1915
MP
33042016-10-17 Marek Polacek <polacek@redhat.com>
3305
3306 * c-attribs.c: New file.
3307 * c-common.c: Move attributes handling to c-attribs.c.
3308 (get_nonnull_operand): No longer static.
3309 * c-common.h: Move the declarations from c-attribs.c to its own section.
3310
2045acd9
JM
33112016-10-14 Jason Merrill <jason@redhat.com>
3312
3313 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3314 and __cpp_deduction_guides.
3315
14a2c9aa
JM
33162016-10-13 Jason Merrill <jason@redhat.com>
3317
3318 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3319
4d0cdd0c
TP
33202016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3321
3322 * c-cppbuiltin.c: Include memmodel.h.
3323 * c-opts.c: Likewise.
3324 * c-pragma.c: Likewise.
3325 * c-warn.c: Likewise.
3326
70f6d5e1
JJ
33272016-10-12 Jakub Jelinek <jakub@redhat.com>
3328
3329 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3330 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3331 * c-opts.c (sanitize_cpp_opts): Initialize
3332 cpp_opts->cpp_warn_implicit_fallthrough.
3333
78f61294
MP
33342016-10-11 Marek Polacek <polacek@redhat.com>
3335
3336 * c-common.c (warning_candidate_p): Change the return type to bool
3337 and return true/false instead of 1/0.
3338 (vector_mode_valid_p): Likewise.
3339
038b5cc0
MP
33402016-10-11 Marek Polacek <polacek@redhat.com>
3341
3342 * c-common.c (fold_for_warn): No longer static.
3343 (bool_promoted_to_int_p): Likewise.
3344 (c_common_get_narrower): Likewise.
3345 (constant_expression_warning): Move to c-warn.c.
3346 (constant_expression_error): Likewise.
3347 (overflow_warning): Likewise.
3348 (warn_logical_operator): Likewise.
3349 (find_array_ref_with_const_idx_r): Likewise.
3350 (warn_tautological_cmp): Likewise.
3351 (expr_has_boolean_operands_p): Likewise.
3352 (warn_logical_not_parentheses): Likewise.
3353 (warn_if_unused_value): Likewise.
3354 (strict_aliasing_warning): Likewise.
3355 (sizeof_pointer_memaccess_warning): Likewise.
3356 (check_main_parameter_types): Likewise.
3357 (conversion_warning): Likewise.
3358 (warnings_for_convert_and_check): Likewise.
3359 (match_case_to_enum_1): Likewise.
3360 (match_case_to_enum): Likewise.
3361 (c_do_switch_warnings): Likewise.
3362 (warn_for_omitted_condop): Likewise.
3363 (readonly_error): Likewise.
3364 (lvalue_error): Likewise.
3365 (invalid_indirection_error): Likewise.
3366 (warn_array_subscript_with_type_char): Likewise.
3367 (warn_about_parentheses): Likewise.
3368 (warn_for_unused_label): Likewise.
3369 (warn_for_div_by_zero): Likewise.
3370 (warn_for_memset): Likewise.
3371 (warn_for_sign_compare): Likewise.
3372 (do_warn_double_promotion): Likewise.
3373 (do_warn_unused_parameter): Likewise.
3374 (record_locally_defined_typedef): Likewise.
3375 (maybe_record_typedef_use): Likewise.
3376 (maybe_warn_unused_local_typedefs): Likewise.
3377 (maybe_warn_bool_compare): Likewise.
3378 (maybe_warn_shift_overflow): Likewise.
3379 (warn_duplicated_cond_add_or_warn): Likewise.
3380 (diagnose_mismatched_attributes): Likewise.
3381 * c-common.h: Move the declarations from c-warn.c to its own section.
3382 * c-warn.c: New file.
3383
627be19f
JM
33842016-10-08 Jason Merrill <jason@redhat.com>
3385
3386 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3387 into COND_EXPR in C++.
3388
7bad794a
JJ
33892016-10-08 Jakub Jelinek <jakub@redhat.com>
3390
3391 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3392 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3393 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3394
be845b04
JJ
33952016-10-07 Jakub Jelinek <jakub@redhat.com>
3396
3397 Implement LWG2296 helper intrinsic
3398 * c-common.h (enum rid): Add RID_ADDRESSOF.
3399 * c-common.c (c_common_reswords): Add __builtin_addressof.
3400
c09c4992
BE
34012016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3402
3403 PR c++/77700
3404 * c-common.c (c_common_truthvalue_conversion): Warn also for
3405 suspicious enum values in boolean context.
3406
342cfb3e
JJ
34072016-10-06 Jakub Jelinek <jakub@redhat.com>
3408
3409 Implement P0258R2 - helper for C++17
3410 std::has_unique_object_representations trait
3411 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3412 * c-common.c (c_common_reswords): Add
3413 __has_unique_object_representations.
3414
2e69f143
JJ
34152016-10-05 Jakub Jelinek <jakub@redhat.com>
3416
3417 PR sanitizer/66343
3418 * c-ubsan.c (ubsan_instrument_return): Don't call
3419 initialize_sanitizer_builtins here.
3420
700fff34
BE
34212016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3422
3423 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3424 conditional expression in boolean context when only one arm is
3425 non-boolean.
3426
9563bfcd
JJ
34272016-10-05 Jakub Jelinek <jakub@redhat.com>
3428
04a32443
JJ
3429 PR sanitizer/77823
3430 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3431 is not integral.
3432
9563bfcd
JJ
3433 * c-common.c (c_common_reswords): Update comment for C++11.
3434
f1644724
JM
34352016-10-04 Jason Merrill <jason@redhat.com>
3436
3437 * c-common.c (make_tree_vector_from_ctor): New.
3438 * c-common.h: Declare it.
3439
5a79befb
JJ
34402016-10-04 Jakub Jelinek <jakub@redhat.com>
3441
3442 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3443 __LIBGCC_JCR_SECTION_NAME__.
3444
1633d3b9
BE
34452016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3446
3447 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3448 left shift in boolean context.
3449
a2c6e7f2
JJ
34502016-09-29 Jakub Jelinek <jakub@redhat.com>
3451
3452 Implement P0001R1 - C++17 removal of register storage class specifier
3453 * c.opt (Wregister): New warning.
3454 * c-opts.c (c_common_post_options): Enable -Wregister by
3455 default for C++17.
3456
75304c87
JG
34572016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3458
3459 * c-opts.c (c_common_post_options): Remove special case for
3460 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3461 in C++.
3462
bbfac6da
JJ
34632016-09-27 Jakub Jelinek <jakub@redhat.com>
3464
6e39060a
JJ
3465 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3466 -std=c++1z.
3467
bbfac6da
JJ
3468 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3469
e73cf9a2
TP
34702016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3471
3472 * c-common.c: Include memmodel.h.
3473
c6147dc4
MP
34742016-09-26 Marek Polacek <polacek@redhat.com>
3475
3476 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3477
81fea426
MP
34782016-09-26 Marek Polacek <polacek@redhat.com>
3479
3480 PR c/7652
3481 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3482 (handle_fallthrough_attribute): New function.
3483 (attribute_fallthrough_p): New function.
3484 * c-common.h (attribute_fallthrough_p): Declare.
3485
9a2300e9
MP
34862016-09-24 Marek Polacek <polacek@redhat.com>
3487
3488 PR c/77490
3489 * c.opt (Wbool-operation): New.
3490
a09e9e35
BE
34912016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3492
3493 * c-common.c (c_common_truthvalue_conversion): Inhibit
3494 Wint-in-bool-context warning with from_macro_definition_at.
3495 Mention the expression will always evaluate to true.
3496
d43b4ccc
MS
34972016-09-21 Martin Sebor <msebor@redhat.com>
3498
3499 PR bootstrap/77676
3500 * c.opt (fprintf-return-value): Temporarily initialize to zero
3501 to unblock bootstrap failures.
3502
2e1c20b1
JJ
35032016-09-21 Jakub Jelinek <jakub@redhat.com>
3504
3505 PR c++/77651
3506 * c.opt (Waligned-new=): Add RejectNegative.
3507 (faligned-new=): Likewise. Spelling fix - change
3508 aligned_new_threshhold to aligned_new_threshold.
3509 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3510 to aligned_new_threshold.
3511
88d0c3f0
MS
35122016-09-20 Martin Sebor <msebor@redhat.com>
3513
3514 PR middle-end/49905
3515 * c.opt: Add -Wformat-length and -fprintf-return-value.
3516
144a96e4
BE
35172016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3518
3519 PR c++/77434
3520 * c.opt (Wint-in-bool-context): New warning.
3521 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3522 constants in boolean context.
3523
63012d9a
JM
35242016-09-19 Joseph Myers <joseph@codesourcery.com>
3525
3526 * c-common.c (max_align_t_align): Also consider alignment of
3527 float128_type_node.
3528
931388ce
JM
35292016-09-15 Jason Merrill <jason@redhat.com>
3530
3531 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3532 DECL_EXTERNAL.
3533
38711381
JM
35342016-09-14 Jason Merrill <jason@redhat.com>
3535
3536 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3537 limit FIELD_DECL, either.
3538
e51fbec3
MP
35392016-09-14 Marek Polacek <polacek@redhat.com>
3540
3541 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3542 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3543 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3544
254830ba
DM
35452016-09-13 David Malcolm <dmalcolm@redhat.com>
3546
3547 * c-common.c (warn_logical_not_parentheses): Replace
3548 rich_location::add_fixit_insert calls with add_fixit_insert_before
3549 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3550
42763690
JM
35512016-09-13 Jason Merrill <jason@redhat.com>
3552 Tom de Vries <tom@codesourcery.com>
3553
3554 PR c++/77427
3555 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3556
9453eee9
JM
35572016-09-13 Jason Merrill <jason@redhat.com>
3558
3559 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3560 limit types at all.
3561
e96809e3
JM
35622016-09-12 Jason Merrill <jason@redhat.com>
3563
3564 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3565 bit/byte confusion, allow large alignment for types.
3566
54dcdb88
BE
35672016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3568
3569 PR c++/77496
3570 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3571
d1463eb9
DM
35722016-09-12 David Malcolm <dmalcolm@redhat.com>
3573
3574 PR c/72858
3575 * c-format.c (argument_parser::check_argument_type): Add params
3576 "type_start" and "conversion_char". Use the former to generate
3577 offset_to_type_start and pass it and conversion_char to
3578 check_format_types.
3579 (check_format_info_main): Capture the start of the type
3580 information as "type_start", and pass it an format_char
3581 to arg_parser.check_argument_type.
3582 (check_format_types): Provide an example in the leading comment.
3583 Add params "offset_to_type_start" and "conversion_char"; pass
3584 them to format_type_warning calls.
3585 (test_get_modifier_for_format_len): Likewise.
3586 (matching_type_p): New function.
3587 (get_format_for_type): Add param "conversion_char" and move
3588 implementation into...
3589 (get_format_for_type_1): ...new function, called twice.
3590 Use new function matching_type_p rather than checking for
3591 TYPE_CANONICAL equality.
3592 (get_corrected_substring): New function.
3593 (format_type_warning): Provide an example in the leading comment.
3594 Add params "offset_to_type_start" and "conversion_char". Replace
3595 call to get_format_for_type with call to get_corrected_substring
3596 and move rejection of hints for widths/precisions there.
3597 (assert_format_for_type_streq): Add param "conversion_char".
3598 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3599 (test_get_format_for_type_printf): Add conversion chars to the
3600 tests, adding coverage for various combinations of integer
3601 vs double conversions, and for preserving octal and hexadecimal
3602 conversions.
3603 (test_get_format_for_type_scanf): Add conversion chars to the
3604 tests.
3605
5b28efbb
TV
36062016-09-10 Tom de Vries <tom@codesourcery.com>
3607
3608 PR C/71602
3609 * c-common.c (build_va_arg): Handle more strict
3610 targetm.canonical_va_list_type. Replace first argument type error with
3611 assert.
3612
3f0177e7
MS
36132016-09-09 Martin Sebor <msebor@redhat.com>
3614
3615 PR c/77520
3616 PR c/77521
3617 * c-format.c (argument_parser::find_format_char_info): Use %qc
3618 format directive unconditionally.
3619
af63ba4b
JM
36202016-09-09 Jason Merrill <jason@redhat.com>
3621
3622 Implement C++17 new of over-aligned types.
3623 * c.opt: Add -faligned-new and -Waligned-new.
3624 * c-common.c (max_align_t_align): Split out from...
3625 (cxx_fundamental_alignment_p): ...here.
3626 * c-common.h: Declare it.
3627 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3628
c65248cb
JM
36292016-09-09 Joseph Myers <joseph@codesourcery.com>
3630
3631 * c-cppbuiltin.c (builtin_define_type_width): New function.
3632 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3633 macros.
3634
e5106e27
DM
36352016-09-07 David Malcolm <dmalcolm@redhat.com>
3636
3637 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3638 a POINTER_TYPE.
3639 (substring_loc::get_location): Move to substring-locations.c,
3640 keeping implementation as...
3641 (c_get_substring_location): New function, from the above, reworked
3642 to use accessors rather than member lookup.
3643 * c-common.h (class substring_loc): Move to substring-locations.h,
3644 replacing with a forward decl.
3645 (c_get_substring_location): New decl.
3646 * c-format.c: Include "substring-locations.h".
3647 (format_warning_va): Move to substring-locations.c.
3648 (format_warning_at_substring): Likewise.
3649
ab20d992 36502016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
3651
3652 PR c/77336
3653 * c-format.c (check_function_format): Avoid issuing warnings for
3654 functions unless they call format functions with non-constant
3655 format strings.
3656
b772a565
RB
36572016-09-06 Richard Biener <rguenther@suse.de>
3658
3659 PR c/77450
3660 * c-common.c (c_common_mark_addressable_vec): Handle
3661 COMPOUND_LITERAL_EXPR.
3662
25ff5dd3
MP
36632016-09-05 Marek Polacek <polacek@redhat.com>
3664
3665 PR c/77423
3666 * c-common.c (bool_promoted_to_int_p): New function.
3667 (expr_has_boolean_operands_p): New function.
3668 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3669 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3670
21234eb5
TV
36712016-09-04 Tom de Vries <tom@codesourcery.com>
3672
3673 revert:
3674 2016-08-29 Tom de Vries <tom@codesourcery.com>
3675
3676 * c-common.c (build_va_arg): Replace first argument type error
3677 with assert.
3678
9dc5773f
JJ
36792016-09-02 Jakub Jelinek <jakub@redhat.com>
3680
3681 PR c/65467
3682 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3683 (c_finish_omp_for): Reject _Atomic qualified iterators.
3684
36852016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3686
3687 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3688 size to guarantee it fits the output of the formatted function
3689 regardless of its arguments.
3690
295844f6
MP
36912016-09-01 Marek Polacek <polacek@redhat.com>
3692
3693 PR c/7652
3694 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3695 FALLTHRU comments.
3696
3d06b6f2
MP
36972016-08-29 Marek Polacek <polacek@redhat.com>
3698
3699 PR c/77292
3700 * c-common.c (warn_logical_not_parentheses): Don't warn for
3701 a comparison or a logical operator.
3702
34cedad5
TV
37032016-08-29 Tom de Vries <tom@codesourcery.com>
3704
3705 * c-common.c (build_va_arg): Fix type comparison assert.
3706
f162d717
TV
37072016-08-29 Tom de Vries <tom@codesourcery.com>
3708
3709 * c-common.c (build_va_arg): Replace first argument type error
3710 with assert.
3711
ba9bbd6f
TV
37122016-08-29 Tom de Vries <tom@codesourcery.com>
3713
3714 PR c/77398
3715 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3716 with error_mark_node as va_list instead of with illegal va_list.
3717
ebef225f
MP
37182016-08-25 Marek Polacek <polacek@redhat.com>
3719 David Malcolm <dmalcolm@redhat.com>
3720
3721 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3722 * c-common.h (warn_logical_not_parentheses): Update declaration.
3723
b00e6e75
MP
37242016-08-22 Marek Polacek <polacek@redhat.com>
3725
3726 PR c++/77321
3727 * c-common.c (warn_for_memset): Check type for null.
3728
6dc198e3
JM
37292016-08-22 Joseph Myers <joseph@codesourcery.com>
3730
14ec014e 3731 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3732 _FloatNx types for suffixes for built-in functions.
3733
c65699ef
JM
37342016-08-19 Joseph Myers <joseph@codesourcery.com>
3735
3736 PR c/32187
3737 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3738 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3739 (RID_FLOAT128X): New enum rid values.
3740 (CASE_RID_FLOATN_NX): New macro.
3741 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3742 keywords.
3743 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3744 corresponding complex types.
3745 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3746 _FloatNx and corresponding complex types.
3747 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3748 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3749 and _FloatNx types for the widest type for determining
3750 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3751 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3752 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3753 and _FloatNx types.
3754 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3755 constants.
3756 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3757 _FloatNx types.
3758
cc015f3a
DM
37592016-08-18 David Malcolm <dmalcolm@redhat.com>
3760
3761 * c-opts.c (c_diagnostic_finalizer): Update for change to
3762 diagnostic_show_locus.
3763
cb18fd07
DM
37642016-08-18 David Malcolm <dmalcolm@redhat.com>
3765
3766 * c-common.c: Include "spellcheck.h".
3767 (cb_get_suggestion): New function.
3768 * c-common.h (cb_get_suggestion): New decl.
3769 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3770 cb_get_suggestion.
3771
a76989dc
MP
37722016-08-18 Marek Polacek <polacek@redhat.com>
3773
3774 PR c/71514
3775 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3776 and pointer-to-VLA.
3777
65e736c0
DM
37782016-08-16 David Malcolm <dmalcolm@redhat.com>
3779
3780 PR c/72857
3781 * c-common.c (substring_loc::get_range): Rename to...
3782 (substring_loc::get_location): ...this, converting param from a
3783 source_range * to a location_t *. Call
3784 get_source_location_for_substring rather than
3785 get_source_range_for_substring, and pass in m_caret_idx.
3786 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3787 (substring_loc::get_range): Replace with...
3788 (substring_loc::get_location): ...this.
3789 (substring_loc::set_caret_index): New method.
3790 (substring_loc): Add field m_caret_idx.
3791 * c-format.c (format_warning_va): Update for above changes.
3792 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3793 clashing with type name.
3794 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3795 (check_argument_type): Likewise.
3796 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3797 Use a copy when emitting warnings, setting the caret index from TYPE.
3798
7e1dde14 37992016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3800 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3801
3802 * c-ada-spec.c (dump_number): New function.
3803 (handle_escape_character): Likewise.
3804 (print_ada_macros): Add handling of constant integers and strings.
3805
191816a3
MP
38062016-08-12 Marek Polacek <polacek@redhat.com>
3807
3808 PR c/7652
3809 * c-common.c (scalar_to_vector): Adjust fall through comment.
3810 * c-opts.c (c_common_handle_option): Likewise.
3811 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3812 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3813 fall through comment.
3814 * cilk.c (extract_free_variables): Add FALLTHRU.
3815
452df4a4
JM
38162016-08-10 Jason Merrill <jason@redhat.com>
3817
3818 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3819
f3365c12
JM
38202016-08-09 Jason Merrill <jason@redhat.com>
3821
3822 * c-common.c (c_common_attribute_table): vector_size affects type
3823 identity.
3824
f0bc3323
MP
38252016-08-09 Marek Polacek <polacek@redhat.com>
3826
3827 PR c/7652
3828 * c-ada-spec.c (dump_generic_ada_node): Add return.
3829
98e5a19a
JM
38302016-08-09 Jason Merrill <jason@redhat.com>
3831
3832 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3833 C++17 constexpr lambdas.
3834
895aa8e1
DM
38352016-08-08 David Malcolm <dmalcolm@redhat.com>
3836
3837 PR c/64955
3838 * c-common.h (selftest::c_format_c_tests): New declaration.
3839 (selftest::run_c_tests): New declaration.
3840 * c-format.c: Include "selftest.h.
3841 (format_warning_va): Add param "corrected_substring" and use
3842 it to add a replacement fix-it hint.
3843 (format_warning_at_substring): Likewise.
3844 (format_warning_at_char): Update for new param of
3845 format_warning_va.
3846 (argument_parser::check_argument_type): Pass "fki" to
3847 check_format_types.
3848 (check_format_types): Add param "fki" and pass it to
3849 format_type_warning.
3850 (deref_n_times): New function.
3851 (get_modifier_for_format_len): New function.
3852 (selftest::test_get_modifier_for_format_len): New function.
3853 (get_format_for_type): New function.
3854 (format_type_warning): Add param "fki" and use it to attempt
3855 to provide hints for argument types when calling
3856 format_warning_at_substring.
3857 (selftest::get_info): New function.
3858 (selftest::assert_format_for_type_streq): New function.
3859 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3860 (selftest::test_get_format_for_type_printf): New function.
3861 (selftest::test_get_format_for_type_scanf): New function.
3862 (selftest::c_format_c_tests): New function.
3863
e52ed3fe
DM
38642016-08-08 David Malcolm <dmalcolm@redhat.com>
3865
3866 PR c/52952
3867 * c-format.c: Include "diagnostic.h".
3868 (location_column_from_byte_offset): Delete.
3869 (location_from_offset): Delete.
3870 (format_warning_va): New function.
3871 (format_warning_at_substring): New function.
3872 (format_warning_at_char): New function.
3873 (check_format_arg): Capture location of format_tree and pass to
3874 check_format_info_main.
3875 (argument_parser): Add fields "start_of_this_format" and
3876 "format_string_cst".
3877 (flag_chars_t::validate): Add param "format_string_cst". Convert
3878 warning_at call using location_from_offset to call to
3879 format_warning_at_char.
3880 (argument_parser::argument_parser): Add param "format_string_cst_"
3881 and use use it to initialize field "format_string_cst".
3882 Initialize new field "start_of_this_format".
3883 (argument_parser::read_format_flags): Convert warning_at call
3884 using location_from_offset to a call to format_warning_at_char.
3885 (argument_parser::read_any_format_left_precision): Likewise.
3886 (argument_parser::read_any_format_precision): Likewise.
3887 (argument_parser::read_any_other_modifier): Likewise.
3888 (argument_parser::find_format_char_info): Likewise, in three places.
3889 (argument_parser::parse_any_scan_set): Likewise, in one place.
3890 (argument_parser::handle_conversions): Likewise, in two places.
3891 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3892 and use it to make a substring_loc. Pass the latter to
3893 check_format_types.
3894 (check_format_info_main): Add params "fmt_param_loc" and
3895 "format_string_cst". Convert warning_at calls using
3896 location_from_offset to calls to format_warning_at_char. Pass the
3897 new params to the arg_parser ctor. Pass "format_string_cst" to
3898 flag_chars.validate. Pass "fmt_param_loc" to
3899 arg_parser.check_argument_type.
3900 (check_format_types): Convert first param from a location_t
3901 to a const substring_loc & and rename to "fmt_loc". Attempt
3902 to extract the range of the relevant parameter and pass it
3903 to format_type_warning.
3904 (format_type_warning): Convert first param from a location_t
3905 to a const substring_loc & and rename to "fmt_loc". Add
3906 params "param_range" and "type". Replace calls to warning_at
3907 with calls to format_warning_at_substring.
3908
1c4d457e
DM
39092016-08-08 David Malcolm <dmalcolm@redhat.com>
3910
3911 * c-format.c (class flag_chars_t): New class.
3912 (struct length_modifier): New struct.
3913 (class argument_parser): New class.
3914 (flag_chars_t::flag_chars_t): New ctor.
3915 (flag_chars_t::has_char_p): New method.
3916 (flag_chars_t::add_char): New method.
3917 (flag_chars_t::validate): New method.
3918 (flag_chars_t::get_alloc_flag): New method.
3919 (flag_chars_t::assignment_suppression_p): New method.
3920 (argument_parser::argument_parser): New ctor.
3921 (argument_parser::read_any_dollar): New method.
3922 (argument_parser::read_format_flags): New method.
3923 (argument_parser::read_any_format_width): New method.
3924 (argument_parser::read_any_format_left_precision): New method.
3925 (argument_parser::read_any_format_precision): New method.
3926 (argument_parser::handle_alloc_chars): New method.
3927 (argument_parser::read_any_length_modifier): New method.
3928 (argument_parser::read_any_other_modifier): New method.
3929 (argument_parser::find_format_char_info): New method.
3930 (argument_parser::validate_flag_pairs): New method.
3931 (argument_parser::give_y2k_warnings): New method.
3932 (argument_parser::parse_any_scan_set): New method.
3933 (argument_parser::handle_conversions): New method.
3934 (argument_parser::check_argument_type): New method.
3935 (check_format_info_main): Introduce classes argument_parser
3936 and flag_chars_t, moving the code within the loop into methods
3937 of these classes. Make various locals "const".
3938
88fa5555
DM
39392016-08-05 David Malcolm <dmalcolm@redhat.com>
3940
3941 * c-common.c: Include "substring-locations.h".
3942 (get_cpp_ttype_from_string_type): New function.
3943 (g_string_concat_db): New global.
3944 (substring_loc::get_range): New method.
3945 * c-common.h (g_string_concat_db): New declaration.
3946 (class substring_loc): New class.
3947 * c-lex.c (lex_string): When concatenating strings, capture the
3948 locations of all tokens using a new obstack, and record the
3949 concatenation locations within g_string_concat_db.
3950 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3951 on the ggc-heap.
3952
78169471
MP
39532016-07-29 Marek Polacek <polacek@redhat.com>
3954
638fc14f
MP
3955 PR c/71926
3956 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3957 parentheses warning.
3958
78169471
MP
3959 PR c/71574
3960 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3961
1225d6b1
ML
39622016-07-28 Martin Liska <mliska@suse.cz>
3963
3964 PR gcov-profile/68025
3965 * c-common.c (handle_no_profile_instrument_function_attribute):
3966
ec1e2a40
BE
39672016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3968
3969 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3970 BITS_PER_UNIT_LOG.
3971
5ec2cd9f
JM
39722016-07-25 Jason Merrill <jason@redhat.com>
3973
3974 PR c++/65970
3975 * c.opt (fconstexpr-loop-limit): New.
3976
9dc5773f 39772016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3978
3979 PR c++/71675
3980 * c-common.c (resolve_overloaded_builtin): Avoid converting
3981 __atomic_compare_exchange_n return type to that of what its
3982 first argument points to.
3983
e3fe09c1
UB
39842016-07-22 Uros Bizjak <ubizjak@gmail.com>
3985
3986 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3987 ~(unsigned HOST_WIDE_INT) 0.
3988
bc91c436
ML
39892016-07-22 Martin Liska <mliska@suse.cz>
3990
3991 PR gcov-profile/69028
3992 PR gcov-profile/62047
3993 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3994 to the current_function_decl.
3995
451dcc66
JM
39962016-07-21 Jason Merrill <jason@redhat.com>
3997
3998 PR c++/65168
3999 * c-common.c (c_common_truthvalue_conversion): Check
4000 c_inhibit_evaluation_warnings for warning about address of
4001 reference.
4002
de6a69ee
DM
40032016-07-20 David Malcolm <dmalcolm@redhat.com>
4004
4005 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4006 const char *.
4007
d022c55a
JM
40082016-07-15 Jason Merrill <jason@redhat.com>
4009
4010 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4011
ddbbcb19
JJ
40122016-07-15 Jakub Jelinek <jakub@redhat.com>
4013
4014 PR c/71858
4015 * c-common.h (enum lookup_name_fuzzy_kind): Add
4016 FUZZY_LOOKUP_FUNCTION_NAME.
4017
d0cf395a
JM
40182016-07-08 Jason Merrill <jason@redhat.com>
4019
4020 P0145: Refining Expression Order for C++.
4021 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4022 * c-opts.c: Adjust.
4023
98d44e93
MT
40242016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4025
4026 PR c++/71214
4027 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4028
f9d8d994
TS
40292016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4030
4031 * c-pragma.h (enum pragma_kind): Rename
4032 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4033 users.
4034
4aa83879
RB
40352016-06-29 Richard Biener <rguenther@suse.de>
4036
4037 PR middle-end/71002
4038 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4039
a25bd9e6
JM
40402016-06-24 Jason Merrill <jason@redhat.com>
4041
4042 P0145R2: Refining Expression Order for C++.
4043 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4044 MODIFY_EXPR.
4045
a86451b9
JJ
40462016-06-24 Jakub Jelinek <jakub@redhat.com>
4047
4048 * c-common.c (check_builtin_function_arguments): Require last
4049 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4050 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4051 if the last argument is pointer to enumerated or boolean type.
4052
1a4f11c8
DM
40532016-06-22 David Malcolm <dmalcolm@redhat.com>
4054
4055 PR c/70339
4056 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4057 (lookup_name_fuzzy): New prototype.
4058
fe55692c
JDA
40592016-06-21 John David Anglin <danglin@gcc.gnu.org>
4060
4061 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4062
4eb24e01
JM
40632016-06-14 Jason Merrill <jason@redhat.com>
4064
4065 P0145R2: Refining Expression Order for C++.
4066 * c.opt (fargs-in-order): New.
4067 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4068
ef7cf206
JJ
40692016-06-13 Jakub Jelinek <jakub@redhat.com>
4070
0dda258b
JJ
4071 PR sanitizer/71498
4072 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4073 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4074
ef7cf206
JJ
4075 PR preprocessor/71183
4076 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4077 to cb_get_source_date_epoch.
4078
50b15873
JJ
40792016-06-10 Jakub Jelinek <jakub@redhat.com>
4080
4081 PR c/68657
4082 * c.opt (Wpsabi): Add Warning flag.
4083
4d926e34
MS
40842016-06-10 Martin Sebor <msebor@redhat.com>
4085
4086 PR c/71392
14ec014e 4087 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4088 the nonnull attribute in type-generic builtins.
4089
e01b4e16
MS
40902016-06-09 Martin Sebor <msebor@redhat.com>
4091
4092 PR c/70883
4093 * c-common.c (builtin_function_validate_nargs): Make text of error
4094 message consistent with others like it.
4095
44a845ca
MS
40962016-06-08 Martin Sebor <msebor@redhat.com>
4097 Jakub Jelinek <jakub@redhat.com>
4098
4099 PR c++/70507
4100 PR c/68120
4101 * c-common.c (check_builtin_function_arguments): Handle
4102 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4103
a80a7051
RB
41042016-06-08 Richard Biener <rguenther@suse.de>
4105
4106 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4107
bfd67b47
RB
41082016-06-07 Richard Biener <rguenther@suse.de>
4109
4110 PR c/61564
4111 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4112 options and warn about others.
4113
15c98b2e
ES
41142016-06-01 Eduard Sanou <dhole@openmailbox.org>
4115
4116 * c-common.c (get_source_date_epoch): Rename to
4117 cb_get_source_date_epoch.
4118 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4119 message when the parsing fails. Use error_at instead of fatal_error.
4120 * c-common.h (get_source_date_epoch): Rename to
4121 cb_get_source_date_epoch.
4122 * c-common.h (cb_get_source_date_epoch): Prototype.
4123 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4124 * c-common.h (c_omp_region_type): Remove trailing comma.
4125 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4126 * c-lex.c (c_lex_with_flags): Remove initialization of
4127 pfile->source_date_epoch.
4128
00631022
JJ
41292016-05-30 Jakub Jelinek <jakub@redhat.com>
4130
4131 PR c++/71349
4132 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4133 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4134 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4135 instead of C_OMP_CLAUSE_SPLIT_FOR.
4136
f17a223d
RB
41372016-05-24 Richard Biener <rguenther@suse.de>
4138
4139 PR middle-end/70434
4140 PR c/69504
4141 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4142 (convert_vector_to_array_for_subscript): ... this.
4143 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4144 VIEW_CONVERT_EXPR to an array type. Rename to ...
4145 (convert_vector_to_array_for_subscript): ... this.
4146
4f2e1536
MP
41472016-05-12 Marek Polacek <polacek@redhat.com>
4148
4149 PR c/70756
4150 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4151 size_in_bytes and pass LOC to it.
4152
d6e83a8d
MM
41532016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4154
4155 PR c/43651
4156 * c.opt (Wduplicate-decl-specifier): New option.
4157
5c3a10fb
MP
41582016-05-11 Marek Polacek <polacek@redhat.com>
4159
4160 PR c++/71024
4161 * c-common.c (diagnose_mismatched_attributes): New function.
4162 * c-common.h (diagnose_mismatched_attributes): Declare.
4163
deef7113
MP
41642016-05-04 Marek Polacek <polacek@redhat.com>
4165
4166 * c.opt (Wdangling-else): New option.
4167
79ce98bc
MP
41682016-05-03 Marek Polacek <polacek@redhat.com>
4169
4170 PR c/70859
4171 * c-common.c (builtin_function_validate_nargs): Add location
4172 parameter. Use it.
4173 (check_builtin_function_arguments): Add location and arguments
4174 parameters. Use them.
4175 * c-common.h (check_builtin_function_arguments): Update declaration.
4176
381cdae4
RB
41772016-05-03 Richard Biener <rguenther@suse.de>
4178
4179 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4180 allow call args to gimplify to SSA names.
4181
1d793c34
MP
41822016-05-03 Marek Polacek <polacek@redhat.com>
4183
4184 * c-common.h (enum c_omp_region_type): Remove stray comma.
4185
77886428
CP
41862016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4187
4188 * c-common.h (enum c_omp_region_type): Define.
4189
697e0b28
RS
41902016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4191
4192 * c-common.c (shorten_compare): Use wi::to_wide.
4193
e7ff0319
CP
41942016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4195
4196 PR middle-end/70626
4197 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4198 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4199 reduction clauses in acc parallel loops.
4200
2fff3db8
MP
42012016-04-29 Marek Polacek <polacek@redhat.com>
4202
4203 PR c/70852
4204 * c-common.c (warn_for_memset): Check domain before accessing it.
4205
509063eb
DV
42062016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4207
4208 PR/69089
4209 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4210 "aligned" attribute.
4211
b632761d
JM
42122016-04-28 Jason Merrill <jason@redhat.com>
4213
4214 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4215
174f6622
ES
42162016-04-28 Eduard Sanou <dhole@openmailbox.org>
4217 Matthias Klose <doko@debian.org>
4218
4219 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4220 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4221 handling.
4222 * c-common.h (get_source_date_epoch): Prototype.
4223 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4224
6bc2bb18
RB
42252015-04-27 Ryan Burn <contact@rnburn.com>
4226
4227 PR c++/69024
4228 PR c++/68997
4229 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4230 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4231 external linkage.
4232 (cilk_detect_and_unwrap): Corresponding changes.
4233 (extract_free_variables): Don't extract free variables from
4234 AGGR_INIT_EXPR slot.
4235 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4236 (cilk_recognize_spawn): Likewise.
4237
c1e1f433
BS
42382016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4239
4240 * c.opt (Wmemset-elt-size): New option.
4241 * c-common.c (warn_for_memset): New function.
4242 * c-common.h (warn_for_memset): Declare.
4243
d067e05f
JM
42442016-04-25 Jason Merrill <jason@redhat.com>
4245
4246 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4247 No longer static.
4248 * c-common.h: Declare it.
4249 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4250
9aa36ae5
JM
42512016-04-22 Jason Merrill <jason@redhat.com>
4252
4253 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4254
477d4906
IV
42552016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4256
4257 PR c++/69363
4258 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4259 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4260
fe37c7af
MM
42612016-04-18 Michael Matz <matz@suse.de>
4262
4263 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4264 and SET_DECL_ALIGN.
4265
23f2660f
EB
42662016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4267
4268 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4269 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4270 to incomplete types.
4271 (dump_nested_type): Remove redundant tests and tidy up.
4272 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4273 a type which is the typedef of an original type.
4274
1e77281b
MP
42752016-04-15 Marek Polacek <polacek@redhat.com>
4276
4277 PR c/70651
4278 * c-common.c (build_va_arg): Change two asserts into errors and return
4279 error_mark_node.
4280
b3a77f21
MP
42812016-04-13 Marek Polacek <polacek@redhat.com>
4282
4283 PR c++/70639
4284 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4285 for switch statements, too.
4286
322b8466
JM
42872016-03-28 Jason Merrill <jason@redhat.com>
4288
4289 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4290
fbdb6baf
MP
42912016-03-23 Marek Polacek <polacek@redhat.com>
4292
4293 PR c++/69884
4294 * c.opt (Wignored-attributes): New option.
4295
5c240f4d
DM
42962016-03-22 David Malcolm <dmalcolm@redhat.com>
4297
4298 PR c/69993
4299 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4300 diagnostic text, reversing the order of the warning and note so
4301 that they appear in source order.
4302
14ba7b28
MP
43032016-03-17 Marek Polacek <polacek@redhat.com>
4304
4305 PR c/69407
4306 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4307 operations.
4308
08a1cadc
JM
43092016-03-14 Jason Merrill <jason@redhat.com>
4310
2aaeea19
JM
4311 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4312
08a1cadc
JM
4313 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4314
c06d25bb
RB
43152016-03-09 Richard Biener <rguenther@suse.de>
4316
4317 PR c/70143
4318 * c-common.c (strict_aliasing_warning): Add back
4319 alias_sets_conflict_p check.
4320
80aac5c8
JM
43212016-03-08 Jason Merrill <jason@redhat.com>
4322
4323 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4324
64b23c13
DM
43252016-03-04 David Malcolm <dmalcolm@redhat.com>
4326
4327 PR c/68187
4328 * c-indentation.c (get_visual_column): Move code to determine next
4329 tab stop to...
4330 (next_tab_stop): ...this new function.
4331 (line_contains_hash_if): Delete function.
4332 (detect_preprocessor_logic): Delete function.
4333 (get_first_nws_vis_column): New function.
4334 (detect_intervening_unindent): New function.
4335 (should_warn_for_misleading_indentation): Replace call to
4336 detect_preprocessor_logic with a call to
4337 detect_intervening_unindent.
4338
729526f5
DM
43392016-03-04 David Malcolm <dmalcolm@redhat.com>
4340
4341 PR c/68187
4342 * c-indentation.c (should_warn_for_misleading_indentation): When
4343 suppressing warnings about cases where the guard and body are on
4344 the same column, only use the first non-whitespace column in place
4345 of the guard token column when dealing with "else" clauses.
4346 When rejecting aligned BODY and NEXT, loosen the requirement
4347 from equality with the first non-whitespace of guard to simply
4348 that they not be indented relative to it.
4349
e9a35493
RB
43502016-03-04 Richard Biener <rguenther@suse.de>
4351
4352 PR c++/70054
4353 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4354 instead of alias_sets_conflict_p.
4355
1be56bc5
MP
43562016-03-01 Marek Polacek <polacek@redhat.com>
4357
4358 PR c++/69795
4359 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4360 any DECL.
4361
35886f0b
MS
43622016-02-22 Martin Sebor <msebor@redhat.com>
4363
4364 PR middle-end/69780
4365 * c-common.c (check_builtin_function_arguments): Validate and
4366 reject invalid arguments to __builtin_alloca_with_align.
4367
4246c8da
MW
43682016-02-20 Mark Wielaard <mjw@redhat.com>
4369
4370 PR c/28901
4371 * c.opt (Wunused-const-variable): Turn into Alias for...
4372 (Wunused-const-variable=): New option.
4373
268be88c
BE
43742016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4375
4376 PR c++/69865
4377 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4378 here...
4379 (c_common_init_options): ...to here.
4380 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4381
871b3f47
JJ
43822016-02-19 Jakub Jelinek <jakub@redhat.com>
4383
4384 PR c++/69826
4385 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4386 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4387 flag_preprocess_only.
4388
bf14eba2
JJ
43892016-02-16 Jakub Jelinek <jakub@redhat.com>
4390
4391 PR c/69835
4392 * c.opt (Wnonnull-compare): Enable for -Wall.
4393
ba6b3795
JJ
43942016-02-15 Jakub Jelinek <jakub@redhat.com>
4395
4396 PR c++/69797
4397 * c-common.c (sync_resolve_size): Diagnose too few arguments
4398 even when params is non-NULL empty vector.
4399
a011cd92
BS
44002016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4401
4402 PR target/60410
4403 * c.opt (fshort-double): Remove.
4404
46cb9332
MS
44052016-02-05 Martin Sebor <msebor@redhat.com>
4406
4407 PR c++/69662
4408 * c.opt (Warning options): Update -Wplacement-new to take
4409 an optional argument.
4410
e1b81f2b
JJ
44112016-02-01 Jakub Jelinek <jakub@redhat.com>
4412
4413 PR preprocessor/69543
4414 PR c/69558
4415 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4416 instead of loc to control_warning_option.
4417
b6adbb9f
NS
44182016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4419
4420 * c.opt (fopenacc-dim=): New option.
4421
5d70666e
RB
44222016-01-27 Ryan Burn <contact@rnburn.com>
4423
4424 PR cilkplus/69267
4425 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4426 gimplify_arg. Removed superfluous post_p argument.
4427 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4428 superfluous post_p argument.
4429 * c-gimplify.c (c_gimplify_expr): Likewise.
4430
01e1dea3
DM
44312016-01-26 David Malcolm <dmalcolm@redhat.com>
4432
4433 PR other/69006
4434 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4435 pp_newline_and_flush with pp_flush.
4436
9f04a53e
MS
44372016-01-20 Martin Sebor <msebor@redhat.com>
4438
4439 PR c/69405
4440 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4441 an incompatible argument when the argument isn't a valid tree node.
4442
7f26f7df
JM
44432016-01-18 Jason Merrill <jason@redhat.com>
4444
4445 PR c++/68767
4446 * c-common.c (check_function_arguments_recurse): Fold the whole
4447 COND_EXPR, not just the condition.
4448
f62bf092
TV
44492016-01-18 Tom de Vries <tom@codesourcery.com>
4450
4451 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4452 classify as loop clause.
4453
e0a575ff
JJ
44542016-01-15 Jakub Jelinek <jakub@redhat.com>
4455
4456 PR bootstrap/68271
4457 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4458 C++ FE no longer has limit on number of pragmas.
4459
44602015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4461
4462 PR c++/69048
4463 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4464 to add missing cleanup point.
b6e3db06 4465
c7df95d8
DM
44662016-01-14 David Malcolm <dmalcolm@redhat.com>
4467
4468 PR c++/68819
4469 * c-indentation.c (get_visual_column): Add location_t param.
4470 Handle the column number being zero by effectively disabling the
4471 warning, with an "inform".
4472 (should_warn_for_misleading_indentation): Add location_t argument
4473 for all uses of get_visual_column.
4474
21efdd80
PP
44752016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4476
4477 PR c++/69029
4478 * c-indentation.c (should_warn_for_misleading_indentation):
4479 Don't warn about do-while statements.
4480
7a127fa7
MS
44812016-01-07 Martin Sebor <msebor@redhat.com>
4482
4483 PR c/68966
4484 * c-common.c (sync_resolve_size): Reject first argument when it's
4485 a pointer to _Bool.
4486
c589e975
DM
44872016-01-05 David Malcolm <dmalcolm@redhat.com>
4488
4489 PR c/69122
4490 * c-indentation.c (get_visual_column): Remove default argument.
4491 (should_warn_for_misleading_indentation): For the multiline case,
4492 update call to get_visual_column for next_stmt_exploc so that it
4493 captures the location of the first non-whitespace character in the
4494 relevant line. Don't issue warnings if there is non-whitespace
4495 before the next statement.
4496
818ab71a
JJ
44972016-01-04 Jakub Jelinek <jakub@redhat.com>
4498
4499 Update copyright years.
4500
745e411d
DM
45012015-12-21 David Malcolm <dmalcolm@redhat.com>
4502
4503 * c-common.c (binary_op_error): Convert first param from
4504 location_t to rich_location * and use it when emitting an error.
4505 * c-common.h (binary_op_error): Convert first param from
4506 location_t to rich_location *.
4507
de67c4c3
DM
45082015-12-16 David Malcolm <dmalcolm@redhat.com>
4509
4510 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4511 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4512
4a38b02b
IV
45132015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4514
4515 * c-common.c (c_common_attribute_table): Handle "omp declare target
4516 link" attribute.
4517
54d62f51
JJ
45182015-12-14 Jakub Jelinek <jakub@redhat.com>
4519
4520 PR c/68833
4521 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4522
8d4227c8
TB
45232014-12-12 Tobias Burnus <burnus@net-b.de>
4524
4525 PR fortran/68815
4526 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4527 specifiers (%d, %i,%u and %c).
4528
f6069ccc
DM
45292015-12-10 David Malcolm <dmalcolm@redhat.com>
4530
4531 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4532
63bbf46d
JJ
45332015-12-08 Jakub Jelinek <jakub@redhat.com>
4534
4535 PR c/48088
4536 PR c/68657
4537 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4538 * c-pragma.c (handle_pragma_diagnostic): Adjust
4539 control_warning_option caller.
4540
f79520bb
DM
45412015-12-07 David Malcolm <dmalcolm@redhat.com>
4542
4543 * c-common.c (c_cpp_error): Update for change to
4544 rich_location::set_range.
4545
b3d5bc62
JJ
45462015-12-04 Paolo Bonzini <bonzini@gnu.org>
4547
4548 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4549 shifting 1 out of the sign bit.
4550
45512015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4552
4553 * c-common.c (c_common_attribute_table[]): Update max arguments
4554 count for "simd" attribute.
4555 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4556
6eb4a537
JJ
45572015-12-03 Jakub Jelinek <jakub@redhat.com>
4558
4559 PR preprocessor/57580
4560 * c-ppoutput.c (print): Change printed field to bool.
4561 Move src_file last for smaller padding.
4562 (init_pp_output): Set print.printed to false instead of 0.
4563 (scan_translation_unit): Fix up formatting. Set print.printed
4564 to true after printing something other than newline.
4565 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4566 (maybe_print_line_1): Set print.printed to false instead of 0.
4567 (print_line_1): Likewise.
4568 (do_line_change): Set print.printed to true instead of 1.
4569 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4570 dump_macro): Set print.printed to false after printing newline.
4571
4250754e
JM
45722015-12-02 Jason Merrill <jason@redhat.com>
4573
f479b43d
JM
4574 * c-common.c (fold_for_warn): New.
4575 (warn_logical_operator, warn_tautological_cmp)
4576 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4577
4250754e
JM
4578 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4579 (c_fully_fold_internal, decl_constant_value_for_optimization):
4580 Move to c/c-fold.c.
4581 * c-common.h: Don't declare decl_constant_value_for_optimization.
4582
e9e32ee6
JM
45832015-12-02 Joseph Myers <joseph@codesourcery.com>
4584
4585 PR c/68162
4586 * c-common.h (c_build_qualified_type): Add extra default
4587 arguments.
4588
37d5ad46
JB
45892015-12-01 Julian Brown <julian@codesourcery.com>
4590 Cesar Philippidis <cesar@codesourcery.com>
4591 James Norris <James_Norris@mentor.com>
4592
4593 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4594 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4595 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4596
f07862c7
EB
45972015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4598
4599 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4600 (decl_sloc_common): Delete and move bulk of processing to...
4601 (decl_sloc): ...here.
4602 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4603 (dump_ada_double_name): Remove S parameter and compute the suffix.
4604 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4605 element type and deal with an anonymous one.
4606 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4607 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4608 and remove reference to QUAL_UNION_TYPE.
4609 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4610 (dump_nested_type): ...here. New function extracted from above.
4611 Generate a full declaration for anonymous element type of arrays.
4612 (print_ada_declaration): Really skip anonymous declarations. Remove
4613 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4614 Clean up processing of declarations of array types and objects.
4615 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4616 Remove obsolete code and tidy up.
4617
75c8aac3
JH
46182015-11-29 Jan Hubicka <hubicka@ucw.cz>
4619
4620 PR c/67581
4621 * c-common.c (handle_transparent_union_attribute): Update
4622 also type variants.
4623
b58d3df2
ML
46242015-11-27 Martin Liska <mliska@suse.cz>
4625
4626 PR c++/68312
4627 * array-notation-common.c (cilkplus_extract_an_triplets):
4628 Release vector of vectors.
4629 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4630
89a01fcf
EB
46312015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4632
4633 PR c++/68527
4634 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4635 (print_ada_struct_decl): Likewise.
4636
cc5c5226
IZ
46372015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4638
4639 PR c++/68001
4640 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4641 * cilk.c (recognize_spawn): Determine location in a more precise
4642 way.
4643
269adb9d
JM
46442015-11-19 Jason Merrill <jason@redhat.com>
4645
4646 * c-common.c (shorten_compare): But look through macros from
4647 system headers.
4648
d0eccfcd
JM
46492015-11-18 Jason Merrill <jason@redhat.com>
4650
4651 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4652 non-constant operand comes from a macro.
4653
3e44547c
JM
46542015-11-17 Jason Merrill <jason@redhat.com>
4655
4656 PR bootstrap/68346
4657 * c-common.c (warn_tautological_cmp): Fold before checking for
4658 constants.
4659
0f62c7a0
MP
46602015-11-16 Marek Polacek <polacek@redhat.com>
4661
4662 PR c++/68362
4663 * c-common.c (check_case_bounds): Fold low and high cases.
4664
a868811e
MP
46652015-11-16 Marek Polacek <polacek@redhat.com>
4666
4667 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4668 * c-common.c (c_common_get_alias_set): Likewise.
4669 (handle_visibility_attribute): Likewise.
4670
fff77217
KY
46712015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4672
4673 * c-common.c (handle_simd_attribute): New.
4674 (struct attribute_spec): Add entry for "simd".
4675 (handle_simd_attribute): New.
4676
269e63b7
KT
46772015-11-13 Kai Tietz <ktietz70@googlemail.com>
4678
4679 * c-lex.c (interpret_float): Use fold_convert.
4680
ebedc9a3
DM
46812015-11-13 David Malcolm <dmalcolm@redhat.com>
4682
4683 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4684 and store it on the result.
4685 * c-opts.c (c_common_init_options): Set
4686 global_dc->colorize_source_p.
4687
6e232ba4
JN
46882015-11-12 James Norris <jnorris@codesourcery.com>
4689 Joseph Myers <joseph@codesourcery.com>
4690
7365279f 4691 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4692 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4693 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4694 PRAGMA_OACC_CLAUSE_LINK.
4695
e78bede6
MP
46962015-11-11 Marek Polacek <polacek@redhat.com>
4697
4698 PR c/68107
4699 PR c++/68266
4700 * c-common.c (valid_array_size_p): New function.
4701 * c-common.h (valid_array_size_p): Declare.
4702
3f8257db 47032015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4704
4705 PR bootstrap/68271
4706 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4707
69f293c9
AM
47082015-11-11 Andrew MacLeod <amacleod@redhat.com>
4709
4710 * array-notation-common.c: Remove unused header files.
4711 * c-ada-spec.c: Likewise.
4712 * c-cilkplus.c: Likewise.
4713 * c-common.c: Likewise.
4714 * c-cppbuiltin.c: Likewise.
4715 * c-dump.c: Likewise.
4716 * c-format.c: Likewise.
4717 * c-gimplify.c: Likewise.
4718 * c-indentation.c: Likewise.
4719 * c-lex.c: Likewise.
4720 * c-omp.c: Likewise.
4721 * c-opts.c: Likewise.
4722 * c-pch.c: Likewise.
4723 * c-ppoutput.c: Likewise.
4724 * c-pragma.c: Likewise.
4725 * c-pretty-print.c: Likewise.
4726 * c-semantics.c: Likewise.
4727 * c-ubsan.c: Likewise.
4728 * cilk.c: Likewise.
4729 * stub-objc.c: Likewise.
4730
3a40d81d
NS
47312015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4732 Cesar Philippidis <cesar@codesourcery.com>
4733 James Norris <jnorris@codesourcery.com>
4734 Julian Brown <julian@codesourcery.com>
4735 Nathan Sidwell <nathan@codesourcery.com>
4736
4737 * c-pragma.c (oacc_pragmas): Add "routine".
4738 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4739
ee45a32d
EB
47402015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4741
4742 * c-common.c (c_common_attributes): Add scalar_storage_order.
4743 (handle_scalar_storage_order_attribute): New function.
4744 * c-pragma.c (global_sso): New variable.
4745 (maybe_apply_pragma_scalar_storage_order): New function.
4746 (handle_pragma_scalar_storage_order): Likewise.
4747 (init_pragma): Register scalar_storage_order.
4748 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4749 * c.opt (Wscalar-storage-order): New warning.
4750 (fsso-struct=): New option.
4751
eb11eb15
MS
47522015-11-08 Martin Sebor <msebor@redhat.com>
4753
4754 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4755
0aad0198
RS
47562015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4757
4758 * c-common.c: Don't undef DEF_BUILTIN.
4759
8a645150
DM
47602015-11-06 David Malcolm <dmalcolm@redhat.com>
4761
4762 * c-common.c (c_cpp_error): Convert parameter from location_t to
4763 rich_location *. Eliminate the "column_override" parameter and
4764 the call to diagnostic_override_column.
4765 Update the "done_lexing" clause to set range 0
4766 on the rich_location, rather than overwriting a location_t.
4767 * c-common.h (c_cpp_error): Convert parameter from location_t to
4768 rich_location *. Eliminate the "column_override" parameter.
4769
7a5e4956
CP
47702015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4771 Thomas Schwinge <thomas@codesourcery.com>
4772 James Norris <jnorris@codesourcery.com>
4773
4774 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4775 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4776 clauses with parallel and kernels and loops.
4777 * c-pragma.h (enum pragma_omp_clause): Add entries for
4778 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4779 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4780 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4781 INDEPENDENT,SEQ}.
4782 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4783
e2f5cc96
MS
47842015-11-05 Martin Sebor <msebor@redhat.com>
4785
4786 PR c++/67942
4787 * c.opt (-Wplacement-new): New option.
4788
e01d41e5
JJ
47892015-11-05 Jakub Jelinek <jakub@redhat.com>
4790
4791 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4792 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4793 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4794 save_expr or create_tmp_var* if TEST is true.
4795 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4796 Don't call add_stmt here.
4797 (struct c_omp_check_loop_iv_data): New type.
4798 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4799 c_omp_check_loop_iv_exprs): New functions.
4800 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4801 distribute.
4802 (c_omp_declare_simd_clauses_to_numbers): Change
4803 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4804 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4805 from numbers to PARM_DECLs.
4806
595278be
MM
48072015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4808
4809 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4810 flag_checking.
4811
3f8257db 48122015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4813
4814 PR c++-common/67882
b3d5bc62
JJ
4815 * c-common.h (fold_offsetof_1): Add argument.
4816 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4817 offsetof expressions that reference elements past the end of
4818 an array.
4819
4bf9e5a8
TS
48202015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4821 Chung-Lin Tang <cltang@codesourcery.com>
4822
4823 * c-pragma.c (oacc_pragmas): Add "atomic".
4824 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4825
3b1661a9
ES
48262015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4827
4828 * c-common.c (handle_target_clones_attribute): New.
4829 (c_common_attribute_table): Add handle_target_clones_attribute.
4830 (handle_always_inline_attribute): Add check on target_clones attribute.
4831 (handle_target_attribute): Ditto.
4832
2adfab87
AM
48332015-10-29 Andrew MacLeod <amacleod@redhat.com>
4834
4835 * array-notation-common.c: Reorder #include's and remove duplicates.
4836 * c-ada-spec.c: Likewise.
4837 * c-cilkplus.c: Likewise.
4838 * c-common.c: Likewise.
4839 * c-cppbuiltin.c: Likewise.
4840 * c-dump.c: Likewise.
4841 * c-format.c: Likewise.
4842 * c-gimplify.c: Likewise.
4843 * c-indentation.c: Likewise.
4844 * c-lex.c: Likewise.
4845 * c-omp.c: Likewise.
4846 * c-opts.c: Likewise.
4847 * c-pch.c: Likewise.
4848 * c-ppoutput.c: Likewise.
4849 * c-pragma.c: Likewise.
4850 * c-pretty-print.c: Likewise.
4851 * c-semantics.c: Likewise.
4852 * c-ubsan.c: Likewise.
4853 * cilk.c: Likewise.
4854 * stub-objc.c: Likewise.
4855
d90ec4f2
JM
48562015-10-28 Jason Merrill <jason@redhat.com>
4857
4858 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4859
88bae6f4
TS
48602015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4861 James Norris <jnorris@codesourcery.com>
4862 Cesar Philippidis <cesar@codesourcery.com>
4863
4864 PR c/64765
4865 PR c/64880
4866 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4867 * c-omp.c (c_oacc_split_loop_clauses): New function.
4868
b1726d6c
MS
48692015-10-21 Martin Sebor <msebor@redhat.com>
4870
4871 PR driver/68043
4872 * c.opt: End each sentence that describes an option with a period.
4873
fa60eeb9
MP
48742015-10-20 Marek Polacek <polacek@redhat.com>
4875
4876 * array-notation-common.c (is_cilkplus_vector_p): Define.
4877 * c-common.h (is_cilkplus_vector_p): Declare.
4878
95979049
MP
48792015-10-20 Marek Polacek <polacek@redhat.com>
4880
4881 * c.opt (std=gnu++11): Do not describe as experimental.
4882 (std=gnu++14): Likewise.
4883
2a9fb712
JM
48842015-10-19 Jason Merrill <jason@redhat.com>
4885
4886 * c-cppbuiltin.c (c_cpp_builtins): Define
4887 __cpp_nontype_template_args.
4888
13b380a3
JM
48892015-10-19 Jason Merrill <jason@redhat.com>
4890
4891 * c-cppbuiltin.c (c_cpp_builtins): Define
4892 __cpp_enumerator_attributes, __cpp_fold_expressions,
4893 __cpp_unicode_characters.
4894
d9a6bd32
JJ
48952015-10-13 Jakub Jelinek <jakub@redhat.com>
4896 Aldy Hernandez <aldyh@redhat.com>
4897
4898 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4899 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4900 (c_define_builtins): Likewise.
4901 * c-common.h (enum c_omp_clause_split): Add
4902 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4903 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4904 (c_finish_omp_for): Add ORIG_DECLV argument.
4905 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4906 201511 instead of 201307.
4907 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4908 OMP_CRITICAL_CLAUSES to it.
4909 (c_finish_omp_ordered): Add CLAUSES argument, set
4910 OMP_ORDERED_CLAUSES to it.
4911 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4912 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4913 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4914 constructs and new OpenMP 4.5 clauses. Clear
4915 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4916 verification code.
4917 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4918 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4919 (enum pragma_omp_clause): Add
4920 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4921 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4922
624d31fe
RS
49232015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4924
4925 * c-lex.c (interpret_float): Use real_equal instead of
4926 REAL_VALUES_EQUAL.
4927
b8fd7909
JM
49282015-10-04 Jason Merrill <jason@redhat.com>
4929
4930 Implement N4514, C++ Extensions for Transactional Memory.
4931 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4932 (c_common_attribute_table): Add transaction_safe_dynamic.
4933 transaction_safe now affects type identity.
4934 (handle_tm_attribute): Handle transaction_safe_dynamic.
4935 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4936 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4937 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4938 (D_TRANSMEM): New.
4939 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4940 * c-pretty-print.c (pp_c_attributes_display): Don't print
4941 transaction_safe in C++.
4942
12651878
MP
49432015-10-02 Marek Polacek <polacek@redhat.com>
4944
4945 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4946
3e3b8d63
MP
49472015-10-02 Marek Polacek <polacek@redhat.com>
4948
4949 PR c/64249
4950 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4951 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4952 * c.opt (Wduplicated-cond): New option.
4953
0d1a8f75
JM
49542015-10-01 Joseph Myers <joseph@codesourcery.com>
4955
4956 * c.opt (std=c11): Do not describe as experimental.
4957 (std=gnu11): Likewise.
4958 (std=iso9899:2011): Likewise.
4959
3e32ee19
NS
49602015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4961
4962 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4963 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4964
974348ee
MP
49652015-09-25 Marek Polacek <polacek@redhat.com>
4966
4967 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4968 (ubsan_instrument_shift): Likewise.
4969
15dbc1a6
MP
49702015-09-25 Marek Polacek <polacek@redhat.com>
4971
4972 PR sanitizer/64906
4973 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4974
6b95d7cc
PP
49752015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4976
4977 * c-indentation.c (should_warn_for_misleading_indentation):
4978 Compare next_stmt_vis_column with guard_line_first_nws instead
4979 of with guard_line_vis_column.
4980
c1822f9c
MLI
49812015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4982
4983 PR c/49654
4984 PR c/49655
4985 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4986 options and options not valid for the current language.
4987
d5398058
PP
49882015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4989
4990 * c-indentation.c (should_warn_for_misleading_indentation):
4991 Float out and consolidate the calls to get_visual_column that
4992 are passed guard_exploc as an argument. Compare
4993 next_stmt_vis_column with guard_line_first_nws instead of with
4994 body_line_first_nws.
4995
6b333269
NS
49962015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4997
4998 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4999 Wnamespaces): New C++ warnings.
5000
a75f1574
JM
50012015-09-22 Jason Merrill <jason@redhat.com>
5002
5003 * c-common.h (abi_compat_version_crosses): New.
5004 (warn_abi_version): Declare.
5005 * c-common.c: Define it.
5006 * c-opts.c (c_common_post_options): Handle it.
5007 flag_abi_compat_version defaults to 8.
5008
bdaaa8b7
VV
50092015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5010
5011 Complete the implementation of N4230, Nested namespace definition.
5012 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5013 __cpp_nested_namespace_definitions.
5014
eaa797e8
MLI
50152015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5016
5017 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5018
c4914de6
MLI
50192015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5020
5021 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5022 when warning.
5023 * c-pragma.h (pragma_lex): Add optional loc argument.
5024
fcb87c50
MM
50252015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5026
5027 * c-format.c (check_format_arg): Adjust to use common block size in all
5028 object pools.
5029
31bdd08a
DM
50302015-09-15 David Malcolm <dmalcolm@redhat.com>
5031
5032 * c-format.c (location_from_offset): Update for change in
5033 signature of location_get_source_line.
5034 * c-indentation.c (get_visual_column): Likewise.
5035 (line_contains_hash_if): Likewise.
5036
aa9f4b4c
MP
50372015-09-14 Marek Polacek <polacek@redhat.com>
5038
5039 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5040 setting various warnings.
5041
aa256c4a
MP
50422015-09-14 Marek Polacek <polacek@redhat.com>
5043
5044 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5045 a negative value.
5046
0f876f22
MW
50472015-09-11 Mark Wielaard <mjw@redhat.com>
5048
5049 PR c/28901
5050 * c.opt (Wunused-variable): Option from common.opt.
5051 (Wunused-const-variable): New option.
5052
273aa49e
PC
50532015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5054
5055 PR c++/53184
5056 * c.opt ([Wsubobject-linkage]): Add.
5057
1807ffc1
MS
50582015-09-03 Martin Sebor <msebor@redhat.com>
5059
5060 PR c/66516
5061 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5062 functions.
5063 * c-common.c (reject_gcc_builtin): Define.
5064
38942840
BI
50652015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5066
5067 PR middle-end/60586
5068 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5069 prototype.
5070 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5071 cilk_gimplify_call_params_in_spawned_fn.
5072 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5073 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5074 unwrapping.
5075
c316b5e4
MP
50762015-08-25 Marek Polacek <polacek@redhat.com>
5077
5078 PR middle-end/67330
5079 * c-common.c (handle_weak_attribute): Don't check whether the
5080 visibility can be changed here.
5081
584a7c46
MLI
50822015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5083
5084 * c-lex.c (c_lex_with_flags): Use explicit locations.
5085
a79683d5
TS
50862015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5087
5088 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5089 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5090
61717a45
FXC
50912015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5092
5093 PR middle-end/36757
5094 * c-common.c (check_builtin_function_arguments): Add check
5095 for BUILT_IN_SIGNBIT argument.
5096
329524f5
PC
50972015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5098
5099 PR c++/67160
5100 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5101 in c++1z mode.
5102
4ee55665
MP
51032015-08-17 Marek Polacek <polacek@redhat.com>
5104
5105 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5106 with whitespaces before qualifier names.
5107
b893e375
MP
51082015-08-12 Marek Polacek <polacek@redhat.com>
5109
5110 PR c++/55095
5111 * c-common.c (maybe_warn_shift_overflow): Properly handle
5112 left-shifting 1 into the sign bit.
5113
c2d89095
MLI
51142015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5115
5116 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5117
971e17ff
AS
51182015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5119 Braden Obrzut <admin@maniacsvault.net>
5120 Jason Merrill <jason@redhat.com>
5121
5122 Add C++ Concepts TS support.
5123 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5124 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5125 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5126 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5127 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5128 * c.opt (fconcepts): New.
5129
b3d5bc62
JJ
51302015-08-02 Martin Sebor <msebor@redhat.com>
5131
5132 * c.opt (-Wframe-address): New warning option.
5133
8ebca419
PP
51342015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5135
5136 * c-indentation.c (should_warn_for_misleading_indentation):
5137 Improve heuristics.
5138
1a1e101f
PP
51392015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5140
5141 * c-indentation.c (get_visual_column): Add parameter first_nws,
5142 use it. Update comment documenting the function.
5143 (is_first_nonwhitespace_on_line): Remove.
5144 (should_warn_for_misleading_indentation): Replace usage of
5145 of is_first_nonwhitespace_on_line with get_visual_column.
5146
992118a1
PP
51472015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5148
5149 * c-indentation.h (struct token_indent_info): Define.
5150 (get_token_indent_info): Define.
5151 (warn_for_misleading_information): Declare.
5152 * c-common.h (warn_for_misleading_information): Remove.
5153 * c-identation.c (warn_for_misleading_indentation):
5154 Change declaration to take three token_indent_infos. Adjust
5155 accordingly.
5156 * c-identation.c (should_warn_for_misleading_indentation):
5157 Likewise. Bail out early if the body is a compound statement.
5158 (guard_tinfo_to_string): Define.
5159
e8fa3817
JM
51602015-07-30 Jason Merrill <jason@redhat.com>
5161
5162 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5163 '*' for reference decay.
5164
173864e8
MP
51652015-07-30 Marek Polacek <polacek@redhat.com>
5166
5167 * c-common.c (warn_tautological_cmp): Bail for float types.
5168
f2afe6dd
MP
51692015-07-27 Marek Polacek <polacek@redhat.com>
5170
5171 PR bootstrap/67030
5172 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5173
05b28fd6
MP
51742015-07-27 Marek Polacek <polacek@redhat.com>
5175
5176 PR c++/66555
5177 PR c/54979
5178 * c-common.c (find_array_ref_with_const_idx_r): New function.
5179 (warn_tautological_cmp): New function.
5180 * c-common.h (warn_tautological_cmp): Declare.
5181 * c.opt (Wtautological-compare): New option.
5182
5a5062b8
MP
51832015-07-23 Marek Polacek <polacek@redhat.com>
5184
5185 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5186 (ubsan_instrument_shift): Likewise.
5187
dc891fe7
MP
51882015-07-23 Marek Polacek <polacek@redhat.com>
5189
5190 PR sanitizer/66908
5191 * c-ubsan.c: Include gimplify.h.
5192 (ubsan_instrument_division): Unshare OP0 and OP1.
5193 (ubsan_instrument_shift): Likewise.
5194
451b5e48
MP
51952015-07-20 Marek Polacek <polacek@redhat.com>
5196 Richard Sandiford <richard.sandiford@arm.com>
5197
5198 PR c++/55095
5199 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5200 Use EXPR_LOC_OR_LOC.
5201 (maybe_warn_shift_overflow): New function.
5202 * c-common.h (maybe_warn_shift_overflow): Declare.
5203 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5204 * c.opt (Wshift-overflow): New option.
5205
fb0b2914
ML
52062015-07-16 Martin Liska <mliska@suse.cz>
5207
5208 * c-format.c (static void check_format_info_main): Use
5209 object_allocator instead of pool_allocator.
5210 (check_format_arg): Likewise.
5211 (check_format_info_main): Likewise.
5212
903f5c23
AM
52132015-07-15 Andrew MacLeod <amacleod@redhat.com>
5214
5215 * c-opts.c: Remove multiline #include comment.
5216
026c3cfd
AH
52172015-07-12 Aldy Hernandez <aldyh@redhat.com>
5218
5219 * c-common.c: Fix double word typos.
5220
bb49ee66
EB
52212015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5222
5223 * c-ada-spec.h (cpp_operation): Revert latest change.
5224 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5225 constructors and destructors.
5226
1916bcb5
AM
52272015-07-09 Andrew MacLeod <amacleod@redhat.com>
5228
5229 * c-common.h: Adjust includes for flags.h changes.
5230 * stub-objc.c: Likewise.
026c3cfd 5231
a9dcd529
EB
52322015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5233
5234 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5235 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5236
b03b462f
JJ
52372015-07-08 Jakub Jelinek <jakub@redhat.com>
5238
5239 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5240 are to be removed, return NULL rather than original clauses list.
5241
c7131fb2
AM
52422015-07-07 Andrew MacLeod <amacleod@redhat.com>
5243
5244 * array-notation-common.c: Adjust includes.
5245 * c-ada-spec.c: Likewise.
5246 * c-cilkplus.c: Likewise.
5247 * c-common.h: Likewise.
5248 * c-cppbuiltin.c: Likewise.
5249 * c-dump.c: Likewise.
5250 * c-format.c: Likewise.
5251 * c-gimplify.c: Likewise.
5252 * c-indentation.c: Likewise.
5253 * c-lex.c: Likewise.
5254 * c-omp.c: Likewise.
5255 * c-opts.c: Likewise.
5256 * c-pch.c: Likewise.
5257 * c-ppoutput.c: Likewise.
5258 * c-pragma.c: Likewise.
5259 * c-pretty-print.c: Likewise.
5260 * c-semantics.c: Likewise.
5261 * c-ubsan.c: Likewise.
5262 * cilk.c: Likewise.
5263 * stub-objc.c: Likewise.
5264
2a7fb83f
EB
52652015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5266
5267 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5268 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5269
a03c9bf1
JM
52702015-07-01 Jason Merrill <jason@redhat.com>
5271
36a85135
JM
5272 * c-common.h (D_CXX11): Rename from D_CXX0X.
5273 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5274 * c-common.c: Adjust.
5275
e7fa68d5
JM
5276 * c-opts.c (c_common_post_options): Default to C++14.
5277
a03c9bf1
JM
5278 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5279
fe95b036
ESR
52802015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5281
5282 Implement N4197 - Adding u8 character literals
b3d5bc62 5283 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5284 CPP_CHAR.
b3d5bc62 5285 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5286 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5287 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5288 and CPP_UTF8CHAR tokens.
5289 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5290
da2e71c9
MLI
52912015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5292
5293 PR fortran/66605
5294 * c-common.c (do_warn_unused_parameter): Move here.
5295 * c-common.h (do_warn_unused_parameter): Declare.
5296
b155cfd9
MP
52972015-06-29 Marek Polacek <polacek@redhat.com>
5298
5299 PR c/66322
5300 * c-common.c (check_case_bounds): Add bool * parameter. Set
5301 OUTSIDE_RANGE_P.
5302 (c_add_case_label): Add bool * parameter. Pass it down to
5303 check_case_bounds.
5304 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5305 warning here.
5306 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5307 declarations.
5308
31521951
MP
53092015-06-27 Marek Polacek <polacek@redhat.com>
5310
5311 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5312 or VECTOR_INTEGER_TYPE_P throughout.
5313 * c-gimplify.c: Likewise.
5314
22d03525
MP
53152015-06-26 Marek Polacek <polacek@redhat.com>
5316
5317 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5318 * c-common.c (c_fully_fold_internal): Likewise.
5319 (c_alignof_expr): Likewise.
5320 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5321 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5322 * cilk.c (create_parm_list): Likewise.
22d03525 5323
af05e6e5
MP
53242015-06-26 Marek Polacek <polacek@redhat.com>
5325
5326 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5327
f0889939
AM
53282015-06-25 Andrew MacLeod <amacleod@redhat.com>
5329
5330 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5331 * c-gimplify.c: Likewise.
5332 * c-pragma.c: Likewise.
5333 * c-ubsan.c: Likewise.
5334 * cilk.c: Likewise.
5335
ca752f39
RS
53362015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5337
5338 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5339 ggc_hasher.
5340
16a16ec7
AM
53412015-06-25 Andrew MacLeod <amacleod@redhat.com>
5342
5343 * cilk.c: Move calls.h after tm.h in the include chain.
5344
0ae9bd27
MP
53452015-06-25 Marek Polacek <polacek@redhat.com>
5346
5347 * array-notation-common.c: Use VAR_P throughout.
5348 * c-ada-spec.c: Likewise.
5349 * c-common.c: Likewise.
5350 * c-format.c: Likewise.
5351 * c-gimplify.c: Likewise.
5352 * c-omp.c: Likewise.
5353 * c-pragma.c: Likewise.
5354 * c-pretty-print.c: Likewise.
5355 * cilk.c: Likewise.
5356
62f9079a
MP
53572015-06-25 Marek Polacek <polacek@redhat.com>
5358
5359 * cilk.c (extract_free_variables): Use is_global_var.
5360
0fa16060
RS
53612015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5362
5363 * c-common.c: Don't include target-def.h.
5364
a68ae2e1
MP
53652015-06-23 Marek Polacek <polacek@redhat.com>
5366
5367 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5368 when comparing INTEGER_CSTs.
5369
c6a2f2d9
PMR
53702015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5371
5372 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5373 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5374 (dump_ada_template): Skip partially specialized types.
5375
6b4db501
MM
53762015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5377
5378 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5379 swapping.
5380
abb226c9
AM
53812015-06-17 Andrew MacLeod <amacleod@redhat.com>
5382
5383 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5384 * c-ada-spec.c: Likewise.
5385 * c-cilkplus.c: Likewise.
5386 * c-common.c: Likewise.
5387 * c-common.h: Likewise.
5388 * c-cppbuiltin.c: Likewise.
5389 * c-dump.c: Likewise.
5390 * c-format.c: Likewise.
5391 * c-gimplify.c: Likewise.
5392 * c-indentation.c: Likewise.
5393 * c-lex.c: Likewise.
5394 * c-omp.c: Likewise.
5395 * c-opts.c: Likewise.
5396 * c-pch.c: Likewise.
5397 * c-ppoutput.c: Likewise.
5398 * c-pragma.c: Likewise.
5399 * c-pretty-print.c: Likewise.
5400 * c-semantics.c: Likewise.
5401 * c-ubsan.c: Likewise.
5402 * cilk.c: Likewise.
5403 * stub-objc.c: Likewise.
5404
076fecad
PP
54052015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5406
5407 PR c++/65168
5408 * c-common.c (c_common_truthvalue_conversion): Warn when
5409 converting an address of a reference to a truth value.
5410
13fdf2e2
AM
54112015-06-08 Andrew MacLeod <amacleod@redhat.com>
5412
5413 * array-notation-common.c : Adjust include files.
5414 * c-ada-spec.c : Likewise.
5415 * c-cilkplus.c : Likewise.
5416 * c-common.c : Likewise.
5417 * c-common.h : Likewise.
5418 * c-cppbuiltin.c : Likewise.
5419 * c-dump.c : Likewise.
5420 * c-format.c : Likewise.
5421 * c-gimplify.c : Likewise.
5422 * c-indentation.c : Likewise.
5423 * c-lex.c : Likewise.
5424 * c-omp.c : Likewise.
5425 * c-opts.c : Likewise.
5426 * c-pch.c : Likewise.
5427 * c-ppoutput.c : Likewise.
5428 * c-pragma.c : Likewise.
5429 * c-pretty-print.c : Likewise.
5430 * c-semantics.c : Likewise.
5431 * c-ubsan.c : Likewise.
5432 * cilk.c : Likewise.
5433 * stub-objc.c : Likewise.
5434
a1661b90
MP
54352015-06-08 Marek Polacek <polacek@redhat.com>
5436
5437 PR c/66415
5438 * c-format.c (location_from_offset): Return LOC if LINE is null.
5439
d7438551
AH
54402015-06-05 Aldy Hernandez <aldyh@redhat.com>
5441
5442 * c-common.h (c_parse_final_cleanups): New prototype.
5443 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5444
b3d5bc62
JJ
54452015-06-04 Sriraman Tallam <tmsriram@google.com>
5446
5447 * c-common.c (noplt): New attribute.
5448 (handle_noplt_attribute): New handler.
5449
ecb9f223
AM
54502015-06-04 Andrew MacLeod <amacleod@redhat.com>
5451
5452 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5453 * c-ada-spec.c: Likewise.
5454 * c-cilkplus.c: Likewise.
5455 * c-common.c: Likewise.
5456 * c-common.h: Likewise.
5457 * c-cppbuiltin.c: Likewise.
5458 * c-dump.c: Likewise.
5459 * c-format.c: Likewise.
5460 * c-gimplify.c: Likewise.
5461 * c-indentation.c: Likewise.
5462 * c-lex.c: Likewise.
5463 * c-omp.c: Likewise.
5464 * c-opts.c: Likewise.
5465 * c-pch.c: Likewise.
5466 * c-ppoutput.c: Likewise.
5467 * c-pragma.c: Likewise.
5468 * c-pretty-print.c: Likewise.
5469 * c-semantics.c: Likewise.
5470 * c-ubsan.c: Likewise.
5471 * cilk.c: Likewise.
5472 * stub-objc.c: Likewise.
5473
6ac48155
DM
54742015-06-02 David Malcolm <dmalcolm@redhat.com>
5475
5476 PR c/66220:
5477 * c-indentation.c (should_warn_for_misleading_indentation): Use
5478 expand_location rather than expand_location_to_spelling_point.
5479 Don't warn if the guarding statement is more indented than the
5480 next/body stmts.
5481
773ce42e
DM
54822015-06-02 David Malcolm <dmalcolm@redhat.com>
5483
5484 * c-indentation.c (warn_for_misleading_indentation): Bail out
5485 immediately if -Wmisleading-indentation isn't enabled.
5486
4fef8379
ML
54872015-06-01 Martin Liska <mliska@suse.cz>
5488
5489 * c-format.c (check_format_arg):Use new type-based pool allocator.
5490 (check_format_info_main) Likewise.
5491
1edfb384
EB
54922015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5493
5494 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5495 (has_nontrivial_methods): Likewise.
5496
9677ef52
MP
54972015-05-25 Marek Polacek <polacek@redhat.com>
5498
5499 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5500
fd5c817a
MP
55012015-05-22 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/47043
5504 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5505
a2f45fe6 55062015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5507
5508 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5509 STACK_GROWS_DOWNWARD.
5510
a2f45fe6 55112015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5512
5513 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5514 STACK_GROWS_DOWNWARD rather than if it is defined.
5515
0fee2ac2 55162015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5517
0fee2ac2
MLI
5518 PR c/52952
5519 * c-format.c (location_column_from_byte_offset): New.
5520 (location_from_offset): New.
5521 (struct format_wanted_type): Add offset_loc field.
5522 (check_format_info): Move handling of location for extra arguments
5523 closer to the point of warning.
5524 (check_format_info_main): Pass the result of location_from_offset
5525 to warning_at.
5526 (format_type_warning): Pass the result of location_from_offset
5527 to warning_at.
5528
cf4ef6f7
MP
55292015-05-20 Marek Polacek <polacek@redhat.com>
5530
5531 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5532
3a65ee74
MP
55332015-05-20 Marek Polacek <polacek@redhat.com>
5534
5535 * c-ada-spec.c (dump_sloc): Use DECL_P.
5536
21b634ae
MP
55372015-05-20 Marek Polacek <polacek@redhat.com>
5538
5539 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5540 * c-common.c: Likewise.
5541
0e50b624
DM
55422015-05-19 David Malcolm <dmalcolm@redhat.com>
5543
5544 * c-common.h (fe_file_change): Strengthen param from
5545 const line_map * to const line_map_ordinary *.
5546 (pp_file_change): Likewise.
5547 * c-lex.c (fe_file_change): Likewise.
5548 (cb_define): Use linemap_check_ordinary when invoking
5549 SOURCE_LINE.
5550 (cb_undef): Likewise.
5551 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5552 invoking cb_file_change.
5553 (c_finish_options): Likewise.
5554 (push_command_line_include): Likewise.
5555 (cb_file_change): Strengthen param "new_map" from
5556 const line_map * to const line_map_ordinary *.
5557 * c-ppoutput.c (cb_define): Likewise for local "map".
5558 (pp_file_change): Likewise for param "map" and local "from".
5559
fab27f52
MM
55602015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5561
5562 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5563
2fe1d762
TV
55642015-05-18 Tom de Vries <tom@codesourcery.com>
5565
5566 * c-common.c (build_va_arg_1): New function.
5567 (build_va_arg): Add address operator to va_list operand if necessary.
5568
7a37fa90
MM
55692015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5570
5571 PR c/48956
5572 * c-common.c (int_safely_convertible_to_real_p): Define.
5573 (unsafe_conversion_p): Check conversions involving complex types.
5574 (conversion_warning): Add new warning message for conversions which
5575 discard imaginary component.
5576 * c-common.h: (enum conversion_safety): Add new enumerator for such
5577 conversions.
5578
3aa3c9fc
MP
55792015-05-14 Marek Polacek <polacek@redhat.com>
5580
5581 PR c/66066
5582 PR c/66127
5583 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5584 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5585 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5586 use it. If FOR_INT_CONST, require that all evaluated operands be
5587 INTEGER_CSTs.
5588
c3388e62
DM
55892015-05-12 David Malcolm <dmalcolm@redhat.com>
5590
5591 * c-common.h (warn_for_misleading_indentation): New prototype.
5592 * c-indentation.c: New file.
5593 * c.opt (Wmisleading-indentation): New option.
5594
c7b38fd5
TV
55952015-05-12 Tom de Vries <tom@codesourcery.com>
5596
5597 PR tree-optimization/66010
5598 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5599
381bf11e
JM
56002015-05-09 Jason Merrill <jason@redhat.com>
5601
edff0c06
JM
5602 * c-opts.c (c_common_post_options): Also clear
5603 cpp_opts->cpp_warn_cxx11_compat.
5604
129211bc
JM
5605 * c-common.h (enum cxx_dialect): Add cxx_unset.
5606 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5607 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5608
381bf11e
JM
5609 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5610 (std=gnu++0x): Mark as Undocumented.
5611 (std=gnu++1y): Add deprecated message.
5612
fe191308
JM
56132015-05-08 Jason Merrill <jason@redhat.com>
5614
765189ff
JM
5615 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5616 * c-opts.c: Adjust.
5617
fe191308
JM
5618 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5619
755e528f
MP
56202015-05-08 Marek Polacek <polacek@redhat.com>
5621
5622 PR c/64918
5623 * c.opt (Woverride-init-side-effects): New option.
5624
0173bd2a
MP
56252015-05-07 Marek Polacek <polacek@redhat.com>
5626
5627 PR c/65179
5628 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5629 negative value.
5630 * c.opt (Wshift-negative-value): New option.
5631 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5632 when -Wextra and C99/C++11 mode.
5633
e0f0d3b9
MP
56342015-05-07 Marek Polacek <polacek@redhat.com>
5635 Martin Uecker <uecker@eecs.berkeley.edu>
5636
5637 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5638 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5639
8243e2a9
JM
56402015-05-05 Jason Merrill <jason@redhat.com>
5641
5642 * c.opt (Wterminate): New.
5643
577cd070
MP
56442015-04-30 Marek Polacek <polacek@redhat.com>
5645
5646 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5647 require that the non-constant be of a boolean type.
5648
0373796b
JT
56492015-04-29 Josh Triplett <josh@joshtriplett.org>
5650
e0f0d3b9
MP
5651 * c-common.c (handle_section_attribute): Refactor to reduce
5652 nesting and distinguish between error cases.
0373796b 5653
716c0ba6
MP
56542015-04-29 Marek Polacek <polacek@redhat.com>
5655
5656 PR c/64610
5657 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5658 with 0/1.
5659
8848828b
JJ
56602015-04-29 Jakub Jelinek <jakub@redhat.com>
5661
5662 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5663 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5664 HOST_BITS_PER_WIDE_INT.
5665
ecd0e562
TV
56662015-04-28 Tom de Vries <tom@codesourcery.com>
5667
5668 PR tree-optimization/65887
5669 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5670
2a877204 56712015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5672 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5673
5674 * c-ada-spec.c (in_function): Delete.
5675 (dump_generic_ada_node): Do not change in_function and remove the
5676 redundant code dealing with it.
5677 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5678 (print_ada_methods): Output the static member functions in a nested
5679 package after the regular methods as well as associated renamings.
5680
4853031e
MP
56812015-04-24 Marek Polacek <polacek@redhat.com>
5682
5683 PR c/65830
5684 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5685 and OPT_Wshift_count_overflow.
5686
8c2b7f79
MP
5687 PR c/63357
5688 * c-common.c (warn_logical_operator): Warn if the operands have the
5689 same expressions.
5690
b8787813
MP
56912015-04-24 Marek Polacek <polacek@redhat.com>
5692
5693 PR c/61534
5694 * c-common.c (warn_logical_operator): Bail if either operand comes
5695 from a macro expansion.
5696
8fba1830
BRF
56972015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5698
5699 PR target/55143
5700 * c-common.c (c_default_pointer_mode): Add definition.
5701 * c-common.h (c_default_pointer_mode): Add declaration.
5702
17958621
JJ
57032015-03-11 Jakub Jelinek <jakub@redhat.com>
5704
5705 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5706 on record_builtin_type argument.
5707
7ccb1a11
JJ
57082015-03-10 Jakub Jelinek <jakub@redhat.com>
5709
5710 PR c/65120
5711 * c-common.c (warn_logical_not_parentheses): Don't warn for
5712 !x == 0 or !x != 0.
5713
04fd785e
MP
57142015-03-07 Marek Polacek <polacek@redhat.com>
5715
5716 PR sanitizer/65280
5717 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5718 before trying to figure out whether we have a flexible array member.
5719
a4e26206 57202015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5721 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5722
5723 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5724
0d2489f4
EB
57252015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5726
5727 PR ada/65319
5728 * c-ada-spec.c (print_destructor): Remove obsolete code.
5729
83ed54d7
EB
57302015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5731
5732 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5733 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5734 DECL_TEMPLATE_RESULT emulations.
5735 (dump_ada_template)): Add guard for TYPE_METHODS.
5736
7631f0e2
MP
57372015-02-27 Marek Polacek <polacek@redhat.com>
5738
5739 PR c/65040
5740 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5741
d1783ae5
KT
57422015-02-27 Kai Tietz <ktietz@redhat.com>
5743
5744 PR c/35330
5745 * c-pragma.c (handle_pragma_weak): Do not try to create
5746 weak/alias of declarations not being function, or variable
5747 declarations.
5748
56a9f6bc
TS
57492015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5750
5751 PR libgomp/64625
5752 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5753 Remove macros.
5754 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5755
3d5cb23d
MP
57562015-02-16 Marek Polacek <polacek@redhat.com>
5757
5758 PR c/65066
5759 * c-format.c (check_format_types): Handle null param.
5760
fa008882
MP
57612015-02-13 Marek Polacek <polacek@redhat.com>
5762
5763 PR c/65040
5764 * c-format.c (check_format_types): Don't warn about different
5765 signedness if the original value is in the range of WANTED_TYPE.
5766
785f21af
JM
57672015-02-12 Jason Merrill <jason@redhat.com>
5768
5769 PR c++/64956
5770 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5771 to the current highest version.
5772 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5773
4886ec8e
JJ
57742015-02-04 Jakub Jelinek <jakub@redhat.com>
5775
5776 PR c/64824
5777 PR c/64868
5778 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5779 instead of RDIV_EXPR. Use build_binary_op instead of
5780 build2_loc.
5781
40fecdd6
JM
57822015-01-30 Joseph Myers <joseph@codesourcery.com>
5783
5784 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5785 to pass input_location as first argument.
5786
a0c88d06
TV
57872015-01-23 Tom de Vries <tom@codesourcery.com>
5788
5789 PR libgomp/64672
5790 * c.opt (fopenacc): Mark as LTO option.
5791
1506ae0e
TV
57922015-01-23 Tom de Vries <tom@codesourcery.com>
5793
5794 PR libgomp/64707
5795 * c.opt (fopenmp): Mark as LTO option.
5796
31be63ab
JJ
57972015-01-21 Jakub Jelinek <jakub@redhat.com>
5798
5799 PR c/63307
b1726d6c 5800 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5801 (compare_decls): Fix up formatting.
5802
58032015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5804
5805 PR c/63307
5806 * cilk.c: Include vec.h.
5807 (struct cilk_decls): New structure.
5808 (wrapper_parm_cb): Split this function to...
5809 (fill_decls_vec): ...this...
5810 (create_parm_list): ...and this.
5811 (compare_decls): New function.
5812 (for_local_cb): Remove.
5813 (wrapper_local_cb): Ditto.
5814 (build_wrapper_type): For now first traverse and fill vector of
5815 declarations then sort it and then deal with sorted vector.
5816 (cilk_outline): Ditto.
5817 (declare_one_free_variable): Ditto.
5818
6875457f
JM
58192015-01-21 Jason Merrill <jason@redhat.com>
5820
5821 PR c++/64629
5822 * c-format.c (check_format_arg): Call decl_constant_value.
5823
185c9e56
ML
58242015-01-19 Martin Liska <mliska@suse.cz>
5825
5826 * c-common.c (handle_noicf_attribute): New function.
5827
41dbbb37
TS
58282015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5829 Bernd Schmidt <bernds@codesourcery.com>
5830 James Norris <jnorris@codesourcery.com>
5831 Cesar Philippidis <cesar@codesourcery.com>
5832 Ilmir Usmanov <i.usmanov@samsung.com>
5833 Jakub Jelinek <jakub@redhat.com>
5834
5835 * c.opt (fopenacc): New option.
5836 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5837 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5838 New macros.
5839 * c-common.h (c_finish_oacc_wait): New prototype.
5840 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5841 (c_finish_oacc_wait): New function.
5842 * c-pragma.c (oacc_pragmas): New variable.
5843 (c_pp_lookup_pragma, init_pragma): Handle it.
5844 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5845 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5846 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5847 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5848 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5849 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5850 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5851 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5852 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5853 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5854 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5855 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5856 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5857 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5858 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5859 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5860 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5861 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5862 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5863 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5864 PRAGMA_OACC_CLAUSE_WORKER.
5865
3f8257db 58662015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5867
5868 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5869 for the new option fstack-protector_explicit.
5870 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5871 (handle_stack_protect_attribute): New function.
5872
3f8257db 58732015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5874
5875 * c.opt: New option -Warray-bounds=.
5876
adfac8df
JJ
58772015-01-09 Michael Collison <michael.collison@linaro.org>
5878
5879 * array-notation-common.c: Include hash-set.h, machmode.h,
5880 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5881 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5882 * c-ada-spec.c: Ditto.
5883 * c-cilkplus.c: Ditto.
5884 * c-common.c: Include input.h due to flattening of tree.h.
5885 Define macro GCC_C_COMMON_C.
5886 * c-common.h: Flatten tree.h header files into c-common.h.
5887 Remove include of tree-core.h.
5888 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5889 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5890 fold-const.h, wide-int.h, and inchash.h due to
5891 flattening of tree.h.
5892 * c-dump.c: Ditto.
5893 * c-format.c: Flatten tree.h header files into c-common.h.
5894 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5895 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5896 fold-const.h, wide-int.h, and inchash.h due to
5897 flattening of tree.h.
5898 * c-dump.c: Include hash-set.h, machmode.h,
5899 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5900 fold-const.h, wide-int.h, and inchash.h due to
5901 flattening of tree.h.
5902 * c-format.c: Include hash-set.h, machmode.h,
5903 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5904 fold-const.h, wide-int.h, inchash.h and real.h due to
5905 flattening of tree.h.
5906 * c-gimplify.c: Include hash-set.h, machmode.h,
5907 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5908 fold-const.h, wide-int.h, and inchash.h due to
5909 flattening of tree.h.
5910 * cilk.c: Ditto.
5911 * c-lex.c: Ditto.
5912 * c-omp.c: Ditto.
5913 * c-opts.c: Ditto.
5914 * c-pch.c: Ditto.
5915 * c-ppoutput.c: Ditto.
5916 * c-pragma.c: Ditto.
5917 * c-pretty-print.c: Ditto.
5918 * c-semantics.c: Ditto.
5919 * c-ubsan.c: Ditto.
5920 * stub-objc.c: Ditto.
5921
f5481fc4
JM
59222015-01-08 Jason Merrill <jason@redhat.com>
5923
5924 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5925 do_ubsan_in_current_function.
5926 (ubsan_maybe_instrument_reference_or_call): Likewise.
5927 * c-ubsan.h: Declare it.
5928
de35aa66
MS
59292015-01-08 Mike Stump <mikestump@comcast.net>
5930
5931 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5932
4a9a42ab
MP
59332015-01-07 Marek Polacek <polacek@redhat.com>
5934
5935 PR c/64440
5936 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5937 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5938
2f42e5de
TS
59392015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5940
5941 PR c++/31397
5942 * c.opt (Wsuggest-override): New option.
5943
5624e564
JJ
59442015-01-05 Jakub Jelinek <jakub@redhat.com>
5945
5946 Update copyright years.
5947
5bd012f8
MP
59482015-01-05 Marek Polacek <polacek@redhat.com>
5949
5950 PR c/64423
5951 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5952 parameter. Use it.
5953 * c-common.h (warn_array_subscript_with_type_char): Update
5954 declaration.
5955
a7fa8d18
ESR
59562014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5957
5958 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5959 Control macro with flag_sized_deallocation.
5960
3f8257db 59612014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5962
5963 * c.opt (Wdiscarded-array-qualifiers): New option.
5964
1f8d3e84
JJ
59652014-12-19 Jakub Jelinek <jakub@redhat.com>
5966
5967 PR preprocessor/63831
5968 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5969 and __has_cpp_attribute here.
5970 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5971 c_common_has_attribute.
5972 * c-common.h (c_common_has_attribute): New prototype.
5973 * c-lex.c (init_c_lex): Set cb->has_attribute to
5974 c_common_has_attribute instead of cb_has_attribute.
5975 (get_token_no_padding): New function.
5976 (cb_has_attribute): Renamed to ...
5977 (c_common_has_attribute): ... this. No longer static. Use
5978 get_token_no_padding, require ()s, don't build TREE_LIST
5979 unnecessarily, fix up formatting, adjust diagnostics, call
5980 init_attributes.
5981
20b06add
JM
59822014-12-15 Jason Merrill <jason@redhat.com>
5983
5984 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5985 (-Wsized-deallocation): New.
5986 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5987 to on in C++14 and up.
5988
94a073b2
JM
59892014-12-11 Jason Merrill <jason@redhat.com>
5990
acaa5911
JM
5991 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5992
94a073b2
JM
5993 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5994 we aren't complaining about VLAs.
5995
7fb66c15
MP
59962014-12-06 Marek Polacek <polacek@redhat.com>
5997
5998 PR tree-optimization/64183
5999 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6000 shift-expression if it is integer_type_node. Use types_compatible_p.
6001
b731b390
JJ
60022014-11-29 Jakub Jelinek <jakub@redhat.com>
6003
6004 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6005 last argument from create_tmp_var_raw and create_tmp_var calls.
6006 * cilk.c (gimplify_cilk_spawn): Likewise.
6007 * c-omp.c (c_finish_omp_atomic): Likewise.
6008
6a4da643
MP
60092014-11-28 Marek Polacek <polacek@redhat.com>
6010
6011 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6012 instead of unsigned_type_node.
6013
541e35a6
MP
60142014-11-28 Marek Polacek <polacek@redhat.com>
6015
6016 PR c/63862
6017 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6018 to op1_utype.
6019 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6020 expression to unsigned_type_node.
6021
dcc97066
MW
60222014-11-20 Mark Wielaard <mjw@redhat.com>
6023
6024 PR debug/38757
6025 * c-opts.c (set_std_c89): Set lang_hooks.name.
6026 (set_std_c99): Likewise.
6027 (set_std_c11): Likewise.
6028 (set_std_cxx98): Likewise.
6029 (set_std_cxx11): Likewise.
6030 (set_std_cxx14): Likewise.
6031 (set_std_cxx1z): Likewise.
6032
aa7da51a
JJ
60332014-11-21 Jakub Jelinek <jakub@redhat.com>
6034
6035 PR target/63764
6036 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6037 return type to bool.
009a3480 6038 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6039 (convert_vector_to_pointer_for_subscript): Change return type to
6040 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6041 and copy it into a TARGET_EXPR and use that instead of *vecp
6042 directly.
6043
538dd0b7
DM
60442014-11-19 David Malcolm <dmalcolm@redhat.com>
6045
6046 Merger of git branch "gimple-classes-v2-option-3".
6047 * ChangeLog.gimple-classes: New.
6048 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6049 from being just a vec<gimple> to a vec<gbind *>.
6050
c39a5e99
JJ
60512014-11-18 Jakub Jelinek <jakub@redhat.com>
6052
6053 PR sanitizer/63813
6054 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6055 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6056 get_pointer_alignment for non-pointers. Use ptype, or if it is
6057 reference type, corresponding pointer type, as type of kind
6058 argument.
6059 (ubsan_maybe_instrument_reference,
6060 ubsan_maybe_instrument_member_call): Adjust callers.
6061
8537a4a9
MP
60622014-11-15 Marek Polacek <polacek@redhat.com>
6063
6064 PR middle-end/63884
6065 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6066 for NULL fndecl.
6067 (extract_array_notation_exprs): Return for NULL node.
6068
2079956a
JM
60692014-11-12 Joseph Myers <joseph@codesourcery.com>
6070
6071 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6072 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6073
1304953e
JJ
60742014-11-12 Jakub Jelinek <jakub@redhat.com>
6075
6076 PR c/59708
6077 * c-common.c (check_builtin_function_arguments): Handle
6078 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6079
e5e44252
AK
60802014-11-10 Andi Kleen <ak@linux.intel.com>
6081
6082 PR c/60804
6083 * c-common.h (check_no_cilk): Declare.
6084 * cilk.c (get_error_location): New function.
6085 (check_no_cilk): Dito.
6086
e64b984d
AK
60872014-11-10 Andi Kleen <ak@linux.intel.com>
6088
6089 * cilk.c (recognize_spawn): Use expression location
6090 for error message.
6091
13c21655
PC
60922014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6093
6094 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6095
42fd12b1
ESR
60962014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6097
6098 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6099 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6100 (__cpp_range_based_for, __cpp_initializer_lists,
6101 __cpp_delegating_constructors, __cpp_nsdmi,
6102 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6103 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6104 __has_cpp_attribute.
6105 * c-lex.c (cb_has_attribute): New callback CPP function;
6106 (init_c_lex): Set has_attribute callback.
6107
6f450181
RB
61082014-11-04 Richard Biener <rguenther@suse.de>
6109
6110 * c-common.c (shorten_compare): Do not shorten mixed
6111 DFP and non-DFP compares.
6112
26f0e1d6
ESR
61132014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6114
6115 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6116 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6117 Commentary and rearrangement of tests.
6118 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6119 Commentary and rearrangement of tests.
ab20d992 6120 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6121 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6122
ef4bddc2
RS
61232014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6124
6125 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6126 enum from machine_mode.
6127
c582198b
AM
61282014-10-28 Andrew MacLeod <amacleod@redhat.com>
6129
adfac8df
JJ
6130 * c-common.c: Adjust include files.
6131 * c-gimplify.c: Ditto.
6132 * cilk.c: Ditto.
6133 * c-pragma.c: Ditto.
6134 * c-ubsan.c: Ditto.
c582198b 6135
60393bbc
AM
61362014-10-27 Andrew MacLeod <amacleod@redhat.com>
6137
6138 * c-gimplify.c: Adjust include files.
6139
d723bb7c
MLI
61402014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6141
6142 PR c++/53061
6143 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6144 c_common_initialize_diagnostics.
6145 * c-common.h: Likewise.
6146
90f3520e
MP
61472014-10-24 Marek Polacek <polacek@redhat.com>
6148
6149 PR c/56980
6150 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6151 print "struct"/"union"/"enum" for typedefed names.
6152
59d7607a
MP
61532014-10-23 Marek Polacek <polacek@redhat.com>
6154
6155 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6156 in unsigned type.
6157
d95a2703
JJ
61582014-10-22 Jakub Jelinek <jakub@redhat.com>
6159 Yury Gribov <y.gribov@samsung.com>
6160
6161 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6162 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6163 instead of flag_sanitize_recover as bool flag.
6164
8e6ef852
KY
61652014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6166
6167 * cilk.c: Revert previous change.
6168
948cf550
IZ
61692014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6170
6171 PR c/63307
6172 * cilk.c: Include vec.h.
6173 (struct cilk_decls): New structure.
6174 (wrapper_parm_cb): Split this function to...
6175 (fill_decls_vec): ...this...
6176 (create_parm_list): ...and this.
6177 (compare_decls): New function.
6178 (for_local_cb): Remove.
6179 (wrapper_local_cb): Ditto.
6180 (build_wrapper_type): For now first traverse and fill vector of
6181 declarations then sort it and then deal with sorted vector.
6182 (cilk_outline): Ditto.
6183 (declare_one_free_variable): Ditto.
6184
92574c7c
MP
61852014-10-17 Marek Polacek <polacek@redhat.com>
6186
6187 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6188 * c.opt (Wimplicit-int): Initialize to -1.
6189
83685514
AM
61902014-10-16 Andrew MacLeod <amacleod@redhat.com>
6191
6192 * c-pragma.c: Adjust include files.
6193 * c-semantics.c: Likewise.
6194
5b8300ea
DD
61952014-10-16 DJ Delorie <dj@redhat.com>
6196
6197 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6198 multiples of bytes.
6199
5f83e90b
JM
62002014-10-14 Jason Merrill <jason@redhat.com>
6201
6202 PR c++/63455
6203 * c-common.h (CPP_PREPARSED_EXPR): New.
6204 (N_CP_TTYPES): Adjust.
6205
d73326ca
MP
62062014-10-15 Marek Polacek <polacek@redhat.com>
6207
6208 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6209
78a7c317
DD
62102014-10-14 DJ Delorie <dj@redhat.com>
6211
6212 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6213 types, not just __int128.
6214 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6215 types, not just __int128.
6216 (cpp_atomic_builtins): Round pointer sizes up.
6217 (type_suffix): Use type precision, not specific types.
6218 * c-common.c (c_common_reswords): Remove __int128 special case.
6219 (c_common_type_for_size): Check for all __intN types, not just
6220 __int128.
6221 (c_common_type_for_mode): Likewise.
6222 (c_common_signed_or_unsigned_type): Likewise.
6223 (c_build_bitfield_integer_type): Likewise.
6224 (c_common_nodes_and_builtins): Likewise.
6225 (keyword_begins_type_specifier): Likewise.
6226 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6227 __intN variants.
6228
2a22f99c
TS
62292014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6230
6231 * c-common.c: Use hash_table instead of hashtab.
6232
2a8ef767
ESR
62332014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6234
adfac8df 6235 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6236 C++11 section.
6237
3c9aabbd
MG
62382014-10-03 Marc Glisse <marc.glisse@inria.fr>
6239
6240 PR c++/54427
6241 PR c++/57198
6242 PR c++/58845
6243 * c-common.c (warn_logical_operator): Punt for vectors.
6244
a15f7cb8
ESR
62452014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6246
6247 Implement SD-6: SG10 Feature Test Recommendations
6248 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6249 macros and the __has_header macro.
6250
8d0cf15e
JM
62512014-09-30 Jason Merrill <jason@redhat.com>
6252
dd5d5481
JM
6253 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6254 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6255 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6256
b752325e
JM
6257 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6258 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6259
8d0cf15e
JM
6260 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6261 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6262
083e891e
MP
62632014-09-24 Marek Polacek <polacek@redhat.com>
6264
6265 PR c/61405
6266 PR c/53874
6267 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6268
7861b648
AK
62692014-09-23 Andi Kleen <ak@linux.intel.com>
6270
6271 * c-common.c (handle_no_reorder_attribute): New function.
6272 (c_common_attribute_table): Add no_reorder attribute.
6273
9a79452d
JM
62742014-09-22 Joseph Myers <joseph@codesourcery.com>
6275
6276 * c-cppbuiltin.c (c_cpp_builtins): Define
6277 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6278 modes.
6279
dd69f047
JM
62802014-09-18 Joseph Myers <joseph@codesourcery.com>
6281
6282 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6283 for supported floating-point modes.
6284
737a4826
MLI
62852014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6286
6287 * c.opt (Wpsabi): Use LangEnabledBy.
6288 * c-opts.c (c_common_handle_option): Do not handle here.
6289
8cc4b7a2
JM
62902014-09-12 Joseph Myers <joseph@codesourcery.com>
6291
6292 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6293 macros for floating-point modes.
6294
179b5a55
MG
62952014-09-11 Marc Glisse <marc.glisse@inria.fr>
6296
6297 PR target/58757
6298 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6299 __*_DENORM_MIN__ without denormals.
6300
570a11fe
JJ
63012014-09-10 Jakub Jelinek <jakub@redhat.com>
6302
6303 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6304 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6305 ubsan_create_data callers.
6306 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6307 index is constant or BIT_AND_EXPR with constant mask and is
6308 small enough for the bound.
6309 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6310 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6311
b559c810
MLI
63122014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6313
6314 * c.opt: Add CppReason to various flags.
6315 (Wdate-time): Re-sort.
6316 * c-common.c: Include c-common.h earlier.
6317 (struct reason_option_codes_t): Delete.
6318 (c_option_controlling_cpp_error): Prefix global type and struct
6319 with cpp_.
6320
1ef33fd4
MLI
63212014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6322
6323 * c.opt (Wnormalized): New.
6324 (Wnormalized=): Use Enum and Reject Negative.
6325 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6326
66bb34c0
JM
63272014-09-08 Joseph Myers <joseph@codesourcery.com>
6328
6329 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6330 digits of floating-point modes if -fbuilding-libgcc.
6331
53d68b9f
JM
63322014-09-05 Joseph Myers <joseph@codesourcery.com>
6333
6334 * c-cppbuiltin.c (c_cpp_builtins): Also define
6335 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6336 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6337 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6338 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6339 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6340 __LIBGCC_STACK_GROWS_DOWNWARD__,
6341 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6342 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6343 __LIBGCC_DWARF_FRAME_REGISTERS__,
6344 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6345 __LIBGCC_STACK_POINTER_REGNUM__ and
6346 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6347 (builtin_define_with_value): Handle backslash-escaping in string
6348 macro values.
6349
f65586dc
RB
63502014-09-05 Richard Biener <rguenther@suse.de>
6351
6352 PR middle-end/63148
6353 * c-format.c (check_format_arg): Properly handle
6354 effectively signed POINTER_PLUS_EXPR offset.
6355
2b71f4a4
MLI
63562014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6357
6358 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6359 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6360 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6361 and Init.
6362 * c-opts.c (c_common_handle_option): Do not handle here.
6363 (sanitize_cpp_opts): Likewise.
6364 * c-common.c (struct reason_option_codes_t): Handle
6365 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6366
d2e4feca
MP
63672014-09-03 Marek Polacek <polacek@redhat.com>
6368
6369 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6370
9a771876
JJ
63712014-09-02 Jakub Jelinek <jakub@redhat.com>
6372 Balaji V. Iyer <balaji.v.iyer@intel.com>
6373 Igor Zamyatin <igor.zamyatin@intel.com>
6374
6375 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6376 * c-common.c (c_common_reswords): Added _Cilk_for.
6377 * c-common.h (enum rid): Added RID_CILK_FOR.
6378 (cilk_for_number_of_iterations): Add declaration.
6379 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6380 CILK_FOR.
6381 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6382 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6383
81b5d104
MLI
63842014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6385
6386 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6387 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6388 Wundef): Use CPP, Var and Init.
6389 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6390
b753b37b
MLI
63912014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6392
6393 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6394 * c-opts.c (c_common_handle_option): Do not handle here.
6395
028aee17
JM
63962014-08-25 Jason Merrill <jason@redhat.com>
6397
6398 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6399 -std=c++14 and -std=gnu++14, rather than the reverse.
6400 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6401 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6402 * c-common.h (cxx_dialect): Remove cxx1y.
6403
e4276ba5
ESR
64042014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6405
6406 * c-common.h (enum cxx_dialect): Add cxx14.
6407 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6408 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6409 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6410
a545cacd
JM
64112014-08-22 Jason Merrill <jason@redhat.com>
6412
6413 * c.opt (std=gnu++17): Fix alias.
6414
59ea0364
MP
64152014-08-22 Marek Polacek <polacek@redhat.com>
6416
6417 PR c++/62199
6418 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6419 check for vector types. Drop LHS argument.
6420 * c-common.h (warn_logical_not_parentheses): Adjust.
6421
596e808c
MLI
64222014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6423
6424 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6425 (Wmultichar): Likewise.
6426 (Wdate-time): Use C-family languages instead of Common. Use CPP
6427 and Var.
6428 * c-opts.c (c_common_handle_option): Do not handle the above
6429 options here.
6430 (sanitize_cpp_opts): Likewise.
6431
18767f65
MLI
64322014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6433
6434 PR fortran/44054
6435 * c-opts.c: Include tree-diagnostics.h.
6436 (c_diagnostic_finalizer): New.
6437 (c_common_initialize_diagnostics): Use it.
6438
b4413594
MLI
64392014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6440
6441 PR preprocessor/51303
6442 * c-common.c (struct reason_option_codes_t option_codes):
6443 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6444
43f9a13c
MLI
64452014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6446
6447 PR c/60975
6448 PR c/53063
6449 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6450 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6451 (c_common_post_options): Call init_global_opts_from_cpp.
6452 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6453
04159acf
MP
64542014-08-19 Marek Polacek <polacek@redhat.com>
6455
6456 PR c++/62153
6457 * c-common.c (maybe_warn_bool_compare): New function.
6458 * c-common.h (maybe_warn_bool_compare): Declare.
6459 * c.opt (Wbool-compare): New option.
6460
35aff4fb
MP
64612014-08-19 Marek Polacek <polacek@redhat.com>
6462
6463 * c.opt (Wc99-c11-compat): New option.
6464
177cce46
MP
64652014-08-19 Marek Polacek <polacek@redhat.com>
6466
6467 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6468 to warn_c90_c99_compat.
6469 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6470 to -1.
6471
6ae9194f
MLI
64722014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6473 Steven Bosscher <steven@gcc.gnu.org>
6474
6475 PR c/52952
6476 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6477 format_check_results.
6478 (check_function_format): Use true and add comment for boolean
6479 argument.
6480 (finish_dollar_format_checking): Use explicit location when warning.
6481 (check_format_info): Likewise.
6482 (check_format_arg): Set extra_arg_loc and format_string_loc.
6483 (check_format_info_main): Use explicit location when warning.
6484 (check_format_types): Pass explicit location.
6485 (format_type_warning): Likewise.
6486
8e54f6d3
MLI
64872014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6488
6489 PR fortran/44054
6490 * c-format.c: Handle Fortran flags.
6491
cd4e76fc
IZ
64922014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6493
6494 PR other/61962
6495 * array-notation-common.c (find_rank): Added handling for other
6496 types of references.
6497
f3bede71
MP
64982014-08-10 Marek Polacek <polacek@redhat.com>
6499
6500 PR c/51849
6501 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6502 * c.opt (Wc90-c99-compat): Add option.
6503
9f25a338
TS
65042014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6505
6506 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6507
62e4eb35
MP
65082014-08-03 Marek Polacek <polacek@redhat.com>
6509
ab20d992 6510 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6511 (c_add_case_label): Pass loc to check_case_value.
6512
b787e7a2
TS
65132014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6514
6515 * cilk.c: Use hash_map instead of pointer_map.
6516
6e2830c3
TS
65172014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6518
6519 * c-gimplify.c: Use hash_set instead of pointer_set.
6520
a7ee52fb
IZ
65212014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6522
6523 PR middle-end/61455
6524 * array-notation-common.c (extract_array_notation_exprs): Handling
6525 of DECL_EXPR added.
6526
944fa280
JJ
65272014-08-01 Jakub Jelinek <jakub@redhat.com>
6528
6529 * c-common.h (min_align_of_type): Removed prototype.
6530 * c-common.c (min_align_of_type): Removed.
6531 * c-ubsan.h (ubsan_maybe_instrument_reference,
6532 ubsan_maybe_instrument_member_call): New prototypes.
6533 * c-ubsan.c: Include stor-layout.h and builtins.h.
6534 (ubsan_maybe_instrument_reference_or_call,
6535 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6536 functions.
6537
b4dfdc11
MG
65382014-07-31 Marc Glisse <marc.glisse@inria.fr>
6539
6540 PR c++/60517
6541 * c.opt (-Wreturn-local-addr): Move to common.opt.
6542
a41844e5
JM
65432014-07-30 Jason Merrill <jason@redhat.com>
6544
6545 PR c++/61659
6546 PR c++/61687
6547 Revert:
6548 * c.opt (-fuse-all-virtuals): New.
6549
976d5a22
TT
65502014-07-30 Tom Tromey <tromey@redhat.com>
6551
6552 PR c/59855
6553 * c.opt (Wdesignated-init): New option.
6554 * c-common.c (c_common_attribute_table): Add "designated_init".
6555 (handle_designated_init): New function.
6556
cdc94aca
MP
65572014-07-24 Marek Polacek <polacek@redhat.com>
6558
6559 PR c/57653
6560 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6561
f41373b6
DS
65622014-07-16 Dodji Seketeli <dodji@redhat.com>
6563
6564 PR preprocessor/60723 - missing system-ness marks for macro tokens
6565 * c-ppoutput.c (struct print::prev_was_system_token): New data
6566 member.
6567 (init_pp_output): Initialize it.
6568 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6569 (do_line_change): Return a flag saying if a line marker was
6570 emitted or not.
6571 (scan_translation_unit): Detect if the system-ness of the token we
6572 are about to emit is different from the one of the previously
6573 emitted token. If so, emit a line marker. Avoid emitting useless
6574 adjacent line markers. Avoid emitting line markers for tokens
6575 originating from the expansion of built-in macros.
6576 (scan_translation_unit_directives_only): Adjust.
6577
4d661eaa
MP
65782014-07-15 Marek Polacek <polacek@redhat.com>
6579
6580 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6581 TYPE_MAX_VALUE is NULL.
6582
b108f48f
JJ
65832014-07-14 Jakub Jelinek <jakub@redhat.com>
6584
6585 PR middle-end/61294
6586 * c.opt (Wmemset-transposed-args): New warning.
6587
c0221884
JM
65882014-07-10 Jason Merrill <jason@redhat.com>
6589
6590 PR c++/61659
6591 PR c++/61687
6592 * c.opt (-fuse-all-virtuals): New.
6593
63dfbb95
RB
65942014-07-09 Richard Biener <rguenther@suse.de>
6595
6596 PR c-family/61741
6597 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6598 using unsigned arithmetic if overflow does not wrap instead of
6599 if overflow is undefined.
6600
773ec47f
MP
66012014-07-06 Marek Polacek <polacek@redhat.com>
6602
6603 PR c/6940
6604 * c.opt (Wsizeof-array-argument): New option.
6605
00a7ba58
JJ
66062014-07-03 Jakub Jelinek <jakub@redhat.com>
6607
b1726d6c 6608 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6609 comments->count <= 1, as comments->entries might be NULL.
6610
52ec0ea3
MP
66112014-07-01 Marek Polacek <polacek@redhat.com>
6612
6613 * c.opt (Wint-conversion): New option.
6614
d5c3d343
MP
66152014-07-01 Marek Polacek <polacek@redhat.com>
6616
6617 PR c/58286
6618 * c.opt (Wincompatible-pointer-types): New option.
6619
6e7ceb17
PC
66202014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6621
6622 PR c++/51400
6623 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6624 Do not discard TYPE_QUALS of type.
6625
da73100b
JM
66262014-06-26 Jason Merrill <jason@redhat.com>
6627
6628 * c-common.h (enum cxx_dialect): Add cxx1z.
6629 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6630 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6631
08eedf75
TJ
66322014-06-26 Teresa Johnson <tejohnson@google.com>
6633
6634 * c-common.h (get_dump_info): Declare.
6635 * c-gimplify.c (c_genericize): Use saved dump files.
6636 * c-opts.c (c_common_parse_file): Begin and end dumps
6637 once around parsing invocation.
6638 (get_dump_info): New function.
6639
7b56b2f8
MP
66402014-06-23 Marek Polacek <polacek@redhat.com>
6641 Andrew MacLeod <amacleod@redhat.com>
6642
6643 PR c/61553
6644 * c-common.c (get_atomic_generic_size): Don't segfault if the
6645 type doesn't have a size.
6646
0e37a2f3
MP
66472014-06-20 Marek Polacek <polacek@redhat.com>
6648
6649 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6650 (ubsan_walk_array_refs_r): New function.
6651 (c_genericize): Instrument array bounds.
6652 * c-ubsan.c: Include "internal-fn.h".
6653 (ubsan_instrument_division): Mark instrumented arrays as having
6654 side effects. Adjust ubsan_type_descriptor call.
6655 (ubsan_instrument_shift): Likewise.
6656 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6657 (ubsan_instrument_bounds): New function.
6658 (ubsan_array_ref_instrumented_p): New function.
6659 (ubsan_maybe_instrument_array_ref): New function.
6660 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6661 (ubsan_array_ref_instrumented_p): Declare.
6662 (ubsan_maybe_instrument_array_ref): Declare.
6663
66642014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6665
6666 PR lto/61123
6667 * c.opt (fshort-enums): Add to LTO.
6668 * c.opt (fshort-wchar): Likewise.
6669
5c3d09f7
MP
66702014-06-16 Marek Polacek <polacek@redhat.com>
6671
6672 PR c/60439
6673 * c.opt (Wswitch-bool): Add Var.
6674
9cf32741
JJ
66752014-06-12 Jakub Jelinek <jakub@redhat.com>
6676
6677 PR middle-end/61486
6678 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6679 #pragma omp target teams or
6680 #pragma omp {,target }teams distribute simd.
6681
62984918
JM
66822014-06-12 Jason Merrill <jason@redhat.com>
6683
6684 * c.opt (Wabi=, fabi-compat-version): New.
6685 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6686 (c_common_post_options): Handle flag_abi_compat_version default.
6687 Disallow -fabi-compat-version=1.
6688 * c-common.h (abi_version_crosses): New.
6689
f961457f
JH
66902014-06-11 Jan Hubicka <hubicka@ucw.cz>
6691
adfac8df 6692 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6693 section names that are no longer trees.
6694
92d28cbb
JJ
66952014-06-10 Jakub Jelinek <jakub@redhat.com>
6696
6697 PR fortran/60928
6698 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6699 (omp_pragmas): ... back here.
6700
742938c9
MP
67012014-06-05 Marek Polacek <polacek@redhat.com>
6702
6703 PR c/49706
6704 * c-common.c (warn_logical_not_parentheses): New function.
6705 * c-common.h (warn_logical_not_parentheses): Declare.
6706 * c.opt (Wlogical-not-parentheses): New option.
6707
9d548dfb
MP
67082014-06-04 Marek Polacek <polacek@redhat.com>
6709
6710 PR c/30020
6711 * c-common.c (check_case_bounds): Add location parameter.
6712 Use it.
6713 (c_add_case_label): Pass loc to check_case_bounds.
6714
fedfecef
MP
67152014-06-03 Marek Polacek <polacek@redhat.com>
6716
6717 PR c/60439
6718 * c.opt (Wswitch-bool): New option.
6719
f6a7cffc
TS
67202014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6721
040d18b6
TS
6722 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6723 Remove prototypes.
6724 (record_types_used_by_current_var_decl): Move prototype to where
6725 it belongs.
6726
f6a7cffc
TS
6727 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6728 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6729 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6730
632f2871
RS
67312014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6732
6733 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6734 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6735 void_zero_node.
6736 * c-pretty-print.c (pp_c_void_constant): New function.
6737 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6738 (c_pretty_printer::expression): Handle VOID_CST.
6739 * cilk.c (extract_free_variables): Likewise.
6740 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6741 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6742
766090c2
TS
67432014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6744
6745 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6746 * c-pragma.c (push_alignment): Adjust.
6747 (handle_pragma_push_options): Likewise.
6748
661a0813
MP
67492014-05-09 Marek Polacek <polacek@redhat.com>
6750
6751 PR c/50459
6752 * c-common.c (check_user_alignment): Return -1 if alignment is error
6753 node.
6754 (handle_aligned_attribute): Don't call default_conversion on
6755 FUNCTION_DECLs.
6756 (handle_vector_size_attribute): Likewise.
6757 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6758 (handle_sentinel_attribute): Call default_conversion and allow even
6759 integral types as an argument.
6760
2793eeab
MP
67612014-05-08 Marek Polacek <polacek@redhat.com>
6762
6763 PR c/61053
6764 * c-common.c (min_align_of_type): New function factored out from...
6765 (c_sizeof_or_alignof_type): ...here.
6766 * c-common.h (min_align_of_type): Declare.
6767
f827930a
MP
67682014-05-08 Marek Polacek <polacek@redhat.com>
6769
6770 PR c/61077
6771 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6772 parameter type of main.
6773
ca49b74e
DD
67742014-05-07 DJ Delorie <dj@redhat.com>
6775
6776 * c-cppbuiltin.c (print_bits_of_hex): New.
6777 (builtin_define_type_minmax): Print values using hex so as not to
6778 require a pre-computed list of string values.
6779
1d60af08
KZ
67802014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6781 Mike Stump <mikestump@comcast.net>
6782 Richard Sandiford <rdsandiford@googlemail.com>
6783
6784 * c-ada-spec.c: Include wide-int.h.
6785 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6786 (dump_generic_ada_node): Use wide-int interfaces.
6787 * c-common.c: Include wide-int-print.h.
6788 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6789 (pointer_int_sum): Use wide-int interfaces.
6790 (c_common_nodes_and_builtins): Use make_int_cst.
6791 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6792 (handle_alloc_size_attribute): Use wide-int interfaces.
6793 (get_nonnull_operand): Likewise.
6794 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6795 * c-lex.c: Include wide-int.h.
6796 (narrowest_unsigned_type): Take a widest_int rather than two
6797 HOST_WIDE_INTs.
6798 (narrowest_signed_type): Likewise.
6799 (interpret_integer): Update accordingly. Use wide-int interfaces.
6800 (lex_charconst): Use wide-int interfaces.
6801 * c-pretty-print.c: Include wide-int.h.
6802 (pp_c_integer_constant): Use wide-int interfaces.
6803 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6804 INT_CST_LT_UNSIGNED.
6805
b15458be
RB
68062014-05-06 Richard Biener <rguenther@suse.de>
6807
6808 * c-opts.c (c_common_post_options): For -freestanding,
6809 -fno-hosted and -fno-builtin disable pattern recognition
6810 if not enabled explicitely.
6811
6577374e
MP
68122014-05-02 Marek Polacek <polacek@redhat.com>
6813
6814 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6815
d00887e8
MP
68162014-05-01 Marek Polacek <polacek@redhat.com>
6817
6818 PR c/43245
6819 * c.opt (Wdiscarded-qualifiers): Add.
6820
f8ed5150
MP
68212014-04-30 Marek Polacek <polacek@redhat.com>
6822
6823 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6824 INT_MIN / -1 sanitization only for integer types.
6825
45484dcf
MP
68262014-04-25 Marek Polacek <polacek@redhat.com>
6827
6828 PR c/18079
6829 * c-common.c (handle_noinline_attribute): Warn if the attribute
6830 conflicts with always_inline attribute.
6831 (handle_always_inline_attribute): Warn if the attribute conflicts
6832 with noinline attribute.
6833
38e514c0
MP
68342014-04-25 Marek Polacek <polacek@redhat.com>
6835
6836 PR c/60156
6837 * c-common.c (check_main_parameter_types): Warn about variadic main.
6838
44875f92
MS
68392014-04-24 Mike Stump <mikestump@comcast.net>
6840
6841 * c.opt (Wshadow-ivar): Default to on.
6842
dcaaa5a0
DP
68432014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6844
6845 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6846
c07d7c02
MP
68472014-04-23 Marek Polacek <polacek@redhat.com>
6848
6849 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6850
1c33c9b7
JJ
68512014-04-22 Jakub Jelinek <jakub@redhat.com>
6852
6853 PR sanitizer/60275
6854 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6855 if flag_sanitize_undefined_trap_on_error.
6856 (ubsan_instrument_division, ubsan_instrument_shift,
6857 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6858 if !flag_sanitize_recover.
6859
793c625f
MG
68602014-04-22 Marc Glisse <marc.glisse@inria.fr>
6861
6862 PR libstdc++/43622
6863 * c-common.c (registered_builtin_types): Make non-static.
6864 * c-common.h (registered_builtin_types): Declare.
6865
b0f1bf36 68662014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 6867 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
6868
6869 PR c/60819
6870 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6871 apply may-alias the scalar pointer type when applicable.
6872
3b07fa4a
IZ
68732014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6874
6875 PR middle-end/60467
6876 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6877 as possible argument for Cilk_spawn.
6878
cbbd2b1c
TB
68792014-04-11 Tobias Burnus <burnus@net-b.de>
6880
6881 PR c/60194
6882 * c.opt (Wformat-signedness): Add
6883 * c-format.c(check_format_types): Use it.
6884
6415bd5d
JM
68852014-04-11 Jason Merrill <jason@redhat.com>
6886
6887 PR c++/57926
6888 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6889 default_conversion for an array argument.
6890
6525783a
MP
68912014-04-08 Marek Polacek <polacek@redhat.com>
6892
6893 PR sanitizer/60745
6894 * c-ubsan.c: Include asan.h.
6895 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6896
880a467b
NS
68972014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6898
6899 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6900
7b59ff2d
MP
69012014-04-02 Marek Polacek <polacek@redhat.com>
6902
6903 * c-common.h (c_expand_expr): Remove declaration.
6904
8edbfaa6
JJ
69052014-03-28 Jakub Jelinek <jakub@redhat.com>
6906
6907 PR c++/60689
6908 * c-common.c (add_atomic_size_parameter): When creating new
6909 params vector, push the size argument first.
6910
07d72e1d
JJ
69112014-03-26 Jakub Jelinek <jakub@redhat.com>
6912
6913 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6914 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6915 ubsan_create_data callers.
6916
b35e0fa0
JJ
69172014-03-22 Jakub Jelinek <jakub@redhat.com>
6918
6919 PR debug/60603
6920 * c-opts.c (c_finish_options): Restore cb_file_change call to
6921 <built-in>.
6922
39a1ebb3
JJ
69232014-03-13 Jakub Jelinek <jakub@redhat.com>
6924
6925 PR middle-end/36282
6926 * c-pragma.c (apply_pragma_weak): Only look at
6927 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6928 DECL_ASSEMBLER_NAME_SET_P (decl).
6929 (maybe_apply_pending_pragma_weaks): Exit early if
6930 vec_safe_is_empty (pending_weaks) rather than only when
6931 !pending_weaks.
6932 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6933 set assembler name back to NULL afterwards.
6934
a07f6ed2
JM
69352014-03-11 Jason Merrill <jason@redhat.com>
6936
6937 * c.opt: Add -std=gnu++14.
6938
75b107f5
IB
69392014-03-11 Ian Bolton <ian.bolton@arm.com>
6940
6941 * c-opts.c (c_common_post_options): Don't override
6942 -ffp-contract=fast if unsafe-math-optimizations is on.
6943
f42c637e
PM
69442014-03-08 Paulo Matos <paulo@matos-sorge.com>
6945
22b15758 6946 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6947
70e24808
JM
69482014-03-07 Jason Merrill <jason@redhat.com>
6949
6950 * c.opt: Add -std=c++14.
6951
3af9c5e9
MP
69522014-03-06 Marek Polacek <polacek@redhat.com>
6953
6954 PR c/60197
6955 * cilk.c (contains_cilk_spawn_stmt): New function.
6956 (contains_cilk_spawn_stmt_walker): Likewise.
6957 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6958 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6959
b3bdf019
JJ
69602014-03-03 Jakub Jelinek <jakub@redhat.com>
6961
6962 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6963 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6964 even when flag_preprocess_only.
6965
ca7e759d
JM
69662014-02-26 Jason Merrill <jason@redhat.com>
6967
6968 PR c++/59231
6969 PR c++/11586
6970 * c-common.c (shorten_compare): Don't check
6971 c_inhibit_evaluation_warnings.
6972
28e41874
JJ
69732014-02-19 Jakub Jelinek <jakub@redhat.com>
6974
cca615af
JJ
6975 PR c/37743
6976 * c-common.c (c_common_nodes_and_builtins): When initializing
6977 c_uint{16,32,64}_type_node, also set corresponding
6978 uint{16,32,64}_type_node to the same value.
6979
28e41874
JJ
6980 PR c++/60267
6981 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6982 for PRAGMA_IVDEP if flag_preprocess_only.
6983
c2bf53a1
JJ
69842014-02-12 Jakub Jelinek <jakub@redhat.com>
6985
6986 PR c/60101
6987 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6988 if false, add ADD itself, rather than vice versa.
6989 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6990 copy. For SAVE_EXPR, only call merge_tlist once.
6991
8fcbce72
JJ
69922014-02-08 Jakub Jelinek <jakub@redhat.com>
6993
6994 PR middle-end/60092
6995 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6996 and tree_to_uhwi.
6997 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6998 functions.
6999 (c_common_attribute_table): Add alloc_align and assume_aligned
7000 attributes.
7001
0a756a3f
MP
70022014-02-06 Marek Polacek <polacek@redhat.com>
7003
7004 PR c/60087
7005 * c-common.c (warn_for_sign_compare): Call warning_at with location
7006 instead of warning.
7007
7ec4847a
MP
70082014-02-05 Marek Polacek <polacek@redhat.com>
7009
7010 PR c/53123
7011 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7012 statement.
7013
66f20604
MP
70142014-02-04 Marek Polacek <polacek@redhat.com>
7015
7016 PR c/60036
7017 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7018 SAVE_EXPR.
7019
5d77fb19
MG
70202014-02-03 Marc Glisse <marc.glisse@inria.fr>
7021
7022 PR c++/53017
7023 PR c++/59211
7024 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7025 handle_vector_size_attribute, handle_nonnull_attribute): Call
7026 default_conversion on the attribute argument.
7027 (handle_nonnull_attribute): Increment the argument number.
7028
81e5eca8
MP
70292014-01-31 Marek Polacek <polacek@redhat.com>
7030
7031 PR c/59963
7032 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7033 build_function_call_vec.
7034 (resolve_overloaded_builtin): Likewise.
7035 * c-common.h (build_function_call_vec): Adjust declaration.
7036
68fca595
MP
70372014-01-30 Marek Polacek <polacek@redhat.com>
7038
7039 PR c/59940
7040 * c-common.h (unsafe_conversion_p): Adjust declaration.
7041 (warnings_for_convert_and_check): Likewise.
7042 (convert_and_check): Likewise.
7043 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7044 expansion_point_location_if_in_system_header on it.
7045 (warnings_for_convert_and_check): Add location parameter. Call
7046 expansion_point_location_if_in_system_header on it. Use it.
7047 (convert_and_check): Add location parameter. Use it.
7048 (conversion_warning): Likewise.
7049 (c_add_case_label): Adjust convert_and_check calls.
7050 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7051
b72271b9
BI
70522014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7053
7054 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7055 flag_cilkplus.
7056 * c-pragma.c (init_pragma): Likewise.
7057 * c.opt: Likewise.
7058
393e8e8b
MP
70592014-01-23 Marek Polacek <polacek@redhat.com>
7060
7061 PR c/59846
7062 * c-common.c (shorten_compare): Add location_t parameter.
7063 * c-common.h (shorten_binary_op): Adjust declaration.
7064
f04dda30
MP
70652014-01-23 Marek Polacek <polacek@redhat.com>
7066
7067 PR c/58346
7068 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7069 * c-common.h: Declare it.
7070
621955cb
EB
70712014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7072
7073 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7074 * c-ada-spec.c (dump_ads): Likewise.
7075 (cpp_check): Likewise.
7076 (dump_ada_specs): Likewise.
7077
70782014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7079
7080 PR c++/49718
7081 * c-common.c (handle_no_instrument_function_attribute): Allow
7082 no_instrument_function attribute in class member
7083 definition/declaration.
7084
241f845a
JJ
70852014-01-15 Jakub Jelinek <jakub@redhat.com>
7086
7087 PR c/58943
7088 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7089 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7090 being COMPOUND_EXPR.
7091 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7092 operand a SAVE_EXPR and second MODIFY_EXPR.
7093
e83b8e2e
JJ
70942014-01-09 Jakub Jelinek <jakub@redhat.com>
7095
7096 PR target/58115
7097 * c-pch.c (c_common_write_pch): Call
7098 prepare_target_option_nodes_for_pch.
7099
23a5b65a
RS
71002014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7101
7102 Update copyright years
7103
f9030485
RS
71042014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7105
7106 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7107 the copyright notice.
7108
f2aa696b
EB
71092013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7110
7111 * c-ada-spec.c (print_constructor): New function.
7112 (print_destructor): Retrieve the origin of the destructor.
7113 (print_ada_declaration): Revamp handling of constructors/destructors.
7114
3f8257db 71152013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7116 Bill Maddox <maddox@google.com>
7117 Jason Merrill <jason@redhat.com>
7118
7119 * c.opt: Add -fdeclone-ctor-dtor.
7120 * c-opts.c (c_common_post_options): Default to on iff -Os.
7121
41958c28
BI
71222013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7123
7124 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7125 attribute.
7126 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7127 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7128 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7129 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7130 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7131 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7132 PRAGMA_CILK_CLAUSE_UNIFORM.
7133
b1726d6c 7134
12893402
BI
71352013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7136
7137 * cilk.c (cilk_outline): Made this function non-static.
7138 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7139 (create_cilk_wrapper): Added a new parameter: a function pointer.
7140 (c_install_body_w_frame_cleanup): Remove
7141 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7142 * c-common.h (cilk_outline): New prototype.
7143 (gimplify_cilk_spawn): Removed two parameters.
7144 (cilk_install_body_with_frame_cleanup): New prototype.
7145 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7146 CILK_SPAWN_STMT case.
7147
085b42ed
BS
71482013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7149
2ce064c3
BS
7150 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7151
085b42ed
BS
7152 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7153 (int_array_type_node): Remove.
7154 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7155
9e36c9ed
MP
71562013-12-05 Marek Polacek <polacek@redhat.com>
7157
7158 PR c/52023
7159 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7160 [ADJUST_FIELD_ALIGN].
7161
296674db
JM
71622013-12-04 Joseph Myers <joseph@codesourcery.com>
7163
7164 PR c/52023
7165 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7166 and check field alignment if set.
7167 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7168 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7169
b1726d6c 71702013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7171 Marek Polacek <polacek@redhat.com>
7172
7173 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7174 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7175
d7947e19
L
71762013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7177
7178 PR c/59309
7179 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7180 arguments.
7181
fad7652e
JJ
71822013-11-29 Jakub Jelinek <jakub@redhat.com>
7183
7184 PR c/59280
7185 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7186 goto invalid. If it is error_mark_node, don't issue further
7187 diagnostics.
7188
8b5e1202
SO
71892013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7190
7191 * c.opt (Wopenmp-simd): New.
7192
0a508bb6
JJ
71932013-11-22 Jakub Jelinek <jakub@redhat.com>
7194
7195 * c-ubsan.h (ubsan_instrument_return): New prototype.
7196 * c-ubsan.c (ubsan_instrument_return): New function.
7197
2fb9a547
AM
71982013-11-22 Andrew MacLeod <amacleod@redhat.com>
7199
7200 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7201 * c-gimplify.c: Likewise.
7202 * cilk.c: Likewise.
2fb9a547 7203
8400e75e
DM
72042013-11-22 David Malcolm <dmalcolm@redhat.com>
7205
7206 * c-common.c (unsafe_conversion_p): Remove use of
7207 EXPR_LOC_OR_HERE macro.
7208 (conversion_warning): Likewise.
7209 (warnings_for_convert_and_check): Likewise.
7210 (warn_for_collisions_1): Likewise.
7211 (shorten_compare): Likewise, and remove use of in_system_header
7212 macro, using the location from the former.
7213 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7214 (cb_def_pragma): Remove use of in_system_header macro.
7215 (lex_string): Likewise.
7216 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7217
eb1ce453
KZ
72182013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7219 Mike Stump <mikestump@comcast.net>
7220 Richard Sandiford <rdsandiford@googlemail.com>
7221
7222 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7223 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7224 tree_fits_shwi_p or tree_fits_uhwi_p.
7225 (dump_generic_ada_node): Likewise.
7226 * c-format.c (check_format_arg): Likewise.
7227 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7228
6b3b8c27
KZ
72292013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7230
7231 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7232
49b0aa18
JC
72332013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7234
7235 PR c/53001
7236 * c-common.c (unsafe_conversion_p): Make this function
7237 return an enumeration with more detail.
7238 (conversion_warning): Use the new return type of
7239 unsafe_conversion_p to separately warn either about conversions
7240 that lower floating point number precision or about the other
7241 kinds of conversions.
7242 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7243 (unsafe_conversion_p): switching return type to
7244 conversion_safety enumeration.
49b0aa18
JC
7245 * c.opt: Adding new warning -Wfloat-conversion and
7246 enabling it with -Wconversion.
7247
b826515a
BS
72482013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7249
8e745a17
JJ
7250 * c-opts.c: Include plugin.h.
7251 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7252
b9a55b13
MP
72532013-11-19 Marek Polacek <polacek@redhat.com>
7254
7255 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7256 call.
7257 (ubsan_instrument_shift): Likewise.
7258 (ubsan_instrument_vla): Likewise.
7259
7d362f6c
RS
72602013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7261
7262 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7263 cast to unsigned type.
7264
386b1f1f
RS
72652013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7266
7267 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7268 tree_low_cst.
7269 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7270 rather than tree_low_cst.
7271
ae7e9ddd
RS
72722013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7273
7274 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7275 tree_to_uhwi throughout.
7276
9439e9a1
RS
72772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7278
7279 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7280 tree_low_cst (..., 0) with tree_to_shwi throughout.
7281
cc269bb6
RS
72822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7283
7284 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7285 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7286
9541ffee
RS
72872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7288
7289 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7290 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7291
c02065fc
AH
72922013-11-15 Aldy Hernandez <aldyh@redhat.com>
7293
7294 * c-cilkplus.c: New file.
7295 * c-common.c (readonly_error): Add location argument.
7296 * c-common.h (readonly_error): Same.
7297 (c_finish_cilk_clauses): Protoize.
7298 (c_check_cilk_loop): Same.
7299 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7300 Do not fail on error_mark_node.
7301 Abstract increment canonicalization to here...
7302 (c_omp_for_incr_canonicalize_ptr): New.
7303 c-pragma.c (init_pragma): Register "simd" pragma.
7304 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7305 (enum pragma_cilk_clause): New.
7306
9cc65f15
RS
73072013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7308
7309 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7310 wchar_type and host_integerp checks.
7311
18f429e2
AM
73122013-11-14 Andrew MacLeod <amacleod@redhat.com>
7313
7314 * c-common.c: Likewise.
7315 * c-gimplify.c: Likewise.
7316 * cilk.c: Likewise.
7317
d8a2d370
DN
73182013-11-14 Diego Novillo <dnovillo@google.com>
7319
7320 * c-common.c: Include fold-const.h.
7321 Include stor-layout.h.
7322 Include calls.h.
7323 Include stringpool.h.
7324 Include attribs.h.
7325 Include varasm.h.
7326 Include trans-mem.h.
7327 * c-cppbuiltin.c: Include stor-layout.h.
7328 Include stringpool.h.
7329 * c-format.c: Include stringpool.h.
7330 * c-lex.c: Include stringpool.h.
7331 Include stor-layout.h.
7332 * c-pragma.c: Include stringpool.h.
7333 Include attribs.h.
7334 Include varasm.h.
7335 Include gcc-symtab.h.
7336 * c-pretty-print.c: Include stor-layout.h.
7337 Include attribs.h.
7338 * cilk.c: Include stringpool.h.
7339 Include calls.h.
7340
38b7bc7f
JM
73412013-11-13 Joseph Myers <joseph@codesourcery.com>
7342
7343 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7344 * c-common.c (c_common_reswords): Add __auto_type.
7345 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7346
45b0be94
AM
73472013-11-12 Andrew MacLeod <amacleod@redhat.com>
7348
18f429e2
AM
7349 * c-common.c: Include gimplify.h.
7350 * c-gimplify.c: Likewise.
7351 * cilk.c: Likewise.
7352 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7353 * c-ubsan.c: Don't include gimple.h.
45b0be94 7354
582d9b50
JM
73552013-11-12 Joseph Myers <joseph@codesourcery.com>
7356
7357 * c-common.c (c_common_reswords): Add _Thread_local.
7358
6b28e197
JM
73592013-11-09 Joseph Myers <joseph@codesourcery.com>
7360
7361 * c-common.c (atomic_size_supported_p): New function.
7362 (resolve_overloaded_atomic_exchange)
7363 (resolve_overloaded_atomic_compare_exchange)
7364 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7365 Use it instead of comparing size with a local list of sizes.
7366
267bac10
JM
73672013-11-07 Andrew MacLeod <amacleod@redhat.com>
7368 Joseph Myers <joseph@codesourcery.com>
7369
7370 * c-common.h (enum rid): Add RID_ATOMIC.
7371 * c-common.c (c_common_reswords): Add _Atomic.
7372 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7373 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7374 * c-format.c (check_format_types): Check for extra _Atomic
7375 qualifiers in format argument.
7376 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7377 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7378
5157b91e
TB
73792013-11-06 Tobias Burnus <burnus@net-b.de>
7380
7381 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7382
6dbe0958
JM
73832013-11-06 Joseph Myers <joseph@codesourcery.com>
7384
7385 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7386 standards modes.
7387 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7388 to mean lack of IEEE 754 support.
7389
e8ff5196
TB
73902013-11-05 Tobias Burnus <burnus@net-b.de>
7391
7392 * c.opt (-Wdate-time): New option
7393 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7394
254a0760
JM
73952013-11-05 Joseph Myers <joseph@codesourcery.com>
7396
7397 * c-cppbuiltin.c (cpp_iec_559_value): Test
7398 flag_excess_precision_cmdline not flag_excess_precision.
7399
6d7f7e0a
TB
74002013-11-05 Tobias Burnus <burnus@net-b.de>
7401
7402 * c.opt (fopenmp-simd): New option.
7403 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7404 (omp_pragmas): ... this new struct.
7405 (c_pp_lookup_pragma): Also walk omp_pragmas.
7406 (init_pragma): Init pragmas for -fopenmp-simd.
7407
55a7f02f
MP
74082013-11-04 Marek Polacek <polacek@redhat.com>
7409
7410 PR c++/58979
7411 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7412
9193fb05
JM
74132013-11-04 Joseph Myers <joseph@codesourcery.com>
7414
7415 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7416 New functions.
7417 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7418
94159ecf
EB
74192013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7420
7421 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7422 (dump_ada_specs): Adjust prototype of second callback.
7423 * c-ada-spec.c (cpp_check): New global variable.
7424 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7425 (print_generic_ada_decl): Likewise.
7426 (has_static_fields): Change return type to bool and add guard.
7427 (has_nontrivial_methods): New predicate.
7428 (is_tagged_type): Change return type to bool.
7429 (separate_class_package): Call has_nontrivial_methods.
7430 (pp_ada_tree_identifier): Minor tweaks.
7431 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7432 (dump_ada_array_domains): Likewise.
7433 (dump_ada_array_type): Likewise.
7434 (dump_template_types): Remove cpp_check parameter and do not pass it to
7435 dump_generic_ada_node.
7436 (dump_ada_template): Likewise.
7437 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7438 recursively.
7439 (print_ada_methods): Change return type to integer. Remove cpp_check
7440 parameter and do not pass it down.
7441 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7442 dump_generic_ada_node.
7443 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7444 accessing methods.
7445 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7446 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7447 value of print_ada_methods.
7448 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7449 Set cpp_check to it before invoking dump_ada_nodes.
7450 (dump_ada_specs): Likewise.
7451
b906f4ca
MP
74522013-11-03 Marek Polacek <polacek@redhat.com>
7453
7454 * c-ubsan.c: Don't include hash-table.h.
7455 (ubsan_instrument_vla): New function.
7456 * c-ubsan.h: Declare it.
7457
5e20cdc9
DM
74582013-10-31 David Malcolm <dmalcolm@redhat.com>
7459
7460 Automated part of renaming of symtab_node_base to symtab_node.
7461
7462 Patch autogenerated by rename_symtab.py from
7463 https://github.com/davidmalcolm/gcc-refactoring-scripts
7464 revision 58bb219cc090b2f4516a9297d868c245495ee622
7465
7466 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7467 symtab_node_base to symtab_node.
7468
7057e645
ESR
74692013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7470
8e745a17 7471 Implement C++14 digit separators.
7057e645
ESR
7472 * c-lex.c (interpret_float): Remove digit separators from scratch string
7473 before building real literal.
7474
193ea7bc
JJ
74752013-10-30 Jakub Jelinek <jakub@redhat.com>
7476
7477 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7478
939b37da
BI
74792013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7480
7481 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7482 fields.
7483 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7484 enabled.
7485 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7486 (insert_cilk_frame): New prototype.
7487 (cilk_init_builtins): Likewise.
7488 (gimplify_cilk_spawn): Likewise.
7489 (c_cilk_install_body_w_frame_cleanup): Likewise.
7490 (cilk_detect_spawn_and_unwrap): Likewise.
7491 (cilk_set_spawn_marker): Likewise.
7492 (build_cilk_sync): Likewise.
7493 (build_cilk_spawn): Likewise.
7494 * cilk.c: New file.
7495
67348ccc
DM
74962013-10-29 David Malcolm <dmalcolm@redhat.com>
7497
7498 Patch autogenerated by refactor_symtab.py from
7499 https://github.com/davidmalcolm/gcc-refactoring-scripts
7500 revision 58bb219cc090b2f4516a9297d868c245495ee622
7501
7502 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7503 to a true class hierarchy.
7504 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7505
d570872d
RS
75062013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7507
7508 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7509
98906124
JL
75102013-10-26 Jeff Law <law@redhat.com>
7511
adfac8df
JJ
7512 * c-common.c (c_define_builtins): Remove mudflap support.
7513 * c.opt: Ignore and warn for mudflap options.
98906124 7514
d73749df 75152013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7516
7517 PR other/33426
7518 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7519 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7520
3f04b1bb
JM
75212013-10-23 Jason Merrill <jason@redhat.com>
7522
7523 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7524
acf0174b
JJ
75252013-10-11 Jakub Jelinek <jakub@redhat.com>
7526
acd15a28
JJ
7527 * c-common.h (omp_clause_mask::operator !=): New method.
7528 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7529 instead of if (mask & something) tests everywhere.
7530
acf0174b
JJ
7531 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7532 201307 instead of 201107.
7533 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7534 (c_common_attribute_table): Add "omp declare target" and
7535 "omp declare simd" attributes.
7536 (handle_omp_declare_target_attribute,
7537 handle_omp_declare_simd_attribute): New functions.
7538 * c-omp.c: Include c-pragma.h.
7539 (c_finish_omp_taskgroup): New function.
7540 (c_finish_omp_atomic): Add swapped argument, if true,
7541 build the operation first with rhs, lhs arguments and use NOP_EXPR
7542 build_modify_expr.
7543 (c_finish_omp_for): Add code argument, pass it down to make_code.
7544 (c_omp_split_clauses): New function.
7545 (c_split_parallel_clauses): Removed.
7546 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7547 c_omp_declare_simd_clauses_to_decls): New functions.
7548 * c-common.h (omp_clause_mask): New type.
7549 (OMP_CLAUSE_MASK_1): Define.
7550 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7551 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7552 omp_clause_mask::operator |, omp_clause_mask::operator &,
7553 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7554 omp_clause_mask::operator ==): New methods.
7555 (enum c_omp_clause_split): New.
7556 (c_finish_omp_taskgroup): New prototype.
7557 (c_finish_omp_atomic): Add swapped argument.
7558 (c_finish_omp_for): Add code argument.
7559 (c_omp_split_clauses): New prototype.
7560 (c_split_parallel_clauses): Removed.
7561 (c_omp_declare_simd_clauses_to_numbers,
7562 c_omp_declare_simd_clauses_to_decls): New prototypes.
7563 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7564 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7565 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7566 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7567 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7568 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7569 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7570 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7571 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7572 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7573 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7574 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7575 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7576 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7577 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7578 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7579 PRAGMA_OMP_CLAUSE_UNIFORM.
7580
826cacfe
MG
75812013-10-09 Marc Glisse <marc.glisse@inria.fr>
7582
7583 PR tree-optimization/20318
7584 * c-common.c (handle_returns_nonnull_attribute): New function.
7585 (c_common_attribute_table): Add returns_nonnull.
7586
2284b034
MG
75872013-10-03 Marc Glisse <marc.glisse@inria.fr>
7588
7589 PR c++/19476
7590 * c.opt (fcheck-new): Move to common.opt.
7591
b56e9788
MP
75922013-09-25 Marek Polacek <polacek@redhat.com>
7593 Jakub Jelinek <jakub@redhat.com>
7594
7595 PR sanitizer/58413
7596 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7597 an expression if we can prove it is correct.
7598 (ubsan_instrument_division): Likewise. Remove unnecessary
7599 check.
7600
ce6923c5
MP
76012013-09-18 Marek Polacek <polacek@redhat.com>
7602
7603 PR sanitizer/58411
7604 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7605 Declare it.
7606 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7607
fb5610fb
IS
76082013-09-14 Iain Sandoe <iain@codesourcery.com>
7609
7610 PR target/48094
7611 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7612 fobjc-gc, freplace-objc-classes): Accept for LTO.
7613
88b0e79e
JC
76142013-09-13 Jacek Caban <jacek@codeweavers.com>
7615
7616 * c-target.def: New hook
7617
c9b0866a
PC
76182013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7619
7620 PR c++/43452
7621 * c.opt (Wdelete-incomplete): Add.
7622
0af94e6f
JR
76232013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7624
7625 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7626 (vector_types_compatible_elements_p): New function.
7627 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7628 declaration.
7629 (vector_types_compatible_elements_p): Declare.
7630
7c26172c
GDR
76312013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7632
7633 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7634 a virtual member function.
7635 (pp_simple_type_specifier): Remove.
7636 (pp_c_type_specifier): Likewise.
7637 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7638 Rename from pp_c_type_specifier. Adjust.
7639 (c_pretty_printer::c_pretty_printer): Do not assign to
7640 simple_type_specifier.
7641
20059c8b
GDR
76422013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7643
7644 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7645 member function.
7646 (c_pretty_printer::storage_class_specifier): Likewise.
7647 (c_pretty_printer::initializer): Likewise.
7648 (pp_declaration): Remove.
7649 (pp_declaration_specifiers): Likewise.
7650 (pp_abstract_declarator): Likewise.
7651 (pp_declarator): Likewise.
7652 (pp_type_id): Likewise.
7653 (pp_statement): Likewise.
7654 (pp_constant): Likewise.
7655 (pp_id_expression): Likewise.
7656 (pp_primary_expression): Likewise.
7657 (pp_unary_expression): Likewise.
7658 (pp_multiplicative_expression): Likewise.
7659 (pp_conditional_expression): Likewise.
7660 (pp_assignment_expression): Likewise.
7661 (pp_expression): Likewise.
7662 (pp_c_type_id): Likewise.
7663 (pp_c_storage_class_specifier): Likewise.
7664 * c-pretty-print.c (pp_c_type_cast): Tidy.
7665 (pp_c_pointer): Likewise.
7666 (pp_c_type_specifier): Likewise.
7667 (pp_c_parameter_type_list): Likewise.
7668 (pp_c_function_definition): Likewise.
7669 (pp_c_init_declarator): Likewise.
7670 (pp_c_initializer_list): Likewise.
7671 (pp_c_constructor_elts): Likewise.
7672 (c_pretty_printer::direct_abstract_declarator): Likewise.
7673 (c_pretty_printer::declaration_specifiers): Likewise.
7674 (c_pretty_printer::primary_expression): Likewise.
7675 (c_pretty_printer::postfix_expression): Likewise.
7676 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7677 (c_pretty_printer::storage_class_specifier): Rename from
7678 pp_c_storage_class_specifier.
7679 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7680 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7681 storage_class_specifier, initializer, offset_list, flags.
7682
de5a5fa1
MP
76832013-08-30 Marek Polacek <polacek@redhat.com>
7684
7685 * c-ubsan.c: New file.
7686 * c-ubsan.h: New file.
7687
8f0e4d72
GDR
76882013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7689
7690 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7691 member function.
7692 (c_pretty_printer::declaration_specifiers): Likewise.
7693 (c_pretty_printer::declarator): Likewise.
7694 (c_pretty_printer::abstract_declarator): Likewise.
7695 (c_pretty_printer::direct_abstract_declarator): Likewise.
7696 (c_pretty_printer::direct_declarator): Likewise.
7697 (c_pretty_printer::function_specifier): Likewise.
7698 (pp_declaration): Adjust.
7699 (pp_declaration_specifiers): Likewise.
7700 (pp_abstract_declarator): Likewise.
7701 (pp_direct_declarator): Likewise.
7702 (pp_function_specifier): Likewise.
7703 (pp_direct_abstract_declarator): Remove as unused.
7704 (pp_c_declaration): Remove.
7705 (pp_c_declaration_specifiers): Likewise.
7706 (pp_c_declarator): Likewise.
7707 (pp_c_direct_declarator): Likewise.
7708 (pp_c_function_specifier): Likewise.
7709 (pp_c_direct_abstract_declarator): Likewise.
7710 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7711 from pp_c_abstract_declarator. Adjust.
ab20d992 7712 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
7713 pp_c_direct_abstract_declarator. Adjust.
7714 (c_pretty_printer::function_specifier): Rename from
7715 pp_c_function_specifier. Adjust.
7716 (c_pretty_printer::declaration_specifiers): Rename from
7717 pp_c_declaration_specifiers. Adjust.
7718 (c_pretty_printer::direct_declarator): Rename from
7719 pp_c_direct_declarator. Adjust.
7720 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7721 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7722 (c_pretty_printer::c_pretty_printer): Do not assign to
7723 declaration, declaration_specifiers, declarator,
7724 direct_declarator, direct_abstract_declarator, function_specifier.
7725
00d34d3a
GDR
77262013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7727
7728 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7729 virtual member function.
7730 (c_pretty_printer::multiplicative_expression): Likewise.
7731 (c_pretty_printer::conditional_expression): Likewise.
7732 (c_pretty_printer::assignment_expression): Likewise.
7733 (c_pretty_printer::expression): Likewise.
7734 (pp_unary_expression): Adjust.
7735 (pp_multiplicative_expression): Likewise.
7736 (pp_assignment_expression): Likewise.
7737 (pp_conditional_expression): Likewise.
7738 (pp_expression): Likewise.
7739 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7740 from pp_c_unary_expression. Adjust.
7741 (c_pretty_printer::multiplicative_expression): Rename from
7742 pp_c_multiplicative_expression. Adjust.
7743 (c_pretty_printer::conditional_expression): Rename from
7744 pp_c_conditional_expression. Adjust.
7745 (c_pretty_printer::assignment_expression): Rename from
7746 pp_c_assignment_expression. Adjust.
7747 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7748 (c_pretty_printer::c_pretty_printer): Do not assign to
7749 unary_expression, multiplicative_expression,
7750 conditional_expression, expression.
7751
fb22178f
GDR
77522013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7753
7754 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7755 virtual member function.
7756 (pp_postfix_expression): Adjust.
7757 (pp_c_postfix_expression): Remove.
7758 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7759 from pp_c_postfix_expression. Adjust.
7760 (c_pretty_printer::c_pretty_printer): Do not assign to
7761 postfix_expression.
7762
7ecc2600
GDR
77632013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7764
7765 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7766 virtua member function.
7767 (pp_primary_expression): Adjust.
7768 (pp_c_primary_expression): Remove.
7769 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7770 from pp_c_primary_expression. Adjust.
7771 (pp_c_initializer_list): Use pp_primary_expression.
7772 (c_pretty_printer::c_pretty_printer): Do not assign to
7773 primary_expression.
7774
0691175f
GDR
77752013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7776
7777 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7778 * c-pretty-print.c (M_): Remove.
7779 (c_pretty_printer::translate_string): Define.
7780 (pp_c_type_specifier): Use it.
7781 (pp_c_primary_expression): Likewise.
7782 (pp_c_expression): Likewise.
7783
66dfe4c4
GDR
77842013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7785
7786 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7787 virtual function.
7788 (pp_c_id_expression): Remove.
7789 (pp_id_expression): Adjust.
7790 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7791 pp_c_id_expression. Adjust.
7792 (pp_c_postfix_expression): Use pp_id_expression.
7793 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7794
ca43e9d5
GDR
77952013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7796
7797 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7798 member function.
7799 (pp_constant): Adjust.
7800 (pp_c_constant): Remove.
7801 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7802 pp_c_constant. Adjust.
7803 (pp_c_constant)
7804 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7805 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7806
da6ca2b5
GDR
78072013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7808
7809 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7810 (c_pretty_printer::c_pretty_printer): Declare.
7811 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7812 c_pretty_printer_init. Adjust.
7813 (print_c_tree): Do not call c_pretty_printer_init.
7814 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7815
65a372f4
AC
78162013-08-09 Arnaud Charlet <charlet@adacore.com>
7817
7818 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7819
fd9b0f32
PC
78202013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7821
7822 PR c++/58080
7823 * c-common.c (pointer_int_sum): Add bool parameter.
7824 * c-common.h (pointer_int_sum): Adjust declaration.
7825
e0aec1e9
GDR
78262013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7827
7828 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7829 c_pretty_printer variable.
7830
b066401f
GDR
78312013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7832
7833 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7834 (pp_base): Remove.
7835 (pp_c_base): Likewise. Adjust users.
7836 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7837 (pp_c_whitespace): Do not call pp_base.
7838 (pp_c_left_paren): Likewise.
7839 (pp_c_right_paren): Likewise.
7840 (pp_c_left_brace): Likewise.
7841 (pp_c_right_brace): Likewise.
7842 (pp_c_left_bracket): Likewise.
7843 (pp_c_right_bracket): Likewise.
7844 (pp_c_dot): Likewise.
7845 (pp_c_ampersand): Likewise.
7846 (pp_c_star): Likewise.
7847 (pp_c_arrow): Likewise.
7848 (pp_c_semicolon): Likewise.
7849 (pp_c_complement): Likewise.
7850 (pp_c_exclamation): Likewise.
7851 (pp_c_direct_declarator): Likewise.
7852 (pp_c_ws_string): Likewise.
7853 (pp_c_identifier): Likewise.
7854 (pp_c_statement): Likewise.
7855 (print_c_tree): Likewise.
7856
65e5a578
ESR
78572013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7858
7859 PR c++/58072
7860 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7861 provide useful error strings.
7862
137a1a27
GDR
78632013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7864
7865 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7866 printer functions instead of pp_string or operators and punctuators.
7867 (dump_generic_ada_node): Likewise.
7868 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7869 (pp_c_relational_expression): Likewise.
7870 (pp_c_logical_or_expression): Likewise.
7871
07838b13
GDR
78722013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7873
7874 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7875 functions instead of pp_character.
7876 (pp_ada_tree_identifier): Likewise.
7877 (dump_ada_double_name): Likewise.
7878 (dump_ada_function_declaration): Likewise.
7879 (dump_ada_array_domains): Likewise.
7880 (dump_template_types): Likewise.
7881 (dump_generic_ada_node): Likewise.
7882 (print_ada_declaration): Likewise.
7883 (print_ada_struct_decl): Likewise.
7884 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7885
433cc7b0
TT
78862013-07-23 Tom Tromey <tromey@redhat.com>
7887
7888 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7889 * c-common.c (c_common_reswords): Add _Generic.
7890
688010ba
OB
78912013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7892
7893 * c-common.c: Fix typos.
7894 * c-common.h: Likewise.
7895
2a99e5e6
LL
78962013-07-13 Lubos Lunak <l.lunak@suse.cz>
7897
7898 PR c++/55203
7899 * c-common.c (c_common_attribute_table): Add warn_unused.
7900 (handle_warn_unused_attribute): New.
7901
c26302d5
JJ
79022013-07-10 Jakub Jelinek <jakub@redhat.com>
7903
7904 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7905 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7906
dfeadaa0
PC
79072013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7908
7909 PR c++/57869
7910 * c.opt: Add Wconditionally-supported.
7911
6a2fa4b2
GS
79122013-07-08 Graham Stott <graham.stott@btinternet.com>
7913
adfac8df 7914 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7915 unused variables l_length and l_node.
7916
ecdbd01a 79172013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7918
7919 PR c/57821
7920 * c-common.c (complete_array_type): Delay folding first index
7921 like other indices. When folding, check for index overflow.
7922
bedc293e
MG
79232013-06-27 Marc Glisse <marc.glisse@inria.fr>
7924
7925 PR c++/57509
7926 * c-common.h (c_build_vec_perm_expr): New complain argument.
7927 * c-common.c (c_build_vec_perm_expr): Likewise.
7928 Use save_expr also in C++.
7929
604b2bfc
GDR
79302013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7931
7932 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7933 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7934 * c-opts.c (c_common_post_options): Likewise.
7935
dfeadaa0 79362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7937
7938 * array-notation-common.c (length_mismatch_in_expr): Changed the
7939 parameter type's from a dynamic array to a vec_tree. Also removed
7940 the size parameters.
7941 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7942 the change above.
7943
2ce86d2e
BI
79442013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7945
7946 * c-common.h (struct cilkplus_an_parts): New structure.
7947 (struct cilkplus_an_loop_parts): Likewise.
7948 (cilkplus_extract_an_triplets): New prototype.
7949 (fix_sec_implicit_args): Likewise.
7950 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7951 (fix_sec_implicit_args): Likewise.
604b2bfc 7952
07a6825b
BI
79532013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7954
7955 * array-notation-common.c (find_inv_trees): Removed an unwanted
7956 typecasting.
7957 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7958 enum rid to enum tree_code.
7959
08346abd
JH
79602013-06-11 Jan Hubicka <jh@suse.cz>
7961
7962 * c-common.c (handle_alias_ifunc_attribute): Do not set
7963 DECL_EXTERNAL for weakref variables.
7964 * c-pragma.c (handle_pragma_weak): Make sure aliases
7965 are not declared as external.
7966
d60f1706
BI
79672013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7968
7969 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7970 function from c/c-array-notation.c.
7971 (is_cilkplus_reduce_builtin): Likewise.
7972 (find_rank): Likewise.
7973 (extract_array_notation_exprs): Likewise.
7974 (replace_array_notations): Likewise.
7975 (find_inv_trees): Likewise.
7976 (replace_inv_trees): Likewise.
7977 (contains_array_notation_expr): Likewise.
7978 (find_correct_array_notation_type): Likewise.
7979 * c-common.h (struct inv_list): Moved this struct from the file
7980 c/c-array-notation.c and added a new field called additional tcodes.
7981 (length_mismatch_in_expr_p): New prototype.
7982 (is_cilkplus_reduce_builtin): Likewise.
7983 (find_rank): Likewise.
7984 (extract_array_notation_exprs): Likewise.
7985 (replace_array_notation): Likewise.
7986 (find_inv_trees): Likewise.
7987 (replace_inv_trees): Likewise.
7988 (find_correct_array_notation_type): Likewise.
dfeadaa0 7989
36536d79
BI
79902013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7991
7992 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7993 function array_notation_init_builtins is called.
7994 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7995 * c-common.def (ARRAY_NOTATION_REF): New tree.
7996 * c-common.h (build_array_notation_expr): New function declaration.
7997 (build_array_notation_ref): Likewise.
7998 (extract_sec_implicit_index_arg): New extern declaration.
7999 (is_sec_implicit_index_fn): Likewise.
8000 (ARRAY_NOTATION_CHECK): New define.
8001 (ARRAY_NOTATION_ARRAY): Likewise.
8002 (ARRAY_NOTATION_START): Likewise.
8003 (ARRAY_NOTATION_LENGTH): Likewise.
8004 (ARRAY_NOTATION_STRIDE): Likewise.
8005 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8006 ARRAY_NOTATION_REF.
8007 (pp_c_expression): Likewise.
8008 * c.opt (flag_enable_cilkplus): New flag.
8009 * array-notation-common.c: New file.
8010
f7716d57
JJ
80112013-05-14 Jakub Jelinek <jakub@redhat.com>
8012
8013 PR c++/57274
8014 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8015
a5e0cd1d
MG
80162013-05-10 Marc Glisse <marc.glisse@inria.fr>
8017
8018 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8019 vectors.
8020
f6bc1c4a
HS
80212013-05-07 Han Shen <shenhan@google.com>
8022
8023 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8024
3f12f6e9
SKS
80252013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8026
8027 * c-common.c (check_user_alignment): Emit error for negative values.
8028
61949153
PC
80292013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8030
8031 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8032
e93e18e9
PC
80332013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8034
8035 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8036 __GXX_EXPERIMENTAL_CXX1Y__.
8037
44d90fe1 80382013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8039 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8040
8041 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8042 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8043 to simply use OPT_Wpointer_arith.
8044 (c_sizeof_or_alignof_type): Likewise.
8045
13f39b2e
PC
80462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8047
8048 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8049
4b84d650
JJ
80502013-04-12 Jakub Jelinek <jakub@redhat.com>
8051
8052 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8053 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8054 specifiers.
8055
fb037b5d
SB
80562013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8057
8058 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8059
4e856798
PC
80602013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8061
8062 * c-common.c (pointer_int_sum): Remove dead code.
8063
4b1baac8
RS
80642013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8065
8066 PR middle-end/56524
8067 * c-common.c (handle_optimize_attribute): Don't call
8068 save_optabs_if_changed.
8069
0b50e654
JJ
80702013-03-05 Jakub Jelinek <jakub@redhat.com>
8071
8072 PR middle-end/56461
8073 * c-pch.c (pch_init): Free target_validity at the end.
8074
48c41403
JJ
80752013-03-04 Jakub Jelinek <jakub@redhat.com>
8076
8077 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8078
e664c61c
KS
80792013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8080 Jakub Jelinek <jakub@redhat.com>
8081
8082 PR sanitizer/56454
8083 * c-common.c (handle_no_sanitize_address_attribute): New function.
8084 (c_common_attribute_table): Add no_sanitize_address attribute.
8085 (handle_no_address_safety_analysis_attribute): Add
8086 no_sanitize_address attribute, not no_address_safety_analysis
8087 attribute.
8088
a475fd3d 80892013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8090
8091 PR target/52555
8092 * c-common.c (handle_optimize_attribute): Call
8093 save_optabs_if_changed.
8094
f6007d99
JJ
80952013-02-18 Jakub Jelinek <jakub@redhat.com>
8096 Steven Bosscher <steven@gcc.gnu.org>
8097
8098 PR pch/54117
8099 * c-opts.c (c_common_post_options): If debug info is enabled
8100 and non-dwarf*, refuse to load PCH files and when writing PCH
8101 file warn.
8102
cf35e2b1
JJ
81032013-02-05 Jakub Jelinek <jakub@redhat.com>
8104
8105 PR middle-end/56167
8106 * c-common.c (handle_error_attribute): Fix condition.
8107
32887460
JJ
81082013-01-30 Jakub Jelinek <jakub@redhat.com>
8109
8110 PR c++/55742
8111 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8112
5af057d8
JM
81132013-01-18 Jason Merrill <jason@redhat.com>
8114
8115 PR target/54908
8116 * c.opt (-fextern-tls-init): New.
8117 * c-opts.c (c_common_post_options): Handle it.
8118
cc83c823
JJ
81192013-01-09 Jakub Jelinek <jakub@redhat.com>
8120
8121 PR c/48418
8122 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8123 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8124 and is either negative or bigger or equal to type precision
8125 of the first operand.
8126
a859517f
MP
81272012-12-03 Marek Polacek <polacek@redhat.com>
8128
8129 PR c/55570
8130 * c-common.c (check_user_alignment): Swap order of tests,
8131 check TREE_CODE first.
8132
2d7aa578
ESR
81332012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8134
8135 PR c++/52654
8136 * c-common.h (overflow_type): New enum.
8137 (build_userdef_literal): Add overflow_type argument.
8138 (tree_userdef_literal): Add overflow_type.
8139 (USERDEF_LITERAL_OVERFLOW): New access macro.
8140 * c-common.c (build_userdef_literal): Add overflow_type
8141 argument.
8142 * c-lex.c (c_lex_with_flags): Add overflow_type to
8143 build_userdef_literal calls.
8144 (interpret_integer, interpret_float): Add overflow_type argument.
8145
cc3c4f62
RB
81462012-11-28 Richard Biener <rguenther@suse.de>
8147
8148 PR c/35634
8149 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8150 here and use a type with proper overflow behavior for types that would
8151 need to be promoted for the arithmetic.
8152
77bc5132
JJ
81532012-11-23 Jakub Jelinek <jakub@redhat.com>
8154
8155 PR sanitizer/55435
8156 * c-common.c (handle_no_address_safety_analysis_attribute): New
8157 function.
8158 (c_common_attribute_table): Add no_address_safety_analysis.
8159
5dc99c46
SB
81602012-11-16 Simon Baldwin <simonb@google.com>
8161
8162 * c.opt: Add f[no-]canonical-system-headers.
8163 * c-opts.c (c_common_handle_option): Handle
8164 OPT_fcanonical_system_headers.
8165
a4a0016d
ESR
81662012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8167
8168 PR c++/54413
8169 * c-opts.c (c_common_handle_option): Set new flags.
8170 * c.opt: Describe new flags.
8171
7dbb85a7
JM
81722012-11-09 Jason Merrill <jason@redhat.com>
8173
8174 * c.opt (Wabi-tag): New.
8175
ad7bac31
AK
81762012-11-09 Andi Kleen <ak@linux.intel.com>
8177
8178 PR 55139
8179 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8180 MEMMODEL_MASK
ad7bac31 8181
7332899a
MLI
81822012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8183
8184 PR c/53063
8185 * c.opt (Wformat): Make it Alias Wformat=1.
8186 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8187 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8188 LangEnabledBy.
8189 (Wformat=): RejectNegative. Use LangEnabledBy.
8190 (Wnonnull): Use LangEnabledBy.
8191 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8192 * c-format.c (set_Wformat): Delete.
8193 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8194 (maybe_read_dollar_number): Likewise.
8195 (avoid_dollar_number): Likewise.
8196 (finish_dollar_format_checking): Likewise.
8197 (check_format_info): Likewise.
8198 (check_format_info_main): Likewise.
8199 (check_format_types): Likewise.
8200 (format_type_warning): Likewise.
8201 * c-common.c (int): Likewise.
8202 (check_function_sentinel): Likewise.
8e745a17 8203 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8204
34a180a6
MLI
82052012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8206
8207 PR c/53063
8208 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8209 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8210 Use LangEnabledBy.
8211 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8212 common.opt.
8213 (Wvariadic-macros): Init(1).
8214 * c-opts.c (c_common_handle_option): Do not handle them
8215 explicitly.
8216 (c_common_post_options): Likewise.
8217 (sanitize_cpp_opts): warn_unused_macros is now
8218 cpp_warn_unused_macros.
8219 (push_command_line_include): Likewise.
8220 * c-common.c (warn_unknown_pragmas): Do not define.
8221 * c-common.h (warn_unknown_pragmas): Do not declare.
8222
3f46d6a5
MLI
82232012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8224
8225 PR c/51294
8226 * c-common.c (conversion_warning): Handle conditional expressions.
8227
880661a4
JW
82282012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8229
8230 PR c++/54930
8231 * c.opt (Wreturn_local_addr): Define new option.
8232
4514a96b
JM
82332012-10-25 Jason Merrill <jason@redhat.com>
8234
f14edc1a
JM
8235 * c.opt (Wvirtual-move-assign): New.
8236
4514a96b
JM
8237 * c.opt (Winherited-variadic-ctor): New.
8238
93100c6b
MG
82392012-10-25 Marc Glisse <marc.glisse@inria.fr>
8240
8241 PR c++/54427
8242 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8243
1efcb8c6
JM
82442012-10-23 Joseph Myers <joseph@codesourcery.com>
8245
8246 * c-common.h (pch_cpp_save_state): Declare.
8247 * c-target.def (c_preinclude): New hook.
8248 * c-opts.c (done_preinclude): New.
8249 (push_command_line_include): Handle default preincluded header.
8250 (cb_file_change): Call pch_cpp_save_state when calling
8251 push_command_line_include.
8252 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8253 (pch_cpp_save_state): New.
8254 (pch_init): Call pch_cpp_save_state conditionally, instead of
8255 calling cpp_save_state.
8256
4a0ae68e
MLI
82572012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8258
8259 PR c/53063
8260 PR c/40989
8261 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8262 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8263 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8264 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8265 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8266 * c-opts.c (c_common_handle_option): Remove explicit handling from
8267 here.
8268 (c_common_post_options): Likewise.
8269
67e4210b
EB
82702012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8271
8272 * c-ada-spec.c (LOCATION_COL): Delete.
8273 (compare_location): New function.
8274 (compare_node): Use it.
8275 (compare_comment): Likewise.
8276
65d4f2cd
MLI
82772012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8278
8279 PR c/53063
8280 PR c/40989
8281 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8282 * c-opts.c (c_common_handle_option): Do not set them here. Add
8283 comment.
8284 (c_common_post_options): Likewise.
8285
909881cb
EB
82862012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8287
8288 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8289 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8290 Remove POINTER_TYPE handling, add large unsigned handling and use
8291 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8292
3a785c97
JJ
82932012-10-12 Jakub Jelinek <jakub@redhat.com>
8294
8295 PR c/54381
8296 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8297 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8298 locs and array of 3 trees instead of just single loc and single
8299 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8300 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8301 For *cmp* builtins that take two sources strings report warnings
8302 about first and second source, not about destination and source.
8303
5e54f81d
MG
83042012-10-12 Marc Glisse <marc.glisse@inria.fr>
8305
8306 PR c++/53055
8307 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8308
f5b02f1e
EB
83092012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8310
8311 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8312 declaring something coming from another file.
8313
b46dbc6c
AC
83142012-10-10 Arnaud Charlet <charlet@adacore.com>
8315
f5b02f1e 8316 PR ada/54845
b46dbc6c
AC
8317 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8318
5d9de0d0
PC
83192012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8320
8321 PR c++/54194
8322 * c-common.c (warn_about_parentheses): Add location_t parameter;
8323 use EXPR_LOC_OR_LOC.
8324 * c-common.h: Update declaration.
8325
a212e43f
MG
83262012-10-09 Marc Glisse <marc.glisse@inria.fr>
8327
8328 PR c++/54427
8329 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8330 more operations. Make error messages optional.
8331 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8332 (scalar_to_vector): Declare.
8333
b1db7f91
JM
83342012-10-08 Jason Merrill <jason@redhat.com>
8335
8336 * c-common.c (c_common_reswords): Add thread_local.
8337
e28d52cf
DS
83382012-10-08 Dodji Seketeli <dodji@redhat.com>
8339
8340 PR c++/53528 C++11 attribute support
8341 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8342 new functions.
8343 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8344 static function.
8345 (handle_aligned_attribute): In choose strictest alignment
8346 among many. Use new check_cxx_fundamental_alignment_constraints.
8347 (handle_transparent_union_attribute): In c++11 attribute syntax,
8348 don't look through typedefs.
8349
3b78de56
AC
83502012-10-04 Arnaud Charlet <charlet@adacore.com>
8351
8352 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8353 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8354 out of dumpfile.h.
8355
6040bb5f
DC
83562012-09-25 Dehao Chen <dehao@google.com>
8357
8358 PR middle-end/54645
3b78de56 8359 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8360 map when read in the pch.
8361
3f8257db 83622012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8363
8364 * c-ada-spec.c: Style fixes.
8365
3f8257db 83662012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8367
8368 * c.opt (-fada-spec-parent): Define new command line switch.
8369 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8370 is specified, generate binding spec as a child of the specified unit.
8371
0ccb505d
PC
83722012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8373 Manuel López-Ibáñez <manu@gcc.gnu.org>
8374
8375 PR c++/53210
8376 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8377
c583af79
AC
83782012-08-23 Arnaud Charlet <charlet@adacore.com>
8379
8380 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8381 for pointers, and add missing Convention C pragma.
8382 (print_ada_struct_decl): Add missing aliased keyword.
8383 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8384
1a4049e7
JJ
83852012-08-17 Jakub Jelinek <jakub@redhat.com>
8386
8387 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8388 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8389 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8390 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8391 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8392
70b5e7dc
RG
83932012-08-10 Richard Guenther <rguenther@suse.de>
8394
8395 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8396
f8923f7e
SB
83972012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8398
8399 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8400 instead of separate pp_newline and pp_flush.
8401 (print_c_tree): Likewise.
8402
e45abe1f
RH
84032012-07-26 Richard Henderson <rth@redhat.com>
8404
8405 * c-common.c (handle_hot_attribute): Allow labels.
8406 (handle_cold_attribute): Likewise.
8407
332f1d24
JJ
84082012-07-20 Jakub Jelinek <jakub@redhat.com>
8409
8410 PR c++/28656
8411 * c-common.c (check_function_nonnull): Handle multiple nonnull
8412 attributes properly.
8413
7ee2468b
SB
84142012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8415
8416 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8417 * c-ada-spec.c: Likewise.
8418 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8419
ee7b28eb
SB
84202012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8421
8422 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8423 Remove code conditional on it.
8424
6bdf3519
SB
84252012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8426
8427 * c-gimplify.c: Do not include basic-block.h.
8428 * c-common.c: Do not include linfuncs.h.
8429
532aafad
SB
84302012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8431
8432 * c-common.h: Include tree.h.
8433
8d0d1915
JM
84342012-07-02 Jason Merrill <jason@redhat.com>
8435
8436 PR c++/53524
8437 * c-common.c (get_priority): Call default_conversion.
8438
fbc873ad
UB
84392012-07-01 Uros Bizjak <ubizjak@gmail.com>
8440
8441 * c-pch.c (c_common_write_pch): Remove unused variables.
8442
d4a10d0a
SB
84432012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8444
8445 * cppspec.c: Moved from gcc/ to here.
8446
6f3a2e23
KT
84472012-06-27 Kai Tietz <ktietz@redhat.com>
8448
8449 PR preprocessor/37215
8450 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8451
8ca92d04
SB
84522012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8453
8454 * c-common.h (c_common_print_pch_checksum): Remove.
8455 * c-pch.c: Do not include output.h.
8456 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8457 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8458 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8459 (struct c_pch_header): Remove.
8460 (get_ident): Update gpch version.
8461 (pch_init): Do not print executable_checksum to asm_out_file.
8462 Do not fail if there is no asm_out_file to read back from. Set
8463 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8464 (c_common_write_pch): Verify that nothing was written to asm_out_file
8465 since pch_init was called. Do not write a c_pch_header, and do not
8466 copy from asm_out_file to the PCH.
8467 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8468 the content of asm_out_file from the PCH.
8469 (c_common_print_pch_checksum): Remove.
8470 * c-opts.c (c_common_init): Print out executable_checksum directly.
8471
70f42967
SB
84722012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8473
8474 * c-target.def (objc_declare_unresolved_class_reference,
8475 objc_declare_class_definition): Add new hooks.
8476
a8781821
SB
84772012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8478
8479 * c-lex.c: Do not include output.h.
8480 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8481 Remove uses of ASM_OUTPUT_IDENT.
8482
9e1a8dd1
RR
84832012-06-15 Marc Glisse <marc.glisse@inria.fr>
8484
8485 PR c++/51033
8486 * c-common.h (c_build_vec_perm_expr): Move decl here.
8487 * c-common.c (c_build_vec_perm_expr): Move definition
8488 here.
8489
6f07a821
SB
84902012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8491
8492 * c.opt (fconserve-space): Turn into a no-op.
8493
9faeb493 84942012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8495
8496 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8497 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8498 both the start and end of the function.
8499
a4b7d13c
SB
85002012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8501
8502 * c-common.c: Do not include output.h.
8503 * c-pragma.c: Likewise.
8504
c265f413
SA
85052012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8506
8507 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8508 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8509 (lang_decl_name): Handle namespace decls.
8510
be7a421e
SB
85112012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8512
8513 * c-ada-spec.c: Do not include output.h.
8514 * c-semantics.c: Likewise.
8515
65de6659
JM
85162012-05-29 Joseph Myers <joseph@codesourcery.com>
8517
8518 * c-common.c: Fix typo.
8519
ca5f4331
MM
85202012-05-29 Michael Matz <matz@suse.de>
8521
8522 * c-common.h (c_expand_decl): Remove prototype.
8523
4f7f7aca
MLI
85242012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8525
8526 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8527 * c-opts.c (c_common_handle_option): Remove code handling
8528 warn_missing_braces.
8529
4a792f9b
PC
85302012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8531
8532 PR c++/25137
8533 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8534 -Wmissing_braces.
8535
650dc14a
DS
85362012-05-22 Dodji Seketeli <dodji@redhat.com>
8537
8538 PR c++/53322
8539 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8540
9b095bf1
MLI
85412012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8542
8543 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8544 * c-opts.c (c_common_handle_option): Do not handle explicitly
8545 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8546
0b2c4be5
DS
85472012-05-16 Dodji Seketeli <dodji@redhat.com>
8548
8549 PR preprocessor/7263
ab20d992 8550 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8551 to cpp_classify_number. For diagnostics, use the precise location
8552 instead of the global input_location.
8553
a1bde5af
PC
85542012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8555
d02924ef 8556 PR c++/11856
a1bde5af
PC
8557 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8558
d1ede5f4
BS
85592012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8560
a1bde5af 8561 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8562
f2bc201f
MLI
85632012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8564
8565 PR 53063
8566 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8567 Wreorder): Use LangEnabledBy.
8568 * c-opts.c (c_common_handle_option): Do not enable them
8569 explicitly. Call lang-specific generated functions.
8570 (c_common_post_options): Do not set them here.
8571
95744782
MLI
85722012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8573
8574 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8575 Wmissing-field-initializers,Wmissing-parameter-type,
8576 Wold-style-declaration,Woverride-init): Use EnabledBy.
8577 * c-opts.c (c_common_post_options): Do not set here explicitly.
8578
7d5a5747
MLI
85792012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8580
8581 PR 53063
8582 * c-opts.c (c_common_handle_option): Use handle_generated_option
8583 to enable sub-options.
8584
5a3c9cf2
PC
85852012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8586
8587 PR c++/53158
8588 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8589
3ac8781c
RG
85902012-05-10 Richard Guenther <rguenther@suse.de>
8591
8592 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8593 adjust commentary about TYPE_IS_SIZETYPE types.
8594
1e537948
MLI
85952012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8596
8597 PR c++/53261
8598 * c-common.c (warn_logical_operator): Check that argument of
8599 integer_zerop is not NULL.
8600
f2c4a785
MLI
86012012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8602
8603 PR c/43772
8604 * c-common.c (warn_logical_operator): Do not warn if either side
8605 is already true or false.
8606
50f305ca
MLI
86072012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8608
8609 PR c/51712
8610 * c-common.c (expr_original_type): New.
8611 (shorten_compare): Do not warn for enumeration types.
8612
0c3641b0
MLI
86132012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8614
8615 * c.opt (fpermissive): Add Var(flag_permissive).
8616
7edaa4d2
MG
86172012-04-30 Marc Glisse <marc.glisse@inria.fr>
8618
8619 PR c++/51033
8620 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8621 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8622
b9c8da34
DS
86232012-04-30 Dodji Seketeli <dodji@redhat.com>
8624
8625 Add -Wvarargs option
ab20d992 8626 * c.opt (Wvarargs): Define new option.
b9c8da34 8627
e6c69da0
MLI
86282012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8629
8630 * c-common.c (check_function_arguments): Replace
8631 Wmissing-format-attribute with Wsuggest-attribute=format.
8632
90137d8f
MLI
86332012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8634
8635 * c.opt (Wsuggest-attribute=format): New. Alias of
8636 Wmissing-format-attribute.
8637 * c-format.c (decode_format_type): Replace
8638 Wmissing-format-attribute with Wsuggest-attribute=format.
8639 (check_function_format): Likewise.
8640
9faeb493 86412012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8642
8643 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8644 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8645 * c.opt: Add Wliteral-suffix.
8646
c1771a20
MLI
86472012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8648
8649 PR c/44774
8650 * c.opt (Wpedantic): New.
8651 (pedantic): Alias Wpedantic.
8652 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8653 (c_common_post_options): Likewise.
8654 (sanitize_cpp_opts): Likewise.
8655 * c-lex.c (interpret_float): Likewise.
8656 * c-format.c (check_format_types): Likewise.
8657 * c-common.c (pointer_int_sum): Likewise.
8658 (c_sizeof_or_alignof_type): Likewise.
8659 (c_add_case_label): Likewise.
8660 (c_do_switch_warnings): Likewise.
8661 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8662
04b391c1
JM
86632012-04-15 Jason Merrill <jason@redhat.com>
8664
8665 PR c++/52818
8666 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8667 (C_STD_NAME): Distinguish between C++98 and C++11.
8668
ac868f29
EB
86692012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8670
8671 PR target/52624
8672 * c-common.h (uint16_type_node): Rename into...
8673 (c_uint16_type_node): ...this.
8674 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8675 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8676
fd4116f4
MLI
86772012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8678
8679 * c-common.c (warn_if_unused_value): Move definition to here.
8680 * c-common.h (warn_if_unused_value): Move declaration to here.
8681
573ac65e
WB
86822012-03-23 William Bader <williambader@hotmail.com>
8683
8684 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8685
552b8185
JM
86862012-03-20 Jason Merrill <jason@redhat.com>
8687
8688 * c-common.h (enum cxx_dialect): Add cxx1y.
8689 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8690 test.
8691 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8692 * c-opts.c (c_common_post_options): Likewise.
8693 (set_std_cxx1y): New.
8694 (c_common_handle_option): Call it.
8695 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8696
04398fa8
PC
86972012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8698
8699 PR c++/14710
8700 * c.opt ([Wuseless-cast]): Add.
8701
d2a12ae7
RG
87022012-03-16 Richard Guenther <rguenther@suse.de>
8703
8704 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8705
a12bf402
MLI
87062012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8707
8708 PR c++/44783
8709 * c.opt (ftemplate-backtrace-limit) Add.
8710
5c30094f
RO
87112012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8712
8713 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8714 handling.
8715 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8716 (init_pragma): Don't register extern_prefix.
8717
21fa2faf
RG
87182012-03-12 Richard Guenther <rguenther@suse.de>
8719
8720 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8721 (builtin_type_for_size): Likewise.
8722
e3793c6f
JJ
87232012-02-13 Jakub Jelinek <jakub@redhat.com>
8724
8725 PR c++/52215
8726 * c-common.c (sync_resolve_params): Don't decide whether to convert
8727 or not based on TYPE_SIZE comparison, convert whenever arg_type
8728 is unsigned INTEGER_TYPE.
8729
93286335
PC
87302012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8731
8732 PR c/52118
8733 * c.opt ([Wunused-local-typedefs]): Fix description.
8734
7a421706
MS
87352012-01-24 Mike Stump <mikestump@comcast.net>
8736
8737 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8738 exactly.
8739
ba9b1f11
RG
87402012-01-18 Richard Guenther <rguenther@suse.de>
8741
8742 * c-opts.c (c_common_post_options): Reset LTO flags if
8743 we are about to generate a PCH.
8744
465406be
PC
87452012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8746
8747 PR c++/51777
8748 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8749 use pp_unsigned_wide_integer.
8750
aee15221
RG
87512012-01-10 Richard Guenther <rguenther@suse.de>
8752
8753 PR middle-end/51806
8754 * c-opts.c (c_common_handle_option): Move -Werror handling
8755 to language independent code.
8756
5720c0dc
RG
87572012-01-05 Richard Guenther <rguenther@suse.de>
8758
8759 PR middle-end/51764
8760 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8761 from common.opt.
8762
73ac190a
PC
87632011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8764
8765 PR c++/51316
8766 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8767 of array types with an unknown bound.
8768
48b0b196
JM
87692011-12-20 Joseph Myers <joseph@codesourcery.com>
8770
8771 * c-common.c (flag_isoc99): Update comment to refer to C11.
8772 (flag_isoc1x): Change to flag_isoc11.
8773 * c-common.h (flag_isoc99): Update comment to refer to C11.
8774 (flag_isoc1x): Change to flag_isoc11.
8775 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8776 C11.
8777 * c-opts.c (set_std_c1x): Change to set_std_c11.
8778 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8779 Call set_std_c11.
8780 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8781 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8782 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8783 standard.
8784 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8785 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8786 (std=gnu1x): Make alias of std=gnu11.
8787
d58d6eb5
JM
87882011-12-19 Jason Merrill <jason@redhat.com>
8789
8790 PR c++/51228
8791 * c-common.c (handle_transparent_union_attribute): Check the first
8792 field if the type is complete.
8793
b3908fcc
JW
87942011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8795
8796 PR libstdc++/51365
8797 * c-common.c (RID_IS_FINAL): Add.
8798 * c-common.h (RID_IS_FINAL): Add.
8799
fea3ca91
IS
88002011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8801
8802 * c.opt (fgnu-runtime): Provide full description.
8803 (fnext-runtime): Likewise.
8804 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8805
62bad7cd
AM
88062011-11-28 Andrew MacLeod <amacleod@redhat.com>
8807
8808 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8809 predefines in one place. Add LOCK_FREE predefines.
8810 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8811 new func.
8812
c466c4ff
AM
88132011-11-24 Andrew MacLeod <amacleod@redhat.com>
8814
8815 PR c/51256
9faeb493 8816 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8817 conditions
9faeb493
UB
8818 (resolve_overloaded_atomic_exchange,
8819 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8820 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8821 error_mark_node for error conditions.
9faeb493 8822
a5952633
RG
88232011-11-08 Richard Guenther <rguenther@suse.de>
8824
8825 PR middle-end/51010
ab20d992 8826 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 8827
0a35513e
AH
88282011-11-07 Richard Henderson <rth@redhat.com>
8829 Aldy Hernandez <aldyh@redhat.com>
8830 Torvald Riegel <triegel@redhat.com>
8831
8832 Merged from transactional-memory.
8833
8834 * c-common.c (handle_tm_wrap_attribute,
8835 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8836 (struct c_common_reswords): Added __transaction* keywords.
8837 (struct c_common_attribute_table): Added transaction* and tm_regparm
8838 attributes.
8839 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8840 masks.
8841 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8842 find_tm_attribute): Declare.
8843
6d87092d
JM
88442011-11-07 Jason Merrill <jason@redhat.com>
8845
8846 PR c++/35688
8847 * c-common.c, c-common.h: Revert yesterday's changes.
8848
8e7860a1
JM
88492011-11-06 Jason Merrill <jason@redhat.com>
8850
8851 PR c++/35688
8852 * c-common.c (decl_has_visibility_attr): Split out from...
8853 (c_determine_visibility): ...here.
8854 * c-common.h: Declare it.
8855
d19fa6b5
JM
88562011-11-06 Joseph Myers <joseph@codesourcery.com>
8857
8858 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8859 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8860 type.
8861 (check_user_alignment): New. Split out of
8862 handle_aligned_attribute. Disallow integer constants with
8863 noninteger types. Conditionally allow zero.
8864 (handle_aligned_attribute): Use check_user_alignment.
8865 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8866
86951993
AM
88672011-11-06 Andrew MacLeod <amacleod@redhat.com>
8868 Richard Henderson <rth@redhat.com>
8869
8870 Merged from cxx-mem-model.
8871
8872 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8873 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8874 parameters that are the same type size.
8875 (get_atomic_generic_size): New. Find size of generic
8876 atomic function parameters and do typechecking.
8877 (add_atomic_size_parameter): New. Insert size into parameter list.
8878 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8879 either __atomic_exchange_n or external library call.
9faeb493 8880 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8881 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8882 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8883 __atomic_load_n or an external library call.
8884 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8885 __atomic_store_n or an external library call.
8886 (resolve_overloaded_builtin): Handle new __atomic builtins.
8887
cf9e9959
EB
88882011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8889
8890 PR c++/50608
8891 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8892 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8893 <INDIRECT_REF>: Return the argument.
8894 <ARRAY_REF>: Remove special code for negative offset.
8895 Call fold_build_pointer_plus instead of size_binop.
8896 (fold_offsetof): Remove STOP_REF argument and adjust.
8897 * c-common.h (fold_offsetof_1): Declare.
8898 (fold_offsetof): Remove STOP_REF argument.
8899
25339f10
JM
89002011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8901
8902 PR c++/50810
8903 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8904 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8905 Wnarrowing for C++0x and C++98.
8906 * c.opt ([Wnarrowing]): Update.
8907
89401152
PC
89082011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8909
8910 PR c++/44277
8911 * c.opt: Add Wzero-as-null-pointer-constant.
8912
97e3ad20
JM
89132011-10-31 Jason Merrill <jason@redhat.com>
8914
15694fdd
JM
8915 * c.opt (-fdeduce-init-list): Off by default.
8916
97e3ad20
JM
8917 PR c++/50920
8918 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8919 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8920 and -Wc++11-compat.
8921 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8922
fb9120e3
RAV
89232011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8924
8925 PR c++/30066
8926 * c.opt (fvisibility-inlines-hidden): Description change.
8927
3ce4f9e4
ESR
89282011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8929
8930 Implement C++11 user-defined literals.
8931 * c-common.c (build_userdef_literal): New.
8932 * c-common.def: New tree code.
8933 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8934 * c-lex.c (interpret_float): Add suffix parm.
8935 (c_lex_with_flags): Build literal tokens.
8936
5f53c243
PC
89372011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8938
8939 PR c++/50841
8940 Revert:
8941 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8942
8943 PR c++/50810
8944 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8945 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8946 Wnarrowing for C++0x and C++98.
8947 * c.opt ([Wnarrowing]): Update.
8948
263734e1
PC
89492011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8950
8951 PR c++/50810
8952 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8953 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8954 Wnarrowing for C++0x and C++98.
8955 * c.opt ([Wnarrowing]): Update.
8956
d2e312d7
PC
89572011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8958
8959 PR c++/45385
8960 * c-common.c (conversion_warning): Remove code looking for
8961 artificial operands.
8962
d17687f6
DS
89632011-10-18 Dodji Seketeli <dodji@redhat.com>
8964
8965 PR bootstrap/50760
8966 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8967 !NO_IMPLICIT_EXTERN_C.
d17687f6 8968
fc8396e9
PC
89692011-10-17 Michael Spertus <mike_spertus@symantec.com>
8970
8971 * c-common.c (c_common_reswords): Add __bases,
8972 __direct_bases.
8973 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8974
89752011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8976
8977 PR c++/50757
8978 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8979
847e697a
TT
89802011-10-15 Tom Tromey <tromey@redhat.com>
8981 Dodji Seketeli <dodji@redhat.com>
8982
8983 * c.opt (fdebug-cpp): New option.
8984 * c-opts.c (c_common_handle_option): Handle the option.
8985 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8986 output stream in parameter. Factorized from ...
8987 (maybe_print_line): ... this. Dump location debug information when
8988 -fdebug-cpp is in effect.
8989 (print_line_1): New static function. Takes an output stream in
8990 parameter. Factorized from ...
8991 (print_line): ... here. Dump location information when -fdebug-cpp
8992 is in effect.
8993 (scan_translation_unit): Dump location information when
8994 -fdebug-cpp is in effect.
8995
92582b75
TT
89962011-10-15 Tom Tromey <tromey@redhat.com>
8997 Dodji Seketeli <dodji@redhat.com>
8998
8999 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9000 without argument.
9001 * c-opts.c (c_common_handle_option)<case
9002 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9003 cases. Handle -ftrack-macro-expansion with and without argument.
9004
46427374
TT
90052011-10-15 Tom Tromey <tromey@redhat.com>
9006 Dodji Seketeli <dodji@redhat.com>
9007
9008 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9009 (print_line, cb_define, do_line_change): Adjust to avoid touching
9010 the internals of struct line_map. Use the public API instead.
9011 * c-pch.c (c_common_read_pch): Likewise.
9012 * c-lex.c (fe_file_change): Likewise.
9013
fc8396e9
PC
90142011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9015
9016 PR c++/17212
9017 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9018
90192011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9020
9021 PR c++/33067
9022 * c-pretty-print.c (pp_c_floating_constant): Output
9023 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9024
e79983f4
MM
90252011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9026
9027 * c-common.c (def_builtin_1): Delete old interface with two
9028 parallel arrays to hold standard builtin declarations, and replace
9029 it with a function based interface that can support creating
9030 builtins on the fly in the future. Change all uses, and poison
9031 the old names. Make sure 0 is not a legitimate builtin index.
9032 * c-omp.c (c_finish_omp_barrier): Ditto.
9033 (c_finish_omp_taskwait): Ditto.
9034 (c_finish_omp_flush): Ditto.
9035
6637388f
TG
90362011-10-11 Tristan Gingold <gingold@adacore.com>
9037
9038 * c.opt: (fallow-parameterless-variadic-functions): New.
9039
3797cb21
DS
90402011-09-08 Dodji Seketeli <dodji@redhat.com>
9041
9042 PR c++/33255 - Support -Wunused-local-typedefs warning
9043 * c-common.h (struct c_language_function::local_typedefs): New
9044 field.
9faeb493
UB
9045 (record_locally_defined_typedef, maybe_record_typedef_use)
9046 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9047 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9048 (maybe_record_typedef_use)
9049 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9050 * c.opt: Declare new -Wunused-local-typedefs flag.
9051
693ddb1b
EB
90522011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9053
9054 PR middle-end/50266
9055 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9056 computations.
9057
830c740f
RG
90582011-09-05 Richard Guenther <rguenther@suse.de>
9059
9060 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9061 of integer_minus_one_node for empty array upper bounds.
9062
892a371f
DS
90632011-08-28 Dodji Seketeli <dodji@redhat.com>
9064
9065 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9066 it's the first time it's being called on this main TU.
9067
0e3fdb48
RB
90682011-08-24 Richard Guenther <rguenther@suse.de>
9069
9070 PR c/49396
9071 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9072
90732011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9074
9075 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9076 defined in cpp_init_builtins and c_cpp_builtins.
9077
d4a83c10
JM
90782011-08-19 Joseph Myers <joseph@codesourcery.com>
9079
9080 * c-common.c (c_common_reswords): Add __builtin_complex.
9081 * c-common.h (RID_BUILTIN_COMPLEX): New.
9082
bbceee64
JM
90832011-08-18 Joseph Myers <joseph@codesourcery.com>
9084
9085 * c-common.c (c_common_reswords): Add _Noreturn.
9086 (keyword_is_function_specifier): Handle RID_NORETURN.
9087 * c-common.h (RID_NORETURN): New.
9088
3f8257db 90892011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9090
9091 * c-common.c (unsafe_conversion_p): New function. Check if it is
9092 unsafe to convert an expression to the type.
9093 (conversion_warning): Adjust, use unsafe_conversion_p.
9094 * c-common.h (unsafe_conversion_p): New function declaration.
9095
20906c66
JJ
90962011-08-02 Jakub Jelinek <jakub@redhat.com>
9097
9098 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9099 (c_finish_omp_taskyield): New prototype.
9100 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9101 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9102 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9103 or RHS1 have side-effects, evaluate those too in the right spot,
9104 if it is a decl and LHS is also a decl, error out if they
9105 aren't the same.
9106 (c_finish_omp_taskyield): New function.
9107 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9108 * c-pragma.c (omp_pragmas): Add taskyield.
9109 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9110 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9111 PRAGMA_OMP_CLAUSE_MERGEABLE.
9112
770e5a2e
DS
91132011-07-25 Dodji Seketeli <dodji@redhat.com>
9114
9115 * c-common.h (set_underlying_type): Remove parm name from
9116 declaration.
9117
1baae426
RG
91182011-07-25 Romain Geissler <romain.geissler@gmail.com>
9119
9120 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9121
fcb21722
JM
91222011-07-22 Jason Merrill <jason@redhat.com>
9123
76f86d00
JM
9124 PR c++/49793
9125 * c.opt (Wnarrowing): New.
9126
3a636414
JM
9127 PR c++/30112
9128 * c-common.h: Declare c_linkage_bindings.
9129 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9130
fcb21722
JM
9131 PR c++/49813
9132 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9133 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9134 as flag_isoc99 for 'restrict'.
9135 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9136
02614448
ILT
91372011-07-21 Ian Lance Taylor <iant@google.com>
9138
9139 PR middle-end/49705
9140 * c-common.c (c_disable_warnings): New static function.
9141 (c_enable_warnings): New static function.
9142 (c_fully_fold_internal): Change local unused_p to bool. Call
9143 c_disable_warnings and c_enable_warnings rather than change
9144 c_inhibit_evaluation_warnings.
9145
34429675
JM
91462011-07-20 Jason Merrill <jason@redhat.com>
9147
9148 PR c++/6709 (DR 743)
9149 PR c++/42603 (DR 950)
9150 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9151 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9152 (CPP_DECLTYPE): New.
9153 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9154
5d49b6a7
RG
91552011-07-19 Richard Guenther <rguenther@suse.de>
9156
9157 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9158 * c-omp.c (c_finish_omp_for): Likewise.
9159
e84a58ff
EB
91602011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9161
9162 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9163 body on the next line.
9164
329af3c7
JM
91652011-07-08 Jason Merrill <jason@redhat.com>
9166
4063e61b
JM
9167 PR c++/45437
9168 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9169
329af3c7
JM
9170 PR c++/49673
9171 * c-common.c (c_apply_type_quals_to_decl): Don't check
9172 TYPE_NEEDS_CONSTRUCTING.
9173
1a072294
RG
91742011-07-06 Richard Guenther <rguenther@suse.de>
9175
9176 * c-common.c (c_common_nodes_and_builtins):
9177 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9178
fce5dddd
RG
91792011-07-05 Richard Guenther <rguenther@suse.de>
9180
9181 * c-common.c (c_common_nodes_and_builtins): Build all common
9182 tree nodes first.
9183
45d439ac
JJ
91842011-06-27 Jakub Jelinek <jakub@redhat.com>
9185
56300785
JJ
9186 * c-common.h (c_tree_chain_next): New static inline function.
9187
45d439ac
JJ
9188 * c-common.c (check_builtin_function_arguments): Handle
9189 BUILT_IN_ASSUME_ALIGNED.
9190
e0a8ecf2
AM
91912011-06-21 Andrew MacLeod <amacleod@redhat.com>
9192
9193 * c-common.c: Add sync_ or SYNC__ to builtin names.
9194 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9195
91962011-06-20 Pierre Vittet <piervit@pvittet.com>
9197
9198 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9199 handler.
9200 (gen_pragma_handler): New union.
9201 (internal_pragma_handler): New type.
9202 (c_register_pragma_with_data)
9203 (c_register_pragma_with_expansion_and_data): New functions.
9204
9205 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9206 (c_register_pragma, c_register_pragma_with_expansion)
9207 (c_invoke_pragma_handler): Changed to work with
9208 internal_pragma_handler.
9209 (c_register_pragma_with_data)
9210 (c_register_pragma_with_expansion_and_data): New functions.
9211
677f3fa8
JM
92122011-06-14 Joseph Myers <joseph@codesourcery.com>
9213
9214 * c-common.c: Include common/common-target.h.
9215 (handle_section_attribute): Use
9216 targetm_common.have_named_sections.
9217 * c-cppbuiltin.c: Include common/common-target.h.
9218 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9219
d7fc8c14
RG
92202011-06-10 Richard Guenther <rguenther@suse.de>
9221
9222 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9223 to print a IDENTIFIER_NODE.
9224
10e48e39
RO
92252011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9226 Joseph Myers <joseph@codesourcery.com>
9227
9228 * c.opt (fbuilding-libgcc): New option.
9229 * c-cppbuiltin.c (c_cpp_builtins): Define
9230 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9231
6976ae51
JM
92322011-06-07 Jason Merrill <jason@redhat.com>
9233
3ff60975
JM
9234 * c-common.c (max_tinst_depth): Lower default to 900.
9235
6976ae51
JM
9236 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9237
009db074
RG
92382011-06-07 Richard Guenther <rguenther@suse.de>
9239
9240 * c-common.c (c_common_nodes_and_builtins): Do not set
9241 size_type_node or call set_sizetype.
9242
b4592b92
DS
92432011-06-07 Dodji Seketeli <dodji@redhat.com>
9244
9245 PR debug/49130
9246 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9247 type when using pointer comparison to compare types.
b4592b92 9248
014ab419
JW
92492011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9250
9251 * c.opt: Add -Wdelete-non-virtual-dtor.
9252 * c-opts.c (c_common_handle_option): Include it in -Wall.
9253
4f60111f
NF
92542011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9255
9256 PR bootstrap/49190
9257
9258 Revert:
9259 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9260
9261 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9262 not tree_common.
9263
4cc4f2f4
JJ
92642011-05-27 Jakub Jelinek <jakub@redhat.com>
9265
9266 PR c++/49165
9267 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9268 C++ don't call c_common_truthvalue_conversion on void type arms.
9269
38e01f9e
NF
92702011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9271
9272 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9273 (stmt_list_stack): Define.
9274 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9275 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9276
92e948a8
NF
92772011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9278
9279 * c-common.c (warning_candidate_p): Check for BLOCKs.
9280
a2fc3e63
NF
92812011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9282
9283 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9284 not tree_common.
9285
0957c029
JJ
92862011-05-25 Jakub Jelinek <jakub@redhat.com>
9287
9288 * c-common.c (def_fn_type): Remove extra va_end.
9289
828fb3ba
JM
92902011-05-23 Jason Merrill <jason@redhat.com>
9291
9292 PR c++/48106
9293 * c-common.c (c_common_get_narrower): New.
9294 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9295
dde05067
NF
92962011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9297
9298 * c-common.h (check_function_arguments): Tweak prototype of
9299 check_function_arguments.
9300 * c-common.c (check_function_arguments): Likewise. Adjust
9301 calls to check_function_nonnull, check_function_format, and
9302 check_function_sentinel.
9303 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9304 separate attributes and typelist arguments. Use
9305 FOREACH_FUNCTION_ARGS to iterate over argument types.
9306
3c0d13bf
PC
93072011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9308
9309 * c-common.c (c_common_reswords): Reorder.
9310 * c-common.h (rid): Likewise.
9311
8242dd04
NF
93122011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9313
9314 * c-common.c (def_fn_type): Don't call build_function_type, call
9315 build_function_type_array or build_varargs_function_type_array
9316 instead.
9317 (c_common_nodes_and_builtins): Likewise.
9318
3d528853
NF
93192011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9320
9321 * c-common.c (c_add_case_label): Omit the loc argument to
9322 build_case_label.
9323 * c-common.h (build_case_label): Remove.
9324 * c-semantics.c (build_case_label): Remove.
9325
a04a722b
JM
93262011-05-05 Joseph Myers <joseph@codesourcery.com>
9327
9328 * c-objc.h (objc_start_method_definition): Update prototype.
9329 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9330
e19a18d4
NF
93312011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9332
9333 * c-common.c (check_main_parameter_types): Reindent. Don't use
9334 TYPE_ARG_TYPES directly.
9335 (handle_nonnull_attribute): Likewise.
9336 (sync_resolve_params): Likewise.
9337 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9338 to check_format_string.
9339 (handle_format_attribute): Likewise.
9340 (check_format_string): Take a function type to examine instead of
9341 a type list. Use a function_arg_iterator to step through argument
9342 types.
9343
c62c040f
RG
93442011-05-04 Richard Guenther <rguenther@suse.de>
9345
9346 * c-common.c (fix_string_type): Use size_int for index type bounds.
9347 (start_fname_decls): Do not pass NULL to build_int_cst.
9348 (c_init_attributes): Likewise.
9349 * c-lex.c (c_lex_with_flags): Likewise.
9350
c12ff9d8
JM
93512011-04-27 Jason Merrill <jason@redhat.com>
9352
9353 * c-common.c (make_tree_vector_from_list): New.
9354 * c-common.h: Declare it.
9355
304dfbe3
RG
93562011-04-26 Richard Guenther <rguenther@suse.de>
9357
9358 PR preprocessor/48248
9359 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9360 for output size with -P.
9361
3c0d13bf
PC
93622011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9363
9364 * c-common.c (struct c_common_resword): Add __underlying_type.
9365 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9366
04695783
JM
93672011-04-20 Jim Meyering <meyering@redhat.com>
9368
9369 * c-format.c (init_dollar_format_checking): Remove useless
9370 if-before-free.
9371
0dc33c3c
NP
93722011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9373
9374 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9375 (objc_detect_field_duplicates): New.
0dc33c3c 9376 * stub-objc.c: Likewise.
3c0d13bf 9377
c59633d9
NP
93782011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9379
9380 * stub-objc.c (objc_declare_protocols): Renamed to
9381 objc_declare_protocol.
9382 * c-objc.h: Likewise.
3c0d13bf 9383
32dabdaf
NP
93842011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9385
9386 * stub-objc.c (objc_declare_class): Updated argument name.
9387
81f653d6
NF
93882011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9389
9390 * c-common.h (c_common_init_ts): Declare.
9391 * c-common.c (c_common_init_ts): Define.
9392
eb345401
NP
93932011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9394
9395 * c-objc.h (objc_build_message_expr): Updated prototype.
9396 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9397
a358e188
MJ
93982011-04-12 Martin Jambor <mjambor@suse.cz>
9399
9400 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9401 of cgraph_node.
9402
e6313a78
RG
94032011-04-11 Richard Guenther <rguenther@suse.de>
9404
9405 * c-common.c (complete_array_type): Build a range type of
9406 proper type.
9407
dcf0c47e
NF
94082011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9409
9410 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9411 (handle_type_generic_attribute): Likewise.
9412
1ee44b26
JM
94132011-04-07 Jason Merrill <jason@redhat.com>
9414
9415 PR c++/48450
9416 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9417 conversion from C++0x scoped enum.
9418
acce4e77
JM
94192011-04-06 Joseph Myers <joseph@codesourcery.com>
9420
9421 * c-target-def.h: New file.
9422 * c-target.def: New file.
9423 * c-target.h: New file.
9424 * c-common.c (targetcm): Don't define here.
9425 * c-common.h (default_handle_c_option): Declare.
9426 * c-format.c: Include c-target.h instead of target.h.
9427 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9428 include tm.h.
9429 (default_handle_c_option): Move from targhooks.c.
9430
e2eefb55
JJ
94312011-03-29 Jakub Jelinek <jakub@redhat.com>
9432
9433 PR preprocessor/48248
9434 * c-ppoutput.c (print): Add src_file field.
9435 (init_pp_output): Initialize it.
9436 (maybe_print_line): Don't optimize by adding up to 8 newlines
9437 if map->to_file and print.src_file are different file.
9438 (print_line): Update print.src_file.
9439
ba78087b
KT
94402011-03-25 Kai Tietz <ktietz@redhat.com>
9441
9442 * c-ada-spec.c (compare_comment): Use filename_cmp
9443 instead of strcmp for filename.
9444
0edf1bb2
JL
94452011-03-25 Jeff Law <law@redhat.com>
9446
adfac8df 9447 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9448
c7dc8804
JM
94492011-03-25 Jason Merrill <jason@redhat.com>
9450
9451 * c.opt: Add -std=c++03.
9452
d1d879b1
EB
94532011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9454
9455 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9456
3f8257db 94572011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9458
9459 PR target/12171
5050afdf
KT
9460 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9461 Display allowed attributes for function pointer types.
9462 (pp_c_attributes_display): New function to display
9463 attributes having affects_type_identity flag set to true.
9464 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9465
62d784f7
KT
9466 * c-common.c (c_common_attribute_table):
9467 Add new element.
9468 (c_common_format_attribute_table): Likewise.
9469
82d37118
JM
94702011-03-18 Jason Merrill <jason@redhat.com>
9471
49a000c3
JM
9472 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9473 * c-common.h: Don't declare it here.
9474 * c-common.c: Or define it here.
9475 * c-opts.c (c_common_handle_option): Or set it here.
9476
82d37118
JM
9477 PR c++/35315
9478 * c-common.c (handle_transparent_union_attribute): Don't
9479 make a duplicate type in C++.
9480
17bc631c
JM
94812011-03-15 Jason Merrill <jason@redhat.com>
9482
9483 * c-common.c (max_constexpr_depth): New.
9484 * c-common.h: Declare it.
9485 * c-opts.c (c_common_handle_option): Set it.
9486 * c.opt (fconstexpr-depth): New option.
9487
1b9b91a6
JM
94882011-03-11 Jason Merrill <jason@redhat.com>
9489
f231b5ff
JM
9490 * c-common.c (attribute_takes_identifier_p): Add missing const.
9491
1b9b91a6
JM
9492 PR c++/46803
9493 * c-common.c (attribute_takes_identifier_p): Assume that an
9494 unknown attribute takes an identifier.
9495
a19e4d44
NF
94962011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9497
9498 PR c/47786
9499 * c-common.c (c_type_hash): Call list_length instead of iterating
9500 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9501
982d62f6
JJ
95022011-02-19 Jakub Jelinek <jakub@redhat.com>
9503
9504 PR c/47809
9505 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9506
0a256240
NP
95072011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9508
9509 * c.opt (fobjc-abi-version=) New.
9510 (fobjc-nilcheck): New.
9511
ba9e6dd5
NF
95122011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9513
9514 PR c++/46890
9515 * c-common.h (keyword_is_decl_specifier): Declare.
9516 * c-common.c (keyword_is_decl_specifier): Define.
9517 (keyword_is_function_specifier): New function.
9518
7273813a
JJ
95192011-01-26 Jakub Jelinek <jakub@redhat.com>
9520
9521 PR c/47473
9522 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9523 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9524 REAL_TYPE.
9525
908ef79b
AC
95262011-01-26 Arnaud Charlet <charlet@adacore.com>
9527
9528 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9529
237e9384
JJ
95302011-01-26 Jakub Jelinek <jakub@redhat.com>
9531
9532 PR pch/47430
9533 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9534 after init_c_lex if pch_file is set.
9535
47ea1edf
DK
95362011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9537
d4dba752 9538 PR c++/43601
47ea1edf
DK
9539 * c.opt (-fkeep-inline-dllexport): New switch.
9540
2aa9c6ae
RG
95412011-01-12 Richard Guenther <rguenther@suse.de>
9542
9543 PR middle-end/32511
9544 * c-common.c (handle_weak_attribute): Warn instead of error
9545 on declaring an inline function weak.
9546
7bd11157
TT
95472011-01-05 Tom Tromey <tromey@redhat.com>
9548
9549 * c-common.h (lvalue_error): Update.
9550 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9551 not error.
9552
0e66e494 95532010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9554
b4f588c4
NP
9555 PR objc/47075
9556 * c-objc.h (objc_finish_message_expr): Added argument to
9557 prototype.
9558
f4da8dce
NF
95592010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9560
9561 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9562 Use prototype_p.
9563
46270f14
NP
95642010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9565
9566 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9567 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9568
4816c593
NF
95692010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9570
9571 * c-common.h (readonly_error): Declare.
9572 * c-common.c (readonly_error): Define.
9573
7a6daeb0
NF
95742010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9575
9576 * c-common.h (invalid_indirection_error): Declare.
9577 * c-common.c (invalid_indirection_error): Define.
9578
892f6119
RG
95792010-12-03 Richard Guenther <rguenther@suse.de>
9580
9581 PR c/46745
9582 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9583 (pp_c_unary_expression): Likewise.
9584 (pp_c_expression): Likewise.
9585
6c39e757
NP
95862010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9587
9588 * c-common.h (objc_finish_function): New.
9589 (objc_non_volatilized_type): Removed.
9590 (objc_type_quals_match): Removed.
9591 * stub-objc.c (objc_finish_function): New.
9592 (objc_non_volatilized_type): Removed.
9593 (objc_type_quals_match): Removed.
9faeb493 9594
7c475d11
JM
95952010-11-30 Joseph Myers <joseph@codesourcery.com>
9596
9597 * c-common.h (parse_optimize_options): Declare.
9598 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9599 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9600
71f3e391
JM
96012010-11-29 Joseph Myers <joseph@codesourcery.com>
9602
9603 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9604 GET_ENVIRONMENT.
9605 * c-pch.c (O_BINARY): Don't define here.
9606 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9607
d5fabb58
JM
96082010-11-25 Joseph Myers <joseph@codesourcery.com>
9609
9610 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9611 targetm.except_unwind_info.
9612
299404a1
JM
96132010-11-23 Joseph Myers <joseph@codesourcery.com>
9614
9615 * c-opts.c (c_common_handle_option): Pass location to
9616 set_struct_debug_option.
9617
c98cd5bf
JM
96182010-11-23 Joseph Myers <joseph@codesourcery.com>
9619
9620 * c-common.c (visibility_options): Move from ../opts.c.
9621 * c-common.h (struct visibility_flags, visibility_options):
9622 Declare here.
9623 * c-opts.c (finish_options): Rename to c_finish_options.
9624 (c_common_init): Update call to finish_options.
9625
a9546771
NP
96262010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9627
9628 PR objc/34033
9629 * c-lex.c (lex_string): Check that each string in an Objective-C
9630 string concat sequence starts with either one or zero '@', and
9631 that there are no spurious '@' signs at the end.
9632
24a57808
JM
96332010-11-20 Joseph Myers <joseph@codesourcery.com>
9634
9635 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9636 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9637 HANDLE_PRAGMA_VISIBILITY.
9638 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9639 HANDLE_PRAGMA_VISIBILITY): Don't define.
9640 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9641
a9aa2c3a
NF
96422010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9643
9644 PR c++/16189
9645 PR c++/36888
9646 PR c++/45331
9647 * c-common.h (keyword_begins_type_specifier): Declare.
9648 (keyword_is_storage_class_specifier): Declare.
9649 (keyword_is_type_qualifier): Declare.
9650 * c-common.c (keyword_begins_type_specifier): New function.
9651 (keyword_is_storage_class_specifier): New function.
9652 (keyword_is_type_qualifier): Declare.
9653
5386338c
JM
96542010-11-19 Joseph Myers <joseph@codesourcery.com>
9655
9656 PR c/46547
9657 * c-common.c (in_late_binary_op): Define.
9658 (c_common_truthvalue_conversion): Check in_late_binary_op before
9659 calling c_save_expr.
9660 * c-common.h (in_late_binary_op): Declare.
9661
69ccdddb
JM
96622010-11-19 Joseph Myers <joseph@codesourcery.com>
9663
9664 * c-opts.c (c_common_handle_option): Update calls to
9665 set_struct_debug_option.
9666
6b192a09
NP
96672010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9668
9669 * c-common.h (objc_declare_protocols): Added additional argument.
9670 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9671
fb52b50a
NF
96722010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9673
9674 PR c/33193
9675 * c-common.h (build_real_imag_expr): Declare.
9676 * c-semantics.c (build_real_imag_expr): Define.
9677
b37421c6
JM
96782010-11-17 Joseph Myers <joseph@codesourcery.com>
9679
9680 * c-opts.c (c_common_parse_file): Take no arguments.
9681 * c-common.h (c_common_parse_file): Update prototype.
9682
07078664
JJ
96832010-11-16 Jakub Jelinek <jakub@redhat.com>
9684
9685 PR c++/46401
9686 * c-common.c (warning_candidate_p): Don't track non-const calls
9687 or STRING_CSTs.
9688
c6a13190
ILT
96892010-11-15 Ian Lance Taylor <iant@google.com>
9690
9691 * c-lex.c (init_c_lex): Set macro debug callbacks if
9692 flag_dump_go_spec is set.
9693
925e8657
NP
96942010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9695
9696 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9697 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9698
bb0a9581
NF
96992010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9700
9701 PR preprocessor/45038
9702 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9703 dialects.
9704
c5fa0890
JM
97052010-11-12 Joseph Myers <joseph@codesourcery.com>
9706
9707 * c-common.h (c_family_lang_mask): Declare.
9708 * c-opts.c (c_family_lang_mask): Make extern.
9709 * c-pragma.c (handle_pragma_diagnostic): Use
9710 control_warning_option.
9711
a4d8c676
JM
97122010-11-12 Joseph Myers <joseph@codesourcery.com>
9713
9714 * c-common.c (parse_optimize_options): Update call to
9715 decode_options.
9716 * c-common.h (c_common_handle_option): Update prototype.
9717 * c-opts.c (c_common_handle_option): Take location_t parameter and
9718 pass it to other functions.
9719
f954bd2c
JM
97202010-11-11 Joseph Myers <joseph@codesourcery.com>
9721
9722 * c-opts.c (warning_as_error_callback): Remove.
9723 (c_common_initialize_diagnostics): Don't call
9724 register_warning_as_error_callback.
9725 (c_common_handle_option): Handle -Werror=normalized= here.
9726
d8a07487
JM
97272010-11-10 Joseph Myers <joseph@codesourcery.com>
9728
9729 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9730 in diagnostic.
9731 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9732 letter.
9733 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9734 Remove trailing '.' from diagnostics.
9735 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9736
d5478783
JM
97372010-11-10 Joseph Myers <joseph@codesourcery.com>
9738
9739 * c-common.c (parse_optimize_options): Pass global_dc to
9740 decode_options.
9741 * c-opts.c (c_common_handle_option): Pass &global_options to
9742 set_Wstrict_aliasing.
9743 * c.opt (v): Don't mark Common or document here.
9744
91ebb981
IS
97452010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9746
9747 PR target/44981
9748 * c-format.c (format_type): New type gcc_objc_string_format_type.
9749 (valid_stringptr_type_p): New.
9750 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9751 (check_format_string): Pass expected type, use
91ebb981
IS
9752 valid_stringptr_type_p (), check that the format string types are
9753 consistent with the format specification.
9754 (decode_format_attr): Warn if NSString is used outside objective-c.
9755 (format_types_orig): Add NSString.
9756 (format_name): New.
9757 (format_flags): New.
9758 (check_format_arg): Handle format strings requiring an external parser.
9759 first_target_format_type: New variable.
9760 (handle_format_attribute): Set up first_target_format_type, pass the
9761 expected format arg string type to check_format_string().
ab20d992 9762 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
9763 * stub-objc.c (objc_string_ref_type_p): New.
9764 (objc_check_format_arg): New.
9765
bede2adc
NP
97662010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9767
9faeb493 9768 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9769 * c-common.h (objc_build_class_component_ref): New.
9770 * stub-objc.c (objc_build_class_component_ref): New.
9771
9a179d01
NP
97722010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9773
9774 * c.opt (Wproperty-assign-default): New option.
9775
22d8d616
NP
97762010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9777
9778 Implemented -fobjc-std=objc1 flag.
9779 * c.opt (fobjc-std=objc1): New option.
9780
2debdb4f
NP
97812010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9782
9783 Implemented format and noreturn attributes for Objective-C methods.
9784 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9785 attribute for Objective-C methods.
9786
ec52b111
JM
97872010-10-31 Jason Merrill <jason@redhat.com>
9788
9789 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9790 EXPR_LOC_OR_HERE.
9791
46a88c12
NP
97922010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9793
9794 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9795 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9796 (objc_add_property_declaration): Removed arguments for copies and
9797 ivar.
9798 (objc_build_getter_call): Renamed to
9799 objc_maybe_build_component_ref.
9800 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9801 (objc_is_property_ref): New.
9802 * c-common.c (c_common_reswords): Removed copies and ivar.
9803 * stub-objc.c (objc_add_property_declaration): Removed arguments
9804 for copies and ivar.
9805 (objc_build_getter_call): Renamed to
9806 objc_maybe_build_component_ref.
9807 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9808 (objc_is_property_ref): New.
9faeb493 9809
1e4bf85b
AC
98102010-10-29 Arnaud Charlet <charlet@adacore.com>
9811 Matthew Gingell <gingell@adacore.com>
9812
9813 * c-ada-spec.c (separate_class_package): New function.
9814 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9815 name of their enclosing package.
9816 (print_ada_declaration): Use separate_class_package.
9817
81f0bab2
JM
98182010-10-27 Jason Merrill <jason@redhat.com>
9819
2b08f2c5
JM
9820 * c-common.c (c_common_reswords): Add __is_literal_type.
9821 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9822
81f0bab2
JM
9823 * c-common.c (check_case_value): Remove special C++ code.
9824
200290f2
NP
98252010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9826
9827 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9828 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9829 and RID_LAST_PATTR.
9830 (objc_add_property_declaration): Added additional arguments.
9831 (objc_property_attribute_kind): Removed.
9832 (objc_set_property_attr): Removed.
9833 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9834 copy and nonatomic.
9835 * stub-objc.c (objc_add_property_declaration): Added additional
9836 arguments.
9837 (objc_set_property_attr): Removed.
9faeb493 9838
f614132b
NP
98392010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9840
9841 * c-common.h (objc_add_property_variable): Renamed to
9842 objc_add_property_declaration. Added location argument.
9843 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9844
b8a18805
NP
98452010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9846
9847 * c-common.h (objc_maybe_printable_name): New.
9848 * stub-objc.c (objc_maybe_printable_name): New.
9849
3f8257db
JJ
98502010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9851 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9852
9853 * c-common.h (c_common_mark_addressable_vec): Declare.
9854 * c-common.c (c_common_mark_addressable_vec): New function.
9855
249a82c4
NP
98562010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9857
9858 * c-common.h (objc_set_method_type): Removed.
9859 (objc_add_method_declaration): Added boolean argument.
9860 (objc_start_method_definition): Same change.
9861 (objc_build_method_signature): Same change.
9862 * stub-objc.c (objc_set_method_type): Removed.
9863 (objc_add_method_declaration): Added boolean argument.
9864 (objc_start_method_definition): Same change.
9865 (objc_build_method_signature): Same change.
9866
977e30bc
NP
98672010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9868
9869 * c-common.h (finish_file): Removed.
9870 (objc_write_global_declarations): New.
9871 * c-opts.c (c_common_parse_file): Do not call finish_file.
9872 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9873
da57d1b9
NP
98742010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9875
9876 Implemented parsing @synthesize and @dynamic for
9877 Objective-C/Objective-C++.
9878 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9879 (objc_add_synthesize_declaration): New.
9880 (objc_add_dynamic_declaration): New.
9881 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9882 * stub-objc.c (objc_add_synthesize_declaration): New.
9883 (objc_add_dynamic_declaration): New.
9faeb493 9884
0069111f
MM
98852010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9886
9887 PR target/46041
9888 * c-cppbuiltin.c (mode_has_fma): Move function here from
9889 builtins.c. Don't use the fma optab, instead just use the
9890 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9891 using -save-temps.
9892
e426b47b
NP
98932010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9894
9895 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9896
3f8257db 9897 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9898
9faeb493 9899 Radar 4330422
e426b47b
NP
9900 * c-common.h (objc_non_volatilized_type): New declaration
9901 * stub-objc.c (objc_non_volatilized_type): New stub.
9902
90fbfdc3
NP
99032010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9904
e426b47b 9905 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9906
ab20d992 9907 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9908
9faeb493 9909 Radar 4133425
90fbfdc3 9910 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9911 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9912
c37d8c30
IS
99132010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9914
9915 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9916 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9917 (objc_ivar_visibility_kind): New enum.
9918 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9919 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9920 visibility enum.
9921
1b1562a5
MM
99222010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9923
9924 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9925 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9926 has the appropriate fma builtins.
9927 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9928
668ea4b1
IS
99292010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9930
1b1562a5 9931 merge from FSF apple 'trunk' branch.
3f8257db 9932 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9933
668ea4b1
IS
9934 Radars 4436866, 4505126, 4506903, 4517826
9935 * c-common.c (c_common_resword): Define @property and its attributes.
9936 * c-common.h: Define property attribute enum entries.
9937 (OBJC_IS_PATTR_KEYWORD): New.
9938 (objc_property_attribute_kind): New enum.
9939 Declare objc_set_property_attr (), objc_add_property_variable (),
9940 objc_build_getter_call () and objc_build_setter_call ().
9941 * stub-objc.c (objc_set_property_attr): New stub.
9942 (objc_add_property_variable): Likewise.
9943 (objc_build_getter_call): Likewise.
9944 (objc_build_setter_call) Likewise.
1b1562a5 9945
a1178b30
IS
99462010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9947
1b1562a5 9948 merge from FSF apple 'trunk' branch.
ab20d992 9949 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9950
9951 Radar 3803157 (method attributes)
9952 * c-common.c (handle_deprecated_attribute): Recognize
9953 objc methods as valid declarations.
9954 * c-common.h: Declare objc_method_decl ().
1b1562a5 9955 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9956
a75bfaa6
JM
99572010-10-08 Joseph Myers <joseph@codesourcery.com>
9958
9959 * c-common.c (parse_optimize_options): Call
9960 decode_cmdline_options_to_array_default_mask before
9961 decode_options. Update arguments to decode_options.
9962 * c-common.h (c_common_init_options_struct): Declare.
9963 * c-opts.c (c_common_init_options_struct): New. Split out from
9964 c_common_init_options.
9965
f05b9d93
NP
99662010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9967
9968 Implemented fast enumeration for Objective-C.
9969 * c-common.h (objc_finish_foreach_loop): New.
9970 * stub-objc.c (objc_finish_foreach_loop): New.
9971
1ebe4b4f
JM
99722010-10-05 Joseph Myers <joseph@codesourcery.com>
9973
9974 * c-common.h (struct diagnostic_context): Don't declare here.
9975 (c_common_initialize_diagnostics): Declare using
9976 diagnostic_context typedef.
9977 * c-opts.c (c_common_handle_option): Pass global_dc to
9978 handle_generated_option.
9979
d4d24ba4
JM
99802010-10-04 Joseph Myers <joseph@codesourcery.com>
9981
9982 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9983 handle_generated_option.
9984
478a1c5b
ILT
99852010-10-03 Ian Lance Taylor <iant@google.com>
9986
9987 * c.opt (-fplan9-extensions): New option.
9988
82a1c2fe
FXC
99892010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9990
9991 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9992 Remove.
9993 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9994 of duplicating code.
9995
92902b1b
IS
99962010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9997
9998 * c-common.c: Add two new entries for @optional
9999 and @required keywords.
10000
10001 merge from FSF 'apple/trunk' branch.
3f8257db 10002 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10003
10004 Radar 4386773
10005 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10006 objective-c keywords.
10007 (objc_set_method_opt): New declaration.
10008 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10009
46625112
JM
100102010-09-30 Joseph Myers <joseph@codesourcery.com>
10011
10012 * c-common.c (handle_optimize_attribute): Pass &global_options to
10013 cl_optimization_save and cl_optimization_restore.
10014 * c-opts.c (c_common_handle_option): Pass &global_options to
10015 handle_generated_option.
10016 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10017 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10018 &global_options to cl_optimization_restore.
10019
49b91f05
NP
100202010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10021
10022 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10023 Objective-C/Objective-C++ keywords.
10024
13ed556f 100252010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10026
9faeb493
UB
10027 Merge from 'apple/trunk' branch on FSF servers.
10028
3f8257db 10029 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10030
10031 Radar 4281748
10032 * c-common.h (objc_check_global_decl): New declaration.
10033 * stub-objc.c (objc_check_global_decl): New stub.
10034
f0036cca
JM
100352010-09-29 Joseph Myers <joseph@codesourcery.com>
10036
10037 * c.opt: Don't use VarExists.
10038
e3339d0f
JM
100392010-09-29 Joseph Myers <joseph@codesourcery.com>
10040
10041 * c-common.c (c_cpp_error): Update names of diagnostic_context
10042 members.
10043 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10044 cl_optimization members.
10045 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10046 sanitize_cpp_opts, finish_options): Update names of cpp_options
10047 members.
10048
1973201f
NP
100492010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10050
10051 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10052 (objc_is_reserved_word): Removed.
10053 * c-common.c: Updated comments.
10054 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10055 objc_is_reserved_word.
10056 * stub-objc.c (objc_is_reserved_word): Removed.
10057
f7e71da5
IS
100582010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10059
9faeb493 10060 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10061 include attributes.
10062 (objc_start_method_definition): Likewise.
10063 (objc_build_keyword_decl): Likewise.
10064 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10065 (objc_start_method_definition): Likewise.
10066 (objc_build_keyword_decl): Likewise.
10067
c165dca7
IS
100682010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10069
10070 * c-common.h (objc_start_class_interface): Adjust prototype.
10071 (objc_start_category_interface): Likewise.
10072 (objc_start_protocol): Likewise.
10073 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10074 (objc_start_class_interface): Likewise.
10075 (objc_start_category_interface): Likewise.
10076
7458026b
ILT
100772010-09-27 Ian Lance Taylor <iant@google.com>
10078
10079 * c-common.c (c_common_attribute_table): Add no_split_stack.
10080 (handle_no_split_stack_attribute): New static function.
10081
b581b85b
NP
100822010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10083
9faeb493 10084 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10085
3f8257db 10086 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10087
9faeb493 10088 Radar 4229905
b581b85b
NP
10089 * c-common.h (objc_have_common_type): New declaration.
10090 * stub-objc.c (objc_have_common_type): New stub.
10091
10092 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10093
10094 Radar 4154928
10095 * c-common.h (objc_common_type): New prototype.
9faeb493 10096 * stub-objc.c (objc_common_type): New stub.
b581b85b 10097
46a4da10
JH
100982010-09-24 Jan Hubicka <jh@suse.cz>
10099
10100 * c-common.c (handle_leaf_attribute): New function.
10101 (struct attribute_spec c_common_att): Add leaf.
10102
e200444e
JM
101032010-09-22 Joseph Myers <joseph@codesourcery.com>
10104
10105 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10106 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10107 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10108 -include-barrier, -include-directory, -include-directory=,
10109 -include-directory-after, -include-directory-after=,
10110 -include-prefix, -include-prefix=, -include-with-prefix,
10111 -include-with-prefix=, -include-with-prefix-after,
10112 -include-with-prefix-after=, -include-with-prefix-before,
10113 -include-with-prefix-before=, -no-integrated-cpp,
10114 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10115 -output=, -pedantic, -pedantic-errors, -preprocess,
10116 -print-missing-file-dependencies, -trace-includes, -traditional,
10117 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10118 -user-dependencies, -verbose, -write-dependencies,
10119 -write-user-dependencies, no-integrated-cpp, traditional): New.
10120
29a80ea6
NP
101212010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10122
10123 PR objc/23710
ac1fc2fc
NP
10124 * c-common.h (objc_start_method_definition): Return bool instead
10125 of void.
10126 * stub-objc.c (objc_start_method_definition): Return bool instead
10127 of void.
10128
101292010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10130
10131 PR objc/25965
10132 * c-common.h (objc_get_interface_ivars): New declaration.
10133 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10134
de621752
ILT
101352010-09-15 Ian Lance Taylor <iant@google.com>
10136
10137 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10138 messages. Remove period at end of warning message.
de621752 10139
ba885ec5
NS
101402010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10141
10142 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10143 (handle_alias_attribute): ... here.
10144 (handle_ifunc_attribute): New.
10145
c5ee1358
MM
101462010-09-06 Mark Mitchell <mark@codesourcery.com>
10147
10148 * c-common.h (do_warn_double_promotion): Declare.
10149 * c-common.c (do_warn_double_promotion): Define.
10150
0a0b3574
MM
101512010-09-05 Mark Mitchell <mark@codesourcery.com>
10152
10153 * c.opt (Wdouble-promotion): New.
10154
d1779886
JM
101552010-09-02 Joseph Myers <joseph@codesourcery.com>
10156
10157 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10158 fvtable-thunks, fxref): Mark no longer supported in help text.
10159
2d2bd949
JM
101602010-09-02 Joseph Myers <joseph@codesourcery.com>
10161
10162 * c.opt (Wimport, fall-virtual, falt-external-templates,
10163 fdefault-inline, fenum-int-equiv, fexternal-templates,
10164 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10165 fname-mangling-version-, fnew-abi, fnonnull-objects,
10166 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10167 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10168 applicable.
10169 (fhandle-exceptions): Mark with Alias and Warn.
10170 * c-opts.c (c_common_handle_option): Don't handle options marked
10171 as ignored.
10172
5de8299c
JM
101732010-09-02 Joseph Myers <joseph@codesourcery.com>
10174
10175 * c.opt (Wcomments, Werror-implicit-function-declaration,
10176 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10177 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10178 aliases.
10179 * c-common.c (option_codes): Use OPT_Wcomment instead of
10180 OPT_Wcomments.
10181 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10182 Don't handle options marked as aliases.
10183
0ceb0201
RG
101842010-08-25 Richard Guenther <rguenther@suse.de>
10185
10186 * c-common.c (c_common_get_alias_set): Remove special
10187 handling for pointers.
10188
ac47786e
NF
101892010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10190
10191 * c-common.c: Use FOR_EACH_VEC_ELT.
10192 * c-gimplify.c: Likewise.
10193 * c-pragma.c: Likewise.
10194
c878765b
JM
101952010-08-16 Joseph Myers <joseph@codesourcery.com>
10196
10197 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10198 RejectDriver.
10199 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10200 RejectDriver.
10201 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10202 instead of OPT_MDX and OPT_MMDX.
10203
603349bf
JM
102042010-08-16 Joseph Myers <joseph@codesourcery.com>
10205
10206 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10207
644fa7ac
JM
102082010-08-12 Joseph Myers <joseph@codesourcery.com>
10209
10210 * c.opt (MD, MMD): Change to MDX and MMDX.
10211 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10212
481e1176
JM
102132010-08-11 Joseph Myers <joseph@codesourcery.com>
10214
10215 * c-opts.c (c_common_handle_option): Call handle_generated_option
10216 instead of handle_option.
10217
ac8dc9f7
NF
102182010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10219
10220 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10221 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10222
4f8c876d
NF
102232010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10224
10225 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10226 (pending_redefine_extname): Change type to a VEC.
10227 (add_to_renaming_pragma_list): Update for new type of
10228 pending_redefine_extname.
ac8dc9f7 10229 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10230
3b0c690e
AC
102312010-08-04 Arnaud Charlet <charlet@adacore.com>
10232
10233 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10234 visited.
10235 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10236 decide whether a type has already been declared/seen.
10237 Do not go to the original type.
10238 (dump_nested_types): New parameter forward.
10239 Generate forward declaration if needed and mark type as visited.
10240 (print_ada_declaration): Call dump_nested_types if not already done.
10241 Mark types as visited.
10242
1890bccc
JM
102432010-08-03 Joseph Myers <joseph@codesourcery.com>
10244
10245 * c.opt (-print-pch-checksum): Remove option.
10246 * c-opts.c (c_common_handle_option): Don't handle
10247 OPT_print_pch_checksum.
10248
5f20c657
JM
102492010-07-27 Joseph Myers <joseph@codesourcery.com>
10250
10251 * c-common.h (c_common_handle_option): Update prototype and return
10252 value type.
10253 * c-opts.c (c_common_handle_option): Update prototype and return
10254 value type. Update calls to handle_option and
10255 enable_warning_as_error.
10256
f551f80c
JJ
102572010-07-27 Jakub Jelinek <jakub@redhat.com>
10258
10259 PR c/45079
10260 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10261
61ff2bdc
JM
102622010-07-27 Joseph Myers <joseph@codesourcery.com>
10263
10264 * c-common.h (c_common_missing_argument): Remove.
10265 * c-opts.c (c_common_missing_argument): Remove.
10266 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10267 idirafter, imacros, include, isysroot, isystem, iquote): Add
10268 MissingArgError.
10269 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10270
7a9bf9a4
JM
102712010-07-27 Joseph Myers <joseph@codesourcery.com>
10272
10273 * c-common.h (c_common_option_lang_mask,
10274 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10275 New.
10276 (c_common_init_options): Update prototype.
10277 * c-opts.c (c_common_option_lang_mask): New.
10278 (c_common_initialize_diagnostics): Split out of
10279 c_common_init_options.
10280 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10281 New.
10282 (c_common_init_options): Update prototype. Use decoded options in
10283 search for -lang-asm.
10284
910ad8de
NF
102852010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10286
10287 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10288 * c-format.c: Likewise.
10289
718f9c0f
MLI
102902010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10291
10292 * c-common.h: Include diagnostic-core.h. Error if already
10293 included.
10294 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10295
4d451982
MLI
102962010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10297
adfac8df 10298 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10299 Do not include expr.h
10300 (vector_mode_valid_p): Move here.
10301
119fe915
SB
103022010-06-21 DJ Delorie <dj@redhat.com>
10303
10304 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10305 allow these pragmas anywhere.
10306
103072010-06-14 Jakub Jelinek <jakub@redhat.com>
10308
10309 PR bootstrap/44509
10310 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10311 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10312 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10313 ggc_strdup instead of xstrdup.
10314
103152010-06-10 Jakub Jelinek <jakub@redhat.com>
10316
10317 * c-cppbuiltin.c: Include cpp-id-data.h.
10318 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10319 (lazy_hex_fp_value): New function.
10320 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10321
6662d794
MLI
103222010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10323
10324 * c-gimplify.c: Do not include tree-flow.h
10325
38f8b050
JR
103262010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10327
10328 PR other/44034
10329 * c-common.c: Rename targetm member:
10330 targetm.enum_va_list -> targetm.enum_va_list_p
10331
9589f23e
AS
103322010-06-28 Anatoly Sokolov <aesok@post.ru>
10333
10334 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10335
3b06d379
SB
103362010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10337
10338 * c-cppbuiltin.c: Do not include except.h.
10339
d166d4c3
AK
103402010-06-24 Andi Kleen <ak@linux.intel.com>
10341
9faeb493
UB
10342 * c-common.c (warn_for_omitted_condop): New.
10343 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10344
70cb8be6
JM
103452010-06-21 Joseph Myers <joseph@codesourcery.com>
10346
10347 * c.opt (lang-objc): Remove.
10348 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10349
a4c97feb
JR
103502010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10351
10352 * c-opts.c: Include "tm_p.h".
10353
6e2f1956
JM
103542010-06-20 Joseph Myers <joseph@codesourcery.com>
10355
10356 * c-common.c (parse_optimize_options): Update call to
10357 decode_options.
10358
bc87224e
NF
103592010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10360
10361 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10362 new type of types_used_by_cur_var_decl.
10363
b49cf425
JR
103642010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10365
10366 PR bootstrap/44512
10367 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10368 for C++ standard compliance.
10369
59f9c2ed
JM
103702010-06-16 Jason Merrill <jason@redhat.com>
10371
10372 * c.opt: Add -Wnoexcept.
10373
33766b66
RG
103742010-06-16 Richard Guenther <rguenther@suse.de>
10375
10376 PR c/44555
10377 * c-common.c (c_common_truthvalue_conversion): Remove
10378 premature and wrong optimization concering ADDR_EXPRs.
10379
eff7e30c
AC
103802010-06-15 Arnaud Charlet <charlet@adacore.com>
10381
10382 * c-ada-spec.c (dump_sloc): Remove column info.
10383 (is_simple_enum): New function.
10384 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10385 enum types when relevant.
10386
6312e84d
MLI
103872010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10388
9faeb493 10389 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10390 location.
10391
1cb42611
JM
103922010-06-10 Joseph Myers <joseph@codesourcery.com>
10393
10394 * c-opts.c (c_common_handle_option): Don't handle
10395 OPT_fshow_column.
10396
a9429e29
LB
103972010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10398
10399 * c-pragma.c (push_alignment): Use typed GC allocation.
10400 (handle_pragma_push_options): Likewise.
10401
10402 * c-common.c (parse_optimize_options): Likewise.
10403
10404 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10405 option.
10406
5498f011
JM
104072010-06-07 Joseph Myers <joseph@codesourcery.com>
10408
10409 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10410 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10411 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10412 flag_signed_bitfields, warn_strict_null_sentinel,
10413 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10414 flag_gen_declaration, flag_no_gnu_keywords,
10415 flag_implement_inlines, flag_implicit_templates,
10416 flag_implicit_inline_templates, flag_optional_diags,
10417 flag_elide_constructors, flag_default_inline, flag_rtti,
10418 flag_conserve_space, flag_access_control, flag_check_new,
10419 flag_new_for_scope, flag_weak, flag_working_directory,
10420 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10421 flag_enforce_eh_specs, flag_threadsafe_statics,
10422 flag_pretty_templates): Remove.
10423 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10424 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10425 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10426 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10427 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10428 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10429 flag_no_gnu_keywords, flag_implement_inlines,
10430 flag_implicit_templates, flag_implicit_inline_templates,
10431 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10432 flag_rtti, flag_conserve_space, flag_access_control,
10433 flag_check_new, flag_new_for_scope, flag_weak,
10434 flag_working_directory, flag_use_cxa_atexit,
10435 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10436 flag_threadsafe_statics, flag_pretty_templates,
10437 warn_strict_null_sentinel): Remove.
10438 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10439 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10440 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10441 fimplicit-inline-templates, fimplicit-templates,
10442 flax-vector-conversions, fms-extensions, fnil-receivers,
10443 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10444 frtti, fshort-double, fshort-enums, fshort-wchar,
10445 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10446 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10447 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10448 gen-decls, undef): Use Var.
10449 (fdefault-inline, foptional-diags): Document as doing nothing.
10450 * c-opts.c (c_common_handle_option): Remove cases for options now
10451 using Var. Mark ignored options as such.
10452
39dabefd
SB
104532010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10454
9faeb493 10455 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10456 * c-common.def: Likewise.
10457 * c-common.h: Likewise.
10458 * c-cppbuiltin.c: Likewise.
10459 * c-dump.c: Likewise.
10460 * c-format.c: Likewise.
10461 * c-format.h : Likewise.
10462 * c-gimplify.c: Likewise.
10463 * c-lex.c: Likewise.
10464 * c-omp.c: Likewise.
10465 * c.opt: Likewise.
10466 * c-opts.c: Likewise.
10467 * c-pch.c: Likewise.
10468 * c-ppoutput.c: Likewise.
10469 * c-pragma.c: Likewise.
10470 * c-pragma.h: Likewise.
10471 * c-pretty-print.c: Likewise.
10472 * c-pretty-print.h: Likewise.
10473 * c-semantics.c: Likewise.
10474 * stub-objc.c: Likewise.
10475
10476 * c-common.c: Include gt-c-family-c-common.h.
10477 * c-pragma.c: Include gt-c-family-c-pragma.h.
10478\f
a5544970 10479Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10480
10481Copying and distribution of this file, with or without modification,
10482are permitted in any medium without royalty provided the copyright
10483notice and this notice are preserved.
This page took 3.836482 seconds and 5 git commands to generate.