]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
PR middle-end/93926 - ICE on a built-in redeclaration returning an integer instead...
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
7b60f3ba
JJ
12020-02-25 Jakub Jelinek <jakub@redhat.com>
2
3 PR c/93858
4 * c-pragma.c (handle_pragma_diagnostic): Add missing ? after
5 "did you mean" hint in diagnostics.
6
fb260504
JM
72020-02-15 Jason Merrill <jason@redhat.com>
8
9 * c.opt: Add -std=c++20.
10
1d757b09
EB
112020-02-14 Eric Botcazou <ebotcazou@adacore.com>
12
13 * c-ada-spec.c: Include bitmap.h.
14 (dump_ada_double_name): Rename into...
15 (dump_anonymous_type_name): ...this. Always use the TYPE_UID.
16 (dump_ada_array_type): Adjust to above renaming. Robustify.
17 (dump_nested_types_1): New function copied from... Add dumped_types
18 parameter and pass it down to dump_nested_type.
19 (dump_nested_types): ...this. Remove parent parameter. Just call
20 dump_nested_types_1 on an automatic bitmap.
21 (dump_nested_type): Add dumped_types parameter.
22 <ARRAY_TYPE>: Do not dump it if already present in dumped_types.
23 Adjust recursive calls and adjust to above renaming.
24 (dump_ada_declaration): Adjust call to dump_nested_types.
25 Tidy up and adjust to above renaming.
26 (dump_ada_specs): Initialize and release bitmap obstack.
27
0cc575e4
MS
282020-02-10 Martin Sebor <msebor@redhat.com>
29
30 PR c/93640
31 * c-attribs.c (handle_access_attribute): Correct off-by-one mistakes.
32
a59aa302
JJ
332020-02-10 Jakub Jelinek <jakub@redhat.com>
34
35 PR other/93641
36 * c-format.c (check_plain): Fix up last argument of strncasecmp.
37 Remove useless extra test.
38
e464fc90
TB
392020-02-03 Julian Brown <julian@codesourcery.com>
40 Tobias Burnus <tobias@codesourcery.com>
41
42 * c-cppbuiltin.c (c_cpp_builtins): Update _OPENACC define to 201711.
43
e3b6c052
JM
442020-01-29 Jason Merrill <jason@redhat.com>
45
46 PR c++/89357
47 * c-attribs.c (check_cxx_fundamental_alignment_constraints): Remove.
48
6d00f052
JM
492020-01-23 Jason Merrill <jason@redhat.com>
50
51 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
52
8a990ffa
MS
532020-01-23 Martin Sebor <msebor@redhat.com>
54
55 PR c/84919
56 * c-common.c (check_function_arguments): Avoid overlap checking
57 of sprintf functions.
58
55b7df8b
JM
592020-01-22 Jason Merrill <jason@redhat.com>
60
61 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
62 PR c++/40752
63 * c-warn.c (conversion_warning): Check operands only after checking
64 the whole expression. Don't check second operand of + for sign.
65
c77074d0
JM
662020-01-21 Jason Merrill <jason@redhat.com>
67 Manuel López-Ibáñez <manu@gcc.gnu.org>
68
69 PR c++/40752 - useless -Wconversion with short +=.
70 * c.opt (-Warith-conversion): New.
71 * c-warn.c (conversion_warning): Recurse for operands of
72 operators. Only warn about the whole expression with
73 -Warith-conversion.
74
731dbfc3
JM
752020-01-21 Jason Merrill <jason@redhat.com>
76
77 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
78 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
79
ad1a3914
NS
802020-01-20 Nathan Sidwell <nathan@acm.org>
81
82 PR preprocessor/80005
83 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
84
49789fd0
IS
852020-01-18 Iain Sandoe <iain@sandoe.co.uk>
86
87 * c-common.c (co_await, co_yield, co_return): New.
88 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
89 RID_CO_RETURN): New enumeration values.
90 (D_CXX_COROUTINES): Bit to identify coroutines are active.
91 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
92 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
93 * c.opt (fcoroutines): New command-line switch.
94
4bc1899b
DM
952020-01-10 David Malcolm <dmalcolm@redhat.com>
96
97 * c-format.c (local_event_ptr_node): New.
98 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
99 (init_dynamic_diag_info): Initialize local_event_ptr_node.
100 * c-format.h (T_EVENT_PTR): New define.
101
f25e33fa
MS
1022020-01-10 Martin Sebor <msebor@redhat.com>
103
104 PR c/93132
105 * c-attribs.c (append_access_attrs): Validate against the translated
106 access string rather than the human-readable representation.
107
8d9254fc
JJ
1082020-01-01 Jakub Jelinek <jakub@redhat.com>
109
110 Update copyright years.
111
39292e25
EB
1122019-12-20 Eric Botcazou <ebotcazou@adacore.com>
113
114 * c-ada-spec.h (decl_sloc): Delete.
115 * c-ada-spec.c (decl_sloc): Make static.
116
519d7496
JB
1172019-12-19 Julian Brown <julian@codesourcery.com>
118
119 * c-common.h (c_omp_map_clause_name): Add prototype.
120 * c-omp.c (c_omp_map_clause_name): New function.
121 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
122 PRAGMA_OACC_CLAUSE_DETACH.
123
a6163563
JB
1242019-12-19 Julian Brown <julian@codesourcery.com>
125 Maciej W. Rozycki <macro@codesourcery.com>
126 Tobias Burnus <tobias@codesourcery.com>
127 Thomas Schwinge <thomas@codesourcery.com>
128
129 * c-pragma.h (pragma_omp_clause): Add
130 PRAGMA_OACC_CLAUSE_NO_CREATE.
131
e8f1ade2
MS
1322019-12-17 Martin Sebor <msebor@redhat.com>
133
134 PR c++/61339
135 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
136
368877a1
DM
1372019-12-11 David Malcolm <dmalcolm@redhat.com>
138
139 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
140 implementation.
141 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
142
d68f5d45
DM
1432019-12-09 David Malcolm <dmalcolm@redhat.com>
144
145 * c-format.c (range_label_for_format_type_mismatch::get_text):
146 Replace label_text ctor called with true with label_text::take.
147
d3e28653
DM
1482019-12-09 David Malcolm <dmalcolm@redhat.com>
149
150 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
151 initial newline from expected outputs.
152 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
153 call to diagnostic_show_locus.
154
abd6d8cc
JJ
1552019-12-06 Jakub Jelinek <jakub@redhat.com>
156
157 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
158 now.
159
7906797e
MP
1602019-12-05 Marek Polacek <polacek@redhat.com>
161 Jakub Jelinek <jakub@redhat.com>
162
163 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
164 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
165
5c04da88
MP
1662019-12-05 Marek Polacek <polacek@redhat.com>
167
168 PR c++/92271 - make __is_same alias for __is_same_as.
169 * c-common.c: Add __is_same, an alias for __is_same_as.
170
43aae289
MP
1712019-12-03 Marek Polacek <polacek@redhat.com>
172
173 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
174 * c-cppbuiltin.c (c_cpp_builtins): Predefine
175 __cpp_aggregate_paren_init=201902 for -std=c++2a.
176
d7ddfbcb
JH
1772019-11-30 Jan Hubicka <hubicka@ucw.cz>
178
179 * c-attribs.c (handle_symver_attribute): New function
180 (c_common_attributes): Add symver.
181
65ef05d0
RS
1822019-11-30 Richard Sandiford <richard.sandiford@arm.com>
183
184 * c-common.c (pointer_int_sum): Use verify_type_context to check
185 whether the target allows pointer arithmetic for the types involved.
186 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
187 to check whether the target allows sizeof and alignof operations
188 for the types involved.
189
1a291106
JM
1902019-11-27 Jason Merrill <jason@redhat.com>
191
192 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
193
05d6cb1a
JJ
1942019-11-26 Jakub Jelinek <jakub@redhat.com>
195
196 PR c++/61414
197 * c-attribs.c (handle_mode_attribute): Add mode attribute to
198 ENUMERAL_TYPEs.
199
5b8d9367
JM
2002019-11-25 Joseph Myers <joseph@codesourcery.com>
201
202 PR c/91985
203 * c-common.c (c_common_type_for_mode): Handle decimal
204 floating-point types being NULL_TREE.
205 * c-format.c (get_format_for_type_1): Handle specified types being
206 NULL_TREE.
207 * c-lex.c (interpret_float): Give an error for decimal
208 floating-point constants when decimal floating-point not
209 supported.
210
1fbf51cb
JJ
2112019-11-23 Jakub Jelinek <jakub@redhat.com>
212
213 PR middle-end/83859
214 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
215 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
216 group warning with inform together.
217 (handle_access_attribute): Formatting fix.
218
761df906
JJ
2192019-11-22 Jakub Jelinek <jakub@redhat.com>
220
bdaf8be1
JJ
221 PR c/90677
222 * c-common.h (identifier_global_tag): Declare.
223 * c-format.c (get_pointer_to_named_type): Renamed to ...
224 (get_named_type): ... this. Use identifier_global_tag instead of
225 identifier_global_value, handle the return value being a TYPE_P.
226 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
227 to call get_named_type instead. Formatting fixes.
228
c2ecce6d 229 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
230 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
231 and __cpp_generic_lambdas for -std=c++2a. Define
232 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
233 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
234 __cpp_concepts for -std=c++2a.
235
54aa6b58
MS
2362019-11-22 Martin Sebor <msebor@redhat.com>
237
238 PR middle-end/83859
239 * c-attribs.c (handle_access_attribute): New function.
240 (c_common_attribute_table): Add new attribute.
241 (get_argument_type): New function.
242 (append_access_attrs): New function.
243 (get_nonnull_operand): Rename...
244 (get_attribute_operand): ...to this.
245 * c-common.c (get_nonnull_operand): Rename...
246 (get_attribute_operand): ...to this.
247
6c80b1b5
JM
2482019-11-21 Joseph Myers <joseph@codesourcery.com>
249
250 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
251 of warning.
252
192961ff
JM
2532019-11-19 Joseph Myers <joseph@codesourcery.com>
254
255 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
256 warning for standard attributes mixed with fallthrough attributes.
257
f8aea5e3
JM
2582019-11-15 Joseph Myers <joseph@codesourcery.com>
259
260 * c-attribs.c (handle_fallthrough_attribute): Remove static.
261 * c-common.h (handle_fallthrough_attribute): Declare.
262
2cc94aa8
JM
2632019-11-15 Joseph Myers <joseph@codesourcery.com>
264
265 * c-attribs.c (handle_deprecated_attribute): Remove static.
266 * c-common.h (handle_deprecated_attribute): Declare.
267
7c5890cc
JM
2682019-11-14 Joseph Myers <joseph@codesourcery.com>
269
270 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
271 char for C.
272
b2417b59
JJ
2732019-11-14 Jakub Jelinek <jakub@redhat.com>
274
d0ec7c93
JJ
275 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
276 valid vendors.
277
b2417b59
JJ
278 * c-omp.c (c_omp_check_context_selector): Handle name lists
279 containing string literals. Don't diagnose atomic_default_mem_order
280 with multiple props.
281
00be2a5f
JM
2822019-11-13 Joseph Myers <joseph@codesourcery.com>
283
284 * c-cppbuiltin.c (builtin_define_float_constants): Also define
285 NORM_MAX constants. Update call to get_max_float.
286 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
287 constants.
288
2dbad62d
EB
2892019-11-13 Eric Botcazou <ebotcazou@adacore.com>
290
291 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
292 (dump_forward_type): Do not generate a declaration for function types.
293 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
294 of the component type if it is declared in another file.
295
6ed76044
ML
2962019-11-12 Martin Liska <mliska@suse.cz>
297
298 * c-opts.c (c_common_post_options):
299 Use SET_OPTION_IF_UNSET.
300
62aee289
MR
3012019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
302 Frederik Harwath <frederik@codesourcery.com>
303
304 gcc/c-family/
305 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
306 constant.
307 * c-pragma.c (oacc_pragmas): Add "serial" entry.
308
f486280c
RS
3092019-11-08 Richard Sandiford <richard.sandiford@arm.com>
310
311 * c-common.h (gnu_vector_type_p): New function.
312 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
313 vectors to satisfy gnu_vector_type_p.
314 (c_build_vec_convert): Likewise __builtin_convertvector.
315 (convert_vector_to_array_for_subscript): Likewise when applying
316 implicit vector to array conversion.
317 (scalar_to_vector): Likewise when converting vector-scalar
318 operations to vector-vector operations.
319
017c6491
JM
3202019-11-08 Joseph Myers <joseph@codesourcery.com>
321
322 * c.opt (Wold-style-definition): Initialize to -1.
323 * c-opts.c (c_common_post_options): Set warn_old_style_definition
324 to flag_isoc2x if not set explicitly.
325
c01bd174
JM
3262019-11-07 Joseph Myers <joseph@codesourcery.com>
327
328 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
329
0df65305
JM
3302019-11-05 Jason Merrill <jason@redhat.com>
331
332 * c-opts.c (c_common_post_options): -fconcepts-ts implies
333 -fconcepts.
334
e0c866dd
KK
3352019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
336
337 * c-opts.c (c_common_post_options): Update
338 latest_abi_version.
339
f968ef9b
JJ
3402019-11-02 Jakub Jelinek <jakub@redhat.com>
341
d0c464d2
JJ
342 * c-common.h (c_omp_get_context_selector): Remove.
343 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
344 and renamed to omp_get_context_selector.
345
917dd789
JJ
346 * c-omp.c (c_omp_mark_declare_variant): Use
347 omp_context_selector_set_compare.
348
f968ef9b
JJ
349 PR c++/88335 - Implement P1073R3: Immediate functions
350 * c-common.h (enum rid): Add RID_CONSTEVAL.
351 * c-common.c (c_common_reswords): Add consteval.
352
5f6705b7
JJ
3532019-11-01 Martin Sebor <msebor@redhat.com>
354
355 PR middle-end/91679
356 PR middle-end/91647
357 PR middle-end/91463
358 PR middle-end/92312
359 * c-pretty-print.c (direct_abstract_declarator): Print
360 bound in zero-length arrays.
361 * c.opt (-Wzero-length-bounds): New option.
362
43f1814c
NS
3632019-10-30 Nathan Sidwell <nathan@acm.org>
364
365 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
366 macros.
367
ad1539d5
MS
3682019-10-28 Martin Sebor <msebor@redhat.com>
369
370 PR c/66970
371 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
372 even when only preprocessing.
373 * c-common.h (names_builtin_p): Declare new function.
374 * c-lex.c (init_c_lex): Set has_builtin.
375 (c_common_has_builtin): Define a new function.
376 * c-ppoutput.c (init_pp_output): Set has_builtin.
377
135df52c
JJ
3782019-10-24 Jakub Jelinek <jakub@redhat.com>
379
380 * c-common.h (c_omp_context_selector_matches): Remove.
381 * c-omp.c (c_omp_context_selector_matches): Remove.
382 * c-attribs.c (c_common_attribute_table): Add
383 "omp declare target {host,nohost,block}" attributes.
384
8ad0c477
JM
3852019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
386
387 * c-lex.c (c_common_has_attribute): Update nodiscard value.
388
56898e43
RS
3892019-10-14 Richard Sandiford <richard.sandiford@arm.com>
390
391 * c-common.h (user_facing_original_type_p): Declare.
392 * c-common.c: Include c-spellcheck.h.
393 (user_facing_original_type_p): New function.
394
20de9568
JJ
3952019-10-12 Jakub Jelinek <jakub@redhat.com>
396
397 * c-common.h (c_omp_mark_declare_variant,
398 c_omp_context_selector_matches): Declare.
399 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
400 and hsa-common.h.
401 (c_omp_get_context_selector): Support second argument NULL.
402 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
403 functions.
404 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
405 attribute, add "omp declare variant base" and
406 "omp declare variant variant" attributes.
407
175a85b2
JM
4082019-10-11 Joseph Myers <joseph@codesourcery.com>
409
410 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
411 CppReason(CPP_W_C11_C2X_COMPAT).
412
fe2bc27c
JM
4132019-10-11 Joseph Myers <joseph@codesourcery.com>
414
415 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
416 _Decimal64 and _Decimal128.
417
27dfdc0f
JM
4182019-10-10 Joseph Myers <joseph@codesourcery.com>
419
420 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
421 types if DFP not supported.
422
94e7f906
JJ
4232019-10-10 Jakub Jelinek <jakub@redhat.com>
424
425 * c-common.h (c_omp_check_context_selector,
426 c_omp_get_context_selector): Declare.
427 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
428 in diagnostic message.
429 (c_omp_check_context_selector, c_omp_get_context_selector): New
430 functions.
431 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
432 attribute.
433 (handle_omp_declare_variant_attribute): New function.
434
a7160771
MS
4352019-10-09 Martin Sebor <msebor@redhat.com>
436
437 PR tree-optimization/90879
438 * c.opt (-Wstring-compare): New option.
439
cb57504a
JM
4402019-10-08 Andrew Sutton <asutton@lock3software.com>
441 Jason Merrill <jason@redhat.com>
442
443 Update the concepts implementation to conform to the C++20
444 specification, improve compile times, and generally clean up
445 the implementation.
446
447 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
448 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
449 * c.opt: Add -Wconcepts-ts.
450 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
451 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
452 (set_std_cxx2a): Enable concepts by default.
453
fbb2a6dc
JM
4542019-10-08 Joseph Myers <joseph@codesourcery.com>
455
456 * c-opts.c (c_common_post_options): Set
457 -fno-fp-int-builtin-inexact for C2X.
458
8e007055
JJ
4592019-10-05 Jakub Jelinek <jakub@redhat.com>
460
461 PR c++/91369 - Implement P0784R7: constexpr new
462 * c-cppbuiltin.c (c_cpp_builtins): Predefine
463 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
464
843f104d
JM
4652019-10-04 Joseph Myers <joseph@codesourcery.com>
466
467 PR c/82752
468 * c-format.c (C_STD_VER): Handle C2x.
469 (C_STD_NAME): Likewise.
470 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
471 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
472 modifier allowed and 'p' flag.
473 * c-format.h (enum format_std_version): Add STD_C2X.
474 (struct format_char_info): Mention 'p' in comment on flags2.
475
e9c9a142
DM
4762019-10-01 David Malcolm <dmalcolm@redhat.com>
477
478 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
479 calling diagnostic_show_locus, rather than destroying it afterwards.
480
7552c36a
JJ
4812019-10-01 Jakub Jelinek <jakub@redhat.com>
482
483 PR c++/91925
484 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
485 with NULL DECL_FIELD_OFFSET.
486
8209db25
RS
4872019-10-01 Richard Sandiford <richard.sandiford@arm.com>
488
489 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
490 has a type name, use it in preference to the __vector syntax.
491
9343bf99
RS
4922019-09-30 Richard Sandiford <richard.sandiford@arm.com>
493
494 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
495 two spaces between a comma and "...".
496
59bc434a
JJ
4972019-09-27 Jakub Jelinek <jakub@redhat.com>
498
499 PR c++/88203
500 * c-common.h (c_omp_predefined_variable): Declare.
501 * c-omp.c (c_omp_predefined_variable): New function.
502 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
503 for predefined variables.
504
c6447c20
RS
5052019-09-27 Richard Sandiford <richard.sandiford@arm.com>
506
507 * c-common.h (build_function_call_vec): Take the original
508 function decl as an optional final parameter.
509 (check_builtin_function_arguments): Take the original function decl.
510 * c-common.c (check_builtin_function_arguments): Likewise.
511 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
512 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
513
c4438114
JM
5142019-09-15 Jason Merrill <jason@redhat.com>
515
516 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
517 fold_for_warn in "|| mask" warning.
518
68a57628
ML
5192019-09-10 Martin Liska <mliska@suse.cz>
520
521 * c.opt: Use newly added WarnRemoved.
522
f48ef52e
ML
5232019-09-09 Martin Liska <mliska@suse.cz>
524
525 * c.opt: Update comment of removed
526 options that are preserved only for backward
527 compatibility.
528
67f6e649
ML
5292019-09-06 Martin Liska <mliska@suse.cz>
530
531 PR c++/91125
532 * c-common.c: Remove definition of flag_use_repository.
533 * c-common.h: Likewise.
534 * c-opts.c (c_common_handle_option):
535 Do not handle OPT_frepo option.
536 * c.opt: Mark the option with Deprecated.
537
db9d2274
MP
5382019-09-04 Marek Polacek <polacek@redhat.com>
539
540 * c.opt (fdeduce-init-list): Ignored.
541
68e2c199
PK
5422019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
543
544 PR c/78736
545 * c.opt (Wenum-conversion): New option.
546
7a4418a5
JL
5472019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
548
549 * c-attribs.c (handle_section_attribute): Call the
550 handle_generic_attribute target hook after performing target
551 independent processing.
552 (handle_noinit_attribute): Likewise.
553
5f76ab15
ILT
5542019-09-03 Ian Lance Taylor <iant@golang.org>
555
556 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
557 when using -fgo-dump-spec.
558
ae0d3f6a
ML
5592019-09-02 Martin Liska <mliska@suse.cz>
560
561 PR c++/91155
562 * c-common.c (fname_as_string): Use cxx_printable_name for
563 __PRETTY_FUNCTION__ same as was used before r265711.
564
8a902edb
MP
5652019-08-28 Marek Polacek <polacek@redhat.com>
566
567 Implement P1152R4: Deprecating some uses of volatile.
568 PR c++/91361
569 * c-opts.c (c_common_post_options): Enable -Wvolatile by
570 default for C++2a, unless -Wno-deprecated.
571 * c.opt (Wvolatile): New warning.
572
4742dbe7
MP
5732019-08-28 Marek Polacek <polacek@redhat.com>
574
575 PR c++/91360 - Implement C++20 P1143R2: constinit.
576 * c-common.c (c_common_reswords): Add constinit and __constinit.
577 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
578 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
579 RID_LAST_CXX20.
580 (D_CXX20): Define.
581 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
582 * c-format.c (cxx_keywords): Add "constinit".
583 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
584
6a074892
JJ
5852019-08-27 Jakub Jelinek <jakub@redhat.com>
586
587 PR c++/91415
588 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
589 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
590 like COMPOUND_EXPR rather than normal expression.
591
22f8849d
IS
5922019-08-23 Iain Sandoe <iain@sandoe.co.uk>
593
594 PR pch/61250
595 * c-lex.c (c_lex_with_flags): Don't call
596 c_common_no_more_pch () from here.
597
df375b03
JJ
5982019-08-23 Jakub Jelinek <jakub@redhat.com>
599
600 PR middle-end/91283
601 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
602 instead of flag_excess_precision_cmdline.
603 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
604 * c-opts.c (c_common_post_options): Likewise.
605
14b7950f
MS
6062019-08-22 Martin Sebor <msebor@redhat.com>
607
608 PR middle-end/91490
609 * c-common.c (braced_list_to_string): Add argument and overload.
610 Handle flexible length arrays and unions.
611
8bb2ee59
EB
6122019-08-21 Eric Botcazou <ebotcazou@adacore.com>
613
614 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
615 function declarations where arguments are missing. Rename variables.
616
21c1e205
RB
6172019-08-15 Richard Biener <rguenther@suse.de>
618
619 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
620 enabled, define __SIZETYPE__.
621
f0033821
CL
6222019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
623
624 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
625 exclusion with "section" attribute.
626 (attr_noinit_exclusions): New table.
627 (handle_noinit_attribute): New function.
628
4d732405
RS
6292019-08-13 Richard Sandiford <richard.sandiford@arm.com>
630
631 PR middle-end/91421
632 * c-common.c (resolve_overloaded_builtin): Use
633 copy_decl_built_in_function.
634
51ad8481
MS
6352019-08-13 Martin Sebor <msebor@redhat.com>
636
637 PR c/80619
638 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
639 (asm_fprintf_length_spec): Same.
640 * c-format.h (format_lengths): Add FMT_LEN_w.
641
77eb117f
JJ
6422019-08-10 Jakub Jelinek <jakub@redhat.com>
643
644 * c-pragma.h (enum pragma_omp_clause): Add
645 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
646
398e3feb
JJ
6472019-08-07 Jakub Jelinek <jakub@redhat.com>
648
649 * c-pragma.h (enum pragma_omp_clause): Add
650 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
651 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
652 enumeration value.
653
ab574db6
MP
6542019-08-05 Marek Polacek <polacek@redhat.com>
655
656 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
657 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
658 default for C++2a, unless -Wno-deprecated.
659 * c.opt (Wcomma-subscript): New warning.
660
554a530f
JJ
6612019-07-20 Jakub Jelinek <jakub@redhat.com>
662
663 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
664 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
665 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
666 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
667 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
668 constructs with the loop construct.
669
1a888209
JJ
6702019-07-13 Jakub Jelinek <jakub@redhat.com>
671
672 PR c/91149
673 * c-omp.c (c_omp_split_clauses): Fix a pasto in
674 OMP_CLAUSE_REDUCTION_TASK handling.
675
1fdd6f04
JJ
6762019-07-12 Jakub Jelinek <jakub@redhat.com>
677
678 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
679 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
680
99b1c316
MS
6812019-07-09 Martin Sebor <msebor@redhat.com>
682
683 PR c++/61339
1fdd6f04 684 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
685 and others to class.
686 * c-pretty-print.h: Same.
687
6c1dae73
MS
6882019-07-09 Martin Sebor <msebor@redhat.com>
689
690 PR c++/61339
691 * c-format.c (check_argument_type): Change class-key from class to
692 struct and vice versa to match convention and avoid -Wclass-is-pod
693 and -Wstruct-no-pod.
694 * c-pretty-print.h: Same.
695
8ba6ea87
ML
6962019-07-03 Martin Liska <mliska@suse.cz>
697
698 * c-common.c (try_to_locate_new_include_insertion_point): Remove
699 dead assignemts.
700
83eb9522
JJ
7012019-07-03 Jakub Jelinek <jakub@redhat.com>
702
703 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
704 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
705 with OMP_PARALLEL.
706
1c6ffbab
QZ
7072019-07-02 qing zhao <qing.zhao@oracle.com>
708
709 PR preprocessor/90581
710 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
711 * c.opt: Add new option -fmax-include-depth.
712
7ffc7de5
JM
7132019-06-26 Jason Merrill <jason@redhat.com>
714
715 PR c++/55442 - memory-hog with highly recursive constexpr.
716 * c.opt (fconstexpr-loop-limit): New.
717
361af3e4
JJ
7182019-06-25 Jakub Jelinek <jakub@redhat.com>
719
720 PR sanitizer/90954
721 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
722 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
723
ab20d992
JJ
7242019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
725
726 * c-common.c (c_common_nodes_and_builtins): Define
727 alternate "__intN__" name for "__intN" types.
728
f4af4019
JH
7292019-06-24 Jan Hubicka <jh@suse.cz>
730
731 * c-common.c (braced_lists_to_strings): Check that
732 type is array or integer prior checking string flag.
733
da9e9b57
MB
7342019-06-21 Matthew Beliveau <mbelivea@redhat.com>
735
736 PR c++/90875 - added -Wswitch-outside-range option
737 * c.opt (Wswitch-outside-range): Added new option.
738 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
739
3f3d6a6f
MP
7402019-06-21 Marek Polacek <polacek@redhat.com>
741
742 PR c++/90953 - ICE with -Wmissing-format-attribute.
743 * c-common.c (check_function_arguments_recurse): Use
744 get_attribute_name.
745 (check_missing_format_attribute): Likewise.
746
1bf32c11
MP
7472019-06-19 Marek Polacek <polacek@redhat.com>
748
749 PR c++/60364 - noreturn after first decl not diagnosed.
750 * c-attribs.c (handle_noreturn_attribute): No longer static.
751 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
752 Declare.
753 * c-format.c (check_function_format): Use get_attribute_name.
754
a04c0734
MS
7552019-06-19 Martin Sebor <msebor@redhat.com>
756
757 PR translation/90156
758 * c-format.c (function_format_info::format_type): Adjust type.
759 (function_format_info::is_raw): New member.
760 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
761 (decode_format_attr): Adjust call to decode_format_type.
762 Avoid a redundant call to convert_format_name_to_system_name.
763 Avoid abbreviating the word "arguments" in a diagnostic.
764 (format_warning_substr): New function.
765 (avoid_dollar_number): Quote dollar sign in a diagnostic.
766 (finish_dollar_format_checking): Same.
767 (check_format_info): Same.
768 (struct baltoks_t): New.
769 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
770 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
771 functions.
772 (check_format_info_main): Call check_plain. Use baltoks_t. Call
773 maybe_diag_unbalanced_tokens.
774 (handle_format_attribute): Spell out the word "arguments" in
775 a diagnostic.
776
d3786ebb
MB
7772019-06-11 Matthew Beliveau <mbelivea@redhat.com>
778
779 PR c++/90449 - add -Winaccessible-base option.
780 * c.opt (Winaccessible-base): New option.
781
bf38f7e9
JJ
7822019-06-10 Jakub Jelinek <jakub@redhat.com>
783
784 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
785 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
786 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
787 combined/composite constructs where it is not allowed. Copy over
788 OMP_CLAUSE_REDUCTION_INSCAN.
789
0ecf545c
MS
7902019-06-05 Martin Sebor <msebor@redhat.com>
791
792 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
793 (handle_alias_ifunc_attribute): Same.
794 (handle_copy_attribute): Same.
795 (handle_weakref_attribute): Same.
796 (handle_nonnull_attribute): Same.
797 * c-warn.c (warn_for_sign_compare): Same.
798 (warn_for_restrict): Same.
799 * c.opt: Same.
800
36b34127
MS
8012019-06-05 Martin Sebor <msebor@redhat.com>
802
803 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
804 * c.opt (-Wformat-diag): Remove a spurious period.
805
357a352f
JJ
8062019-05-29 Jakub Jelinek <jakub@redhat.com>
807
808 PR c/90628
809 * c-common.c (check_builtin_function_arguments)
810 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
811 as last argument.
812
2b8235ea
EB
8132019-05-23 Eric Botcazou <ebotcazou@adacore.com>
814
815 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
816
6d86ddc4
ML
8172019-05-22 Martin Liska <mliska@suse.cz>
818
819 PR lto/90500
820 * c-attribs.c (handle_copy_attribute): Do not copy
821 target_clones attribute.
822
419ba5b9
EB
8232019-05-21 Eric Botcazou <ebotcazou@adacore.com>
824
825 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
826 * c-ada-spec.c (print_assignment_operator): New function.
827 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
828 assignment operators declared as methods and filter out the others.
829
e03436e7
TS
8302019-05-17 Thomas Schwinge <thomas@codesourcery.com>
831
832 PR c/89433
833 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
834 "omp declare target".
835
a9c697b8
MS
8362019-05-16 Martin Sebor <msebor@redhat.com>
837
ab20d992
JJ
838 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
839 keywords, operators, and types in diagnostics.
840 (handle_scalar_storage_order_attribute): Same.
841 (handle_mode_attribute): Same.
842 (handle_visibility_attribute): Same.
843 (handle_assume_aligned_attribute): Same.
844 (handle_no_split_stack_attribute): Same.
845 * c-common.c (shorten_compare): Same.
846 (c_common_truthvalue_conversion): Same.
847 (cb_get_source_date_epoch): Same.
848 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
849 in diagnostics.
850 (interpret_float): Same.
851 * c-omp.c (c_finish_omp_for): Same.
852 * c-opts.c (c_common_post_options): Same.
853 * c-pch.c (c_common_pch_pragma): Same.
854 * c-pragma.c (pop_alignment): Same.
855 (handle_pragma_pack): Same.
856 (apply_pragma_weak): Same.
857 (handle_pragma_weak): Same.
858 (handle_pragma_scalar_storage_order): Same.
859 (handle_pragma_redefine_extname): Same.
860 (add_to_renaming_pragma_list): Same.
861 (maybe_apply_renaming_pragma): Same.
862 (push_visibility): Same.
863 (handle_pragma_visibility): Same.
864 (handle_pragma_optimize): Same.
865 (handle_pragma_message): Same.
866 * c-warn.c (warn_for_omitted_condop): Same.
867 (lvalue_error): Same.
a9c697b8 868
6b943512
RB
8692019-05-15 Richard Biener <rguenther@suse.de>
870
871 PR c/90474
872 * c-common.c (c_common_mark_addressable_vec): Also mark
873 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
874 c_mark_addressable.
ab20d992 875
b744fc85
NS
8762019-05-06 Nathan Sidwell <nathan@acm.org>
877
878 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
879
598f50d7
NS
8802019-04-30 Nathan Sidwell <nathan@acm.org>
881
882 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
883
5bcc5a3b
ML
8842019-04-30 Martin Liska <mliska@suse.cz>
885
886 * c-pragma.c (handle_pragma_diagnostic): Provide hints
887 for unknown options.
888
e78a87f7
RS
8892019-04-26 Richard Sandiford <richard.sandiford@arm.com>
890
891 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
892 the pointer target rather than the pointer itself.
893
c280b7ee
JJ
8942019-04-19 Jakub Jelinek <jakub@redhat.com>
895
896 PR c/89888
897 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
898 arguments.
899 (c_do_switch_warnings): Remove outside_range_p argument.
900 * c-common.c (check_case_bounds): Removed.
901 (c_add_case_label): Remove orig_type and outside_range_p arguments.
902 Don't call check_case_bounds. Fold low_value as well as high_value.
903 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
904 Check for case labels outside of range of original type here and
905 adjust them.
906
8e8225e6
JJ
9072019-04-12 Jakub Jelinek <jakub@redhat.com>
908
63b8a166
JJ
909 PR translation/90041
910 * c.opt (-fhandle-exceptions): Use %< and %> around option names
911 in the Warn diagnostics.
912
8e8225e6
JJ
913 PR c/89946
914 * c-attribs.c (handle_patchable_function_entry_attribute): Add
915 function comment. Warn if arguments of the attribute are not positive
916 integer constants.
917
53a3f614
EB
9182019-04-09 Eric Botcazou <ebotcazou@adacore.com>
919
920 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
921 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
922
22be5873
EB
9232019-04-07 Eric Botcazou <ebotcazou@adacore.com>
924
925 * c-ada-spec.c (is_float128): New predicate extracted from...
926 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
927 <REAL_TYPE>: ...here. Call it.
928
34facf20
DM
9292019-04-05 David Malcolm <dmalcolm@redhat.com>
930
931 PR c/89985
932 * c-warn.c (check_address_or_pointer_of_packed_member): Add
933 auto_diagnostic_group. Guard inform calls by result of
934 warning_at call.
935
05564120
MP
9362019-04-05 Marek Polacek <polacek@redhat.com>
937
ab20d992 938 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
939 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
940 of RHS.
941
7a506c3c
JM
9422019-04-03 Jason Merrill <jason@redhat.com>
943
944 PR c++/86586 - -fcompare-debug=-Wsign-compare.
945 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
946
ddeae8c8
MS
9472019-04-01 Martin Sebor <msebor@redhat.com>
948
949 PR c/89685
950 * c-attribs.c (handle_copy_attribute): Handle references and
951 non-constant expressions.
952
a15ffa22
JJ
9532019-03-22 Jakub Jelinek <jakub@redhat.com>
954
955 PR c++/87481
956 * c.opt (-fconstexpr-ops-limit=): New option.
957
36a3a7a3
JJ
9582019-03-21 Jakub Jelinek <jakub@redhat.com>
959
960 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
961 template param.
962
bec1da64
MS
9632019-03-19 Martin Sebor <msebor@redhat.com>
964
965 PR tree-optimization/89688
966 * c-common.c (braced_list_to_string): Make static.
967 (braced_lists_to_strings): Define new function.
968 * c-common.h (braced_list_to_string): Remove.
969 (braced_lists_to_strings): Declare.
970
1fe61adf
ML
9712019-03-12 Martin Liska <mliska@suse.cz>
972
973 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
974
93964ebd
ML
9752019-03-11 Martin Liska <mliska@suse.cz>
976
977 * c-opts.c (c_common_post_options): Wrap apostrophes
978 in gcc internal format with %'.
979
a3f9f006
ML
9802019-03-11 Martin Liska <mliska@suse.cz>
981
982 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
983 in a string format message and fix GNU coding style.
984 * c-common.c (vector_types_convertible_p): Likewise.
985 (c_build_vec_perm_expr): Likewise.
986 * c-indentation.c (get_visual_column): Likewise.
987 * c-opts.c (c_common_handle_option): Likewise.
988 (c_common_post_options): Likewise.
989 (sanitize_cpp_opts): Likewise.
990 * c-pch.c (c_common_pch_pragma): Likewise.
991 * c-pragma.c (handle_pragma_pack): Likewise.
992
1db01ff9
JJ
9932019-03-08 Jakub Jelinek <jakub@redhat.com>
994
995 PR tree-optimization/89550
996 * c-common.c (c_common_truthvalue_conversion): Only set
997 TREE_NO_WARNING if warning_at returned true.
998 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
999
ba790e6f
JJ
10002019-02-25 Sandra Loosemore <sandra@codesourcery.com>
1001 Martin Sebor <msebor@gmail.com>
1002
1003 * c.opt (Wmissing-attributes): Clean up doc string.
1004
7da73ba7
JJ
10052019-02-25 Jakub Jelinek <jakub@redhat.com>
1006
1007 PR c/89495
1008 * c-format.c (maybe_read_dollar_number): Compute nargnum in
1009 HOST_WIDE_INT type to avoid overflows and change overflow_flag
1010 checking.
1011
921bb9d1
RB
10122019-02-22 Richard Biener <rguenther@suse.de>
1013
1014 * c-pch.c (no_checksum): Remove.
1015 (pch_init): Remove assertion that executable_checksum is not
1016 all zero.
1017 (c_common_valid_pch): Likewise.
1018
e2ebb05c
MS
10192019-02-18 Martin Sebor <msebor@redhat.com>
1020
1021 PR middle-end/89294
1022 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
1023
3fe53000
DM
10242019-02-16 David Malcolm <dmalcolm@redhat.com>
1025
1026 PR c++/88680
1027 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
1028 implementing -Wtype-limits.
1029
28a8cef1
MS
10302019-02-11 Martin Sebor <msebor@redhat.com>
1031
1032 PR c++/87996
1033 * c-common.c (invalid_array_size_error): New function.
1034 (valid_array_size_p): Call it. Handle size as well as type.
1035 * c-common.h (valid_constant_size_p): New function.
1036 (enum cst_size_error): New type.
1037
ec2be203
DM
10382019-01-31 David Malcolm <dmalcolm@redhat.com>
1039
1040 PR c/89122
1041 * known-headers.cc (get_stdlib_header_for_name): Add
1042 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
1043
8936f047
JJ
10442019-01-31 Jakub Jelinek <jakub@redhat.com>
1045
1046 PR libstdc++/88170
1047 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1048 a C cast in pp_c_flag_gnu_v3 mode.
1049
6a335b96
JJ
10502019-01-29 Jakub Jelinek <jakub@redhat.com>
1051
1052 PR c/86125
1053 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1054 builtin_structptr_types types even for C.
1055
2a06eba5
BE
10562019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1057
1058 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1059 when rhs is of array type correctly. Fix handling of nested structures.
1060 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1061 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1062 type casts within nested compound expressions.
1063
18a23298
JJ
10642019-01-22 Jakub Jelinek <jakub@redhat.com>
1065
1066 PR middle-end/88968
1067 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1068 variable after using BIT_FIELD_REF.
1069
420183d9
L
10702019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1071
1072 PR c/51628
1073 PR c/88664
1074 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1075 Remove the boolean argument.
1076 * c-warn.c (check_address_of_packed_member): Renamed to ...
1077 (check_address_or_pointer_of_packed_member): This. Also
1078 warn pointer conversion.
1079 (check_and_warn_address_of_packed_member): Renamed to ...
1080 (check_and_warn_address_or_pointer_of_packed_member): This.
1081 Also warn pointer conversion.
1082 (warn_for_address_or_pointer_of_packed_member): Remove the
1083 boolean argument. Don't check pointer conversion here.
1084
99063eee
RS
10852019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1086
1087 PR inline-asm/52813
1088 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1089
a30d0196
JJ
10902019-01-14 Jakub Jelinek <jakub@redhat.com>
1091
1092 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1093 and __cpp_nontype_template_parameter_auto. Add a comment that
1094 __cpp_template_auto is deprecated.
1095
2d91f79d
TH
10962019-01-14 Tom Honermann <tom@honermann.net>
1097
1098 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1099 * c-common.c (c_common_reswords): Add char8_t.
1100 (fix_string_type): Use char8_t for the type of u8 string literals.
1101 (c_common_get_alias_set): char8_t doesn't alias.
1102 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1103 C++.
1104 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1105 (keyword_begins_type_specifier): Add RID_CHAR8.
1106 * c-common.h (rid): Add RID_CHAR8.
1107 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1108 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1109 Define char8_type_node and char8_array_type_node.
1110 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1111 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1112 (c_cpp_builtins): Predefine __cpp_char8_t.
1113 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1114 CPP_UTF8STRING.
1115 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1116 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1117 targeting C++2a.
1118 * c.opt: Add the -fchar8_t command line option.
1119
23db6ced
MS
11202019-01-14 Martin Sebor <msebor@redhat.com>
1121
1122 PR target/88638
1123 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1124 and issue errors if it fails.
1125 * c-common.h (valid_format_string_type_p): Declare.
1126 * c-format.c (valid_stringptr_type_p): Rename...
1127 (valid_format_string_type_p): ...to this and make extern.
1128 (handle_format_arg_attribute): Adjust to new name.
1129 (check_format_string): Same.
1130
234c3818
L
11312019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1132
1133 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1134 Replace "may may" with "may" in warning message.
1135
d8fcab68
JJ
11362019-01-07 Jakub Jelinek <jakub@redhat.com>
1137
1138 PR c++/85052
1139 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1140 (c_build_vec_convert): Declare.
1141 * c-common.c (c_build_vec_convert): New function.
1142
29d24852
MS
11432019-01-04 Martin Sebor <msebor@redhat.com>
1144
1145 PR c/88546
1146 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1147 Handle C++ empty throw specification and C11 _Noreturn.
1148 (has_attribute): Also handle C11 _Noreturn.
1149
9069a4c9
MS
11502019-01-04 Martin Sebor <msebor@redhat.com>
1151
1152 PR c/88363
1153 * c-attribs.c (positional_argument): Also accept enumerated types.
1154
a5544970
JJ
11552019-01-01 Jakub Jelinek <jakub@redhat.com>
1156
1157 Update copyright years.
1158
da77eace
L
11592018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1160
1161 PR c/51628
1162 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1163 * c-warn.c (check_alignment_of_packed_member): New function.
1164 (check_address_of_packed_member): Likewise.
1165 (check_and_warn_address_of_packed_member): Likewise.
1166 (warn_for_address_or_pointer_of_packed_member): Likewise.
1167 * c.opt: Add -Wno-address-of-packed-member.
1168
573767d4
DM
11692018-12-20 David Malcolm <dmalcolm@redhat.com>
1170
1171 PR c++/87504
1172 * c-warn.c (get_outermost_macro_expansion): New function.
1173 (spelled_the_same_p): Use it to unwind the macro expansions, and
1174 compare the outermost macro in each nested expansion, rather than
1175 the innermost.
1176
a14feb3c
DM
11772018-12-19 David Malcolm <dmalcolm@redhat.com>
1178
1179 PR c++/87504
1180 * c-common.h (warn_tautological_cmp): Convert 1st param from
1181 location_t to const op_location_t &.
1182 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1183 when testing for INTEGER_CST.
1184 (warn_tautological_bitwise_comparison): Convert 1st param from
1185 location_t to const op_location_t &; use it to build a
1186 binary_op_rich_location, and use this.
1187 (spelled_the_same_p): New function.
1188 (warn_tautological_cmp): Convert 1st param from location_t to
1189 const op_location_t &. Warn for macro expansions if
1190 spelled_the_same_p. Use binary_op_rich_location.
1191
dfd7fdca
DM
11922018-12-19 David Malcolm <dmalcolm@redhat.com>
1193
1194 PR c++/43064
1195 PR c++/43486
1196 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1197 (verify_tree): Handle location wrappers.
1198 (c_common_truthvalue_conversion): Strip any location wrapper.
1199 Handle CONST_DECL.
1200 (fold_offsetof): Strip any location wrapper.
1201 (complete_array_type): Likewise for initial_value.
1202 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1203 index before checking for INTEGER_CST.
1204 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1205 print parentheses around location wrappers.
1206 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1207 before checking for INTEGER_CST.
1208 (warn_tautological_bitwise_comparison): Call
1209 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1210 before checking for INTEGER_CST.
1211 (readonly_error): Strip any location wrapper.
1212 (warn_array_subscript_with_type_char): Strip location wrappers
1213 before checking for INTEGER_CST. Use the location of the index if
1214 available.
1215
5c8b3702
JM
12162018-12-06 Jason Merrill <jason@redhat.com>
1217
1218 PR c++/88136 - -Wdeprecated-copy false positives
1219 * c.opt (Wdeprecated-copy-dtor): New.
1220 (Wdeprecated-copy): Move to -Wextra.
1221
673670da
MS
12222018-11-29 Martin Sebor <msebor@redhat.com>
1223
1224 PR c/88172
1225 PR testsuite/88208
1226 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1227 alignments to values less than the target requires.
1228 (has_attribute): For attribute aligned consider both the attribute
1229 and the alignment bits.
1230 * c-common.c (c_init_attributes): Optionally issue a warning for
1231 zero alignment.
1232
04864ec8
MS
12332018-11-28 Martin Sebor <msebor@redhat.com>
1234
1235 PR c/88065
1236 PR c/87297
1237 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1238 or destination is an error.
1239
ace83db0
JJ
12402018-11-28 Jakub Jelinek <jakub@redhat.com>
1241
1242 PR c++/88215
1243 * c-ubsan.c: Include langhooks.h.
1244 (ubsan_instrument_division): Change gcc_assert that main variants
1245 of op0 and op1 types are equal to gcc_checking_assert that the
1246 main variants are compatible types.
1247
da193a27
EB
12482018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1249
1250 * c-ada-spec.c: Include stringpool.h.
1251 (has_static_fields): Return false for incomplete types.
1252 (is_tagged_type): Likewise.
1253 (has_nontrivial_methods): Likewise.
1254 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1255 (struct overloaded_name_hash): New structure.
1256 (struct overloaded_name_hasher): Likewise.
1257 (overloaded_names): New global variable.
1258 (init_overloaded_names): New static function.
1259 (overloaded_name_p): New predicate.
1260 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1261 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1262 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1263 Remove always-true condition and dump forward types.
1264 (dump_ada_specs): Delete overloaded_names.
1265
98f08eb8
MS
12662018-11-20 Martin Sebor <msebor@redhat.com>
1267
1268 * c-attribs.c (type_for_vector_size): New function.
1269 (type_valid_for_vector_size): Same.
1270 (handle_vector_size_attribute): Move code to the functions above
1271 and call them.
1272 (validate_attribute, has_attribute): New functions.
1273 * c-common.h (has_attribute): Declare.
1274 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1275 * c-common.c (c_common_resword): Same.
1276
2674fa47
JM
12772018-11-16 Jason Merrill <jason@redhat.com>
1278
1279 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1280 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1281
258b3854
JJ
12822018-11-16 Jakub Jelinek <jakub@redhat.com>
1283
1284 PR middle-end/87854
1285 * c-common.c (fix_string_type): Reject string literals larger than
1286 TYPE_MAX_VALUE (ssizetype) bytes.
1287
1d249509
MS
12882018-11-15 Martin Sebor <msebor@redhat.com>
1289
1290 PR c++/87541
1291 PR c++/87542
1292 * c-attribs.c (positional_argument): New function.
1293 (handle_alloc_size_attribute): Use it and simplify.
1294 (handle_alloc_align_attribute): Same.
1295 (handle_assume_aligned_attribute): Same.
1296 (handle_nonnull_attribute): Same.
1297 * c-common.c (check_function_arguments): Pass fntype to
1298 check_function_format.
1299 * c-common.h (check_function_format): Add an argument.
1300 (PosArgFlags, positional_argument): Declare new type and function.
1301 * c-format.c (decode_format_attr): Add arguments.
1302 (check_format_string, get_constant): Same.
1303 (convert_format_name_to_system_name): Adjust.
1304
478dd60d
DM
13052018-11-15 David Malcolm <dmalcolm@redhat.com>
1306
1307 PR other/19165
1308 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1309
8cca0163
JJ
13102018-11-14 Jakub Jelinek <jakub@redhat.com>
1311
8ee09943
JJ
1312 P1236R1 - Signed integers are two's complement
1313 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1314 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1315 with in-range second operand well defined for -std=c++2a.
1316
8cca0163
JJ
1317 PR other/88007
1318 * c-common.c (parse_optimize_options): Allocate option string from
1319 opts_obstack rather than as GC memory. Move the allocation after
1320 warning for invalid option.
1321
620e594b
DM
13222018-11-13 David Malcolm <dmalcolm@redhat.com>
1323
1324 * c-common.c (c_get_substring_location): Update for renaming of
1325 get_source_location_for_substring to get_location_within_string.
1326 * c-lex.c: Replace "source_location" with "location_t".
1327 * c-opts.c: Likewise.
1328 * c-ppoutput.c: Likewise.
1329
f9731de3
MS
13302018-11-13 Martin Sebor <msebor@redhat.com>
1331
1332 PR middle-end/81824
1333 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1334 (handle_tls_model_attribute): Improve diagnostics.
1335
e4bd6d5e
JM
13362018-11-12 Jason Merrill <jason@redhat.com>
1337
a6bb6b07
JM
1338 * c-cppbuiltin.c (c_cpp_builtins): Define
1339 __cpp_impl_destroying_delete.
1340
e4bd6d5e
JM
1341 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1342 __cpp_conditional_explicit.
1343
79a2c428
MS
13442018-11-09 Martin Sebor <msebor@redhat.com>
1345
1346 PR middle-end/81824
1347 * c-attribs.c (handle_copy_attribute): New function.
1348
4c7bd361
MS
13492018-11-09 Martin Sebor <msebor@redhat.com>
1350
1351 PR c/87795
1352 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1353
28567c40
JJ
13542018-11-08 Jakub Jelinek <jakub@redhat.com>
1355
1356 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1357 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1358 enum omp_memory_order MEMORY_ORDER.
1359 (c_finish_omp_flush): Add MO argument.
1360 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1361 (c_finish_omp_for): Add FINAL_P argument.
1362 * c-omp.c: Include memmodel.h.
1363 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1364 OMP_TASKGROUP_CLAUSES to it.
1365 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1366 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1367 instead of OMP_ATOMIC_SEQ_CST.
1368 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1369 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1370 __atomic_thread_fence call with the given value.
1371 (check_omp_for_incr_expr): Formatting fixes.
1372 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1373 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1374 is not constant expression 1 or -1. Transform NE_EXPR loops
1375 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1376 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1377 loops too.
1378 (c_omp_split_clauses): Add support for combined
1379 #pragma omp parallel master and
1380 #pragma omp {,parallel }master taskloop{, simd} constructs.
1381 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1382 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1383 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1384 (c_omp_predetermined_sharing): Don't return
1385 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1386 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1387 PRAGMA_OMP_REQUIRES.
1388 * c-pragma.h (enum pragma_kind): Likewise.
1389 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1390 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1391
204839e7
DM
13922018-11-08 David Malcolm <dmalcolm@redhat.com>
1393
1394 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1395
d8010ee4
DM
13962018-11-08 David Malcolm <dmalcolm@redhat.com>
1397
1398 * c-format.c (local_cgraph_node_ptr_node): New variable.
1399 (gcc_dump_printf_char_table): Add entry for %C.
1400 (get_pointer_to_named_type): New function, taken from the handling
1401 code for "gimple *" from...
1402 (init_dynamic_diag_info): ...here. Add handling for
1403 "cgraph_node *".
1404 * c-format.h (T_CGRAPH_NODE): New.
1405
4be5c72c
JM
14062018-10-19 Jason Merrill <jason@redhat.com>
1407
1408 * c-cppbuiltin.c (c_cpp_builtins): Add
1409 __cpp_nontype_template_parameter_class.
1410
f3f6029d
NS
14112018-10-31 Nathan Sidwell <nathan@acm.org>
1412
ab5324fb
NS
1413 * c-opts.c (c_finish_options): Force command line macro
1414 location. Refactor to avoid repeating main debug hook.
1415 (push_command_line_include): Clarify comment.
1416
f3f6029d
NS
1417 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1418
91e3ec29
MS
14192018-10-30 Martin Sebor <msebor@redhat.com>
1420
1421 PR middle-end/87041
1422 * c-format.c (check_format_types): Avoid diagnosing null pointer
1423 arguments to printf-family of functions.
1424
b5ff4f5c
MP
14252018-10-30 Marek Polacek <polacek@redhat.com>
1426
1427 Implement P0892R2, explicit(bool).
1428 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1429
7e2de6df
DM
14302018-10-29 David Malcolm <dmalcolm@redhat.com>
1431
1432 * name-hint.h (name_hint::take_deferred): New member function.
1433
b2bf438c
DM
14342018-10-29 David Malcolm <dmalcolm@redhat.com>
1435
1436 PR c++/56856
1437 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1438 argument.
1439 (check_function_restrict): Rename param "argarray" to
1440 "unfolded_argarray", and make a copy named "argarray", calling
1441 fold_for_warn on each argument.
1442 (check_function_arguments): Add note about responsibility for
1443 folding the arguments.
1444
9f936c86
JM
14452018-10-17 Joseph Myers <joseph@codesourcery.com>
1446
1447 * c-common.c (flag_isoc2x): New variable.
1448 * c-common.h (clk_c): Update comment to reference C2X.
1449 (flag_isoc99, flag_isoc11): Update comments to reference future
1450 standard versions in general.
1451 (flag_isoc2x): Declare.
1452 * c-opts.c (set_std_c2x): New function.
1453 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1454 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1455 flag_isoc2x to 0.
1456 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1457
7a8a92c4
JM
14582018-10-17 Joseph Myers <joseph@codesourcery.com>
1459
1460 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1461 (std=iso9899:2018): Document C17 as published in 2018.
1462
4dc003ff
CL
14632018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1464
1465 PR c++/87364
1466 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1467
79371671
WW
14682018-10-11 Will Wray <wjwray@gmail.com>
1469
1470 PR c++/87364
1471 * c-pretty-print.h (pp_c_type_cast): Prototype.
1472 (pp_c_integer_constant): Likewise.
1473 * c-pretty-print.c (pp_c_type_cast): No longer static.
1474 (pp_c_integer_constant): Likewise.
1475 (pp_c_enumeration_constant): Fix loop termination when finding
1476 name of constant. No longer returns a value. Call
1477 pp_c_integer_constant.
1478 (c_pretty_printer::constant): Update for changes to
1479 pp_c_enumeration_constant.
1480
46c62690
JJ
14812018-10-11 Jakub Jelinek <jakub@redhat.com>
1482
1483 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1484 for no_unique_address.
1485
c24300ba
DM
14862018-10-09 David Malcolm <dmalcolm@redhat.com>
1487
1488 * c-common.c (c_option_controlling_cpp_error): Rename to...
1489 (c_option_controlling_cpp_diagnostic): ...this, and convert
1490 "reason" from int to enum.
1491 (c_cpp_error): Rename to...
1492 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1493 * c-common.h (c_cpp_error): Rename to...
1494 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1495 * c-opts.c (c_common_init_options): Update for renaming.
1496
8656dafa
RS
14972018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1498
1499 PR c/87286
1500 * c-common.c (vector_types_compatible_elements_p): Use
1501 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1502
8cff0652
VK
15032018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1504
1505 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1506 to generate constructor destructor priority warning.
1507 * c.opt (-Wprio-ctor-dtor): New option.
1508
bedf03a2
JM
15092018-10-01 Jason Merrill <jason@redhat.com>
1510
1511 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1512
6cc430c1
EB
15132018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1514
1515 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1516 (dump_ada_node): Add const keyword.
1517
87677ac7
ML
15182018-09-25 Martin Liska <mliska@suse.cz>
1519
1520 * c-common.c (c_common_truthvalue_conversion):
1521 Remove Pascal from documentation.
1522
518196cb
EB
15232018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1524
1525 * c-ada-spec.c: Include diagnostic.h.
1526 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1527
a599af84
MP
15282018-09-19 Marek Polacek <polacek@redhat.com>
1529
1530 * c.opt (Wclass-conversion): New.
1531
9c4a4b3c
DM
15322018-09-17 David Malcolm <dmalcolm@redhat.com>
1533
1534 * c-format.c (range_label_for_format_type_mismatch::get_text):
1535 Update for new param.
1536
c896ecfe
DM
15372018-09-17 David Malcolm <dmalcolm@redhat.com>
1538
1539 * c-format.c (format_warning_at_char): Update for introduction of
1540 format_string_diagnostic_t.
1541 (format_type_warning): Likewise.
1542
80c6d1f4
MJ
15432018-09-17 Martin Jambor <mjambor@suse.cz>
1544
1545 PR c/63886
1546 * c.opt (Wabsolute-value): New.
1547
6d900107
BE
15482018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1549
1550 * c-common.c (complete_flexible_array_elts): New helper function.
1551 * c-common.h (complete_flexible_array_elts): Declare.
1552
b5764229
BE
15532018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1554
1555 * c-common.c (braced_list_to_string): Remove eval parameter.
1556 Add some more checks. Always create zero-terminated STRING_CST.
1557 * c-common.h (braced_list_to_string): Adjust prototype.
1558
85204e23
DM
15592018-08-27 David Malcolm <dmalcolm@redhat.com>
1560
1561 PR 87091
1562 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1563 to a tri-state.
1564 (maybe_suggest_missing_token_insertion): Likewise.
1565 (maybe_add_include_fixit): Add param "override_location". If set,
1566 and source-printing is enabled, then override the rich_location's
1567 primary location with that of the insertion point for the fix-it
1568 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1569 * c-common.h (extern void maybe_add_include_fixit): Add bool
1570 param.
1571 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1572 for conversion of show_caret_p to a tri-state.
1573 * c-warn.c (warn_for_restrict): Likewise.
1574 * known-headers.cc
1575 (suggest_missing_header::~suggest_missing_header): Update call to
1576 maybe_add_include_fixit to suggest overriding the location, as it
1577 is for a note.
1578
3d78e008
ML
15792018-08-27 Martin Liska <mliska@suse.cz>
1580
1581 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1582 fndecl_built_in_p and remove check for FUNCTION_DECL if
1583 possible.
3d78e008
ML
1584 (check_builtin_function_arguments): Likewise.
1585 (reject_gcc_builtin): Likewise.
1586 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1587
b5be6d0c
MP
15882018-08-26 Marek Polacek <polacek@redhat.com>
1589
1590 PR c++/87029, Implement -Wredundant-move.
1591 * c.opt (Wredundant-move): New option.
1592
79ca9c35
MP
15932018-08-21 Marek Polacek <polacek@redhat.com>
1594
1595 PR c++/86981, Implement -Wpessimizing-move.
1596 * c.opt (Wpessimizing-move): New option.
1597
097f82ec
DM
15982018-08-20 David Malcolm <dmalcolm@redhat.com>
1599
1600 PR other/84889
1601 * c-attribs.c (common_handle_aligned_attribute): Add
1602 auto_diagnostic_group instance.
1603 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1604 * c-opts.c (c_common_post_options): Likewise.
1605 * c-warn.c (warn_logical_not_parentheses): Likewise.
1606 (warn_duplicated_cond_add_or_warn): Likewise.
1607 (warn_for_multistatement_macros): Likewise.
1608
3fb558b1
NS
16092018-08-20 Nathan Sidwell <nathan@acm.org>
1610
1611 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1612 access.
1613
800c0e98
NS
16142018-08-17 Nathan Sidwell <nathan@acm.org>
1615
1616 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1617 field.
1618 (laxy_hex_fp_value_count): Make unsigned.
1619 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1620 manipulate the macro.
1621 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1622 cpp_define_lazily.
1623
6f795a92
DM
16242018-08-17 David Malcolm <dmalcolm@redhat.com>
1625
1626 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1627 (gcc_dump_printf_length_specs): New.
1628 (gcc_dump_printf_flag_pairs): New.
1629 (gcc_dump_printf_flag_specs): New.
1630 (gcc_dump_printf_char_table): New.
1631 (format_types_orig): Add entry for "gcc_dump_printf".
1632 (init_dynamic_diag_info): Set up length_char_specs and
1633 conversion_specs for gcc_dump_printf_format_type.
1634 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1635
c5d725c0
NS
16362018-08-17 Nathan Sidwell <nathan@acm.org>
1637
10f04917
NS
1638 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1639
c5d725c0
NS
1640 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1641 * c-cppbuiltin.c: Likewise.
1642
c0c12356
ML
16432018-08-17 Martin Liska <mliska@suse.cz>
1644
1645 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1646 Ignore/Deprecated flag. Warning is done automatically for
1647 Deprecated flags.
c0c12356 1648
10fcc142
DM
16492018-08-16 David Malcolm <dmalcolm@redhat.com>
1650
1651 PR c++/70693
1652 * c-common.c (selftest::c_family_tests): Call
1653 selftest::c_indentation_c_tests.
1654 * c-common.h (selftest::c_indentation_c_tests): New decl.
1655 * c-indentation.c: Include "selftest.h".
1656 (next_tab_stop): Add "tab_width" param, rather than accessing
1657 cpp_opts.
1658 (get_visual_column): Likewise. Clarify comment. Bulletproof
1659 against reading past the end of the line.
1660 (get_first_nws_vis_column): Add "tab_width" param.
1661 (detect_intervening_unindent): Likewise.
1662 (should_warn_for_misleading_indentation): Read tab width from
1663 cpp_opts and pass around.
1664 (selftest::test_next_tab_stop): New test.
1665 (selftest::assert_get_visual_column_succeeds): New function.
1666 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1667 (selftest::assert_get_visual_column_fails): New function.
1668 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1669 (selftest::test_get_visual_column): New test.
1670 (selftest::c_indentation_c_tests): New function.
1671
3f6677f4
NS
16722018-08-16 Nathan Sidwell <nathan@acm.org>
1673
1674 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1675 (store_ada_macro): Likewise.
1676 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1677 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1678
96e6ae57
DM
16792018-08-15 David Malcolm <dmalcolm@redhat.com>
1680
1681 * c-format.c: Include "selftest-diagnostic.h" and
1682 "gcc-rich-location.h".
1683 (format_warning_at_char): Pass NULL for new label params of
1684 format_warning_va.
1685 (class indirection_suffix): New class.
1686 (class range_label_for_format_type_mismatch): New class.
1687 (format_type_warning): Move logic for generating "*" suffix to
1688 class indirection_suffix. Create "fmt_label" and "param_label"
1689 to show their types, and pass them to the
1690 format_warning_at_substring calls.
1691 (selftest::test_type_mismatch_range_labels): New test.
1692 (selftest::c_format_c_tests): Call it.
1693
23aa9f7c
MS
16942018-08-13 Martin Sebor <msebor@redhat.com>
1695
1696 PR tree-optimization/71625
1697 * c-common.c (braced_list_to_string): New function.
1698 * c-common.h (braced_list_to_string): Declare it.
1699
f10a9135
NS
17002018-08-08 Nathan Sidwell <nathan@acm.org>
1701
1702 * c-common.c (try_to_locate_new_include_inertion_point): Use
1703 linemap_included_from_linemap.
1704 * c-lex.c (fe_file_change): Use linemap_included_from.
1705 * c-ppoutput.c (pp_file_change): Likewise.
1706
8a45b051
MS
17072018-08-01 Martin Sebor <msebor@redhat.com>
1708
1709 PR tree-optimization/86650
ab20d992 1710 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1711 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1712 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1713 * c-format.h (T89_G): Update to be "gimple *" rather than
1714 "gcall *".
1715 (local_gcall_ptr_node): Rename...
1716 (local_gimple_ptr_node): ...to this.
1717
e540ccc0
DM
17182018-07-31 David Malcolm <dmalcolm@redhat.com>
1719
1720 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1721 table entries for gcc_diag_char_table, and the 'Z' entry from
1722 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1723 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1724 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1725 adding missing "Z" for this table. Remove erroneous "G" and "K"
1726 entries.
1727 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1728 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1729 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1730
425fc685
RE
17312018-07-31 Richard Earnshaw <rearnsha@arm.com>
1732
1733 * c-common.c (speculation_safe_resolve_call): New function.
1734 (speculation_safe_resolve_params): New function.
1735 (speculation_safe_resolve_return): New function.
1736 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1737 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1738 __HAVE_SPECULATION_SAFE_VALUE.
1739
181463c2
DM
17402018-07-20 David Malcolm <dmalcolm@redhat.com>
1741
1742 * c-common.c (c_cpp_error): Remove redundant "line_table"
1743 parameter from call to rich_location::set_range.
1744 (maybe_suggest_missing_token_insertion): Likewise.
1745
0d7f9065
MS
17462018-07-20 Martin Sebor <msebor@redhat.com>
1747
1748 PR middle-end/82063
ab20d992 1749 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1750
00abf86c
MS
17512018-07-20 Martin Sebor <msebor@redhat.com>
1752
1753 PR middle-end/82063
1754 * c-common.h (c_common_handle_option): Change function argument
1755 to HOST_WIDE_INT.
1756 * c-opts.c (c_common_init_options): Same.
1757 (c_common_handle_option): Same. Remove special handling of
1758 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1759 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1760 options to take a HOST_WIDE_INT argument and accept a byte-size
1761 suffix. Initialize.
1762 (-Wvla-larger-than): Same.
1763 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1764 (-Wno-vla-larger-than): Same.
1765
9b452033
JJ
17662018-07-12 Jakub Jelinek <jakub@redhat.com>
1767
1768 * c-attribs.c (c_common_attribute_table): Add
1769 "omp declare target implicit" attribute.
1770
cd0762f3
RB
17712018-07-12 Richard Biener <rguenther@suse.de>
1772
1773 PR c/86453
1774 * c-attribs.c (handle_packed_attribute): Do not build a variant
1775 type with TYPE_PACKED, instead ignore the attribute if we may
1776 not apply to the original type.
1777
0b27c3ed
JJ
17782018-07-10 Jakub Jelinek <jakub@redhat.com>
1779
1780 PR c++/86443
1781 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1782 to contain TREE_LIST for both the original class iterator and the
1783 "last" helper var.
1784
e730a0ef
EB
17852018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1786
1787 * c-ada-spec.c (to_ada_name): Remove index parameter.
1788 (pp_ada_tree_identifier): Likewise.
1789 (dump_ada_macros): Adjust call to to_ada_name.
1790 (struct overloaded_name_hash): Delete.
1791 (struct overloaded_name_hasher): Likewise.
1792 (overloaded_names): Likewise.
1793 (compute_overloading_index): Likewise.
1794 (dump_ada_decl_name): Do not call compute_overloading_index and
1795 adjust calls to pp_ada_tree_identifier.
1796 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1797 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1798 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1799 (dump_ada_enum_type): Remove type and display_convention parameters.
1800 Adjust calls to pp_ada_tree_identifier.
1801 (dump_ada_node): Likewise and for dump_ada_structure.
1802 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1803 and tidy up.
1804 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1805 syntax.
1806 (print_constructor): Adjust call to pp_ada_tree_identifier.
1807 (print_destructor): Likewise.
1808 (dump_ada_declaration): Switch to aspect syntax.
1809 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1810 parameter with nested parameter.
1811 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1812 (dump_ada_specs): Do not delete overloaded_names table.
1813
8de583fc
PB
18142018-07-06 Peter Bergner <bergner@linux.ibm.com>
1815
1816 PR target/86324
e730a0ef 1817 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1818 target hook.
1819
09cff37b
NS
18202018-07-05 Nathan Sidwell <nathan@acm.org>
1821
1822 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1823 NO_IMPLICIT_EXTERN_C.
1824
98086b2b
ML
18252018-06-28 Martin Liska <mliska@suse.cz>
1826
1827 * cppspec.c: Include opt-suggestions.h.
1828
ab20d992
JJ
18292018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1830 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1831 Cesar Philippidis <cesar@codesourcery.com>
1832
1833 * c-pragma.h (enum pragma_omp_clause): Add
1834 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1835 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1836
f41b7612
JJ
18372018-06-20 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR c++/86210
1840 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1841 comment.
1842
4252ccd7
MS
18432018-06-18 Martin Sebor <msebor@redhat.com>
1844
1845 PR middle-end/85602
1846 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1847 nonstring.
1848
e197e64e
KV
18492018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1850
1851 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1852
34a7a230
JM
18532018-06-13 Jason Merrill <jason@redhat.com>
1854
5cef3733
JM
1855 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1856 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1857 handling.
1858
34a7a230
JM
1859 PR c++/86094 - wrong code with defaulted move ctor.
1860 * c-opts.c (c_common_post_options): Bump the current ABI version to
1861 13. Set warn_abi_version and flag_abi_compat_version to the current
1862 version rather than 0. Fix defaulting flag_abi_compat_version from
1863 warn_abi_version.
1864
bb0f14ae
MS
18652018-06-12 Martin Sebor <msebor@redhat.com>
1866
1867 PR c/85931
1868 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1869 sizeof source and destination yields the same value.
1870
3713f2e2
ML
18712018-06-12 Martin Liska <mliska@suse.cz>
1872
1873 * c.opt: Make MPX-related options as Deprecated.
1874
4af78ef8
DM
18752018-06-08 David Malcolm <dmalcolm@redhat.com>
1876
1877 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1878 rather than 0.
1879
31db0fe0
ML
18802018-06-08 Martin Liska <mliska@suse.cz>
1881
1882 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1883 for MPX (macros, related functions, fields in cgraph_node, ...).
1884 (handle_bnd_legacy): Likewise.
1885 (handle_bnd_instrument): Likewise.
1886 * c.opt: Likewise.
1887
fe16acf2
JJ
18882018-06-06 Jakub Jelinek <jakub@redhat.com>
1889
1890 PR c++/86068
1891 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1892 __cpp_transactional_memory to 201500 instead of 210500.
1893
4dbdb49b
JM
18942018-06-06 Jason Merrill <jason@redhat.com>
1895
1896 PR c++/85710 - ICE with -Wmemset-elt-size.
1897 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1898
f8ad043f
JM
18992018-06-01 Jason Merrill <jason@redhat.com>
1900
1901 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1902 201703.
1903
abc24d93
EB
19042018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1905
1906 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1907 declaration for a typedef independently of whether the declaration of
1908 the subtype is generated.
1909
d258f4aa
MS
19102018-05-31 Martin Sebor <msebor@redhat.com>
1911
1912 PR c/82063
1913 * c.opt (-Wno-alloc-size-larger-than): New option.
1914
b67b9225
DP
19152018-04-22 David Pagan <dave.pagan@oracle.com>
1916
1917 PR c/55976
1918 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1919 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1920 differentiate between default (no option), -Wreturn-type, and
1921 -Wno-return-type.
1922
04eb9c55
JM
19232018-05-29 Jason Merrill <jason@redhat.com>
1924
1925 * c.opt (Winit-list-lifetime): New flag.
1926
b0c31bc6
BE
19272018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1928
1929 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1930 splay_tree_delete_pointers.
1931
44284983
JJ
19322018-05-26 Jakub Jelinek <jakub@redhat.com>
1933
1934 PR bootstrap/85921
1935 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1936 noinline variable to workaround broken kernel headers.
1937
b46b715d
JM
19382018-05-18 Jason Merrill <jason@redhat.com>
1939
1940 * c.opt (Wdeprecated-copy): New flag.
1941
40659769
ML
19422018-05-17 Martin Liska <mliska@suse.cz>
1943
1944 * c-warn.c (overflow_warning): Do not use
1945 space in between 'G_' and '('.
1946
403962ea
JM
19472018-05-09 Jason Merrill <jason@redhat.com>
1948
1949 * c-common.c (valid_array_size_p): Add complain parameter.
1950 * c-common.h: ...which defaults to true.
1951
1c9ee609
JJ
19522018-05-11 Jakub Jelinek <jakub@redhat.com>
1953
1954 PR c/85696
1955 * c-omp.c (c_omp_predetermined_sharing): Return
1956 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1957
19916065
ML
19582018-05-11 Martin Liska <mliska@suse.cz>
1959
92a285c1 1960 PR sanitizer/85556
19916065
ML
1961 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1962 TREE_LIST values.
1963
79e7b1fe
JJ
19642018-05-10 Jakub Jelinek <jakub@redhat.com>
1965
1966 PR c++/85662
1967 * c-common.h (fold_offsetof_1): Removed.
1968 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1969 CTX argument defaulted to ERROR_MARK.
1970 * c-common.c (fold_offsetof_1): Renamed to ...
1971 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1972 argument, convert the pointer constant to TYPE and use size_binop
1973 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1974 a pointer type. Adjust recursive calls.
1975
86c12f76
EB
19762018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1977
1978 PR c++/85400
1979 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1980
ee336e84
NS
19812018-05-07 Nathan Sidwell <nathan@acm.org>
1982
1983 * c.opt (ffor-scope): Remove functionality, issue warning.
1984
6c072e21
NS
19852018-05-03 Nathan Sidwell <nathan@acm.org>
1986
1987 * c.opt (ffriend-injection): Remove functionality, issue warning.
1988
2cc7d3a7
DM
19892018-05-01 David Malcolm <dmalcolm@redhat.com>
1990
1991 PR c/84258
1992 * c-format.c (struct format_check_results): Add field
1993 "number_non_char".
1994 (check_format_info): Initialize it, and warn if encountered.
1995 (check_format_arg): Distinguish between wide char and
1996 everything else when detecting arrays of non-char.
1997
7761dfbe
DM
19982018-04-30 David Malcolm <dmalcolm@redhat.com>
1999
2000 * c-format.c (get_corrected_substring): Update for
2001 location_get_source_line returning a char_span. Use a char_span
2002 when handling the prefix of the correction.
2003 * c-indentation.c (get_visual_column): Update for
2004 location_get_source_line returning a char_span.
2005 (get_first_nws_vis_column): Likewise.
2006
62e98ef1
DM
20072018-03-29 David Malcolm <dmalcolm@redhat.com>
2008
2009 PR c++/84269
2010 * known-headers.cc (get_stdlib_header_for_name): Add various names
2011 from <assert.h>, <string.h>, and <memory.h>; add more names from
2012 <stdio.h>.
2013
a7dea617
JJ
20142018-03-27 Jakub Jelinek <jakub@redhat.com>
2015
2016 PR c++/85061
2017 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
2018 get_base_address of the second operand is a VAR_P, rather than the
2019 operand itself, and use gcc_checking_assert instead of gcc_assert.
2020
889a3a30
MP
20212018-03-23 Marek Polacek <polacek@redhat.com>
2022
2023 PR c++/85045
2024 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
2025 <case RDIV_EXPR>: Tweak condition.
2026
452154b9
EB
20272018-03-20 Eric Botcazou <ebotcazou@adacore.com>
2028
2029 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
2030
63ecb626
JJ
20312018-03-16 Jakub Jelinek <jakub@redhat.com>
2032
ce811fc4
JJ
2033 PR c/84909
2034 * c-warn.c (conversion_warning): Replace "to to" with "to" in
2035 diagnostics.
2036
63ecb626
JJ
2037 PR c/84910
2038 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
2039 diagnostics.
2040
a1295eec
RB
20412018-03-16 Richard Biener <rguenther@suse.de>
2042
2043 PR c/84873
2044 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
2045 unshare the possibly folded expression.
2046
919674fb
RB
20472018-03-15 Richard Biener <rguenther@suse.de>
2048
2049 PR c/84873
2050 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2051
f99309b2
MS
20522018-03-13 Martin Sebor <msebor@redhat.com>
2053
2054 PR tree-optimization/84725
2055 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2056 with all three narrow character types, including their qualified forms.
2057
e9b9fa4c
MS
20582018-03-12 Martin Sebor <msebor@redhat.com>
2059
2060 PR tree-optimization/83456
ab20d992 2061 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2062 Restore checking of bounded built-in functions.
2063 (check_function_arguments): Also return the result
2064 of warn_for_restrict.
ab20d992
JJ
2065 * c-common.c (check_function_restrict): Return bool.
2066 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2067
0805d020
MP
20682018-03-02 Marek Polacek <polacek@redhat.com>
2069
2070 PR c++/84171
2071 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2072 is erroneous.
2073
ed2a2f08
TS
20742018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2075
2076 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2077 function".
2078
90abdde0
MP
20792018-03-01 Marek Polacek <polacek@redhat.com>
2080
2081 PR c++/84639
2082 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2083 alignment in computation.
2084
c6db43fa
EB
20852018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2086
2087 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2088 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2089
9e25c7ed
EB
20902018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2091
2092 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2093 (is_char_array): Take a type instead of a declaration.
2094 (dump_ada_array_type): Likewise.
2095 (is_simple_enum): Minor tweak.
2096 (dump_ada_enum_type): New function extracted from...
2097 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2098 <INTEGER_TYPE>: Remove unreachable code.
2099 <RECORD_TYPE>: Likewise. Minor tweaks.
2100 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2101 <ENUMERAL_TYPE>: New case.
2102 <RECORD_TYPE>: Factor out common code.
2103 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2104 Minor tweaks. Deal with enumeral types.
2105 (dump_ada_structure): Minor tweaks.
2106
09de3550
EB
21072018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2108
2109 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2110 address for incomplete structures.
2111 (dump_forward_type): Do not bail out for incomplete structures.
2112 (dump_ada_declaration): Do not special-case incomplete structures
2113 for subtypes. Dump them as null records for types.
2114
095d8d4b
EB
21152018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2116
2117 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2118 (is_char_array): Fix formatting.
2119 (dump_template_types): Likewise.
2120 (dump_generic_ada_node): Rename into...
2121 (dump_ada_node): ...this.
2122 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2123 incomplete structures and not for empty structures. Do not use it
2124 when forward declarations are needed.
2125 (dump_forward_type): New function.
2126 (dump_nested_types): Remove FORWARD parameter. Do not consider
2127 TREE_VISITED and do not generate a forward declaration. Only dump
2128 original nested types for nested declaration.
2129 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2130 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2131 <RECORD_TYPE>: Do not consider TREE_VISITED.
2132 (dump_ada_declaration): Use booleans and fix formatting throughout.
2133 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2134 Call dump_forward_type instead of dump_nested_types for a typedef.
2135 Remove superfluous check and adjust call to dump_nested_types.
2136 <POINTER_TYPE>: Call dump_forward_type and fall through.
2137 (dump_ada_struct_decl): Rename into...
2138 (dump_ada_structure): ...this. Do not special-case empty structures.
2139
d4cfd486
MS
21402018-02-27 Martin Sebor <msebor@redhat.com>
2141
2142 PR c++/83871
2143 * c.opt (-Wmissing-attributes): New option.
2144
b22dbd03
ML
21452018-02-21 Martin Liska <mliska@suse.cz>
2146
2147 * c.opt (Wcatch-value=): Add IntegerRange.
2148
883dfe2a
JM
21492018-02-15 Jason Merrill <jason@redhat.com>
2150
2151 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2152
0444aa9c
NS
21532018-02-09 Nathan Sidwell <nathan@acm.org>
2154
2155 PR c/84293
2156 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2157 arg.
2158 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2159 arg. Adjust.
2160
cea71f0a
MS
21612018-02-09 Martin Sebor <msebor@redhat.com>
2162
2163 PR lto/84212
2164 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2165 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2166 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2167 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2168 (-Wuninitialized): Same.
2169
8c8b7be5
EB
21702018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2171
2172 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2173 keyword for components.
2174
7c30b12a
PC
21752018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2176
2177 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2178
eece7fe5
JK
21792018-02-02 Julia Koval <julia.koval@intel.com>
2180
2181 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2182
7d07a93a
MP
21832018-01-29 Marek Polacek <polacek@redhat.com>
2184
2185 PR c/83966
2186 * c-format.c (check_function_format): Check current_function_decl.
2187
53723269
JJ
21882018-01-27 Jakub Jelinek <jakub@redhat.com>
2189
2190 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2191 argument.
2192 (LAZY_HEX_FP_VALUES_CNT): Define.
2193 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2194 values rather than just 12.
2195 (builtin_define_with_hex_fp_value): Likewise.
2196
7365279f
BK
21972018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2198
92a285c1
ML
2199 PR other/70268
2200 * c.opt (-fmacro-prefix-map): New option.
2201 * c-opts.c (c_common_handle_option): Handle it.
2202 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2203 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2204
bb9869d5
DM
22052018-01-17 David Malcolm <dmalcolm@redhat.com>
2206
2207 PR c++/83814
2208 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2209
68dc87c3
EB
22102018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2211
2212 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2213 Skip 'f' and 'F' characters if it is true.
2214 (store_ada_macro): Minor tweak.
2215 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2216 <CPP_WSTRING>: Likewise.
2217 <CPP_STRING>: Output '&' in the buffer if not the first string.
2218 <CPP_NUMBER>: Adjust calls to dump_number.
2219
9a004410
DM
22202018-01-10 David Malcolm <dmalcolm@redhat.com>
2221
2222 PR c++/43486
2223 * c-common.c: Include "selftest.h".
2224 (get_atomic_generic_size): Perform the test for integral type
2225 before the range test for any integer constant, fixing indentation
2226 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2227 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2228 (selftest::test_fold_for_warn): New function.
2229 (selftest::c_common_c_tests): New function.
2230 (selftest::c_family_tests): Call it, and
2231 selftest::c_pretty_print_c_tests.
2232 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2233 * c-format.c (check_format_arg): Convert VAR_P check to a
2234 fold_for_warn.
2235 * c-pretty-print.c: Include "selftest.h".
2236 (pp_c_cast_expression): Don't print casts for location wrappers.
2237 (selftest::assert_c_pretty_printer_output): New function.
2238 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2239 (selftest::test_location_wrappers): New function.
2240 (selftest::c_pretty_print_c_tests): New function.
2241 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2242
5c0caeb3
RS
22432018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2244 Alan Hayward <alan.hayward@arm.com>
2245 David Sherwood <david.sherwood@arm.com>
2246
2247 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2248
73a699ae
RS
22492018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2250 Alan Hayward <alan.hayward@arm.com>
2251 David Sherwood <david.sherwood@arm.com>
2252
2253 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2254 as polynomial.
2255
928686b1
RS
22562018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2257 Alan Hayward <alan.hayward@arm.com>
2258 David Sherwood <david.sherwood@arm.com>
2259
2260 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2261 (convert_vector_to_array_for_subscript): Handle polynomial
2262 TYPE_VECTOR_SUBPARTS.
2263 (c_common_type_for_mode): Check valid_vector_subparts_p.
2264 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2265 VECTOR_CST_NELTS.
2266
85ec4feb
JJ
22672018-01-03 Jakub Jelinek <jakub@redhat.com>
2268
2269 Update copyright years.
2270
170a8bd6 22712017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2272 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2273
2274 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2275 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2276
ab20d992 22772017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2278
2279 PR debug/83527
2280 PR debug/83419
2281 * c-semantics.c (only_debug_stmts_after_p): New.
2282 (pop_stmt_list): Clear side effects in debug-only stmt list.
2283 Check for single nondebug stmt followed by debug stmts only.
2284
c12d20d4
AO
22852017-12-21 Alexandre Oliva <aoliva@redhat.com>
2286
2287 PR debug/83419
2288 * c-semantics.c (pop_stmt_list): Propagate side effects from
2289 single nondebug stmt to container list.
2290
01512446
JJ
22912017-12-19 Jakub Jelinek <jakub@redhat.com>
2292
2293 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2294 conditions with typical order conditions.
2295
82cfbd01
MP
22962017-12-18 Marek Polacek <polacek@redhat.com>
2297
2298 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2299 not in effect.
2300
99da11ec
MS
23012017-12-17 Martin Sebor <msebor@redhat.com>
2302
2303 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2304 an error for attribute warn_if_not_aligned.
2305
cc8bea0a
MS
23062017-12-16 Martin Sebor <msebor@redhat.com>
2307
2308 PR tree-optimization/78918
2309 * c-common.c (check_function_restrict): Avoid checking built-ins.
2310 * c.opt (-Wrestrict): Include in -Wall.
2311
4849deb1
JJ
23122017-12-15 Jakub Jelinek <jakub@redhat.com>
2313
2314 * c-attribs.c (c_common_attribute_table,
2315 c_common_format_attribute_table): Swap affects_type_identity
2316 and handler fields, adjust comments.
2317
c65e18d3
BE
23182017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2319
2320 * c.opt (Wcast-function-type): New warning option.
2321 * c-lex.c (get_fileinfo): Avoid warning.
2322 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2323
2004617a
QZ
23242017-12-14 Qing Zhao <qing.zhao@oracle.com>
2325
7365279f 2326 PR middle_end/79538
2004617a
QZ
2327 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2328 Adjust the size of buf1 and buf2, add a new buf to avoid
2329 format-overflow warning.
2330
ab20d992 23312017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2332
2333 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2334 subsequent statement list.
2335
5d9ae53d
MS
23362017-12-07 Martin Sebor <msebor@redhat.com>
2337
2338 PR c/81544
2339 PR c/81566
2340 * c-attribs.c (attr_aligned_exclusions): New array.
2341 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2342 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2343 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2344 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2345 (attr_warn_unused_result_exclusions): Same.
2346 (handle_hot_attribute, handle_cold_attribute): Simplify.
2347 (handle_const_attribute): Warn on function returning void.
2348 (handle_pure_attribute): Same.
2349 (handle_aligned_attribute): Diagnose conflicting attribute
2350 specifications.
2351 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2352
c79144f8
DM
23532017-12-06 David Malcolm <dmalcolm@redhat.com>
2354
2355 PR c/83236
2356 * c-common.c (selftest::c_family_tests): Call
2357 selftest::c_spellcheck_cc_tests.
2358 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2359 * c-spellcheck.cc: Include "selftest.h".
2360 (name_reserved_for_implementation_p): New function.
2361 (should_suggest_as_macro_p): New function.
2362 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2363 should_suggest_as_macro_p and call it.
2364 (selftest::test_name_reserved_for_implementation_p): New function.
2365 (selftest::c_spellcheck_cc_tests): New function.
2366 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2367
613bc14f
DM
23682017-12-06 David Malcolm <dmalcolm@redhat.com>
2369
2370 * c-spellcheck.cc: New file, taken from macro-handling code in
2371 spellcheck-tree.c.
2372 * c-spellcheck.h: New file, taken from macro-handling code in
2373 spellcheck-tree.h.
2374
e76c7157
JJ
23752017-12-01 Jakub Jelinek <jakub@redhat.com>
2376
2377 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2378 attribute.
2379 (handle_simd_attribute): Don't check for "cilk simd function"
2380 attribute. Reindent, formatting changes.
2381
b0da4034
JK
23822017-11-30 Julia Koval <julia.koval@intel.com>
2383
2384 * c-common.h (inv_list): Remove.
2385
058f0b9e
JJ
23862017-11-28 Jakub Jelinek <jakub@redhat.com>
2387
2388 PR sanitizer/81275
2389 * c-common.c (c_switch_covers_all_cases_p_1,
2390 c_switch_covers_all_cases_p): New functions.
2391 * c-common.h (c_switch_covers_all_cases_p): Declare.
2392
5e9d6aa4 23932017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2394 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2395
2396 * array-notation-common.c: Delete.
2397 * c-cilkplus.c: Ditto.
2398 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2399 * c-common.def (ARRAY_NOTATION_REF): Remove.
2400 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2401 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2402 c_validate_cilk_plus_loop, cilkplus_an_parts,
2403 cilk_ignorable_spawn_rhs_op,
2404 cilk_recognize_spawn): Remove.
2405 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2406 * c-omp.c: Remove CILK_SIMD check.
2407 * c-pragma.c: Ditto.
2408 * c-pragma.h: Remove CILK related pragmas.
2409 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2410 ARRAY_NOTATION_REF condition.
2411 (c_pretty_printer::expression): Ditto.
2412 * c.opt (fcilkplus): Remove.
2413 * cilk.c: Delete.
2414
1af4ebf5
MG
24152017-11-21 Marc Glisse <marc.glisse@inria.fr>
2416
2417 * c-pretty-print.c (pp_c_additive_expression,
2418 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2419
d44ed508
JJ
24202017-11-21 Jakub Jelinek <jakub@redhat.com>
2421
7d2f0f9b
JJ
2422 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2423
d44ed508
JJ
2424 PR c++/83059
2425 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2426 instead of tree_to_uhwi, formatting fix.
2427
26edace6
DM
24282017-11-20 David Malcolm <dmalcolm@redhat.com>
2429
2430 PR c/81404
2431 * known-headers.cc: New file, based on material from c/c-decl.c.
2432 (suggest_missing_header): Copied as-is.
2433 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2434 heavily edited to add C++ support. Add some knowledge about
2435 <limits.h>, <stdint.h>, and <wchar.h>.
2436 * known-headers.h: Likewise.
2437
6c7a259b
DM
24382017-11-20 David Malcolm <dmalcolm@redhat.com>
2439
2440 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2441 (lookup_name_fuzzy): Likewise. Convert return type from
2442 const char * to name_hint. Add location_t param.
2443 * name-hint.h: New header.
2444
f9c59f7e
JJ
24452017-11-19 Jakub Jelinek <jakub@redhat.com>
2446
2447 PR c/66618
2448 PR c/69960
2449 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2450
1e39313a
JM
24512017-11-16 Joseph Myers <joseph@codesourcery.com>
2452
2453 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2454 expected publication date of C17.
2455 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2456
3ca0dc60
JM
24572017-11-15 Joseph Myers <joseph@codesourcery.com>
2458
2459 PR c/81156
2460 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2461 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2462
025d57f0
MS
24632017-11-10 Martin Sebor <msebor@redhat.com>
2464
2465 PR c/81117
2466 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2467 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2468 * c.opt (-Wstringop-truncation): New option.
2469
1b6fa695
ML
24702017-11-06 Martin Liska <mliska@suse.cz>
2471
2472 PR middle-end/82404
2473 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2474 FE.
2475 * c.opt: Set default value of warn_return_type.
2476
64a5912c
DM
24772017-10-31 David Malcolm <dmalcolm@redhat.com>
2478
2479 * c-common.c (binary_op_error): Update for renaming of
2480 error_at_rich_loc.
2481 (c_parse_error): Likewise.
2482 * c-warn.c (warn_logical_not_parentheses): Likewise for
2483 renaming of inform_at_rich_loc.
2484 (warn_for_restrict): Likewise for renaming of
2485 warning_at_rich_loc_n.
2486
c76dc9c3
JM
24872017-10-30 Joseph Myers <joseph@codesourcery.com>
2488
2489 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2490 * c-opts.c (set_std_c17): New function.
2491 (c_common_init_options): Use gnu17 as default C version.
2492 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2493
ee5fd23a
MM
24942017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2495
2496 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2497 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2498 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2499 __FP_FAST_FMA<N>X.
2500
d1047465
MP
25012017-10-23 Marek Polacek <polacek@redhat.com>
2502
2503 PR c/82681
2504 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2505
9e878cf1
EB
25062017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2507
2508 * c-common.c (check_builtin_function_arguments): Also check arguments
2509 of __builtin_alloca_with_align_and_max.
2510
89b6abbb
DM
25112017-10-17 David Malcolm <dmalcolm@redhat.com>
2512
2513 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2514 rather than NULL to format_warning_va.
2515 (check_format_types): Likewise when calling format_type_warning.
2516 Remove code to extract source_ranges and source_range * in favor
2517 of just a location_t.
2518 (format_type_warning): Convert source_range * param to a
2519 location_t.
2520
39382c09
JJ
25212017-10-13 Jakub Jelinek <jakub@redhat.com>
2522
2523 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2524 [LR]SHIFT_EXPR.
2525
62e1c678
DM
25262017-10-12 David Malcolm <dmalcolm@redhat.com>
2527
2528 * c-common.c (enum missing_token_insertion_kind): New enum.
2529 (get_missing_token_insertion_kind): New function.
2530 (maybe_suggest_missing_token_insertion): New function.
2531 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2532
b90c9338
NS
25332017-10-11 Nathan Sidwell <nathan@acm.org>
2534
2535 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2536 (c_common_handle_option): Update incpath_kind names.
2537
3a266bcd
ML
25382017-10-11 Martin Liska <mliska@suse.cz>
2539
2540 PR sanitizer/82490
2541 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2542 Wattributes warning.
2543
8e6cdc90
RS
25442017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2545
2546 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2547 operating on trees as wide_ints.
2548 * c-common.c (pointer_int_sum): Likewise.
2549 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2550 * c-warn.c (match_case_to_enum_1): Likewise.
2551 (c_do_switch_warnings): Likewise.
2552 (maybe_warn_shift_overflow): Likewise.
2553
802b38c9
JJ
25542017-10-10 Jakub Jelinek <jakub@redhat.com>
2555
2556 PR c/82437
2557 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2558 instead of wide_int::from.
2559
4e34b338
JJ
25602017-10-06 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/82437
2563 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2564 using to_widest use wide_int with the larger of the two precisions.
2565
4bc4b2b4
BE
25662017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2567
2568 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2569 functions.
2570
a1488398
RS
25712017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2572
2573 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2574 when combining the original unconverted comparison operands.
2575
01c9fb68
JJ
25762017-09-29 Jakub Jelinek <jakub@redhat.com>
2577
2578 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2579 attribute.
2580
6e3e8419
EB
25812017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2582
2583 * c-ada-spec.c (to_ada_name): Add index parameter.
2584 (pp_ada_tree_identifier): Likewise.
2585 (dump_ada_macros): Adjust call to to_ada_name.
2586 (struct overloaded_name_hash): New type.
2587 (struct overloaded_name_hasher): Likewise.
2588 (overloaded_names): New hash table.
2589 (compute_overloading_index): New function.
2590 (dump_ada_decl_name): Call it and pass the result to
2591 pp_ada_tree_identifier.
2592 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2593 (dump_ada_function_declaration): Likewise.
2594 (dump_generic_ada_node): Likewise.
2595 (print_constructor): Likewise.
2596 (print_destructor): Likewise.
2597 (dump_ada_specs): Delete overloaded_names table.
2598
79310774
EB
25992017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2600
2601 * c-ada-spec.c (max_ada_macros): Move around.
2602 (store_ada_macro_index): Likewise.
2603 (source_file): Rename into...
2604 (macro_source_file): ...this.
2605 (count_ada_macro): Move around.
2606 (store_ada_macro): Likewise.
2607 (compare_macro): Likewise.
2608 (print_ada_macros): Merge in...
2609 (dump_ada_macros): ...this.
2610 (source_file_base): Rename into...
2611 (current_source_file): ...this.
2612 (print_comment): Move around.
2613 (dump_ada_nodes): Call dump_ada_declaration directly.
2614 (struct with): Change type of limited field to bool.
2615 (append_withs): Change type of limited_access parameter to bool.
2616 (pp_ada_tree_identifie): Likewise.
2617 (dump_ada_decl_nam): Likewise.
2618 (dump_generic_ada_node): Likewise. Do not print the return type.
2619 (to_ada_name): Change type of space_found parameter to bool.
2620 (dump_ada_function_declaration): Return void and change type of
2621 parameters to bool. Also print the return type for a function.
2622 (print_ada_methods): Rename into...
2623 (dump_ada_methods): ...this.
2624 (print_ada_declaration): Rename into ...
2625 (dump_ada_declaration): ...this. Do not print the return type.
2626 (print_ada_struct_decl): Rename into...
2627 (dump_ada_struct_decl): ...this.
2628
7d386d45
JJ
26292017-09-29 Jakub Jelinek <jakub@redhat.com>
2630
2631 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2632 rather than DECL_INITIAL.
2633 (common_handle_aligned_attribute): Likewise.
2634
ab20d992 26352017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2636
2637 * c.opt (gen-decls): Add RejectNegative.
2638
026a79f7
AS
26392017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2640 Jakub Jelinek <jakub@redhat.com>
2641
2642 Add support for -std=c++2a.
2643 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2644 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2645 * c-opts.c (set_std_cxx2a): New.
2646 (c_common_handle_option): Set options when -std=c++2a is enabled.
2647 (c_common_post_options): Adjust comments.
2648 (set_std_cxx14, set_std_cxx17): Likewise.
2649
4a8ca690
EB
26502017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2651
2652 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2653 message for non-uniform endianness and issue a warning in C++.
2654
7b936140
JJ
26552017-09-15 Jakub Jelinek <jakub@redhat.com>
2656
2657 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2658 (Wc++17-compat): Change from undocumented alias to option.
2659 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2660 change C++1z to C++17 in description.
2661 (std=c++1z, std=gnu++1z): Change from option to undocumented
2662 deprecated alias.
2663 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2664 Adjust description.
2665 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2666 * c-opts.c (set_std_cxx1z): Rename to ...
2667 (set_std_cxx17): ... this.
2668 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2669 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2670 caller.
7b936140
JJ
2671 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2672 comments.
2673
12263f13
L
26742017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2675
2676 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2677 function alignment if warn_if_not_aligned_p is true.
2678
6836632e
NS
26792017-09-12 Nathan Sidwell <nathan@acm.org>
2680
2681 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2682 resort_sorted_fields): Move to c/c-decl.c.
2683 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2684 (struct sorted_fields_type): Move to c/c-lang.h.
2685
019bf9ad
JW
26862017-09-09 Jonathan Wakely <jwakely@redhat.com>
2687
2688 PR c++/81852
2689 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2690
bc7fe952
MP
26912017-09-04 Marek Polacek <polacek@redhat.com>
2692
2693 PR c/81783
2694 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2695 (warn_tautological_cmp): Call it.
2696
ab20d992 26972017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2698
2699 * c-opts.c (c_common_finish): Write dependency information even if
2700 there are errors.
2701
d2e05fcb
JJ
27022017-09-01 Jakub Jelinek <jakub@redhat.com>
2703
2704 PR c/81887
2705 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2706 (omp_pragmas_simd): ... here.
2707 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2708 create new clauses list containing just simd clause.
2709
18e2a8b8
RS
27102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2711 Alan Hayward <alan.hayward@arm.com>
2712 David Sherwood <david.sherwood@arm.com>
2713
2714 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2715 into scalar_mode_supported_p call.
2716 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2717
16d22000
RS
27182017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2719 Alan Hayward <alan.hayward@arm.com>
2720 David Sherwood <david.sherwood@arm.com>
2721
2722 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2723 for the mode iterator.
2724
b397965c
RS
27252017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2726 Alan Hayward <alan.hayward@arm.com>
2727 David Sherwood <david.sherwood@arm.com>
2728
2729 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2730 * c-common.c (c_build_vec_perm_expr): Likewise.
2731
357b7604
RS
27322017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2733 Alan Hayward <alan.hayward@arm.com>
2734 David Sherwood <david.sherwood@arm.com>
2735
2736 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2737
e05c94ba
RS
27382017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2739 Alan Hayward <alan.hayward@arm.com>
2740 David Sherwood <david.sherwood@arm.com>
2741
2742 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2743 before calling targetm.addr_space.valid_pointer_mode.
2744
5c20c4af
RS
27452017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2746 Alan Hayward <alan.hayward@arm.com>
2747 David Sherwood <david.sherwood@arm.com>
2748
2749 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2750
c94843d2 27512017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2752 Alan Hayward <alan.hayward@arm.com>
2753 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2754
2755 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2756 iterators.
2757 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2758
4e10a5a7
RS
27592017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2760 Alan Hayward <alan.hayward@arm.com>
2761 David Sherwood <david.sherwood@arm.com>
2762
2763 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2764 case statements.
2765
130fcab0
ML
27662017-08-29 Martin Liska <mliska@suse.cz>
2767
2768 PR other/39851
2769 * c-common.c (parse_optimize_options): Add argument to function
2770 call.
2771 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2772
14e18d71
DM
27732017-08-24 David Malcolm <dmalcolm@redhat.com>
2774
2775 * c-lex.c (interpret_float): Use token location
2776 when building an EXCESS_PRECISION_EXPR.
2777
2f687306
DM
27782017-08-21 David Malcolm <dmalcolm@redhat.com>
2779
2780 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2781 it to check_function_format.
2782 * c-common.h (check_function_arguments): Add vec<location_t> *
2783 param.
2784 (check_function_format): Likewise.
2785 * c-format.c (struct format_check_context): Add field "arglocs".
2786 (check_function_format): Add param "arglocs"; pass it to
2787 check_format_info.
ab20d992 2788 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2789 new field of format_ctx.
2790 (check_format_arg): Pass format_ctx->arglocs to new param of
2791 check_format_info_main.
2792 (class argument_parser): New field "arglocs".
2793 (argument_parser::argument_parser): Add "arglocs_" param and use
2794 it to initialize new field.
2795 (argument_parser::check_argument_type): Pass new arglocs field to
2796 check_format_types.
2797 (check_format_info_main): Add param "arglocs", and use it when
2798 constructing arg_parser.
2799 (check_format_types): Add param "arglocs"; use it if non-NULL when
2800 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2801
00aa1fa2
L
28022017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2803
2804 PR c/53037
2805 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2806 (c_common_attribute_table): Add warn_if_not_aligned.
2807 (handle_aligned_attribute): Renamed to ...
2808 (common_handle_aligned_attribute): Remove argument, name, and add
2809 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2810 (handle_aligned_attribute): New.
2811 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2812
27be025d
MS
28132017-08-14 Martin Sebor <msebor@redhat.com>
2814
2815 PR c/81117
2816 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2817 (handle_nonstring_attribute): New function.
2818
da67acb9
MS
28192017-08-14 Martin Sebor <msebor@redhat.com>
2820
2821 PR c/81117
2822 * c-format.h (T89_G): New macro.
2823 * c-format.c (local_gcall_ptr_node): New variable.
2824 (init_dynamic_diag_info): Initialize it.
2825
a8b522b4
ML
28262017-08-11 Martin Liska <mliska@suse.cz>
2827
2828 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2829 TARGET_SUPPORTS_ALIASES.
2830
32129a17
DM
28312017-08-10 David Malcolm <dmalcolm@redhat.com>
2832
2833 * c-common.c (c_parse_error): Add rich_location * param, using it
2834 rather implicitly using input_location.
2835 * c-common.h (c_parse_error): Add rich_location * param.
2836
30af3a2b
MP
28372017-08-09 Marek Polacek <polacek@redhat.com>
2838
2839 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2840 (c_common_truthvalue_conversion): Likewise.
2841 * c-omp.c (c_finish_omp_atomic): Likewise.
2842 * c-common.h (build_binary_op): Update declaration.
2843
314e6352
ML
28442017-08-08 Martin Liska <mliska@suse.cz>
2845
2846 * c-ada-spec.c: Include header files.
2847 * c-ubsan.c: Likewise.
2848 * c-warn.c: Likewise.
2849
56b5041c
JJ
28502017-08-07 Jakub Jelinek <jakub@redhat.com>
2851
2852 PR c/69389
2853 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2854
db440138
EB
28552017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2856
2857 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2858 (print_ada_methods): Likewise.
2859 (print_ada_declaration): Likewise.
2860
577eec56
ML
28612017-08-07 Martin Liska <mliska@suse.cz>
2862
2863 * array-notation-common.c: Add new includes.
2864 * c-format.c( handle_format_attribute): Canonicalize a format
2865 function name.
2866 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2867 attribute.
2868 * c-pretty-print.c: Add new include.
2869
b854df3c
EB
28702017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2871
2872 * c-ada-spec.c (has_static_fields): Look only into variables.
2873 (print_constructor): Add TYPE parameter and use it for the name.
2874 (print_destructor): Likewise.
2875 (print_ada_declaration): Adjust to new constructor/destructor names.
2876 Adjust calls to print_constructor and print_destructor.
2877 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2878 Look only into variables in the final loop.
2879
9f2cb25e
EB
28802017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2881
2882 * c-ada-spec.c (has_static_fields): Look only into fields.
2883 (dump_generic_ada_node): Small tweak.
2884 (dump_nested_types): Look only into fields.
2885 (print_ada_declaration): Look only into methods. Small tweak.
2886 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2887
f4bcd9eb
EB
28882017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2889
2890 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2891 (dump_ada_function_declaration): Likewise.
2892 (dump_generic_ada_node): Likewise.
2893 (print_ada_declaration): Add support for const-qualified variables.
2894
f34ebeb2
ML
28952017-07-31 Martin Liska <mliska@suse.cz>
2896
2897 PR sanitize/81530
2898 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2899 Guard condition with flag_sanitize_p also with current_function_decl
2900 non-null equality.
2901 (ubsan_maybe_instrument_reference_or_call): Likewise.
2902
218e5d04
UB
29032017-07-30 Uros Bizjak <ubizjak@gmail.com>
2904
2905 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2906
942047f2
EB
29072017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2908
2909 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2910 for enumeral types.
2911 (print_ada_declaration): Add missing guard for record types.
2912
a40ff0ae
JJ
29132017-07-27 Jakub Jelinek <jakub@redhat.com>
2914
2915 PR c/45784
2916 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2917 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2918 new COMPOUND_EXPRs around the rhs of the comparison.
2919
06bd22f6
MP
29202017-07-27 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/81417
2923 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2924 the types.
2925
036ea399
JJ
29262017-07-27 Jakub Jelinek <jakub@redhat.com>
2927
2928 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2929 (handle_noipa_attribute): New function.
2930
417ca011
TD
29312017-07-07 Torsten Duwe <duwe@suse.de>
2932
2933 * c-attribs.c (c_common_attribute_table): Add entry for
2934 "patchable_function_entry".
2935
5aaa8fb4
NS
29362017-07-20 Nathan Sidwell <nathan@acm.org>
2937
2938 Remove TYPE_METHODS.
2939 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2940 dump_ada_template, print_ada_methods,
2941 print_ada_declaration): Member fns are on TYPE_FIELDS.
2942
ff22eb12
NS
29432017-07-18 Nathan Sidwell <nathan@acm.org>
2944
2945 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2946
eea77d1f
DM
29472017-07-14 David Malcolm <dmalcolm@redhat.com>
2948
2949 * c-common.c (try_to_locate_new_include_insertion_point): New
2950 function.
2951 (per_file_includes_t): New typedef.
2952 (added_includes_t): New typedef.
2953 (added_includes): New variable.
2954 (maybe_add_include_fixit): New function.
2955 * c-common.h (maybe_add_include_fixit): New decl.
2956
281ac396
MS
29572017-07-10 Martin Sebor <msebor@redhat.com>
2958
2959 PR other/81345
2960 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2961
b6f43128
DM
29622017-07-06 David Malcolm <dmalcolm@redhat.com>
2963
2964 * c-common.c (selftest::c_family_tests): New.
2965 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2966 (selftest::c_family_tests): New decl.
2967
efbf55b0
MP
29682017-07-04 Marek Polacek <polacek@redhat.com>
2969
2970 PR c/81231
2971 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2972 types.
2973
6c86bd88
MP
29742017-07-04 Marek Polacek <polacek@redhat.com>
2975
2976 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2977
17a7218b
ML
29782017-06-28 Martin Liska <mliska@suse.cz>
2979
2980 PR ipa/81128
2981 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2982 to a function declaration.
2983
63010089
ML
29842017-06-28 Martin Liska <mliska@suse.cz>
2985
2986 PR driver/79659
2987 * c.opt: Add IntegerRange to various options.
2988
3e2becc4
MP
29892017-06-26 Marek Polacek <polacek@redhat.com>
2990
2991 PR c/80116
2992 * c-common.h (warn_for_multistatement_macros): Declare.
2993 * c-warn.c: Include "c-family/c-indentation.h".
2994 (warn_for_multistatement_macros): New function.
2995 * c.opt (Wmultistatement-macros): New option.
2996 * c-indentation.c (guard_tinfo_to_string): No longer static.
2997 Change the parameter type to "enum rid". Handle RID_SWITCH.
2998 * c-indentation.h (guard_tinfo_to_string): Declare.
2999
2db9b7cd
MG
30002017-06-23 Marc Glisse <marc.glisse@inria.fr>
3001
3002 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
3003
c3684b7b
MS
30042017-06-15 Martin Sebor <msebor@redhat.com>
3005
3006 PR c++/80560
3007 * c.opt (-Wclass-memaccess): New option.
3008
e72c4afd
BK
30092017-06-14 Boris Kolpackov <boris@codesynthesis.com>
3010
3011 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
3012
8a516588
MP
30132017-06-13 Marek Polacek <polacek@redhat.com>
3014
3015 PR objc/80949
3016 * c-warn.c (do_warn_duplicated_branches): Return if any of the
3017 branches is null.
3018
45b2222a
ML
30192017-06-13 Martin Liska <mliska@suse.cz>
3020
3021 PR sanitize/78204
3022 * c-attribs.c (add_no_sanitize_value): New function.
3023 (handle_no_sanitize_attribute): Likewise.
3024 (handle_no_sanitize_address_attribute): Use the function.
3025 (handle_no_sanitize_thread_attribute): New function.
3026 (handle_no_address_safety_analysis_attribute): Use
3027 add_no_sanitize_value.
3028 (handle_no_sanitize_undefined_attribute): Likewise.
3029 * c-common.h: Declare new functions.
3030 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
3031 (ubsan_instrument_shift): Likewise.
3032 (ubsan_instrument_bounds): Likewise.
3033 (ubsan_maybe_instrument_array_ref): Likewise.
3034 (ubsan_maybe_instrument_reference_or_call): Likewise.
3035
a01f151f
JM
30362017-06-11 Jason Merrill <jason@redhat.com>
3037
3038 * c-ada-spec.c, c-pragma.c: Use id_equal.
3039
3de4ac6d
MP
30402017-06-04 Marek Polacek <polacek@redhat.com>
3041
3042 PR c/80919
3043 * c-format.c (matching_type_p): Return false if any of the types
3044 requires structural equality.
3045
2474f48f
MS
30462017-06-02 Martin Sebor <msebor@redhat.com>
3047
3048 PR c/80892
3049 * c-warn.c (conversion_warning): Use -Wconversion for integer
3050 conversion and -Wfloat-conversion for floating one.
3051
40ffd95f
BE
30522017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3053
3054 * c.opt (Wsizeof-pointer-div): New warning option.
3055
3fa4634c
VR
30562017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3057
3058 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3059 (Wcatch-value=1): Enable by -Wall.
3060
f012c8ef
DM
30612017-05-30 David Malcolm <dmalcolm@redhat.com>
3062
3063 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3064 format_chars.
3065 * c.opt (fdiagnostics-show-template-tree): New option.
3066 (felide-type): New option.
3067
63dbcd13
VR
30682017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3069
3070 * c.opt (Wcatch-value=): New C++ warning flag.
3071
be136b5c
NS
30722017-05-24 Nathan Sidwell <nathan@acm.org>
3073
3074 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3075 const casts to avoid warning.
3076
3cd211af
MS
30772017-05-24 Martin Sebor <msebor@redhat.com>
3078
3079 PR c/80731
3080 * c-common.h (unsafe_conversion_p): Add a function argument.
3081 * c-common.c (unsafe_conversion_p): Same.
3082 Add type names and values to diagnostics.
3083 (scalar_to_vector): Adjust.
3084 * c-warn.c (constant_expression_error): Add a function argument.
3085 Add type names and values to diagnostics.
3086 (conversion_warning): Add a function argument.
3087 Add type names and values to diagnostics.
3088 (warnings_for_convert_and_check): Same.
3089
1ff7be5a
JM
30902017-05-19 Jason Merrill <jason@redhat.com>
3091
3092 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3093 enumerators.
3094
ff502317
BE
30952017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3096
3097 * c-format.c (locus): Move out of function scope,
3098 add GTY attribute.
3099
2a8a8d7b
NS
31002017-05-19 Nathan Sidwell <nathan@acm.org>
3101
3102 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3103 (c_common_parse_file): Remove class dump handling.
3104 (get_dump_info): Likewise.
3105
39aac208
RB
31062017-05-19 Richard Biener <rguenther@suse.de>
3107
3108 PR c++/80593
3109 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3110 to alias-set zero memory.
3111
6ecd2339
BE
31122017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3113
3114 * c-format.c (local_tree_type_node): Add GTY attribute.
3115
6574d78e
MP
31162017-05-18 Marek Polacek <polacek@redhat.com>
3117
3118 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3119 (c_common_fixed_point_type_for_size): Likewise.
3120 (c_common_type_for_mode): Likewise.
3121 (shorten_compare): Likewise.
3122 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3123 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3124
e3455240
MP
31252017-05-18 Marek Polacek <polacek@redhat.com>
3126
3127 * c-common.c (self_promoting_args_p): Change the return type to bool.
3128 Use false/true instead of 0/1.
3129 * c-common.h (self_promoting_args_p): Update.
3130
3fa8871b
MP
31312017-05-17 Marek Polacek <polacek@redhat.com>
3132
3133 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3134 * c-warn.c: Likewise.
3135
b42cc3ca
VV
31362017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3137
3138 Implement new C++ intrinsics __is_assignable and __is_constructible.
3139 * c-common.c (__is_assignable, __is_constructible): New.
3140 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3141
1a817418
ML
31422017-05-17 Martin Liska <mliska@suse.cz>
3143
3144 * c-common.h: Introduce dump_flags_t type and
3145 use it instead of int type.
3146 * c-gimplify.c (c_genericize): Likewise.
3147 * c-opts.c: Likewise.
3148
b2fa0a8b
MP
31492017-05-17 Marek Polacek <polacek@redhat.com>
3150
3151 * c-common.c (c_save_expr): Remove.
3152 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3153 * c-common.h (c_save_expr): Remove declaration.
3154
31c2d57d
VR
31552017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3156
3157 PR c/35441
3158 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3159 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3160 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3161 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3162 RDIV_EXPR.
3163 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3164
684f84de
MP
31652017-05-09 Marek Polacek <polacek@redhat.com>
3166
3167 PR c/80525
3168 * c-warn.c (unwrap_c_maybe_const): New.
3169 (warn_logical_operator): Call it.
3170
641da50a
NS
31712017-05-09 Nathan Sidwell <nathan@acm.org>
3172
3173 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3174 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3175
631238ac
MS
31762017-05-08 Martin Sebor <msebor@redhat.com>
3177
3178 PR translation/80280
3179 * c-format.h (struct format_flag_spec): Add new member.
3180 (T89_T): New macro.
3181 * c-format.c (local_tree_type_node): New global.
3182 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3183 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3184 (strfmon_flag_specs): Likewise.
3185 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3186 with distinct quoting properties.
3187 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3188 (flag_chars_t::validate): Add argument and handle bad quoting.
3189 (check_format_info_main): Handle quoting problems.
3190 (init_dynamic_diag_info): Simplify.
3191
49f0c04c
JM
31922017-05-08 Jason Merrill <jason@redhat.com>
3193
3194 * c-opts.c (c_common_post_options): Update defaults for
3195 flag_abi_version and flag_abi_compat_version.
3196
56d35585
DM
31972017-05-05 David Malcolm <dmalcolm@redhat.com>
3198
3199 * c-common.c (c_cpp_error): Replace report_diagnostic
3200 with diagnostic_report_diagnostic.
3201
0f2c4a8f
MS
32022017-05-04 Martin Sebor <msebor@redhat.com>
3203
3204 PR translation/80280
3205 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3206 (handle_weakref_attribute): Same.
3207
6fe63fb4
NS
32082017-05-03 Nathan Sidwell <nathan@acm.org>
3209
3210 Canonicalize canonical type hashing
3211 * c-common.c (complete_array_type): Use type_hash_canon.
3212
815d9cc6
XR
32132017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3214
92a285c1 3215 PR c++/80038
815d9cc6
XR
3216 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3217 prototype.
3218 (cilk_install_body_pedigree_operations): Likewise.
3219 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3220 detatched.
3221 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3222 (cilk_install_body_pedigree_operations): Likewise.
3223 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3224 unwrapping.
3225
f8a36447
JJ
32262017-04-27 Jakub Jelinek <jakub@redhat.com>
3227
3228 PR c++/80534
3229 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3230 flag on non-aggregate element types.
3231
7c145456
BE
32322017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3233
3234 * c-common.c (c_type_hasher, type_hash_table): Remove.
3235 (c_common_get_alias_set): Remove unreachable code.
3236 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3237
c3cbcd45
VR
32382017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3239
3240 * c.opt (Wextra-semi): New C++ warning flag.
3241
8a59d466
JJ
32422017-04-20 Jakub Jelinek <jakub@redhat.com>
3243
3244 PR middle-end/80423
3245 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3246
8487c9a5
JJ
32472017-04-18 Jakub Jelinek <jakub@redhat.com>
3248
3249 PR middle-end/79788
3250 PR middle-end/80375
3251 * c-common.c (c_common_type_for_mode): Don't handle
3252 widest_*_literal_type_node here.
3253 c_common_signed_or_unsigned_type): Likewise.
3254 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3255 to *intTI_type_node or *intDI_type_node depending on whether
3256 TImode is supported by the target or not.
3257
3ee0fb02
ML
32582017-04-10 Martin Liska <mliska@suse.cz>
3259
3260 PR sanitizer/80350
3261 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3262 doing an UBSAN check.
3263
5764ee3c
JW
32642017-04-03 Jonathan Wakely <jwakely@redhat.com>
3265
3266 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3267
6f3af356
JJ
32682017-03-31 Jakub Jelinek <jakub@redhat.com>
3269
3270 PR c++/79572
3271 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3272 tree *.
3273 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3274 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3275 REFERENCE_TYPE.
3276
f6a7a9d5
DM
32772017-03-31 David Malcolm <dmalcolm@redhat.com>
3278
3279 PR documentation/78732
3280 * c.opt (Wendif-labels): Fix description to refer to
3281 #else rather than #elif.
3282
af88f557
JJ
32832017-03-31 Jakub Jelinek <jakub@redhat.com>
3284
3285 PR libstdc++/80251
3286 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3287 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3288
a9e4a1a5
JJ
32892017-03-27 Jakub Jelinek <jakub@redhat.com>
3290
3291 PR middle-end/80162
3292 * c-common.c (c_common_mark_addressable_vec): Don't set
3293 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3294
3f01b620
MS
32952017-03-21 Martin Sebor <msebor@redhat.com>
3296
3297 PR c++/79548
3298 * c-common.c (set_underlying_type): Mark type used only when
3299 original del is declared unused.
3300
2f6f187a
DM
33012017-03-10 David Malcolm <dmalcolm@redhat.com>
3302
3303 PR translation/79848
3304 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3305 "%qs".
3306
a02fa805
DM
33072017-03-10 David Malcolm <dmalcolm@redhat.com>
3308
3309 PR c/79921
3310 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3311 from inform's message, so that xgettext can locate it.
3312
822a132c
MP
33132017-03-09 Marek Polacek <polacek@redhat.com>
3314
3315 PR c++/79962
3316 PR c++/79984
3317 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3318 conversion to the attribute list.
3319
bba81f1c
ML
33202017-03-09 Martin Liska <mliska@suse.cz>
3321
3322 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3323
108154ff
JM
33242017-03-03 Jason Merrill <jason@redhat.com>
3325
3326 * c.opt (Wnoexcept-type): New.
3327
eb0e7c34
RB
33282017-03-02 Richard Biener <rguenther@suse.de>
3329
3330 PR c/79756
3331 * c-common.c (c_common_mark_addressable_vec): Look through
3332 C_MAYBE_CONST_EXPR.
3333
9453ba0a
ML
33342017-02-28 Martin Liska <mliska@suse.cz>
3335
3336 * c.opt: Replace space with tabular for options of <number>
3337 type.
3338
6a825afe
ML
33392017-02-28 Martin Liska <mliska@suse.cz>
3340
3341 * c.opt: Fix --help=option -Q for options which are of
3342 an enum type.
3343
4227c9ad
JJ
33442017-02-24 Jakub Jelinek <jakub@redhat.com>
3345
3346 PR c++/79588
3347 * c-common.c (check_function_restrict): New function.
3348 (check_function_arguments): Add FNDECL argument. Call
3349 check_function_restrict if -Wrestrict.
3350 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3351 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3352 * c-common.h (check_function_arguments): Add FNDECL argument.
3353 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3354
59909673
EB
33552017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3356
3357 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3358 treatment of parameters with pointer-to-tagged type and tidy up.
3359 (print_ada_methods): Remove the special treatment of C++ static member
3360 functions.
3361
54dcd526
ML
33622017-02-22 Martin Liska <mliska@suse.cz>
3363
3364 * c.opt: Replace inequality signs with square brackets
3365 for -Wnornalized.
3366
00bc9de3
JJ
33672017-02-21 Jakub Jelinek <jakub@redhat.com>
3368
3369 PR c++/79641
3370 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3371 preserve quals.
3372
97fcf744
JM
33732017-02-17 Joseph Myers <joseph@codesourcery.com>
3374
3375 * c-cppbuiltin.c (builtin_define_float_constants): Define
3376 __DECIMAL_DIG__ to the value for long double.
3377
c7545f1c
MP
33782017-02-15 Marek Polacek <polacek@redhat.com>
3379
3380 PR c/79515
3381 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3382 conversion has occured.
3383
c2e84327
DM
33842017-01-24 David Malcolm <dmalcolm@redhat.com>
3385
3386 * c-common.c (c_common_reswords): Add "__RTL".
3387 * c-common.h (enum rid): Add RID_RTL.
3388
2ebd93e1
MP
33892017-01-20 Marek Polacek <polacek@redhat.com>
3390
3391 PR c/64279
3392 * c-common.h (do_warn_duplicated_branches_r): Declare.
3393 * c-gimplify.c (c_genericize): Walk the function tree calling
3394 do_warn_duplicated_branches_r.
3395 * c-warn.c (expr_from_macro_expansion_r): New.
3396 (do_warn_duplicated_branches): New.
3397 (do_warn_duplicated_branches_r): New.
3398 * c.opt (Wduplicated-branches): New option.
3399
0d80ab91
DM
34002017-01-17 David Malcolm <dmalcolm@redhat.com>
3401
3402 PR c++/71497
3403 * c-indentation.c (warn_for_misleading_indentation): Use the past
3404 subjunctive in the note.
3405
7f991c36
AH
34062017-01-17 Aldy Hernandez <aldyh@redhat.com>
3407
3408 PR c/79116
3409 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3410 start type to integer_type.
3411
1c70261c
JJ
34122017-01-16 Jakub Jelinek <jakub@redhat.com>
3413
3414 PR driver/49726
3415 * c.opt (gen-decls): Add Driver flag.
3416
1ddca3f3
PC
34172017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3418
3419 Revert:
3420 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3421
3422 PR c++/71737
3423 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3424
7d2f3f1d
PC
34252017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3426
3427 PR c++/71737
3428 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3429
bce6f760
MS
34302017-01-12 Martin Sebor <msebor@redhat.com>
3431
3432 (-Wformat-overflow): ...to this.
3433
bf5fbf46
MS
34342017-01-11 Martin Sebor <msebor@redhat.com>
3435
3436 PR c/78768
3437 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3438 Also enable for LTO.
3439
e363df3f
JM
34402017-01-10 Jason Merrill <jason@redhat.com>
3441
3442 Implement P0195R2, C++17 variadic using.
3443 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3444
bd2c6270
JJ
34452017-01-09 Jakub Jelinek <jakub@redhat.com>
3446
3447 PR translation/79019
3448 PR translation/79020
3449 * c.opt (Wnormalized=): Fix typo in description.
3450
efcc8d38
MS
34512017-01-08 Martin Sebor <msebor@redhat.com>
3452
3453 PR middle-end/77708
3454 * c.opt (-Wformat-truncation): New option.
3455
ab20d992 34562017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3457
3458 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3459 value to unsigned short to fit in 4 hex digits without
3460 warnings.
3461
4e89adf9
EB
34622017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3463
3464 * c.opt (fsso-struct): Add 'native' value.
3465
cd445b54
ML
34662017-01-05 Martin Liska <mliska@suse.cz>
3467
3468 PR pch/78970
3469 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3470 header.
3471
a9342885
MP
34722017-01-04 Marek Polacek <polacek@redhat.com>
3473
3474 PR c++/64767
3475 * c.opt (Wpointer-compare): New option.
3476
fc73e60c
JJ
34772017-01-04 Jakub Jelinek <jakub@redhat.com>
3478
3479 PR driver/78957
3480 * c.opt (fsso-struct=): Add RejectNegative.
3481
cbe34bb5
JJ
34822017-01-01 Jakub Jelinek <jakub@redhat.com>
3483
3484 Update copyright years.
3485
d4a6c0ea
ML
34862016-12-29 Martin Liska <mliska@suse.cz>
3487
3488 PR c/78933
3489 * c.opt (strong-eval-order): Add RejectNegative keyword.
3490
67a5ad7c
JM
34912016-12-22 Jason Merrill <jason@redhat.com>
3492
3493 Implement P0522R0, matching of template template arguments.
3494 * c-cppbuiltin.c (c_cpp_builtins): Define
3495 __cpp_template_template_args.
3496
0dba7960
JJ
34972016-12-21 Jakub Jelinek <jakub@redhat.com>
3498
3499 PR bootstrap/78817
3500 * c-common.c (struct nonnull_arg_ctx): New type.
3501 (check_function_nonnull): Return bool instead of void. Use
3502 nonnull_arg_ctx as context rather than just location_t.
3503 (check_nonnull_arg): Adjust for the new context type, set
3504 warned_p to true if a warning has been diagnosed.
3505 (check_function_arguments): Return bool instead of void.
3506 * c-common.h (check_function_arguments): Adjust prototype.
3507
31bfc9b9
JM
35082016-12-21 Jason Merrill <jason@redhat.com>
3509
3510 * c.opt (-fnew-ttp-matching): New flag.
3511 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3512
629b3d75
MJ
35132016-12-14 Martin Jambor <mjambor@suse.cz>
3514
3515 * c-omp.c: Include omp-general.h instead of omp-low.h.
3516 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3517 name.
3518
474da67e
MS
35192016-12-14 Martin Sebor <msebor@redhat.com>
3520
3521 PR c/17308
3522 * c-common.c (check_nonnull_arg): Disable when optimization
3523 is enabled.
3524
fe366b87
MP
35252016-12-12 Marek Polacek <polacek@redhat.com>
3526
3527 PR c++/78647
3528 * c-common.c (attribute_fallthrough_p): Return false for
3529 error_mark_node.
3530
8bd9f164
MS
35312016-12-08 Martin Sebor <msebor@redhat.com>
3532
3533 PR c/78284
3534 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3535
060162e0
MS
35362016-12-08 Martin Sebor <msebor@redhat.com>
3537
3538 PR c/78165
92a285c1
ML
3539 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3540 suffix.
060162e0 3541
ee92e7ba
MS
35422016-12-07 Martin Sebor <msebor@redhat.com>
3543
3544 PR c/53562
3545 PR middle-end/77784
3546 PR middle-end/78149
3547 PR middle-end/78138
3548 * c.opt (-Wstringop-overflow): New option.
3549
84b0769e
MO
35502016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3551
3552 * c-attribs.c (asan odr indicator): New attribute.
3553 (handle_asan_odr_indicator_attribute): New function.
3554
7fa6a965
PK
35552016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3556
3557 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3558 ptrdiff_type_node;
3559
56d8ffc1
JG
35602016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3561
3562 * c-common.c (excess_precision_mode_join): New.
3563 (c_ts18661_flt_eval_method): New.
3564 (c_c11_flt_eval_method): Likewise.
3565 (c_flt_eval_method): Likewise.
3566 * c-common.h (excess_precision_mode_join): New.
3567 (c_flt_eval_method): Likewise.
3568 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3569 (cpp_iec_559_value): Call it.
3570 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3571 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3572 __FLT_EVAL_METHOD_TS_18661_3__.
3573
04f0fcf7
JG
35742016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3575
3576 * c-opts.c (c_common_post_options): Add logic to handle the default
3577 case for -fpermitted-flt-eval-methods.
3578
fb2675cb
PB
35792016-11-23 Paolo Bonzini <bonzini@gnu.org>
3580
3581 * c.opt (Wexpansion-to-defined): New.
3582
ec1c5694
JJ
35832016-11-23 Jakub Jelinek <jakub@redhat.com>
3584
3585 PR target/78451
3586 * c-pragma.c (handle_pragma_target): Don't replace
3587 current_target_pragma, but chainon the new args to the current one.
3588
730c9e75
NS
35892016-11-22 Nathan Sidwell <nathan@acm.org>
3590
3591 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3592 indentation and formatting.
730c9e75 3593
89990732
MS
35942016-11-21 Martin Sebor <msebor@redhat.com>
3595
3596 * c.opt (-fprintf-return-value): Enable by default.
3597
48330c93
BE
35982016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3599
3600 PR c++/71973
3601 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3602 * c-common.c (c_common_nodes_and_builtins): Initialize
3603 const_tm_ptr_type_node.
3604
0d939c95
MP
36052016-11-16 Marek Polacek <polacek@redhat.com>
3606
3607 PR c/78285
3608 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3609
8e745a17
JJ
36102016-11-14 Jakub Jelinek <jakub@redhat.com>
3611
3612 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3613
1ee62b92 36142016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3615 Richard Biener <rguenther@suse.de>
3616
3617 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3618 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3619 * c.opt (fgimple): New option.
1ee62b92 3620
22b15758
UB
36212016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3622
3623 PR c/35503
3624 * c-common.h (warn_for_restrict): Declare.
3625 * c-warn.c: Include gcc-rich-location.h.
3626 (warn_for_restrict): New function.
3627 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3628 (gcc_cdiag_char_table): Likewise.
3629 (gcc_cxxdiag_char_table): Likewise.
3630 * c.opt (Wrestrict): New option.
3631
4be719cd
EB
36322016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3633
3634 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3635 for nested types only if the type is a record or union and dump SLOC.
3636
4a826ca6
JM
36372016-11-09 Jason Merrill <jason@redhat.com>
3638
3639 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3640
2e955d50
JJ
36412016-11-09 Jakub Jelinek <jakub@redhat.com>
3642
3643 * c-ubsan.c (ubsan_instrument_shift): Handle split
3644 -fsanitize=shift-base and -fsanitize=shift-exponent.
3645
51dc6603
JM
36462016-11-07 Jason Merrill <jason@redhat.com>
3647
3648 * c.opt (Wc++1z-compat): New.
3649 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3650
6dc4a604
ML
36512016-11-07 Martin Liska <mliska@suse.cz>
3652
3653 * c-warn.c (warn_for_unused_label): Save all labels used
3654 in goto or in &label.
3655
b302001e
JM
36562016-11-03 Jason Merrill <jason@redhat.com>
3657
3658 * c-cppbuiltin.c (c_cpp_builtins): Correct
3659 __cpp_inheriting_constructors.
3660
31f7f784
JM
36612016-11-01 Jason Merrill <jason@redhat.com>
3662
2bc78e3c
JM
3663 * c-cppbuiltin.c (c_cpp_builtins): Update
3664 __cpp_inheriting_constructors.
3665
31f7f784
JM
3666 * c.opt (-fnew-inheriting-ctors): New.
3667 * c-opts.c: Default to on for ABI 11+.
3668
dcb466ec
JJ
36692016-10-31 Jakub Jelinek <jakub@redhat.com>
3670
3671 PR c++/77948
3672 * c.opt (fext-numeric-literals): Add Var and Init.
3673 * c-opts.c (c_common_handle_option): Don't clear
3674 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3675 (c_common_post_options): Clear it here if not set
3676 explicitly.
3677
52e1b91e
AH
36782016-10-28 Aldy Hernandez <aldyh@redhat.com>
3679
3680 PR debug/77773
3681 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3682 if NULL.
3683
e16f1cc7
JJ
36842016-10-25 Jakub Jelinek <jakub@redhat.com>
3685
3686 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3687 * c-common.c (c_common_reswords): Add __builtin_launder.
3688
f8348061
BE
36892016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3690
3691 * c-common.c (c_common_truthvalue_conversion): Warn for
3692 multiplications in boolean context. Fix the quoting of '<<' and '<'
3693 in the shift warning.
3694
eff89e01
BE
36952016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3696
3697 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3698
24bc7bf4
JM
36992016-10-20 Jason Merrill <jason@redhat.com>
3700
3701 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3702
4c712374
BE
37032016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3704
3705 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3706 integer shift ops in boolean context.
3707
37082016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3709
3710 * c.opt (Walloca): New.
3711 (Walloca-larger-than=): New.
3712 (Wvla-larger-than=): New.
3713
8fa18c06
MP
37142016-10-17 Marek Polacek <polacek@redhat.com>
3715
3716 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3717 Return immediately when finding a match.
3718 (warn_tautological_cmp): Remove a boolean variable that is no longer
3719 needed.
3720
b12b1915
MP
37212016-10-17 Marek Polacek <polacek@redhat.com>
3722
3723 * c-attribs.c: New file.
3724 * c-common.c: Move attributes handling to c-attribs.c.
3725 (get_nonnull_operand): No longer static.
3726 * c-common.h: Move the declarations from c-attribs.c to its own section.
3727
2045acd9
JM
37282016-10-14 Jason Merrill <jason@redhat.com>
3729
3730 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3731 and __cpp_deduction_guides.
3732
14a2c9aa
JM
37332016-10-13 Jason Merrill <jason@redhat.com>
3734
3735 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3736
4d0cdd0c
TP
37372016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3738
3739 * c-cppbuiltin.c: Include memmodel.h.
3740 * c-opts.c: Likewise.
3741 * c-pragma.c: Likewise.
3742 * c-warn.c: Likewise.
3743
70f6d5e1
JJ
37442016-10-12 Jakub Jelinek <jakub@redhat.com>
3745
3746 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3747 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3748 * c-opts.c (sanitize_cpp_opts): Initialize
3749 cpp_opts->cpp_warn_implicit_fallthrough.
3750
78f61294
MP
37512016-10-11 Marek Polacek <polacek@redhat.com>
3752
3753 * c-common.c (warning_candidate_p): Change the return type to bool
3754 and return true/false instead of 1/0.
3755 (vector_mode_valid_p): Likewise.
3756
038b5cc0
MP
37572016-10-11 Marek Polacek <polacek@redhat.com>
3758
3759 * c-common.c (fold_for_warn): No longer static.
3760 (bool_promoted_to_int_p): Likewise.
3761 (c_common_get_narrower): Likewise.
3762 (constant_expression_warning): Move to c-warn.c.
3763 (constant_expression_error): Likewise.
3764 (overflow_warning): Likewise.
3765 (warn_logical_operator): Likewise.
3766 (find_array_ref_with_const_idx_r): Likewise.
3767 (warn_tautological_cmp): Likewise.
3768 (expr_has_boolean_operands_p): Likewise.
3769 (warn_logical_not_parentheses): Likewise.
3770 (warn_if_unused_value): Likewise.
3771 (strict_aliasing_warning): Likewise.
3772 (sizeof_pointer_memaccess_warning): Likewise.
3773 (check_main_parameter_types): Likewise.
3774 (conversion_warning): Likewise.
3775 (warnings_for_convert_and_check): Likewise.
3776 (match_case_to_enum_1): Likewise.
3777 (match_case_to_enum): Likewise.
3778 (c_do_switch_warnings): Likewise.
3779 (warn_for_omitted_condop): Likewise.
3780 (readonly_error): Likewise.
3781 (lvalue_error): Likewise.
3782 (invalid_indirection_error): Likewise.
3783 (warn_array_subscript_with_type_char): Likewise.
3784 (warn_about_parentheses): Likewise.
3785 (warn_for_unused_label): Likewise.
3786 (warn_for_div_by_zero): Likewise.
3787 (warn_for_memset): Likewise.
3788 (warn_for_sign_compare): Likewise.
3789 (do_warn_double_promotion): Likewise.
3790 (do_warn_unused_parameter): Likewise.
3791 (record_locally_defined_typedef): Likewise.
3792 (maybe_record_typedef_use): Likewise.
3793 (maybe_warn_unused_local_typedefs): Likewise.
3794 (maybe_warn_bool_compare): Likewise.
3795 (maybe_warn_shift_overflow): Likewise.
3796 (warn_duplicated_cond_add_or_warn): Likewise.
3797 (diagnose_mismatched_attributes): Likewise.
3798 * c-common.h: Move the declarations from c-warn.c to its own section.
3799 * c-warn.c: New file.
3800
627be19f
JM
38012016-10-08 Jason Merrill <jason@redhat.com>
3802
3803 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3804 into COND_EXPR in C++.
3805
7bad794a
JJ
38062016-10-08 Jakub Jelinek <jakub@redhat.com>
3807
3808 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3809 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3810 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3811
be845b04
JJ
38122016-10-07 Jakub Jelinek <jakub@redhat.com>
3813
3814 Implement LWG2296 helper intrinsic
3815 * c-common.h (enum rid): Add RID_ADDRESSOF.
3816 * c-common.c (c_common_reswords): Add __builtin_addressof.
3817
c09c4992
BE
38182016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3819
3820 PR c++/77700
3821 * c-common.c (c_common_truthvalue_conversion): Warn also for
3822 suspicious enum values in boolean context.
3823
342cfb3e
JJ
38242016-10-06 Jakub Jelinek <jakub@redhat.com>
3825
3826 Implement P0258R2 - helper for C++17
3827 std::has_unique_object_representations trait
3828 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3829 * c-common.c (c_common_reswords): Add
3830 __has_unique_object_representations.
3831
2e69f143
JJ
38322016-10-05 Jakub Jelinek <jakub@redhat.com>
3833
3834 PR sanitizer/66343
3835 * c-ubsan.c (ubsan_instrument_return): Don't call
3836 initialize_sanitizer_builtins here.
3837
700fff34
BE
38382016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3839
3840 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3841 conditional expression in boolean context when only one arm is
3842 non-boolean.
3843
9563bfcd
JJ
38442016-10-05 Jakub Jelinek <jakub@redhat.com>
3845
04a32443
JJ
3846 PR sanitizer/77823
3847 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3848 is not integral.
3849
9563bfcd
JJ
3850 * c-common.c (c_common_reswords): Update comment for C++11.
3851
f1644724
JM
38522016-10-04 Jason Merrill <jason@redhat.com>
3853
3854 * c-common.c (make_tree_vector_from_ctor): New.
3855 * c-common.h: Declare it.
3856
5a79befb
JJ
38572016-10-04 Jakub Jelinek <jakub@redhat.com>
3858
3859 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3860 __LIBGCC_JCR_SECTION_NAME__.
3861
1633d3b9
BE
38622016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3863
3864 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3865 left shift in boolean context.
3866
a2c6e7f2
JJ
38672016-09-29 Jakub Jelinek <jakub@redhat.com>
3868
3869 Implement P0001R1 - C++17 removal of register storage class specifier
3870 * c.opt (Wregister): New warning.
3871 * c-opts.c (c_common_post_options): Enable -Wregister by
3872 default for C++17.
3873
75304c87
JG
38742016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3875
3876 * c-opts.c (c_common_post_options): Remove special case for
3877 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3878 in C++.
3879
bbfac6da
JJ
38802016-09-27 Jakub Jelinek <jakub@redhat.com>
3881
6e39060a
JJ
3882 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3883 -std=c++1z.
3884
bbfac6da
JJ
3885 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3886
e73cf9a2
TP
38872016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3888
3889 * c-common.c: Include memmodel.h.
3890
c6147dc4
MP
38912016-09-26 Marek Polacek <polacek@redhat.com>
3892
3893 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3894
81fea426
MP
38952016-09-26 Marek Polacek <polacek@redhat.com>
3896
3897 PR c/7652
3898 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3899 (handle_fallthrough_attribute): New function.
3900 (attribute_fallthrough_p): New function.
3901 * c-common.h (attribute_fallthrough_p): Declare.
3902
9a2300e9
MP
39032016-09-24 Marek Polacek <polacek@redhat.com>
3904
3905 PR c/77490
3906 * c.opt (Wbool-operation): New.
3907
a09e9e35
BE
39082016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3909
3910 * c-common.c (c_common_truthvalue_conversion): Inhibit
3911 Wint-in-bool-context warning with from_macro_definition_at.
3912 Mention the expression will always evaluate to true.
3913
d43b4ccc
MS
39142016-09-21 Martin Sebor <msebor@redhat.com>
3915
3916 PR bootstrap/77676
3917 * c.opt (fprintf-return-value): Temporarily initialize to zero
3918 to unblock bootstrap failures.
3919
2e1c20b1
JJ
39202016-09-21 Jakub Jelinek <jakub@redhat.com>
3921
3922 PR c++/77651
3923 * c.opt (Waligned-new=): Add RejectNegative.
3924 (faligned-new=): Likewise. Spelling fix - change
3925 aligned_new_threshhold to aligned_new_threshold.
3926 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3927 to aligned_new_threshold.
3928
88d0c3f0
MS
39292016-09-20 Martin Sebor <msebor@redhat.com>
3930
3931 PR middle-end/49905
3932 * c.opt: Add -Wformat-length and -fprintf-return-value.
3933
144a96e4
BE
39342016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3935
3936 PR c++/77434
3937 * c.opt (Wint-in-bool-context): New warning.
3938 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3939 constants in boolean context.
3940
63012d9a
JM
39412016-09-19 Joseph Myers <joseph@codesourcery.com>
3942
3943 * c-common.c (max_align_t_align): Also consider alignment of
3944 float128_type_node.
3945
931388ce
JM
39462016-09-15 Jason Merrill <jason@redhat.com>
3947
3948 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3949 DECL_EXTERNAL.
3950
38711381
JM
39512016-09-14 Jason Merrill <jason@redhat.com>
3952
3953 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3954 limit FIELD_DECL, either.
3955
e51fbec3
MP
39562016-09-14 Marek Polacek <polacek@redhat.com>
3957
3958 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3959 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3960 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3961
254830ba
DM
39622016-09-13 David Malcolm <dmalcolm@redhat.com>
3963
3964 * c-common.c (warn_logical_not_parentheses): Replace
3965 rich_location::add_fixit_insert calls with add_fixit_insert_before
3966 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3967
42763690
JM
39682016-09-13 Jason Merrill <jason@redhat.com>
3969 Tom de Vries <tom@codesourcery.com>
3970
3971 PR c++/77427
3972 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3973
9453eee9
JM
39742016-09-13 Jason Merrill <jason@redhat.com>
3975
3976 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3977 limit types at all.
3978
e96809e3
JM
39792016-09-12 Jason Merrill <jason@redhat.com>
3980
3981 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3982 bit/byte confusion, allow large alignment for types.
3983
54dcdb88
BE
39842016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3985
3986 PR c++/77496
3987 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3988
d1463eb9
DM
39892016-09-12 David Malcolm <dmalcolm@redhat.com>
3990
3991 PR c/72858
3992 * c-format.c (argument_parser::check_argument_type): Add params
3993 "type_start" and "conversion_char". Use the former to generate
3994 offset_to_type_start and pass it and conversion_char to
3995 check_format_types.
3996 (check_format_info_main): Capture the start of the type
3997 information as "type_start", and pass it an format_char
3998 to arg_parser.check_argument_type.
3999 (check_format_types): Provide an example in the leading comment.
4000 Add params "offset_to_type_start" and "conversion_char"; pass
4001 them to format_type_warning calls.
4002 (test_get_modifier_for_format_len): Likewise.
4003 (matching_type_p): New function.
4004 (get_format_for_type): Add param "conversion_char" and move
4005 implementation into...
4006 (get_format_for_type_1): ...new function, called twice.
4007 Use new function matching_type_p rather than checking for
4008 TYPE_CANONICAL equality.
4009 (get_corrected_substring): New function.
4010 (format_type_warning): Provide an example in the leading comment.
4011 Add params "offset_to_type_start" and "conversion_char". Replace
4012 call to get_format_for_type with call to get_corrected_substring
4013 and move rejection of hints for widths/precisions there.
4014 (assert_format_for_type_streq): Add param "conversion_char".
4015 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
4016 (test_get_format_for_type_printf): Add conversion chars to the
4017 tests, adding coverage for various combinations of integer
4018 vs double conversions, and for preserving octal and hexadecimal
4019 conversions.
4020 (test_get_format_for_type_scanf): Add conversion chars to the
4021 tests.
4022
5b28efbb
TV
40232016-09-10 Tom de Vries <tom@codesourcery.com>
4024
4025 PR C/71602
4026 * c-common.c (build_va_arg): Handle more strict
4027 targetm.canonical_va_list_type. Replace first argument type error with
4028 assert.
4029
3f0177e7
MS
40302016-09-09 Martin Sebor <msebor@redhat.com>
4031
4032 PR c/77520
4033 PR c/77521
4034 * c-format.c (argument_parser::find_format_char_info): Use %qc
4035 format directive unconditionally.
4036
af63ba4b
JM
40372016-09-09 Jason Merrill <jason@redhat.com>
4038
4039 Implement C++17 new of over-aligned types.
4040 * c.opt: Add -faligned-new and -Waligned-new.
4041 * c-common.c (max_align_t_align): Split out from...
4042 (cxx_fundamental_alignment_p): ...here.
4043 * c-common.h: Declare it.
4044 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
4045
c65248cb
JM
40462016-09-09 Joseph Myers <joseph@codesourcery.com>
4047
4048 * c-cppbuiltin.c (builtin_define_type_width): New function.
4049 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4050 macros.
4051
e5106e27
DM
40522016-09-07 David Malcolm <dmalcolm@redhat.com>
4053
4054 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4055 a POINTER_TYPE.
4056 (substring_loc::get_location): Move to substring-locations.c,
4057 keeping implementation as...
4058 (c_get_substring_location): New function, from the above, reworked
4059 to use accessors rather than member lookup.
4060 * c-common.h (class substring_loc): Move to substring-locations.h,
4061 replacing with a forward decl.
4062 (c_get_substring_location): New decl.
4063 * c-format.c: Include "substring-locations.h".
4064 (format_warning_va): Move to substring-locations.c.
4065 (format_warning_at_substring): Likewise.
4066
ab20d992 40672016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4068
4069 PR c/77336
4070 * c-format.c (check_function_format): Avoid issuing warnings for
4071 functions unless they call format functions with non-constant
4072 format strings.
4073
b772a565
RB
40742016-09-06 Richard Biener <rguenther@suse.de>
4075
4076 PR c/77450
4077 * c-common.c (c_common_mark_addressable_vec): Handle
4078 COMPOUND_LITERAL_EXPR.
4079
25ff5dd3
MP
40802016-09-05 Marek Polacek <polacek@redhat.com>
4081
4082 PR c/77423
4083 * c-common.c (bool_promoted_to_int_p): New function.
4084 (expr_has_boolean_operands_p): New function.
4085 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4086 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4087
21234eb5
TV
40882016-09-04 Tom de Vries <tom@codesourcery.com>
4089
4090 revert:
4091 2016-08-29 Tom de Vries <tom@codesourcery.com>
4092
4093 * c-common.c (build_va_arg): Replace first argument type error
4094 with assert.
4095
9dc5773f
JJ
40962016-09-02 Jakub Jelinek <jakub@redhat.com>
4097
4098 PR c/65467
4099 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4100 (c_finish_omp_for): Reject _Atomic qualified iterators.
4101
41022016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4103
4104 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4105 size to guarantee it fits the output of the formatted function
4106 regardless of its arguments.
4107
295844f6
MP
41082016-09-01 Marek Polacek <polacek@redhat.com>
4109
4110 PR c/7652
4111 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4112 FALLTHRU comments.
4113
3d06b6f2
MP
41142016-08-29 Marek Polacek <polacek@redhat.com>
4115
4116 PR c/77292
4117 * c-common.c (warn_logical_not_parentheses): Don't warn for
4118 a comparison or a logical operator.
4119
34cedad5
TV
41202016-08-29 Tom de Vries <tom@codesourcery.com>
4121
4122 * c-common.c (build_va_arg): Fix type comparison assert.
4123
f162d717
TV
41242016-08-29 Tom de Vries <tom@codesourcery.com>
4125
4126 * c-common.c (build_va_arg): Replace first argument type error
4127 with assert.
4128
ba9bbd6f
TV
41292016-08-29 Tom de Vries <tom@codesourcery.com>
4130
4131 PR c/77398
4132 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4133 with error_mark_node as va_list instead of with illegal va_list.
4134
ebef225f
MP
41352016-08-25 Marek Polacek <polacek@redhat.com>
4136 David Malcolm <dmalcolm@redhat.com>
4137
4138 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4139 * c-common.h (warn_logical_not_parentheses): Update declaration.
4140
b00e6e75
MP
41412016-08-22 Marek Polacek <polacek@redhat.com>
4142
4143 PR c++/77321
4144 * c-common.c (warn_for_memset): Check type for null.
4145
6dc198e3
JM
41462016-08-22 Joseph Myers <joseph@codesourcery.com>
4147
14ec014e 4148 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4149 _FloatNx types for suffixes for built-in functions.
4150
c65699ef
JM
41512016-08-19 Joseph Myers <joseph@codesourcery.com>
4152
4153 PR c/32187
4154 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4155 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4156 (RID_FLOAT128X): New enum rid values.
4157 (CASE_RID_FLOATN_NX): New macro.
4158 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4159 keywords.
4160 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4161 corresponding complex types.
4162 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4163 _FloatNx and corresponding complex types.
4164 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4165 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4166 and _FloatNx types for the widest type for determining
4167 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4168 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4169 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4170 and _FloatNx types.
4171 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4172 constants.
4173 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4174 _FloatNx types.
4175
cc015f3a
DM
41762016-08-18 David Malcolm <dmalcolm@redhat.com>
4177
4178 * c-opts.c (c_diagnostic_finalizer): Update for change to
4179 diagnostic_show_locus.
4180
cb18fd07
DM
41812016-08-18 David Malcolm <dmalcolm@redhat.com>
4182
4183 * c-common.c: Include "spellcheck.h".
4184 (cb_get_suggestion): New function.
4185 * c-common.h (cb_get_suggestion): New decl.
4186 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4187 cb_get_suggestion.
4188
a76989dc
MP
41892016-08-18 Marek Polacek <polacek@redhat.com>
4190
4191 PR c/71514
4192 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4193 and pointer-to-VLA.
4194
65e736c0
DM
41952016-08-16 David Malcolm <dmalcolm@redhat.com>
4196
4197 PR c/72857
4198 * c-common.c (substring_loc::get_range): Rename to...
4199 (substring_loc::get_location): ...this, converting param from a
4200 source_range * to a location_t *. Call
4201 get_source_location_for_substring rather than
4202 get_source_range_for_substring, and pass in m_caret_idx.
4203 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4204 (substring_loc::get_range): Replace with...
4205 (substring_loc::get_location): ...this.
4206 (substring_loc::set_caret_index): New method.
4207 (substring_loc): Add field m_caret_idx.
4208 * c-format.c (format_warning_va): Update for above changes.
4209 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4210 clashing with type name.
4211 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4212 (check_argument_type): Likewise.
4213 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4214 Use a copy when emitting warnings, setting the caret index from TYPE.
4215
7e1dde14 42162016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4217 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4218
4219 * c-ada-spec.c (dump_number): New function.
4220 (handle_escape_character): Likewise.
4221 (print_ada_macros): Add handling of constant integers and strings.
4222
191816a3
MP
42232016-08-12 Marek Polacek <polacek@redhat.com>
4224
4225 PR c/7652
4226 * c-common.c (scalar_to_vector): Adjust fall through comment.
4227 * c-opts.c (c_common_handle_option): Likewise.
4228 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4229 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4230 fall through comment.
4231 * cilk.c (extract_free_variables): Add FALLTHRU.
4232
452df4a4
JM
42332016-08-10 Jason Merrill <jason@redhat.com>
4234
4235 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4236
f3365c12
JM
42372016-08-09 Jason Merrill <jason@redhat.com>
4238
4239 * c-common.c (c_common_attribute_table): vector_size affects type
4240 identity.
4241
f0bc3323
MP
42422016-08-09 Marek Polacek <polacek@redhat.com>
4243
4244 PR c/7652
4245 * c-ada-spec.c (dump_generic_ada_node): Add return.
4246
98e5a19a
JM
42472016-08-09 Jason Merrill <jason@redhat.com>
4248
4249 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4250 C++17 constexpr lambdas.
4251
895aa8e1
DM
42522016-08-08 David Malcolm <dmalcolm@redhat.com>
4253
4254 PR c/64955
4255 * c-common.h (selftest::c_format_c_tests): New declaration.
4256 (selftest::run_c_tests): New declaration.
4257 * c-format.c: Include "selftest.h.
4258 (format_warning_va): Add param "corrected_substring" and use
4259 it to add a replacement fix-it hint.
4260 (format_warning_at_substring): Likewise.
4261 (format_warning_at_char): Update for new param of
4262 format_warning_va.
4263 (argument_parser::check_argument_type): Pass "fki" to
4264 check_format_types.
4265 (check_format_types): Add param "fki" and pass it to
4266 format_type_warning.
4267 (deref_n_times): New function.
4268 (get_modifier_for_format_len): New function.
4269 (selftest::test_get_modifier_for_format_len): New function.
4270 (get_format_for_type): New function.
4271 (format_type_warning): Add param "fki" and use it to attempt
4272 to provide hints for argument types when calling
4273 format_warning_at_substring.
4274 (selftest::get_info): New function.
4275 (selftest::assert_format_for_type_streq): New function.
4276 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4277 (selftest::test_get_format_for_type_printf): New function.
4278 (selftest::test_get_format_for_type_scanf): New function.
4279 (selftest::c_format_c_tests): New function.
4280
e52ed3fe
DM
42812016-08-08 David Malcolm <dmalcolm@redhat.com>
4282
4283 PR c/52952
4284 * c-format.c: Include "diagnostic.h".
4285 (location_column_from_byte_offset): Delete.
4286 (location_from_offset): Delete.
4287 (format_warning_va): New function.
4288 (format_warning_at_substring): New function.
4289 (format_warning_at_char): New function.
4290 (check_format_arg): Capture location of format_tree and pass to
4291 check_format_info_main.
4292 (argument_parser): Add fields "start_of_this_format" and
4293 "format_string_cst".
4294 (flag_chars_t::validate): Add param "format_string_cst". Convert
4295 warning_at call using location_from_offset to call to
4296 format_warning_at_char.
4297 (argument_parser::argument_parser): Add param "format_string_cst_"
4298 and use use it to initialize field "format_string_cst".
4299 Initialize new field "start_of_this_format".
4300 (argument_parser::read_format_flags): Convert warning_at call
4301 using location_from_offset to a call to format_warning_at_char.
4302 (argument_parser::read_any_format_left_precision): Likewise.
4303 (argument_parser::read_any_format_precision): Likewise.
4304 (argument_parser::read_any_other_modifier): Likewise.
4305 (argument_parser::find_format_char_info): Likewise, in three places.
4306 (argument_parser::parse_any_scan_set): Likewise, in one place.
4307 (argument_parser::handle_conversions): Likewise, in two places.
4308 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4309 and use it to make a substring_loc. Pass the latter to
4310 check_format_types.
4311 (check_format_info_main): Add params "fmt_param_loc" and
4312 "format_string_cst". Convert warning_at calls using
4313 location_from_offset to calls to format_warning_at_char. Pass the
4314 new params to the arg_parser ctor. Pass "format_string_cst" to
4315 flag_chars.validate. Pass "fmt_param_loc" to
4316 arg_parser.check_argument_type.
4317 (check_format_types): Convert first param from a location_t
4318 to a const substring_loc & and rename to "fmt_loc". Attempt
4319 to extract the range of the relevant parameter and pass it
4320 to format_type_warning.
4321 (format_type_warning): Convert first param from a location_t
4322 to a const substring_loc & and rename to "fmt_loc". Add
4323 params "param_range" and "type". Replace calls to warning_at
4324 with calls to format_warning_at_substring.
4325
1c4d457e
DM
43262016-08-08 David Malcolm <dmalcolm@redhat.com>
4327
4328 * c-format.c (class flag_chars_t): New class.
4329 (struct length_modifier): New struct.
4330 (class argument_parser): New class.
4331 (flag_chars_t::flag_chars_t): New ctor.
4332 (flag_chars_t::has_char_p): New method.
4333 (flag_chars_t::add_char): New method.
4334 (flag_chars_t::validate): New method.
4335 (flag_chars_t::get_alloc_flag): New method.
4336 (flag_chars_t::assignment_suppression_p): New method.
4337 (argument_parser::argument_parser): New ctor.
4338 (argument_parser::read_any_dollar): New method.
4339 (argument_parser::read_format_flags): New method.
4340 (argument_parser::read_any_format_width): New method.
4341 (argument_parser::read_any_format_left_precision): New method.
4342 (argument_parser::read_any_format_precision): New method.
4343 (argument_parser::handle_alloc_chars): New method.
4344 (argument_parser::read_any_length_modifier): New method.
4345 (argument_parser::read_any_other_modifier): New method.
4346 (argument_parser::find_format_char_info): New method.
4347 (argument_parser::validate_flag_pairs): New method.
4348 (argument_parser::give_y2k_warnings): New method.
4349 (argument_parser::parse_any_scan_set): New method.
4350 (argument_parser::handle_conversions): New method.
4351 (argument_parser::check_argument_type): New method.
4352 (check_format_info_main): Introduce classes argument_parser
4353 and flag_chars_t, moving the code within the loop into methods
4354 of these classes. Make various locals "const".
4355
88fa5555
DM
43562016-08-05 David Malcolm <dmalcolm@redhat.com>
4357
4358 * c-common.c: Include "substring-locations.h".
4359 (get_cpp_ttype_from_string_type): New function.
4360 (g_string_concat_db): New global.
4361 (substring_loc::get_range): New method.
4362 * c-common.h (g_string_concat_db): New declaration.
4363 (class substring_loc): New class.
4364 * c-lex.c (lex_string): When concatenating strings, capture the
4365 locations of all tokens using a new obstack, and record the
4366 concatenation locations within g_string_concat_db.
4367 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4368 on the ggc-heap.
4369
78169471
MP
43702016-07-29 Marek Polacek <polacek@redhat.com>
4371
638fc14f
MP
4372 PR c/71926
4373 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4374 parentheses warning.
4375
78169471
MP
4376 PR c/71574
4377 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4378
1225d6b1
ML
43792016-07-28 Martin Liska <mliska@suse.cz>
4380
4381 PR gcov-profile/68025
4382 * c-common.c (handle_no_profile_instrument_function_attribute):
4383
ec1e2a40
BE
43842016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4385
4386 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4387 BITS_PER_UNIT_LOG.
4388
5ec2cd9f
JM
43892016-07-25 Jason Merrill <jason@redhat.com>
4390
4391 PR c++/65970
4392 * c.opt (fconstexpr-loop-limit): New.
4393
9dc5773f 43942016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4395
4396 PR c++/71675
4397 * c-common.c (resolve_overloaded_builtin): Avoid converting
4398 __atomic_compare_exchange_n return type to that of what its
4399 first argument points to.
4400
e3fe09c1
UB
44012016-07-22 Uros Bizjak <ubizjak@gmail.com>
4402
4403 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4404 ~(unsigned HOST_WIDE_INT) 0.
4405
bc91c436
ML
44062016-07-22 Martin Liska <mliska@suse.cz>
4407
4408 PR gcov-profile/69028
4409 PR gcov-profile/62047
4410 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4411 to the current_function_decl.
4412
451dcc66
JM
44132016-07-21 Jason Merrill <jason@redhat.com>
4414
4415 PR c++/65168
4416 * c-common.c (c_common_truthvalue_conversion): Check
4417 c_inhibit_evaluation_warnings for warning about address of
4418 reference.
4419
de6a69ee
DM
44202016-07-20 David Malcolm <dmalcolm@redhat.com>
4421
4422 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4423 const char *.
4424
d022c55a
JM
44252016-07-15 Jason Merrill <jason@redhat.com>
4426
4427 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4428
ddbbcb19
JJ
44292016-07-15 Jakub Jelinek <jakub@redhat.com>
4430
4431 PR c/71858
4432 * c-common.h (enum lookup_name_fuzzy_kind): Add
4433 FUZZY_LOOKUP_FUNCTION_NAME.
4434
d0cf395a
JM
44352016-07-08 Jason Merrill <jason@redhat.com>
4436
4437 P0145: Refining Expression Order for C++.
4438 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4439 * c-opts.c: Adjust.
4440
98d44e93
MT
44412016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4442
4443 PR c++/71214
4444 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4445
f9d8d994
TS
44462016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4447
4448 * c-pragma.h (enum pragma_kind): Rename
4449 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4450 users.
4451
4aa83879
RB
44522016-06-29 Richard Biener <rguenther@suse.de>
4453
4454 PR middle-end/71002
4455 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4456
a25bd9e6
JM
44572016-06-24 Jason Merrill <jason@redhat.com>
4458
4459 P0145R2: Refining Expression Order for C++.
4460 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4461 MODIFY_EXPR.
4462
a86451b9
JJ
44632016-06-24 Jakub Jelinek <jakub@redhat.com>
4464
4465 * c-common.c (check_builtin_function_arguments): Require last
4466 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4467 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4468 if the last argument is pointer to enumerated or boolean type.
4469
1a4f11c8
DM
44702016-06-22 David Malcolm <dmalcolm@redhat.com>
4471
4472 PR c/70339
4473 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4474 (lookup_name_fuzzy): New prototype.
4475
fe55692c
JDA
44762016-06-21 John David Anglin <danglin@gcc.gnu.org>
4477
4478 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4479
4eb24e01
JM
44802016-06-14 Jason Merrill <jason@redhat.com>
4481
4482 P0145R2: Refining Expression Order for C++.
4483 * c.opt (fargs-in-order): New.
4484 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4485
ef7cf206
JJ
44862016-06-13 Jakub Jelinek <jakub@redhat.com>
4487
0dda258b
JJ
4488 PR sanitizer/71498
4489 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4490 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4491
ef7cf206
JJ
4492 PR preprocessor/71183
4493 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4494 to cb_get_source_date_epoch.
4495
50b15873
JJ
44962016-06-10 Jakub Jelinek <jakub@redhat.com>
4497
4498 PR c/68657
4499 * c.opt (Wpsabi): Add Warning flag.
4500
4d926e34
MS
45012016-06-10 Martin Sebor <msebor@redhat.com>
4502
4503 PR c/71392
14ec014e 4504 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4505 the nonnull attribute in type-generic builtins.
4506
e01b4e16
MS
45072016-06-09 Martin Sebor <msebor@redhat.com>
4508
4509 PR c/70883
4510 * c-common.c (builtin_function_validate_nargs): Make text of error
4511 message consistent with others like it.
4512
44a845ca
MS
45132016-06-08 Martin Sebor <msebor@redhat.com>
4514 Jakub Jelinek <jakub@redhat.com>
4515
4516 PR c++/70507
4517 PR c/68120
4518 * c-common.c (check_builtin_function_arguments): Handle
4519 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4520
a80a7051
RB
45212016-06-08 Richard Biener <rguenther@suse.de>
4522
4523 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4524
bfd67b47
RB
45252016-06-07 Richard Biener <rguenther@suse.de>
4526
4527 PR c/61564
4528 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4529 options and warn about others.
4530
15c98b2e
ES
45312016-06-01 Eduard Sanou <dhole@openmailbox.org>
4532
4533 * c-common.c (get_source_date_epoch): Rename to
4534 cb_get_source_date_epoch.
4535 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4536 message when the parsing fails. Use error_at instead of fatal_error.
4537 * c-common.h (get_source_date_epoch): Rename to
4538 cb_get_source_date_epoch.
4539 * c-common.h (cb_get_source_date_epoch): Prototype.
4540 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4541 * c-common.h (c_omp_region_type): Remove trailing comma.
4542 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4543 * c-lex.c (c_lex_with_flags): Remove initialization of
4544 pfile->source_date_epoch.
4545
00631022
JJ
45462016-05-30 Jakub Jelinek <jakub@redhat.com>
4547
4548 PR c++/71349
4549 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4550 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4551 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4552 instead of C_OMP_CLAUSE_SPLIT_FOR.
4553
f17a223d
RB
45542016-05-24 Richard Biener <rguenther@suse.de>
4555
4556 PR middle-end/70434
4557 PR c/69504
4558 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4559 (convert_vector_to_array_for_subscript): ... this.
4560 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4561 VIEW_CONVERT_EXPR to an array type. Rename to ...
4562 (convert_vector_to_array_for_subscript): ... this.
4563
4f2e1536
MP
45642016-05-12 Marek Polacek <polacek@redhat.com>
4565
4566 PR c/70756
4567 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4568 size_in_bytes and pass LOC to it.
4569
d6e83a8d
MM
45702016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4571
4572 PR c/43651
4573 * c.opt (Wduplicate-decl-specifier): New option.
4574
5c3a10fb
MP
45752016-05-11 Marek Polacek <polacek@redhat.com>
4576
4577 PR c++/71024
4578 * c-common.c (diagnose_mismatched_attributes): New function.
4579 * c-common.h (diagnose_mismatched_attributes): Declare.
4580
deef7113
MP
45812016-05-04 Marek Polacek <polacek@redhat.com>
4582
4583 * c.opt (Wdangling-else): New option.
4584
79ce98bc
MP
45852016-05-03 Marek Polacek <polacek@redhat.com>
4586
4587 PR c/70859
4588 * c-common.c (builtin_function_validate_nargs): Add location
4589 parameter. Use it.
4590 (check_builtin_function_arguments): Add location and arguments
4591 parameters. Use them.
4592 * c-common.h (check_builtin_function_arguments): Update declaration.
4593
381cdae4
RB
45942016-05-03 Richard Biener <rguenther@suse.de>
4595
4596 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4597 allow call args to gimplify to SSA names.
4598
1d793c34
MP
45992016-05-03 Marek Polacek <polacek@redhat.com>
4600
4601 * c-common.h (enum c_omp_region_type): Remove stray comma.
4602
77886428
CP
46032016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4604
4605 * c-common.h (enum c_omp_region_type): Define.
4606
697e0b28
RS
46072016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4608
4609 * c-common.c (shorten_compare): Use wi::to_wide.
4610
e7ff0319
CP
46112016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4612
4613 PR middle-end/70626
4614 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4615 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4616 reduction clauses in acc parallel loops.
4617
2fff3db8
MP
46182016-04-29 Marek Polacek <polacek@redhat.com>
4619
4620 PR c/70852
4621 * c-common.c (warn_for_memset): Check domain before accessing it.
4622
509063eb
DV
46232016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4624
4625 PR/69089
4626 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4627 "aligned" attribute.
4628
b632761d
JM
46292016-04-28 Jason Merrill <jason@redhat.com>
4630
4631 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4632
174f6622
ES
46332016-04-28 Eduard Sanou <dhole@openmailbox.org>
4634 Matthias Klose <doko@debian.org>
4635
4636 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4637 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4638 handling.
4639 * c-common.h (get_source_date_epoch): Prototype.
4640 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4641
6bc2bb18
RB
46422015-04-27 Ryan Burn <contact@rnburn.com>
4643
4644 PR c++/69024
4645 PR c++/68997
4646 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4647 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4648 external linkage.
4649 (cilk_detect_and_unwrap): Corresponding changes.
4650 (extract_free_variables): Don't extract free variables from
4651 AGGR_INIT_EXPR slot.
4652 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4653 (cilk_recognize_spawn): Likewise.
4654
c1e1f433
BS
46552016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4656
4657 * c.opt (Wmemset-elt-size): New option.
4658 * c-common.c (warn_for_memset): New function.
4659 * c-common.h (warn_for_memset): Declare.
4660
d067e05f
JM
46612016-04-25 Jason Merrill <jason@redhat.com>
4662
4663 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4664 No longer static.
4665 * c-common.h: Declare it.
4666 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4667
9aa36ae5
JM
46682016-04-22 Jason Merrill <jason@redhat.com>
4669
4670 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4671
477d4906
IV
46722016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4673
4674 PR c++/69363
4675 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4676 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4677
fe37c7af
MM
46782016-04-18 Michael Matz <matz@suse.de>
4679
4680 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4681 and SET_DECL_ALIGN.
4682
23f2660f
EB
46832016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4684
4685 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4686 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4687 to incomplete types.
4688 (dump_nested_type): Remove redundant tests and tidy up.
4689 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4690 a type which is the typedef of an original type.
4691
1e77281b
MP
46922016-04-15 Marek Polacek <polacek@redhat.com>
4693
4694 PR c/70651
4695 * c-common.c (build_va_arg): Change two asserts into errors and return
4696 error_mark_node.
4697
b3a77f21
MP
46982016-04-13 Marek Polacek <polacek@redhat.com>
4699
4700 PR c++/70639
4701 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4702 for switch statements, too.
4703
322b8466
JM
47042016-03-28 Jason Merrill <jason@redhat.com>
4705
4706 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4707
fbdb6baf
MP
47082016-03-23 Marek Polacek <polacek@redhat.com>
4709
4710 PR c++/69884
4711 * c.opt (Wignored-attributes): New option.
4712
5c240f4d
DM
47132016-03-22 David Malcolm <dmalcolm@redhat.com>
4714
4715 PR c/69993
4716 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4717 diagnostic text, reversing the order of the warning and note so
4718 that they appear in source order.
4719
14ba7b28
MP
47202016-03-17 Marek Polacek <polacek@redhat.com>
4721
4722 PR c/69407
4723 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4724 operations.
4725
08a1cadc
JM
47262016-03-14 Jason Merrill <jason@redhat.com>
4727
2aaeea19
JM
4728 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4729
08a1cadc
JM
4730 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4731
c06d25bb
RB
47322016-03-09 Richard Biener <rguenther@suse.de>
4733
4734 PR c/70143
4735 * c-common.c (strict_aliasing_warning): Add back
4736 alias_sets_conflict_p check.
4737
80aac5c8
JM
47382016-03-08 Jason Merrill <jason@redhat.com>
4739
4740 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4741
64b23c13
DM
47422016-03-04 David Malcolm <dmalcolm@redhat.com>
4743
4744 PR c/68187
4745 * c-indentation.c (get_visual_column): Move code to determine next
4746 tab stop to...
4747 (next_tab_stop): ...this new function.
4748 (line_contains_hash_if): Delete function.
4749 (detect_preprocessor_logic): Delete function.
4750 (get_first_nws_vis_column): New function.
4751 (detect_intervening_unindent): New function.
4752 (should_warn_for_misleading_indentation): Replace call to
4753 detect_preprocessor_logic with a call to
4754 detect_intervening_unindent.
4755
729526f5
DM
47562016-03-04 David Malcolm <dmalcolm@redhat.com>
4757
4758 PR c/68187
4759 * c-indentation.c (should_warn_for_misleading_indentation): When
4760 suppressing warnings about cases where the guard and body are on
4761 the same column, only use the first non-whitespace column in place
4762 of the guard token column when dealing with "else" clauses.
4763 When rejecting aligned BODY and NEXT, loosen the requirement
4764 from equality with the first non-whitespace of guard to simply
4765 that they not be indented relative to it.
4766
e9a35493
RB
47672016-03-04 Richard Biener <rguenther@suse.de>
4768
4769 PR c++/70054
4770 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4771 instead of alias_sets_conflict_p.
4772
1be56bc5
MP
47732016-03-01 Marek Polacek <polacek@redhat.com>
4774
4775 PR c++/69795
4776 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4777 any DECL.
4778
35886f0b
MS
47792016-02-22 Martin Sebor <msebor@redhat.com>
4780
4781 PR middle-end/69780
4782 * c-common.c (check_builtin_function_arguments): Validate and
4783 reject invalid arguments to __builtin_alloca_with_align.
4784
4246c8da
MW
47852016-02-20 Mark Wielaard <mjw@redhat.com>
4786
4787 PR c/28901
4788 * c.opt (Wunused-const-variable): Turn into Alias for...
4789 (Wunused-const-variable=): New option.
4790
268be88c
BE
47912016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4792
4793 PR c++/69865
4794 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4795 here...
4796 (c_common_init_options): ...to here.
4797 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4798
871b3f47
JJ
47992016-02-19 Jakub Jelinek <jakub@redhat.com>
4800
4801 PR c++/69826
4802 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4803 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4804 flag_preprocess_only.
4805
bf14eba2
JJ
48062016-02-16 Jakub Jelinek <jakub@redhat.com>
4807
4808 PR c/69835
4809 * c.opt (Wnonnull-compare): Enable for -Wall.
4810
ba6b3795
JJ
48112016-02-15 Jakub Jelinek <jakub@redhat.com>
4812
4813 PR c++/69797
4814 * c-common.c (sync_resolve_size): Diagnose too few arguments
4815 even when params is non-NULL empty vector.
4816
a011cd92
BS
48172016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4818
4819 PR target/60410
4820 * c.opt (fshort-double): Remove.
4821
46cb9332
MS
48222016-02-05 Martin Sebor <msebor@redhat.com>
4823
4824 PR c++/69662
4825 * c.opt (Warning options): Update -Wplacement-new to take
4826 an optional argument.
4827
e1b81f2b
JJ
48282016-02-01 Jakub Jelinek <jakub@redhat.com>
4829
4830 PR preprocessor/69543
4831 PR c/69558
4832 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4833 instead of loc to control_warning_option.
4834
b6adbb9f
NS
48352016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4836
4837 * c.opt (fopenacc-dim=): New option.
4838
5d70666e
RB
48392016-01-27 Ryan Burn <contact@rnburn.com>
4840
4841 PR cilkplus/69267
4842 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4843 gimplify_arg. Removed superfluous post_p argument.
4844 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4845 superfluous post_p argument.
4846 * c-gimplify.c (c_gimplify_expr): Likewise.
4847
01e1dea3
DM
48482016-01-26 David Malcolm <dmalcolm@redhat.com>
4849
4850 PR other/69006
4851 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4852 pp_newline_and_flush with pp_flush.
4853
9f04a53e
MS
48542016-01-20 Martin Sebor <msebor@redhat.com>
4855
4856 PR c/69405
4857 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4858 an incompatible argument when the argument isn't a valid tree node.
4859
7f26f7df
JM
48602016-01-18 Jason Merrill <jason@redhat.com>
4861
4862 PR c++/68767
4863 * c-common.c (check_function_arguments_recurse): Fold the whole
4864 COND_EXPR, not just the condition.
4865
f62bf092
TV
48662016-01-18 Tom de Vries <tom@codesourcery.com>
4867
4868 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4869 classify as loop clause.
4870
e0a575ff
JJ
48712016-01-15 Jakub Jelinek <jakub@redhat.com>
4872
4873 PR bootstrap/68271
4874 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4875 C++ FE no longer has limit on number of pragmas.
4876
48772015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4878
4879 PR c++/69048
4880 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4881 to add missing cleanup point.
b6e3db06 4882
c7df95d8
DM
48832016-01-14 David Malcolm <dmalcolm@redhat.com>
4884
4885 PR c++/68819
4886 * c-indentation.c (get_visual_column): Add location_t param.
4887 Handle the column number being zero by effectively disabling the
4888 warning, with an "inform".
4889 (should_warn_for_misleading_indentation): Add location_t argument
4890 for all uses of get_visual_column.
4891
21efdd80
PP
48922016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4893
4894 PR c++/69029
4895 * c-indentation.c (should_warn_for_misleading_indentation):
4896 Don't warn about do-while statements.
4897
7a127fa7
MS
48982016-01-07 Martin Sebor <msebor@redhat.com>
4899
4900 PR c/68966
4901 * c-common.c (sync_resolve_size): Reject first argument when it's
4902 a pointer to _Bool.
4903
c589e975
DM
49042016-01-05 David Malcolm <dmalcolm@redhat.com>
4905
4906 PR c/69122
4907 * c-indentation.c (get_visual_column): Remove default argument.
4908 (should_warn_for_misleading_indentation): For the multiline case,
4909 update call to get_visual_column for next_stmt_exploc so that it
4910 captures the location of the first non-whitespace character in the
4911 relevant line. Don't issue warnings if there is non-whitespace
4912 before the next statement.
4913
818ab71a
JJ
49142016-01-04 Jakub Jelinek <jakub@redhat.com>
4915
4916 Update copyright years.
4917
745e411d
DM
49182015-12-21 David Malcolm <dmalcolm@redhat.com>
4919
4920 * c-common.c (binary_op_error): Convert first param from
4921 location_t to rich_location * and use it when emitting an error.
4922 * c-common.h (binary_op_error): Convert first param from
4923 location_t to rich_location *.
4924
de67c4c3
DM
49252015-12-16 David Malcolm <dmalcolm@redhat.com>
4926
4927 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4928 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4929
4a38b02b
IV
49302015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4931
4932 * c-common.c (c_common_attribute_table): Handle "omp declare target
4933 link" attribute.
4934
54d62f51
JJ
49352015-12-14 Jakub Jelinek <jakub@redhat.com>
4936
4937 PR c/68833
4938 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4939
8d4227c8
TB
49402014-12-12 Tobias Burnus <burnus@net-b.de>
4941
4942 PR fortran/68815
4943 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4944 specifiers (%d, %i,%u and %c).
4945
f6069ccc
DM
49462015-12-10 David Malcolm <dmalcolm@redhat.com>
4947
4948 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4949
63bbf46d
JJ
49502015-12-08 Jakub Jelinek <jakub@redhat.com>
4951
4952 PR c/48088
4953 PR c/68657
4954 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4955 * c-pragma.c (handle_pragma_diagnostic): Adjust
4956 control_warning_option caller.
4957
f79520bb
DM
49582015-12-07 David Malcolm <dmalcolm@redhat.com>
4959
4960 * c-common.c (c_cpp_error): Update for change to
4961 rich_location::set_range.
4962
b3d5bc62
JJ
49632015-12-04 Paolo Bonzini <bonzini@gnu.org>
4964
4965 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4966 shifting 1 out of the sign bit.
4967
49682015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4969
4970 * c-common.c (c_common_attribute_table[]): Update max arguments
4971 count for "simd" attribute.
4972 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4973
6eb4a537
JJ
49742015-12-03 Jakub Jelinek <jakub@redhat.com>
4975
4976 PR preprocessor/57580
4977 * c-ppoutput.c (print): Change printed field to bool.
4978 Move src_file last for smaller padding.
4979 (init_pp_output): Set print.printed to false instead of 0.
4980 (scan_translation_unit): Fix up formatting. Set print.printed
4981 to true after printing something other than newline.
4982 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4983 (maybe_print_line_1): Set print.printed to false instead of 0.
4984 (print_line_1): Likewise.
4985 (do_line_change): Set print.printed to true instead of 1.
4986 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4987 dump_macro): Set print.printed to false after printing newline.
4988
4250754e
JM
49892015-12-02 Jason Merrill <jason@redhat.com>
4990
f479b43d
JM
4991 * c-common.c (fold_for_warn): New.
4992 (warn_logical_operator, warn_tautological_cmp)
4993 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4994
4250754e
JM
4995 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4996 (c_fully_fold_internal, decl_constant_value_for_optimization):
4997 Move to c/c-fold.c.
4998 * c-common.h: Don't declare decl_constant_value_for_optimization.
4999
e9e32ee6
JM
50002015-12-02 Joseph Myers <joseph@codesourcery.com>
5001
5002 PR c/68162
5003 * c-common.h (c_build_qualified_type): Add extra default
5004 arguments.
5005
37d5ad46
JB
50062015-12-01 Julian Brown <julian@codesourcery.com>
5007 Cesar Philippidis <cesar@codesourcery.com>
5008 James Norris <James_Norris@mentor.com>
5009
5010 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
5011 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
5012 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
5013
f07862c7
EB
50142015-11-30 Eric Botcazou <ebotcazou@adacore.com>
5015
5016 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
5017 (decl_sloc_common): Delete and move bulk of processing to...
5018 (decl_sloc): ...here.
5019 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
5020 (dump_ada_double_name): Remove S parameter and compute the suffix.
5021 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
5022 element type and deal with an anonymous one.
5023 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
5024 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
5025 and remove reference to QUAL_UNION_TYPE.
5026 (dump_nested_types): Make 2 passes on the fields and move bulk to...
5027 (dump_nested_type): ...here. New function extracted from above.
5028 Generate a full declaration for anonymous element type of arrays.
5029 (print_ada_declaration): Really skip anonymous declarations. Remove
5030 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
5031 Clean up processing of declarations of array types and objects.
5032 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
5033 Remove obsolete code and tidy up.
5034
75c8aac3
JH
50352015-11-29 Jan Hubicka <hubicka@ucw.cz>
5036
5037 PR c/67581
5038 * c-common.c (handle_transparent_union_attribute): Update
5039 also type variants.
5040
b58d3df2
ML
50412015-11-27 Martin Liska <mliska@suse.cz>
5042
5043 PR c++/68312
5044 * array-notation-common.c (cilkplus_extract_an_triplets):
5045 Release vector of vectors.
5046 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
5047
89a01fcf
EB
50482015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5049
5050 PR c++/68527
5051 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5052 (print_ada_struct_decl): Likewise.
5053
cc5c5226
IZ
50542015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5055
5056 PR c++/68001
5057 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5058 * cilk.c (recognize_spawn): Determine location in a more precise
5059 way.
5060
269adb9d
JM
50612015-11-19 Jason Merrill <jason@redhat.com>
5062
5063 * c-common.c (shorten_compare): But look through macros from
5064 system headers.
5065
d0eccfcd
JM
50662015-11-18 Jason Merrill <jason@redhat.com>
5067
5068 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5069 non-constant operand comes from a macro.
5070
3e44547c
JM
50712015-11-17 Jason Merrill <jason@redhat.com>
5072
5073 PR bootstrap/68346
5074 * c-common.c (warn_tautological_cmp): Fold before checking for
5075 constants.
5076
0f62c7a0
MP
50772015-11-16 Marek Polacek <polacek@redhat.com>
5078
5079 PR c++/68362
5080 * c-common.c (check_case_bounds): Fold low and high cases.
5081
a868811e
MP
50822015-11-16 Marek Polacek <polacek@redhat.com>
5083
5084 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5085 * c-common.c (c_common_get_alias_set): Likewise.
5086 (handle_visibility_attribute): Likewise.
5087
fff77217
KY
50882015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5089
5090 * c-common.c (handle_simd_attribute): New.
5091 (struct attribute_spec): Add entry for "simd".
5092 (handle_simd_attribute): New.
5093
269e63b7
KT
50942015-11-13 Kai Tietz <ktietz70@googlemail.com>
5095
5096 * c-lex.c (interpret_float): Use fold_convert.
5097
ebedc9a3
DM
50982015-11-13 David Malcolm <dmalcolm@redhat.com>
5099
5100 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5101 and store it on the result.
5102 * c-opts.c (c_common_init_options): Set
5103 global_dc->colorize_source_p.
5104
6e232ba4
JN
51052015-11-12 James Norris <jnorris@codesourcery.com>
5106 Joseph Myers <joseph@codesourcery.com>
5107
7365279f 5108 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5109 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5110 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5111 PRAGMA_OACC_CLAUSE_LINK.
5112
e78bede6
MP
51132015-11-11 Marek Polacek <polacek@redhat.com>
5114
5115 PR c/68107
5116 PR c++/68266
5117 * c-common.c (valid_array_size_p): New function.
5118 * c-common.h (valid_array_size_p): Declare.
5119
3f8257db 51202015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5121
5122 PR bootstrap/68271
5123 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5124
69f293c9
AM
51252015-11-11 Andrew MacLeod <amacleod@redhat.com>
5126
5127 * array-notation-common.c: Remove unused header files.
5128 * c-ada-spec.c: Likewise.
5129 * c-cilkplus.c: Likewise.
5130 * c-common.c: Likewise.
5131 * c-cppbuiltin.c: Likewise.
5132 * c-dump.c: Likewise.
5133 * c-format.c: Likewise.
5134 * c-gimplify.c: Likewise.
5135 * c-indentation.c: Likewise.
5136 * c-lex.c: Likewise.
5137 * c-omp.c: Likewise.
5138 * c-opts.c: Likewise.
5139 * c-pch.c: Likewise.
5140 * c-ppoutput.c: Likewise.
5141 * c-pragma.c: Likewise.
5142 * c-pretty-print.c: Likewise.
5143 * c-semantics.c: Likewise.
5144 * c-ubsan.c: Likewise.
5145 * cilk.c: Likewise.
5146 * stub-objc.c: Likewise.
5147
3a40d81d
NS
51482015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5149 Cesar Philippidis <cesar@codesourcery.com>
5150 James Norris <jnorris@codesourcery.com>
5151 Julian Brown <julian@codesourcery.com>
5152 Nathan Sidwell <nathan@codesourcery.com>
5153
5154 * c-pragma.c (oacc_pragmas): Add "routine".
5155 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5156
ee45a32d
EB
51572015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5158
5159 * c-common.c (c_common_attributes): Add scalar_storage_order.
5160 (handle_scalar_storage_order_attribute): New function.
5161 * c-pragma.c (global_sso): New variable.
5162 (maybe_apply_pragma_scalar_storage_order): New function.
5163 (handle_pragma_scalar_storage_order): Likewise.
5164 (init_pragma): Register scalar_storage_order.
5165 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5166 * c.opt (Wscalar-storage-order): New warning.
5167 (fsso-struct=): New option.
5168
eb11eb15
MS
51692015-11-08 Martin Sebor <msebor@redhat.com>
5170
5171 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5172
0aad0198
RS
51732015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5174
5175 * c-common.c: Don't undef DEF_BUILTIN.
5176
8a645150
DM
51772015-11-06 David Malcolm <dmalcolm@redhat.com>
5178
5179 * c-common.c (c_cpp_error): Convert parameter from location_t to
5180 rich_location *. Eliminate the "column_override" parameter and
5181 the call to diagnostic_override_column.
5182 Update the "done_lexing" clause to set range 0
5183 on the rich_location, rather than overwriting a location_t.
5184 * c-common.h (c_cpp_error): Convert parameter from location_t to
5185 rich_location *. Eliminate the "column_override" parameter.
5186
7a5e4956
CP
51872015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5188 Thomas Schwinge <thomas@codesourcery.com>
5189 James Norris <jnorris@codesourcery.com>
5190
5191 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5192 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5193 clauses with parallel and kernels and loops.
5194 * c-pragma.h (enum pragma_omp_clause): Add entries for
5195 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5196 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5197 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5198 INDEPENDENT,SEQ}.
5199 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5200
e2f5cc96
MS
52012015-11-05 Martin Sebor <msebor@redhat.com>
5202
5203 PR c++/67942
5204 * c.opt (-Wplacement-new): New option.
5205
e01d41e5
JJ
52062015-11-05 Jakub Jelinek <jakub@redhat.com>
5207
5208 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5209 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5210 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5211 save_expr or create_tmp_var* if TEST is true.
5212 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5213 Don't call add_stmt here.
5214 (struct c_omp_check_loop_iv_data): New type.
5215 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5216 c_omp_check_loop_iv_exprs): New functions.
5217 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5218 distribute.
5219 (c_omp_declare_simd_clauses_to_numbers): Change
5220 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5221 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5222 from numbers to PARM_DECLs.
5223
595278be
MM
52242015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5225
5226 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5227 flag_checking.
5228
3f8257db 52292015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5230
5231 PR c++-common/67882
b3d5bc62
JJ
5232 * c-common.h (fold_offsetof_1): Add argument.
5233 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5234 offsetof expressions that reference elements past the end of
5235 an array.
5236
4bf9e5a8
TS
52372015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5238 Chung-Lin Tang <cltang@codesourcery.com>
5239
5240 * c-pragma.c (oacc_pragmas): Add "atomic".
5241 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5242
3b1661a9
ES
52432015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5244
5245 * c-common.c (handle_target_clones_attribute): New.
5246 (c_common_attribute_table): Add handle_target_clones_attribute.
5247 (handle_always_inline_attribute): Add check on target_clones attribute.
5248 (handle_target_attribute): Ditto.
5249
2adfab87
AM
52502015-10-29 Andrew MacLeod <amacleod@redhat.com>
5251
5252 * array-notation-common.c: Reorder #include's and remove duplicates.
5253 * c-ada-spec.c: Likewise.
5254 * c-cilkplus.c: Likewise.
5255 * c-common.c: Likewise.
5256 * c-cppbuiltin.c: Likewise.
5257 * c-dump.c: Likewise.
5258 * c-format.c: Likewise.
5259 * c-gimplify.c: Likewise.
5260 * c-indentation.c: Likewise.
5261 * c-lex.c: Likewise.
5262 * c-omp.c: Likewise.
5263 * c-opts.c: Likewise.
5264 * c-pch.c: Likewise.
5265 * c-ppoutput.c: Likewise.
5266 * c-pragma.c: Likewise.
5267 * c-pretty-print.c: Likewise.
5268 * c-semantics.c: Likewise.
5269 * c-ubsan.c: Likewise.
5270 * cilk.c: Likewise.
5271 * stub-objc.c: Likewise.
5272
d90ec4f2
JM
52732015-10-28 Jason Merrill <jason@redhat.com>
5274
5275 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5276
88bae6f4
TS
52772015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5278 James Norris <jnorris@codesourcery.com>
5279 Cesar Philippidis <cesar@codesourcery.com>
5280
5281 PR c/64765
5282 PR c/64880
5283 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5284 * c-omp.c (c_oacc_split_loop_clauses): New function.
5285
b1726d6c
MS
52862015-10-21 Martin Sebor <msebor@redhat.com>
5287
5288 PR driver/68043
5289 * c.opt: End each sentence that describes an option with a period.
5290
fa60eeb9
MP
52912015-10-20 Marek Polacek <polacek@redhat.com>
5292
5293 * array-notation-common.c (is_cilkplus_vector_p): Define.
5294 * c-common.h (is_cilkplus_vector_p): Declare.
5295
95979049
MP
52962015-10-20 Marek Polacek <polacek@redhat.com>
5297
5298 * c.opt (std=gnu++11): Do not describe as experimental.
5299 (std=gnu++14): Likewise.
5300
2a9fb712
JM
53012015-10-19 Jason Merrill <jason@redhat.com>
5302
5303 * c-cppbuiltin.c (c_cpp_builtins): Define
5304 __cpp_nontype_template_args.
5305
13b380a3
JM
53062015-10-19 Jason Merrill <jason@redhat.com>
5307
5308 * c-cppbuiltin.c (c_cpp_builtins): Define
5309 __cpp_enumerator_attributes, __cpp_fold_expressions,
5310 __cpp_unicode_characters.
5311
d9a6bd32
JJ
53122015-10-13 Jakub Jelinek <jakub@redhat.com>
5313 Aldy Hernandez <aldyh@redhat.com>
5314
5315 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5316 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5317 (c_define_builtins): Likewise.
5318 * c-common.h (enum c_omp_clause_split): Add
5319 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5320 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5321 (c_finish_omp_for): Add ORIG_DECLV argument.
5322 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5323 201511 instead of 201307.
5324 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5325 OMP_CRITICAL_CLAUSES to it.
5326 (c_finish_omp_ordered): Add CLAUSES argument, set
5327 OMP_ORDERED_CLAUSES to it.
5328 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5329 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5330 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5331 constructs and new OpenMP 4.5 clauses. Clear
5332 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5333 verification code.
5334 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5335 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5336 (enum pragma_omp_clause): Add
5337 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5338 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5339
624d31fe
RS
53402015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5341
5342 * c-lex.c (interpret_float): Use real_equal instead of
5343 REAL_VALUES_EQUAL.
5344
b8fd7909
JM
53452015-10-04 Jason Merrill <jason@redhat.com>
5346
5347 Implement N4514, C++ Extensions for Transactional Memory.
5348 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5349 (c_common_attribute_table): Add transaction_safe_dynamic.
5350 transaction_safe now affects type identity.
5351 (handle_tm_attribute): Handle transaction_safe_dynamic.
5352 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5353 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5354 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5355 (D_TRANSMEM): New.
5356 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5357 * c-pretty-print.c (pp_c_attributes_display): Don't print
5358 transaction_safe in C++.
5359
12651878
MP
53602015-10-02 Marek Polacek <polacek@redhat.com>
5361
5362 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5363
3e3b8d63
MP
53642015-10-02 Marek Polacek <polacek@redhat.com>
5365
5366 PR c/64249
5367 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5368 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5369 * c.opt (Wduplicated-cond): New option.
5370
0d1a8f75
JM
53712015-10-01 Joseph Myers <joseph@codesourcery.com>
5372
5373 * c.opt (std=c11): Do not describe as experimental.
5374 (std=gnu11): Likewise.
5375 (std=iso9899:2011): Likewise.
5376
3e32ee19
NS
53772015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5378
5379 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5380 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5381
974348ee
MP
53822015-09-25 Marek Polacek <polacek@redhat.com>
5383
5384 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5385 (ubsan_instrument_shift): Likewise.
5386
15dbc1a6
MP
53872015-09-25 Marek Polacek <polacek@redhat.com>
5388
5389 PR sanitizer/64906
5390 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5391
6b95d7cc
PP
53922015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5393
5394 * c-indentation.c (should_warn_for_misleading_indentation):
5395 Compare next_stmt_vis_column with guard_line_first_nws instead
5396 of with guard_line_vis_column.
5397
c1822f9c
MLI
53982015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5399
5400 PR c/49654
5401 PR c/49655
5402 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5403 options and options not valid for the current language.
5404
d5398058
PP
54052015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5406
5407 * c-indentation.c (should_warn_for_misleading_indentation):
5408 Float out and consolidate the calls to get_visual_column that
5409 are passed guard_exploc as an argument. Compare
5410 next_stmt_vis_column with guard_line_first_nws instead of with
5411 body_line_first_nws.
5412
6b333269
NS
54132015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5414
5415 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5416 Wnamespaces): New C++ warnings.
5417
a75f1574
JM
54182015-09-22 Jason Merrill <jason@redhat.com>
5419
5420 * c-common.h (abi_compat_version_crosses): New.
5421 (warn_abi_version): Declare.
5422 * c-common.c: Define it.
5423 * c-opts.c (c_common_post_options): Handle it.
5424 flag_abi_compat_version defaults to 8.
5425
bdaaa8b7
VV
54262015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5427
5428 Complete the implementation of N4230, Nested namespace definition.
5429 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5430 __cpp_nested_namespace_definitions.
5431
eaa797e8
MLI
54322015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5433
5434 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5435
c4914de6
MLI
54362015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5437
5438 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5439 when warning.
5440 * c-pragma.h (pragma_lex): Add optional loc argument.
5441
fcb87c50
MM
54422015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5443
5444 * c-format.c (check_format_arg): Adjust to use common block size in all
5445 object pools.
5446
31bdd08a
DM
54472015-09-15 David Malcolm <dmalcolm@redhat.com>
5448
5449 * c-format.c (location_from_offset): Update for change in
5450 signature of location_get_source_line.
5451 * c-indentation.c (get_visual_column): Likewise.
5452 (line_contains_hash_if): Likewise.
5453
aa9f4b4c
MP
54542015-09-14 Marek Polacek <polacek@redhat.com>
5455
5456 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5457 setting various warnings.
5458
aa256c4a
MP
54592015-09-14 Marek Polacek <polacek@redhat.com>
5460
5461 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5462 a negative value.
5463
0f876f22
MW
54642015-09-11 Mark Wielaard <mjw@redhat.com>
5465
5466 PR c/28901
5467 * c.opt (Wunused-variable): Option from common.opt.
5468 (Wunused-const-variable): New option.
5469
273aa49e
PC
54702015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5471
5472 PR c++/53184
5473 * c.opt ([Wsubobject-linkage]): Add.
5474
1807ffc1
MS
54752015-09-03 Martin Sebor <msebor@redhat.com>
5476
5477 PR c/66516
5478 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5479 functions.
5480 * c-common.c (reject_gcc_builtin): Define.
5481
38942840
BI
54822015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5483
5484 PR middle-end/60586
5485 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5486 prototype.
5487 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5488 cilk_gimplify_call_params_in_spawned_fn.
5489 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5490 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5491 unwrapping.
5492
c316b5e4
MP
54932015-08-25 Marek Polacek <polacek@redhat.com>
5494
5495 PR middle-end/67330
5496 * c-common.c (handle_weak_attribute): Don't check whether the
5497 visibility can be changed here.
5498
584a7c46
MLI
54992015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5500
5501 * c-lex.c (c_lex_with_flags): Use explicit locations.
5502
a79683d5
TS
55032015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5504
5505 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5506 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5507
61717a45
FXC
55082015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5509
5510 PR middle-end/36757
5511 * c-common.c (check_builtin_function_arguments): Add check
5512 for BUILT_IN_SIGNBIT argument.
5513
329524f5
PC
55142015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5515
5516 PR c++/67160
5517 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5518 in c++1z mode.
5519
4ee55665
MP
55202015-08-17 Marek Polacek <polacek@redhat.com>
5521
5522 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5523 with whitespaces before qualifier names.
5524
b893e375
MP
55252015-08-12 Marek Polacek <polacek@redhat.com>
5526
5527 PR c++/55095
5528 * c-common.c (maybe_warn_shift_overflow): Properly handle
5529 left-shifting 1 into the sign bit.
5530
c2d89095
MLI
55312015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5532
5533 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5534
971e17ff
AS
55352015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5536 Braden Obrzut <admin@maniacsvault.net>
5537 Jason Merrill <jason@redhat.com>
5538
5539 Add C++ Concepts TS support.
5540 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5541 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5542 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5543 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5544 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5545 * c.opt (fconcepts): New.
5546
b3d5bc62
JJ
55472015-08-02 Martin Sebor <msebor@redhat.com>
5548
5549 * c.opt (-Wframe-address): New warning option.
5550
8ebca419
PP
55512015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5552
5553 * c-indentation.c (should_warn_for_misleading_indentation):
5554 Improve heuristics.
5555
1a1e101f
PP
55562015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5557
5558 * c-indentation.c (get_visual_column): Add parameter first_nws,
5559 use it. Update comment documenting the function.
5560 (is_first_nonwhitespace_on_line): Remove.
5561 (should_warn_for_misleading_indentation): Replace usage of
5562 of is_first_nonwhitespace_on_line with get_visual_column.
5563
992118a1
PP
55642015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5565
5566 * c-indentation.h (struct token_indent_info): Define.
5567 (get_token_indent_info): Define.
5568 (warn_for_misleading_information): Declare.
5569 * c-common.h (warn_for_misleading_information): Remove.
5570 * c-identation.c (warn_for_misleading_indentation):
5571 Change declaration to take three token_indent_infos. Adjust
5572 accordingly.
5573 * c-identation.c (should_warn_for_misleading_indentation):
5574 Likewise. Bail out early if the body is a compound statement.
5575 (guard_tinfo_to_string): Define.
5576
e8fa3817
JM
55772015-07-30 Jason Merrill <jason@redhat.com>
5578
5579 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5580 '*' for reference decay.
5581
173864e8
MP
55822015-07-30 Marek Polacek <polacek@redhat.com>
5583
5584 * c-common.c (warn_tautological_cmp): Bail for float types.
5585
f2afe6dd
MP
55862015-07-27 Marek Polacek <polacek@redhat.com>
5587
5588 PR bootstrap/67030
5589 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5590
05b28fd6
MP
55912015-07-27 Marek Polacek <polacek@redhat.com>
5592
5593 PR c++/66555
5594 PR c/54979
5595 * c-common.c (find_array_ref_with_const_idx_r): New function.
5596 (warn_tautological_cmp): New function.
5597 * c-common.h (warn_tautological_cmp): Declare.
5598 * c.opt (Wtautological-compare): New option.
5599
5a5062b8
MP
56002015-07-23 Marek Polacek <polacek@redhat.com>
5601
5602 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5603 (ubsan_instrument_shift): Likewise.
5604
dc891fe7
MP
56052015-07-23 Marek Polacek <polacek@redhat.com>
5606
5607 PR sanitizer/66908
5608 * c-ubsan.c: Include gimplify.h.
5609 (ubsan_instrument_division): Unshare OP0 and OP1.
5610 (ubsan_instrument_shift): Likewise.
5611
451b5e48
MP
56122015-07-20 Marek Polacek <polacek@redhat.com>
5613 Richard Sandiford <richard.sandiford@arm.com>
5614
5615 PR c++/55095
5616 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5617 Use EXPR_LOC_OR_LOC.
5618 (maybe_warn_shift_overflow): New function.
5619 * c-common.h (maybe_warn_shift_overflow): Declare.
5620 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5621 * c.opt (Wshift-overflow): New option.
5622
fb0b2914
ML
56232015-07-16 Martin Liska <mliska@suse.cz>
5624
5625 * c-format.c (static void check_format_info_main): Use
5626 object_allocator instead of pool_allocator.
5627 (check_format_arg): Likewise.
5628 (check_format_info_main): Likewise.
5629
903f5c23
AM
56302015-07-15 Andrew MacLeod <amacleod@redhat.com>
5631
5632 * c-opts.c: Remove multiline #include comment.
5633
026c3cfd
AH
56342015-07-12 Aldy Hernandez <aldyh@redhat.com>
5635
5636 * c-common.c: Fix double word typos.
5637
bb49ee66
EB
56382015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5639
5640 * c-ada-spec.h (cpp_operation): Revert latest change.
5641 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5642 constructors and destructors.
5643
1916bcb5
AM
56442015-07-09 Andrew MacLeod <amacleod@redhat.com>
5645
5646 * c-common.h: Adjust includes for flags.h changes.
5647 * stub-objc.c: Likewise.
026c3cfd 5648
a9dcd529
EB
56492015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5650
5651 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5652 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5653
b03b462f
JJ
56542015-07-08 Jakub Jelinek <jakub@redhat.com>
5655
5656 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5657 are to be removed, return NULL rather than original clauses list.
5658
c7131fb2
AM
56592015-07-07 Andrew MacLeod <amacleod@redhat.com>
5660
5661 * array-notation-common.c: Adjust includes.
5662 * c-ada-spec.c: Likewise.
5663 * c-cilkplus.c: Likewise.
5664 * c-common.h: Likewise.
5665 * c-cppbuiltin.c: Likewise.
5666 * c-dump.c: Likewise.
5667 * c-format.c: Likewise.
5668 * c-gimplify.c: Likewise.
5669 * c-indentation.c: Likewise.
5670 * c-lex.c: Likewise.
5671 * c-omp.c: Likewise.
5672 * c-opts.c: Likewise.
5673 * c-pch.c: Likewise.
5674 * c-ppoutput.c: Likewise.
5675 * c-pragma.c: Likewise.
5676 * c-pretty-print.c: Likewise.
5677 * c-semantics.c: Likewise.
5678 * c-ubsan.c: Likewise.
5679 * cilk.c: Likewise.
5680 * stub-objc.c: Likewise.
5681
2a7fb83f
EB
56822015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5683
5684 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5685 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5686
a03c9bf1
JM
56872015-07-01 Jason Merrill <jason@redhat.com>
5688
36a85135
JM
5689 * c-common.h (D_CXX11): Rename from D_CXX0X.
5690 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5691 * c-common.c: Adjust.
5692
e7fa68d5
JM
5693 * c-opts.c (c_common_post_options): Default to C++14.
5694
a03c9bf1
JM
5695 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5696
fe95b036
ESR
56972015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5698
5699 Implement N4197 - Adding u8 character literals
b3d5bc62 5700 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5701 CPP_CHAR.
b3d5bc62 5702 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5703 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5704 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5705 and CPP_UTF8CHAR tokens.
5706 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5707
da2e71c9
MLI
57082015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5709
5710 PR fortran/66605
5711 * c-common.c (do_warn_unused_parameter): Move here.
5712 * c-common.h (do_warn_unused_parameter): Declare.
5713
b155cfd9
MP
57142015-06-29 Marek Polacek <polacek@redhat.com>
5715
5716 PR c/66322
5717 * c-common.c (check_case_bounds): Add bool * parameter. Set
5718 OUTSIDE_RANGE_P.
5719 (c_add_case_label): Add bool * parameter. Pass it down to
5720 check_case_bounds.
5721 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5722 warning here.
5723 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5724 declarations.
5725
31521951
MP
57262015-06-27 Marek Polacek <polacek@redhat.com>
5727
5728 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5729 or VECTOR_INTEGER_TYPE_P throughout.
5730 * c-gimplify.c: Likewise.
5731
22d03525
MP
57322015-06-26 Marek Polacek <polacek@redhat.com>
5733
5734 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5735 * c-common.c (c_fully_fold_internal): Likewise.
5736 (c_alignof_expr): Likewise.
5737 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5738 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5739 * cilk.c (create_parm_list): Likewise.
22d03525 5740
af05e6e5
MP
57412015-06-26 Marek Polacek <polacek@redhat.com>
5742
5743 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5744
f0889939
AM
57452015-06-25 Andrew MacLeod <amacleod@redhat.com>
5746
5747 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5748 * c-gimplify.c: Likewise.
5749 * c-pragma.c: Likewise.
5750 * c-ubsan.c: Likewise.
5751 * cilk.c: Likewise.
5752
ca752f39
RS
57532015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5754
5755 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5756 ggc_hasher.
5757
16a16ec7
AM
57582015-06-25 Andrew MacLeod <amacleod@redhat.com>
5759
5760 * cilk.c: Move calls.h after tm.h in the include chain.
5761
0ae9bd27
MP
57622015-06-25 Marek Polacek <polacek@redhat.com>
5763
5764 * array-notation-common.c: Use VAR_P throughout.
5765 * c-ada-spec.c: Likewise.
5766 * c-common.c: Likewise.
5767 * c-format.c: Likewise.
5768 * c-gimplify.c: Likewise.
5769 * c-omp.c: Likewise.
5770 * c-pragma.c: Likewise.
5771 * c-pretty-print.c: Likewise.
5772 * cilk.c: Likewise.
5773
62f9079a
MP
57742015-06-25 Marek Polacek <polacek@redhat.com>
5775
5776 * cilk.c (extract_free_variables): Use is_global_var.
5777
0fa16060
RS
57782015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5779
5780 * c-common.c: Don't include target-def.h.
5781
a68ae2e1
MP
57822015-06-23 Marek Polacek <polacek@redhat.com>
5783
5784 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5785 when comparing INTEGER_CSTs.
5786
c6a2f2d9
PMR
57872015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5788
5789 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5790 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5791 (dump_ada_template): Skip partially specialized types.
5792
6b4db501
MM
57932015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5794
5795 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5796 swapping.
5797
abb226c9
AM
57982015-06-17 Andrew MacLeod <amacleod@redhat.com>
5799
5800 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5801 * c-ada-spec.c: Likewise.
5802 * c-cilkplus.c: Likewise.
5803 * c-common.c: Likewise.
5804 * c-common.h: Likewise.
5805 * c-cppbuiltin.c: Likewise.
5806 * c-dump.c: Likewise.
5807 * c-format.c: Likewise.
5808 * c-gimplify.c: Likewise.
5809 * c-indentation.c: Likewise.
5810 * c-lex.c: Likewise.
5811 * c-omp.c: Likewise.
5812 * c-opts.c: Likewise.
5813 * c-pch.c: Likewise.
5814 * c-ppoutput.c: Likewise.
5815 * c-pragma.c: Likewise.
5816 * c-pretty-print.c: Likewise.
5817 * c-semantics.c: Likewise.
5818 * c-ubsan.c: Likewise.
5819 * cilk.c: Likewise.
5820 * stub-objc.c: Likewise.
5821
076fecad
PP
58222015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5823
5824 PR c++/65168
5825 * c-common.c (c_common_truthvalue_conversion): Warn when
5826 converting an address of a reference to a truth value.
5827
13fdf2e2
AM
58282015-06-08 Andrew MacLeod <amacleod@redhat.com>
5829
5830 * array-notation-common.c : Adjust include files.
5831 * c-ada-spec.c : Likewise.
5832 * c-cilkplus.c : Likewise.
5833 * c-common.c : Likewise.
5834 * c-common.h : Likewise.
5835 * c-cppbuiltin.c : Likewise.
5836 * c-dump.c : Likewise.
5837 * c-format.c : Likewise.
5838 * c-gimplify.c : Likewise.
5839 * c-indentation.c : Likewise.
5840 * c-lex.c : Likewise.
5841 * c-omp.c : Likewise.
5842 * c-opts.c : Likewise.
5843 * c-pch.c : Likewise.
5844 * c-ppoutput.c : Likewise.
5845 * c-pragma.c : Likewise.
5846 * c-pretty-print.c : Likewise.
5847 * c-semantics.c : Likewise.
5848 * c-ubsan.c : Likewise.
5849 * cilk.c : Likewise.
5850 * stub-objc.c : Likewise.
5851
a1661b90
MP
58522015-06-08 Marek Polacek <polacek@redhat.com>
5853
5854 PR c/66415
5855 * c-format.c (location_from_offset): Return LOC if LINE is null.
5856
d7438551
AH
58572015-06-05 Aldy Hernandez <aldyh@redhat.com>
5858
5859 * c-common.h (c_parse_final_cleanups): New prototype.
5860 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5861
b3d5bc62
JJ
58622015-06-04 Sriraman Tallam <tmsriram@google.com>
5863
5864 * c-common.c (noplt): New attribute.
5865 (handle_noplt_attribute): New handler.
5866
ecb9f223
AM
58672015-06-04 Andrew MacLeod <amacleod@redhat.com>
5868
5869 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5870 * c-ada-spec.c: Likewise.
5871 * c-cilkplus.c: Likewise.
5872 * c-common.c: Likewise.
5873 * c-common.h: Likewise.
5874 * c-cppbuiltin.c: Likewise.
5875 * c-dump.c: Likewise.
5876 * c-format.c: Likewise.
5877 * c-gimplify.c: Likewise.
5878 * c-indentation.c: Likewise.
5879 * c-lex.c: Likewise.
5880 * c-omp.c: Likewise.
5881 * c-opts.c: Likewise.
5882 * c-pch.c: Likewise.
5883 * c-ppoutput.c: Likewise.
5884 * c-pragma.c: Likewise.
5885 * c-pretty-print.c: Likewise.
5886 * c-semantics.c: Likewise.
5887 * c-ubsan.c: Likewise.
5888 * cilk.c: Likewise.
5889 * stub-objc.c: Likewise.
5890
6ac48155
DM
58912015-06-02 David Malcolm <dmalcolm@redhat.com>
5892
5893 PR c/66220:
5894 * c-indentation.c (should_warn_for_misleading_indentation): Use
5895 expand_location rather than expand_location_to_spelling_point.
5896 Don't warn if the guarding statement is more indented than the
5897 next/body stmts.
5898
773ce42e
DM
58992015-06-02 David Malcolm <dmalcolm@redhat.com>
5900
5901 * c-indentation.c (warn_for_misleading_indentation): Bail out
5902 immediately if -Wmisleading-indentation isn't enabled.
5903
4fef8379
ML
59042015-06-01 Martin Liska <mliska@suse.cz>
5905
5906 * c-format.c (check_format_arg):Use new type-based pool allocator.
5907 (check_format_info_main) Likewise.
5908
1edfb384
EB
59092015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5910
5911 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5912 (has_nontrivial_methods): Likewise.
5913
9677ef52
MP
59142015-05-25 Marek Polacek <polacek@redhat.com>
5915
5916 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5917
fd5c817a
MP
59182015-05-22 Marek Polacek <polacek@redhat.com>
5919
5920 PR c/47043
5921 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5922
a2f45fe6 59232015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5924
5925 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5926 STACK_GROWS_DOWNWARD.
5927
a2f45fe6 59282015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5929
5930 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5931 STACK_GROWS_DOWNWARD rather than if it is defined.
5932
0fee2ac2 59332015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5934
0fee2ac2
MLI
5935 PR c/52952
5936 * c-format.c (location_column_from_byte_offset): New.
5937 (location_from_offset): New.
5938 (struct format_wanted_type): Add offset_loc field.
5939 (check_format_info): Move handling of location for extra arguments
5940 closer to the point of warning.
5941 (check_format_info_main): Pass the result of location_from_offset
5942 to warning_at.
5943 (format_type_warning): Pass the result of location_from_offset
5944 to warning_at.
5945
cf4ef6f7
MP
59462015-05-20 Marek Polacek <polacek@redhat.com>
5947
5948 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5949
3a65ee74
MP
59502015-05-20 Marek Polacek <polacek@redhat.com>
5951
5952 * c-ada-spec.c (dump_sloc): Use DECL_P.
5953
21b634ae
MP
59542015-05-20 Marek Polacek <polacek@redhat.com>
5955
5956 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5957 * c-common.c: Likewise.
5958
0e50b624
DM
59592015-05-19 David Malcolm <dmalcolm@redhat.com>
5960
5961 * c-common.h (fe_file_change): Strengthen param from
5962 const line_map * to const line_map_ordinary *.
5963 (pp_file_change): Likewise.
5964 * c-lex.c (fe_file_change): Likewise.
5965 (cb_define): Use linemap_check_ordinary when invoking
5966 SOURCE_LINE.
5967 (cb_undef): Likewise.
5968 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5969 invoking cb_file_change.
5970 (c_finish_options): Likewise.
5971 (push_command_line_include): Likewise.
5972 (cb_file_change): Strengthen param "new_map" from
5973 const line_map * to const line_map_ordinary *.
5974 * c-ppoutput.c (cb_define): Likewise for local "map".
5975 (pp_file_change): Likewise for param "map" and local "from".
5976
fab27f52
MM
59772015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5978
5979 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5980
2fe1d762
TV
59812015-05-18 Tom de Vries <tom@codesourcery.com>
5982
5983 * c-common.c (build_va_arg_1): New function.
5984 (build_va_arg): Add address operator to va_list operand if necessary.
5985
7a37fa90
MM
59862015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5987
5988 PR c/48956
5989 * c-common.c (int_safely_convertible_to_real_p): Define.
5990 (unsafe_conversion_p): Check conversions involving complex types.
5991 (conversion_warning): Add new warning message for conversions which
5992 discard imaginary component.
5993 * c-common.h: (enum conversion_safety): Add new enumerator for such
5994 conversions.
5995
3aa3c9fc
MP
59962015-05-14 Marek Polacek <polacek@redhat.com>
5997
5998 PR c/66066
5999 PR c/66127
6000 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
6001 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
6002 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
6003 use it. If FOR_INT_CONST, require that all evaluated operands be
6004 INTEGER_CSTs.
6005
c3388e62
DM
60062015-05-12 David Malcolm <dmalcolm@redhat.com>
6007
6008 * c-common.h (warn_for_misleading_indentation): New prototype.
6009 * c-indentation.c: New file.
6010 * c.opt (Wmisleading-indentation): New option.
6011
c7b38fd5
TV
60122015-05-12 Tom de Vries <tom@codesourcery.com>
6013
6014 PR tree-optimization/66010
6015 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
6016
381bf11e
JM
60172015-05-09 Jason Merrill <jason@redhat.com>
6018
edff0c06
JM
6019 * c-opts.c (c_common_post_options): Also clear
6020 cpp_opts->cpp_warn_cxx11_compat.
6021
129211bc
JM
6022 * c-common.h (enum cxx_dialect): Add cxx_unset.
6023 * c-common.c (cxx_dialect): Initialize to cxx_unset.
6024 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
6025
381bf11e
JM
6026 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
6027 (std=gnu++0x): Mark as Undocumented.
6028 (std=gnu++1y): Add deprecated message.
6029
fe191308
JM
60302015-05-08 Jason Merrill <jason@redhat.com>
6031
765189ff
JM
6032 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
6033 * c-opts.c: Adjust.
6034
fe191308
JM
6035 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
6036
755e528f
MP
60372015-05-08 Marek Polacek <polacek@redhat.com>
6038
6039 PR c/64918
6040 * c.opt (Woverride-init-side-effects): New option.
6041
0173bd2a
MP
60422015-05-07 Marek Polacek <polacek@redhat.com>
6043
6044 PR c/65179
6045 * c-common.c (c_fully_fold_internal): Warn when left shifting a
6046 negative value.
6047 * c.opt (Wshift-negative-value): New option.
6048 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6049 when -Wextra and C99/C++11 mode.
6050
e0f0d3b9
MP
60512015-05-07 Marek Polacek <polacek@redhat.com>
6052 Martin Uecker <uecker@eecs.berkeley.edu>
6053
6054 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6055 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6056
8243e2a9
JM
60572015-05-05 Jason Merrill <jason@redhat.com>
6058
6059 * c.opt (Wterminate): New.
6060
577cd070
MP
60612015-04-30 Marek Polacek <polacek@redhat.com>
6062
6063 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6064 require that the non-constant be of a boolean type.
6065
0373796b
JT
60662015-04-29 Josh Triplett <josh@joshtriplett.org>
6067
e0f0d3b9
MP
6068 * c-common.c (handle_section_attribute): Refactor to reduce
6069 nesting and distinguish between error cases.
0373796b 6070
716c0ba6
MP
60712015-04-29 Marek Polacek <polacek@redhat.com>
6072
6073 PR c/64610
6074 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6075 with 0/1.
6076
8848828b
JJ
60772015-04-29 Jakub Jelinek <jakub@redhat.com>
6078
6079 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6080 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6081 HOST_BITS_PER_WIDE_INT.
6082
ecd0e562
TV
60832015-04-28 Tom de Vries <tom@codesourcery.com>
6084
6085 PR tree-optimization/65887
6086 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6087
2a877204 60882015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6089 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6090
6091 * c-ada-spec.c (in_function): Delete.
6092 (dump_generic_ada_node): Do not change in_function and remove the
6093 redundant code dealing with it.
6094 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6095 (print_ada_methods): Output the static member functions in a nested
6096 package after the regular methods as well as associated renamings.
6097
4853031e
MP
60982015-04-24 Marek Polacek <polacek@redhat.com>
6099
6100 PR c/65830
6101 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6102 and OPT_Wshift_count_overflow.
6103
8c2b7f79
MP
6104 PR c/63357
6105 * c-common.c (warn_logical_operator): Warn if the operands have the
6106 same expressions.
6107
b8787813
MP
61082015-04-24 Marek Polacek <polacek@redhat.com>
6109
6110 PR c/61534
6111 * c-common.c (warn_logical_operator): Bail if either operand comes
6112 from a macro expansion.
6113
8fba1830
BRF
61142015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6115
6116 PR target/55143
6117 * c-common.c (c_default_pointer_mode): Add definition.
6118 * c-common.h (c_default_pointer_mode): Add declaration.
6119
17958621
JJ
61202015-03-11 Jakub Jelinek <jakub@redhat.com>
6121
6122 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6123 on record_builtin_type argument.
6124
7ccb1a11
JJ
61252015-03-10 Jakub Jelinek <jakub@redhat.com>
6126
6127 PR c/65120
6128 * c-common.c (warn_logical_not_parentheses): Don't warn for
6129 !x == 0 or !x != 0.
6130
04fd785e
MP
61312015-03-07 Marek Polacek <polacek@redhat.com>
6132
6133 PR sanitizer/65280
6134 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6135 before trying to figure out whether we have a flexible array member.
6136
a4e26206 61372015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6138 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6139
6140 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6141
0d2489f4
EB
61422015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6143
6144 PR ada/65319
6145 * c-ada-spec.c (print_destructor): Remove obsolete code.
6146
83ed54d7
EB
61472015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6148
6149 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6150 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6151 DECL_TEMPLATE_RESULT emulations.
6152 (dump_ada_template)): Add guard for TYPE_METHODS.
6153
7631f0e2
MP
61542015-02-27 Marek Polacek <polacek@redhat.com>
6155
6156 PR c/65040
6157 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6158
d1783ae5
KT
61592015-02-27 Kai Tietz <ktietz@redhat.com>
6160
6161 PR c/35330
6162 * c-pragma.c (handle_pragma_weak): Do not try to create
6163 weak/alias of declarations not being function, or variable
6164 declarations.
6165
56a9f6bc
TS
61662015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6167
6168 PR libgomp/64625
6169 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6170 Remove macros.
6171 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6172
3d5cb23d
MP
61732015-02-16 Marek Polacek <polacek@redhat.com>
6174
6175 PR c/65066
6176 * c-format.c (check_format_types): Handle null param.
6177
fa008882
MP
61782015-02-13 Marek Polacek <polacek@redhat.com>
6179
6180 PR c/65040
6181 * c-format.c (check_format_types): Don't warn about different
6182 signedness if the original value is in the range of WANTED_TYPE.
6183
785f21af
JM
61842015-02-12 Jason Merrill <jason@redhat.com>
6185
6186 PR c++/64956
6187 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6188 to the current highest version.
6189 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6190
4886ec8e
JJ
61912015-02-04 Jakub Jelinek <jakub@redhat.com>
6192
6193 PR c/64824
6194 PR c/64868
6195 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6196 instead of RDIV_EXPR. Use build_binary_op instead of
6197 build2_loc.
6198
40fecdd6
JM
61992015-01-30 Joseph Myers <joseph@codesourcery.com>
6200
6201 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6202 to pass input_location as first argument.
6203
a0c88d06
TV
62042015-01-23 Tom de Vries <tom@codesourcery.com>
6205
6206 PR libgomp/64672
6207 * c.opt (fopenacc): Mark as LTO option.
6208
1506ae0e
TV
62092015-01-23 Tom de Vries <tom@codesourcery.com>
6210
6211 PR libgomp/64707
6212 * c.opt (fopenmp): Mark as LTO option.
6213
31be63ab
JJ
62142015-01-21 Jakub Jelinek <jakub@redhat.com>
6215
6216 PR c/63307
b1726d6c 6217 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6218 (compare_decls): Fix up formatting.
6219
62202015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6221
6222 PR c/63307
6223 * cilk.c: Include vec.h.
6224 (struct cilk_decls): New structure.
6225 (wrapper_parm_cb): Split this function to...
6226 (fill_decls_vec): ...this...
6227 (create_parm_list): ...and this.
6228 (compare_decls): New function.
6229 (for_local_cb): Remove.
6230 (wrapper_local_cb): Ditto.
6231 (build_wrapper_type): For now first traverse and fill vector of
6232 declarations then sort it and then deal with sorted vector.
6233 (cilk_outline): Ditto.
6234 (declare_one_free_variable): Ditto.
6235
6875457f
JM
62362015-01-21 Jason Merrill <jason@redhat.com>
6237
6238 PR c++/64629
6239 * c-format.c (check_format_arg): Call decl_constant_value.
6240
185c9e56
ML
62412015-01-19 Martin Liska <mliska@suse.cz>
6242
6243 * c-common.c (handle_noicf_attribute): New function.
6244
41dbbb37
TS
62452015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6246 Bernd Schmidt <bernds@codesourcery.com>
6247 James Norris <jnorris@codesourcery.com>
6248 Cesar Philippidis <cesar@codesourcery.com>
6249 Ilmir Usmanov <i.usmanov@samsung.com>
6250 Jakub Jelinek <jakub@redhat.com>
6251
6252 * c.opt (fopenacc): New option.
6253 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6254 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6255 New macros.
6256 * c-common.h (c_finish_oacc_wait): New prototype.
6257 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6258 (c_finish_oacc_wait): New function.
6259 * c-pragma.c (oacc_pragmas): New variable.
6260 (c_pp_lookup_pragma, init_pragma): Handle it.
6261 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6262 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6263 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6264 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6265 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6266 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6267 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6268 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6269 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6270 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6271 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6272 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6273 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6274 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6275 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6276 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6277 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6278 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6279 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6280 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6281 PRAGMA_OACC_CLAUSE_WORKER.
6282
3f8257db 62832015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6284
6285 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6286 for the new option fstack-protector_explicit.
6287 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6288 (handle_stack_protect_attribute): New function.
6289
3f8257db 62902015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6291
6292 * c.opt: New option -Warray-bounds=.
6293
adfac8df
JJ
62942015-01-09 Michael Collison <michael.collison@linaro.org>
6295
6296 * array-notation-common.c: Include hash-set.h, machmode.h,
6297 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6298 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6299 * c-ada-spec.c: Ditto.
6300 * c-cilkplus.c: Ditto.
6301 * c-common.c: Include input.h due to flattening of tree.h.
6302 Define macro GCC_C_COMMON_C.
6303 * c-common.h: Flatten tree.h header files into c-common.h.
6304 Remove include of tree-core.h.
6305 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6306 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6307 fold-const.h, wide-int.h, and inchash.h due to
6308 flattening of tree.h.
6309 * c-dump.c: Ditto.
6310 * c-format.c: Flatten tree.h header files into c-common.h.
6311 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6312 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6313 fold-const.h, wide-int.h, and inchash.h due to
6314 flattening of tree.h.
6315 * c-dump.c: Include hash-set.h, machmode.h,
6316 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6317 fold-const.h, wide-int.h, and inchash.h due to
6318 flattening of tree.h.
6319 * c-format.c: Include hash-set.h, machmode.h,
6320 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6321 fold-const.h, wide-int.h, inchash.h and real.h due to
6322 flattening of tree.h.
6323 * c-gimplify.c: Include hash-set.h, machmode.h,
6324 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6325 fold-const.h, wide-int.h, and inchash.h due to
6326 flattening of tree.h.
6327 * cilk.c: Ditto.
6328 * c-lex.c: Ditto.
6329 * c-omp.c: Ditto.
6330 * c-opts.c: Ditto.
6331 * c-pch.c: Ditto.
6332 * c-ppoutput.c: Ditto.
6333 * c-pragma.c: Ditto.
6334 * c-pretty-print.c: Ditto.
6335 * c-semantics.c: Ditto.
6336 * c-ubsan.c: Ditto.
6337 * stub-objc.c: Ditto.
6338
f5481fc4
JM
63392015-01-08 Jason Merrill <jason@redhat.com>
6340
6341 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6342 do_ubsan_in_current_function.
6343 (ubsan_maybe_instrument_reference_or_call): Likewise.
6344 * c-ubsan.h: Declare it.
6345
de35aa66
MS
63462015-01-08 Mike Stump <mikestump@comcast.net>
6347
6348 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6349
4a9a42ab
MP
63502015-01-07 Marek Polacek <polacek@redhat.com>
6351
6352 PR c/64440
6353 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6354 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6355
2f42e5de
TS
63562015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6357
6358 PR c++/31397
6359 * c.opt (Wsuggest-override): New option.
6360
5624e564
JJ
63612015-01-05 Jakub Jelinek <jakub@redhat.com>
6362
6363 Update copyright years.
6364
5bd012f8
MP
63652015-01-05 Marek Polacek <polacek@redhat.com>
6366
6367 PR c/64423
6368 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6369 parameter. Use it.
6370 * c-common.h (warn_array_subscript_with_type_char): Update
6371 declaration.
6372
a7fa8d18
ESR
63732014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6374
6375 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6376 Control macro with flag_sized_deallocation.
6377
3f8257db 63782014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6379
6380 * c.opt (Wdiscarded-array-qualifiers): New option.
6381
1f8d3e84
JJ
63822014-12-19 Jakub Jelinek <jakub@redhat.com>
6383
6384 PR preprocessor/63831
6385 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6386 and __has_cpp_attribute here.
6387 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6388 c_common_has_attribute.
6389 * c-common.h (c_common_has_attribute): New prototype.
6390 * c-lex.c (init_c_lex): Set cb->has_attribute to
6391 c_common_has_attribute instead of cb_has_attribute.
6392 (get_token_no_padding): New function.
6393 (cb_has_attribute): Renamed to ...
6394 (c_common_has_attribute): ... this. No longer static. Use
6395 get_token_no_padding, require ()s, don't build TREE_LIST
6396 unnecessarily, fix up formatting, adjust diagnostics, call
6397 init_attributes.
6398
20b06add
JM
63992014-12-15 Jason Merrill <jason@redhat.com>
6400
6401 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6402 (-Wsized-deallocation): New.
6403 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6404 to on in C++14 and up.
6405
94a073b2
JM
64062014-12-11 Jason Merrill <jason@redhat.com>
6407
acaa5911
JM
6408 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6409
94a073b2
JM
6410 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6411 we aren't complaining about VLAs.
6412
7fb66c15
MP
64132014-12-06 Marek Polacek <polacek@redhat.com>
6414
6415 PR tree-optimization/64183
6416 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6417 shift-expression if it is integer_type_node. Use types_compatible_p.
6418
b731b390
JJ
64192014-11-29 Jakub Jelinek <jakub@redhat.com>
6420
6421 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6422 last argument from create_tmp_var_raw and create_tmp_var calls.
6423 * cilk.c (gimplify_cilk_spawn): Likewise.
6424 * c-omp.c (c_finish_omp_atomic): Likewise.
6425
6a4da643
MP
64262014-11-28 Marek Polacek <polacek@redhat.com>
6427
6428 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6429 instead of unsigned_type_node.
6430
541e35a6
MP
64312014-11-28 Marek Polacek <polacek@redhat.com>
6432
6433 PR c/63862
6434 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6435 to op1_utype.
6436 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6437 expression to unsigned_type_node.
6438
dcc97066
MW
64392014-11-20 Mark Wielaard <mjw@redhat.com>
6440
6441 PR debug/38757
6442 * c-opts.c (set_std_c89): Set lang_hooks.name.
6443 (set_std_c99): Likewise.
6444 (set_std_c11): Likewise.
6445 (set_std_cxx98): Likewise.
6446 (set_std_cxx11): Likewise.
6447 (set_std_cxx14): Likewise.
6448 (set_std_cxx1z): Likewise.
6449
aa7da51a
JJ
64502014-11-21 Jakub Jelinek <jakub@redhat.com>
6451
6452 PR target/63764
6453 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6454 return type to bool.
009a3480 6455 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6456 (convert_vector_to_pointer_for_subscript): Change return type to
6457 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6458 and copy it into a TARGET_EXPR and use that instead of *vecp
6459 directly.
6460
538dd0b7
DM
64612014-11-19 David Malcolm <dmalcolm@redhat.com>
6462
6463 Merger of git branch "gimple-classes-v2-option-3".
6464 * ChangeLog.gimple-classes: New.
6465 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6466 from being just a vec<gimple> to a vec<gbind *>.
6467
c39a5e99
JJ
64682014-11-18 Jakub Jelinek <jakub@redhat.com>
6469
6470 PR sanitizer/63813
6471 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6472 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6473 get_pointer_alignment for non-pointers. Use ptype, or if it is
6474 reference type, corresponding pointer type, as type of kind
6475 argument.
6476 (ubsan_maybe_instrument_reference,
6477 ubsan_maybe_instrument_member_call): Adjust callers.
6478
8537a4a9
MP
64792014-11-15 Marek Polacek <polacek@redhat.com>
6480
6481 PR middle-end/63884
6482 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6483 for NULL fndecl.
6484 (extract_array_notation_exprs): Return for NULL node.
6485
2079956a
JM
64862014-11-12 Joseph Myers <joseph@codesourcery.com>
6487
6488 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6489 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6490
1304953e
JJ
64912014-11-12 Jakub Jelinek <jakub@redhat.com>
6492
6493 PR c/59708
6494 * c-common.c (check_builtin_function_arguments): Handle
6495 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6496
e5e44252
AK
64972014-11-10 Andi Kleen <ak@linux.intel.com>
6498
6499 PR c/60804
6500 * c-common.h (check_no_cilk): Declare.
6501 * cilk.c (get_error_location): New function.
6502 (check_no_cilk): Dito.
6503
e64b984d
AK
65042014-11-10 Andi Kleen <ak@linux.intel.com>
6505
6506 * cilk.c (recognize_spawn): Use expression location
6507 for error message.
6508
13c21655
PC
65092014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6510
6511 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6512
42fd12b1
ESR
65132014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6514
6515 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6516 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6517 (__cpp_range_based_for, __cpp_initializer_lists,
6518 __cpp_delegating_constructors, __cpp_nsdmi,
6519 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6520 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6521 __has_cpp_attribute.
6522 * c-lex.c (cb_has_attribute): New callback CPP function;
6523 (init_c_lex): Set has_attribute callback.
6524
6f450181
RB
65252014-11-04 Richard Biener <rguenther@suse.de>
6526
6527 * c-common.c (shorten_compare): Do not shorten mixed
6528 DFP and non-DFP compares.
6529
26f0e1d6
ESR
65302014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6531
6532 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6533 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6534 Commentary and rearrangement of tests.
6535 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6536 Commentary and rearrangement of tests.
ab20d992 6537 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6538 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6539
ef4bddc2
RS
65402014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6541
6542 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6543 enum from machine_mode.
6544
c582198b
AM
65452014-10-28 Andrew MacLeod <amacleod@redhat.com>
6546
adfac8df
JJ
6547 * c-common.c: Adjust include files.
6548 * c-gimplify.c: Ditto.
6549 * cilk.c: Ditto.
6550 * c-pragma.c: Ditto.
6551 * c-ubsan.c: Ditto.
c582198b 6552
60393bbc
AM
65532014-10-27 Andrew MacLeod <amacleod@redhat.com>
6554
6555 * c-gimplify.c: Adjust include files.
6556
d723bb7c
MLI
65572014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6558
6559 PR c++/53061
6560 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6561 c_common_initialize_diagnostics.
6562 * c-common.h: Likewise.
6563
90f3520e
MP
65642014-10-24 Marek Polacek <polacek@redhat.com>
6565
6566 PR c/56980
6567 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6568 print "struct"/"union"/"enum" for typedefed names.
6569
59d7607a
MP
65702014-10-23 Marek Polacek <polacek@redhat.com>
6571
6572 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6573 in unsigned type.
6574
d95a2703
JJ
65752014-10-22 Jakub Jelinek <jakub@redhat.com>
6576 Yury Gribov <y.gribov@samsung.com>
6577
6578 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6579 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6580 instead of flag_sanitize_recover as bool flag.
6581
8e6ef852
KY
65822014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6583
6584 * cilk.c: Revert previous change.
6585
948cf550
IZ
65862014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6587
6588 PR c/63307
6589 * cilk.c: Include vec.h.
6590 (struct cilk_decls): New structure.
6591 (wrapper_parm_cb): Split this function to...
6592 (fill_decls_vec): ...this...
6593 (create_parm_list): ...and this.
6594 (compare_decls): New function.
6595 (for_local_cb): Remove.
6596 (wrapper_local_cb): Ditto.
6597 (build_wrapper_type): For now first traverse and fill vector of
6598 declarations then sort it and then deal with sorted vector.
6599 (cilk_outline): Ditto.
6600 (declare_one_free_variable): Ditto.
6601
92574c7c
MP
66022014-10-17 Marek Polacek <polacek@redhat.com>
6603
6604 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6605 * c.opt (Wimplicit-int): Initialize to -1.
6606
83685514
AM
66072014-10-16 Andrew MacLeod <amacleod@redhat.com>
6608
6609 * c-pragma.c: Adjust include files.
6610 * c-semantics.c: Likewise.
6611
5b8300ea
DD
66122014-10-16 DJ Delorie <dj@redhat.com>
6613
6614 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6615 multiples of bytes.
6616
5f83e90b
JM
66172014-10-14 Jason Merrill <jason@redhat.com>
6618
6619 PR c++/63455
6620 * c-common.h (CPP_PREPARSED_EXPR): New.
6621 (N_CP_TTYPES): Adjust.
6622
d73326ca
MP
66232014-10-15 Marek Polacek <polacek@redhat.com>
6624
6625 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6626
78a7c317
DD
66272014-10-14 DJ Delorie <dj@redhat.com>
6628
6629 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6630 types, not just __int128.
6631 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6632 types, not just __int128.
6633 (cpp_atomic_builtins): Round pointer sizes up.
6634 (type_suffix): Use type precision, not specific types.
6635 * c-common.c (c_common_reswords): Remove __int128 special case.
6636 (c_common_type_for_size): Check for all __intN types, not just
6637 __int128.
6638 (c_common_type_for_mode): Likewise.
6639 (c_common_signed_or_unsigned_type): Likewise.
6640 (c_build_bitfield_integer_type): Likewise.
6641 (c_common_nodes_and_builtins): Likewise.
6642 (keyword_begins_type_specifier): Likewise.
6643 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6644 __intN variants.
6645
2a22f99c
TS
66462014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6647
6648 * c-common.c: Use hash_table instead of hashtab.
6649
2a8ef767
ESR
66502014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6651
adfac8df 6652 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6653 C++11 section.
6654
3c9aabbd
MG
66552014-10-03 Marc Glisse <marc.glisse@inria.fr>
6656
6657 PR c++/54427
6658 PR c++/57198
6659 PR c++/58845
6660 * c-common.c (warn_logical_operator): Punt for vectors.
6661
a15f7cb8
ESR
66622014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6663
6664 Implement SD-6: SG10 Feature Test Recommendations
6665 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6666 macros and the __has_header macro.
6667
8d0cf15e
JM
66682014-09-30 Jason Merrill <jason@redhat.com>
6669
dd5d5481
JM
6670 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6671 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6672 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6673
b752325e
JM
6674 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6675 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6676
8d0cf15e
JM
6677 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6678 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6679
083e891e
MP
66802014-09-24 Marek Polacek <polacek@redhat.com>
6681
6682 PR c/61405
6683 PR c/53874
6684 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6685
7861b648
AK
66862014-09-23 Andi Kleen <ak@linux.intel.com>
6687
6688 * c-common.c (handle_no_reorder_attribute): New function.
6689 (c_common_attribute_table): Add no_reorder attribute.
6690
9a79452d
JM
66912014-09-22 Joseph Myers <joseph@codesourcery.com>
6692
6693 * c-cppbuiltin.c (c_cpp_builtins): Define
6694 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6695 modes.
6696
dd69f047
JM
66972014-09-18 Joseph Myers <joseph@codesourcery.com>
6698
6699 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6700 for supported floating-point modes.
6701
737a4826
MLI
67022014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6703
6704 * c.opt (Wpsabi): Use LangEnabledBy.
6705 * c-opts.c (c_common_handle_option): Do not handle here.
6706
8cc4b7a2
JM
67072014-09-12 Joseph Myers <joseph@codesourcery.com>
6708
6709 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6710 macros for floating-point modes.
6711
179b5a55
MG
67122014-09-11 Marc Glisse <marc.glisse@inria.fr>
6713
6714 PR target/58757
6715 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6716 __*_DENORM_MIN__ without denormals.
6717
570a11fe
JJ
67182014-09-10 Jakub Jelinek <jakub@redhat.com>
6719
6720 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6721 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6722 ubsan_create_data callers.
6723 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6724 index is constant or BIT_AND_EXPR with constant mask and is
6725 small enough for the bound.
6726 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6727 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6728
b559c810
MLI
67292014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6730
6731 * c.opt: Add CppReason to various flags.
6732 (Wdate-time): Re-sort.
6733 * c-common.c: Include c-common.h earlier.
6734 (struct reason_option_codes_t): Delete.
6735 (c_option_controlling_cpp_error): Prefix global type and struct
6736 with cpp_.
6737
1ef33fd4
MLI
67382014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6739
6740 * c.opt (Wnormalized): New.
6741 (Wnormalized=): Use Enum and Reject Negative.
6742 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6743
66bb34c0
JM
67442014-09-08 Joseph Myers <joseph@codesourcery.com>
6745
6746 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6747 digits of floating-point modes if -fbuilding-libgcc.
6748
53d68b9f
JM
67492014-09-05 Joseph Myers <joseph@codesourcery.com>
6750
6751 * c-cppbuiltin.c (c_cpp_builtins): Also define
6752 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6753 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6754 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6755 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6756 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6757 __LIBGCC_STACK_GROWS_DOWNWARD__,
6758 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6759 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6760 __LIBGCC_DWARF_FRAME_REGISTERS__,
6761 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6762 __LIBGCC_STACK_POINTER_REGNUM__ and
6763 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6764 (builtin_define_with_value): Handle backslash-escaping in string
6765 macro values.
6766
f65586dc
RB
67672014-09-05 Richard Biener <rguenther@suse.de>
6768
6769 PR middle-end/63148
6770 * c-format.c (check_format_arg): Properly handle
6771 effectively signed POINTER_PLUS_EXPR offset.
6772
2b71f4a4
MLI
67732014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6774
6775 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6776 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6777 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6778 and Init.
6779 * c-opts.c (c_common_handle_option): Do not handle here.
6780 (sanitize_cpp_opts): Likewise.
6781 * c-common.c (struct reason_option_codes_t): Handle
6782 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6783
d2e4feca
MP
67842014-09-03 Marek Polacek <polacek@redhat.com>
6785
6786 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6787
9a771876
JJ
67882014-09-02 Jakub Jelinek <jakub@redhat.com>
6789 Balaji V. Iyer <balaji.v.iyer@intel.com>
6790 Igor Zamyatin <igor.zamyatin@intel.com>
6791
6792 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6793 * c-common.c (c_common_reswords): Added _Cilk_for.
6794 * c-common.h (enum rid): Added RID_CILK_FOR.
6795 (cilk_for_number_of_iterations): Add declaration.
6796 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6797 CILK_FOR.
6798 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6799 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6800
81b5d104
MLI
68012014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6802
6803 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6804 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6805 Wundef): Use CPP, Var and Init.
6806 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6807
b753b37b
MLI
68082014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6809
6810 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6811 * c-opts.c (c_common_handle_option): Do not handle here.
6812
028aee17
JM
68132014-08-25 Jason Merrill <jason@redhat.com>
6814
6815 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6816 -std=c++14 and -std=gnu++14, rather than the reverse.
6817 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6818 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6819 * c-common.h (cxx_dialect): Remove cxx1y.
6820
e4276ba5
ESR
68212014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6822
6823 * c-common.h (enum cxx_dialect): Add cxx14.
6824 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6825 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6826 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6827
a545cacd
JM
68282014-08-22 Jason Merrill <jason@redhat.com>
6829
6830 * c.opt (std=gnu++17): Fix alias.
6831
59ea0364
MP
68322014-08-22 Marek Polacek <polacek@redhat.com>
6833
6834 PR c++/62199
6835 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6836 check for vector types. Drop LHS argument.
6837 * c-common.h (warn_logical_not_parentheses): Adjust.
6838
596e808c
MLI
68392014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6840
6841 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6842 (Wmultichar): Likewise.
6843 (Wdate-time): Use C-family languages instead of Common. Use CPP
6844 and Var.
6845 * c-opts.c (c_common_handle_option): Do not handle the above
6846 options here.
6847 (sanitize_cpp_opts): Likewise.
6848
18767f65
MLI
68492014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6850
6851 PR fortran/44054
6852 * c-opts.c: Include tree-diagnostics.h.
6853 (c_diagnostic_finalizer): New.
6854 (c_common_initialize_diagnostics): Use it.
6855
b4413594
MLI
68562014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6857
6858 PR preprocessor/51303
6859 * c-common.c (struct reason_option_codes_t option_codes):
6860 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6861
43f9a13c
MLI
68622014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6863
6864 PR c/60975
6865 PR c/53063
6866 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6867 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6868 (c_common_post_options): Call init_global_opts_from_cpp.
6869 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6870
04159acf
MP
68712014-08-19 Marek Polacek <polacek@redhat.com>
6872
6873 PR c++/62153
6874 * c-common.c (maybe_warn_bool_compare): New function.
6875 * c-common.h (maybe_warn_bool_compare): Declare.
6876 * c.opt (Wbool-compare): New option.
6877
35aff4fb
MP
68782014-08-19 Marek Polacek <polacek@redhat.com>
6879
6880 * c.opt (Wc99-c11-compat): New option.
6881
177cce46
MP
68822014-08-19 Marek Polacek <polacek@redhat.com>
6883
6884 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6885 to warn_c90_c99_compat.
6886 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6887 to -1.
6888
6ae9194f
MLI
68892014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6890 Steven Bosscher <steven@gcc.gnu.org>
6891
6892 PR c/52952
6893 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6894 format_check_results.
6895 (check_function_format): Use true and add comment for boolean
6896 argument.
6897 (finish_dollar_format_checking): Use explicit location when warning.
6898 (check_format_info): Likewise.
6899 (check_format_arg): Set extra_arg_loc and format_string_loc.
6900 (check_format_info_main): Use explicit location when warning.
6901 (check_format_types): Pass explicit location.
6902 (format_type_warning): Likewise.
6903
8e54f6d3
MLI
69042014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6905
6906 PR fortran/44054
6907 * c-format.c: Handle Fortran flags.
6908
cd4e76fc
IZ
69092014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6910
6911 PR other/61962
6912 * array-notation-common.c (find_rank): Added handling for other
6913 types of references.
6914
f3bede71
MP
69152014-08-10 Marek Polacek <polacek@redhat.com>
6916
6917 PR c/51849
6918 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6919 * c.opt (Wc90-c99-compat): Add option.
6920
9f25a338
TS
69212014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6922
6923 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6924
62e4eb35
MP
69252014-08-03 Marek Polacek <polacek@redhat.com>
6926
ab20d992 6927 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6928 (c_add_case_label): Pass loc to check_case_value.
6929
b787e7a2
TS
69302014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6931
6932 * cilk.c: Use hash_map instead of pointer_map.
6933
6e2830c3
TS
69342014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6935
6936 * c-gimplify.c: Use hash_set instead of pointer_set.
6937
a7ee52fb
IZ
69382014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6939
6940 PR middle-end/61455
6941 * array-notation-common.c (extract_array_notation_exprs): Handling
6942 of DECL_EXPR added.
6943
944fa280
JJ
69442014-08-01 Jakub Jelinek <jakub@redhat.com>
6945
6946 * c-common.h (min_align_of_type): Removed prototype.
6947 * c-common.c (min_align_of_type): Removed.
6948 * c-ubsan.h (ubsan_maybe_instrument_reference,
6949 ubsan_maybe_instrument_member_call): New prototypes.
6950 * c-ubsan.c: Include stor-layout.h and builtins.h.
6951 (ubsan_maybe_instrument_reference_or_call,
6952 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6953 functions.
6954
b4dfdc11
MG
69552014-07-31 Marc Glisse <marc.glisse@inria.fr>
6956
6957 PR c++/60517
6958 * c.opt (-Wreturn-local-addr): Move to common.opt.
6959
a41844e5
JM
69602014-07-30 Jason Merrill <jason@redhat.com>
6961
6962 PR c++/61659
6963 PR c++/61687
6964 Revert:
6965 * c.opt (-fuse-all-virtuals): New.
6966
976d5a22
TT
69672014-07-30 Tom Tromey <tromey@redhat.com>
6968
6969 PR c/59855
6970 * c.opt (Wdesignated-init): New option.
6971 * c-common.c (c_common_attribute_table): Add "designated_init".
6972 (handle_designated_init): New function.
6973
cdc94aca
MP
69742014-07-24 Marek Polacek <polacek@redhat.com>
6975
6976 PR c/57653
6977 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6978
f41373b6
DS
69792014-07-16 Dodji Seketeli <dodji@redhat.com>
6980
6981 PR preprocessor/60723 - missing system-ness marks for macro tokens
6982 * c-ppoutput.c (struct print::prev_was_system_token): New data
6983 member.
6984 (init_pp_output): Initialize it.
6985 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6986 (do_line_change): Return a flag saying if a line marker was
6987 emitted or not.
6988 (scan_translation_unit): Detect if the system-ness of the token we
6989 are about to emit is different from the one of the previously
6990 emitted token. If so, emit a line marker. Avoid emitting useless
6991 adjacent line markers. Avoid emitting line markers for tokens
6992 originating from the expansion of built-in macros.
6993 (scan_translation_unit_directives_only): Adjust.
6994
4d661eaa
MP
69952014-07-15 Marek Polacek <polacek@redhat.com>
6996
6997 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6998 TYPE_MAX_VALUE is NULL.
6999
b108f48f
JJ
70002014-07-14 Jakub Jelinek <jakub@redhat.com>
7001
7002 PR middle-end/61294
7003 * c.opt (Wmemset-transposed-args): New warning.
7004
c0221884
JM
70052014-07-10 Jason Merrill <jason@redhat.com>
7006
7007 PR c++/61659
7008 PR c++/61687
7009 * c.opt (-fuse-all-virtuals): New.
7010
63dfbb95
RB
70112014-07-09 Richard Biener <rguenther@suse.de>
7012
7013 PR c-family/61741
7014 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
7015 using unsigned arithmetic if overflow does not wrap instead of
7016 if overflow is undefined.
7017
773ec47f
MP
70182014-07-06 Marek Polacek <polacek@redhat.com>
7019
7020 PR c/6940
7021 * c.opt (Wsizeof-array-argument): New option.
7022
00a7ba58
JJ
70232014-07-03 Jakub Jelinek <jakub@redhat.com>
7024
b1726d6c 7025 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
7026 comments->count <= 1, as comments->entries might be NULL.
7027
52ec0ea3
MP
70282014-07-01 Marek Polacek <polacek@redhat.com>
7029
7030 * c.opt (Wint-conversion): New option.
7031
d5c3d343
MP
70322014-07-01 Marek Polacek <polacek@redhat.com>
7033
7034 PR c/58286
7035 * c.opt (Wincompatible-pointer-types): New option.
7036
6e7ceb17
PC
70372014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
7038
7039 PR c++/51400
7040 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
7041 Do not discard TYPE_QUALS of type.
7042
da73100b
JM
70432014-06-26 Jason Merrill <jason@redhat.com>
7044
7045 * c-common.h (enum cxx_dialect): Add cxx1z.
7046 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
7047 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7048
08eedf75
TJ
70492014-06-26 Teresa Johnson <tejohnson@google.com>
7050
7051 * c-common.h (get_dump_info): Declare.
7052 * c-gimplify.c (c_genericize): Use saved dump files.
7053 * c-opts.c (c_common_parse_file): Begin and end dumps
7054 once around parsing invocation.
7055 (get_dump_info): New function.
7056
7b56b2f8
MP
70572014-06-23 Marek Polacek <polacek@redhat.com>
7058 Andrew MacLeod <amacleod@redhat.com>
7059
7060 PR c/61553
7061 * c-common.c (get_atomic_generic_size): Don't segfault if the
7062 type doesn't have a size.
7063
0e37a2f3
MP
70642014-06-20 Marek Polacek <polacek@redhat.com>
7065
7066 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7067 (ubsan_walk_array_refs_r): New function.
7068 (c_genericize): Instrument array bounds.
7069 * c-ubsan.c: Include "internal-fn.h".
7070 (ubsan_instrument_division): Mark instrumented arrays as having
7071 side effects. Adjust ubsan_type_descriptor call.
7072 (ubsan_instrument_shift): Likewise.
7073 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7074 (ubsan_instrument_bounds): New function.
7075 (ubsan_array_ref_instrumented_p): New function.
7076 (ubsan_maybe_instrument_array_ref): New function.
7077 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7078 (ubsan_array_ref_instrumented_p): Declare.
7079 (ubsan_maybe_instrument_array_ref): Declare.
7080
70812014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7082
7083 PR lto/61123
7084 * c.opt (fshort-enums): Add to LTO.
7085 * c.opt (fshort-wchar): Likewise.
7086
5c3d09f7
MP
70872014-06-16 Marek Polacek <polacek@redhat.com>
7088
7089 PR c/60439
7090 * c.opt (Wswitch-bool): Add Var.
7091
9cf32741
JJ
70922014-06-12 Jakub Jelinek <jakub@redhat.com>
7093
7094 PR middle-end/61486
7095 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7096 #pragma omp target teams or
7097 #pragma omp {,target }teams distribute simd.
7098
62984918
JM
70992014-06-12 Jason Merrill <jason@redhat.com>
7100
7101 * c.opt (Wabi=, fabi-compat-version): New.
7102 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7103 (c_common_post_options): Handle flag_abi_compat_version default.
7104 Disallow -fabi-compat-version=1.
7105 * c-common.h (abi_version_crosses): New.
7106
f961457f
JH
71072014-06-11 Jan Hubicka <hubicka@ucw.cz>
7108
adfac8df 7109 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7110 section names that are no longer trees.
7111
92d28cbb
JJ
71122014-06-10 Jakub Jelinek <jakub@redhat.com>
7113
7114 PR fortran/60928
7115 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7116 (omp_pragmas): ... back here.
7117
742938c9
MP
71182014-06-05 Marek Polacek <polacek@redhat.com>
7119
7120 PR c/49706
7121 * c-common.c (warn_logical_not_parentheses): New function.
7122 * c-common.h (warn_logical_not_parentheses): Declare.
7123 * c.opt (Wlogical-not-parentheses): New option.
7124
9d548dfb
MP
71252014-06-04 Marek Polacek <polacek@redhat.com>
7126
7127 PR c/30020
7128 * c-common.c (check_case_bounds): Add location parameter.
7129 Use it.
7130 (c_add_case_label): Pass loc to check_case_bounds.
7131
fedfecef
MP
71322014-06-03 Marek Polacek <polacek@redhat.com>
7133
7134 PR c/60439
7135 * c.opt (Wswitch-bool): New option.
7136
f6a7cffc
TS
71372014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7138
040d18b6
TS
7139 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7140 Remove prototypes.
7141 (record_types_used_by_current_var_decl): Move prototype to where
7142 it belongs.
7143
f6a7cffc
TS
7144 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7145 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7146 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7147
632f2871
RS
71482014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7149
7150 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7151 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7152 void_zero_node.
7153 * c-pretty-print.c (pp_c_void_constant): New function.
7154 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7155 (c_pretty_printer::expression): Handle VOID_CST.
7156 * cilk.c (extract_free_variables): Likewise.
7157 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7158 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7159
766090c2
TS
71602014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7161
7162 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7163 * c-pragma.c (push_alignment): Adjust.
7164 (handle_pragma_push_options): Likewise.
7165
661a0813
MP
71662014-05-09 Marek Polacek <polacek@redhat.com>
7167
7168 PR c/50459
7169 * c-common.c (check_user_alignment): Return -1 if alignment is error
7170 node.
7171 (handle_aligned_attribute): Don't call default_conversion on
7172 FUNCTION_DECLs.
7173 (handle_vector_size_attribute): Likewise.
7174 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7175 (handle_sentinel_attribute): Call default_conversion and allow even
7176 integral types as an argument.
7177
2793eeab
MP
71782014-05-08 Marek Polacek <polacek@redhat.com>
7179
7180 PR c/61053
7181 * c-common.c (min_align_of_type): New function factored out from...
7182 (c_sizeof_or_alignof_type): ...here.
7183 * c-common.h (min_align_of_type): Declare.
7184
f827930a
MP
71852014-05-08 Marek Polacek <polacek@redhat.com>
7186
7187 PR c/61077
7188 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7189 parameter type of main.
7190
ca49b74e
DD
71912014-05-07 DJ Delorie <dj@redhat.com>
7192
7193 * c-cppbuiltin.c (print_bits_of_hex): New.
7194 (builtin_define_type_minmax): Print values using hex so as not to
7195 require a pre-computed list of string values.
7196
1d60af08
KZ
71972014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7198 Mike Stump <mikestump@comcast.net>
7199 Richard Sandiford <rdsandiford@googlemail.com>
7200
7201 * c-ada-spec.c: Include wide-int.h.
7202 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7203 (dump_generic_ada_node): Use wide-int interfaces.
7204 * c-common.c: Include wide-int-print.h.
7205 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7206 (pointer_int_sum): Use wide-int interfaces.
7207 (c_common_nodes_and_builtins): Use make_int_cst.
7208 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7209 (handle_alloc_size_attribute): Use wide-int interfaces.
7210 (get_nonnull_operand): Likewise.
7211 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7212 * c-lex.c: Include wide-int.h.
7213 (narrowest_unsigned_type): Take a widest_int rather than two
7214 HOST_WIDE_INTs.
7215 (narrowest_signed_type): Likewise.
7216 (interpret_integer): Update accordingly. Use wide-int interfaces.
7217 (lex_charconst): Use wide-int interfaces.
7218 * c-pretty-print.c: Include wide-int.h.
7219 (pp_c_integer_constant): Use wide-int interfaces.
7220 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7221 INT_CST_LT_UNSIGNED.
7222
b15458be
RB
72232014-05-06 Richard Biener <rguenther@suse.de>
7224
7225 * c-opts.c (c_common_post_options): For -freestanding,
7226 -fno-hosted and -fno-builtin disable pattern recognition
7227 if not enabled explicitely.
7228
6577374e
MP
72292014-05-02 Marek Polacek <polacek@redhat.com>
7230
7231 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7232
d00887e8
MP
72332014-05-01 Marek Polacek <polacek@redhat.com>
7234
7235 PR c/43245
7236 * c.opt (Wdiscarded-qualifiers): Add.
7237
f8ed5150
MP
72382014-04-30 Marek Polacek <polacek@redhat.com>
7239
7240 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7241 INT_MIN / -1 sanitization only for integer types.
7242
45484dcf
MP
72432014-04-25 Marek Polacek <polacek@redhat.com>
7244
7245 PR c/18079
7246 * c-common.c (handle_noinline_attribute): Warn if the attribute
7247 conflicts with always_inline attribute.
7248 (handle_always_inline_attribute): Warn if the attribute conflicts
7249 with noinline attribute.
7250
38e514c0
MP
72512014-04-25 Marek Polacek <polacek@redhat.com>
7252
7253 PR c/60156
7254 * c-common.c (check_main_parameter_types): Warn about variadic main.
7255
44875f92
MS
72562014-04-24 Mike Stump <mikestump@comcast.net>
7257
7258 * c.opt (Wshadow-ivar): Default to on.
7259
dcaaa5a0
DP
72602014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7261
7262 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7263
c07d7c02
MP
72642014-04-23 Marek Polacek <polacek@redhat.com>
7265
7266 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7267
1c33c9b7
JJ
72682014-04-22 Jakub Jelinek <jakub@redhat.com>
7269
7270 PR sanitizer/60275
7271 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7272 if flag_sanitize_undefined_trap_on_error.
7273 (ubsan_instrument_division, ubsan_instrument_shift,
7274 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7275 if !flag_sanitize_recover.
7276
793c625f
MG
72772014-04-22 Marc Glisse <marc.glisse@inria.fr>
7278
7279 PR libstdc++/43622
7280 * c-common.c (registered_builtin_types): Make non-static.
7281 * c-common.h (registered_builtin_types): Declare.
7282
b0f1bf36 72832014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7284 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7285
7286 PR c/60819
7287 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7288 apply may-alias the scalar pointer type when applicable.
7289
3b07fa4a
IZ
72902014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7291
7292 PR middle-end/60467
7293 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7294 as possible argument for Cilk_spawn.
7295
cbbd2b1c
TB
72962014-04-11 Tobias Burnus <burnus@net-b.de>
7297
7298 PR c/60194
7299 * c.opt (Wformat-signedness): Add
7300 * c-format.c(check_format_types): Use it.
7301
6415bd5d
JM
73022014-04-11 Jason Merrill <jason@redhat.com>
7303
7304 PR c++/57926
7305 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7306 default_conversion for an array argument.
7307
6525783a
MP
73082014-04-08 Marek Polacek <polacek@redhat.com>
7309
7310 PR sanitizer/60745
7311 * c-ubsan.c: Include asan.h.
7312 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7313
880a467b
NS
73142014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7315
7316 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7317
7b59ff2d
MP
73182014-04-02 Marek Polacek <polacek@redhat.com>
7319
7320 * c-common.h (c_expand_expr): Remove declaration.
7321
8edbfaa6
JJ
73222014-03-28 Jakub Jelinek <jakub@redhat.com>
7323
7324 PR c++/60689
7325 * c-common.c (add_atomic_size_parameter): When creating new
7326 params vector, push the size argument first.
7327
07d72e1d
JJ
73282014-03-26 Jakub Jelinek <jakub@redhat.com>
7329
7330 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7331 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7332 ubsan_create_data callers.
7333
b35e0fa0
JJ
73342014-03-22 Jakub Jelinek <jakub@redhat.com>
7335
7336 PR debug/60603
7337 * c-opts.c (c_finish_options): Restore cb_file_change call to
7338 <built-in>.
7339
39a1ebb3
JJ
73402014-03-13 Jakub Jelinek <jakub@redhat.com>
7341
7342 PR middle-end/36282
7343 * c-pragma.c (apply_pragma_weak): Only look at
7344 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7345 DECL_ASSEMBLER_NAME_SET_P (decl).
7346 (maybe_apply_pending_pragma_weaks): Exit early if
7347 vec_safe_is_empty (pending_weaks) rather than only when
7348 !pending_weaks.
7349 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7350 set assembler name back to NULL afterwards.
7351
a07f6ed2
JM
73522014-03-11 Jason Merrill <jason@redhat.com>
7353
7354 * c.opt: Add -std=gnu++14.
7355
75b107f5
IB
73562014-03-11 Ian Bolton <ian.bolton@arm.com>
7357
7358 * c-opts.c (c_common_post_options): Don't override
7359 -ffp-contract=fast if unsafe-math-optimizations is on.
7360
f42c637e
PM
73612014-03-08 Paulo Matos <paulo@matos-sorge.com>
7362
22b15758 7363 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7364
70e24808
JM
73652014-03-07 Jason Merrill <jason@redhat.com>
7366
7367 * c.opt: Add -std=c++14.
7368
3af9c5e9
MP
73692014-03-06 Marek Polacek <polacek@redhat.com>
7370
7371 PR c/60197
7372 * cilk.c (contains_cilk_spawn_stmt): New function.
7373 (contains_cilk_spawn_stmt_walker): Likewise.
7374 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7375 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7376
b3bdf019
JJ
73772014-03-03 Jakub Jelinek <jakub@redhat.com>
7378
7379 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7380 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7381 even when flag_preprocess_only.
7382
ca7e759d
JM
73832014-02-26 Jason Merrill <jason@redhat.com>
7384
7385 PR c++/59231
7386 PR c++/11586
7387 * c-common.c (shorten_compare): Don't check
7388 c_inhibit_evaluation_warnings.
7389
28e41874
JJ
73902014-02-19 Jakub Jelinek <jakub@redhat.com>
7391
cca615af
JJ
7392 PR c/37743
7393 * c-common.c (c_common_nodes_and_builtins): When initializing
7394 c_uint{16,32,64}_type_node, also set corresponding
7395 uint{16,32,64}_type_node to the same value.
7396
28e41874
JJ
7397 PR c++/60267
7398 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7399 for PRAGMA_IVDEP if flag_preprocess_only.
7400
c2bf53a1
JJ
74012014-02-12 Jakub Jelinek <jakub@redhat.com>
7402
7403 PR c/60101
7404 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7405 if false, add ADD itself, rather than vice versa.
7406 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7407 copy. For SAVE_EXPR, only call merge_tlist once.
7408
8fcbce72
JJ
74092014-02-08 Jakub Jelinek <jakub@redhat.com>
7410
7411 PR middle-end/60092
7412 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7413 and tree_to_uhwi.
7414 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7415 functions.
7416 (c_common_attribute_table): Add alloc_align and assume_aligned
7417 attributes.
7418
0a756a3f
MP
74192014-02-06 Marek Polacek <polacek@redhat.com>
7420
7421 PR c/60087
7422 * c-common.c (warn_for_sign_compare): Call warning_at with location
7423 instead of warning.
7424
7ec4847a
MP
74252014-02-05 Marek Polacek <polacek@redhat.com>
7426
7427 PR c/53123
7428 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7429 statement.
7430
66f20604
MP
74312014-02-04 Marek Polacek <polacek@redhat.com>
7432
7433 PR c/60036
7434 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7435 SAVE_EXPR.
7436
5d77fb19
MG
74372014-02-03 Marc Glisse <marc.glisse@inria.fr>
7438
7439 PR c++/53017
7440 PR c++/59211
7441 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7442 handle_vector_size_attribute, handle_nonnull_attribute): Call
7443 default_conversion on the attribute argument.
7444 (handle_nonnull_attribute): Increment the argument number.
7445
81e5eca8
MP
74462014-01-31 Marek Polacek <polacek@redhat.com>
7447
7448 PR c/59963
7449 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7450 build_function_call_vec.
7451 (resolve_overloaded_builtin): Likewise.
7452 * c-common.h (build_function_call_vec): Adjust declaration.
7453
68fca595
MP
74542014-01-30 Marek Polacek <polacek@redhat.com>
7455
7456 PR c/59940
7457 * c-common.h (unsafe_conversion_p): Adjust declaration.
7458 (warnings_for_convert_and_check): Likewise.
7459 (convert_and_check): Likewise.
7460 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7461 expansion_point_location_if_in_system_header on it.
7462 (warnings_for_convert_and_check): Add location parameter. Call
7463 expansion_point_location_if_in_system_header on it. Use it.
7464 (convert_and_check): Add location parameter. Use it.
7465 (conversion_warning): Likewise.
7466 (c_add_case_label): Adjust convert_and_check calls.
7467 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7468
b72271b9
BI
74692014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7470
7471 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7472 flag_cilkplus.
7473 * c-pragma.c (init_pragma): Likewise.
7474 * c.opt: Likewise.
7475
393e8e8b
MP
74762014-01-23 Marek Polacek <polacek@redhat.com>
7477
7478 PR c/59846
7479 * c-common.c (shorten_compare): Add location_t parameter.
7480 * c-common.h (shorten_binary_op): Adjust declaration.
7481
f04dda30
MP
74822014-01-23 Marek Polacek <polacek@redhat.com>
7483
7484 PR c/58346
7485 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7486 * c-common.h: Declare it.
7487
621955cb
EB
74882014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7489
7490 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7491 * c-ada-spec.c (dump_ads): Likewise.
7492 (cpp_check): Likewise.
7493 (dump_ada_specs): Likewise.
7494
74952014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7496
7497 PR c++/49718
7498 * c-common.c (handle_no_instrument_function_attribute): Allow
7499 no_instrument_function attribute in class member
7500 definition/declaration.
7501
241f845a
JJ
75022014-01-15 Jakub Jelinek <jakub@redhat.com>
7503
7504 PR c/58943
7505 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7506 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7507 being COMPOUND_EXPR.
7508 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7509 operand a SAVE_EXPR and second MODIFY_EXPR.
7510
e83b8e2e
JJ
75112014-01-09 Jakub Jelinek <jakub@redhat.com>
7512
7513 PR target/58115
7514 * c-pch.c (c_common_write_pch): Call
7515 prepare_target_option_nodes_for_pch.
7516
23a5b65a
RS
75172014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7518
7519 Update copyright years
7520
f9030485
RS
75212014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7522
7523 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7524 the copyright notice.
7525
f2aa696b
EB
75262013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7527
7528 * c-ada-spec.c (print_constructor): New function.
7529 (print_destructor): Retrieve the origin of the destructor.
7530 (print_ada_declaration): Revamp handling of constructors/destructors.
7531
3f8257db 75322013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7533 Bill Maddox <maddox@google.com>
7534 Jason Merrill <jason@redhat.com>
7535
7536 * c.opt: Add -fdeclone-ctor-dtor.
7537 * c-opts.c (c_common_post_options): Default to on iff -Os.
7538
41958c28
BI
75392013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7540
7541 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7542 attribute.
7543 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7544 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7545 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7546 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7547 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7548 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7549 PRAGMA_CILK_CLAUSE_UNIFORM.
7550
b1726d6c 7551
12893402
BI
75522013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7553
7554 * cilk.c (cilk_outline): Made this function non-static.
7555 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7556 (create_cilk_wrapper): Added a new parameter: a function pointer.
7557 (c_install_body_w_frame_cleanup): Remove
7558 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7559 * c-common.h (cilk_outline): New prototype.
7560 (gimplify_cilk_spawn): Removed two parameters.
7561 (cilk_install_body_with_frame_cleanup): New prototype.
7562 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7563 CILK_SPAWN_STMT case.
7564
085b42ed
BS
75652013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7566
2ce064c3
BS
7567 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7568
085b42ed
BS
7569 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7570 (int_array_type_node): Remove.
7571 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7572
9e36c9ed
MP
75732013-12-05 Marek Polacek <polacek@redhat.com>
7574
7575 PR c/52023
7576 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7577 [ADJUST_FIELD_ALIGN].
7578
296674db
JM
75792013-12-04 Joseph Myers <joseph@codesourcery.com>
7580
7581 PR c/52023
7582 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7583 and check field alignment if set.
7584 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7585 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7586
b1726d6c 75872013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7588 Marek Polacek <polacek@redhat.com>
7589
7590 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7591 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7592
d7947e19
L
75932013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7594
7595 PR c/59309
7596 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7597 arguments.
7598
fad7652e
JJ
75992013-11-29 Jakub Jelinek <jakub@redhat.com>
7600
7601 PR c/59280
7602 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7603 goto invalid. If it is error_mark_node, don't issue further
7604 diagnostics.
7605
8b5e1202
SO
76062013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7607
7608 * c.opt (Wopenmp-simd): New.
7609
0a508bb6
JJ
76102013-11-22 Jakub Jelinek <jakub@redhat.com>
7611
7612 * c-ubsan.h (ubsan_instrument_return): New prototype.
7613 * c-ubsan.c (ubsan_instrument_return): New function.
7614
2fb9a547
AM
76152013-11-22 Andrew MacLeod <amacleod@redhat.com>
7616
7617 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7618 * c-gimplify.c: Likewise.
7619 * cilk.c: Likewise.
2fb9a547 7620
8400e75e
DM
76212013-11-22 David Malcolm <dmalcolm@redhat.com>
7622
7623 * c-common.c (unsafe_conversion_p): Remove use of
7624 EXPR_LOC_OR_HERE macro.
7625 (conversion_warning): Likewise.
7626 (warnings_for_convert_and_check): Likewise.
7627 (warn_for_collisions_1): Likewise.
7628 (shorten_compare): Likewise, and remove use of in_system_header
7629 macro, using the location from the former.
7630 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7631 (cb_def_pragma): Remove use of in_system_header macro.
7632 (lex_string): Likewise.
7633 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7634
eb1ce453
KZ
76352013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7636 Mike Stump <mikestump@comcast.net>
7637 Richard Sandiford <rdsandiford@googlemail.com>
7638
7639 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7640 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7641 tree_fits_shwi_p or tree_fits_uhwi_p.
7642 (dump_generic_ada_node): Likewise.
7643 * c-format.c (check_format_arg): Likewise.
7644 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7645
6b3b8c27
KZ
76462013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7647
7648 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7649
49b0aa18
JC
76502013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7651
7652 PR c/53001
7653 * c-common.c (unsafe_conversion_p): Make this function
7654 return an enumeration with more detail.
7655 (conversion_warning): Use the new return type of
7656 unsafe_conversion_p to separately warn either about conversions
7657 that lower floating point number precision or about the other
7658 kinds of conversions.
7659 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7660 (unsafe_conversion_p): switching return type to
7661 conversion_safety enumeration.
49b0aa18
JC
7662 * c.opt: Adding new warning -Wfloat-conversion and
7663 enabling it with -Wconversion.
7664
b826515a
BS
76652013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7666
8e745a17
JJ
7667 * c-opts.c: Include plugin.h.
7668 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7669
b9a55b13
MP
76702013-11-19 Marek Polacek <polacek@redhat.com>
7671
7672 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7673 call.
7674 (ubsan_instrument_shift): Likewise.
7675 (ubsan_instrument_vla): Likewise.
7676
7d362f6c
RS
76772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7678
7679 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7680 cast to unsigned type.
7681
386b1f1f
RS
76822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7683
7684 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7685 tree_low_cst.
7686 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7687 rather than tree_low_cst.
7688
ae7e9ddd
RS
76892013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7690
7691 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7692 tree_to_uhwi throughout.
7693
9439e9a1
RS
76942013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7695
7696 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7697 tree_low_cst (..., 0) with tree_to_shwi throughout.
7698
cc269bb6
RS
76992013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7700
7701 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7702 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7703
9541ffee
RS
77042013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7705
7706 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7707 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7708
c02065fc
AH
77092013-11-15 Aldy Hernandez <aldyh@redhat.com>
7710
7711 * c-cilkplus.c: New file.
7712 * c-common.c (readonly_error): Add location argument.
7713 * c-common.h (readonly_error): Same.
7714 (c_finish_cilk_clauses): Protoize.
7715 (c_check_cilk_loop): Same.
7716 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7717 Do not fail on error_mark_node.
7718 Abstract increment canonicalization to here...
7719 (c_omp_for_incr_canonicalize_ptr): New.
7720 c-pragma.c (init_pragma): Register "simd" pragma.
7721 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7722 (enum pragma_cilk_clause): New.
7723
9cc65f15
RS
77242013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7725
7726 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7727 wchar_type and host_integerp checks.
7728
18f429e2
AM
77292013-11-14 Andrew MacLeod <amacleod@redhat.com>
7730
7731 * c-common.c: Likewise.
7732 * c-gimplify.c: Likewise.
7733 * cilk.c: Likewise.
7734
d8a2d370
DN
77352013-11-14 Diego Novillo <dnovillo@google.com>
7736
7737 * c-common.c: Include fold-const.h.
7738 Include stor-layout.h.
7739 Include calls.h.
7740 Include stringpool.h.
7741 Include attribs.h.
7742 Include varasm.h.
7743 Include trans-mem.h.
7744 * c-cppbuiltin.c: Include stor-layout.h.
7745 Include stringpool.h.
7746 * c-format.c: Include stringpool.h.
7747 * c-lex.c: Include stringpool.h.
7748 Include stor-layout.h.
7749 * c-pragma.c: Include stringpool.h.
7750 Include attribs.h.
7751 Include varasm.h.
7752 Include gcc-symtab.h.
7753 * c-pretty-print.c: Include stor-layout.h.
7754 Include attribs.h.
7755 * cilk.c: Include stringpool.h.
7756 Include calls.h.
7757
38b7bc7f
JM
77582013-11-13 Joseph Myers <joseph@codesourcery.com>
7759
7760 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7761 * c-common.c (c_common_reswords): Add __auto_type.
7762 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7763
45b0be94
AM
77642013-11-12 Andrew MacLeod <amacleod@redhat.com>
7765
18f429e2
AM
7766 * c-common.c: Include gimplify.h.
7767 * c-gimplify.c: Likewise.
7768 * cilk.c: Likewise.
7769 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7770 * c-ubsan.c: Don't include gimple.h.
45b0be94 7771
582d9b50
JM
77722013-11-12 Joseph Myers <joseph@codesourcery.com>
7773
7774 * c-common.c (c_common_reswords): Add _Thread_local.
7775
6b28e197
JM
77762013-11-09 Joseph Myers <joseph@codesourcery.com>
7777
7778 * c-common.c (atomic_size_supported_p): New function.
7779 (resolve_overloaded_atomic_exchange)
7780 (resolve_overloaded_atomic_compare_exchange)
7781 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7782 Use it instead of comparing size with a local list of sizes.
7783
267bac10
JM
77842013-11-07 Andrew MacLeod <amacleod@redhat.com>
7785 Joseph Myers <joseph@codesourcery.com>
7786
7787 * c-common.h (enum rid): Add RID_ATOMIC.
7788 * c-common.c (c_common_reswords): Add _Atomic.
7789 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7790 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7791 * c-format.c (check_format_types): Check for extra _Atomic
7792 qualifiers in format argument.
7793 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7794 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7795
5157b91e
TB
77962013-11-06 Tobias Burnus <burnus@net-b.de>
7797
7798 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7799
6dbe0958
JM
78002013-11-06 Joseph Myers <joseph@codesourcery.com>
7801
7802 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7803 standards modes.
7804 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7805 to mean lack of IEEE 754 support.
7806
e8ff5196
TB
78072013-11-05 Tobias Burnus <burnus@net-b.de>
7808
7809 * c.opt (-Wdate-time): New option
7810 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7811
254a0760
JM
78122013-11-05 Joseph Myers <joseph@codesourcery.com>
7813
7814 * c-cppbuiltin.c (cpp_iec_559_value): Test
7815 flag_excess_precision_cmdline not flag_excess_precision.
7816
6d7f7e0a
TB
78172013-11-05 Tobias Burnus <burnus@net-b.de>
7818
7819 * c.opt (fopenmp-simd): New option.
7820 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7821 (omp_pragmas): ... this new struct.
7822 (c_pp_lookup_pragma): Also walk omp_pragmas.
7823 (init_pragma): Init pragmas for -fopenmp-simd.
7824
55a7f02f
MP
78252013-11-04 Marek Polacek <polacek@redhat.com>
7826
7827 PR c++/58979
7828 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7829
9193fb05
JM
78302013-11-04 Joseph Myers <joseph@codesourcery.com>
7831
7832 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7833 New functions.
7834 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7835
94159ecf
EB
78362013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7837
7838 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7839 (dump_ada_specs): Adjust prototype of second callback.
7840 * c-ada-spec.c (cpp_check): New global variable.
7841 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7842 (print_generic_ada_decl): Likewise.
7843 (has_static_fields): Change return type to bool and add guard.
7844 (has_nontrivial_methods): New predicate.
7845 (is_tagged_type): Change return type to bool.
7846 (separate_class_package): Call has_nontrivial_methods.
7847 (pp_ada_tree_identifier): Minor tweaks.
7848 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7849 (dump_ada_array_domains): Likewise.
7850 (dump_ada_array_type): Likewise.
7851 (dump_template_types): Remove cpp_check parameter and do not pass it to
7852 dump_generic_ada_node.
7853 (dump_ada_template): Likewise.
7854 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7855 recursively.
7856 (print_ada_methods): Change return type to integer. Remove cpp_check
7857 parameter and do not pass it down.
7858 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7859 dump_generic_ada_node.
7860 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7861 accessing methods.
7862 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7863 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7864 value of print_ada_methods.
7865 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7866 Set cpp_check to it before invoking dump_ada_nodes.
7867 (dump_ada_specs): Likewise.
7868
b906f4ca
MP
78692013-11-03 Marek Polacek <polacek@redhat.com>
7870
7871 * c-ubsan.c: Don't include hash-table.h.
7872 (ubsan_instrument_vla): New function.
7873 * c-ubsan.h: Declare it.
7874
5e20cdc9
DM
78752013-10-31 David Malcolm <dmalcolm@redhat.com>
7876
7877 Automated part of renaming of symtab_node_base to symtab_node.
7878
7879 Patch autogenerated by rename_symtab.py from
7880 https://github.com/davidmalcolm/gcc-refactoring-scripts
7881 revision 58bb219cc090b2f4516a9297d868c245495ee622
7882
7883 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7884 symtab_node_base to symtab_node.
7885
7057e645
ESR
78862013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7887
8e745a17 7888 Implement C++14 digit separators.
7057e645
ESR
7889 * c-lex.c (interpret_float): Remove digit separators from scratch string
7890 before building real literal.
7891
193ea7bc
JJ
78922013-10-30 Jakub Jelinek <jakub@redhat.com>
7893
7894 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7895
939b37da
BI
78962013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7897
7898 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7899 fields.
7900 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7901 enabled.
7902 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7903 (insert_cilk_frame): New prototype.
7904 (cilk_init_builtins): Likewise.
7905 (gimplify_cilk_spawn): Likewise.
7906 (c_cilk_install_body_w_frame_cleanup): Likewise.
7907 (cilk_detect_spawn_and_unwrap): Likewise.
7908 (cilk_set_spawn_marker): Likewise.
7909 (build_cilk_sync): Likewise.
7910 (build_cilk_spawn): Likewise.
7911 * cilk.c: New file.
7912
67348ccc
DM
79132013-10-29 David Malcolm <dmalcolm@redhat.com>
7914
7915 Patch autogenerated by refactor_symtab.py from
7916 https://github.com/davidmalcolm/gcc-refactoring-scripts
7917 revision 58bb219cc090b2f4516a9297d868c245495ee622
7918
7919 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7920 to a true class hierarchy.
7921 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7922
d570872d
RS
79232013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7924
7925 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7926
98906124
JL
79272013-10-26 Jeff Law <law@redhat.com>
7928
adfac8df
JJ
7929 * c-common.c (c_define_builtins): Remove mudflap support.
7930 * c.opt: Ignore and warn for mudflap options.
98906124 7931
d73749df 79322013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7933
7934 PR other/33426
7935 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7936 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7937
3f04b1bb
JM
79382013-10-23 Jason Merrill <jason@redhat.com>
7939
7940 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7941
acf0174b
JJ
79422013-10-11 Jakub Jelinek <jakub@redhat.com>
7943
acd15a28
JJ
7944 * c-common.h (omp_clause_mask::operator !=): New method.
7945 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7946 instead of if (mask & something) tests everywhere.
7947
acf0174b
JJ
7948 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7949 201307 instead of 201107.
7950 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7951 (c_common_attribute_table): Add "omp declare target" and
7952 "omp declare simd" attributes.
7953 (handle_omp_declare_target_attribute,
7954 handle_omp_declare_simd_attribute): New functions.
7955 * c-omp.c: Include c-pragma.h.
7956 (c_finish_omp_taskgroup): New function.
7957 (c_finish_omp_atomic): Add swapped argument, if true,
7958 build the operation first with rhs, lhs arguments and use NOP_EXPR
7959 build_modify_expr.
7960 (c_finish_omp_for): Add code argument, pass it down to make_code.
7961 (c_omp_split_clauses): New function.
7962 (c_split_parallel_clauses): Removed.
7963 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7964 c_omp_declare_simd_clauses_to_decls): New functions.
7965 * c-common.h (omp_clause_mask): New type.
7966 (OMP_CLAUSE_MASK_1): Define.
7967 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7968 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7969 omp_clause_mask::operator |, omp_clause_mask::operator &,
7970 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7971 omp_clause_mask::operator ==): New methods.
7972 (enum c_omp_clause_split): New.
7973 (c_finish_omp_taskgroup): New prototype.
7974 (c_finish_omp_atomic): Add swapped argument.
7975 (c_finish_omp_for): Add code argument.
7976 (c_omp_split_clauses): New prototype.
7977 (c_split_parallel_clauses): Removed.
7978 (c_omp_declare_simd_clauses_to_numbers,
7979 c_omp_declare_simd_clauses_to_decls): New prototypes.
7980 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7981 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7982 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7983 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7984 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7985 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7986 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7987 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7988 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7989 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7990 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7991 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7992 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7993 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7994 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7995 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7996 PRAGMA_OMP_CLAUSE_UNIFORM.
7997
826cacfe
MG
79982013-10-09 Marc Glisse <marc.glisse@inria.fr>
7999
8000 PR tree-optimization/20318
8001 * c-common.c (handle_returns_nonnull_attribute): New function.
8002 (c_common_attribute_table): Add returns_nonnull.
8003
2284b034
MG
80042013-10-03 Marc Glisse <marc.glisse@inria.fr>
8005
8006 PR c++/19476
8007 * c.opt (fcheck-new): Move to common.opt.
8008
b56e9788
MP
80092013-09-25 Marek Polacek <polacek@redhat.com>
8010 Jakub Jelinek <jakub@redhat.com>
8011
8012 PR sanitizer/58413
8013 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
8014 an expression if we can prove it is correct.
8015 (ubsan_instrument_division): Likewise. Remove unnecessary
8016 check.
8017
ce6923c5
MP
80182013-09-18 Marek Polacek <polacek@redhat.com>
8019
8020 PR sanitizer/58411
8021 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
8022 Declare it.
8023 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
8024
fb5610fb
IS
80252013-09-14 Iain Sandoe <iain@codesourcery.com>
8026
8027 PR target/48094
8028 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
8029 fobjc-gc, freplace-objc-classes): Accept for LTO.
8030
88b0e79e
JC
80312013-09-13 Jacek Caban <jacek@codeweavers.com>
8032
8033 * c-target.def: New hook
8034
c9b0866a
PC
80352013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
8036
8037 PR c++/43452
8038 * c.opt (Wdelete-incomplete): Add.
8039
0af94e6f
JR
80402013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
8041
8042 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
8043 (vector_types_compatible_elements_p): New function.
8044 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
8045 declaration.
8046 (vector_types_compatible_elements_p): Declare.
8047
7c26172c
GDR
80482013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8049
8050 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8051 a virtual member function.
8052 (pp_simple_type_specifier): Remove.
8053 (pp_c_type_specifier): Likewise.
8054 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8055 Rename from pp_c_type_specifier. Adjust.
8056 (c_pretty_printer::c_pretty_printer): Do not assign to
8057 simple_type_specifier.
8058
20059c8b
GDR
80592013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8060
8061 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8062 member function.
8063 (c_pretty_printer::storage_class_specifier): Likewise.
8064 (c_pretty_printer::initializer): Likewise.
8065 (pp_declaration): Remove.
8066 (pp_declaration_specifiers): Likewise.
8067 (pp_abstract_declarator): Likewise.
8068 (pp_declarator): Likewise.
8069 (pp_type_id): Likewise.
8070 (pp_statement): Likewise.
8071 (pp_constant): Likewise.
8072 (pp_id_expression): Likewise.
8073 (pp_primary_expression): Likewise.
8074 (pp_unary_expression): Likewise.
8075 (pp_multiplicative_expression): Likewise.
8076 (pp_conditional_expression): Likewise.
8077 (pp_assignment_expression): Likewise.
8078 (pp_expression): Likewise.
8079 (pp_c_type_id): Likewise.
8080 (pp_c_storage_class_specifier): Likewise.
8081 * c-pretty-print.c (pp_c_type_cast): Tidy.
8082 (pp_c_pointer): Likewise.
8083 (pp_c_type_specifier): Likewise.
8084 (pp_c_parameter_type_list): Likewise.
8085 (pp_c_function_definition): Likewise.
8086 (pp_c_init_declarator): Likewise.
8087 (pp_c_initializer_list): Likewise.
8088 (pp_c_constructor_elts): Likewise.
8089 (c_pretty_printer::direct_abstract_declarator): Likewise.
8090 (c_pretty_printer::declaration_specifiers): Likewise.
8091 (c_pretty_printer::primary_expression): Likewise.
8092 (c_pretty_printer::postfix_expression): Likewise.
8093 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8094 (c_pretty_printer::storage_class_specifier): Rename from
8095 pp_c_storage_class_specifier.
8096 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8097 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8098 storage_class_specifier, initializer, offset_list, flags.
8099
de5a5fa1
MP
81002013-08-30 Marek Polacek <polacek@redhat.com>
8101
8102 * c-ubsan.c: New file.
8103 * c-ubsan.h: New file.
8104
8f0e4d72
GDR
81052013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8106
8107 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8108 member function.
8109 (c_pretty_printer::declaration_specifiers): Likewise.
8110 (c_pretty_printer::declarator): Likewise.
8111 (c_pretty_printer::abstract_declarator): Likewise.
8112 (c_pretty_printer::direct_abstract_declarator): Likewise.
8113 (c_pretty_printer::direct_declarator): Likewise.
8114 (c_pretty_printer::function_specifier): Likewise.
8115 (pp_declaration): Adjust.
8116 (pp_declaration_specifiers): Likewise.
8117 (pp_abstract_declarator): Likewise.
8118 (pp_direct_declarator): Likewise.
8119 (pp_function_specifier): Likewise.
8120 (pp_direct_abstract_declarator): Remove as unused.
8121 (pp_c_declaration): Remove.
8122 (pp_c_declaration_specifiers): Likewise.
8123 (pp_c_declarator): Likewise.
8124 (pp_c_direct_declarator): Likewise.
8125 (pp_c_function_specifier): Likewise.
8126 (pp_c_direct_abstract_declarator): Likewise.
8127 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8128 from pp_c_abstract_declarator. Adjust.
ab20d992 8129 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8130 pp_c_direct_abstract_declarator. Adjust.
8131 (c_pretty_printer::function_specifier): Rename from
8132 pp_c_function_specifier. Adjust.
8133 (c_pretty_printer::declaration_specifiers): Rename from
8134 pp_c_declaration_specifiers. Adjust.
8135 (c_pretty_printer::direct_declarator): Rename from
8136 pp_c_direct_declarator. Adjust.
8137 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8138 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8139 (c_pretty_printer::c_pretty_printer): Do not assign to
8140 declaration, declaration_specifiers, declarator,
8141 direct_declarator, direct_abstract_declarator, function_specifier.
8142
00d34d3a
GDR
81432013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8144
8145 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8146 virtual member function.
8147 (c_pretty_printer::multiplicative_expression): Likewise.
8148 (c_pretty_printer::conditional_expression): Likewise.
8149 (c_pretty_printer::assignment_expression): Likewise.
8150 (c_pretty_printer::expression): Likewise.
8151 (pp_unary_expression): Adjust.
8152 (pp_multiplicative_expression): Likewise.
8153 (pp_assignment_expression): Likewise.
8154 (pp_conditional_expression): Likewise.
8155 (pp_expression): Likewise.
8156 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8157 from pp_c_unary_expression. Adjust.
8158 (c_pretty_printer::multiplicative_expression): Rename from
8159 pp_c_multiplicative_expression. Adjust.
8160 (c_pretty_printer::conditional_expression): Rename from
8161 pp_c_conditional_expression. Adjust.
8162 (c_pretty_printer::assignment_expression): Rename from
8163 pp_c_assignment_expression. Adjust.
8164 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8165 (c_pretty_printer::c_pretty_printer): Do not assign to
8166 unary_expression, multiplicative_expression,
8167 conditional_expression, expression.
8168
fb22178f
GDR
81692013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8170
8171 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8172 virtual member function.
8173 (pp_postfix_expression): Adjust.
8174 (pp_c_postfix_expression): Remove.
8175 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8176 from pp_c_postfix_expression. Adjust.
8177 (c_pretty_printer::c_pretty_printer): Do not assign to
8178 postfix_expression.
8179
7ecc2600
GDR
81802013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8181
8182 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8183 virtua member function.
8184 (pp_primary_expression): Adjust.
8185 (pp_c_primary_expression): Remove.
8186 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8187 from pp_c_primary_expression. Adjust.
8188 (pp_c_initializer_list): Use pp_primary_expression.
8189 (c_pretty_printer::c_pretty_printer): Do not assign to
8190 primary_expression.
8191
0691175f
GDR
81922013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8193
8194 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8195 * c-pretty-print.c (M_): Remove.
8196 (c_pretty_printer::translate_string): Define.
8197 (pp_c_type_specifier): Use it.
8198 (pp_c_primary_expression): Likewise.
8199 (pp_c_expression): Likewise.
8200
66dfe4c4
GDR
82012013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8202
8203 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8204 virtual function.
8205 (pp_c_id_expression): Remove.
8206 (pp_id_expression): Adjust.
8207 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8208 pp_c_id_expression. Adjust.
8209 (pp_c_postfix_expression): Use pp_id_expression.
8210 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8211
ca43e9d5
GDR
82122013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8213
8214 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8215 member function.
8216 (pp_constant): Adjust.
8217 (pp_c_constant): Remove.
8218 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8219 pp_c_constant. Adjust.
8220 (pp_c_constant)
8221 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8222 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8223
da6ca2b5
GDR
82242013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8225
8226 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8227 (c_pretty_printer::c_pretty_printer): Declare.
8228 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8229 c_pretty_printer_init. Adjust.
8230 (print_c_tree): Do not call c_pretty_printer_init.
8231 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8232
65a372f4
AC
82332013-08-09 Arnaud Charlet <charlet@adacore.com>
8234
8235 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8236
fd9b0f32
PC
82372013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8238
8239 PR c++/58080
8240 * c-common.c (pointer_int_sum): Add bool parameter.
8241 * c-common.h (pointer_int_sum): Adjust declaration.
8242
e0aec1e9
GDR
82432013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8244
8245 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8246 c_pretty_printer variable.
8247
b066401f
GDR
82482013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8249
8250 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8251 (pp_base): Remove.
8252 (pp_c_base): Likewise. Adjust users.
8253 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8254 (pp_c_whitespace): Do not call pp_base.
8255 (pp_c_left_paren): Likewise.
8256 (pp_c_right_paren): Likewise.
8257 (pp_c_left_brace): Likewise.
8258 (pp_c_right_brace): Likewise.
8259 (pp_c_left_bracket): Likewise.
8260 (pp_c_right_bracket): Likewise.
8261 (pp_c_dot): Likewise.
8262 (pp_c_ampersand): Likewise.
8263 (pp_c_star): Likewise.
8264 (pp_c_arrow): Likewise.
8265 (pp_c_semicolon): Likewise.
8266 (pp_c_complement): Likewise.
8267 (pp_c_exclamation): Likewise.
8268 (pp_c_direct_declarator): Likewise.
8269 (pp_c_ws_string): Likewise.
8270 (pp_c_identifier): Likewise.
8271 (pp_c_statement): Likewise.
8272 (print_c_tree): Likewise.
8273
65e5a578
ESR
82742013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8275
8276 PR c++/58072
8277 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8278 provide useful error strings.
8279
137a1a27
GDR
82802013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8281
8282 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8283 printer functions instead of pp_string or operators and punctuators.
8284 (dump_generic_ada_node): Likewise.
8285 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8286 (pp_c_relational_expression): Likewise.
8287 (pp_c_logical_or_expression): Likewise.
8288
07838b13
GDR
82892013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8290
8291 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8292 functions instead of pp_character.
8293 (pp_ada_tree_identifier): Likewise.
8294 (dump_ada_double_name): Likewise.
8295 (dump_ada_function_declaration): Likewise.
8296 (dump_ada_array_domains): Likewise.
8297 (dump_template_types): Likewise.
8298 (dump_generic_ada_node): Likewise.
8299 (print_ada_declaration): Likewise.
8300 (print_ada_struct_decl): Likewise.
8301 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8302
433cc7b0
TT
83032013-07-23 Tom Tromey <tromey@redhat.com>
8304
8305 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8306 * c-common.c (c_common_reswords): Add _Generic.
8307
688010ba
OB
83082013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8309
8310 * c-common.c: Fix typos.
8311 * c-common.h: Likewise.
8312
2a99e5e6
LL
83132013-07-13 Lubos Lunak <l.lunak@suse.cz>
8314
8315 PR c++/55203
8316 * c-common.c (c_common_attribute_table): Add warn_unused.
8317 (handle_warn_unused_attribute): New.
8318
c26302d5
JJ
83192013-07-10 Jakub Jelinek <jakub@redhat.com>
8320
8321 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8322 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8323
dfeadaa0
PC
83242013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8325
8326 PR c++/57869
8327 * c.opt: Add Wconditionally-supported.
8328
6a2fa4b2
GS
83292013-07-08 Graham Stott <graham.stott@btinternet.com>
8330
adfac8df 8331 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8332 unused variables l_length and l_node.
8333
ecdbd01a 83342013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8335
8336 PR c/57821
8337 * c-common.c (complete_array_type): Delay folding first index
8338 like other indices. When folding, check for index overflow.
8339
bedc293e
MG
83402013-06-27 Marc Glisse <marc.glisse@inria.fr>
8341
8342 PR c++/57509
8343 * c-common.h (c_build_vec_perm_expr): New complain argument.
8344 * c-common.c (c_build_vec_perm_expr): Likewise.
8345 Use save_expr also in C++.
8346
604b2bfc
GDR
83472013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8348
8349 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8350 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8351 * c-opts.c (c_common_post_options): Likewise.
8352
dfeadaa0 83532013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8354
8355 * array-notation-common.c (length_mismatch_in_expr): Changed the
8356 parameter type's from a dynamic array to a vec_tree. Also removed
8357 the size parameters.
8358 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8359 the change above.
8360
2ce86d2e
BI
83612013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8362
8363 * c-common.h (struct cilkplus_an_parts): New structure.
8364 (struct cilkplus_an_loop_parts): Likewise.
8365 (cilkplus_extract_an_triplets): New prototype.
8366 (fix_sec_implicit_args): Likewise.
8367 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8368 (fix_sec_implicit_args): Likewise.
604b2bfc 8369
07a6825b
BI
83702013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8371
8372 * array-notation-common.c (find_inv_trees): Removed an unwanted
8373 typecasting.
8374 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8375 enum rid to enum tree_code.
8376
08346abd
JH
83772013-06-11 Jan Hubicka <jh@suse.cz>
8378
8379 * c-common.c (handle_alias_ifunc_attribute): Do not set
8380 DECL_EXTERNAL for weakref variables.
8381 * c-pragma.c (handle_pragma_weak): Make sure aliases
8382 are not declared as external.
8383
d60f1706
BI
83842013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8385
8386 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8387 function from c/c-array-notation.c.
8388 (is_cilkplus_reduce_builtin): Likewise.
8389 (find_rank): Likewise.
8390 (extract_array_notation_exprs): Likewise.
8391 (replace_array_notations): Likewise.
8392 (find_inv_trees): Likewise.
8393 (replace_inv_trees): Likewise.
8394 (contains_array_notation_expr): Likewise.
8395 (find_correct_array_notation_type): Likewise.
8396 * c-common.h (struct inv_list): Moved this struct from the file
8397 c/c-array-notation.c and added a new field called additional tcodes.
8398 (length_mismatch_in_expr_p): New prototype.
8399 (is_cilkplus_reduce_builtin): Likewise.
8400 (find_rank): Likewise.
8401 (extract_array_notation_exprs): Likewise.
8402 (replace_array_notation): Likewise.
8403 (find_inv_trees): Likewise.
8404 (replace_inv_trees): Likewise.
8405 (find_correct_array_notation_type): Likewise.
dfeadaa0 8406
36536d79
BI
84072013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8408
8409 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8410 function array_notation_init_builtins is called.
8411 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8412 * c-common.def (ARRAY_NOTATION_REF): New tree.
8413 * c-common.h (build_array_notation_expr): New function declaration.
8414 (build_array_notation_ref): Likewise.
8415 (extract_sec_implicit_index_arg): New extern declaration.
8416 (is_sec_implicit_index_fn): Likewise.
8417 (ARRAY_NOTATION_CHECK): New define.
8418 (ARRAY_NOTATION_ARRAY): Likewise.
8419 (ARRAY_NOTATION_START): Likewise.
8420 (ARRAY_NOTATION_LENGTH): Likewise.
8421 (ARRAY_NOTATION_STRIDE): Likewise.
8422 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8423 ARRAY_NOTATION_REF.
8424 (pp_c_expression): Likewise.
8425 * c.opt (flag_enable_cilkplus): New flag.
8426 * array-notation-common.c: New file.
8427
f7716d57
JJ
84282013-05-14 Jakub Jelinek <jakub@redhat.com>
8429
8430 PR c++/57274
8431 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8432
a5e0cd1d
MG
84332013-05-10 Marc Glisse <marc.glisse@inria.fr>
8434
8435 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8436 vectors.
8437
f6bc1c4a
HS
84382013-05-07 Han Shen <shenhan@google.com>
8439
8440 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8441
3f12f6e9
SKS
84422013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8443
8444 * c-common.c (check_user_alignment): Emit error for negative values.
8445
61949153
PC
84462013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8447
8448 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8449
e93e18e9
PC
84502013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8451
8452 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8453 __GXX_EXPERIMENTAL_CXX1Y__.
8454
44d90fe1 84552013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8456 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8457
8458 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8459 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8460 to simply use OPT_Wpointer_arith.
8461 (c_sizeof_or_alignof_type): Likewise.
8462
13f39b2e
PC
84632013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8464
8465 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8466
4b84d650
JJ
84672013-04-12 Jakub Jelinek <jakub@redhat.com>
8468
8469 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8470 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8471 specifiers.
8472
fb037b5d
SB
84732013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8474
8475 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8476
4e856798
PC
84772013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8478
8479 * c-common.c (pointer_int_sum): Remove dead code.
8480
4b1baac8
RS
84812013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8482
8483 PR middle-end/56524
8484 * c-common.c (handle_optimize_attribute): Don't call
8485 save_optabs_if_changed.
8486
0b50e654
JJ
84872013-03-05 Jakub Jelinek <jakub@redhat.com>
8488
8489 PR middle-end/56461
8490 * c-pch.c (pch_init): Free target_validity at the end.
8491
48c41403
JJ
84922013-03-04 Jakub Jelinek <jakub@redhat.com>
8493
8494 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8495
e664c61c
KS
84962013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8497 Jakub Jelinek <jakub@redhat.com>
8498
8499 PR sanitizer/56454
8500 * c-common.c (handle_no_sanitize_address_attribute): New function.
8501 (c_common_attribute_table): Add no_sanitize_address attribute.
8502 (handle_no_address_safety_analysis_attribute): Add
8503 no_sanitize_address attribute, not no_address_safety_analysis
8504 attribute.
8505
a475fd3d 85062013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8507
8508 PR target/52555
8509 * c-common.c (handle_optimize_attribute): Call
8510 save_optabs_if_changed.
8511
f6007d99
JJ
85122013-02-18 Jakub Jelinek <jakub@redhat.com>
8513 Steven Bosscher <steven@gcc.gnu.org>
8514
8515 PR pch/54117
8516 * c-opts.c (c_common_post_options): If debug info is enabled
8517 and non-dwarf*, refuse to load PCH files and when writing PCH
8518 file warn.
8519
cf35e2b1
JJ
85202013-02-05 Jakub Jelinek <jakub@redhat.com>
8521
8522 PR middle-end/56167
8523 * c-common.c (handle_error_attribute): Fix condition.
8524
32887460
JJ
85252013-01-30 Jakub Jelinek <jakub@redhat.com>
8526
8527 PR c++/55742
8528 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8529
5af057d8
JM
85302013-01-18 Jason Merrill <jason@redhat.com>
8531
8532 PR target/54908
8533 * c.opt (-fextern-tls-init): New.
8534 * c-opts.c (c_common_post_options): Handle it.
8535
cc83c823
JJ
85362013-01-09 Jakub Jelinek <jakub@redhat.com>
8537
8538 PR c/48418
8539 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8540 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8541 and is either negative or bigger or equal to type precision
8542 of the first operand.
8543
a859517f
MP
85442012-12-03 Marek Polacek <polacek@redhat.com>
8545
8546 PR c/55570
8547 * c-common.c (check_user_alignment): Swap order of tests,
8548 check TREE_CODE first.
8549
2d7aa578
ESR
85502012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8551
8552 PR c++/52654
8553 * c-common.h (overflow_type): New enum.
8554 (build_userdef_literal): Add overflow_type argument.
8555 (tree_userdef_literal): Add overflow_type.
8556 (USERDEF_LITERAL_OVERFLOW): New access macro.
8557 * c-common.c (build_userdef_literal): Add overflow_type
8558 argument.
8559 * c-lex.c (c_lex_with_flags): Add overflow_type to
8560 build_userdef_literal calls.
8561 (interpret_integer, interpret_float): Add overflow_type argument.
8562
cc3c4f62
RB
85632012-11-28 Richard Biener <rguenther@suse.de>
8564
8565 PR c/35634
8566 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8567 here and use a type with proper overflow behavior for types that would
8568 need to be promoted for the arithmetic.
8569
77bc5132
JJ
85702012-11-23 Jakub Jelinek <jakub@redhat.com>
8571
8572 PR sanitizer/55435
8573 * c-common.c (handle_no_address_safety_analysis_attribute): New
8574 function.
8575 (c_common_attribute_table): Add no_address_safety_analysis.
8576
5dc99c46
SB
85772012-11-16 Simon Baldwin <simonb@google.com>
8578
8579 * c.opt: Add f[no-]canonical-system-headers.
8580 * c-opts.c (c_common_handle_option): Handle
8581 OPT_fcanonical_system_headers.
8582
a4a0016d
ESR
85832012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8584
8585 PR c++/54413
8586 * c-opts.c (c_common_handle_option): Set new flags.
8587 * c.opt: Describe new flags.
8588
7dbb85a7
JM
85892012-11-09 Jason Merrill <jason@redhat.com>
8590
8591 * c.opt (Wabi-tag): New.
8592
ad7bac31
AK
85932012-11-09 Andi Kleen <ak@linux.intel.com>
8594
8595 PR 55139
8596 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8597 MEMMODEL_MASK
ad7bac31 8598
7332899a
MLI
85992012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8600
8601 PR c/53063
8602 * c.opt (Wformat): Make it Alias Wformat=1.
8603 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8604 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8605 LangEnabledBy.
8606 (Wformat=): RejectNegative. Use LangEnabledBy.
8607 (Wnonnull): Use LangEnabledBy.
8608 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8609 * c-format.c (set_Wformat): Delete.
8610 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8611 (maybe_read_dollar_number): Likewise.
8612 (avoid_dollar_number): Likewise.
8613 (finish_dollar_format_checking): Likewise.
8614 (check_format_info): Likewise.
8615 (check_format_info_main): Likewise.
8616 (check_format_types): Likewise.
8617 (format_type_warning): Likewise.
8618 * c-common.c (int): Likewise.
8619 (check_function_sentinel): Likewise.
8e745a17 8620 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8621
34a180a6
MLI
86222012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8623
8624 PR c/53063
8625 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8626 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8627 Use LangEnabledBy.
8628 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8629 common.opt.
8630 (Wvariadic-macros): Init(1).
8631 * c-opts.c (c_common_handle_option): Do not handle them
8632 explicitly.
8633 (c_common_post_options): Likewise.
8634 (sanitize_cpp_opts): warn_unused_macros is now
8635 cpp_warn_unused_macros.
8636 (push_command_line_include): Likewise.
8637 * c-common.c (warn_unknown_pragmas): Do not define.
8638 * c-common.h (warn_unknown_pragmas): Do not declare.
8639
3f46d6a5
MLI
86402012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8641
8642 PR c/51294
8643 * c-common.c (conversion_warning): Handle conditional expressions.
8644
880661a4
JW
86452012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8646
8647 PR c++/54930
8648 * c.opt (Wreturn_local_addr): Define new option.
8649
4514a96b
JM
86502012-10-25 Jason Merrill <jason@redhat.com>
8651
f14edc1a
JM
8652 * c.opt (Wvirtual-move-assign): New.
8653
4514a96b
JM
8654 * c.opt (Winherited-variadic-ctor): New.
8655
93100c6b
MG
86562012-10-25 Marc Glisse <marc.glisse@inria.fr>
8657
8658 PR c++/54427
8659 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8660
1efcb8c6
JM
86612012-10-23 Joseph Myers <joseph@codesourcery.com>
8662
8663 * c-common.h (pch_cpp_save_state): Declare.
8664 * c-target.def (c_preinclude): New hook.
8665 * c-opts.c (done_preinclude): New.
8666 (push_command_line_include): Handle default preincluded header.
8667 (cb_file_change): Call pch_cpp_save_state when calling
8668 push_command_line_include.
8669 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8670 (pch_cpp_save_state): New.
8671 (pch_init): Call pch_cpp_save_state conditionally, instead of
8672 calling cpp_save_state.
8673
4a0ae68e
MLI
86742012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8675
8676 PR c/53063
8677 PR c/40989
8678 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8679 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8680 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8681 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8682 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8683 * c-opts.c (c_common_handle_option): Remove explicit handling from
8684 here.
8685 (c_common_post_options): Likewise.
8686
67e4210b
EB
86872012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8688
8689 * c-ada-spec.c (LOCATION_COL): Delete.
8690 (compare_location): New function.
8691 (compare_node): Use it.
8692 (compare_comment): Likewise.
8693
65d4f2cd
MLI
86942012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8695
8696 PR c/53063
8697 PR c/40989
8698 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8699 * c-opts.c (c_common_handle_option): Do not set them here. Add
8700 comment.
8701 (c_common_post_options): Likewise.
8702
909881cb
EB
87032012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8704
8705 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8706 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8707 Remove POINTER_TYPE handling, add large unsigned handling and use
8708 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8709
3a785c97
JJ
87102012-10-12 Jakub Jelinek <jakub@redhat.com>
8711
8712 PR c/54381
8713 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8714 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8715 locs and array of 3 trees instead of just single loc and single
8716 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8717 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8718 For *cmp* builtins that take two sources strings report warnings
8719 about first and second source, not about destination and source.
8720
5e54f81d
MG
87212012-10-12 Marc Glisse <marc.glisse@inria.fr>
8722
8723 PR c++/53055
8724 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8725
f5b02f1e
EB
87262012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8727
8728 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8729 declaring something coming from another file.
8730
b46dbc6c
AC
87312012-10-10 Arnaud Charlet <charlet@adacore.com>
8732
f5b02f1e 8733 PR ada/54845
b46dbc6c
AC
8734 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8735
5d9de0d0
PC
87362012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8737
8738 PR c++/54194
8739 * c-common.c (warn_about_parentheses): Add location_t parameter;
8740 use EXPR_LOC_OR_LOC.
8741 * c-common.h: Update declaration.
8742
a212e43f
MG
87432012-10-09 Marc Glisse <marc.glisse@inria.fr>
8744
8745 PR c++/54427
8746 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8747 more operations. Make error messages optional.
8748 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8749 (scalar_to_vector): Declare.
8750
b1db7f91
JM
87512012-10-08 Jason Merrill <jason@redhat.com>
8752
8753 * c-common.c (c_common_reswords): Add thread_local.
8754
e28d52cf
DS
87552012-10-08 Dodji Seketeli <dodji@redhat.com>
8756
8757 PR c++/53528 C++11 attribute support
8758 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8759 new functions.
8760 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8761 static function.
8762 (handle_aligned_attribute): In choose strictest alignment
8763 among many. Use new check_cxx_fundamental_alignment_constraints.
8764 (handle_transparent_union_attribute): In c++11 attribute syntax,
8765 don't look through typedefs.
8766
3b78de56
AC
87672012-10-04 Arnaud Charlet <charlet@adacore.com>
8768
8769 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8770 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8771 out of dumpfile.h.
8772
6040bb5f
DC
87732012-09-25 Dehao Chen <dehao@google.com>
8774
8775 PR middle-end/54645
3b78de56 8776 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8777 map when read in the pch.
8778
3f8257db 87792012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8780
8781 * c-ada-spec.c: Style fixes.
8782
3f8257db 87832012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8784
8785 * c.opt (-fada-spec-parent): Define new command line switch.
8786 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8787 is specified, generate binding spec as a child of the specified unit.
8788
0ccb505d
PC
87892012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8790 Manuel López-Ibáñez <manu@gcc.gnu.org>
8791
8792 PR c++/53210
8793 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8794
c583af79
AC
87952012-08-23 Arnaud Charlet <charlet@adacore.com>
8796
8797 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8798 for pointers, and add missing Convention C pragma.
8799 (print_ada_struct_decl): Add missing aliased keyword.
8800 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8801
1a4049e7
JJ
88022012-08-17 Jakub Jelinek <jakub@redhat.com>
8803
8804 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8805 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8806 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8807 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8808 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8809
70b5e7dc
RG
88102012-08-10 Richard Guenther <rguenther@suse.de>
8811
8812 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8813
f8923f7e
SB
88142012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8815
8816 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8817 instead of separate pp_newline and pp_flush.
8818 (print_c_tree): Likewise.
8819
e45abe1f
RH
88202012-07-26 Richard Henderson <rth@redhat.com>
8821
8822 * c-common.c (handle_hot_attribute): Allow labels.
8823 (handle_cold_attribute): Likewise.
8824
332f1d24
JJ
88252012-07-20 Jakub Jelinek <jakub@redhat.com>
8826
8827 PR c++/28656
8828 * c-common.c (check_function_nonnull): Handle multiple nonnull
8829 attributes properly.
8830
7ee2468b
SB
88312012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8832
8833 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8834 * c-ada-spec.c: Likewise.
8835 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8836
ee7b28eb
SB
88372012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8838
8839 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8840 Remove code conditional on it.
8841
6bdf3519
SB
88422012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8843
8844 * c-gimplify.c: Do not include basic-block.h.
8845 * c-common.c: Do not include linfuncs.h.
8846
532aafad
SB
88472012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8848
8849 * c-common.h: Include tree.h.
8850
8d0d1915
JM
88512012-07-02 Jason Merrill <jason@redhat.com>
8852
8853 PR c++/53524
8854 * c-common.c (get_priority): Call default_conversion.
8855
fbc873ad
UB
88562012-07-01 Uros Bizjak <ubizjak@gmail.com>
8857
8858 * c-pch.c (c_common_write_pch): Remove unused variables.
8859
d4a10d0a
SB
88602012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8861
8862 * cppspec.c: Moved from gcc/ to here.
8863
6f3a2e23
KT
88642012-06-27 Kai Tietz <ktietz@redhat.com>
8865
8866 PR preprocessor/37215
8867 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8868
8ca92d04
SB
88692012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8870
8871 * c-common.h (c_common_print_pch_checksum): Remove.
8872 * c-pch.c: Do not include output.h.
8873 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8874 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8875 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8876 (struct c_pch_header): Remove.
8877 (get_ident): Update gpch version.
8878 (pch_init): Do not print executable_checksum to asm_out_file.
8879 Do not fail if there is no asm_out_file to read back from. Set
8880 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8881 (c_common_write_pch): Verify that nothing was written to asm_out_file
8882 since pch_init was called. Do not write a c_pch_header, and do not
8883 copy from asm_out_file to the PCH.
8884 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8885 the content of asm_out_file from the PCH.
8886 (c_common_print_pch_checksum): Remove.
8887 * c-opts.c (c_common_init): Print out executable_checksum directly.
8888
70f42967
SB
88892012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8890
8891 * c-target.def (objc_declare_unresolved_class_reference,
8892 objc_declare_class_definition): Add new hooks.
8893
a8781821
SB
88942012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8895
8896 * c-lex.c: Do not include output.h.
8897 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8898 Remove uses of ASM_OUTPUT_IDENT.
8899
9e1a8dd1
RR
89002012-06-15 Marc Glisse <marc.glisse@inria.fr>
8901
8902 PR c++/51033
8903 * c-common.h (c_build_vec_perm_expr): Move decl here.
8904 * c-common.c (c_build_vec_perm_expr): Move definition
8905 here.
8906
6f07a821
SB
89072012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8908
8909 * c.opt (fconserve-space): Turn into a no-op.
8910
9faeb493 89112012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8912
8913 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8914 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8915 both the start and end of the function.
8916
a4b7d13c
SB
89172012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8918
8919 * c-common.c: Do not include output.h.
8920 * c-pragma.c: Likewise.
8921
c265f413
SA
89222012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8923
8924 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8925 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8926 (lang_decl_name): Handle namespace decls.
8927
be7a421e
SB
89282012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8929
8930 * c-ada-spec.c: Do not include output.h.
8931 * c-semantics.c: Likewise.
8932
65de6659
JM
89332012-05-29 Joseph Myers <joseph@codesourcery.com>
8934
8935 * c-common.c: Fix typo.
8936
ca5f4331
MM
89372012-05-29 Michael Matz <matz@suse.de>
8938
8939 * c-common.h (c_expand_decl): Remove prototype.
8940
4f7f7aca
MLI
89412012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8942
8943 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8944 * c-opts.c (c_common_handle_option): Remove code handling
8945 warn_missing_braces.
8946
4a792f9b
PC
89472012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8948
8949 PR c++/25137
8950 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8951 -Wmissing_braces.
8952
650dc14a
DS
89532012-05-22 Dodji Seketeli <dodji@redhat.com>
8954
8955 PR c++/53322
8956 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8957
9b095bf1
MLI
89582012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8959
8960 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8961 * c-opts.c (c_common_handle_option): Do not handle explicitly
8962 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8963
0b2c4be5
DS
89642012-05-16 Dodji Seketeli <dodji@redhat.com>
8965
8966 PR preprocessor/7263
ab20d992 8967 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8968 to cpp_classify_number. For diagnostics, use the precise location
8969 instead of the global input_location.
8970
a1bde5af
PC
89712012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8972
d02924ef 8973 PR c++/11856
a1bde5af
PC
8974 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8975
d1ede5f4
BS
89762012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8977
a1bde5af 8978 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8979
f2bc201f
MLI
89802012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8981
8982 PR 53063
8983 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8984 Wreorder): Use LangEnabledBy.
8985 * c-opts.c (c_common_handle_option): Do not enable them
8986 explicitly. Call lang-specific generated functions.
8987 (c_common_post_options): Do not set them here.
8988
95744782
MLI
89892012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8990
8991 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8992 Wmissing-field-initializers,Wmissing-parameter-type,
8993 Wold-style-declaration,Woverride-init): Use EnabledBy.
8994 * c-opts.c (c_common_post_options): Do not set here explicitly.
8995
7d5a5747
MLI
89962012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8997
8998 PR 53063
8999 * c-opts.c (c_common_handle_option): Use handle_generated_option
9000 to enable sub-options.
9001
5a3c9cf2
PC
90022012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
9003
9004 PR c++/53158
9005 * c-common.c (warnings_for_convert_and_check): Use warning_at.
9006
3ac8781c
RG
90072012-05-10 Richard Guenther <rguenther@suse.de>
9008
9009 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
9010 adjust commentary about TYPE_IS_SIZETYPE types.
9011
1e537948
MLI
90122012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
9013
9014 PR c++/53261
9015 * c-common.c (warn_logical_operator): Check that argument of
9016 integer_zerop is not NULL.
9017
f2c4a785
MLI
90182012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
9019
9020 PR c/43772
9021 * c-common.c (warn_logical_operator): Do not warn if either side
9022 is already true or false.
9023
50f305ca
MLI
90242012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
9025
9026 PR c/51712
9027 * c-common.c (expr_original_type): New.
9028 (shorten_compare): Do not warn for enumeration types.
9029
0c3641b0
MLI
90302012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
9031
9032 * c.opt (fpermissive): Add Var(flag_permissive).
9033
7edaa4d2
MG
90342012-04-30 Marc Glisse <marc.glisse@inria.fr>
9035
9036 PR c++/51033
9037 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
9038 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
9039
b9c8da34
DS
90402012-04-30 Dodji Seketeli <dodji@redhat.com>
9041
9042 Add -Wvarargs option
ab20d992 9043 * c.opt (Wvarargs): Define new option.
b9c8da34 9044
e6c69da0
MLI
90452012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9046
9047 * c-common.c (check_function_arguments): Replace
9048 Wmissing-format-attribute with Wsuggest-attribute=format.
9049
90137d8f
MLI
90502012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9051
9052 * c.opt (Wsuggest-attribute=format): New. Alias of
9053 Wmissing-format-attribute.
9054 * c-format.c (decode_format_type): Replace
9055 Wmissing-format-attribute with Wsuggest-attribute=format.
9056 (check_function_format): Likewise.
9057
9faeb493 90582012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9059
9060 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9061 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9062 * c.opt: Add Wliteral-suffix.
9063
c1771a20
MLI
90642012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9065
9066 PR c/44774
9067 * c.opt (Wpedantic): New.
9068 (pedantic): Alias Wpedantic.
9069 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9070 (c_common_post_options): Likewise.
9071 (sanitize_cpp_opts): Likewise.
9072 * c-lex.c (interpret_float): Likewise.
9073 * c-format.c (check_format_types): Likewise.
9074 * c-common.c (pointer_int_sum): Likewise.
9075 (c_sizeof_or_alignof_type): Likewise.
9076 (c_add_case_label): Likewise.
9077 (c_do_switch_warnings): Likewise.
9078 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9079
04b391c1
JM
90802012-04-15 Jason Merrill <jason@redhat.com>
9081
9082 PR c++/52818
9083 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9084 (C_STD_NAME): Distinguish between C++98 and C++11.
9085
ac868f29
EB
90862012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9087
9088 PR target/52624
9089 * c-common.h (uint16_type_node): Rename into...
9090 (c_uint16_type_node): ...this.
9091 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9092 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9093
fd4116f4
MLI
90942012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9095
9096 * c-common.c (warn_if_unused_value): Move definition to here.
9097 * c-common.h (warn_if_unused_value): Move declaration to here.
9098
573ac65e
WB
90992012-03-23 William Bader <williambader@hotmail.com>
9100
9101 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9102
552b8185
JM
91032012-03-20 Jason Merrill <jason@redhat.com>
9104
9105 * c-common.h (enum cxx_dialect): Add cxx1y.
9106 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9107 test.
9108 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9109 * c-opts.c (c_common_post_options): Likewise.
9110 (set_std_cxx1y): New.
9111 (c_common_handle_option): Call it.
9112 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9113
04398fa8
PC
91142012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9115
9116 PR c++/14710
9117 * c.opt ([Wuseless-cast]): Add.
9118
d2a12ae7
RG
91192012-03-16 Richard Guenther <rguenther@suse.de>
9120
9121 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9122
a12bf402
MLI
91232012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9124
9125 PR c++/44783
9126 * c.opt (ftemplate-backtrace-limit) Add.
9127
5c30094f
RO
91282012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9129
9130 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9131 handling.
9132 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9133 (init_pragma): Don't register extern_prefix.
9134
21fa2faf
RG
91352012-03-12 Richard Guenther <rguenther@suse.de>
9136
9137 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9138 (builtin_type_for_size): Likewise.
9139
e3793c6f
JJ
91402012-02-13 Jakub Jelinek <jakub@redhat.com>
9141
9142 PR c++/52215
9143 * c-common.c (sync_resolve_params): Don't decide whether to convert
9144 or not based on TYPE_SIZE comparison, convert whenever arg_type
9145 is unsigned INTEGER_TYPE.
9146
93286335
PC
91472012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9148
9149 PR c/52118
9150 * c.opt ([Wunused-local-typedefs]): Fix description.
9151
7a421706
MS
91522012-01-24 Mike Stump <mikestump@comcast.net>
9153
9154 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9155 exactly.
9156
ba9b1f11
RG
91572012-01-18 Richard Guenther <rguenther@suse.de>
9158
9159 * c-opts.c (c_common_post_options): Reset LTO flags if
9160 we are about to generate a PCH.
9161
465406be
PC
91622012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9163
9164 PR c++/51777
9165 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9166 use pp_unsigned_wide_integer.
9167
aee15221
RG
91682012-01-10 Richard Guenther <rguenther@suse.de>
9169
9170 PR middle-end/51806
9171 * c-opts.c (c_common_handle_option): Move -Werror handling
9172 to language independent code.
9173
5720c0dc
RG
91742012-01-05 Richard Guenther <rguenther@suse.de>
9175
9176 PR middle-end/51764
9177 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9178 from common.opt.
9179
73ac190a
PC
91802011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9181
9182 PR c++/51316
9183 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9184 of array types with an unknown bound.
9185
48b0b196
JM
91862011-12-20 Joseph Myers <joseph@codesourcery.com>
9187
9188 * c-common.c (flag_isoc99): Update comment to refer to C11.
9189 (flag_isoc1x): Change to flag_isoc11.
9190 * c-common.h (flag_isoc99): Update comment to refer to C11.
9191 (flag_isoc1x): Change to flag_isoc11.
9192 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9193 C11.
9194 * c-opts.c (set_std_c1x): Change to set_std_c11.
9195 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9196 Call set_std_c11.
9197 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9198 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9199 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9200 standard.
9201 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9202 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9203 (std=gnu1x): Make alias of std=gnu11.
9204
d58d6eb5
JM
92052011-12-19 Jason Merrill <jason@redhat.com>
9206
9207 PR c++/51228
9208 * c-common.c (handle_transparent_union_attribute): Check the first
9209 field if the type is complete.
9210
b3908fcc
JW
92112011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9212
9213 PR libstdc++/51365
9214 * c-common.c (RID_IS_FINAL): Add.
9215 * c-common.h (RID_IS_FINAL): Add.
9216
fea3ca91
IS
92172011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9218
9219 * c.opt (fgnu-runtime): Provide full description.
9220 (fnext-runtime): Likewise.
9221 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9222
62bad7cd
AM
92232011-11-28 Andrew MacLeod <amacleod@redhat.com>
9224
9225 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9226 predefines in one place. Add LOCK_FREE predefines.
9227 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9228 new func.
9229
c466c4ff
AM
92302011-11-24 Andrew MacLeod <amacleod@redhat.com>
9231
9232 PR c/51256
9faeb493 9233 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9234 conditions
9faeb493
UB
9235 (resolve_overloaded_atomic_exchange,
9236 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9237 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9238 error_mark_node for error conditions.
9faeb493 9239
a5952633
RG
92402011-11-08 Richard Guenther <rguenther@suse.de>
9241
9242 PR middle-end/51010
ab20d992 9243 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9244
0a35513e
AH
92452011-11-07 Richard Henderson <rth@redhat.com>
9246 Aldy Hernandez <aldyh@redhat.com>
9247 Torvald Riegel <triegel@redhat.com>
9248
9249 Merged from transactional-memory.
9250
9251 * c-common.c (handle_tm_wrap_attribute,
9252 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9253 (struct c_common_reswords): Added __transaction* keywords.
9254 (struct c_common_attribute_table): Added transaction* and tm_regparm
9255 attributes.
9256 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9257 masks.
9258 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9259 find_tm_attribute): Declare.
9260
6d87092d
JM
92612011-11-07 Jason Merrill <jason@redhat.com>
9262
9263 PR c++/35688
9264 * c-common.c, c-common.h: Revert yesterday's changes.
9265
8e7860a1
JM
92662011-11-06 Jason Merrill <jason@redhat.com>
9267
9268 PR c++/35688
9269 * c-common.c (decl_has_visibility_attr): Split out from...
9270 (c_determine_visibility): ...here.
9271 * c-common.h: Declare it.
9272
d19fa6b5
JM
92732011-11-06 Joseph Myers <joseph@codesourcery.com>
9274
9275 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9276 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9277 type.
9278 (check_user_alignment): New. Split out of
9279 handle_aligned_attribute. Disallow integer constants with
9280 noninteger types. Conditionally allow zero.
9281 (handle_aligned_attribute): Use check_user_alignment.
9282 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9283
86951993
AM
92842011-11-06 Andrew MacLeod <amacleod@redhat.com>
9285 Richard Henderson <rth@redhat.com>
9286
9287 Merged from cxx-mem-model.
9288
9289 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9290 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9291 parameters that are the same type size.
9292 (get_atomic_generic_size): New. Find size of generic
9293 atomic function parameters and do typechecking.
9294 (add_atomic_size_parameter): New. Insert size into parameter list.
9295 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9296 either __atomic_exchange_n or external library call.
9faeb493 9297 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9298 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9299 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9300 __atomic_load_n or an external library call.
9301 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9302 __atomic_store_n or an external library call.
9303 (resolve_overloaded_builtin): Handle new __atomic builtins.
9304
cf9e9959
EB
93052011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9306
9307 PR c++/50608
9308 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9309 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9310 <INDIRECT_REF>: Return the argument.
9311 <ARRAY_REF>: Remove special code for negative offset.
9312 Call fold_build_pointer_plus instead of size_binop.
9313 (fold_offsetof): Remove STOP_REF argument and adjust.
9314 * c-common.h (fold_offsetof_1): Declare.
9315 (fold_offsetof): Remove STOP_REF argument.
9316
25339f10
JM
93172011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9318
9319 PR c++/50810
9320 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9321 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9322 Wnarrowing for C++0x and C++98.
9323 * c.opt ([Wnarrowing]): Update.
9324
89401152
PC
93252011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9326
9327 PR c++/44277
9328 * c.opt: Add Wzero-as-null-pointer-constant.
9329
97e3ad20
JM
93302011-10-31 Jason Merrill <jason@redhat.com>
9331
15694fdd
JM
9332 * c.opt (-fdeduce-init-list): Off by default.
9333
97e3ad20
JM
9334 PR c++/50920
9335 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9336 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9337 and -Wc++11-compat.
9338 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9339
fb9120e3
RAV
93402011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9341
9342 PR c++/30066
9343 * c.opt (fvisibility-inlines-hidden): Description change.
9344
3ce4f9e4
ESR
93452011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9346
9347 Implement C++11 user-defined literals.
9348 * c-common.c (build_userdef_literal): New.
9349 * c-common.def: New tree code.
9350 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9351 * c-lex.c (interpret_float): Add suffix parm.
9352 (c_lex_with_flags): Build literal tokens.
9353
5f53c243
PC
93542011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9355
9356 PR c++/50841
9357 Revert:
9358 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9359
9360 PR c++/50810
9361 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9362 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9363 Wnarrowing for C++0x and C++98.
9364 * c.opt ([Wnarrowing]): Update.
9365
263734e1
PC
93662011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9367
9368 PR c++/50810
9369 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9370 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9371 Wnarrowing for C++0x and C++98.
9372 * c.opt ([Wnarrowing]): Update.
9373
d2e312d7
PC
93742011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9375
9376 PR c++/45385
9377 * c-common.c (conversion_warning): Remove code looking for
9378 artificial operands.
9379
d17687f6
DS
93802011-10-18 Dodji Seketeli <dodji@redhat.com>
9381
9382 PR bootstrap/50760
9383 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9384 !NO_IMPLICIT_EXTERN_C.
d17687f6 9385
fc8396e9
PC
93862011-10-17 Michael Spertus <mike_spertus@symantec.com>
9387
9388 * c-common.c (c_common_reswords): Add __bases,
9389 __direct_bases.
9390 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9391
93922011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9393
9394 PR c++/50757
9395 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9396
847e697a
TT
93972011-10-15 Tom Tromey <tromey@redhat.com>
9398 Dodji Seketeli <dodji@redhat.com>
9399
9400 * c.opt (fdebug-cpp): New option.
9401 * c-opts.c (c_common_handle_option): Handle the option.
9402 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9403 output stream in parameter. Factorized from ...
9404 (maybe_print_line): ... this. Dump location debug information when
9405 -fdebug-cpp is in effect.
9406 (print_line_1): New static function. Takes an output stream in
9407 parameter. Factorized from ...
9408 (print_line): ... here. Dump location information when -fdebug-cpp
9409 is in effect.
9410 (scan_translation_unit): Dump location information when
9411 -fdebug-cpp is in effect.
9412
92582b75
TT
94132011-10-15 Tom Tromey <tromey@redhat.com>
9414 Dodji Seketeli <dodji@redhat.com>
9415
9416 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9417 without argument.
9418 * c-opts.c (c_common_handle_option)<case
9419 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9420 cases. Handle -ftrack-macro-expansion with and without argument.
9421
46427374
TT
94222011-10-15 Tom Tromey <tromey@redhat.com>
9423 Dodji Seketeli <dodji@redhat.com>
9424
9425 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9426 (print_line, cb_define, do_line_change): Adjust to avoid touching
9427 the internals of struct line_map. Use the public API instead.
9428 * c-pch.c (c_common_read_pch): Likewise.
9429 * c-lex.c (fe_file_change): Likewise.
9430
fc8396e9
PC
94312011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9432
9433 PR c++/17212
9434 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9435
94362011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9437
9438 PR c++/33067
9439 * c-pretty-print.c (pp_c_floating_constant): Output
9440 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9441
e79983f4
MM
94422011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9443
9444 * c-common.c (def_builtin_1): Delete old interface with two
9445 parallel arrays to hold standard builtin declarations, and replace
9446 it with a function based interface that can support creating
9447 builtins on the fly in the future. Change all uses, and poison
9448 the old names. Make sure 0 is not a legitimate builtin index.
9449 * c-omp.c (c_finish_omp_barrier): Ditto.
9450 (c_finish_omp_taskwait): Ditto.
9451 (c_finish_omp_flush): Ditto.
9452
6637388f
TG
94532011-10-11 Tristan Gingold <gingold@adacore.com>
9454
9455 * c.opt: (fallow-parameterless-variadic-functions): New.
9456
3797cb21
DS
94572011-09-08 Dodji Seketeli <dodji@redhat.com>
9458
9459 PR c++/33255 - Support -Wunused-local-typedefs warning
9460 * c-common.h (struct c_language_function::local_typedefs): New
9461 field.
9faeb493
UB
9462 (record_locally_defined_typedef, maybe_record_typedef_use)
9463 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9464 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9465 (maybe_record_typedef_use)
9466 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9467 * c.opt: Declare new -Wunused-local-typedefs flag.
9468
693ddb1b
EB
94692011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9470
9471 PR middle-end/50266
9472 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9473 computations.
9474
830c740f
RG
94752011-09-05 Richard Guenther <rguenther@suse.de>
9476
9477 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9478 of integer_minus_one_node for empty array upper bounds.
9479
892a371f
DS
94802011-08-28 Dodji Seketeli <dodji@redhat.com>
9481
9482 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9483 it's the first time it's being called on this main TU.
9484
0e3fdb48
RB
94852011-08-24 Richard Guenther <rguenther@suse.de>
9486
9487 PR c/49396
9488 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9489
94902011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9491
9492 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9493 defined in cpp_init_builtins and c_cpp_builtins.
9494
d4a83c10
JM
94952011-08-19 Joseph Myers <joseph@codesourcery.com>
9496
9497 * c-common.c (c_common_reswords): Add __builtin_complex.
9498 * c-common.h (RID_BUILTIN_COMPLEX): New.
9499
bbceee64
JM
95002011-08-18 Joseph Myers <joseph@codesourcery.com>
9501
9502 * c-common.c (c_common_reswords): Add _Noreturn.
9503 (keyword_is_function_specifier): Handle RID_NORETURN.
9504 * c-common.h (RID_NORETURN): New.
9505
3f8257db 95062011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9507
9508 * c-common.c (unsafe_conversion_p): New function. Check if it is
9509 unsafe to convert an expression to the type.
9510 (conversion_warning): Adjust, use unsafe_conversion_p.
9511 * c-common.h (unsafe_conversion_p): New function declaration.
9512
20906c66
JJ
95132011-08-02 Jakub Jelinek <jakub@redhat.com>
9514
9515 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9516 (c_finish_omp_taskyield): New prototype.
9517 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9518 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9519 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9520 or RHS1 have side-effects, evaluate those too in the right spot,
9521 if it is a decl and LHS is also a decl, error out if they
9522 aren't the same.
9523 (c_finish_omp_taskyield): New function.
9524 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9525 * c-pragma.c (omp_pragmas): Add taskyield.
9526 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9527 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9528 PRAGMA_OMP_CLAUSE_MERGEABLE.
9529
770e5a2e
DS
95302011-07-25 Dodji Seketeli <dodji@redhat.com>
9531
9532 * c-common.h (set_underlying_type): Remove parm name from
9533 declaration.
9534
1baae426
RG
95352011-07-25 Romain Geissler <romain.geissler@gmail.com>
9536
9537 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9538
fcb21722
JM
95392011-07-22 Jason Merrill <jason@redhat.com>
9540
76f86d00
JM
9541 PR c++/49793
9542 * c.opt (Wnarrowing): New.
9543
3a636414
JM
9544 PR c++/30112
9545 * c-common.h: Declare c_linkage_bindings.
9546 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9547
fcb21722
JM
9548 PR c++/49813
9549 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9550 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9551 as flag_isoc99 for 'restrict'.
9552 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9553
02614448
ILT
95542011-07-21 Ian Lance Taylor <iant@google.com>
9555
9556 PR middle-end/49705
9557 * c-common.c (c_disable_warnings): New static function.
9558 (c_enable_warnings): New static function.
9559 (c_fully_fold_internal): Change local unused_p to bool. Call
9560 c_disable_warnings and c_enable_warnings rather than change
9561 c_inhibit_evaluation_warnings.
9562
34429675
JM
95632011-07-20 Jason Merrill <jason@redhat.com>
9564
9565 PR c++/6709 (DR 743)
9566 PR c++/42603 (DR 950)
9567 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9568 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9569 (CPP_DECLTYPE): New.
9570 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9571
5d49b6a7
RG
95722011-07-19 Richard Guenther <rguenther@suse.de>
9573
9574 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9575 * c-omp.c (c_finish_omp_for): Likewise.
9576
e84a58ff
EB
95772011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9578
9579 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9580 body on the next line.
9581
329af3c7
JM
95822011-07-08 Jason Merrill <jason@redhat.com>
9583
4063e61b
JM
9584 PR c++/45437
9585 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9586
329af3c7
JM
9587 PR c++/49673
9588 * c-common.c (c_apply_type_quals_to_decl): Don't check
9589 TYPE_NEEDS_CONSTRUCTING.
9590
1a072294
RG
95912011-07-06 Richard Guenther <rguenther@suse.de>
9592
9593 * c-common.c (c_common_nodes_and_builtins):
9594 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9595
fce5dddd
RG
95962011-07-05 Richard Guenther <rguenther@suse.de>
9597
9598 * c-common.c (c_common_nodes_and_builtins): Build all common
9599 tree nodes first.
9600
45d439ac
JJ
96012011-06-27 Jakub Jelinek <jakub@redhat.com>
9602
56300785
JJ
9603 * c-common.h (c_tree_chain_next): New static inline function.
9604
45d439ac
JJ
9605 * c-common.c (check_builtin_function_arguments): Handle
9606 BUILT_IN_ASSUME_ALIGNED.
9607
e0a8ecf2
AM
96082011-06-21 Andrew MacLeod <amacleod@redhat.com>
9609
9610 * c-common.c: Add sync_ or SYNC__ to builtin names.
9611 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9612
96132011-06-20 Pierre Vittet <piervit@pvittet.com>
9614
9615 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9616 handler.
9617 (gen_pragma_handler): New union.
9618 (internal_pragma_handler): New type.
9619 (c_register_pragma_with_data)
9620 (c_register_pragma_with_expansion_and_data): New functions.
9621
9622 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9623 (c_register_pragma, c_register_pragma_with_expansion)
9624 (c_invoke_pragma_handler): Changed to work with
9625 internal_pragma_handler.
9626 (c_register_pragma_with_data)
9627 (c_register_pragma_with_expansion_and_data): New functions.
9628
677f3fa8
JM
96292011-06-14 Joseph Myers <joseph@codesourcery.com>
9630
9631 * c-common.c: Include common/common-target.h.
9632 (handle_section_attribute): Use
9633 targetm_common.have_named_sections.
9634 * c-cppbuiltin.c: Include common/common-target.h.
9635 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9636
d7fc8c14
RG
96372011-06-10 Richard Guenther <rguenther@suse.de>
9638
9639 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9640 to print a IDENTIFIER_NODE.
9641
10e48e39
RO
96422011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9643 Joseph Myers <joseph@codesourcery.com>
9644
9645 * c.opt (fbuilding-libgcc): New option.
9646 * c-cppbuiltin.c (c_cpp_builtins): Define
9647 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9648
6976ae51
JM
96492011-06-07 Jason Merrill <jason@redhat.com>
9650
3ff60975
JM
9651 * c-common.c (max_tinst_depth): Lower default to 900.
9652
6976ae51
JM
9653 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9654
009db074
RG
96552011-06-07 Richard Guenther <rguenther@suse.de>
9656
9657 * c-common.c (c_common_nodes_and_builtins): Do not set
9658 size_type_node or call set_sizetype.
9659
b4592b92
DS
96602011-06-07 Dodji Seketeli <dodji@redhat.com>
9661
9662 PR debug/49130
9663 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9664 type when using pointer comparison to compare types.
b4592b92 9665
014ab419
JW
96662011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9667
9668 * c.opt: Add -Wdelete-non-virtual-dtor.
9669 * c-opts.c (c_common_handle_option): Include it in -Wall.
9670
4f60111f
NF
96712011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9672
9673 PR bootstrap/49190
9674
9675 Revert:
9676 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9677
9678 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9679 not tree_common.
9680
4cc4f2f4
JJ
96812011-05-27 Jakub Jelinek <jakub@redhat.com>
9682
9683 PR c++/49165
9684 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9685 C++ don't call c_common_truthvalue_conversion on void type arms.
9686
38e01f9e
NF
96872011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9688
9689 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9690 (stmt_list_stack): Define.
9691 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9692 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9693
92e948a8
NF
96942011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9695
9696 * c-common.c (warning_candidate_p): Check for BLOCKs.
9697
a2fc3e63
NF
96982011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9699
9700 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9701 not tree_common.
9702
0957c029
JJ
97032011-05-25 Jakub Jelinek <jakub@redhat.com>
9704
9705 * c-common.c (def_fn_type): Remove extra va_end.
9706
828fb3ba
JM
97072011-05-23 Jason Merrill <jason@redhat.com>
9708
9709 PR c++/48106
9710 * c-common.c (c_common_get_narrower): New.
9711 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9712
dde05067
NF
97132011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9714
9715 * c-common.h (check_function_arguments): Tweak prototype of
9716 check_function_arguments.
9717 * c-common.c (check_function_arguments): Likewise. Adjust
9718 calls to check_function_nonnull, check_function_format, and
9719 check_function_sentinel.
9720 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9721 separate attributes and typelist arguments. Use
9722 FOREACH_FUNCTION_ARGS to iterate over argument types.
9723
3c0d13bf
PC
97242011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9725
9726 * c-common.c (c_common_reswords): Reorder.
9727 * c-common.h (rid): Likewise.
9728
8242dd04
NF
97292011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9730
9731 * c-common.c (def_fn_type): Don't call build_function_type, call
9732 build_function_type_array or build_varargs_function_type_array
9733 instead.
9734 (c_common_nodes_and_builtins): Likewise.
9735
3d528853
NF
97362011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9737
9738 * c-common.c (c_add_case_label): Omit the loc argument to
9739 build_case_label.
9740 * c-common.h (build_case_label): Remove.
9741 * c-semantics.c (build_case_label): Remove.
9742
a04a722b
JM
97432011-05-05 Joseph Myers <joseph@codesourcery.com>
9744
9745 * c-objc.h (objc_start_method_definition): Update prototype.
9746 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9747
e19a18d4
NF
97482011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9749
9750 * c-common.c (check_main_parameter_types): Reindent. Don't use
9751 TYPE_ARG_TYPES directly.
9752 (handle_nonnull_attribute): Likewise.
9753 (sync_resolve_params): Likewise.
9754 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9755 to check_format_string.
9756 (handle_format_attribute): Likewise.
9757 (check_format_string): Take a function type to examine instead of
9758 a type list. Use a function_arg_iterator to step through argument
9759 types.
9760
c62c040f
RG
97612011-05-04 Richard Guenther <rguenther@suse.de>
9762
9763 * c-common.c (fix_string_type): Use size_int for index type bounds.
9764 (start_fname_decls): Do not pass NULL to build_int_cst.
9765 (c_init_attributes): Likewise.
9766 * c-lex.c (c_lex_with_flags): Likewise.
9767
c12ff9d8
JM
97682011-04-27 Jason Merrill <jason@redhat.com>
9769
9770 * c-common.c (make_tree_vector_from_list): New.
9771 * c-common.h: Declare it.
9772
304dfbe3
RG
97732011-04-26 Richard Guenther <rguenther@suse.de>
9774
9775 PR preprocessor/48248
9776 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9777 for output size with -P.
9778
3c0d13bf
PC
97792011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9780
9781 * c-common.c (struct c_common_resword): Add __underlying_type.
9782 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9783
04695783
JM
97842011-04-20 Jim Meyering <meyering@redhat.com>
9785
9786 * c-format.c (init_dollar_format_checking): Remove useless
9787 if-before-free.
9788
0dc33c3c
NP
97892011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9790
9791 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9792 (objc_detect_field_duplicates): New.
0dc33c3c 9793 * stub-objc.c: Likewise.
3c0d13bf 9794
c59633d9
NP
97952011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9796
9797 * stub-objc.c (objc_declare_protocols): Renamed to
9798 objc_declare_protocol.
9799 * c-objc.h: Likewise.
3c0d13bf 9800
32dabdaf
NP
98012011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9802
9803 * stub-objc.c (objc_declare_class): Updated argument name.
9804
81f653d6
NF
98052011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9806
9807 * c-common.h (c_common_init_ts): Declare.
9808 * c-common.c (c_common_init_ts): Define.
9809
eb345401
NP
98102011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9811
9812 * c-objc.h (objc_build_message_expr): Updated prototype.
9813 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9814
a358e188
MJ
98152011-04-12 Martin Jambor <mjambor@suse.cz>
9816
9817 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9818 of cgraph_node.
9819
e6313a78
RG
98202011-04-11 Richard Guenther <rguenther@suse.de>
9821
9822 * c-common.c (complete_array_type): Build a range type of
9823 proper type.
9824
dcf0c47e
NF
98252011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9826
9827 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9828 (handle_type_generic_attribute): Likewise.
9829
1ee44b26
JM
98302011-04-07 Jason Merrill <jason@redhat.com>
9831
9832 PR c++/48450
9833 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9834 conversion from C++0x scoped enum.
9835
acce4e77
JM
98362011-04-06 Joseph Myers <joseph@codesourcery.com>
9837
9838 * c-target-def.h: New file.
9839 * c-target.def: New file.
9840 * c-target.h: New file.
9841 * c-common.c (targetcm): Don't define here.
9842 * c-common.h (default_handle_c_option): Declare.
9843 * c-format.c: Include c-target.h instead of target.h.
9844 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9845 include tm.h.
9846 (default_handle_c_option): Move from targhooks.c.
9847
e2eefb55
JJ
98482011-03-29 Jakub Jelinek <jakub@redhat.com>
9849
9850 PR preprocessor/48248
9851 * c-ppoutput.c (print): Add src_file field.
9852 (init_pp_output): Initialize it.
9853 (maybe_print_line): Don't optimize by adding up to 8 newlines
9854 if map->to_file and print.src_file are different file.
9855 (print_line): Update print.src_file.
9856
ba78087b
KT
98572011-03-25 Kai Tietz <ktietz@redhat.com>
9858
9859 * c-ada-spec.c (compare_comment): Use filename_cmp
9860 instead of strcmp for filename.
9861
0edf1bb2
JL
98622011-03-25 Jeff Law <law@redhat.com>
9863
adfac8df 9864 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9865
c7dc8804
JM
98662011-03-25 Jason Merrill <jason@redhat.com>
9867
9868 * c.opt: Add -std=c++03.
9869
d1d879b1
EB
98702011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9871
9872 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9873
3f8257db 98742011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9875
9876 PR target/12171
5050afdf
KT
9877 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9878 Display allowed attributes for function pointer types.
9879 (pp_c_attributes_display): New function to display
9880 attributes having affects_type_identity flag set to true.
9881 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9882
62d784f7
KT
9883 * c-common.c (c_common_attribute_table):
9884 Add new element.
9885 (c_common_format_attribute_table): Likewise.
9886
82d37118
JM
98872011-03-18 Jason Merrill <jason@redhat.com>
9888
49a000c3
JM
9889 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9890 * c-common.h: Don't declare it here.
9891 * c-common.c: Or define it here.
9892 * c-opts.c (c_common_handle_option): Or set it here.
9893
82d37118
JM
9894 PR c++/35315
9895 * c-common.c (handle_transparent_union_attribute): Don't
9896 make a duplicate type in C++.
9897
17bc631c
JM
98982011-03-15 Jason Merrill <jason@redhat.com>
9899
9900 * c-common.c (max_constexpr_depth): New.
9901 * c-common.h: Declare it.
9902 * c-opts.c (c_common_handle_option): Set it.
9903 * c.opt (fconstexpr-depth): New option.
9904
1b9b91a6
JM
99052011-03-11 Jason Merrill <jason@redhat.com>
9906
f231b5ff
JM
9907 * c-common.c (attribute_takes_identifier_p): Add missing const.
9908
1b9b91a6
JM
9909 PR c++/46803
9910 * c-common.c (attribute_takes_identifier_p): Assume that an
9911 unknown attribute takes an identifier.
9912
a19e4d44
NF
99132011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9914
9915 PR c/47786
9916 * c-common.c (c_type_hash): Call list_length instead of iterating
9917 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9918
982d62f6
JJ
99192011-02-19 Jakub Jelinek <jakub@redhat.com>
9920
9921 PR c/47809
9922 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9923
0a256240
NP
99242011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9925
9926 * c.opt (fobjc-abi-version=) New.
9927 (fobjc-nilcheck): New.
9928
ba9e6dd5
NF
99292011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9930
9931 PR c++/46890
9932 * c-common.h (keyword_is_decl_specifier): Declare.
9933 * c-common.c (keyword_is_decl_specifier): Define.
9934 (keyword_is_function_specifier): New function.
9935
7273813a
JJ
99362011-01-26 Jakub Jelinek <jakub@redhat.com>
9937
9938 PR c/47473
9939 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9940 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9941 REAL_TYPE.
9942
908ef79b
AC
99432011-01-26 Arnaud Charlet <charlet@adacore.com>
9944
9945 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9946
237e9384
JJ
99472011-01-26 Jakub Jelinek <jakub@redhat.com>
9948
9949 PR pch/47430
9950 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9951 after init_c_lex if pch_file is set.
9952
47ea1edf
DK
99532011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9954
d4dba752 9955 PR c++/43601
47ea1edf
DK
9956 * c.opt (-fkeep-inline-dllexport): New switch.
9957
2aa9c6ae
RG
99582011-01-12 Richard Guenther <rguenther@suse.de>
9959
9960 PR middle-end/32511
9961 * c-common.c (handle_weak_attribute): Warn instead of error
9962 on declaring an inline function weak.
9963
7bd11157
TT
99642011-01-05 Tom Tromey <tromey@redhat.com>
9965
9966 * c-common.h (lvalue_error): Update.
9967 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9968 not error.
9969
0e66e494 99702010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9971
b4f588c4
NP
9972 PR objc/47075
9973 * c-objc.h (objc_finish_message_expr): Added argument to
9974 prototype.
9975
f4da8dce
NF
99762010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9977
9978 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9979 Use prototype_p.
9980
46270f14
NP
99812010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9982
9983 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9984 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9985
4816c593
NF
99862010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9987
9988 * c-common.h (readonly_error): Declare.
9989 * c-common.c (readonly_error): Define.
9990
7a6daeb0
NF
99912010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9992
9993 * c-common.h (invalid_indirection_error): Declare.
9994 * c-common.c (invalid_indirection_error): Define.
9995
892f6119
RG
99962010-12-03 Richard Guenther <rguenther@suse.de>
9997
9998 PR c/46745
9999 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
10000 (pp_c_unary_expression): Likewise.
10001 (pp_c_expression): Likewise.
10002
6c39e757
NP
100032010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
10004
10005 * c-common.h (objc_finish_function): New.
10006 (objc_non_volatilized_type): Removed.
10007 (objc_type_quals_match): Removed.
10008 * stub-objc.c (objc_finish_function): New.
10009 (objc_non_volatilized_type): Removed.
10010 (objc_type_quals_match): Removed.
9faeb493 10011
7c475d11
JM
100122010-11-30 Joseph Myers <joseph@codesourcery.com>
10013
10014 * c-common.h (parse_optimize_options): Declare.
10015 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
10016 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
10017
71f3e391
JM
100182010-11-29 Joseph Myers <joseph@codesourcery.com>
10019
10020 * c-opts.c (check_deps_environment_vars): Use getenv instead of
10021 GET_ENVIRONMENT.
10022 * c-pch.c (O_BINARY): Don't define here.
10023 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
10024
d5fabb58
JM
100252010-11-25 Joseph Myers <joseph@codesourcery.com>
10026
10027 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
10028 targetm.except_unwind_info.
10029
299404a1
JM
100302010-11-23 Joseph Myers <joseph@codesourcery.com>
10031
10032 * c-opts.c (c_common_handle_option): Pass location to
10033 set_struct_debug_option.
10034
c98cd5bf
JM
100352010-11-23 Joseph Myers <joseph@codesourcery.com>
10036
10037 * c-common.c (visibility_options): Move from ../opts.c.
10038 * c-common.h (struct visibility_flags, visibility_options):
10039 Declare here.
10040 * c-opts.c (finish_options): Rename to c_finish_options.
10041 (c_common_init): Update call to finish_options.
10042
a9546771
NP
100432010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
10044
10045 PR objc/34033
10046 * c-lex.c (lex_string): Check that each string in an Objective-C
10047 string concat sequence starts with either one or zero '@', and
10048 that there are no spurious '@' signs at the end.
10049
24a57808
JM
100502010-11-20 Joseph Myers <joseph@codesourcery.com>
10051
10052 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10053 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10054 HANDLE_PRAGMA_VISIBILITY.
10055 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10056 HANDLE_PRAGMA_VISIBILITY): Don't define.
10057 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10058
a9aa2c3a
NF
100592010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10060
10061 PR c++/16189
10062 PR c++/36888
10063 PR c++/45331
10064 * c-common.h (keyword_begins_type_specifier): Declare.
10065 (keyword_is_storage_class_specifier): Declare.
10066 (keyword_is_type_qualifier): Declare.
10067 * c-common.c (keyword_begins_type_specifier): New function.
10068 (keyword_is_storage_class_specifier): New function.
10069 (keyword_is_type_qualifier): Declare.
10070
5386338c
JM
100712010-11-19 Joseph Myers <joseph@codesourcery.com>
10072
10073 PR c/46547
10074 * c-common.c (in_late_binary_op): Define.
10075 (c_common_truthvalue_conversion): Check in_late_binary_op before
10076 calling c_save_expr.
10077 * c-common.h (in_late_binary_op): Declare.
10078
69ccdddb
JM
100792010-11-19 Joseph Myers <joseph@codesourcery.com>
10080
10081 * c-opts.c (c_common_handle_option): Update calls to
10082 set_struct_debug_option.
10083
6b192a09
NP
100842010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10085
10086 * c-common.h (objc_declare_protocols): Added additional argument.
10087 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10088
fb52b50a
NF
100892010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10090
10091 PR c/33193
10092 * c-common.h (build_real_imag_expr): Declare.
10093 * c-semantics.c (build_real_imag_expr): Define.
10094
b37421c6
JM
100952010-11-17 Joseph Myers <joseph@codesourcery.com>
10096
10097 * c-opts.c (c_common_parse_file): Take no arguments.
10098 * c-common.h (c_common_parse_file): Update prototype.
10099
07078664
JJ
101002010-11-16 Jakub Jelinek <jakub@redhat.com>
10101
10102 PR c++/46401
10103 * c-common.c (warning_candidate_p): Don't track non-const calls
10104 or STRING_CSTs.
10105
c6a13190
ILT
101062010-11-15 Ian Lance Taylor <iant@google.com>
10107
10108 * c-lex.c (init_c_lex): Set macro debug callbacks if
10109 flag_dump_go_spec is set.
10110
925e8657
NP
101112010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10112
10113 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10114 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10115
bb0a9581
NF
101162010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10117
10118 PR preprocessor/45038
10119 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10120 dialects.
10121
c5fa0890
JM
101222010-11-12 Joseph Myers <joseph@codesourcery.com>
10123
10124 * c-common.h (c_family_lang_mask): Declare.
10125 * c-opts.c (c_family_lang_mask): Make extern.
10126 * c-pragma.c (handle_pragma_diagnostic): Use
10127 control_warning_option.
10128
a4d8c676
JM
101292010-11-12 Joseph Myers <joseph@codesourcery.com>
10130
10131 * c-common.c (parse_optimize_options): Update call to
10132 decode_options.
10133 * c-common.h (c_common_handle_option): Update prototype.
10134 * c-opts.c (c_common_handle_option): Take location_t parameter and
10135 pass it to other functions.
10136
f954bd2c
JM
101372010-11-11 Joseph Myers <joseph@codesourcery.com>
10138
10139 * c-opts.c (warning_as_error_callback): Remove.
10140 (c_common_initialize_diagnostics): Don't call
10141 register_warning_as_error_callback.
10142 (c_common_handle_option): Handle -Werror=normalized= here.
10143
d8a07487
JM
101442010-11-10 Joseph Myers <joseph@codesourcery.com>
10145
10146 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10147 in diagnostic.
10148 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10149 letter.
10150 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10151 Remove trailing '.' from diagnostics.
10152 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10153
d5478783
JM
101542010-11-10 Joseph Myers <joseph@codesourcery.com>
10155
10156 * c-common.c (parse_optimize_options): Pass global_dc to
10157 decode_options.
10158 * c-opts.c (c_common_handle_option): Pass &global_options to
10159 set_Wstrict_aliasing.
10160 * c.opt (v): Don't mark Common or document here.
10161
91ebb981
IS
101622010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10163
10164 PR target/44981
10165 * c-format.c (format_type): New type gcc_objc_string_format_type.
10166 (valid_stringptr_type_p): New.
10167 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10168 (check_format_string): Pass expected type, use
91ebb981
IS
10169 valid_stringptr_type_p (), check that the format string types are
10170 consistent with the format specification.
10171 (decode_format_attr): Warn if NSString is used outside objective-c.
10172 (format_types_orig): Add NSString.
10173 (format_name): New.
10174 (format_flags): New.
10175 (check_format_arg): Handle format strings requiring an external parser.
10176 first_target_format_type: New variable.
10177 (handle_format_attribute): Set up first_target_format_type, pass the
10178 expected format arg string type to check_format_string().
ab20d992 10179 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10180 * stub-objc.c (objc_string_ref_type_p): New.
10181 (objc_check_format_arg): New.
10182
bede2adc
NP
101832010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10184
9faeb493 10185 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10186 * c-common.h (objc_build_class_component_ref): New.
10187 * stub-objc.c (objc_build_class_component_ref): New.
10188
9a179d01
NP
101892010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10190
10191 * c.opt (Wproperty-assign-default): New option.
10192
22d8d616
NP
101932010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10194
10195 Implemented -fobjc-std=objc1 flag.
10196 * c.opt (fobjc-std=objc1): New option.
10197
2debdb4f
NP
101982010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10199
10200 Implemented format and noreturn attributes for Objective-C methods.
10201 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10202 attribute for Objective-C methods.
10203
ec52b111
JM
102042010-10-31 Jason Merrill <jason@redhat.com>
10205
10206 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10207 EXPR_LOC_OR_HERE.
10208
46a88c12
NP
102092010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10210
10211 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10212 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10213 (objc_add_property_declaration): Removed arguments for copies and
10214 ivar.
10215 (objc_build_getter_call): Renamed to
10216 objc_maybe_build_component_ref.
10217 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10218 (objc_is_property_ref): New.
10219 * c-common.c (c_common_reswords): Removed copies and ivar.
10220 * stub-objc.c (objc_add_property_declaration): Removed arguments
10221 for copies and ivar.
10222 (objc_build_getter_call): Renamed to
10223 objc_maybe_build_component_ref.
10224 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10225 (objc_is_property_ref): New.
9faeb493 10226
1e4bf85b
AC
102272010-10-29 Arnaud Charlet <charlet@adacore.com>
10228 Matthew Gingell <gingell@adacore.com>
10229
10230 * c-ada-spec.c (separate_class_package): New function.
10231 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10232 name of their enclosing package.
10233 (print_ada_declaration): Use separate_class_package.
10234
81f0bab2
JM
102352010-10-27 Jason Merrill <jason@redhat.com>
10236
2b08f2c5
JM
10237 * c-common.c (c_common_reswords): Add __is_literal_type.
10238 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10239
81f0bab2
JM
10240 * c-common.c (check_case_value): Remove special C++ code.
10241
200290f2
NP
102422010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10243
10244 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10245 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10246 and RID_LAST_PATTR.
10247 (objc_add_property_declaration): Added additional arguments.
10248 (objc_property_attribute_kind): Removed.
10249 (objc_set_property_attr): Removed.
10250 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10251 copy and nonatomic.
10252 * stub-objc.c (objc_add_property_declaration): Added additional
10253 arguments.
10254 (objc_set_property_attr): Removed.
9faeb493 10255
f614132b
NP
102562010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10257
10258 * c-common.h (objc_add_property_variable): Renamed to
10259 objc_add_property_declaration. Added location argument.
10260 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10261
b8a18805
NP
102622010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10263
10264 * c-common.h (objc_maybe_printable_name): New.
10265 * stub-objc.c (objc_maybe_printable_name): New.
10266
3f8257db
JJ
102672010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10268 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10269
10270 * c-common.h (c_common_mark_addressable_vec): Declare.
10271 * c-common.c (c_common_mark_addressable_vec): New function.
10272
249a82c4
NP
102732010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10274
10275 * c-common.h (objc_set_method_type): Removed.
10276 (objc_add_method_declaration): Added boolean argument.
10277 (objc_start_method_definition): Same change.
10278 (objc_build_method_signature): Same change.
10279 * stub-objc.c (objc_set_method_type): Removed.
10280 (objc_add_method_declaration): Added boolean argument.
10281 (objc_start_method_definition): Same change.
10282 (objc_build_method_signature): Same change.
10283
977e30bc
NP
102842010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10285
10286 * c-common.h (finish_file): Removed.
10287 (objc_write_global_declarations): New.
10288 * c-opts.c (c_common_parse_file): Do not call finish_file.
10289 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10290
da57d1b9
NP
102912010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10292
10293 Implemented parsing @synthesize and @dynamic for
10294 Objective-C/Objective-C++.
10295 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10296 (objc_add_synthesize_declaration): New.
10297 (objc_add_dynamic_declaration): New.
10298 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10299 * stub-objc.c (objc_add_synthesize_declaration): New.
10300 (objc_add_dynamic_declaration): New.
9faeb493 10301
0069111f
MM
103022010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10303
10304 PR target/46041
10305 * c-cppbuiltin.c (mode_has_fma): Move function here from
10306 builtins.c. Don't use the fma optab, instead just use the
10307 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10308 using -save-temps.
10309
e426b47b
NP
103102010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10311
10312 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10313
3f8257db 10314 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10315
9faeb493 10316 Radar 4330422
e426b47b
NP
10317 * c-common.h (objc_non_volatilized_type): New declaration
10318 * stub-objc.c (objc_non_volatilized_type): New stub.
10319
90fbfdc3
NP
103202010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10321
e426b47b 10322 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10323
ab20d992 10324 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10325
9faeb493 10326 Radar 4133425
90fbfdc3 10327 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10328 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10329
c37d8c30
IS
103302010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10331
10332 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10333 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10334 (objc_ivar_visibility_kind): New enum.
10335 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10336 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10337 visibility enum.
10338
1b1562a5
MM
103392010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10340
10341 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10342 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10343 has the appropriate fma builtins.
10344 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10345
668ea4b1
IS
103462010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10347
1b1562a5 10348 merge from FSF apple 'trunk' branch.
3f8257db 10349 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10350
668ea4b1
IS
10351 Radars 4436866, 4505126, 4506903, 4517826
10352 * c-common.c (c_common_resword): Define @property and its attributes.
10353 * c-common.h: Define property attribute enum entries.
10354 (OBJC_IS_PATTR_KEYWORD): New.
10355 (objc_property_attribute_kind): New enum.
10356 Declare objc_set_property_attr (), objc_add_property_variable (),
10357 objc_build_getter_call () and objc_build_setter_call ().
10358 * stub-objc.c (objc_set_property_attr): New stub.
10359 (objc_add_property_variable): Likewise.
10360 (objc_build_getter_call): Likewise.
10361 (objc_build_setter_call) Likewise.
1b1562a5 10362
a1178b30
IS
103632010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10364
1b1562a5 10365 merge from FSF apple 'trunk' branch.
ab20d992 10366 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10367
10368 Radar 3803157 (method attributes)
10369 * c-common.c (handle_deprecated_attribute): Recognize
10370 objc methods as valid declarations.
10371 * c-common.h: Declare objc_method_decl ().
1b1562a5 10372 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10373
a75bfaa6
JM
103742010-10-08 Joseph Myers <joseph@codesourcery.com>
10375
10376 * c-common.c (parse_optimize_options): Call
10377 decode_cmdline_options_to_array_default_mask before
10378 decode_options. Update arguments to decode_options.
10379 * c-common.h (c_common_init_options_struct): Declare.
10380 * c-opts.c (c_common_init_options_struct): New. Split out from
10381 c_common_init_options.
10382
f05b9d93
NP
103832010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10384
10385 Implemented fast enumeration for Objective-C.
10386 * c-common.h (objc_finish_foreach_loop): New.
10387 * stub-objc.c (objc_finish_foreach_loop): New.
10388
1ebe4b4f
JM
103892010-10-05 Joseph Myers <joseph@codesourcery.com>
10390
10391 * c-common.h (struct diagnostic_context): Don't declare here.
10392 (c_common_initialize_diagnostics): Declare using
10393 diagnostic_context typedef.
10394 * c-opts.c (c_common_handle_option): Pass global_dc to
10395 handle_generated_option.
10396
d4d24ba4
JM
103972010-10-04 Joseph Myers <joseph@codesourcery.com>
10398
10399 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10400 handle_generated_option.
10401
478a1c5b
ILT
104022010-10-03 Ian Lance Taylor <iant@google.com>
10403
10404 * c.opt (-fplan9-extensions): New option.
10405
82a1c2fe
FXC
104062010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10407
10408 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10409 Remove.
10410 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10411 of duplicating code.
10412
92902b1b
IS
104132010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10414
10415 * c-common.c: Add two new entries for @optional
10416 and @required keywords.
10417
10418 merge from FSF 'apple/trunk' branch.
3f8257db 10419 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10420
10421 Radar 4386773
10422 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10423 objective-c keywords.
10424 (objc_set_method_opt): New declaration.
10425 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10426
46625112
JM
104272010-09-30 Joseph Myers <joseph@codesourcery.com>
10428
10429 * c-common.c (handle_optimize_attribute): Pass &global_options to
10430 cl_optimization_save and cl_optimization_restore.
10431 * c-opts.c (c_common_handle_option): Pass &global_options to
10432 handle_generated_option.
10433 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10434 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10435 &global_options to cl_optimization_restore.
10436
49b91f05
NP
104372010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10438
10439 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10440 Objective-C/Objective-C++ keywords.
10441
13ed556f 104422010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10443
9faeb493
UB
10444 Merge from 'apple/trunk' branch on FSF servers.
10445
3f8257db 10446 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10447
10448 Radar 4281748
10449 * c-common.h (objc_check_global_decl): New declaration.
10450 * stub-objc.c (objc_check_global_decl): New stub.
10451
f0036cca
JM
104522010-09-29 Joseph Myers <joseph@codesourcery.com>
10453
10454 * c.opt: Don't use VarExists.
10455
e3339d0f
JM
104562010-09-29 Joseph Myers <joseph@codesourcery.com>
10457
10458 * c-common.c (c_cpp_error): Update names of diagnostic_context
10459 members.
10460 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10461 cl_optimization members.
10462 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10463 sanitize_cpp_opts, finish_options): Update names of cpp_options
10464 members.
10465
1973201f
NP
104662010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10467
10468 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10469 (objc_is_reserved_word): Removed.
10470 * c-common.c: Updated comments.
10471 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10472 objc_is_reserved_word.
10473 * stub-objc.c (objc_is_reserved_word): Removed.
10474
f7e71da5
IS
104752010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10476
9faeb493 10477 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10478 include attributes.
10479 (objc_start_method_definition): Likewise.
10480 (objc_build_keyword_decl): Likewise.
10481 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10482 (objc_start_method_definition): Likewise.
10483 (objc_build_keyword_decl): Likewise.
10484
c165dca7
IS
104852010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10486
10487 * c-common.h (objc_start_class_interface): Adjust prototype.
10488 (objc_start_category_interface): Likewise.
10489 (objc_start_protocol): Likewise.
10490 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10491 (objc_start_class_interface): Likewise.
10492 (objc_start_category_interface): Likewise.
10493
7458026b
ILT
104942010-09-27 Ian Lance Taylor <iant@google.com>
10495
10496 * c-common.c (c_common_attribute_table): Add no_split_stack.
10497 (handle_no_split_stack_attribute): New static function.
10498
b581b85b
NP
104992010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10500
9faeb493 10501 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10502
3f8257db 10503 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10504
9faeb493 10505 Radar 4229905
b581b85b
NP
10506 * c-common.h (objc_have_common_type): New declaration.
10507 * stub-objc.c (objc_have_common_type): New stub.
10508
10509 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10510
10511 Radar 4154928
10512 * c-common.h (objc_common_type): New prototype.
9faeb493 10513 * stub-objc.c (objc_common_type): New stub.
b581b85b 10514
46a4da10
JH
105152010-09-24 Jan Hubicka <jh@suse.cz>
10516
10517 * c-common.c (handle_leaf_attribute): New function.
10518 (struct attribute_spec c_common_att): Add leaf.
10519
e200444e
JM
105202010-09-22 Joseph Myers <joseph@codesourcery.com>
10521
10522 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10523 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10524 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10525 -include-barrier, -include-directory, -include-directory=,
10526 -include-directory-after, -include-directory-after=,
10527 -include-prefix, -include-prefix=, -include-with-prefix,
10528 -include-with-prefix=, -include-with-prefix-after,
10529 -include-with-prefix-after=, -include-with-prefix-before,
10530 -include-with-prefix-before=, -no-integrated-cpp,
10531 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10532 -output=, -pedantic, -pedantic-errors, -preprocess,
10533 -print-missing-file-dependencies, -trace-includes, -traditional,
10534 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10535 -user-dependencies, -verbose, -write-dependencies,
10536 -write-user-dependencies, no-integrated-cpp, traditional): New.
10537
29a80ea6
NP
105382010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10539
10540 PR objc/23710
ac1fc2fc
NP
10541 * c-common.h (objc_start_method_definition): Return bool instead
10542 of void.
10543 * stub-objc.c (objc_start_method_definition): Return bool instead
10544 of void.
10545
105462010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10547
10548 PR objc/25965
10549 * c-common.h (objc_get_interface_ivars): New declaration.
10550 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10551
de621752
ILT
105522010-09-15 Ian Lance Taylor <iant@google.com>
10553
10554 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10555 messages. Remove period at end of warning message.
de621752 10556
ba885ec5
NS
105572010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10558
10559 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10560 (handle_alias_attribute): ... here.
10561 (handle_ifunc_attribute): New.
10562
c5ee1358
MM
105632010-09-06 Mark Mitchell <mark@codesourcery.com>
10564
10565 * c-common.h (do_warn_double_promotion): Declare.
10566 * c-common.c (do_warn_double_promotion): Define.
10567
0a0b3574
MM
105682010-09-05 Mark Mitchell <mark@codesourcery.com>
10569
10570 * c.opt (Wdouble-promotion): New.
10571
d1779886
JM
105722010-09-02 Joseph Myers <joseph@codesourcery.com>
10573
10574 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10575 fvtable-thunks, fxref): Mark no longer supported in help text.
10576
2d2bd949
JM
105772010-09-02 Joseph Myers <joseph@codesourcery.com>
10578
10579 * c.opt (Wimport, fall-virtual, falt-external-templates,
10580 fdefault-inline, fenum-int-equiv, fexternal-templates,
10581 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10582 fname-mangling-version-, fnew-abi, fnonnull-objects,
10583 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10584 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10585 applicable.
10586 (fhandle-exceptions): Mark with Alias and Warn.
10587 * c-opts.c (c_common_handle_option): Don't handle options marked
10588 as ignored.
10589
5de8299c
JM
105902010-09-02 Joseph Myers <joseph@codesourcery.com>
10591
10592 * c.opt (Wcomments, Werror-implicit-function-declaration,
10593 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10594 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10595 aliases.
10596 * c-common.c (option_codes): Use OPT_Wcomment instead of
10597 OPT_Wcomments.
10598 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10599 Don't handle options marked as aliases.
10600
0ceb0201
RG
106012010-08-25 Richard Guenther <rguenther@suse.de>
10602
10603 * c-common.c (c_common_get_alias_set): Remove special
10604 handling for pointers.
10605
ac47786e
NF
106062010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10607
10608 * c-common.c: Use FOR_EACH_VEC_ELT.
10609 * c-gimplify.c: Likewise.
10610 * c-pragma.c: Likewise.
10611
c878765b
JM
106122010-08-16 Joseph Myers <joseph@codesourcery.com>
10613
10614 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10615 RejectDriver.
10616 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10617 RejectDriver.
10618 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10619 instead of OPT_MDX and OPT_MMDX.
10620
603349bf
JM
106212010-08-16 Joseph Myers <joseph@codesourcery.com>
10622
10623 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10624
644fa7ac
JM
106252010-08-12 Joseph Myers <joseph@codesourcery.com>
10626
10627 * c.opt (MD, MMD): Change to MDX and MMDX.
10628 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10629
481e1176
JM
106302010-08-11 Joseph Myers <joseph@codesourcery.com>
10631
10632 * c-opts.c (c_common_handle_option): Call handle_generated_option
10633 instead of handle_option.
10634
ac8dc9f7
NF
106352010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10636
10637 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10638 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10639
4f8c876d
NF
106402010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10641
10642 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10643 (pending_redefine_extname): Change type to a VEC.
10644 (add_to_renaming_pragma_list): Update for new type of
10645 pending_redefine_extname.
ac8dc9f7 10646 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10647
3b0c690e
AC
106482010-08-04 Arnaud Charlet <charlet@adacore.com>
10649
10650 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10651 visited.
10652 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10653 decide whether a type has already been declared/seen.
10654 Do not go to the original type.
10655 (dump_nested_types): New parameter forward.
10656 Generate forward declaration if needed and mark type as visited.
10657 (print_ada_declaration): Call dump_nested_types if not already done.
10658 Mark types as visited.
10659
1890bccc
JM
106602010-08-03 Joseph Myers <joseph@codesourcery.com>
10661
10662 * c.opt (-print-pch-checksum): Remove option.
10663 * c-opts.c (c_common_handle_option): Don't handle
10664 OPT_print_pch_checksum.
10665
5f20c657
JM
106662010-07-27 Joseph Myers <joseph@codesourcery.com>
10667
10668 * c-common.h (c_common_handle_option): Update prototype and return
10669 value type.
10670 * c-opts.c (c_common_handle_option): Update prototype and return
10671 value type. Update calls to handle_option and
10672 enable_warning_as_error.
10673
f551f80c
JJ
106742010-07-27 Jakub Jelinek <jakub@redhat.com>
10675
10676 PR c/45079
10677 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10678
61ff2bdc
JM
106792010-07-27 Joseph Myers <joseph@codesourcery.com>
10680
10681 * c-common.h (c_common_missing_argument): Remove.
10682 * c-opts.c (c_common_missing_argument): Remove.
10683 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10684 idirafter, imacros, include, isysroot, isystem, iquote): Add
10685 MissingArgError.
10686 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10687
7a9bf9a4
JM
106882010-07-27 Joseph Myers <joseph@codesourcery.com>
10689
10690 * c-common.h (c_common_option_lang_mask,
10691 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10692 New.
10693 (c_common_init_options): Update prototype.
10694 * c-opts.c (c_common_option_lang_mask): New.
10695 (c_common_initialize_diagnostics): Split out of
10696 c_common_init_options.
10697 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10698 New.
10699 (c_common_init_options): Update prototype. Use decoded options in
10700 search for -lang-asm.
10701
910ad8de
NF
107022010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10703
10704 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10705 * c-format.c: Likewise.
10706
718f9c0f
MLI
107072010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10708
10709 * c-common.h: Include diagnostic-core.h. Error if already
10710 included.
10711 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10712
4d451982
MLI
107132010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10714
adfac8df 10715 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10716 Do not include expr.h
10717 (vector_mode_valid_p): Move here.
10718
119fe915
SB
107192010-06-21 DJ Delorie <dj@redhat.com>
10720
10721 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10722 allow these pragmas anywhere.
10723
107242010-06-14 Jakub Jelinek <jakub@redhat.com>
10725
10726 PR bootstrap/44509
10727 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10728 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10729 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10730 ggc_strdup instead of xstrdup.
10731
107322010-06-10 Jakub Jelinek <jakub@redhat.com>
10733
10734 * c-cppbuiltin.c: Include cpp-id-data.h.
10735 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10736 (lazy_hex_fp_value): New function.
10737 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10738
6662d794
MLI
107392010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10740
10741 * c-gimplify.c: Do not include tree-flow.h
10742
38f8b050
JR
107432010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10744
10745 PR other/44034
10746 * c-common.c: Rename targetm member:
10747 targetm.enum_va_list -> targetm.enum_va_list_p
10748
9589f23e
AS
107492010-06-28 Anatoly Sokolov <aesok@post.ru>
10750
10751 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10752
3b06d379
SB
107532010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10754
10755 * c-cppbuiltin.c: Do not include except.h.
10756
d166d4c3
AK
107572010-06-24 Andi Kleen <ak@linux.intel.com>
10758
9faeb493
UB
10759 * c-common.c (warn_for_omitted_condop): New.
10760 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10761
70cb8be6
JM
107622010-06-21 Joseph Myers <joseph@codesourcery.com>
10763
10764 * c.opt (lang-objc): Remove.
10765 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10766
a4c97feb
JR
107672010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10768
10769 * c-opts.c: Include "tm_p.h".
10770
6e2f1956
JM
107712010-06-20 Joseph Myers <joseph@codesourcery.com>
10772
10773 * c-common.c (parse_optimize_options): Update call to
10774 decode_options.
10775
bc87224e
NF
107762010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10777
10778 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10779 new type of types_used_by_cur_var_decl.
10780
b49cf425
JR
107812010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10782
10783 PR bootstrap/44512
10784 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10785 for C++ standard compliance.
10786
59f9c2ed
JM
107872010-06-16 Jason Merrill <jason@redhat.com>
10788
10789 * c.opt: Add -Wnoexcept.
10790
33766b66
RG
107912010-06-16 Richard Guenther <rguenther@suse.de>
10792
10793 PR c/44555
10794 * c-common.c (c_common_truthvalue_conversion): Remove
10795 premature and wrong optimization concering ADDR_EXPRs.
10796
eff7e30c
AC
107972010-06-15 Arnaud Charlet <charlet@adacore.com>
10798
10799 * c-ada-spec.c (dump_sloc): Remove column info.
10800 (is_simple_enum): New function.
10801 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10802 enum types when relevant.
10803
6312e84d
MLI
108042010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10805
9faeb493 10806 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10807 location.
10808
1cb42611
JM
108092010-06-10 Joseph Myers <joseph@codesourcery.com>
10810
10811 * c-opts.c (c_common_handle_option): Don't handle
10812 OPT_fshow_column.
10813
a9429e29
LB
108142010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10815
10816 * c-pragma.c (push_alignment): Use typed GC allocation.
10817 (handle_pragma_push_options): Likewise.
10818
10819 * c-common.c (parse_optimize_options): Likewise.
10820
10821 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10822 option.
10823
5498f011
JM
108242010-06-07 Joseph Myers <joseph@codesourcery.com>
10825
10826 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10827 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10828 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10829 flag_signed_bitfields, warn_strict_null_sentinel,
10830 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10831 flag_gen_declaration, flag_no_gnu_keywords,
10832 flag_implement_inlines, flag_implicit_templates,
10833 flag_implicit_inline_templates, flag_optional_diags,
10834 flag_elide_constructors, flag_default_inline, flag_rtti,
10835 flag_conserve_space, flag_access_control, flag_check_new,
10836 flag_new_for_scope, flag_weak, flag_working_directory,
10837 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10838 flag_enforce_eh_specs, flag_threadsafe_statics,
10839 flag_pretty_templates): Remove.
10840 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10841 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10842 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10843 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10844 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10845 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10846 flag_no_gnu_keywords, flag_implement_inlines,
10847 flag_implicit_templates, flag_implicit_inline_templates,
10848 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10849 flag_rtti, flag_conserve_space, flag_access_control,
10850 flag_check_new, flag_new_for_scope, flag_weak,
10851 flag_working_directory, flag_use_cxa_atexit,
10852 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10853 flag_threadsafe_statics, flag_pretty_templates,
10854 warn_strict_null_sentinel): Remove.
10855 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10856 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10857 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10858 fimplicit-inline-templates, fimplicit-templates,
10859 flax-vector-conversions, fms-extensions, fnil-receivers,
10860 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10861 frtti, fshort-double, fshort-enums, fshort-wchar,
10862 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10863 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10864 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10865 gen-decls, undef): Use Var.
10866 (fdefault-inline, foptional-diags): Document as doing nothing.
10867 * c-opts.c (c_common_handle_option): Remove cases for options now
10868 using Var. Mark ignored options as such.
10869
39dabefd
SB
108702010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10871
9faeb493 10872 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10873 * c-common.def: Likewise.
10874 * c-common.h: Likewise.
10875 * c-cppbuiltin.c: Likewise.
10876 * c-dump.c: Likewise.
10877 * c-format.c: Likewise.
10878 * c-format.h : Likewise.
10879 * c-gimplify.c: Likewise.
10880 * c-lex.c: Likewise.
10881 * c-omp.c: Likewise.
10882 * c.opt: Likewise.
10883 * c-opts.c: Likewise.
10884 * c-pch.c: Likewise.
10885 * c-ppoutput.c: Likewise.
10886 * c-pragma.c: Likewise.
10887 * c-pragma.h: Likewise.
10888 * c-pretty-print.c: Likewise.
10889 * c-pretty-print.h: Likewise.
10890 * c-semantics.c: Likewise.
10891 * stub-objc.c: Likewise.
10892
10893 * c-common.c: Include gt-c-family-c-common.h.
10894 * c-pragma.c: Include gt-c-family-c-pragma.h.
10895\f
8d9254fc 10896Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
10897
10898Copying and distribution of this file, with or without modification,
10899are permitted in any medium without royalty provided the copyright
10900notice and this notice are preserved.