]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Update copyright years.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
8d9254fc
JJ
12020-01-01 Jakub Jelinek <jakub@redhat.com>
2
3 Update copyright years.
4
39292e25
EB
52019-12-20 Eric Botcazou <ebotcazou@adacore.com>
6
7 * c-ada-spec.h (decl_sloc): Delete.
8 * c-ada-spec.c (decl_sloc): Make static.
9
519d7496
JB
102019-12-19 Julian Brown <julian@codesourcery.com>
11
12 * c-common.h (c_omp_map_clause_name): Add prototype.
13 * c-omp.c (c_omp_map_clause_name): New function.
14 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
15 PRAGMA_OACC_CLAUSE_DETACH.
16
a6163563
JB
172019-12-19 Julian Brown <julian@codesourcery.com>
18 Maciej W. Rozycki <macro@codesourcery.com>
19 Tobias Burnus <tobias@codesourcery.com>
20 Thomas Schwinge <thomas@codesourcery.com>
21
22 * c-pragma.h (pragma_omp_clause): Add
23 PRAGMA_OACC_CLAUSE_NO_CREATE.
24
e8f1ade2
MS
252019-12-17 Martin Sebor <msebor@redhat.com>
26
27 PR c++/61339
28 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
29
368877a1
DM
302019-12-11 David Malcolm <dmalcolm@redhat.com>
31
32 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
33 implementation.
34 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
35
d68f5d45
DM
362019-12-09 David Malcolm <dmalcolm@redhat.com>
37
38 * c-format.c (range_label_for_format_type_mismatch::get_text):
39 Replace label_text ctor called with true with label_text::take.
40
d3e28653
DM
412019-12-09 David Malcolm <dmalcolm@redhat.com>
42
43 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
44 initial newline from expected outputs.
45 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
46 call to diagnostic_show_locus.
47
abd6d8cc
JJ
482019-12-06 Jakub Jelinek <jakub@redhat.com>
49
50 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
51 now.
52
7906797e
MP
532019-12-05 Marek Polacek <polacek@redhat.com>
54 Jakub Jelinek <jakub@redhat.com>
55
56 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
57 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
58
5c04da88
MP
592019-12-05 Marek Polacek <polacek@redhat.com>
60
61 PR c++/92271 - make __is_same alias for __is_same_as.
62 * c-common.c: Add __is_same, an alias for __is_same_as.
63
43aae289
MP
642019-12-03 Marek Polacek <polacek@redhat.com>
65
66 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
67 * c-cppbuiltin.c (c_cpp_builtins): Predefine
68 __cpp_aggregate_paren_init=201902 for -std=c++2a.
69
d7ddfbcb
JH
702019-11-30 Jan Hubicka <hubicka@ucw.cz>
71
72 * c-attribs.c (handle_symver_attribute): New function
73 (c_common_attributes): Add symver.
74
65ef05d0
RS
752019-11-30 Richard Sandiford <richard.sandiford@arm.com>
76
77 * c-common.c (pointer_int_sum): Use verify_type_context to check
78 whether the target allows pointer arithmetic for the types involved.
79 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
80 to check whether the target allows sizeof and alignof operations
81 for the types involved.
82
1a291106
JM
832019-11-27 Jason Merrill <jason@redhat.com>
84
85 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
86
05d6cb1a
JJ
872019-11-26 Jakub Jelinek <jakub@redhat.com>
88
89 PR c++/61414
90 * c-attribs.c (handle_mode_attribute): Add mode attribute to
91 ENUMERAL_TYPEs.
92
5b8d9367
JM
932019-11-25 Joseph Myers <joseph@codesourcery.com>
94
95 PR c/91985
96 * c-common.c (c_common_type_for_mode): Handle decimal
97 floating-point types being NULL_TREE.
98 * c-format.c (get_format_for_type_1): Handle specified types being
99 NULL_TREE.
100 * c-lex.c (interpret_float): Give an error for decimal
101 floating-point constants when decimal floating-point not
102 supported.
103
1fbf51cb
JJ
1042019-11-23 Jakub Jelinek <jakub@redhat.com>
105
106 PR middle-end/83859
107 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
108 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
109 group warning with inform together.
110 (handle_access_attribute): Formatting fix.
111
761df906
JJ
1122019-11-22 Jakub Jelinek <jakub@redhat.com>
113
bdaf8be1
JJ
114 PR c/90677
115 * c-common.h (identifier_global_tag): Declare.
116 * c-format.c (get_pointer_to_named_type): Renamed to ...
117 (get_named_type): ... this. Use identifier_global_tag instead of
118 identifier_global_value, handle the return value being a TYPE_P.
119 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
120 to call get_named_type instead. Formatting fixes.
121
c2ecce6d 122 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
123 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
124 and __cpp_generic_lambdas for -std=c++2a. Define
125 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
126 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
127 __cpp_concepts for -std=c++2a.
128
54aa6b58
MS
1292019-11-22 Martin Sebor <msebor@redhat.com>
130
131 PR middle-end/83859
132 * c-attribs.c (handle_access_attribute): New function.
133 (c_common_attribute_table): Add new attribute.
134 (get_argument_type): New function.
135 (append_access_attrs): New function.
136 (get_nonnull_operand): Rename...
137 (get_attribute_operand): ...to this.
138 * c-common.c (get_nonnull_operand): Rename...
139 (get_attribute_operand): ...to this.
140
6c80b1b5
JM
1412019-11-21 Joseph Myers <joseph@codesourcery.com>
142
143 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
144 of warning.
145
192961ff
JM
1462019-11-19 Joseph Myers <joseph@codesourcery.com>
147
148 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
149 warning for standard attributes mixed with fallthrough attributes.
150
f8aea5e3
JM
1512019-11-15 Joseph Myers <joseph@codesourcery.com>
152
153 * c-attribs.c (handle_fallthrough_attribute): Remove static.
154 * c-common.h (handle_fallthrough_attribute): Declare.
155
2cc94aa8
JM
1562019-11-15 Joseph Myers <joseph@codesourcery.com>
157
158 * c-attribs.c (handle_deprecated_attribute): Remove static.
159 * c-common.h (handle_deprecated_attribute): Declare.
160
7c5890cc
JM
1612019-11-14 Joseph Myers <joseph@codesourcery.com>
162
163 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
164 char for C.
165
b2417b59
JJ
1662019-11-14 Jakub Jelinek <jakub@redhat.com>
167
d0ec7c93
JJ
168 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
169 valid vendors.
170
b2417b59
JJ
171 * c-omp.c (c_omp_check_context_selector): Handle name lists
172 containing string literals. Don't diagnose atomic_default_mem_order
173 with multiple props.
174
00be2a5f
JM
1752019-11-13 Joseph Myers <joseph@codesourcery.com>
176
177 * c-cppbuiltin.c (builtin_define_float_constants): Also define
178 NORM_MAX constants. Update call to get_max_float.
179 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
180 constants.
181
2dbad62d
EB
1822019-11-13 Eric Botcazou <ebotcazou@adacore.com>
183
184 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
185 (dump_forward_type): Do not generate a declaration for function types.
186 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
187 of the component type if it is declared in another file.
188
6ed76044
ML
1892019-11-12 Martin Liska <mliska@suse.cz>
190
191 * c-opts.c (c_common_post_options):
192 Use SET_OPTION_IF_UNSET.
193
62aee289
MR
1942019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
195 Frederik Harwath <frederik@codesourcery.com>
196
197 gcc/c-family/
198 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
199 constant.
200 * c-pragma.c (oacc_pragmas): Add "serial" entry.
201
f486280c
RS
2022019-11-08 Richard Sandiford <richard.sandiford@arm.com>
203
204 * c-common.h (gnu_vector_type_p): New function.
205 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
206 vectors to satisfy gnu_vector_type_p.
207 (c_build_vec_convert): Likewise __builtin_convertvector.
208 (convert_vector_to_array_for_subscript): Likewise when applying
209 implicit vector to array conversion.
210 (scalar_to_vector): Likewise when converting vector-scalar
211 operations to vector-vector operations.
212
017c6491
JM
2132019-11-08 Joseph Myers <joseph@codesourcery.com>
214
215 * c.opt (Wold-style-definition): Initialize to -1.
216 * c-opts.c (c_common_post_options): Set warn_old_style_definition
217 to flag_isoc2x if not set explicitly.
218
c01bd174
JM
2192019-11-07 Joseph Myers <joseph@codesourcery.com>
220
221 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
222
0df65305
JM
2232019-11-05 Jason Merrill <jason@redhat.com>
224
225 * c-opts.c (c_common_post_options): -fconcepts-ts implies
226 -fconcepts.
227
e0c866dd
KK
2282019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
229
230 * c-opts.c (c_common_post_options): Update
231 latest_abi_version.
232
f968ef9b
JJ
2332019-11-02 Jakub Jelinek <jakub@redhat.com>
234
d0c464d2
JJ
235 * c-common.h (c_omp_get_context_selector): Remove.
236 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
237 and renamed to omp_get_context_selector.
238
917dd789
JJ
239 * c-omp.c (c_omp_mark_declare_variant): Use
240 omp_context_selector_set_compare.
241
f968ef9b
JJ
242 PR c++/88335 - Implement P1073R3: Immediate functions
243 * c-common.h (enum rid): Add RID_CONSTEVAL.
244 * c-common.c (c_common_reswords): Add consteval.
245
5f6705b7
JJ
2462019-11-01 Martin Sebor <msebor@redhat.com>
247
248 PR middle-end/91679
249 PR middle-end/91647
250 PR middle-end/91463
251 PR middle-end/92312
252 * c-pretty-print.c (direct_abstract_declarator): Print
253 bound in zero-length arrays.
254 * c.opt (-Wzero-length-bounds): New option.
255
43f1814c
NS
2562019-10-30 Nathan Sidwell <nathan@acm.org>
257
258 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
259 macros.
260
ad1539d5
MS
2612019-10-28 Martin Sebor <msebor@redhat.com>
262
263 PR c/66970
264 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
265 even when only preprocessing.
266 * c-common.h (names_builtin_p): Declare new function.
267 * c-lex.c (init_c_lex): Set has_builtin.
268 (c_common_has_builtin): Define a new function.
269 * c-ppoutput.c (init_pp_output): Set has_builtin.
270
135df52c
JJ
2712019-10-24 Jakub Jelinek <jakub@redhat.com>
272
273 * c-common.h (c_omp_context_selector_matches): Remove.
274 * c-omp.c (c_omp_context_selector_matches): Remove.
275 * c-attribs.c (c_common_attribute_table): Add
276 "omp declare target {host,nohost,block}" attributes.
277
8ad0c477
JM
2782019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
279
280 * c-lex.c (c_common_has_attribute): Update nodiscard value.
281
56898e43
RS
2822019-10-14 Richard Sandiford <richard.sandiford@arm.com>
283
284 * c-common.h (user_facing_original_type_p): Declare.
285 * c-common.c: Include c-spellcheck.h.
286 (user_facing_original_type_p): New function.
287
20de9568
JJ
2882019-10-12 Jakub Jelinek <jakub@redhat.com>
289
290 * c-common.h (c_omp_mark_declare_variant,
291 c_omp_context_selector_matches): Declare.
292 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
293 and hsa-common.h.
294 (c_omp_get_context_selector): Support second argument NULL.
295 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
296 functions.
297 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
298 attribute, add "omp declare variant base" and
299 "omp declare variant variant" attributes.
300
175a85b2
JM
3012019-10-11 Joseph Myers <joseph@codesourcery.com>
302
303 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
304 CppReason(CPP_W_C11_C2X_COMPAT).
305
fe2bc27c
JM
3062019-10-11 Joseph Myers <joseph@codesourcery.com>
307
308 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
309 _Decimal64 and _Decimal128.
310
27dfdc0f
JM
3112019-10-10 Joseph Myers <joseph@codesourcery.com>
312
313 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
314 types if DFP not supported.
315
94e7f906
JJ
3162019-10-10 Jakub Jelinek <jakub@redhat.com>
317
318 * c-common.h (c_omp_check_context_selector,
319 c_omp_get_context_selector): Declare.
320 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
321 in diagnostic message.
322 (c_omp_check_context_selector, c_omp_get_context_selector): New
323 functions.
324 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
325 attribute.
326 (handle_omp_declare_variant_attribute): New function.
327
a7160771
MS
3282019-10-09 Martin Sebor <msebor@redhat.com>
329
330 PR tree-optimization/90879
331 * c.opt (-Wstring-compare): New option.
332
cb57504a
JM
3332019-10-08 Andrew Sutton <asutton@lock3software.com>
334 Jason Merrill <jason@redhat.com>
335
336 Update the concepts implementation to conform to the C++20
337 specification, improve compile times, and generally clean up
338 the implementation.
339
340 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
341 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
342 * c.opt: Add -Wconcepts-ts.
343 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
344 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
345 (set_std_cxx2a): Enable concepts by default.
346
fbb2a6dc
JM
3472019-10-08 Joseph Myers <joseph@codesourcery.com>
348
349 * c-opts.c (c_common_post_options): Set
350 -fno-fp-int-builtin-inexact for C2X.
351
8e007055
JJ
3522019-10-05 Jakub Jelinek <jakub@redhat.com>
353
354 PR c++/91369 - Implement P0784R7: constexpr new
355 * c-cppbuiltin.c (c_cpp_builtins): Predefine
356 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
357
843f104d
JM
3582019-10-04 Joseph Myers <joseph@codesourcery.com>
359
360 PR c/82752
361 * c-format.c (C_STD_VER): Handle C2x.
362 (C_STD_NAME): Likewise.
363 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
364 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
365 modifier allowed and 'p' flag.
366 * c-format.h (enum format_std_version): Add STD_C2X.
367 (struct format_char_info): Mention 'p' in comment on flags2.
368
e9c9a142
DM
3692019-10-01 David Malcolm <dmalcolm@redhat.com>
370
371 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
372 calling diagnostic_show_locus, rather than destroying it afterwards.
373
7552c36a
JJ
3742019-10-01 Jakub Jelinek <jakub@redhat.com>
375
376 PR c++/91925
377 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
378 with NULL DECL_FIELD_OFFSET.
379
8209db25
RS
3802019-10-01 Richard Sandiford <richard.sandiford@arm.com>
381
382 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
383 has a type name, use it in preference to the __vector syntax.
384
9343bf99
RS
3852019-09-30 Richard Sandiford <richard.sandiford@arm.com>
386
387 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
388 two spaces between a comma and "...".
389
59bc434a
JJ
3902019-09-27 Jakub Jelinek <jakub@redhat.com>
391
392 PR c++/88203
393 * c-common.h (c_omp_predefined_variable): Declare.
394 * c-omp.c (c_omp_predefined_variable): New function.
395 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
396 for predefined variables.
397
c6447c20
RS
3982019-09-27 Richard Sandiford <richard.sandiford@arm.com>
399
400 * c-common.h (build_function_call_vec): Take the original
401 function decl as an optional final parameter.
402 (check_builtin_function_arguments): Take the original function decl.
403 * c-common.c (check_builtin_function_arguments): Likewise.
404 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
405 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
406
c4438114
JM
4072019-09-15 Jason Merrill <jason@redhat.com>
408
409 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
410 fold_for_warn in "|| mask" warning.
411
68a57628
ML
4122019-09-10 Martin Liska <mliska@suse.cz>
413
414 * c.opt: Use newly added WarnRemoved.
415
f48ef52e
ML
4162019-09-09 Martin Liska <mliska@suse.cz>
417
418 * c.opt: Update comment of removed
419 options that are preserved only for backward
420 compatibility.
421
67f6e649
ML
4222019-09-06 Martin Liska <mliska@suse.cz>
423
424 PR c++/91125
425 * c-common.c: Remove definition of flag_use_repository.
426 * c-common.h: Likewise.
427 * c-opts.c (c_common_handle_option):
428 Do not handle OPT_frepo option.
429 * c.opt: Mark the option with Deprecated.
430
db9d2274
MP
4312019-09-04 Marek Polacek <polacek@redhat.com>
432
433 * c.opt (fdeduce-init-list): Ignored.
434
68e2c199
PK
4352019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
436
437 PR c/78736
438 * c.opt (Wenum-conversion): New option.
439
7a4418a5
JL
4402019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
441
442 * c-attribs.c (handle_section_attribute): Call the
443 handle_generic_attribute target hook after performing target
444 independent processing.
445 (handle_noinit_attribute): Likewise.
446
5f76ab15
ILT
4472019-09-03 Ian Lance Taylor <iant@golang.org>
448
449 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
450 when using -fgo-dump-spec.
451
ae0d3f6a
ML
4522019-09-02 Martin Liska <mliska@suse.cz>
453
454 PR c++/91155
455 * c-common.c (fname_as_string): Use cxx_printable_name for
456 __PRETTY_FUNCTION__ same as was used before r265711.
457
8a902edb
MP
4582019-08-28 Marek Polacek <polacek@redhat.com>
459
460 Implement P1152R4: Deprecating some uses of volatile.
461 PR c++/91361
462 * c-opts.c (c_common_post_options): Enable -Wvolatile by
463 default for C++2a, unless -Wno-deprecated.
464 * c.opt (Wvolatile): New warning.
465
4742dbe7
MP
4662019-08-28 Marek Polacek <polacek@redhat.com>
467
468 PR c++/91360 - Implement C++20 P1143R2: constinit.
469 * c-common.c (c_common_reswords): Add constinit and __constinit.
470 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
471 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
472 RID_LAST_CXX20.
473 (D_CXX20): Define.
474 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
475 * c-format.c (cxx_keywords): Add "constinit".
476 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
477
6a074892
JJ
4782019-08-27 Jakub Jelinek <jakub@redhat.com>
479
480 PR c++/91415
481 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
482 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
483 like COMPOUND_EXPR rather than normal expression.
484
22f8849d
IS
4852019-08-23 Iain Sandoe <iain@sandoe.co.uk>
486
487 PR pch/61250
488 * c-lex.c (c_lex_with_flags): Don't call
489 c_common_no_more_pch () from here.
490
df375b03
JJ
4912019-08-23 Jakub Jelinek <jakub@redhat.com>
492
493 PR middle-end/91283
494 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
495 instead of flag_excess_precision_cmdline.
496 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
497 * c-opts.c (c_common_post_options): Likewise.
498
14b7950f
MS
4992019-08-22 Martin Sebor <msebor@redhat.com>
500
501 PR middle-end/91490
502 * c-common.c (braced_list_to_string): Add argument and overload.
503 Handle flexible length arrays and unions.
504
8bb2ee59
EB
5052019-08-21 Eric Botcazou <ebotcazou@adacore.com>
506
507 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
508 function declarations where arguments are missing. Rename variables.
509
21c1e205
RB
5102019-08-15 Richard Biener <rguenther@suse.de>
511
512 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
513 enabled, define __SIZETYPE__.
514
f0033821
CL
5152019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
516
517 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
518 exclusion with "section" attribute.
519 (attr_noinit_exclusions): New table.
520 (handle_noinit_attribute): New function.
521
4d732405
RS
5222019-08-13 Richard Sandiford <richard.sandiford@arm.com>
523
524 PR middle-end/91421
525 * c-common.c (resolve_overloaded_builtin): Use
526 copy_decl_built_in_function.
527
51ad8481
MS
5282019-08-13 Martin Sebor <msebor@redhat.com>
529
530 PR c/80619
531 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
532 (asm_fprintf_length_spec): Same.
533 * c-format.h (format_lengths): Add FMT_LEN_w.
534
77eb117f
JJ
5352019-08-10 Jakub Jelinek <jakub@redhat.com>
536
537 * c-pragma.h (enum pragma_omp_clause): Add
538 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
539
398e3feb
JJ
5402019-08-07 Jakub Jelinek <jakub@redhat.com>
541
542 * c-pragma.h (enum pragma_omp_clause): Add
543 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
544 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
545 enumeration value.
546
ab574db6
MP
5472019-08-05 Marek Polacek <polacek@redhat.com>
548
549 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
550 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
551 default for C++2a, unless -Wno-deprecated.
552 * c.opt (Wcomma-subscript): New warning.
553
554a530f
JJ
5542019-07-20 Jakub Jelinek <jakub@redhat.com>
555
556 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
557 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
558 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
559 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
560 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
561 constructs with the loop construct.
562
1a888209
JJ
5632019-07-13 Jakub Jelinek <jakub@redhat.com>
564
565 PR c/91149
566 * c-omp.c (c_omp_split_clauses): Fix a pasto in
567 OMP_CLAUSE_REDUCTION_TASK handling.
568
1fdd6f04
JJ
5692019-07-12 Jakub Jelinek <jakub@redhat.com>
570
571 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
572 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
573
99b1c316
MS
5742019-07-09 Martin Sebor <msebor@redhat.com>
575
576 PR c++/61339
1fdd6f04 577 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
578 and others to class.
579 * c-pretty-print.h: Same.
580
6c1dae73
MS
5812019-07-09 Martin Sebor <msebor@redhat.com>
582
583 PR c++/61339
584 * c-format.c (check_argument_type): Change class-key from class to
585 struct and vice versa to match convention and avoid -Wclass-is-pod
586 and -Wstruct-no-pod.
587 * c-pretty-print.h: Same.
588
8ba6ea87
ML
5892019-07-03 Martin Liska <mliska@suse.cz>
590
591 * c-common.c (try_to_locate_new_include_insertion_point): Remove
592 dead assignemts.
593
83eb9522
JJ
5942019-07-03 Jakub Jelinek <jakub@redhat.com>
595
596 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
597 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
598 with OMP_PARALLEL.
599
1c6ffbab
QZ
6002019-07-02 qing zhao <qing.zhao@oracle.com>
601
602 PR preprocessor/90581
603 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
604 * c.opt: Add new option -fmax-include-depth.
605
7ffc7de5
JM
6062019-06-26 Jason Merrill <jason@redhat.com>
607
608 PR c++/55442 - memory-hog with highly recursive constexpr.
609 * c.opt (fconstexpr-loop-limit): New.
610
361af3e4
JJ
6112019-06-25 Jakub Jelinek <jakub@redhat.com>
612
613 PR sanitizer/90954
614 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
615 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
616
ab20d992
JJ
6172019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
618
619 * c-common.c (c_common_nodes_and_builtins): Define
620 alternate "__intN__" name for "__intN" types.
621
f4af4019
JH
6222019-06-24 Jan Hubicka <jh@suse.cz>
623
624 * c-common.c (braced_lists_to_strings): Check that
625 type is array or integer prior checking string flag.
626
da9e9b57
MB
6272019-06-21 Matthew Beliveau <mbelivea@redhat.com>
628
629 PR c++/90875 - added -Wswitch-outside-range option
630 * c.opt (Wswitch-outside-range): Added new option.
631 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
632
3f3d6a6f
MP
6332019-06-21 Marek Polacek <polacek@redhat.com>
634
635 PR c++/90953 - ICE with -Wmissing-format-attribute.
636 * c-common.c (check_function_arguments_recurse): Use
637 get_attribute_name.
638 (check_missing_format_attribute): Likewise.
639
1bf32c11
MP
6402019-06-19 Marek Polacek <polacek@redhat.com>
641
642 PR c++/60364 - noreturn after first decl not diagnosed.
643 * c-attribs.c (handle_noreturn_attribute): No longer static.
644 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
645 Declare.
646 * c-format.c (check_function_format): Use get_attribute_name.
647
a04c0734
MS
6482019-06-19 Martin Sebor <msebor@redhat.com>
649
650 PR translation/90156
651 * c-format.c (function_format_info::format_type): Adjust type.
652 (function_format_info::is_raw): New member.
653 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
654 (decode_format_attr): Adjust call to decode_format_type.
655 Avoid a redundant call to convert_format_name_to_system_name.
656 Avoid abbreviating the word "arguments" in a diagnostic.
657 (format_warning_substr): New function.
658 (avoid_dollar_number): Quote dollar sign in a diagnostic.
659 (finish_dollar_format_checking): Same.
660 (check_format_info): Same.
661 (struct baltoks_t): New.
662 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
663 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
664 functions.
665 (check_format_info_main): Call check_plain. Use baltoks_t. Call
666 maybe_diag_unbalanced_tokens.
667 (handle_format_attribute): Spell out the word "arguments" in
668 a diagnostic.
669
d3786ebb
MB
6702019-06-11 Matthew Beliveau <mbelivea@redhat.com>
671
672 PR c++/90449 - add -Winaccessible-base option.
673 * c.opt (Winaccessible-base): New option.
674
bf38f7e9
JJ
6752019-06-10 Jakub Jelinek <jakub@redhat.com>
676
677 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
678 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
679 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
680 combined/composite constructs where it is not allowed. Copy over
681 OMP_CLAUSE_REDUCTION_INSCAN.
682
0ecf545c
MS
6832019-06-05 Martin Sebor <msebor@redhat.com>
684
685 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
686 (handle_alias_ifunc_attribute): Same.
687 (handle_copy_attribute): Same.
688 (handle_weakref_attribute): Same.
689 (handle_nonnull_attribute): Same.
690 * c-warn.c (warn_for_sign_compare): Same.
691 (warn_for_restrict): Same.
692 * c.opt: Same.
693
36b34127
MS
6942019-06-05 Martin Sebor <msebor@redhat.com>
695
696 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
697 * c.opt (-Wformat-diag): Remove a spurious period.
698
357a352f
JJ
6992019-05-29 Jakub Jelinek <jakub@redhat.com>
700
701 PR c/90628
702 * c-common.c (check_builtin_function_arguments)
703 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
704 as last argument.
705
2b8235ea
EB
7062019-05-23 Eric Botcazou <ebotcazou@adacore.com>
707
708 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
709
6d86ddc4
ML
7102019-05-22 Martin Liska <mliska@suse.cz>
711
712 PR lto/90500
713 * c-attribs.c (handle_copy_attribute): Do not copy
714 target_clones attribute.
715
419ba5b9
EB
7162019-05-21 Eric Botcazou <ebotcazou@adacore.com>
717
718 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
719 * c-ada-spec.c (print_assignment_operator): New function.
720 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
721 assignment operators declared as methods and filter out the others.
722
e03436e7
TS
7232019-05-17 Thomas Schwinge <thomas@codesourcery.com>
724
725 PR c/89433
726 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
727 "omp declare target".
728
a9c697b8
MS
7292019-05-16 Martin Sebor <msebor@redhat.com>
730
ab20d992
JJ
731 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
732 keywords, operators, and types in diagnostics.
733 (handle_scalar_storage_order_attribute): Same.
734 (handle_mode_attribute): Same.
735 (handle_visibility_attribute): Same.
736 (handle_assume_aligned_attribute): Same.
737 (handle_no_split_stack_attribute): Same.
738 * c-common.c (shorten_compare): Same.
739 (c_common_truthvalue_conversion): Same.
740 (cb_get_source_date_epoch): Same.
741 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
742 in diagnostics.
743 (interpret_float): Same.
744 * c-omp.c (c_finish_omp_for): Same.
745 * c-opts.c (c_common_post_options): Same.
746 * c-pch.c (c_common_pch_pragma): Same.
747 * c-pragma.c (pop_alignment): Same.
748 (handle_pragma_pack): Same.
749 (apply_pragma_weak): Same.
750 (handle_pragma_weak): Same.
751 (handle_pragma_scalar_storage_order): Same.
752 (handle_pragma_redefine_extname): Same.
753 (add_to_renaming_pragma_list): Same.
754 (maybe_apply_renaming_pragma): Same.
755 (push_visibility): Same.
756 (handle_pragma_visibility): Same.
757 (handle_pragma_optimize): Same.
758 (handle_pragma_message): Same.
759 * c-warn.c (warn_for_omitted_condop): Same.
760 (lvalue_error): Same.
a9c697b8 761
6b943512
RB
7622019-05-15 Richard Biener <rguenther@suse.de>
763
764 PR c/90474
765 * c-common.c (c_common_mark_addressable_vec): Also mark
766 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
767 c_mark_addressable.
ab20d992 768
b744fc85
NS
7692019-05-06 Nathan Sidwell <nathan@acm.org>
770
771 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
772
598f50d7
NS
7732019-04-30 Nathan Sidwell <nathan@acm.org>
774
775 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
776
5bcc5a3b
ML
7772019-04-30 Martin Liska <mliska@suse.cz>
778
779 * c-pragma.c (handle_pragma_diagnostic): Provide hints
780 for unknown options.
781
e78a87f7
RS
7822019-04-26 Richard Sandiford <richard.sandiford@arm.com>
783
784 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
785 the pointer target rather than the pointer itself.
786
c280b7ee
JJ
7872019-04-19 Jakub Jelinek <jakub@redhat.com>
788
789 PR c/89888
790 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
791 arguments.
792 (c_do_switch_warnings): Remove outside_range_p argument.
793 * c-common.c (check_case_bounds): Removed.
794 (c_add_case_label): Remove orig_type and outside_range_p arguments.
795 Don't call check_case_bounds. Fold low_value as well as high_value.
796 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
797 Check for case labels outside of range of original type here and
798 adjust them.
799
8e8225e6
JJ
8002019-04-12 Jakub Jelinek <jakub@redhat.com>
801
63b8a166
JJ
802 PR translation/90041
803 * c.opt (-fhandle-exceptions): Use %< and %> around option names
804 in the Warn diagnostics.
805
8e8225e6
JJ
806 PR c/89946
807 * c-attribs.c (handle_patchable_function_entry_attribute): Add
808 function comment. Warn if arguments of the attribute are not positive
809 integer constants.
810
53a3f614
EB
8112019-04-09 Eric Botcazou <ebotcazou@adacore.com>
812
813 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
814 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
815
22be5873
EB
8162019-04-07 Eric Botcazou <ebotcazou@adacore.com>
817
818 * c-ada-spec.c (is_float128): New predicate extracted from...
819 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
820 <REAL_TYPE>: ...here. Call it.
821
34facf20
DM
8222019-04-05 David Malcolm <dmalcolm@redhat.com>
823
824 PR c/89985
825 * c-warn.c (check_address_or_pointer_of_packed_member): Add
826 auto_diagnostic_group. Guard inform calls by result of
827 warning_at call.
828
05564120
MP
8292019-04-05 Marek Polacek <polacek@redhat.com>
830
ab20d992 831 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
832 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
833 of RHS.
834
7a506c3c
JM
8352019-04-03 Jason Merrill <jason@redhat.com>
836
837 PR c++/86586 - -fcompare-debug=-Wsign-compare.
838 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
839
ddeae8c8
MS
8402019-04-01 Martin Sebor <msebor@redhat.com>
841
842 PR c/89685
843 * c-attribs.c (handle_copy_attribute): Handle references and
844 non-constant expressions.
845
a15ffa22
JJ
8462019-03-22 Jakub Jelinek <jakub@redhat.com>
847
848 PR c++/87481
849 * c.opt (-fconstexpr-ops-limit=): New option.
850
36a3a7a3
JJ
8512019-03-21 Jakub Jelinek <jakub@redhat.com>
852
853 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
854 template param.
855
bec1da64
MS
8562019-03-19 Martin Sebor <msebor@redhat.com>
857
858 PR tree-optimization/89688
859 * c-common.c (braced_list_to_string): Make static.
860 (braced_lists_to_strings): Define new function.
861 * c-common.h (braced_list_to_string): Remove.
862 (braced_lists_to_strings): Declare.
863
1fe61adf
ML
8642019-03-12 Martin Liska <mliska@suse.cz>
865
866 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
867
93964ebd
ML
8682019-03-11 Martin Liska <mliska@suse.cz>
869
870 * c-opts.c (c_common_post_options): Wrap apostrophes
871 in gcc internal format with %'.
872
a3f9f006
ML
8732019-03-11 Martin Liska <mliska@suse.cz>
874
875 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
876 in a string format message and fix GNU coding style.
877 * c-common.c (vector_types_convertible_p): Likewise.
878 (c_build_vec_perm_expr): Likewise.
879 * c-indentation.c (get_visual_column): Likewise.
880 * c-opts.c (c_common_handle_option): Likewise.
881 (c_common_post_options): Likewise.
882 (sanitize_cpp_opts): Likewise.
883 * c-pch.c (c_common_pch_pragma): Likewise.
884 * c-pragma.c (handle_pragma_pack): Likewise.
885
1db01ff9
JJ
8862019-03-08 Jakub Jelinek <jakub@redhat.com>
887
888 PR tree-optimization/89550
889 * c-common.c (c_common_truthvalue_conversion): Only set
890 TREE_NO_WARNING if warning_at returned true.
891 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
892
ba790e6f
JJ
8932019-02-25 Sandra Loosemore <sandra@codesourcery.com>
894 Martin Sebor <msebor@gmail.com>
895
896 * c.opt (Wmissing-attributes): Clean up doc string.
897
7da73ba7
JJ
8982019-02-25 Jakub Jelinek <jakub@redhat.com>
899
900 PR c/89495
901 * c-format.c (maybe_read_dollar_number): Compute nargnum in
902 HOST_WIDE_INT type to avoid overflows and change overflow_flag
903 checking.
904
921bb9d1
RB
9052019-02-22 Richard Biener <rguenther@suse.de>
906
907 * c-pch.c (no_checksum): Remove.
908 (pch_init): Remove assertion that executable_checksum is not
909 all zero.
910 (c_common_valid_pch): Likewise.
911
e2ebb05c
MS
9122019-02-18 Martin Sebor <msebor@redhat.com>
913
914 PR middle-end/89294
915 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
916
3fe53000
DM
9172019-02-16 David Malcolm <dmalcolm@redhat.com>
918
919 PR c++/88680
920 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
921 implementing -Wtype-limits.
922
28a8cef1
MS
9232019-02-11 Martin Sebor <msebor@redhat.com>
924
925 PR c++/87996
926 * c-common.c (invalid_array_size_error): New function.
927 (valid_array_size_p): Call it. Handle size as well as type.
928 * c-common.h (valid_constant_size_p): New function.
929 (enum cst_size_error): New type.
930
ec2be203
DM
9312019-01-31 David Malcolm <dmalcolm@redhat.com>
932
933 PR c/89122
934 * known-headers.cc (get_stdlib_header_for_name): Add
935 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
936
8936f047
JJ
9372019-01-31 Jakub Jelinek <jakub@redhat.com>
938
939 PR libstdc++/88170
940 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
941 a C cast in pp_c_flag_gnu_v3 mode.
942
6a335b96
JJ
9432019-01-29 Jakub Jelinek <jakub@redhat.com>
944
945 PR c/86125
946 * c-common.c (c_common_nodes_and_builtins): Build type variants for
947 builtin_structptr_types types even for C.
948
2a06eba5
BE
9492019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
950
951 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
952 when rhs is of array type correctly. Fix handling of nested structures.
953 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
954 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
955 type casts within nested compound expressions.
956
18a23298
JJ
9572019-01-22 Jakub Jelinek <jakub@redhat.com>
958
959 PR middle-end/88968
960 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
961 variable after using BIT_FIELD_REF.
962
420183d9
L
9632019-01-18 H.J. Lu <hongjiu.lu@intel.com>
964
965 PR c/51628
966 PR c/88664
967 * c-common.h (warn_for_address_or_pointer_of_packed_member):
968 Remove the boolean argument.
969 * c-warn.c (check_address_of_packed_member): Renamed to ...
970 (check_address_or_pointer_of_packed_member): This. Also
971 warn pointer conversion.
972 (check_and_warn_address_of_packed_member): Renamed to ...
973 (check_and_warn_address_or_pointer_of_packed_member): This.
974 Also warn pointer conversion.
975 (warn_for_address_or_pointer_of_packed_member): Remove the
976 boolean argument. Don't check pointer conversion here.
977
99063eee
RS
9782019-01-15 Richard Sandiford <richard.sandiford@arm.com>
979
980 PR inline-asm/52813
981 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
982
a30d0196
JJ
9832019-01-14 Jakub Jelinek <jakub@redhat.com>
984
985 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
986 and __cpp_nontype_template_parameter_auto. Add a comment that
987 __cpp_template_auto is deprecated.
988
2d91f79d
TH
9892019-01-14 Tom Honermann <tom@honermann.net>
990
991 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
992 * c-common.c (c_common_reswords): Add char8_t.
993 (fix_string_type): Use char8_t for the type of u8 string literals.
994 (c_common_get_alias_set): char8_t doesn't alias.
995 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
996 C++.
997 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
998 (keyword_begins_type_specifier): Add RID_CHAR8.
999 * c-common.h (rid): Add RID_CHAR8.
1000 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1001 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1002 Define char8_type_node and char8_array_type_node.
1003 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1004 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1005 (c_cpp_builtins): Predefine __cpp_char8_t.
1006 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1007 CPP_UTF8STRING.
1008 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1009 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1010 targeting C++2a.
1011 * c.opt: Add the -fchar8_t command line option.
1012
23db6ced
MS
10132019-01-14 Martin Sebor <msebor@redhat.com>
1014
1015 PR target/88638
1016 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1017 and issue errors if it fails.
1018 * c-common.h (valid_format_string_type_p): Declare.
1019 * c-format.c (valid_stringptr_type_p): Rename...
1020 (valid_format_string_type_p): ...to this and make extern.
1021 (handle_format_arg_attribute): Adjust to new name.
1022 (check_format_string): Same.
1023
234c3818
L
10242019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1025
1026 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1027 Replace "may may" with "may" in warning message.
1028
d8fcab68
JJ
10292019-01-07 Jakub Jelinek <jakub@redhat.com>
1030
1031 PR c++/85052
1032 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1033 (c_build_vec_convert): Declare.
1034 * c-common.c (c_build_vec_convert): New function.
1035
29d24852
MS
10362019-01-04 Martin Sebor <msebor@redhat.com>
1037
1038 PR c/88546
1039 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1040 Handle C++ empty throw specification and C11 _Noreturn.
1041 (has_attribute): Also handle C11 _Noreturn.
1042
9069a4c9
MS
10432019-01-04 Martin Sebor <msebor@redhat.com>
1044
1045 PR c/88363
1046 * c-attribs.c (positional_argument): Also accept enumerated types.
1047
a5544970
JJ
10482019-01-01 Jakub Jelinek <jakub@redhat.com>
1049
1050 Update copyright years.
1051
da77eace
L
10522018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1053
1054 PR c/51628
1055 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1056 * c-warn.c (check_alignment_of_packed_member): New function.
1057 (check_address_of_packed_member): Likewise.
1058 (check_and_warn_address_of_packed_member): Likewise.
1059 (warn_for_address_or_pointer_of_packed_member): Likewise.
1060 * c.opt: Add -Wno-address-of-packed-member.
1061
573767d4
DM
10622018-12-20 David Malcolm <dmalcolm@redhat.com>
1063
1064 PR c++/87504
1065 * c-warn.c (get_outermost_macro_expansion): New function.
1066 (spelled_the_same_p): Use it to unwind the macro expansions, and
1067 compare the outermost macro in each nested expansion, rather than
1068 the innermost.
1069
a14feb3c
DM
10702018-12-19 David Malcolm <dmalcolm@redhat.com>
1071
1072 PR c++/87504
1073 * c-common.h (warn_tautological_cmp): Convert 1st param from
1074 location_t to const op_location_t &.
1075 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1076 when testing for INTEGER_CST.
1077 (warn_tautological_bitwise_comparison): Convert 1st param from
1078 location_t to const op_location_t &; use it to build a
1079 binary_op_rich_location, and use this.
1080 (spelled_the_same_p): New function.
1081 (warn_tautological_cmp): Convert 1st param from location_t to
1082 const op_location_t &. Warn for macro expansions if
1083 spelled_the_same_p. Use binary_op_rich_location.
1084
dfd7fdca
DM
10852018-12-19 David Malcolm <dmalcolm@redhat.com>
1086
1087 PR c++/43064
1088 PR c++/43486
1089 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1090 (verify_tree): Handle location wrappers.
1091 (c_common_truthvalue_conversion): Strip any location wrapper.
1092 Handle CONST_DECL.
1093 (fold_offsetof): Strip any location wrapper.
1094 (complete_array_type): Likewise for initial_value.
1095 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1096 index before checking for INTEGER_CST.
1097 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1098 print parentheses around location wrappers.
1099 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1100 before checking for INTEGER_CST.
1101 (warn_tautological_bitwise_comparison): Call
1102 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1103 before checking for INTEGER_CST.
1104 (readonly_error): Strip any location wrapper.
1105 (warn_array_subscript_with_type_char): Strip location wrappers
1106 before checking for INTEGER_CST. Use the location of the index if
1107 available.
1108
5c8b3702
JM
11092018-12-06 Jason Merrill <jason@redhat.com>
1110
1111 PR c++/88136 - -Wdeprecated-copy false positives
1112 * c.opt (Wdeprecated-copy-dtor): New.
1113 (Wdeprecated-copy): Move to -Wextra.
1114
673670da
MS
11152018-11-29 Martin Sebor <msebor@redhat.com>
1116
1117 PR c/88172
1118 PR testsuite/88208
1119 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1120 alignments to values less than the target requires.
1121 (has_attribute): For attribute aligned consider both the attribute
1122 and the alignment bits.
1123 * c-common.c (c_init_attributes): Optionally issue a warning for
1124 zero alignment.
1125
04864ec8
MS
11262018-11-28 Martin Sebor <msebor@redhat.com>
1127
1128 PR c/88065
1129 PR c/87297
1130 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1131 or destination is an error.
1132
ace83db0
JJ
11332018-11-28 Jakub Jelinek <jakub@redhat.com>
1134
1135 PR c++/88215
1136 * c-ubsan.c: Include langhooks.h.
1137 (ubsan_instrument_division): Change gcc_assert that main variants
1138 of op0 and op1 types are equal to gcc_checking_assert that the
1139 main variants are compatible types.
1140
da193a27
EB
11412018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1142
1143 * c-ada-spec.c: Include stringpool.h.
1144 (has_static_fields): Return false for incomplete types.
1145 (is_tagged_type): Likewise.
1146 (has_nontrivial_methods): Likewise.
1147 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1148 (struct overloaded_name_hash): New structure.
1149 (struct overloaded_name_hasher): Likewise.
1150 (overloaded_names): New global variable.
1151 (init_overloaded_names): New static function.
1152 (overloaded_name_p): New predicate.
1153 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1154 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1155 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1156 Remove always-true condition and dump forward types.
1157 (dump_ada_specs): Delete overloaded_names.
1158
98f08eb8
MS
11592018-11-20 Martin Sebor <msebor@redhat.com>
1160
1161 * c-attribs.c (type_for_vector_size): New function.
1162 (type_valid_for_vector_size): Same.
1163 (handle_vector_size_attribute): Move code to the functions above
1164 and call them.
1165 (validate_attribute, has_attribute): New functions.
1166 * c-common.h (has_attribute): Declare.
1167 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1168 * c-common.c (c_common_resword): Same.
1169
2674fa47
JM
11702018-11-16 Jason Merrill <jason@redhat.com>
1171
1172 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1173 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1174
258b3854
JJ
11752018-11-16 Jakub Jelinek <jakub@redhat.com>
1176
1177 PR middle-end/87854
1178 * c-common.c (fix_string_type): Reject string literals larger than
1179 TYPE_MAX_VALUE (ssizetype) bytes.
1180
1d249509
MS
11812018-11-15 Martin Sebor <msebor@redhat.com>
1182
1183 PR c++/87541
1184 PR c++/87542
1185 * c-attribs.c (positional_argument): New function.
1186 (handle_alloc_size_attribute): Use it and simplify.
1187 (handle_alloc_align_attribute): Same.
1188 (handle_assume_aligned_attribute): Same.
1189 (handle_nonnull_attribute): Same.
1190 * c-common.c (check_function_arguments): Pass fntype to
1191 check_function_format.
1192 * c-common.h (check_function_format): Add an argument.
1193 (PosArgFlags, positional_argument): Declare new type and function.
1194 * c-format.c (decode_format_attr): Add arguments.
1195 (check_format_string, get_constant): Same.
1196 (convert_format_name_to_system_name): Adjust.
1197
478dd60d
DM
11982018-11-15 David Malcolm <dmalcolm@redhat.com>
1199
1200 PR other/19165
1201 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1202
8cca0163
JJ
12032018-11-14 Jakub Jelinek <jakub@redhat.com>
1204
8ee09943
JJ
1205 P1236R1 - Signed integers are two's complement
1206 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1207 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1208 with in-range second operand well defined for -std=c++2a.
1209
8cca0163
JJ
1210 PR other/88007
1211 * c-common.c (parse_optimize_options): Allocate option string from
1212 opts_obstack rather than as GC memory. Move the allocation after
1213 warning for invalid option.
1214
620e594b
DM
12152018-11-13 David Malcolm <dmalcolm@redhat.com>
1216
1217 * c-common.c (c_get_substring_location): Update for renaming of
1218 get_source_location_for_substring to get_location_within_string.
1219 * c-lex.c: Replace "source_location" with "location_t".
1220 * c-opts.c: Likewise.
1221 * c-ppoutput.c: Likewise.
1222
f9731de3
MS
12232018-11-13 Martin Sebor <msebor@redhat.com>
1224
1225 PR middle-end/81824
1226 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1227 (handle_tls_model_attribute): Improve diagnostics.
1228
e4bd6d5e
JM
12292018-11-12 Jason Merrill <jason@redhat.com>
1230
a6bb6b07
JM
1231 * c-cppbuiltin.c (c_cpp_builtins): Define
1232 __cpp_impl_destroying_delete.
1233
e4bd6d5e
JM
1234 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1235 __cpp_conditional_explicit.
1236
79a2c428
MS
12372018-11-09 Martin Sebor <msebor@redhat.com>
1238
1239 PR middle-end/81824
1240 * c-attribs.c (handle_copy_attribute): New function.
1241
4c7bd361
MS
12422018-11-09 Martin Sebor <msebor@redhat.com>
1243
1244 PR c/87795
1245 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1246
28567c40
JJ
12472018-11-08 Jakub Jelinek <jakub@redhat.com>
1248
1249 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1250 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1251 enum omp_memory_order MEMORY_ORDER.
1252 (c_finish_omp_flush): Add MO argument.
1253 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1254 (c_finish_omp_for): Add FINAL_P argument.
1255 * c-omp.c: Include memmodel.h.
1256 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1257 OMP_TASKGROUP_CLAUSES to it.
1258 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1259 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1260 instead of OMP_ATOMIC_SEQ_CST.
1261 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1262 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1263 __atomic_thread_fence call with the given value.
1264 (check_omp_for_incr_expr): Formatting fixes.
1265 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1266 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1267 is not constant expression 1 or -1. Transform NE_EXPR loops
1268 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1269 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1270 loops too.
1271 (c_omp_split_clauses): Add support for combined
1272 #pragma omp parallel master and
1273 #pragma omp {,parallel }master taskloop{, simd} constructs.
1274 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1275 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1276 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1277 (c_omp_predetermined_sharing): Don't return
1278 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1279 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1280 PRAGMA_OMP_REQUIRES.
1281 * c-pragma.h (enum pragma_kind): Likewise.
1282 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1283 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1284
204839e7
DM
12852018-11-08 David Malcolm <dmalcolm@redhat.com>
1286
1287 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1288
d8010ee4
DM
12892018-11-08 David Malcolm <dmalcolm@redhat.com>
1290
1291 * c-format.c (local_cgraph_node_ptr_node): New variable.
1292 (gcc_dump_printf_char_table): Add entry for %C.
1293 (get_pointer_to_named_type): New function, taken from the handling
1294 code for "gimple *" from...
1295 (init_dynamic_diag_info): ...here. Add handling for
1296 "cgraph_node *".
1297 * c-format.h (T_CGRAPH_NODE): New.
1298
4be5c72c
JM
12992018-10-19 Jason Merrill <jason@redhat.com>
1300
1301 * c-cppbuiltin.c (c_cpp_builtins): Add
1302 __cpp_nontype_template_parameter_class.
1303
f3f6029d
NS
13042018-10-31 Nathan Sidwell <nathan@acm.org>
1305
ab5324fb
NS
1306 * c-opts.c (c_finish_options): Force command line macro
1307 location. Refactor to avoid repeating main debug hook.
1308 (push_command_line_include): Clarify comment.
1309
f3f6029d
NS
1310 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1311
91e3ec29
MS
13122018-10-30 Martin Sebor <msebor@redhat.com>
1313
1314 PR middle-end/87041
1315 * c-format.c (check_format_types): Avoid diagnosing null pointer
1316 arguments to printf-family of functions.
1317
b5ff4f5c
MP
13182018-10-30 Marek Polacek <polacek@redhat.com>
1319
1320 Implement P0892R2, explicit(bool).
1321 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1322
7e2de6df
DM
13232018-10-29 David Malcolm <dmalcolm@redhat.com>
1324
1325 * name-hint.h (name_hint::take_deferred): New member function.
1326
b2bf438c
DM
13272018-10-29 David Malcolm <dmalcolm@redhat.com>
1328
1329 PR c++/56856
1330 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1331 argument.
1332 (check_function_restrict): Rename param "argarray" to
1333 "unfolded_argarray", and make a copy named "argarray", calling
1334 fold_for_warn on each argument.
1335 (check_function_arguments): Add note about responsibility for
1336 folding the arguments.
1337
9f936c86
JM
13382018-10-17 Joseph Myers <joseph@codesourcery.com>
1339
1340 * c-common.c (flag_isoc2x): New variable.
1341 * c-common.h (clk_c): Update comment to reference C2X.
1342 (flag_isoc99, flag_isoc11): Update comments to reference future
1343 standard versions in general.
1344 (flag_isoc2x): Declare.
1345 * c-opts.c (set_std_c2x): New function.
1346 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1347 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1348 flag_isoc2x to 0.
1349 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1350
7a8a92c4
JM
13512018-10-17 Joseph Myers <joseph@codesourcery.com>
1352
1353 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1354 (std=iso9899:2018): Document C17 as published in 2018.
1355
4dc003ff
CL
13562018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1357
1358 PR c++/87364
1359 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1360
79371671
WW
13612018-10-11 Will Wray <wjwray@gmail.com>
1362
1363 PR c++/87364
1364 * c-pretty-print.h (pp_c_type_cast): Prototype.
1365 (pp_c_integer_constant): Likewise.
1366 * c-pretty-print.c (pp_c_type_cast): No longer static.
1367 (pp_c_integer_constant): Likewise.
1368 (pp_c_enumeration_constant): Fix loop termination when finding
1369 name of constant. No longer returns a value. Call
1370 pp_c_integer_constant.
1371 (c_pretty_printer::constant): Update for changes to
1372 pp_c_enumeration_constant.
1373
46c62690
JJ
13742018-10-11 Jakub Jelinek <jakub@redhat.com>
1375
1376 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1377 for no_unique_address.
1378
c24300ba
DM
13792018-10-09 David Malcolm <dmalcolm@redhat.com>
1380
1381 * c-common.c (c_option_controlling_cpp_error): Rename to...
1382 (c_option_controlling_cpp_diagnostic): ...this, and convert
1383 "reason" from int to enum.
1384 (c_cpp_error): Rename to...
1385 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1386 * c-common.h (c_cpp_error): Rename to...
1387 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1388 * c-opts.c (c_common_init_options): Update for renaming.
1389
8656dafa
RS
13902018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1391
1392 PR c/87286
1393 * c-common.c (vector_types_compatible_elements_p): Use
1394 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1395
8cff0652
VK
13962018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1397
1398 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1399 to generate constructor destructor priority warning.
1400 * c.opt (-Wprio-ctor-dtor): New option.
1401
bedf03a2
JM
14022018-10-01 Jason Merrill <jason@redhat.com>
1403
1404 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1405
6cc430c1
EB
14062018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1407
1408 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1409 (dump_ada_node): Add const keyword.
1410
87677ac7
ML
14112018-09-25 Martin Liska <mliska@suse.cz>
1412
1413 * c-common.c (c_common_truthvalue_conversion):
1414 Remove Pascal from documentation.
1415
518196cb
EB
14162018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1417
1418 * c-ada-spec.c: Include diagnostic.h.
1419 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1420
a599af84
MP
14212018-09-19 Marek Polacek <polacek@redhat.com>
1422
1423 * c.opt (Wclass-conversion): New.
1424
9c4a4b3c
DM
14252018-09-17 David Malcolm <dmalcolm@redhat.com>
1426
1427 * c-format.c (range_label_for_format_type_mismatch::get_text):
1428 Update for new param.
1429
c896ecfe
DM
14302018-09-17 David Malcolm <dmalcolm@redhat.com>
1431
1432 * c-format.c (format_warning_at_char): Update for introduction of
1433 format_string_diagnostic_t.
1434 (format_type_warning): Likewise.
1435
80c6d1f4
MJ
14362018-09-17 Martin Jambor <mjambor@suse.cz>
1437
1438 PR c/63886
1439 * c.opt (Wabsolute-value): New.
1440
6d900107
BE
14412018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1442
1443 * c-common.c (complete_flexible_array_elts): New helper function.
1444 * c-common.h (complete_flexible_array_elts): Declare.
1445
b5764229
BE
14462018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1447
1448 * c-common.c (braced_list_to_string): Remove eval parameter.
1449 Add some more checks. Always create zero-terminated STRING_CST.
1450 * c-common.h (braced_list_to_string): Adjust prototype.
1451
85204e23
DM
14522018-08-27 David Malcolm <dmalcolm@redhat.com>
1453
1454 PR 87091
1455 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1456 to a tri-state.
1457 (maybe_suggest_missing_token_insertion): Likewise.
1458 (maybe_add_include_fixit): Add param "override_location". If set,
1459 and source-printing is enabled, then override the rich_location's
1460 primary location with that of the insertion point for the fix-it
1461 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1462 * c-common.h (extern void maybe_add_include_fixit): Add bool
1463 param.
1464 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1465 for conversion of show_caret_p to a tri-state.
1466 * c-warn.c (warn_for_restrict): Likewise.
1467 * known-headers.cc
1468 (suggest_missing_header::~suggest_missing_header): Update call to
1469 maybe_add_include_fixit to suggest overriding the location, as it
1470 is for a note.
1471
3d78e008
ML
14722018-08-27 Martin Liska <mliska@suse.cz>
1473
1474 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1475 fndecl_built_in_p and remove check for FUNCTION_DECL if
1476 possible.
3d78e008
ML
1477 (check_builtin_function_arguments): Likewise.
1478 (reject_gcc_builtin): Likewise.
1479 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1480
b5be6d0c
MP
14812018-08-26 Marek Polacek <polacek@redhat.com>
1482
1483 PR c++/87029, Implement -Wredundant-move.
1484 * c.opt (Wredundant-move): New option.
1485
79ca9c35
MP
14862018-08-21 Marek Polacek <polacek@redhat.com>
1487
1488 PR c++/86981, Implement -Wpessimizing-move.
1489 * c.opt (Wpessimizing-move): New option.
1490
097f82ec
DM
14912018-08-20 David Malcolm <dmalcolm@redhat.com>
1492
1493 PR other/84889
1494 * c-attribs.c (common_handle_aligned_attribute): Add
1495 auto_diagnostic_group instance.
1496 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1497 * c-opts.c (c_common_post_options): Likewise.
1498 * c-warn.c (warn_logical_not_parentheses): Likewise.
1499 (warn_duplicated_cond_add_or_warn): Likewise.
1500 (warn_for_multistatement_macros): Likewise.
1501
3fb558b1
NS
15022018-08-20 Nathan Sidwell <nathan@acm.org>
1503
1504 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1505 access.
1506
800c0e98
NS
15072018-08-17 Nathan Sidwell <nathan@acm.org>
1508
1509 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1510 field.
1511 (laxy_hex_fp_value_count): Make unsigned.
1512 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1513 manipulate the macro.
1514 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1515 cpp_define_lazily.
1516
6f795a92
DM
15172018-08-17 David Malcolm <dmalcolm@redhat.com>
1518
1519 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1520 (gcc_dump_printf_length_specs): New.
1521 (gcc_dump_printf_flag_pairs): New.
1522 (gcc_dump_printf_flag_specs): New.
1523 (gcc_dump_printf_char_table): New.
1524 (format_types_orig): Add entry for "gcc_dump_printf".
1525 (init_dynamic_diag_info): Set up length_char_specs and
1526 conversion_specs for gcc_dump_printf_format_type.
1527 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1528
c5d725c0
NS
15292018-08-17 Nathan Sidwell <nathan@acm.org>
1530
10f04917
NS
1531 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1532
c5d725c0
NS
1533 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1534 * c-cppbuiltin.c: Likewise.
1535
c0c12356
ML
15362018-08-17 Martin Liska <mliska@suse.cz>
1537
1538 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1539 Ignore/Deprecated flag. Warning is done automatically for
1540 Deprecated flags.
c0c12356 1541
10fcc142
DM
15422018-08-16 David Malcolm <dmalcolm@redhat.com>
1543
1544 PR c++/70693
1545 * c-common.c (selftest::c_family_tests): Call
1546 selftest::c_indentation_c_tests.
1547 * c-common.h (selftest::c_indentation_c_tests): New decl.
1548 * c-indentation.c: Include "selftest.h".
1549 (next_tab_stop): Add "tab_width" param, rather than accessing
1550 cpp_opts.
1551 (get_visual_column): Likewise. Clarify comment. Bulletproof
1552 against reading past the end of the line.
1553 (get_first_nws_vis_column): Add "tab_width" param.
1554 (detect_intervening_unindent): Likewise.
1555 (should_warn_for_misleading_indentation): Read tab width from
1556 cpp_opts and pass around.
1557 (selftest::test_next_tab_stop): New test.
1558 (selftest::assert_get_visual_column_succeeds): New function.
1559 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1560 (selftest::assert_get_visual_column_fails): New function.
1561 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1562 (selftest::test_get_visual_column): New test.
1563 (selftest::c_indentation_c_tests): New function.
1564
3f6677f4
NS
15652018-08-16 Nathan Sidwell <nathan@acm.org>
1566
1567 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1568 (store_ada_macro): Likewise.
1569 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1570 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1571
96e6ae57
DM
15722018-08-15 David Malcolm <dmalcolm@redhat.com>
1573
1574 * c-format.c: Include "selftest-diagnostic.h" and
1575 "gcc-rich-location.h".
1576 (format_warning_at_char): Pass NULL for new label params of
1577 format_warning_va.
1578 (class indirection_suffix): New class.
1579 (class range_label_for_format_type_mismatch): New class.
1580 (format_type_warning): Move logic for generating "*" suffix to
1581 class indirection_suffix. Create "fmt_label" and "param_label"
1582 to show their types, and pass them to the
1583 format_warning_at_substring calls.
1584 (selftest::test_type_mismatch_range_labels): New test.
1585 (selftest::c_format_c_tests): Call it.
1586
23aa9f7c
MS
15872018-08-13 Martin Sebor <msebor@redhat.com>
1588
1589 PR tree-optimization/71625
1590 * c-common.c (braced_list_to_string): New function.
1591 * c-common.h (braced_list_to_string): Declare it.
1592
f10a9135
NS
15932018-08-08 Nathan Sidwell <nathan@acm.org>
1594
1595 * c-common.c (try_to_locate_new_include_inertion_point): Use
1596 linemap_included_from_linemap.
1597 * c-lex.c (fe_file_change): Use linemap_included_from.
1598 * c-ppoutput.c (pp_file_change): Likewise.
1599
8a45b051
MS
16002018-08-01 Martin Sebor <msebor@redhat.com>
1601
1602 PR tree-optimization/86650
ab20d992 1603 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1604 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1605 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1606 * c-format.h (T89_G): Update to be "gimple *" rather than
1607 "gcall *".
1608 (local_gcall_ptr_node): Rename...
1609 (local_gimple_ptr_node): ...to this.
1610
e540ccc0
DM
16112018-07-31 David Malcolm <dmalcolm@redhat.com>
1612
1613 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1614 table entries for gcc_diag_char_table, and the 'Z' entry from
1615 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1616 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1617 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1618 adding missing "Z" for this table. Remove erroneous "G" and "K"
1619 entries.
1620 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1621 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1622 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1623
425fc685
RE
16242018-07-31 Richard Earnshaw <rearnsha@arm.com>
1625
1626 * c-common.c (speculation_safe_resolve_call): New function.
1627 (speculation_safe_resolve_params): New function.
1628 (speculation_safe_resolve_return): New function.
1629 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1630 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1631 __HAVE_SPECULATION_SAFE_VALUE.
1632
181463c2
DM
16332018-07-20 David Malcolm <dmalcolm@redhat.com>
1634
1635 * c-common.c (c_cpp_error): Remove redundant "line_table"
1636 parameter from call to rich_location::set_range.
1637 (maybe_suggest_missing_token_insertion): Likewise.
1638
0d7f9065
MS
16392018-07-20 Martin Sebor <msebor@redhat.com>
1640
1641 PR middle-end/82063
ab20d992 1642 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1643
00abf86c
MS
16442018-07-20 Martin Sebor <msebor@redhat.com>
1645
1646 PR middle-end/82063
1647 * c-common.h (c_common_handle_option): Change function argument
1648 to HOST_WIDE_INT.
1649 * c-opts.c (c_common_init_options): Same.
1650 (c_common_handle_option): Same. Remove special handling of
1651 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1652 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1653 options to take a HOST_WIDE_INT argument and accept a byte-size
1654 suffix. Initialize.
1655 (-Wvla-larger-than): Same.
1656 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1657 (-Wno-vla-larger-than): Same.
1658
9b452033
JJ
16592018-07-12 Jakub Jelinek <jakub@redhat.com>
1660
1661 * c-attribs.c (c_common_attribute_table): Add
1662 "omp declare target implicit" attribute.
1663
cd0762f3
RB
16642018-07-12 Richard Biener <rguenther@suse.de>
1665
1666 PR c/86453
1667 * c-attribs.c (handle_packed_attribute): Do not build a variant
1668 type with TYPE_PACKED, instead ignore the attribute if we may
1669 not apply to the original type.
1670
0b27c3ed
JJ
16712018-07-10 Jakub Jelinek <jakub@redhat.com>
1672
1673 PR c++/86443
1674 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1675 to contain TREE_LIST for both the original class iterator and the
1676 "last" helper var.
1677
e730a0ef
EB
16782018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1679
1680 * c-ada-spec.c (to_ada_name): Remove index parameter.
1681 (pp_ada_tree_identifier): Likewise.
1682 (dump_ada_macros): Adjust call to to_ada_name.
1683 (struct overloaded_name_hash): Delete.
1684 (struct overloaded_name_hasher): Likewise.
1685 (overloaded_names): Likewise.
1686 (compute_overloading_index): Likewise.
1687 (dump_ada_decl_name): Do not call compute_overloading_index and
1688 adjust calls to pp_ada_tree_identifier.
1689 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1690 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1691 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1692 (dump_ada_enum_type): Remove type and display_convention parameters.
1693 Adjust calls to pp_ada_tree_identifier.
1694 (dump_ada_node): Likewise and for dump_ada_structure.
1695 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1696 and tidy up.
1697 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1698 syntax.
1699 (print_constructor): Adjust call to pp_ada_tree_identifier.
1700 (print_destructor): Likewise.
1701 (dump_ada_declaration): Switch to aspect syntax.
1702 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1703 parameter with nested parameter.
1704 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1705 (dump_ada_specs): Do not delete overloaded_names table.
1706
8de583fc
PB
17072018-07-06 Peter Bergner <bergner@linux.ibm.com>
1708
1709 PR target/86324
e730a0ef 1710 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1711 target hook.
1712
09cff37b
NS
17132018-07-05 Nathan Sidwell <nathan@acm.org>
1714
1715 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1716 NO_IMPLICIT_EXTERN_C.
1717
98086b2b
ML
17182018-06-28 Martin Liska <mliska@suse.cz>
1719
1720 * cppspec.c: Include opt-suggestions.h.
1721
ab20d992
JJ
17222018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1723 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1724 Cesar Philippidis <cesar@codesourcery.com>
1725
1726 * c-pragma.h (enum pragma_omp_clause): Add
1727 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1728 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1729
f41b7612
JJ
17302018-06-20 Jakub Jelinek <jakub@redhat.com>
1731
1732 PR c++/86210
1733 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1734 comment.
1735
4252ccd7
MS
17362018-06-18 Martin Sebor <msebor@redhat.com>
1737
1738 PR middle-end/85602
1739 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1740 nonstring.
1741
e197e64e
KV
17422018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1743
1744 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1745
34a7a230
JM
17462018-06-13 Jason Merrill <jason@redhat.com>
1747
5cef3733
JM
1748 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1749 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1750 handling.
1751
34a7a230
JM
1752 PR c++/86094 - wrong code with defaulted move ctor.
1753 * c-opts.c (c_common_post_options): Bump the current ABI version to
1754 13. Set warn_abi_version and flag_abi_compat_version to the current
1755 version rather than 0. Fix defaulting flag_abi_compat_version from
1756 warn_abi_version.
1757
bb0f14ae
MS
17582018-06-12 Martin Sebor <msebor@redhat.com>
1759
1760 PR c/85931
1761 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1762 sizeof source and destination yields the same value.
1763
3713f2e2
ML
17642018-06-12 Martin Liska <mliska@suse.cz>
1765
1766 * c.opt: Make MPX-related options as Deprecated.
1767
4af78ef8
DM
17682018-06-08 David Malcolm <dmalcolm@redhat.com>
1769
1770 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1771 rather than 0.
1772
31db0fe0
ML
17732018-06-08 Martin Liska <mliska@suse.cz>
1774
1775 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1776 for MPX (macros, related functions, fields in cgraph_node, ...).
1777 (handle_bnd_legacy): Likewise.
1778 (handle_bnd_instrument): Likewise.
1779 * c.opt: Likewise.
1780
fe16acf2
JJ
17812018-06-06 Jakub Jelinek <jakub@redhat.com>
1782
1783 PR c++/86068
1784 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1785 __cpp_transactional_memory to 201500 instead of 210500.
1786
4dbdb49b
JM
17872018-06-06 Jason Merrill <jason@redhat.com>
1788
1789 PR c++/85710 - ICE with -Wmemset-elt-size.
1790 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1791
f8ad043f
JM
17922018-06-01 Jason Merrill <jason@redhat.com>
1793
1794 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1795 201703.
1796
abc24d93
EB
17972018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1798
1799 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1800 declaration for a typedef independently of whether the declaration of
1801 the subtype is generated.
1802
d258f4aa
MS
18032018-05-31 Martin Sebor <msebor@redhat.com>
1804
1805 PR c/82063
1806 * c.opt (-Wno-alloc-size-larger-than): New option.
1807
b67b9225
DP
18082018-04-22 David Pagan <dave.pagan@oracle.com>
1809
1810 PR c/55976
1811 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1812 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1813 differentiate between default (no option), -Wreturn-type, and
1814 -Wno-return-type.
1815
04eb9c55
JM
18162018-05-29 Jason Merrill <jason@redhat.com>
1817
1818 * c.opt (Winit-list-lifetime): New flag.
1819
b0c31bc6
BE
18202018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1821
1822 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1823 splay_tree_delete_pointers.
1824
44284983
JJ
18252018-05-26 Jakub Jelinek <jakub@redhat.com>
1826
1827 PR bootstrap/85921
1828 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1829 noinline variable to workaround broken kernel headers.
1830
b46b715d
JM
18312018-05-18 Jason Merrill <jason@redhat.com>
1832
1833 * c.opt (Wdeprecated-copy): New flag.
1834
40659769
ML
18352018-05-17 Martin Liska <mliska@suse.cz>
1836
1837 * c-warn.c (overflow_warning): Do not use
1838 space in between 'G_' and '('.
1839
403962ea
JM
18402018-05-09 Jason Merrill <jason@redhat.com>
1841
1842 * c-common.c (valid_array_size_p): Add complain parameter.
1843 * c-common.h: ...which defaults to true.
1844
1c9ee609
JJ
18452018-05-11 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR c/85696
1848 * c-omp.c (c_omp_predetermined_sharing): Return
1849 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1850
19916065
ML
18512018-05-11 Martin Liska <mliska@suse.cz>
1852
92a285c1 1853 PR sanitizer/85556
19916065
ML
1854 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1855 TREE_LIST values.
1856
79e7b1fe
JJ
18572018-05-10 Jakub Jelinek <jakub@redhat.com>
1858
1859 PR c++/85662
1860 * c-common.h (fold_offsetof_1): Removed.
1861 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1862 CTX argument defaulted to ERROR_MARK.
1863 * c-common.c (fold_offsetof_1): Renamed to ...
1864 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1865 argument, convert the pointer constant to TYPE and use size_binop
1866 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1867 a pointer type. Adjust recursive calls.
1868
86c12f76
EB
18692018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1870
1871 PR c++/85400
1872 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1873
ee336e84
NS
18742018-05-07 Nathan Sidwell <nathan@acm.org>
1875
1876 * c.opt (ffor-scope): Remove functionality, issue warning.
1877
6c072e21
NS
18782018-05-03 Nathan Sidwell <nathan@acm.org>
1879
1880 * c.opt (ffriend-injection): Remove functionality, issue warning.
1881
2cc7d3a7
DM
18822018-05-01 David Malcolm <dmalcolm@redhat.com>
1883
1884 PR c/84258
1885 * c-format.c (struct format_check_results): Add field
1886 "number_non_char".
1887 (check_format_info): Initialize it, and warn if encountered.
1888 (check_format_arg): Distinguish between wide char and
1889 everything else when detecting arrays of non-char.
1890
7761dfbe
DM
18912018-04-30 David Malcolm <dmalcolm@redhat.com>
1892
1893 * c-format.c (get_corrected_substring): Update for
1894 location_get_source_line returning a char_span. Use a char_span
1895 when handling the prefix of the correction.
1896 * c-indentation.c (get_visual_column): Update for
1897 location_get_source_line returning a char_span.
1898 (get_first_nws_vis_column): Likewise.
1899
62e98ef1
DM
19002018-03-29 David Malcolm <dmalcolm@redhat.com>
1901
1902 PR c++/84269
1903 * known-headers.cc (get_stdlib_header_for_name): Add various names
1904 from <assert.h>, <string.h>, and <memory.h>; add more names from
1905 <stdio.h>.
1906
a7dea617
JJ
19072018-03-27 Jakub Jelinek <jakub@redhat.com>
1908
1909 PR c++/85061
1910 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1911 get_base_address of the second operand is a VAR_P, rather than the
1912 operand itself, and use gcc_checking_assert instead of gcc_assert.
1913
889a3a30
MP
19142018-03-23 Marek Polacek <polacek@redhat.com>
1915
1916 PR c++/85045
1917 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1918 <case RDIV_EXPR>: Tweak condition.
1919
452154b9
EB
19202018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1921
1922 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1923
63ecb626
JJ
19242018-03-16 Jakub Jelinek <jakub@redhat.com>
1925
ce811fc4
JJ
1926 PR c/84909
1927 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1928 diagnostics.
1929
63ecb626
JJ
1930 PR c/84910
1931 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1932 diagnostics.
1933
a1295eec
RB
19342018-03-16 Richard Biener <rguenther@suse.de>
1935
1936 PR c/84873
1937 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1938 unshare the possibly folded expression.
1939
919674fb
RB
19402018-03-15 Richard Biener <rguenther@suse.de>
1941
1942 PR c/84873
1943 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1944
f99309b2
MS
19452018-03-13 Martin Sebor <msebor@redhat.com>
1946
1947 PR tree-optimization/84725
1948 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1949 with all three narrow character types, including their qualified forms.
1950
e9b9fa4c
MS
19512018-03-12 Martin Sebor <msebor@redhat.com>
1952
1953 PR tree-optimization/83456
ab20d992 1954 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
1955 Restore checking of bounded built-in functions.
1956 (check_function_arguments): Also return the result
1957 of warn_for_restrict.
ab20d992
JJ
1958 * c-common.c (check_function_restrict): Return bool.
1959 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 1960
0805d020
MP
19612018-03-02 Marek Polacek <polacek@redhat.com>
1962
1963 PR c++/84171
1964 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1965 is erroneous.
1966
ed2a2f08
TS
19672018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1968
1969 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1970 function".
1971
90abdde0
MP
19722018-03-01 Marek Polacek <polacek@redhat.com>
1973
1974 PR c++/84639
1975 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1976 alignment in computation.
1977
c6db43fa
EB
19782018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1979
1980 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1981 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1982
9e25c7ed
EB
19832018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1984
1985 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1986 (is_char_array): Take a type instead of a declaration.
1987 (dump_ada_array_type): Likewise.
1988 (is_simple_enum): Minor tweak.
1989 (dump_ada_enum_type): New function extracted from...
1990 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1991 <INTEGER_TYPE>: Remove unreachable code.
1992 <RECORD_TYPE>: Likewise. Minor tweaks.
1993 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1994 <ENUMERAL_TYPE>: New case.
1995 <RECORD_TYPE>: Factor out common code.
1996 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1997 Minor tweaks. Deal with enumeral types.
1998 (dump_ada_structure): Minor tweaks.
1999
09de3550
EB
20002018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2001
2002 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2003 address for incomplete structures.
2004 (dump_forward_type): Do not bail out for incomplete structures.
2005 (dump_ada_declaration): Do not special-case incomplete structures
2006 for subtypes. Dump them as null records for types.
2007
095d8d4b
EB
20082018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2009
2010 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2011 (is_char_array): Fix formatting.
2012 (dump_template_types): Likewise.
2013 (dump_generic_ada_node): Rename into...
2014 (dump_ada_node): ...this.
2015 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2016 incomplete structures and not for empty structures. Do not use it
2017 when forward declarations are needed.
2018 (dump_forward_type): New function.
2019 (dump_nested_types): Remove FORWARD parameter. Do not consider
2020 TREE_VISITED and do not generate a forward declaration. Only dump
2021 original nested types for nested declaration.
2022 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2023 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2024 <RECORD_TYPE>: Do not consider TREE_VISITED.
2025 (dump_ada_declaration): Use booleans and fix formatting throughout.
2026 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2027 Call dump_forward_type instead of dump_nested_types for a typedef.
2028 Remove superfluous check and adjust call to dump_nested_types.
2029 <POINTER_TYPE>: Call dump_forward_type and fall through.
2030 (dump_ada_struct_decl): Rename into...
2031 (dump_ada_structure): ...this. Do not special-case empty structures.
2032
d4cfd486
MS
20332018-02-27 Martin Sebor <msebor@redhat.com>
2034
2035 PR c++/83871
2036 * c.opt (-Wmissing-attributes): New option.
2037
b22dbd03
ML
20382018-02-21 Martin Liska <mliska@suse.cz>
2039
2040 * c.opt (Wcatch-value=): Add IntegerRange.
2041
883dfe2a
JM
20422018-02-15 Jason Merrill <jason@redhat.com>
2043
2044 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2045
0444aa9c
NS
20462018-02-09 Nathan Sidwell <nathan@acm.org>
2047
2048 PR c/84293
2049 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2050 arg.
2051 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2052 arg. Adjust.
2053
cea71f0a
MS
20542018-02-09 Martin Sebor <msebor@redhat.com>
2055
2056 PR lto/84212
2057 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2058 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2059 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2060 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2061 (-Wuninitialized): Same.
2062
8c8b7be5
EB
20632018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2064
2065 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2066 keyword for components.
2067
7c30b12a
PC
20682018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2069
2070 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2071
eece7fe5
JK
20722018-02-02 Julia Koval <julia.koval@intel.com>
2073
2074 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2075
7d07a93a
MP
20762018-01-29 Marek Polacek <polacek@redhat.com>
2077
2078 PR c/83966
2079 * c-format.c (check_function_format): Check current_function_decl.
2080
53723269
JJ
20812018-01-27 Jakub Jelinek <jakub@redhat.com>
2082
2083 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2084 argument.
2085 (LAZY_HEX_FP_VALUES_CNT): Define.
2086 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2087 values rather than just 12.
2088 (builtin_define_with_hex_fp_value): Likewise.
2089
7365279f
BK
20902018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2091
92a285c1
ML
2092 PR other/70268
2093 * c.opt (-fmacro-prefix-map): New option.
2094 * c-opts.c (c_common_handle_option): Handle it.
2095 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2096 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2097
bb9869d5
DM
20982018-01-17 David Malcolm <dmalcolm@redhat.com>
2099
2100 PR c++/83814
2101 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2102
68dc87c3
EB
21032018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2104
2105 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2106 Skip 'f' and 'F' characters if it is true.
2107 (store_ada_macro): Minor tweak.
2108 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2109 <CPP_WSTRING>: Likewise.
2110 <CPP_STRING>: Output '&' in the buffer if not the first string.
2111 <CPP_NUMBER>: Adjust calls to dump_number.
2112
9a004410
DM
21132018-01-10 David Malcolm <dmalcolm@redhat.com>
2114
2115 PR c++/43486
2116 * c-common.c: Include "selftest.h".
2117 (get_atomic_generic_size): Perform the test for integral type
2118 before the range test for any integer constant, fixing indentation
2119 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2120 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2121 (selftest::test_fold_for_warn): New function.
2122 (selftest::c_common_c_tests): New function.
2123 (selftest::c_family_tests): Call it, and
2124 selftest::c_pretty_print_c_tests.
2125 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2126 * c-format.c (check_format_arg): Convert VAR_P check to a
2127 fold_for_warn.
2128 * c-pretty-print.c: Include "selftest.h".
2129 (pp_c_cast_expression): Don't print casts for location wrappers.
2130 (selftest::assert_c_pretty_printer_output): New function.
2131 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2132 (selftest::test_location_wrappers): New function.
2133 (selftest::c_pretty_print_c_tests): New function.
2134 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2135
5c0caeb3
RS
21362018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2137 Alan Hayward <alan.hayward@arm.com>
2138 David Sherwood <david.sherwood@arm.com>
2139
2140 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2141
73a699ae
RS
21422018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2143 Alan Hayward <alan.hayward@arm.com>
2144 David Sherwood <david.sherwood@arm.com>
2145
2146 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2147 as polynomial.
2148
928686b1
RS
21492018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2150 Alan Hayward <alan.hayward@arm.com>
2151 David Sherwood <david.sherwood@arm.com>
2152
2153 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2154 (convert_vector_to_array_for_subscript): Handle polynomial
2155 TYPE_VECTOR_SUBPARTS.
2156 (c_common_type_for_mode): Check valid_vector_subparts_p.
2157 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2158 VECTOR_CST_NELTS.
2159
85ec4feb
JJ
21602018-01-03 Jakub Jelinek <jakub@redhat.com>
2161
2162 Update copyright years.
2163
170a8bd6 21642017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2165 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2166
2167 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2168 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2169
ab20d992 21702017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2171
2172 PR debug/83527
2173 PR debug/83419
2174 * c-semantics.c (only_debug_stmts_after_p): New.
2175 (pop_stmt_list): Clear side effects in debug-only stmt list.
2176 Check for single nondebug stmt followed by debug stmts only.
2177
c12d20d4
AO
21782017-12-21 Alexandre Oliva <aoliva@redhat.com>
2179
2180 PR debug/83419
2181 * c-semantics.c (pop_stmt_list): Propagate side effects from
2182 single nondebug stmt to container list.
2183
01512446
JJ
21842017-12-19 Jakub Jelinek <jakub@redhat.com>
2185
2186 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2187 conditions with typical order conditions.
2188
82cfbd01
MP
21892017-12-18 Marek Polacek <polacek@redhat.com>
2190
2191 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2192 not in effect.
2193
99da11ec
MS
21942017-12-17 Martin Sebor <msebor@redhat.com>
2195
2196 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2197 an error for attribute warn_if_not_aligned.
2198
cc8bea0a
MS
21992017-12-16 Martin Sebor <msebor@redhat.com>
2200
2201 PR tree-optimization/78918
2202 * c-common.c (check_function_restrict): Avoid checking built-ins.
2203 * c.opt (-Wrestrict): Include in -Wall.
2204
4849deb1
JJ
22052017-12-15 Jakub Jelinek <jakub@redhat.com>
2206
2207 * c-attribs.c (c_common_attribute_table,
2208 c_common_format_attribute_table): Swap affects_type_identity
2209 and handler fields, adjust comments.
2210
c65e18d3
BE
22112017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2212
2213 * c.opt (Wcast-function-type): New warning option.
2214 * c-lex.c (get_fileinfo): Avoid warning.
2215 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2216
2004617a
QZ
22172017-12-14 Qing Zhao <qing.zhao@oracle.com>
2218
7365279f 2219 PR middle_end/79538
2004617a
QZ
2220 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2221 Adjust the size of buf1 and buf2, add a new buf to avoid
2222 format-overflow warning.
2223
ab20d992 22242017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2225
2226 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2227 subsequent statement list.
2228
5d9ae53d
MS
22292017-12-07 Martin Sebor <msebor@redhat.com>
2230
2231 PR c/81544
2232 PR c/81566
2233 * c-attribs.c (attr_aligned_exclusions): New array.
2234 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2235 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2236 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2237 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2238 (attr_warn_unused_result_exclusions): Same.
2239 (handle_hot_attribute, handle_cold_attribute): Simplify.
2240 (handle_const_attribute): Warn on function returning void.
2241 (handle_pure_attribute): Same.
2242 (handle_aligned_attribute): Diagnose conflicting attribute
2243 specifications.
2244 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2245
c79144f8
DM
22462017-12-06 David Malcolm <dmalcolm@redhat.com>
2247
2248 PR c/83236
2249 * c-common.c (selftest::c_family_tests): Call
2250 selftest::c_spellcheck_cc_tests.
2251 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2252 * c-spellcheck.cc: Include "selftest.h".
2253 (name_reserved_for_implementation_p): New function.
2254 (should_suggest_as_macro_p): New function.
2255 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2256 should_suggest_as_macro_p and call it.
2257 (selftest::test_name_reserved_for_implementation_p): New function.
2258 (selftest::c_spellcheck_cc_tests): New function.
2259 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2260
613bc14f
DM
22612017-12-06 David Malcolm <dmalcolm@redhat.com>
2262
2263 * c-spellcheck.cc: New file, taken from macro-handling code in
2264 spellcheck-tree.c.
2265 * c-spellcheck.h: New file, taken from macro-handling code in
2266 spellcheck-tree.h.
2267
e76c7157
JJ
22682017-12-01 Jakub Jelinek <jakub@redhat.com>
2269
2270 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2271 attribute.
2272 (handle_simd_attribute): Don't check for "cilk simd function"
2273 attribute. Reindent, formatting changes.
2274
b0da4034
JK
22752017-11-30 Julia Koval <julia.koval@intel.com>
2276
2277 * c-common.h (inv_list): Remove.
2278
058f0b9e
JJ
22792017-11-28 Jakub Jelinek <jakub@redhat.com>
2280
2281 PR sanitizer/81275
2282 * c-common.c (c_switch_covers_all_cases_p_1,
2283 c_switch_covers_all_cases_p): New functions.
2284 * c-common.h (c_switch_covers_all_cases_p): Declare.
2285
5e9d6aa4 22862017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2287 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2288
2289 * array-notation-common.c: Delete.
2290 * c-cilkplus.c: Ditto.
2291 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2292 * c-common.def (ARRAY_NOTATION_REF): Remove.
2293 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2294 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2295 c_validate_cilk_plus_loop, cilkplus_an_parts,
2296 cilk_ignorable_spawn_rhs_op,
2297 cilk_recognize_spawn): Remove.
2298 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2299 * c-omp.c: Remove CILK_SIMD check.
2300 * c-pragma.c: Ditto.
2301 * c-pragma.h: Remove CILK related pragmas.
2302 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2303 ARRAY_NOTATION_REF condition.
2304 (c_pretty_printer::expression): Ditto.
2305 * c.opt (fcilkplus): Remove.
2306 * cilk.c: Delete.
2307
1af4ebf5
MG
23082017-11-21 Marc Glisse <marc.glisse@inria.fr>
2309
2310 * c-pretty-print.c (pp_c_additive_expression,
2311 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2312
d44ed508
JJ
23132017-11-21 Jakub Jelinek <jakub@redhat.com>
2314
7d2f0f9b
JJ
2315 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2316
d44ed508
JJ
2317 PR c++/83059
2318 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2319 instead of tree_to_uhwi, formatting fix.
2320
26edace6
DM
23212017-11-20 David Malcolm <dmalcolm@redhat.com>
2322
2323 PR c/81404
2324 * known-headers.cc: New file, based on material from c/c-decl.c.
2325 (suggest_missing_header): Copied as-is.
2326 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2327 heavily edited to add C++ support. Add some knowledge about
2328 <limits.h>, <stdint.h>, and <wchar.h>.
2329 * known-headers.h: Likewise.
2330
6c7a259b
DM
23312017-11-20 David Malcolm <dmalcolm@redhat.com>
2332
2333 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2334 (lookup_name_fuzzy): Likewise. Convert return type from
2335 const char * to name_hint. Add location_t param.
2336 * name-hint.h: New header.
2337
f9c59f7e
JJ
23382017-11-19 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR c/66618
2341 PR c/69960
2342 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2343
1e39313a
JM
23442017-11-16 Joseph Myers <joseph@codesourcery.com>
2345
2346 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2347 expected publication date of C17.
2348 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2349
3ca0dc60
JM
23502017-11-15 Joseph Myers <joseph@codesourcery.com>
2351
2352 PR c/81156
2353 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2354 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2355
025d57f0
MS
23562017-11-10 Martin Sebor <msebor@redhat.com>
2357
2358 PR c/81117
2359 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2360 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2361 * c.opt (-Wstringop-truncation): New option.
2362
1b6fa695
ML
23632017-11-06 Martin Liska <mliska@suse.cz>
2364
2365 PR middle-end/82404
2366 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2367 FE.
2368 * c.opt: Set default value of warn_return_type.
2369
64a5912c
DM
23702017-10-31 David Malcolm <dmalcolm@redhat.com>
2371
2372 * c-common.c (binary_op_error): Update for renaming of
2373 error_at_rich_loc.
2374 (c_parse_error): Likewise.
2375 * c-warn.c (warn_logical_not_parentheses): Likewise for
2376 renaming of inform_at_rich_loc.
2377 (warn_for_restrict): Likewise for renaming of
2378 warning_at_rich_loc_n.
2379
c76dc9c3
JM
23802017-10-30 Joseph Myers <joseph@codesourcery.com>
2381
2382 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2383 * c-opts.c (set_std_c17): New function.
2384 (c_common_init_options): Use gnu17 as default C version.
2385 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2386
ee5fd23a
MM
23872017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2388
2389 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2390 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2391 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2392 __FP_FAST_FMA<N>X.
2393
d1047465
MP
23942017-10-23 Marek Polacek <polacek@redhat.com>
2395
2396 PR c/82681
2397 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2398
9e878cf1
EB
23992017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2400
2401 * c-common.c (check_builtin_function_arguments): Also check arguments
2402 of __builtin_alloca_with_align_and_max.
2403
89b6abbb
DM
24042017-10-17 David Malcolm <dmalcolm@redhat.com>
2405
2406 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2407 rather than NULL to format_warning_va.
2408 (check_format_types): Likewise when calling format_type_warning.
2409 Remove code to extract source_ranges and source_range * in favor
2410 of just a location_t.
2411 (format_type_warning): Convert source_range * param to a
2412 location_t.
2413
39382c09
JJ
24142017-10-13 Jakub Jelinek <jakub@redhat.com>
2415
2416 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2417 [LR]SHIFT_EXPR.
2418
62e1c678
DM
24192017-10-12 David Malcolm <dmalcolm@redhat.com>
2420
2421 * c-common.c (enum missing_token_insertion_kind): New enum.
2422 (get_missing_token_insertion_kind): New function.
2423 (maybe_suggest_missing_token_insertion): New function.
2424 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2425
b90c9338
NS
24262017-10-11 Nathan Sidwell <nathan@acm.org>
2427
2428 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2429 (c_common_handle_option): Update incpath_kind names.
2430
3a266bcd
ML
24312017-10-11 Martin Liska <mliska@suse.cz>
2432
2433 PR sanitizer/82490
2434 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2435 Wattributes warning.
2436
8e6cdc90
RS
24372017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2438
2439 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2440 operating on trees as wide_ints.
2441 * c-common.c (pointer_int_sum): Likewise.
2442 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2443 * c-warn.c (match_case_to_enum_1): Likewise.
2444 (c_do_switch_warnings): Likewise.
2445 (maybe_warn_shift_overflow): Likewise.
2446
802b38c9
JJ
24472017-10-10 Jakub Jelinek <jakub@redhat.com>
2448
2449 PR c/82437
2450 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2451 instead of wide_int::from.
2452
4e34b338
JJ
24532017-10-06 Jakub Jelinek <jakub@redhat.com>
2454
2455 PR c/82437
2456 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2457 using to_widest use wide_int with the larger of the two precisions.
2458
4bc4b2b4
BE
24592017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2460
2461 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2462 functions.
2463
a1488398
RS
24642017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2465
2466 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2467 when combining the original unconverted comparison operands.
2468
01c9fb68
JJ
24692017-09-29 Jakub Jelinek <jakub@redhat.com>
2470
2471 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2472 attribute.
2473
6e3e8419
EB
24742017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2475
2476 * c-ada-spec.c (to_ada_name): Add index parameter.
2477 (pp_ada_tree_identifier): Likewise.
2478 (dump_ada_macros): Adjust call to to_ada_name.
2479 (struct overloaded_name_hash): New type.
2480 (struct overloaded_name_hasher): Likewise.
2481 (overloaded_names): New hash table.
2482 (compute_overloading_index): New function.
2483 (dump_ada_decl_name): Call it and pass the result to
2484 pp_ada_tree_identifier.
2485 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2486 (dump_ada_function_declaration): Likewise.
2487 (dump_generic_ada_node): Likewise.
2488 (print_constructor): Likewise.
2489 (print_destructor): Likewise.
2490 (dump_ada_specs): Delete overloaded_names table.
2491
79310774
EB
24922017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2493
2494 * c-ada-spec.c (max_ada_macros): Move around.
2495 (store_ada_macro_index): Likewise.
2496 (source_file): Rename into...
2497 (macro_source_file): ...this.
2498 (count_ada_macro): Move around.
2499 (store_ada_macro): Likewise.
2500 (compare_macro): Likewise.
2501 (print_ada_macros): Merge in...
2502 (dump_ada_macros): ...this.
2503 (source_file_base): Rename into...
2504 (current_source_file): ...this.
2505 (print_comment): Move around.
2506 (dump_ada_nodes): Call dump_ada_declaration directly.
2507 (struct with): Change type of limited field to bool.
2508 (append_withs): Change type of limited_access parameter to bool.
2509 (pp_ada_tree_identifie): Likewise.
2510 (dump_ada_decl_nam): Likewise.
2511 (dump_generic_ada_node): Likewise. Do not print the return type.
2512 (to_ada_name): Change type of space_found parameter to bool.
2513 (dump_ada_function_declaration): Return void and change type of
2514 parameters to bool. Also print the return type for a function.
2515 (print_ada_methods): Rename into...
2516 (dump_ada_methods): ...this.
2517 (print_ada_declaration): Rename into ...
2518 (dump_ada_declaration): ...this. Do not print the return type.
2519 (print_ada_struct_decl): Rename into...
2520 (dump_ada_struct_decl): ...this.
2521
7d386d45
JJ
25222017-09-29 Jakub Jelinek <jakub@redhat.com>
2523
2524 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2525 rather than DECL_INITIAL.
2526 (common_handle_aligned_attribute): Likewise.
2527
ab20d992 25282017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2529
2530 * c.opt (gen-decls): Add RejectNegative.
2531
026a79f7
AS
25322017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2533 Jakub Jelinek <jakub@redhat.com>
2534
2535 Add support for -std=c++2a.
2536 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2537 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2538 * c-opts.c (set_std_cxx2a): New.
2539 (c_common_handle_option): Set options when -std=c++2a is enabled.
2540 (c_common_post_options): Adjust comments.
2541 (set_std_cxx14, set_std_cxx17): Likewise.
2542
4a8ca690
EB
25432017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2544
2545 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2546 message for non-uniform endianness and issue a warning in C++.
2547
7b936140
JJ
25482017-09-15 Jakub Jelinek <jakub@redhat.com>
2549
2550 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2551 (Wc++17-compat): Change from undocumented alias to option.
2552 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2553 change C++1z to C++17 in description.
2554 (std=c++1z, std=gnu++1z): Change from option to undocumented
2555 deprecated alias.
2556 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2557 Adjust description.
2558 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2559 * c-opts.c (set_std_cxx1z): Rename to ...
2560 (set_std_cxx17): ... this.
2561 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2562 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2563 caller.
7b936140
JJ
2564 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2565 comments.
2566
12263f13
L
25672017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2568
2569 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2570 function alignment if warn_if_not_aligned_p is true.
2571
6836632e
NS
25722017-09-12 Nathan Sidwell <nathan@acm.org>
2573
2574 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2575 resort_sorted_fields): Move to c/c-decl.c.
2576 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2577 (struct sorted_fields_type): Move to c/c-lang.h.
2578
019bf9ad
JW
25792017-09-09 Jonathan Wakely <jwakely@redhat.com>
2580
2581 PR c++/81852
2582 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2583
bc7fe952
MP
25842017-09-04 Marek Polacek <polacek@redhat.com>
2585
2586 PR c/81783
2587 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2588 (warn_tautological_cmp): Call it.
2589
ab20d992 25902017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2591
2592 * c-opts.c (c_common_finish): Write dependency information even if
2593 there are errors.
2594
d2e05fcb
JJ
25952017-09-01 Jakub Jelinek <jakub@redhat.com>
2596
2597 PR c/81887
2598 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2599 (omp_pragmas_simd): ... here.
2600 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2601 create new clauses list containing just simd clause.
2602
18e2a8b8
RS
26032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2604 Alan Hayward <alan.hayward@arm.com>
2605 David Sherwood <david.sherwood@arm.com>
2606
2607 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2608 into scalar_mode_supported_p call.
2609 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2610
16d22000
RS
26112017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2612 Alan Hayward <alan.hayward@arm.com>
2613 David Sherwood <david.sherwood@arm.com>
2614
2615 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2616 for the mode iterator.
2617
b397965c
RS
26182017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2619 Alan Hayward <alan.hayward@arm.com>
2620 David Sherwood <david.sherwood@arm.com>
2621
2622 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2623 * c-common.c (c_build_vec_perm_expr): Likewise.
2624
357b7604
RS
26252017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2626 Alan Hayward <alan.hayward@arm.com>
2627 David Sherwood <david.sherwood@arm.com>
2628
2629 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2630
e05c94ba
RS
26312017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2632 Alan Hayward <alan.hayward@arm.com>
2633 David Sherwood <david.sherwood@arm.com>
2634
2635 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2636 before calling targetm.addr_space.valid_pointer_mode.
2637
5c20c4af
RS
26382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2639 Alan Hayward <alan.hayward@arm.com>
2640 David Sherwood <david.sherwood@arm.com>
2641
2642 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2643
c94843d2 26442017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2645 Alan Hayward <alan.hayward@arm.com>
2646 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2647
2648 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2649 iterators.
2650 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2651
4e10a5a7
RS
26522017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2653 Alan Hayward <alan.hayward@arm.com>
2654 David Sherwood <david.sherwood@arm.com>
2655
2656 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2657 case statements.
2658
130fcab0
ML
26592017-08-29 Martin Liska <mliska@suse.cz>
2660
2661 PR other/39851
2662 * c-common.c (parse_optimize_options): Add argument to function
2663 call.
2664 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2665
14e18d71
DM
26662017-08-24 David Malcolm <dmalcolm@redhat.com>
2667
2668 * c-lex.c (interpret_float): Use token location
2669 when building an EXCESS_PRECISION_EXPR.
2670
2f687306
DM
26712017-08-21 David Malcolm <dmalcolm@redhat.com>
2672
2673 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2674 it to check_function_format.
2675 * c-common.h (check_function_arguments): Add vec<location_t> *
2676 param.
2677 (check_function_format): Likewise.
2678 * c-format.c (struct format_check_context): Add field "arglocs".
2679 (check_function_format): Add param "arglocs"; pass it to
2680 check_format_info.
ab20d992 2681 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2682 new field of format_ctx.
2683 (check_format_arg): Pass format_ctx->arglocs to new param of
2684 check_format_info_main.
2685 (class argument_parser): New field "arglocs".
2686 (argument_parser::argument_parser): Add "arglocs_" param and use
2687 it to initialize new field.
2688 (argument_parser::check_argument_type): Pass new arglocs field to
2689 check_format_types.
2690 (check_format_info_main): Add param "arglocs", and use it when
2691 constructing arg_parser.
2692 (check_format_types): Add param "arglocs"; use it if non-NULL when
2693 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2694
00aa1fa2
L
26952017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2696
2697 PR c/53037
2698 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2699 (c_common_attribute_table): Add warn_if_not_aligned.
2700 (handle_aligned_attribute): Renamed to ...
2701 (common_handle_aligned_attribute): Remove argument, name, and add
2702 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2703 (handle_aligned_attribute): New.
2704 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2705
27be025d
MS
27062017-08-14 Martin Sebor <msebor@redhat.com>
2707
2708 PR c/81117
2709 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2710 (handle_nonstring_attribute): New function.
2711
da67acb9
MS
27122017-08-14 Martin Sebor <msebor@redhat.com>
2713
2714 PR c/81117
2715 * c-format.h (T89_G): New macro.
2716 * c-format.c (local_gcall_ptr_node): New variable.
2717 (init_dynamic_diag_info): Initialize it.
2718
a8b522b4
ML
27192017-08-11 Martin Liska <mliska@suse.cz>
2720
2721 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2722 TARGET_SUPPORTS_ALIASES.
2723
32129a17
DM
27242017-08-10 David Malcolm <dmalcolm@redhat.com>
2725
2726 * c-common.c (c_parse_error): Add rich_location * param, using it
2727 rather implicitly using input_location.
2728 * c-common.h (c_parse_error): Add rich_location * param.
2729
30af3a2b
MP
27302017-08-09 Marek Polacek <polacek@redhat.com>
2731
2732 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2733 (c_common_truthvalue_conversion): Likewise.
2734 * c-omp.c (c_finish_omp_atomic): Likewise.
2735 * c-common.h (build_binary_op): Update declaration.
2736
314e6352
ML
27372017-08-08 Martin Liska <mliska@suse.cz>
2738
2739 * c-ada-spec.c: Include header files.
2740 * c-ubsan.c: Likewise.
2741 * c-warn.c: Likewise.
2742
56b5041c
JJ
27432017-08-07 Jakub Jelinek <jakub@redhat.com>
2744
2745 PR c/69389
2746 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2747
db440138
EB
27482017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2749
2750 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2751 (print_ada_methods): Likewise.
2752 (print_ada_declaration): Likewise.
2753
577eec56
ML
27542017-08-07 Martin Liska <mliska@suse.cz>
2755
2756 * array-notation-common.c: Add new includes.
2757 * c-format.c( handle_format_attribute): Canonicalize a format
2758 function name.
2759 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2760 attribute.
2761 * c-pretty-print.c: Add new include.
2762
b854df3c
EB
27632017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2764
2765 * c-ada-spec.c (has_static_fields): Look only into variables.
2766 (print_constructor): Add TYPE parameter and use it for the name.
2767 (print_destructor): Likewise.
2768 (print_ada_declaration): Adjust to new constructor/destructor names.
2769 Adjust calls to print_constructor and print_destructor.
2770 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2771 Look only into variables in the final loop.
2772
9f2cb25e
EB
27732017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2774
2775 * c-ada-spec.c (has_static_fields): Look only into fields.
2776 (dump_generic_ada_node): Small tweak.
2777 (dump_nested_types): Look only into fields.
2778 (print_ada_declaration): Look only into methods. Small tweak.
2779 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2780
f4bcd9eb
EB
27812017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2782
2783 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2784 (dump_ada_function_declaration): Likewise.
2785 (dump_generic_ada_node): Likewise.
2786 (print_ada_declaration): Add support for const-qualified variables.
2787
f34ebeb2
ML
27882017-07-31 Martin Liska <mliska@suse.cz>
2789
2790 PR sanitize/81530
2791 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2792 Guard condition with flag_sanitize_p also with current_function_decl
2793 non-null equality.
2794 (ubsan_maybe_instrument_reference_or_call): Likewise.
2795
218e5d04
UB
27962017-07-30 Uros Bizjak <ubizjak@gmail.com>
2797
2798 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2799
942047f2
EB
28002017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2801
2802 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2803 for enumeral types.
2804 (print_ada_declaration): Add missing guard for record types.
2805
a40ff0ae
JJ
28062017-07-27 Jakub Jelinek <jakub@redhat.com>
2807
2808 PR c/45784
2809 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2810 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2811 new COMPOUND_EXPRs around the rhs of the comparison.
2812
06bd22f6
MP
28132017-07-27 Marek Polacek <polacek@redhat.com>
2814
2815 PR c/81417
2816 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2817 the types.
2818
036ea399
JJ
28192017-07-27 Jakub Jelinek <jakub@redhat.com>
2820
2821 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2822 (handle_noipa_attribute): New function.
2823
417ca011
TD
28242017-07-07 Torsten Duwe <duwe@suse.de>
2825
2826 * c-attribs.c (c_common_attribute_table): Add entry for
2827 "patchable_function_entry".
2828
5aaa8fb4
NS
28292017-07-20 Nathan Sidwell <nathan@acm.org>
2830
2831 Remove TYPE_METHODS.
2832 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2833 dump_ada_template, print_ada_methods,
2834 print_ada_declaration): Member fns are on TYPE_FIELDS.
2835
ff22eb12
NS
28362017-07-18 Nathan Sidwell <nathan@acm.org>
2837
2838 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2839
eea77d1f
DM
28402017-07-14 David Malcolm <dmalcolm@redhat.com>
2841
2842 * c-common.c (try_to_locate_new_include_insertion_point): New
2843 function.
2844 (per_file_includes_t): New typedef.
2845 (added_includes_t): New typedef.
2846 (added_includes): New variable.
2847 (maybe_add_include_fixit): New function.
2848 * c-common.h (maybe_add_include_fixit): New decl.
2849
281ac396
MS
28502017-07-10 Martin Sebor <msebor@redhat.com>
2851
2852 PR other/81345
2853 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2854
b6f43128
DM
28552017-07-06 David Malcolm <dmalcolm@redhat.com>
2856
2857 * c-common.c (selftest::c_family_tests): New.
2858 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2859 (selftest::c_family_tests): New decl.
2860
efbf55b0
MP
28612017-07-04 Marek Polacek <polacek@redhat.com>
2862
2863 PR c/81231
2864 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2865 types.
2866
6c86bd88
MP
28672017-07-04 Marek Polacek <polacek@redhat.com>
2868
2869 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2870
17a7218b
ML
28712017-06-28 Martin Liska <mliska@suse.cz>
2872
2873 PR ipa/81128
2874 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2875 to a function declaration.
2876
63010089
ML
28772017-06-28 Martin Liska <mliska@suse.cz>
2878
2879 PR driver/79659
2880 * c.opt: Add IntegerRange to various options.
2881
3e2becc4
MP
28822017-06-26 Marek Polacek <polacek@redhat.com>
2883
2884 PR c/80116
2885 * c-common.h (warn_for_multistatement_macros): Declare.
2886 * c-warn.c: Include "c-family/c-indentation.h".
2887 (warn_for_multistatement_macros): New function.
2888 * c.opt (Wmultistatement-macros): New option.
2889 * c-indentation.c (guard_tinfo_to_string): No longer static.
2890 Change the parameter type to "enum rid". Handle RID_SWITCH.
2891 * c-indentation.h (guard_tinfo_to_string): Declare.
2892
2db9b7cd
MG
28932017-06-23 Marc Glisse <marc.glisse@inria.fr>
2894
2895 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2896
c3684b7b
MS
28972017-06-15 Martin Sebor <msebor@redhat.com>
2898
2899 PR c++/80560
2900 * c.opt (-Wclass-memaccess): New option.
2901
e72c4afd
BK
29022017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2903
2904 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2905
8a516588
MP
29062017-06-13 Marek Polacek <polacek@redhat.com>
2907
2908 PR objc/80949
2909 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2910 branches is null.
2911
45b2222a
ML
29122017-06-13 Martin Liska <mliska@suse.cz>
2913
2914 PR sanitize/78204
2915 * c-attribs.c (add_no_sanitize_value): New function.
2916 (handle_no_sanitize_attribute): Likewise.
2917 (handle_no_sanitize_address_attribute): Use the function.
2918 (handle_no_sanitize_thread_attribute): New function.
2919 (handle_no_address_safety_analysis_attribute): Use
2920 add_no_sanitize_value.
2921 (handle_no_sanitize_undefined_attribute): Likewise.
2922 * c-common.h: Declare new functions.
2923 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2924 (ubsan_instrument_shift): Likewise.
2925 (ubsan_instrument_bounds): Likewise.
2926 (ubsan_maybe_instrument_array_ref): Likewise.
2927 (ubsan_maybe_instrument_reference_or_call): Likewise.
2928
a01f151f
JM
29292017-06-11 Jason Merrill <jason@redhat.com>
2930
2931 * c-ada-spec.c, c-pragma.c: Use id_equal.
2932
3de4ac6d
MP
29332017-06-04 Marek Polacek <polacek@redhat.com>
2934
2935 PR c/80919
2936 * c-format.c (matching_type_p): Return false if any of the types
2937 requires structural equality.
2938
2474f48f
MS
29392017-06-02 Martin Sebor <msebor@redhat.com>
2940
2941 PR c/80892
2942 * c-warn.c (conversion_warning): Use -Wconversion for integer
2943 conversion and -Wfloat-conversion for floating one.
2944
40ffd95f
BE
29452017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2946
2947 * c.opt (Wsizeof-pointer-div): New warning option.
2948
3fa4634c
VR
29492017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2950
2951 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2952 (Wcatch-value=1): Enable by -Wall.
2953
f012c8ef
DM
29542017-05-30 David Malcolm <dmalcolm@redhat.com>
2955
2956 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2957 format_chars.
2958 * c.opt (fdiagnostics-show-template-tree): New option.
2959 (felide-type): New option.
2960
63dbcd13
VR
29612017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2962
2963 * c.opt (Wcatch-value=): New C++ warning flag.
2964
be136b5c
NS
29652017-05-24 Nathan Sidwell <nathan@acm.org>
2966
2967 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2968 const casts to avoid warning.
2969
3cd211af
MS
29702017-05-24 Martin Sebor <msebor@redhat.com>
2971
2972 PR c/80731
2973 * c-common.h (unsafe_conversion_p): Add a function argument.
2974 * c-common.c (unsafe_conversion_p): Same.
2975 Add type names and values to diagnostics.
2976 (scalar_to_vector): Adjust.
2977 * c-warn.c (constant_expression_error): Add a function argument.
2978 Add type names and values to diagnostics.
2979 (conversion_warning): Add a function argument.
2980 Add type names and values to diagnostics.
2981 (warnings_for_convert_and_check): Same.
2982
1ff7be5a
JM
29832017-05-19 Jason Merrill <jason@redhat.com>
2984
2985 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2986 enumerators.
2987
ff502317
BE
29882017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2989
2990 * c-format.c (locus): Move out of function scope,
2991 add GTY attribute.
2992
2a8a8d7b
NS
29932017-05-19 Nathan Sidwell <nathan@acm.org>
2994
2995 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2996 (c_common_parse_file): Remove class dump handling.
2997 (get_dump_info): Likewise.
2998
39aac208
RB
29992017-05-19 Richard Biener <rguenther@suse.de>
3000
3001 PR c++/80593
3002 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3003 to alias-set zero memory.
3004
6ecd2339
BE
30052017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3006
3007 * c-format.c (local_tree_type_node): Add GTY attribute.
3008
6574d78e
MP
30092017-05-18 Marek Polacek <polacek@redhat.com>
3010
3011 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3012 (c_common_fixed_point_type_for_size): Likewise.
3013 (c_common_type_for_mode): Likewise.
3014 (shorten_compare): Likewise.
3015 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3016 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3017
e3455240
MP
30182017-05-18 Marek Polacek <polacek@redhat.com>
3019
3020 * c-common.c (self_promoting_args_p): Change the return type to bool.
3021 Use false/true instead of 0/1.
3022 * c-common.h (self_promoting_args_p): Update.
3023
3fa8871b
MP
30242017-05-17 Marek Polacek <polacek@redhat.com>
3025
3026 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3027 * c-warn.c: Likewise.
3028
b42cc3ca
VV
30292017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3030
3031 Implement new C++ intrinsics __is_assignable and __is_constructible.
3032 * c-common.c (__is_assignable, __is_constructible): New.
3033 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3034
1a817418
ML
30352017-05-17 Martin Liska <mliska@suse.cz>
3036
3037 * c-common.h: Introduce dump_flags_t type and
3038 use it instead of int type.
3039 * c-gimplify.c (c_genericize): Likewise.
3040 * c-opts.c: Likewise.
3041
b2fa0a8b
MP
30422017-05-17 Marek Polacek <polacek@redhat.com>
3043
3044 * c-common.c (c_save_expr): Remove.
3045 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3046 * c-common.h (c_save_expr): Remove declaration.
3047
31c2d57d
VR
30482017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3049
3050 PR c/35441
3051 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3052 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3053 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3054 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3055 RDIV_EXPR.
3056 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3057
684f84de
MP
30582017-05-09 Marek Polacek <polacek@redhat.com>
3059
3060 PR c/80525
3061 * c-warn.c (unwrap_c_maybe_const): New.
3062 (warn_logical_operator): Call it.
3063
641da50a
NS
30642017-05-09 Nathan Sidwell <nathan@acm.org>
3065
3066 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3067 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3068
631238ac
MS
30692017-05-08 Martin Sebor <msebor@redhat.com>
3070
3071 PR translation/80280
3072 * c-format.h (struct format_flag_spec): Add new member.
3073 (T89_T): New macro.
3074 * c-format.c (local_tree_type_node): New global.
3075 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3076 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3077 (strfmon_flag_specs): Likewise.
3078 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3079 with distinct quoting properties.
3080 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3081 (flag_chars_t::validate): Add argument and handle bad quoting.
3082 (check_format_info_main): Handle quoting problems.
3083 (init_dynamic_diag_info): Simplify.
3084
49f0c04c
JM
30852017-05-08 Jason Merrill <jason@redhat.com>
3086
3087 * c-opts.c (c_common_post_options): Update defaults for
3088 flag_abi_version and flag_abi_compat_version.
3089
56d35585
DM
30902017-05-05 David Malcolm <dmalcolm@redhat.com>
3091
3092 * c-common.c (c_cpp_error): Replace report_diagnostic
3093 with diagnostic_report_diagnostic.
3094
0f2c4a8f
MS
30952017-05-04 Martin Sebor <msebor@redhat.com>
3096
3097 PR translation/80280
3098 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3099 (handle_weakref_attribute): Same.
3100
6fe63fb4
NS
31012017-05-03 Nathan Sidwell <nathan@acm.org>
3102
3103 Canonicalize canonical type hashing
3104 * c-common.c (complete_array_type): Use type_hash_canon.
3105
815d9cc6
XR
31062017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3107
92a285c1 3108 PR c++/80038
815d9cc6
XR
3109 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3110 prototype.
3111 (cilk_install_body_pedigree_operations): Likewise.
3112 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3113 detatched.
3114 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3115 (cilk_install_body_pedigree_operations): Likewise.
3116 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3117 unwrapping.
3118
f8a36447
JJ
31192017-04-27 Jakub Jelinek <jakub@redhat.com>
3120
3121 PR c++/80534
3122 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3123 flag on non-aggregate element types.
3124
7c145456
BE
31252017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3126
3127 * c-common.c (c_type_hasher, type_hash_table): Remove.
3128 (c_common_get_alias_set): Remove unreachable code.
3129 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3130
c3cbcd45
VR
31312017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3132
3133 * c.opt (Wextra-semi): New C++ warning flag.
3134
8a59d466
JJ
31352017-04-20 Jakub Jelinek <jakub@redhat.com>
3136
3137 PR middle-end/80423
3138 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3139
8487c9a5
JJ
31402017-04-18 Jakub Jelinek <jakub@redhat.com>
3141
3142 PR middle-end/79788
3143 PR middle-end/80375
3144 * c-common.c (c_common_type_for_mode): Don't handle
3145 widest_*_literal_type_node here.
3146 c_common_signed_or_unsigned_type): Likewise.
3147 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3148 to *intTI_type_node or *intDI_type_node depending on whether
3149 TImode is supported by the target or not.
3150
3ee0fb02
ML
31512017-04-10 Martin Liska <mliska@suse.cz>
3152
3153 PR sanitizer/80350
3154 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3155 doing an UBSAN check.
3156
5764ee3c
JW
31572017-04-03 Jonathan Wakely <jwakely@redhat.com>
3158
3159 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3160
6f3af356
JJ
31612017-03-31 Jakub Jelinek <jakub@redhat.com>
3162
3163 PR c++/79572
3164 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3165 tree *.
3166 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3167 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3168 REFERENCE_TYPE.
3169
f6a7a9d5
DM
31702017-03-31 David Malcolm <dmalcolm@redhat.com>
3171
3172 PR documentation/78732
3173 * c.opt (Wendif-labels): Fix description to refer to
3174 #else rather than #elif.
3175
af88f557
JJ
31762017-03-31 Jakub Jelinek <jakub@redhat.com>
3177
3178 PR libstdc++/80251
3179 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3180 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3181
a9e4a1a5
JJ
31822017-03-27 Jakub Jelinek <jakub@redhat.com>
3183
3184 PR middle-end/80162
3185 * c-common.c (c_common_mark_addressable_vec): Don't set
3186 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3187
3f01b620
MS
31882017-03-21 Martin Sebor <msebor@redhat.com>
3189
3190 PR c++/79548
3191 * c-common.c (set_underlying_type): Mark type used only when
3192 original del is declared unused.
3193
2f6f187a
DM
31942017-03-10 David Malcolm <dmalcolm@redhat.com>
3195
3196 PR translation/79848
3197 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3198 "%qs".
3199
a02fa805
DM
32002017-03-10 David Malcolm <dmalcolm@redhat.com>
3201
3202 PR c/79921
3203 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3204 from inform's message, so that xgettext can locate it.
3205
822a132c
MP
32062017-03-09 Marek Polacek <polacek@redhat.com>
3207
3208 PR c++/79962
3209 PR c++/79984
3210 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3211 conversion to the attribute list.
3212
bba81f1c
ML
32132017-03-09 Martin Liska <mliska@suse.cz>
3214
3215 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3216
108154ff
JM
32172017-03-03 Jason Merrill <jason@redhat.com>
3218
3219 * c.opt (Wnoexcept-type): New.
3220
eb0e7c34
RB
32212017-03-02 Richard Biener <rguenther@suse.de>
3222
3223 PR c/79756
3224 * c-common.c (c_common_mark_addressable_vec): Look through
3225 C_MAYBE_CONST_EXPR.
3226
9453ba0a
ML
32272017-02-28 Martin Liska <mliska@suse.cz>
3228
3229 * c.opt: Replace space with tabular for options of <number>
3230 type.
3231
6a825afe
ML
32322017-02-28 Martin Liska <mliska@suse.cz>
3233
3234 * c.opt: Fix --help=option -Q for options which are of
3235 an enum type.
3236
4227c9ad
JJ
32372017-02-24 Jakub Jelinek <jakub@redhat.com>
3238
3239 PR c++/79588
3240 * c-common.c (check_function_restrict): New function.
3241 (check_function_arguments): Add FNDECL argument. Call
3242 check_function_restrict if -Wrestrict.
3243 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3244 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3245 * c-common.h (check_function_arguments): Add FNDECL argument.
3246 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3247
59909673
EB
32482017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3249
3250 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3251 treatment of parameters with pointer-to-tagged type and tidy up.
3252 (print_ada_methods): Remove the special treatment of C++ static member
3253 functions.
3254
54dcd526
ML
32552017-02-22 Martin Liska <mliska@suse.cz>
3256
3257 * c.opt: Replace inequality signs with square brackets
3258 for -Wnornalized.
3259
00bc9de3
JJ
32602017-02-21 Jakub Jelinek <jakub@redhat.com>
3261
3262 PR c++/79641
3263 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3264 preserve quals.
3265
97fcf744
JM
32662017-02-17 Joseph Myers <joseph@codesourcery.com>
3267
3268 * c-cppbuiltin.c (builtin_define_float_constants): Define
3269 __DECIMAL_DIG__ to the value for long double.
3270
c7545f1c
MP
32712017-02-15 Marek Polacek <polacek@redhat.com>
3272
3273 PR c/79515
3274 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3275 conversion has occured.
3276
c2e84327
DM
32772017-01-24 David Malcolm <dmalcolm@redhat.com>
3278
3279 * c-common.c (c_common_reswords): Add "__RTL".
3280 * c-common.h (enum rid): Add RID_RTL.
3281
2ebd93e1
MP
32822017-01-20 Marek Polacek <polacek@redhat.com>
3283
3284 PR c/64279
3285 * c-common.h (do_warn_duplicated_branches_r): Declare.
3286 * c-gimplify.c (c_genericize): Walk the function tree calling
3287 do_warn_duplicated_branches_r.
3288 * c-warn.c (expr_from_macro_expansion_r): New.
3289 (do_warn_duplicated_branches): New.
3290 (do_warn_duplicated_branches_r): New.
3291 * c.opt (Wduplicated-branches): New option.
3292
0d80ab91
DM
32932017-01-17 David Malcolm <dmalcolm@redhat.com>
3294
3295 PR c++/71497
3296 * c-indentation.c (warn_for_misleading_indentation): Use the past
3297 subjunctive in the note.
3298
7f991c36
AH
32992017-01-17 Aldy Hernandez <aldyh@redhat.com>
3300
3301 PR c/79116
3302 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3303 start type to integer_type.
3304
1c70261c
JJ
33052017-01-16 Jakub Jelinek <jakub@redhat.com>
3306
3307 PR driver/49726
3308 * c.opt (gen-decls): Add Driver flag.
3309
1ddca3f3
PC
33102017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3311
3312 Revert:
3313 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3314
3315 PR c++/71737
3316 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3317
7d2f3f1d
PC
33182017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3319
3320 PR c++/71737
3321 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3322
bce6f760
MS
33232017-01-12 Martin Sebor <msebor@redhat.com>
3324
3325 (-Wformat-overflow): ...to this.
3326
bf5fbf46
MS
33272017-01-11 Martin Sebor <msebor@redhat.com>
3328
3329 PR c/78768
3330 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3331 Also enable for LTO.
3332
e363df3f
JM
33332017-01-10 Jason Merrill <jason@redhat.com>
3334
3335 Implement P0195R2, C++17 variadic using.
3336 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3337
bd2c6270
JJ
33382017-01-09 Jakub Jelinek <jakub@redhat.com>
3339
3340 PR translation/79019
3341 PR translation/79020
3342 * c.opt (Wnormalized=): Fix typo in description.
3343
efcc8d38
MS
33442017-01-08 Martin Sebor <msebor@redhat.com>
3345
3346 PR middle-end/77708
3347 * c.opt (-Wformat-truncation): New option.
3348
ab20d992 33492017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3350
3351 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3352 value to unsigned short to fit in 4 hex digits without
3353 warnings.
3354
4e89adf9
EB
33552017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3356
3357 * c.opt (fsso-struct): Add 'native' value.
3358
cd445b54
ML
33592017-01-05 Martin Liska <mliska@suse.cz>
3360
3361 PR pch/78970
3362 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3363 header.
3364
a9342885
MP
33652017-01-04 Marek Polacek <polacek@redhat.com>
3366
3367 PR c++/64767
3368 * c.opt (Wpointer-compare): New option.
3369
fc73e60c
JJ
33702017-01-04 Jakub Jelinek <jakub@redhat.com>
3371
3372 PR driver/78957
3373 * c.opt (fsso-struct=): Add RejectNegative.
3374
cbe34bb5
JJ
33752017-01-01 Jakub Jelinek <jakub@redhat.com>
3376
3377 Update copyright years.
3378
d4a6c0ea
ML
33792016-12-29 Martin Liska <mliska@suse.cz>
3380
3381 PR c/78933
3382 * c.opt (strong-eval-order): Add RejectNegative keyword.
3383
67a5ad7c
JM
33842016-12-22 Jason Merrill <jason@redhat.com>
3385
3386 Implement P0522R0, matching of template template arguments.
3387 * c-cppbuiltin.c (c_cpp_builtins): Define
3388 __cpp_template_template_args.
3389
0dba7960
JJ
33902016-12-21 Jakub Jelinek <jakub@redhat.com>
3391
3392 PR bootstrap/78817
3393 * c-common.c (struct nonnull_arg_ctx): New type.
3394 (check_function_nonnull): Return bool instead of void. Use
3395 nonnull_arg_ctx as context rather than just location_t.
3396 (check_nonnull_arg): Adjust for the new context type, set
3397 warned_p to true if a warning has been diagnosed.
3398 (check_function_arguments): Return bool instead of void.
3399 * c-common.h (check_function_arguments): Adjust prototype.
3400
31bfc9b9
JM
34012016-12-21 Jason Merrill <jason@redhat.com>
3402
3403 * c.opt (-fnew-ttp-matching): New flag.
3404 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3405
629b3d75
MJ
34062016-12-14 Martin Jambor <mjambor@suse.cz>
3407
3408 * c-omp.c: Include omp-general.h instead of omp-low.h.
3409 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3410 name.
3411
474da67e
MS
34122016-12-14 Martin Sebor <msebor@redhat.com>
3413
3414 PR c/17308
3415 * c-common.c (check_nonnull_arg): Disable when optimization
3416 is enabled.
3417
fe366b87
MP
34182016-12-12 Marek Polacek <polacek@redhat.com>
3419
3420 PR c++/78647
3421 * c-common.c (attribute_fallthrough_p): Return false for
3422 error_mark_node.
3423
8bd9f164
MS
34242016-12-08 Martin Sebor <msebor@redhat.com>
3425
3426 PR c/78284
3427 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3428
060162e0
MS
34292016-12-08 Martin Sebor <msebor@redhat.com>
3430
3431 PR c/78165
92a285c1
ML
3432 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3433 suffix.
060162e0 3434
ee92e7ba
MS
34352016-12-07 Martin Sebor <msebor@redhat.com>
3436
3437 PR c/53562
3438 PR middle-end/77784
3439 PR middle-end/78149
3440 PR middle-end/78138
3441 * c.opt (-Wstringop-overflow): New option.
3442
84b0769e
MO
34432016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3444
3445 * c-attribs.c (asan odr indicator): New attribute.
3446 (handle_asan_odr_indicator_attribute): New function.
3447
7fa6a965
PK
34482016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3449
3450 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3451 ptrdiff_type_node;
3452
56d8ffc1
JG
34532016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3454
3455 * c-common.c (excess_precision_mode_join): New.
3456 (c_ts18661_flt_eval_method): New.
3457 (c_c11_flt_eval_method): Likewise.
3458 (c_flt_eval_method): Likewise.
3459 * c-common.h (excess_precision_mode_join): New.
3460 (c_flt_eval_method): Likewise.
3461 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3462 (cpp_iec_559_value): Call it.
3463 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3464 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3465 __FLT_EVAL_METHOD_TS_18661_3__.
3466
04f0fcf7
JG
34672016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3468
3469 * c-opts.c (c_common_post_options): Add logic to handle the default
3470 case for -fpermitted-flt-eval-methods.
3471
fb2675cb
PB
34722016-11-23 Paolo Bonzini <bonzini@gnu.org>
3473
3474 * c.opt (Wexpansion-to-defined): New.
3475
ec1c5694
JJ
34762016-11-23 Jakub Jelinek <jakub@redhat.com>
3477
3478 PR target/78451
3479 * c-pragma.c (handle_pragma_target): Don't replace
3480 current_target_pragma, but chainon the new args to the current one.
3481
730c9e75
NS
34822016-11-22 Nathan Sidwell <nathan@acm.org>
3483
3484 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3485 indentation and formatting.
730c9e75 3486
89990732
MS
34872016-11-21 Martin Sebor <msebor@redhat.com>
3488
3489 * c.opt (-fprintf-return-value): Enable by default.
3490
48330c93
BE
34912016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3492
3493 PR c++/71973
3494 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3495 * c-common.c (c_common_nodes_and_builtins): Initialize
3496 const_tm_ptr_type_node.
3497
0d939c95
MP
34982016-11-16 Marek Polacek <polacek@redhat.com>
3499
3500 PR c/78285
3501 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3502
8e745a17
JJ
35032016-11-14 Jakub Jelinek <jakub@redhat.com>
3504
3505 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3506
1ee62b92 35072016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3508 Richard Biener <rguenther@suse.de>
3509
3510 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3511 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3512 * c.opt (fgimple): New option.
1ee62b92 3513
22b15758
UB
35142016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3515
3516 PR c/35503
3517 * c-common.h (warn_for_restrict): Declare.
3518 * c-warn.c: Include gcc-rich-location.h.
3519 (warn_for_restrict): New function.
3520 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3521 (gcc_cdiag_char_table): Likewise.
3522 (gcc_cxxdiag_char_table): Likewise.
3523 * c.opt (Wrestrict): New option.
3524
4be719cd
EB
35252016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3526
3527 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3528 for nested types only if the type is a record or union and dump SLOC.
3529
4a826ca6
JM
35302016-11-09 Jason Merrill <jason@redhat.com>
3531
3532 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3533
2e955d50
JJ
35342016-11-09 Jakub Jelinek <jakub@redhat.com>
3535
3536 * c-ubsan.c (ubsan_instrument_shift): Handle split
3537 -fsanitize=shift-base and -fsanitize=shift-exponent.
3538
51dc6603
JM
35392016-11-07 Jason Merrill <jason@redhat.com>
3540
3541 * c.opt (Wc++1z-compat): New.
3542 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3543
6dc4a604
ML
35442016-11-07 Martin Liska <mliska@suse.cz>
3545
3546 * c-warn.c (warn_for_unused_label): Save all labels used
3547 in goto or in &label.
3548
b302001e
JM
35492016-11-03 Jason Merrill <jason@redhat.com>
3550
3551 * c-cppbuiltin.c (c_cpp_builtins): Correct
3552 __cpp_inheriting_constructors.
3553
31f7f784
JM
35542016-11-01 Jason Merrill <jason@redhat.com>
3555
2bc78e3c
JM
3556 * c-cppbuiltin.c (c_cpp_builtins): Update
3557 __cpp_inheriting_constructors.
3558
31f7f784
JM
3559 * c.opt (-fnew-inheriting-ctors): New.
3560 * c-opts.c: Default to on for ABI 11+.
3561
dcb466ec
JJ
35622016-10-31 Jakub Jelinek <jakub@redhat.com>
3563
3564 PR c++/77948
3565 * c.opt (fext-numeric-literals): Add Var and Init.
3566 * c-opts.c (c_common_handle_option): Don't clear
3567 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3568 (c_common_post_options): Clear it here if not set
3569 explicitly.
3570
52e1b91e
AH
35712016-10-28 Aldy Hernandez <aldyh@redhat.com>
3572
3573 PR debug/77773
3574 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3575 if NULL.
3576
e16f1cc7
JJ
35772016-10-25 Jakub Jelinek <jakub@redhat.com>
3578
3579 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3580 * c-common.c (c_common_reswords): Add __builtin_launder.
3581
f8348061
BE
35822016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3583
3584 * c-common.c (c_common_truthvalue_conversion): Warn for
3585 multiplications in boolean context. Fix the quoting of '<<' and '<'
3586 in the shift warning.
3587
eff89e01
BE
35882016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3589
3590 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3591
24bc7bf4
JM
35922016-10-20 Jason Merrill <jason@redhat.com>
3593
3594 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3595
4c712374
BE
35962016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3597
3598 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3599 integer shift ops in boolean context.
3600
36012016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3602
3603 * c.opt (Walloca): New.
3604 (Walloca-larger-than=): New.
3605 (Wvla-larger-than=): New.
3606
8fa18c06
MP
36072016-10-17 Marek Polacek <polacek@redhat.com>
3608
3609 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3610 Return immediately when finding a match.
3611 (warn_tautological_cmp): Remove a boolean variable that is no longer
3612 needed.
3613
b12b1915
MP
36142016-10-17 Marek Polacek <polacek@redhat.com>
3615
3616 * c-attribs.c: New file.
3617 * c-common.c: Move attributes handling to c-attribs.c.
3618 (get_nonnull_operand): No longer static.
3619 * c-common.h: Move the declarations from c-attribs.c to its own section.
3620
2045acd9
JM
36212016-10-14 Jason Merrill <jason@redhat.com>
3622
3623 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3624 and __cpp_deduction_guides.
3625
14a2c9aa
JM
36262016-10-13 Jason Merrill <jason@redhat.com>
3627
3628 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3629
4d0cdd0c
TP
36302016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3631
3632 * c-cppbuiltin.c: Include memmodel.h.
3633 * c-opts.c: Likewise.
3634 * c-pragma.c: Likewise.
3635 * c-warn.c: Likewise.
3636
70f6d5e1
JJ
36372016-10-12 Jakub Jelinek <jakub@redhat.com>
3638
3639 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3640 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3641 * c-opts.c (sanitize_cpp_opts): Initialize
3642 cpp_opts->cpp_warn_implicit_fallthrough.
3643
78f61294
MP
36442016-10-11 Marek Polacek <polacek@redhat.com>
3645
3646 * c-common.c (warning_candidate_p): Change the return type to bool
3647 and return true/false instead of 1/0.
3648 (vector_mode_valid_p): Likewise.
3649
038b5cc0
MP
36502016-10-11 Marek Polacek <polacek@redhat.com>
3651
3652 * c-common.c (fold_for_warn): No longer static.
3653 (bool_promoted_to_int_p): Likewise.
3654 (c_common_get_narrower): Likewise.
3655 (constant_expression_warning): Move to c-warn.c.
3656 (constant_expression_error): Likewise.
3657 (overflow_warning): Likewise.
3658 (warn_logical_operator): Likewise.
3659 (find_array_ref_with_const_idx_r): Likewise.
3660 (warn_tautological_cmp): Likewise.
3661 (expr_has_boolean_operands_p): Likewise.
3662 (warn_logical_not_parentheses): Likewise.
3663 (warn_if_unused_value): Likewise.
3664 (strict_aliasing_warning): Likewise.
3665 (sizeof_pointer_memaccess_warning): Likewise.
3666 (check_main_parameter_types): Likewise.
3667 (conversion_warning): Likewise.
3668 (warnings_for_convert_and_check): Likewise.
3669 (match_case_to_enum_1): Likewise.
3670 (match_case_to_enum): Likewise.
3671 (c_do_switch_warnings): Likewise.
3672 (warn_for_omitted_condop): Likewise.
3673 (readonly_error): Likewise.
3674 (lvalue_error): Likewise.
3675 (invalid_indirection_error): Likewise.
3676 (warn_array_subscript_with_type_char): Likewise.
3677 (warn_about_parentheses): Likewise.
3678 (warn_for_unused_label): Likewise.
3679 (warn_for_div_by_zero): Likewise.
3680 (warn_for_memset): Likewise.
3681 (warn_for_sign_compare): Likewise.
3682 (do_warn_double_promotion): Likewise.
3683 (do_warn_unused_parameter): Likewise.
3684 (record_locally_defined_typedef): Likewise.
3685 (maybe_record_typedef_use): Likewise.
3686 (maybe_warn_unused_local_typedefs): Likewise.
3687 (maybe_warn_bool_compare): Likewise.
3688 (maybe_warn_shift_overflow): Likewise.
3689 (warn_duplicated_cond_add_or_warn): Likewise.
3690 (diagnose_mismatched_attributes): Likewise.
3691 * c-common.h: Move the declarations from c-warn.c to its own section.
3692 * c-warn.c: New file.
3693
627be19f
JM
36942016-10-08 Jason Merrill <jason@redhat.com>
3695
3696 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3697 into COND_EXPR in C++.
3698
7bad794a
JJ
36992016-10-08 Jakub Jelinek <jakub@redhat.com>
3700
3701 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3702 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3703 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3704
be845b04
JJ
37052016-10-07 Jakub Jelinek <jakub@redhat.com>
3706
3707 Implement LWG2296 helper intrinsic
3708 * c-common.h (enum rid): Add RID_ADDRESSOF.
3709 * c-common.c (c_common_reswords): Add __builtin_addressof.
3710
c09c4992
BE
37112016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3712
3713 PR c++/77700
3714 * c-common.c (c_common_truthvalue_conversion): Warn also for
3715 suspicious enum values in boolean context.
3716
342cfb3e
JJ
37172016-10-06 Jakub Jelinek <jakub@redhat.com>
3718
3719 Implement P0258R2 - helper for C++17
3720 std::has_unique_object_representations trait
3721 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3722 * c-common.c (c_common_reswords): Add
3723 __has_unique_object_representations.
3724
2e69f143
JJ
37252016-10-05 Jakub Jelinek <jakub@redhat.com>
3726
3727 PR sanitizer/66343
3728 * c-ubsan.c (ubsan_instrument_return): Don't call
3729 initialize_sanitizer_builtins here.
3730
700fff34
BE
37312016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3732
3733 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3734 conditional expression in boolean context when only one arm is
3735 non-boolean.
3736
9563bfcd
JJ
37372016-10-05 Jakub Jelinek <jakub@redhat.com>
3738
04a32443
JJ
3739 PR sanitizer/77823
3740 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3741 is not integral.
3742
9563bfcd
JJ
3743 * c-common.c (c_common_reswords): Update comment for C++11.
3744
f1644724
JM
37452016-10-04 Jason Merrill <jason@redhat.com>
3746
3747 * c-common.c (make_tree_vector_from_ctor): New.
3748 * c-common.h: Declare it.
3749
5a79befb
JJ
37502016-10-04 Jakub Jelinek <jakub@redhat.com>
3751
3752 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3753 __LIBGCC_JCR_SECTION_NAME__.
3754
1633d3b9
BE
37552016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3756
3757 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3758 left shift in boolean context.
3759
a2c6e7f2
JJ
37602016-09-29 Jakub Jelinek <jakub@redhat.com>
3761
3762 Implement P0001R1 - C++17 removal of register storage class specifier
3763 * c.opt (Wregister): New warning.
3764 * c-opts.c (c_common_post_options): Enable -Wregister by
3765 default for C++17.
3766
75304c87
JG
37672016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3768
3769 * c-opts.c (c_common_post_options): Remove special case for
3770 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3771 in C++.
3772
bbfac6da
JJ
37732016-09-27 Jakub Jelinek <jakub@redhat.com>
3774
6e39060a
JJ
3775 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3776 -std=c++1z.
3777
bbfac6da
JJ
3778 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3779
e73cf9a2
TP
37802016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3781
3782 * c-common.c: Include memmodel.h.
3783
c6147dc4
MP
37842016-09-26 Marek Polacek <polacek@redhat.com>
3785
3786 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3787
81fea426
MP
37882016-09-26 Marek Polacek <polacek@redhat.com>
3789
3790 PR c/7652
3791 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3792 (handle_fallthrough_attribute): New function.
3793 (attribute_fallthrough_p): New function.
3794 * c-common.h (attribute_fallthrough_p): Declare.
3795
9a2300e9
MP
37962016-09-24 Marek Polacek <polacek@redhat.com>
3797
3798 PR c/77490
3799 * c.opt (Wbool-operation): New.
3800
a09e9e35
BE
38012016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3802
3803 * c-common.c (c_common_truthvalue_conversion): Inhibit
3804 Wint-in-bool-context warning with from_macro_definition_at.
3805 Mention the expression will always evaluate to true.
3806
d43b4ccc
MS
38072016-09-21 Martin Sebor <msebor@redhat.com>
3808
3809 PR bootstrap/77676
3810 * c.opt (fprintf-return-value): Temporarily initialize to zero
3811 to unblock bootstrap failures.
3812
2e1c20b1
JJ
38132016-09-21 Jakub Jelinek <jakub@redhat.com>
3814
3815 PR c++/77651
3816 * c.opt (Waligned-new=): Add RejectNegative.
3817 (faligned-new=): Likewise. Spelling fix - change
3818 aligned_new_threshhold to aligned_new_threshold.
3819 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3820 to aligned_new_threshold.
3821
88d0c3f0
MS
38222016-09-20 Martin Sebor <msebor@redhat.com>
3823
3824 PR middle-end/49905
3825 * c.opt: Add -Wformat-length and -fprintf-return-value.
3826
144a96e4
BE
38272016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3828
3829 PR c++/77434
3830 * c.opt (Wint-in-bool-context): New warning.
3831 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3832 constants in boolean context.
3833
63012d9a
JM
38342016-09-19 Joseph Myers <joseph@codesourcery.com>
3835
3836 * c-common.c (max_align_t_align): Also consider alignment of
3837 float128_type_node.
3838
931388ce
JM
38392016-09-15 Jason Merrill <jason@redhat.com>
3840
3841 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3842 DECL_EXTERNAL.
3843
38711381
JM
38442016-09-14 Jason Merrill <jason@redhat.com>
3845
3846 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3847 limit FIELD_DECL, either.
3848
e51fbec3
MP
38492016-09-14 Marek Polacek <polacek@redhat.com>
3850
3851 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3852 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3853 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3854
254830ba
DM
38552016-09-13 David Malcolm <dmalcolm@redhat.com>
3856
3857 * c-common.c (warn_logical_not_parentheses): Replace
3858 rich_location::add_fixit_insert calls with add_fixit_insert_before
3859 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3860
42763690
JM
38612016-09-13 Jason Merrill <jason@redhat.com>
3862 Tom de Vries <tom@codesourcery.com>
3863
3864 PR c++/77427
3865 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3866
9453eee9
JM
38672016-09-13 Jason Merrill <jason@redhat.com>
3868
3869 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3870 limit types at all.
3871
e96809e3
JM
38722016-09-12 Jason Merrill <jason@redhat.com>
3873
3874 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3875 bit/byte confusion, allow large alignment for types.
3876
54dcdb88
BE
38772016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3878
3879 PR c++/77496
3880 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3881
d1463eb9
DM
38822016-09-12 David Malcolm <dmalcolm@redhat.com>
3883
3884 PR c/72858
3885 * c-format.c (argument_parser::check_argument_type): Add params
3886 "type_start" and "conversion_char". Use the former to generate
3887 offset_to_type_start and pass it and conversion_char to
3888 check_format_types.
3889 (check_format_info_main): Capture the start of the type
3890 information as "type_start", and pass it an format_char
3891 to arg_parser.check_argument_type.
3892 (check_format_types): Provide an example in the leading comment.
3893 Add params "offset_to_type_start" and "conversion_char"; pass
3894 them to format_type_warning calls.
3895 (test_get_modifier_for_format_len): Likewise.
3896 (matching_type_p): New function.
3897 (get_format_for_type): Add param "conversion_char" and move
3898 implementation into...
3899 (get_format_for_type_1): ...new function, called twice.
3900 Use new function matching_type_p rather than checking for
3901 TYPE_CANONICAL equality.
3902 (get_corrected_substring): New function.
3903 (format_type_warning): Provide an example in the leading comment.
3904 Add params "offset_to_type_start" and "conversion_char". Replace
3905 call to get_format_for_type with call to get_corrected_substring
3906 and move rejection of hints for widths/precisions there.
3907 (assert_format_for_type_streq): Add param "conversion_char".
3908 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3909 (test_get_format_for_type_printf): Add conversion chars to the
3910 tests, adding coverage for various combinations of integer
3911 vs double conversions, and for preserving octal and hexadecimal
3912 conversions.
3913 (test_get_format_for_type_scanf): Add conversion chars to the
3914 tests.
3915
5b28efbb
TV
39162016-09-10 Tom de Vries <tom@codesourcery.com>
3917
3918 PR C/71602
3919 * c-common.c (build_va_arg): Handle more strict
3920 targetm.canonical_va_list_type. Replace first argument type error with
3921 assert.
3922
3f0177e7
MS
39232016-09-09 Martin Sebor <msebor@redhat.com>
3924
3925 PR c/77520
3926 PR c/77521
3927 * c-format.c (argument_parser::find_format_char_info): Use %qc
3928 format directive unconditionally.
3929
af63ba4b
JM
39302016-09-09 Jason Merrill <jason@redhat.com>
3931
3932 Implement C++17 new of over-aligned types.
3933 * c.opt: Add -faligned-new and -Waligned-new.
3934 * c-common.c (max_align_t_align): Split out from...
3935 (cxx_fundamental_alignment_p): ...here.
3936 * c-common.h: Declare it.
3937 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3938
c65248cb
JM
39392016-09-09 Joseph Myers <joseph@codesourcery.com>
3940
3941 * c-cppbuiltin.c (builtin_define_type_width): New function.
3942 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3943 macros.
3944
e5106e27
DM
39452016-09-07 David Malcolm <dmalcolm@redhat.com>
3946
3947 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3948 a POINTER_TYPE.
3949 (substring_loc::get_location): Move to substring-locations.c,
3950 keeping implementation as...
3951 (c_get_substring_location): New function, from the above, reworked
3952 to use accessors rather than member lookup.
3953 * c-common.h (class substring_loc): Move to substring-locations.h,
3954 replacing with a forward decl.
3955 (c_get_substring_location): New decl.
3956 * c-format.c: Include "substring-locations.h".
3957 (format_warning_va): Move to substring-locations.c.
3958 (format_warning_at_substring): Likewise.
3959
ab20d992 39602016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
3961
3962 PR c/77336
3963 * c-format.c (check_function_format): Avoid issuing warnings for
3964 functions unless they call format functions with non-constant
3965 format strings.
3966
b772a565
RB
39672016-09-06 Richard Biener <rguenther@suse.de>
3968
3969 PR c/77450
3970 * c-common.c (c_common_mark_addressable_vec): Handle
3971 COMPOUND_LITERAL_EXPR.
3972
25ff5dd3
MP
39732016-09-05 Marek Polacek <polacek@redhat.com>
3974
3975 PR c/77423
3976 * c-common.c (bool_promoted_to_int_p): New function.
3977 (expr_has_boolean_operands_p): New function.
3978 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3979 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3980
21234eb5
TV
39812016-09-04 Tom de Vries <tom@codesourcery.com>
3982
3983 revert:
3984 2016-08-29 Tom de Vries <tom@codesourcery.com>
3985
3986 * c-common.c (build_va_arg): Replace first argument type error
3987 with assert.
3988
9dc5773f
JJ
39892016-09-02 Jakub Jelinek <jakub@redhat.com>
3990
3991 PR c/65467
3992 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3993 (c_finish_omp_for): Reject _Atomic qualified iterators.
3994
39952016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3996
3997 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3998 size to guarantee it fits the output of the formatted function
3999 regardless of its arguments.
4000
295844f6
MP
40012016-09-01 Marek Polacek <polacek@redhat.com>
4002
4003 PR c/7652
4004 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4005 FALLTHRU comments.
4006
3d06b6f2
MP
40072016-08-29 Marek Polacek <polacek@redhat.com>
4008
4009 PR c/77292
4010 * c-common.c (warn_logical_not_parentheses): Don't warn for
4011 a comparison or a logical operator.
4012
34cedad5
TV
40132016-08-29 Tom de Vries <tom@codesourcery.com>
4014
4015 * c-common.c (build_va_arg): Fix type comparison assert.
4016
f162d717
TV
40172016-08-29 Tom de Vries <tom@codesourcery.com>
4018
4019 * c-common.c (build_va_arg): Replace first argument type error
4020 with assert.
4021
ba9bbd6f
TV
40222016-08-29 Tom de Vries <tom@codesourcery.com>
4023
4024 PR c/77398
4025 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4026 with error_mark_node as va_list instead of with illegal va_list.
4027
ebef225f
MP
40282016-08-25 Marek Polacek <polacek@redhat.com>
4029 David Malcolm <dmalcolm@redhat.com>
4030
4031 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4032 * c-common.h (warn_logical_not_parentheses): Update declaration.
4033
b00e6e75
MP
40342016-08-22 Marek Polacek <polacek@redhat.com>
4035
4036 PR c++/77321
4037 * c-common.c (warn_for_memset): Check type for null.
4038
6dc198e3
JM
40392016-08-22 Joseph Myers <joseph@codesourcery.com>
4040
14ec014e 4041 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4042 _FloatNx types for suffixes for built-in functions.
4043
c65699ef
JM
40442016-08-19 Joseph Myers <joseph@codesourcery.com>
4045
4046 PR c/32187
4047 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4048 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4049 (RID_FLOAT128X): New enum rid values.
4050 (CASE_RID_FLOATN_NX): New macro.
4051 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4052 keywords.
4053 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4054 corresponding complex types.
4055 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4056 _FloatNx and corresponding complex types.
4057 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4058 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4059 and _FloatNx types for the widest type for determining
4060 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4061 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4062 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4063 and _FloatNx types.
4064 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4065 constants.
4066 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4067 _FloatNx types.
4068
cc015f3a
DM
40692016-08-18 David Malcolm <dmalcolm@redhat.com>
4070
4071 * c-opts.c (c_diagnostic_finalizer): Update for change to
4072 diagnostic_show_locus.
4073
cb18fd07
DM
40742016-08-18 David Malcolm <dmalcolm@redhat.com>
4075
4076 * c-common.c: Include "spellcheck.h".
4077 (cb_get_suggestion): New function.
4078 * c-common.h (cb_get_suggestion): New decl.
4079 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4080 cb_get_suggestion.
4081
a76989dc
MP
40822016-08-18 Marek Polacek <polacek@redhat.com>
4083
4084 PR c/71514
4085 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4086 and pointer-to-VLA.
4087
65e736c0
DM
40882016-08-16 David Malcolm <dmalcolm@redhat.com>
4089
4090 PR c/72857
4091 * c-common.c (substring_loc::get_range): Rename to...
4092 (substring_loc::get_location): ...this, converting param from a
4093 source_range * to a location_t *. Call
4094 get_source_location_for_substring rather than
4095 get_source_range_for_substring, and pass in m_caret_idx.
4096 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4097 (substring_loc::get_range): Replace with...
4098 (substring_loc::get_location): ...this.
4099 (substring_loc::set_caret_index): New method.
4100 (substring_loc): Add field m_caret_idx.
4101 * c-format.c (format_warning_va): Update for above changes.
4102 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4103 clashing with type name.
4104 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4105 (check_argument_type): Likewise.
4106 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4107 Use a copy when emitting warnings, setting the caret index from TYPE.
4108
7e1dde14 41092016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4110 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4111
4112 * c-ada-spec.c (dump_number): New function.
4113 (handle_escape_character): Likewise.
4114 (print_ada_macros): Add handling of constant integers and strings.
4115
191816a3
MP
41162016-08-12 Marek Polacek <polacek@redhat.com>
4117
4118 PR c/7652
4119 * c-common.c (scalar_to_vector): Adjust fall through comment.
4120 * c-opts.c (c_common_handle_option): Likewise.
4121 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4122 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4123 fall through comment.
4124 * cilk.c (extract_free_variables): Add FALLTHRU.
4125
452df4a4
JM
41262016-08-10 Jason Merrill <jason@redhat.com>
4127
4128 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4129
f3365c12
JM
41302016-08-09 Jason Merrill <jason@redhat.com>
4131
4132 * c-common.c (c_common_attribute_table): vector_size affects type
4133 identity.
4134
f0bc3323
MP
41352016-08-09 Marek Polacek <polacek@redhat.com>
4136
4137 PR c/7652
4138 * c-ada-spec.c (dump_generic_ada_node): Add return.
4139
98e5a19a
JM
41402016-08-09 Jason Merrill <jason@redhat.com>
4141
4142 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4143 C++17 constexpr lambdas.
4144
895aa8e1
DM
41452016-08-08 David Malcolm <dmalcolm@redhat.com>
4146
4147 PR c/64955
4148 * c-common.h (selftest::c_format_c_tests): New declaration.
4149 (selftest::run_c_tests): New declaration.
4150 * c-format.c: Include "selftest.h.
4151 (format_warning_va): Add param "corrected_substring" and use
4152 it to add a replacement fix-it hint.
4153 (format_warning_at_substring): Likewise.
4154 (format_warning_at_char): Update for new param of
4155 format_warning_va.
4156 (argument_parser::check_argument_type): Pass "fki" to
4157 check_format_types.
4158 (check_format_types): Add param "fki" and pass it to
4159 format_type_warning.
4160 (deref_n_times): New function.
4161 (get_modifier_for_format_len): New function.
4162 (selftest::test_get_modifier_for_format_len): New function.
4163 (get_format_for_type): New function.
4164 (format_type_warning): Add param "fki" and use it to attempt
4165 to provide hints for argument types when calling
4166 format_warning_at_substring.
4167 (selftest::get_info): New function.
4168 (selftest::assert_format_for_type_streq): New function.
4169 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4170 (selftest::test_get_format_for_type_printf): New function.
4171 (selftest::test_get_format_for_type_scanf): New function.
4172 (selftest::c_format_c_tests): New function.
4173
e52ed3fe
DM
41742016-08-08 David Malcolm <dmalcolm@redhat.com>
4175
4176 PR c/52952
4177 * c-format.c: Include "diagnostic.h".
4178 (location_column_from_byte_offset): Delete.
4179 (location_from_offset): Delete.
4180 (format_warning_va): New function.
4181 (format_warning_at_substring): New function.
4182 (format_warning_at_char): New function.
4183 (check_format_arg): Capture location of format_tree and pass to
4184 check_format_info_main.
4185 (argument_parser): Add fields "start_of_this_format" and
4186 "format_string_cst".
4187 (flag_chars_t::validate): Add param "format_string_cst". Convert
4188 warning_at call using location_from_offset to call to
4189 format_warning_at_char.
4190 (argument_parser::argument_parser): Add param "format_string_cst_"
4191 and use use it to initialize field "format_string_cst".
4192 Initialize new field "start_of_this_format".
4193 (argument_parser::read_format_flags): Convert warning_at call
4194 using location_from_offset to a call to format_warning_at_char.
4195 (argument_parser::read_any_format_left_precision): Likewise.
4196 (argument_parser::read_any_format_precision): Likewise.
4197 (argument_parser::read_any_other_modifier): Likewise.
4198 (argument_parser::find_format_char_info): Likewise, in three places.
4199 (argument_parser::parse_any_scan_set): Likewise, in one place.
4200 (argument_parser::handle_conversions): Likewise, in two places.
4201 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4202 and use it to make a substring_loc. Pass the latter to
4203 check_format_types.
4204 (check_format_info_main): Add params "fmt_param_loc" and
4205 "format_string_cst". Convert warning_at calls using
4206 location_from_offset to calls to format_warning_at_char. Pass the
4207 new params to the arg_parser ctor. Pass "format_string_cst" to
4208 flag_chars.validate. Pass "fmt_param_loc" to
4209 arg_parser.check_argument_type.
4210 (check_format_types): Convert first param from a location_t
4211 to a const substring_loc & and rename to "fmt_loc". Attempt
4212 to extract the range of the relevant parameter and pass it
4213 to format_type_warning.
4214 (format_type_warning): Convert first param from a location_t
4215 to a const substring_loc & and rename to "fmt_loc". Add
4216 params "param_range" and "type". Replace calls to warning_at
4217 with calls to format_warning_at_substring.
4218
1c4d457e
DM
42192016-08-08 David Malcolm <dmalcolm@redhat.com>
4220
4221 * c-format.c (class flag_chars_t): New class.
4222 (struct length_modifier): New struct.
4223 (class argument_parser): New class.
4224 (flag_chars_t::flag_chars_t): New ctor.
4225 (flag_chars_t::has_char_p): New method.
4226 (flag_chars_t::add_char): New method.
4227 (flag_chars_t::validate): New method.
4228 (flag_chars_t::get_alloc_flag): New method.
4229 (flag_chars_t::assignment_suppression_p): New method.
4230 (argument_parser::argument_parser): New ctor.
4231 (argument_parser::read_any_dollar): New method.
4232 (argument_parser::read_format_flags): New method.
4233 (argument_parser::read_any_format_width): New method.
4234 (argument_parser::read_any_format_left_precision): New method.
4235 (argument_parser::read_any_format_precision): New method.
4236 (argument_parser::handle_alloc_chars): New method.
4237 (argument_parser::read_any_length_modifier): New method.
4238 (argument_parser::read_any_other_modifier): New method.
4239 (argument_parser::find_format_char_info): New method.
4240 (argument_parser::validate_flag_pairs): New method.
4241 (argument_parser::give_y2k_warnings): New method.
4242 (argument_parser::parse_any_scan_set): New method.
4243 (argument_parser::handle_conversions): New method.
4244 (argument_parser::check_argument_type): New method.
4245 (check_format_info_main): Introduce classes argument_parser
4246 and flag_chars_t, moving the code within the loop into methods
4247 of these classes. Make various locals "const".
4248
88fa5555
DM
42492016-08-05 David Malcolm <dmalcolm@redhat.com>
4250
4251 * c-common.c: Include "substring-locations.h".
4252 (get_cpp_ttype_from_string_type): New function.
4253 (g_string_concat_db): New global.
4254 (substring_loc::get_range): New method.
4255 * c-common.h (g_string_concat_db): New declaration.
4256 (class substring_loc): New class.
4257 * c-lex.c (lex_string): When concatenating strings, capture the
4258 locations of all tokens using a new obstack, and record the
4259 concatenation locations within g_string_concat_db.
4260 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4261 on the ggc-heap.
4262
78169471
MP
42632016-07-29 Marek Polacek <polacek@redhat.com>
4264
638fc14f
MP
4265 PR c/71926
4266 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4267 parentheses warning.
4268
78169471
MP
4269 PR c/71574
4270 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4271
1225d6b1
ML
42722016-07-28 Martin Liska <mliska@suse.cz>
4273
4274 PR gcov-profile/68025
4275 * c-common.c (handle_no_profile_instrument_function_attribute):
4276
ec1e2a40
BE
42772016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4278
4279 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4280 BITS_PER_UNIT_LOG.
4281
5ec2cd9f
JM
42822016-07-25 Jason Merrill <jason@redhat.com>
4283
4284 PR c++/65970
4285 * c.opt (fconstexpr-loop-limit): New.
4286
9dc5773f 42872016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4288
4289 PR c++/71675
4290 * c-common.c (resolve_overloaded_builtin): Avoid converting
4291 __atomic_compare_exchange_n return type to that of what its
4292 first argument points to.
4293
e3fe09c1
UB
42942016-07-22 Uros Bizjak <ubizjak@gmail.com>
4295
4296 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4297 ~(unsigned HOST_WIDE_INT) 0.
4298
bc91c436
ML
42992016-07-22 Martin Liska <mliska@suse.cz>
4300
4301 PR gcov-profile/69028
4302 PR gcov-profile/62047
4303 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4304 to the current_function_decl.
4305
451dcc66
JM
43062016-07-21 Jason Merrill <jason@redhat.com>
4307
4308 PR c++/65168
4309 * c-common.c (c_common_truthvalue_conversion): Check
4310 c_inhibit_evaluation_warnings for warning about address of
4311 reference.
4312
de6a69ee
DM
43132016-07-20 David Malcolm <dmalcolm@redhat.com>
4314
4315 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4316 const char *.
4317
d022c55a
JM
43182016-07-15 Jason Merrill <jason@redhat.com>
4319
4320 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4321
ddbbcb19
JJ
43222016-07-15 Jakub Jelinek <jakub@redhat.com>
4323
4324 PR c/71858
4325 * c-common.h (enum lookup_name_fuzzy_kind): Add
4326 FUZZY_LOOKUP_FUNCTION_NAME.
4327
d0cf395a
JM
43282016-07-08 Jason Merrill <jason@redhat.com>
4329
4330 P0145: Refining Expression Order for C++.
4331 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4332 * c-opts.c: Adjust.
4333
98d44e93
MT
43342016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4335
4336 PR c++/71214
4337 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4338
f9d8d994
TS
43392016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4340
4341 * c-pragma.h (enum pragma_kind): Rename
4342 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4343 users.
4344
4aa83879
RB
43452016-06-29 Richard Biener <rguenther@suse.de>
4346
4347 PR middle-end/71002
4348 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4349
a25bd9e6
JM
43502016-06-24 Jason Merrill <jason@redhat.com>
4351
4352 P0145R2: Refining Expression Order for C++.
4353 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4354 MODIFY_EXPR.
4355
a86451b9
JJ
43562016-06-24 Jakub Jelinek <jakub@redhat.com>
4357
4358 * c-common.c (check_builtin_function_arguments): Require last
4359 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4360 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4361 if the last argument is pointer to enumerated or boolean type.
4362
1a4f11c8
DM
43632016-06-22 David Malcolm <dmalcolm@redhat.com>
4364
4365 PR c/70339
4366 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4367 (lookup_name_fuzzy): New prototype.
4368
fe55692c
JDA
43692016-06-21 John David Anglin <danglin@gcc.gnu.org>
4370
4371 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4372
4eb24e01
JM
43732016-06-14 Jason Merrill <jason@redhat.com>
4374
4375 P0145R2: Refining Expression Order for C++.
4376 * c.opt (fargs-in-order): New.
4377 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4378
ef7cf206
JJ
43792016-06-13 Jakub Jelinek <jakub@redhat.com>
4380
0dda258b
JJ
4381 PR sanitizer/71498
4382 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4383 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4384
ef7cf206
JJ
4385 PR preprocessor/71183
4386 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4387 to cb_get_source_date_epoch.
4388
50b15873
JJ
43892016-06-10 Jakub Jelinek <jakub@redhat.com>
4390
4391 PR c/68657
4392 * c.opt (Wpsabi): Add Warning flag.
4393
4d926e34
MS
43942016-06-10 Martin Sebor <msebor@redhat.com>
4395
4396 PR c/71392
14ec014e 4397 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4398 the nonnull attribute in type-generic builtins.
4399
e01b4e16
MS
44002016-06-09 Martin Sebor <msebor@redhat.com>
4401
4402 PR c/70883
4403 * c-common.c (builtin_function_validate_nargs): Make text of error
4404 message consistent with others like it.
4405
44a845ca
MS
44062016-06-08 Martin Sebor <msebor@redhat.com>
4407 Jakub Jelinek <jakub@redhat.com>
4408
4409 PR c++/70507
4410 PR c/68120
4411 * c-common.c (check_builtin_function_arguments): Handle
4412 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4413
a80a7051
RB
44142016-06-08 Richard Biener <rguenther@suse.de>
4415
4416 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4417
bfd67b47
RB
44182016-06-07 Richard Biener <rguenther@suse.de>
4419
4420 PR c/61564
4421 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4422 options and warn about others.
4423
15c98b2e
ES
44242016-06-01 Eduard Sanou <dhole@openmailbox.org>
4425
4426 * c-common.c (get_source_date_epoch): Rename to
4427 cb_get_source_date_epoch.
4428 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4429 message when the parsing fails. Use error_at instead of fatal_error.
4430 * c-common.h (get_source_date_epoch): Rename to
4431 cb_get_source_date_epoch.
4432 * c-common.h (cb_get_source_date_epoch): Prototype.
4433 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4434 * c-common.h (c_omp_region_type): Remove trailing comma.
4435 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4436 * c-lex.c (c_lex_with_flags): Remove initialization of
4437 pfile->source_date_epoch.
4438
00631022
JJ
44392016-05-30 Jakub Jelinek <jakub@redhat.com>
4440
4441 PR c++/71349
4442 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4443 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4444 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4445 instead of C_OMP_CLAUSE_SPLIT_FOR.
4446
f17a223d
RB
44472016-05-24 Richard Biener <rguenther@suse.de>
4448
4449 PR middle-end/70434
4450 PR c/69504
4451 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4452 (convert_vector_to_array_for_subscript): ... this.
4453 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4454 VIEW_CONVERT_EXPR to an array type. Rename to ...
4455 (convert_vector_to_array_for_subscript): ... this.
4456
4f2e1536
MP
44572016-05-12 Marek Polacek <polacek@redhat.com>
4458
4459 PR c/70756
4460 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4461 size_in_bytes and pass LOC to it.
4462
d6e83a8d
MM
44632016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4464
4465 PR c/43651
4466 * c.opt (Wduplicate-decl-specifier): New option.
4467
5c3a10fb
MP
44682016-05-11 Marek Polacek <polacek@redhat.com>
4469
4470 PR c++/71024
4471 * c-common.c (diagnose_mismatched_attributes): New function.
4472 * c-common.h (diagnose_mismatched_attributes): Declare.
4473
deef7113
MP
44742016-05-04 Marek Polacek <polacek@redhat.com>
4475
4476 * c.opt (Wdangling-else): New option.
4477
79ce98bc
MP
44782016-05-03 Marek Polacek <polacek@redhat.com>
4479
4480 PR c/70859
4481 * c-common.c (builtin_function_validate_nargs): Add location
4482 parameter. Use it.
4483 (check_builtin_function_arguments): Add location and arguments
4484 parameters. Use them.
4485 * c-common.h (check_builtin_function_arguments): Update declaration.
4486
381cdae4
RB
44872016-05-03 Richard Biener <rguenther@suse.de>
4488
4489 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4490 allow call args to gimplify to SSA names.
4491
1d793c34
MP
44922016-05-03 Marek Polacek <polacek@redhat.com>
4493
4494 * c-common.h (enum c_omp_region_type): Remove stray comma.
4495
77886428
CP
44962016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4497
4498 * c-common.h (enum c_omp_region_type): Define.
4499
697e0b28
RS
45002016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4501
4502 * c-common.c (shorten_compare): Use wi::to_wide.
4503
e7ff0319
CP
45042016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4505
4506 PR middle-end/70626
4507 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4508 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4509 reduction clauses in acc parallel loops.
4510
2fff3db8
MP
45112016-04-29 Marek Polacek <polacek@redhat.com>
4512
4513 PR c/70852
4514 * c-common.c (warn_for_memset): Check domain before accessing it.
4515
509063eb
DV
45162016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4517
4518 PR/69089
4519 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4520 "aligned" attribute.
4521
b632761d
JM
45222016-04-28 Jason Merrill <jason@redhat.com>
4523
4524 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4525
174f6622
ES
45262016-04-28 Eduard Sanou <dhole@openmailbox.org>
4527 Matthias Klose <doko@debian.org>
4528
4529 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4530 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4531 handling.
4532 * c-common.h (get_source_date_epoch): Prototype.
4533 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4534
6bc2bb18
RB
45352015-04-27 Ryan Burn <contact@rnburn.com>
4536
4537 PR c++/69024
4538 PR c++/68997
4539 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4540 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4541 external linkage.
4542 (cilk_detect_and_unwrap): Corresponding changes.
4543 (extract_free_variables): Don't extract free variables from
4544 AGGR_INIT_EXPR slot.
4545 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4546 (cilk_recognize_spawn): Likewise.
4547
c1e1f433
BS
45482016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4549
4550 * c.opt (Wmemset-elt-size): New option.
4551 * c-common.c (warn_for_memset): New function.
4552 * c-common.h (warn_for_memset): Declare.
4553
d067e05f
JM
45542016-04-25 Jason Merrill <jason@redhat.com>
4555
4556 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4557 No longer static.
4558 * c-common.h: Declare it.
4559 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4560
9aa36ae5
JM
45612016-04-22 Jason Merrill <jason@redhat.com>
4562
4563 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4564
477d4906
IV
45652016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4566
4567 PR c++/69363
4568 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4569 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4570
fe37c7af
MM
45712016-04-18 Michael Matz <matz@suse.de>
4572
4573 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4574 and SET_DECL_ALIGN.
4575
23f2660f
EB
45762016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4577
4578 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4579 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4580 to incomplete types.
4581 (dump_nested_type): Remove redundant tests and tidy up.
4582 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4583 a type which is the typedef of an original type.
4584
1e77281b
MP
45852016-04-15 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/70651
4588 * c-common.c (build_va_arg): Change two asserts into errors and return
4589 error_mark_node.
4590
b3a77f21
MP
45912016-04-13 Marek Polacek <polacek@redhat.com>
4592
4593 PR c++/70639
4594 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4595 for switch statements, too.
4596
322b8466
JM
45972016-03-28 Jason Merrill <jason@redhat.com>
4598
4599 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4600
fbdb6baf
MP
46012016-03-23 Marek Polacek <polacek@redhat.com>
4602
4603 PR c++/69884
4604 * c.opt (Wignored-attributes): New option.
4605
5c240f4d
DM
46062016-03-22 David Malcolm <dmalcolm@redhat.com>
4607
4608 PR c/69993
4609 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4610 diagnostic text, reversing the order of the warning and note so
4611 that they appear in source order.
4612
14ba7b28
MP
46132016-03-17 Marek Polacek <polacek@redhat.com>
4614
4615 PR c/69407
4616 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4617 operations.
4618
08a1cadc
JM
46192016-03-14 Jason Merrill <jason@redhat.com>
4620
2aaeea19
JM
4621 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4622
08a1cadc
JM
4623 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4624
c06d25bb
RB
46252016-03-09 Richard Biener <rguenther@suse.de>
4626
4627 PR c/70143
4628 * c-common.c (strict_aliasing_warning): Add back
4629 alias_sets_conflict_p check.
4630
80aac5c8
JM
46312016-03-08 Jason Merrill <jason@redhat.com>
4632
4633 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4634
64b23c13
DM
46352016-03-04 David Malcolm <dmalcolm@redhat.com>
4636
4637 PR c/68187
4638 * c-indentation.c (get_visual_column): Move code to determine next
4639 tab stop to...
4640 (next_tab_stop): ...this new function.
4641 (line_contains_hash_if): Delete function.
4642 (detect_preprocessor_logic): Delete function.
4643 (get_first_nws_vis_column): New function.
4644 (detect_intervening_unindent): New function.
4645 (should_warn_for_misleading_indentation): Replace call to
4646 detect_preprocessor_logic with a call to
4647 detect_intervening_unindent.
4648
729526f5
DM
46492016-03-04 David Malcolm <dmalcolm@redhat.com>
4650
4651 PR c/68187
4652 * c-indentation.c (should_warn_for_misleading_indentation): When
4653 suppressing warnings about cases where the guard and body are on
4654 the same column, only use the first non-whitespace column in place
4655 of the guard token column when dealing with "else" clauses.
4656 When rejecting aligned BODY and NEXT, loosen the requirement
4657 from equality with the first non-whitespace of guard to simply
4658 that they not be indented relative to it.
4659
e9a35493
RB
46602016-03-04 Richard Biener <rguenther@suse.de>
4661
4662 PR c++/70054
4663 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4664 instead of alias_sets_conflict_p.
4665
1be56bc5
MP
46662016-03-01 Marek Polacek <polacek@redhat.com>
4667
4668 PR c++/69795
4669 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4670 any DECL.
4671
35886f0b
MS
46722016-02-22 Martin Sebor <msebor@redhat.com>
4673
4674 PR middle-end/69780
4675 * c-common.c (check_builtin_function_arguments): Validate and
4676 reject invalid arguments to __builtin_alloca_with_align.
4677
4246c8da
MW
46782016-02-20 Mark Wielaard <mjw@redhat.com>
4679
4680 PR c/28901
4681 * c.opt (Wunused-const-variable): Turn into Alias for...
4682 (Wunused-const-variable=): New option.
4683
268be88c
BE
46842016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4685
4686 PR c++/69865
4687 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4688 here...
4689 (c_common_init_options): ...to here.
4690 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4691
871b3f47
JJ
46922016-02-19 Jakub Jelinek <jakub@redhat.com>
4693
4694 PR c++/69826
4695 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4696 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4697 flag_preprocess_only.
4698
bf14eba2
JJ
46992016-02-16 Jakub Jelinek <jakub@redhat.com>
4700
4701 PR c/69835
4702 * c.opt (Wnonnull-compare): Enable for -Wall.
4703
ba6b3795
JJ
47042016-02-15 Jakub Jelinek <jakub@redhat.com>
4705
4706 PR c++/69797
4707 * c-common.c (sync_resolve_size): Diagnose too few arguments
4708 even when params is non-NULL empty vector.
4709
a011cd92
BS
47102016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4711
4712 PR target/60410
4713 * c.opt (fshort-double): Remove.
4714
46cb9332
MS
47152016-02-05 Martin Sebor <msebor@redhat.com>
4716
4717 PR c++/69662
4718 * c.opt (Warning options): Update -Wplacement-new to take
4719 an optional argument.
4720
e1b81f2b
JJ
47212016-02-01 Jakub Jelinek <jakub@redhat.com>
4722
4723 PR preprocessor/69543
4724 PR c/69558
4725 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4726 instead of loc to control_warning_option.
4727
b6adbb9f
NS
47282016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4729
4730 * c.opt (fopenacc-dim=): New option.
4731
5d70666e
RB
47322016-01-27 Ryan Burn <contact@rnburn.com>
4733
4734 PR cilkplus/69267
4735 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4736 gimplify_arg. Removed superfluous post_p argument.
4737 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4738 superfluous post_p argument.
4739 * c-gimplify.c (c_gimplify_expr): Likewise.
4740
01e1dea3
DM
47412016-01-26 David Malcolm <dmalcolm@redhat.com>
4742
4743 PR other/69006
4744 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4745 pp_newline_and_flush with pp_flush.
4746
9f04a53e
MS
47472016-01-20 Martin Sebor <msebor@redhat.com>
4748
4749 PR c/69405
4750 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4751 an incompatible argument when the argument isn't a valid tree node.
4752
7f26f7df
JM
47532016-01-18 Jason Merrill <jason@redhat.com>
4754
4755 PR c++/68767
4756 * c-common.c (check_function_arguments_recurse): Fold the whole
4757 COND_EXPR, not just the condition.
4758
f62bf092
TV
47592016-01-18 Tom de Vries <tom@codesourcery.com>
4760
4761 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4762 classify as loop clause.
4763
e0a575ff
JJ
47642016-01-15 Jakub Jelinek <jakub@redhat.com>
4765
4766 PR bootstrap/68271
4767 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4768 C++ FE no longer has limit on number of pragmas.
4769
47702015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4771
4772 PR c++/69048
4773 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4774 to add missing cleanup point.
b6e3db06 4775
c7df95d8
DM
47762016-01-14 David Malcolm <dmalcolm@redhat.com>
4777
4778 PR c++/68819
4779 * c-indentation.c (get_visual_column): Add location_t param.
4780 Handle the column number being zero by effectively disabling the
4781 warning, with an "inform".
4782 (should_warn_for_misleading_indentation): Add location_t argument
4783 for all uses of get_visual_column.
4784
21efdd80
PP
47852016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4786
4787 PR c++/69029
4788 * c-indentation.c (should_warn_for_misleading_indentation):
4789 Don't warn about do-while statements.
4790
7a127fa7
MS
47912016-01-07 Martin Sebor <msebor@redhat.com>
4792
4793 PR c/68966
4794 * c-common.c (sync_resolve_size): Reject first argument when it's
4795 a pointer to _Bool.
4796
c589e975
DM
47972016-01-05 David Malcolm <dmalcolm@redhat.com>
4798
4799 PR c/69122
4800 * c-indentation.c (get_visual_column): Remove default argument.
4801 (should_warn_for_misleading_indentation): For the multiline case,
4802 update call to get_visual_column for next_stmt_exploc so that it
4803 captures the location of the first non-whitespace character in the
4804 relevant line. Don't issue warnings if there is non-whitespace
4805 before the next statement.
4806
818ab71a
JJ
48072016-01-04 Jakub Jelinek <jakub@redhat.com>
4808
4809 Update copyright years.
4810
745e411d
DM
48112015-12-21 David Malcolm <dmalcolm@redhat.com>
4812
4813 * c-common.c (binary_op_error): Convert first param from
4814 location_t to rich_location * and use it when emitting an error.
4815 * c-common.h (binary_op_error): Convert first param from
4816 location_t to rich_location *.
4817
de67c4c3
DM
48182015-12-16 David Malcolm <dmalcolm@redhat.com>
4819
4820 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4821 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4822
4a38b02b
IV
48232015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4824
4825 * c-common.c (c_common_attribute_table): Handle "omp declare target
4826 link" attribute.
4827
54d62f51
JJ
48282015-12-14 Jakub Jelinek <jakub@redhat.com>
4829
4830 PR c/68833
4831 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4832
8d4227c8
TB
48332014-12-12 Tobias Burnus <burnus@net-b.de>
4834
4835 PR fortran/68815
4836 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4837 specifiers (%d, %i,%u and %c).
4838
f6069ccc
DM
48392015-12-10 David Malcolm <dmalcolm@redhat.com>
4840
4841 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4842
63bbf46d
JJ
48432015-12-08 Jakub Jelinek <jakub@redhat.com>
4844
4845 PR c/48088
4846 PR c/68657
4847 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4848 * c-pragma.c (handle_pragma_diagnostic): Adjust
4849 control_warning_option caller.
4850
f79520bb
DM
48512015-12-07 David Malcolm <dmalcolm@redhat.com>
4852
4853 * c-common.c (c_cpp_error): Update for change to
4854 rich_location::set_range.
4855
b3d5bc62
JJ
48562015-12-04 Paolo Bonzini <bonzini@gnu.org>
4857
4858 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4859 shifting 1 out of the sign bit.
4860
48612015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4862
4863 * c-common.c (c_common_attribute_table[]): Update max arguments
4864 count for "simd" attribute.
4865 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4866
6eb4a537
JJ
48672015-12-03 Jakub Jelinek <jakub@redhat.com>
4868
4869 PR preprocessor/57580
4870 * c-ppoutput.c (print): Change printed field to bool.
4871 Move src_file last for smaller padding.
4872 (init_pp_output): Set print.printed to false instead of 0.
4873 (scan_translation_unit): Fix up formatting. Set print.printed
4874 to true after printing something other than newline.
4875 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4876 (maybe_print_line_1): Set print.printed to false instead of 0.
4877 (print_line_1): Likewise.
4878 (do_line_change): Set print.printed to true instead of 1.
4879 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4880 dump_macro): Set print.printed to false after printing newline.
4881
4250754e
JM
48822015-12-02 Jason Merrill <jason@redhat.com>
4883
f479b43d
JM
4884 * c-common.c (fold_for_warn): New.
4885 (warn_logical_operator, warn_tautological_cmp)
4886 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4887
4250754e
JM
4888 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4889 (c_fully_fold_internal, decl_constant_value_for_optimization):
4890 Move to c/c-fold.c.
4891 * c-common.h: Don't declare decl_constant_value_for_optimization.
4892
e9e32ee6
JM
48932015-12-02 Joseph Myers <joseph@codesourcery.com>
4894
4895 PR c/68162
4896 * c-common.h (c_build_qualified_type): Add extra default
4897 arguments.
4898
37d5ad46
JB
48992015-12-01 Julian Brown <julian@codesourcery.com>
4900 Cesar Philippidis <cesar@codesourcery.com>
4901 James Norris <James_Norris@mentor.com>
4902
4903 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4904 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4905 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4906
f07862c7
EB
49072015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4908
4909 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4910 (decl_sloc_common): Delete and move bulk of processing to...
4911 (decl_sloc): ...here.
4912 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4913 (dump_ada_double_name): Remove S parameter and compute the suffix.
4914 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4915 element type and deal with an anonymous one.
4916 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4917 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4918 and remove reference to QUAL_UNION_TYPE.
4919 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4920 (dump_nested_type): ...here. New function extracted from above.
4921 Generate a full declaration for anonymous element type of arrays.
4922 (print_ada_declaration): Really skip anonymous declarations. Remove
4923 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4924 Clean up processing of declarations of array types and objects.
4925 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4926 Remove obsolete code and tidy up.
4927
75c8aac3
JH
49282015-11-29 Jan Hubicka <hubicka@ucw.cz>
4929
4930 PR c/67581
4931 * c-common.c (handle_transparent_union_attribute): Update
4932 also type variants.
4933
b58d3df2
ML
49342015-11-27 Martin Liska <mliska@suse.cz>
4935
4936 PR c++/68312
4937 * array-notation-common.c (cilkplus_extract_an_triplets):
4938 Release vector of vectors.
4939 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4940
89a01fcf
EB
49412015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4942
4943 PR c++/68527
4944 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4945 (print_ada_struct_decl): Likewise.
4946
cc5c5226
IZ
49472015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4948
4949 PR c++/68001
4950 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4951 * cilk.c (recognize_spawn): Determine location in a more precise
4952 way.
4953
269adb9d
JM
49542015-11-19 Jason Merrill <jason@redhat.com>
4955
4956 * c-common.c (shorten_compare): But look through macros from
4957 system headers.
4958
d0eccfcd
JM
49592015-11-18 Jason Merrill <jason@redhat.com>
4960
4961 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4962 non-constant operand comes from a macro.
4963
3e44547c
JM
49642015-11-17 Jason Merrill <jason@redhat.com>
4965
4966 PR bootstrap/68346
4967 * c-common.c (warn_tautological_cmp): Fold before checking for
4968 constants.
4969
0f62c7a0
MP
49702015-11-16 Marek Polacek <polacek@redhat.com>
4971
4972 PR c++/68362
4973 * c-common.c (check_case_bounds): Fold low and high cases.
4974
a868811e
MP
49752015-11-16 Marek Polacek <polacek@redhat.com>
4976
4977 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4978 * c-common.c (c_common_get_alias_set): Likewise.
4979 (handle_visibility_attribute): Likewise.
4980
fff77217
KY
49812015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4982
4983 * c-common.c (handle_simd_attribute): New.
4984 (struct attribute_spec): Add entry for "simd".
4985 (handle_simd_attribute): New.
4986
269e63b7
KT
49872015-11-13 Kai Tietz <ktietz70@googlemail.com>
4988
4989 * c-lex.c (interpret_float): Use fold_convert.
4990
ebedc9a3
DM
49912015-11-13 David Malcolm <dmalcolm@redhat.com>
4992
4993 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4994 and store it on the result.
4995 * c-opts.c (c_common_init_options): Set
4996 global_dc->colorize_source_p.
4997
6e232ba4
JN
49982015-11-12 James Norris <jnorris@codesourcery.com>
4999 Joseph Myers <joseph@codesourcery.com>
5000
7365279f 5001 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5002 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5003 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5004 PRAGMA_OACC_CLAUSE_LINK.
5005
e78bede6
MP
50062015-11-11 Marek Polacek <polacek@redhat.com>
5007
5008 PR c/68107
5009 PR c++/68266
5010 * c-common.c (valid_array_size_p): New function.
5011 * c-common.h (valid_array_size_p): Declare.
5012
3f8257db 50132015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5014
5015 PR bootstrap/68271
5016 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5017
69f293c9
AM
50182015-11-11 Andrew MacLeod <amacleod@redhat.com>
5019
5020 * array-notation-common.c: Remove unused header files.
5021 * c-ada-spec.c: Likewise.
5022 * c-cilkplus.c: Likewise.
5023 * c-common.c: Likewise.
5024 * c-cppbuiltin.c: Likewise.
5025 * c-dump.c: Likewise.
5026 * c-format.c: Likewise.
5027 * c-gimplify.c: Likewise.
5028 * c-indentation.c: Likewise.
5029 * c-lex.c: Likewise.
5030 * c-omp.c: Likewise.
5031 * c-opts.c: Likewise.
5032 * c-pch.c: Likewise.
5033 * c-ppoutput.c: Likewise.
5034 * c-pragma.c: Likewise.
5035 * c-pretty-print.c: Likewise.
5036 * c-semantics.c: Likewise.
5037 * c-ubsan.c: Likewise.
5038 * cilk.c: Likewise.
5039 * stub-objc.c: Likewise.
5040
3a40d81d
NS
50412015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5042 Cesar Philippidis <cesar@codesourcery.com>
5043 James Norris <jnorris@codesourcery.com>
5044 Julian Brown <julian@codesourcery.com>
5045 Nathan Sidwell <nathan@codesourcery.com>
5046
5047 * c-pragma.c (oacc_pragmas): Add "routine".
5048 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5049
ee45a32d
EB
50502015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5051
5052 * c-common.c (c_common_attributes): Add scalar_storage_order.
5053 (handle_scalar_storage_order_attribute): New function.
5054 * c-pragma.c (global_sso): New variable.
5055 (maybe_apply_pragma_scalar_storage_order): New function.
5056 (handle_pragma_scalar_storage_order): Likewise.
5057 (init_pragma): Register scalar_storage_order.
5058 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5059 * c.opt (Wscalar-storage-order): New warning.
5060 (fsso-struct=): New option.
5061
eb11eb15
MS
50622015-11-08 Martin Sebor <msebor@redhat.com>
5063
5064 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5065
0aad0198
RS
50662015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5067
5068 * c-common.c: Don't undef DEF_BUILTIN.
5069
8a645150
DM
50702015-11-06 David Malcolm <dmalcolm@redhat.com>
5071
5072 * c-common.c (c_cpp_error): Convert parameter from location_t to
5073 rich_location *. Eliminate the "column_override" parameter and
5074 the call to diagnostic_override_column.
5075 Update the "done_lexing" clause to set range 0
5076 on the rich_location, rather than overwriting a location_t.
5077 * c-common.h (c_cpp_error): Convert parameter from location_t to
5078 rich_location *. Eliminate the "column_override" parameter.
5079
7a5e4956
CP
50802015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5081 Thomas Schwinge <thomas@codesourcery.com>
5082 James Norris <jnorris@codesourcery.com>
5083
5084 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5085 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5086 clauses with parallel and kernels and loops.
5087 * c-pragma.h (enum pragma_omp_clause): Add entries for
5088 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5089 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5090 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5091 INDEPENDENT,SEQ}.
5092 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5093
e2f5cc96
MS
50942015-11-05 Martin Sebor <msebor@redhat.com>
5095
5096 PR c++/67942
5097 * c.opt (-Wplacement-new): New option.
5098
e01d41e5
JJ
50992015-11-05 Jakub Jelinek <jakub@redhat.com>
5100
5101 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5102 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5103 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5104 save_expr or create_tmp_var* if TEST is true.
5105 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5106 Don't call add_stmt here.
5107 (struct c_omp_check_loop_iv_data): New type.
5108 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5109 c_omp_check_loop_iv_exprs): New functions.
5110 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5111 distribute.
5112 (c_omp_declare_simd_clauses_to_numbers): Change
5113 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5114 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5115 from numbers to PARM_DECLs.
5116
595278be
MM
51172015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5118
5119 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5120 flag_checking.
5121
3f8257db 51222015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5123
5124 PR c++-common/67882
b3d5bc62
JJ
5125 * c-common.h (fold_offsetof_1): Add argument.
5126 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5127 offsetof expressions that reference elements past the end of
5128 an array.
5129
4bf9e5a8
TS
51302015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5131 Chung-Lin Tang <cltang@codesourcery.com>
5132
5133 * c-pragma.c (oacc_pragmas): Add "atomic".
5134 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5135
3b1661a9
ES
51362015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5137
5138 * c-common.c (handle_target_clones_attribute): New.
5139 (c_common_attribute_table): Add handle_target_clones_attribute.
5140 (handle_always_inline_attribute): Add check on target_clones attribute.
5141 (handle_target_attribute): Ditto.
5142
2adfab87
AM
51432015-10-29 Andrew MacLeod <amacleod@redhat.com>
5144
5145 * array-notation-common.c: Reorder #include's and remove duplicates.
5146 * c-ada-spec.c: Likewise.
5147 * c-cilkplus.c: Likewise.
5148 * c-common.c: Likewise.
5149 * c-cppbuiltin.c: Likewise.
5150 * c-dump.c: Likewise.
5151 * c-format.c: Likewise.
5152 * c-gimplify.c: Likewise.
5153 * c-indentation.c: Likewise.
5154 * c-lex.c: Likewise.
5155 * c-omp.c: Likewise.
5156 * c-opts.c: Likewise.
5157 * c-pch.c: Likewise.
5158 * c-ppoutput.c: Likewise.
5159 * c-pragma.c: Likewise.
5160 * c-pretty-print.c: Likewise.
5161 * c-semantics.c: Likewise.
5162 * c-ubsan.c: Likewise.
5163 * cilk.c: Likewise.
5164 * stub-objc.c: Likewise.
5165
d90ec4f2
JM
51662015-10-28 Jason Merrill <jason@redhat.com>
5167
5168 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5169
88bae6f4
TS
51702015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5171 James Norris <jnorris@codesourcery.com>
5172 Cesar Philippidis <cesar@codesourcery.com>
5173
5174 PR c/64765
5175 PR c/64880
5176 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5177 * c-omp.c (c_oacc_split_loop_clauses): New function.
5178
b1726d6c
MS
51792015-10-21 Martin Sebor <msebor@redhat.com>
5180
5181 PR driver/68043
5182 * c.opt: End each sentence that describes an option with a period.
5183
fa60eeb9
MP
51842015-10-20 Marek Polacek <polacek@redhat.com>
5185
5186 * array-notation-common.c (is_cilkplus_vector_p): Define.
5187 * c-common.h (is_cilkplus_vector_p): Declare.
5188
95979049
MP
51892015-10-20 Marek Polacek <polacek@redhat.com>
5190
5191 * c.opt (std=gnu++11): Do not describe as experimental.
5192 (std=gnu++14): Likewise.
5193
2a9fb712
JM
51942015-10-19 Jason Merrill <jason@redhat.com>
5195
5196 * c-cppbuiltin.c (c_cpp_builtins): Define
5197 __cpp_nontype_template_args.
5198
13b380a3
JM
51992015-10-19 Jason Merrill <jason@redhat.com>
5200
5201 * c-cppbuiltin.c (c_cpp_builtins): Define
5202 __cpp_enumerator_attributes, __cpp_fold_expressions,
5203 __cpp_unicode_characters.
5204
d9a6bd32
JJ
52052015-10-13 Jakub Jelinek <jakub@redhat.com>
5206 Aldy Hernandez <aldyh@redhat.com>
5207
5208 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5209 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5210 (c_define_builtins): Likewise.
5211 * c-common.h (enum c_omp_clause_split): Add
5212 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5213 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5214 (c_finish_omp_for): Add ORIG_DECLV argument.
5215 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5216 201511 instead of 201307.
5217 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5218 OMP_CRITICAL_CLAUSES to it.
5219 (c_finish_omp_ordered): Add CLAUSES argument, set
5220 OMP_ORDERED_CLAUSES to it.
5221 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5222 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5223 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5224 constructs and new OpenMP 4.5 clauses. Clear
5225 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5226 verification code.
5227 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5228 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5229 (enum pragma_omp_clause): Add
5230 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5231 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5232
624d31fe
RS
52332015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5234
5235 * c-lex.c (interpret_float): Use real_equal instead of
5236 REAL_VALUES_EQUAL.
5237
b8fd7909
JM
52382015-10-04 Jason Merrill <jason@redhat.com>
5239
5240 Implement N4514, C++ Extensions for Transactional Memory.
5241 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5242 (c_common_attribute_table): Add transaction_safe_dynamic.
5243 transaction_safe now affects type identity.
5244 (handle_tm_attribute): Handle transaction_safe_dynamic.
5245 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5246 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5247 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5248 (D_TRANSMEM): New.
5249 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5250 * c-pretty-print.c (pp_c_attributes_display): Don't print
5251 transaction_safe in C++.
5252
12651878
MP
52532015-10-02 Marek Polacek <polacek@redhat.com>
5254
5255 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5256
3e3b8d63
MP
52572015-10-02 Marek Polacek <polacek@redhat.com>
5258
5259 PR c/64249
5260 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5261 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5262 * c.opt (Wduplicated-cond): New option.
5263
0d1a8f75
JM
52642015-10-01 Joseph Myers <joseph@codesourcery.com>
5265
5266 * c.opt (std=c11): Do not describe as experimental.
5267 (std=gnu11): Likewise.
5268 (std=iso9899:2011): Likewise.
5269
3e32ee19
NS
52702015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5271
5272 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5273 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5274
974348ee
MP
52752015-09-25 Marek Polacek <polacek@redhat.com>
5276
5277 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5278 (ubsan_instrument_shift): Likewise.
5279
15dbc1a6
MP
52802015-09-25 Marek Polacek <polacek@redhat.com>
5281
5282 PR sanitizer/64906
5283 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5284
6b95d7cc
PP
52852015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5286
5287 * c-indentation.c (should_warn_for_misleading_indentation):
5288 Compare next_stmt_vis_column with guard_line_first_nws instead
5289 of with guard_line_vis_column.
5290
c1822f9c
MLI
52912015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5292
5293 PR c/49654
5294 PR c/49655
5295 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5296 options and options not valid for the current language.
5297
d5398058
PP
52982015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5299
5300 * c-indentation.c (should_warn_for_misleading_indentation):
5301 Float out and consolidate the calls to get_visual_column that
5302 are passed guard_exploc as an argument. Compare
5303 next_stmt_vis_column with guard_line_first_nws instead of with
5304 body_line_first_nws.
5305
6b333269
NS
53062015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5307
5308 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5309 Wnamespaces): New C++ warnings.
5310
a75f1574
JM
53112015-09-22 Jason Merrill <jason@redhat.com>
5312
5313 * c-common.h (abi_compat_version_crosses): New.
5314 (warn_abi_version): Declare.
5315 * c-common.c: Define it.
5316 * c-opts.c (c_common_post_options): Handle it.
5317 flag_abi_compat_version defaults to 8.
5318
bdaaa8b7
VV
53192015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5320
5321 Complete the implementation of N4230, Nested namespace definition.
5322 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5323 __cpp_nested_namespace_definitions.
5324
eaa797e8
MLI
53252015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5326
5327 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5328
c4914de6
MLI
53292015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5330
5331 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5332 when warning.
5333 * c-pragma.h (pragma_lex): Add optional loc argument.
5334
fcb87c50
MM
53352015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5336
5337 * c-format.c (check_format_arg): Adjust to use common block size in all
5338 object pools.
5339
31bdd08a
DM
53402015-09-15 David Malcolm <dmalcolm@redhat.com>
5341
5342 * c-format.c (location_from_offset): Update for change in
5343 signature of location_get_source_line.
5344 * c-indentation.c (get_visual_column): Likewise.
5345 (line_contains_hash_if): Likewise.
5346
aa9f4b4c
MP
53472015-09-14 Marek Polacek <polacek@redhat.com>
5348
5349 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5350 setting various warnings.
5351
aa256c4a
MP
53522015-09-14 Marek Polacek <polacek@redhat.com>
5353
5354 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5355 a negative value.
5356
0f876f22
MW
53572015-09-11 Mark Wielaard <mjw@redhat.com>
5358
5359 PR c/28901
5360 * c.opt (Wunused-variable): Option from common.opt.
5361 (Wunused-const-variable): New option.
5362
273aa49e
PC
53632015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5364
5365 PR c++/53184
5366 * c.opt ([Wsubobject-linkage]): Add.
5367
1807ffc1
MS
53682015-09-03 Martin Sebor <msebor@redhat.com>
5369
5370 PR c/66516
5371 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5372 functions.
5373 * c-common.c (reject_gcc_builtin): Define.
5374
38942840
BI
53752015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5376
5377 PR middle-end/60586
5378 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5379 prototype.
5380 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5381 cilk_gimplify_call_params_in_spawned_fn.
5382 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5383 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5384 unwrapping.
5385
c316b5e4
MP
53862015-08-25 Marek Polacek <polacek@redhat.com>
5387
5388 PR middle-end/67330
5389 * c-common.c (handle_weak_attribute): Don't check whether the
5390 visibility can be changed here.
5391
584a7c46
MLI
53922015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5393
5394 * c-lex.c (c_lex_with_flags): Use explicit locations.
5395
a79683d5
TS
53962015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5397
5398 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5399 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5400
61717a45
FXC
54012015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5402
5403 PR middle-end/36757
5404 * c-common.c (check_builtin_function_arguments): Add check
5405 for BUILT_IN_SIGNBIT argument.
5406
329524f5
PC
54072015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5408
5409 PR c++/67160
5410 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5411 in c++1z mode.
5412
4ee55665
MP
54132015-08-17 Marek Polacek <polacek@redhat.com>
5414
5415 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5416 with whitespaces before qualifier names.
5417
b893e375
MP
54182015-08-12 Marek Polacek <polacek@redhat.com>
5419
5420 PR c++/55095
5421 * c-common.c (maybe_warn_shift_overflow): Properly handle
5422 left-shifting 1 into the sign bit.
5423
c2d89095
MLI
54242015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5425
5426 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5427
971e17ff
AS
54282015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5429 Braden Obrzut <admin@maniacsvault.net>
5430 Jason Merrill <jason@redhat.com>
5431
5432 Add C++ Concepts TS support.
5433 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5434 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5435 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5436 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5437 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5438 * c.opt (fconcepts): New.
5439
b3d5bc62
JJ
54402015-08-02 Martin Sebor <msebor@redhat.com>
5441
5442 * c.opt (-Wframe-address): New warning option.
5443
8ebca419
PP
54442015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5445
5446 * c-indentation.c (should_warn_for_misleading_indentation):
5447 Improve heuristics.
5448
1a1e101f
PP
54492015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5450
5451 * c-indentation.c (get_visual_column): Add parameter first_nws,
5452 use it. Update comment documenting the function.
5453 (is_first_nonwhitespace_on_line): Remove.
5454 (should_warn_for_misleading_indentation): Replace usage of
5455 of is_first_nonwhitespace_on_line with get_visual_column.
5456
992118a1
PP
54572015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5458
5459 * c-indentation.h (struct token_indent_info): Define.
5460 (get_token_indent_info): Define.
5461 (warn_for_misleading_information): Declare.
5462 * c-common.h (warn_for_misleading_information): Remove.
5463 * c-identation.c (warn_for_misleading_indentation):
5464 Change declaration to take three token_indent_infos. Adjust
5465 accordingly.
5466 * c-identation.c (should_warn_for_misleading_indentation):
5467 Likewise. Bail out early if the body is a compound statement.
5468 (guard_tinfo_to_string): Define.
5469
e8fa3817
JM
54702015-07-30 Jason Merrill <jason@redhat.com>
5471
5472 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5473 '*' for reference decay.
5474
173864e8
MP
54752015-07-30 Marek Polacek <polacek@redhat.com>
5476
5477 * c-common.c (warn_tautological_cmp): Bail for float types.
5478
f2afe6dd
MP
54792015-07-27 Marek Polacek <polacek@redhat.com>
5480
5481 PR bootstrap/67030
5482 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5483
05b28fd6
MP
54842015-07-27 Marek Polacek <polacek@redhat.com>
5485
5486 PR c++/66555
5487 PR c/54979
5488 * c-common.c (find_array_ref_with_const_idx_r): New function.
5489 (warn_tautological_cmp): New function.
5490 * c-common.h (warn_tautological_cmp): Declare.
5491 * c.opt (Wtautological-compare): New option.
5492
5a5062b8
MP
54932015-07-23 Marek Polacek <polacek@redhat.com>
5494
5495 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5496 (ubsan_instrument_shift): Likewise.
5497
dc891fe7
MP
54982015-07-23 Marek Polacek <polacek@redhat.com>
5499
5500 PR sanitizer/66908
5501 * c-ubsan.c: Include gimplify.h.
5502 (ubsan_instrument_division): Unshare OP0 and OP1.
5503 (ubsan_instrument_shift): Likewise.
5504
451b5e48
MP
55052015-07-20 Marek Polacek <polacek@redhat.com>
5506 Richard Sandiford <richard.sandiford@arm.com>
5507
5508 PR c++/55095
5509 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5510 Use EXPR_LOC_OR_LOC.
5511 (maybe_warn_shift_overflow): New function.
5512 * c-common.h (maybe_warn_shift_overflow): Declare.
5513 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5514 * c.opt (Wshift-overflow): New option.
5515
fb0b2914
ML
55162015-07-16 Martin Liska <mliska@suse.cz>
5517
5518 * c-format.c (static void check_format_info_main): Use
5519 object_allocator instead of pool_allocator.
5520 (check_format_arg): Likewise.
5521 (check_format_info_main): Likewise.
5522
903f5c23
AM
55232015-07-15 Andrew MacLeod <amacleod@redhat.com>
5524
5525 * c-opts.c: Remove multiline #include comment.
5526
026c3cfd
AH
55272015-07-12 Aldy Hernandez <aldyh@redhat.com>
5528
5529 * c-common.c: Fix double word typos.
5530
bb49ee66
EB
55312015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5532
5533 * c-ada-spec.h (cpp_operation): Revert latest change.
5534 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5535 constructors and destructors.
5536
1916bcb5
AM
55372015-07-09 Andrew MacLeod <amacleod@redhat.com>
5538
5539 * c-common.h: Adjust includes for flags.h changes.
5540 * stub-objc.c: Likewise.
026c3cfd 5541
a9dcd529
EB
55422015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5543
5544 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5545 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5546
b03b462f
JJ
55472015-07-08 Jakub Jelinek <jakub@redhat.com>
5548
5549 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5550 are to be removed, return NULL rather than original clauses list.
5551
c7131fb2
AM
55522015-07-07 Andrew MacLeod <amacleod@redhat.com>
5553
5554 * array-notation-common.c: Adjust includes.
5555 * c-ada-spec.c: Likewise.
5556 * c-cilkplus.c: Likewise.
5557 * c-common.h: Likewise.
5558 * c-cppbuiltin.c: Likewise.
5559 * c-dump.c: Likewise.
5560 * c-format.c: Likewise.
5561 * c-gimplify.c: Likewise.
5562 * c-indentation.c: Likewise.
5563 * c-lex.c: Likewise.
5564 * c-omp.c: Likewise.
5565 * c-opts.c: Likewise.
5566 * c-pch.c: Likewise.
5567 * c-ppoutput.c: Likewise.
5568 * c-pragma.c: Likewise.
5569 * c-pretty-print.c: Likewise.
5570 * c-semantics.c: Likewise.
5571 * c-ubsan.c: Likewise.
5572 * cilk.c: Likewise.
5573 * stub-objc.c: Likewise.
5574
2a7fb83f
EB
55752015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5576
5577 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5578 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5579
a03c9bf1
JM
55802015-07-01 Jason Merrill <jason@redhat.com>
5581
36a85135
JM
5582 * c-common.h (D_CXX11): Rename from D_CXX0X.
5583 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5584 * c-common.c: Adjust.
5585
e7fa68d5
JM
5586 * c-opts.c (c_common_post_options): Default to C++14.
5587
a03c9bf1
JM
5588 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5589
fe95b036
ESR
55902015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5591
5592 Implement N4197 - Adding u8 character literals
b3d5bc62 5593 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5594 CPP_CHAR.
b3d5bc62 5595 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5596 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5597 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5598 and CPP_UTF8CHAR tokens.
5599 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5600
da2e71c9
MLI
56012015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5602
5603 PR fortran/66605
5604 * c-common.c (do_warn_unused_parameter): Move here.
5605 * c-common.h (do_warn_unused_parameter): Declare.
5606
b155cfd9
MP
56072015-06-29 Marek Polacek <polacek@redhat.com>
5608
5609 PR c/66322
5610 * c-common.c (check_case_bounds): Add bool * parameter. Set
5611 OUTSIDE_RANGE_P.
5612 (c_add_case_label): Add bool * parameter. Pass it down to
5613 check_case_bounds.
5614 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5615 warning here.
5616 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5617 declarations.
5618
31521951
MP
56192015-06-27 Marek Polacek <polacek@redhat.com>
5620
5621 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5622 or VECTOR_INTEGER_TYPE_P throughout.
5623 * c-gimplify.c: Likewise.
5624
22d03525
MP
56252015-06-26 Marek Polacek <polacek@redhat.com>
5626
5627 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5628 * c-common.c (c_fully_fold_internal): Likewise.
5629 (c_alignof_expr): Likewise.
5630 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5631 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5632 * cilk.c (create_parm_list): Likewise.
22d03525 5633
af05e6e5
MP
56342015-06-26 Marek Polacek <polacek@redhat.com>
5635
5636 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5637
f0889939
AM
56382015-06-25 Andrew MacLeod <amacleod@redhat.com>
5639
5640 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5641 * c-gimplify.c: Likewise.
5642 * c-pragma.c: Likewise.
5643 * c-ubsan.c: Likewise.
5644 * cilk.c: Likewise.
5645
ca752f39
RS
56462015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5647
5648 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5649 ggc_hasher.
5650
16a16ec7
AM
56512015-06-25 Andrew MacLeod <amacleod@redhat.com>
5652
5653 * cilk.c: Move calls.h after tm.h in the include chain.
5654
0ae9bd27
MP
56552015-06-25 Marek Polacek <polacek@redhat.com>
5656
5657 * array-notation-common.c: Use VAR_P throughout.
5658 * c-ada-spec.c: Likewise.
5659 * c-common.c: Likewise.
5660 * c-format.c: Likewise.
5661 * c-gimplify.c: Likewise.
5662 * c-omp.c: Likewise.
5663 * c-pragma.c: Likewise.
5664 * c-pretty-print.c: Likewise.
5665 * cilk.c: Likewise.
5666
62f9079a
MP
56672015-06-25 Marek Polacek <polacek@redhat.com>
5668
5669 * cilk.c (extract_free_variables): Use is_global_var.
5670
0fa16060
RS
56712015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5672
5673 * c-common.c: Don't include target-def.h.
5674
a68ae2e1
MP
56752015-06-23 Marek Polacek <polacek@redhat.com>
5676
5677 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5678 when comparing INTEGER_CSTs.
5679
c6a2f2d9
PMR
56802015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5681
5682 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5683 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5684 (dump_ada_template): Skip partially specialized types.
5685
6b4db501
MM
56862015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5687
5688 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5689 swapping.
5690
abb226c9
AM
56912015-06-17 Andrew MacLeod <amacleod@redhat.com>
5692
5693 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5694 * c-ada-spec.c: Likewise.
5695 * c-cilkplus.c: Likewise.
5696 * c-common.c: Likewise.
5697 * c-common.h: Likewise.
5698 * c-cppbuiltin.c: Likewise.
5699 * c-dump.c: Likewise.
5700 * c-format.c: Likewise.
5701 * c-gimplify.c: Likewise.
5702 * c-indentation.c: Likewise.
5703 * c-lex.c: Likewise.
5704 * c-omp.c: Likewise.
5705 * c-opts.c: Likewise.
5706 * c-pch.c: Likewise.
5707 * c-ppoutput.c: Likewise.
5708 * c-pragma.c: Likewise.
5709 * c-pretty-print.c: Likewise.
5710 * c-semantics.c: Likewise.
5711 * c-ubsan.c: Likewise.
5712 * cilk.c: Likewise.
5713 * stub-objc.c: Likewise.
5714
076fecad
PP
57152015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5716
5717 PR c++/65168
5718 * c-common.c (c_common_truthvalue_conversion): Warn when
5719 converting an address of a reference to a truth value.
5720
13fdf2e2
AM
57212015-06-08 Andrew MacLeod <amacleod@redhat.com>
5722
5723 * array-notation-common.c : Adjust include files.
5724 * c-ada-spec.c : Likewise.
5725 * c-cilkplus.c : Likewise.
5726 * c-common.c : Likewise.
5727 * c-common.h : Likewise.
5728 * c-cppbuiltin.c : Likewise.
5729 * c-dump.c : Likewise.
5730 * c-format.c : Likewise.
5731 * c-gimplify.c : Likewise.
5732 * c-indentation.c : Likewise.
5733 * c-lex.c : Likewise.
5734 * c-omp.c : Likewise.
5735 * c-opts.c : Likewise.
5736 * c-pch.c : Likewise.
5737 * c-ppoutput.c : Likewise.
5738 * c-pragma.c : Likewise.
5739 * c-pretty-print.c : Likewise.
5740 * c-semantics.c : Likewise.
5741 * c-ubsan.c : Likewise.
5742 * cilk.c : Likewise.
5743 * stub-objc.c : Likewise.
5744
a1661b90
MP
57452015-06-08 Marek Polacek <polacek@redhat.com>
5746
5747 PR c/66415
5748 * c-format.c (location_from_offset): Return LOC if LINE is null.
5749
d7438551
AH
57502015-06-05 Aldy Hernandez <aldyh@redhat.com>
5751
5752 * c-common.h (c_parse_final_cleanups): New prototype.
5753 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5754
b3d5bc62
JJ
57552015-06-04 Sriraman Tallam <tmsriram@google.com>
5756
5757 * c-common.c (noplt): New attribute.
5758 (handle_noplt_attribute): New handler.
5759
ecb9f223
AM
57602015-06-04 Andrew MacLeod <amacleod@redhat.com>
5761
5762 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5763 * c-ada-spec.c: Likewise.
5764 * c-cilkplus.c: Likewise.
5765 * c-common.c: Likewise.
5766 * c-common.h: Likewise.
5767 * c-cppbuiltin.c: Likewise.
5768 * c-dump.c: Likewise.
5769 * c-format.c: Likewise.
5770 * c-gimplify.c: Likewise.
5771 * c-indentation.c: Likewise.
5772 * c-lex.c: Likewise.
5773 * c-omp.c: Likewise.
5774 * c-opts.c: Likewise.
5775 * c-pch.c: Likewise.
5776 * c-ppoutput.c: Likewise.
5777 * c-pragma.c: Likewise.
5778 * c-pretty-print.c: Likewise.
5779 * c-semantics.c: Likewise.
5780 * c-ubsan.c: Likewise.
5781 * cilk.c: Likewise.
5782 * stub-objc.c: Likewise.
5783
6ac48155
DM
57842015-06-02 David Malcolm <dmalcolm@redhat.com>
5785
5786 PR c/66220:
5787 * c-indentation.c (should_warn_for_misleading_indentation): Use
5788 expand_location rather than expand_location_to_spelling_point.
5789 Don't warn if the guarding statement is more indented than the
5790 next/body stmts.
5791
773ce42e
DM
57922015-06-02 David Malcolm <dmalcolm@redhat.com>
5793
5794 * c-indentation.c (warn_for_misleading_indentation): Bail out
5795 immediately if -Wmisleading-indentation isn't enabled.
5796
4fef8379
ML
57972015-06-01 Martin Liska <mliska@suse.cz>
5798
5799 * c-format.c (check_format_arg):Use new type-based pool allocator.
5800 (check_format_info_main) Likewise.
5801
1edfb384
EB
58022015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5803
5804 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5805 (has_nontrivial_methods): Likewise.
5806
9677ef52
MP
58072015-05-25 Marek Polacek <polacek@redhat.com>
5808
5809 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5810
fd5c817a
MP
58112015-05-22 Marek Polacek <polacek@redhat.com>
5812
5813 PR c/47043
5814 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5815
a2f45fe6 58162015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5817
5818 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5819 STACK_GROWS_DOWNWARD.
5820
a2f45fe6 58212015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5822
5823 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5824 STACK_GROWS_DOWNWARD rather than if it is defined.
5825
0fee2ac2 58262015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5827
0fee2ac2
MLI
5828 PR c/52952
5829 * c-format.c (location_column_from_byte_offset): New.
5830 (location_from_offset): New.
5831 (struct format_wanted_type): Add offset_loc field.
5832 (check_format_info): Move handling of location for extra arguments
5833 closer to the point of warning.
5834 (check_format_info_main): Pass the result of location_from_offset
5835 to warning_at.
5836 (format_type_warning): Pass the result of location_from_offset
5837 to warning_at.
5838
cf4ef6f7
MP
58392015-05-20 Marek Polacek <polacek@redhat.com>
5840
5841 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5842
3a65ee74
MP
58432015-05-20 Marek Polacek <polacek@redhat.com>
5844
5845 * c-ada-spec.c (dump_sloc): Use DECL_P.
5846
21b634ae
MP
58472015-05-20 Marek Polacek <polacek@redhat.com>
5848
5849 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5850 * c-common.c: Likewise.
5851
0e50b624
DM
58522015-05-19 David Malcolm <dmalcolm@redhat.com>
5853
5854 * c-common.h (fe_file_change): Strengthen param from
5855 const line_map * to const line_map_ordinary *.
5856 (pp_file_change): Likewise.
5857 * c-lex.c (fe_file_change): Likewise.
5858 (cb_define): Use linemap_check_ordinary when invoking
5859 SOURCE_LINE.
5860 (cb_undef): Likewise.
5861 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5862 invoking cb_file_change.
5863 (c_finish_options): Likewise.
5864 (push_command_line_include): Likewise.
5865 (cb_file_change): Strengthen param "new_map" from
5866 const line_map * to const line_map_ordinary *.
5867 * c-ppoutput.c (cb_define): Likewise for local "map".
5868 (pp_file_change): Likewise for param "map" and local "from".
5869
fab27f52
MM
58702015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5871
5872 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5873
2fe1d762
TV
58742015-05-18 Tom de Vries <tom@codesourcery.com>
5875
5876 * c-common.c (build_va_arg_1): New function.
5877 (build_va_arg): Add address operator to va_list operand if necessary.
5878
7a37fa90
MM
58792015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5880
5881 PR c/48956
5882 * c-common.c (int_safely_convertible_to_real_p): Define.
5883 (unsafe_conversion_p): Check conversions involving complex types.
5884 (conversion_warning): Add new warning message for conversions which
5885 discard imaginary component.
5886 * c-common.h: (enum conversion_safety): Add new enumerator for such
5887 conversions.
5888
3aa3c9fc
MP
58892015-05-14 Marek Polacek <polacek@redhat.com>
5890
5891 PR c/66066
5892 PR c/66127
5893 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5894 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5895 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5896 use it. If FOR_INT_CONST, require that all evaluated operands be
5897 INTEGER_CSTs.
5898
c3388e62
DM
58992015-05-12 David Malcolm <dmalcolm@redhat.com>
5900
5901 * c-common.h (warn_for_misleading_indentation): New prototype.
5902 * c-indentation.c: New file.
5903 * c.opt (Wmisleading-indentation): New option.
5904
c7b38fd5
TV
59052015-05-12 Tom de Vries <tom@codesourcery.com>
5906
5907 PR tree-optimization/66010
5908 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5909
381bf11e
JM
59102015-05-09 Jason Merrill <jason@redhat.com>
5911
edff0c06
JM
5912 * c-opts.c (c_common_post_options): Also clear
5913 cpp_opts->cpp_warn_cxx11_compat.
5914
129211bc
JM
5915 * c-common.h (enum cxx_dialect): Add cxx_unset.
5916 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5917 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5918
381bf11e
JM
5919 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5920 (std=gnu++0x): Mark as Undocumented.
5921 (std=gnu++1y): Add deprecated message.
5922
fe191308
JM
59232015-05-08 Jason Merrill <jason@redhat.com>
5924
765189ff
JM
5925 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5926 * c-opts.c: Adjust.
5927
fe191308
JM
5928 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5929
755e528f
MP
59302015-05-08 Marek Polacek <polacek@redhat.com>
5931
5932 PR c/64918
5933 * c.opt (Woverride-init-side-effects): New option.
5934
0173bd2a
MP
59352015-05-07 Marek Polacek <polacek@redhat.com>
5936
5937 PR c/65179
5938 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5939 negative value.
5940 * c.opt (Wshift-negative-value): New option.
5941 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5942 when -Wextra and C99/C++11 mode.
5943
e0f0d3b9
MP
59442015-05-07 Marek Polacek <polacek@redhat.com>
5945 Martin Uecker <uecker@eecs.berkeley.edu>
5946
5947 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5948 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5949
8243e2a9
JM
59502015-05-05 Jason Merrill <jason@redhat.com>
5951
5952 * c.opt (Wterminate): New.
5953
577cd070
MP
59542015-04-30 Marek Polacek <polacek@redhat.com>
5955
5956 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5957 require that the non-constant be of a boolean type.
5958
0373796b
JT
59592015-04-29 Josh Triplett <josh@joshtriplett.org>
5960
e0f0d3b9
MP
5961 * c-common.c (handle_section_attribute): Refactor to reduce
5962 nesting and distinguish between error cases.
0373796b 5963
716c0ba6
MP
59642015-04-29 Marek Polacek <polacek@redhat.com>
5965
5966 PR c/64610
5967 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5968 with 0/1.
5969
8848828b
JJ
59702015-04-29 Jakub Jelinek <jakub@redhat.com>
5971
5972 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5973 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5974 HOST_BITS_PER_WIDE_INT.
5975
ecd0e562
TV
59762015-04-28 Tom de Vries <tom@codesourcery.com>
5977
5978 PR tree-optimization/65887
5979 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5980
2a877204 59812015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5982 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5983
5984 * c-ada-spec.c (in_function): Delete.
5985 (dump_generic_ada_node): Do not change in_function and remove the
5986 redundant code dealing with it.
5987 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5988 (print_ada_methods): Output the static member functions in a nested
5989 package after the regular methods as well as associated renamings.
5990
4853031e
MP
59912015-04-24 Marek Polacek <polacek@redhat.com>
5992
5993 PR c/65830
5994 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5995 and OPT_Wshift_count_overflow.
5996
8c2b7f79
MP
5997 PR c/63357
5998 * c-common.c (warn_logical_operator): Warn if the operands have the
5999 same expressions.
6000
b8787813
MP
60012015-04-24 Marek Polacek <polacek@redhat.com>
6002
6003 PR c/61534
6004 * c-common.c (warn_logical_operator): Bail if either operand comes
6005 from a macro expansion.
6006
8fba1830
BRF
60072015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6008
6009 PR target/55143
6010 * c-common.c (c_default_pointer_mode): Add definition.
6011 * c-common.h (c_default_pointer_mode): Add declaration.
6012
17958621
JJ
60132015-03-11 Jakub Jelinek <jakub@redhat.com>
6014
6015 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6016 on record_builtin_type argument.
6017
7ccb1a11
JJ
60182015-03-10 Jakub Jelinek <jakub@redhat.com>
6019
6020 PR c/65120
6021 * c-common.c (warn_logical_not_parentheses): Don't warn for
6022 !x == 0 or !x != 0.
6023
04fd785e
MP
60242015-03-07 Marek Polacek <polacek@redhat.com>
6025
6026 PR sanitizer/65280
6027 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6028 before trying to figure out whether we have a flexible array member.
6029
a4e26206 60302015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6031 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6032
6033 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6034
0d2489f4
EB
60352015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6036
6037 PR ada/65319
6038 * c-ada-spec.c (print_destructor): Remove obsolete code.
6039
83ed54d7
EB
60402015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6041
6042 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6043 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6044 DECL_TEMPLATE_RESULT emulations.
6045 (dump_ada_template)): Add guard for TYPE_METHODS.
6046
7631f0e2
MP
60472015-02-27 Marek Polacek <polacek@redhat.com>
6048
6049 PR c/65040
6050 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6051
d1783ae5
KT
60522015-02-27 Kai Tietz <ktietz@redhat.com>
6053
6054 PR c/35330
6055 * c-pragma.c (handle_pragma_weak): Do not try to create
6056 weak/alias of declarations not being function, or variable
6057 declarations.
6058
56a9f6bc
TS
60592015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6060
6061 PR libgomp/64625
6062 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6063 Remove macros.
6064 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6065
3d5cb23d
MP
60662015-02-16 Marek Polacek <polacek@redhat.com>
6067
6068 PR c/65066
6069 * c-format.c (check_format_types): Handle null param.
6070
fa008882
MP
60712015-02-13 Marek Polacek <polacek@redhat.com>
6072
6073 PR c/65040
6074 * c-format.c (check_format_types): Don't warn about different
6075 signedness if the original value is in the range of WANTED_TYPE.
6076
785f21af
JM
60772015-02-12 Jason Merrill <jason@redhat.com>
6078
6079 PR c++/64956
6080 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6081 to the current highest version.
6082 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6083
4886ec8e
JJ
60842015-02-04 Jakub Jelinek <jakub@redhat.com>
6085
6086 PR c/64824
6087 PR c/64868
6088 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6089 instead of RDIV_EXPR. Use build_binary_op instead of
6090 build2_loc.
6091
40fecdd6
JM
60922015-01-30 Joseph Myers <joseph@codesourcery.com>
6093
6094 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6095 to pass input_location as first argument.
6096
a0c88d06
TV
60972015-01-23 Tom de Vries <tom@codesourcery.com>
6098
6099 PR libgomp/64672
6100 * c.opt (fopenacc): Mark as LTO option.
6101
1506ae0e
TV
61022015-01-23 Tom de Vries <tom@codesourcery.com>
6103
6104 PR libgomp/64707
6105 * c.opt (fopenmp): Mark as LTO option.
6106
31be63ab
JJ
61072015-01-21 Jakub Jelinek <jakub@redhat.com>
6108
6109 PR c/63307
b1726d6c 6110 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6111 (compare_decls): Fix up formatting.
6112
61132015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6114
6115 PR c/63307
6116 * cilk.c: Include vec.h.
6117 (struct cilk_decls): New structure.
6118 (wrapper_parm_cb): Split this function to...
6119 (fill_decls_vec): ...this...
6120 (create_parm_list): ...and this.
6121 (compare_decls): New function.
6122 (for_local_cb): Remove.
6123 (wrapper_local_cb): Ditto.
6124 (build_wrapper_type): For now first traverse and fill vector of
6125 declarations then sort it and then deal with sorted vector.
6126 (cilk_outline): Ditto.
6127 (declare_one_free_variable): Ditto.
6128
6875457f
JM
61292015-01-21 Jason Merrill <jason@redhat.com>
6130
6131 PR c++/64629
6132 * c-format.c (check_format_arg): Call decl_constant_value.
6133
185c9e56
ML
61342015-01-19 Martin Liska <mliska@suse.cz>
6135
6136 * c-common.c (handle_noicf_attribute): New function.
6137
41dbbb37
TS
61382015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6139 Bernd Schmidt <bernds@codesourcery.com>
6140 James Norris <jnorris@codesourcery.com>
6141 Cesar Philippidis <cesar@codesourcery.com>
6142 Ilmir Usmanov <i.usmanov@samsung.com>
6143 Jakub Jelinek <jakub@redhat.com>
6144
6145 * c.opt (fopenacc): New option.
6146 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6147 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6148 New macros.
6149 * c-common.h (c_finish_oacc_wait): New prototype.
6150 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6151 (c_finish_oacc_wait): New function.
6152 * c-pragma.c (oacc_pragmas): New variable.
6153 (c_pp_lookup_pragma, init_pragma): Handle it.
6154 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6155 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6156 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6157 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6158 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6159 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6160 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6161 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6162 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6163 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6164 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6165 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6166 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6167 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6168 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6169 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6170 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6171 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6172 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6173 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6174 PRAGMA_OACC_CLAUSE_WORKER.
6175
3f8257db 61762015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6177
6178 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6179 for the new option fstack-protector_explicit.
6180 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6181 (handle_stack_protect_attribute): New function.
6182
3f8257db 61832015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6184
6185 * c.opt: New option -Warray-bounds=.
6186
adfac8df
JJ
61872015-01-09 Michael Collison <michael.collison@linaro.org>
6188
6189 * array-notation-common.c: Include hash-set.h, machmode.h,
6190 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6191 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6192 * c-ada-spec.c: Ditto.
6193 * c-cilkplus.c: Ditto.
6194 * c-common.c: Include input.h due to flattening of tree.h.
6195 Define macro GCC_C_COMMON_C.
6196 * c-common.h: Flatten tree.h header files into c-common.h.
6197 Remove include of tree-core.h.
6198 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6199 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6200 fold-const.h, wide-int.h, and inchash.h due to
6201 flattening of tree.h.
6202 * c-dump.c: Ditto.
6203 * c-format.c: Flatten tree.h header files into c-common.h.
6204 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6205 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6206 fold-const.h, wide-int.h, and inchash.h due to
6207 flattening of tree.h.
6208 * c-dump.c: Include hash-set.h, machmode.h,
6209 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6210 fold-const.h, wide-int.h, and inchash.h due to
6211 flattening of tree.h.
6212 * c-format.c: Include hash-set.h, machmode.h,
6213 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6214 fold-const.h, wide-int.h, inchash.h and real.h due to
6215 flattening of tree.h.
6216 * c-gimplify.c: Include hash-set.h, machmode.h,
6217 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6218 fold-const.h, wide-int.h, and inchash.h due to
6219 flattening of tree.h.
6220 * cilk.c: Ditto.
6221 * c-lex.c: Ditto.
6222 * c-omp.c: Ditto.
6223 * c-opts.c: Ditto.
6224 * c-pch.c: Ditto.
6225 * c-ppoutput.c: Ditto.
6226 * c-pragma.c: Ditto.
6227 * c-pretty-print.c: Ditto.
6228 * c-semantics.c: Ditto.
6229 * c-ubsan.c: Ditto.
6230 * stub-objc.c: Ditto.
6231
f5481fc4
JM
62322015-01-08 Jason Merrill <jason@redhat.com>
6233
6234 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6235 do_ubsan_in_current_function.
6236 (ubsan_maybe_instrument_reference_or_call): Likewise.
6237 * c-ubsan.h: Declare it.
6238
de35aa66
MS
62392015-01-08 Mike Stump <mikestump@comcast.net>
6240
6241 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6242
4a9a42ab
MP
62432015-01-07 Marek Polacek <polacek@redhat.com>
6244
6245 PR c/64440
6246 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6247 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6248
2f42e5de
TS
62492015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6250
6251 PR c++/31397
6252 * c.opt (Wsuggest-override): New option.
6253
5624e564
JJ
62542015-01-05 Jakub Jelinek <jakub@redhat.com>
6255
6256 Update copyright years.
6257
5bd012f8
MP
62582015-01-05 Marek Polacek <polacek@redhat.com>
6259
6260 PR c/64423
6261 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6262 parameter. Use it.
6263 * c-common.h (warn_array_subscript_with_type_char): Update
6264 declaration.
6265
a7fa8d18
ESR
62662014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6267
6268 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6269 Control macro with flag_sized_deallocation.
6270
3f8257db 62712014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6272
6273 * c.opt (Wdiscarded-array-qualifiers): New option.
6274
1f8d3e84
JJ
62752014-12-19 Jakub Jelinek <jakub@redhat.com>
6276
6277 PR preprocessor/63831
6278 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6279 and __has_cpp_attribute here.
6280 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6281 c_common_has_attribute.
6282 * c-common.h (c_common_has_attribute): New prototype.
6283 * c-lex.c (init_c_lex): Set cb->has_attribute to
6284 c_common_has_attribute instead of cb_has_attribute.
6285 (get_token_no_padding): New function.
6286 (cb_has_attribute): Renamed to ...
6287 (c_common_has_attribute): ... this. No longer static. Use
6288 get_token_no_padding, require ()s, don't build TREE_LIST
6289 unnecessarily, fix up formatting, adjust diagnostics, call
6290 init_attributes.
6291
20b06add
JM
62922014-12-15 Jason Merrill <jason@redhat.com>
6293
6294 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6295 (-Wsized-deallocation): New.
6296 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6297 to on in C++14 and up.
6298
94a073b2
JM
62992014-12-11 Jason Merrill <jason@redhat.com>
6300
acaa5911
JM
6301 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6302
94a073b2
JM
6303 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6304 we aren't complaining about VLAs.
6305
7fb66c15
MP
63062014-12-06 Marek Polacek <polacek@redhat.com>
6307
6308 PR tree-optimization/64183
6309 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6310 shift-expression if it is integer_type_node. Use types_compatible_p.
6311
b731b390
JJ
63122014-11-29 Jakub Jelinek <jakub@redhat.com>
6313
6314 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6315 last argument from create_tmp_var_raw and create_tmp_var calls.
6316 * cilk.c (gimplify_cilk_spawn): Likewise.
6317 * c-omp.c (c_finish_omp_atomic): Likewise.
6318
6a4da643
MP
63192014-11-28 Marek Polacek <polacek@redhat.com>
6320
6321 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6322 instead of unsigned_type_node.
6323
541e35a6
MP
63242014-11-28 Marek Polacek <polacek@redhat.com>
6325
6326 PR c/63862
6327 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6328 to op1_utype.
6329 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6330 expression to unsigned_type_node.
6331
dcc97066
MW
63322014-11-20 Mark Wielaard <mjw@redhat.com>
6333
6334 PR debug/38757
6335 * c-opts.c (set_std_c89): Set lang_hooks.name.
6336 (set_std_c99): Likewise.
6337 (set_std_c11): Likewise.
6338 (set_std_cxx98): Likewise.
6339 (set_std_cxx11): Likewise.
6340 (set_std_cxx14): Likewise.
6341 (set_std_cxx1z): Likewise.
6342
aa7da51a
JJ
63432014-11-21 Jakub Jelinek <jakub@redhat.com>
6344
6345 PR target/63764
6346 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6347 return type to bool.
009a3480 6348 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6349 (convert_vector_to_pointer_for_subscript): Change return type to
6350 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6351 and copy it into a TARGET_EXPR and use that instead of *vecp
6352 directly.
6353
538dd0b7
DM
63542014-11-19 David Malcolm <dmalcolm@redhat.com>
6355
6356 Merger of git branch "gimple-classes-v2-option-3".
6357 * ChangeLog.gimple-classes: New.
6358 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6359 from being just a vec<gimple> to a vec<gbind *>.
6360
c39a5e99
JJ
63612014-11-18 Jakub Jelinek <jakub@redhat.com>
6362
6363 PR sanitizer/63813
6364 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6365 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6366 get_pointer_alignment for non-pointers. Use ptype, or if it is
6367 reference type, corresponding pointer type, as type of kind
6368 argument.
6369 (ubsan_maybe_instrument_reference,
6370 ubsan_maybe_instrument_member_call): Adjust callers.
6371
8537a4a9
MP
63722014-11-15 Marek Polacek <polacek@redhat.com>
6373
6374 PR middle-end/63884
6375 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6376 for NULL fndecl.
6377 (extract_array_notation_exprs): Return for NULL node.
6378
2079956a
JM
63792014-11-12 Joseph Myers <joseph@codesourcery.com>
6380
6381 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6382 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6383
1304953e
JJ
63842014-11-12 Jakub Jelinek <jakub@redhat.com>
6385
6386 PR c/59708
6387 * c-common.c (check_builtin_function_arguments): Handle
6388 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6389
e5e44252
AK
63902014-11-10 Andi Kleen <ak@linux.intel.com>
6391
6392 PR c/60804
6393 * c-common.h (check_no_cilk): Declare.
6394 * cilk.c (get_error_location): New function.
6395 (check_no_cilk): Dito.
6396
e64b984d
AK
63972014-11-10 Andi Kleen <ak@linux.intel.com>
6398
6399 * cilk.c (recognize_spawn): Use expression location
6400 for error message.
6401
13c21655
PC
64022014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6403
6404 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6405
42fd12b1
ESR
64062014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6407
6408 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6409 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6410 (__cpp_range_based_for, __cpp_initializer_lists,
6411 __cpp_delegating_constructors, __cpp_nsdmi,
6412 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6413 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6414 __has_cpp_attribute.
6415 * c-lex.c (cb_has_attribute): New callback CPP function;
6416 (init_c_lex): Set has_attribute callback.
6417
6f450181
RB
64182014-11-04 Richard Biener <rguenther@suse.de>
6419
6420 * c-common.c (shorten_compare): Do not shorten mixed
6421 DFP and non-DFP compares.
6422
26f0e1d6
ESR
64232014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6424
6425 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6426 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6427 Commentary and rearrangement of tests.
6428 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6429 Commentary and rearrangement of tests.
ab20d992 6430 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6431 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6432
ef4bddc2
RS
64332014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6434
6435 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6436 enum from machine_mode.
6437
c582198b
AM
64382014-10-28 Andrew MacLeod <amacleod@redhat.com>
6439
adfac8df
JJ
6440 * c-common.c: Adjust include files.
6441 * c-gimplify.c: Ditto.
6442 * cilk.c: Ditto.
6443 * c-pragma.c: Ditto.
6444 * c-ubsan.c: Ditto.
c582198b 6445
60393bbc
AM
64462014-10-27 Andrew MacLeod <amacleod@redhat.com>
6447
6448 * c-gimplify.c: Adjust include files.
6449
d723bb7c
MLI
64502014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6451
6452 PR c++/53061
6453 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6454 c_common_initialize_diagnostics.
6455 * c-common.h: Likewise.
6456
90f3520e
MP
64572014-10-24 Marek Polacek <polacek@redhat.com>
6458
6459 PR c/56980
6460 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6461 print "struct"/"union"/"enum" for typedefed names.
6462
59d7607a
MP
64632014-10-23 Marek Polacek <polacek@redhat.com>
6464
6465 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6466 in unsigned type.
6467
d95a2703
JJ
64682014-10-22 Jakub Jelinek <jakub@redhat.com>
6469 Yury Gribov <y.gribov@samsung.com>
6470
6471 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6472 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6473 instead of flag_sanitize_recover as bool flag.
6474
8e6ef852
KY
64752014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6476
6477 * cilk.c: Revert previous change.
6478
948cf550
IZ
64792014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6480
6481 PR c/63307
6482 * cilk.c: Include vec.h.
6483 (struct cilk_decls): New structure.
6484 (wrapper_parm_cb): Split this function to...
6485 (fill_decls_vec): ...this...
6486 (create_parm_list): ...and this.
6487 (compare_decls): New function.
6488 (for_local_cb): Remove.
6489 (wrapper_local_cb): Ditto.
6490 (build_wrapper_type): For now first traverse and fill vector of
6491 declarations then sort it and then deal with sorted vector.
6492 (cilk_outline): Ditto.
6493 (declare_one_free_variable): Ditto.
6494
92574c7c
MP
64952014-10-17 Marek Polacek <polacek@redhat.com>
6496
6497 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6498 * c.opt (Wimplicit-int): Initialize to -1.
6499
83685514
AM
65002014-10-16 Andrew MacLeod <amacleod@redhat.com>
6501
6502 * c-pragma.c: Adjust include files.
6503 * c-semantics.c: Likewise.
6504
5b8300ea
DD
65052014-10-16 DJ Delorie <dj@redhat.com>
6506
6507 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6508 multiples of bytes.
6509
5f83e90b
JM
65102014-10-14 Jason Merrill <jason@redhat.com>
6511
6512 PR c++/63455
6513 * c-common.h (CPP_PREPARSED_EXPR): New.
6514 (N_CP_TTYPES): Adjust.
6515
d73326ca
MP
65162014-10-15 Marek Polacek <polacek@redhat.com>
6517
6518 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6519
78a7c317
DD
65202014-10-14 DJ Delorie <dj@redhat.com>
6521
6522 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6523 types, not just __int128.
6524 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6525 types, not just __int128.
6526 (cpp_atomic_builtins): Round pointer sizes up.
6527 (type_suffix): Use type precision, not specific types.
6528 * c-common.c (c_common_reswords): Remove __int128 special case.
6529 (c_common_type_for_size): Check for all __intN types, not just
6530 __int128.
6531 (c_common_type_for_mode): Likewise.
6532 (c_common_signed_or_unsigned_type): Likewise.
6533 (c_build_bitfield_integer_type): Likewise.
6534 (c_common_nodes_and_builtins): Likewise.
6535 (keyword_begins_type_specifier): Likewise.
6536 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6537 __intN variants.
6538
2a22f99c
TS
65392014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6540
6541 * c-common.c: Use hash_table instead of hashtab.
6542
2a8ef767
ESR
65432014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6544
adfac8df 6545 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6546 C++11 section.
6547
3c9aabbd
MG
65482014-10-03 Marc Glisse <marc.glisse@inria.fr>
6549
6550 PR c++/54427
6551 PR c++/57198
6552 PR c++/58845
6553 * c-common.c (warn_logical_operator): Punt for vectors.
6554
a15f7cb8
ESR
65552014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6556
6557 Implement SD-6: SG10 Feature Test Recommendations
6558 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6559 macros and the __has_header macro.
6560
8d0cf15e
JM
65612014-09-30 Jason Merrill <jason@redhat.com>
6562
dd5d5481
JM
6563 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6564 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6565 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6566
b752325e
JM
6567 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6568 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6569
8d0cf15e
JM
6570 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6571 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6572
083e891e
MP
65732014-09-24 Marek Polacek <polacek@redhat.com>
6574
6575 PR c/61405
6576 PR c/53874
6577 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6578
7861b648
AK
65792014-09-23 Andi Kleen <ak@linux.intel.com>
6580
6581 * c-common.c (handle_no_reorder_attribute): New function.
6582 (c_common_attribute_table): Add no_reorder attribute.
6583
9a79452d
JM
65842014-09-22 Joseph Myers <joseph@codesourcery.com>
6585
6586 * c-cppbuiltin.c (c_cpp_builtins): Define
6587 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6588 modes.
6589
dd69f047
JM
65902014-09-18 Joseph Myers <joseph@codesourcery.com>
6591
6592 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6593 for supported floating-point modes.
6594
737a4826
MLI
65952014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6596
6597 * c.opt (Wpsabi): Use LangEnabledBy.
6598 * c-opts.c (c_common_handle_option): Do not handle here.
6599
8cc4b7a2
JM
66002014-09-12 Joseph Myers <joseph@codesourcery.com>
6601
6602 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6603 macros for floating-point modes.
6604
179b5a55
MG
66052014-09-11 Marc Glisse <marc.glisse@inria.fr>
6606
6607 PR target/58757
6608 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6609 __*_DENORM_MIN__ without denormals.
6610
570a11fe
JJ
66112014-09-10 Jakub Jelinek <jakub@redhat.com>
6612
6613 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6614 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6615 ubsan_create_data callers.
6616 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6617 index is constant or BIT_AND_EXPR with constant mask and is
6618 small enough for the bound.
6619 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6620 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6621
b559c810
MLI
66222014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6623
6624 * c.opt: Add CppReason to various flags.
6625 (Wdate-time): Re-sort.
6626 * c-common.c: Include c-common.h earlier.
6627 (struct reason_option_codes_t): Delete.
6628 (c_option_controlling_cpp_error): Prefix global type and struct
6629 with cpp_.
6630
1ef33fd4
MLI
66312014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6632
6633 * c.opt (Wnormalized): New.
6634 (Wnormalized=): Use Enum and Reject Negative.
6635 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6636
66bb34c0
JM
66372014-09-08 Joseph Myers <joseph@codesourcery.com>
6638
6639 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6640 digits of floating-point modes if -fbuilding-libgcc.
6641
53d68b9f
JM
66422014-09-05 Joseph Myers <joseph@codesourcery.com>
6643
6644 * c-cppbuiltin.c (c_cpp_builtins): Also define
6645 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6646 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6647 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6648 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6649 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6650 __LIBGCC_STACK_GROWS_DOWNWARD__,
6651 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6652 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6653 __LIBGCC_DWARF_FRAME_REGISTERS__,
6654 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6655 __LIBGCC_STACK_POINTER_REGNUM__ and
6656 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6657 (builtin_define_with_value): Handle backslash-escaping in string
6658 macro values.
6659
f65586dc
RB
66602014-09-05 Richard Biener <rguenther@suse.de>
6661
6662 PR middle-end/63148
6663 * c-format.c (check_format_arg): Properly handle
6664 effectively signed POINTER_PLUS_EXPR offset.
6665
2b71f4a4
MLI
66662014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6667
6668 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6669 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6670 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6671 and Init.
6672 * c-opts.c (c_common_handle_option): Do not handle here.
6673 (sanitize_cpp_opts): Likewise.
6674 * c-common.c (struct reason_option_codes_t): Handle
6675 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6676
d2e4feca
MP
66772014-09-03 Marek Polacek <polacek@redhat.com>
6678
6679 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6680
9a771876
JJ
66812014-09-02 Jakub Jelinek <jakub@redhat.com>
6682 Balaji V. Iyer <balaji.v.iyer@intel.com>
6683 Igor Zamyatin <igor.zamyatin@intel.com>
6684
6685 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6686 * c-common.c (c_common_reswords): Added _Cilk_for.
6687 * c-common.h (enum rid): Added RID_CILK_FOR.
6688 (cilk_for_number_of_iterations): Add declaration.
6689 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6690 CILK_FOR.
6691 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6692 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6693
81b5d104
MLI
66942014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6695
6696 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6697 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6698 Wundef): Use CPP, Var and Init.
6699 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6700
b753b37b
MLI
67012014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6702
6703 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6704 * c-opts.c (c_common_handle_option): Do not handle here.
6705
028aee17
JM
67062014-08-25 Jason Merrill <jason@redhat.com>
6707
6708 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6709 -std=c++14 and -std=gnu++14, rather than the reverse.
6710 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6711 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6712 * c-common.h (cxx_dialect): Remove cxx1y.
6713
e4276ba5
ESR
67142014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6715
6716 * c-common.h (enum cxx_dialect): Add cxx14.
6717 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6718 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6719 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6720
a545cacd
JM
67212014-08-22 Jason Merrill <jason@redhat.com>
6722
6723 * c.opt (std=gnu++17): Fix alias.
6724
59ea0364
MP
67252014-08-22 Marek Polacek <polacek@redhat.com>
6726
6727 PR c++/62199
6728 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6729 check for vector types. Drop LHS argument.
6730 * c-common.h (warn_logical_not_parentheses): Adjust.
6731
596e808c
MLI
67322014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6733
6734 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6735 (Wmultichar): Likewise.
6736 (Wdate-time): Use C-family languages instead of Common. Use CPP
6737 and Var.
6738 * c-opts.c (c_common_handle_option): Do not handle the above
6739 options here.
6740 (sanitize_cpp_opts): Likewise.
6741
18767f65
MLI
67422014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6743
6744 PR fortran/44054
6745 * c-opts.c: Include tree-diagnostics.h.
6746 (c_diagnostic_finalizer): New.
6747 (c_common_initialize_diagnostics): Use it.
6748
b4413594
MLI
67492014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6750
6751 PR preprocessor/51303
6752 * c-common.c (struct reason_option_codes_t option_codes):
6753 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6754
43f9a13c
MLI
67552014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6756
6757 PR c/60975
6758 PR c/53063
6759 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6760 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6761 (c_common_post_options): Call init_global_opts_from_cpp.
6762 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6763
04159acf
MP
67642014-08-19 Marek Polacek <polacek@redhat.com>
6765
6766 PR c++/62153
6767 * c-common.c (maybe_warn_bool_compare): New function.
6768 * c-common.h (maybe_warn_bool_compare): Declare.
6769 * c.opt (Wbool-compare): New option.
6770
35aff4fb
MP
67712014-08-19 Marek Polacek <polacek@redhat.com>
6772
6773 * c.opt (Wc99-c11-compat): New option.
6774
177cce46
MP
67752014-08-19 Marek Polacek <polacek@redhat.com>
6776
6777 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6778 to warn_c90_c99_compat.
6779 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6780 to -1.
6781
6ae9194f
MLI
67822014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6783 Steven Bosscher <steven@gcc.gnu.org>
6784
6785 PR c/52952
6786 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6787 format_check_results.
6788 (check_function_format): Use true and add comment for boolean
6789 argument.
6790 (finish_dollar_format_checking): Use explicit location when warning.
6791 (check_format_info): Likewise.
6792 (check_format_arg): Set extra_arg_loc and format_string_loc.
6793 (check_format_info_main): Use explicit location when warning.
6794 (check_format_types): Pass explicit location.
6795 (format_type_warning): Likewise.
6796
8e54f6d3
MLI
67972014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6798
6799 PR fortran/44054
6800 * c-format.c: Handle Fortran flags.
6801
cd4e76fc
IZ
68022014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6803
6804 PR other/61962
6805 * array-notation-common.c (find_rank): Added handling for other
6806 types of references.
6807
f3bede71
MP
68082014-08-10 Marek Polacek <polacek@redhat.com>
6809
6810 PR c/51849
6811 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6812 * c.opt (Wc90-c99-compat): Add option.
6813
9f25a338
TS
68142014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6815
6816 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6817
62e4eb35
MP
68182014-08-03 Marek Polacek <polacek@redhat.com>
6819
ab20d992 6820 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6821 (c_add_case_label): Pass loc to check_case_value.
6822
b787e7a2
TS
68232014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6824
6825 * cilk.c: Use hash_map instead of pointer_map.
6826
6e2830c3
TS
68272014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6828
6829 * c-gimplify.c: Use hash_set instead of pointer_set.
6830
a7ee52fb
IZ
68312014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6832
6833 PR middle-end/61455
6834 * array-notation-common.c (extract_array_notation_exprs): Handling
6835 of DECL_EXPR added.
6836
944fa280
JJ
68372014-08-01 Jakub Jelinek <jakub@redhat.com>
6838
6839 * c-common.h (min_align_of_type): Removed prototype.
6840 * c-common.c (min_align_of_type): Removed.
6841 * c-ubsan.h (ubsan_maybe_instrument_reference,
6842 ubsan_maybe_instrument_member_call): New prototypes.
6843 * c-ubsan.c: Include stor-layout.h and builtins.h.
6844 (ubsan_maybe_instrument_reference_or_call,
6845 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6846 functions.
6847
b4dfdc11
MG
68482014-07-31 Marc Glisse <marc.glisse@inria.fr>
6849
6850 PR c++/60517
6851 * c.opt (-Wreturn-local-addr): Move to common.opt.
6852
a41844e5
JM
68532014-07-30 Jason Merrill <jason@redhat.com>
6854
6855 PR c++/61659
6856 PR c++/61687
6857 Revert:
6858 * c.opt (-fuse-all-virtuals): New.
6859
976d5a22
TT
68602014-07-30 Tom Tromey <tromey@redhat.com>
6861
6862 PR c/59855
6863 * c.opt (Wdesignated-init): New option.
6864 * c-common.c (c_common_attribute_table): Add "designated_init".
6865 (handle_designated_init): New function.
6866
cdc94aca
MP
68672014-07-24 Marek Polacek <polacek@redhat.com>
6868
6869 PR c/57653
6870 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6871
f41373b6
DS
68722014-07-16 Dodji Seketeli <dodji@redhat.com>
6873
6874 PR preprocessor/60723 - missing system-ness marks for macro tokens
6875 * c-ppoutput.c (struct print::prev_was_system_token): New data
6876 member.
6877 (init_pp_output): Initialize it.
6878 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6879 (do_line_change): Return a flag saying if a line marker was
6880 emitted or not.
6881 (scan_translation_unit): Detect if the system-ness of the token we
6882 are about to emit is different from the one of the previously
6883 emitted token. If so, emit a line marker. Avoid emitting useless
6884 adjacent line markers. Avoid emitting line markers for tokens
6885 originating from the expansion of built-in macros.
6886 (scan_translation_unit_directives_only): Adjust.
6887
4d661eaa
MP
68882014-07-15 Marek Polacek <polacek@redhat.com>
6889
6890 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6891 TYPE_MAX_VALUE is NULL.
6892
b108f48f
JJ
68932014-07-14 Jakub Jelinek <jakub@redhat.com>
6894
6895 PR middle-end/61294
6896 * c.opt (Wmemset-transposed-args): New warning.
6897
c0221884
JM
68982014-07-10 Jason Merrill <jason@redhat.com>
6899
6900 PR c++/61659
6901 PR c++/61687
6902 * c.opt (-fuse-all-virtuals): New.
6903
63dfbb95
RB
69042014-07-09 Richard Biener <rguenther@suse.de>
6905
6906 PR c-family/61741
6907 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6908 using unsigned arithmetic if overflow does not wrap instead of
6909 if overflow is undefined.
6910
773ec47f
MP
69112014-07-06 Marek Polacek <polacek@redhat.com>
6912
6913 PR c/6940
6914 * c.opt (Wsizeof-array-argument): New option.
6915
00a7ba58
JJ
69162014-07-03 Jakub Jelinek <jakub@redhat.com>
6917
b1726d6c 6918 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6919 comments->count <= 1, as comments->entries might be NULL.
6920
52ec0ea3
MP
69212014-07-01 Marek Polacek <polacek@redhat.com>
6922
6923 * c.opt (Wint-conversion): New option.
6924
d5c3d343
MP
69252014-07-01 Marek Polacek <polacek@redhat.com>
6926
6927 PR c/58286
6928 * c.opt (Wincompatible-pointer-types): New option.
6929
6e7ceb17
PC
69302014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6931
6932 PR c++/51400
6933 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6934 Do not discard TYPE_QUALS of type.
6935
da73100b
JM
69362014-06-26 Jason Merrill <jason@redhat.com>
6937
6938 * c-common.h (enum cxx_dialect): Add cxx1z.
6939 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6940 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6941
08eedf75
TJ
69422014-06-26 Teresa Johnson <tejohnson@google.com>
6943
6944 * c-common.h (get_dump_info): Declare.
6945 * c-gimplify.c (c_genericize): Use saved dump files.
6946 * c-opts.c (c_common_parse_file): Begin and end dumps
6947 once around parsing invocation.
6948 (get_dump_info): New function.
6949
7b56b2f8
MP
69502014-06-23 Marek Polacek <polacek@redhat.com>
6951 Andrew MacLeod <amacleod@redhat.com>
6952
6953 PR c/61553
6954 * c-common.c (get_atomic_generic_size): Don't segfault if the
6955 type doesn't have a size.
6956
0e37a2f3
MP
69572014-06-20 Marek Polacek <polacek@redhat.com>
6958
6959 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6960 (ubsan_walk_array_refs_r): New function.
6961 (c_genericize): Instrument array bounds.
6962 * c-ubsan.c: Include "internal-fn.h".
6963 (ubsan_instrument_division): Mark instrumented arrays as having
6964 side effects. Adjust ubsan_type_descriptor call.
6965 (ubsan_instrument_shift): Likewise.
6966 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6967 (ubsan_instrument_bounds): New function.
6968 (ubsan_array_ref_instrumented_p): New function.
6969 (ubsan_maybe_instrument_array_ref): New function.
6970 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6971 (ubsan_array_ref_instrumented_p): Declare.
6972 (ubsan_maybe_instrument_array_ref): Declare.
6973
69742014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6975
6976 PR lto/61123
6977 * c.opt (fshort-enums): Add to LTO.
6978 * c.opt (fshort-wchar): Likewise.
6979
5c3d09f7
MP
69802014-06-16 Marek Polacek <polacek@redhat.com>
6981
6982 PR c/60439
6983 * c.opt (Wswitch-bool): Add Var.
6984
9cf32741
JJ
69852014-06-12 Jakub Jelinek <jakub@redhat.com>
6986
6987 PR middle-end/61486
6988 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6989 #pragma omp target teams or
6990 #pragma omp {,target }teams distribute simd.
6991
62984918
JM
69922014-06-12 Jason Merrill <jason@redhat.com>
6993
6994 * c.opt (Wabi=, fabi-compat-version): New.
6995 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6996 (c_common_post_options): Handle flag_abi_compat_version default.
6997 Disallow -fabi-compat-version=1.
6998 * c-common.h (abi_version_crosses): New.
6999
f961457f
JH
70002014-06-11 Jan Hubicka <hubicka@ucw.cz>
7001
adfac8df 7002 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7003 section names that are no longer trees.
7004
92d28cbb
JJ
70052014-06-10 Jakub Jelinek <jakub@redhat.com>
7006
7007 PR fortran/60928
7008 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7009 (omp_pragmas): ... back here.
7010
742938c9
MP
70112014-06-05 Marek Polacek <polacek@redhat.com>
7012
7013 PR c/49706
7014 * c-common.c (warn_logical_not_parentheses): New function.
7015 * c-common.h (warn_logical_not_parentheses): Declare.
7016 * c.opt (Wlogical-not-parentheses): New option.
7017
9d548dfb
MP
70182014-06-04 Marek Polacek <polacek@redhat.com>
7019
7020 PR c/30020
7021 * c-common.c (check_case_bounds): Add location parameter.
7022 Use it.
7023 (c_add_case_label): Pass loc to check_case_bounds.
7024
fedfecef
MP
70252014-06-03 Marek Polacek <polacek@redhat.com>
7026
7027 PR c/60439
7028 * c.opt (Wswitch-bool): New option.
7029
f6a7cffc
TS
70302014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7031
040d18b6
TS
7032 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7033 Remove prototypes.
7034 (record_types_used_by_current_var_decl): Move prototype to where
7035 it belongs.
7036
f6a7cffc
TS
7037 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7038 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7039 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7040
632f2871
RS
70412014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7042
7043 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7044 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7045 void_zero_node.
7046 * c-pretty-print.c (pp_c_void_constant): New function.
7047 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7048 (c_pretty_printer::expression): Handle VOID_CST.
7049 * cilk.c (extract_free_variables): Likewise.
7050 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7051 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7052
766090c2
TS
70532014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7054
7055 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7056 * c-pragma.c (push_alignment): Adjust.
7057 (handle_pragma_push_options): Likewise.
7058
661a0813
MP
70592014-05-09 Marek Polacek <polacek@redhat.com>
7060
7061 PR c/50459
7062 * c-common.c (check_user_alignment): Return -1 if alignment is error
7063 node.
7064 (handle_aligned_attribute): Don't call default_conversion on
7065 FUNCTION_DECLs.
7066 (handle_vector_size_attribute): Likewise.
7067 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7068 (handle_sentinel_attribute): Call default_conversion and allow even
7069 integral types as an argument.
7070
2793eeab
MP
70712014-05-08 Marek Polacek <polacek@redhat.com>
7072
7073 PR c/61053
7074 * c-common.c (min_align_of_type): New function factored out from...
7075 (c_sizeof_or_alignof_type): ...here.
7076 * c-common.h (min_align_of_type): Declare.
7077
f827930a
MP
70782014-05-08 Marek Polacek <polacek@redhat.com>
7079
7080 PR c/61077
7081 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7082 parameter type of main.
7083
ca49b74e
DD
70842014-05-07 DJ Delorie <dj@redhat.com>
7085
7086 * c-cppbuiltin.c (print_bits_of_hex): New.
7087 (builtin_define_type_minmax): Print values using hex so as not to
7088 require a pre-computed list of string values.
7089
1d60af08
KZ
70902014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7091 Mike Stump <mikestump@comcast.net>
7092 Richard Sandiford <rdsandiford@googlemail.com>
7093
7094 * c-ada-spec.c: Include wide-int.h.
7095 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7096 (dump_generic_ada_node): Use wide-int interfaces.
7097 * c-common.c: Include wide-int-print.h.
7098 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7099 (pointer_int_sum): Use wide-int interfaces.
7100 (c_common_nodes_and_builtins): Use make_int_cst.
7101 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7102 (handle_alloc_size_attribute): Use wide-int interfaces.
7103 (get_nonnull_operand): Likewise.
7104 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7105 * c-lex.c: Include wide-int.h.
7106 (narrowest_unsigned_type): Take a widest_int rather than two
7107 HOST_WIDE_INTs.
7108 (narrowest_signed_type): Likewise.
7109 (interpret_integer): Update accordingly. Use wide-int interfaces.
7110 (lex_charconst): Use wide-int interfaces.
7111 * c-pretty-print.c: Include wide-int.h.
7112 (pp_c_integer_constant): Use wide-int interfaces.
7113 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7114 INT_CST_LT_UNSIGNED.
7115
b15458be
RB
71162014-05-06 Richard Biener <rguenther@suse.de>
7117
7118 * c-opts.c (c_common_post_options): For -freestanding,
7119 -fno-hosted and -fno-builtin disable pattern recognition
7120 if not enabled explicitely.
7121
6577374e
MP
71222014-05-02 Marek Polacek <polacek@redhat.com>
7123
7124 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7125
d00887e8
MP
71262014-05-01 Marek Polacek <polacek@redhat.com>
7127
7128 PR c/43245
7129 * c.opt (Wdiscarded-qualifiers): Add.
7130
f8ed5150
MP
71312014-04-30 Marek Polacek <polacek@redhat.com>
7132
7133 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7134 INT_MIN / -1 sanitization only for integer types.
7135
45484dcf
MP
71362014-04-25 Marek Polacek <polacek@redhat.com>
7137
7138 PR c/18079
7139 * c-common.c (handle_noinline_attribute): Warn if the attribute
7140 conflicts with always_inline attribute.
7141 (handle_always_inline_attribute): Warn if the attribute conflicts
7142 with noinline attribute.
7143
38e514c0
MP
71442014-04-25 Marek Polacek <polacek@redhat.com>
7145
7146 PR c/60156
7147 * c-common.c (check_main_parameter_types): Warn about variadic main.
7148
44875f92
MS
71492014-04-24 Mike Stump <mikestump@comcast.net>
7150
7151 * c.opt (Wshadow-ivar): Default to on.
7152
dcaaa5a0
DP
71532014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7154
7155 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7156
c07d7c02
MP
71572014-04-23 Marek Polacek <polacek@redhat.com>
7158
7159 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7160
1c33c9b7
JJ
71612014-04-22 Jakub Jelinek <jakub@redhat.com>
7162
7163 PR sanitizer/60275
7164 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7165 if flag_sanitize_undefined_trap_on_error.
7166 (ubsan_instrument_division, ubsan_instrument_shift,
7167 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7168 if !flag_sanitize_recover.
7169
793c625f
MG
71702014-04-22 Marc Glisse <marc.glisse@inria.fr>
7171
7172 PR libstdc++/43622
7173 * c-common.c (registered_builtin_types): Make non-static.
7174 * c-common.h (registered_builtin_types): Declare.
7175
b0f1bf36 71762014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7177 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7178
7179 PR c/60819
7180 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7181 apply may-alias the scalar pointer type when applicable.
7182
3b07fa4a
IZ
71832014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7184
7185 PR middle-end/60467
7186 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7187 as possible argument for Cilk_spawn.
7188
cbbd2b1c
TB
71892014-04-11 Tobias Burnus <burnus@net-b.de>
7190
7191 PR c/60194
7192 * c.opt (Wformat-signedness): Add
7193 * c-format.c(check_format_types): Use it.
7194
6415bd5d
JM
71952014-04-11 Jason Merrill <jason@redhat.com>
7196
7197 PR c++/57926
7198 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7199 default_conversion for an array argument.
7200
6525783a
MP
72012014-04-08 Marek Polacek <polacek@redhat.com>
7202
7203 PR sanitizer/60745
7204 * c-ubsan.c: Include asan.h.
7205 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7206
880a467b
NS
72072014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7208
7209 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7210
7b59ff2d
MP
72112014-04-02 Marek Polacek <polacek@redhat.com>
7212
7213 * c-common.h (c_expand_expr): Remove declaration.
7214
8edbfaa6
JJ
72152014-03-28 Jakub Jelinek <jakub@redhat.com>
7216
7217 PR c++/60689
7218 * c-common.c (add_atomic_size_parameter): When creating new
7219 params vector, push the size argument first.
7220
07d72e1d
JJ
72212014-03-26 Jakub Jelinek <jakub@redhat.com>
7222
7223 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7224 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7225 ubsan_create_data callers.
7226
b35e0fa0
JJ
72272014-03-22 Jakub Jelinek <jakub@redhat.com>
7228
7229 PR debug/60603
7230 * c-opts.c (c_finish_options): Restore cb_file_change call to
7231 <built-in>.
7232
39a1ebb3
JJ
72332014-03-13 Jakub Jelinek <jakub@redhat.com>
7234
7235 PR middle-end/36282
7236 * c-pragma.c (apply_pragma_weak): Only look at
7237 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7238 DECL_ASSEMBLER_NAME_SET_P (decl).
7239 (maybe_apply_pending_pragma_weaks): Exit early if
7240 vec_safe_is_empty (pending_weaks) rather than only when
7241 !pending_weaks.
7242 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7243 set assembler name back to NULL afterwards.
7244
a07f6ed2
JM
72452014-03-11 Jason Merrill <jason@redhat.com>
7246
7247 * c.opt: Add -std=gnu++14.
7248
75b107f5
IB
72492014-03-11 Ian Bolton <ian.bolton@arm.com>
7250
7251 * c-opts.c (c_common_post_options): Don't override
7252 -ffp-contract=fast if unsafe-math-optimizations is on.
7253
f42c637e
PM
72542014-03-08 Paulo Matos <paulo@matos-sorge.com>
7255
22b15758 7256 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7257
70e24808
JM
72582014-03-07 Jason Merrill <jason@redhat.com>
7259
7260 * c.opt: Add -std=c++14.
7261
3af9c5e9
MP
72622014-03-06 Marek Polacek <polacek@redhat.com>
7263
7264 PR c/60197
7265 * cilk.c (contains_cilk_spawn_stmt): New function.
7266 (contains_cilk_spawn_stmt_walker): Likewise.
7267 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7268 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7269
b3bdf019
JJ
72702014-03-03 Jakub Jelinek <jakub@redhat.com>
7271
7272 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7273 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7274 even when flag_preprocess_only.
7275
ca7e759d
JM
72762014-02-26 Jason Merrill <jason@redhat.com>
7277
7278 PR c++/59231
7279 PR c++/11586
7280 * c-common.c (shorten_compare): Don't check
7281 c_inhibit_evaluation_warnings.
7282
28e41874
JJ
72832014-02-19 Jakub Jelinek <jakub@redhat.com>
7284
cca615af
JJ
7285 PR c/37743
7286 * c-common.c (c_common_nodes_and_builtins): When initializing
7287 c_uint{16,32,64}_type_node, also set corresponding
7288 uint{16,32,64}_type_node to the same value.
7289
28e41874
JJ
7290 PR c++/60267
7291 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7292 for PRAGMA_IVDEP if flag_preprocess_only.
7293
c2bf53a1
JJ
72942014-02-12 Jakub Jelinek <jakub@redhat.com>
7295
7296 PR c/60101
7297 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7298 if false, add ADD itself, rather than vice versa.
7299 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7300 copy. For SAVE_EXPR, only call merge_tlist once.
7301
8fcbce72
JJ
73022014-02-08 Jakub Jelinek <jakub@redhat.com>
7303
7304 PR middle-end/60092
7305 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7306 and tree_to_uhwi.
7307 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7308 functions.
7309 (c_common_attribute_table): Add alloc_align and assume_aligned
7310 attributes.
7311
0a756a3f
MP
73122014-02-06 Marek Polacek <polacek@redhat.com>
7313
7314 PR c/60087
7315 * c-common.c (warn_for_sign_compare): Call warning_at with location
7316 instead of warning.
7317
7ec4847a
MP
73182014-02-05 Marek Polacek <polacek@redhat.com>
7319
7320 PR c/53123
7321 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7322 statement.
7323
66f20604
MP
73242014-02-04 Marek Polacek <polacek@redhat.com>
7325
7326 PR c/60036
7327 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7328 SAVE_EXPR.
7329
5d77fb19
MG
73302014-02-03 Marc Glisse <marc.glisse@inria.fr>
7331
7332 PR c++/53017
7333 PR c++/59211
7334 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7335 handle_vector_size_attribute, handle_nonnull_attribute): Call
7336 default_conversion on the attribute argument.
7337 (handle_nonnull_attribute): Increment the argument number.
7338
81e5eca8
MP
73392014-01-31 Marek Polacek <polacek@redhat.com>
7340
7341 PR c/59963
7342 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7343 build_function_call_vec.
7344 (resolve_overloaded_builtin): Likewise.
7345 * c-common.h (build_function_call_vec): Adjust declaration.
7346
68fca595
MP
73472014-01-30 Marek Polacek <polacek@redhat.com>
7348
7349 PR c/59940
7350 * c-common.h (unsafe_conversion_p): Adjust declaration.
7351 (warnings_for_convert_and_check): Likewise.
7352 (convert_and_check): Likewise.
7353 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7354 expansion_point_location_if_in_system_header on it.
7355 (warnings_for_convert_and_check): Add location parameter. Call
7356 expansion_point_location_if_in_system_header on it. Use it.
7357 (convert_and_check): Add location parameter. Use it.
7358 (conversion_warning): Likewise.
7359 (c_add_case_label): Adjust convert_and_check calls.
7360 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7361
b72271b9
BI
73622014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7363
7364 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7365 flag_cilkplus.
7366 * c-pragma.c (init_pragma): Likewise.
7367 * c.opt: Likewise.
7368
393e8e8b
MP
73692014-01-23 Marek Polacek <polacek@redhat.com>
7370
7371 PR c/59846
7372 * c-common.c (shorten_compare): Add location_t parameter.
7373 * c-common.h (shorten_binary_op): Adjust declaration.
7374
f04dda30
MP
73752014-01-23 Marek Polacek <polacek@redhat.com>
7376
7377 PR c/58346
7378 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7379 * c-common.h: Declare it.
7380
621955cb
EB
73812014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7382
7383 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7384 * c-ada-spec.c (dump_ads): Likewise.
7385 (cpp_check): Likewise.
7386 (dump_ada_specs): Likewise.
7387
73882014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7389
7390 PR c++/49718
7391 * c-common.c (handle_no_instrument_function_attribute): Allow
7392 no_instrument_function attribute in class member
7393 definition/declaration.
7394
241f845a
JJ
73952014-01-15 Jakub Jelinek <jakub@redhat.com>
7396
7397 PR c/58943
7398 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7399 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7400 being COMPOUND_EXPR.
7401 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7402 operand a SAVE_EXPR and second MODIFY_EXPR.
7403
e83b8e2e
JJ
74042014-01-09 Jakub Jelinek <jakub@redhat.com>
7405
7406 PR target/58115
7407 * c-pch.c (c_common_write_pch): Call
7408 prepare_target_option_nodes_for_pch.
7409
23a5b65a
RS
74102014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7411
7412 Update copyright years
7413
f9030485
RS
74142014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7415
7416 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7417 the copyright notice.
7418
f2aa696b
EB
74192013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7420
7421 * c-ada-spec.c (print_constructor): New function.
7422 (print_destructor): Retrieve the origin of the destructor.
7423 (print_ada_declaration): Revamp handling of constructors/destructors.
7424
3f8257db 74252013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7426 Bill Maddox <maddox@google.com>
7427 Jason Merrill <jason@redhat.com>
7428
7429 * c.opt: Add -fdeclone-ctor-dtor.
7430 * c-opts.c (c_common_post_options): Default to on iff -Os.
7431
41958c28
BI
74322013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7433
7434 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7435 attribute.
7436 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7437 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7438 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7439 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7440 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7441 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7442 PRAGMA_CILK_CLAUSE_UNIFORM.
7443
b1726d6c 7444
12893402
BI
74452013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7446
7447 * cilk.c (cilk_outline): Made this function non-static.
7448 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7449 (create_cilk_wrapper): Added a new parameter: a function pointer.
7450 (c_install_body_w_frame_cleanup): Remove
7451 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7452 * c-common.h (cilk_outline): New prototype.
7453 (gimplify_cilk_spawn): Removed two parameters.
7454 (cilk_install_body_with_frame_cleanup): New prototype.
7455 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7456 CILK_SPAWN_STMT case.
7457
085b42ed
BS
74582013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7459
2ce064c3
BS
7460 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7461
085b42ed
BS
7462 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7463 (int_array_type_node): Remove.
7464 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7465
9e36c9ed
MP
74662013-12-05 Marek Polacek <polacek@redhat.com>
7467
7468 PR c/52023
7469 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7470 [ADJUST_FIELD_ALIGN].
7471
296674db
JM
74722013-12-04 Joseph Myers <joseph@codesourcery.com>
7473
7474 PR c/52023
7475 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7476 and check field alignment if set.
7477 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7478 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7479
b1726d6c 74802013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7481 Marek Polacek <polacek@redhat.com>
7482
7483 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7484 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7485
d7947e19
L
74862013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7487
7488 PR c/59309
7489 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7490 arguments.
7491
fad7652e
JJ
74922013-11-29 Jakub Jelinek <jakub@redhat.com>
7493
7494 PR c/59280
7495 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7496 goto invalid. If it is error_mark_node, don't issue further
7497 diagnostics.
7498
8b5e1202
SO
74992013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7500
7501 * c.opt (Wopenmp-simd): New.
7502
0a508bb6
JJ
75032013-11-22 Jakub Jelinek <jakub@redhat.com>
7504
7505 * c-ubsan.h (ubsan_instrument_return): New prototype.
7506 * c-ubsan.c (ubsan_instrument_return): New function.
7507
2fb9a547
AM
75082013-11-22 Andrew MacLeod <amacleod@redhat.com>
7509
7510 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7511 * c-gimplify.c: Likewise.
7512 * cilk.c: Likewise.
2fb9a547 7513
8400e75e
DM
75142013-11-22 David Malcolm <dmalcolm@redhat.com>
7515
7516 * c-common.c (unsafe_conversion_p): Remove use of
7517 EXPR_LOC_OR_HERE macro.
7518 (conversion_warning): Likewise.
7519 (warnings_for_convert_and_check): Likewise.
7520 (warn_for_collisions_1): Likewise.
7521 (shorten_compare): Likewise, and remove use of in_system_header
7522 macro, using the location from the former.
7523 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7524 (cb_def_pragma): Remove use of in_system_header macro.
7525 (lex_string): Likewise.
7526 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7527
eb1ce453
KZ
75282013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7529 Mike Stump <mikestump@comcast.net>
7530 Richard Sandiford <rdsandiford@googlemail.com>
7531
7532 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7533 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7534 tree_fits_shwi_p or tree_fits_uhwi_p.
7535 (dump_generic_ada_node): Likewise.
7536 * c-format.c (check_format_arg): Likewise.
7537 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7538
6b3b8c27
KZ
75392013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7540
7541 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7542
49b0aa18
JC
75432013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7544
7545 PR c/53001
7546 * c-common.c (unsafe_conversion_p): Make this function
7547 return an enumeration with more detail.
7548 (conversion_warning): Use the new return type of
7549 unsafe_conversion_p to separately warn either about conversions
7550 that lower floating point number precision or about the other
7551 kinds of conversions.
7552 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7553 (unsafe_conversion_p): switching return type to
7554 conversion_safety enumeration.
49b0aa18
JC
7555 * c.opt: Adding new warning -Wfloat-conversion and
7556 enabling it with -Wconversion.
7557
b826515a
BS
75582013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7559
8e745a17
JJ
7560 * c-opts.c: Include plugin.h.
7561 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7562
b9a55b13
MP
75632013-11-19 Marek Polacek <polacek@redhat.com>
7564
7565 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7566 call.
7567 (ubsan_instrument_shift): Likewise.
7568 (ubsan_instrument_vla): Likewise.
7569
7d362f6c
RS
75702013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7571
7572 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7573 cast to unsigned type.
7574
386b1f1f
RS
75752013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7576
7577 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7578 tree_low_cst.
7579 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7580 rather than tree_low_cst.
7581
ae7e9ddd
RS
75822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7583
7584 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7585 tree_to_uhwi throughout.
7586
9439e9a1
RS
75872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7588
7589 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7590 tree_low_cst (..., 0) with tree_to_shwi throughout.
7591
cc269bb6
RS
75922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7593
7594 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7595 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7596
9541ffee
RS
75972013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7598
7599 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7600 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7601
c02065fc
AH
76022013-11-15 Aldy Hernandez <aldyh@redhat.com>
7603
7604 * c-cilkplus.c: New file.
7605 * c-common.c (readonly_error): Add location argument.
7606 * c-common.h (readonly_error): Same.
7607 (c_finish_cilk_clauses): Protoize.
7608 (c_check_cilk_loop): Same.
7609 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7610 Do not fail on error_mark_node.
7611 Abstract increment canonicalization to here...
7612 (c_omp_for_incr_canonicalize_ptr): New.
7613 c-pragma.c (init_pragma): Register "simd" pragma.
7614 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7615 (enum pragma_cilk_clause): New.
7616
9cc65f15
RS
76172013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7618
7619 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7620 wchar_type and host_integerp checks.
7621
18f429e2
AM
76222013-11-14 Andrew MacLeod <amacleod@redhat.com>
7623
7624 * c-common.c: Likewise.
7625 * c-gimplify.c: Likewise.
7626 * cilk.c: Likewise.
7627
d8a2d370
DN
76282013-11-14 Diego Novillo <dnovillo@google.com>
7629
7630 * c-common.c: Include fold-const.h.
7631 Include stor-layout.h.
7632 Include calls.h.
7633 Include stringpool.h.
7634 Include attribs.h.
7635 Include varasm.h.
7636 Include trans-mem.h.
7637 * c-cppbuiltin.c: Include stor-layout.h.
7638 Include stringpool.h.
7639 * c-format.c: Include stringpool.h.
7640 * c-lex.c: Include stringpool.h.
7641 Include stor-layout.h.
7642 * c-pragma.c: Include stringpool.h.
7643 Include attribs.h.
7644 Include varasm.h.
7645 Include gcc-symtab.h.
7646 * c-pretty-print.c: Include stor-layout.h.
7647 Include attribs.h.
7648 * cilk.c: Include stringpool.h.
7649 Include calls.h.
7650
38b7bc7f
JM
76512013-11-13 Joseph Myers <joseph@codesourcery.com>
7652
7653 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7654 * c-common.c (c_common_reswords): Add __auto_type.
7655 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7656
45b0be94
AM
76572013-11-12 Andrew MacLeod <amacleod@redhat.com>
7658
18f429e2
AM
7659 * c-common.c: Include gimplify.h.
7660 * c-gimplify.c: Likewise.
7661 * cilk.c: Likewise.
7662 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7663 * c-ubsan.c: Don't include gimple.h.
45b0be94 7664
582d9b50
JM
76652013-11-12 Joseph Myers <joseph@codesourcery.com>
7666
7667 * c-common.c (c_common_reswords): Add _Thread_local.
7668
6b28e197
JM
76692013-11-09 Joseph Myers <joseph@codesourcery.com>
7670
7671 * c-common.c (atomic_size_supported_p): New function.
7672 (resolve_overloaded_atomic_exchange)
7673 (resolve_overloaded_atomic_compare_exchange)
7674 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7675 Use it instead of comparing size with a local list of sizes.
7676
267bac10
JM
76772013-11-07 Andrew MacLeod <amacleod@redhat.com>
7678 Joseph Myers <joseph@codesourcery.com>
7679
7680 * c-common.h (enum rid): Add RID_ATOMIC.
7681 * c-common.c (c_common_reswords): Add _Atomic.
7682 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7683 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7684 * c-format.c (check_format_types): Check for extra _Atomic
7685 qualifiers in format argument.
7686 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7687 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7688
5157b91e
TB
76892013-11-06 Tobias Burnus <burnus@net-b.de>
7690
7691 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7692
6dbe0958
JM
76932013-11-06 Joseph Myers <joseph@codesourcery.com>
7694
7695 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7696 standards modes.
7697 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7698 to mean lack of IEEE 754 support.
7699
e8ff5196
TB
77002013-11-05 Tobias Burnus <burnus@net-b.de>
7701
7702 * c.opt (-Wdate-time): New option
7703 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7704
254a0760
JM
77052013-11-05 Joseph Myers <joseph@codesourcery.com>
7706
7707 * c-cppbuiltin.c (cpp_iec_559_value): Test
7708 flag_excess_precision_cmdline not flag_excess_precision.
7709
6d7f7e0a
TB
77102013-11-05 Tobias Burnus <burnus@net-b.de>
7711
7712 * c.opt (fopenmp-simd): New option.
7713 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7714 (omp_pragmas): ... this new struct.
7715 (c_pp_lookup_pragma): Also walk omp_pragmas.
7716 (init_pragma): Init pragmas for -fopenmp-simd.
7717
55a7f02f
MP
77182013-11-04 Marek Polacek <polacek@redhat.com>
7719
7720 PR c++/58979
7721 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7722
9193fb05
JM
77232013-11-04 Joseph Myers <joseph@codesourcery.com>
7724
7725 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7726 New functions.
7727 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7728
94159ecf
EB
77292013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7730
7731 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7732 (dump_ada_specs): Adjust prototype of second callback.
7733 * c-ada-spec.c (cpp_check): New global variable.
7734 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7735 (print_generic_ada_decl): Likewise.
7736 (has_static_fields): Change return type to bool and add guard.
7737 (has_nontrivial_methods): New predicate.
7738 (is_tagged_type): Change return type to bool.
7739 (separate_class_package): Call has_nontrivial_methods.
7740 (pp_ada_tree_identifier): Minor tweaks.
7741 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7742 (dump_ada_array_domains): Likewise.
7743 (dump_ada_array_type): Likewise.
7744 (dump_template_types): Remove cpp_check parameter and do not pass it to
7745 dump_generic_ada_node.
7746 (dump_ada_template): Likewise.
7747 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7748 recursively.
7749 (print_ada_methods): Change return type to integer. Remove cpp_check
7750 parameter and do not pass it down.
7751 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7752 dump_generic_ada_node.
7753 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7754 accessing methods.
7755 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7756 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7757 value of print_ada_methods.
7758 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7759 Set cpp_check to it before invoking dump_ada_nodes.
7760 (dump_ada_specs): Likewise.
7761
b906f4ca
MP
77622013-11-03 Marek Polacek <polacek@redhat.com>
7763
7764 * c-ubsan.c: Don't include hash-table.h.
7765 (ubsan_instrument_vla): New function.
7766 * c-ubsan.h: Declare it.
7767
5e20cdc9
DM
77682013-10-31 David Malcolm <dmalcolm@redhat.com>
7769
7770 Automated part of renaming of symtab_node_base to symtab_node.
7771
7772 Patch autogenerated by rename_symtab.py from
7773 https://github.com/davidmalcolm/gcc-refactoring-scripts
7774 revision 58bb219cc090b2f4516a9297d868c245495ee622
7775
7776 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7777 symtab_node_base to symtab_node.
7778
7057e645
ESR
77792013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7780
8e745a17 7781 Implement C++14 digit separators.
7057e645
ESR
7782 * c-lex.c (interpret_float): Remove digit separators from scratch string
7783 before building real literal.
7784
193ea7bc
JJ
77852013-10-30 Jakub Jelinek <jakub@redhat.com>
7786
7787 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7788
939b37da
BI
77892013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7790
7791 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7792 fields.
7793 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7794 enabled.
7795 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7796 (insert_cilk_frame): New prototype.
7797 (cilk_init_builtins): Likewise.
7798 (gimplify_cilk_spawn): Likewise.
7799 (c_cilk_install_body_w_frame_cleanup): Likewise.
7800 (cilk_detect_spawn_and_unwrap): Likewise.
7801 (cilk_set_spawn_marker): Likewise.
7802 (build_cilk_sync): Likewise.
7803 (build_cilk_spawn): Likewise.
7804 * cilk.c: New file.
7805
67348ccc
DM
78062013-10-29 David Malcolm <dmalcolm@redhat.com>
7807
7808 Patch autogenerated by refactor_symtab.py from
7809 https://github.com/davidmalcolm/gcc-refactoring-scripts
7810 revision 58bb219cc090b2f4516a9297d868c245495ee622
7811
7812 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7813 to a true class hierarchy.
7814 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7815
d570872d
RS
78162013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7817
7818 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7819
98906124
JL
78202013-10-26 Jeff Law <law@redhat.com>
7821
adfac8df
JJ
7822 * c-common.c (c_define_builtins): Remove mudflap support.
7823 * c.opt: Ignore and warn for mudflap options.
98906124 7824
d73749df 78252013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7826
7827 PR other/33426
7828 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7829 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7830
3f04b1bb
JM
78312013-10-23 Jason Merrill <jason@redhat.com>
7832
7833 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7834
acf0174b
JJ
78352013-10-11 Jakub Jelinek <jakub@redhat.com>
7836
acd15a28
JJ
7837 * c-common.h (omp_clause_mask::operator !=): New method.
7838 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7839 instead of if (mask & something) tests everywhere.
7840
acf0174b
JJ
7841 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7842 201307 instead of 201107.
7843 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7844 (c_common_attribute_table): Add "omp declare target" and
7845 "omp declare simd" attributes.
7846 (handle_omp_declare_target_attribute,
7847 handle_omp_declare_simd_attribute): New functions.
7848 * c-omp.c: Include c-pragma.h.
7849 (c_finish_omp_taskgroup): New function.
7850 (c_finish_omp_atomic): Add swapped argument, if true,
7851 build the operation first with rhs, lhs arguments and use NOP_EXPR
7852 build_modify_expr.
7853 (c_finish_omp_for): Add code argument, pass it down to make_code.
7854 (c_omp_split_clauses): New function.
7855 (c_split_parallel_clauses): Removed.
7856 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7857 c_omp_declare_simd_clauses_to_decls): New functions.
7858 * c-common.h (omp_clause_mask): New type.
7859 (OMP_CLAUSE_MASK_1): Define.
7860 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7861 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7862 omp_clause_mask::operator |, omp_clause_mask::operator &,
7863 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7864 omp_clause_mask::operator ==): New methods.
7865 (enum c_omp_clause_split): New.
7866 (c_finish_omp_taskgroup): New prototype.
7867 (c_finish_omp_atomic): Add swapped argument.
7868 (c_finish_omp_for): Add code argument.
7869 (c_omp_split_clauses): New prototype.
7870 (c_split_parallel_clauses): Removed.
7871 (c_omp_declare_simd_clauses_to_numbers,
7872 c_omp_declare_simd_clauses_to_decls): New prototypes.
7873 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7874 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7875 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7876 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7877 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7878 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7879 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7880 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7881 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7882 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7883 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7884 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7885 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7886 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7887 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7888 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7889 PRAGMA_OMP_CLAUSE_UNIFORM.
7890
826cacfe
MG
78912013-10-09 Marc Glisse <marc.glisse@inria.fr>
7892
7893 PR tree-optimization/20318
7894 * c-common.c (handle_returns_nonnull_attribute): New function.
7895 (c_common_attribute_table): Add returns_nonnull.
7896
2284b034
MG
78972013-10-03 Marc Glisse <marc.glisse@inria.fr>
7898
7899 PR c++/19476
7900 * c.opt (fcheck-new): Move to common.opt.
7901
b56e9788
MP
79022013-09-25 Marek Polacek <polacek@redhat.com>
7903 Jakub Jelinek <jakub@redhat.com>
7904
7905 PR sanitizer/58413
7906 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7907 an expression if we can prove it is correct.
7908 (ubsan_instrument_division): Likewise. Remove unnecessary
7909 check.
7910
ce6923c5
MP
79112013-09-18 Marek Polacek <polacek@redhat.com>
7912
7913 PR sanitizer/58411
7914 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7915 Declare it.
7916 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7917
fb5610fb
IS
79182013-09-14 Iain Sandoe <iain@codesourcery.com>
7919
7920 PR target/48094
7921 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7922 fobjc-gc, freplace-objc-classes): Accept for LTO.
7923
88b0e79e
JC
79242013-09-13 Jacek Caban <jacek@codeweavers.com>
7925
7926 * c-target.def: New hook
7927
c9b0866a
PC
79282013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7929
7930 PR c++/43452
7931 * c.opt (Wdelete-incomplete): Add.
7932
0af94e6f
JR
79332013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7934
7935 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7936 (vector_types_compatible_elements_p): New function.
7937 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7938 declaration.
7939 (vector_types_compatible_elements_p): Declare.
7940
7c26172c
GDR
79412013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7942
7943 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7944 a virtual member function.
7945 (pp_simple_type_specifier): Remove.
7946 (pp_c_type_specifier): Likewise.
7947 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7948 Rename from pp_c_type_specifier. Adjust.
7949 (c_pretty_printer::c_pretty_printer): Do not assign to
7950 simple_type_specifier.
7951
20059c8b
GDR
79522013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7953
7954 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7955 member function.
7956 (c_pretty_printer::storage_class_specifier): Likewise.
7957 (c_pretty_printer::initializer): Likewise.
7958 (pp_declaration): Remove.
7959 (pp_declaration_specifiers): Likewise.
7960 (pp_abstract_declarator): Likewise.
7961 (pp_declarator): Likewise.
7962 (pp_type_id): Likewise.
7963 (pp_statement): Likewise.
7964 (pp_constant): Likewise.
7965 (pp_id_expression): Likewise.
7966 (pp_primary_expression): Likewise.
7967 (pp_unary_expression): Likewise.
7968 (pp_multiplicative_expression): Likewise.
7969 (pp_conditional_expression): Likewise.
7970 (pp_assignment_expression): Likewise.
7971 (pp_expression): Likewise.
7972 (pp_c_type_id): Likewise.
7973 (pp_c_storage_class_specifier): Likewise.
7974 * c-pretty-print.c (pp_c_type_cast): Tidy.
7975 (pp_c_pointer): Likewise.
7976 (pp_c_type_specifier): Likewise.
7977 (pp_c_parameter_type_list): Likewise.
7978 (pp_c_function_definition): Likewise.
7979 (pp_c_init_declarator): Likewise.
7980 (pp_c_initializer_list): Likewise.
7981 (pp_c_constructor_elts): Likewise.
7982 (c_pretty_printer::direct_abstract_declarator): Likewise.
7983 (c_pretty_printer::declaration_specifiers): Likewise.
7984 (c_pretty_printer::primary_expression): Likewise.
7985 (c_pretty_printer::postfix_expression): Likewise.
7986 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7987 (c_pretty_printer::storage_class_specifier): Rename from
7988 pp_c_storage_class_specifier.
7989 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7990 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7991 storage_class_specifier, initializer, offset_list, flags.
7992
de5a5fa1
MP
79932013-08-30 Marek Polacek <polacek@redhat.com>
7994
7995 * c-ubsan.c: New file.
7996 * c-ubsan.h: New file.
7997
8f0e4d72
GDR
79982013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7999
8000 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8001 member function.
8002 (c_pretty_printer::declaration_specifiers): Likewise.
8003 (c_pretty_printer::declarator): Likewise.
8004 (c_pretty_printer::abstract_declarator): Likewise.
8005 (c_pretty_printer::direct_abstract_declarator): Likewise.
8006 (c_pretty_printer::direct_declarator): Likewise.
8007 (c_pretty_printer::function_specifier): Likewise.
8008 (pp_declaration): Adjust.
8009 (pp_declaration_specifiers): Likewise.
8010 (pp_abstract_declarator): Likewise.
8011 (pp_direct_declarator): Likewise.
8012 (pp_function_specifier): Likewise.
8013 (pp_direct_abstract_declarator): Remove as unused.
8014 (pp_c_declaration): Remove.
8015 (pp_c_declaration_specifiers): Likewise.
8016 (pp_c_declarator): Likewise.
8017 (pp_c_direct_declarator): Likewise.
8018 (pp_c_function_specifier): Likewise.
8019 (pp_c_direct_abstract_declarator): Likewise.
8020 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8021 from pp_c_abstract_declarator. Adjust.
ab20d992 8022 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8023 pp_c_direct_abstract_declarator. Adjust.
8024 (c_pretty_printer::function_specifier): Rename from
8025 pp_c_function_specifier. Adjust.
8026 (c_pretty_printer::declaration_specifiers): Rename from
8027 pp_c_declaration_specifiers. Adjust.
8028 (c_pretty_printer::direct_declarator): Rename from
8029 pp_c_direct_declarator. Adjust.
8030 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8031 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8032 (c_pretty_printer::c_pretty_printer): Do not assign to
8033 declaration, declaration_specifiers, declarator,
8034 direct_declarator, direct_abstract_declarator, function_specifier.
8035
00d34d3a
GDR
80362013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8037
8038 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8039 virtual member function.
8040 (c_pretty_printer::multiplicative_expression): Likewise.
8041 (c_pretty_printer::conditional_expression): Likewise.
8042 (c_pretty_printer::assignment_expression): Likewise.
8043 (c_pretty_printer::expression): Likewise.
8044 (pp_unary_expression): Adjust.
8045 (pp_multiplicative_expression): Likewise.
8046 (pp_assignment_expression): Likewise.
8047 (pp_conditional_expression): Likewise.
8048 (pp_expression): Likewise.
8049 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8050 from pp_c_unary_expression. Adjust.
8051 (c_pretty_printer::multiplicative_expression): Rename from
8052 pp_c_multiplicative_expression. Adjust.
8053 (c_pretty_printer::conditional_expression): Rename from
8054 pp_c_conditional_expression. Adjust.
8055 (c_pretty_printer::assignment_expression): Rename from
8056 pp_c_assignment_expression. Adjust.
8057 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8058 (c_pretty_printer::c_pretty_printer): Do not assign to
8059 unary_expression, multiplicative_expression,
8060 conditional_expression, expression.
8061
fb22178f
GDR
80622013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8063
8064 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8065 virtual member function.
8066 (pp_postfix_expression): Adjust.
8067 (pp_c_postfix_expression): Remove.
8068 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8069 from pp_c_postfix_expression. Adjust.
8070 (c_pretty_printer::c_pretty_printer): Do not assign to
8071 postfix_expression.
8072
7ecc2600
GDR
80732013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8074
8075 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8076 virtua member function.
8077 (pp_primary_expression): Adjust.
8078 (pp_c_primary_expression): Remove.
8079 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8080 from pp_c_primary_expression. Adjust.
8081 (pp_c_initializer_list): Use pp_primary_expression.
8082 (c_pretty_printer::c_pretty_printer): Do not assign to
8083 primary_expression.
8084
0691175f
GDR
80852013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8086
8087 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8088 * c-pretty-print.c (M_): Remove.
8089 (c_pretty_printer::translate_string): Define.
8090 (pp_c_type_specifier): Use it.
8091 (pp_c_primary_expression): Likewise.
8092 (pp_c_expression): Likewise.
8093
66dfe4c4
GDR
80942013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8095
8096 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8097 virtual function.
8098 (pp_c_id_expression): Remove.
8099 (pp_id_expression): Adjust.
8100 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8101 pp_c_id_expression. Adjust.
8102 (pp_c_postfix_expression): Use pp_id_expression.
8103 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8104
ca43e9d5
GDR
81052013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8106
8107 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8108 member function.
8109 (pp_constant): Adjust.
8110 (pp_c_constant): Remove.
8111 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8112 pp_c_constant. Adjust.
8113 (pp_c_constant)
8114 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8115 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8116
da6ca2b5
GDR
81172013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8118
8119 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8120 (c_pretty_printer::c_pretty_printer): Declare.
8121 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8122 c_pretty_printer_init. Adjust.
8123 (print_c_tree): Do not call c_pretty_printer_init.
8124 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8125
65a372f4
AC
81262013-08-09 Arnaud Charlet <charlet@adacore.com>
8127
8128 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8129
fd9b0f32
PC
81302013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8131
8132 PR c++/58080
8133 * c-common.c (pointer_int_sum): Add bool parameter.
8134 * c-common.h (pointer_int_sum): Adjust declaration.
8135
e0aec1e9
GDR
81362013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8137
8138 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8139 c_pretty_printer variable.
8140
b066401f
GDR
81412013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8142
8143 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8144 (pp_base): Remove.
8145 (pp_c_base): Likewise. Adjust users.
8146 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8147 (pp_c_whitespace): Do not call pp_base.
8148 (pp_c_left_paren): Likewise.
8149 (pp_c_right_paren): Likewise.
8150 (pp_c_left_brace): Likewise.
8151 (pp_c_right_brace): Likewise.
8152 (pp_c_left_bracket): Likewise.
8153 (pp_c_right_bracket): Likewise.
8154 (pp_c_dot): Likewise.
8155 (pp_c_ampersand): Likewise.
8156 (pp_c_star): Likewise.
8157 (pp_c_arrow): Likewise.
8158 (pp_c_semicolon): Likewise.
8159 (pp_c_complement): Likewise.
8160 (pp_c_exclamation): Likewise.
8161 (pp_c_direct_declarator): Likewise.
8162 (pp_c_ws_string): Likewise.
8163 (pp_c_identifier): Likewise.
8164 (pp_c_statement): Likewise.
8165 (print_c_tree): Likewise.
8166
65e5a578
ESR
81672013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8168
8169 PR c++/58072
8170 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8171 provide useful error strings.
8172
137a1a27
GDR
81732013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8174
8175 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8176 printer functions instead of pp_string or operators and punctuators.
8177 (dump_generic_ada_node): Likewise.
8178 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8179 (pp_c_relational_expression): Likewise.
8180 (pp_c_logical_or_expression): Likewise.
8181
07838b13
GDR
81822013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8183
8184 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8185 functions instead of pp_character.
8186 (pp_ada_tree_identifier): Likewise.
8187 (dump_ada_double_name): Likewise.
8188 (dump_ada_function_declaration): Likewise.
8189 (dump_ada_array_domains): Likewise.
8190 (dump_template_types): Likewise.
8191 (dump_generic_ada_node): Likewise.
8192 (print_ada_declaration): Likewise.
8193 (print_ada_struct_decl): Likewise.
8194 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8195
433cc7b0
TT
81962013-07-23 Tom Tromey <tromey@redhat.com>
8197
8198 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8199 * c-common.c (c_common_reswords): Add _Generic.
8200
688010ba
OB
82012013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8202
8203 * c-common.c: Fix typos.
8204 * c-common.h: Likewise.
8205
2a99e5e6
LL
82062013-07-13 Lubos Lunak <l.lunak@suse.cz>
8207
8208 PR c++/55203
8209 * c-common.c (c_common_attribute_table): Add warn_unused.
8210 (handle_warn_unused_attribute): New.
8211
c26302d5
JJ
82122013-07-10 Jakub Jelinek <jakub@redhat.com>
8213
8214 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8215 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8216
dfeadaa0
PC
82172013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8218
8219 PR c++/57869
8220 * c.opt: Add Wconditionally-supported.
8221
6a2fa4b2
GS
82222013-07-08 Graham Stott <graham.stott@btinternet.com>
8223
adfac8df 8224 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8225 unused variables l_length and l_node.
8226
ecdbd01a 82272013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8228
8229 PR c/57821
8230 * c-common.c (complete_array_type): Delay folding first index
8231 like other indices. When folding, check for index overflow.
8232
bedc293e
MG
82332013-06-27 Marc Glisse <marc.glisse@inria.fr>
8234
8235 PR c++/57509
8236 * c-common.h (c_build_vec_perm_expr): New complain argument.
8237 * c-common.c (c_build_vec_perm_expr): Likewise.
8238 Use save_expr also in C++.
8239
604b2bfc
GDR
82402013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8241
8242 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8243 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8244 * c-opts.c (c_common_post_options): Likewise.
8245
dfeadaa0 82462013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8247
8248 * array-notation-common.c (length_mismatch_in_expr): Changed the
8249 parameter type's from a dynamic array to a vec_tree. Also removed
8250 the size parameters.
8251 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8252 the change above.
8253
2ce86d2e
BI
82542013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8255
8256 * c-common.h (struct cilkplus_an_parts): New structure.
8257 (struct cilkplus_an_loop_parts): Likewise.
8258 (cilkplus_extract_an_triplets): New prototype.
8259 (fix_sec_implicit_args): Likewise.
8260 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8261 (fix_sec_implicit_args): Likewise.
604b2bfc 8262
07a6825b
BI
82632013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8264
8265 * array-notation-common.c (find_inv_trees): Removed an unwanted
8266 typecasting.
8267 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8268 enum rid to enum tree_code.
8269
08346abd
JH
82702013-06-11 Jan Hubicka <jh@suse.cz>
8271
8272 * c-common.c (handle_alias_ifunc_attribute): Do not set
8273 DECL_EXTERNAL for weakref variables.
8274 * c-pragma.c (handle_pragma_weak): Make sure aliases
8275 are not declared as external.
8276
d60f1706
BI
82772013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8278
8279 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8280 function from c/c-array-notation.c.
8281 (is_cilkplus_reduce_builtin): Likewise.
8282 (find_rank): Likewise.
8283 (extract_array_notation_exprs): Likewise.
8284 (replace_array_notations): Likewise.
8285 (find_inv_trees): Likewise.
8286 (replace_inv_trees): Likewise.
8287 (contains_array_notation_expr): Likewise.
8288 (find_correct_array_notation_type): Likewise.
8289 * c-common.h (struct inv_list): Moved this struct from the file
8290 c/c-array-notation.c and added a new field called additional tcodes.
8291 (length_mismatch_in_expr_p): New prototype.
8292 (is_cilkplus_reduce_builtin): Likewise.
8293 (find_rank): Likewise.
8294 (extract_array_notation_exprs): Likewise.
8295 (replace_array_notation): Likewise.
8296 (find_inv_trees): Likewise.
8297 (replace_inv_trees): Likewise.
8298 (find_correct_array_notation_type): Likewise.
dfeadaa0 8299
36536d79
BI
83002013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8301
8302 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8303 function array_notation_init_builtins is called.
8304 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8305 * c-common.def (ARRAY_NOTATION_REF): New tree.
8306 * c-common.h (build_array_notation_expr): New function declaration.
8307 (build_array_notation_ref): Likewise.
8308 (extract_sec_implicit_index_arg): New extern declaration.
8309 (is_sec_implicit_index_fn): Likewise.
8310 (ARRAY_NOTATION_CHECK): New define.
8311 (ARRAY_NOTATION_ARRAY): Likewise.
8312 (ARRAY_NOTATION_START): Likewise.
8313 (ARRAY_NOTATION_LENGTH): Likewise.
8314 (ARRAY_NOTATION_STRIDE): Likewise.
8315 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8316 ARRAY_NOTATION_REF.
8317 (pp_c_expression): Likewise.
8318 * c.opt (flag_enable_cilkplus): New flag.
8319 * array-notation-common.c: New file.
8320
f7716d57
JJ
83212013-05-14 Jakub Jelinek <jakub@redhat.com>
8322
8323 PR c++/57274
8324 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8325
a5e0cd1d
MG
83262013-05-10 Marc Glisse <marc.glisse@inria.fr>
8327
8328 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8329 vectors.
8330
f6bc1c4a
HS
83312013-05-07 Han Shen <shenhan@google.com>
8332
8333 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8334
3f12f6e9
SKS
83352013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8336
8337 * c-common.c (check_user_alignment): Emit error for negative values.
8338
61949153
PC
83392013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8340
8341 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8342
e93e18e9
PC
83432013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8344
8345 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8346 __GXX_EXPERIMENTAL_CXX1Y__.
8347
44d90fe1 83482013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8349 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8350
8351 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8352 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8353 to simply use OPT_Wpointer_arith.
8354 (c_sizeof_or_alignof_type): Likewise.
8355
13f39b2e
PC
83562013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8357
8358 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8359
4b84d650
JJ
83602013-04-12 Jakub Jelinek <jakub@redhat.com>
8361
8362 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8363 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8364 specifiers.
8365
fb037b5d
SB
83662013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8367
8368 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8369
4e856798
PC
83702013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8371
8372 * c-common.c (pointer_int_sum): Remove dead code.
8373
4b1baac8
RS
83742013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8375
8376 PR middle-end/56524
8377 * c-common.c (handle_optimize_attribute): Don't call
8378 save_optabs_if_changed.
8379
0b50e654
JJ
83802013-03-05 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR middle-end/56461
8383 * c-pch.c (pch_init): Free target_validity at the end.
8384
48c41403
JJ
83852013-03-04 Jakub Jelinek <jakub@redhat.com>
8386
8387 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8388
e664c61c
KS
83892013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8390 Jakub Jelinek <jakub@redhat.com>
8391
8392 PR sanitizer/56454
8393 * c-common.c (handle_no_sanitize_address_attribute): New function.
8394 (c_common_attribute_table): Add no_sanitize_address attribute.
8395 (handle_no_address_safety_analysis_attribute): Add
8396 no_sanitize_address attribute, not no_address_safety_analysis
8397 attribute.
8398
a475fd3d 83992013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8400
8401 PR target/52555
8402 * c-common.c (handle_optimize_attribute): Call
8403 save_optabs_if_changed.
8404
f6007d99
JJ
84052013-02-18 Jakub Jelinek <jakub@redhat.com>
8406 Steven Bosscher <steven@gcc.gnu.org>
8407
8408 PR pch/54117
8409 * c-opts.c (c_common_post_options): If debug info is enabled
8410 and non-dwarf*, refuse to load PCH files and when writing PCH
8411 file warn.
8412
cf35e2b1
JJ
84132013-02-05 Jakub Jelinek <jakub@redhat.com>
8414
8415 PR middle-end/56167
8416 * c-common.c (handle_error_attribute): Fix condition.
8417
32887460
JJ
84182013-01-30 Jakub Jelinek <jakub@redhat.com>
8419
8420 PR c++/55742
8421 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8422
5af057d8
JM
84232013-01-18 Jason Merrill <jason@redhat.com>
8424
8425 PR target/54908
8426 * c.opt (-fextern-tls-init): New.
8427 * c-opts.c (c_common_post_options): Handle it.
8428
cc83c823
JJ
84292013-01-09 Jakub Jelinek <jakub@redhat.com>
8430
8431 PR c/48418
8432 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8433 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8434 and is either negative or bigger or equal to type precision
8435 of the first operand.
8436
a859517f
MP
84372012-12-03 Marek Polacek <polacek@redhat.com>
8438
8439 PR c/55570
8440 * c-common.c (check_user_alignment): Swap order of tests,
8441 check TREE_CODE first.
8442
2d7aa578
ESR
84432012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8444
8445 PR c++/52654
8446 * c-common.h (overflow_type): New enum.
8447 (build_userdef_literal): Add overflow_type argument.
8448 (tree_userdef_literal): Add overflow_type.
8449 (USERDEF_LITERAL_OVERFLOW): New access macro.
8450 * c-common.c (build_userdef_literal): Add overflow_type
8451 argument.
8452 * c-lex.c (c_lex_with_flags): Add overflow_type to
8453 build_userdef_literal calls.
8454 (interpret_integer, interpret_float): Add overflow_type argument.
8455
cc3c4f62
RB
84562012-11-28 Richard Biener <rguenther@suse.de>
8457
8458 PR c/35634
8459 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8460 here and use a type with proper overflow behavior for types that would
8461 need to be promoted for the arithmetic.
8462
77bc5132
JJ
84632012-11-23 Jakub Jelinek <jakub@redhat.com>
8464
8465 PR sanitizer/55435
8466 * c-common.c (handle_no_address_safety_analysis_attribute): New
8467 function.
8468 (c_common_attribute_table): Add no_address_safety_analysis.
8469
5dc99c46
SB
84702012-11-16 Simon Baldwin <simonb@google.com>
8471
8472 * c.opt: Add f[no-]canonical-system-headers.
8473 * c-opts.c (c_common_handle_option): Handle
8474 OPT_fcanonical_system_headers.
8475
a4a0016d
ESR
84762012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8477
8478 PR c++/54413
8479 * c-opts.c (c_common_handle_option): Set new flags.
8480 * c.opt: Describe new flags.
8481
7dbb85a7
JM
84822012-11-09 Jason Merrill <jason@redhat.com>
8483
8484 * c.opt (Wabi-tag): New.
8485
ad7bac31
AK
84862012-11-09 Andi Kleen <ak@linux.intel.com>
8487
8488 PR 55139
8489 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8490 MEMMODEL_MASK
ad7bac31 8491
7332899a
MLI
84922012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8493
8494 PR c/53063
8495 * c.opt (Wformat): Make it Alias Wformat=1.
8496 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8497 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8498 LangEnabledBy.
8499 (Wformat=): RejectNegative. Use LangEnabledBy.
8500 (Wnonnull): Use LangEnabledBy.
8501 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8502 * c-format.c (set_Wformat): Delete.
8503 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8504 (maybe_read_dollar_number): Likewise.
8505 (avoid_dollar_number): Likewise.
8506 (finish_dollar_format_checking): Likewise.
8507 (check_format_info): Likewise.
8508 (check_format_info_main): Likewise.
8509 (check_format_types): Likewise.
8510 (format_type_warning): Likewise.
8511 * c-common.c (int): Likewise.
8512 (check_function_sentinel): Likewise.
8e745a17 8513 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8514
34a180a6
MLI
85152012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8516
8517 PR c/53063
8518 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8519 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8520 Use LangEnabledBy.
8521 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8522 common.opt.
8523 (Wvariadic-macros): Init(1).
8524 * c-opts.c (c_common_handle_option): Do not handle them
8525 explicitly.
8526 (c_common_post_options): Likewise.
8527 (sanitize_cpp_opts): warn_unused_macros is now
8528 cpp_warn_unused_macros.
8529 (push_command_line_include): Likewise.
8530 * c-common.c (warn_unknown_pragmas): Do not define.
8531 * c-common.h (warn_unknown_pragmas): Do not declare.
8532
3f46d6a5
MLI
85332012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8534
8535 PR c/51294
8536 * c-common.c (conversion_warning): Handle conditional expressions.
8537
880661a4
JW
85382012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8539
8540 PR c++/54930
8541 * c.opt (Wreturn_local_addr): Define new option.
8542
4514a96b
JM
85432012-10-25 Jason Merrill <jason@redhat.com>
8544
f14edc1a
JM
8545 * c.opt (Wvirtual-move-assign): New.
8546
4514a96b
JM
8547 * c.opt (Winherited-variadic-ctor): New.
8548
93100c6b
MG
85492012-10-25 Marc Glisse <marc.glisse@inria.fr>
8550
8551 PR c++/54427
8552 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8553
1efcb8c6
JM
85542012-10-23 Joseph Myers <joseph@codesourcery.com>
8555
8556 * c-common.h (pch_cpp_save_state): Declare.
8557 * c-target.def (c_preinclude): New hook.
8558 * c-opts.c (done_preinclude): New.
8559 (push_command_line_include): Handle default preincluded header.
8560 (cb_file_change): Call pch_cpp_save_state when calling
8561 push_command_line_include.
8562 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8563 (pch_cpp_save_state): New.
8564 (pch_init): Call pch_cpp_save_state conditionally, instead of
8565 calling cpp_save_state.
8566
4a0ae68e
MLI
85672012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8568
8569 PR c/53063
8570 PR c/40989
8571 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8572 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8573 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8574 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8575 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8576 * c-opts.c (c_common_handle_option): Remove explicit handling from
8577 here.
8578 (c_common_post_options): Likewise.
8579
67e4210b
EB
85802012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8581
8582 * c-ada-spec.c (LOCATION_COL): Delete.
8583 (compare_location): New function.
8584 (compare_node): Use it.
8585 (compare_comment): Likewise.
8586
65d4f2cd
MLI
85872012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8588
8589 PR c/53063
8590 PR c/40989
8591 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8592 * c-opts.c (c_common_handle_option): Do not set them here. Add
8593 comment.
8594 (c_common_post_options): Likewise.
8595
909881cb
EB
85962012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8597
8598 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8599 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8600 Remove POINTER_TYPE handling, add large unsigned handling and use
8601 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8602
3a785c97
JJ
86032012-10-12 Jakub Jelinek <jakub@redhat.com>
8604
8605 PR c/54381
8606 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8607 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8608 locs and array of 3 trees instead of just single loc and single
8609 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8610 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8611 For *cmp* builtins that take two sources strings report warnings
8612 about first and second source, not about destination and source.
8613
5e54f81d
MG
86142012-10-12 Marc Glisse <marc.glisse@inria.fr>
8615
8616 PR c++/53055
8617 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8618
f5b02f1e
EB
86192012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8620
8621 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8622 declaring something coming from another file.
8623
b46dbc6c
AC
86242012-10-10 Arnaud Charlet <charlet@adacore.com>
8625
f5b02f1e 8626 PR ada/54845
b46dbc6c
AC
8627 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8628
5d9de0d0
PC
86292012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8630
8631 PR c++/54194
8632 * c-common.c (warn_about_parentheses): Add location_t parameter;
8633 use EXPR_LOC_OR_LOC.
8634 * c-common.h: Update declaration.
8635
a212e43f
MG
86362012-10-09 Marc Glisse <marc.glisse@inria.fr>
8637
8638 PR c++/54427
8639 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8640 more operations. Make error messages optional.
8641 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8642 (scalar_to_vector): Declare.
8643
b1db7f91
JM
86442012-10-08 Jason Merrill <jason@redhat.com>
8645
8646 * c-common.c (c_common_reswords): Add thread_local.
8647
e28d52cf
DS
86482012-10-08 Dodji Seketeli <dodji@redhat.com>
8649
8650 PR c++/53528 C++11 attribute support
8651 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8652 new functions.
8653 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8654 static function.
8655 (handle_aligned_attribute): In choose strictest alignment
8656 among many. Use new check_cxx_fundamental_alignment_constraints.
8657 (handle_transparent_union_attribute): In c++11 attribute syntax,
8658 don't look through typedefs.
8659
3b78de56
AC
86602012-10-04 Arnaud Charlet <charlet@adacore.com>
8661
8662 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8663 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8664 out of dumpfile.h.
8665
6040bb5f
DC
86662012-09-25 Dehao Chen <dehao@google.com>
8667
8668 PR middle-end/54645
3b78de56 8669 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8670 map when read in the pch.
8671
3f8257db 86722012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8673
8674 * c-ada-spec.c: Style fixes.
8675
3f8257db 86762012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8677
8678 * c.opt (-fada-spec-parent): Define new command line switch.
8679 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8680 is specified, generate binding spec as a child of the specified unit.
8681
0ccb505d
PC
86822012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8683 Manuel López-Ibáñez <manu@gcc.gnu.org>
8684
8685 PR c++/53210
8686 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8687
c583af79
AC
86882012-08-23 Arnaud Charlet <charlet@adacore.com>
8689
8690 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8691 for pointers, and add missing Convention C pragma.
8692 (print_ada_struct_decl): Add missing aliased keyword.
8693 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8694
1a4049e7
JJ
86952012-08-17 Jakub Jelinek <jakub@redhat.com>
8696
8697 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8698 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8699 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8700 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8701 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8702
70b5e7dc
RG
87032012-08-10 Richard Guenther <rguenther@suse.de>
8704
8705 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8706
f8923f7e
SB
87072012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8708
8709 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8710 instead of separate pp_newline and pp_flush.
8711 (print_c_tree): Likewise.
8712
e45abe1f
RH
87132012-07-26 Richard Henderson <rth@redhat.com>
8714
8715 * c-common.c (handle_hot_attribute): Allow labels.
8716 (handle_cold_attribute): Likewise.
8717
332f1d24
JJ
87182012-07-20 Jakub Jelinek <jakub@redhat.com>
8719
8720 PR c++/28656
8721 * c-common.c (check_function_nonnull): Handle multiple nonnull
8722 attributes properly.
8723
7ee2468b
SB
87242012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8725
8726 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8727 * c-ada-spec.c: Likewise.
8728 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8729
ee7b28eb
SB
87302012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8731
8732 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8733 Remove code conditional on it.
8734
6bdf3519
SB
87352012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8736
8737 * c-gimplify.c: Do not include basic-block.h.
8738 * c-common.c: Do not include linfuncs.h.
8739
532aafad
SB
87402012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8741
8742 * c-common.h: Include tree.h.
8743
8d0d1915
JM
87442012-07-02 Jason Merrill <jason@redhat.com>
8745
8746 PR c++/53524
8747 * c-common.c (get_priority): Call default_conversion.
8748
fbc873ad
UB
87492012-07-01 Uros Bizjak <ubizjak@gmail.com>
8750
8751 * c-pch.c (c_common_write_pch): Remove unused variables.
8752
d4a10d0a
SB
87532012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8754
8755 * cppspec.c: Moved from gcc/ to here.
8756
6f3a2e23
KT
87572012-06-27 Kai Tietz <ktietz@redhat.com>
8758
8759 PR preprocessor/37215
8760 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8761
8ca92d04
SB
87622012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8763
8764 * c-common.h (c_common_print_pch_checksum): Remove.
8765 * c-pch.c: Do not include output.h.
8766 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8767 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8768 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8769 (struct c_pch_header): Remove.
8770 (get_ident): Update gpch version.
8771 (pch_init): Do not print executable_checksum to asm_out_file.
8772 Do not fail if there is no asm_out_file to read back from. Set
8773 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8774 (c_common_write_pch): Verify that nothing was written to asm_out_file
8775 since pch_init was called. Do not write a c_pch_header, and do not
8776 copy from asm_out_file to the PCH.
8777 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8778 the content of asm_out_file from the PCH.
8779 (c_common_print_pch_checksum): Remove.
8780 * c-opts.c (c_common_init): Print out executable_checksum directly.
8781
70f42967
SB
87822012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8783
8784 * c-target.def (objc_declare_unresolved_class_reference,
8785 objc_declare_class_definition): Add new hooks.
8786
a8781821
SB
87872012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8788
8789 * c-lex.c: Do not include output.h.
8790 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8791 Remove uses of ASM_OUTPUT_IDENT.
8792
9e1a8dd1
RR
87932012-06-15 Marc Glisse <marc.glisse@inria.fr>
8794
8795 PR c++/51033
8796 * c-common.h (c_build_vec_perm_expr): Move decl here.
8797 * c-common.c (c_build_vec_perm_expr): Move definition
8798 here.
8799
6f07a821
SB
88002012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8801
8802 * c.opt (fconserve-space): Turn into a no-op.
8803
9faeb493 88042012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8805
8806 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8807 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8808 both the start and end of the function.
8809
a4b7d13c
SB
88102012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8811
8812 * c-common.c: Do not include output.h.
8813 * c-pragma.c: Likewise.
8814
c265f413
SA
88152012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8816
8817 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8818 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8819 (lang_decl_name): Handle namespace decls.
8820
be7a421e
SB
88212012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8822
8823 * c-ada-spec.c: Do not include output.h.
8824 * c-semantics.c: Likewise.
8825
65de6659
JM
88262012-05-29 Joseph Myers <joseph@codesourcery.com>
8827
8828 * c-common.c: Fix typo.
8829
ca5f4331
MM
88302012-05-29 Michael Matz <matz@suse.de>
8831
8832 * c-common.h (c_expand_decl): Remove prototype.
8833
4f7f7aca
MLI
88342012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8835
8836 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8837 * c-opts.c (c_common_handle_option): Remove code handling
8838 warn_missing_braces.
8839
4a792f9b
PC
88402012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8841
8842 PR c++/25137
8843 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8844 -Wmissing_braces.
8845
650dc14a
DS
88462012-05-22 Dodji Seketeli <dodji@redhat.com>
8847
8848 PR c++/53322
8849 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8850
9b095bf1
MLI
88512012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8852
8853 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8854 * c-opts.c (c_common_handle_option): Do not handle explicitly
8855 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8856
0b2c4be5
DS
88572012-05-16 Dodji Seketeli <dodji@redhat.com>
8858
8859 PR preprocessor/7263
ab20d992 8860 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8861 to cpp_classify_number. For diagnostics, use the precise location
8862 instead of the global input_location.
8863
a1bde5af
PC
88642012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8865
d02924ef 8866 PR c++/11856
a1bde5af
PC
8867 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8868
d1ede5f4
BS
88692012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8870
a1bde5af 8871 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8872
f2bc201f
MLI
88732012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8874
8875 PR 53063
8876 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8877 Wreorder): Use LangEnabledBy.
8878 * c-opts.c (c_common_handle_option): Do not enable them
8879 explicitly. Call lang-specific generated functions.
8880 (c_common_post_options): Do not set them here.
8881
95744782
MLI
88822012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8883
8884 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8885 Wmissing-field-initializers,Wmissing-parameter-type,
8886 Wold-style-declaration,Woverride-init): Use EnabledBy.
8887 * c-opts.c (c_common_post_options): Do not set here explicitly.
8888
7d5a5747
MLI
88892012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8890
8891 PR 53063
8892 * c-opts.c (c_common_handle_option): Use handle_generated_option
8893 to enable sub-options.
8894
5a3c9cf2
PC
88952012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8896
8897 PR c++/53158
8898 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8899
3ac8781c
RG
89002012-05-10 Richard Guenther <rguenther@suse.de>
8901
8902 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8903 adjust commentary about TYPE_IS_SIZETYPE types.
8904
1e537948
MLI
89052012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8906
8907 PR c++/53261
8908 * c-common.c (warn_logical_operator): Check that argument of
8909 integer_zerop is not NULL.
8910
f2c4a785
MLI
89112012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8912
8913 PR c/43772
8914 * c-common.c (warn_logical_operator): Do not warn if either side
8915 is already true or false.
8916
50f305ca
MLI
89172012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8918
8919 PR c/51712
8920 * c-common.c (expr_original_type): New.
8921 (shorten_compare): Do not warn for enumeration types.
8922
0c3641b0
MLI
89232012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8924
8925 * c.opt (fpermissive): Add Var(flag_permissive).
8926
7edaa4d2
MG
89272012-04-30 Marc Glisse <marc.glisse@inria.fr>
8928
8929 PR c++/51033
8930 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8931 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8932
b9c8da34
DS
89332012-04-30 Dodji Seketeli <dodji@redhat.com>
8934
8935 Add -Wvarargs option
ab20d992 8936 * c.opt (Wvarargs): Define new option.
b9c8da34 8937
e6c69da0
MLI
89382012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8939
8940 * c-common.c (check_function_arguments): Replace
8941 Wmissing-format-attribute with Wsuggest-attribute=format.
8942
90137d8f
MLI
89432012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8944
8945 * c.opt (Wsuggest-attribute=format): New. Alias of
8946 Wmissing-format-attribute.
8947 * c-format.c (decode_format_type): Replace
8948 Wmissing-format-attribute with Wsuggest-attribute=format.
8949 (check_function_format): Likewise.
8950
9faeb493 89512012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8952
8953 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8954 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8955 * c.opt: Add Wliteral-suffix.
8956
c1771a20
MLI
89572012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8958
8959 PR c/44774
8960 * c.opt (Wpedantic): New.
8961 (pedantic): Alias Wpedantic.
8962 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8963 (c_common_post_options): Likewise.
8964 (sanitize_cpp_opts): Likewise.
8965 * c-lex.c (interpret_float): Likewise.
8966 * c-format.c (check_format_types): Likewise.
8967 * c-common.c (pointer_int_sum): Likewise.
8968 (c_sizeof_or_alignof_type): Likewise.
8969 (c_add_case_label): Likewise.
8970 (c_do_switch_warnings): Likewise.
8971 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8972
04b391c1
JM
89732012-04-15 Jason Merrill <jason@redhat.com>
8974
8975 PR c++/52818
8976 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8977 (C_STD_NAME): Distinguish between C++98 and C++11.
8978
ac868f29
EB
89792012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8980
8981 PR target/52624
8982 * c-common.h (uint16_type_node): Rename into...
8983 (c_uint16_type_node): ...this.
8984 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8985 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8986
fd4116f4
MLI
89872012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8988
8989 * c-common.c (warn_if_unused_value): Move definition to here.
8990 * c-common.h (warn_if_unused_value): Move declaration to here.
8991
573ac65e
WB
89922012-03-23 William Bader <williambader@hotmail.com>
8993
8994 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8995
552b8185
JM
89962012-03-20 Jason Merrill <jason@redhat.com>
8997
8998 * c-common.h (enum cxx_dialect): Add cxx1y.
8999 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9000 test.
9001 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9002 * c-opts.c (c_common_post_options): Likewise.
9003 (set_std_cxx1y): New.
9004 (c_common_handle_option): Call it.
9005 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9006
04398fa8
PC
90072012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9008
9009 PR c++/14710
9010 * c.opt ([Wuseless-cast]): Add.
9011
d2a12ae7
RG
90122012-03-16 Richard Guenther <rguenther@suse.de>
9013
9014 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9015
a12bf402
MLI
90162012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9017
9018 PR c++/44783
9019 * c.opt (ftemplate-backtrace-limit) Add.
9020
5c30094f
RO
90212012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9022
9023 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9024 handling.
9025 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9026 (init_pragma): Don't register extern_prefix.
9027
21fa2faf
RG
90282012-03-12 Richard Guenther <rguenther@suse.de>
9029
9030 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9031 (builtin_type_for_size): Likewise.
9032
e3793c6f
JJ
90332012-02-13 Jakub Jelinek <jakub@redhat.com>
9034
9035 PR c++/52215
9036 * c-common.c (sync_resolve_params): Don't decide whether to convert
9037 or not based on TYPE_SIZE comparison, convert whenever arg_type
9038 is unsigned INTEGER_TYPE.
9039
93286335
PC
90402012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9041
9042 PR c/52118
9043 * c.opt ([Wunused-local-typedefs]): Fix description.
9044
7a421706
MS
90452012-01-24 Mike Stump <mikestump@comcast.net>
9046
9047 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9048 exactly.
9049
ba9b1f11
RG
90502012-01-18 Richard Guenther <rguenther@suse.de>
9051
9052 * c-opts.c (c_common_post_options): Reset LTO flags if
9053 we are about to generate a PCH.
9054
465406be
PC
90552012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9056
9057 PR c++/51777
9058 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9059 use pp_unsigned_wide_integer.
9060
aee15221
RG
90612012-01-10 Richard Guenther <rguenther@suse.de>
9062
9063 PR middle-end/51806
9064 * c-opts.c (c_common_handle_option): Move -Werror handling
9065 to language independent code.
9066
5720c0dc
RG
90672012-01-05 Richard Guenther <rguenther@suse.de>
9068
9069 PR middle-end/51764
9070 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9071 from common.opt.
9072
73ac190a
PC
90732011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9074
9075 PR c++/51316
9076 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9077 of array types with an unknown bound.
9078
48b0b196
JM
90792011-12-20 Joseph Myers <joseph@codesourcery.com>
9080
9081 * c-common.c (flag_isoc99): Update comment to refer to C11.
9082 (flag_isoc1x): Change to flag_isoc11.
9083 * c-common.h (flag_isoc99): Update comment to refer to C11.
9084 (flag_isoc1x): Change to flag_isoc11.
9085 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9086 C11.
9087 * c-opts.c (set_std_c1x): Change to set_std_c11.
9088 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9089 Call set_std_c11.
9090 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9091 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9092 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9093 standard.
9094 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9095 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9096 (std=gnu1x): Make alias of std=gnu11.
9097
d58d6eb5
JM
90982011-12-19 Jason Merrill <jason@redhat.com>
9099
9100 PR c++/51228
9101 * c-common.c (handle_transparent_union_attribute): Check the first
9102 field if the type is complete.
9103
b3908fcc
JW
91042011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9105
9106 PR libstdc++/51365
9107 * c-common.c (RID_IS_FINAL): Add.
9108 * c-common.h (RID_IS_FINAL): Add.
9109
fea3ca91
IS
91102011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9111
9112 * c.opt (fgnu-runtime): Provide full description.
9113 (fnext-runtime): Likewise.
9114 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9115
62bad7cd
AM
91162011-11-28 Andrew MacLeod <amacleod@redhat.com>
9117
9118 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9119 predefines in one place. Add LOCK_FREE predefines.
9120 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9121 new func.
9122
c466c4ff
AM
91232011-11-24 Andrew MacLeod <amacleod@redhat.com>
9124
9125 PR c/51256
9faeb493 9126 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9127 conditions
9faeb493
UB
9128 (resolve_overloaded_atomic_exchange,
9129 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9130 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9131 error_mark_node for error conditions.
9faeb493 9132
a5952633
RG
91332011-11-08 Richard Guenther <rguenther@suse.de>
9134
9135 PR middle-end/51010
ab20d992 9136 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9137
0a35513e
AH
91382011-11-07 Richard Henderson <rth@redhat.com>
9139 Aldy Hernandez <aldyh@redhat.com>
9140 Torvald Riegel <triegel@redhat.com>
9141
9142 Merged from transactional-memory.
9143
9144 * c-common.c (handle_tm_wrap_attribute,
9145 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9146 (struct c_common_reswords): Added __transaction* keywords.
9147 (struct c_common_attribute_table): Added transaction* and tm_regparm
9148 attributes.
9149 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9150 masks.
9151 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9152 find_tm_attribute): Declare.
9153
6d87092d
JM
91542011-11-07 Jason Merrill <jason@redhat.com>
9155
9156 PR c++/35688
9157 * c-common.c, c-common.h: Revert yesterday's changes.
9158
8e7860a1
JM
91592011-11-06 Jason Merrill <jason@redhat.com>
9160
9161 PR c++/35688
9162 * c-common.c (decl_has_visibility_attr): Split out from...
9163 (c_determine_visibility): ...here.
9164 * c-common.h: Declare it.
9165
d19fa6b5
JM
91662011-11-06 Joseph Myers <joseph@codesourcery.com>
9167
9168 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9169 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9170 type.
9171 (check_user_alignment): New. Split out of
9172 handle_aligned_attribute. Disallow integer constants with
9173 noninteger types. Conditionally allow zero.
9174 (handle_aligned_attribute): Use check_user_alignment.
9175 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9176
86951993
AM
91772011-11-06 Andrew MacLeod <amacleod@redhat.com>
9178 Richard Henderson <rth@redhat.com>
9179
9180 Merged from cxx-mem-model.
9181
9182 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9183 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9184 parameters that are the same type size.
9185 (get_atomic_generic_size): New. Find size of generic
9186 atomic function parameters and do typechecking.
9187 (add_atomic_size_parameter): New. Insert size into parameter list.
9188 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9189 either __atomic_exchange_n or external library call.
9faeb493 9190 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9191 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9192 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9193 __atomic_load_n or an external library call.
9194 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9195 __atomic_store_n or an external library call.
9196 (resolve_overloaded_builtin): Handle new __atomic builtins.
9197
cf9e9959
EB
91982011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9199
9200 PR c++/50608
9201 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9202 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9203 <INDIRECT_REF>: Return the argument.
9204 <ARRAY_REF>: Remove special code for negative offset.
9205 Call fold_build_pointer_plus instead of size_binop.
9206 (fold_offsetof): Remove STOP_REF argument and adjust.
9207 * c-common.h (fold_offsetof_1): Declare.
9208 (fold_offsetof): Remove STOP_REF argument.
9209
25339f10
JM
92102011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9211
9212 PR c++/50810
9213 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9214 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9215 Wnarrowing for C++0x and C++98.
9216 * c.opt ([Wnarrowing]): Update.
9217
89401152
PC
92182011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9219
9220 PR c++/44277
9221 * c.opt: Add Wzero-as-null-pointer-constant.
9222
97e3ad20
JM
92232011-10-31 Jason Merrill <jason@redhat.com>
9224
15694fdd
JM
9225 * c.opt (-fdeduce-init-list): Off by default.
9226
97e3ad20
JM
9227 PR c++/50920
9228 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9229 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9230 and -Wc++11-compat.
9231 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9232
fb9120e3
RAV
92332011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9234
9235 PR c++/30066
9236 * c.opt (fvisibility-inlines-hidden): Description change.
9237
3ce4f9e4
ESR
92382011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9239
9240 Implement C++11 user-defined literals.
9241 * c-common.c (build_userdef_literal): New.
9242 * c-common.def: New tree code.
9243 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9244 * c-lex.c (interpret_float): Add suffix parm.
9245 (c_lex_with_flags): Build literal tokens.
9246
5f53c243
PC
92472011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9248
9249 PR c++/50841
9250 Revert:
9251 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9252
9253 PR c++/50810
9254 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9255 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9256 Wnarrowing for C++0x and C++98.
9257 * c.opt ([Wnarrowing]): Update.
9258
263734e1
PC
92592011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9260
9261 PR c++/50810
9262 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9263 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9264 Wnarrowing for C++0x and C++98.
9265 * c.opt ([Wnarrowing]): Update.
9266
d2e312d7
PC
92672011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9268
9269 PR c++/45385
9270 * c-common.c (conversion_warning): Remove code looking for
9271 artificial operands.
9272
d17687f6
DS
92732011-10-18 Dodji Seketeli <dodji@redhat.com>
9274
9275 PR bootstrap/50760
9276 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9277 !NO_IMPLICIT_EXTERN_C.
d17687f6 9278
fc8396e9
PC
92792011-10-17 Michael Spertus <mike_spertus@symantec.com>
9280
9281 * c-common.c (c_common_reswords): Add __bases,
9282 __direct_bases.
9283 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9284
92852011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9286
9287 PR c++/50757
9288 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9289
847e697a
TT
92902011-10-15 Tom Tromey <tromey@redhat.com>
9291 Dodji Seketeli <dodji@redhat.com>
9292
9293 * c.opt (fdebug-cpp): New option.
9294 * c-opts.c (c_common_handle_option): Handle the option.
9295 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9296 output stream in parameter. Factorized from ...
9297 (maybe_print_line): ... this. Dump location debug information when
9298 -fdebug-cpp is in effect.
9299 (print_line_1): New static function. Takes an output stream in
9300 parameter. Factorized from ...
9301 (print_line): ... here. Dump location information when -fdebug-cpp
9302 is in effect.
9303 (scan_translation_unit): Dump location information when
9304 -fdebug-cpp is in effect.
9305
92582b75
TT
93062011-10-15 Tom Tromey <tromey@redhat.com>
9307 Dodji Seketeli <dodji@redhat.com>
9308
9309 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9310 without argument.
9311 * c-opts.c (c_common_handle_option)<case
9312 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9313 cases. Handle -ftrack-macro-expansion with and without argument.
9314
46427374
TT
93152011-10-15 Tom Tromey <tromey@redhat.com>
9316 Dodji Seketeli <dodji@redhat.com>
9317
9318 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9319 (print_line, cb_define, do_line_change): Adjust to avoid touching
9320 the internals of struct line_map. Use the public API instead.
9321 * c-pch.c (c_common_read_pch): Likewise.
9322 * c-lex.c (fe_file_change): Likewise.
9323
fc8396e9
PC
93242011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9325
9326 PR c++/17212
9327 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9328
93292011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9330
9331 PR c++/33067
9332 * c-pretty-print.c (pp_c_floating_constant): Output
9333 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9334
e79983f4
MM
93352011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9336
9337 * c-common.c (def_builtin_1): Delete old interface with two
9338 parallel arrays to hold standard builtin declarations, and replace
9339 it with a function based interface that can support creating
9340 builtins on the fly in the future. Change all uses, and poison
9341 the old names. Make sure 0 is not a legitimate builtin index.
9342 * c-omp.c (c_finish_omp_barrier): Ditto.
9343 (c_finish_omp_taskwait): Ditto.
9344 (c_finish_omp_flush): Ditto.
9345
6637388f
TG
93462011-10-11 Tristan Gingold <gingold@adacore.com>
9347
9348 * c.opt: (fallow-parameterless-variadic-functions): New.
9349
3797cb21
DS
93502011-09-08 Dodji Seketeli <dodji@redhat.com>
9351
9352 PR c++/33255 - Support -Wunused-local-typedefs warning
9353 * c-common.h (struct c_language_function::local_typedefs): New
9354 field.
9faeb493
UB
9355 (record_locally_defined_typedef, maybe_record_typedef_use)
9356 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9357 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9358 (maybe_record_typedef_use)
9359 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9360 * c.opt: Declare new -Wunused-local-typedefs flag.
9361
693ddb1b
EB
93622011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9363
9364 PR middle-end/50266
9365 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9366 computations.
9367
830c740f
RG
93682011-09-05 Richard Guenther <rguenther@suse.de>
9369
9370 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9371 of integer_minus_one_node for empty array upper bounds.
9372
892a371f
DS
93732011-08-28 Dodji Seketeli <dodji@redhat.com>
9374
9375 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9376 it's the first time it's being called on this main TU.
9377
0e3fdb48
RB
93782011-08-24 Richard Guenther <rguenther@suse.de>
9379
9380 PR c/49396
9381 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9382
93832011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9384
9385 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9386 defined in cpp_init_builtins and c_cpp_builtins.
9387
d4a83c10
JM
93882011-08-19 Joseph Myers <joseph@codesourcery.com>
9389
9390 * c-common.c (c_common_reswords): Add __builtin_complex.
9391 * c-common.h (RID_BUILTIN_COMPLEX): New.
9392
bbceee64
JM
93932011-08-18 Joseph Myers <joseph@codesourcery.com>
9394
9395 * c-common.c (c_common_reswords): Add _Noreturn.
9396 (keyword_is_function_specifier): Handle RID_NORETURN.
9397 * c-common.h (RID_NORETURN): New.
9398
3f8257db 93992011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9400
9401 * c-common.c (unsafe_conversion_p): New function. Check if it is
9402 unsafe to convert an expression to the type.
9403 (conversion_warning): Adjust, use unsafe_conversion_p.
9404 * c-common.h (unsafe_conversion_p): New function declaration.
9405
20906c66
JJ
94062011-08-02 Jakub Jelinek <jakub@redhat.com>
9407
9408 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9409 (c_finish_omp_taskyield): New prototype.
9410 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9411 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9412 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9413 or RHS1 have side-effects, evaluate those too in the right spot,
9414 if it is a decl and LHS is also a decl, error out if they
9415 aren't the same.
9416 (c_finish_omp_taskyield): New function.
9417 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9418 * c-pragma.c (omp_pragmas): Add taskyield.
9419 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9420 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9421 PRAGMA_OMP_CLAUSE_MERGEABLE.
9422
770e5a2e
DS
94232011-07-25 Dodji Seketeli <dodji@redhat.com>
9424
9425 * c-common.h (set_underlying_type): Remove parm name from
9426 declaration.
9427
1baae426
RG
94282011-07-25 Romain Geissler <romain.geissler@gmail.com>
9429
9430 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9431
fcb21722
JM
94322011-07-22 Jason Merrill <jason@redhat.com>
9433
76f86d00
JM
9434 PR c++/49793
9435 * c.opt (Wnarrowing): New.
9436
3a636414
JM
9437 PR c++/30112
9438 * c-common.h: Declare c_linkage_bindings.
9439 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9440
fcb21722
JM
9441 PR c++/49813
9442 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9443 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9444 as flag_isoc99 for 'restrict'.
9445 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9446
02614448
ILT
94472011-07-21 Ian Lance Taylor <iant@google.com>
9448
9449 PR middle-end/49705
9450 * c-common.c (c_disable_warnings): New static function.
9451 (c_enable_warnings): New static function.
9452 (c_fully_fold_internal): Change local unused_p to bool. Call
9453 c_disable_warnings and c_enable_warnings rather than change
9454 c_inhibit_evaluation_warnings.
9455
34429675
JM
94562011-07-20 Jason Merrill <jason@redhat.com>
9457
9458 PR c++/6709 (DR 743)
9459 PR c++/42603 (DR 950)
9460 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9461 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9462 (CPP_DECLTYPE): New.
9463 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9464
5d49b6a7
RG
94652011-07-19 Richard Guenther <rguenther@suse.de>
9466
9467 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9468 * c-omp.c (c_finish_omp_for): Likewise.
9469
e84a58ff
EB
94702011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9471
9472 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9473 body on the next line.
9474
329af3c7
JM
94752011-07-08 Jason Merrill <jason@redhat.com>
9476
4063e61b
JM
9477 PR c++/45437
9478 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9479
329af3c7
JM
9480 PR c++/49673
9481 * c-common.c (c_apply_type_quals_to_decl): Don't check
9482 TYPE_NEEDS_CONSTRUCTING.
9483
1a072294
RG
94842011-07-06 Richard Guenther <rguenther@suse.de>
9485
9486 * c-common.c (c_common_nodes_and_builtins):
9487 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9488
fce5dddd
RG
94892011-07-05 Richard Guenther <rguenther@suse.de>
9490
9491 * c-common.c (c_common_nodes_and_builtins): Build all common
9492 tree nodes first.
9493
45d439ac
JJ
94942011-06-27 Jakub Jelinek <jakub@redhat.com>
9495
56300785
JJ
9496 * c-common.h (c_tree_chain_next): New static inline function.
9497
45d439ac
JJ
9498 * c-common.c (check_builtin_function_arguments): Handle
9499 BUILT_IN_ASSUME_ALIGNED.
9500
e0a8ecf2
AM
95012011-06-21 Andrew MacLeod <amacleod@redhat.com>
9502
9503 * c-common.c: Add sync_ or SYNC__ to builtin names.
9504 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9505
95062011-06-20 Pierre Vittet <piervit@pvittet.com>
9507
9508 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9509 handler.
9510 (gen_pragma_handler): New union.
9511 (internal_pragma_handler): New type.
9512 (c_register_pragma_with_data)
9513 (c_register_pragma_with_expansion_and_data): New functions.
9514
9515 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9516 (c_register_pragma, c_register_pragma_with_expansion)
9517 (c_invoke_pragma_handler): Changed to work with
9518 internal_pragma_handler.
9519 (c_register_pragma_with_data)
9520 (c_register_pragma_with_expansion_and_data): New functions.
9521
677f3fa8
JM
95222011-06-14 Joseph Myers <joseph@codesourcery.com>
9523
9524 * c-common.c: Include common/common-target.h.
9525 (handle_section_attribute): Use
9526 targetm_common.have_named_sections.
9527 * c-cppbuiltin.c: Include common/common-target.h.
9528 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9529
d7fc8c14
RG
95302011-06-10 Richard Guenther <rguenther@suse.de>
9531
9532 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9533 to print a IDENTIFIER_NODE.
9534
10e48e39
RO
95352011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9536 Joseph Myers <joseph@codesourcery.com>
9537
9538 * c.opt (fbuilding-libgcc): New option.
9539 * c-cppbuiltin.c (c_cpp_builtins): Define
9540 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9541
6976ae51
JM
95422011-06-07 Jason Merrill <jason@redhat.com>
9543
3ff60975
JM
9544 * c-common.c (max_tinst_depth): Lower default to 900.
9545
6976ae51
JM
9546 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9547
009db074
RG
95482011-06-07 Richard Guenther <rguenther@suse.de>
9549
9550 * c-common.c (c_common_nodes_and_builtins): Do not set
9551 size_type_node or call set_sizetype.
9552
b4592b92
DS
95532011-06-07 Dodji Seketeli <dodji@redhat.com>
9554
9555 PR debug/49130
9556 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9557 type when using pointer comparison to compare types.
b4592b92 9558
014ab419
JW
95592011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9560
9561 * c.opt: Add -Wdelete-non-virtual-dtor.
9562 * c-opts.c (c_common_handle_option): Include it in -Wall.
9563
4f60111f
NF
95642011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9565
9566 PR bootstrap/49190
9567
9568 Revert:
9569 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9570
9571 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9572 not tree_common.
9573
4cc4f2f4
JJ
95742011-05-27 Jakub Jelinek <jakub@redhat.com>
9575
9576 PR c++/49165
9577 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9578 C++ don't call c_common_truthvalue_conversion on void type arms.
9579
38e01f9e
NF
95802011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9581
9582 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9583 (stmt_list_stack): Define.
9584 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9585 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9586
92e948a8
NF
95872011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9588
9589 * c-common.c (warning_candidate_p): Check for BLOCKs.
9590
a2fc3e63
NF
95912011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9592
9593 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9594 not tree_common.
9595
0957c029
JJ
95962011-05-25 Jakub Jelinek <jakub@redhat.com>
9597
9598 * c-common.c (def_fn_type): Remove extra va_end.
9599
828fb3ba
JM
96002011-05-23 Jason Merrill <jason@redhat.com>
9601
9602 PR c++/48106
9603 * c-common.c (c_common_get_narrower): New.
9604 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9605
dde05067
NF
96062011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9607
9608 * c-common.h (check_function_arguments): Tweak prototype of
9609 check_function_arguments.
9610 * c-common.c (check_function_arguments): Likewise. Adjust
9611 calls to check_function_nonnull, check_function_format, and
9612 check_function_sentinel.
9613 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9614 separate attributes and typelist arguments. Use
9615 FOREACH_FUNCTION_ARGS to iterate over argument types.
9616
3c0d13bf
PC
96172011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9618
9619 * c-common.c (c_common_reswords): Reorder.
9620 * c-common.h (rid): Likewise.
9621
8242dd04
NF
96222011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9623
9624 * c-common.c (def_fn_type): Don't call build_function_type, call
9625 build_function_type_array or build_varargs_function_type_array
9626 instead.
9627 (c_common_nodes_and_builtins): Likewise.
9628
3d528853
NF
96292011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9630
9631 * c-common.c (c_add_case_label): Omit the loc argument to
9632 build_case_label.
9633 * c-common.h (build_case_label): Remove.
9634 * c-semantics.c (build_case_label): Remove.
9635
a04a722b
JM
96362011-05-05 Joseph Myers <joseph@codesourcery.com>
9637
9638 * c-objc.h (objc_start_method_definition): Update prototype.
9639 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9640
e19a18d4
NF
96412011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9642
9643 * c-common.c (check_main_parameter_types): Reindent. Don't use
9644 TYPE_ARG_TYPES directly.
9645 (handle_nonnull_attribute): Likewise.
9646 (sync_resolve_params): Likewise.
9647 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9648 to check_format_string.
9649 (handle_format_attribute): Likewise.
9650 (check_format_string): Take a function type to examine instead of
9651 a type list. Use a function_arg_iterator to step through argument
9652 types.
9653
c62c040f
RG
96542011-05-04 Richard Guenther <rguenther@suse.de>
9655
9656 * c-common.c (fix_string_type): Use size_int for index type bounds.
9657 (start_fname_decls): Do not pass NULL to build_int_cst.
9658 (c_init_attributes): Likewise.
9659 * c-lex.c (c_lex_with_flags): Likewise.
9660
c12ff9d8
JM
96612011-04-27 Jason Merrill <jason@redhat.com>
9662
9663 * c-common.c (make_tree_vector_from_list): New.
9664 * c-common.h: Declare it.
9665
304dfbe3
RG
96662011-04-26 Richard Guenther <rguenther@suse.de>
9667
9668 PR preprocessor/48248
9669 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9670 for output size with -P.
9671
3c0d13bf
PC
96722011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9673
9674 * c-common.c (struct c_common_resword): Add __underlying_type.
9675 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9676
04695783
JM
96772011-04-20 Jim Meyering <meyering@redhat.com>
9678
9679 * c-format.c (init_dollar_format_checking): Remove useless
9680 if-before-free.
9681
0dc33c3c
NP
96822011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9683
9684 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9685 (objc_detect_field_duplicates): New.
0dc33c3c 9686 * stub-objc.c: Likewise.
3c0d13bf 9687
c59633d9
NP
96882011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9689
9690 * stub-objc.c (objc_declare_protocols): Renamed to
9691 objc_declare_protocol.
9692 * c-objc.h: Likewise.
3c0d13bf 9693
32dabdaf
NP
96942011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9695
9696 * stub-objc.c (objc_declare_class): Updated argument name.
9697
81f653d6
NF
96982011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9699
9700 * c-common.h (c_common_init_ts): Declare.
9701 * c-common.c (c_common_init_ts): Define.
9702
eb345401
NP
97032011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9704
9705 * c-objc.h (objc_build_message_expr): Updated prototype.
9706 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9707
a358e188
MJ
97082011-04-12 Martin Jambor <mjambor@suse.cz>
9709
9710 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9711 of cgraph_node.
9712
e6313a78
RG
97132011-04-11 Richard Guenther <rguenther@suse.de>
9714
9715 * c-common.c (complete_array_type): Build a range type of
9716 proper type.
9717
dcf0c47e
NF
97182011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9719
9720 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9721 (handle_type_generic_attribute): Likewise.
9722
1ee44b26
JM
97232011-04-07 Jason Merrill <jason@redhat.com>
9724
9725 PR c++/48450
9726 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9727 conversion from C++0x scoped enum.
9728
acce4e77
JM
97292011-04-06 Joseph Myers <joseph@codesourcery.com>
9730
9731 * c-target-def.h: New file.
9732 * c-target.def: New file.
9733 * c-target.h: New file.
9734 * c-common.c (targetcm): Don't define here.
9735 * c-common.h (default_handle_c_option): Declare.
9736 * c-format.c: Include c-target.h instead of target.h.
9737 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9738 include tm.h.
9739 (default_handle_c_option): Move from targhooks.c.
9740
e2eefb55
JJ
97412011-03-29 Jakub Jelinek <jakub@redhat.com>
9742
9743 PR preprocessor/48248
9744 * c-ppoutput.c (print): Add src_file field.
9745 (init_pp_output): Initialize it.
9746 (maybe_print_line): Don't optimize by adding up to 8 newlines
9747 if map->to_file and print.src_file are different file.
9748 (print_line): Update print.src_file.
9749
ba78087b
KT
97502011-03-25 Kai Tietz <ktietz@redhat.com>
9751
9752 * c-ada-spec.c (compare_comment): Use filename_cmp
9753 instead of strcmp for filename.
9754
0edf1bb2
JL
97552011-03-25 Jeff Law <law@redhat.com>
9756
adfac8df 9757 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9758
c7dc8804
JM
97592011-03-25 Jason Merrill <jason@redhat.com>
9760
9761 * c.opt: Add -std=c++03.
9762
d1d879b1
EB
97632011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9764
9765 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9766
3f8257db 97672011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9768
9769 PR target/12171
5050afdf
KT
9770 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9771 Display allowed attributes for function pointer types.
9772 (pp_c_attributes_display): New function to display
9773 attributes having affects_type_identity flag set to true.
9774 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9775
62d784f7
KT
9776 * c-common.c (c_common_attribute_table):
9777 Add new element.
9778 (c_common_format_attribute_table): Likewise.
9779
82d37118
JM
97802011-03-18 Jason Merrill <jason@redhat.com>
9781
49a000c3
JM
9782 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9783 * c-common.h: Don't declare it here.
9784 * c-common.c: Or define it here.
9785 * c-opts.c (c_common_handle_option): Or set it here.
9786
82d37118
JM
9787 PR c++/35315
9788 * c-common.c (handle_transparent_union_attribute): Don't
9789 make a duplicate type in C++.
9790
17bc631c
JM
97912011-03-15 Jason Merrill <jason@redhat.com>
9792
9793 * c-common.c (max_constexpr_depth): New.
9794 * c-common.h: Declare it.
9795 * c-opts.c (c_common_handle_option): Set it.
9796 * c.opt (fconstexpr-depth): New option.
9797
1b9b91a6
JM
97982011-03-11 Jason Merrill <jason@redhat.com>
9799
f231b5ff
JM
9800 * c-common.c (attribute_takes_identifier_p): Add missing const.
9801
1b9b91a6
JM
9802 PR c++/46803
9803 * c-common.c (attribute_takes_identifier_p): Assume that an
9804 unknown attribute takes an identifier.
9805
a19e4d44
NF
98062011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9807
9808 PR c/47786
9809 * c-common.c (c_type_hash): Call list_length instead of iterating
9810 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9811
982d62f6
JJ
98122011-02-19 Jakub Jelinek <jakub@redhat.com>
9813
9814 PR c/47809
9815 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9816
0a256240
NP
98172011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9818
9819 * c.opt (fobjc-abi-version=) New.
9820 (fobjc-nilcheck): New.
9821
ba9e6dd5
NF
98222011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9823
9824 PR c++/46890
9825 * c-common.h (keyword_is_decl_specifier): Declare.
9826 * c-common.c (keyword_is_decl_specifier): Define.
9827 (keyword_is_function_specifier): New function.
9828
7273813a
JJ
98292011-01-26 Jakub Jelinek <jakub@redhat.com>
9830
9831 PR c/47473
9832 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9833 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9834 REAL_TYPE.
9835
908ef79b
AC
98362011-01-26 Arnaud Charlet <charlet@adacore.com>
9837
9838 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9839
237e9384
JJ
98402011-01-26 Jakub Jelinek <jakub@redhat.com>
9841
9842 PR pch/47430
9843 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9844 after init_c_lex if pch_file is set.
9845
47ea1edf
DK
98462011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9847
d4dba752 9848 PR c++/43601
47ea1edf
DK
9849 * c.opt (-fkeep-inline-dllexport): New switch.
9850
2aa9c6ae
RG
98512011-01-12 Richard Guenther <rguenther@suse.de>
9852
9853 PR middle-end/32511
9854 * c-common.c (handle_weak_attribute): Warn instead of error
9855 on declaring an inline function weak.
9856
7bd11157
TT
98572011-01-05 Tom Tromey <tromey@redhat.com>
9858
9859 * c-common.h (lvalue_error): Update.
9860 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9861 not error.
9862
0e66e494 98632010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9864
b4f588c4
NP
9865 PR objc/47075
9866 * c-objc.h (objc_finish_message_expr): Added argument to
9867 prototype.
9868
f4da8dce
NF
98692010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9870
9871 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9872 Use prototype_p.
9873
46270f14
NP
98742010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9875
9876 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9877 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9878
4816c593
NF
98792010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9880
9881 * c-common.h (readonly_error): Declare.
9882 * c-common.c (readonly_error): Define.
9883
7a6daeb0
NF
98842010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9885
9886 * c-common.h (invalid_indirection_error): Declare.
9887 * c-common.c (invalid_indirection_error): Define.
9888
892f6119
RG
98892010-12-03 Richard Guenther <rguenther@suse.de>
9890
9891 PR c/46745
9892 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9893 (pp_c_unary_expression): Likewise.
9894 (pp_c_expression): Likewise.
9895
6c39e757
NP
98962010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9897
9898 * c-common.h (objc_finish_function): New.
9899 (objc_non_volatilized_type): Removed.
9900 (objc_type_quals_match): Removed.
9901 * stub-objc.c (objc_finish_function): New.
9902 (objc_non_volatilized_type): Removed.
9903 (objc_type_quals_match): Removed.
9faeb493 9904
7c475d11
JM
99052010-11-30 Joseph Myers <joseph@codesourcery.com>
9906
9907 * c-common.h (parse_optimize_options): Declare.
9908 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9909 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9910
71f3e391
JM
99112010-11-29 Joseph Myers <joseph@codesourcery.com>
9912
9913 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9914 GET_ENVIRONMENT.
9915 * c-pch.c (O_BINARY): Don't define here.
9916 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9917
d5fabb58
JM
99182010-11-25 Joseph Myers <joseph@codesourcery.com>
9919
9920 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9921 targetm.except_unwind_info.
9922
299404a1
JM
99232010-11-23 Joseph Myers <joseph@codesourcery.com>
9924
9925 * c-opts.c (c_common_handle_option): Pass location to
9926 set_struct_debug_option.
9927
c98cd5bf
JM
99282010-11-23 Joseph Myers <joseph@codesourcery.com>
9929
9930 * c-common.c (visibility_options): Move from ../opts.c.
9931 * c-common.h (struct visibility_flags, visibility_options):
9932 Declare here.
9933 * c-opts.c (finish_options): Rename to c_finish_options.
9934 (c_common_init): Update call to finish_options.
9935
a9546771
NP
99362010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9937
9938 PR objc/34033
9939 * c-lex.c (lex_string): Check that each string in an Objective-C
9940 string concat sequence starts with either one or zero '@', and
9941 that there are no spurious '@' signs at the end.
9942
24a57808
JM
99432010-11-20 Joseph Myers <joseph@codesourcery.com>
9944
9945 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9946 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9947 HANDLE_PRAGMA_VISIBILITY.
9948 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9949 HANDLE_PRAGMA_VISIBILITY): Don't define.
9950 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9951
a9aa2c3a
NF
99522010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9953
9954 PR c++/16189
9955 PR c++/36888
9956 PR c++/45331
9957 * c-common.h (keyword_begins_type_specifier): Declare.
9958 (keyword_is_storage_class_specifier): Declare.
9959 (keyword_is_type_qualifier): Declare.
9960 * c-common.c (keyword_begins_type_specifier): New function.
9961 (keyword_is_storage_class_specifier): New function.
9962 (keyword_is_type_qualifier): Declare.
9963
5386338c
JM
99642010-11-19 Joseph Myers <joseph@codesourcery.com>
9965
9966 PR c/46547
9967 * c-common.c (in_late_binary_op): Define.
9968 (c_common_truthvalue_conversion): Check in_late_binary_op before
9969 calling c_save_expr.
9970 * c-common.h (in_late_binary_op): Declare.
9971
69ccdddb
JM
99722010-11-19 Joseph Myers <joseph@codesourcery.com>
9973
9974 * c-opts.c (c_common_handle_option): Update calls to
9975 set_struct_debug_option.
9976
6b192a09
NP
99772010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9978
9979 * c-common.h (objc_declare_protocols): Added additional argument.
9980 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9981
fb52b50a
NF
99822010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9983
9984 PR c/33193
9985 * c-common.h (build_real_imag_expr): Declare.
9986 * c-semantics.c (build_real_imag_expr): Define.
9987
b37421c6
JM
99882010-11-17 Joseph Myers <joseph@codesourcery.com>
9989
9990 * c-opts.c (c_common_parse_file): Take no arguments.
9991 * c-common.h (c_common_parse_file): Update prototype.
9992
07078664
JJ
99932010-11-16 Jakub Jelinek <jakub@redhat.com>
9994
9995 PR c++/46401
9996 * c-common.c (warning_candidate_p): Don't track non-const calls
9997 or STRING_CSTs.
9998
c6a13190
ILT
99992010-11-15 Ian Lance Taylor <iant@google.com>
10000
10001 * c-lex.c (init_c_lex): Set macro debug callbacks if
10002 flag_dump_go_spec is set.
10003
925e8657
NP
100042010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10005
10006 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10007 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10008
bb0a9581
NF
100092010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10010
10011 PR preprocessor/45038
10012 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10013 dialects.
10014
c5fa0890
JM
100152010-11-12 Joseph Myers <joseph@codesourcery.com>
10016
10017 * c-common.h (c_family_lang_mask): Declare.
10018 * c-opts.c (c_family_lang_mask): Make extern.
10019 * c-pragma.c (handle_pragma_diagnostic): Use
10020 control_warning_option.
10021
a4d8c676
JM
100222010-11-12 Joseph Myers <joseph@codesourcery.com>
10023
10024 * c-common.c (parse_optimize_options): Update call to
10025 decode_options.
10026 * c-common.h (c_common_handle_option): Update prototype.
10027 * c-opts.c (c_common_handle_option): Take location_t parameter and
10028 pass it to other functions.
10029
f954bd2c
JM
100302010-11-11 Joseph Myers <joseph@codesourcery.com>
10031
10032 * c-opts.c (warning_as_error_callback): Remove.
10033 (c_common_initialize_diagnostics): Don't call
10034 register_warning_as_error_callback.
10035 (c_common_handle_option): Handle -Werror=normalized= here.
10036
d8a07487
JM
100372010-11-10 Joseph Myers <joseph@codesourcery.com>
10038
10039 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10040 in diagnostic.
10041 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10042 letter.
10043 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10044 Remove trailing '.' from diagnostics.
10045 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10046
d5478783
JM
100472010-11-10 Joseph Myers <joseph@codesourcery.com>
10048
10049 * c-common.c (parse_optimize_options): Pass global_dc to
10050 decode_options.
10051 * c-opts.c (c_common_handle_option): Pass &global_options to
10052 set_Wstrict_aliasing.
10053 * c.opt (v): Don't mark Common or document here.
10054
91ebb981
IS
100552010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10056
10057 PR target/44981
10058 * c-format.c (format_type): New type gcc_objc_string_format_type.
10059 (valid_stringptr_type_p): New.
10060 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10061 (check_format_string): Pass expected type, use
91ebb981
IS
10062 valid_stringptr_type_p (), check that the format string types are
10063 consistent with the format specification.
10064 (decode_format_attr): Warn if NSString is used outside objective-c.
10065 (format_types_orig): Add NSString.
10066 (format_name): New.
10067 (format_flags): New.
10068 (check_format_arg): Handle format strings requiring an external parser.
10069 first_target_format_type: New variable.
10070 (handle_format_attribute): Set up first_target_format_type, pass the
10071 expected format arg string type to check_format_string().
ab20d992 10072 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10073 * stub-objc.c (objc_string_ref_type_p): New.
10074 (objc_check_format_arg): New.
10075
bede2adc
NP
100762010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10077
9faeb493 10078 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10079 * c-common.h (objc_build_class_component_ref): New.
10080 * stub-objc.c (objc_build_class_component_ref): New.
10081
9a179d01
NP
100822010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10083
10084 * c.opt (Wproperty-assign-default): New option.
10085
22d8d616
NP
100862010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10087
10088 Implemented -fobjc-std=objc1 flag.
10089 * c.opt (fobjc-std=objc1): New option.
10090
2debdb4f
NP
100912010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10092
10093 Implemented format and noreturn attributes for Objective-C methods.
10094 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10095 attribute for Objective-C methods.
10096
ec52b111
JM
100972010-10-31 Jason Merrill <jason@redhat.com>
10098
10099 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10100 EXPR_LOC_OR_HERE.
10101
46a88c12
NP
101022010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10103
10104 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10105 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10106 (objc_add_property_declaration): Removed arguments for copies and
10107 ivar.
10108 (objc_build_getter_call): Renamed to
10109 objc_maybe_build_component_ref.
10110 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10111 (objc_is_property_ref): New.
10112 * c-common.c (c_common_reswords): Removed copies and ivar.
10113 * stub-objc.c (objc_add_property_declaration): Removed arguments
10114 for copies and ivar.
10115 (objc_build_getter_call): Renamed to
10116 objc_maybe_build_component_ref.
10117 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10118 (objc_is_property_ref): New.
9faeb493 10119
1e4bf85b
AC
101202010-10-29 Arnaud Charlet <charlet@adacore.com>
10121 Matthew Gingell <gingell@adacore.com>
10122
10123 * c-ada-spec.c (separate_class_package): New function.
10124 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10125 name of their enclosing package.
10126 (print_ada_declaration): Use separate_class_package.
10127
81f0bab2
JM
101282010-10-27 Jason Merrill <jason@redhat.com>
10129
2b08f2c5
JM
10130 * c-common.c (c_common_reswords): Add __is_literal_type.
10131 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10132
81f0bab2
JM
10133 * c-common.c (check_case_value): Remove special C++ code.
10134
200290f2
NP
101352010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10136
10137 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10138 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10139 and RID_LAST_PATTR.
10140 (objc_add_property_declaration): Added additional arguments.
10141 (objc_property_attribute_kind): Removed.
10142 (objc_set_property_attr): Removed.
10143 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10144 copy and nonatomic.
10145 * stub-objc.c (objc_add_property_declaration): Added additional
10146 arguments.
10147 (objc_set_property_attr): Removed.
9faeb493 10148
f614132b
NP
101492010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10150
10151 * c-common.h (objc_add_property_variable): Renamed to
10152 objc_add_property_declaration. Added location argument.
10153 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10154
b8a18805
NP
101552010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10156
10157 * c-common.h (objc_maybe_printable_name): New.
10158 * stub-objc.c (objc_maybe_printable_name): New.
10159
3f8257db
JJ
101602010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10161 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10162
10163 * c-common.h (c_common_mark_addressable_vec): Declare.
10164 * c-common.c (c_common_mark_addressable_vec): New function.
10165
249a82c4
NP
101662010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10167
10168 * c-common.h (objc_set_method_type): Removed.
10169 (objc_add_method_declaration): Added boolean argument.
10170 (objc_start_method_definition): Same change.
10171 (objc_build_method_signature): Same change.
10172 * stub-objc.c (objc_set_method_type): Removed.
10173 (objc_add_method_declaration): Added boolean argument.
10174 (objc_start_method_definition): Same change.
10175 (objc_build_method_signature): Same change.
10176
977e30bc
NP
101772010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10178
10179 * c-common.h (finish_file): Removed.
10180 (objc_write_global_declarations): New.
10181 * c-opts.c (c_common_parse_file): Do not call finish_file.
10182 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10183
da57d1b9
NP
101842010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10185
10186 Implemented parsing @synthesize and @dynamic for
10187 Objective-C/Objective-C++.
10188 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10189 (objc_add_synthesize_declaration): New.
10190 (objc_add_dynamic_declaration): New.
10191 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10192 * stub-objc.c (objc_add_synthesize_declaration): New.
10193 (objc_add_dynamic_declaration): New.
9faeb493 10194
0069111f
MM
101952010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10196
10197 PR target/46041
10198 * c-cppbuiltin.c (mode_has_fma): Move function here from
10199 builtins.c. Don't use the fma optab, instead just use the
10200 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10201 using -save-temps.
10202
e426b47b
NP
102032010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10204
10205 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10206
3f8257db 10207 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10208
9faeb493 10209 Radar 4330422
e426b47b
NP
10210 * c-common.h (objc_non_volatilized_type): New declaration
10211 * stub-objc.c (objc_non_volatilized_type): New stub.
10212
90fbfdc3
NP
102132010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10214
e426b47b 10215 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10216
ab20d992 10217 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10218
9faeb493 10219 Radar 4133425
90fbfdc3 10220 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10221 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10222
c37d8c30
IS
102232010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10224
10225 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10226 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10227 (objc_ivar_visibility_kind): New enum.
10228 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10229 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10230 visibility enum.
10231
1b1562a5
MM
102322010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10233
10234 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10235 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10236 has the appropriate fma builtins.
10237 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10238
668ea4b1
IS
102392010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10240
1b1562a5 10241 merge from FSF apple 'trunk' branch.
3f8257db 10242 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10243
668ea4b1
IS
10244 Radars 4436866, 4505126, 4506903, 4517826
10245 * c-common.c (c_common_resword): Define @property and its attributes.
10246 * c-common.h: Define property attribute enum entries.
10247 (OBJC_IS_PATTR_KEYWORD): New.
10248 (objc_property_attribute_kind): New enum.
10249 Declare objc_set_property_attr (), objc_add_property_variable (),
10250 objc_build_getter_call () and objc_build_setter_call ().
10251 * stub-objc.c (objc_set_property_attr): New stub.
10252 (objc_add_property_variable): Likewise.
10253 (objc_build_getter_call): Likewise.
10254 (objc_build_setter_call) Likewise.
1b1562a5 10255
a1178b30
IS
102562010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10257
1b1562a5 10258 merge from FSF apple 'trunk' branch.
ab20d992 10259 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10260
10261 Radar 3803157 (method attributes)
10262 * c-common.c (handle_deprecated_attribute): Recognize
10263 objc methods as valid declarations.
10264 * c-common.h: Declare objc_method_decl ().
1b1562a5 10265 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10266
a75bfaa6
JM
102672010-10-08 Joseph Myers <joseph@codesourcery.com>
10268
10269 * c-common.c (parse_optimize_options): Call
10270 decode_cmdline_options_to_array_default_mask before
10271 decode_options. Update arguments to decode_options.
10272 * c-common.h (c_common_init_options_struct): Declare.
10273 * c-opts.c (c_common_init_options_struct): New. Split out from
10274 c_common_init_options.
10275
f05b9d93
NP
102762010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10277
10278 Implemented fast enumeration for Objective-C.
10279 * c-common.h (objc_finish_foreach_loop): New.
10280 * stub-objc.c (objc_finish_foreach_loop): New.
10281
1ebe4b4f
JM
102822010-10-05 Joseph Myers <joseph@codesourcery.com>
10283
10284 * c-common.h (struct diagnostic_context): Don't declare here.
10285 (c_common_initialize_diagnostics): Declare using
10286 diagnostic_context typedef.
10287 * c-opts.c (c_common_handle_option): Pass global_dc to
10288 handle_generated_option.
10289
d4d24ba4
JM
102902010-10-04 Joseph Myers <joseph@codesourcery.com>
10291
10292 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10293 handle_generated_option.
10294
478a1c5b
ILT
102952010-10-03 Ian Lance Taylor <iant@google.com>
10296
10297 * c.opt (-fplan9-extensions): New option.
10298
82a1c2fe
FXC
102992010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10300
10301 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10302 Remove.
10303 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10304 of duplicating code.
10305
92902b1b
IS
103062010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10307
10308 * c-common.c: Add two new entries for @optional
10309 and @required keywords.
10310
10311 merge from FSF 'apple/trunk' branch.
3f8257db 10312 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10313
10314 Radar 4386773
10315 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10316 objective-c keywords.
10317 (objc_set_method_opt): New declaration.
10318 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10319
46625112
JM
103202010-09-30 Joseph Myers <joseph@codesourcery.com>
10321
10322 * c-common.c (handle_optimize_attribute): Pass &global_options to
10323 cl_optimization_save and cl_optimization_restore.
10324 * c-opts.c (c_common_handle_option): Pass &global_options to
10325 handle_generated_option.
10326 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10327 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10328 &global_options to cl_optimization_restore.
10329
49b91f05
NP
103302010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10331
10332 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10333 Objective-C/Objective-C++ keywords.
10334
13ed556f 103352010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10336
9faeb493
UB
10337 Merge from 'apple/trunk' branch on FSF servers.
10338
3f8257db 10339 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10340
10341 Radar 4281748
10342 * c-common.h (objc_check_global_decl): New declaration.
10343 * stub-objc.c (objc_check_global_decl): New stub.
10344
f0036cca
JM
103452010-09-29 Joseph Myers <joseph@codesourcery.com>
10346
10347 * c.opt: Don't use VarExists.
10348
e3339d0f
JM
103492010-09-29 Joseph Myers <joseph@codesourcery.com>
10350
10351 * c-common.c (c_cpp_error): Update names of diagnostic_context
10352 members.
10353 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10354 cl_optimization members.
10355 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10356 sanitize_cpp_opts, finish_options): Update names of cpp_options
10357 members.
10358
1973201f
NP
103592010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10360
10361 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10362 (objc_is_reserved_word): Removed.
10363 * c-common.c: Updated comments.
10364 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10365 objc_is_reserved_word.
10366 * stub-objc.c (objc_is_reserved_word): Removed.
10367
f7e71da5
IS
103682010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10369
9faeb493 10370 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10371 include attributes.
10372 (objc_start_method_definition): Likewise.
10373 (objc_build_keyword_decl): Likewise.
10374 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10375 (objc_start_method_definition): Likewise.
10376 (objc_build_keyword_decl): Likewise.
10377
c165dca7
IS
103782010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10379
10380 * c-common.h (objc_start_class_interface): Adjust prototype.
10381 (objc_start_category_interface): Likewise.
10382 (objc_start_protocol): Likewise.
10383 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10384 (objc_start_class_interface): Likewise.
10385 (objc_start_category_interface): Likewise.
10386
7458026b
ILT
103872010-09-27 Ian Lance Taylor <iant@google.com>
10388
10389 * c-common.c (c_common_attribute_table): Add no_split_stack.
10390 (handle_no_split_stack_attribute): New static function.
10391
b581b85b
NP
103922010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10393
9faeb493 10394 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10395
3f8257db 10396 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10397
9faeb493 10398 Radar 4229905
b581b85b
NP
10399 * c-common.h (objc_have_common_type): New declaration.
10400 * stub-objc.c (objc_have_common_type): New stub.
10401
10402 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10403
10404 Radar 4154928
10405 * c-common.h (objc_common_type): New prototype.
9faeb493 10406 * stub-objc.c (objc_common_type): New stub.
b581b85b 10407
46a4da10
JH
104082010-09-24 Jan Hubicka <jh@suse.cz>
10409
10410 * c-common.c (handle_leaf_attribute): New function.
10411 (struct attribute_spec c_common_att): Add leaf.
10412
e200444e
JM
104132010-09-22 Joseph Myers <joseph@codesourcery.com>
10414
10415 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10416 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10417 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10418 -include-barrier, -include-directory, -include-directory=,
10419 -include-directory-after, -include-directory-after=,
10420 -include-prefix, -include-prefix=, -include-with-prefix,
10421 -include-with-prefix=, -include-with-prefix-after,
10422 -include-with-prefix-after=, -include-with-prefix-before,
10423 -include-with-prefix-before=, -no-integrated-cpp,
10424 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10425 -output=, -pedantic, -pedantic-errors, -preprocess,
10426 -print-missing-file-dependencies, -trace-includes, -traditional,
10427 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10428 -user-dependencies, -verbose, -write-dependencies,
10429 -write-user-dependencies, no-integrated-cpp, traditional): New.
10430
29a80ea6
NP
104312010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10432
10433 PR objc/23710
ac1fc2fc
NP
10434 * c-common.h (objc_start_method_definition): Return bool instead
10435 of void.
10436 * stub-objc.c (objc_start_method_definition): Return bool instead
10437 of void.
10438
104392010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10440
10441 PR objc/25965
10442 * c-common.h (objc_get_interface_ivars): New declaration.
10443 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10444
de621752
ILT
104452010-09-15 Ian Lance Taylor <iant@google.com>
10446
10447 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10448 messages. Remove period at end of warning message.
de621752 10449
ba885ec5
NS
104502010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10451
10452 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10453 (handle_alias_attribute): ... here.
10454 (handle_ifunc_attribute): New.
10455
c5ee1358
MM
104562010-09-06 Mark Mitchell <mark@codesourcery.com>
10457
10458 * c-common.h (do_warn_double_promotion): Declare.
10459 * c-common.c (do_warn_double_promotion): Define.
10460
0a0b3574
MM
104612010-09-05 Mark Mitchell <mark@codesourcery.com>
10462
10463 * c.opt (Wdouble-promotion): New.
10464
d1779886
JM
104652010-09-02 Joseph Myers <joseph@codesourcery.com>
10466
10467 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10468 fvtable-thunks, fxref): Mark no longer supported in help text.
10469
2d2bd949
JM
104702010-09-02 Joseph Myers <joseph@codesourcery.com>
10471
10472 * c.opt (Wimport, fall-virtual, falt-external-templates,
10473 fdefault-inline, fenum-int-equiv, fexternal-templates,
10474 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10475 fname-mangling-version-, fnew-abi, fnonnull-objects,
10476 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10477 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10478 applicable.
10479 (fhandle-exceptions): Mark with Alias and Warn.
10480 * c-opts.c (c_common_handle_option): Don't handle options marked
10481 as ignored.
10482
5de8299c
JM
104832010-09-02 Joseph Myers <joseph@codesourcery.com>
10484
10485 * c.opt (Wcomments, Werror-implicit-function-declaration,
10486 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10487 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10488 aliases.
10489 * c-common.c (option_codes): Use OPT_Wcomment instead of
10490 OPT_Wcomments.
10491 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10492 Don't handle options marked as aliases.
10493
0ceb0201
RG
104942010-08-25 Richard Guenther <rguenther@suse.de>
10495
10496 * c-common.c (c_common_get_alias_set): Remove special
10497 handling for pointers.
10498
ac47786e
NF
104992010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10500
10501 * c-common.c: Use FOR_EACH_VEC_ELT.
10502 * c-gimplify.c: Likewise.
10503 * c-pragma.c: Likewise.
10504
c878765b
JM
105052010-08-16 Joseph Myers <joseph@codesourcery.com>
10506
10507 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10508 RejectDriver.
10509 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10510 RejectDriver.
10511 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10512 instead of OPT_MDX and OPT_MMDX.
10513
603349bf
JM
105142010-08-16 Joseph Myers <joseph@codesourcery.com>
10515
10516 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10517
644fa7ac
JM
105182010-08-12 Joseph Myers <joseph@codesourcery.com>
10519
10520 * c.opt (MD, MMD): Change to MDX and MMDX.
10521 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10522
481e1176
JM
105232010-08-11 Joseph Myers <joseph@codesourcery.com>
10524
10525 * c-opts.c (c_common_handle_option): Call handle_generated_option
10526 instead of handle_option.
10527
ac8dc9f7
NF
105282010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10529
10530 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10531 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10532
4f8c876d
NF
105332010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10534
10535 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10536 (pending_redefine_extname): Change type to a VEC.
10537 (add_to_renaming_pragma_list): Update for new type of
10538 pending_redefine_extname.
ac8dc9f7 10539 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10540
3b0c690e
AC
105412010-08-04 Arnaud Charlet <charlet@adacore.com>
10542
10543 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10544 visited.
10545 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10546 decide whether a type has already been declared/seen.
10547 Do not go to the original type.
10548 (dump_nested_types): New parameter forward.
10549 Generate forward declaration if needed and mark type as visited.
10550 (print_ada_declaration): Call dump_nested_types if not already done.
10551 Mark types as visited.
10552
1890bccc
JM
105532010-08-03 Joseph Myers <joseph@codesourcery.com>
10554
10555 * c.opt (-print-pch-checksum): Remove option.
10556 * c-opts.c (c_common_handle_option): Don't handle
10557 OPT_print_pch_checksum.
10558
5f20c657
JM
105592010-07-27 Joseph Myers <joseph@codesourcery.com>
10560
10561 * c-common.h (c_common_handle_option): Update prototype and return
10562 value type.
10563 * c-opts.c (c_common_handle_option): Update prototype and return
10564 value type. Update calls to handle_option and
10565 enable_warning_as_error.
10566
f551f80c
JJ
105672010-07-27 Jakub Jelinek <jakub@redhat.com>
10568
10569 PR c/45079
10570 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10571
61ff2bdc
JM
105722010-07-27 Joseph Myers <joseph@codesourcery.com>
10573
10574 * c-common.h (c_common_missing_argument): Remove.
10575 * c-opts.c (c_common_missing_argument): Remove.
10576 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10577 idirafter, imacros, include, isysroot, isystem, iquote): Add
10578 MissingArgError.
10579 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10580
7a9bf9a4
JM
105812010-07-27 Joseph Myers <joseph@codesourcery.com>
10582
10583 * c-common.h (c_common_option_lang_mask,
10584 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10585 New.
10586 (c_common_init_options): Update prototype.
10587 * c-opts.c (c_common_option_lang_mask): New.
10588 (c_common_initialize_diagnostics): Split out of
10589 c_common_init_options.
10590 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10591 New.
10592 (c_common_init_options): Update prototype. Use decoded options in
10593 search for -lang-asm.
10594
910ad8de
NF
105952010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10596
10597 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10598 * c-format.c: Likewise.
10599
718f9c0f
MLI
106002010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10601
10602 * c-common.h: Include diagnostic-core.h. Error if already
10603 included.
10604 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10605
4d451982
MLI
106062010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10607
adfac8df 10608 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10609 Do not include expr.h
10610 (vector_mode_valid_p): Move here.
10611
119fe915
SB
106122010-06-21 DJ Delorie <dj@redhat.com>
10613
10614 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10615 allow these pragmas anywhere.
10616
106172010-06-14 Jakub Jelinek <jakub@redhat.com>
10618
10619 PR bootstrap/44509
10620 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10621 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10622 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10623 ggc_strdup instead of xstrdup.
10624
106252010-06-10 Jakub Jelinek <jakub@redhat.com>
10626
10627 * c-cppbuiltin.c: Include cpp-id-data.h.
10628 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10629 (lazy_hex_fp_value): New function.
10630 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10631
6662d794
MLI
106322010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10633
10634 * c-gimplify.c: Do not include tree-flow.h
10635
38f8b050
JR
106362010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10637
10638 PR other/44034
10639 * c-common.c: Rename targetm member:
10640 targetm.enum_va_list -> targetm.enum_va_list_p
10641
9589f23e
AS
106422010-06-28 Anatoly Sokolov <aesok@post.ru>
10643
10644 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10645
3b06d379
SB
106462010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10647
10648 * c-cppbuiltin.c: Do not include except.h.
10649
d166d4c3
AK
106502010-06-24 Andi Kleen <ak@linux.intel.com>
10651
9faeb493
UB
10652 * c-common.c (warn_for_omitted_condop): New.
10653 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10654
70cb8be6
JM
106552010-06-21 Joseph Myers <joseph@codesourcery.com>
10656
10657 * c.opt (lang-objc): Remove.
10658 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10659
a4c97feb
JR
106602010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10661
10662 * c-opts.c: Include "tm_p.h".
10663
6e2f1956
JM
106642010-06-20 Joseph Myers <joseph@codesourcery.com>
10665
10666 * c-common.c (parse_optimize_options): Update call to
10667 decode_options.
10668
bc87224e
NF
106692010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10670
10671 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10672 new type of types_used_by_cur_var_decl.
10673
b49cf425
JR
106742010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10675
10676 PR bootstrap/44512
10677 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10678 for C++ standard compliance.
10679
59f9c2ed
JM
106802010-06-16 Jason Merrill <jason@redhat.com>
10681
10682 * c.opt: Add -Wnoexcept.
10683
33766b66
RG
106842010-06-16 Richard Guenther <rguenther@suse.de>
10685
10686 PR c/44555
10687 * c-common.c (c_common_truthvalue_conversion): Remove
10688 premature and wrong optimization concering ADDR_EXPRs.
10689
eff7e30c
AC
106902010-06-15 Arnaud Charlet <charlet@adacore.com>
10691
10692 * c-ada-spec.c (dump_sloc): Remove column info.
10693 (is_simple_enum): New function.
10694 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10695 enum types when relevant.
10696
6312e84d
MLI
106972010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10698
9faeb493 10699 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10700 location.
10701
1cb42611
JM
107022010-06-10 Joseph Myers <joseph@codesourcery.com>
10703
10704 * c-opts.c (c_common_handle_option): Don't handle
10705 OPT_fshow_column.
10706
a9429e29
LB
107072010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10708
10709 * c-pragma.c (push_alignment): Use typed GC allocation.
10710 (handle_pragma_push_options): Likewise.
10711
10712 * c-common.c (parse_optimize_options): Likewise.
10713
10714 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10715 option.
10716
5498f011
JM
107172010-06-07 Joseph Myers <joseph@codesourcery.com>
10718
10719 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10720 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10721 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10722 flag_signed_bitfields, warn_strict_null_sentinel,
10723 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10724 flag_gen_declaration, flag_no_gnu_keywords,
10725 flag_implement_inlines, flag_implicit_templates,
10726 flag_implicit_inline_templates, flag_optional_diags,
10727 flag_elide_constructors, flag_default_inline, flag_rtti,
10728 flag_conserve_space, flag_access_control, flag_check_new,
10729 flag_new_for_scope, flag_weak, flag_working_directory,
10730 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10731 flag_enforce_eh_specs, flag_threadsafe_statics,
10732 flag_pretty_templates): Remove.
10733 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10734 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10735 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10736 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10737 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10738 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10739 flag_no_gnu_keywords, flag_implement_inlines,
10740 flag_implicit_templates, flag_implicit_inline_templates,
10741 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10742 flag_rtti, flag_conserve_space, flag_access_control,
10743 flag_check_new, flag_new_for_scope, flag_weak,
10744 flag_working_directory, flag_use_cxa_atexit,
10745 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10746 flag_threadsafe_statics, flag_pretty_templates,
10747 warn_strict_null_sentinel): Remove.
10748 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10749 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10750 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10751 fimplicit-inline-templates, fimplicit-templates,
10752 flax-vector-conversions, fms-extensions, fnil-receivers,
10753 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10754 frtti, fshort-double, fshort-enums, fshort-wchar,
10755 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10756 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10757 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10758 gen-decls, undef): Use Var.
10759 (fdefault-inline, foptional-diags): Document as doing nothing.
10760 * c-opts.c (c_common_handle_option): Remove cases for options now
10761 using Var. Mark ignored options as such.
10762
39dabefd
SB
107632010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10764
9faeb493 10765 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10766 * c-common.def: Likewise.
10767 * c-common.h: Likewise.
10768 * c-cppbuiltin.c: Likewise.
10769 * c-dump.c: Likewise.
10770 * c-format.c: Likewise.
10771 * c-format.h : Likewise.
10772 * c-gimplify.c: Likewise.
10773 * c-lex.c: Likewise.
10774 * c-omp.c: Likewise.
10775 * c.opt: Likewise.
10776 * c-opts.c: Likewise.
10777 * c-pch.c: Likewise.
10778 * c-ppoutput.c: Likewise.
10779 * c-pragma.c: Likewise.
10780 * c-pragma.h: Likewise.
10781 * c-pretty-print.c: Likewise.
10782 * c-pretty-print.h: Likewise.
10783 * c-semantics.c: Likewise.
10784 * stub-objc.c: Likewise.
10785
10786 * c-common.c: Include gt-c-family-c-common.h.
10787 * c-pragma.c: Include gt-c-family-c-pragma.h.
10788\f
8d9254fc 10789Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
10790
10791Copying and distribution of this file, with or without modification,
10792are permitted in any medium without royalty provided the copyright
10793notice and this notice are preserved.