]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
Daily bump.
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
6d00f052
JM
12020-01-23 Jason Merrill <jason@redhat.com>
2
3 * c-warn.c (conversion_warning): Change -Wsign-conversion handling.
4
8a990ffa
MS
52020-01-23 Martin Sebor <msebor@redhat.com>
6
7 PR c/84919
8 * c-common.c (check_function_arguments): Avoid overlap checking
9 of sprintf functions.
10
55b7df8b
JM
112020-01-22 Jason Merrill <jason@redhat.com>
12
13 PR testsuite/93391 - PR 40752 test fails with unsigned plain char.
14 PR c++/40752
15 * c-warn.c (conversion_warning): Check operands only after checking
16 the whole expression. Don't check second operand of + for sign.
17
c77074d0
JM
182020-01-21 Jason Merrill <jason@redhat.com>
19 Manuel López-Ibáñez <manu@gcc.gnu.org>
20
21 PR c++/40752 - useless -Wconversion with short +=.
22 * c.opt (-Warith-conversion): New.
23 * c-warn.c (conversion_warning): Recurse for operands of
24 operators. Only warn about the whole expression with
25 -Warith-conversion.
26
731dbfc3
JM
272020-01-21 Jason Merrill <jason@redhat.com>
28
29 * c-common.c (unsafe_conversion_p): Don't warn, return UNSAFE_SIGN.
30 * c-warn.c (conversion_warning): Warn about UNSAFE_SIGN.
31
ad1a3914
NS
322020-01-20 Nathan Sidwell <nathan@acm.org>
33
34 PR preprocessor/80005
35 * c-cppbuiltins.c (c_cpp_builtins): Don't define __has_include{,_next}.
36
49789fd0
IS
372020-01-18 Iain Sandoe <iain@sandoe.co.uk>
38
39 * c-common.c (co_await, co_yield, co_return): New.
40 * c-common.h (RID_CO_AWAIT, RID_CO_YIELD,
41 RID_CO_RETURN): New enumeration values.
42 (D_CXX_COROUTINES): Bit to identify coroutines are active.
43 (D_CXX_COROUTINES_FLAGS): Guard for coroutine keywords.
44 * c-cppbuiltin.c (__cpp_coroutines): New cpp define.
45 * c.opt (fcoroutines): New command-line switch.
46
4bc1899b
DM
472020-01-10 David Malcolm <dmalcolm@redhat.com>
48
49 * c-format.c (local_event_ptr_node): New.
50 (PP_FORMAT_CHAR_TABLE): Add entry for "%@".
51 (init_dynamic_diag_info): Initialize local_event_ptr_node.
52 * c-format.h (T_EVENT_PTR): New define.
53
f25e33fa
MS
542020-01-10 Martin Sebor <msebor@redhat.com>
55
56 PR c/93132
57 * c-attribs.c (append_access_attrs): Validate against the translated
58 access string rather than the human-readable representation.
59
8d9254fc
JJ
602020-01-01 Jakub Jelinek <jakub@redhat.com>
61
62 Update copyright years.
63
39292e25
EB
642019-12-20 Eric Botcazou <ebotcazou@adacore.com>
65
66 * c-ada-spec.h (decl_sloc): Delete.
67 * c-ada-spec.c (decl_sloc): Make static.
68
519d7496
JB
692019-12-19 Julian Brown <julian@codesourcery.com>
70
71 * c-common.h (c_omp_map_clause_name): Add prototype.
72 * c-omp.c (c_omp_map_clause_name): New function.
73 * c-pragma.h (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ATTACH and
74 PRAGMA_OACC_CLAUSE_DETACH.
75
a6163563
JB
762019-12-19 Julian Brown <julian@codesourcery.com>
77 Maciej W. Rozycki <macro@codesourcery.com>
78 Tobias Burnus <tobias@codesourcery.com>
79 Thomas Schwinge <thomas@codesourcery.com>
80
81 * c-pragma.h (pragma_omp_clause): Add
82 PRAGMA_OACC_CLAUSE_NO_CREATE.
83
e8f1ade2
MS
842019-12-17 Martin Sebor <msebor@redhat.com>
85
86 PR c++/61339
87 * c.opt (-Wmismatched-tags, -Wredundant-tags): New options.
88
368877a1
DM
892019-12-11 David Malcolm <dmalcolm@redhat.com>
90
91 * c-pretty-print.c (c_pretty_printer::clone): New vfunc
92 implementation.
93 * c-pretty-print.h (c_pretty_printer::clone): New vfunc decl.
94
d68f5d45
DM
952019-12-09 David Malcolm <dmalcolm@redhat.com>
96
97 * c-format.c (range_label_for_format_type_mismatch::get_text):
98 Replace label_text ctor called with true with label_text::take.
99
d3e28653
DM
1002019-12-09 David Malcolm <dmalcolm@redhat.com>
101
102 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
103 initial newline from expected outputs.
104 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
105 call to diagnostic_show_locus.
106
abd6d8cc
JJ
1072019-12-06 Jakub Jelinek <jakub@redhat.com>
108
109 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
110 now.
111
7906797e
MP
1122019-12-05 Marek Polacek <polacek@redhat.com>
113 Jakub Jelinek <jakub@redhat.com>
114
115 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
116 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
117
5c04da88
MP
1182019-12-05 Marek Polacek <polacek@redhat.com>
119
120 PR c++/92271 - make __is_same alias for __is_same_as.
121 * c-common.c: Add __is_same, an alias for __is_same_as.
122
43aae289
MP
1232019-12-03 Marek Polacek <polacek@redhat.com>
124
125 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
126 * c-cppbuiltin.c (c_cpp_builtins): Predefine
127 __cpp_aggregate_paren_init=201902 for -std=c++2a.
128
d7ddfbcb
JH
1292019-11-30 Jan Hubicka <hubicka@ucw.cz>
130
131 * c-attribs.c (handle_symver_attribute): New function
132 (c_common_attributes): Add symver.
133
65ef05d0
RS
1342019-11-30 Richard Sandiford <richard.sandiford@arm.com>
135
136 * c-common.c (pointer_int_sum): Use verify_type_context to check
137 whether the target allows pointer arithmetic for the types involved.
138 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
139 to check whether the target allows sizeof and alignof operations
140 for the types involved.
141
1a291106
JM
1422019-11-27 Jason Merrill <jason@redhat.com>
143
144 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
145
05d6cb1a
JJ
1462019-11-26 Jakub Jelinek <jakub@redhat.com>
147
148 PR c++/61414
149 * c-attribs.c (handle_mode_attribute): Add mode attribute to
150 ENUMERAL_TYPEs.
151
5b8d9367
JM
1522019-11-25 Joseph Myers <joseph@codesourcery.com>
153
154 PR c/91985
155 * c-common.c (c_common_type_for_mode): Handle decimal
156 floating-point types being NULL_TREE.
157 * c-format.c (get_format_for_type_1): Handle specified types being
158 NULL_TREE.
159 * c-lex.c (interpret_float): Give an error for decimal
160 floating-point constants when decimal floating-point not
161 supported.
162
1fbf51cb
JJ
1632019-11-23 Jakub Jelinek <jakub@redhat.com>
164
165 PR middle-end/83859
166 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
167 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
168 group warning with inform together.
169 (handle_access_attribute): Formatting fix.
170
761df906
JJ
1712019-11-22 Jakub Jelinek <jakub@redhat.com>
172
bdaf8be1
JJ
173 PR c/90677
174 * c-common.h (identifier_global_tag): Declare.
175 * c-format.c (get_pointer_to_named_type): Renamed to ...
176 (get_named_type): ... this. Use identifier_global_tag instead of
177 identifier_global_value, handle the return value being a TYPE_P.
178 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
179 to call get_named_type instead. Formatting fixes.
180
c2ecce6d 181 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
182 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
183 and __cpp_generic_lambdas for -std=c++2a. Define
184 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
185 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
186 __cpp_concepts for -std=c++2a.
187
54aa6b58
MS
1882019-11-22 Martin Sebor <msebor@redhat.com>
189
190 PR middle-end/83859
191 * c-attribs.c (handle_access_attribute): New function.
192 (c_common_attribute_table): Add new attribute.
193 (get_argument_type): New function.
194 (append_access_attrs): New function.
195 (get_nonnull_operand): Rename...
196 (get_attribute_operand): ...to this.
197 * c-common.c (get_nonnull_operand): Rename...
198 (get_attribute_operand): ...to this.
199
6c80b1b5
JM
2002019-11-21 Joseph Myers <joseph@codesourcery.com>
201
202 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
203 of warning.
204
192961ff
JM
2052019-11-19 Joseph Myers <joseph@codesourcery.com>
206
207 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
208 warning for standard attributes mixed with fallthrough attributes.
209
f8aea5e3
JM
2102019-11-15 Joseph Myers <joseph@codesourcery.com>
211
212 * c-attribs.c (handle_fallthrough_attribute): Remove static.
213 * c-common.h (handle_fallthrough_attribute): Declare.
214
2cc94aa8
JM
2152019-11-15 Joseph Myers <joseph@codesourcery.com>
216
217 * c-attribs.c (handle_deprecated_attribute): Remove static.
218 * c-common.h (handle_deprecated_attribute): Declare.
219
7c5890cc
JM
2202019-11-14 Joseph Myers <joseph@codesourcery.com>
221
222 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
223 char for C.
224
b2417b59
JJ
2252019-11-14 Jakub Jelinek <jakub@redhat.com>
226
d0ec7c93
JJ
227 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
228 valid vendors.
229
b2417b59
JJ
230 * c-omp.c (c_omp_check_context_selector): Handle name lists
231 containing string literals. Don't diagnose atomic_default_mem_order
232 with multiple props.
233
00be2a5f
JM
2342019-11-13 Joseph Myers <joseph@codesourcery.com>
235
236 * c-cppbuiltin.c (builtin_define_float_constants): Also define
237 NORM_MAX constants. Update call to get_max_float.
238 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
239 constants.
240
2dbad62d
EB
2412019-11-13 Eric Botcazou <ebotcazou@adacore.com>
242
243 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
244 (dump_forward_type): Do not generate a declaration for function types.
245 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
246 of the component type if it is declared in another file.
247
6ed76044
ML
2482019-11-12 Martin Liska <mliska@suse.cz>
249
250 * c-opts.c (c_common_post_options):
251 Use SET_OPTION_IF_UNSET.
252
62aee289
MR
2532019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
254 Frederik Harwath <frederik@codesourcery.com>
255
256 gcc/c-family/
257 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
258 constant.
259 * c-pragma.c (oacc_pragmas): Add "serial" entry.
260
f486280c
RS
2612019-11-08 Richard Sandiford <richard.sandiford@arm.com>
262
263 * c-common.h (gnu_vector_type_p): New function.
264 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
265 vectors to satisfy gnu_vector_type_p.
266 (c_build_vec_convert): Likewise __builtin_convertvector.
267 (convert_vector_to_array_for_subscript): Likewise when applying
268 implicit vector to array conversion.
269 (scalar_to_vector): Likewise when converting vector-scalar
270 operations to vector-vector operations.
271
017c6491
JM
2722019-11-08 Joseph Myers <joseph@codesourcery.com>
273
274 * c.opt (Wold-style-definition): Initialize to -1.
275 * c-opts.c (c_common_post_options): Set warn_old_style_definition
276 to flag_isoc2x if not set explicitly.
277
c01bd174
JM
2782019-11-07 Joseph Myers <joseph@codesourcery.com>
279
280 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
281
0df65305
JM
2822019-11-05 Jason Merrill <jason@redhat.com>
283
284 * c-opts.c (c_common_post_options): -fconcepts-ts implies
285 -fconcepts.
286
e0c866dd
KK
2872019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
288
289 * c-opts.c (c_common_post_options): Update
290 latest_abi_version.
291
f968ef9b
JJ
2922019-11-02 Jakub Jelinek <jakub@redhat.com>
293
d0c464d2
JJ
294 * c-common.h (c_omp_get_context_selector): Remove.
295 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
296 and renamed to omp_get_context_selector.
297
917dd789
JJ
298 * c-omp.c (c_omp_mark_declare_variant): Use
299 omp_context_selector_set_compare.
300
f968ef9b
JJ
301 PR c++/88335 - Implement P1073R3: Immediate functions
302 * c-common.h (enum rid): Add RID_CONSTEVAL.
303 * c-common.c (c_common_reswords): Add consteval.
304
5f6705b7
JJ
3052019-11-01 Martin Sebor <msebor@redhat.com>
306
307 PR middle-end/91679
308 PR middle-end/91647
309 PR middle-end/91463
310 PR middle-end/92312
311 * c-pretty-print.c (direct_abstract_declarator): Print
312 bound in zero-length arrays.
313 * c.opt (-Wzero-length-bounds): New option.
314
43f1814c
NS
3152019-10-30 Nathan Sidwell <nathan@acm.org>
316
317 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
318 macros.
319
ad1539d5
MS
3202019-10-28 Martin Sebor <msebor@redhat.com>
321
322 PR c/66970
323 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
324 even when only preprocessing.
325 * c-common.h (names_builtin_p): Declare new function.
326 * c-lex.c (init_c_lex): Set has_builtin.
327 (c_common_has_builtin): Define a new function.
328 * c-ppoutput.c (init_pp_output): Set has_builtin.
329
135df52c
JJ
3302019-10-24 Jakub Jelinek <jakub@redhat.com>
331
332 * c-common.h (c_omp_context_selector_matches): Remove.
333 * c-omp.c (c_omp_context_selector_matches): Remove.
334 * c-attribs.c (c_common_attribute_table): Add
335 "omp declare target {host,nohost,block}" attributes.
336
8ad0c477
JM
3372019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
338
339 * c-lex.c (c_common_has_attribute): Update nodiscard value.
340
56898e43
RS
3412019-10-14 Richard Sandiford <richard.sandiford@arm.com>
342
343 * c-common.h (user_facing_original_type_p): Declare.
344 * c-common.c: Include c-spellcheck.h.
345 (user_facing_original_type_p): New function.
346
20de9568
JJ
3472019-10-12 Jakub Jelinek <jakub@redhat.com>
348
349 * c-common.h (c_omp_mark_declare_variant,
350 c_omp_context_selector_matches): Declare.
351 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
352 and hsa-common.h.
353 (c_omp_get_context_selector): Support second argument NULL.
354 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
355 functions.
356 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
357 attribute, add "omp declare variant base" and
358 "omp declare variant variant" attributes.
359
175a85b2
JM
3602019-10-11 Joseph Myers <joseph@codesourcery.com>
361
362 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
363 CppReason(CPP_W_C11_C2X_COMPAT).
364
fe2bc27c
JM
3652019-10-11 Joseph Myers <joseph@codesourcery.com>
366
367 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
368 _Decimal64 and _Decimal128.
369
27dfdc0f
JM
3702019-10-10 Joseph Myers <joseph@codesourcery.com>
371
372 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
373 types if DFP not supported.
374
94e7f906
JJ
3752019-10-10 Jakub Jelinek <jakub@redhat.com>
376
377 * c-common.h (c_omp_check_context_selector,
378 c_omp_get_context_selector): Declare.
379 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
380 in diagnostic message.
381 (c_omp_check_context_selector, c_omp_get_context_selector): New
382 functions.
383 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
384 attribute.
385 (handle_omp_declare_variant_attribute): New function.
386
a7160771
MS
3872019-10-09 Martin Sebor <msebor@redhat.com>
388
389 PR tree-optimization/90879
390 * c.opt (-Wstring-compare): New option.
391
cb57504a
JM
3922019-10-08 Andrew Sutton <asutton@lock3software.com>
393 Jason Merrill <jason@redhat.com>
394
395 Update the concepts implementation to conform to the C++20
396 specification, improve compile times, and generally clean up
397 the implementation.
398
399 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
400 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
401 * c.opt: Add -Wconcepts-ts.
402 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
403 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
404 (set_std_cxx2a): Enable concepts by default.
405
fbb2a6dc
JM
4062019-10-08 Joseph Myers <joseph@codesourcery.com>
407
408 * c-opts.c (c_common_post_options): Set
409 -fno-fp-int-builtin-inexact for C2X.
410
8e007055
JJ
4112019-10-05 Jakub Jelinek <jakub@redhat.com>
412
413 PR c++/91369 - Implement P0784R7: constexpr new
414 * c-cppbuiltin.c (c_cpp_builtins): Predefine
415 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
416
843f104d
JM
4172019-10-04 Joseph Myers <joseph@codesourcery.com>
418
419 PR c/82752
420 * c-format.c (C_STD_VER): Handle C2x.
421 (C_STD_NAME): Likewise.
422 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
423 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
424 modifier allowed and 'p' flag.
425 * c-format.h (enum format_std_version): Add STD_C2X.
426 (struct format_char_info): Mention 'p' in comment on flags2.
427
e9c9a142
DM
4282019-10-01 David Malcolm <dmalcolm@redhat.com>
429
430 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
431 calling diagnostic_show_locus, rather than destroying it afterwards.
432
7552c36a
JJ
4332019-10-01 Jakub Jelinek <jakub@redhat.com>
434
435 PR c++/91925
436 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
437 with NULL DECL_FIELD_OFFSET.
438
8209db25
RS
4392019-10-01 Richard Sandiford <richard.sandiford@arm.com>
440
441 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
442 has a type name, use it in preference to the __vector syntax.
443
9343bf99
RS
4442019-09-30 Richard Sandiford <richard.sandiford@arm.com>
445
446 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
447 two spaces between a comma and "...".
448
59bc434a
JJ
4492019-09-27 Jakub Jelinek <jakub@redhat.com>
450
451 PR c++/88203
452 * c-common.h (c_omp_predefined_variable): Declare.
453 * c-omp.c (c_omp_predefined_variable): New function.
454 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
455 for predefined variables.
456
c6447c20
RS
4572019-09-27 Richard Sandiford <richard.sandiford@arm.com>
458
459 * c-common.h (build_function_call_vec): Take the original
460 function decl as an optional final parameter.
461 (check_builtin_function_arguments): Take the original function decl.
462 * c-common.c (check_builtin_function_arguments): Likewise.
463 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
464 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
465
c4438114
JM
4662019-09-15 Jason Merrill <jason@redhat.com>
467
468 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
469 fold_for_warn in "|| mask" warning.
470
68a57628
ML
4712019-09-10 Martin Liska <mliska@suse.cz>
472
473 * c.opt: Use newly added WarnRemoved.
474
f48ef52e
ML
4752019-09-09 Martin Liska <mliska@suse.cz>
476
477 * c.opt: Update comment of removed
478 options that are preserved only for backward
479 compatibility.
480
67f6e649
ML
4812019-09-06 Martin Liska <mliska@suse.cz>
482
483 PR c++/91125
484 * c-common.c: Remove definition of flag_use_repository.
485 * c-common.h: Likewise.
486 * c-opts.c (c_common_handle_option):
487 Do not handle OPT_frepo option.
488 * c.opt: Mark the option with Deprecated.
489
db9d2274
MP
4902019-09-04 Marek Polacek <polacek@redhat.com>
491
492 * c.opt (fdeduce-init-list): Ignored.
493
68e2c199
PK
4942019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
495
496 PR c/78736
497 * c.opt (Wenum-conversion): New option.
498
7a4418a5
JL
4992019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
500
501 * c-attribs.c (handle_section_attribute): Call the
502 handle_generic_attribute target hook after performing target
503 independent processing.
504 (handle_noinit_attribute): Likewise.
505
5f76ab15
ILT
5062019-09-03 Ian Lance Taylor <iant@golang.org>
507
508 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
509 when using -fgo-dump-spec.
510
ae0d3f6a
ML
5112019-09-02 Martin Liska <mliska@suse.cz>
512
513 PR c++/91155
514 * c-common.c (fname_as_string): Use cxx_printable_name for
515 __PRETTY_FUNCTION__ same as was used before r265711.
516
8a902edb
MP
5172019-08-28 Marek Polacek <polacek@redhat.com>
518
519 Implement P1152R4: Deprecating some uses of volatile.
520 PR c++/91361
521 * c-opts.c (c_common_post_options): Enable -Wvolatile by
522 default for C++2a, unless -Wno-deprecated.
523 * c.opt (Wvolatile): New warning.
524
4742dbe7
MP
5252019-08-28 Marek Polacek <polacek@redhat.com>
526
527 PR c++/91360 - Implement C++20 P1143R2: constinit.
528 * c-common.c (c_common_reswords): Add constinit and __constinit.
529 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
530 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
531 RID_LAST_CXX20.
532 (D_CXX20): Define.
533 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
534 * c-format.c (cxx_keywords): Add "constinit".
535 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
536
6a074892
JJ
5372019-08-27 Jakub Jelinek <jakub@redhat.com>
538
539 PR c++/91415
540 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
541 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
542 like COMPOUND_EXPR rather than normal expression.
543
22f8849d
IS
5442019-08-23 Iain Sandoe <iain@sandoe.co.uk>
545
546 PR pch/61250
547 * c-lex.c (c_lex_with_flags): Don't call
548 c_common_no_more_pch () from here.
549
df375b03
JJ
5502019-08-23 Jakub Jelinek <jakub@redhat.com>
551
552 PR middle-end/91283
553 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
554 instead of flag_excess_precision_cmdline.
555 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
556 * c-opts.c (c_common_post_options): Likewise.
557
14b7950f
MS
5582019-08-22 Martin Sebor <msebor@redhat.com>
559
560 PR middle-end/91490
561 * c-common.c (braced_list_to_string): Add argument and overload.
562 Handle flexible length arrays and unions.
563
8bb2ee59
EB
5642019-08-21 Eric Botcazou <ebotcazou@adacore.com>
565
566 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
567 function declarations where arguments are missing. Rename variables.
568
21c1e205
RB
5692019-08-15 Richard Biener <rguenther@suse.de>
570
571 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
572 enabled, define __SIZETYPE__.
573
f0033821
CL
5742019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
575
576 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
577 exclusion with "section" attribute.
578 (attr_noinit_exclusions): New table.
579 (handle_noinit_attribute): New function.
580
4d732405
RS
5812019-08-13 Richard Sandiford <richard.sandiford@arm.com>
582
583 PR middle-end/91421
584 * c-common.c (resolve_overloaded_builtin): Use
585 copy_decl_built_in_function.
586
51ad8481
MS
5872019-08-13 Martin Sebor <msebor@redhat.com>
588
589 PR c/80619
590 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
591 (asm_fprintf_length_spec): Same.
592 * c-format.h (format_lengths): Add FMT_LEN_w.
593
77eb117f
JJ
5942019-08-10 Jakub Jelinek <jakub@redhat.com>
595
596 * c-pragma.h (enum pragma_omp_clause): Add
597 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
598
398e3feb
JJ
5992019-08-07 Jakub Jelinek <jakub@redhat.com>
600
601 * c-pragma.h (enum pragma_omp_clause): Add
602 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
603 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
604 enumeration value.
605
ab574db6
MP
6062019-08-05 Marek Polacek <polacek@redhat.com>
607
608 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
609 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
610 default for C++2a, unless -Wno-deprecated.
611 * c.opt (Wcomma-subscript): New warning.
612
554a530f
JJ
6132019-07-20 Jakub Jelinek <jakub@redhat.com>
614
615 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
616 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
617 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
618 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
619 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
620 constructs with the loop construct.
621
1a888209
JJ
6222019-07-13 Jakub Jelinek <jakub@redhat.com>
623
624 PR c/91149
625 * c-omp.c (c_omp_split_clauses): Fix a pasto in
626 OMP_CLAUSE_REDUCTION_TASK handling.
627
1fdd6f04
JJ
6282019-07-12 Jakub Jelinek <jakub@redhat.com>
629
630 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
631 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
632
99b1c316
MS
6332019-07-09 Martin Sebor <msebor@redhat.com>
634
635 PR c++/61339
1fdd6f04 636 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
637 and others to class.
638 * c-pretty-print.h: Same.
639
6c1dae73
MS
6402019-07-09 Martin Sebor <msebor@redhat.com>
641
642 PR c++/61339
643 * c-format.c (check_argument_type): Change class-key from class to
644 struct and vice versa to match convention and avoid -Wclass-is-pod
645 and -Wstruct-no-pod.
646 * c-pretty-print.h: Same.
647
8ba6ea87
ML
6482019-07-03 Martin Liska <mliska@suse.cz>
649
650 * c-common.c (try_to_locate_new_include_insertion_point): Remove
651 dead assignemts.
652
83eb9522
JJ
6532019-07-03 Jakub Jelinek <jakub@redhat.com>
654
655 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
656 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
657 with OMP_PARALLEL.
658
1c6ffbab
QZ
6592019-07-02 qing zhao <qing.zhao@oracle.com>
660
661 PR preprocessor/90581
662 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
663 * c.opt: Add new option -fmax-include-depth.
664
7ffc7de5
JM
6652019-06-26 Jason Merrill <jason@redhat.com>
666
667 PR c++/55442 - memory-hog with highly recursive constexpr.
668 * c.opt (fconstexpr-loop-limit): New.
669
361af3e4
JJ
6702019-06-25 Jakub Jelinek <jakub@redhat.com>
671
672 PR sanitizer/90954
673 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
674 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
675
ab20d992
JJ
6762019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
677
678 * c-common.c (c_common_nodes_and_builtins): Define
679 alternate "__intN__" name for "__intN" types.
680
f4af4019
JH
6812019-06-24 Jan Hubicka <jh@suse.cz>
682
683 * c-common.c (braced_lists_to_strings): Check that
684 type is array or integer prior checking string flag.
685
da9e9b57
MB
6862019-06-21 Matthew Beliveau <mbelivea@redhat.com>
687
688 PR c++/90875 - added -Wswitch-outside-range option
689 * c.opt (Wswitch-outside-range): Added new option.
690 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
691
3f3d6a6f
MP
6922019-06-21 Marek Polacek <polacek@redhat.com>
693
694 PR c++/90953 - ICE with -Wmissing-format-attribute.
695 * c-common.c (check_function_arguments_recurse): Use
696 get_attribute_name.
697 (check_missing_format_attribute): Likewise.
698
1bf32c11
MP
6992019-06-19 Marek Polacek <polacek@redhat.com>
700
701 PR c++/60364 - noreturn after first decl not diagnosed.
702 * c-attribs.c (handle_noreturn_attribute): No longer static.
703 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
704 Declare.
705 * c-format.c (check_function_format): Use get_attribute_name.
706
a04c0734
MS
7072019-06-19 Martin Sebor <msebor@redhat.com>
708
709 PR translation/90156
710 * c-format.c (function_format_info::format_type): Adjust type.
711 (function_format_info::is_raw): New member.
712 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
713 (decode_format_attr): Adjust call to decode_format_type.
714 Avoid a redundant call to convert_format_name_to_system_name.
715 Avoid abbreviating the word "arguments" in a diagnostic.
716 (format_warning_substr): New function.
717 (avoid_dollar_number): Quote dollar sign in a diagnostic.
718 (finish_dollar_format_checking): Same.
719 (check_format_info): Same.
720 (struct baltoks_t): New.
721 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
722 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
723 functions.
724 (check_format_info_main): Call check_plain. Use baltoks_t. Call
725 maybe_diag_unbalanced_tokens.
726 (handle_format_attribute): Spell out the word "arguments" in
727 a diagnostic.
728
d3786ebb
MB
7292019-06-11 Matthew Beliveau <mbelivea@redhat.com>
730
731 PR c++/90449 - add -Winaccessible-base option.
732 * c.opt (Winaccessible-base): New option.
733
bf38f7e9
JJ
7342019-06-10 Jakub Jelinek <jakub@redhat.com>
735
736 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
737 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
738 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
739 combined/composite constructs where it is not allowed. Copy over
740 OMP_CLAUSE_REDUCTION_INSCAN.
741
0ecf545c
MS
7422019-06-05 Martin Sebor <msebor@redhat.com>
743
744 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
745 (handle_alias_ifunc_attribute): Same.
746 (handle_copy_attribute): Same.
747 (handle_weakref_attribute): Same.
748 (handle_nonnull_attribute): Same.
749 * c-warn.c (warn_for_sign_compare): Same.
750 (warn_for_restrict): Same.
751 * c.opt: Same.
752
36b34127
MS
7532019-06-05 Martin Sebor <msebor@redhat.com>
754
755 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
756 * c.opt (-Wformat-diag): Remove a spurious period.
757
357a352f
JJ
7582019-05-29 Jakub Jelinek <jakub@redhat.com>
759
760 PR c/90628
761 * c-common.c (check_builtin_function_arguments)
762 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
763 as last argument.
764
2b8235ea
EB
7652019-05-23 Eric Botcazou <ebotcazou@adacore.com>
766
767 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
768
6d86ddc4
ML
7692019-05-22 Martin Liska <mliska@suse.cz>
770
771 PR lto/90500
772 * c-attribs.c (handle_copy_attribute): Do not copy
773 target_clones attribute.
774
419ba5b9
EB
7752019-05-21 Eric Botcazou <ebotcazou@adacore.com>
776
777 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
778 * c-ada-spec.c (print_assignment_operator): New function.
779 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
780 assignment operators declared as methods and filter out the others.
781
e03436e7
TS
7822019-05-17 Thomas Schwinge <thomas@codesourcery.com>
783
784 PR c/89433
785 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
786 "omp declare target".
787
a9c697b8
MS
7882019-05-16 Martin Sebor <msebor@redhat.com>
789
ab20d992
JJ
790 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
791 keywords, operators, and types in diagnostics.
792 (handle_scalar_storage_order_attribute): Same.
793 (handle_mode_attribute): Same.
794 (handle_visibility_attribute): Same.
795 (handle_assume_aligned_attribute): Same.
796 (handle_no_split_stack_attribute): Same.
797 * c-common.c (shorten_compare): Same.
798 (c_common_truthvalue_conversion): Same.
799 (cb_get_source_date_epoch): Same.
800 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
801 in diagnostics.
802 (interpret_float): Same.
803 * c-omp.c (c_finish_omp_for): Same.
804 * c-opts.c (c_common_post_options): Same.
805 * c-pch.c (c_common_pch_pragma): Same.
806 * c-pragma.c (pop_alignment): Same.
807 (handle_pragma_pack): Same.
808 (apply_pragma_weak): Same.
809 (handle_pragma_weak): Same.
810 (handle_pragma_scalar_storage_order): Same.
811 (handle_pragma_redefine_extname): Same.
812 (add_to_renaming_pragma_list): Same.
813 (maybe_apply_renaming_pragma): Same.
814 (push_visibility): Same.
815 (handle_pragma_visibility): Same.
816 (handle_pragma_optimize): Same.
817 (handle_pragma_message): Same.
818 * c-warn.c (warn_for_omitted_condop): Same.
819 (lvalue_error): Same.
a9c697b8 820
6b943512
RB
8212019-05-15 Richard Biener <rguenther@suse.de>
822
823 PR c/90474
824 * c-common.c (c_common_mark_addressable_vec): Also mark
825 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
826 c_mark_addressable.
ab20d992 827
b744fc85
NS
8282019-05-06 Nathan Sidwell <nathan@acm.org>
829
830 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
831
598f50d7
NS
8322019-04-30 Nathan Sidwell <nathan@acm.org>
833
834 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
835
5bcc5a3b
ML
8362019-04-30 Martin Liska <mliska@suse.cz>
837
838 * c-pragma.c (handle_pragma_diagnostic): Provide hints
839 for unknown options.
840
e78a87f7
RS
8412019-04-26 Richard Sandiford <richard.sandiford@arm.com>
842
843 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
844 the pointer target rather than the pointer itself.
845
c280b7ee
JJ
8462019-04-19 Jakub Jelinek <jakub@redhat.com>
847
848 PR c/89888
849 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
850 arguments.
851 (c_do_switch_warnings): Remove outside_range_p argument.
852 * c-common.c (check_case_bounds): Removed.
853 (c_add_case_label): Remove orig_type and outside_range_p arguments.
854 Don't call check_case_bounds. Fold low_value as well as high_value.
855 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
856 Check for case labels outside of range of original type here and
857 adjust them.
858
8e8225e6
JJ
8592019-04-12 Jakub Jelinek <jakub@redhat.com>
860
63b8a166
JJ
861 PR translation/90041
862 * c.opt (-fhandle-exceptions): Use %< and %> around option names
863 in the Warn diagnostics.
864
8e8225e6
JJ
865 PR c/89946
866 * c-attribs.c (handle_patchable_function_entry_attribute): Add
867 function comment. Warn if arguments of the attribute are not positive
868 integer constants.
869
53a3f614
EB
8702019-04-09 Eric Botcazou <ebotcazou@adacore.com>
871
872 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
873 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
874
22be5873
EB
8752019-04-07 Eric Botcazou <ebotcazou@adacore.com>
876
877 * c-ada-spec.c (is_float128): New predicate extracted from...
878 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
879 <REAL_TYPE>: ...here. Call it.
880
34facf20
DM
8812019-04-05 David Malcolm <dmalcolm@redhat.com>
882
883 PR c/89985
884 * c-warn.c (check_address_or_pointer_of_packed_member): Add
885 auto_diagnostic_group. Guard inform calls by result of
886 warning_at call.
887
05564120
MP
8882019-04-05 Marek Polacek <polacek@redhat.com>
889
ab20d992 890 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
891 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
892 of RHS.
893
7a506c3c
JM
8942019-04-03 Jason Merrill <jason@redhat.com>
895
896 PR c++/86586 - -fcompare-debug=-Wsign-compare.
897 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
898
ddeae8c8
MS
8992019-04-01 Martin Sebor <msebor@redhat.com>
900
901 PR c/89685
902 * c-attribs.c (handle_copy_attribute): Handle references and
903 non-constant expressions.
904
a15ffa22
JJ
9052019-03-22 Jakub Jelinek <jakub@redhat.com>
906
907 PR c++/87481
908 * c.opt (-fconstexpr-ops-limit=): New option.
909
36a3a7a3
JJ
9102019-03-21 Jakub Jelinek <jakub@redhat.com>
911
912 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
913 template param.
914
bec1da64
MS
9152019-03-19 Martin Sebor <msebor@redhat.com>
916
917 PR tree-optimization/89688
918 * c-common.c (braced_list_to_string): Make static.
919 (braced_lists_to_strings): Define new function.
920 * c-common.h (braced_list_to_string): Remove.
921 (braced_lists_to_strings): Declare.
922
1fe61adf
ML
9232019-03-12 Martin Liska <mliska@suse.cz>
924
925 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
926
93964ebd
ML
9272019-03-11 Martin Liska <mliska@suse.cz>
928
929 * c-opts.c (c_common_post_options): Wrap apostrophes
930 in gcc internal format with %'.
931
a3f9f006
ML
9322019-03-11 Martin Liska <mliska@suse.cz>
933
934 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
935 in a string format message and fix GNU coding style.
936 * c-common.c (vector_types_convertible_p): Likewise.
937 (c_build_vec_perm_expr): Likewise.
938 * c-indentation.c (get_visual_column): Likewise.
939 * c-opts.c (c_common_handle_option): Likewise.
940 (c_common_post_options): Likewise.
941 (sanitize_cpp_opts): Likewise.
942 * c-pch.c (c_common_pch_pragma): Likewise.
943 * c-pragma.c (handle_pragma_pack): Likewise.
944
1db01ff9
JJ
9452019-03-08 Jakub Jelinek <jakub@redhat.com>
946
947 PR tree-optimization/89550
948 * c-common.c (c_common_truthvalue_conversion): Only set
949 TREE_NO_WARNING if warning_at returned true.
950 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
951
ba790e6f
JJ
9522019-02-25 Sandra Loosemore <sandra@codesourcery.com>
953 Martin Sebor <msebor@gmail.com>
954
955 * c.opt (Wmissing-attributes): Clean up doc string.
956
7da73ba7
JJ
9572019-02-25 Jakub Jelinek <jakub@redhat.com>
958
959 PR c/89495
960 * c-format.c (maybe_read_dollar_number): Compute nargnum in
961 HOST_WIDE_INT type to avoid overflows and change overflow_flag
962 checking.
963
921bb9d1
RB
9642019-02-22 Richard Biener <rguenther@suse.de>
965
966 * c-pch.c (no_checksum): Remove.
967 (pch_init): Remove assertion that executable_checksum is not
968 all zero.
969 (c_common_valid_pch): Likewise.
970
e2ebb05c
MS
9712019-02-18 Martin Sebor <msebor@redhat.com>
972
973 PR middle-end/89294
974 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
975
3fe53000
DM
9762019-02-16 David Malcolm <dmalcolm@redhat.com>
977
978 PR c++/88680
979 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
980 implementing -Wtype-limits.
981
28a8cef1
MS
9822019-02-11 Martin Sebor <msebor@redhat.com>
983
984 PR c++/87996
985 * c-common.c (invalid_array_size_error): New function.
986 (valid_array_size_p): Call it. Handle size as well as type.
987 * c-common.h (valid_constant_size_p): New function.
988 (enum cst_size_error): New type.
989
ec2be203
DM
9902019-01-31 David Malcolm <dmalcolm@redhat.com>
991
992 PR c/89122
993 * known-headers.cc (get_stdlib_header_for_name): Add
994 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
995
8936f047
JJ
9962019-01-31 Jakub Jelinek <jakub@redhat.com>
997
998 PR libstdc++/88170
999 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
1000 a C cast in pp_c_flag_gnu_v3 mode.
1001
6a335b96
JJ
10022019-01-29 Jakub Jelinek <jakub@redhat.com>
1003
1004 PR c/86125
1005 * c-common.c (c_common_nodes_and_builtins): Build type variants for
1006 builtin_structptr_types types even for C.
1007
2a06eba5
BE
10082019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1009
1010 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
1011 when rhs is of array type correctly. Fix handling of nested structures.
1012 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
1013 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
1014 type casts within nested compound expressions.
1015
18a23298
JJ
10162019-01-22 Jakub Jelinek <jakub@redhat.com>
1017
1018 PR middle-end/88968
1019 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
1020 variable after using BIT_FIELD_REF.
1021
420183d9
L
10222019-01-18 H.J. Lu <hongjiu.lu@intel.com>
1023
1024 PR c/51628
1025 PR c/88664
1026 * c-common.h (warn_for_address_or_pointer_of_packed_member):
1027 Remove the boolean argument.
1028 * c-warn.c (check_address_of_packed_member): Renamed to ...
1029 (check_address_or_pointer_of_packed_member): This. Also
1030 warn pointer conversion.
1031 (check_and_warn_address_of_packed_member): Renamed to ...
1032 (check_and_warn_address_or_pointer_of_packed_member): This.
1033 Also warn pointer conversion.
1034 (warn_for_address_or_pointer_of_packed_member): Remove the
1035 boolean argument. Don't check pointer conversion here.
1036
99063eee
RS
10372019-01-15 Richard Sandiford <richard.sandiford@arm.com>
1038
1039 PR inline-asm/52813
1040 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
1041
a30d0196
JJ
10422019-01-14 Jakub Jelinek <jakub@redhat.com>
1043
1044 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
1045 and __cpp_nontype_template_parameter_auto. Add a comment that
1046 __cpp_template_auto is deprecated.
1047
2d91f79d
TH
10482019-01-14 Tom Honermann <tom@honermann.net>
1049
1050 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
1051 * c-common.c (c_common_reswords): Add char8_t.
1052 (fix_string_type): Use char8_t for the type of u8 string literals.
1053 (c_common_get_alias_set): char8_t doesn't alias.
1054 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
1055 C++.
1056 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
1057 (keyword_begins_type_specifier): Add RID_CHAR8.
1058 * c-common.h (rid): Add RID_CHAR8.
1059 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
1060 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
1061 Define char8_type_node and char8_array_type_node.
1062 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
1063 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
1064 (c_cpp_builtins): Predefine __cpp_char8_t.
1065 * c-lex.c (lex_string): Use char8_array_type_node as the type of
1066 CPP_UTF8STRING.
1067 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
1068 * c-opts.c: If not otherwise specified, enable -fchar8_t when
1069 targeting C++2a.
1070 * c.opt: Add the -fchar8_t command line option.
1071
23db6ced
MS
10722019-01-14 Martin Sebor <msebor@redhat.com>
1073
1074 PR target/88638
1075 * c-attribs.c (positional_argument): Call valid_format_string_type_p
1076 and issue errors if it fails.
1077 * c-common.h (valid_format_string_type_p): Declare.
1078 * c-format.c (valid_stringptr_type_p): Rename...
1079 (valid_format_string_type_p): ...to this and make extern.
1080 (handle_format_arg_attribute): Adjust to new name.
1081 (check_format_string): Same.
1082
234c3818
L
10832019-01-13 H.J. Lu <hongjiu.lu@intel.com>
1084
1085 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
1086 Replace "may may" with "may" in warning message.
1087
d8fcab68
JJ
10882019-01-07 Jakub Jelinek <jakub@redhat.com>
1089
1090 PR c++/85052
1091 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
1092 (c_build_vec_convert): Declare.
1093 * c-common.c (c_build_vec_convert): New function.
1094
29d24852
MS
10952019-01-04 Martin Sebor <msebor@redhat.com>
1096
1097 PR c/88546
1098 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1099 Handle C++ empty throw specification and C11 _Noreturn.
1100 (has_attribute): Also handle C11 _Noreturn.
1101
9069a4c9
MS
11022019-01-04 Martin Sebor <msebor@redhat.com>
1103
1104 PR c/88363
1105 * c-attribs.c (positional_argument): Also accept enumerated types.
1106
a5544970
JJ
11072019-01-01 Jakub Jelinek <jakub@redhat.com>
1108
1109 Update copyright years.
1110
da77eace
L
11112018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1112
1113 PR c/51628
1114 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1115 * c-warn.c (check_alignment_of_packed_member): New function.
1116 (check_address_of_packed_member): Likewise.
1117 (check_and_warn_address_of_packed_member): Likewise.
1118 (warn_for_address_or_pointer_of_packed_member): Likewise.
1119 * c.opt: Add -Wno-address-of-packed-member.
1120
573767d4
DM
11212018-12-20 David Malcolm <dmalcolm@redhat.com>
1122
1123 PR c++/87504
1124 * c-warn.c (get_outermost_macro_expansion): New function.
1125 (spelled_the_same_p): Use it to unwind the macro expansions, and
1126 compare the outermost macro in each nested expansion, rather than
1127 the innermost.
1128
a14feb3c
DM
11292018-12-19 David Malcolm <dmalcolm@redhat.com>
1130
1131 PR c++/87504
1132 * c-common.h (warn_tautological_cmp): Convert 1st param from
1133 location_t to const op_location_t &.
1134 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1135 when testing for INTEGER_CST.
1136 (warn_tautological_bitwise_comparison): Convert 1st param from
1137 location_t to const op_location_t &; use it to build a
1138 binary_op_rich_location, and use this.
1139 (spelled_the_same_p): New function.
1140 (warn_tautological_cmp): Convert 1st param from location_t to
1141 const op_location_t &. Warn for macro expansions if
1142 spelled_the_same_p. Use binary_op_rich_location.
1143
dfd7fdca
DM
11442018-12-19 David Malcolm <dmalcolm@redhat.com>
1145
1146 PR c++/43064
1147 PR c++/43486
1148 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1149 (verify_tree): Handle location wrappers.
1150 (c_common_truthvalue_conversion): Strip any location wrapper.
1151 Handle CONST_DECL.
1152 (fold_offsetof): Strip any location wrapper.
1153 (complete_array_type): Likewise for initial_value.
1154 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1155 index before checking for INTEGER_CST.
1156 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1157 print parentheses around location wrappers.
1158 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1159 before checking for INTEGER_CST.
1160 (warn_tautological_bitwise_comparison): Call
1161 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1162 before checking for INTEGER_CST.
1163 (readonly_error): Strip any location wrapper.
1164 (warn_array_subscript_with_type_char): Strip location wrappers
1165 before checking for INTEGER_CST. Use the location of the index if
1166 available.
1167
5c8b3702
JM
11682018-12-06 Jason Merrill <jason@redhat.com>
1169
1170 PR c++/88136 - -Wdeprecated-copy false positives
1171 * c.opt (Wdeprecated-copy-dtor): New.
1172 (Wdeprecated-copy): Move to -Wextra.
1173
673670da
MS
11742018-11-29 Martin Sebor <msebor@redhat.com>
1175
1176 PR c/88172
1177 PR testsuite/88208
1178 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1179 alignments to values less than the target requires.
1180 (has_attribute): For attribute aligned consider both the attribute
1181 and the alignment bits.
1182 * c-common.c (c_init_attributes): Optionally issue a warning for
1183 zero alignment.
1184
04864ec8
MS
11852018-11-28 Martin Sebor <msebor@redhat.com>
1186
1187 PR c/88065
1188 PR c/87297
1189 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1190 or destination is an error.
1191
ace83db0
JJ
11922018-11-28 Jakub Jelinek <jakub@redhat.com>
1193
1194 PR c++/88215
1195 * c-ubsan.c: Include langhooks.h.
1196 (ubsan_instrument_division): Change gcc_assert that main variants
1197 of op0 and op1 types are equal to gcc_checking_assert that the
1198 main variants are compatible types.
1199
da193a27
EB
12002018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1201
1202 * c-ada-spec.c: Include stringpool.h.
1203 (has_static_fields): Return false for incomplete types.
1204 (is_tagged_type): Likewise.
1205 (has_nontrivial_methods): Likewise.
1206 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1207 (struct overloaded_name_hash): New structure.
1208 (struct overloaded_name_hasher): Likewise.
1209 (overloaded_names): New global variable.
1210 (init_overloaded_names): New static function.
1211 (overloaded_name_p): New predicate.
1212 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1213 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1214 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1215 Remove always-true condition and dump forward types.
1216 (dump_ada_specs): Delete overloaded_names.
1217
98f08eb8
MS
12182018-11-20 Martin Sebor <msebor@redhat.com>
1219
1220 * c-attribs.c (type_for_vector_size): New function.
1221 (type_valid_for_vector_size): Same.
1222 (handle_vector_size_attribute): Move code to the functions above
1223 and call them.
1224 (validate_attribute, has_attribute): New functions.
1225 * c-common.h (has_attribute): Declare.
1226 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1227 * c-common.c (c_common_resword): Same.
1228
2674fa47
JM
12292018-11-16 Jason Merrill <jason@redhat.com>
1230
1231 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1232 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1233
258b3854
JJ
12342018-11-16 Jakub Jelinek <jakub@redhat.com>
1235
1236 PR middle-end/87854
1237 * c-common.c (fix_string_type): Reject string literals larger than
1238 TYPE_MAX_VALUE (ssizetype) bytes.
1239
1d249509
MS
12402018-11-15 Martin Sebor <msebor@redhat.com>
1241
1242 PR c++/87541
1243 PR c++/87542
1244 * c-attribs.c (positional_argument): New function.
1245 (handle_alloc_size_attribute): Use it and simplify.
1246 (handle_alloc_align_attribute): Same.
1247 (handle_assume_aligned_attribute): Same.
1248 (handle_nonnull_attribute): Same.
1249 * c-common.c (check_function_arguments): Pass fntype to
1250 check_function_format.
1251 * c-common.h (check_function_format): Add an argument.
1252 (PosArgFlags, positional_argument): Declare new type and function.
1253 * c-format.c (decode_format_attr): Add arguments.
1254 (check_format_string, get_constant): Same.
1255 (convert_format_name_to_system_name): Adjust.
1256
478dd60d
DM
12572018-11-15 David Malcolm <dmalcolm@redhat.com>
1258
1259 PR other/19165
1260 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1261
8cca0163
JJ
12622018-11-14 Jakub Jelinek <jakub@redhat.com>
1263
8ee09943
JJ
1264 P1236R1 - Signed integers are two's complement
1265 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1266 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1267 with in-range second operand well defined for -std=c++2a.
1268
8cca0163
JJ
1269 PR other/88007
1270 * c-common.c (parse_optimize_options): Allocate option string from
1271 opts_obstack rather than as GC memory. Move the allocation after
1272 warning for invalid option.
1273
620e594b
DM
12742018-11-13 David Malcolm <dmalcolm@redhat.com>
1275
1276 * c-common.c (c_get_substring_location): Update for renaming of
1277 get_source_location_for_substring to get_location_within_string.
1278 * c-lex.c: Replace "source_location" with "location_t".
1279 * c-opts.c: Likewise.
1280 * c-ppoutput.c: Likewise.
1281
f9731de3
MS
12822018-11-13 Martin Sebor <msebor@redhat.com>
1283
1284 PR middle-end/81824
1285 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1286 (handle_tls_model_attribute): Improve diagnostics.
1287
e4bd6d5e
JM
12882018-11-12 Jason Merrill <jason@redhat.com>
1289
a6bb6b07
JM
1290 * c-cppbuiltin.c (c_cpp_builtins): Define
1291 __cpp_impl_destroying_delete.
1292
e4bd6d5e
JM
1293 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1294 __cpp_conditional_explicit.
1295
79a2c428
MS
12962018-11-09 Martin Sebor <msebor@redhat.com>
1297
1298 PR middle-end/81824
1299 * c-attribs.c (handle_copy_attribute): New function.
1300
4c7bd361
MS
13012018-11-09 Martin Sebor <msebor@redhat.com>
1302
1303 PR c/87795
1304 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1305
28567c40
JJ
13062018-11-08 Jakub Jelinek <jakub@redhat.com>
1307
1308 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1309 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1310 enum omp_memory_order MEMORY_ORDER.
1311 (c_finish_omp_flush): Add MO argument.
1312 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1313 (c_finish_omp_for): Add FINAL_P argument.
1314 * c-omp.c: Include memmodel.h.
1315 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1316 OMP_TASKGROUP_CLAUSES to it.
1317 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1318 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1319 instead of OMP_ATOMIC_SEQ_CST.
1320 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1321 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1322 __atomic_thread_fence call with the given value.
1323 (check_omp_for_incr_expr): Formatting fixes.
1324 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1325 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1326 is not constant expression 1 or -1. Transform NE_EXPR loops
1327 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1328 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1329 loops too.
1330 (c_omp_split_clauses): Add support for combined
1331 #pragma omp parallel master and
1332 #pragma omp {,parallel }master taskloop{, simd} constructs.
1333 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1334 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1335 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1336 (c_omp_predetermined_sharing): Don't return
1337 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1338 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1339 PRAGMA_OMP_REQUIRES.
1340 * c-pragma.h (enum pragma_kind): Likewise.
1341 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1342 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1343
204839e7
DM
13442018-11-08 David Malcolm <dmalcolm@redhat.com>
1345
1346 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1347
d8010ee4
DM
13482018-11-08 David Malcolm <dmalcolm@redhat.com>
1349
1350 * c-format.c (local_cgraph_node_ptr_node): New variable.
1351 (gcc_dump_printf_char_table): Add entry for %C.
1352 (get_pointer_to_named_type): New function, taken from the handling
1353 code for "gimple *" from...
1354 (init_dynamic_diag_info): ...here. Add handling for
1355 "cgraph_node *".
1356 * c-format.h (T_CGRAPH_NODE): New.
1357
4be5c72c
JM
13582018-10-19 Jason Merrill <jason@redhat.com>
1359
1360 * c-cppbuiltin.c (c_cpp_builtins): Add
1361 __cpp_nontype_template_parameter_class.
1362
f3f6029d
NS
13632018-10-31 Nathan Sidwell <nathan@acm.org>
1364
ab5324fb
NS
1365 * c-opts.c (c_finish_options): Force command line macro
1366 location. Refactor to avoid repeating main debug hook.
1367 (push_command_line_include): Clarify comment.
1368
f3f6029d
NS
1369 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1370
91e3ec29
MS
13712018-10-30 Martin Sebor <msebor@redhat.com>
1372
1373 PR middle-end/87041
1374 * c-format.c (check_format_types): Avoid diagnosing null pointer
1375 arguments to printf-family of functions.
1376
b5ff4f5c
MP
13772018-10-30 Marek Polacek <polacek@redhat.com>
1378
1379 Implement P0892R2, explicit(bool).
1380 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1381
7e2de6df
DM
13822018-10-29 David Malcolm <dmalcolm@redhat.com>
1383
1384 * name-hint.h (name_hint::take_deferred): New member function.
1385
b2bf438c
DM
13862018-10-29 David Malcolm <dmalcolm@redhat.com>
1387
1388 PR c++/56856
1389 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1390 argument.
1391 (check_function_restrict): Rename param "argarray" to
1392 "unfolded_argarray", and make a copy named "argarray", calling
1393 fold_for_warn on each argument.
1394 (check_function_arguments): Add note about responsibility for
1395 folding the arguments.
1396
9f936c86
JM
13972018-10-17 Joseph Myers <joseph@codesourcery.com>
1398
1399 * c-common.c (flag_isoc2x): New variable.
1400 * c-common.h (clk_c): Update comment to reference C2X.
1401 (flag_isoc99, flag_isoc11): Update comments to reference future
1402 standard versions in general.
1403 (flag_isoc2x): Declare.
1404 * c-opts.c (set_std_c2x): New function.
1405 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1406 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1407 flag_isoc2x to 0.
1408 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1409
7a8a92c4
JM
14102018-10-17 Joseph Myers <joseph@codesourcery.com>
1411
1412 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1413 (std=iso9899:2018): Document C17 as published in 2018.
1414
4dc003ff
CL
14152018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1416
1417 PR c++/87364
1418 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1419
79371671
WW
14202018-10-11 Will Wray <wjwray@gmail.com>
1421
1422 PR c++/87364
1423 * c-pretty-print.h (pp_c_type_cast): Prototype.
1424 (pp_c_integer_constant): Likewise.
1425 * c-pretty-print.c (pp_c_type_cast): No longer static.
1426 (pp_c_integer_constant): Likewise.
1427 (pp_c_enumeration_constant): Fix loop termination when finding
1428 name of constant. No longer returns a value. Call
1429 pp_c_integer_constant.
1430 (c_pretty_printer::constant): Update for changes to
1431 pp_c_enumeration_constant.
1432
46c62690
JJ
14332018-10-11 Jakub Jelinek <jakub@redhat.com>
1434
1435 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1436 for no_unique_address.
1437
c24300ba
DM
14382018-10-09 David Malcolm <dmalcolm@redhat.com>
1439
1440 * c-common.c (c_option_controlling_cpp_error): Rename to...
1441 (c_option_controlling_cpp_diagnostic): ...this, and convert
1442 "reason" from int to enum.
1443 (c_cpp_error): Rename to...
1444 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1445 * c-common.h (c_cpp_error): Rename to...
1446 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1447 * c-opts.c (c_common_init_options): Update for renaming.
1448
8656dafa
RS
14492018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1450
1451 PR c/87286
1452 * c-common.c (vector_types_compatible_elements_p): Use
1453 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1454
8cff0652
VK
14552018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1456
1457 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1458 to generate constructor destructor priority warning.
1459 * c.opt (-Wprio-ctor-dtor): New option.
1460
bedf03a2
JM
14612018-10-01 Jason Merrill <jason@redhat.com>
1462
1463 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1464
6cc430c1
EB
14652018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1466
1467 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1468 (dump_ada_node): Add const keyword.
1469
87677ac7
ML
14702018-09-25 Martin Liska <mliska@suse.cz>
1471
1472 * c-common.c (c_common_truthvalue_conversion):
1473 Remove Pascal from documentation.
1474
518196cb
EB
14752018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1476
1477 * c-ada-spec.c: Include diagnostic.h.
1478 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1479
a599af84
MP
14802018-09-19 Marek Polacek <polacek@redhat.com>
1481
1482 * c.opt (Wclass-conversion): New.
1483
9c4a4b3c
DM
14842018-09-17 David Malcolm <dmalcolm@redhat.com>
1485
1486 * c-format.c (range_label_for_format_type_mismatch::get_text):
1487 Update for new param.
1488
c896ecfe
DM
14892018-09-17 David Malcolm <dmalcolm@redhat.com>
1490
1491 * c-format.c (format_warning_at_char): Update for introduction of
1492 format_string_diagnostic_t.
1493 (format_type_warning): Likewise.
1494
80c6d1f4
MJ
14952018-09-17 Martin Jambor <mjambor@suse.cz>
1496
1497 PR c/63886
1498 * c.opt (Wabsolute-value): New.
1499
6d900107
BE
15002018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1501
1502 * c-common.c (complete_flexible_array_elts): New helper function.
1503 * c-common.h (complete_flexible_array_elts): Declare.
1504
b5764229
BE
15052018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1506
1507 * c-common.c (braced_list_to_string): Remove eval parameter.
1508 Add some more checks. Always create zero-terminated STRING_CST.
1509 * c-common.h (braced_list_to_string): Adjust prototype.
1510
85204e23
DM
15112018-08-27 David Malcolm <dmalcolm@redhat.com>
1512
1513 PR 87091
1514 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1515 to a tri-state.
1516 (maybe_suggest_missing_token_insertion): Likewise.
1517 (maybe_add_include_fixit): Add param "override_location". If set,
1518 and source-printing is enabled, then override the rich_location's
1519 primary location with that of the insertion point for the fix-it
1520 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1521 * c-common.h (extern void maybe_add_include_fixit): Add bool
1522 param.
1523 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1524 for conversion of show_caret_p to a tri-state.
1525 * c-warn.c (warn_for_restrict): Likewise.
1526 * known-headers.cc
1527 (suggest_missing_header::~suggest_missing_header): Update call to
1528 maybe_add_include_fixit to suggest overriding the location, as it
1529 is for a note.
1530
3d78e008
ML
15312018-08-27 Martin Liska <mliska@suse.cz>
1532
1533 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1534 fndecl_built_in_p and remove check for FUNCTION_DECL if
1535 possible.
3d78e008
ML
1536 (check_builtin_function_arguments): Likewise.
1537 (reject_gcc_builtin): Likewise.
1538 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1539
b5be6d0c
MP
15402018-08-26 Marek Polacek <polacek@redhat.com>
1541
1542 PR c++/87029, Implement -Wredundant-move.
1543 * c.opt (Wredundant-move): New option.
1544
79ca9c35
MP
15452018-08-21 Marek Polacek <polacek@redhat.com>
1546
1547 PR c++/86981, Implement -Wpessimizing-move.
1548 * c.opt (Wpessimizing-move): New option.
1549
097f82ec
DM
15502018-08-20 David Malcolm <dmalcolm@redhat.com>
1551
1552 PR other/84889
1553 * c-attribs.c (common_handle_aligned_attribute): Add
1554 auto_diagnostic_group instance.
1555 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1556 * c-opts.c (c_common_post_options): Likewise.
1557 * c-warn.c (warn_logical_not_parentheses): Likewise.
1558 (warn_duplicated_cond_add_or_warn): Likewise.
1559 (warn_for_multistatement_macros): Likewise.
1560
3fb558b1
NS
15612018-08-20 Nathan Sidwell <nathan@acm.org>
1562
1563 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1564 access.
1565
800c0e98
NS
15662018-08-17 Nathan Sidwell <nathan@acm.org>
1567
1568 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1569 field.
1570 (laxy_hex_fp_value_count): Make unsigned.
1571 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1572 manipulate the macro.
1573 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1574 cpp_define_lazily.
1575
6f795a92
DM
15762018-08-17 David Malcolm <dmalcolm@redhat.com>
1577
1578 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1579 (gcc_dump_printf_length_specs): New.
1580 (gcc_dump_printf_flag_pairs): New.
1581 (gcc_dump_printf_flag_specs): New.
1582 (gcc_dump_printf_char_table): New.
1583 (format_types_orig): Add entry for "gcc_dump_printf".
1584 (init_dynamic_diag_info): Set up length_char_specs and
1585 conversion_specs for gcc_dump_printf_format_type.
1586 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1587
c5d725c0
NS
15882018-08-17 Nathan Sidwell <nathan@acm.org>
1589
10f04917
NS
1590 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1591
c5d725c0
NS
1592 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1593 * c-cppbuiltin.c: Likewise.
1594
c0c12356
ML
15952018-08-17 Martin Liska <mliska@suse.cz>
1596
1597 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1598 Ignore/Deprecated flag. Warning is done automatically for
1599 Deprecated flags.
c0c12356 1600
10fcc142
DM
16012018-08-16 David Malcolm <dmalcolm@redhat.com>
1602
1603 PR c++/70693
1604 * c-common.c (selftest::c_family_tests): Call
1605 selftest::c_indentation_c_tests.
1606 * c-common.h (selftest::c_indentation_c_tests): New decl.
1607 * c-indentation.c: Include "selftest.h".
1608 (next_tab_stop): Add "tab_width" param, rather than accessing
1609 cpp_opts.
1610 (get_visual_column): Likewise. Clarify comment. Bulletproof
1611 against reading past the end of the line.
1612 (get_first_nws_vis_column): Add "tab_width" param.
1613 (detect_intervening_unindent): Likewise.
1614 (should_warn_for_misleading_indentation): Read tab width from
1615 cpp_opts and pass around.
1616 (selftest::test_next_tab_stop): New test.
1617 (selftest::assert_get_visual_column_succeeds): New function.
1618 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1619 (selftest::assert_get_visual_column_fails): New function.
1620 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1621 (selftest::test_get_visual_column): New test.
1622 (selftest::c_indentation_c_tests): New function.
1623
3f6677f4
NS
16242018-08-16 Nathan Sidwell <nathan@acm.org>
1625
1626 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1627 (store_ada_macro): Likewise.
1628 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1629 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1630
96e6ae57
DM
16312018-08-15 David Malcolm <dmalcolm@redhat.com>
1632
1633 * c-format.c: Include "selftest-diagnostic.h" and
1634 "gcc-rich-location.h".
1635 (format_warning_at_char): Pass NULL for new label params of
1636 format_warning_va.
1637 (class indirection_suffix): New class.
1638 (class range_label_for_format_type_mismatch): New class.
1639 (format_type_warning): Move logic for generating "*" suffix to
1640 class indirection_suffix. Create "fmt_label" and "param_label"
1641 to show their types, and pass them to the
1642 format_warning_at_substring calls.
1643 (selftest::test_type_mismatch_range_labels): New test.
1644 (selftest::c_format_c_tests): Call it.
1645
23aa9f7c
MS
16462018-08-13 Martin Sebor <msebor@redhat.com>
1647
1648 PR tree-optimization/71625
1649 * c-common.c (braced_list_to_string): New function.
1650 * c-common.h (braced_list_to_string): Declare it.
1651
f10a9135
NS
16522018-08-08 Nathan Sidwell <nathan@acm.org>
1653
1654 * c-common.c (try_to_locate_new_include_inertion_point): Use
1655 linemap_included_from_linemap.
1656 * c-lex.c (fe_file_change): Use linemap_included_from.
1657 * c-ppoutput.c (pp_file_change): Likewise.
1658
8a45b051
MS
16592018-08-01 Martin Sebor <msebor@redhat.com>
1660
1661 PR tree-optimization/86650
ab20d992 1662 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1663 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1664 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1665 * c-format.h (T89_G): Update to be "gimple *" rather than
1666 "gcall *".
1667 (local_gcall_ptr_node): Rename...
1668 (local_gimple_ptr_node): ...to this.
1669
e540ccc0
DM
16702018-07-31 David Malcolm <dmalcolm@redhat.com>
1671
1672 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1673 table entries for gcc_diag_char_table, and the 'Z' entry from
1674 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1675 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1676 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1677 adding missing "Z" for this table. Remove erroneous "G" and "K"
1678 entries.
1679 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1680 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1681 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1682
425fc685
RE
16832018-07-31 Richard Earnshaw <rearnsha@arm.com>
1684
1685 * c-common.c (speculation_safe_resolve_call): New function.
1686 (speculation_safe_resolve_params): New function.
1687 (speculation_safe_resolve_return): New function.
1688 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1689 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1690 __HAVE_SPECULATION_SAFE_VALUE.
1691
181463c2
DM
16922018-07-20 David Malcolm <dmalcolm@redhat.com>
1693
1694 * c-common.c (c_cpp_error): Remove redundant "line_table"
1695 parameter from call to rich_location::set_range.
1696 (maybe_suggest_missing_token_insertion): Likewise.
1697
0d7f9065
MS
16982018-07-20 Martin Sebor <msebor@redhat.com>
1699
1700 PR middle-end/82063
ab20d992 1701 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1702
00abf86c
MS
17032018-07-20 Martin Sebor <msebor@redhat.com>
1704
1705 PR middle-end/82063
1706 * c-common.h (c_common_handle_option): Change function argument
1707 to HOST_WIDE_INT.
1708 * c-opts.c (c_common_init_options): Same.
1709 (c_common_handle_option): Same. Remove special handling of
1710 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1711 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1712 options to take a HOST_WIDE_INT argument and accept a byte-size
1713 suffix. Initialize.
1714 (-Wvla-larger-than): Same.
1715 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1716 (-Wno-vla-larger-than): Same.
1717
9b452033
JJ
17182018-07-12 Jakub Jelinek <jakub@redhat.com>
1719
1720 * c-attribs.c (c_common_attribute_table): Add
1721 "omp declare target implicit" attribute.
1722
cd0762f3
RB
17232018-07-12 Richard Biener <rguenther@suse.de>
1724
1725 PR c/86453
1726 * c-attribs.c (handle_packed_attribute): Do not build a variant
1727 type with TYPE_PACKED, instead ignore the attribute if we may
1728 not apply to the original type.
1729
0b27c3ed
JJ
17302018-07-10 Jakub Jelinek <jakub@redhat.com>
1731
1732 PR c++/86443
1733 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1734 to contain TREE_LIST for both the original class iterator and the
1735 "last" helper var.
1736
e730a0ef
EB
17372018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1738
1739 * c-ada-spec.c (to_ada_name): Remove index parameter.
1740 (pp_ada_tree_identifier): Likewise.
1741 (dump_ada_macros): Adjust call to to_ada_name.
1742 (struct overloaded_name_hash): Delete.
1743 (struct overloaded_name_hasher): Likewise.
1744 (overloaded_names): Likewise.
1745 (compute_overloading_index): Likewise.
1746 (dump_ada_decl_name): Do not call compute_overloading_index and
1747 adjust calls to pp_ada_tree_identifier.
1748 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1749 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1750 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1751 (dump_ada_enum_type): Remove type and display_convention parameters.
1752 Adjust calls to pp_ada_tree_identifier.
1753 (dump_ada_node): Likewise and for dump_ada_structure.
1754 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1755 and tidy up.
1756 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1757 syntax.
1758 (print_constructor): Adjust call to pp_ada_tree_identifier.
1759 (print_destructor): Likewise.
1760 (dump_ada_declaration): Switch to aspect syntax.
1761 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1762 parameter with nested parameter.
1763 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1764 (dump_ada_specs): Do not delete overloaded_names table.
1765
8de583fc
PB
17662018-07-06 Peter Bergner <bergner@linux.ibm.com>
1767
1768 PR target/86324
e730a0ef 1769 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1770 target hook.
1771
09cff37b
NS
17722018-07-05 Nathan Sidwell <nathan@acm.org>
1773
1774 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1775 NO_IMPLICIT_EXTERN_C.
1776
98086b2b
ML
17772018-06-28 Martin Liska <mliska@suse.cz>
1778
1779 * cppspec.c: Include opt-suggestions.h.
1780
ab20d992
JJ
17812018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1782 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1783 Cesar Philippidis <cesar@codesourcery.com>
1784
1785 * c-pragma.h (enum pragma_omp_clause): Add
1786 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1787 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1788
f41b7612
JJ
17892018-06-20 Jakub Jelinek <jakub@redhat.com>
1790
1791 PR c++/86210
1792 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1793 comment.
1794
4252ccd7
MS
17952018-06-18 Martin Sebor <msebor@redhat.com>
1796
1797 PR middle-end/85602
1798 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1799 nonstring.
1800
e197e64e
KV
18012018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1802
1803 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1804
34a7a230
JM
18052018-06-13 Jason Merrill <jason@redhat.com>
1806
5cef3733
JM
1807 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1808 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1809 handling.
1810
34a7a230
JM
1811 PR c++/86094 - wrong code with defaulted move ctor.
1812 * c-opts.c (c_common_post_options): Bump the current ABI version to
1813 13. Set warn_abi_version and flag_abi_compat_version to the current
1814 version rather than 0. Fix defaulting flag_abi_compat_version from
1815 warn_abi_version.
1816
bb0f14ae
MS
18172018-06-12 Martin Sebor <msebor@redhat.com>
1818
1819 PR c/85931
1820 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1821 sizeof source and destination yields the same value.
1822
3713f2e2
ML
18232018-06-12 Martin Liska <mliska@suse.cz>
1824
1825 * c.opt: Make MPX-related options as Deprecated.
1826
4af78ef8
DM
18272018-06-08 David Malcolm <dmalcolm@redhat.com>
1828
1829 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1830 rather than 0.
1831
31db0fe0
ML
18322018-06-08 Martin Liska <mliska@suse.cz>
1833
1834 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1835 for MPX (macros, related functions, fields in cgraph_node, ...).
1836 (handle_bnd_legacy): Likewise.
1837 (handle_bnd_instrument): Likewise.
1838 * c.opt: Likewise.
1839
fe16acf2
JJ
18402018-06-06 Jakub Jelinek <jakub@redhat.com>
1841
1842 PR c++/86068
1843 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1844 __cpp_transactional_memory to 201500 instead of 210500.
1845
4dbdb49b
JM
18462018-06-06 Jason Merrill <jason@redhat.com>
1847
1848 PR c++/85710 - ICE with -Wmemset-elt-size.
1849 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1850
f8ad043f
JM
18512018-06-01 Jason Merrill <jason@redhat.com>
1852
1853 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1854 201703.
1855
abc24d93
EB
18562018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1857
1858 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1859 declaration for a typedef independently of whether the declaration of
1860 the subtype is generated.
1861
d258f4aa
MS
18622018-05-31 Martin Sebor <msebor@redhat.com>
1863
1864 PR c/82063
1865 * c.opt (-Wno-alloc-size-larger-than): New option.
1866
b67b9225
DP
18672018-04-22 David Pagan <dave.pagan@oracle.com>
1868
1869 PR c/55976
1870 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1871 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1872 differentiate between default (no option), -Wreturn-type, and
1873 -Wno-return-type.
1874
04eb9c55
JM
18752018-05-29 Jason Merrill <jason@redhat.com>
1876
1877 * c.opt (Winit-list-lifetime): New flag.
1878
b0c31bc6
BE
18792018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1880
1881 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1882 splay_tree_delete_pointers.
1883
44284983
JJ
18842018-05-26 Jakub Jelinek <jakub@redhat.com>
1885
1886 PR bootstrap/85921
1887 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1888 noinline variable to workaround broken kernel headers.
1889
b46b715d
JM
18902018-05-18 Jason Merrill <jason@redhat.com>
1891
1892 * c.opt (Wdeprecated-copy): New flag.
1893
40659769
ML
18942018-05-17 Martin Liska <mliska@suse.cz>
1895
1896 * c-warn.c (overflow_warning): Do not use
1897 space in between 'G_' and '('.
1898
403962ea
JM
18992018-05-09 Jason Merrill <jason@redhat.com>
1900
1901 * c-common.c (valid_array_size_p): Add complain parameter.
1902 * c-common.h: ...which defaults to true.
1903
1c9ee609
JJ
19042018-05-11 Jakub Jelinek <jakub@redhat.com>
1905
1906 PR c/85696
1907 * c-omp.c (c_omp_predetermined_sharing): Return
1908 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1909
19916065
ML
19102018-05-11 Martin Liska <mliska@suse.cz>
1911
92a285c1 1912 PR sanitizer/85556
19916065
ML
1913 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1914 TREE_LIST values.
1915
79e7b1fe
JJ
19162018-05-10 Jakub Jelinek <jakub@redhat.com>
1917
1918 PR c++/85662
1919 * c-common.h (fold_offsetof_1): Removed.
1920 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1921 CTX argument defaulted to ERROR_MARK.
1922 * c-common.c (fold_offsetof_1): Renamed to ...
1923 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1924 argument, convert the pointer constant to TYPE and use size_binop
1925 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1926 a pointer type. Adjust recursive calls.
1927
86c12f76
EB
19282018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1929
1930 PR c++/85400
1931 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1932
ee336e84
NS
19332018-05-07 Nathan Sidwell <nathan@acm.org>
1934
1935 * c.opt (ffor-scope): Remove functionality, issue warning.
1936
6c072e21
NS
19372018-05-03 Nathan Sidwell <nathan@acm.org>
1938
1939 * c.opt (ffriend-injection): Remove functionality, issue warning.
1940
2cc7d3a7
DM
19412018-05-01 David Malcolm <dmalcolm@redhat.com>
1942
1943 PR c/84258
1944 * c-format.c (struct format_check_results): Add field
1945 "number_non_char".
1946 (check_format_info): Initialize it, and warn if encountered.
1947 (check_format_arg): Distinguish between wide char and
1948 everything else when detecting arrays of non-char.
1949
7761dfbe
DM
19502018-04-30 David Malcolm <dmalcolm@redhat.com>
1951
1952 * c-format.c (get_corrected_substring): Update for
1953 location_get_source_line returning a char_span. Use a char_span
1954 when handling the prefix of the correction.
1955 * c-indentation.c (get_visual_column): Update for
1956 location_get_source_line returning a char_span.
1957 (get_first_nws_vis_column): Likewise.
1958
62e98ef1
DM
19592018-03-29 David Malcolm <dmalcolm@redhat.com>
1960
1961 PR c++/84269
1962 * known-headers.cc (get_stdlib_header_for_name): Add various names
1963 from <assert.h>, <string.h>, and <memory.h>; add more names from
1964 <stdio.h>.
1965
a7dea617
JJ
19662018-03-27 Jakub Jelinek <jakub@redhat.com>
1967
1968 PR c++/85061
1969 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1970 get_base_address of the second operand is a VAR_P, rather than the
1971 operand itself, and use gcc_checking_assert instead of gcc_assert.
1972
889a3a30
MP
19732018-03-23 Marek Polacek <polacek@redhat.com>
1974
1975 PR c++/85045
1976 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1977 <case RDIV_EXPR>: Tweak condition.
1978
452154b9
EB
19792018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1980
1981 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1982
63ecb626
JJ
19832018-03-16 Jakub Jelinek <jakub@redhat.com>
1984
ce811fc4
JJ
1985 PR c/84909
1986 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1987 diagnostics.
1988
63ecb626
JJ
1989 PR c/84910
1990 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1991 diagnostics.
1992
a1295eec
RB
19932018-03-16 Richard Biener <rguenther@suse.de>
1994
1995 PR c/84873
1996 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1997 unshare the possibly folded expression.
1998
919674fb
RB
19992018-03-15 Richard Biener <rguenther@suse.de>
2000
2001 PR c/84873
2002 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
2003
f99309b2
MS
20042018-03-13 Martin Sebor <msebor@redhat.com>
2005
2006 PR tree-optimization/84725
2007 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
2008 with all three narrow character types, including their qualified forms.
2009
e9b9fa4c
MS
20102018-03-12 Martin Sebor <msebor@redhat.com>
2011
2012 PR tree-optimization/83456
ab20d992 2013 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
2014 Restore checking of bounded built-in functions.
2015 (check_function_arguments): Also return the result
2016 of warn_for_restrict.
ab20d992
JJ
2017 * c-common.c (check_function_restrict): Return bool.
2018 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 2019
0805d020
MP
20202018-03-02 Marek Polacek <polacek@redhat.com>
2021
2022 PR c++/84171
2023 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
2024 is erroneous.
2025
ed2a2f08
TS
20262018-03-02 Thomas Schwinge <thomas@codesourcery.com>
2027
2028 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
2029 function".
2030
90abdde0
MP
20312018-03-01 Marek Polacek <polacek@redhat.com>
2032
2033 PR c++/84639
2034 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
2035 alignment in computation.
2036
c6db43fa
EB
20372018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2038
2039 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
2040 <REAL_TYPE>: Deal specifically with _Float128/__float128.
2041
9e25c7ed
EB
20422018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2043
2044 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
2045 (is_char_array): Take a type instead of a declaration.
2046 (dump_ada_array_type): Likewise.
2047 (is_simple_enum): Minor tweak.
2048 (dump_ada_enum_type): New function extracted from...
2049 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
2050 <INTEGER_TYPE>: Remove unreachable code.
2051 <RECORD_TYPE>: Likewise. Minor tweaks.
2052 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
2053 <ENUMERAL_TYPE>: New case.
2054 <RECORD_TYPE>: Factor out common code.
2055 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
2056 Minor tweaks. Deal with enumeral types.
2057 (dump_ada_structure): Minor tweaks.
2058
09de3550
EB
20592018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2060
2061 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
2062 address for incomplete structures.
2063 (dump_forward_type): Do not bail out for incomplete structures.
2064 (dump_ada_declaration): Do not special-case incomplete structures
2065 for subtypes. Dump them as null records for types.
2066
095d8d4b
EB
20672018-02-28 Eric Botcazou <ebotcazou@adacore.com>
2068
2069 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
2070 (is_char_array): Fix formatting.
2071 (dump_template_types): Likewise.
2072 (dump_generic_ada_node): Rename into...
2073 (dump_ada_node): ...this.
2074 <POINTER_TYPE>: Remove superfluous space. Use generic address for
2075 incomplete structures and not for empty structures. Do not use it
2076 when forward declarations are needed.
2077 (dump_forward_type): New function.
2078 (dump_nested_types): Remove FORWARD parameter. Do not consider
2079 TREE_VISITED and do not generate a forward declaration. Only dump
2080 original nested types for nested declaration.
2081 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
2082 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
2083 <RECORD_TYPE>: Do not consider TREE_VISITED.
2084 (dump_ada_declaration): Use booleans and fix formatting throughout.
2085 <TYPE_DECL>: Skip incomplete structures and not empty structures.
2086 Call dump_forward_type instead of dump_nested_types for a typedef.
2087 Remove superfluous check and adjust call to dump_nested_types.
2088 <POINTER_TYPE>: Call dump_forward_type and fall through.
2089 (dump_ada_struct_decl): Rename into...
2090 (dump_ada_structure): ...this. Do not special-case empty structures.
2091
d4cfd486
MS
20922018-02-27 Martin Sebor <msebor@redhat.com>
2093
2094 PR c++/83871
2095 * c.opt (-Wmissing-attributes): New option.
2096
b22dbd03
ML
20972018-02-21 Martin Liska <mliska@suse.cz>
2098
2099 * c.opt (Wcatch-value=): Add IntegerRange.
2100
883dfe2a
JM
21012018-02-15 Jason Merrill <jason@redhat.com>
2102
2103 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2104
0444aa9c
NS
21052018-02-09 Nathan Sidwell <nathan@acm.org>
2106
2107 PR c/84293
2108 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2109 arg.
2110 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2111 arg. Adjust.
2112
cea71f0a
MS
21132018-02-09 Martin Sebor <msebor@redhat.com>
2114
2115 PR lto/84212
2116 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2117 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2118 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2119 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2120 (-Wuninitialized): Same.
2121
8c8b7be5
EB
21222018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2123
2124 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2125 keyword for components.
2126
7c30b12a
PC
21272018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2128
2129 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2130
eece7fe5
JK
21312018-02-02 Julia Koval <julia.koval@intel.com>
2132
2133 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2134
7d07a93a
MP
21352018-01-29 Marek Polacek <polacek@redhat.com>
2136
2137 PR c/83966
2138 * c-format.c (check_function_format): Check current_function_decl.
2139
53723269
JJ
21402018-01-27 Jakub Jelinek <jakub@redhat.com>
2141
2142 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2143 argument.
2144 (LAZY_HEX_FP_VALUES_CNT): Define.
2145 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2146 values rather than just 12.
2147 (builtin_define_with_hex_fp_value): Likewise.
2148
7365279f
BK
21492018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2150
92a285c1
ML
2151 PR other/70268
2152 * c.opt (-fmacro-prefix-map): New option.
2153 * c-opts.c (c_common_handle_option): Handle it.
2154 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2155 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2156
bb9869d5
DM
21572018-01-17 David Malcolm <dmalcolm@redhat.com>
2158
2159 PR c++/83814
2160 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2161
68dc87c3
EB
21622018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2163
2164 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2165 Skip 'f' and 'F' characters if it is true.
2166 (store_ada_macro): Minor tweak.
2167 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2168 <CPP_WSTRING>: Likewise.
2169 <CPP_STRING>: Output '&' in the buffer if not the first string.
2170 <CPP_NUMBER>: Adjust calls to dump_number.
2171
9a004410
DM
21722018-01-10 David Malcolm <dmalcolm@redhat.com>
2173
2174 PR c++/43486
2175 * c-common.c: Include "selftest.h".
2176 (get_atomic_generic_size): Perform the test for integral type
2177 before the range test for any integer constant, fixing indentation
2178 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2179 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2180 (selftest::test_fold_for_warn): New function.
2181 (selftest::c_common_c_tests): New function.
2182 (selftest::c_family_tests): Call it, and
2183 selftest::c_pretty_print_c_tests.
2184 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2185 * c-format.c (check_format_arg): Convert VAR_P check to a
2186 fold_for_warn.
2187 * c-pretty-print.c: Include "selftest.h".
2188 (pp_c_cast_expression): Don't print casts for location wrappers.
2189 (selftest::assert_c_pretty_printer_output): New function.
2190 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2191 (selftest::test_location_wrappers): New function.
2192 (selftest::c_pretty_print_c_tests): New function.
2193 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2194
5c0caeb3
RS
21952018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2196 Alan Hayward <alan.hayward@arm.com>
2197 David Sherwood <david.sherwood@arm.com>
2198
2199 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2200
73a699ae
RS
22012018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2202 Alan Hayward <alan.hayward@arm.com>
2203 David Sherwood <david.sherwood@arm.com>
2204
2205 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2206 as polynomial.
2207
928686b1
RS
22082018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2209 Alan Hayward <alan.hayward@arm.com>
2210 David Sherwood <david.sherwood@arm.com>
2211
2212 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2213 (convert_vector_to_array_for_subscript): Handle polynomial
2214 TYPE_VECTOR_SUBPARTS.
2215 (c_common_type_for_mode): Check valid_vector_subparts_p.
2216 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2217 VECTOR_CST_NELTS.
2218
85ec4feb
JJ
22192018-01-03 Jakub Jelinek <jakub@redhat.com>
2220
2221 Update copyright years.
2222
170a8bd6 22232017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2224 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2225
2226 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2227 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2228
ab20d992 22292017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2230
2231 PR debug/83527
2232 PR debug/83419
2233 * c-semantics.c (only_debug_stmts_after_p): New.
2234 (pop_stmt_list): Clear side effects in debug-only stmt list.
2235 Check for single nondebug stmt followed by debug stmts only.
2236
c12d20d4
AO
22372017-12-21 Alexandre Oliva <aoliva@redhat.com>
2238
2239 PR debug/83419
2240 * c-semantics.c (pop_stmt_list): Propagate side effects from
2241 single nondebug stmt to container list.
2242
01512446
JJ
22432017-12-19 Jakub Jelinek <jakub@redhat.com>
2244
2245 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2246 conditions with typical order conditions.
2247
82cfbd01
MP
22482017-12-18 Marek Polacek <polacek@redhat.com>
2249
2250 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2251 not in effect.
2252
99da11ec
MS
22532017-12-17 Martin Sebor <msebor@redhat.com>
2254
2255 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2256 an error for attribute warn_if_not_aligned.
2257
cc8bea0a
MS
22582017-12-16 Martin Sebor <msebor@redhat.com>
2259
2260 PR tree-optimization/78918
2261 * c-common.c (check_function_restrict): Avoid checking built-ins.
2262 * c.opt (-Wrestrict): Include in -Wall.
2263
4849deb1
JJ
22642017-12-15 Jakub Jelinek <jakub@redhat.com>
2265
2266 * c-attribs.c (c_common_attribute_table,
2267 c_common_format_attribute_table): Swap affects_type_identity
2268 and handler fields, adjust comments.
2269
c65e18d3
BE
22702017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2271
2272 * c.opt (Wcast-function-type): New warning option.
2273 * c-lex.c (get_fileinfo): Avoid warning.
2274 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2275
2004617a
QZ
22762017-12-14 Qing Zhao <qing.zhao@oracle.com>
2277
7365279f 2278 PR middle_end/79538
2004617a
QZ
2279 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2280 Adjust the size of buf1 and buf2, add a new buf to avoid
2281 format-overflow warning.
2282
ab20d992 22832017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2284
2285 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2286 subsequent statement list.
2287
5d9ae53d
MS
22882017-12-07 Martin Sebor <msebor@redhat.com>
2289
2290 PR c/81544
2291 PR c/81566
2292 * c-attribs.c (attr_aligned_exclusions): New array.
2293 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2294 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2295 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2296 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2297 (attr_warn_unused_result_exclusions): Same.
2298 (handle_hot_attribute, handle_cold_attribute): Simplify.
2299 (handle_const_attribute): Warn on function returning void.
2300 (handle_pure_attribute): Same.
2301 (handle_aligned_attribute): Diagnose conflicting attribute
2302 specifications.
2303 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2304
c79144f8
DM
23052017-12-06 David Malcolm <dmalcolm@redhat.com>
2306
2307 PR c/83236
2308 * c-common.c (selftest::c_family_tests): Call
2309 selftest::c_spellcheck_cc_tests.
2310 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2311 * c-spellcheck.cc: Include "selftest.h".
2312 (name_reserved_for_implementation_p): New function.
2313 (should_suggest_as_macro_p): New function.
2314 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2315 should_suggest_as_macro_p and call it.
2316 (selftest::test_name_reserved_for_implementation_p): New function.
2317 (selftest::c_spellcheck_cc_tests): New function.
2318 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2319
613bc14f
DM
23202017-12-06 David Malcolm <dmalcolm@redhat.com>
2321
2322 * c-spellcheck.cc: New file, taken from macro-handling code in
2323 spellcheck-tree.c.
2324 * c-spellcheck.h: New file, taken from macro-handling code in
2325 spellcheck-tree.h.
2326
e76c7157
JJ
23272017-12-01 Jakub Jelinek <jakub@redhat.com>
2328
2329 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2330 attribute.
2331 (handle_simd_attribute): Don't check for "cilk simd function"
2332 attribute. Reindent, formatting changes.
2333
b0da4034
JK
23342017-11-30 Julia Koval <julia.koval@intel.com>
2335
2336 * c-common.h (inv_list): Remove.
2337
058f0b9e
JJ
23382017-11-28 Jakub Jelinek <jakub@redhat.com>
2339
2340 PR sanitizer/81275
2341 * c-common.c (c_switch_covers_all_cases_p_1,
2342 c_switch_covers_all_cases_p): New functions.
2343 * c-common.h (c_switch_covers_all_cases_p): Declare.
2344
5e9d6aa4 23452017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2346 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2347
2348 * array-notation-common.c: Delete.
2349 * c-cilkplus.c: Ditto.
2350 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2351 * c-common.def (ARRAY_NOTATION_REF): Remove.
2352 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2353 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2354 c_validate_cilk_plus_loop, cilkplus_an_parts,
2355 cilk_ignorable_spawn_rhs_op,
2356 cilk_recognize_spawn): Remove.
2357 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2358 * c-omp.c: Remove CILK_SIMD check.
2359 * c-pragma.c: Ditto.
2360 * c-pragma.h: Remove CILK related pragmas.
2361 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2362 ARRAY_NOTATION_REF condition.
2363 (c_pretty_printer::expression): Ditto.
2364 * c.opt (fcilkplus): Remove.
2365 * cilk.c: Delete.
2366
1af4ebf5
MG
23672017-11-21 Marc Glisse <marc.glisse@inria.fr>
2368
2369 * c-pretty-print.c (pp_c_additive_expression,
2370 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2371
d44ed508
JJ
23722017-11-21 Jakub Jelinek <jakub@redhat.com>
2373
7d2f0f9b
JJ
2374 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2375
d44ed508
JJ
2376 PR c++/83059
2377 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2378 instead of tree_to_uhwi, formatting fix.
2379
26edace6
DM
23802017-11-20 David Malcolm <dmalcolm@redhat.com>
2381
2382 PR c/81404
2383 * known-headers.cc: New file, based on material from c/c-decl.c.
2384 (suggest_missing_header): Copied as-is.
2385 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2386 heavily edited to add C++ support. Add some knowledge about
2387 <limits.h>, <stdint.h>, and <wchar.h>.
2388 * known-headers.h: Likewise.
2389
6c7a259b
DM
23902017-11-20 David Malcolm <dmalcolm@redhat.com>
2391
2392 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2393 (lookup_name_fuzzy): Likewise. Convert return type from
2394 const char * to name_hint. Add location_t param.
2395 * name-hint.h: New header.
2396
f9c59f7e
JJ
23972017-11-19 Jakub Jelinek <jakub@redhat.com>
2398
2399 PR c/66618
2400 PR c/69960
2401 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2402
1e39313a
JM
24032017-11-16 Joseph Myers <joseph@codesourcery.com>
2404
2405 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2406 expected publication date of C17.
2407 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2408
3ca0dc60
JM
24092017-11-15 Joseph Myers <joseph@codesourcery.com>
2410
2411 PR c/81156
2412 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2413 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2414
025d57f0
MS
24152017-11-10 Martin Sebor <msebor@redhat.com>
2416
2417 PR c/81117
2418 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2419 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2420 * c.opt (-Wstringop-truncation): New option.
2421
1b6fa695
ML
24222017-11-06 Martin Liska <mliska@suse.cz>
2423
2424 PR middle-end/82404
2425 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2426 FE.
2427 * c.opt: Set default value of warn_return_type.
2428
64a5912c
DM
24292017-10-31 David Malcolm <dmalcolm@redhat.com>
2430
2431 * c-common.c (binary_op_error): Update for renaming of
2432 error_at_rich_loc.
2433 (c_parse_error): Likewise.
2434 * c-warn.c (warn_logical_not_parentheses): Likewise for
2435 renaming of inform_at_rich_loc.
2436 (warn_for_restrict): Likewise for renaming of
2437 warning_at_rich_loc_n.
2438
c76dc9c3
JM
24392017-10-30 Joseph Myers <joseph@codesourcery.com>
2440
2441 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2442 * c-opts.c (set_std_c17): New function.
2443 (c_common_init_options): Use gnu17 as default C version.
2444 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2445
ee5fd23a
MM
24462017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2447
2448 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2449 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2450 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2451 __FP_FAST_FMA<N>X.
2452
d1047465
MP
24532017-10-23 Marek Polacek <polacek@redhat.com>
2454
2455 PR c/82681
2456 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2457
9e878cf1
EB
24582017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2459
2460 * c-common.c (check_builtin_function_arguments): Also check arguments
2461 of __builtin_alloca_with_align_and_max.
2462
89b6abbb
DM
24632017-10-17 David Malcolm <dmalcolm@redhat.com>
2464
2465 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2466 rather than NULL to format_warning_va.
2467 (check_format_types): Likewise when calling format_type_warning.
2468 Remove code to extract source_ranges and source_range * in favor
2469 of just a location_t.
2470 (format_type_warning): Convert source_range * param to a
2471 location_t.
2472
39382c09
JJ
24732017-10-13 Jakub Jelinek <jakub@redhat.com>
2474
2475 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2476 [LR]SHIFT_EXPR.
2477
62e1c678
DM
24782017-10-12 David Malcolm <dmalcolm@redhat.com>
2479
2480 * c-common.c (enum missing_token_insertion_kind): New enum.
2481 (get_missing_token_insertion_kind): New function.
2482 (maybe_suggest_missing_token_insertion): New function.
2483 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2484
b90c9338
NS
24852017-10-11 Nathan Sidwell <nathan@acm.org>
2486
2487 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2488 (c_common_handle_option): Update incpath_kind names.
2489
3a266bcd
ML
24902017-10-11 Martin Liska <mliska@suse.cz>
2491
2492 PR sanitizer/82490
2493 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2494 Wattributes warning.
2495
8e6cdc90
RS
24962017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2497
2498 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2499 operating on trees as wide_ints.
2500 * c-common.c (pointer_int_sum): Likewise.
2501 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2502 * c-warn.c (match_case_to_enum_1): Likewise.
2503 (c_do_switch_warnings): Likewise.
2504 (maybe_warn_shift_overflow): Likewise.
2505
802b38c9
JJ
25062017-10-10 Jakub Jelinek <jakub@redhat.com>
2507
2508 PR c/82437
2509 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2510 instead of wide_int::from.
2511
4e34b338
JJ
25122017-10-06 Jakub Jelinek <jakub@redhat.com>
2513
2514 PR c/82437
2515 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2516 using to_widest use wide_int with the larger of the two precisions.
2517
4bc4b2b4
BE
25182017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2519
2520 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2521 functions.
2522
a1488398
RS
25232017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2524
2525 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2526 when combining the original unconverted comparison operands.
2527
01c9fb68
JJ
25282017-09-29 Jakub Jelinek <jakub@redhat.com>
2529
2530 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2531 attribute.
2532
6e3e8419
EB
25332017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2534
2535 * c-ada-spec.c (to_ada_name): Add index parameter.
2536 (pp_ada_tree_identifier): Likewise.
2537 (dump_ada_macros): Adjust call to to_ada_name.
2538 (struct overloaded_name_hash): New type.
2539 (struct overloaded_name_hasher): Likewise.
2540 (overloaded_names): New hash table.
2541 (compute_overloading_index): New function.
2542 (dump_ada_decl_name): Call it and pass the result to
2543 pp_ada_tree_identifier.
2544 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2545 (dump_ada_function_declaration): Likewise.
2546 (dump_generic_ada_node): Likewise.
2547 (print_constructor): Likewise.
2548 (print_destructor): Likewise.
2549 (dump_ada_specs): Delete overloaded_names table.
2550
79310774
EB
25512017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2552
2553 * c-ada-spec.c (max_ada_macros): Move around.
2554 (store_ada_macro_index): Likewise.
2555 (source_file): Rename into...
2556 (macro_source_file): ...this.
2557 (count_ada_macro): Move around.
2558 (store_ada_macro): Likewise.
2559 (compare_macro): Likewise.
2560 (print_ada_macros): Merge in...
2561 (dump_ada_macros): ...this.
2562 (source_file_base): Rename into...
2563 (current_source_file): ...this.
2564 (print_comment): Move around.
2565 (dump_ada_nodes): Call dump_ada_declaration directly.
2566 (struct with): Change type of limited field to bool.
2567 (append_withs): Change type of limited_access parameter to bool.
2568 (pp_ada_tree_identifie): Likewise.
2569 (dump_ada_decl_nam): Likewise.
2570 (dump_generic_ada_node): Likewise. Do not print the return type.
2571 (to_ada_name): Change type of space_found parameter to bool.
2572 (dump_ada_function_declaration): Return void and change type of
2573 parameters to bool. Also print the return type for a function.
2574 (print_ada_methods): Rename into...
2575 (dump_ada_methods): ...this.
2576 (print_ada_declaration): Rename into ...
2577 (dump_ada_declaration): ...this. Do not print the return type.
2578 (print_ada_struct_decl): Rename into...
2579 (dump_ada_struct_decl): ...this.
2580
7d386d45
JJ
25812017-09-29 Jakub Jelinek <jakub@redhat.com>
2582
2583 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2584 rather than DECL_INITIAL.
2585 (common_handle_aligned_attribute): Likewise.
2586
ab20d992 25872017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2588
2589 * c.opt (gen-decls): Add RejectNegative.
2590
026a79f7
AS
25912017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2592 Jakub Jelinek <jakub@redhat.com>
2593
2594 Add support for -std=c++2a.
2595 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2596 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2597 * c-opts.c (set_std_cxx2a): New.
2598 (c_common_handle_option): Set options when -std=c++2a is enabled.
2599 (c_common_post_options): Adjust comments.
2600 (set_std_cxx14, set_std_cxx17): Likewise.
2601
4a8ca690
EB
26022017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2603
2604 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2605 message for non-uniform endianness and issue a warning in C++.
2606
7b936140
JJ
26072017-09-15 Jakub Jelinek <jakub@redhat.com>
2608
2609 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2610 (Wc++17-compat): Change from undocumented alias to option.
2611 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2612 change C++1z to C++17 in description.
2613 (std=c++1z, std=gnu++1z): Change from option to undocumented
2614 deprecated alias.
2615 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2616 Adjust description.
2617 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2618 * c-opts.c (set_std_cxx1z): Rename to ...
2619 (set_std_cxx17): ... this.
2620 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2621 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2622 caller.
7b936140
JJ
2623 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2624 comments.
2625
12263f13
L
26262017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2627
2628 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2629 function alignment if warn_if_not_aligned_p is true.
2630
6836632e
NS
26312017-09-12 Nathan Sidwell <nathan@acm.org>
2632
2633 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2634 resort_sorted_fields): Move to c/c-decl.c.
2635 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2636 (struct sorted_fields_type): Move to c/c-lang.h.
2637
019bf9ad
JW
26382017-09-09 Jonathan Wakely <jwakely@redhat.com>
2639
2640 PR c++/81852
2641 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2642
bc7fe952
MP
26432017-09-04 Marek Polacek <polacek@redhat.com>
2644
2645 PR c/81783
2646 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2647 (warn_tautological_cmp): Call it.
2648
ab20d992 26492017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2650
2651 * c-opts.c (c_common_finish): Write dependency information even if
2652 there are errors.
2653
d2e05fcb
JJ
26542017-09-01 Jakub Jelinek <jakub@redhat.com>
2655
2656 PR c/81887
2657 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2658 (omp_pragmas_simd): ... here.
2659 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2660 create new clauses list containing just simd clause.
2661
18e2a8b8
RS
26622017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2663 Alan Hayward <alan.hayward@arm.com>
2664 David Sherwood <david.sherwood@arm.com>
2665
2666 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2667 into scalar_mode_supported_p call.
2668 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2669
16d22000
RS
26702017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2671 Alan Hayward <alan.hayward@arm.com>
2672 David Sherwood <david.sherwood@arm.com>
2673
2674 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2675 for the mode iterator.
2676
b397965c
RS
26772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2678 Alan Hayward <alan.hayward@arm.com>
2679 David Sherwood <david.sherwood@arm.com>
2680
2681 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2682 * c-common.c (c_build_vec_perm_expr): Likewise.
2683
357b7604
RS
26842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2685 Alan Hayward <alan.hayward@arm.com>
2686 David Sherwood <david.sherwood@arm.com>
2687
2688 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2689
e05c94ba
RS
26902017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2691 Alan Hayward <alan.hayward@arm.com>
2692 David Sherwood <david.sherwood@arm.com>
2693
2694 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2695 before calling targetm.addr_space.valid_pointer_mode.
2696
5c20c4af
RS
26972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2698 Alan Hayward <alan.hayward@arm.com>
2699 David Sherwood <david.sherwood@arm.com>
2700
2701 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2702
c94843d2 27032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2704 Alan Hayward <alan.hayward@arm.com>
2705 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2706
2707 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2708 iterators.
2709 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2710
4e10a5a7
RS
27112017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2712 Alan Hayward <alan.hayward@arm.com>
2713 David Sherwood <david.sherwood@arm.com>
2714
2715 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2716 case statements.
2717
130fcab0
ML
27182017-08-29 Martin Liska <mliska@suse.cz>
2719
2720 PR other/39851
2721 * c-common.c (parse_optimize_options): Add argument to function
2722 call.
2723 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2724
14e18d71
DM
27252017-08-24 David Malcolm <dmalcolm@redhat.com>
2726
2727 * c-lex.c (interpret_float): Use token location
2728 when building an EXCESS_PRECISION_EXPR.
2729
2f687306
DM
27302017-08-21 David Malcolm <dmalcolm@redhat.com>
2731
2732 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2733 it to check_function_format.
2734 * c-common.h (check_function_arguments): Add vec<location_t> *
2735 param.
2736 (check_function_format): Likewise.
2737 * c-format.c (struct format_check_context): Add field "arglocs".
2738 (check_function_format): Add param "arglocs"; pass it to
2739 check_format_info.
ab20d992 2740 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2741 new field of format_ctx.
2742 (check_format_arg): Pass format_ctx->arglocs to new param of
2743 check_format_info_main.
2744 (class argument_parser): New field "arglocs".
2745 (argument_parser::argument_parser): Add "arglocs_" param and use
2746 it to initialize new field.
2747 (argument_parser::check_argument_type): Pass new arglocs field to
2748 check_format_types.
2749 (check_format_info_main): Add param "arglocs", and use it when
2750 constructing arg_parser.
2751 (check_format_types): Add param "arglocs"; use it if non-NULL when
2752 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2753
00aa1fa2
L
27542017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2755
2756 PR c/53037
2757 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2758 (c_common_attribute_table): Add warn_if_not_aligned.
2759 (handle_aligned_attribute): Renamed to ...
2760 (common_handle_aligned_attribute): Remove argument, name, and add
2761 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2762 (handle_aligned_attribute): New.
2763 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2764
27be025d
MS
27652017-08-14 Martin Sebor <msebor@redhat.com>
2766
2767 PR c/81117
2768 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2769 (handle_nonstring_attribute): New function.
2770
da67acb9
MS
27712017-08-14 Martin Sebor <msebor@redhat.com>
2772
2773 PR c/81117
2774 * c-format.h (T89_G): New macro.
2775 * c-format.c (local_gcall_ptr_node): New variable.
2776 (init_dynamic_diag_info): Initialize it.
2777
a8b522b4
ML
27782017-08-11 Martin Liska <mliska@suse.cz>
2779
2780 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2781 TARGET_SUPPORTS_ALIASES.
2782
32129a17
DM
27832017-08-10 David Malcolm <dmalcolm@redhat.com>
2784
2785 * c-common.c (c_parse_error): Add rich_location * param, using it
2786 rather implicitly using input_location.
2787 * c-common.h (c_parse_error): Add rich_location * param.
2788
30af3a2b
MP
27892017-08-09 Marek Polacek <polacek@redhat.com>
2790
2791 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2792 (c_common_truthvalue_conversion): Likewise.
2793 * c-omp.c (c_finish_omp_atomic): Likewise.
2794 * c-common.h (build_binary_op): Update declaration.
2795
314e6352
ML
27962017-08-08 Martin Liska <mliska@suse.cz>
2797
2798 * c-ada-spec.c: Include header files.
2799 * c-ubsan.c: Likewise.
2800 * c-warn.c: Likewise.
2801
56b5041c
JJ
28022017-08-07 Jakub Jelinek <jakub@redhat.com>
2803
2804 PR c/69389
2805 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2806
db440138
EB
28072017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2808
2809 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2810 (print_ada_methods): Likewise.
2811 (print_ada_declaration): Likewise.
2812
577eec56
ML
28132017-08-07 Martin Liska <mliska@suse.cz>
2814
2815 * array-notation-common.c: Add new includes.
2816 * c-format.c( handle_format_attribute): Canonicalize a format
2817 function name.
2818 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2819 attribute.
2820 * c-pretty-print.c: Add new include.
2821
b854df3c
EB
28222017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2823
2824 * c-ada-spec.c (has_static_fields): Look only into variables.
2825 (print_constructor): Add TYPE parameter and use it for the name.
2826 (print_destructor): Likewise.
2827 (print_ada_declaration): Adjust to new constructor/destructor names.
2828 Adjust calls to print_constructor and print_destructor.
2829 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2830 Look only into variables in the final loop.
2831
9f2cb25e
EB
28322017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2833
2834 * c-ada-spec.c (has_static_fields): Look only into fields.
2835 (dump_generic_ada_node): Small tweak.
2836 (dump_nested_types): Look only into fields.
2837 (print_ada_declaration): Look only into methods. Small tweak.
2838 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2839
f4bcd9eb
EB
28402017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2841
2842 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2843 (dump_ada_function_declaration): Likewise.
2844 (dump_generic_ada_node): Likewise.
2845 (print_ada_declaration): Add support for const-qualified variables.
2846
f34ebeb2
ML
28472017-07-31 Martin Liska <mliska@suse.cz>
2848
2849 PR sanitize/81530
2850 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2851 Guard condition with flag_sanitize_p also with current_function_decl
2852 non-null equality.
2853 (ubsan_maybe_instrument_reference_or_call): Likewise.
2854
218e5d04
UB
28552017-07-30 Uros Bizjak <ubizjak@gmail.com>
2856
2857 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2858
942047f2
EB
28592017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2860
2861 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2862 for enumeral types.
2863 (print_ada_declaration): Add missing guard for record types.
2864
a40ff0ae
JJ
28652017-07-27 Jakub Jelinek <jakub@redhat.com>
2866
2867 PR c/45784
2868 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2869 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2870 new COMPOUND_EXPRs around the rhs of the comparison.
2871
06bd22f6
MP
28722017-07-27 Marek Polacek <polacek@redhat.com>
2873
2874 PR c/81417
2875 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2876 the types.
2877
036ea399
JJ
28782017-07-27 Jakub Jelinek <jakub@redhat.com>
2879
2880 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2881 (handle_noipa_attribute): New function.
2882
417ca011
TD
28832017-07-07 Torsten Duwe <duwe@suse.de>
2884
2885 * c-attribs.c (c_common_attribute_table): Add entry for
2886 "patchable_function_entry".
2887
5aaa8fb4
NS
28882017-07-20 Nathan Sidwell <nathan@acm.org>
2889
2890 Remove TYPE_METHODS.
2891 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2892 dump_ada_template, print_ada_methods,
2893 print_ada_declaration): Member fns are on TYPE_FIELDS.
2894
ff22eb12
NS
28952017-07-18 Nathan Sidwell <nathan@acm.org>
2896
2897 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2898
eea77d1f
DM
28992017-07-14 David Malcolm <dmalcolm@redhat.com>
2900
2901 * c-common.c (try_to_locate_new_include_insertion_point): New
2902 function.
2903 (per_file_includes_t): New typedef.
2904 (added_includes_t): New typedef.
2905 (added_includes): New variable.
2906 (maybe_add_include_fixit): New function.
2907 * c-common.h (maybe_add_include_fixit): New decl.
2908
281ac396
MS
29092017-07-10 Martin Sebor <msebor@redhat.com>
2910
2911 PR other/81345
2912 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2913
b6f43128
DM
29142017-07-06 David Malcolm <dmalcolm@redhat.com>
2915
2916 * c-common.c (selftest::c_family_tests): New.
2917 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2918 (selftest::c_family_tests): New decl.
2919
efbf55b0
MP
29202017-07-04 Marek Polacek <polacek@redhat.com>
2921
2922 PR c/81231
2923 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2924 types.
2925
6c86bd88
MP
29262017-07-04 Marek Polacek <polacek@redhat.com>
2927
2928 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2929
17a7218b
ML
29302017-06-28 Martin Liska <mliska@suse.cz>
2931
2932 PR ipa/81128
2933 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2934 to a function declaration.
2935
63010089
ML
29362017-06-28 Martin Liska <mliska@suse.cz>
2937
2938 PR driver/79659
2939 * c.opt: Add IntegerRange to various options.
2940
3e2becc4
MP
29412017-06-26 Marek Polacek <polacek@redhat.com>
2942
2943 PR c/80116
2944 * c-common.h (warn_for_multistatement_macros): Declare.
2945 * c-warn.c: Include "c-family/c-indentation.h".
2946 (warn_for_multistatement_macros): New function.
2947 * c.opt (Wmultistatement-macros): New option.
2948 * c-indentation.c (guard_tinfo_to_string): No longer static.
2949 Change the parameter type to "enum rid". Handle RID_SWITCH.
2950 * c-indentation.h (guard_tinfo_to_string): Declare.
2951
2db9b7cd
MG
29522017-06-23 Marc Glisse <marc.glisse@inria.fr>
2953
2954 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2955
c3684b7b
MS
29562017-06-15 Martin Sebor <msebor@redhat.com>
2957
2958 PR c++/80560
2959 * c.opt (-Wclass-memaccess): New option.
2960
e72c4afd
BK
29612017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2962
2963 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2964
8a516588
MP
29652017-06-13 Marek Polacek <polacek@redhat.com>
2966
2967 PR objc/80949
2968 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2969 branches is null.
2970
45b2222a
ML
29712017-06-13 Martin Liska <mliska@suse.cz>
2972
2973 PR sanitize/78204
2974 * c-attribs.c (add_no_sanitize_value): New function.
2975 (handle_no_sanitize_attribute): Likewise.
2976 (handle_no_sanitize_address_attribute): Use the function.
2977 (handle_no_sanitize_thread_attribute): New function.
2978 (handle_no_address_safety_analysis_attribute): Use
2979 add_no_sanitize_value.
2980 (handle_no_sanitize_undefined_attribute): Likewise.
2981 * c-common.h: Declare new functions.
2982 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2983 (ubsan_instrument_shift): Likewise.
2984 (ubsan_instrument_bounds): Likewise.
2985 (ubsan_maybe_instrument_array_ref): Likewise.
2986 (ubsan_maybe_instrument_reference_or_call): Likewise.
2987
a01f151f
JM
29882017-06-11 Jason Merrill <jason@redhat.com>
2989
2990 * c-ada-spec.c, c-pragma.c: Use id_equal.
2991
3de4ac6d
MP
29922017-06-04 Marek Polacek <polacek@redhat.com>
2993
2994 PR c/80919
2995 * c-format.c (matching_type_p): Return false if any of the types
2996 requires structural equality.
2997
2474f48f
MS
29982017-06-02 Martin Sebor <msebor@redhat.com>
2999
3000 PR c/80892
3001 * c-warn.c (conversion_warning): Use -Wconversion for integer
3002 conversion and -Wfloat-conversion for floating one.
3003
40ffd95f
BE
30042017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
3005
3006 * c.opt (Wsizeof-pointer-div): New warning option.
3007
3fa4634c
VR
30082017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
3009
3010 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
3011 (Wcatch-value=1): Enable by -Wall.
3012
f012c8ef
DM
30132017-05-30 David Malcolm <dmalcolm@redhat.com>
3014
3015 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
3016 format_chars.
3017 * c.opt (fdiagnostics-show-template-tree): New option.
3018 (felide-type): New option.
3019
63dbcd13
VR
30202017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
3021
3022 * c.opt (Wcatch-value=): New C++ warning flag.
3023
be136b5c
NS
30242017-05-24 Nathan Sidwell <nathan@acm.org>
3025
3026 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
3027 const casts to avoid warning.
3028
3cd211af
MS
30292017-05-24 Martin Sebor <msebor@redhat.com>
3030
3031 PR c/80731
3032 * c-common.h (unsafe_conversion_p): Add a function argument.
3033 * c-common.c (unsafe_conversion_p): Same.
3034 Add type names and values to diagnostics.
3035 (scalar_to_vector): Adjust.
3036 * c-warn.c (constant_expression_error): Add a function argument.
3037 Add type names and values to diagnostics.
3038 (conversion_warning): Add a function argument.
3039 Add type names and values to diagnostics.
3040 (warnings_for_convert_and_check): Same.
3041
1ff7be5a
JM
30422017-05-19 Jason Merrill <jason@redhat.com>
3043
3044 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
3045 enumerators.
3046
ff502317
BE
30472017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3048
3049 * c-format.c (locus): Move out of function scope,
3050 add GTY attribute.
3051
2a8a8d7b
NS
30522017-05-19 Nathan Sidwell <nathan@acm.org>
3053
3054 * c-opts.c (class_dump_file, class_dump_flags): Delete.
3055 (c_common_parse_file): Remove class dump handling.
3056 (get_dump_info): Likewise.
3057
39aac208
RB
30582017-05-19 Richard Biener <rguenther@suse.de>
3059
3060 PR c++/80593
3061 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
3062 to alias-set zero memory.
3063
6ecd2339
BE
30642017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
3065
3066 * c-format.c (local_tree_type_node): Add GTY attribute.
3067
6574d78e
MP
30682017-05-18 Marek Polacek <polacek@redhat.com>
3069
3070 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
3071 (c_common_fixed_point_type_for_size): Likewise.
3072 (c_common_type_for_mode): Likewise.
3073 (shorten_compare): Likewise.
3074 (c_promoting_integer_type_p): Use false/true instead of 0/1.
3075 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
3076
e3455240
MP
30772017-05-18 Marek Polacek <polacek@redhat.com>
3078
3079 * c-common.c (self_promoting_args_p): Change the return type to bool.
3080 Use false/true instead of 0/1.
3081 * c-common.h (self_promoting_args_p): Update.
3082
3fa8871b
MP
30832017-05-17 Marek Polacek <polacek@redhat.com>
3084
3085 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
3086 * c-warn.c: Likewise.
3087
b42cc3ca
VV
30882017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
3089
3090 Implement new C++ intrinsics __is_assignable and __is_constructible.
3091 * c-common.c (__is_assignable, __is_constructible): New.
3092 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
3093
1a817418
ML
30942017-05-17 Martin Liska <mliska@suse.cz>
3095
3096 * c-common.h: Introduce dump_flags_t type and
3097 use it instead of int type.
3098 * c-gimplify.c (c_genericize): Likewise.
3099 * c-opts.c: Likewise.
3100
b2fa0a8b
MP
31012017-05-17 Marek Polacek <polacek@redhat.com>
3102
3103 * c-common.c (c_save_expr): Remove.
3104 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3105 * c-common.h (c_save_expr): Remove declaration.
3106
31c2d57d
VR
31072017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3108
3109 PR c/35441
3110 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3111 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3112 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3113 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3114 RDIV_EXPR.
3115 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3116
684f84de
MP
31172017-05-09 Marek Polacek <polacek@redhat.com>
3118
3119 PR c/80525
3120 * c-warn.c (unwrap_c_maybe_const): New.
3121 (warn_logical_operator): Call it.
3122
641da50a
NS
31232017-05-09 Nathan Sidwell <nathan@acm.org>
3124
3125 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3126 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3127
631238ac
MS
31282017-05-08 Martin Sebor <msebor@redhat.com>
3129
3130 PR translation/80280
3131 * c-format.h (struct format_flag_spec): Add new member.
3132 (T89_T): New macro.
3133 * c-format.c (local_tree_type_node): New global.
3134 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3135 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3136 (strfmon_flag_specs): Likewise.
3137 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3138 with distinct quoting properties.
3139 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3140 (flag_chars_t::validate): Add argument and handle bad quoting.
3141 (check_format_info_main): Handle quoting problems.
3142 (init_dynamic_diag_info): Simplify.
3143
49f0c04c
JM
31442017-05-08 Jason Merrill <jason@redhat.com>
3145
3146 * c-opts.c (c_common_post_options): Update defaults for
3147 flag_abi_version and flag_abi_compat_version.
3148
56d35585
DM
31492017-05-05 David Malcolm <dmalcolm@redhat.com>
3150
3151 * c-common.c (c_cpp_error): Replace report_diagnostic
3152 with diagnostic_report_diagnostic.
3153
0f2c4a8f
MS
31542017-05-04 Martin Sebor <msebor@redhat.com>
3155
3156 PR translation/80280
3157 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3158 (handle_weakref_attribute): Same.
3159
6fe63fb4
NS
31602017-05-03 Nathan Sidwell <nathan@acm.org>
3161
3162 Canonicalize canonical type hashing
3163 * c-common.c (complete_array_type): Use type_hash_canon.
3164
815d9cc6
XR
31652017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3166
92a285c1 3167 PR c++/80038
815d9cc6
XR
3168 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3169 prototype.
3170 (cilk_install_body_pedigree_operations): Likewise.
3171 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3172 detatched.
3173 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3174 (cilk_install_body_pedigree_operations): Likewise.
3175 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3176 unwrapping.
3177
f8a36447
JJ
31782017-04-27 Jakub Jelinek <jakub@redhat.com>
3179
3180 PR c++/80534
3181 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3182 flag on non-aggregate element types.
3183
7c145456
BE
31842017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3185
3186 * c-common.c (c_type_hasher, type_hash_table): Remove.
3187 (c_common_get_alias_set): Remove unreachable code.
3188 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3189
c3cbcd45
VR
31902017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3191
3192 * c.opt (Wextra-semi): New C++ warning flag.
3193
8a59d466
JJ
31942017-04-20 Jakub Jelinek <jakub@redhat.com>
3195
3196 PR middle-end/80423
3197 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3198
8487c9a5
JJ
31992017-04-18 Jakub Jelinek <jakub@redhat.com>
3200
3201 PR middle-end/79788
3202 PR middle-end/80375
3203 * c-common.c (c_common_type_for_mode): Don't handle
3204 widest_*_literal_type_node here.
3205 c_common_signed_or_unsigned_type): Likewise.
3206 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3207 to *intTI_type_node or *intDI_type_node depending on whether
3208 TImode is supported by the target or not.
3209
3ee0fb02
ML
32102017-04-10 Martin Liska <mliska@suse.cz>
3211
3212 PR sanitizer/80350
3213 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3214 doing an UBSAN check.
3215
5764ee3c
JW
32162017-04-03 Jonathan Wakely <jwakely@redhat.com>
3217
3218 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3219
6f3af356
JJ
32202017-03-31 Jakub Jelinek <jakub@redhat.com>
3221
3222 PR c++/79572
3223 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3224 tree *.
3225 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3226 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3227 REFERENCE_TYPE.
3228
f6a7a9d5
DM
32292017-03-31 David Malcolm <dmalcolm@redhat.com>
3230
3231 PR documentation/78732
3232 * c.opt (Wendif-labels): Fix description to refer to
3233 #else rather than #elif.
3234
af88f557
JJ
32352017-03-31 Jakub Jelinek <jakub@redhat.com>
3236
3237 PR libstdc++/80251
3238 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3239 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3240
a9e4a1a5
JJ
32412017-03-27 Jakub Jelinek <jakub@redhat.com>
3242
3243 PR middle-end/80162
3244 * c-common.c (c_common_mark_addressable_vec): Don't set
3245 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3246
3f01b620
MS
32472017-03-21 Martin Sebor <msebor@redhat.com>
3248
3249 PR c++/79548
3250 * c-common.c (set_underlying_type): Mark type used only when
3251 original del is declared unused.
3252
2f6f187a
DM
32532017-03-10 David Malcolm <dmalcolm@redhat.com>
3254
3255 PR translation/79848
3256 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3257 "%qs".
3258
a02fa805
DM
32592017-03-10 David Malcolm <dmalcolm@redhat.com>
3260
3261 PR c/79921
3262 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3263 from inform's message, so that xgettext can locate it.
3264
822a132c
MP
32652017-03-09 Marek Polacek <polacek@redhat.com>
3266
3267 PR c++/79962
3268 PR c++/79984
3269 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3270 conversion to the attribute list.
3271
bba81f1c
ML
32722017-03-09 Martin Liska <mliska@suse.cz>
3273
3274 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3275
108154ff
JM
32762017-03-03 Jason Merrill <jason@redhat.com>
3277
3278 * c.opt (Wnoexcept-type): New.
3279
eb0e7c34
RB
32802017-03-02 Richard Biener <rguenther@suse.de>
3281
3282 PR c/79756
3283 * c-common.c (c_common_mark_addressable_vec): Look through
3284 C_MAYBE_CONST_EXPR.
3285
9453ba0a
ML
32862017-02-28 Martin Liska <mliska@suse.cz>
3287
3288 * c.opt: Replace space with tabular for options of <number>
3289 type.
3290
6a825afe
ML
32912017-02-28 Martin Liska <mliska@suse.cz>
3292
3293 * c.opt: Fix --help=option -Q for options which are of
3294 an enum type.
3295
4227c9ad
JJ
32962017-02-24 Jakub Jelinek <jakub@redhat.com>
3297
3298 PR c++/79588
3299 * c-common.c (check_function_restrict): New function.
3300 (check_function_arguments): Add FNDECL argument. Call
3301 check_function_restrict if -Wrestrict.
3302 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3303 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3304 * c-common.h (check_function_arguments): Add FNDECL argument.
3305 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3306
59909673
EB
33072017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3308
3309 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3310 treatment of parameters with pointer-to-tagged type and tidy up.
3311 (print_ada_methods): Remove the special treatment of C++ static member
3312 functions.
3313
54dcd526
ML
33142017-02-22 Martin Liska <mliska@suse.cz>
3315
3316 * c.opt: Replace inequality signs with square brackets
3317 for -Wnornalized.
3318
00bc9de3
JJ
33192017-02-21 Jakub Jelinek <jakub@redhat.com>
3320
3321 PR c++/79641
3322 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3323 preserve quals.
3324
97fcf744
JM
33252017-02-17 Joseph Myers <joseph@codesourcery.com>
3326
3327 * c-cppbuiltin.c (builtin_define_float_constants): Define
3328 __DECIMAL_DIG__ to the value for long double.
3329
c7545f1c
MP
33302017-02-15 Marek Polacek <polacek@redhat.com>
3331
3332 PR c/79515
3333 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3334 conversion has occured.
3335
c2e84327
DM
33362017-01-24 David Malcolm <dmalcolm@redhat.com>
3337
3338 * c-common.c (c_common_reswords): Add "__RTL".
3339 * c-common.h (enum rid): Add RID_RTL.
3340
2ebd93e1
MP
33412017-01-20 Marek Polacek <polacek@redhat.com>
3342
3343 PR c/64279
3344 * c-common.h (do_warn_duplicated_branches_r): Declare.
3345 * c-gimplify.c (c_genericize): Walk the function tree calling
3346 do_warn_duplicated_branches_r.
3347 * c-warn.c (expr_from_macro_expansion_r): New.
3348 (do_warn_duplicated_branches): New.
3349 (do_warn_duplicated_branches_r): New.
3350 * c.opt (Wduplicated-branches): New option.
3351
0d80ab91
DM
33522017-01-17 David Malcolm <dmalcolm@redhat.com>
3353
3354 PR c++/71497
3355 * c-indentation.c (warn_for_misleading_indentation): Use the past
3356 subjunctive in the note.
3357
7f991c36
AH
33582017-01-17 Aldy Hernandez <aldyh@redhat.com>
3359
3360 PR c/79116
3361 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3362 start type to integer_type.
3363
1c70261c
JJ
33642017-01-16 Jakub Jelinek <jakub@redhat.com>
3365
3366 PR driver/49726
3367 * c.opt (gen-decls): Add Driver flag.
3368
1ddca3f3
PC
33692017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3370
3371 Revert:
3372 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3373
3374 PR c++/71737
3375 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3376
7d2f3f1d
PC
33772017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3378
3379 PR c++/71737
3380 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3381
bce6f760
MS
33822017-01-12 Martin Sebor <msebor@redhat.com>
3383
3384 (-Wformat-overflow): ...to this.
3385
bf5fbf46
MS
33862017-01-11 Martin Sebor <msebor@redhat.com>
3387
3388 PR c/78768
3389 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3390 Also enable for LTO.
3391
e363df3f
JM
33922017-01-10 Jason Merrill <jason@redhat.com>
3393
3394 Implement P0195R2, C++17 variadic using.
3395 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3396
bd2c6270
JJ
33972017-01-09 Jakub Jelinek <jakub@redhat.com>
3398
3399 PR translation/79019
3400 PR translation/79020
3401 * c.opt (Wnormalized=): Fix typo in description.
3402
efcc8d38
MS
34032017-01-08 Martin Sebor <msebor@redhat.com>
3404
3405 PR middle-end/77708
3406 * c.opt (-Wformat-truncation): New option.
3407
ab20d992 34082017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3409
3410 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3411 value to unsigned short to fit in 4 hex digits without
3412 warnings.
3413
4e89adf9
EB
34142017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3415
3416 * c.opt (fsso-struct): Add 'native' value.
3417
cd445b54
ML
34182017-01-05 Martin Liska <mliska@suse.cz>
3419
3420 PR pch/78970
3421 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3422 header.
3423
a9342885
MP
34242017-01-04 Marek Polacek <polacek@redhat.com>
3425
3426 PR c++/64767
3427 * c.opt (Wpointer-compare): New option.
3428
fc73e60c
JJ
34292017-01-04 Jakub Jelinek <jakub@redhat.com>
3430
3431 PR driver/78957
3432 * c.opt (fsso-struct=): Add RejectNegative.
3433
cbe34bb5
JJ
34342017-01-01 Jakub Jelinek <jakub@redhat.com>
3435
3436 Update copyright years.
3437
d4a6c0ea
ML
34382016-12-29 Martin Liska <mliska@suse.cz>
3439
3440 PR c/78933
3441 * c.opt (strong-eval-order): Add RejectNegative keyword.
3442
67a5ad7c
JM
34432016-12-22 Jason Merrill <jason@redhat.com>
3444
3445 Implement P0522R0, matching of template template arguments.
3446 * c-cppbuiltin.c (c_cpp_builtins): Define
3447 __cpp_template_template_args.
3448
0dba7960
JJ
34492016-12-21 Jakub Jelinek <jakub@redhat.com>
3450
3451 PR bootstrap/78817
3452 * c-common.c (struct nonnull_arg_ctx): New type.
3453 (check_function_nonnull): Return bool instead of void. Use
3454 nonnull_arg_ctx as context rather than just location_t.
3455 (check_nonnull_arg): Adjust for the new context type, set
3456 warned_p to true if a warning has been diagnosed.
3457 (check_function_arguments): Return bool instead of void.
3458 * c-common.h (check_function_arguments): Adjust prototype.
3459
31bfc9b9
JM
34602016-12-21 Jason Merrill <jason@redhat.com>
3461
3462 * c.opt (-fnew-ttp-matching): New flag.
3463 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3464
629b3d75
MJ
34652016-12-14 Martin Jambor <mjambor@suse.cz>
3466
3467 * c-omp.c: Include omp-general.h instead of omp-low.h.
3468 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3469 name.
3470
474da67e
MS
34712016-12-14 Martin Sebor <msebor@redhat.com>
3472
3473 PR c/17308
3474 * c-common.c (check_nonnull_arg): Disable when optimization
3475 is enabled.
3476
fe366b87
MP
34772016-12-12 Marek Polacek <polacek@redhat.com>
3478
3479 PR c++/78647
3480 * c-common.c (attribute_fallthrough_p): Return false for
3481 error_mark_node.
3482
8bd9f164
MS
34832016-12-08 Martin Sebor <msebor@redhat.com>
3484
3485 PR c/78284
3486 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3487
060162e0
MS
34882016-12-08 Martin Sebor <msebor@redhat.com>
3489
3490 PR c/78165
92a285c1
ML
3491 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3492 suffix.
060162e0 3493
ee92e7ba
MS
34942016-12-07 Martin Sebor <msebor@redhat.com>
3495
3496 PR c/53562
3497 PR middle-end/77784
3498 PR middle-end/78149
3499 PR middle-end/78138
3500 * c.opt (-Wstringop-overflow): New option.
3501
84b0769e
MO
35022016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3503
3504 * c-attribs.c (asan odr indicator): New attribute.
3505 (handle_asan_odr_indicator_attribute): New function.
3506
7fa6a965
PK
35072016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3508
3509 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3510 ptrdiff_type_node;
3511
56d8ffc1
JG
35122016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3513
3514 * c-common.c (excess_precision_mode_join): New.
3515 (c_ts18661_flt_eval_method): New.
3516 (c_c11_flt_eval_method): Likewise.
3517 (c_flt_eval_method): Likewise.
3518 * c-common.h (excess_precision_mode_join): New.
3519 (c_flt_eval_method): Likewise.
3520 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3521 (cpp_iec_559_value): Call it.
3522 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3523 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3524 __FLT_EVAL_METHOD_TS_18661_3__.
3525
04f0fcf7
JG
35262016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3527
3528 * c-opts.c (c_common_post_options): Add logic to handle the default
3529 case for -fpermitted-flt-eval-methods.
3530
fb2675cb
PB
35312016-11-23 Paolo Bonzini <bonzini@gnu.org>
3532
3533 * c.opt (Wexpansion-to-defined): New.
3534
ec1c5694
JJ
35352016-11-23 Jakub Jelinek <jakub@redhat.com>
3536
3537 PR target/78451
3538 * c-pragma.c (handle_pragma_target): Don't replace
3539 current_target_pragma, but chainon the new args to the current one.
3540
730c9e75
NS
35412016-11-22 Nathan Sidwell <nathan@acm.org>
3542
3543 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3544 indentation and formatting.
730c9e75 3545
89990732
MS
35462016-11-21 Martin Sebor <msebor@redhat.com>
3547
3548 * c.opt (-fprintf-return-value): Enable by default.
3549
48330c93
BE
35502016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3551
3552 PR c++/71973
3553 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3554 * c-common.c (c_common_nodes_and_builtins): Initialize
3555 const_tm_ptr_type_node.
3556
0d939c95
MP
35572016-11-16 Marek Polacek <polacek@redhat.com>
3558
3559 PR c/78285
3560 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3561
8e745a17
JJ
35622016-11-14 Jakub Jelinek <jakub@redhat.com>
3563
3564 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3565
1ee62b92 35662016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3567 Richard Biener <rguenther@suse.de>
3568
3569 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3570 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3571 * c.opt (fgimple): New option.
1ee62b92 3572
22b15758
UB
35732016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3574
3575 PR c/35503
3576 * c-common.h (warn_for_restrict): Declare.
3577 * c-warn.c: Include gcc-rich-location.h.
3578 (warn_for_restrict): New function.
3579 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3580 (gcc_cdiag_char_table): Likewise.
3581 (gcc_cxxdiag_char_table): Likewise.
3582 * c.opt (Wrestrict): New option.
3583
4be719cd
EB
35842016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3585
3586 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3587 for nested types only if the type is a record or union and dump SLOC.
3588
4a826ca6
JM
35892016-11-09 Jason Merrill <jason@redhat.com>
3590
3591 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3592
2e955d50
JJ
35932016-11-09 Jakub Jelinek <jakub@redhat.com>
3594
3595 * c-ubsan.c (ubsan_instrument_shift): Handle split
3596 -fsanitize=shift-base and -fsanitize=shift-exponent.
3597
51dc6603
JM
35982016-11-07 Jason Merrill <jason@redhat.com>
3599
3600 * c.opt (Wc++1z-compat): New.
3601 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3602
6dc4a604
ML
36032016-11-07 Martin Liska <mliska@suse.cz>
3604
3605 * c-warn.c (warn_for_unused_label): Save all labels used
3606 in goto or in &label.
3607
b302001e
JM
36082016-11-03 Jason Merrill <jason@redhat.com>
3609
3610 * c-cppbuiltin.c (c_cpp_builtins): Correct
3611 __cpp_inheriting_constructors.
3612
31f7f784
JM
36132016-11-01 Jason Merrill <jason@redhat.com>
3614
2bc78e3c
JM
3615 * c-cppbuiltin.c (c_cpp_builtins): Update
3616 __cpp_inheriting_constructors.
3617
31f7f784
JM
3618 * c.opt (-fnew-inheriting-ctors): New.
3619 * c-opts.c: Default to on for ABI 11+.
3620
dcb466ec
JJ
36212016-10-31 Jakub Jelinek <jakub@redhat.com>
3622
3623 PR c++/77948
3624 * c.opt (fext-numeric-literals): Add Var and Init.
3625 * c-opts.c (c_common_handle_option): Don't clear
3626 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3627 (c_common_post_options): Clear it here if not set
3628 explicitly.
3629
52e1b91e
AH
36302016-10-28 Aldy Hernandez <aldyh@redhat.com>
3631
3632 PR debug/77773
3633 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3634 if NULL.
3635
e16f1cc7
JJ
36362016-10-25 Jakub Jelinek <jakub@redhat.com>
3637
3638 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3639 * c-common.c (c_common_reswords): Add __builtin_launder.
3640
f8348061
BE
36412016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3642
3643 * c-common.c (c_common_truthvalue_conversion): Warn for
3644 multiplications in boolean context. Fix the quoting of '<<' and '<'
3645 in the shift warning.
3646
eff89e01
BE
36472016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3648
3649 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3650
24bc7bf4
JM
36512016-10-20 Jason Merrill <jason@redhat.com>
3652
3653 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3654
4c712374
BE
36552016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3656
3657 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3658 integer shift ops in boolean context.
3659
36602016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3661
3662 * c.opt (Walloca): New.
3663 (Walloca-larger-than=): New.
3664 (Wvla-larger-than=): New.
3665
8fa18c06
MP
36662016-10-17 Marek Polacek <polacek@redhat.com>
3667
3668 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3669 Return immediately when finding a match.
3670 (warn_tautological_cmp): Remove a boolean variable that is no longer
3671 needed.
3672
b12b1915
MP
36732016-10-17 Marek Polacek <polacek@redhat.com>
3674
3675 * c-attribs.c: New file.
3676 * c-common.c: Move attributes handling to c-attribs.c.
3677 (get_nonnull_operand): No longer static.
3678 * c-common.h: Move the declarations from c-attribs.c to its own section.
3679
2045acd9
JM
36802016-10-14 Jason Merrill <jason@redhat.com>
3681
3682 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3683 and __cpp_deduction_guides.
3684
14a2c9aa
JM
36852016-10-13 Jason Merrill <jason@redhat.com>
3686
3687 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3688
4d0cdd0c
TP
36892016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3690
3691 * c-cppbuiltin.c: Include memmodel.h.
3692 * c-opts.c: Likewise.
3693 * c-pragma.c: Likewise.
3694 * c-warn.c: Likewise.
3695
70f6d5e1
JJ
36962016-10-12 Jakub Jelinek <jakub@redhat.com>
3697
3698 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3699 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3700 * c-opts.c (sanitize_cpp_opts): Initialize
3701 cpp_opts->cpp_warn_implicit_fallthrough.
3702
78f61294
MP
37032016-10-11 Marek Polacek <polacek@redhat.com>
3704
3705 * c-common.c (warning_candidate_p): Change the return type to bool
3706 and return true/false instead of 1/0.
3707 (vector_mode_valid_p): Likewise.
3708
038b5cc0
MP
37092016-10-11 Marek Polacek <polacek@redhat.com>
3710
3711 * c-common.c (fold_for_warn): No longer static.
3712 (bool_promoted_to_int_p): Likewise.
3713 (c_common_get_narrower): Likewise.
3714 (constant_expression_warning): Move to c-warn.c.
3715 (constant_expression_error): Likewise.
3716 (overflow_warning): Likewise.
3717 (warn_logical_operator): Likewise.
3718 (find_array_ref_with_const_idx_r): Likewise.
3719 (warn_tautological_cmp): Likewise.
3720 (expr_has_boolean_operands_p): Likewise.
3721 (warn_logical_not_parentheses): Likewise.
3722 (warn_if_unused_value): Likewise.
3723 (strict_aliasing_warning): Likewise.
3724 (sizeof_pointer_memaccess_warning): Likewise.
3725 (check_main_parameter_types): Likewise.
3726 (conversion_warning): Likewise.
3727 (warnings_for_convert_and_check): Likewise.
3728 (match_case_to_enum_1): Likewise.
3729 (match_case_to_enum): Likewise.
3730 (c_do_switch_warnings): Likewise.
3731 (warn_for_omitted_condop): Likewise.
3732 (readonly_error): Likewise.
3733 (lvalue_error): Likewise.
3734 (invalid_indirection_error): Likewise.
3735 (warn_array_subscript_with_type_char): Likewise.
3736 (warn_about_parentheses): Likewise.
3737 (warn_for_unused_label): Likewise.
3738 (warn_for_div_by_zero): Likewise.
3739 (warn_for_memset): Likewise.
3740 (warn_for_sign_compare): Likewise.
3741 (do_warn_double_promotion): Likewise.
3742 (do_warn_unused_parameter): Likewise.
3743 (record_locally_defined_typedef): Likewise.
3744 (maybe_record_typedef_use): Likewise.
3745 (maybe_warn_unused_local_typedefs): Likewise.
3746 (maybe_warn_bool_compare): Likewise.
3747 (maybe_warn_shift_overflow): Likewise.
3748 (warn_duplicated_cond_add_or_warn): Likewise.
3749 (diagnose_mismatched_attributes): Likewise.
3750 * c-common.h: Move the declarations from c-warn.c to its own section.
3751 * c-warn.c: New file.
3752
627be19f
JM
37532016-10-08 Jason Merrill <jason@redhat.com>
3754
3755 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3756 into COND_EXPR in C++.
3757
7bad794a
JJ
37582016-10-08 Jakub Jelinek <jakub@redhat.com>
3759
3760 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3761 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3762 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3763
be845b04
JJ
37642016-10-07 Jakub Jelinek <jakub@redhat.com>
3765
3766 Implement LWG2296 helper intrinsic
3767 * c-common.h (enum rid): Add RID_ADDRESSOF.
3768 * c-common.c (c_common_reswords): Add __builtin_addressof.
3769
c09c4992
BE
37702016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3771
3772 PR c++/77700
3773 * c-common.c (c_common_truthvalue_conversion): Warn also for
3774 suspicious enum values in boolean context.
3775
342cfb3e
JJ
37762016-10-06 Jakub Jelinek <jakub@redhat.com>
3777
3778 Implement P0258R2 - helper for C++17
3779 std::has_unique_object_representations trait
3780 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3781 * c-common.c (c_common_reswords): Add
3782 __has_unique_object_representations.
3783
2e69f143
JJ
37842016-10-05 Jakub Jelinek <jakub@redhat.com>
3785
3786 PR sanitizer/66343
3787 * c-ubsan.c (ubsan_instrument_return): Don't call
3788 initialize_sanitizer_builtins here.
3789
700fff34
BE
37902016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3791
3792 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3793 conditional expression in boolean context when only one arm is
3794 non-boolean.
3795
9563bfcd
JJ
37962016-10-05 Jakub Jelinek <jakub@redhat.com>
3797
04a32443
JJ
3798 PR sanitizer/77823
3799 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3800 is not integral.
3801
9563bfcd
JJ
3802 * c-common.c (c_common_reswords): Update comment for C++11.
3803
f1644724
JM
38042016-10-04 Jason Merrill <jason@redhat.com>
3805
3806 * c-common.c (make_tree_vector_from_ctor): New.
3807 * c-common.h: Declare it.
3808
5a79befb
JJ
38092016-10-04 Jakub Jelinek <jakub@redhat.com>
3810
3811 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3812 __LIBGCC_JCR_SECTION_NAME__.
3813
1633d3b9
BE
38142016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3815
3816 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3817 left shift in boolean context.
3818
a2c6e7f2
JJ
38192016-09-29 Jakub Jelinek <jakub@redhat.com>
3820
3821 Implement P0001R1 - C++17 removal of register storage class specifier
3822 * c.opt (Wregister): New warning.
3823 * c-opts.c (c_common_post_options): Enable -Wregister by
3824 default for C++17.
3825
75304c87
JG
38262016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3827
3828 * c-opts.c (c_common_post_options): Remove special case for
3829 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3830 in C++.
3831
bbfac6da
JJ
38322016-09-27 Jakub Jelinek <jakub@redhat.com>
3833
6e39060a
JJ
3834 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3835 -std=c++1z.
3836
bbfac6da
JJ
3837 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3838
e73cf9a2
TP
38392016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3840
3841 * c-common.c: Include memmodel.h.
3842
c6147dc4
MP
38432016-09-26 Marek Polacek <polacek@redhat.com>
3844
3845 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3846
81fea426
MP
38472016-09-26 Marek Polacek <polacek@redhat.com>
3848
3849 PR c/7652
3850 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3851 (handle_fallthrough_attribute): New function.
3852 (attribute_fallthrough_p): New function.
3853 * c-common.h (attribute_fallthrough_p): Declare.
3854
9a2300e9
MP
38552016-09-24 Marek Polacek <polacek@redhat.com>
3856
3857 PR c/77490
3858 * c.opt (Wbool-operation): New.
3859
a09e9e35
BE
38602016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3861
3862 * c-common.c (c_common_truthvalue_conversion): Inhibit
3863 Wint-in-bool-context warning with from_macro_definition_at.
3864 Mention the expression will always evaluate to true.
3865
d43b4ccc
MS
38662016-09-21 Martin Sebor <msebor@redhat.com>
3867
3868 PR bootstrap/77676
3869 * c.opt (fprintf-return-value): Temporarily initialize to zero
3870 to unblock bootstrap failures.
3871
2e1c20b1
JJ
38722016-09-21 Jakub Jelinek <jakub@redhat.com>
3873
3874 PR c++/77651
3875 * c.opt (Waligned-new=): Add RejectNegative.
3876 (faligned-new=): Likewise. Spelling fix - change
3877 aligned_new_threshhold to aligned_new_threshold.
3878 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3879 to aligned_new_threshold.
3880
88d0c3f0
MS
38812016-09-20 Martin Sebor <msebor@redhat.com>
3882
3883 PR middle-end/49905
3884 * c.opt: Add -Wformat-length and -fprintf-return-value.
3885
144a96e4
BE
38862016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3887
3888 PR c++/77434
3889 * c.opt (Wint-in-bool-context): New warning.
3890 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3891 constants in boolean context.
3892
63012d9a
JM
38932016-09-19 Joseph Myers <joseph@codesourcery.com>
3894
3895 * c-common.c (max_align_t_align): Also consider alignment of
3896 float128_type_node.
3897
931388ce
JM
38982016-09-15 Jason Merrill <jason@redhat.com>
3899
3900 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3901 DECL_EXTERNAL.
3902
38711381
JM
39032016-09-14 Jason Merrill <jason@redhat.com>
3904
3905 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3906 limit FIELD_DECL, either.
3907
e51fbec3
MP
39082016-09-14 Marek Polacek <polacek@redhat.com>
3909
3910 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3911 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3912 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3913
254830ba
DM
39142016-09-13 David Malcolm <dmalcolm@redhat.com>
3915
3916 * c-common.c (warn_logical_not_parentheses): Replace
3917 rich_location::add_fixit_insert calls with add_fixit_insert_before
3918 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3919
42763690
JM
39202016-09-13 Jason Merrill <jason@redhat.com>
3921 Tom de Vries <tom@codesourcery.com>
3922
3923 PR c++/77427
3924 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3925
9453eee9
JM
39262016-09-13 Jason Merrill <jason@redhat.com>
3927
3928 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3929 limit types at all.
3930
e96809e3
JM
39312016-09-12 Jason Merrill <jason@redhat.com>
3932
3933 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3934 bit/byte confusion, allow large alignment for types.
3935
54dcdb88
BE
39362016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3937
3938 PR c++/77496
3939 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3940
d1463eb9
DM
39412016-09-12 David Malcolm <dmalcolm@redhat.com>
3942
3943 PR c/72858
3944 * c-format.c (argument_parser::check_argument_type): Add params
3945 "type_start" and "conversion_char". Use the former to generate
3946 offset_to_type_start and pass it and conversion_char to
3947 check_format_types.
3948 (check_format_info_main): Capture the start of the type
3949 information as "type_start", and pass it an format_char
3950 to arg_parser.check_argument_type.
3951 (check_format_types): Provide an example in the leading comment.
3952 Add params "offset_to_type_start" and "conversion_char"; pass
3953 them to format_type_warning calls.
3954 (test_get_modifier_for_format_len): Likewise.
3955 (matching_type_p): New function.
3956 (get_format_for_type): Add param "conversion_char" and move
3957 implementation into...
3958 (get_format_for_type_1): ...new function, called twice.
3959 Use new function matching_type_p rather than checking for
3960 TYPE_CANONICAL equality.
3961 (get_corrected_substring): New function.
3962 (format_type_warning): Provide an example in the leading comment.
3963 Add params "offset_to_type_start" and "conversion_char". Replace
3964 call to get_format_for_type with call to get_corrected_substring
3965 and move rejection of hints for widths/precisions there.
3966 (assert_format_for_type_streq): Add param "conversion_char".
3967 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3968 (test_get_format_for_type_printf): Add conversion chars to the
3969 tests, adding coverage for various combinations of integer
3970 vs double conversions, and for preserving octal and hexadecimal
3971 conversions.
3972 (test_get_format_for_type_scanf): Add conversion chars to the
3973 tests.
3974
5b28efbb
TV
39752016-09-10 Tom de Vries <tom@codesourcery.com>
3976
3977 PR C/71602
3978 * c-common.c (build_va_arg): Handle more strict
3979 targetm.canonical_va_list_type. Replace first argument type error with
3980 assert.
3981
3f0177e7
MS
39822016-09-09 Martin Sebor <msebor@redhat.com>
3983
3984 PR c/77520
3985 PR c/77521
3986 * c-format.c (argument_parser::find_format_char_info): Use %qc
3987 format directive unconditionally.
3988
af63ba4b
JM
39892016-09-09 Jason Merrill <jason@redhat.com>
3990
3991 Implement C++17 new of over-aligned types.
3992 * c.opt: Add -faligned-new and -Waligned-new.
3993 * c-common.c (max_align_t_align): Split out from...
3994 (cxx_fundamental_alignment_p): ...here.
3995 * c-common.h: Declare it.
3996 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3997
c65248cb
JM
39982016-09-09 Joseph Myers <joseph@codesourcery.com>
3999
4000 * c-cppbuiltin.c (builtin_define_type_width): New function.
4001 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
4002 macros.
4003
e5106e27
DM
40042016-09-07 David Malcolm <dmalcolm@redhat.com>
4005
4006 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
4007 a POINTER_TYPE.
4008 (substring_loc::get_location): Move to substring-locations.c,
4009 keeping implementation as...
4010 (c_get_substring_location): New function, from the above, reworked
4011 to use accessors rather than member lookup.
4012 * c-common.h (class substring_loc): Move to substring-locations.h,
4013 replacing with a forward decl.
4014 (c_get_substring_location): New decl.
4015 * c-format.c: Include "substring-locations.h".
4016 (format_warning_va): Move to substring-locations.c.
4017 (format_warning_at_substring): Likewise.
4018
ab20d992 40192016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
4020
4021 PR c/77336
4022 * c-format.c (check_function_format): Avoid issuing warnings for
4023 functions unless they call format functions with non-constant
4024 format strings.
4025
b772a565
RB
40262016-09-06 Richard Biener <rguenther@suse.de>
4027
4028 PR c/77450
4029 * c-common.c (c_common_mark_addressable_vec): Handle
4030 COMPOUND_LITERAL_EXPR.
4031
25ff5dd3
MP
40322016-09-05 Marek Polacek <polacek@redhat.com>
4033
4034 PR c/77423
4035 * c-common.c (bool_promoted_to_int_p): New function.
4036 (expr_has_boolean_operands_p): New function.
4037 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
4038 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
4039
21234eb5
TV
40402016-09-04 Tom de Vries <tom@codesourcery.com>
4041
4042 revert:
4043 2016-08-29 Tom de Vries <tom@codesourcery.com>
4044
4045 * c-common.c (build_va_arg): Replace first argument type error
4046 with assert.
4047
9dc5773f
JJ
40482016-09-02 Jakub Jelinek <jakub@redhat.com>
4049
4050 PR c/65467
4051 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
4052 (c_finish_omp_for): Reject _Atomic qualified iterators.
4053
40542016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
4055
4056 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
4057 size to guarantee it fits the output of the formatted function
4058 regardless of its arguments.
4059
295844f6
MP
40602016-09-01 Marek Polacek <polacek@redhat.com>
4061
4062 PR c/7652
4063 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
4064 FALLTHRU comments.
4065
3d06b6f2
MP
40662016-08-29 Marek Polacek <polacek@redhat.com>
4067
4068 PR c/77292
4069 * c-common.c (warn_logical_not_parentheses): Don't warn for
4070 a comparison or a logical operator.
4071
34cedad5
TV
40722016-08-29 Tom de Vries <tom@codesourcery.com>
4073
4074 * c-common.c (build_va_arg): Fix type comparison assert.
4075
f162d717
TV
40762016-08-29 Tom de Vries <tom@codesourcery.com>
4077
4078 * c-common.c (build_va_arg): Replace first argument type error
4079 with assert.
4080
ba9bbd6f
TV
40812016-08-29 Tom de Vries <tom@codesourcery.com>
4082
4083 PR c/77398
4084 * c-common.c (build_va_arg): Add first argument error. Build va_arg
4085 with error_mark_node as va_list instead of with illegal va_list.
4086
ebef225f
MP
40872016-08-25 Marek Polacek <polacek@redhat.com>
4088 David Malcolm <dmalcolm@redhat.com>
4089
4090 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
4091 * c-common.h (warn_logical_not_parentheses): Update declaration.
4092
b00e6e75
MP
40932016-08-22 Marek Polacek <polacek@redhat.com>
4094
4095 PR c++/77321
4096 * c-common.c (warn_for_memset): Check type for null.
4097
6dc198e3
JM
40982016-08-22 Joseph Myers <joseph@codesourcery.com>
4099
14ec014e 4100 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4101 _FloatNx types for suffixes for built-in functions.
4102
c65699ef
JM
41032016-08-19 Joseph Myers <joseph@codesourcery.com>
4104
4105 PR c/32187
4106 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4107 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4108 (RID_FLOAT128X): New enum rid values.
4109 (CASE_RID_FLOATN_NX): New macro.
4110 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4111 keywords.
4112 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4113 corresponding complex types.
4114 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4115 _FloatNx and corresponding complex types.
4116 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4117 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4118 and _FloatNx types for the widest type for determining
4119 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4120 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4121 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4122 and _FloatNx types.
4123 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4124 constants.
4125 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4126 _FloatNx types.
4127
cc015f3a
DM
41282016-08-18 David Malcolm <dmalcolm@redhat.com>
4129
4130 * c-opts.c (c_diagnostic_finalizer): Update for change to
4131 diagnostic_show_locus.
4132
cb18fd07
DM
41332016-08-18 David Malcolm <dmalcolm@redhat.com>
4134
4135 * c-common.c: Include "spellcheck.h".
4136 (cb_get_suggestion): New function.
4137 * c-common.h (cb_get_suggestion): New decl.
4138 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4139 cb_get_suggestion.
4140
a76989dc
MP
41412016-08-18 Marek Polacek <polacek@redhat.com>
4142
4143 PR c/71514
4144 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4145 and pointer-to-VLA.
4146
65e736c0
DM
41472016-08-16 David Malcolm <dmalcolm@redhat.com>
4148
4149 PR c/72857
4150 * c-common.c (substring_loc::get_range): Rename to...
4151 (substring_loc::get_location): ...this, converting param from a
4152 source_range * to a location_t *. Call
4153 get_source_location_for_substring rather than
4154 get_source_range_for_substring, and pass in m_caret_idx.
4155 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4156 (substring_loc::get_range): Replace with...
4157 (substring_loc::get_location): ...this.
4158 (substring_loc::set_caret_index): New method.
4159 (substring_loc): Add field m_caret_idx.
4160 * c-format.c (format_warning_va): Update for above changes.
4161 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4162 clashing with type name.
4163 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4164 (check_argument_type): Likewise.
4165 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4166 Use a copy when emitting warnings, setting the caret index from TYPE.
4167
7e1dde14 41682016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4169 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4170
4171 * c-ada-spec.c (dump_number): New function.
4172 (handle_escape_character): Likewise.
4173 (print_ada_macros): Add handling of constant integers and strings.
4174
191816a3
MP
41752016-08-12 Marek Polacek <polacek@redhat.com>
4176
4177 PR c/7652
4178 * c-common.c (scalar_to_vector): Adjust fall through comment.
4179 * c-opts.c (c_common_handle_option): Likewise.
4180 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4181 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4182 fall through comment.
4183 * cilk.c (extract_free_variables): Add FALLTHRU.
4184
452df4a4
JM
41852016-08-10 Jason Merrill <jason@redhat.com>
4186
4187 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4188
f3365c12
JM
41892016-08-09 Jason Merrill <jason@redhat.com>
4190
4191 * c-common.c (c_common_attribute_table): vector_size affects type
4192 identity.
4193
f0bc3323
MP
41942016-08-09 Marek Polacek <polacek@redhat.com>
4195
4196 PR c/7652
4197 * c-ada-spec.c (dump_generic_ada_node): Add return.
4198
98e5a19a
JM
41992016-08-09 Jason Merrill <jason@redhat.com>
4200
4201 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4202 C++17 constexpr lambdas.
4203
895aa8e1
DM
42042016-08-08 David Malcolm <dmalcolm@redhat.com>
4205
4206 PR c/64955
4207 * c-common.h (selftest::c_format_c_tests): New declaration.
4208 (selftest::run_c_tests): New declaration.
4209 * c-format.c: Include "selftest.h.
4210 (format_warning_va): Add param "corrected_substring" and use
4211 it to add a replacement fix-it hint.
4212 (format_warning_at_substring): Likewise.
4213 (format_warning_at_char): Update for new param of
4214 format_warning_va.
4215 (argument_parser::check_argument_type): Pass "fki" to
4216 check_format_types.
4217 (check_format_types): Add param "fki" and pass it to
4218 format_type_warning.
4219 (deref_n_times): New function.
4220 (get_modifier_for_format_len): New function.
4221 (selftest::test_get_modifier_for_format_len): New function.
4222 (get_format_for_type): New function.
4223 (format_type_warning): Add param "fki" and use it to attempt
4224 to provide hints for argument types when calling
4225 format_warning_at_substring.
4226 (selftest::get_info): New function.
4227 (selftest::assert_format_for_type_streq): New function.
4228 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4229 (selftest::test_get_format_for_type_printf): New function.
4230 (selftest::test_get_format_for_type_scanf): New function.
4231 (selftest::c_format_c_tests): New function.
4232
e52ed3fe
DM
42332016-08-08 David Malcolm <dmalcolm@redhat.com>
4234
4235 PR c/52952
4236 * c-format.c: Include "diagnostic.h".
4237 (location_column_from_byte_offset): Delete.
4238 (location_from_offset): Delete.
4239 (format_warning_va): New function.
4240 (format_warning_at_substring): New function.
4241 (format_warning_at_char): New function.
4242 (check_format_arg): Capture location of format_tree and pass to
4243 check_format_info_main.
4244 (argument_parser): Add fields "start_of_this_format" and
4245 "format_string_cst".
4246 (flag_chars_t::validate): Add param "format_string_cst". Convert
4247 warning_at call using location_from_offset to call to
4248 format_warning_at_char.
4249 (argument_parser::argument_parser): Add param "format_string_cst_"
4250 and use use it to initialize field "format_string_cst".
4251 Initialize new field "start_of_this_format".
4252 (argument_parser::read_format_flags): Convert warning_at call
4253 using location_from_offset to a call to format_warning_at_char.
4254 (argument_parser::read_any_format_left_precision): Likewise.
4255 (argument_parser::read_any_format_precision): Likewise.
4256 (argument_parser::read_any_other_modifier): Likewise.
4257 (argument_parser::find_format_char_info): Likewise, in three places.
4258 (argument_parser::parse_any_scan_set): Likewise, in one place.
4259 (argument_parser::handle_conversions): Likewise, in two places.
4260 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4261 and use it to make a substring_loc. Pass the latter to
4262 check_format_types.
4263 (check_format_info_main): Add params "fmt_param_loc" and
4264 "format_string_cst". Convert warning_at calls using
4265 location_from_offset to calls to format_warning_at_char. Pass the
4266 new params to the arg_parser ctor. Pass "format_string_cst" to
4267 flag_chars.validate. Pass "fmt_param_loc" to
4268 arg_parser.check_argument_type.
4269 (check_format_types): Convert first param from a location_t
4270 to a const substring_loc & and rename to "fmt_loc". Attempt
4271 to extract the range of the relevant parameter and pass it
4272 to format_type_warning.
4273 (format_type_warning): Convert first param from a location_t
4274 to a const substring_loc & and rename to "fmt_loc". Add
4275 params "param_range" and "type". Replace calls to warning_at
4276 with calls to format_warning_at_substring.
4277
1c4d457e
DM
42782016-08-08 David Malcolm <dmalcolm@redhat.com>
4279
4280 * c-format.c (class flag_chars_t): New class.
4281 (struct length_modifier): New struct.
4282 (class argument_parser): New class.
4283 (flag_chars_t::flag_chars_t): New ctor.
4284 (flag_chars_t::has_char_p): New method.
4285 (flag_chars_t::add_char): New method.
4286 (flag_chars_t::validate): New method.
4287 (flag_chars_t::get_alloc_flag): New method.
4288 (flag_chars_t::assignment_suppression_p): New method.
4289 (argument_parser::argument_parser): New ctor.
4290 (argument_parser::read_any_dollar): New method.
4291 (argument_parser::read_format_flags): New method.
4292 (argument_parser::read_any_format_width): New method.
4293 (argument_parser::read_any_format_left_precision): New method.
4294 (argument_parser::read_any_format_precision): New method.
4295 (argument_parser::handle_alloc_chars): New method.
4296 (argument_parser::read_any_length_modifier): New method.
4297 (argument_parser::read_any_other_modifier): New method.
4298 (argument_parser::find_format_char_info): New method.
4299 (argument_parser::validate_flag_pairs): New method.
4300 (argument_parser::give_y2k_warnings): New method.
4301 (argument_parser::parse_any_scan_set): New method.
4302 (argument_parser::handle_conversions): New method.
4303 (argument_parser::check_argument_type): New method.
4304 (check_format_info_main): Introduce classes argument_parser
4305 and flag_chars_t, moving the code within the loop into methods
4306 of these classes. Make various locals "const".
4307
88fa5555
DM
43082016-08-05 David Malcolm <dmalcolm@redhat.com>
4309
4310 * c-common.c: Include "substring-locations.h".
4311 (get_cpp_ttype_from_string_type): New function.
4312 (g_string_concat_db): New global.
4313 (substring_loc::get_range): New method.
4314 * c-common.h (g_string_concat_db): New declaration.
4315 (class substring_loc): New class.
4316 * c-lex.c (lex_string): When concatenating strings, capture the
4317 locations of all tokens using a new obstack, and record the
4318 concatenation locations within g_string_concat_db.
4319 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4320 on the ggc-heap.
4321
78169471
MP
43222016-07-29 Marek Polacek <polacek@redhat.com>
4323
638fc14f
MP
4324 PR c/71926
4325 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4326 parentheses warning.
4327
78169471
MP
4328 PR c/71574
4329 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4330
1225d6b1
ML
43312016-07-28 Martin Liska <mliska@suse.cz>
4332
4333 PR gcov-profile/68025
4334 * c-common.c (handle_no_profile_instrument_function_attribute):
4335
ec1e2a40
BE
43362016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4337
4338 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4339 BITS_PER_UNIT_LOG.
4340
5ec2cd9f
JM
43412016-07-25 Jason Merrill <jason@redhat.com>
4342
4343 PR c++/65970
4344 * c.opt (fconstexpr-loop-limit): New.
4345
9dc5773f 43462016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4347
4348 PR c++/71675
4349 * c-common.c (resolve_overloaded_builtin): Avoid converting
4350 __atomic_compare_exchange_n return type to that of what its
4351 first argument points to.
4352
e3fe09c1
UB
43532016-07-22 Uros Bizjak <ubizjak@gmail.com>
4354
4355 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4356 ~(unsigned HOST_WIDE_INT) 0.
4357
bc91c436
ML
43582016-07-22 Martin Liska <mliska@suse.cz>
4359
4360 PR gcov-profile/69028
4361 PR gcov-profile/62047
4362 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4363 to the current_function_decl.
4364
451dcc66
JM
43652016-07-21 Jason Merrill <jason@redhat.com>
4366
4367 PR c++/65168
4368 * c-common.c (c_common_truthvalue_conversion): Check
4369 c_inhibit_evaluation_warnings for warning about address of
4370 reference.
4371
de6a69ee
DM
43722016-07-20 David Malcolm <dmalcolm@redhat.com>
4373
4374 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4375 const char *.
4376
d022c55a
JM
43772016-07-15 Jason Merrill <jason@redhat.com>
4378
4379 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4380
ddbbcb19
JJ
43812016-07-15 Jakub Jelinek <jakub@redhat.com>
4382
4383 PR c/71858
4384 * c-common.h (enum lookup_name_fuzzy_kind): Add
4385 FUZZY_LOOKUP_FUNCTION_NAME.
4386
d0cf395a
JM
43872016-07-08 Jason Merrill <jason@redhat.com>
4388
4389 P0145: Refining Expression Order for C++.
4390 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4391 * c-opts.c: Adjust.
4392
98d44e93
MT
43932016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4394
4395 PR c++/71214
4396 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4397
f9d8d994
TS
43982016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4399
4400 * c-pragma.h (enum pragma_kind): Rename
4401 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4402 users.
4403
4aa83879
RB
44042016-06-29 Richard Biener <rguenther@suse.de>
4405
4406 PR middle-end/71002
4407 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4408
a25bd9e6
JM
44092016-06-24 Jason Merrill <jason@redhat.com>
4410
4411 P0145R2: Refining Expression Order for C++.
4412 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4413 MODIFY_EXPR.
4414
a86451b9
JJ
44152016-06-24 Jakub Jelinek <jakub@redhat.com>
4416
4417 * c-common.c (check_builtin_function_arguments): Require last
4418 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4419 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4420 if the last argument is pointer to enumerated or boolean type.
4421
1a4f11c8
DM
44222016-06-22 David Malcolm <dmalcolm@redhat.com>
4423
4424 PR c/70339
4425 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4426 (lookup_name_fuzzy): New prototype.
4427
fe55692c
JDA
44282016-06-21 John David Anglin <danglin@gcc.gnu.org>
4429
4430 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4431
4eb24e01
JM
44322016-06-14 Jason Merrill <jason@redhat.com>
4433
4434 P0145R2: Refining Expression Order for C++.
4435 * c.opt (fargs-in-order): New.
4436 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4437
ef7cf206
JJ
44382016-06-13 Jakub Jelinek <jakub@redhat.com>
4439
0dda258b
JJ
4440 PR sanitizer/71498
4441 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4442 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4443
ef7cf206
JJ
4444 PR preprocessor/71183
4445 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4446 to cb_get_source_date_epoch.
4447
50b15873
JJ
44482016-06-10 Jakub Jelinek <jakub@redhat.com>
4449
4450 PR c/68657
4451 * c.opt (Wpsabi): Add Warning flag.
4452
4d926e34
MS
44532016-06-10 Martin Sebor <msebor@redhat.com>
4454
4455 PR c/71392
14ec014e 4456 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4457 the nonnull attribute in type-generic builtins.
4458
e01b4e16
MS
44592016-06-09 Martin Sebor <msebor@redhat.com>
4460
4461 PR c/70883
4462 * c-common.c (builtin_function_validate_nargs): Make text of error
4463 message consistent with others like it.
4464
44a845ca
MS
44652016-06-08 Martin Sebor <msebor@redhat.com>
4466 Jakub Jelinek <jakub@redhat.com>
4467
4468 PR c++/70507
4469 PR c/68120
4470 * c-common.c (check_builtin_function_arguments): Handle
4471 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4472
a80a7051
RB
44732016-06-08 Richard Biener <rguenther@suse.de>
4474
4475 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4476
bfd67b47
RB
44772016-06-07 Richard Biener <rguenther@suse.de>
4478
4479 PR c/61564
4480 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4481 options and warn about others.
4482
15c98b2e
ES
44832016-06-01 Eduard Sanou <dhole@openmailbox.org>
4484
4485 * c-common.c (get_source_date_epoch): Rename to
4486 cb_get_source_date_epoch.
4487 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4488 message when the parsing fails. Use error_at instead of fatal_error.
4489 * c-common.h (get_source_date_epoch): Rename to
4490 cb_get_source_date_epoch.
4491 * c-common.h (cb_get_source_date_epoch): Prototype.
4492 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4493 * c-common.h (c_omp_region_type): Remove trailing comma.
4494 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4495 * c-lex.c (c_lex_with_flags): Remove initialization of
4496 pfile->source_date_epoch.
4497
00631022
JJ
44982016-05-30 Jakub Jelinek <jakub@redhat.com>
4499
4500 PR c++/71349
4501 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4502 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4503 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4504 instead of C_OMP_CLAUSE_SPLIT_FOR.
4505
f17a223d
RB
45062016-05-24 Richard Biener <rguenther@suse.de>
4507
4508 PR middle-end/70434
4509 PR c/69504
4510 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4511 (convert_vector_to_array_for_subscript): ... this.
4512 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4513 VIEW_CONVERT_EXPR to an array type. Rename to ...
4514 (convert_vector_to_array_for_subscript): ... this.
4515
4f2e1536
MP
45162016-05-12 Marek Polacek <polacek@redhat.com>
4517
4518 PR c/70756
4519 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4520 size_in_bytes and pass LOC to it.
4521
d6e83a8d
MM
45222016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4523
4524 PR c/43651
4525 * c.opt (Wduplicate-decl-specifier): New option.
4526
5c3a10fb
MP
45272016-05-11 Marek Polacek <polacek@redhat.com>
4528
4529 PR c++/71024
4530 * c-common.c (diagnose_mismatched_attributes): New function.
4531 * c-common.h (diagnose_mismatched_attributes): Declare.
4532
deef7113
MP
45332016-05-04 Marek Polacek <polacek@redhat.com>
4534
4535 * c.opt (Wdangling-else): New option.
4536
79ce98bc
MP
45372016-05-03 Marek Polacek <polacek@redhat.com>
4538
4539 PR c/70859
4540 * c-common.c (builtin_function_validate_nargs): Add location
4541 parameter. Use it.
4542 (check_builtin_function_arguments): Add location and arguments
4543 parameters. Use them.
4544 * c-common.h (check_builtin_function_arguments): Update declaration.
4545
381cdae4
RB
45462016-05-03 Richard Biener <rguenther@suse.de>
4547
4548 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4549 allow call args to gimplify to SSA names.
4550
1d793c34
MP
45512016-05-03 Marek Polacek <polacek@redhat.com>
4552
4553 * c-common.h (enum c_omp_region_type): Remove stray comma.
4554
77886428
CP
45552016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4556
4557 * c-common.h (enum c_omp_region_type): Define.
4558
697e0b28
RS
45592016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4560
4561 * c-common.c (shorten_compare): Use wi::to_wide.
4562
e7ff0319
CP
45632016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4564
4565 PR middle-end/70626
4566 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4567 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4568 reduction clauses in acc parallel loops.
4569
2fff3db8
MP
45702016-04-29 Marek Polacek <polacek@redhat.com>
4571
4572 PR c/70852
4573 * c-common.c (warn_for_memset): Check domain before accessing it.
4574
509063eb
DV
45752016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4576
4577 PR/69089
4578 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4579 "aligned" attribute.
4580
b632761d
JM
45812016-04-28 Jason Merrill <jason@redhat.com>
4582
4583 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4584
174f6622
ES
45852016-04-28 Eduard Sanou <dhole@openmailbox.org>
4586 Matthias Klose <doko@debian.org>
4587
4588 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4589 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4590 handling.
4591 * c-common.h (get_source_date_epoch): Prototype.
4592 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4593
6bc2bb18
RB
45942015-04-27 Ryan Burn <contact@rnburn.com>
4595
4596 PR c++/69024
4597 PR c++/68997
4598 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4599 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4600 external linkage.
4601 (cilk_detect_and_unwrap): Corresponding changes.
4602 (extract_free_variables): Don't extract free variables from
4603 AGGR_INIT_EXPR slot.
4604 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4605 (cilk_recognize_spawn): Likewise.
4606
c1e1f433
BS
46072016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4608
4609 * c.opt (Wmemset-elt-size): New option.
4610 * c-common.c (warn_for_memset): New function.
4611 * c-common.h (warn_for_memset): Declare.
4612
d067e05f
JM
46132016-04-25 Jason Merrill <jason@redhat.com>
4614
4615 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4616 No longer static.
4617 * c-common.h: Declare it.
4618 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4619
9aa36ae5
JM
46202016-04-22 Jason Merrill <jason@redhat.com>
4621
4622 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4623
477d4906
IV
46242016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4625
4626 PR c++/69363
4627 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4628 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4629
fe37c7af
MM
46302016-04-18 Michael Matz <matz@suse.de>
4631
4632 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4633 and SET_DECL_ALIGN.
4634
23f2660f
EB
46352016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4636
4637 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4638 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4639 to incomplete types.
4640 (dump_nested_type): Remove redundant tests and tidy up.
4641 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4642 a type which is the typedef of an original type.
4643
1e77281b
MP
46442016-04-15 Marek Polacek <polacek@redhat.com>
4645
4646 PR c/70651
4647 * c-common.c (build_va_arg): Change two asserts into errors and return
4648 error_mark_node.
4649
b3a77f21
MP
46502016-04-13 Marek Polacek <polacek@redhat.com>
4651
4652 PR c++/70639
4653 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4654 for switch statements, too.
4655
322b8466
JM
46562016-03-28 Jason Merrill <jason@redhat.com>
4657
4658 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4659
fbdb6baf
MP
46602016-03-23 Marek Polacek <polacek@redhat.com>
4661
4662 PR c++/69884
4663 * c.opt (Wignored-attributes): New option.
4664
5c240f4d
DM
46652016-03-22 David Malcolm <dmalcolm@redhat.com>
4666
4667 PR c/69993
4668 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4669 diagnostic text, reversing the order of the warning and note so
4670 that they appear in source order.
4671
14ba7b28
MP
46722016-03-17 Marek Polacek <polacek@redhat.com>
4673
4674 PR c/69407
4675 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4676 operations.
4677
08a1cadc
JM
46782016-03-14 Jason Merrill <jason@redhat.com>
4679
2aaeea19
JM
4680 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4681
08a1cadc
JM
4682 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4683
c06d25bb
RB
46842016-03-09 Richard Biener <rguenther@suse.de>
4685
4686 PR c/70143
4687 * c-common.c (strict_aliasing_warning): Add back
4688 alias_sets_conflict_p check.
4689
80aac5c8
JM
46902016-03-08 Jason Merrill <jason@redhat.com>
4691
4692 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4693
64b23c13
DM
46942016-03-04 David Malcolm <dmalcolm@redhat.com>
4695
4696 PR c/68187
4697 * c-indentation.c (get_visual_column): Move code to determine next
4698 tab stop to...
4699 (next_tab_stop): ...this new function.
4700 (line_contains_hash_if): Delete function.
4701 (detect_preprocessor_logic): Delete function.
4702 (get_first_nws_vis_column): New function.
4703 (detect_intervening_unindent): New function.
4704 (should_warn_for_misleading_indentation): Replace call to
4705 detect_preprocessor_logic with a call to
4706 detect_intervening_unindent.
4707
729526f5
DM
47082016-03-04 David Malcolm <dmalcolm@redhat.com>
4709
4710 PR c/68187
4711 * c-indentation.c (should_warn_for_misleading_indentation): When
4712 suppressing warnings about cases where the guard and body are on
4713 the same column, only use the first non-whitespace column in place
4714 of the guard token column when dealing with "else" clauses.
4715 When rejecting aligned BODY and NEXT, loosen the requirement
4716 from equality with the first non-whitespace of guard to simply
4717 that they not be indented relative to it.
4718
e9a35493
RB
47192016-03-04 Richard Biener <rguenther@suse.de>
4720
4721 PR c++/70054
4722 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4723 instead of alias_sets_conflict_p.
4724
1be56bc5
MP
47252016-03-01 Marek Polacek <polacek@redhat.com>
4726
4727 PR c++/69795
4728 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4729 any DECL.
4730
35886f0b
MS
47312016-02-22 Martin Sebor <msebor@redhat.com>
4732
4733 PR middle-end/69780
4734 * c-common.c (check_builtin_function_arguments): Validate and
4735 reject invalid arguments to __builtin_alloca_with_align.
4736
4246c8da
MW
47372016-02-20 Mark Wielaard <mjw@redhat.com>
4738
4739 PR c/28901
4740 * c.opt (Wunused-const-variable): Turn into Alias for...
4741 (Wunused-const-variable=): New option.
4742
268be88c
BE
47432016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4744
4745 PR c++/69865
4746 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4747 here...
4748 (c_common_init_options): ...to here.
4749 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4750
871b3f47
JJ
47512016-02-19 Jakub Jelinek <jakub@redhat.com>
4752
4753 PR c++/69826
4754 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4755 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4756 flag_preprocess_only.
4757
bf14eba2
JJ
47582016-02-16 Jakub Jelinek <jakub@redhat.com>
4759
4760 PR c/69835
4761 * c.opt (Wnonnull-compare): Enable for -Wall.
4762
ba6b3795
JJ
47632016-02-15 Jakub Jelinek <jakub@redhat.com>
4764
4765 PR c++/69797
4766 * c-common.c (sync_resolve_size): Diagnose too few arguments
4767 even when params is non-NULL empty vector.
4768
a011cd92
BS
47692016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4770
4771 PR target/60410
4772 * c.opt (fshort-double): Remove.
4773
46cb9332
MS
47742016-02-05 Martin Sebor <msebor@redhat.com>
4775
4776 PR c++/69662
4777 * c.opt (Warning options): Update -Wplacement-new to take
4778 an optional argument.
4779
e1b81f2b
JJ
47802016-02-01 Jakub Jelinek <jakub@redhat.com>
4781
4782 PR preprocessor/69543
4783 PR c/69558
4784 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4785 instead of loc to control_warning_option.
4786
b6adbb9f
NS
47872016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4788
4789 * c.opt (fopenacc-dim=): New option.
4790
5d70666e
RB
47912016-01-27 Ryan Burn <contact@rnburn.com>
4792
4793 PR cilkplus/69267
4794 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4795 gimplify_arg. Removed superfluous post_p argument.
4796 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4797 superfluous post_p argument.
4798 * c-gimplify.c (c_gimplify_expr): Likewise.
4799
01e1dea3
DM
48002016-01-26 David Malcolm <dmalcolm@redhat.com>
4801
4802 PR other/69006
4803 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4804 pp_newline_and_flush with pp_flush.
4805
9f04a53e
MS
48062016-01-20 Martin Sebor <msebor@redhat.com>
4807
4808 PR c/69405
4809 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4810 an incompatible argument when the argument isn't a valid tree node.
4811
7f26f7df
JM
48122016-01-18 Jason Merrill <jason@redhat.com>
4813
4814 PR c++/68767
4815 * c-common.c (check_function_arguments_recurse): Fold the whole
4816 COND_EXPR, not just the condition.
4817
f62bf092
TV
48182016-01-18 Tom de Vries <tom@codesourcery.com>
4819
4820 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4821 classify as loop clause.
4822
e0a575ff
JJ
48232016-01-15 Jakub Jelinek <jakub@redhat.com>
4824
4825 PR bootstrap/68271
4826 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4827 C++ FE no longer has limit on number of pragmas.
4828
48292015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4830
4831 PR c++/69048
4832 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4833 to add missing cleanup point.
b6e3db06 4834
c7df95d8
DM
48352016-01-14 David Malcolm <dmalcolm@redhat.com>
4836
4837 PR c++/68819
4838 * c-indentation.c (get_visual_column): Add location_t param.
4839 Handle the column number being zero by effectively disabling the
4840 warning, with an "inform".
4841 (should_warn_for_misleading_indentation): Add location_t argument
4842 for all uses of get_visual_column.
4843
21efdd80
PP
48442016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4845
4846 PR c++/69029
4847 * c-indentation.c (should_warn_for_misleading_indentation):
4848 Don't warn about do-while statements.
4849
7a127fa7
MS
48502016-01-07 Martin Sebor <msebor@redhat.com>
4851
4852 PR c/68966
4853 * c-common.c (sync_resolve_size): Reject first argument when it's
4854 a pointer to _Bool.
4855
c589e975
DM
48562016-01-05 David Malcolm <dmalcolm@redhat.com>
4857
4858 PR c/69122
4859 * c-indentation.c (get_visual_column): Remove default argument.
4860 (should_warn_for_misleading_indentation): For the multiline case,
4861 update call to get_visual_column for next_stmt_exploc so that it
4862 captures the location of the first non-whitespace character in the
4863 relevant line. Don't issue warnings if there is non-whitespace
4864 before the next statement.
4865
818ab71a
JJ
48662016-01-04 Jakub Jelinek <jakub@redhat.com>
4867
4868 Update copyright years.
4869
745e411d
DM
48702015-12-21 David Malcolm <dmalcolm@redhat.com>
4871
4872 * c-common.c (binary_op_error): Convert first param from
4873 location_t to rich_location * and use it when emitting an error.
4874 * c-common.h (binary_op_error): Convert first param from
4875 location_t to rich_location *.
4876
de67c4c3
DM
48772015-12-16 David Malcolm <dmalcolm@redhat.com>
4878
4879 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4880 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4881
4a38b02b
IV
48822015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4883
4884 * c-common.c (c_common_attribute_table): Handle "omp declare target
4885 link" attribute.
4886
54d62f51
JJ
48872015-12-14 Jakub Jelinek <jakub@redhat.com>
4888
4889 PR c/68833
4890 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4891
8d4227c8
TB
48922014-12-12 Tobias Burnus <burnus@net-b.de>
4893
4894 PR fortran/68815
4895 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4896 specifiers (%d, %i,%u and %c).
4897
f6069ccc
DM
48982015-12-10 David Malcolm <dmalcolm@redhat.com>
4899
4900 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4901
63bbf46d
JJ
49022015-12-08 Jakub Jelinek <jakub@redhat.com>
4903
4904 PR c/48088
4905 PR c/68657
4906 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4907 * c-pragma.c (handle_pragma_diagnostic): Adjust
4908 control_warning_option caller.
4909
f79520bb
DM
49102015-12-07 David Malcolm <dmalcolm@redhat.com>
4911
4912 * c-common.c (c_cpp_error): Update for change to
4913 rich_location::set_range.
4914
b3d5bc62
JJ
49152015-12-04 Paolo Bonzini <bonzini@gnu.org>
4916
4917 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4918 shifting 1 out of the sign bit.
4919
49202015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4921
4922 * c-common.c (c_common_attribute_table[]): Update max arguments
4923 count for "simd" attribute.
4924 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4925
6eb4a537
JJ
49262015-12-03 Jakub Jelinek <jakub@redhat.com>
4927
4928 PR preprocessor/57580
4929 * c-ppoutput.c (print): Change printed field to bool.
4930 Move src_file last for smaller padding.
4931 (init_pp_output): Set print.printed to false instead of 0.
4932 (scan_translation_unit): Fix up formatting. Set print.printed
4933 to true after printing something other than newline.
4934 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4935 (maybe_print_line_1): Set print.printed to false instead of 0.
4936 (print_line_1): Likewise.
4937 (do_line_change): Set print.printed to true instead of 1.
4938 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4939 dump_macro): Set print.printed to false after printing newline.
4940
4250754e
JM
49412015-12-02 Jason Merrill <jason@redhat.com>
4942
f479b43d
JM
4943 * c-common.c (fold_for_warn): New.
4944 (warn_logical_operator, warn_tautological_cmp)
4945 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4946
4250754e
JM
4947 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4948 (c_fully_fold_internal, decl_constant_value_for_optimization):
4949 Move to c/c-fold.c.
4950 * c-common.h: Don't declare decl_constant_value_for_optimization.
4951
e9e32ee6
JM
49522015-12-02 Joseph Myers <joseph@codesourcery.com>
4953
4954 PR c/68162
4955 * c-common.h (c_build_qualified_type): Add extra default
4956 arguments.
4957
37d5ad46
JB
49582015-12-01 Julian Brown <julian@codesourcery.com>
4959 Cesar Philippidis <cesar@codesourcery.com>
4960 James Norris <James_Norris@mentor.com>
4961
4962 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4963 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4964 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4965
f07862c7
EB
49662015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4967
4968 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4969 (decl_sloc_common): Delete and move bulk of processing to...
4970 (decl_sloc): ...here.
4971 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4972 (dump_ada_double_name): Remove S parameter and compute the suffix.
4973 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4974 element type and deal with an anonymous one.
4975 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4976 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4977 and remove reference to QUAL_UNION_TYPE.
4978 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4979 (dump_nested_type): ...here. New function extracted from above.
4980 Generate a full declaration for anonymous element type of arrays.
4981 (print_ada_declaration): Really skip anonymous declarations. Remove
4982 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4983 Clean up processing of declarations of array types and objects.
4984 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4985 Remove obsolete code and tidy up.
4986
75c8aac3
JH
49872015-11-29 Jan Hubicka <hubicka@ucw.cz>
4988
4989 PR c/67581
4990 * c-common.c (handle_transparent_union_attribute): Update
4991 also type variants.
4992
b58d3df2
ML
49932015-11-27 Martin Liska <mliska@suse.cz>
4994
4995 PR c++/68312
4996 * array-notation-common.c (cilkplus_extract_an_triplets):
4997 Release vector of vectors.
4998 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4999
89a01fcf
EB
50002015-11-26 Eric Botcazou <ebotcazou@adacore.com>
5001
5002 PR c++/68527
5003 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
5004 (print_ada_struct_decl): Likewise.
5005
cc5c5226
IZ
50062015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
5007
5008 PR c++/68001
5009 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
5010 * cilk.c (recognize_spawn): Determine location in a more precise
5011 way.
5012
269adb9d
JM
50132015-11-19 Jason Merrill <jason@redhat.com>
5014
5015 * c-common.c (shorten_compare): But look through macros from
5016 system headers.
5017
d0eccfcd
JM
50182015-11-18 Jason Merrill <jason@redhat.com>
5019
5020 * c-common.c (shorten_compare): Don't -Wtype-limits if the
5021 non-constant operand comes from a macro.
5022
3e44547c
JM
50232015-11-17 Jason Merrill <jason@redhat.com>
5024
5025 PR bootstrap/68346
5026 * c-common.c (warn_tautological_cmp): Fold before checking for
5027 constants.
5028
0f62c7a0
MP
50292015-11-16 Marek Polacek <polacek@redhat.com>
5030
5031 PR c++/68362
5032 * c-common.c (check_case_bounds): Fold low and high cases.
5033
a868811e
MP
50342015-11-16 Marek Polacek <polacek@redhat.com>
5035
5036 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
5037 * c-common.c (c_common_get_alias_set): Likewise.
5038 (handle_visibility_attribute): Likewise.
5039
fff77217
KY
50402015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
5041
5042 * c-common.c (handle_simd_attribute): New.
5043 (struct attribute_spec): Add entry for "simd".
5044 (handle_simd_attribute): New.
5045
269e63b7
KT
50462015-11-13 Kai Tietz <ktietz70@googlemail.com>
5047
5048 * c-lex.c (interpret_float): Use fold_convert.
5049
ebedc9a3
DM
50502015-11-13 David Malcolm <dmalcolm@redhat.com>
5051
5052 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
5053 and store it on the result.
5054 * c-opts.c (c_common_init_options): Set
5055 global_dc->colorize_source_p.
5056
6e232ba4
JN
50572015-11-12 James Norris <jnorris@codesourcery.com>
5058 Joseph Myers <joseph@codesourcery.com>
5059
7365279f 5060 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
5061 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
5062 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
5063 PRAGMA_OACC_CLAUSE_LINK.
5064
e78bede6
MP
50652015-11-11 Marek Polacek <polacek@redhat.com>
5066
5067 PR c/68107
5068 PR c++/68266
5069 * c-common.c (valid_array_size_p): New function.
5070 * c-common.h (valid_array_size_p): Declare.
5071
3f8257db 50722015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
5073
5074 PR bootstrap/68271
5075 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
5076
69f293c9
AM
50772015-11-11 Andrew MacLeod <amacleod@redhat.com>
5078
5079 * array-notation-common.c: Remove unused header files.
5080 * c-ada-spec.c: Likewise.
5081 * c-cilkplus.c: Likewise.
5082 * c-common.c: Likewise.
5083 * c-cppbuiltin.c: Likewise.
5084 * c-dump.c: Likewise.
5085 * c-format.c: Likewise.
5086 * c-gimplify.c: Likewise.
5087 * c-indentation.c: Likewise.
5088 * c-lex.c: Likewise.
5089 * c-omp.c: Likewise.
5090 * c-opts.c: Likewise.
5091 * c-pch.c: Likewise.
5092 * c-ppoutput.c: Likewise.
5093 * c-pragma.c: Likewise.
5094 * c-pretty-print.c: Likewise.
5095 * c-semantics.c: Likewise.
5096 * c-ubsan.c: Likewise.
5097 * cilk.c: Likewise.
5098 * stub-objc.c: Likewise.
5099
3a40d81d
NS
51002015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5101 Cesar Philippidis <cesar@codesourcery.com>
5102 James Norris <jnorris@codesourcery.com>
5103 Julian Brown <julian@codesourcery.com>
5104 Nathan Sidwell <nathan@codesourcery.com>
5105
5106 * c-pragma.c (oacc_pragmas): Add "routine".
5107 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5108
ee45a32d
EB
51092015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5110
5111 * c-common.c (c_common_attributes): Add scalar_storage_order.
5112 (handle_scalar_storage_order_attribute): New function.
5113 * c-pragma.c (global_sso): New variable.
5114 (maybe_apply_pragma_scalar_storage_order): New function.
5115 (handle_pragma_scalar_storage_order): Likewise.
5116 (init_pragma): Register scalar_storage_order.
5117 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5118 * c.opt (Wscalar-storage-order): New warning.
5119 (fsso-struct=): New option.
5120
eb11eb15
MS
51212015-11-08 Martin Sebor <msebor@redhat.com>
5122
5123 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5124
0aad0198
RS
51252015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5126
5127 * c-common.c: Don't undef DEF_BUILTIN.
5128
8a645150
DM
51292015-11-06 David Malcolm <dmalcolm@redhat.com>
5130
5131 * c-common.c (c_cpp_error): Convert parameter from location_t to
5132 rich_location *. Eliminate the "column_override" parameter and
5133 the call to diagnostic_override_column.
5134 Update the "done_lexing" clause to set range 0
5135 on the rich_location, rather than overwriting a location_t.
5136 * c-common.h (c_cpp_error): Convert parameter from location_t to
5137 rich_location *. Eliminate the "column_override" parameter.
5138
7a5e4956
CP
51392015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5140 Thomas Schwinge <thomas@codesourcery.com>
5141 James Norris <jnorris@codesourcery.com>
5142
5143 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5144 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5145 clauses with parallel and kernels and loops.
5146 * c-pragma.h (enum pragma_omp_clause): Add entries for
5147 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5148 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5149 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5150 INDEPENDENT,SEQ}.
5151 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5152
e2f5cc96
MS
51532015-11-05 Martin Sebor <msebor@redhat.com>
5154
5155 PR c++/67942
5156 * c.opt (-Wplacement-new): New option.
5157
e01d41e5
JJ
51582015-11-05 Jakub Jelinek <jakub@redhat.com>
5159
5160 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5161 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5162 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5163 save_expr or create_tmp_var* if TEST is true.
5164 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5165 Don't call add_stmt here.
5166 (struct c_omp_check_loop_iv_data): New type.
5167 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5168 c_omp_check_loop_iv_exprs): New functions.
5169 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5170 distribute.
5171 (c_omp_declare_simd_clauses_to_numbers): Change
5172 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5173 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5174 from numbers to PARM_DECLs.
5175
595278be
MM
51762015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5177
5178 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5179 flag_checking.
5180
3f8257db 51812015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5182
5183 PR c++-common/67882
b3d5bc62
JJ
5184 * c-common.h (fold_offsetof_1): Add argument.
5185 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5186 offsetof expressions that reference elements past the end of
5187 an array.
5188
4bf9e5a8
TS
51892015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5190 Chung-Lin Tang <cltang@codesourcery.com>
5191
5192 * c-pragma.c (oacc_pragmas): Add "atomic".
5193 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5194
3b1661a9
ES
51952015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5196
5197 * c-common.c (handle_target_clones_attribute): New.
5198 (c_common_attribute_table): Add handle_target_clones_attribute.
5199 (handle_always_inline_attribute): Add check on target_clones attribute.
5200 (handle_target_attribute): Ditto.
5201
2adfab87
AM
52022015-10-29 Andrew MacLeod <amacleod@redhat.com>
5203
5204 * array-notation-common.c: Reorder #include's and remove duplicates.
5205 * c-ada-spec.c: Likewise.
5206 * c-cilkplus.c: Likewise.
5207 * c-common.c: Likewise.
5208 * c-cppbuiltin.c: Likewise.
5209 * c-dump.c: Likewise.
5210 * c-format.c: Likewise.
5211 * c-gimplify.c: Likewise.
5212 * c-indentation.c: Likewise.
5213 * c-lex.c: Likewise.
5214 * c-omp.c: Likewise.
5215 * c-opts.c: Likewise.
5216 * c-pch.c: Likewise.
5217 * c-ppoutput.c: Likewise.
5218 * c-pragma.c: Likewise.
5219 * c-pretty-print.c: Likewise.
5220 * c-semantics.c: Likewise.
5221 * c-ubsan.c: Likewise.
5222 * cilk.c: Likewise.
5223 * stub-objc.c: Likewise.
5224
d90ec4f2
JM
52252015-10-28 Jason Merrill <jason@redhat.com>
5226
5227 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5228
88bae6f4
TS
52292015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5230 James Norris <jnorris@codesourcery.com>
5231 Cesar Philippidis <cesar@codesourcery.com>
5232
5233 PR c/64765
5234 PR c/64880
5235 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5236 * c-omp.c (c_oacc_split_loop_clauses): New function.
5237
b1726d6c
MS
52382015-10-21 Martin Sebor <msebor@redhat.com>
5239
5240 PR driver/68043
5241 * c.opt: End each sentence that describes an option with a period.
5242
fa60eeb9
MP
52432015-10-20 Marek Polacek <polacek@redhat.com>
5244
5245 * array-notation-common.c (is_cilkplus_vector_p): Define.
5246 * c-common.h (is_cilkplus_vector_p): Declare.
5247
95979049
MP
52482015-10-20 Marek Polacek <polacek@redhat.com>
5249
5250 * c.opt (std=gnu++11): Do not describe as experimental.
5251 (std=gnu++14): Likewise.
5252
2a9fb712
JM
52532015-10-19 Jason Merrill <jason@redhat.com>
5254
5255 * c-cppbuiltin.c (c_cpp_builtins): Define
5256 __cpp_nontype_template_args.
5257
13b380a3
JM
52582015-10-19 Jason Merrill <jason@redhat.com>
5259
5260 * c-cppbuiltin.c (c_cpp_builtins): Define
5261 __cpp_enumerator_attributes, __cpp_fold_expressions,
5262 __cpp_unicode_characters.
5263
d9a6bd32
JJ
52642015-10-13 Jakub Jelinek <jakub@redhat.com>
5265 Aldy Hernandez <aldyh@redhat.com>
5266
5267 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5268 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5269 (c_define_builtins): Likewise.
5270 * c-common.h (enum c_omp_clause_split): Add
5271 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5272 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5273 (c_finish_omp_for): Add ORIG_DECLV argument.
5274 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5275 201511 instead of 201307.
5276 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5277 OMP_CRITICAL_CLAUSES to it.
5278 (c_finish_omp_ordered): Add CLAUSES argument, set
5279 OMP_ORDERED_CLAUSES to it.
5280 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5281 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5282 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5283 constructs and new OpenMP 4.5 clauses. Clear
5284 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5285 verification code.
5286 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5287 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5288 (enum pragma_omp_clause): Add
5289 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5290 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5291
624d31fe
RS
52922015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5293
5294 * c-lex.c (interpret_float): Use real_equal instead of
5295 REAL_VALUES_EQUAL.
5296
b8fd7909
JM
52972015-10-04 Jason Merrill <jason@redhat.com>
5298
5299 Implement N4514, C++ Extensions for Transactional Memory.
5300 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5301 (c_common_attribute_table): Add transaction_safe_dynamic.
5302 transaction_safe now affects type identity.
5303 (handle_tm_attribute): Handle transaction_safe_dynamic.
5304 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5305 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5306 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5307 (D_TRANSMEM): New.
5308 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5309 * c-pretty-print.c (pp_c_attributes_display): Don't print
5310 transaction_safe in C++.
5311
12651878
MP
53122015-10-02 Marek Polacek <polacek@redhat.com>
5313
5314 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5315
3e3b8d63
MP
53162015-10-02 Marek Polacek <polacek@redhat.com>
5317
5318 PR c/64249
5319 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5320 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5321 * c.opt (Wduplicated-cond): New option.
5322
0d1a8f75
JM
53232015-10-01 Joseph Myers <joseph@codesourcery.com>
5324
5325 * c.opt (std=c11): Do not describe as experimental.
5326 (std=gnu11): Likewise.
5327 (std=iso9899:2011): Likewise.
5328
3e32ee19
NS
53292015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5330
5331 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5332 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5333
974348ee
MP
53342015-09-25 Marek Polacek <polacek@redhat.com>
5335
5336 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5337 (ubsan_instrument_shift): Likewise.
5338
15dbc1a6
MP
53392015-09-25 Marek Polacek <polacek@redhat.com>
5340
5341 PR sanitizer/64906
5342 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5343
6b95d7cc
PP
53442015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5345
5346 * c-indentation.c (should_warn_for_misleading_indentation):
5347 Compare next_stmt_vis_column with guard_line_first_nws instead
5348 of with guard_line_vis_column.
5349
c1822f9c
MLI
53502015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5351
5352 PR c/49654
5353 PR c/49655
5354 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5355 options and options not valid for the current language.
5356
d5398058
PP
53572015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5358
5359 * c-indentation.c (should_warn_for_misleading_indentation):
5360 Float out and consolidate the calls to get_visual_column that
5361 are passed guard_exploc as an argument. Compare
5362 next_stmt_vis_column with guard_line_first_nws instead of with
5363 body_line_first_nws.
5364
6b333269
NS
53652015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5366
5367 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5368 Wnamespaces): New C++ warnings.
5369
a75f1574
JM
53702015-09-22 Jason Merrill <jason@redhat.com>
5371
5372 * c-common.h (abi_compat_version_crosses): New.
5373 (warn_abi_version): Declare.
5374 * c-common.c: Define it.
5375 * c-opts.c (c_common_post_options): Handle it.
5376 flag_abi_compat_version defaults to 8.
5377
bdaaa8b7
VV
53782015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5379
5380 Complete the implementation of N4230, Nested namespace definition.
5381 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5382 __cpp_nested_namespace_definitions.
5383
eaa797e8
MLI
53842015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5385
5386 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5387
c4914de6
MLI
53882015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5389
5390 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5391 when warning.
5392 * c-pragma.h (pragma_lex): Add optional loc argument.
5393
fcb87c50
MM
53942015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5395
5396 * c-format.c (check_format_arg): Adjust to use common block size in all
5397 object pools.
5398
31bdd08a
DM
53992015-09-15 David Malcolm <dmalcolm@redhat.com>
5400
5401 * c-format.c (location_from_offset): Update for change in
5402 signature of location_get_source_line.
5403 * c-indentation.c (get_visual_column): Likewise.
5404 (line_contains_hash_if): Likewise.
5405
aa9f4b4c
MP
54062015-09-14 Marek Polacek <polacek@redhat.com>
5407
5408 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5409 setting various warnings.
5410
aa256c4a
MP
54112015-09-14 Marek Polacek <polacek@redhat.com>
5412
5413 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5414 a negative value.
5415
0f876f22
MW
54162015-09-11 Mark Wielaard <mjw@redhat.com>
5417
5418 PR c/28901
5419 * c.opt (Wunused-variable): Option from common.opt.
5420 (Wunused-const-variable): New option.
5421
273aa49e
PC
54222015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5423
5424 PR c++/53184
5425 * c.opt ([Wsubobject-linkage]): Add.
5426
1807ffc1
MS
54272015-09-03 Martin Sebor <msebor@redhat.com>
5428
5429 PR c/66516
5430 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5431 functions.
5432 * c-common.c (reject_gcc_builtin): Define.
5433
38942840
BI
54342015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5435
5436 PR middle-end/60586
5437 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5438 prototype.
5439 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5440 cilk_gimplify_call_params_in_spawned_fn.
5441 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5442 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5443 unwrapping.
5444
c316b5e4
MP
54452015-08-25 Marek Polacek <polacek@redhat.com>
5446
5447 PR middle-end/67330
5448 * c-common.c (handle_weak_attribute): Don't check whether the
5449 visibility can be changed here.
5450
584a7c46
MLI
54512015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5452
5453 * c-lex.c (c_lex_with_flags): Use explicit locations.
5454
a79683d5
TS
54552015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5456
5457 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5458 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5459
61717a45
FXC
54602015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5461
5462 PR middle-end/36757
5463 * c-common.c (check_builtin_function_arguments): Add check
5464 for BUILT_IN_SIGNBIT argument.
5465
329524f5
PC
54662015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5467
5468 PR c++/67160
5469 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5470 in c++1z mode.
5471
4ee55665
MP
54722015-08-17 Marek Polacek <polacek@redhat.com>
5473
5474 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5475 with whitespaces before qualifier names.
5476
b893e375
MP
54772015-08-12 Marek Polacek <polacek@redhat.com>
5478
5479 PR c++/55095
5480 * c-common.c (maybe_warn_shift_overflow): Properly handle
5481 left-shifting 1 into the sign bit.
5482
c2d89095
MLI
54832015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5484
5485 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5486
971e17ff
AS
54872015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5488 Braden Obrzut <admin@maniacsvault.net>
5489 Jason Merrill <jason@redhat.com>
5490
5491 Add C++ Concepts TS support.
5492 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5493 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5494 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5495 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5496 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5497 * c.opt (fconcepts): New.
5498
b3d5bc62
JJ
54992015-08-02 Martin Sebor <msebor@redhat.com>
5500
5501 * c.opt (-Wframe-address): New warning option.
5502
8ebca419
PP
55032015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5504
5505 * c-indentation.c (should_warn_for_misleading_indentation):
5506 Improve heuristics.
5507
1a1e101f
PP
55082015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5509
5510 * c-indentation.c (get_visual_column): Add parameter first_nws,
5511 use it. Update comment documenting the function.
5512 (is_first_nonwhitespace_on_line): Remove.
5513 (should_warn_for_misleading_indentation): Replace usage of
5514 of is_first_nonwhitespace_on_line with get_visual_column.
5515
992118a1
PP
55162015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5517
5518 * c-indentation.h (struct token_indent_info): Define.
5519 (get_token_indent_info): Define.
5520 (warn_for_misleading_information): Declare.
5521 * c-common.h (warn_for_misleading_information): Remove.
5522 * c-identation.c (warn_for_misleading_indentation):
5523 Change declaration to take three token_indent_infos. Adjust
5524 accordingly.
5525 * c-identation.c (should_warn_for_misleading_indentation):
5526 Likewise. Bail out early if the body is a compound statement.
5527 (guard_tinfo_to_string): Define.
5528
e8fa3817
JM
55292015-07-30 Jason Merrill <jason@redhat.com>
5530
5531 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5532 '*' for reference decay.
5533
173864e8
MP
55342015-07-30 Marek Polacek <polacek@redhat.com>
5535
5536 * c-common.c (warn_tautological_cmp): Bail for float types.
5537
f2afe6dd
MP
55382015-07-27 Marek Polacek <polacek@redhat.com>
5539
5540 PR bootstrap/67030
5541 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5542
05b28fd6
MP
55432015-07-27 Marek Polacek <polacek@redhat.com>
5544
5545 PR c++/66555
5546 PR c/54979
5547 * c-common.c (find_array_ref_with_const_idx_r): New function.
5548 (warn_tautological_cmp): New function.
5549 * c-common.h (warn_tautological_cmp): Declare.
5550 * c.opt (Wtautological-compare): New option.
5551
5a5062b8
MP
55522015-07-23 Marek Polacek <polacek@redhat.com>
5553
5554 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5555 (ubsan_instrument_shift): Likewise.
5556
dc891fe7
MP
55572015-07-23 Marek Polacek <polacek@redhat.com>
5558
5559 PR sanitizer/66908
5560 * c-ubsan.c: Include gimplify.h.
5561 (ubsan_instrument_division): Unshare OP0 and OP1.
5562 (ubsan_instrument_shift): Likewise.
5563
451b5e48
MP
55642015-07-20 Marek Polacek <polacek@redhat.com>
5565 Richard Sandiford <richard.sandiford@arm.com>
5566
5567 PR c++/55095
5568 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5569 Use EXPR_LOC_OR_LOC.
5570 (maybe_warn_shift_overflow): New function.
5571 * c-common.h (maybe_warn_shift_overflow): Declare.
5572 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5573 * c.opt (Wshift-overflow): New option.
5574
fb0b2914
ML
55752015-07-16 Martin Liska <mliska@suse.cz>
5576
5577 * c-format.c (static void check_format_info_main): Use
5578 object_allocator instead of pool_allocator.
5579 (check_format_arg): Likewise.
5580 (check_format_info_main): Likewise.
5581
903f5c23
AM
55822015-07-15 Andrew MacLeod <amacleod@redhat.com>
5583
5584 * c-opts.c: Remove multiline #include comment.
5585
026c3cfd
AH
55862015-07-12 Aldy Hernandez <aldyh@redhat.com>
5587
5588 * c-common.c: Fix double word typos.
5589
bb49ee66
EB
55902015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5591
5592 * c-ada-spec.h (cpp_operation): Revert latest change.
5593 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5594 constructors and destructors.
5595
1916bcb5
AM
55962015-07-09 Andrew MacLeod <amacleod@redhat.com>
5597
5598 * c-common.h: Adjust includes for flags.h changes.
5599 * stub-objc.c: Likewise.
026c3cfd 5600
a9dcd529
EB
56012015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5602
5603 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5604 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5605
b03b462f
JJ
56062015-07-08 Jakub Jelinek <jakub@redhat.com>
5607
5608 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5609 are to be removed, return NULL rather than original clauses list.
5610
c7131fb2
AM
56112015-07-07 Andrew MacLeod <amacleod@redhat.com>
5612
5613 * array-notation-common.c: Adjust includes.
5614 * c-ada-spec.c: Likewise.
5615 * c-cilkplus.c: Likewise.
5616 * c-common.h: Likewise.
5617 * c-cppbuiltin.c: Likewise.
5618 * c-dump.c: Likewise.
5619 * c-format.c: Likewise.
5620 * c-gimplify.c: Likewise.
5621 * c-indentation.c: Likewise.
5622 * c-lex.c: Likewise.
5623 * c-omp.c: Likewise.
5624 * c-opts.c: Likewise.
5625 * c-pch.c: Likewise.
5626 * c-ppoutput.c: Likewise.
5627 * c-pragma.c: Likewise.
5628 * c-pretty-print.c: Likewise.
5629 * c-semantics.c: Likewise.
5630 * c-ubsan.c: Likewise.
5631 * cilk.c: Likewise.
5632 * stub-objc.c: Likewise.
5633
2a7fb83f
EB
56342015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5635
5636 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5637 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5638
a03c9bf1
JM
56392015-07-01 Jason Merrill <jason@redhat.com>
5640
36a85135
JM
5641 * c-common.h (D_CXX11): Rename from D_CXX0X.
5642 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5643 * c-common.c: Adjust.
5644
e7fa68d5
JM
5645 * c-opts.c (c_common_post_options): Default to C++14.
5646
a03c9bf1
JM
5647 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5648
fe95b036
ESR
56492015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5650
5651 Implement N4197 - Adding u8 character literals
b3d5bc62 5652 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5653 CPP_CHAR.
b3d5bc62 5654 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5655 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5656 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5657 and CPP_UTF8CHAR tokens.
5658 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5659
da2e71c9
MLI
56602015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5661
5662 PR fortran/66605
5663 * c-common.c (do_warn_unused_parameter): Move here.
5664 * c-common.h (do_warn_unused_parameter): Declare.
5665
b155cfd9
MP
56662015-06-29 Marek Polacek <polacek@redhat.com>
5667
5668 PR c/66322
5669 * c-common.c (check_case_bounds): Add bool * parameter. Set
5670 OUTSIDE_RANGE_P.
5671 (c_add_case_label): Add bool * parameter. Pass it down to
5672 check_case_bounds.
5673 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5674 warning here.
5675 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5676 declarations.
5677
31521951
MP
56782015-06-27 Marek Polacek <polacek@redhat.com>
5679
5680 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5681 or VECTOR_INTEGER_TYPE_P throughout.
5682 * c-gimplify.c: Likewise.
5683
22d03525
MP
56842015-06-26 Marek Polacek <polacek@redhat.com>
5685
5686 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5687 * c-common.c (c_fully_fold_internal): Likewise.
5688 (c_alignof_expr): Likewise.
5689 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5690 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5691 * cilk.c (create_parm_list): Likewise.
22d03525 5692
af05e6e5
MP
56932015-06-26 Marek Polacek <polacek@redhat.com>
5694
5695 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5696
f0889939
AM
56972015-06-25 Andrew MacLeod <amacleod@redhat.com>
5698
5699 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5700 * c-gimplify.c: Likewise.
5701 * c-pragma.c: Likewise.
5702 * c-ubsan.c: Likewise.
5703 * cilk.c: Likewise.
5704
ca752f39
RS
57052015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5706
5707 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5708 ggc_hasher.
5709
16a16ec7
AM
57102015-06-25 Andrew MacLeod <amacleod@redhat.com>
5711
5712 * cilk.c: Move calls.h after tm.h in the include chain.
5713
0ae9bd27
MP
57142015-06-25 Marek Polacek <polacek@redhat.com>
5715
5716 * array-notation-common.c: Use VAR_P throughout.
5717 * c-ada-spec.c: Likewise.
5718 * c-common.c: Likewise.
5719 * c-format.c: Likewise.
5720 * c-gimplify.c: Likewise.
5721 * c-omp.c: Likewise.
5722 * c-pragma.c: Likewise.
5723 * c-pretty-print.c: Likewise.
5724 * cilk.c: Likewise.
5725
62f9079a
MP
57262015-06-25 Marek Polacek <polacek@redhat.com>
5727
5728 * cilk.c (extract_free_variables): Use is_global_var.
5729
0fa16060
RS
57302015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5731
5732 * c-common.c: Don't include target-def.h.
5733
a68ae2e1
MP
57342015-06-23 Marek Polacek <polacek@redhat.com>
5735
5736 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5737 when comparing INTEGER_CSTs.
5738
c6a2f2d9
PMR
57392015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5740
5741 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5742 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5743 (dump_ada_template): Skip partially specialized types.
5744
6b4db501
MM
57452015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5746
5747 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5748 swapping.
5749
abb226c9
AM
57502015-06-17 Andrew MacLeod <amacleod@redhat.com>
5751
5752 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5753 * c-ada-spec.c: Likewise.
5754 * c-cilkplus.c: Likewise.
5755 * c-common.c: Likewise.
5756 * c-common.h: Likewise.
5757 * c-cppbuiltin.c: Likewise.
5758 * c-dump.c: Likewise.
5759 * c-format.c: Likewise.
5760 * c-gimplify.c: Likewise.
5761 * c-indentation.c: Likewise.
5762 * c-lex.c: Likewise.
5763 * c-omp.c: Likewise.
5764 * c-opts.c: Likewise.
5765 * c-pch.c: Likewise.
5766 * c-ppoutput.c: Likewise.
5767 * c-pragma.c: Likewise.
5768 * c-pretty-print.c: Likewise.
5769 * c-semantics.c: Likewise.
5770 * c-ubsan.c: Likewise.
5771 * cilk.c: Likewise.
5772 * stub-objc.c: Likewise.
5773
076fecad
PP
57742015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5775
5776 PR c++/65168
5777 * c-common.c (c_common_truthvalue_conversion): Warn when
5778 converting an address of a reference to a truth value.
5779
13fdf2e2
AM
57802015-06-08 Andrew MacLeod <amacleod@redhat.com>
5781
5782 * array-notation-common.c : Adjust include files.
5783 * c-ada-spec.c : Likewise.
5784 * c-cilkplus.c : Likewise.
5785 * c-common.c : Likewise.
5786 * c-common.h : Likewise.
5787 * c-cppbuiltin.c : Likewise.
5788 * c-dump.c : Likewise.
5789 * c-format.c : Likewise.
5790 * c-gimplify.c : Likewise.
5791 * c-indentation.c : Likewise.
5792 * c-lex.c : Likewise.
5793 * c-omp.c : Likewise.
5794 * c-opts.c : Likewise.
5795 * c-pch.c : Likewise.
5796 * c-ppoutput.c : Likewise.
5797 * c-pragma.c : Likewise.
5798 * c-pretty-print.c : Likewise.
5799 * c-semantics.c : Likewise.
5800 * c-ubsan.c : Likewise.
5801 * cilk.c : Likewise.
5802 * stub-objc.c : Likewise.
5803
a1661b90
MP
58042015-06-08 Marek Polacek <polacek@redhat.com>
5805
5806 PR c/66415
5807 * c-format.c (location_from_offset): Return LOC if LINE is null.
5808
d7438551
AH
58092015-06-05 Aldy Hernandez <aldyh@redhat.com>
5810
5811 * c-common.h (c_parse_final_cleanups): New prototype.
5812 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5813
b3d5bc62
JJ
58142015-06-04 Sriraman Tallam <tmsriram@google.com>
5815
5816 * c-common.c (noplt): New attribute.
5817 (handle_noplt_attribute): New handler.
5818
ecb9f223
AM
58192015-06-04 Andrew MacLeod <amacleod@redhat.com>
5820
5821 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5822 * c-ada-spec.c: Likewise.
5823 * c-cilkplus.c: Likewise.
5824 * c-common.c: Likewise.
5825 * c-common.h: Likewise.
5826 * c-cppbuiltin.c: Likewise.
5827 * c-dump.c: Likewise.
5828 * c-format.c: Likewise.
5829 * c-gimplify.c: Likewise.
5830 * c-indentation.c: Likewise.
5831 * c-lex.c: Likewise.
5832 * c-omp.c: Likewise.
5833 * c-opts.c: Likewise.
5834 * c-pch.c: Likewise.
5835 * c-ppoutput.c: Likewise.
5836 * c-pragma.c: Likewise.
5837 * c-pretty-print.c: Likewise.
5838 * c-semantics.c: Likewise.
5839 * c-ubsan.c: Likewise.
5840 * cilk.c: Likewise.
5841 * stub-objc.c: Likewise.
5842
6ac48155
DM
58432015-06-02 David Malcolm <dmalcolm@redhat.com>
5844
5845 PR c/66220:
5846 * c-indentation.c (should_warn_for_misleading_indentation): Use
5847 expand_location rather than expand_location_to_spelling_point.
5848 Don't warn if the guarding statement is more indented than the
5849 next/body stmts.
5850
773ce42e
DM
58512015-06-02 David Malcolm <dmalcolm@redhat.com>
5852
5853 * c-indentation.c (warn_for_misleading_indentation): Bail out
5854 immediately if -Wmisleading-indentation isn't enabled.
5855
4fef8379
ML
58562015-06-01 Martin Liska <mliska@suse.cz>
5857
5858 * c-format.c (check_format_arg):Use new type-based pool allocator.
5859 (check_format_info_main) Likewise.
5860
1edfb384
EB
58612015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5862
5863 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5864 (has_nontrivial_methods): Likewise.
5865
9677ef52
MP
58662015-05-25 Marek Polacek <polacek@redhat.com>
5867
5868 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5869
fd5c817a
MP
58702015-05-22 Marek Polacek <polacek@redhat.com>
5871
5872 PR c/47043
5873 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5874
a2f45fe6 58752015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5876
5877 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5878 STACK_GROWS_DOWNWARD.
5879
a2f45fe6 58802015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5881
5882 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5883 STACK_GROWS_DOWNWARD rather than if it is defined.
5884
0fee2ac2 58852015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5886
0fee2ac2
MLI
5887 PR c/52952
5888 * c-format.c (location_column_from_byte_offset): New.
5889 (location_from_offset): New.
5890 (struct format_wanted_type): Add offset_loc field.
5891 (check_format_info): Move handling of location for extra arguments
5892 closer to the point of warning.
5893 (check_format_info_main): Pass the result of location_from_offset
5894 to warning_at.
5895 (format_type_warning): Pass the result of location_from_offset
5896 to warning_at.
5897
cf4ef6f7
MP
58982015-05-20 Marek Polacek <polacek@redhat.com>
5899
5900 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5901
3a65ee74
MP
59022015-05-20 Marek Polacek <polacek@redhat.com>
5903
5904 * c-ada-spec.c (dump_sloc): Use DECL_P.
5905
21b634ae
MP
59062015-05-20 Marek Polacek <polacek@redhat.com>
5907
5908 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5909 * c-common.c: Likewise.
5910
0e50b624
DM
59112015-05-19 David Malcolm <dmalcolm@redhat.com>
5912
5913 * c-common.h (fe_file_change): Strengthen param from
5914 const line_map * to const line_map_ordinary *.
5915 (pp_file_change): Likewise.
5916 * c-lex.c (fe_file_change): Likewise.
5917 (cb_define): Use linemap_check_ordinary when invoking
5918 SOURCE_LINE.
5919 (cb_undef): Likewise.
5920 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5921 invoking cb_file_change.
5922 (c_finish_options): Likewise.
5923 (push_command_line_include): Likewise.
5924 (cb_file_change): Strengthen param "new_map" from
5925 const line_map * to const line_map_ordinary *.
5926 * c-ppoutput.c (cb_define): Likewise for local "map".
5927 (pp_file_change): Likewise for param "map" and local "from".
5928
fab27f52
MM
59292015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5930
5931 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5932
2fe1d762
TV
59332015-05-18 Tom de Vries <tom@codesourcery.com>
5934
5935 * c-common.c (build_va_arg_1): New function.
5936 (build_va_arg): Add address operator to va_list operand if necessary.
5937
7a37fa90
MM
59382015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5939
5940 PR c/48956
5941 * c-common.c (int_safely_convertible_to_real_p): Define.
5942 (unsafe_conversion_p): Check conversions involving complex types.
5943 (conversion_warning): Add new warning message for conversions which
5944 discard imaginary component.
5945 * c-common.h: (enum conversion_safety): Add new enumerator for such
5946 conversions.
5947
3aa3c9fc
MP
59482015-05-14 Marek Polacek <polacek@redhat.com>
5949
5950 PR c/66066
5951 PR c/66127
5952 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5953 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5954 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5955 use it. If FOR_INT_CONST, require that all evaluated operands be
5956 INTEGER_CSTs.
5957
c3388e62
DM
59582015-05-12 David Malcolm <dmalcolm@redhat.com>
5959
5960 * c-common.h (warn_for_misleading_indentation): New prototype.
5961 * c-indentation.c: New file.
5962 * c.opt (Wmisleading-indentation): New option.
5963
c7b38fd5
TV
59642015-05-12 Tom de Vries <tom@codesourcery.com>
5965
5966 PR tree-optimization/66010
5967 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5968
381bf11e
JM
59692015-05-09 Jason Merrill <jason@redhat.com>
5970
edff0c06
JM
5971 * c-opts.c (c_common_post_options): Also clear
5972 cpp_opts->cpp_warn_cxx11_compat.
5973
129211bc
JM
5974 * c-common.h (enum cxx_dialect): Add cxx_unset.
5975 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5976 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5977
381bf11e
JM
5978 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5979 (std=gnu++0x): Mark as Undocumented.
5980 (std=gnu++1y): Add deprecated message.
5981
fe191308
JM
59822015-05-08 Jason Merrill <jason@redhat.com>
5983
765189ff
JM
5984 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5985 * c-opts.c: Adjust.
5986
fe191308
JM
5987 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5988
755e528f
MP
59892015-05-08 Marek Polacek <polacek@redhat.com>
5990
5991 PR c/64918
5992 * c.opt (Woverride-init-side-effects): New option.
5993
0173bd2a
MP
59942015-05-07 Marek Polacek <polacek@redhat.com>
5995
5996 PR c/65179
5997 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5998 negative value.
5999 * c.opt (Wshift-negative-value): New option.
6000 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
6001 when -Wextra and C99/C++11 mode.
6002
e0f0d3b9
MP
60032015-05-07 Marek Polacek <polacek@redhat.com>
6004 Martin Uecker <uecker@eecs.berkeley.edu>
6005
6006 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
6007 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
6008
8243e2a9
JM
60092015-05-05 Jason Merrill <jason@redhat.com>
6010
6011 * c.opt (Wterminate): New.
6012
577cd070
MP
60132015-04-30 Marek Polacek <polacek@redhat.com>
6014
6015 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
6016 require that the non-constant be of a boolean type.
6017
0373796b
JT
60182015-04-29 Josh Triplett <josh@joshtriplett.org>
6019
e0f0d3b9
MP
6020 * c-common.c (handle_section_attribute): Refactor to reduce
6021 nesting and distinguish between error cases.
0373796b 6022
716c0ba6
MP
60232015-04-29 Marek Polacek <polacek@redhat.com>
6024
6025 PR c/64610
6026 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
6027 with 0/1.
6028
8848828b
JJ
60292015-04-29 Jakub Jelinek <jakub@redhat.com>
6030
6031 * c-common.h (omp_clause_mask): Unconditionally define as a class.
6032 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
6033 HOST_BITS_PER_WIDE_INT.
6034
ecd0e562
TV
60352015-04-28 Tom de Vries <tom@codesourcery.com>
6036
6037 PR tree-optimization/65887
6038 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
6039
2a877204 60402015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 6041 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
6042
6043 * c-ada-spec.c (in_function): Delete.
6044 (dump_generic_ada_node): Do not change in_function and remove the
6045 redundant code dealing with it.
6046 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
6047 (print_ada_methods): Output the static member functions in a nested
6048 package after the regular methods as well as associated renamings.
6049
4853031e
MP
60502015-04-24 Marek Polacek <polacek@redhat.com>
6051
6052 PR c/65830
6053 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
6054 and OPT_Wshift_count_overflow.
6055
8c2b7f79
MP
6056 PR c/63357
6057 * c-common.c (warn_logical_operator): Warn if the operands have the
6058 same expressions.
6059
b8787813
MP
60602015-04-24 Marek Polacek <polacek@redhat.com>
6061
6062 PR c/61534
6063 * c-common.c (warn_logical_operator): Bail if either operand comes
6064 from a macro expansion.
6065
8fba1830
BRF
60662015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
6067
6068 PR target/55143
6069 * c-common.c (c_default_pointer_mode): Add definition.
6070 * c-common.h (c_default_pointer_mode): Add declaration.
6071
17958621
JJ
60722015-03-11 Jakub Jelinek <jakub@redhat.com>
6073
6074 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
6075 on record_builtin_type argument.
6076
7ccb1a11
JJ
60772015-03-10 Jakub Jelinek <jakub@redhat.com>
6078
6079 PR c/65120
6080 * c-common.c (warn_logical_not_parentheses): Don't warn for
6081 !x == 0 or !x != 0.
6082
04fd785e
MP
60832015-03-07 Marek Polacek <polacek@redhat.com>
6084
6085 PR sanitizer/65280
6086 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
6087 before trying to figure out whether we have a flexible array member.
6088
a4e26206 60892015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 6090 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
6091
6092 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
6093
0d2489f4
EB
60942015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6095
6096 PR ada/65319
6097 * c-ada-spec.c (print_destructor): Remove obsolete code.
6098
83ed54d7
EB
60992015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6100
6101 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6102 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6103 DECL_TEMPLATE_RESULT emulations.
6104 (dump_ada_template)): Add guard for TYPE_METHODS.
6105
7631f0e2
MP
61062015-02-27 Marek Polacek <polacek@redhat.com>
6107
6108 PR c/65040
6109 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6110
d1783ae5
KT
61112015-02-27 Kai Tietz <ktietz@redhat.com>
6112
6113 PR c/35330
6114 * c-pragma.c (handle_pragma_weak): Do not try to create
6115 weak/alias of declarations not being function, or variable
6116 declarations.
6117
56a9f6bc
TS
61182015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6119
6120 PR libgomp/64625
6121 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6122 Remove macros.
6123 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6124
3d5cb23d
MP
61252015-02-16 Marek Polacek <polacek@redhat.com>
6126
6127 PR c/65066
6128 * c-format.c (check_format_types): Handle null param.
6129
fa008882
MP
61302015-02-13 Marek Polacek <polacek@redhat.com>
6131
6132 PR c/65040
6133 * c-format.c (check_format_types): Don't warn about different
6134 signedness if the original value is in the range of WANTED_TYPE.
6135
785f21af
JM
61362015-02-12 Jason Merrill <jason@redhat.com>
6137
6138 PR c++/64956
6139 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6140 to the current highest version.
6141 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6142
4886ec8e
JJ
61432015-02-04 Jakub Jelinek <jakub@redhat.com>
6144
6145 PR c/64824
6146 PR c/64868
6147 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6148 instead of RDIV_EXPR. Use build_binary_op instead of
6149 build2_loc.
6150
40fecdd6
JM
61512015-01-30 Joseph Myers <joseph@codesourcery.com>
6152
6153 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6154 to pass input_location as first argument.
6155
a0c88d06
TV
61562015-01-23 Tom de Vries <tom@codesourcery.com>
6157
6158 PR libgomp/64672
6159 * c.opt (fopenacc): Mark as LTO option.
6160
1506ae0e
TV
61612015-01-23 Tom de Vries <tom@codesourcery.com>
6162
6163 PR libgomp/64707
6164 * c.opt (fopenmp): Mark as LTO option.
6165
31be63ab
JJ
61662015-01-21 Jakub Jelinek <jakub@redhat.com>
6167
6168 PR c/63307
b1726d6c 6169 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6170 (compare_decls): Fix up formatting.
6171
61722015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6173
6174 PR c/63307
6175 * cilk.c: Include vec.h.
6176 (struct cilk_decls): New structure.
6177 (wrapper_parm_cb): Split this function to...
6178 (fill_decls_vec): ...this...
6179 (create_parm_list): ...and this.
6180 (compare_decls): New function.
6181 (for_local_cb): Remove.
6182 (wrapper_local_cb): Ditto.
6183 (build_wrapper_type): For now first traverse and fill vector of
6184 declarations then sort it and then deal with sorted vector.
6185 (cilk_outline): Ditto.
6186 (declare_one_free_variable): Ditto.
6187
6875457f
JM
61882015-01-21 Jason Merrill <jason@redhat.com>
6189
6190 PR c++/64629
6191 * c-format.c (check_format_arg): Call decl_constant_value.
6192
185c9e56
ML
61932015-01-19 Martin Liska <mliska@suse.cz>
6194
6195 * c-common.c (handle_noicf_attribute): New function.
6196
41dbbb37
TS
61972015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6198 Bernd Schmidt <bernds@codesourcery.com>
6199 James Norris <jnorris@codesourcery.com>
6200 Cesar Philippidis <cesar@codesourcery.com>
6201 Ilmir Usmanov <i.usmanov@samsung.com>
6202 Jakub Jelinek <jakub@redhat.com>
6203
6204 * c.opt (fopenacc): New option.
6205 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6206 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6207 New macros.
6208 * c-common.h (c_finish_oacc_wait): New prototype.
6209 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6210 (c_finish_oacc_wait): New function.
6211 * c-pragma.c (oacc_pragmas): New variable.
6212 (c_pp_lookup_pragma, init_pragma): Handle it.
6213 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6214 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6215 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6216 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6217 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6218 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6219 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6220 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6221 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6222 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6223 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6224 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6225 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6226 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6227 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6228 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6229 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6230 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6231 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6232 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6233 PRAGMA_OACC_CLAUSE_WORKER.
6234
3f8257db 62352015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6236
6237 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6238 for the new option fstack-protector_explicit.
6239 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6240 (handle_stack_protect_attribute): New function.
6241
3f8257db 62422015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6243
6244 * c.opt: New option -Warray-bounds=.
6245
adfac8df
JJ
62462015-01-09 Michael Collison <michael.collison@linaro.org>
6247
6248 * array-notation-common.c: Include hash-set.h, machmode.h,
6249 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6250 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6251 * c-ada-spec.c: Ditto.
6252 * c-cilkplus.c: Ditto.
6253 * c-common.c: Include input.h due to flattening of tree.h.
6254 Define macro GCC_C_COMMON_C.
6255 * c-common.h: Flatten tree.h header files into c-common.h.
6256 Remove include of tree-core.h.
6257 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6258 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6259 fold-const.h, wide-int.h, and inchash.h due to
6260 flattening of tree.h.
6261 * c-dump.c: Ditto.
6262 * c-format.c: Flatten tree.h header files into c-common.h.
6263 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6264 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6265 fold-const.h, wide-int.h, and inchash.h due to
6266 flattening of tree.h.
6267 * c-dump.c: Include hash-set.h, machmode.h,
6268 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6269 fold-const.h, wide-int.h, and inchash.h due to
6270 flattening of tree.h.
6271 * c-format.c: Include hash-set.h, machmode.h,
6272 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6273 fold-const.h, wide-int.h, inchash.h and real.h due to
6274 flattening of tree.h.
6275 * c-gimplify.c: Include hash-set.h, machmode.h,
6276 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6277 fold-const.h, wide-int.h, and inchash.h due to
6278 flattening of tree.h.
6279 * cilk.c: Ditto.
6280 * c-lex.c: Ditto.
6281 * c-omp.c: Ditto.
6282 * c-opts.c: Ditto.
6283 * c-pch.c: Ditto.
6284 * c-ppoutput.c: Ditto.
6285 * c-pragma.c: Ditto.
6286 * c-pretty-print.c: Ditto.
6287 * c-semantics.c: Ditto.
6288 * c-ubsan.c: Ditto.
6289 * stub-objc.c: Ditto.
6290
f5481fc4
JM
62912015-01-08 Jason Merrill <jason@redhat.com>
6292
6293 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6294 do_ubsan_in_current_function.
6295 (ubsan_maybe_instrument_reference_or_call): Likewise.
6296 * c-ubsan.h: Declare it.
6297
de35aa66
MS
62982015-01-08 Mike Stump <mikestump@comcast.net>
6299
6300 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6301
4a9a42ab
MP
63022015-01-07 Marek Polacek <polacek@redhat.com>
6303
6304 PR c/64440
6305 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6306 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6307
2f42e5de
TS
63082015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6309
6310 PR c++/31397
6311 * c.opt (Wsuggest-override): New option.
6312
5624e564
JJ
63132015-01-05 Jakub Jelinek <jakub@redhat.com>
6314
6315 Update copyright years.
6316
5bd012f8
MP
63172015-01-05 Marek Polacek <polacek@redhat.com>
6318
6319 PR c/64423
6320 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6321 parameter. Use it.
6322 * c-common.h (warn_array_subscript_with_type_char): Update
6323 declaration.
6324
a7fa8d18
ESR
63252014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6326
6327 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6328 Control macro with flag_sized_deallocation.
6329
3f8257db 63302014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6331
6332 * c.opt (Wdiscarded-array-qualifiers): New option.
6333
1f8d3e84
JJ
63342014-12-19 Jakub Jelinek <jakub@redhat.com>
6335
6336 PR preprocessor/63831
6337 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6338 and __has_cpp_attribute here.
6339 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6340 c_common_has_attribute.
6341 * c-common.h (c_common_has_attribute): New prototype.
6342 * c-lex.c (init_c_lex): Set cb->has_attribute to
6343 c_common_has_attribute instead of cb_has_attribute.
6344 (get_token_no_padding): New function.
6345 (cb_has_attribute): Renamed to ...
6346 (c_common_has_attribute): ... this. No longer static. Use
6347 get_token_no_padding, require ()s, don't build TREE_LIST
6348 unnecessarily, fix up formatting, adjust diagnostics, call
6349 init_attributes.
6350
20b06add
JM
63512014-12-15 Jason Merrill <jason@redhat.com>
6352
6353 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6354 (-Wsized-deallocation): New.
6355 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6356 to on in C++14 and up.
6357
94a073b2
JM
63582014-12-11 Jason Merrill <jason@redhat.com>
6359
acaa5911
JM
6360 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6361
94a073b2
JM
6362 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6363 we aren't complaining about VLAs.
6364
7fb66c15
MP
63652014-12-06 Marek Polacek <polacek@redhat.com>
6366
6367 PR tree-optimization/64183
6368 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6369 shift-expression if it is integer_type_node. Use types_compatible_p.
6370
b731b390
JJ
63712014-11-29 Jakub Jelinek <jakub@redhat.com>
6372
6373 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6374 last argument from create_tmp_var_raw and create_tmp_var calls.
6375 * cilk.c (gimplify_cilk_spawn): Likewise.
6376 * c-omp.c (c_finish_omp_atomic): Likewise.
6377
6a4da643
MP
63782014-11-28 Marek Polacek <polacek@redhat.com>
6379
6380 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6381 instead of unsigned_type_node.
6382
541e35a6
MP
63832014-11-28 Marek Polacek <polacek@redhat.com>
6384
6385 PR c/63862
6386 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6387 to op1_utype.
6388 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6389 expression to unsigned_type_node.
6390
dcc97066
MW
63912014-11-20 Mark Wielaard <mjw@redhat.com>
6392
6393 PR debug/38757
6394 * c-opts.c (set_std_c89): Set lang_hooks.name.
6395 (set_std_c99): Likewise.
6396 (set_std_c11): Likewise.
6397 (set_std_cxx98): Likewise.
6398 (set_std_cxx11): Likewise.
6399 (set_std_cxx14): Likewise.
6400 (set_std_cxx1z): Likewise.
6401
aa7da51a
JJ
64022014-11-21 Jakub Jelinek <jakub@redhat.com>
6403
6404 PR target/63764
6405 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6406 return type to bool.
009a3480 6407 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6408 (convert_vector_to_pointer_for_subscript): Change return type to
6409 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6410 and copy it into a TARGET_EXPR and use that instead of *vecp
6411 directly.
6412
538dd0b7
DM
64132014-11-19 David Malcolm <dmalcolm@redhat.com>
6414
6415 Merger of git branch "gimple-classes-v2-option-3".
6416 * ChangeLog.gimple-classes: New.
6417 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6418 from being just a vec<gimple> to a vec<gbind *>.
6419
c39a5e99
JJ
64202014-11-18 Jakub Jelinek <jakub@redhat.com>
6421
6422 PR sanitizer/63813
6423 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6424 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6425 get_pointer_alignment for non-pointers. Use ptype, or if it is
6426 reference type, corresponding pointer type, as type of kind
6427 argument.
6428 (ubsan_maybe_instrument_reference,
6429 ubsan_maybe_instrument_member_call): Adjust callers.
6430
8537a4a9
MP
64312014-11-15 Marek Polacek <polacek@redhat.com>
6432
6433 PR middle-end/63884
6434 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6435 for NULL fndecl.
6436 (extract_array_notation_exprs): Return for NULL node.
6437
2079956a
JM
64382014-11-12 Joseph Myers <joseph@codesourcery.com>
6439
6440 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6441 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6442
1304953e
JJ
64432014-11-12 Jakub Jelinek <jakub@redhat.com>
6444
6445 PR c/59708
6446 * c-common.c (check_builtin_function_arguments): Handle
6447 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6448
e5e44252
AK
64492014-11-10 Andi Kleen <ak@linux.intel.com>
6450
6451 PR c/60804
6452 * c-common.h (check_no_cilk): Declare.
6453 * cilk.c (get_error_location): New function.
6454 (check_no_cilk): Dito.
6455
e64b984d
AK
64562014-11-10 Andi Kleen <ak@linux.intel.com>
6457
6458 * cilk.c (recognize_spawn): Use expression location
6459 for error message.
6460
13c21655
PC
64612014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6462
6463 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6464
42fd12b1
ESR
64652014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6466
6467 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6468 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6469 (__cpp_range_based_for, __cpp_initializer_lists,
6470 __cpp_delegating_constructors, __cpp_nsdmi,
6471 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6472 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6473 __has_cpp_attribute.
6474 * c-lex.c (cb_has_attribute): New callback CPP function;
6475 (init_c_lex): Set has_attribute callback.
6476
6f450181
RB
64772014-11-04 Richard Biener <rguenther@suse.de>
6478
6479 * c-common.c (shorten_compare): Do not shorten mixed
6480 DFP and non-DFP compares.
6481
26f0e1d6
ESR
64822014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6483
6484 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6485 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6486 Commentary and rearrangement of tests.
6487 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6488 Commentary and rearrangement of tests.
ab20d992 6489 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6490 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6491
ef4bddc2
RS
64922014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6493
6494 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6495 enum from machine_mode.
6496
c582198b
AM
64972014-10-28 Andrew MacLeod <amacleod@redhat.com>
6498
adfac8df
JJ
6499 * c-common.c: Adjust include files.
6500 * c-gimplify.c: Ditto.
6501 * cilk.c: Ditto.
6502 * c-pragma.c: Ditto.
6503 * c-ubsan.c: Ditto.
c582198b 6504
60393bbc
AM
65052014-10-27 Andrew MacLeod <amacleod@redhat.com>
6506
6507 * c-gimplify.c: Adjust include files.
6508
d723bb7c
MLI
65092014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6510
6511 PR c++/53061
6512 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6513 c_common_initialize_diagnostics.
6514 * c-common.h: Likewise.
6515
90f3520e
MP
65162014-10-24 Marek Polacek <polacek@redhat.com>
6517
6518 PR c/56980
6519 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6520 print "struct"/"union"/"enum" for typedefed names.
6521
59d7607a
MP
65222014-10-23 Marek Polacek <polacek@redhat.com>
6523
6524 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6525 in unsigned type.
6526
d95a2703
JJ
65272014-10-22 Jakub Jelinek <jakub@redhat.com>
6528 Yury Gribov <y.gribov@samsung.com>
6529
6530 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6531 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6532 instead of flag_sanitize_recover as bool flag.
6533
8e6ef852
KY
65342014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6535
6536 * cilk.c: Revert previous change.
6537
948cf550
IZ
65382014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6539
6540 PR c/63307
6541 * cilk.c: Include vec.h.
6542 (struct cilk_decls): New structure.
6543 (wrapper_parm_cb): Split this function to...
6544 (fill_decls_vec): ...this...
6545 (create_parm_list): ...and this.
6546 (compare_decls): New function.
6547 (for_local_cb): Remove.
6548 (wrapper_local_cb): Ditto.
6549 (build_wrapper_type): For now first traverse and fill vector of
6550 declarations then sort it and then deal with sorted vector.
6551 (cilk_outline): Ditto.
6552 (declare_one_free_variable): Ditto.
6553
92574c7c
MP
65542014-10-17 Marek Polacek <polacek@redhat.com>
6555
6556 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6557 * c.opt (Wimplicit-int): Initialize to -1.
6558
83685514
AM
65592014-10-16 Andrew MacLeod <amacleod@redhat.com>
6560
6561 * c-pragma.c: Adjust include files.
6562 * c-semantics.c: Likewise.
6563
5b8300ea
DD
65642014-10-16 DJ Delorie <dj@redhat.com>
6565
6566 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6567 multiples of bytes.
6568
5f83e90b
JM
65692014-10-14 Jason Merrill <jason@redhat.com>
6570
6571 PR c++/63455
6572 * c-common.h (CPP_PREPARSED_EXPR): New.
6573 (N_CP_TTYPES): Adjust.
6574
d73326ca
MP
65752014-10-15 Marek Polacek <polacek@redhat.com>
6576
6577 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6578
78a7c317
DD
65792014-10-14 DJ Delorie <dj@redhat.com>
6580
6581 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6582 types, not just __int128.
6583 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6584 types, not just __int128.
6585 (cpp_atomic_builtins): Round pointer sizes up.
6586 (type_suffix): Use type precision, not specific types.
6587 * c-common.c (c_common_reswords): Remove __int128 special case.
6588 (c_common_type_for_size): Check for all __intN types, not just
6589 __int128.
6590 (c_common_type_for_mode): Likewise.
6591 (c_common_signed_or_unsigned_type): Likewise.
6592 (c_build_bitfield_integer_type): Likewise.
6593 (c_common_nodes_and_builtins): Likewise.
6594 (keyword_begins_type_specifier): Likewise.
6595 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6596 __intN variants.
6597
2a22f99c
TS
65982014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6599
6600 * c-common.c: Use hash_table instead of hashtab.
6601
2a8ef767
ESR
66022014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6603
adfac8df 6604 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6605 C++11 section.
6606
3c9aabbd
MG
66072014-10-03 Marc Glisse <marc.glisse@inria.fr>
6608
6609 PR c++/54427
6610 PR c++/57198
6611 PR c++/58845
6612 * c-common.c (warn_logical_operator): Punt for vectors.
6613
a15f7cb8
ESR
66142014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6615
6616 Implement SD-6: SG10 Feature Test Recommendations
6617 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6618 macros and the __has_header macro.
6619
8d0cf15e
JM
66202014-09-30 Jason Merrill <jason@redhat.com>
6621
dd5d5481
JM
6622 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6623 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6624 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6625
b752325e
JM
6626 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6627 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6628
8d0cf15e
JM
6629 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6630 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6631
083e891e
MP
66322014-09-24 Marek Polacek <polacek@redhat.com>
6633
6634 PR c/61405
6635 PR c/53874
6636 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6637
7861b648
AK
66382014-09-23 Andi Kleen <ak@linux.intel.com>
6639
6640 * c-common.c (handle_no_reorder_attribute): New function.
6641 (c_common_attribute_table): Add no_reorder attribute.
6642
9a79452d
JM
66432014-09-22 Joseph Myers <joseph@codesourcery.com>
6644
6645 * c-cppbuiltin.c (c_cpp_builtins): Define
6646 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6647 modes.
6648
dd69f047
JM
66492014-09-18 Joseph Myers <joseph@codesourcery.com>
6650
6651 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6652 for supported floating-point modes.
6653
737a4826
MLI
66542014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6655
6656 * c.opt (Wpsabi): Use LangEnabledBy.
6657 * c-opts.c (c_common_handle_option): Do not handle here.
6658
8cc4b7a2
JM
66592014-09-12 Joseph Myers <joseph@codesourcery.com>
6660
6661 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6662 macros for floating-point modes.
6663
179b5a55
MG
66642014-09-11 Marc Glisse <marc.glisse@inria.fr>
6665
6666 PR target/58757
6667 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6668 __*_DENORM_MIN__ without denormals.
6669
570a11fe
JJ
66702014-09-10 Jakub Jelinek <jakub@redhat.com>
6671
6672 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6673 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6674 ubsan_create_data callers.
6675 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6676 index is constant or BIT_AND_EXPR with constant mask and is
6677 small enough for the bound.
6678 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6679 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6680
b559c810
MLI
66812014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6682
6683 * c.opt: Add CppReason to various flags.
6684 (Wdate-time): Re-sort.
6685 * c-common.c: Include c-common.h earlier.
6686 (struct reason_option_codes_t): Delete.
6687 (c_option_controlling_cpp_error): Prefix global type and struct
6688 with cpp_.
6689
1ef33fd4
MLI
66902014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6691
6692 * c.opt (Wnormalized): New.
6693 (Wnormalized=): Use Enum and Reject Negative.
6694 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6695
66bb34c0
JM
66962014-09-08 Joseph Myers <joseph@codesourcery.com>
6697
6698 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6699 digits of floating-point modes if -fbuilding-libgcc.
6700
53d68b9f
JM
67012014-09-05 Joseph Myers <joseph@codesourcery.com>
6702
6703 * c-cppbuiltin.c (c_cpp_builtins): Also define
6704 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6705 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6706 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6707 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6708 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6709 __LIBGCC_STACK_GROWS_DOWNWARD__,
6710 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6711 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6712 __LIBGCC_DWARF_FRAME_REGISTERS__,
6713 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6714 __LIBGCC_STACK_POINTER_REGNUM__ and
6715 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6716 (builtin_define_with_value): Handle backslash-escaping in string
6717 macro values.
6718
f65586dc
RB
67192014-09-05 Richard Biener <rguenther@suse.de>
6720
6721 PR middle-end/63148
6722 * c-format.c (check_format_arg): Properly handle
6723 effectively signed POINTER_PLUS_EXPR offset.
6724
2b71f4a4
MLI
67252014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6726
6727 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6728 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6729 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6730 and Init.
6731 * c-opts.c (c_common_handle_option): Do not handle here.
6732 (sanitize_cpp_opts): Likewise.
6733 * c-common.c (struct reason_option_codes_t): Handle
6734 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6735
d2e4feca
MP
67362014-09-03 Marek Polacek <polacek@redhat.com>
6737
6738 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6739
9a771876
JJ
67402014-09-02 Jakub Jelinek <jakub@redhat.com>
6741 Balaji V. Iyer <balaji.v.iyer@intel.com>
6742 Igor Zamyatin <igor.zamyatin@intel.com>
6743
6744 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6745 * c-common.c (c_common_reswords): Added _Cilk_for.
6746 * c-common.h (enum rid): Added RID_CILK_FOR.
6747 (cilk_for_number_of_iterations): Add declaration.
6748 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6749 CILK_FOR.
6750 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6751 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6752
81b5d104
MLI
67532014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6754
6755 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6756 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6757 Wundef): Use CPP, Var and Init.
6758 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6759
b753b37b
MLI
67602014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6761
6762 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6763 * c-opts.c (c_common_handle_option): Do not handle here.
6764
028aee17
JM
67652014-08-25 Jason Merrill <jason@redhat.com>
6766
6767 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6768 -std=c++14 and -std=gnu++14, rather than the reverse.
6769 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6770 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6771 * c-common.h (cxx_dialect): Remove cxx1y.
6772
e4276ba5
ESR
67732014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6774
6775 * c-common.h (enum cxx_dialect): Add cxx14.
6776 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6777 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6778 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6779
a545cacd
JM
67802014-08-22 Jason Merrill <jason@redhat.com>
6781
6782 * c.opt (std=gnu++17): Fix alias.
6783
59ea0364
MP
67842014-08-22 Marek Polacek <polacek@redhat.com>
6785
6786 PR c++/62199
6787 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6788 check for vector types. Drop LHS argument.
6789 * c-common.h (warn_logical_not_parentheses): Adjust.
6790
596e808c
MLI
67912014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6792
6793 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6794 (Wmultichar): Likewise.
6795 (Wdate-time): Use C-family languages instead of Common. Use CPP
6796 and Var.
6797 * c-opts.c (c_common_handle_option): Do not handle the above
6798 options here.
6799 (sanitize_cpp_opts): Likewise.
6800
18767f65
MLI
68012014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6802
6803 PR fortran/44054
6804 * c-opts.c: Include tree-diagnostics.h.
6805 (c_diagnostic_finalizer): New.
6806 (c_common_initialize_diagnostics): Use it.
6807
b4413594
MLI
68082014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6809
6810 PR preprocessor/51303
6811 * c-common.c (struct reason_option_codes_t option_codes):
6812 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6813
43f9a13c
MLI
68142014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6815
6816 PR c/60975
6817 PR c/53063
6818 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6819 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6820 (c_common_post_options): Call init_global_opts_from_cpp.
6821 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6822
04159acf
MP
68232014-08-19 Marek Polacek <polacek@redhat.com>
6824
6825 PR c++/62153
6826 * c-common.c (maybe_warn_bool_compare): New function.
6827 * c-common.h (maybe_warn_bool_compare): Declare.
6828 * c.opt (Wbool-compare): New option.
6829
35aff4fb
MP
68302014-08-19 Marek Polacek <polacek@redhat.com>
6831
6832 * c.opt (Wc99-c11-compat): New option.
6833
177cce46
MP
68342014-08-19 Marek Polacek <polacek@redhat.com>
6835
6836 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6837 to warn_c90_c99_compat.
6838 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6839 to -1.
6840
6ae9194f
MLI
68412014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6842 Steven Bosscher <steven@gcc.gnu.org>
6843
6844 PR c/52952
6845 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6846 format_check_results.
6847 (check_function_format): Use true and add comment for boolean
6848 argument.
6849 (finish_dollar_format_checking): Use explicit location when warning.
6850 (check_format_info): Likewise.
6851 (check_format_arg): Set extra_arg_loc and format_string_loc.
6852 (check_format_info_main): Use explicit location when warning.
6853 (check_format_types): Pass explicit location.
6854 (format_type_warning): Likewise.
6855
8e54f6d3
MLI
68562014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6857
6858 PR fortran/44054
6859 * c-format.c: Handle Fortran flags.
6860
cd4e76fc
IZ
68612014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6862
6863 PR other/61962
6864 * array-notation-common.c (find_rank): Added handling for other
6865 types of references.
6866
f3bede71
MP
68672014-08-10 Marek Polacek <polacek@redhat.com>
6868
6869 PR c/51849
6870 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6871 * c.opt (Wc90-c99-compat): Add option.
6872
9f25a338
TS
68732014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6874
6875 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6876
62e4eb35
MP
68772014-08-03 Marek Polacek <polacek@redhat.com>
6878
ab20d992 6879 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6880 (c_add_case_label): Pass loc to check_case_value.
6881
b787e7a2
TS
68822014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6883
6884 * cilk.c: Use hash_map instead of pointer_map.
6885
6e2830c3
TS
68862014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6887
6888 * c-gimplify.c: Use hash_set instead of pointer_set.
6889
a7ee52fb
IZ
68902014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6891
6892 PR middle-end/61455
6893 * array-notation-common.c (extract_array_notation_exprs): Handling
6894 of DECL_EXPR added.
6895
944fa280
JJ
68962014-08-01 Jakub Jelinek <jakub@redhat.com>
6897
6898 * c-common.h (min_align_of_type): Removed prototype.
6899 * c-common.c (min_align_of_type): Removed.
6900 * c-ubsan.h (ubsan_maybe_instrument_reference,
6901 ubsan_maybe_instrument_member_call): New prototypes.
6902 * c-ubsan.c: Include stor-layout.h and builtins.h.
6903 (ubsan_maybe_instrument_reference_or_call,
6904 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6905 functions.
6906
b4dfdc11
MG
69072014-07-31 Marc Glisse <marc.glisse@inria.fr>
6908
6909 PR c++/60517
6910 * c.opt (-Wreturn-local-addr): Move to common.opt.
6911
a41844e5
JM
69122014-07-30 Jason Merrill <jason@redhat.com>
6913
6914 PR c++/61659
6915 PR c++/61687
6916 Revert:
6917 * c.opt (-fuse-all-virtuals): New.
6918
976d5a22
TT
69192014-07-30 Tom Tromey <tromey@redhat.com>
6920
6921 PR c/59855
6922 * c.opt (Wdesignated-init): New option.
6923 * c-common.c (c_common_attribute_table): Add "designated_init".
6924 (handle_designated_init): New function.
6925
cdc94aca
MP
69262014-07-24 Marek Polacek <polacek@redhat.com>
6927
6928 PR c/57653
6929 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6930
f41373b6
DS
69312014-07-16 Dodji Seketeli <dodji@redhat.com>
6932
6933 PR preprocessor/60723 - missing system-ness marks for macro tokens
6934 * c-ppoutput.c (struct print::prev_was_system_token): New data
6935 member.
6936 (init_pp_output): Initialize it.
6937 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6938 (do_line_change): Return a flag saying if a line marker was
6939 emitted or not.
6940 (scan_translation_unit): Detect if the system-ness of the token we
6941 are about to emit is different from the one of the previously
6942 emitted token. If so, emit a line marker. Avoid emitting useless
6943 adjacent line markers. Avoid emitting line markers for tokens
6944 originating from the expansion of built-in macros.
6945 (scan_translation_unit_directives_only): Adjust.
6946
4d661eaa
MP
69472014-07-15 Marek Polacek <polacek@redhat.com>
6948
6949 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6950 TYPE_MAX_VALUE is NULL.
6951
b108f48f
JJ
69522014-07-14 Jakub Jelinek <jakub@redhat.com>
6953
6954 PR middle-end/61294
6955 * c.opt (Wmemset-transposed-args): New warning.
6956
c0221884
JM
69572014-07-10 Jason Merrill <jason@redhat.com>
6958
6959 PR c++/61659
6960 PR c++/61687
6961 * c.opt (-fuse-all-virtuals): New.
6962
63dfbb95
RB
69632014-07-09 Richard Biener <rguenther@suse.de>
6964
6965 PR c-family/61741
6966 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6967 using unsigned arithmetic if overflow does not wrap instead of
6968 if overflow is undefined.
6969
773ec47f
MP
69702014-07-06 Marek Polacek <polacek@redhat.com>
6971
6972 PR c/6940
6973 * c.opt (Wsizeof-array-argument): New option.
6974
00a7ba58
JJ
69752014-07-03 Jakub Jelinek <jakub@redhat.com>
6976
b1726d6c 6977 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6978 comments->count <= 1, as comments->entries might be NULL.
6979
52ec0ea3
MP
69802014-07-01 Marek Polacek <polacek@redhat.com>
6981
6982 * c.opt (Wint-conversion): New option.
6983
d5c3d343
MP
69842014-07-01 Marek Polacek <polacek@redhat.com>
6985
6986 PR c/58286
6987 * c.opt (Wincompatible-pointer-types): New option.
6988
6e7ceb17
PC
69892014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6990
6991 PR c++/51400
6992 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6993 Do not discard TYPE_QUALS of type.
6994
da73100b
JM
69952014-06-26 Jason Merrill <jason@redhat.com>
6996
6997 * c-common.h (enum cxx_dialect): Add cxx1z.
6998 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6999 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
7000
08eedf75
TJ
70012014-06-26 Teresa Johnson <tejohnson@google.com>
7002
7003 * c-common.h (get_dump_info): Declare.
7004 * c-gimplify.c (c_genericize): Use saved dump files.
7005 * c-opts.c (c_common_parse_file): Begin and end dumps
7006 once around parsing invocation.
7007 (get_dump_info): New function.
7008
7b56b2f8
MP
70092014-06-23 Marek Polacek <polacek@redhat.com>
7010 Andrew MacLeod <amacleod@redhat.com>
7011
7012 PR c/61553
7013 * c-common.c (get_atomic_generic_size): Don't segfault if the
7014 type doesn't have a size.
7015
0e37a2f3
MP
70162014-06-20 Marek Polacek <polacek@redhat.com>
7017
7018 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
7019 (ubsan_walk_array_refs_r): New function.
7020 (c_genericize): Instrument array bounds.
7021 * c-ubsan.c: Include "internal-fn.h".
7022 (ubsan_instrument_division): Mark instrumented arrays as having
7023 side effects. Adjust ubsan_type_descriptor call.
7024 (ubsan_instrument_shift): Likewise.
7025 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
7026 (ubsan_instrument_bounds): New function.
7027 (ubsan_array_ref_instrumented_p): New function.
7028 (ubsan_maybe_instrument_array_ref): New function.
7029 * c-ubsan.h (ubsan_instrument_bounds): Declare.
7030 (ubsan_array_ref_instrumented_p): Declare.
7031 (ubsan_maybe_instrument_array_ref): Declare.
7032
70332014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
7034
7035 PR lto/61123
7036 * c.opt (fshort-enums): Add to LTO.
7037 * c.opt (fshort-wchar): Likewise.
7038
5c3d09f7
MP
70392014-06-16 Marek Polacek <polacek@redhat.com>
7040
7041 PR c/60439
7042 * c.opt (Wswitch-bool): Add Var.
7043
9cf32741
JJ
70442014-06-12 Jakub Jelinek <jakub@redhat.com>
7045
7046 PR middle-end/61486
7047 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
7048 #pragma omp target teams or
7049 #pragma omp {,target }teams distribute simd.
7050
62984918
JM
70512014-06-12 Jason Merrill <jason@redhat.com>
7052
7053 * c.opt (Wabi=, fabi-compat-version): New.
7054 * c-opts.c (c_common_handle_option): Handle -Wabi=.
7055 (c_common_post_options): Handle flag_abi_compat_version default.
7056 Disallow -fabi-compat-version=1.
7057 * c-common.h (abi_version_crosses): New.
7058
f961457f
JH
70592014-06-11 Jan Hubicka <hubicka@ucw.cz>
7060
adfac8df 7061 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
7062 section names that are no longer trees.
7063
92d28cbb
JJ
70642014-06-10 Jakub Jelinek <jakub@redhat.com>
7065
7066 PR fortran/60928
7067 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
7068 (omp_pragmas): ... back here.
7069
742938c9
MP
70702014-06-05 Marek Polacek <polacek@redhat.com>
7071
7072 PR c/49706
7073 * c-common.c (warn_logical_not_parentheses): New function.
7074 * c-common.h (warn_logical_not_parentheses): Declare.
7075 * c.opt (Wlogical-not-parentheses): New option.
7076
9d548dfb
MP
70772014-06-04 Marek Polacek <polacek@redhat.com>
7078
7079 PR c/30020
7080 * c-common.c (check_case_bounds): Add location parameter.
7081 Use it.
7082 (c_add_case_label): Pass loc to check_case_bounds.
7083
fedfecef
MP
70842014-06-03 Marek Polacek <polacek@redhat.com>
7085
7086 PR c/60439
7087 * c.opt (Wswitch-bool): New option.
7088
f6a7cffc
TS
70892014-05-22 Thomas Schwinge <thomas@codesourcery.com>
7090
040d18b6
TS
7091 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
7092 Remove prototypes.
7093 (record_types_used_by_current_var_decl): Move prototype to where
7094 it belongs.
7095
f6a7cffc
TS
7096 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7097 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7098 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7099
632f2871
RS
71002014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7101
7102 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7103 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7104 void_zero_node.
7105 * c-pretty-print.c (pp_c_void_constant): New function.
7106 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7107 (c_pretty_printer::expression): Handle VOID_CST.
7108 * cilk.c (extract_free_variables): Likewise.
7109 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7110 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7111
766090c2
TS
71122014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7113
7114 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7115 * c-pragma.c (push_alignment): Adjust.
7116 (handle_pragma_push_options): Likewise.
7117
661a0813
MP
71182014-05-09 Marek Polacek <polacek@redhat.com>
7119
7120 PR c/50459
7121 * c-common.c (check_user_alignment): Return -1 if alignment is error
7122 node.
7123 (handle_aligned_attribute): Don't call default_conversion on
7124 FUNCTION_DECLs.
7125 (handle_vector_size_attribute): Likewise.
7126 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7127 (handle_sentinel_attribute): Call default_conversion and allow even
7128 integral types as an argument.
7129
2793eeab
MP
71302014-05-08 Marek Polacek <polacek@redhat.com>
7131
7132 PR c/61053
7133 * c-common.c (min_align_of_type): New function factored out from...
7134 (c_sizeof_or_alignof_type): ...here.
7135 * c-common.h (min_align_of_type): Declare.
7136
f827930a
MP
71372014-05-08 Marek Polacek <polacek@redhat.com>
7138
7139 PR c/61077
7140 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7141 parameter type of main.
7142
ca49b74e
DD
71432014-05-07 DJ Delorie <dj@redhat.com>
7144
7145 * c-cppbuiltin.c (print_bits_of_hex): New.
7146 (builtin_define_type_minmax): Print values using hex so as not to
7147 require a pre-computed list of string values.
7148
1d60af08
KZ
71492014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7150 Mike Stump <mikestump@comcast.net>
7151 Richard Sandiford <rdsandiford@googlemail.com>
7152
7153 * c-ada-spec.c: Include wide-int.h.
7154 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7155 (dump_generic_ada_node): Use wide-int interfaces.
7156 * c-common.c: Include wide-int-print.h.
7157 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7158 (pointer_int_sum): Use wide-int interfaces.
7159 (c_common_nodes_and_builtins): Use make_int_cst.
7160 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7161 (handle_alloc_size_attribute): Use wide-int interfaces.
7162 (get_nonnull_operand): Likewise.
7163 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7164 * c-lex.c: Include wide-int.h.
7165 (narrowest_unsigned_type): Take a widest_int rather than two
7166 HOST_WIDE_INTs.
7167 (narrowest_signed_type): Likewise.
7168 (interpret_integer): Update accordingly. Use wide-int interfaces.
7169 (lex_charconst): Use wide-int interfaces.
7170 * c-pretty-print.c: Include wide-int.h.
7171 (pp_c_integer_constant): Use wide-int interfaces.
7172 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7173 INT_CST_LT_UNSIGNED.
7174
b15458be
RB
71752014-05-06 Richard Biener <rguenther@suse.de>
7176
7177 * c-opts.c (c_common_post_options): For -freestanding,
7178 -fno-hosted and -fno-builtin disable pattern recognition
7179 if not enabled explicitely.
7180
6577374e
MP
71812014-05-02 Marek Polacek <polacek@redhat.com>
7182
7183 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7184
d00887e8
MP
71852014-05-01 Marek Polacek <polacek@redhat.com>
7186
7187 PR c/43245
7188 * c.opt (Wdiscarded-qualifiers): Add.
7189
f8ed5150
MP
71902014-04-30 Marek Polacek <polacek@redhat.com>
7191
7192 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7193 INT_MIN / -1 sanitization only for integer types.
7194
45484dcf
MP
71952014-04-25 Marek Polacek <polacek@redhat.com>
7196
7197 PR c/18079
7198 * c-common.c (handle_noinline_attribute): Warn if the attribute
7199 conflicts with always_inline attribute.
7200 (handle_always_inline_attribute): Warn if the attribute conflicts
7201 with noinline attribute.
7202
38e514c0
MP
72032014-04-25 Marek Polacek <polacek@redhat.com>
7204
7205 PR c/60156
7206 * c-common.c (check_main_parameter_types): Warn about variadic main.
7207
44875f92
MS
72082014-04-24 Mike Stump <mikestump@comcast.net>
7209
7210 * c.opt (Wshadow-ivar): Default to on.
7211
dcaaa5a0
DP
72122014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7213
7214 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7215
c07d7c02
MP
72162014-04-23 Marek Polacek <polacek@redhat.com>
7217
7218 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7219
1c33c9b7
JJ
72202014-04-22 Jakub Jelinek <jakub@redhat.com>
7221
7222 PR sanitizer/60275
7223 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7224 if flag_sanitize_undefined_trap_on_error.
7225 (ubsan_instrument_division, ubsan_instrument_shift,
7226 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7227 if !flag_sanitize_recover.
7228
793c625f
MG
72292014-04-22 Marc Glisse <marc.glisse@inria.fr>
7230
7231 PR libstdc++/43622
7232 * c-common.c (registered_builtin_types): Make non-static.
7233 * c-common.h (registered_builtin_types): Declare.
7234
b0f1bf36 72352014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7236 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7237
7238 PR c/60819
7239 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7240 apply may-alias the scalar pointer type when applicable.
7241
3b07fa4a
IZ
72422014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7243
7244 PR middle-end/60467
7245 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7246 as possible argument for Cilk_spawn.
7247
cbbd2b1c
TB
72482014-04-11 Tobias Burnus <burnus@net-b.de>
7249
7250 PR c/60194
7251 * c.opt (Wformat-signedness): Add
7252 * c-format.c(check_format_types): Use it.
7253
6415bd5d
JM
72542014-04-11 Jason Merrill <jason@redhat.com>
7255
7256 PR c++/57926
7257 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7258 default_conversion for an array argument.
7259
6525783a
MP
72602014-04-08 Marek Polacek <polacek@redhat.com>
7261
7262 PR sanitizer/60745
7263 * c-ubsan.c: Include asan.h.
7264 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7265
880a467b
NS
72662014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7267
7268 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7269
7b59ff2d
MP
72702014-04-02 Marek Polacek <polacek@redhat.com>
7271
7272 * c-common.h (c_expand_expr): Remove declaration.
7273
8edbfaa6
JJ
72742014-03-28 Jakub Jelinek <jakub@redhat.com>
7275
7276 PR c++/60689
7277 * c-common.c (add_atomic_size_parameter): When creating new
7278 params vector, push the size argument first.
7279
07d72e1d
JJ
72802014-03-26 Jakub Jelinek <jakub@redhat.com>
7281
7282 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7283 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7284 ubsan_create_data callers.
7285
b35e0fa0
JJ
72862014-03-22 Jakub Jelinek <jakub@redhat.com>
7287
7288 PR debug/60603
7289 * c-opts.c (c_finish_options): Restore cb_file_change call to
7290 <built-in>.
7291
39a1ebb3
JJ
72922014-03-13 Jakub Jelinek <jakub@redhat.com>
7293
7294 PR middle-end/36282
7295 * c-pragma.c (apply_pragma_weak): Only look at
7296 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7297 DECL_ASSEMBLER_NAME_SET_P (decl).
7298 (maybe_apply_pending_pragma_weaks): Exit early if
7299 vec_safe_is_empty (pending_weaks) rather than only when
7300 !pending_weaks.
7301 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7302 set assembler name back to NULL afterwards.
7303
a07f6ed2
JM
73042014-03-11 Jason Merrill <jason@redhat.com>
7305
7306 * c.opt: Add -std=gnu++14.
7307
75b107f5
IB
73082014-03-11 Ian Bolton <ian.bolton@arm.com>
7309
7310 * c-opts.c (c_common_post_options): Don't override
7311 -ffp-contract=fast if unsafe-math-optimizations is on.
7312
f42c637e
PM
73132014-03-08 Paulo Matos <paulo@matos-sorge.com>
7314
22b15758 7315 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7316
70e24808
JM
73172014-03-07 Jason Merrill <jason@redhat.com>
7318
7319 * c.opt: Add -std=c++14.
7320
3af9c5e9
MP
73212014-03-06 Marek Polacek <polacek@redhat.com>
7322
7323 PR c/60197
7324 * cilk.c (contains_cilk_spawn_stmt): New function.
7325 (contains_cilk_spawn_stmt_walker): Likewise.
7326 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7327 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7328
b3bdf019
JJ
73292014-03-03 Jakub Jelinek <jakub@redhat.com>
7330
7331 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7332 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7333 even when flag_preprocess_only.
7334
ca7e759d
JM
73352014-02-26 Jason Merrill <jason@redhat.com>
7336
7337 PR c++/59231
7338 PR c++/11586
7339 * c-common.c (shorten_compare): Don't check
7340 c_inhibit_evaluation_warnings.
7341
28e41874
JJ
73422014-02-19 Jakub Jelinek <jakub@redhat.com>
7343
cca615af
JJ
7344 PR c/37743
7345 * c-common.c (c_common_nodes_and_builtins): When initializing
7346 c_uint{16,32,64}_type_node, also set corresponding
7347 uint{16,32,64}_type_node to the same value.
7348
28e41874
JJ
7349 PR c++/60267
7350 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7351 for PRAGMA_IVDEP if flag_preprocess_only.
7352
c2bf53a1
JJ
73532014-02-12 Jakub Jelinek <jakub@redhat.com>
7354
7355 PR c/60101
7356 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7357 if false, add ADD itself, rather than vice versa.
7358 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7359 copy. For SAVE_EXPR, only call merge_tlist once.
7360
8fcbce72
JJ
73612014-02-08 Jakub Jelinek <jakub@redhat.com>
7362
7363 PR middle-end/60092
7364 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7365 and tree_to_uhwi.
7366 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7367 functions.
7368 (c_common_attribute_table): Add alloc_align and assume_aligned
7369 attributes.
7370
0a756a3f
MP
73712014-02-06 Marek Polacek <polacek@redhat.com>
7372
7373 PR c/60087
7374 * c-common.c (warn_for_sign_compare): Call warning_at with location
7375 instead of warning.
7376
7ec4847a
MP
73772014-02-05 Marek Polacek <polacek@redhat.com>
7378
7379 PR c/53123
7380 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7381 statement.
7382
66f20604
MP
73832014-02-04 Marek Polacek <polacek@redhat.com>
7384
7385 PR c/60036
7386 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7387 SAVE_EXPR.
7388
5d77fb19
MG
73892014-02-03 Marc Glisse <marc.glisse@inria.fr>
7390
7391 PR c++/53017
7392 PR c++/59211
7393 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7394 handle_vector_size_attribute, handle_nonnull_attribute): Call
7395 default_conversion on the attribute argument.
7396 (handle_nonnull_attribute): Increment the argument number.
7397
81e5eca8
MP
73982014-01-31 Marek Polacek <polacek@redhat.com>
7399
7400 PR c/59963
7401 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7402 build_function_call_vec.
7403 (resolve_overloaded_builtin): Likewise.
7404 * c-common.h (build_function_call_vec): Adjust declaration.
7405
68fca595
MP
74062014-01-30 Marek Polacek <polacek@redhat.com>
7407
7408 PR c/59940
7409 * c-common.h (unsafe_conversion_p): Adjust declaration.
7410 (warnings_for_convert_and_check): Likewise.
7411 (convert_and_check): Likewise.
7412 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7413 expansion_point_location_if_in_system_header on it.
7414 (warnings_for_convert_and_check): Add location parameter. Call
7415 expansion_point_location_if_in_system_header on it. Use it.
7416 (convert_and_check): Add location parameter. Use it.
7417 (conversion_warning): Likewise.
7418 (c_add_case_label): Adjust convert_and_check calls.
7419 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7420
b72271b9
BI
74212014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7422
7423 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7424 flag_cilkplus.
7425 * c-pragma.c (init_pragma): Likewise.
7426 * c.opt: Likewise.
7427
393e8e8b
MP
74282014-01-23 Marek Polacek <polacek@redhat.com>
7429
7430 PR c/59846
7431 * c-common.c (shorten_compare): Add location_t parameter.
7432 * c-common.h (shorten_binary_op): Adjust declaration.
7433
f04dda30
MP
74342014-01-23 Marek Polacek <polacek@redhat.com>
7435
7436 PR c/58346
7437 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7438 * c-common.h: Declare it.
7439
621955cb
EB
74402014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7441
7442 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7443 * c-ada-spec.c (dump_ads): Likewise.
7444 (cpp_check): Likewise.
7445 (dump_ada_specs): Likewise.
7446
74472014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7448
7449 PR c++/49718
7450 * c-common.c (handle_no_instrument_function_attribute): Allow
7451 no_instrument_function attribute in class member
7452 definition/declaration.
7453
241f845a
JJ
74542014-01-15 Jakub Jelinek <jakub@redhat.com>
7455
7456 PR c/58943
7457 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7458 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7459 being COMPOUND_EXPR.
7460 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7461 operand a SAVE_EXPR and second MODIFY_EXPR.
7462
e83b8e2e
JJ
74632014-01-09 Jakub Jelinek <jakub@redhat.com>
7464
7465 PR target/58115
7466 * c-pch.c (c_common_write_pch): Call
7467 prepare_target_option_nodes_for_pch.
7468
23a5b65a
RS
74692014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7470
7471 Update copyright years
7472
f9030485
RS
74732014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7474
7475 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7476 the copyright notice.
7477
f2aa696b
EB
74782013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7479
7480 * c-ada-spec.c (print_constructor): New function.
7481 (print_destructor): Retrieve the origin of the destructor.
7482 (print_ada_declaration): Revamp handling of constructors/destructors.
7483
3f8257db 74842013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7485 Bill Maddox <maddox@google.com>
7486 Jason Merrill <jason@redhat.com>
7487
7488 * c.opt: Add -fdeclone-ctor-dtor.
7489 * c-opts.c (c_common_post_options): Default to on iff -Os.
7490
41958c28
BI
74912013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7492
7493 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7494 attribute.
7495 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7496 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7497 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7498 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7499 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7500 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7501 PRAGMA_CILK_CLAUSE_UNIFORM.
7502
b1726d6c 7503
12893402
BI
75042013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7505
7506 * cilk.c (cilk_outline): Made this function non-static.
7507 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7508 (create_cilk_wrapper): Added a new parameter: a function pointer.
7509 (c_install_body_w_frame_cleanup): Remove
7510 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7511 * c-common.h (cilk_outline): New prototype.
7512 (gimplify_cilk_spawn): Removed two parameters.
7513 (cilk_install_body_with_frame_cleanup): New prototype.
7514 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7515 CILK_SPAWN_STMT case.
7516
085b42ed
BS
75172013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7518
2ce064c3
BS
7519 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7520
085b42ed
BS
7521 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7522 (int_array_type_node): Remove.
7523 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7524
9e36c9ed
MP
75252013-12-05 Marek Polacek <polacek@redhat.com>
7526
7527 PR c/52023
7528 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7529 [ADJUST_FIELD_ALIGN].
7530
296674db
JM
75312013-12-04 Joseph Myers <joseph@codesourcery.com>
7532
7533 PR c/52023
7534 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7535 and check field alignment if set.
7536 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7537 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7538
b1726d6c 75392013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7540 Marek Polacek <polacek@redhat.com>
7541
7542 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7543 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7544
d7947e19
L
75452013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7546
7547 PR c/59309
7548 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7549 arguments.
7550
fad7652e
JJ
75512013-11-29 Jakub Jelinek <jakub@redhat.com>
7552
7553 PR c/59280
7554 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7555 goto invalid. If it is error_mark_node, don't issue further
7556 diagnostics.
7557
8b5e1202
SO
75582013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7559
7560 * c.opt (Wopenmp-simd): New.
7561
0a508bb6
JJ
75622013-11-22 Jakub Jelinek <jakub@redhat.com>
7563
7564 * c-ubsan.h (ubsan_instrument_return): New prototype.
7565 * c-ubsan.c (ubsan_instrument_return): New function.
7566
2fb9a547
AM
75672013-11-22 Andrew MacLeod <amacleod@redhat.com>
7568
7569 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7570 * c-gimplify.c: Likewise.
7571 * cilk.c: Likewise.
2fb9a547 7572
8400e75e
DM
75732013-11-22 David Malcolm <dmalcolm@redhat.com>
7574
7575 * c-common.c (unsafe_conversion_p): Remove use of
7576 EXPR_LOC_OR_HERE macro.
7577 (conversion_warning): Likewise.
7578 (warnings_for_convert_and_check): Likewise.
7579 (warn_for_collisions_1): Likewise.
7580 (shorten_compare): Likewise, and remove use of in_system_header
7581 macro, using the location from the former.
7582 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7583 (cb_def_pragma): Remove use of in_system_header macro.
7584 (lex_string): Likewise.
7585 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7586
eb1ce453
KZ
75872013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7588 Mike Stump <mikestump@comcast.net>
7589 Richard Sandiford <rdsandiford@googlemail.com>
7590
7591 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7592 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7593 tree_fits_shwi_p or tree_fits_uhwi_p.
7594 (dump_generic_ada_node): Likewise.
7595 * c-format.c (check_format_arg): Likewise.
7596 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7597
6b3b8c27
KZ
75982013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7599
7600 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7601
49b0aa18
JC
76022013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7603
7604 PR c/53001
7605 * c-common.c (unsafe_conversion_p): Make this function
7606 return an enumeration with more detail.
7607 (conversion_warning): Use the new return type of
7608 unsafe_conversion_p to separately warn either about conversions
7609 that lower floating point number precision or about the other
7610 kinds of conversions.
7611 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7612 (unsafe_conversion_p): switching return type to
7613 conversion_safety enumeration.
49b0aa18
JC
7614 * c.opt: Adding new warning -Wfloat-conversion and
7615 enabling it with -Wconversion.
7616
b826515a
BS
76172013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7618
8e745a17
JJ
7619 * c-opts.c: Include plugin.h.
7620 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7621
b9a55b13
MP
76222013-11-19 Marek Polacek <polacek@redhat.com>
7623
7624 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7625 call.
7626 (ubsan_instrument_shift): Likewise.
7627 (ubsan_instrument_vla): Likewise.
7628
7d362f6c
RS
76292013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7630
7631 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7632 cast to unsigned type.
7633
386b1f1f
RS
76342013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7635
7636 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7637 tree_low_cst.
7638 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7639 rather than tree_low_cst.
7640
ae7e9ddd
RS
76412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7642
7643 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7644 tree_to_uhwi throughout.
7645
9439e9a1
RS
76462013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7647
7648 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7649 tree_low_cst (..., 0) with tree_to_shwi throughout.
7650
cc269bb6
RS
76512013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7652
7653 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7654 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7655
9541ffee
RS
76562013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7657
7658 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7659 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7660
c02065fc
AH
76612013-11-15 Aldy Hernandez <aldyh@redhat.com>
7662
7663 * c-cilkplus.c: New file.
7664 * c-common.c (readonly_error): Add location argument.
7665 * c-common.h (readonly_error): Same.
7666 (c_finish_cilk_clauses): Protoize.
7667 (c_check_cilk_loop): Same.
7668 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7669 Do not fail on error_mark_node.
7670 Abstract increment canonicalization to here...
7671 (c_omp_for_incr_canonicalize_ptr): New.
7672 c-pragma.c (init_pragma): Register "simd" pragma.
7673 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7674 (enum pragma_cilk_clause): New.
7675
9cc65f15
RS
76762013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7677
7678 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7679 wchar_type and host_integerp checks.
7680
18f429e2
AM
76812013-11-14 Andrew MacLeod <amacleod@redhat.com>
7682
7683 * c-common.c: Likewise.
7684 * c-gimplify.c: Likewise.
7685 * cilk.c: Likewise.
7686
d8a2d370
DN
76872013-11-14 Diego Novillo <dnovillo@google.com>
7688
7689 * c-common.c: Include fold-const.h.
7690 Include stor-layout.h.
7691 Include calls.h.
7692 Include stringpool.h.
7693 Include attribs.h.
7694 Include varasm.h.
7695 Include trans-mem.h.
7696 * c-cppbuiltin.c: Include stor-layout.h.
7697 Include stringpool.h.
7698 * c-format.c: Include stringpool.h.
7699 * c-lex.c: Include stringpool.h.
7700 Include stor-layout.h.
7701 * c-pragma.c: Include stringpool.h.
7702 Include attribs.h.
7703 Include varasm.h.
7704 Include gcc-symtab.h.
7705 * c-pretty-print.c: Include stor-layout.h.
7706 Include attribs.h.
7707 * cilk.c: Include stringpool.h.
7708 Include calls.h.
7709
38b7bc7f
JM
77102013-11-13 Joseph Myers <joseph@codesourcery.com>
7711
7712 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7713 * c-common.c (c_common_reswords): Add __auto_type.
7714 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7715
45b0be94
AM
77162013-11-12 Andrew MacLeod <amacleod@redhat.com>
7717
18f429e2
AM
7718 * c-common.c: Include gimplify.h.
7719 * c-gimplify.c: Likewise.
7720 * cilk.c: Likewise.
7721 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7722 * c-ubsan.c: Don't include gimple.h.
45b0be94 7723
582d9b50
JM
77242013-11-12 Joseph Myers <joseph@codesourcery.com>
7725
7726 * c-common.c (c_common_reswords): Add _Thread_local.
7727
6b28e197
JM
77282013-11-09 Joseph Myers <joseph@codesourcery.com>
7729
7730 * c-common.c (atomic_size_supported_p): New function.
7731 (resolve_overloaded_atomic_exchange)
7732 (resolve_overloaded_atomic_compare_exchange)
7733 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7734 Use it instead of comparing size with a local list of sizes.
7735
267bac10
JM
77362013-11-07 Andrew MacLeod <amacleod@redhat.com>
7737 Joseph Myers <joseph@codesourcery.com>
7738
7739 * c-common.h (enum rid): Add RID_ATOMIC.
7740 * c-common.c (c_common_reswords): Add _Atomic.
7741 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7742 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7743 * c-format.c (check_format_types): Check for extra _Atomic
7744 qualifiers in format argument.
7745 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7746 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7747
5157b91e
TB
77482013-11-06 Tobias Burnus <burnus@net-b.de>
7749
7750 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7751
6dbe0958
JM
77522013-11-06 Joseph Myers <joseph@codesourcery.com>
7753
7754 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7755 standards modes.
7756 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7757 to mean lack of IEEE 754 support.
7758
e8ff5196
TB
77592013-11-05 Tobias Burnus <burnus@net-b.de>
7760
7761 * c.opt (-Wdate-time): New option
7762 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7763
254a0760
JM
77642013-11-05 Joseph Myers <joseph@codesourcery.com>
7765
7766 * c-cppbuiltin.c (cpp_iec_559_value): Test
7767 flag_excess_precision_cmdline not flag_excess_precision.
7768
6d7f7e0a
TB
77692013-11-05 Tobias Burnus <burnus@net-b.de>
7770
7771 * c.opt (fopenmp-simd): New option.
7772 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7773 (omp_pragmas): ... this new struct.
7774 (c_pp_lookup_pragma): Also walk omp_pragmas.
7775 (init_pragma): Init pragmas for -fopenmp-simd.
7776
55a7f02f
MP
77772013-11-04 Marek Polacek <polacek@redhat.com>
7778
7779 PR c++/58979
7780 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7781
9193fb05
JM
77822013-11-04 Joseph Myers <joseph@codesourcery.com>
7783
7784 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7785 New functions.
7786 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7787
94159ecf
EB
77882013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7789
7790 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7791 (dump_ada_specs): Adjust prototype of second callback.
7792 * c-ada-spec.c (cpp_check): New global variable.
7793 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7794 (print_generic_ada_decl): Likewise.
7795 (has_static_fields): Change return type to bool and add guard.
7796 (has_nontrivial_methods): New predicate.
7797 (is_tagged_type): Change return type to bool.
7798 (separate_class_package): Call has_nontrivial_methods.
7799 (pp_ada_tree_identifier): Minor tweaks.
7800 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7801 (dump_ada_array_domains): Likewise.
7802 (dump_ada_array_type): Likewise.
7803 (dump_template_types): Remove cpp_check parameter and do not pass it to
7804 dump_generic_ada_node.
7805 (dump_ada_template): Likewise.
7806 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7807 recursively.
7808 (print_ada_methods): Change return type to integer. Remove cpp_check
7809 parameter and do not pass it down.
7810 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7811 dump_generic_ada_node.
7812 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7813 accessing methods.
7814 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7815 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7816 value of print_ada_methods.
7817 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7818 Set cpp_check to it before invoking dump_ada_nodes.
7819 (dump_ada_specs): Likewise.
7820
b906f4ca
MP
78212013-11-03 Marek Polacek <polacek@redhat.com>
7822
7823 * c-ubsan.c: Don't include hash-table.h.
7824 (ubsan_instrument_vla): New function.
7825 * c-ubsan.h: Declare it.
7826
5e20cdc9
DM
78272013-10-31 David Malcolm <dmalcolm@redhat.com>
7828
7829 Automated part of renaming of symtab_node_base to symtab_node.
7830
7831 Patch autogenerated by rename_symtab.py from
7832 https://github.com/davidmalcolm/gcc-refactoring-scripts
7833 revision 58bb219cc090b2f4516a9297d868c245495ee622
7834
7835 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7836 symtab_node_base to symtab_node.
7837
7057e645
ESR
78382013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7839
8e745a17 7840 Implement C++14 digit separators.
7057e645
ESR
7841 * c-lex.c (interpret_float): Remove digit separators from scratch string
7842 before building real literal.
7843
193ea7bc
JJ
78442013-10-30 Jakub Jelinek <jakub@redhat.com>
7845
7846 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7847
939b37da
BI
78482013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7849
7850 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7851 fields.
7852 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7853 enabled.
7854 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7855 (insert_cilk_frame): New prototype.
7856 (cilk_init_builtins): Likewise.
7857 (gimplify_cilk_spawn): Likewise.
7858 (c_cilk_install_body_w_frame_cleanup): Likewise.
7859 (cilk_detect_spawn_and_unwrap): Likewise.
7860 (cilk_set_spawn_marker): Likewise.
7861 (build_cilk_sync): Likewise.
7862 (build_cilk_spawn): Likewise.
7863 * cilk.c: New file.
7864
67348ccc
DM
78652013-10-29 David Malcolm <dmalcolm@redhat.com>
7866
7867 Patch autogenerated by refactor_symtab.py from
7868 https://github.com/davidmalcolm/gcc-refactoring-scripts
7869 revision 58bb219cc090b2f4516a9297d868c245495ee622
7870
7871 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7872 to a true class hierarchy.
7873 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7874
d570872d
RS
78752013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7876
7877 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7878
98906124
JL
78792013-10-26 Jeff Law <law@redhat.com>
7880
adfac8df
JJ
7881 * c-common.c (c_define_builtins): Remove mudflap support.
7882 * c.opt: Ignore and warn for mudflap options.
98906124 7883
d73749df 78842013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7885
7886 PR other/33426
7887 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7888 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7889
3f04b1bb
JM
78902013-10-23 Jason Merrill <jason@redhat.com>
7891
7892 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7893
acf0174b
JJ
78942013-10-11 Jakub Jelinek <jakub@redhat.com>
7895
acd15a28
JJ
7896 * c-common.h (omp_clause_mask::operator !=): New method.
7897 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7898 instead of if (mask & something) tests everywhere.
7899
acf0174b
JJ
7900 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7901 201307 instead of 201107.
7902 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7903 (c_common_attribute_table): Add "omp declare target" and
7904 "omp declare simd" attributes.
7905 (handle_omp_declare_target_attribute,
7906 handle_omp_declare_simd_attribute): New functions.
7907 * c-omp.c: Include c-pragma.h.
7908 (c_finish_omp_taskgroup): New function.
7909 (c_finish_omp_atomic): Add swapped argument, if true,
7910 build the operation first with rhs, lhs arguments and use NOP_EXPR
7911 build_modify_expr.
7912 (c_finish_omp_for): Add code argument, pass it down to make_code.
7913 (c_omp_split_clauses): New function.
7914 (c_split_parallel_clauses): Removed.
7915 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7916 c_omp_declare_simd_clauses_to_decls): New functions.
7917 * c-common.h (omp_clause_mask): New type.
7918 (OMP_CLAUSE_MASK_1): Define.
7919 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7920 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7921 omp_clause_mask::operator |, omp_clause_mask::operator &,
7922 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7923 omp_clause_mask::operator ==): New methods.
7924 (enum c_omp_clause_split): New.
7925 (c_finish_omp_taskgroup): New prototype.
7926 (c_finish_omp_atomic): Add swapped argument.
7927 (c_finish_omp_for): Add code argument.
7928 (c_omp_split_clauses): New prototype.
7929 (c_split_parallel_clauses): Removed.
7930 (c_omp_declare_simd_clauses_to_numbers,
7931 c_omp_declare_simd_clauses_to_decls): New prototypes.
7932 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7933 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7934 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7935 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7936 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7937 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7938 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7939 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7940 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7941 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7942 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7943 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7944 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7945 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7946 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7947 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7948 PRAGMA_OMP_CLAUSE_UNIFORM.
7949
826cacfe
MG
79502013-10-09 Marc Glisse <marc.glisse@inria.fr>
7951
7952 PR tree-optimization/20318
7953 * c-common.c (handle_returns_nonnull_attribute): New function.
7954 (c_common_attribute_table): Add returns_nonnull.
7955
2284b034
MG
79562013-10-03 Marc Glisse <marc.glisse@inria.fr>
7957
7958 PR c++/19476
7959 * c.opt (fcheck-new): Move to common.opt.
7960
b56e9788
MP
79612013-09-25 Marek Polacek <polacek@redhat.com>
7962 Jakub Jelinek <jakub@redhat.com>
7963
7964 PR sanitizer/58413
7965 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7966 an expression if we can prove it is correct.
7967 (ubsan_instrument_division): Likewise. Remove unnecessary
7968 check.
7969
ce6923c5
MP
79702013-09-18 Marek Polacek <polacek@redhat.com>
7971
7972 PR sanitizer/58411
7973 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7974 Declare it.
7975 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7976
fb5610fb
IS
79772013-09-14 Iain Sandoe <iain@codesourcery.com>
7978
7979 PR target/48094
7980 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7981 fobjc-gc, freplace-objc-classes): Accept for LTO.
7982
88b0e79e
JC
79832013-09-13 Jacek Caban <jacek@codeweavers.com>
7984
7985 * c-target.def: New hook
7986
c9b0866a
PC
79872013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7988
7989 PR c++/43452
7990 * c.opt (Wdelete-incomplete): Add.
7991
0af94e6f
JR
79922013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7993
7994 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7995 (vector_types_compatible_elements_p): New function.
7996 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7997 declaration.
7998 (vector_types_compatible_elements_p): Declare.
7999
7c26172c
GDR
80002013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8001
8002 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
8003 a virtual member function.
8004 (pp_simple_type_specifier): Remove.
8005 (pp_c_type_specifier): Likewise.
8006 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
8007 Rename from pp_c_type_specifier. Adjust.
8008 (c_pretty_printer::c_pretty_printer): Do not assign to
8009 simple_type_specifier.
8010
20059c8b
GDR
80112013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8012
8013 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
8014 member function.
8015 (c_pretty_printer::storage_class_specifier): Likewise.
8016 (c_pretty_printer::initializer): Likewise.
8017 (pp_declaration): Remove.
8018 (pp_declaration_specifiers): Likewise.
8019 (pp_abstract_declarator): Likewise.
8020 (pp_declarator): Likewise.
8021 (pp_type_id): Likewise.
8022 (pp_statement): Likewise.
8023 (pp_constant): Likewise.
8024 (pp_id_expression): Likewise.
8025 (pp_primary_expression): Likewise.
8026 (pp_unary_expression): Likewise.
8027 (pp_multiplicative_expression): Likewise.
8028 (pp_conditional_expression): Likewise.
8029 (pp_assignment_expression): Likewise.
8030 (pp_expression): Likewise.
8031 (pp_c_type_id): Likewise.
8032 (pp_c_storage_class_specifier): Likewise.
8033 * c-pretty-print.c (pp_c_type_cast): Tidy.
8034 (pp_c_pointer): Likewise.
8035 (pp_c_type_specifier): Likewise.
8036 (pp_c_parameter_type_list): Likewise.
8037 (pp_c_function_definition): Likewise.
8038 (pp_c_init_declarator): Likewise.
8039 (pp_c_initializer_list): Likewise.
8040 (pp_c_constructor_elts): Likewise.
8041 (c_pretty_printer::direct_abstract_declarator): Likewise.
8042 (c_pretty_printer::declaration_specifiers): Likewise.
8043 (c_pretty_printer::primary_expression): Likewise.
8044 (c_pretty_printer::postfix_expression): Likewise.
8045 (c_pretty_printer::type_id): Rename from pp_c_type_id.
8046 (c_pretty_printer::storage_class_specifier): Rename from
8047 pp_c_storage_class_specifier.
8048 (c_pretty_printer::initializer): Rename from pp_c_initializer.
8049 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
8050 storage_class_specifier, initializer, offset_list, flags.
8051
de5a5fa1
MP
80522013-08-30 Marek Polacek <polacek@redhat.com>
8053
8054 * c-ubsan.c: New file.
8055 * c-ubsan.h: New file.
8056
8f0e4d72
GDR
80572013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
8058
8059 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
8060 member function.
8061 (c_pretty_printer::declaration_specifiers): Likewise.
8062 (c_pretty_printer::declarator): Likewise.
8063 (c_pretty_printer::abstract_declarator): Likewise.
8064 (c_pretty_printer::direct_abstract_declarator): Likewise.
8065 (c_pretty_printer::direct_declarator): Likewise.
8066 (c_pretty_printer::function_specifier): Likewise.
8067 (pp_declaration): Adjust.
8068 (pp_declaration_specifiers): Likewise.
8069 (pp_abstract_declarator): Likewise.
8070 (pp_direct_declarator): Likewise.
8071 (pp_function_specifier): Likewise.
8072 (pp_direct_abstract_declarator): Remove as unused.
8073 (pp_c_declaration): Remove.
8074 (pp_c_declaration_specifiers): Likewise.
8075 (pp_c_declarator): Likewise.
8076 (pp_c_direct_declarator): Likewise.
8077 (pp_c_function_specifier): Likewise.
8078 (pp_c_direct_abstract_declarator): Likewise.
8079 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
8080 from pp_c_abstract_declarator. Adjust.
ab20d992 8081 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
8082 pp_c_direct_abstract_declarator. Adjust.
8083 (c_pretty_printer::function_specifier): Rename from
8084 pp_c_function_specifier. Adjust.
8085 (c_pretty_printer::declaration_specifiers): Rename from
8086 pp_c_declaration_specifiers. Adjust.
8087 (c_pretty_printer::direct_declarator): Rename from
8088 pp_c_direct_declarator. Adjust.
8089 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
8090 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
8091 (c_pretty_printer::c_pretty_printer): Do not assign to
8092 declaration, declaration_specifiers, declarator,
8093 direct_declarator, direct_abstract_declarator, function_specifier.
8094
00d34d3a
GDR
80952013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8096
8097 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8098 virtual member function.
8099 (c_pretty_printer::multiplicative_expression): Likewise.
8100 (c_pretty_printer::conditional_expression): Likewise.
8101 (c_pretty_printer::assignment_expression): Likewise.
8102 (c_pretty_printer::expression): Likewise.
8103 (pp_unary_expression): Adjust.
8104 (pp_multiplicative_expression): Likewise.
8105 (pp_assignment_expression): Likewise.
8106 (pp_conditional_expression): Likewise.
8107 (pp_expression): Likewise.
8108 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8109 from pp_c_unary_expression. Adjust.
8110 (c_pretty_printer::multiplicative_expression): Rename from
8111 pp_c_multiplicative_expression. Adjust.
8112 (c_pretty_printer::conditional_expression): Rename from
8113 pp_c_conditional_expression. Adjust.
8114 (c_pretty_printer::assignment_expression): Rename from
8115 pp_c_assignment_expression. Adjust.
8116 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8117 (c_pretty_printer::c_pretty_printer): Do not assign to
8118 unary_expression, multiplicative_expression,
8119 conditional_expression, expression.
8120
fb22178f
GDR
81212013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8122
8123 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8124 virtual member function.
8125 (pp_postfix_expression): Adjust.
8126 (pp_c_postfix_expression): Remove.
8127 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8128 from pp_c_postfix_expression. Adjust.
8129 (c_pretty_printer::c_pretty_printer): Do not assign to
8130 postfix_expression.
8131
7ecc2600
GDR
81322013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8133
8134 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8135 virtua member function.
8136 (pp_primary_expression): Adjust.
8137 (pp_c_primary_expression): Remove.
8138 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8139 from pp_c_primary_expression. Adjust.
8140 (pp_c_initializer_list): Use pp_primary_expression.
8141 (c_pretty_printer::c_pretty_printer): Do not assign to
8142 primary_expression.
8143
0691175f
GDR
81442013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8145
8146 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8147 * c-pretty-print.c (M_): Remove.
8148 (c_pretty_printer::translate_string): Define.
8149 (pp_c_type_specifier): Use it.
8150 (pp_c_primary_expression): Likewise.
8151 (pp_c_expression): Likewise.
8152
66dfe4c4
GDR
81532013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8154
8155 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8156 virtual function.
8157 (pp_c_id_expression): Remove.
8158 (pp_id_expression): Adjust.
8159 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8160 pp_c_id_expression. Adjust.
8161 (pp_c_postfix_expression): Use pp_id_expression.
8162 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8163
ca43e9d5
GDR
81642013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8165
8166 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8167 member function.
8168 (pp_constant): Adjust.
8169 (pp_c_constant): Remove.
8170 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8171 pp_c_constant. Adjust.
8172 (pp_c_constant)
8173 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8174 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8175
da6ca2b5
GDR
81762013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8177
8178 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8179 (c_pretty_printer::c_pretty_printer): Declare.
8180 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8181 c_pretty_printer_init. Adjust.
8182 (print_c_tree): Do not call c_pretty_printer_init.
8183 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8184
65a372f4
AC
81852013-08-09 Arnaud Charlet <charlet@adacore.com>
8186
8187 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8188
fd9b0f32
PC
81892013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8190
8191 PR c++/58080
8192 * c-common.c (pointer_int_sum): Add bool parameter.
8193 * c-common.h (pointer_int_sum): Adjust declaration.
8194
e0aec1e9
GDR
81952013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8196
8197 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8198 c_pretty_printer variable.
8199
b066401f
GDR
82002013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8201
8202 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8203 (pp_base): Remove.
8204 (pp_c_base): Likewise. Adjust users.
8205 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8206 (pp_c_whitespace): Do not call pp_base.
8207 (pp_c_left_paren): Likewise.
8208 (pp_c_right_paren): Likewise.
8209 (pp_c_left_brace): Likewise.
8210 (pp_c_right_brace): Likewise.
8211 (pp_c_left_bracket): Likewise.
8212 (pp_c_right_bracket): Likewise.
8213 (pp_c_dot): Likewise.
8214 (pp_c_ampersand): Likewise.
8215 (pp_c_star): Likewise.
8216 (pp_c_arrow): Likewise.
8217 (pp_c_semicolon): Likewise.
8218 (pp_c_complement): Likewise.
8219 (pp_c_exclamation): Likewise.
8220 (pp_c_direct_declarator): Likewise.
8221 (pp_c_ws_string): Likewise.
8222 (pp_c_identifier): Likewise.
8223 (pp_c_statement): Likewise.
8224 (print_c_tree): Likewise.
8225
65e5a578
ESR
82262013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8227
8228 PR c++/58072
8229 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8230 provide useful error strings.
8231
137a1a27
GDR
82322013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8233
8234 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8235 printer functions instead of pp_string or operators and punctuators.
8236 (dump_generic_ada_node): Likewise.
8237 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8238 (pp_c_relational_expression): Likewise.
8239 (pp_c_logical_or_expression): Likewise.
8240
07838b13
GDR
82412013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8242
8243 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8244 functions instead of pp_character.
8245 (pp_ada_tree_identifier): Likewise.
8246 (dump_ada_double_name): Likewise.
8247 (dump_ada_function_declaration): Likewise.
8248 (dump_ada_array_domains): Likewise.
8249 (dump_template_types): Likewise.
8250 (dump_generic_ada_node): Likewise.
8251 (print_ada_declaration): Likewise.
8252 (print_ada_struct_decl): Likewise.
8253 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8254
433cc7b0
TT
82552013-07-23 Tom Tromey <tromey@redhat.com>
8256
8257 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8258 * c-common.c (c_common_reswords): Add _Generic.
8259
688010ba
OB
82602013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8261
8262 * c-common.c: Fix typos.
8263 * c-common.h: Likewise.
8264
2a99e5e6
LL
82652013-07-13 Lubos Lunak <l.lunak@suse.cz>
8266
8267 PR c++/55203
8268 * c-common.c (c_common_attribute_table): Add warn_unused.
8269 (handle_warn_unused_attribute): New.
8270
c26302d5
JJ
82712013-07-10 Jakub Jelinek <jakub@redhat.com>
8272
8273 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8274 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8275
dfeadaa0
PC
82762013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8277
8278 PR c++/57869
8279 * c.opt: Add Wconditionally-supported.
8280
6a2fa4b2
GS
82812013-07-08 Graham Stott <graham.stott@btinternet.com>
8282
adfac8df 8283 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8284 unused variables l_length and l_node.
8285
ecdbd01a 82862013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8287
8288 PR c/57821
8289 * c-common.c (complete_array_type): Delay folding first index
8290 like other indices. When folding, check for index overflow.
8291
bedc293e
MG
82922013-06-27 Marc Glisse <marc.glisse@inria.fr>
8293
8294 PR c++/57509
8295 * c-common.h (c_build_vec_perm_expr): New complain argument.
8296 * c-common.c (c_build_vec_perm_expr): Likewise.
8297 Use save_expr also in C++.
8298
604b2bfc
GDR
82992013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8300
8301 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8302 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8303 * c-opts.c (c_common_post_options): Likewise.
8304
dfeadaa0 83052013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8306
8307 * array-notation-common.c (length_mismatch_in_expr): Changed the
8308 parameter type's from a dynamic array to a vec_tree. Also removed
8309 the size parameters.
8310 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8311 the change above.
8312
2ce86d2e
BI
83132013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8314
8315 * c-common.h (struct cilkplus_an_parts): New structure.
8316 (struct cilkplus_an_loop_parts): Likewise.
8317 (cilkplus_extract_an_triplets): New prototype.
8318 (fix_sec_implicit_args): Likewise.
8319 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8320 (fix_sec_implicit_args): Likewise.
604b2bfc 8321
07a6825b
BI
83222013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8323
8324 * array-notation-common.c (find_inv_trees): Removed an unwanted
8325 typecasting.
8326 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8327 enum rid to enum tree_code.
8328
08346abd
JH
83292013-06-11 Jan Hubicka <jh@suse.cz>
8330
8331 * c-common.c (handle_alias_ifunc_attribute): Do not set
8332 DECL_EXTERNAL for weakref variables.
8333 * c-pragma.c (handle_pragma_weak): Make sure aliases
8334 are not declared as external.
8335
d60f1706
BI
83362013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8337
8338 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8339 function from c/c-array-notation.c.
8340 (is_cilkplus_reduce_builtin): Likewise.
8341 (find_rank): Likewise.
8342 (extract_array_notation_exprs): Likewise.
8343 (replace_array_notations): Likewise.
8344 (find_inv_trees): Likewise.
8345 (replace_inv_trees): Likewise.
8346 (contains_array_notation_expr): Likewise.
8347 (find_correct_array_notation_type): Likewise.
8348 * c-common.h (struct inv_list): Moved this struct from the file
8349 c/c-array-notation.c and added a new field called additional tcodes.
8350 (length_mismatch_in_expr_p): New prototype.
8351 (is_cilkplus_reduce_builtin): Likewise.
8352 (find_rank): Likewise.
8353 (extract_array_notation_exprs): Likewise.
8354 (replace_array_notation): Likewise.
8355 (find_inv_trees): Likewise.
8356 (replace_inv_trees): Likewise.
8357 (find_correct_array_notation_type): Likewise.
dfeadaa0 8358
36536d79
BI
83592013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8360
8361 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8362 function array_notation_init_builtins is called.
8363 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8364 * c-common.def (ARRAY_NOTATION_REF): New tree.
8365 * c-common.h (build_array_notation_expr): New function declaration.
8366 (build_array_notation_ref): Likewise.
8367 (extract_sec_implicit_index_arg): New extern declaration.
8368 (is_sec_implicit_index_fn): Likewise.
8369 (ARRAY_NOTATION_CHECK): New define.
8370 (ARRAY_NOTATION_ARRAY): Likewise.
8371 (ARRAY_NOTATION_START): Likewise.
8372 (ARRAY_NOTATION_LENGTH): Likewise.
8373 (ARRAY_NOTATION_STRIDE): Likewise.
8374 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8375 ARRAY_NOTATION_REF.
8376 (pp_c_expression): Likewise.
8377 * c.opt (flag_enable_cilkplus): New flag.
8378 * array-notation-common.c: New file.
8379
f7716d57
JJ
83802013-05-14 Jakub Jelinek <jakub@redhat.com>
8381
8382 PR c++/57274
8383 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8384
a5e0cd1d
MG
83852013-05-10 Marc Glisse <marc.glisse@inria.fr>
8386
8387 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8388 vectors.
8389
f6bc1c4a
HS
83902013-05-07 Han Shen <shenhan@google.com>
8391
8392 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8393
3f12f6e9
SKS
83942013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8395
8396 * c-common.c (check_user_alignment): Emit error for negative values.
8397
61949153
PC
83982013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8399
8400 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8401
e93e18e9
PC
84022013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8403
8404 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8405 __GXX_EXPERIMENTAL_CXX1Y__.
8406
44d90fe1 84072013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8408 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8409
8410 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8411 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8412 to simply use OPT_Wpointer_arith.
8413 (c_sizeof_or_alignof_type): Likewise.
8414
13f39b2e
PC
84152013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8416
8417 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8418
4b84d650
JJ
84192013-04-12 Jakub Jelinek <jakub@redhat.com>
8420
8421 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8422 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8423 specifiers.
8424
fb037b5d
SB
84252013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8426
8427 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8428
4e856798
PC
84292013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8430
8431 * c-common.c (pointer_int_sum): Remove dead code.
8432
4b1baac8
RS
84332013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8434
8435 PR middle-end/56524
8436 * c-common.c (handle_optimize_attribute): Don't call
8437 save_optabs_if_changed.
8438
0b50e654
JJ
84392013-03-05 Jakub Jelinek <jakub@redhat.com>
8440
8441 PR middle-end/56461
8442 * c-pch.c (pch_init): Free target_validity at the end.
8443
48c41403
JJ
84442013-03-04 Jakub Jelinek <jakub@redhat.com>
8445
8446 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8447
e664c61c
KS
84482013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8449 Jakub Jelinek <jakub@redhat.com>
8450
8451 PR sanitizer/56454
8452 * c-common.c (handle_no_sanitize_address_attribute): New function.
8453 (c_common_attribute_table): Add no_sanitize_address attribute.
8454 (handle_no_address_safety_analysis_attribute): Add
8455 no_sanitize_address attribute, not no_address_safety_analysis
8456 attribute.
8457
a475fd3d 84582013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8459
8460 PR target/52555
8461 * c-common.c (handle_optimize_attribute): Call
8462 save_optabs_if_changed.
8463
f6007d99
JJ
84642013-02-18 Jakub Jelinek <jakub@redhat.com>
8465 Steven Bosscher <steven@gcc.gnu.org>
8466
8467 PR pch/54117
8468 * c-opts.c (c_common_post_options): If debug info is enabled
8469 and non-dwarf*, refuse to load PCH files and when writing PCH
8470 file warn.
8471
cf35e2b1
JJ
84722013-02-05 Jakub Jelinek <jakub@redhat.com>
8473
8474 PR middle-end/56167
8475 * c-common.c (handle_error_attribute): Fix condition.
8476
32887460
JJ
84772013-01-30 Jakub Jelinek <jakub@redhat.com>
8478
8479 PR c++/55742
8480 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8481
5af057d8
JM
84822013-01-18 Jason Merrill <jason@redhat.com>
8483
8484 PR target/54908
8485 * c.opt (-fextern-tls-init): New.
8486 * c-opts.c (c_common_post_options): Handle it.
8487
cc83c823
JJ
84882013-01-09 Jakub Jelinek <jakub@redhat.com>
8489
8490 PR c/48418
8491 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8492 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8493 and is either negative or bigger or equal to type precision
8494 of the first operand.
8495
a859517f
MP
84962012-12-03 Marek Polacek <polacek@redhat.com>
8497
8498 PR c/55570
8499 * c-common.c (check_user_alignment): Swap order of tests,
8500 check TREE_CODE first.
8501
2d7aa578
ESR
85022012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8503
8504 PR c++/52654
8505 * c-common.h (overflow_type): New enum.
8506 (build_userdef_literal): Add overflow_type argument.
8507 (tree_userdef_literal): Add overflow_type.
8508 (USERDEF_LITERAL_OVERFLOW): New access macro.
8509 * c-common.c (build_userdef_literal): Add overflow_type
8510 argument.
8511 * c-lex.c (c_lex_with_flags): Add overflow_type to
8512 build_userdef_literal calls.
8513 (interpret_integer, interpret_float): Add overflow_type argument.
8514
cc3c4f62
RB
85152012-11-28 Richard Biener <rguenther@suse.de>
8516
8517 PR c/35634
8518 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8519 here and use a type with proper overflow behavior for types that would
8520 need to be promoted for the arithmetic.
8521
77bc5132
JJ
85222012-11-23 Jakub Jelinek <jakub@redhat.com>
8523
8524 PR sanitizer/55435
8525 * c-common.c (handle_no_address_safety_analysis_attribute): New
8526 function.
8527 (c_common_attribute_table): Add no_address_safety_analysis.
8528
5dc99c46
SB
85292012-11-16 Simon Baldwin <simonb@google.com>
8530
8531 * c.opt: Add f[no-]canonical-system-headers.
8532 * c-opts.c (c_common_handle_option): Handle
8533 OPT_fcanonical_system_headers.
8534
a4a0016d
ESR
85352012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8536
8537 PR c++/54413
8538 * c-opts.c (c_common_handle_option): Set new flags.
8539 * c.opt: Describe new flags.
8540
7dbb85a7
JM
85412012-11-09 Jason Merrill <jason@redhat.com>
8542
8543 * c.opt (Wabi-tag): New.
8544
ad7bac31
AK
85452012-11-09 Andi Kleen <ak@linux.intel.com>
8546
8547 PR 55139
8548 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8549 MEMMODEL_MASK
ad7bac31 8550
7332899a
MLI
85512012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8552
8553 PR c/53063
8554 * c.opt (Wformat): Make it Alias Wformat=1.
8555 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8556 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8557 LangEnabledBy.
8558 (Wformat=): RejectNegative. Use LangEnabledBy.
8559 (Wnonnull): Use LangEnabledBy.
8560 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8561 * c-format.c (set_Wformat): Delete.
8562 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8563 (maybe_read_dollar_number): Likewise.
8564 (avoid_dollar_number): Likewise.
8565 (finish_dollar_format_checking): Likewise.
8566 (check_format_info): Likewise.
8567 (check_format_info_main): Likewise.
8568 (check_format_types): Likewise.
8569 (format_type_warning): Likewise.
8570 * c-common.c (int): Likewise.
8571 (check_function_sentinel): Likewise.
8e745a17 8572 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8573
34a180a6
MLI
85742012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8575
8576 PR c/53063
8577 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8578 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8579 Use LangEnabledBy.
8580 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8581 common.opt.
8582 (Wvariadic-macros): Init(1).
8583 * c-opts.c (c_common_handle_option): Do not handle them
8584 explicitly.
8585 (c_common_post_options): Likewise.
8586 (sanitize_cpp_opts): warn_unused_macros is now
8587 cpp_warn_unused_macros.
8588 (push_command_line_include): Likewise.
8589 * c-common.c (warn_unknown_pragmas): Do not define.
8590 * c-common.h (warn_unknown_pragmas): Do not declare.
8591
3f46d6a5
MLI
85922012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8593
8594 PR c/51294
8595 * c-common.c (conversion_warning): Handle conditional expressions.
8596
880661a4
JW
85972012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8598
8599 PR c++/54930
8600 * c.opt (Wreturn_local_addr): Define new option.
8601
4514a96b
JM
86022012-10-25 Jason Merrill <jason@redhat.com>
8603
f14edc1a
JM
8604 * c.opt (Wvirtual-move-assign): New.
8605
4514a96b
JM
8606 * c.opt (Winherited-variadic-ctor): New.
8607
93100c6b
MG
86082012-10-25 Marc Glisse <marc.glisse@inria.fr>
8609
8610 PR c++/54427
8611 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8612
1efcb8c6
JM
86132012-10-23 Joseph Myers <joseph@codesourcery.com>
8614
8615 * c-common.h (pch_cpp_save_state): Declare.
8616 * c-target.def (c_preinclude): New hook.
8617 * c-opts.c (done_preinclude): New.
8618 (push_command_line_include): Handle default preincluded header.
8619 (cb_file_change): Call pch_cpp_save_state when calling
8620 push_command_line_include.
8621 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8622 (pch_cpp_save_state): New.
8623 (pch_init): Call pch_cpp_save_state conditionally, instead of
8624 calling cpp_save_state.
8625
4a0ae68e
MLI
86262012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8627
8628 PR c/53063
8629 PR c/40989
8630 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8631 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8632 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8633 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8634 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8635 * c-opts.c (c_common_handle_option): Remove explicit handling from
8636 here.
8637 (c_common_post_options): Likewise.
8638
67e4210b
EB
86392012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8640
8641 * c-ada-spec.c (LOCATION_COL): Delete.
8642 (compare_location): New function.
8643 (compare_node): Use it.
8644 (compare_comment): Likewise.
8645
65d4f2cd
MLI
86462012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8647
8648 PR c/53063
8649 PR c/40989
8650 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8651 * c-opts.c (c_common_handle_option): Do not set them here. Add
8652 comment.
8653 (c_common_post_options): Likewise.
8654
909881cb
EB
86552012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8656
8657 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8658 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8659 Remove POINTER_TYPE handling, add large unsigned handling and use
8660 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8661
3a785c97
JJ
86622012-10-12 Jakub Jelinek <jakub@redhat.com>
8663
8664 PR c/54381
8665 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8666 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8667 locs and array of 3 trees instead of just single loc and single
8668 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8669 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8670 For *cmp* builtins that take two sources strings report warnings
8671 about first and second source, not about destination and source.
8672
5e54f81d
MG
86732012-10-12 Marc Glisse <marc.glisse@inria.fr>
8674
8675 PR c++/53055
8676 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8677
f5b02f1e
EB
86782012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8679
8680 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8681 declaring something coming from another file.
8682
b46dbc6c
AC
86832012-10-10 Arnaud Charlet <charlet@adacore.com>
8684
f5b02f1e 8685 PR ada/54845
b46dbc6c
AC
8686 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8687
5d9de0d0
PC
86882012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8689
8690 PR c++/54194
8691 * c-common.c (warn_about_parentheses): Add location_t parameter;
8692 use EXPR_LOC_OR_LOC.
8693 * c-common.h: Update declaration.
8694
a212e43f
MG
86952012-10-09 Marc Glisse <marc.glisse@inria.fr>
8696
8697 PR c++/54427
8698 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8699 more operations. Make error messages optional.
8700 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8701 (scalar_to_vector): Declare.
8702
b1db7f91
JM
87032012-10-08 Jason Merrill <jason@redhat.com>
8704
8705 * c-common.c (c_common_reswords): Add thread_local.
8706
e28d52cf
DS
87072012-10-08 Dodji Seketeli <dodji@redhat.com>
8708
8709 PR c++/53528 C++11 attribute support
8710 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8711 new functions.
8712 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8713 static function.
8714 (handle_aligned_attribute): In choose strictest alignment
8715 among many. Use new check_cxx_fundamental_alignment_constraints.
8716 (handle_transparent_union_attribute): In c++11 attribute syntax,
8717 don't look through typedefs.
8718
3b78de56
AC
87192012-10-04 Arnaud Charlet <charlet@adacore.com>
8720
8721 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8722 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8723 out of dumpfile.h.
8724
6040bb5f
DC
87252012-09-25 Dehao Chen <dehao@google.com>
8726
8727 PR middle-end/54645
3b78de56 8728 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8729 map when read in the pch.
8730
3f8257db 87312012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8732
8733 * c-ada-spec.c: Style fixes.
8734
3f8257db 87352012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8736
8737 * c.opt (-fada-spec-parent): Define new command line switch.
8738 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8739 is specified, generate binding spec as a child of the specified unit.
8740
0ccb505d
PC
87412012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8742 Manuel López-Ibáñez <manu@gcc.gnu.org>
8743
8744 PR c++/53210
8745 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8746
c583af79
AC
87472012-08-23 Arnaud Charlet <charlet@adacore.com>
8748
8749 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8750 for pointers, and add missing Convention C pragma.
8751 (print_ada_struct_decl): Add missing aliased keyword.
8752 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8753
1a4049e7
JJ
87542012-08-17 Jakub Jelinek <jakub@redhat.com>
8755
8756 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8757 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8758 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8759 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8760 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8761
70b5e7dc
RG
87622012-08-10 Richard Guenther <rguenther@suse.de>
8763
8764 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8765
f8923f7e
SB
87662012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8767
8768 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8769 instead of separate pp_newline and pp_flush.
8770 (print_c_tree): Likewise.
8771
e45abe1f
RH
87722012-07-26 Richard Henderson <rth@redhat.com>
8773
8774 * c-common.c (handle_hot_attribute): Allow labels.
8775 (handle_cold_attribute): Likewise.
8776
332f1d24
JJ
87772012-07-20 Jakub Jelinek <jakub@redhat.com>
8778
8779 PR c++/28656
8780 * c-common.c (check_function_nonnull): Handle multiple nonnull
8781 attributes properly.
8782
7ee2468b
SB
87832012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8784
8785 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8786 * c-ada-spec.c: Likewise.
8787 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8788
ee7b28eb
SB
87892012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8790
8791 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8792 Remove code conditional on it.
8793
6bdf3519
SB
87942012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8795
8796 * c-gimplify.c: Do not include basic-block.h.
8797 * c-common.c: Do not include linfuncs.h.
8798
532aafad
SB
87992012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8800
8801 * c-common.h: Include tree.h.
8802
8d0d1915
JM
88032012-07-02 Jason Merrill <jason@redhat.com>
8804
8805 PR c++/53524
8806 * c-common.c (get_priority): Call default_conversion.
8807
fbc873ad
UB
88082012-07-01 Uros Bizjak <ubizjak@gmail.com>
8809
8810 * c-pch.c (c_common_write_pch): Remove unused variables.
8811
d4a10d0a
SB
88122012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8813
8814 * cppspec.c: Moved from gcc/ to here.
8815
6f3a2e23
KT
88162012-06-27 Kai Tietz <ktietz@redhat.com>
8817
8818 PR preprocessor/37215
8819 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8820
8ca92d04
SB
88212012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8822
8823 * c-common.h (c_common_print_pch_checksum): Remove.
8824 * c-pch.c: Do not include output.h.
8825 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8826 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8827 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8828 (struct c_pch_header): Remove.
8829 (get_ident): Update gpch version.
8830 (pch_init): Do not print executable_checksum to asm_out_file.
8831 Do not fail if there is no asm_out_file to read back from. Set
8832 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8833 (c_common_write_pch): Verify that nothing was written to asm_out_file
8834 since pch_init was called. Do not write a c_pch_header, and do not
8835 copy from asm_out_file to the PCH.
8836 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8837 the content of asm_out_file from the PCH.
8838 (c_common_print_pch_checksum): Remove.
8839 * c-opts.c (c_common_init): Print out executable_checksum directly.
8840
70f42967
SB
88412012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8842
8843 * c-target.def (objc_declare_unresolved_class_reference,
8844 objc_declare_class_definition): Add new hooks.
8845
a8781821
SB
88462012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8847
8848 * c-lex.c: Do not include output.h.
8849 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8850 Remove uses of ASM_OUTPUT_IDENT.
8851
9e1a8dd1
RR
88522012-06-15 Marc Glisse <marc.glisse@inria.fr>
8853
8854 PR c++/51033
8855 * c-common.h (c_build_vec_perm_expr): Move decl here.
8856 * c-common.c (c_build_vec_perm_expr): Move definition
8857 here.
8858
6f07a821
SB
88592012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8860
8861 * c.opt (fconserve-space): Turn into a no-op.
8862
9faeb493 88632012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8864
8865 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8866 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8867 both the start and end of the function.
8868
a4b7d13c
SB
88692012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8870
8871 * c-common.c: Do not include output.h.
8872 * c-pragma.c: Likewise.
8873
c265f413
SA
88742012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8875
8876 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8877 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8878 (lang_decl_name): Handle namespace decls.
8879
be7a421e
SB
88802012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8881
8882 * c-ada-spec.c: Do not include output.h.
8883 * c-semantics.c: Likewise.
8884
65de6659
JM
88852012-05-29 Joseph Myers <joseph@codesourcery.com>
8886
8887 * c-common.c: Fix typo.
8888
ca5f4331
MM
88892012-05-29 Michael Matz <matz@suse.de>
8890
8891 * c-common.h (c_expand_decl): Remove prototype.
8892
4f7f7aca
MLI
88932012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8894
8895 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8896 * c-opts.c (c_common_handle_option): Remove code handling
8897 warn_missing_braces.
8898
4a792f9b
PC
88992012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8900
8901 PR c++/25137
8902 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8903 -Wmissing_braces.
8904
650dc14a
DS
89052012-05-22 Dodji Seketeli <dodji@redhat.com>
8906
8907 PR c++/53322
8908 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8909
9b095bf1
MLI
89102012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8911
8912 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8913 * c-opts.c (c_common_handle_option): Do not handle explicitly
8914 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8915
0b2c4be5
DS
89162012-05-16 Dodji Seketeli <dodji@redhat.com>
8917
8918 PR preprocessor/7263
ab20d992 8919 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8920 to cpp_classify_number. For diagnostics, use the precise location
8921 instead of the global input_location.
8922
a1bde5af
PC
89232012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8924
d02924ef 8925 PR c++/11856
a1bde5af
PC
8926 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8927
d1ede5f4
BS
89282012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8929
a1bde5af 8930 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8931
f2bc201f
MLI
89322012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8933
8934 PR 53063
8935 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8936 Wreorder): Use LangEnabledBy.
8937 * c-opts.c (c_common_handle_option): Do not enable them
8938 explicitly. Call lang-specific generated functions.
8939 (c_common_post_options): Do not set them here.
8940
95744782
MLI
89412012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8942
8943 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8944 Wmissing-field-initializers,Wmissing-parameter-type,
8945 Wold-style-declaration,Woverride-init): Use EnabledBy.
8946 * c-opts.c (c_common_post_options): Do not set here explicitly.
8947
7d5a5747
MLI
89482012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8949
8950 PR 53063
8951 * c-opts.c (c_common_handle_option): Use handle_generated_option
8952 to enable sub-options.
8953
5a3c9cf2
PC
89542012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8955
8956 PR c++/53158
8957 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8958
3ac8781c
RG
89592012-05-10 Richard Guenther <rguenther@suse.de>
8960
8961 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8962 adjust commentary about TYPE_IS_SIZETYPE types.
8963
1e537948
MLI
89642012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8965
8966 PR c++/53261
8967 * c-common.c (warn_logical_operator): Check that argument of
8968 integer_zerop is not NULL.
8969
f2c4a785
MLI
89702012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8971
8972 PR c/43772
8973 * c-common.c (warn_logical_operator): Do not warn if either side
8974 is already true or false.
8975
50f305ca
MLI
89762012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8977
8978 PR c/51712
8979 * c-common.c (expr_original_type): New.
8980 (shorten_compare): Do not warn for enumeration types.
8981
0c3641b0
MLI
89822012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8983
8984 * c.opt (fpermissive): Add Var(flag_permissive).
8985
7edaa4d2
MG
89862012-04-30 Marc Glisse <marc.glisse@inria.fr>
8987
8988 PR c++/51033
8989 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8990 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8991
b9c8da34
DS
89922012-04-30 Dodji Seketeli <dodji@redhat.com>
8993
8994 Add -Wvarargs option
ab20d992 8995 * c.opt (Wvarargs): Define new option.
b9c8da34 8996
e6c69da0
MLI
89972012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8998
8999 * c-common.c (check_function_arguments): Replace
9000 Wmissing-format-attribute with Wsuggest-attribute=format.
9001
90137d8f
MLI
90022012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
9003
9004 * c.opt (Wsuggest-attribute=format): New. Alias of
9005 Wmissing-format-attribute.
9006 * c-format.c (decode_format_type): Replace
9007 Wmissing-format-attribute with Wsuggest-attribute=format.
9008 (check_function_format): Likewise.
9009
9faeb493 90102012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
9011
9012 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
9013 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
9014 * c.opt: Add Wliteral-suffix.
9015
c1771a20
MLI
90162012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
9017
9018 PR c/44774
9019 * c.opt (Wpedantic): New.
9020 (pedantic): Alias Wpedantic.
9021 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
9022 (c_common_post_options): Likewise.
9023 (sanitize_cpp_opts): Likewise.
9024 * c-lex.c (interpret_float): Likewise.
9025 * c-format.c (check_format_types): Likewise.
9026 * c-common.c (pointer_int_sum): Likewise.
9027 (c_sizeof_or_alignof_type): Likewise.
9028 (c_add_case_label): Likewise.
9029 (c_do_switch_warnings): Likewise.
9030 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
9031
04b391c1
JM
90322012-04-15 Jason Merrill <jason@redhat.com>
9033
9034 PR c++/52818
9035 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
9036 (C_STD_NAME): Distinguish between C++98 and C++11.
9037
ac868f29
EB
90382012-04-11 Eric Botcazou <ebotcazou@adacore.com>
9039
9040 PR target/52624
9041 * c-common.h (uint16_type_node): Rename into...
9042 (c_uint16_type_node): ...this.
9043 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
9044 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
9045
fd4116f4
MLI
90462012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
9047
9048 * c-common.c (warn_if_unused_value): Move definition to here.
9049 * c-common.h (warn_if_unused_value): Move declaration to here.
9050
573ac65e
WB
90512012-03-23 William Bader <williambader@hotmail.com>
9052
9053 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
9054
552b8185
JM
90552012-03-20 Jason Merrill <jason@redhat.com>
9056
9057 * c-common.h (enum cxx_dialect): Add cxx1y.
9058 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
9059 test.
9060 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
9061 * c-opts.c (c_common_post_options): Likewise.
9062 (set_std_cxx1y): New.
9063 (c_common_handle_option): Call it.
9064 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
9065
04398fa8
PC
90662012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
9067
9068 PR c++/14710
9069 * c.opt ([Wuseless-cast]): Add.
9070
d2a12ae7
RG
90712012-03-16 Richard Guenther <rguenther@suse.de>
9072
9073 * c-pretty-print.c (pp_c_initializer_list): Adjust.
9074
a12bf402
MLI
90752012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
9076
9077 PR c++/44783
9078 * c.opt (ftemplate-backtrace-limit) Add.
9079
5c30094f
RO
90802012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9081
9082 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
9083 handling.
9084 * c-pragma.c (handle_pragma_extern_prefix): Remove.
9085 (init_pragma): Don't register extern_prefix.
9086
21fa2faf
RG
90872012-03-12 Richard Guenther <rguenther@suse.de>
9088
9089 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
9090 (builtin_type_for_size): Likewise.
9091
e3793c6f
JJ
90922012-02-13 Jakub Jelinek <jakub@redhat.com>
9093
9094 PR c++/52215
9095 * c-common.c (sync_resolve_params): Don't decide whether to convert
9096 or not based on TYPE_SIZE comparison, convert whenever arg_type
9097 is unsigned INTEGER_TYPE.
9098
93286335
PC
90992012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9100
9101 PR c/52118
9102 * c.opt ([Wunused-local-typedefs]): Fix description.
9103
7a421706
MS
91042012-01-24 Mike Stump <mikestump@comcast.net>
9105
9106 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9107 exactly.
9108
ba9b1f11
RG
91092012-01-18 Richard Guenther <rguenther@suse.de>
9110
9111 * c-opts.c (c_common_post_options): Reset LTO flags if
9112 we are about to generate a PCH.
9113
465406be
PC
91142012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9115
9116 PR c++/51777
9117 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9118 use pp_unsigned_wide_integer.
9119
aee15221
RG
91202012-01-10 Richard Guenther <rguenther@suse.de>
9121
9122 PR middle-end/51806
9123 * c-opts.c (c_common_handle_option): Move -Werror handling
9124 to language independent code.
9125
5720c0dc
RG
91262012-01-05 Richard Guenther <rguenther@suse.de>
9127
9128 PR middle-end/51764
9129 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9130 from common.opt.
9131
73ac190a
PC
91322011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9133
9134 PR c++/51316
9135 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9136 of array types with an unknown bound.
9137
48b0b196
JM
91382011-12-20 Joseph Myers <joseph@codesourcery.com>
9139
9140 * c-common.c (flag_isoc99): Update comment to refer to C11.
9141 (flag_isoc1x): Change to flag_isoc11.
9142 * c-common.h (flag_isoc99): Update comment to refer to C11.
9143 (flag_isoc1x): Change to flag_isoc11.
9144 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9145 C11.
9146 * c-opts.c (set_std_c1x): Change to set_std_c11.
9147 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9148 Call set_std_c11.
9149 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9150 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9151 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9152 standard.
9153 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9154 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9155 (std=gnu1x): Make alias of std=gnu11.
9156
d58d6eb5
JM
91572011-12-19 Jason Merrill <jason@redhat.com>
9158
9159 PR c++/51228
9160 * c-common.c (handle_transparent_union_attribute): Check the first
9161 field if the type is complete.
9162
b3908fcc
JW
91632011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9164
9165 PR libstdc++/51365
9166 * c-common.c (RID_IS_FINAL): Add.
9167 * c-common.h (RID_IS_FINAL): Add.
9168
fea3ca91
IS
91692011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9170
9171 * c.opt (fgnu-runtime): Provide full description.
9172 (fnext-runtime): Likewise.
9173 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9174
62bad7cd
AM
91752011-11-28 Andrew MacLeod <amacleod@redhat.com>
9176
9177 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9178 predefines in one place. Add LOCK_FREE predefines.
9179 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9180 new func.
9181
c466c4ff
AM
91822011-11-24 Andrew MacLeod <amacleod@redhat.com>
9183
9184 PR c/51256
9faeb493 9185 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9186 conditions
9faeb493
UB
9187 (resolve_overloaded_atomic_exchange,
9188 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9189 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9190 error_mark_node for error conditions.
9faeb493 9191
a5952633
RG
91922011-11-08 Richard Guenther <rguenther@suse.de>
9193
9194 PR middle-end/51010
ab20d992 9195 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9196
0a35513e
AH
91972011-11-07 Richard Henderson <rth@redhat.com>
9198 Aldy Hernandez <aldyh@redhat.com>
9199 Torvald Riegel <triegel@redhat.com>
9200
9201 Merged from transactional-memory.
9202
9203 * c-common.c (handle_tm_wrap_attribute,
9204 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9205 (struct c_common_reswords): Added __transaction* keywords.
9206 (struct c_common_attribute_table): Added transaction* and tm_regparm
9207 attributes.
9208 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9209 masks.
9210 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9211 find_tm_attribute): Declare.
9212
6d87092d
JM
92132011-11-07 Jason Merrill <jason@redhat.com>
9214
9215 PR c++/35688
9216 * c-common.c, c-common.h: Revert yesterday's changes.
9217
8e7860a1
JM
92182011-11-06 Jason Merrill <jason@redhat.com>
9219
9220 PR c++/35688
9221 * c-common.c (decl_has_visibility_attr): Split out from...
9222 (c_determine_visibility): ...here.
9223 * c-common.h: Declare it.
9224
d19fa6b5
JM
92252011-11-06 Joseph Myers <joseph@codesourcery.com>
9226
9227 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9228 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9229 type.
9230 (check_user_alignment): New. Split out of
9231 handle_aligned_attribute. Disallow integer constants with
9232 noninteger types. Conditionally allow zero.
9233 (handle_aligned_attribute): Use check_user_alignment.
9234 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9235
86951993
AM
92362011-11-06 Andrew MacLeod <amacleod@redhat.com>
9237 Richard Henderson <rth@redhat.com>
9238
9239 Merged from cxx-mem-model.
9240
9241 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9242 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9243 parameters that are the same type size.
9244 (get_atomic_generic_size): New. Find size of generic
9245 atomic function parameters and do typechecking.
9246 (add_atomic_size_parameter): New. Insert size into parameter list.
9247 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9248 either __atomic_exchange_n or external library call.
9faeb493 9249 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9250 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9251 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9252 __atomic_load_n or an external library call.
9253 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9254 __atomic_store_n or an external library call.
9255 (resolve_overloaded_builtin): Handle new __atomic builtins.
9256
cf9e9959
EB
92572011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9258
9259 PR c++/50608
9260 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9261 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9262 <INDIRECT_REF>: Return the argument.
9263 <ARRAY_REF>: Remove special code for negative offset.
9264 Call fold_build_pointer_plus instead of size_binop.
9265 (fold_offsetof): Remove STOP_REF argument and adjust.
9266 * c-common.h (fold_offsetof_1): Declare.
9267 (fold_offsetof): Remove STOP_REF argument.
9268
25339f10
JM
92692011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9270
9271 PR c++/50810
9272 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9273 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9274 Wnarrowing for C++0x and C++98.
9275 * c.opt ([Wnarrowing]): Update.
9276
89401152
PC
92772011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9278
9279 PR c++/44277
9280 * c.opt: Add Wzero-as-null-pointer-constant.
9281
97e3ad20
JM
92822011-10-31 Jason Merrill <jason@redhat.com>
9283
15694fdd
JM
9284 * c.opt (-fdeduce-init-list): Off by default.
9285
97e3ad20
JM
9286 PR c++/50920
9287 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9288 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9289 and -Wc++11-compat.
9290 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9291
fb9120e3
RAV
92922011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9293
9294 PR c++/30066
9295 * c.opt (fvisibility-inlines-hidden): Description change.
9296
3ce4f9e4
ESR
92972011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9298
9299 Implement C++11 user-defined literals.
9300 * c-common.c (build_userdef_literal): New.
9301 * c-common.def: New tree code.
9302 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9303 * c-lex.c (interpret_float): Add suffix parm.
9304 (c_lex_with_flags): Build literal tokens.
9305
5f53c243
PC
93062011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9307
9308 PR c++/50841
9309 Revert:
9310 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9311
9312 PR c++/50810
9313 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9314 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9315 Wnarrowing for C++0x and C++98.
9316 * c.opt ([Wnarrowing]): Update.
9317
263734e1
PC
93182011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9319
9320 PR c++/50810
9321 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9322 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9323 Wnarrowing for C++0x and C++98.
9324 * c.opt ([Wnarrowing]): Update.
9325
d2e312d7
PC
93262011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9327
9328 PR c++/45385
9329 * c-common.c (conversion_warning): Remove code looking for
9330 artificial operands.
9331
d17687f6
DS
93322011-10-18 Dodji Seketeli <dodji@redhat.com>
9333
9334 PR bootstrap/50760
9335 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9336 !NO_IMPLICIT_EXTERN_C.
d17687f6 9337
fc8396e9
PC
93382011-10-17 Michael Spertus <mike_spertus@symantec.com>
9339
9340 * c-common.c (c_common_reswords): Add __bases,
9341 __direct_bases.
9342 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9343
93442011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9345
9346 PR c++/50757
9347 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9348
847e697a
TT
93492011-10-15 Tom Tromey <tromey@redhat.com>
9350 Dodji Seketeli <dodji@redhat.com>
9351
9352 * c.opt (fdebug-cpp): New option.
9353 * c-opts.c (c_common_handle_option): Handle the option.
9354 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9355 output stream in parameter. Factorized from ...
9356 (maybe_print_line): ... this. Dump location debug information when
9357 -fdebug-cpp is in effect.
9358 (print_line_1): New static function. Takes an output stream in
9359 parameter. Factorized from ...
9360 (print_line): ... here. Dump location information when -fdebug-cpp
9361 is in effect.
9362 (scan_translation_unit): Dump location information when
9363 -fdebug-cpp is in effect.
9364
92582b75
TT
93652011-10-15 Tom Tromey <tromey@redhat.com>
9366 Dodji Seketeli <dodji@redhat.com>
9367
9368 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9369 without argument.
9370 * c-opts.c (c_common_handle_option)<case
9371 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9372 cases. Handle -ftrack-macro-expansion with and without argument.
9373
46427374
TT
93742011-10-15 Tom Tromey <tromey@redhat.com>
9375 Dodji Seketeli <dodji@redhat.com>
9376
9377 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9378 (print_line, cb_define, do_line_change): Adjust to avoid touching
9379 the internals of struct line_map. Use the public API instead.
9380 * c-pch.c (c_common_read_pch): Likewise.
9381 * c-lex.c (fe_file_change): Likewise.
9382
fc8396e9
PC
93832011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9384
9385 PR c++/17212
9386 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9387
93882011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9389
9390 PR c++/33067
9391 * c-pretty-print.c (pp_c_floating_constant): Output
9392 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9393
e79983f4
MM
93942011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9395
9396 * c-common.c (def_builtin_1): Delete old interface with two
9397 parallel arrays to hold standard builtin declarations, and replace
9398 it with a function based interface that can support creating
9399 builtins on the fly in the future. Change all uses, and poison
9400 the old names. Make sure 0 is not a legitimate builtin index.
9401 * c-omp.c (c_finish_omp_barrier): Ditto.
9402 (c_finish_omp_taskwait): Ditto.
9403 (c_finish_omp_flush): Ditto.
9404
6637388f
TG
94052011-10-11 Tristan Gingold <gingold@adacore.com>
9406
9407 * c.opt: (fallow-parameterless-variadic-functions): New.
9408
3797cb21
DS
94092011-09-08 Dodji Seketeli <dodji@redhat.com>
9410
9411 PR c++/33255 - Support -Wunused-local-typedefs warning
9412 * c-common.h (struct c_language_function::local_typedefs): New
9413 field.
9faeb493
UB
9414 (record_locally_defined_typedef, maybe_record_typedef_use)
9415 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9416 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9417 (maybe_record_typedef_use)
9418 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9419 * c.opt: Declare new -Wunused-local-typedefs flag.
9420
693ddb1b
EB
94212011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9422
9423 PR middle-end/50266
9424 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9425 computations.
9426
830c740f
RG
94272011-09-05 Richard Guenther <rguenther@suse.de>
9428
9429 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9430 of integer_minus_one_node for empty array upper bounds.
9431
892a371f
DS
94322011-08-28 Dodji Seketeli <dodji@redhat.com>
9433
9434 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9435 it's the first time it's being called on this main TU.
9436
0e3fdb48
RB
94372011-08-24 Richard Guenther <rguenther@suse.de>
9438
9439 PR c/49396
9440 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9441
94422011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9443
9444 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9445 defined in cpp_init_builtins and c_cpp_builtins.
9446
d4a83c10
JM
94472011-08-19 Joseph Myers <joseph@codesourcery.com>
9448
9449 * c-common.c (c_common_reswords): Add __builtin_complex.
9450 * c-common.h (RID_BUILTIN_COMPLEX): New.
9451
bbceee64
JM
94522011-08-18 Joseph Myers <joseph@codesourcery.com>
9453
9454 * c-common.c (c_common_reswords): Add _Noreturn.
9455 (keyword_is_function_specifier): Handle RID_NORETURN.
9456 * c-common.h (RID_NORETURN): New.
9457
3f8257db 94582011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9459
9460 * c-common.c (unsafe_conversion_p): New function. Check if it is
9461 unsafe to convert an expression to the type.
9462 (conversion_warning): Adjust, use unsafe_conversion_p.
9463 * c-common.h (unsafe_conversion_p): New function declaration.
9464
20906c66
JJ
94652011-08-02 Jakub Jelinek <jakub@redhat.com>
9466
9467 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9468 (c_finish_omp_taskyield): New prototype.
9469 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9470 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9471 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9472 or RHS1 have side-effects, evaluate those too in the right spot,
9473 if it is a decl and LHS is also a decl, error out if they
9474 aren't the same.
9475 (c_finish_omp_taskyield): New function.
9476 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9477 * c-pragma.c (omp_pragmas): Add taskyield.
9478 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9479 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9480 PRAGMA_OMP_CLAUSE_MERGEABLE.
9481
770e5a2e
DS
94822011-07-25 Dodji Seketeli <dodji@redhat.com>
9483
9484 * c-common.h (set_underlying_type): Remove parm name from
9485 declaration.
9486
1baae426
RG
94872011-07-25 Romain Geissler <romain.geissler@gmail.com>
9488
9489 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9490
fcb21722
JM
94912011-07-22 Jason Merrill <jason@redhat.com>
9492
76f86d00
JM
9493 PR c++/49793
9494 * c.opt (Wnarrowing): New.
9495
3a636414
JM
9496 PR c++/30112
9497 * c-common.h: Declare c_linkage_bindings.
9498 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9499
fcb21722
JM
9500 PR c++/49813
9501 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9502 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9503 as flag_isoc99 for 'restrict'.
9504 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9505
02614448
ILT
95062011-07-21 Ian Lance Taylor <iant@google.com>
9507
9508 PR middle-end/49705
9509 * c-common.c (c_disable_warnings): New static function.
9510 (c_enable_warnings): New static function.
9511 (c_fully_fold_internal): Change local unused_p to bool. Call
9512 c_disable_warnings and c_enable_warnings rather than change
9513 c_inhibit_evaluation_warnings.
9514
34429675
JM
95152011-07-20 Jason Merrill <jason@redhat.com>
9516
9517 PR c++/6709 (DR 743)
9518 PR c++/42603 (DR 950)
9519 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9520 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9521 (CPP_DECLTYPE): New.
9522 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9523
5d49b6a7
RG
95242011-07-19 Richard Guenther <rguenther@suse.de>
9525
9526 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9527 * c-omp.c (c_finish_omp_for): Likewise.
9528
e84a58ff
EB
95292011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9530
9531 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9532 body on the next line.
9533
329af3c7
JM
95342011-07-08 Jason Merrill <jason@redhat.com>
9535
4063e61b
JM
9536 PR c++/45437
9537 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9538
329af3c7
JM
9539 PR c++/49673
9540 * c-common.c (c_apply_type_quals_to_decl): Don't check
9541 TYPE_NEEDS_CONSTRUCTING.
9542
1a072294
RG
95432011-07-06 Richard Guenther <rguenther@suse.de>
9544
9545 * c-common.c (c_common_nodes_and_builtins):
9546 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9547
fce5dddd
RG
95482011-07-05 Richard Guenther <rguenther@suse.de>
9549
9550 * c-common.c (c_common_nodes_and_builtins): Build all common
9551 tree nodes first.
9552
45d439ac
JJ
95532011-06-27 Jakub Jelinek <jakub@redhat.com>
9554
56300785
JJ
9555 * c-common.h (c_tree_chain_next): New static inline function.
9556
45d439ac
JJ
9557 * c-common.c (check_builtin_function_arguments): Handle
9558 BUILT_IN_ASSUME_ALIGNED.
9559
e0a8ecf2
AM
95602011-06-21 Andrew MacLeod <amacleod@redhat.com>
9561
9562 * c-common.c: Add sync_ or SYNC__ to builtin names.
9563 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9564
95652011-06-20 Pierre Vittet <piervit@pvittet.com>
9566
9567 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9568 handler.
9569 (gen_pragma_handler): New union.
9570 (internal_pragma_handler): New type.
9571 (c_register_pragma_with_data)
9572 (c_register_pragma_with_expansion_and_data): New functions.
9573
9574 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9575 (c_register_pragma, c_register_pragma_with_expansion)
9576 (c_invoke_pragma_handler): Changed to work with
9577 internal_pragma_handler.
9578 (c_register_pragma_with_data)
9579 (c_register_pragma_with_expansion_and_data): New functions.
9580
677f3fa8
JM
95812011-06-14 Joseph Myers <joseph@codesourcery.com>
9582
9583 * c-common.c: Include common/common-target.h.
9584 (handle_section_attribute): Use
9585 targetm_common.have_named_sections.
9586 * c-cppbuiltin.c: Include common/common-target.h.
9587 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9588
d7fc8c14
RG
95892011-06-10 Richard Guenther <rguenther@suse.de>
9590
9591 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9592 to print a IDENTIFIER_NODE.
9593
10e48e39
RO
95942011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9595 Joseph Myers <joseph@codesourcery.com>
9596
9597 * c.opt (fbuilding-libgcc): New option.
9598 * c-cppbuiltin.c (c_cpp_builtins): Define
9599 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9600
6976ae51
JM
96012011-06-07 Jason Merrill <jason@redhat.com>
9602
3ff60975
JM
9603 * c-common.c (max_tinst_depth): Lower default to 900.
9604
6976ae51
JM
9605 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9606
009db074
RG
96072011-06-07 Richard Guenther <rguenther@suse.de>
9608
9609 * c-common.c (c_common_nodes_and_builtins): Do not set
9610 size_type_node or call set_sizetype.
9611
b4592b92
DS
96122011-06-07 Dodji Seketeli <dodji@redhat.com>
9613
9614 PR debug/49130
9615 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9616 type when using pointer comparison to compare types.
b4592b92 9617
014ab419
JW
96182011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9619
9620 * c.opt: Add -Wdelete-non-virtual-dtor.
9621 * c-opts.c (c_common_handle_option): Include it in -Wall.
9622
4f60111f
NF
96232011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9624
9625 PR bootstrap/49190
9626
9627 Revert:
9628 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9629
9630 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9631 not tree_common.
9632
4cc4f2f4
JJ
96332011-05-27 Jakub Jelinek <jakub@redhat.com>
9634
9635 PR c++/49165
9636 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9637 C++ don't call c_common_truthvalue_conversion on void type arms.
9638
38e01f9e
NF
96392011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9640
9641 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9642 (stmt_list_stack): Define.
9643 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9644 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9645
92e948a8
NF
96462011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9647
9648 * c-common.c (warning_candidate_p): Check for BLOCKs.
9649
a2fc3e63
NF
96502011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9651
9652 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9653 not tree_common.
9654
0957c029
JJ
96552011-05-25 Jakub Jelinek <jakub@redhat.com>
9656
9657 * c-common.c (def_fn_type): Remove extra va_end.
9658
828fb3ba
JM
96592011-05-23 Jason Merrill <jason@redhat.com>
9660
9661 PR c++/48106
9662 * c-common.c (c_common_get_narrower): New.
9663 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9664
dde05067
NF
96652011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9666
9667 * c-common.h (check_function_arguments): Tweak prototype of
9668 check_function_arguments.
9669 * c-common.c (check_function_arguments): Likewise. Adjust
9670 calls to check_function_nonnull, check_function_format, and
9671 check_function_sentinel.
9672 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9673 separate attributes and typelist arguments. Use
9674 FOREACH_FUNCTION_ARGS to iterate over argument types.
9675
3c0d13bf
PC
96762011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9677
9678 * c-common.c (c_common_reswords): Reorder.
9679 * c-common.h (rid): Likewise.
9680
8242dd04
NF
96812011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9682
9683 * c-common.c (def_fn_type): Don't call build_function_type, call
9684 build_function_type_array or build_varargs_function_type_array
9685 instead.
9686 (c_common_nodes_and_builtins): Likewise.
9687
3d528853
NF
96882011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9689
9690 * c-common.c (c_add_case_label): Omit the loc argument to
9691 build_case_label.
9692 * c-common.h (build_case_label): Remove.
9693 * c-semantics.c (build_case_label): Remove.
9694
a04a722b
JM
96952011-05-05 Joseph Myers <joseph@codesourcery.com>
9696
9697 * c-objc.h (objc_start_method_definition): Update prototype.
9698 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9699
e19a18d4
NF
97002011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9701
9702 * c-common.c (check_main_parameter_types): Reindent. Don't use
9703 TYPE_ARG_TYPES directly.
9704 (handle_nonnull_attribute): Likewise.
9705 (sync_resolve_params): Likewise.
9706 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9707 to check_format_string.
9708 (handle_format_attribute): Likewise.
9709 (check_format_string): Take a function type to examine instead of
9710 a type list. Use a function_arg_iterator to step through argument
9711 types.
9712
c62c040f
RG
97132011-05-04 Richard Guenther <rguenther@suse.de>
9714
9715 * c-common.c (fix_string_type): Use size_int for index type bounds.
9716 (start_fname_decls): Do not pass NULL to build_int_cst.
9717 (c_init_attributes): Likewise.
9718 * c-lex.c (c_lex_with_flags): Likewise.
9719
c12ff9d8
JM
97202011-04-27 Jason Merrill <jason@redhat.com>
9721
9722 * c-common.c (make_tree_vector_from_list): New.
9723 * c-common.h: Declare it.
9724
304dfbe3
RG
97252011-04-26 Richard Guenther <rguenther@suse.de>
9726
9727 PR preprocessor/48248
9728 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9729 for output size with -P.
9730
3c0d13bf
PC
97312011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9732
9733 * c-common.c (struct c_common_resword): Add __underlying_type.
9734 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9735
04695783
JM
97362011-04-20 Jim Meyering <meyering@redhat.com>
9737
9738 * c-format.c (init_dollar_format_checking): Remove useless
9739 if-before-free.
9740
0dc33c3c
NP
97412011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9742
9743 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9744 (objc_detect_field_duplicates): New.
0dc33c3c 9745 * stub-objc.c: Likewise.
3c0d13bf 9746
c59633d9
NP
97472011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9748
9749 * stub-objc.c (objc_declare_protocols): Renamed to
9750 objc_declare_protocol.
9751 * c-objc.h: Likewise.
3c0d13bf 9752
32dabdaf
NP
97532011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9754
9755 * stub-objc.c (objc_declare_class): Updated argument name.
9756
81f653d6
NF
97572011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9758
9759 * c-common.h (c_common_init_ts): Declare.
9760 * c-common.c (c_common_init_ts): Define.
9761
eb345401
NP
97622011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9763
9764 * c-objc.h (objc_build_message_expr): Updated prototype.
9765 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9766
a358e188
MJ
97672011-04-12 Martin Jambor <mjambor@suse.cz>
9768
9769 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9770 of cgraph_node.
9771
e6313a78
RG
97722011-04-11 Richard Guenther <rguenther@suse.de>
9773
9774 * c-common.c (complete_array_type): Build a range type of
9775 proper type.
9776
dcf0c47e
NF
97772011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9778
9779 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9780 (handle_type_generic_attribute): Likewise.
9781
1ee44b26
JM
97822011-04-07 Jason Merrill <jason@redhat.com>
9783
9784 PR c++/48450
9785 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9786 conversion from C++0x scoped enum.
9787
acce4e77
JM
97882011-04-06 Joseph Myers <joseph@codesourcery.com>
9789
9790 * c-target-def.h: New file.
9791 * c-target.def: New file.
9792 * c-target.h: New file.
9793 * c-common.c (targetcm): Don't define here.
9794 * c-common.h (default_handle_c_option): Declare.
9795 * c-format.c: Include c-target.h instead of target.h.
9796 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9797 include tm.h.
9798 (default_handle_c_option): Move from targhooks.c.
9799
e2eefb55
JJ
98002011-03-29 Jakub Jelinek <jakub@redhat.com>
9801
9802 PR preprocessor/48248
9803 * c-ppoutput.c (print): Add src_file field.
9804 (init_pp_output): Initialize it.
9805 (maybe_print_line): Don't optimize by adding up to 8 newlines
9806 if map->to_file and print.src_file are different file.
9807 (print_line): Update print.src_file.
9808
ba78087b
KT
98092011-03-25 Kai Tietz <ktietz@redhat.com>
9810
9811 * c-ada-spec.c (compare_comment): Use filename_cmp
9812 instead of strcmp for filename.
9813
0edf1bb2
JL
98142011-03-25 Jeff Law <law@redhat.com>
9815
adfac8df 9816 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9817
c7dc8804
JM
98182011-03-25 Jason Merrill <jason@redhat.com>
9819
9820 * c.opt: Add -std=c++03.
9821
d1d879b1
EB
98222011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9823
9824 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9825
3f8257db 98262011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9827
9828 PR target/12171
5050afdf
KT
9829 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9830 Display allowed attributes for function pointer types.
9831 (pp_c_attributes_display): New function to display
9832 attributes having affects_type_identity flag set to true.
9833 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9834
62d784f7
KT
9835 * c-common.c (c_common_attribute_table):
9836 Add new element.
9837 (c_common_format_attribute_table): Likewise.
9838
82d37118
JM
98392011-03-18 Jason Merrill <jason@redhat.com>
9840
49a000c3
JM
9841 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9842 * c-common.h: Don't declare it here.
9843 * c-common.c: Or define it here.
9844 * c-opts.c (c_common_handle_option): Or set it here.
9845
82d37118
JM
9846 PR c++/35315
9847 * c-common.c (handle_transparent_union_attribute): Don't
9848 make a duplicate type in C++.
9849
17bc631c
JM
98502011-03-15 Jason Merrill <jason@redhat.com>
9851
9852 * c-common.c (max_constexpr_depth): New.
9853 * c-common.h: Declare it.
9854 * c-opts.c (c_common_handle_option): Set it.
9855 * c.opt (fconstexpr-depth): New option.
9856
1b9b91a6
JM
98572011-03-11 Jason Merrill <jason@redhat.com>
9858
f231b5ff
JM
9859 * c-common.c (attribute_takes_identifier_p): Add missing const.
9860
1b9b91a6
JM
9861 PR c++/46803
9862 * c-common.c (attribute_takes_identifier_p): Assume that an
9863 unknown attribute takes an identifier.
9864
a19e4d44
NF
98652011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9866
9867 PR c/47786
9868 * c-common.c (c_type_hash): Call list_length instead of iterating
9869 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9870
982d62f6
JJ
98712011-02-19 Jakub Jelinek <jakub@redhat.com>
9872
9873 PR c/47809
9874 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9875
0a256240
NP
98762011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9877
9878 * c.opt (fobjc-abi-version=) New.
9879 (fobjc-nilcheck): New.
9880
ba9e6dd5
NF
98812011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9882
9883 PR c++/46890
9884 * c-common.h (keyword_is_decl_specifier): Declare.
9885 * c-common.c (keyword_is_decl_specifier): Define.
9886 (keyword_is_function_specifier): New function.
9887
7273813a
JJ
98882011-01-26 Jakub Jelinek <jakub@redhat.com>
9889
9890 PR c/47473
9891 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9892 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9893 REAL_TYPE.
9894
908ef79b
AC
98952011-01-26 Arnaud Charlet <charlet@adacore.com>
9896
9897 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9898
237e9384
JJ
98992011-01-26 Jakub Jelinek <jakub@redhat.com>
9900
9901 PR pch/47430
9902 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9903 after init_c_lex if pch_file is set.
9904
47ea1edf
DK
99052011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9906
d4dba752 9907 PR c++/43601
47ea1edf
DK
9908 * c.opt (-fkeep-inline-dllexport): New switch.
9909
2aa9c6ae
RG
99102011-01-12 Richard Guenther <rguenther@suse.de>
9911
9912 PR middle-end/32511
9913 * c-common.c (handle_weak_attribute): Warn instead of error
9914 on declaring an inline function weak.
9915
7bd11157
TT
99162011-01-05 Tom Tromey <tromey@redhat.com>
9917
9918 * c-common.h (lvalue_error): Update.
9919 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9920 not error.
9921
0e66e494 99222010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9923
b4f588c4
NP
9924 PR objc/47075
9925 * c-objc.h (objc_finish_message_expr): Added argument to
9926 prototype.
9927
f4da8dce
NF
99282010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9929
9930 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9931 Use prototype_p.
9932
46270f14
NP
99332010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9934
9935 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9936 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9937
4816c593
NF
99382010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9939
9940 * c-common.h (readonly_error): Declare.
9941 * c-common.c (readonly_error): Define.
9942
7a6daeb0
NF
99432010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9944
9945 * c-common.h (invalid_indirection_error): Declare.
9946 * c-common.c (invalid_indirection_error): Define.
9947
892f6119
RG
99482010-12-03 Richard Guenther <rguenther@suse.de>
9949
9950 PR c/46745
9951 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9952 (pp_c_unary_expression): Likewise.
9953 (pp_c_expression): Likewise.
9954
6c39e757
NP
99552010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9956
9957 * c-common.h (objc_finish_function): New.
9958 (objc_non_volatilized_type): Removed.
9959 (objc_type_quals_match): Removed.
9960 * stub-objc.c (objc_finish_function): New.
9961 (objc_non_volatilized_type): Removed.
9962 (objc_type_quals_match): Removed.
9faeb493 9963
7c475d11
JM
99642010-11-30 Joseph Myers <joseph@codesourcery.com>
9965
9966 * c-common.h (parse_optimize_options): Declare.
9967 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9968 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9969
71f3e391
JM
99702010-11-29 Joseph Myers <joseph@codesourcery.com>
9971
9972 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9973 GET_ENVIRONMENT.
9974 * c-pch.c (O_BINARY): Don't define here.
9975 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9976
d5fabb58
JM
99772010-11-25 Joseph Myers <joseph@codesourcery.com>
9978
9979 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9980 targetm.except_unwind_info.
9981
299404a1
JM
99822010-11-23 Joseph Myers <joseph@codesourcery.com>
9983
9984 * c-opts.c (c_common_handle_option): Pass location to
9985 set_struct_debug_option.
9986
c98cd5bf
JM
99872010-11-23 Joseph Myers <joseph@codesourcery.com>
9988
9989 * c-common.c (visibility_options): Move from ../opts.c.
9990 * c-common.h (struct visibility_flags, visibility_options):
9991 Declare here.
9992 * c-opts.c (finish_options): Rename to c_finish_options.
9993 (c_common_init): Update call to finish_options.
9994
a9546771
NP
99952010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9996
9997 PR objc/34033
9998 * c-lex.c (lex_string): Check that each string in an Objective-C
9999 string concat sequence starts with either one or zero '@', and
10000 that there are no spurious '@' signs at the end.
10001
24a57808
JM
100022010-11-20 Joseph Myers <joseph@codesourcery.com>
10003
10004 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
10005 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
10006 HANDLE_PRAGMA_VISIBILITY.
10007 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
10008 HANDLE_PRAGMA_VISIBILITY): Don't define.
10009 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
10010
a9aa2c3a
NF
100112010-11-20 Nathan Froyd <froydnj@codesourcery.com>
10012
10013 PR c++/16189
10014 PR c++/36888
10015 PR c++/45331
10016 * c-common.h (keyword_begins_type_specifier): Declare.
10017 (keyword_is_storage_class_specifier): Declare.
10018 (keyword_is_type_qualifier): Declare.
10019 * c-common.c (keyword_begins_type_specifier): New function.
10020 (keyword_is_storage_class_specifier): New function.
10021 (keyword_is_type_qualifier): Declare.
10022
5386338c
JM
100232010-11-19 Joseph Myers <joseph@codesourcery.com>
10024
10025 PR c/46547
10026 * c-common.c (in_late_binary_op): Define.
10027 (c_common_truthvalue_conversion): Check in_late_binary_op before
10028 calling c_save_expr.
10029 * c-common.h (in_late_binary_op): Declare.
10030
69ccdddb
JM
100312010-11-19 Joseph Myers <joseph@codesourcery.com>
10032
10033 * c-opts.c (c_common_handle_option): Update calls to
10034 set_struct_debug_option.
10035
6b192a09
NP
100362010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
10037
10038 * c-common.h (objc_declare_protocols): Added additional argument.
10039 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 10040
fb52b50a
NF
100412010-11-18 Nathan Froyd <froydnj@codesourcery.com>
10042
10043 PR c/33193
10044 * c-common.h (build_real_imag_expr): Declare.
10045 * c-semantics.c (build_real_imag_expr): Define.
10046
b37421c6
JM
100472010-11-17 Joseph Myers <joseph@codesourcery.com>
10048
10049 * c-opts.c (c_common_parse_file): Take no arguments.
10050 * c-common.h (c_common_parse_file): Update prototype.
10051
07078664
JJ
100522010-11-16 Jakub Jelinek <jakub@redhat.com>
10053
10054 PR c++/46401
10055 * c-common.c (warning_candidate_p): Don't track non-const calls
10056 or STRING_CSTs.
10057
c6a13190
ILT
100582010-11-15 Ian Lance Taylor <iant@google.com>
10059
10060 * c-lex.c (init_c_lex): Set macro debug callbacks if
10061 flag_dump_go_spec is set.
10062
925e8657
NP
100632010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
10064
10065 * c-common.h (objc_build_incr_expr_for_property_ref): New.
10066 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
10067
bb0a9581
NF
100682010-11-15 Nathan Froyd <froydnj@codesourcery.com>
10069
10070 PR preprocessor/45038
10071 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
10072 dialects.
10073
c5fa0890
JM
100742010-11-12 Joseph Myers <joseph@codesourcery.com>
10075
10076 * c-common.h (c_family_lang_mask): Declare.
10077 * c-opts.c (c_family_lang_mask): Make extern.
10078 * c-pragma.c (handle_pragma_diagnostic): Use
10079 control_warning_option.
10080
a4d8c676
JM
100812010-11-12 Joseph Myers <joseph@codesourcery.com>
10082
10083 * c-common.c (parse_optimize_options): Update call to
10084 decode_options.
10085 * c-common.h (c_common_handle_option): Update prototype.
10086 * c-opts.c (c_common_handle_option): Take location_t parameter and
10087 pass it to other functions.
10088
f954bd2c
JM
100892010-11-11 Joseph Myers <joseph@codesourcery.com>
10090
10091 * c-opts.c (warning_as_error_callback): Remove.
10092 (c_common_initialize_diagnostics): Don't call
10093 register_warning_as_error_callback.
10094 (c_common_handle_option): Handle -Werror=normalized= here.
10095
d8a07487
JM
100962010-11-10 Joseph Myers <joseph@codesourcery.com>
10097
10098 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10099 in diagnostic.
10100 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10101 letter.
10102 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10103 Remove trailing '.' from diagnostics.
10104 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10105
d5478783
JM
101062010-11-10 Joseph Myers <joseph@codesourcery.com>
10107
10108 * c-common.c (parse_optimize_options): Pass global_dc to
10109 decode_options.
10110 * c-opts.c (c_common_handle_option): Pass &global_options to
10111 set_Wstrict_aliasing.
10112 * c.opt (v): Don't mark Common or document here.
10113
91ebb981
IS
101142010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10115
10116 PR target/44981
10117 * c-format.c (format_type): New type gcc_objc_string_format_type.
10118 (valid_stringptr_type_p): New.
10119 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10120 (check_format_string): Pass expected type, use
91ebb981
IS
10121 valid_stringptr_type_p (), check that the format string types are
10122 consistent with the format specification.
10123 (decode_format_attr): Warn if NSString is used outside objective-c.
10124 (format_types_orig): Add NSString.
10125 (format_name): New.
10126 (format_flags): New.
10127 (check_format_arg): Handle format strings requiring an external parser.
10128 first_target_format_type: New variable.
10129 (handle_format_attribute): Set up first_target_format_type, pass the
10130 expected format arg string type to check_format_string().
ab20d992 10131 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10132 * stub-objc.c (objc_string_ref_type_p): New.
10133 (objc_check_format_arg): New.
10134
bede2adc
NP
101352010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10136
9faeb493 10137 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10138 * c-common.h (objc_build_class_component_ref): New.
10139 * stub-objc.c (objc_build_class_component_ref): New.
10140
9a179d01
NP
101412010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10142
10143 * c.opt (Wproperty-assign-default): New option.
10144
22d8d616
NP
101452010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10146
10147 Implemented -fobjc-std=objc1 flag.
10148 * c.opt (fobjc-std=objc1): New option.
10149
2debdb4f
NP
101502010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10151
10152 Implemented format and noreturn attributes for Objective-C methods.
10153 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10154 attribute for Objective-C methods.
10155
ec52b111
JM
101562010-10-31 Jason Merrill <jason@redhat.com>
10157
10158 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10159 EXPR_LOC_OR_HERE.
10160
46a88c12
NP
101612010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10162
10163 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10164 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10165 (objc_add_property_declaration): Removed arguments for copies and
10166 ivar.
10167 (objc_build_getter_call): Renamed to
10168 objc_maybe_build_component_ref.
10169 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10170 (objc_is_property_ref): New.
10171 * c-common.c (c_common_reswords): Removed copies and ivar.
10172 * stub-objc.c (objc_add_property_declaration): Removed arguments
10173 for copies and ivar.
10174 (objc_build_getter_call): Renamed to
10175 objc_maybe_build_component_ref.
10176 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10177 (objc_is_property_ref): New.
9faeb493 10178
1e4bf85b
AC
101792010-10-29 Arnaud Charlet <charlet@adacore.com>
10180 Matthew Gingell <gingell@adacore.com>
10181
10182 * c-ada-spec.c (separate_class_package): New function.
10183 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10184 name of their enclosing package.
10185 (print_ada_declaration): Use separate_class_package.
10186
81f0bab2
JM
101872010-10-27 Jason Merrill <jason@redhat.com>
10188
2b08f2c5
JM
10189 * c-common.c (c_common_reswords): Add __is_literal_type.
10190 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10191
81f0bab2
JM
10192 * c-common.c (check_case_value): Remove special C++ code.
10193
200290f2
NP
101942010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10195
10196 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10197 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10198 and RID_LAST_PATTR.
10199 (objc_add_property_declaration): Added additional arguments.
10200 (objc_property_attribute_kind): Removed.
10201 (objc_set_property_attr): Removed.
10202 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10203 copy and nonatomic.
10204 * stub-objc.c (objc_add_property_declaration): Added additional
10205 arguments.
10206 (objc_set_property_attr): Removed.
9faeb493 10207
f614132b
NP
102082010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10209
10210 * c-common.h (objc_add_property_variable): Renamed to
10211 objc_add_property_declaration. Added location argument.
10212 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10213
b8a18805
NP
102142010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10215
10216 * c-common.h (objc_maybe_printable_name): New.
10217 * stub-objc.c (objc_maybe_printable_name): New.
10218
3f8257db
JJ
102192010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10220 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10221
10222 * c-common.h (c_common_mark_addressable_vec): Declare.
10223 * c-common.c (c_common_mark_addressable_vec): New function.
10224
249a82c4
NP
102252010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10226
10227 * c-common.h (objc_set_method_type): Removed.
10228 (objc_add_method_declaration): Added boolean argument.
10229 (objc_start_method_definition): Same change.
10230 (objc_build_method_signature): Same change.
10231 * stub-objc.c (objc_set_method_type): Removed.
10232 (objc_add_method_declaration): Added boolean argument.
10233 (objc_start_method_definition): Same change.
10234 (objc_build_method_signature): Same change.
10235
977e30bc
NP
102362010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10237
10238 * c-common.h (finish_file): Removed.
10239 (objc_write_global_declarations): New.
10240 * c-opts.c (c_common_parse_file): Do not call finish_file.
10241 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10242
da57d1b9
NP
102432010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10244
10245 Implemented parsing @synthesize and @dynamic for
10246 Objective-C/Objective-C++.
10247 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10248 (objc_add_synthesize_declaration): New.
10249 (objc_add_dynamic_declaration): New.
10250 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10251 * stub-objc.c (objc_add_synthesize_declaration): New.
10252 (objc_add_dynamic_declaration): New.
9faeb493 10253
0069111f
MM
102542010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10255
10256 PR target/46041
10257 * c-cppbuiltin.c (mode_has_fma): Move function here from
10258 builtins.c. Don't use the fma optab, instead just use the
10259 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10260 using -save-temps.
10261
e426b47b
NP
102622010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10263
10264 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10265
3f8257db 10266 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10267
9faeb493 10268 Radar 4330422
e426b47b
NP
10269 * c-common.h (objc_non_volatilized_type): New declaration
10270 * stub-objc.c (objc_non_volatilized_type): New stub.
10271
90fbfdc3
NP
102722010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10273
e426b47b 10274 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10275
ab20d992 10276 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10277
9faeb493 10278 Radar 4133425
90fbfdc3 10279 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10280 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10281
c37d8c30
IS
102822010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10283
10284 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10285 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10286 (objc_ivar_visibility_kind): New enum.
10287 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10288 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10289 visibility enum.
10290
1b1562a5
MM
102912010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10292
10293 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10294 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10295 has the appropriate fma builtins.
10296 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10297
668ea4b1
IS
102982010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10299
1b1562a5 10300 merge from FSF apple 'trunk' branch.
3f8257db 10301 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10302
668ea4b1
IS
10303 Radars 4436866, 4505126, 4506903, 4517826
10304 * c-common.c (c_common_resword): Define @property and its attributes.
10305 * c-common.h: Define property attribute enum entries.
10306 (OBJC_IS_PATTR_KEYWORD): New.
10307 (objc_property_attribute_kind): New enum.
10308 Declare objc_set_property_attr (), objc_add_property_variable (),
10309 objc_build_getter_call () and objc_build_setter_call ().
10310 * stub-objc.c (objc_set_property_attr): New stub.
10311 (objc_add_property_variable): Likewise.
10312 (objc_build_getter_call): Likewise.
10313 (objc_build_setter_call) Likewise.
1b1562a5 10314
a1178b30
IS
103152010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10316
1b1562a5 10317 merge from FSF apple 'trunk' branch.
ab20d992 10318 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10319
10320 Radar 3803157 (method attributes)
10321 * c-common.c (handle_deprecated_attribute): Recognize
10322 objc methods as valid declarations.
10323 * c-common.h: Declare objc_method_decl ().
1b1562a5 10324 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10325
a75bfaa6
JM
103262010-10-08 Joseph Myers <joseph@codesourcery.com>
10327
10328 * c-common.c (parse_optimize_options): Call
10329 decode_cmdline_options_to_array_default_mask before
10330 decode_options. Update arguments to decode_options.
10331 * c-common.h (c_common_init_options_struct): Declare.
10332 * c-opts.c (c_common_init_options_struct): New. Split out from
10333 c_common_init_options.
10334
f05b9d93
NP
103352010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10336
10337 Implemented fast enumeration for Objective-C.
10338 * c-common.h (objc_finish_foreach_loop): New.
10339 * stub-objc.c (objc_finish_foreach_loop): New.
10340
1ebe4b4f
JM
103412010-10-05 Joseph Myers <joseph@codesourcery.com>
10342
10343 * c-common.h (struct diagnostic_context): Don't declare here.
10344 (c_common_initialize_diagnostics): Declare using
10345 diagnostic_context typedef.
10346 * c-opts.c (c_common_handle_option): Pass global_dc to
10347 handle_generated_option.
10348
d4d24ba4
JM
103492010-10-04 Joseph Myers <joseph@codesourcery.com>
10350
10351 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10352 handle_generated_option.
10353
478a1c5b
ILT
103542010-10-03 Ian Lance Taylor <iant@google.com>
10355
10356 * c.opt (-fplan9-extensions): New option.
10357
82a1c2fe
FXC
103582010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10359
10360 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10361 Remove.
10362 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10363 of duplicating code.
10364
92902b1b
IS
103652010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10366
10367 * c-common.c: Add two new entries for @optional
10368 and @required keywords.
10369
10370 merge from FSF 'apple/trunk' branch.
3f8257db 10371 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10372
10373 Radar 4386773
10374 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10375 objective-c keywords.
10376 (objc_set_method_opt): New declaration.
10377 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10378
46625112
JM
103792010-09-30 Joseph Myers <joseph@codesourcery.com>
10380
10381 * c-common.c (handle_optimize_attribute): Pass &global_options to
10382 cl_optimization_save and cl_optimization_restore.
10383 * c-opts.c (c_common_handle_option): Pass &global_options to
10384 handle_generated_option.
10385 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10386 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10387 &global_options to cl_optimization_restore.
10388
49b91f05
NP
103892010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10390
10391 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10392 Objective-C/Objective-C++ keywords.
10393
13ed556f 103942010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10395
9faeb493
UB
10396 Merge from 'apple/trunk' branch on FSF servers.
10397
3f8257db 10398 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10399
10400 Radar 4281748
10401 * c-common.h (objc_check_global_decl): New declaration.
10402 * stub-objc.c (objc_check_global_decl): New stub.
10403
f0036cca
JM
104042010-09-29 Joseph Myers <joseph@codesourcery.com>
10405
10406 * c.opt: Don't use VarExists.
10407
e3339d0f
JM
104082010-09-29 Joseph Myers <joseph@codesourcery.com>
10409
10410 * c-common.c (c_cpp_error): Update names of diagnostic_context
10411 members.
10412 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10413 cl_optimization members.
10414 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10415 sanitize_cpp_opts, finish_options): Update names of cpp_options
10416 members.
10417
1973201f
NP
104182010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10419
10420 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10421 (objc_is_reserved_word): Removed.
10422 * c-common.c: Updated comments.
10423 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10424 objc_is_reserved_word.
10425 * stub-objc.c (objc_is_reserved_word): Removed.
10426
f7e71da5
IS
104272010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10428
9faeb493 10429 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10430 include attributes.
10431 (objc_start_method_definition): Likewise.
10432 (objc_build_keyword_decl): Likewise.
10433 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10434 (objc_start_method_definition): Likewise.
10435 (objc_build_keyword_decl): Likewise.
10436
c165dca7
IS
104372010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10438
10439 * c-common.h (objc_start_class_interface): Adjust prototype.
10440 (objc_start_category_interface): Likewise.
10441 (objc_start_protocol): Likewise.
10442 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10443 (objc_start_class_interface): Likewise.
10444 (objc_start_category_interface): Likewise.
10445
7458026b
ILT
104462010-09-27 Ian Lance Taylor <iant@google.com>
10447
10448 * c-common.c (c_common_attribute_table): Add no_split_stack.
10449 (handle_no_split_stack_attribute): New static function.
10450
b581b85b
NP
104512010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10452
9faeb493 10453 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10454
3f8257db 10455 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10456
9faeb493 10457 Radar 4229905
b581b85b
NP
10458 * c-common.h (objc_have_common_type): New declaration.
10459 * stub-objc.c (objc_have_common_type): New stub.
10460
10461 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10462
10463 Radar 4154928
10464 * c-common.h (objc_common_type): New prototype.
9faeb493 10465 * stub-objc.c (objc_common_type): New stub.
b581b85b 10466
46a4da10
JH
104672010-09-24 Jan Hubicka <jh@suse.cz>
10468
10469 * c-common.c (handle_leaf_attribute): New function.
10470 (struct attribute_spec c_common_att): Add leaf.
10471
e200444e
JM
104722010-09-22 Joseph Myers <joseph@codesourcery.com>
10473
10474 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10475 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10476 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10477 -include-barrier, -include-directory, -include-directory=,
10478 -include-directory-after, -include-directory-after=,
10479 -include-prefix, -include-prefix=, -include-with-prefix,
10480 -include-with-prefix=, -include-with-prefix-after,
10481 -include-with-prefix-after=, -include-with-prefix-before,
10482 -include-with-prefix-before=, -no-integrated-cpp,
10483 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10484 -output=, -pedantic, -pedantic-errors, -preprocess,
10485 -print-missing-file-dependencies, -trace-includes, -traditional,
10486 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10487 -user-dependencies, -verbose, -write-dependencies,
10488 -write-user-dependencies, no-integrated-cpp, traditional): New.
10489
29a80ea6
NP
104902010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10491
10492 PR objc/23710
ac1fc2fc
NP
10493 * c-common.h (objc_start_method_definition): Return bool instead
10494 of void.
10495 * stub-objc.c (objc_start_method_definition): Return bool instead
10496 of void.
10497
104982010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10499
10500 PR objc/25965
10501 * c-common.h (objc_get_interface_ivars): New declaration.
10502 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10503
de621752
ILT
105042010-09-15 Ian Lance Taylor <iant@google.com>
10505
10506 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10507 messages. Remove period at end of warning message.
de621752 10508
ba885ec5
NS
105092010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10510
10511 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10512 (handle_alias_attribute): ... here.
10513 (handle_ifunc_attribute): New.
10514
c5ee1358
MM
105152010-09-06 Mark Mitchell <mark@codesourcery.com>
10516
10517 * c-common.h (do_warn_double_promotion): Declare.
10518 * c-common.c (do_warn_double_promotion): Define.
10519
0a0b3574
MM
105202010-09-05 Mark Mitchell <mark@codesourcery.com>
10521
10522 * c.opt (Wdouble-promotion): New.
10523
d1779886
JM
105242010-09-02 Joseph Myers <joseph@codesourcery.com>
10525
10526 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10527 fvtable-thunks, fxref): Mark no longer supported in help text.
10528
2d2bd949
JM
105292010-09-02 Joseph Myers <joseph@codesourcery.com>
10530
10531 * c.opt (Wimport, fall-virtual, falt-external-templates,
10532 fdefault-inline, fenum-int-equiv, fexternal-templates,
10533 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10534 fname-mangling-version-, fnew-abi, fnonnull-objects,
10535 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10536 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10537 applicable.
10538 (fhandle-exceptions): Mark with Alias and Warn.
10539 * c-opts.c (c_common_handle_option): Don't handle options marked
10540 as ignored.
10541
5de8299c
JM
105422010-09-02 Joseph Myers <joseph@codesourcery.com>
10543
10544 * c.opt (Wcomments, Werror-implicit-function-declaration,
10545 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10546 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10547 aliases.
10548 * c-common.c (option_codes): Use OPT_Wcomment instead of
10549 OPT_Wcomments.
10550 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10551 Don't handle options marked as aliases.
10552
0ceb0201
RG
105532010-08-25 Richard Guenther <rguenther@suse.de>
10554
10555 * c-common.c (c_common_get_alias_set): Remove special
10556 handling for pointers.
10557
ac47786e
NF
105582010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10559
10560 * c-common.c: Use FOR_EACH_VEC_ELT.
10561 * c-gimplify.c: Likewise.
10562 * c-pragma.c: Likewise.
10563
c878765b
JM
105642010-08-16 Joseph Myers <joseph@codesourcery.com>
10565
10566 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10567 RejectDriver.
10568 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10569 RejectDriver.
10570 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10571 instead of OPT_MDX and OPT_MMDX.
10572
603349bf
JM
105732010-08-16 Joseph Myers <joseph@codesourcery.com>
10574
10575 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10576
644fa7ac
JM
105772010-08-12 Joseph Myers <joseph@codesourcery.com>
10578
10579 * c.opt (MD, MMD): Change to MDX and MMDX.
10580 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10581
481e1176
JM
105822010-08-11 Joseph Myers <joseph@codesourcery.com>
10583
10584 * c-opts.c (c_common_handle_option): Call handle_generated_option
10585 instead of handle_option.
10586
ac8dc9f7
NF
105872010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10588
10589 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10590 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10591
4f8c876d
NF
105922010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10593
10594 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10595 (pending_redefine_extname): Change type to a VEC.
10596 (add_to_renaming_pragma_list): Update for new type of
10597 pending_redefine_extname.
ac8dc9f7 10598 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10599
3b0c690e
AC
106002010-08-04 Arnaud Charlet <charlet@adacore.com>
10601
10602 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10603 visited.
10604 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10605 decide whether a type has already been declared/seen.
10606 Do not go to the original type.
10607 (dump_nested_types): New parameter forward.
10608 Generate forward declaration if needed and mark type as visited.
10609 (print_ada_declaration): Call dump_nested_types if not already done.
10610 Mark types as visited.
10611
1890bccc
JM
106122010-08-03 Joseph Myers <joseph@codesourcery.com>
10613
10614 * c.opt (-print-pch-checksum): Remove option.
10615 * c-opts.c (c_common_handle_option): Don't handle
10616 OPT_print_pch_checksum.
10617
5f20c657
JM
106182010-07-27 Joseph Myers <joseph@codesourcery.com>
10619
10620 * c-common.h (c_common_handle_option): Update prototype and return
10621 value type.
10622 * c-opts.c (c_common_handle_option): Update prototype and return
10623 value type. Update calls to handle_option and
10624 enable_warning_as_error.
10625
f551f80c
JJ
106262010-07-27 Jakub Jelinek <jakub@redhat.com>
10627
10628 PR c/45079
10629 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10630
61ff2bdc
JM
106312010-07-27 Joseph Myers <joseph@codesourcery.com>
10632
10633 * c-common.h (c_common_missing_argument): Remove.
10634 * c-opts.c (c_common_missing_argument): Remove.
10635 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10636 idirafter, imacros, include, isysroot, isystem, iquote): Add
10637 MissingArgError.
10638 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10639
7a9bf9a4
JM
106402010-07-27 Joseph Myers <joseph@codesourcery.com>
10641
10642 * c-common.h (c_common_option_lang_mask,
10643 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10644 New.
10645 (c_common_init_options): Update prototype.
10646 * c-opts.c (c_common_option_lang_mask): New.
10647 (c_common_initialize_diagnostics): Split out of
10648 c_common_init_options.
10649 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10650 New.
10651 (c_common_init_options): Update prototype. Use decoded options in
10652 search for -lang-asm.
10653
910ad8de
NF
106542010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10655
10656 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10657 * c-format.c: Likewise.
10658
718f9c0f
MLI
106592010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10660
10661 * c-common.h: Include diagnostic-core.h. Error if already
10662 included.
10663 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10664
4d451982
MLI
106652010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10666
adfac8df 10667 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10668 Do not include expr.h
10669 (vector_mode_valid_p): Move here.
10670
119fe915
SB
106712010-06-21 DJ Delorie <dj@redhat.com>
10672
10673 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10674 allow these pragmas anywhere.
10675
106762010-06-14 Jakub Jelinek <jakub@redhat.com>
10677
10678 PR bootstrap/44509
10679 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10680 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10681 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10682 ggc_strdup instead of xstrdup.
10683
106842010-06-10 Jakub Jelinek <jakub@redhat.com>
10685
10686 * c-cppbuiltin.c: Include cpp-id-data.h.
10687 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10688 (lazy_hex_fp_value): New function.
10689 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10690
6662d794
MLI
106912010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10692
10693 * c-gimplify.c: Do not include tree-flow.h
10694
38f8b050
JR
106952010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10696
10697 PR other/44034
10698 * c-common.c: Rename targetm member:
10699 targetm.enum_va_list -> targetm.enum_va_list_p
10700
9589f23e
AS
107012010-06-28 Anatoly Sokolov <aesok@post.ru>
10702
10703 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10704
3b06d379
SB
107052010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10706
10707 * c-cppbuiltin.c: Do not include except.h.
10708
d166d4c3
AK
107092010-06-24 Andi Kleen <ak@linux.intel.com>
10710
9faeb493
UB
10711 * c-common.c (warn_for_omitted_condop): New.
10712 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10713
70cb8be6
JM
107142010-06-21 Joseph Myers <joseph@codesourcery.com>
10715
10716 * c.opt (lang-objc): Remove.
10717 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10718
a4c97feb
JR
107192010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10720
10721 * c-opts.c: Include "tm_p.h".
10722
6e2f1956
JM
107232010-06-20 Joseph Myers <joseph@codesourcery.com>
10724
10725 * c-common.c (parse_optimize_options): Update call to
10726 decode_options.
10727
bc87224e
NF
107282010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10729
10730 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10731 new type of types_used_by_cur_var_decl.
10732
b49cf425
JR
107332010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10734
10735 PR bootstrap/44512
10736 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10737 for C++ standard compliance.
10738
59f9c2ed
JM
107392010-06-16 Jason Merrill <jason@redhat.com>
10740
10741 * c.opt: Add -Wnoexcept.
10742
33766b66
RG
107432010-06-16 Richard Guenther <rguenther@suse.de>
10744
10745 PR c/44555
10746 * c-common.c (c_common_truthvalue_conversion): Remove
10747 premature and wrong optimization concering ADDR_EXPRs.
10748
eff7e30c
AC
107492010-06-15 Arnaud Charlet <charlet@adacore.com>
10750
10751 * c-ada-spec.c (dump_sloc): Remove column info.
10752 (is_simple_enum): New function.
10753 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10754 enum types when relevant.
10755
6312e84d
MLI
107562010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10757
9faeb493 10758 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10759 location.
10760
1cb42611
JM
107612010-06-10 Joseph Myers <joseph@codesourcery.com>
10762
10763 * c-opts.c (c_common_handle_option): Don't handle
10764 OPT_fshow_column.
10765
a9429e29
LB
107662010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10767
10768 * c-pragma.c (push_alignment): Use typed GC allocation.
10769 (handle_pragma_push_options): Likewise.
10770
10771 * c-common.c (parse_optimize_options): Likewise.
10772
10773 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10774 option.
10775
5498f011
JM
107762010-06-07 Joseph Myers <joseph@codesourcery.com>
10777
10778 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10779 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10780 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10781 flag_signed_bitfields, warn_strict_null_sentinel,
10782 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10783 flag_gen_declaration, flag_no_gnu_keywords,
10784 flag_implement_inlines, flag_implicit_templates,
10785 flag_implicit_inline_templates, flag_optional_diags,
10786 flag_elide_constructors, flag_default_inline, flag_rtti,
10787 flag_conserve_space, flag_access_control, flag_check_new,
10788 flag_new_for_scope, flag_weak, flag_working_directory,
10789 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10790 flag_enforce_eh_specs, flag_threadsafe_statics,
10791 flag_pretty_templates): Remove.
10792 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10793 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10794 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10795 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10796 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10797 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10798 flag_no_gnu_keywords, flag_implement_inlines,
10799 flag_implicit_templates, flag_implicit_inline_templates,
10800 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10801 flag_rtti, flag_conserve_space, flag_access_control,
10802 flag_check_new, flag_new_for_scope, flag_weak,
10803 flag_working_directory, flag_use_cxa_atexit,
10804 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10805 flag_threadsafe_statics, flag_pretty_templates,
10806 warn_strict_null_sentinel): Remove.
10807 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10808 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10809 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10810 fimplicit-inline-templates, fimplicit-templates,
10811 flax-vector-conversions, fms-extensions, fnil-receivers,
10812 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10813 frtti, fshort-double, fshort-enums, fshort-wchar,
10814 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10815 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10816 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10817 gen-decls, undef): Use Var.
10818 (fdefault-inline, foptional-diags): Document as doing nothing.
10819 * c-opts.c (c_common_handle_option): Remove cases for options now
10820 using Var. Mark ignored options as such.
10821
39dabefd
SB
108222010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10823
9faeb493 10824 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10825 * c-common.def: Likewise.
10826 * c-common.h: Likewise.
10827 * c-cppbuiltin.c: Likewise.
10828 * c-dump.c: Likewise.
10829 * c-format.c: Likewise.
10830 * c-format.h : Likewise.
10831 * c-gimplify.c: Likewise.
10832 * c-lex.c: Likewise.
10833 * c-omp.c: Likewise.
10834 * c.opt: Likewise.
10835 * c-opts.c: Likewise.
10836 * c-pch.c: Likewise.
10837 * c-ppoutput.c: Likewise.
10838 * c-pragma.c: Likewise.
10839 * c-pragma.h: Likewise.
10840 * c-pretty-print.c: Likewise.
10841 * c-pretty-print.h: Likewise.
10842 * c-semantics.c: Likewise.
10843 * stub-objc.c: Likewise.
10844
10845 * c-common.c: Include gt-c-family-c-common.h.
10846 * c-pragma.c: Include gt-c-family-c-pragma.h.
10847\f
8d9254fc 10848Copyright (C) 2010-2020 Free Software Foundation, Inc.
39dabefd
SB
10849
10850Copying and distribution of this file, with or without modification,
10851are permitted in any medium without royalty provided the copyright
10852notice and this notice are preserved.