]> gcc.gnu.org Git - gcc.git/blame - gcc/c-family/ChangeLog
libgcc: Declare __dso_handle only if DEFAULT_USE_CXA_ATEXIT is true
[gcc.git] / gcc / c-family / ChangeLog
CommitLineData
d68f5d45
DM
12019-12-09 David Malcolm <dmalcolm@redhat.com>
2
3 * c-format.c (range_label_for_format_type_mismatch::get_text):
4 Replace label_text ctor called with true with label_text::take.
5
d3e28653
DM
62019-12-09 David Malcolm <dmalcolm@redhat.com>
7
8 * c-format.c (selftest::test_type_mismatch_range_labels): Remove
9 initial newline from expected outputs.
10 * c-opts.c (c_diagnostic_finalizer): Add pp_newline call before
11 call to diagnostic_show_locus.
12
abd6d8cc
JJ
132019-12-06 Jakub Jelinek <jakub@redhat.com>
14
15 * c-cppbuiltin.c (c_cpp_builtins): Don't define __cpp_consteval for
16 now.
17
7906797e
MP
182019-12-05 Marek Polacek <polacek@redhat.com>
19 Jakub Jelinek <jakub@redhat.com>
20
21 PR c++/91353 - P1331R2: Allow trivial default init in constexpr contexts.
22 * c-cppbuiltin.c (c_cpp_builtins): Adjust the value of __cpp_constexpr.
23
5c04da88
MP
242019-12-05 Marek Polacek <polacek@redhat.com>
25
26 PR c++/92271 - make __is_same alias for __is_same_as.
27 * c-common.c: Add __is_same, an alias for __is_same_as.
28
43aae289
MP
292019-12-03 Marek Polacek <polacek@redhat.com>
30
31 PR c++/91363 - P0960R3: Parenthesized initialization of aggregates.
32 * c-cppbuiltin.c (c_cpp_builtins): Predefine
33 __cpp_aggregate_paren_init=201902 for -std=c++2a.
34
d7ddfbcb
JH
352019-11-30 Jan Hubicka <hubicka@ucw.cz>
36
37 * c-attribs.c (handle_symver_attribute): New function
38 (c_common_attributes): Add symver.
39
65ef05d0
RS
402019-11-30 Richard Sandiford <richard.sandiford@arm.com>
41
42 * c-common.c (pointer_int_sum): Use verify_type_context to check
43 whether the target allows pointer arithmetic for the types involved.
44 (c_sizeof_or_alignof_type, c_alignof_expr): Use verify_type_context
45 to check whether the target allows sizeof and alignof operations
46 for the types involved.
47
1a291106
JM
482019-11-27 Jason Merrill <jason@redhat.com>
49
50 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
51
05d6cb1a
JJ
522019-11-26 Jakub Jelinek <jakub@redhat.com>
53
54 PR c++/61414
55 * c-attribs.c (handle_mode_attribute): Add mode attribute to
56 ENUMERAL_TYPEs.
57
5b8d9367
JM
582019-11-25 Joseph Myers <joseph@codesourcery.com>
59
60 PR c/91985
61 * c-common.c (c_common_type_for_mode): Handle decimal
62 floating-point types being NULL_TREE.
63 * c-format.c (get_format_for_type_1): Handle specified types being
64 NULL_TREE.
65 * c-lex.c (interpret_float): Give an error for decimal
66 floating-point constants when decimal floating-point not
67 supported.
68
1fbf51cb
JJ
692019-11-23 Jakub Jelinek <jakub@redhat.com>
70
71 PR middle-end/83859
72 * c-attribs.c (append_access_attrs): Avoid buffer overflow. Avoid
73 memory leak. Use XNEWVEC macro. Use auto_diagnostic_group to
74 group warning with inform together.
75 (handle_access_attribute): Formatting fix.
76
761df906
JJ
772019-11-22 Jakub Jelinek <jakub@redhat.com>
78
bdaf8be1
JJ
79 PR c/90677
80 * c-common.h (identifier_global_tag): Declare.
81 * c-format.c (get_pointer_to_named_type): Renamed to ...
82 (get_named_type): ... this. Use identifier_global_tag instead of
83 identifier_global_value, handle the return value being a TYPE_P.
84 (init_dynamic_diag_info): Adjust get_pointer_to_named_type callers
85 to call get_named_type instead. Formatting fixes.
86
c2ecce6d 87 Implement P1902R1, Missing feature-test macros 2017-2019.
761df906
JJ
88 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_init_captures
89 and __cpp_generic_lambdas for -std=c++2a. Define
90 __cpp_designated_initializers, __cpp_constexpr_in_decltype and
91 __cpp_consteval for -std=c++2a. Remove a FIXME comment about
92 __cpp_concepts for -std=c++2a.
93
54aa6b58
MS
942019-11-22 Martin Sebor <msebor@redhat.com>
95
96 PR middle-end/83859
97 * c-attribs.c (handle_access_attribute): New function.
98 (c_common_attribute_table): Add new attribute.
99 (get_argument_type): New function.
100 (append_access_attrs): New function.
101 (get_nonnull_operand): Rename...
102 (get_attribute_operand): ...to this.
103 * c-common.c (get_nonnull_operand): Rename...
104 (get_attribute_operand): ...to this.
105
6c80b1b5
JM
1062019-11-21 Joseph Myers <joseph@codesourcery.com>
107
108 * c-attribs.c (handle_fallthrough_attribute): Use pedwarn instead
109 of warning.
110
192961ff
JM
1112019-11-19 Joseph Myers <joseph@codesourcery.com>
112
113 * c-common.c (attribute_fallthrough_p): In C, use pedwarn not
114 warning for standard attributes mixed with fallthrough attributes.
115
f8aea5e3
JM
1162019-11-15 Joseph Myers <joseph@codesourcery.com>
117
118 * c-attribs.c (handle_fallthrough_attribute): Remove static.
119 * c-common.h (handle_fallthrough_attribute): Declare.
120
2cc94aa8
JM
1212019-11-15 Joseph Myers <joseph@codesourcery.com>
122
123 * c-attribs.c (handle_deprecated_attribute): Remove static.
124 * c-common.h (handle_deprecated_attribute): Declare.
125
7c5890cc
JM
1262019-11-14 Joseph Myers <joseph@codesourcery.com>
127
128 * c-lex.c (lex_charconst): Make CPP_UTF8CHAR constants unsigned
129 char for C.
130
b2417b59
JJ
1312019-11-14 Jakub Jelinek <jakub@redhat.com>
132
d0ec7c93
JJ
133 * c-omp.c (c_omp_check_context_selector): Add nvidia to the list of
134 valid vendors.
135
b2417b59
JJ
136 * c-omp.c (c_omp_check_context_selector): Handle name lists
137 containing string literals. Don't diagnose atomic_default_mem_order
138 with multiple props.
139
00be2a5f
JM
1402019-11-13 Joseph Myers <joseph@codesourcery.com>
141
142 * c-cppbuiltin.c (builtin_define_float_constants): Also define
143 NORM_MAX constants. Update call to get_max_float.
144 (LAZY_HEX_FP_VALUES_CNT): Update value to include NORM_MAX
145 constants.
146
2dbad62d
EB
1472019-11-13 Eric Botcazou <ebotcazou@adacore.com>
148
149 * c-ada-spec.c (get_underlying_decl): Do not look through typedefs.
150 (dump_forward_type): Do not generate a declaration for function types.
151 (dump_nested_type) <ARRAY_TYPE>: Do not generate a nested declaration
152 of the component type if it is declared in another file.
153
6ed76044
ML
1542019-11-12 Martin Liska <mliska@suse.cz>
155
156 * c-opts.c (c_common_post_options):
157 Use SET_OPTION_IF_UNSET.
158
62aee289
MR
1592019-11-12 Maciej W. Rozycki <macro@codesourcery.com>
160 Frederik Harwath <frederik@codesourcery.com>
161
162 gcc/c-family/
163 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_SERIAL enumeration
164 constant.
165 * c-pragma.c (oacc_pragmas): Add "serial" entry.
166
f486280c
RS
1672019-11-08 Richard Sandiford <richard.sandiford@arm.com>
168
169 * c-common.h (gnu_vector_type_p): New function.
170 * c-common.c (c_build_vec_perm_expr): Require __builtin_shuffle
171 vectors to satisfy gnu_vector_type_p.
172 (c_build_vec_convert): Likewise __builtin_convertvector.
173 (convert_vector_to_array_for_subscript): Likewise when applying
174 implicit vector to array conversion.
175 (scalar_to_vector): Likewise when converting vector-scalar
176 operations to vector-vector operations.
177
017c6491
JM
1782019-11-08 Joseph Myers <joseph@codesourcery.com>
179
180 * c.opt (Wold-style-definition): Initialize to -1.
181 * c-opts.c (c_common_post_options): Set warn_old_style_definition
182 to flag_isoc2x if not set explicitly.
183
c01bd174
JM
1842019-11-07 Joseph Myers <joseph@codesourcery.com>
185
186 * c-attribs.c (parse_tm_stmt_attr): Handle scoped attributes.
187
0df65305
JM
1882019-11-05 Jason Merrill <jason@redhat.com>
189
190 * c-opts.c (c_common_post_options): -fconcepts-ts implies
191 -fconcepts.
192
e0c866dd
KK
1932019-11-04 Kamlesh Kumar <kamleshbhalui@gmail.com>
194
195 * c-opts.c (c_common_post_options): Update
196 latest_abi_version.
197
f968ef9b
JJ
1982019-11-02 Jakub Jelinek <jakub@redhat.com>
199
d0c464d2
JJ
200 * c-common.h (c_omp_get_context_selector): Remove.
201 * c-omp.c (c_omp_get_context_selector): Moved to omp-general.c
202 and renamed to omp_get_context_selector.
203
917dd789
JJ
204 * c-omp.c (c_omp_mark_declare_variant): Use
205 omp_context_selector_set_compare.
206
f968ef9b
JJ
207 PR c++/88335 - Implement P1073R3: Immediate functions
208 * c-common.h (enum rid): Add RID_CONSTEVAL.
209 * c-common.c (c_common_reswords): Add consteval.
210
5f6705b7
JJ
2112019-11-01 Martin Sebor <msebor@redhat.com>
212
213 PR middle-end/91679
214 PR middle-end/91647
215 PR middle-end/91463
216 PR middle-end/92312
217 * c-pretty-print.c (direct_abstract_declarator): Print
218 bound in zero-length arrays.
219 * c.opt (-Wzero-length-bounds): New option.
220
43f1814c
NS
2212019-10-30 Nathan Sidwell <nathan@acm.org>
222
223 * c-cppbuiltin.c (c_cpp_builtins): Add 'L' suffix to feature
224 macros.
225
ad1539d5
MS
2262019-10-28 Martin Sebor <msebor@redhat.com>
227
228 PR c/66970
229 * c-common.c (c_common_nodes_and_builtins): Call c_define_builtins
230 even when only preprocessing.
231 * c-common.h (names_builtin_p): Declare new function.
232 * c-lex.c (init_c_lex): Set has_builtin.
233 (c_common_has_builtin): Define a new function.
234 * c-ppoutput.c (init_pp_output): Set has_builtin.
235
135df52c
JJ
2362019-10-24 Jakub Jelinek <jakub@redhat.com>
237
238 * c-common.h (c_omp_context_selector_matches): Remove.
239 * c-omp.c (c_omp_context_selector_matches): Remove.
240 * c-attribs.c (c_common_attribute_table): Add
241 "omp declare target {host,nohost,block}" attributes.
242
8ad0c477
JM
2432019-10-17 JeanHeyd Meneide <phdofthehouse@gmail.com>
244
245 * c-lex.c (c_common_has_attribute): Update nodiscard value.
246
56898e43
RS
2472019-10-14 Richard Sandiford <richard.sandiford@arm.com>
248
249 * c-common.h (user_facing_original_type_p): Declare.
250 * c-common.c: Include c-spellcheck.h.
251 (user_facing_original_type_p): New function.
252
20de9568
JJ
2532019-10-12 Jakub Jelinek <jakub@redhat.com>
254
255 * c-common.h (c_omp_mark_declare_variant,
256 c_omp_context_selector_matches): Declare.
257 * c-omp.c: Include attribs.h, gimplify.h, cgraph.h, symbol-summary.h
258 and hsa-common.h.
259 (c_omp_get_context_selector): Support second argument NULL.
260 (c_omp_mark_declare_variant, c_omp_context_selector_matches): New
261 functions.
262 * c-attribs.c (c_common_attribute_table): Remove "omp declare variant"
263 attribute, add "omp declare variant base" and
264 "omp declare variant variant" attributes.
265
175a85b2
JM
2662019-10-11 Joseph Myers <joseph@codesourcery.com>
267
268 * c.opt (Wc11-c2x-compat): Add CPP(cpp_warn_c11_c2x_compat)
269 CppReason(CPP_W_C11_C2X_COMPAT).
270
fe2bc27c
JM
2712019-10-11 Joseph Myers <joseph@codesourcery.com>
272
273 * c-common.c (c_common_reswords): Do not use D_EXT for _Decimal32,
274 _Decimal64 and _Decimal128.
275
27dfdc0f
JM
2762019-10-10 Joseph Myers <joseph@codesourcery.com>
277
278 * c-cppbuiltin.c (c_cpp_builtins): Do not define macros for DFP
279 types if DFP not supported.
280
94e7f906
JJ
2812019-10-10 Jakub Jelinek <jakub@redhat.com>
282
283 * c-common.h (c_omp_check_context_selector,
284 c_omp_get_context_selector): Declare.
285 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): Fix spelling
286 in diagnostic message.
287 (c_omp_check_context_selector, c_omp_get_context_selector): New
288 functions.
289 * c-attribs.c (c_common_attribute_table): Add "omp declare variant"
290 attribute.
291 (handle_omp_declare_variant_attribute): New function.
292
a7160771
MS
2932019-10-09 Martin Sebor <msebor@redhat.com>
294
295 PR tree-optimization/90879
296 * c.opt (-Wstring-compare): New option.
297
cb57504a
JM
2982019-10-08 Andrew Sutton <asutton@lock3software.com>
299 Jason Merrill <jason@redhat.com>
300
301 Update the concepts implementation to conform to the C++20
302 specification, improve compile times, and generally clean up
303 the implementation.
304
305 * c-cppbuiltin.c (c_cpp_builtins): Use new feature test values for
306 concepts when -std=c++2a. Bump __cpp_concepts to 201907.
307 * c.opt: Add -Wconcepts-ts.
308 * c-opts.c (c_common_post_options): Warn when -fconcepts is used
309 with -std=c++2a. Disable warning for -fconcepts in C++20 mode.
310 (set_std_cxx2a): Enable concepts by default.
311
fbb2a6dc
JM
3122019-10-08 Joseph Myers <joseph@codesourcery.com>
313
314 * c-opts.c (c_common_post_options): Set
315 -fno-fp-int-builtin-inexact for C2X.
316
8e007055
JJ
3172019-10-05 Jakub Jelinek <jakub@redhat.com>
318
319 PR c++/91369 - Implement P0784R7: constexpr new
320 * c-cppbuiltin.c (c_cpp_builtins): Predefine
321 __cpp_constexpr_dynamic_alloc=201907 for -std=c++2a.
322
843f104d
JM
3232019-10-04 Joseph Myers <joseph@codesourcery.com>
324
325 PR c/82752
326 * c-format.c (C_STD_VER): Handle C2x.
327 (C_STD_NAME): Likewise.
328 (strftime_flag_specs): Add 'O' modifier with 'p' flag.
329 (time_char_table): Use separate entry for 'B' and 'b', with 'O'
330 modifier allowed and 'p' flag.
331 * c-format.h (enum format_std_version): Add STD_C2X.
332 (struct format_char_info): Mention 'p' in comment on flags2.
333
e9c9a142
DM
3342019-10-01 David Malcolm <dmalcolm@redhat.com>
335
336 * c-opts.c (c_diagnostic_finalizer): Temporarily clear prefix when
337 calling diagnostic_show_locus, rather than destroying it afterwards.
338
7552c36a
JJ
3392019-10-01 Jakub Jelinek <jakub@redhat.com>
340
341 PR c++/91925
342 * c-warn.c (check_alignment_of_packed_member): Ignore FIELD_DECLs
343 with NULL DECL_FIELD_OFFSET.
344
8209db25
RS
3452019-10-01 Richard Sandiford <richard.sandiford@arm.com>
346
347 * c-pretty-print.c (pp_c_specifier_qualifier_list): If a vector type
348 has a type name, use it in preference to the __vector syntax.
349
9343bf99
RS
3502019-09-30 Richard Sandiford <richard.sandiford@arm.com>
351
352 * c-pretty-print.c (pp_c_parameter_type_list): Avoid printing
353 two spaces between a comma and "...".
354
59bc434a
JJ
3552019-09-27 Jakub Jelinek <jakub@redhat.com>
356
357 PR c++/88203
358 * c-common.h (c_omp_predefined_variable): Declare.
359 * c-omp.c (c_omp_predefined_variable): New function.
360 (c_omp_predetermined_sharing): Return OMP_CLAUSE_DEFAULT_SHARED
361 for predefined variables.
362
c6447c20
RS
3632019-09-27 Richard Sandiford <richard.sandiford@arm.com>
364
365 * c-common.h (build_function_call_vec): Take the original
366 function decl as an optional final parameter.
367 (check_builtin_function_arguments): Take the original function decl.
368 * c-common.c (check_builtin_function_arguments): Likewise.
369 Handle all built-in functions, not just BUILT_IN_NORMAL ones.
370 Use targetm.check_builtin_call to check BUILT_IN_MD functions.
371
c4438114
JM
3722019-09-15 Jason Merrill <jason@redhat.com>
373
374 * c-warn.c (warn_logical_operator): Strip location wrappers. Don't
375 fold_for_warn in "|| mask" warning.
376
68a57628
ML
3772019-09-10 Martin Liska <mliska@suse.cz>
378
379 * c.opt: Use newly added WarnRemoved.
380
f48ef52e
ML
3812019-09-09 Martin Liska <mliska@suse.cz>
382
383 * c.opt: Update comment of removed
384 options that are preserved only for backward
385 compatibility.
386
67f6e649
ML
3872019-09-06 Martin Liska <mliska@suse.cz>
388
389 PR c++/91125
390 * c-common.c: Remove definition of flag_use_repository.
391 * c-common.h: Likewise.
392 * c-opts.c (c_common_handle_option):
393 Do not handle OPT_frepo option.
394 * c.opt: Mark the option with Deprecated.
395
db9d2274
MP
3962019-09-04 Marek Polacek <polacek@redhat.com>
397
398 * c.opt (fdeduce-init-list): Ignored.
399
68e2c199
PK
4002019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
401
402 PR c/78736
403 * c.opt (Wenum-conversion): New option.
404
7a4418a5
JL
4052019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
406
407 * c-attribs.c (handle_section_attribute): Call the
408 handle_generic_attribute target hook after performing target
409 independent processing.
410 (handle_noinit_attribute): Likewise.
411
5f76ab15
ILT
4122019-09-03 Ian Lance Taylor <iant@golang.org>
413
414 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
415 when using -fgo-dump-spec.
416
ae0d3f6a
ML
4172019-09-02 Martin Liska <mliska@suse.cz>
418
419 PR c++/91155
420 * c-common.c (fname_as_string): Use cxx_printable_name for
421 __PRETTY_FUNCTION__ same as was used before r265711.
422
8a902edb
MP
4232019-08-28 Marek Polacek <polacek@redhat.com>
424
425 Implement P1152R4: Deprecating some uses of volatile.
426 PR c++/91361
427 * c-opts.c (c_common_post_options): Enable -Wvolatile by
428 default for C++2a, unless -Wno-deprecated.
429 * c.opt (Wvolatile): New warning.
430
4742dbe7
MP
4312019-08-28 Marek Polacek <polacek@redhat.com>
432
433 PR c++/91360 - Implement C++20 P1143R2: constinit.
434 * c-common.c (c_common_reswords): Add constinit and __constinit.
435 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
436 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
437 RID_LAST_CXX20.
438 (D_CXX20): Define.
439 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
440 * c-format.c (cxx_keywords): Add "constinit".
441 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
442
6a074892
JJ
4432019-08-27 Jakub Jelinek <jakub@redhat.com>
444
445 PR c++/91415
446 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
447 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
448 like COMPOUND_EXPR rather than normal expression.
449
22f8849d
IS
4502019-08-23 Iain Sandoe <iain@sandoe.co.uk>
451
452 PR pch/61250
453 * c-lex.c (c_lex_with_flags): Don't call
454 c_common_no_more_pch () from here.
455
df375b03
JJ
4562019-08-23 Jakub Jelinek <jakub@redhat.com>
457
458 PR middle-end/91283
459 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
460 instead of flag_excess_precision_cmdline.
461 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
462 * c-opts.c (c_common_post_options): Likewise.
463
14b7950f
MS
4642019-08-22 Martin Sebor <msebor@redhat.com>
465
466 PR middle-end/91490
467 * c-common.c (braced_list_to_string): Add argument and overload.
468 Handle flexible length arrays and unions.
469
8bb2ee59
EB
4702019-08-21 Eric Botcazou <ebotcazou@adacore.com>
471
472 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
473 function declarations where arguments are missing. Rename variables.
474
21c1e205
RB
4752019-08-15 Richard Biener <rguenther@suse.de>
476
477 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
478 enabled, define __SIZETYPE__.
479
f0033821
CL
4802019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
481
482 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
483 exclusion with "section" attribute.
484 (attr_noinit_exclusions): New table.
485 (handle_noinit_attribute): New function.
486
4d732405
RS
4872019-08-13 Richard Sandiford <richard.sandiford@arm.com>
488
489 PR middle-end/91421
490 * c-common.c (resolve_overloaded_builtin): Use
491 copy_decl_built_in_function.
492
51ad8481
MS
4932019-08-13 Martin Sebor <msebor@redhat.com>
494
495 PR c/80619
496 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
497 (asm_fprintf_length_spec): Same.
498 * c-format.h (format_lengths): Add FMT_LEN_w.
499
77eb117f
JJ
5002019-08-10 Jakub Jelinek <jakub@redhat.com>
501
502 * c-pragma.h (enum pragma_omp_clause): Add
503 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
504
398e3feb
JJ
5052019-08-07 Jakub Jelinek <jakub@redhat.com>
506
507 * c-pragma.h (enum pragma_omp_clause): Add
508 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
509 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
510 enumeration value.
511
ab574db6
MP
5122019-08-05 Marek Polacek <polacek@redhat.com>
513
514 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
515 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
516 default for C++2a, unless -Wno-deprecated.
517 * c.opt (Wcomma-subscript): New warning.
518
554a530f
JJ
5192019-07-20 Jakub Jelinek <jakub@redhat.com>
520
521 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
522 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
523 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
524 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
525 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
526 constructs with the loop construct.
527
1a888209
JJ
5282019-07-13 Jakub Jelinek <jakub@redhat.com>
529
530 PR c/91149
531 * c-omp.c (c_omp_split_clauses): Fix a pasto in
532 OMP_CLAUSE_REDUCTION_TASK handling.
533
1fdd6f04
JJ
5342019-07-12 Jakub Jelinek <jakub@redhat.com>
535
536 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
537 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
538
99b1c316
MS
5392019-07-09 Martin Sebor <msebor@redhat.com>
540
541 PR c++/61339
1fdd6f04 542 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
543 and others to class.
544 * c-pretty-print.h: Same.
545
6c1dae73
MS
5462019-07-09 Martin Sebor <msebor@redhat.com>
547
548 PR c++/61339
549 * c-format.c (check_argument_type): Change class-key from class to
550 struct and vice versa to match convention and avoid -Wclass-is-pod
551 and -Wstruct-no-pod.
552 * c-pretty-print.h: Same.
553
8ba6ea87
ML
5542019-07-03 Martin Liska <mliska@suse.cz>
555
556 * c-common.c (try_to_locate_new_include_insertion_point): Remove
557 dead assignemts.
558
83eb9522
JJ
5592019-07-03 Jakub Jelinek <jakub@redhat.com>
560
561 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
562 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
563 with OMP_PARALLEL.
564
1c6ffbab
QZ
5652019-07-02 qing zhao <qing.zhao@oracle.com>
566
567 PR preprocessor/90581
568 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
569 * c.opt: Add new option -fmax-include-depth.
570
7ffc7de5
JM
5712019-06-26 Jason Merrill <jason@redhat.com>
572
573 PR c++/55442 - memory-hog with highly recursive constexpr.
574 * c.opt (fconstexpr-loop-limit): New.
575
361af3e4
JJ
5762019-06-25 Jakub Jelinek <jakub@redhat.com>
577
578 PR sanitizer/90954
579 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
580 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
581
ab20d992
JJ
5822019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
583
584 * c-common.c (c_common_nodes_and_builtins): Define
585 alternate "__intN__" name for "__intN" types.
586
f4af4019
JH
5872019-06-24 Jan Hubicka <jh@suse.cz>
588
589 * c-common.c (braced_lists_to_strings): Check that
590 type is array or integer prior checking string flag.
591
da9e9b57
MB
5922019-06-21 Matthew Beliveau <mbelivea@redhat.com>
593
594 PR c++/90875 - added -Wswitch-outside-range option
595 * c.opt (Wswitch-outside-range): Added new option.
596 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
597
3f3d6a6f
MP
5982019-06-21 Marek Polacek <polacek@redhat.com>
599
600 PR c++/90953 - ICE with -Wmissing-format-attribute.
601 * c-common.c (check_function_arguments_recurse): Use
602 get_attribute_name.
603 (check_missing_format_attribute): Likewise.
604
1bf32c11
MP
6052019-06-19 Marek Polacek <polacek@redhat.com>
606
607 PR c++/60364 - noreturn after first decl not diagnosed.
608 * c-attribs.c (handle_noreturn_attribute): No longer static.
609 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
610 Declare.
611 * c-format.c (check_function_format): Use get_attribute_name.
612
a04c0734
MS
6132019-06-19 Martin Sebor <msebor@redhat.com>
614
615 PR translation/90156
616 * c-format.c (function_format_info::format_type): Adjust type.
617 (function_format_info::is_raw): New member.
618 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
619 (decode_format_attr): Adjust call to decode_format_type.
620 Avoid a redundant call to convert_format_name_to_system_name.
621 Avoid abbreviating the word "arguments" in a diagnostic.
622 (format_warning_substr): New function.
623 (avoid_dollar_number): Quote dollar sign in a diagnostic.
624 (finish_dollar_format_checking): Same.
625 (check_format_info): Same.
626 (struct baltoks_t): New.
627 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
628 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
629 functions.
630 (check_format_info_main): Call check_plain. Use baltoks_t. Call
631 maybe_diag_unbalanced_tokens.
632 (handle_format_attribute): Spell out the word "arguments" in
633 a diagnostic.
634
d3786ebb
MB
6352019-06-11 Matthew Beliveau <mbelivea@redhat.com>
636
637 PR c++/90449 - add -Winaccessible-base option.
638 * c.opt (Winaccessible-base): New option.
639
bf38f7e9
JJ
6402019-06-10 Jakub Jelinek <jakub@redhat.com>
641
642 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
643 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
644 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
645 combined/composite constructs where it is not allowed. Copy over
646 OMP_CLAUSE_REDUCTION_INSCAN.
647
0ecf545c
MS
6482019-06-05 Martin Sebor <msebor@redhat.com>
649
650 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
651 (handle_alias_ifunc_attribute): Same.
652 (handle_copy_attribute): Same.
653 (handle_weakref_attribute): Same.
654 (handle_nonnull_attribute): Same.
655 * c-warn.c (warn_for_sign_compare): Same.
656 (warn_for_restrict): Same.
657 * c.opt: Same.
658
36b34127
MS
6592019-06-05 Martin Sebor <msebor@redhat.com>
660
661 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
662 * c.opt (-Wformat-diag): Remove a spurious period.
663
357a352f
JJ
6642019-05-29 Jakub Jelinek <jakub@redhat.com>
665
666 PR c/90628
667 * c-common.c (check_builtin_function_arguments)
668 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
669 as last argument.
670
2b8235ea
EB
6712019-05-23 Eric Botcazou <ebotcazou@adacore.com>
672
673 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
674
6d86ddc4
ML
6752019-05-22 Martin Liska <mliska@suse.cz>
676
677 PR lto/90500
678 * c-attribs.c (handle_copy_attribute): Do not copy
679 target_clones attribute.
680
419ba5b9
EB
6812019-05-21 Eric Botcazou <ebotcazou@adacore.com>
682
683 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
684 * c-ada-spec.c (print_assignment_operator): New function.
685 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
686 assignment operators declared as methods and filter out the others.
687
e03436e7
TS
6882019-05-17 Thomas Schwinge <thomas@codesourcery.com>
689
690 PR c/89433
691 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
692 "omp declare target".
693
a9c697b8
MS
6942019-05-16 Martin Sebor <msebor@redhat.com>
695
ab20d992
JJ
696 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
697 keywords, operators, and types in diagnostics.
698 (handle_scalar_storage_order_attribute): Same.
699 (handle_mode_attribute): Same.
700 (handle_visibility_attribute): Same.
701 (handle_assume_aligned_attribute): Same.
702 (handle_no_split_stack_attribute): Same.
703 * c-common.c (shorten_compare): Same.
704 (c_common_truthvalue_conversion): Same.
705 (cb_get_source_date_epoch): Same.
706 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
707 in diagnostics.
708 (interpret_float): Same.
709 * c-omp.c (c_finish_omp_for): Same.
710 * c-opts.c (c_common_post_options): Same.
711 * c-pch.c (c_common_pch_pragma): Same.
712 * c-pragma.c (pop_alignment): Same.
713 (handle_pragma_pack): Same.
714 (apply_pragma_weak): Same.
715 (handle_pragma_weak): Same.
716 (handle_pragma_scalar_storage_order): Same.
717 (handle_pragma_redefine_extname): Same.
718 (add_to_renaming_pragma_list): Same.
719 (maybe_apply_renaming_pragma): Same.
720 (push_visibility): Same.
721 (handle_pragma_visibility): Same.
722 (handle_pragma_optimize): Same.
723 (handle_pragma_message): Same.
724 * c-warn.c (warn_for_omitted_condop): Same.
725 (lvalue_error): Same.
a9c697b8 726
6b943512
RB
7272019-05-15 Richard Biener <rguenther@suse.de>
728
729 PR c/90474
730 * c-common.c (c_common_mark_addressable_vec): Also mark
731 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
732 c_mark_addressable.
ab20d992 733
b744fc85
NS
7342019-05-06 Nathan Sidwell <nathan@acm.org>
735
736 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
737
598f50d7
NS
7382019-04-30 Nathan Sidwell <nathan@acm.org>
739
740 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
741
5bcc5a3b
ML
7422019-04-30 Martin Liska <mliska@suse.cz>
743
744 * c-pragma.c (handle_pragma_diagnostic): Provide hints
745 for unknown options.
746
e78a87f7
RS
7472019-04-26 Richard Sandiford <richard.sandiford@arm.com>
748
749 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
750 the pointer target rather than the pointer itself.
751
c280b7ee
JJ
7522019-04-19 Jakub Jelinek <jakub@redhat.com>
753
754 PR c/89888
755 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
756 arguments.
757 (c_do_switch_warnings): Remove outside_range_p argument.
758 * c-common.c (check_case_bounds): Removed.
759 (c_add_case_label): Remove orig_type and outside_range_p arguments.
760 Don't call check_case_bounds. Fold low_value as well as high_value.
761 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
762 Check for case labels outside of range of original type here and
763 adjust them.
764
8e8225e6
JJ
7652019-04-12 Jakub Jelinek <jakub@redhat.com>
766
63b8a166
JJ
767 PR translation/90041
768 * c.opt (-fhandle-exceptions): Use %< and %> around option names
769 in the Warn diagnostics.
770
8e8225e6
JJ
771 PR c/89946
772 * c-attribs.c (handle_patchable_function_entry_attribute): Add
773 function comment. Warn if arguments of the attribute are not positive
774 integer constants.
775
53a3f614
EB
7762019-04-09 Eric Botcazou <ebotcazou@adacore.com>
777
778 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
779 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
780
22be5873
EB
7812019-04-07 Eric Botcazou <ebotcazou@adacore.com>
782
783 * c-ada-spec.c (is_float128): New predicate extracted from...
784 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
785 <REAL_TYPE>: ...here. Call it.
786
34facf20
DM
7872019-04-05 David Malcolm <dmalcolm@redhat.com>
788
789 PR c/89985
790 * c-warn.c (check_address_or_pointer_of_packed_member): Add
791 auto_diagnostic_group. Guard inform calls by result of
792 warning_at call.
793
05564120
MP
7942019-04-05 Marek Polacek <polacek@redhat.com>
795
ab20d992 796 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
797 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
798 of RHS.
799
7a506c3c
JM
8002019-04-03 Jason Merrill <jason@redhat.com>
801
802 PR c++/86586 - -fcompare-debug=-Wsign-compare.
803 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
804
ddeae8c8
MS
8052019-04-01 Martin Sebor <msebor@redhat.com>
806
807 PR c/89685
808 * c-attribs.c (handle_copy_attribute): Handle references and
809 non-constant expressions.
810
a15ffa22
JJ
8112019-03-22 Jakub Jelinek <jakub@redhat.com>
812
813 PR c++/87481
814 * c.opt (-fconstexpr-ops-limit=): New option.
815
36a3a7a3
JJ
8162019-03-21 Jakub Jelinek <jakub@redhat.com>
817
818 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
819 template param.
820
bec1da64
MS
8212019-03-19 Martin Sebor <msebor@redhat.com>
822
823 PR tree-optimization/89688
824 * c-common.c (braced_list_to_string): Make static.
825 (braced_lists_to_strings): Define new function.
826 * c-common.h (braced_list_to_string): Remove.
827 (braced_lists_to_strings): Declare.
828
1fe61adf
ML
8292019-03-12 Martin Liska <mliska@suse.cz>
830
831 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
832
93964ebd
ML
8332019-03-11 Martin Liska <mliska@suse.cz>
834
835 * c-opts.c (c_common_post_options): Wrap apostrophes
836 in gcc internal format with %'.
837
a3f9f006
ML
8382019-03-11 Martin Liska <mliska@suse.cz>
839
840 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
841 in a string format message and fix GNU coding style.
842 * c-common.c (vector_types_convertible_p): Likewise.
843 (c_build_vec_perm_expr): Likewise.
844 * c-indentation.c (get_visual_column): Likewise.
845 * c-opts.c (c_common_handle_option): Likewise.
846 (c_common_post_options): Likewise.
847 (sanitize_cpp_opts): Likewise.
848 * c-pch.c (c_common_pch_pragma): Likewise.
849 * c-pragma.c (handle_pragma_pack): Likewise.
850
1db01ff9
JJ
8512019-03-08 Jakub Jelinek <jakub@redhat.com>
852
853 PR tree-optimization/89550
854 * c-common.c (c_common_truthvalue_conversion): Only set
855 TREE_NO_WARNING if warning_at returned true.
856 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
857
ba790e6f
JJ
8582019-02-25 Sandra Loosemore <sandra@codesourcery.com>
859 Martin Sebor <msebor@gmail.com>
860
861 * c.opt (Wmissing-attributes): Clean up doc string.
862
7da73ba7
JJ
8632019-02-25 Jakub Jelinek <jakub@redhat.com>
864
865 PR c/89495
866 * c-format.c (maybe_read_dollar_number): Compute nargnum in
867 HOST_WIDE_INT type to avoid overflows and change overflow_flag
868 checking.
869
921bb9d1
RB
8702019-02-22 Richard Biener <rguenther@suse.de>
871
872 * c-pch.c (no_checksum): Remove.
873 (pch_init): Remove assertion that executable_checksum is not
874 all zero.
875 (c_common_valid_pch): Likewise.
876
e2ebb05c
MS
8772019-02-18 Martin Sebor <msebor@redhat.com>
878
879 PR middle-end/89294
880 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
881
3fe53000
DM
8822019-02-16 David Malcolm <dmalcolm@redhat.com>
883
884 PR c++/88680
885 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
886 implementing -Wtype-limits.
887
28a8cef1
MS
8882019-02-11 Martin Sebor <msebor@redhat.com>
889
890 PR c++/87996
891 * c-common.c (invalid_array_size_error): New function.
892 (valid_array_size_p): Call it. Handle size as well as type.
893 * c-common.h (valid_constant_size_p): New function.
894 (enum cst_size_error): New type.
895
ec2be203
DM
8962019-01-31 David Malcolm <dmalcolm@redhat.com>
897
898 PR c/89122
899 * known-headers.cc (get_stdlib_header_for_name): Add
900 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
901
8936f047
JJ
9022019-01-31 Jakub Jelinek <jakub@redhat.com>
903
904 PR libstdc++/88170
905 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
906 a C cast in pp_c_flag_gnu_v3 mode.
907
6a335b96
JJ
9082019-01-29 Jakub Jelinek <jakub@redhat.com>
909
910 PR c/86125
911 * c-common.c (c_common_nodes_and_builtins): Build type variants for
912 builtin_structptr_types types even for C.
913
2a06eba5
BE
9142019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
915
916 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
917 when rhs is of array type correctly. Fix handling of nested structures.
918 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
919 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
920 type casts within nested compound expressions.
921
18a23298
JJ
9222019-01-22 Jakub Jelinek <jakub@redhat.com>
923
924 PR middle-end/88968
925 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
926 variable after using BIT_FIELD_REF.
927
420183d9
L
9282019-01-18 H.J. Lu <hongjiu.lu@intel.com>
929
930 PR c/51628
931 PR c/88664
932 * c-common.h (warn_for_address_or_pointer_of_packed_member):
933 Remove the boolean argument.
934 * c-warn.c (check_address_of_packed_member): Renamed to ...
935 (check_address_or_pointer_of_packed_member): This. Also
936 warn pointer conversion.
937 (check_and_warn_address_of_packed_member): Renamed to ...
938 (check_and_warn_address_or_pointer_of_packed_member): This.
939 Also warn pointer conversion.
940 (warn_for_address_or_pointer_of_packed_member): Remove the
941 boolean argument. Don't check pointer conversion here.
942
99063eee
RS
9432019-01-15 Richard Sandiford <richard.sandiford@arm.com>
944
945 PR inline-asm/52813
946 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
947
a30d0196
JJ
9482019-01-14 Jakub Jelinek <jakub@redhat.com>
949
950 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
951 and __cpp_nontype_template_parameter_auto. Add a comment that
952 __cpp_template_auto is deprecated.
953
2d91f79d
TH
9542019-01-14 Tom Honermann <tom@honermann.net>
955
956 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
957 * c-common.c (c_common_reswords): Add char8_t.
958 (fix_string_type): Use char8_t for the type of u8 string literals.
959 (c_common_get_alias_set): char8_t doesn't alias.
960 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
961 C++.
962 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
963 (keyword_begins_type_specifier): Add RID_CHAR8.
964 * c-common.h (rid): Add RID_CHAR8.
965 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
966 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
967 Define char8_type_node and char8_array_type_node.
968 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
969 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
970 (c_cpp_builtins): Predefine __cpp_char8_t.
971 * c-lex.c (lex_string): Use char8_array_type_node as the type of
972 CPP_UTF8STRING.
973 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
974 * c-opts.c: If not otherwise specified, enable -fchar8_t when
975 targeting C++2a.
976 * c.opt: Add the -fchar8_t command line option.
977
23db6ced
MS
9782019-01-14 Martin Sebor <msebor@redhat.com>
979
980 PR target/88638
981 * c-attribs.c (positional_argument): Call valid_format_string_type_p
982 and issue errors if it fails.
983 * c-common.h (valid_format_string_type_p): Declare.
984 * c-format.c (valid_stringptr_type_p): Rename...
985 (valid_format_string_type_p): ...to this and make extern.
986 (handle_format_arg_attribute): Adjust to new name.
987 (check_format_string): Same.
988
234c3818
L
9892019-01-13 H.J. Lu <hongjiu.lu@intel.com>
990
991 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
992 Replace "may may" with "may" in warning message.
993
d8fcab68
JJ
9942019-01-07 Jakub Jelinek <jakub@redhat.com>
995
996 PR c++/85052
997 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
998 (c_build_vec_convert): Declare.
999 * c-common.c (c_build_vec_convert): New function.
1000
29d24852
MS
10012019-01-04 Martin Sebor <msebor@redhat.com>
1002
1003 PR c/88546
1004 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
1005 Handle C++ empty throw specification and C11 _Noreturn.
1006 (has_attribute): Also handle C11 _Noreturn.
1007
9069a4c9
MS
10082019-01-04 Martin Sebor <msebor@redhat.com>
1009
1010 PR c/88363
1011 * c-attribs.c (positional_argument): Also accept enumerated types.
1012
a5544970
JJ
10132019-01-01 Jakub Jelinek <jakub@redhat.com>
1014
1015 Update copyright years.
1016
da77eace
L
10172018-12-20 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 PR c/51628
1020 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
1021 * c-warn.c (check_alignment_of_packed_member): New function.
1022 (check_address_of_packed_member): Likewise.
1023 (check_and_warn_address_of_packed_member): Likewise.
1024 (warn_for_address_or_pointer_of_packed_member): Likewise.
1025 * c.opt: Add -Wno-address-of-packed-member.
1026
573767d4
DM
10272018-12-20 David Malcolm <dmalcolm@redhat.com>
1028
1029 PR c++/87504
1030 * c-warn.c (get_outermost_macro_expansion): New function.
1031 (spelled_the_same_p): Use it to unwind the macro expansions, and
1032 compare the outermost macro in each nested expansion, rather than
1033 the innermost.
1034
a14feb3c
DM
10352018-12-19 David Malcolm <dmalcolm@redhat.com>
1036
1037 PR c++/87504
1038 * c-common.h (warn_tautological_cmp): Convert 1st param from
1039 location_t to const op_location_t &.
1040 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
1041 when testing for INTEGER_CST.
1042 (warn_tautological_bitwise_comparison): Convert 1st param from
1043 location_t to const op_location_t &; use it to build a
1044 binary_op_rich_location, and use this.
1045 (spelled_the_same_p): New function.
1046 (warn_tautological_cmp): Convert 1st param from location_t to
1047 const op_location_t &. Warn for macro expansions if
1048 spelled_the_same_p. Use binary_op_rich_location.
1049
dfd7fdca
DM
10502018-12-19 David Malcolm <dmalcolm@redhat.com>
1051
1052 PR c++/43064
1053 PR c++/43486
1054 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
1055 (verify_tree): Handle location wrappers.
1056 (c_common_truthvalue_conversion): Strip any location wrapper.
1057 Handle CONST_DECL.
1058 (fold_offsetof): Strip any location wrapper.
1059 (complete_array_type): Likewise for initial_value.
1060 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
1061 index before checking for INTEGER_CST.
1062 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
1063 print parentheses around location wrappers.
1064 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
1065 before checking for INTEGER_CST.
1066 (warn_tautological_bitwise_comparison): Call
1067 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
1068 before checking for INTEGER_CST.
1069 (readonly_error): Strip any location wrapper.
1070 (warn_array_subscript_with_type_char): Strip location wrappers
1071 before checking for INTEGER_CST. Use the location of the index if
1072 available.
1073
5c8b3702
JM
10742018-12-06 Jason Merrill <jason@redhat.com>
1075
1076 PR c++/88136 - -Wdeprecated-copy false positives
1077 * c.opt (Wdeprecated-copy-dtor): New.
1078 (Wdeprecated-copy): Move to -Wextra.
1079
673670da
MS
10802018-11-29 Martin Sebor <msebor@redhat.com>
1081
1082 PR c/88172
1083 PR testsuite/88208
1084 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
1085 alignments to values less than the target requires.
1086 (has_attribute): For attribute aligned consider both the attribute
1087 and the alignment bits.
1088 * c-common.c (c_init_attributes): Optionally issue a warning for
1089 zero alignment.
1090
04864ec8
MS
10912018-11-28 Martin Sebor <msebor@redhat.com>
1092
1093 PR c/88065
1094 PR c/87297
1095 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
1096 or destination is an error.
1097
ace83db0
JJ
10982018-11-28 Jakub Jelinek <jakub@redhat.com>
1099
1100 PR c++/88215
1101 * c-ubsan.c: Include langhooks.h.
1102 (ubsan_instrument_division): Change gcc_assert that main variants
1103 of op0 and op1 types are equal to gcc_checking_assert that the
1104 main variants are compatible types.
1105
da193a27
EB
11062018-11-27 Eric Botcazou <ebotcazou@adacore.com>
1107
1108 * c-ada-spec.c: Include stringpool.h.
1109 (has_static_fields): Return false for incomplete types.
1110 (is_tagged_type): Likewise.
1111 (has_nontrivial_methods): Likewise.
1112 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
1113 (struct overloaded_name_hash): New structure.
1114 (struct overloaded_name_hasher): Likewise.
1115 (overloaded_names): New global variable.
1116 (init_overloaded_names): New static function.
1117 (overloaded_name_p): New predicate.
1118 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
1119 on the TYPE_STUB_DECL of the original type of a typedef, if any.
1120 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
1121 Remove always-true condition and dump forward types.
1122 (dump_ada_specs): Delete overloaded_names.
1123
98f08eb8
MS
11242018-11-20 Martin Sebor <msebor@redhat.com>
1125
1126 * c-attribs.c (type_for_vector_size): New function.
1127 (type_valid_for_vector_size): Same.
1128 (handle_vector_size_attribute): Move code to the functions above
1129 and call them.
1130 (validate_attribute, has_attribute): New functions.
1131 * c-common.h (has_attribute): Declare.
1132 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
1133 * c-common.c (c_common_resword): Same.
1134
2674fa47
JM
11352018-11-16 Jason Merrill <jason@redhat.com>
1136
1137 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
1138 * c-attribs.c (attr_cold_hot_exclusions): Make public.
1139
258b3854
JJ
11402018-11-16 Jakub Jelinek <jakub@redhat.com>
1141
1142 PR middle-end/87854
1143 * c-common.c (fix_string_type): Reject string literals larger than
1144 TYPE_MAX_VALUE (ssizetype) bytes.
1145
1d249509
MS
11462018-11-15 Martin Sebor <msebor@redhat.com>
1147
1148 PR c++/87541
1149 PR c++/87542
1150 * c-attribs.c (positional_argument): New function.
1151 (handle_alloc_size_attribute): Use it and simplify.
1152 (handle_alloc_align_attribute): Same.
1153 (handle_assume_aligned_attribute): Same.
1154 (handle_nonnull_attribute): Same.
1155 * c-common.c (check_function_arguments): Pass fntype to
1156 check_function_format.
1157 * c-common.h (check_function_format): Add an argument.
1158 (PosArgFlags, positional_argument): Declare new type and function.
1159 * c-format.c (decode_format_attr): Add arguments.
1160 (check_format_string, get_constant): Same.
1161 (convert_format_name_to_system_name): Adjust.
1162
478dd60d
DM
11632018-11-15 David Malcolm <dmalcolm@redhat.com>
1164
1165 PR other/19165
1166 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
1167
8cca0163
JJ
11682018-11-14 Jakub Jelinek <jakub@redhat.com>
1169
8ee09943
JJ
1170 P1236R1 - Signed integers are two's complement
1171 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
1172 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
1173 with in-range second operand well defined for -std=c++2a.
1174
8cca0163
JJ
1175 PR other/88007
1176 * c-common.c (parse_optimize_options): Allocate option string from
1177 opts_obstack rather than as GC memory. Move the allocation after
1178 warning for invalid option.
1179
620e594b
DM
11802018-11-13 David Malcolm <dmalcolm@redhat.com>
1181
1182 * c-common.c (c_get_substring_location): Update for renaming of
1183 get_source_location_for_substring to get_location_within_string.
1184 * c-lex.c: Replace "source_location" with "location_t".
1185 * c-opts.c: Likewise.
1186 * c-ppoutput.c: Likewise.
1187
f9731de3
MS
11882018-11-13 Martin Sebor <msebor@redhat.com>
1189
1190 PR middle-end/81824
1191 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
1192 (handle_tls_model_attribute): Improve diagnostics.
1193
e4bd6d5e
JM
11942018-11-12 Jason Merrill <jason@redhat.com>
1195
a6bb6b07
JM
1196 * c-cppbuiltin.c (c_cpp_builtins): Define
1197 __cpp_impl_destroying_delete.
1198
e4bd6d5e
JM
1199 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
1200 __cpp_conditional_explicit.
1201
79a2c428
MS
12022018-11-09 Martin Sebor <msebor@redhat.com>
1203
1204 PR middle-end/81824
1205 * c-attribs.c (handle_copy_attribute): New function.
1206
4c7bd361
MS
12072018-11-09 Martin Sebor <msebor@redhat.com>
1208
1209 PR c/87795
1210 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
1211
28567c40
JJ
12122018-11-08 Jakub Jelinek <jakub@redhat.com>
1213
1214 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
1215 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1216 enum omp_memory_order MEMORY_ORDER.
1217 (c_finish_omp_flush): Add MO argument.
1218 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
1219 (c_finish_omp_for): Add FINAL_P argument.
1220 * c-omp.c: Include memmodel.h.
1221 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
1222 OMP_TASKGROUP_CLAUSES to it.
1223 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
1224 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
1225 instead of OMP_ATOMIC_SEQ_CST.
1226 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
1227 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
1228 __atomic_thread_fence call with the given value.
1229 (check_omp_for_incr_expr): Formatting fixes.
1230 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
1231 even in OpenMP loops, diagnose if NE_EXPR and incr expression
1232 is not constant expression 1 or -1. Transform NE_EXPR loops
1233 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
1234 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
1235 loops too.
1236 (c_omp_split_clauses): Add support for combined
1237 #pragma omp parallel master and
1238 #pragma omp {,parallel }master taskloop{, simd} constructs.
1239 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
1240 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
1241 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
1242 (c_omp_predetermined_sharing): Don't return
1243 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
1244 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
1245 PRAGMA_OMP_REQUIRES.
1246 * c-pragma.h (enum pragma_kind): Likewise.
1247 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
1248 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
1249
204839e7
DM
12502018-11-08 David Malcolm <dmalcolm@redhat.com>
1251
1252 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
1253
d8010ee4
DM
12542018-11-08 David Malcolm <dmalcolm@redhat.com>
1255
1256 * c-format.c (local_cgraph_node_ptr_node): New variable.
1257 (gcc_dump_printf_char_table): Add entry for %C.
1258 (get_pointer_to_named_type): New function, taken from the handling
1259 code for "gimple *" from...
1260 (init_dynamic_diag_info): ...here. Add handling for
1261 "cgraph_node *".
1262 * c-format.h (T_CGRAPH_NODE): New.
1263
4be5c72c
JM
12642018-10-19 Jason Merrill <jason@redhat.com>
1265
1266 * c-cppbuiltin.c (c_cpp_builtins): Add
1267 __cpp_nontype_template_parameter_class.
1268
f3f6029d
NS
12692018-10-31 Nathan Sidwell <nathan@acm.org>
1270
ab5324fb
NS
1271 * c-opts.c (c_finish_options): Force command line macro
1272 location. Refactor to avoid repeating main debug hook.
1273 (push_command_line_include): Clarify comment.
1274
f3f6029d
NS
1275 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
1276
91e3ec29
MS
12772018-10-30 Martin Sebor <msebor@redhat.com>
1278
1279 PR middle-end/87041
1280 * c-format.c (check_format_types): Avoid diagnosing null pointer
1281 arguments to printf-family of functions.
1282
b5ff4f5c
MP
12832018-10-30 Marek Polacek <polacek@redhat.com>
1284
1285 Implement P0892R2, explicit(bool).
1286 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
1287
7e2de6df
DM
12882018-10-29 David Malcolm <dmalcolm@redhat.com>
1289
1290 * name-hint.h (name_hint::take_deferred): New member function.
1291
b2bf438c
DM
12922018-10-29 David Malcolm <dmalcolm@redhat.com>
1293
1294 PR c++/56856
1295 * c-common.c (check_function_sentinel): Call fold_for_warn on the
1296 argument.
1297 (check_function_restrict): Rename param "argarray" to
1298 "unfolded_argarray", and make a copy named "argarray", calling
1299 fold_for_warn on each argument.
1300 (check_function_arguments): Add note about responsibility for
1301 folding the arguments.
1302
9f936c86
JM
13032018-10-17 Joseph Myers <joseph@codesourcery.com>
1304
1305 * c-common.c (flag_isoc2x): New variable.
1306 * c-common.h (clk_c): Update comment to reference C2X.
1307 (flag_isoc99, flag_isoc11): Update comments to reference future
1308 standard versions in general.
1309 (flag_isoc2x): Declare.
1310 * c-opts.c (set_std_c2x): New function.
1311 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
1312 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
1313 flag_isoc2x to 0.
1314 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
1315
7a8a92c4
JM
13162018-10-17 Joseph Myers <joseph@codesourcery.com>
1317
1318 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
1319 (std=iso9899:2018): Document C17 as published in 2018.
1320
4dc003ff
CL
13212018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
1322
1323 PR c++/87364
1324 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
1325
79371671
WW
13262018-10-11 Will Wray <wjwray@gmail.com>
1327
1328 PR c++/87364
1329 * c-pretty-print.h (pp_c_type_cast): Prototype.
1330 (pp_c_integer_constant): Likewise.
1331 * c-pretty-print.c (pp_c_type_cast): No longer static.
1332 (pp_c_integer_constant): Likewise.
1333 (pp_c_enumeration_constant): Fix loop termination when finding
1334 name of constant. No longer returns a value. Call
1335 pp_c_integer_constant.
1336 (c_pretty_printer::constant): Update for changes to
1337 pp_c_enumeration_constant.
1338
46c62690
JJ
13392018-10-11 Jakub Jelinek <jakub@redhat.com>
1340
1341 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
1342 for no_unique_address.
1343
c24300ba
DM
13442018-10-09 David Malcolm <dmalcolm@redhat.com>
1345
1346 * c-common.c (c_option_controlling_cpp_error): Rename to...
1347 (c_option_controlling_cpp_diagnostic): ...this, and convert
1348 "reason" from int to enum.
1349 (c_cpp_error): Rename to...
1350 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1351 * c-common.h (c_cpp_error): Rename to...
1352 (c_cpp_diagnostic): ...this, converting level and reason to enums.
1353 * c-opts.c (c_common_init_options): Update for renaming.
1354
8656dafa
RS
13552018-10-08 Richard Sandiford <richard.sandiford@arm.com>
1356
1357 PR c/87286
1358 * c-common.c (vector_types_compatible_elements_p): Use
1359 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
1360
8cff0652
VK
13612018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
1362
1363 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
1364 to generate constructor destructor priority warning.
1365 * c.opt (-Wprio-ctor-dtor): New option.
1366
bedf03a2
JM
13672018-10-01 Jason Merrill <jason@redhat.com>
1368
1369 * c-lex.c (c_common_has_attribute): Add no_unique_address.
1370
6cc430c1
EB
13712018-10-01 Eric Botcazou <ebotcazou@adacore.com>
1372
1373 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
1374 (dump_ada_node): Add const keyword.
1375
87677ac7
ML
13762018-09-25 Martin Liska <mliska@suse.cz>
1377
1378 * c-common.c (c_common_truthvalue_conversion):
1379 Remove Pascal from documentation.
1380
518196cb
EB
13812018-09-21 Eric Botcazou <ebotcazou@adacore.com>
1382
1383 * c-ada-spec.c: Include diagnostic.h.
1384 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
1385
a599af84
MP
13862018-09-19 Marek Polacek <polacek@redhat.com>
1387
1388 * c.opt (Wclass-conversion): New.
1389
9c4a4b3c
DM
13902018-09-17 David Malcolm <dmalcolm@redhat.com>
1391
1392 * c-format.c (range_label_for_format_type_mismatch::get_text):
1393 Update for new param.
1394
c896ecfe
DM
13952018-09-17 David Malcolm <dmalcolm@redhat.com>
1396
1397 * c-format.c (format_warning_at_char): Update for introduction of
1398 format_string_diagnostic_t.
1399 (format_type_warning): Likewise.
1400
80c6d1f4
MJ
14012018-09-17 Martin Jambor <mjambor@suse.cz>
1402
1403 PR c/63886
1404 * c.opt (Wabsolute-value): New.
1405
6d900107
BE
14062018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1407
1408 * c-common.c (complete_flexible_array_elts): New helper function.
1409 * c-common.h (complete_flexible_array_elts): Declare.
1410
b5764229
BE
14112018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1412
1413 * c-common.c (braced_list_to_string): Remove eval parameter.
1414 Add some more checks. Always create zero-terminated STRING_CST.
1415 * c-common.h (braced_list_to_string): Adjust prototype.
1416
85204e23
DM
14172018-08-27 David Malcolm <dmalcolm@redhat.com>
1418
1419 PR 87091
1420 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1421 to a tri-state.
1422 (maybe_suggest_missing_token_insertion): Likewise.
1423 (maybe_add_include_fixit): Add param "override_location". If set,
1424 and source-printing is enabled, then override the rich_location's
1425 primary location with that of the insertion point for the fix-it
1426 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1427 * c-common.h (extern void maybe_add_include_fixit): Add bool
1428 param.
1429 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1430 for conversion of show_caret_p to a tri-state.
1431 * c-warn.c (warn_for_restrict): Likewise.
1432 * known-headers.cc
1433 (suggest_missing_header::~suggest_missing_header): Update call to
1434 maybe_add_include_fixit to suggest overriding the location, as it
1435 is for a note.
1436
3d78e008
ML
14372018-08-27 Martin Liska <mliska@suse.cz>
1438
1439 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1440 fndecl_built_in_p and remove check for FUNCTION_DECL if
1441 possible.
3d78e008
ML
1442 (check_builtin_function_arguments): Likewise.
1443 (reject_gcc_builtin): Likewise.
1444 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1445
b5be6d0c
MP
14462018-08-26 Marek Polacek <polacek@redhat.com>
1447
1448 PR c++/87029, Implement -Wredundant-move.
1449 * c.opt (Wredundant-move): New option.
1450
79ca9c35
MP
14512018-08-21 Marek Polacek <polacek@redhat.com>
1452
1453 PR c++/86981, Implement -Wpessimizing-move.
1454 * c.opt (Wpessimizing-move): New option.
1455
097f82ec
DM
14562018-08-20 David Malcolm <dmalcolm@redhat.com>
1457
1458 PR other/84889
1459 * c-attribs.c (common_handle_aligned_attribute): Add
1460 auto_diagnostic_group instance.
1461 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1462 * c-opts.c (c_common_post_options): Likewise.
1463 * c-warn.c (warn_logical_not_parentheses): Likewise.
1464 (warn_duplicated_cond_add_or_warn): Likewise.
1465 (warn_for_multistatement_macros): Likewise.
1466
3fb558b1
NS
14672018-08-20 Nathan Sidwell <nathan@acm.org>
1468
1469 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1470 access.
1471
800c0e98
NS
14722018-08-17 Nathan Sidwell <nathan@acm.org>
1473
1474 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1475 field.
1476 (laxy_hex_fp_value_count): Make unsigned.
1477 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1478 manipulate the macro.
1479 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1480 cpp_define_lazily.
1481
6f795a92
DM
14822018-08-17 David Malcolm <dmalcolm@redhat.com>
1483
1484 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1485 (gcc_dump_printf_length_specs): New.
1486 (gcc_dump_printf_flag_pairs): New.
1487 (gcc_dump_printf_flag_specs): New.
1488 (gcc_dump_printf_char_table): New.
1489 (format_types_orig): Add entry for "gcc_dump_printf".
1490 (init_dynamic_diag_info): Set up length_char_specs and
1491 conversion_specs for gcc_dump_printf_format_type.
1492 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1493
c5d725c0
NS
14942018-08-17 Nathan Sidwell <nathan@acm.org>
1495
10f04917
NS
1496 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1497
c5d725c0
NS
1498 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1499 * c-cppbuiltin.c: Likewise.
1500
c0c12356
ML
15012018-08-17 Martin Liska <mliska@suse.cz>
1502
1503 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1504 Ignore/Deprecated flag. Warning is done automatically for
1505 Deprecated flags.
c0c12356 1506
10fcc142
DM
15072018-08-16 David Malcolm <dmalcolm@redhat.com>
1508
1509 PR c++/70693
1510 * c-common.c (selftest::c_family_tests): Call
1511 selftest::c_indentation_c_tests.
1512 * c-common.h (selftest::c_indentation_c_tests): New decl.
1513 * c-indentation.c: Include "selftest.h".
1514 (next_tab_stop): Add "tab_width" param, rather than accessing
1515 cpp_opts.
1516 (get_visual_column): Likewise. Clarify comment. Bulletproof
1517 against reading past the end of the line.
1518 (get_first_nws_vis_column): Add "tab_width" param.
1519 (detect_intervening_unindent): Likewise.
1520 (should_warn_for_misleading_indentation): Read tab width from
1521 cpp_opts and pass around.
1522 (selftest::test_next_tab_stop): New test.
1523 (selftest::assert_get_visual_column_succeeds): New function.
1524 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1525 (selftest::assert_get_visual_column_fails): New function.
1526 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1527 (selftest::test_get_visual_column): New test.
1528 (selftest::c_indentation_c_tests): New function.
1529
3f6677f4
NS
15302018-08-16 Nathan Sidwell <nathan@acm.org>
1531
1532 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1533 (store_ada_macro): Likewise.
1534 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1535 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1536
96e6ae57
DM
15372018-08-15 David Malcolm <dmalcolm@redhat.com>
1538
1539 * c-format.c: Include "selftest-diagnostic.h" and
1540 "gcc-rich-location.h".
1541 (format_warning_at_char): Pass NULL for new label params of
1542 format_warning_va.
1543 (class indirection_suffix): New class.
1544 (class range_label_for_format_type_mismatch): New class.
1545 (format_type_warning): Move logic for generating "*" suffix to
1546 class indirection_suffix. Create "fmt_label" and "param_label"
1547 to show their types, and pass them to the
1548 format_warning_at_substring calls.
1549 (selftest::test_type_mismatch_range_labels): New test.
1550 (selftest::c_format_c_tests): Call it.
1551
23aa9f7c
MS
15522018-08-13 Martin Sebor <msebor@redhat.com>
1553
1554 PR tree-optimization/71625
1555 * c-common.c (braced_list_to_string): New function.
1556 * c-common.h (braced_list_to_string): Declare it.
1557
f10a9135
NS
15582018-08-08 Nathan Sidwell <nathan@acm.org>
1559
1560 * c-common.c (try_to_locate_new_include_inertion_point): Use
1561 linemap_included_from_linemap.
1562 * c-lex.c (fe_file_change): Use linemap_included_from.
1563 * c-ppoutput.c (pp_file_change): Likewise.
1564
8a45b051
MS
15652018-08-01 Martin Sebor <msebor@redhat.com>
1566
1567 PR tree-optimization/86650
ab20d992 1568 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1569 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1570 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1571 * c-format.h (T89_G): Update to be "gimple *" rather than
1572 "gcall *".
1573 (local_gcall_ptr_node): Rename...
1574 (local_gimple_ptr_node): ...to this.
1575
e540ccc0
DM
15762018-07-31 David Malcolm <dmalcolm@redhat.com>
1577
1578 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1579 table entries for gcc_diag_char_table, and the 'Z' entry from
1580 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1581 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1582 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1583 adding missing "Z" for this table. Remove erroneous "G" and "K"
1584 entries.
1585 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1586 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1587 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1588
425fc685
RE
15892018-07-31 Richard Earnshaw <rearnsha@arm.com>
1590
1591 * c-common.c (speculation_safe_resolve_call): New function.
1592 (speculation_safe_resolve_params): New function.
1593 (speculation_safe_resolve_return): New function.
1594 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1595 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1596 __HAVE_SPECULATION_SAFE_VALUE.
1597
181463c2
DM
15982018-07-20 David Malcolm <dmalcolm@redhat.com>
1599
1600 * c-common.c (c_cpp_error): Remove redundant "line_table"
1601 parameter from call to rich_location::set_range.
1602 (maybe_suggest_missing_token_insertion): Likewise.
1603
0d7f9065
MS
16042018-07-20 Martin Sebor <msebor@redhat.com>
1605
1606 PR middle-end/82063
ab20d992 1607 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1608
00abf86c
MS
16092018-07-20 Martin Sebor <msebor@redhat.com>
1610
1611 PR middle-end/82063
1612 * c-common.h (c_common_handle_option): Change function argument
1613 to HOST_WIDE_INT.
1614 * c-opts.c (c_common_init_options): Same.
1615 (c_common_handle_option): Same. Remove special handling of
1616 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1617 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1618 options to take a HOST_WIDE_INT argument and accept a byte-size
1619 suffix. Initialize.
1620 (-Wvla-larger-than): Same.
1621 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1622 (-Wno-vla-larger-than): Same.
1623
9b452033
JJ
16242018-07-12 Jakub Jelinek <jakub@redhat.com>
1625
1626 * c-attribs.c (c_common_attribute_table): Add
1627 "omp declare target implicit" attribute.
1628
cd0762f3
RB
16292018-07-12 Richard Biener <rguenther@suse.de>
1630
1631 PR c/86453
1632 * c-attribs.c (handle_packed_attribute): Do not build a variant
1633 type with TYPE_PACKED, instead ignore the attribute if we may
1634 not apply to the original type.
1635
0b27c3ed
JJ
16362018-07-10 Jakub Jelinek <jakub@redhat.com>
1637
1638 PR c++/86443
1639 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1640 to contain TREE_LIST for both the original class iterator and the
1641 "last" helper var.
1642
e730a0ef
EB
16432018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1644
1645 * c-ada-spec.c (to_ada_name): Remove index parameter.
1646 (pp_ada_tree_identifier): Likewise.
1647 (dump_ada_macros): Adjust call to to_ada_name.
1648 (struct overloaded_name_hash): Delete.
1649 (struct overloaded_name_hasher): Likewise.
1650 (overloaded_names): Likewise.
1651 (compute_overloading_index): Likewise.
1652 (dump_ada_decl_name): Do not call compute_overloading_index and
1653 adjust calls to pp_ada_tree_identifier.
1654 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1655 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1656 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1657 (dump_ada_enum_type): Remove type and display_convention parameters.
1658 Adjust calls to pp_ada_tree_identifier.
1659 (dump_ada_node): Likewise and for dump_ada_structure.
1660 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1661 and tidy up.
1662 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1663 syntax.
1664 (print_constructor): Adjust call to pp_ada_tree_identifier.
1665 (print_destructor): Likewise.
1666 (dump_ada_declaration): Switch to aspect syntax.
1667 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1668 parameter with nested parameter.
1669 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1670 (dump_ada_specs): Do not delete overloaded_names table.
1671
8de583fc
PB
16722018-07-06 Peter Bergner <bergner@linux.ibm.com>
1673
1674 PR target/86324
e730a0ef 1675 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1676 target hook.
1677
09cff37b
NS
16782018-07-05 Nathan Sidwell <nathan@acm.org>
1679
1680 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1681 NO_IMPLICIT_EXTERN_C.
1682
98086b2b
ML
16832018-06-28 Martin Liska <mliska@suse.cz>
1684
1685 * cppspec.c: Include opt-suggestions.h.
1686
ab20d992
JJ
16872018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1688 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1689 Cesar Philippidis <cesar@codesourcery.com>
1690
1691 * c-pragma.h (enum pragma_omp_clause): Add
1692 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1693 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1694
f41b7612
JJ
16952018-06-20 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR c++/86210
1698 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1699 comment.
1700
4252ccd7
MS
17012018-06-18 Martin Sebor <msebor@redhat.com>
1702
1703 PR middle-end/85602
1704 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1705 nonstring.
1706
e197e64e
KV
17072018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1708
1709 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1710
34a7a230
JM
17112018-06-13 Jason Merrill <jason@redhat.com>
1712
5cef3733
JM
1713 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1714 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1715 handling.
1716
34a7a230
JM
1717 PR c++/86094 - wrong code with defaulted move ctor.
1718 * c-opts.c (c_common_post_options): Bump the current ABI version to
1719 13. Set warn_abi_version and flag_abi_compat_version to the current
1720 version rather than 0. Fix defaulting flag_abi_compat_version from
1721 warn_abi_version.
1722
bb0f14ae
MS
17232018-06-12 Martin Sebor <msebor@redhat.com>
1724
1725 PR c/85931
1726 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1727 sizeof source and destination yields the same value.
1728
3713f2e2
ML
17292018-06-12 Martin Liska <mliska@suse.cz>
1730
1731 * c.opt: Make MPX-related options as Deprecated.
1732
4af78ef8
DM
17332018-06-08 David Malcolm <dmalcolm@redhat.com>
1734
1735 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1736 rather than 0.
1737
31db0fe0
ML
17382018-06-08 Martin Liska <mliska@suse.cz>
1739
1740 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1741 for MPX (macros, related functions, fields in cgraph_node, ...).
1742 (handle_bnd_legacy): Likewise.
1743 (handle_bnd_instrument): Likewise.
1744 * c.opt: Likewise.
1745
fe16acf2
JJ
17462018-06-06 Jakub Jelinek <jakub@redhat.com>
1747
1748 PR c++/86068
1749 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1750 __cpp_transactional_memory to 201500 instead of 210500.
1751
4dbdb49b
JM
17522018-06-06 Jason Merrill <jason@redhat.com>
1753
1754 PR c++/85710 - ICE with -Wmemset-elt-size.
1755 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1756
f8ad043f
JM
17572018-06-01 Jason Merrill <jason@redhat.com>
1758
1759 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1760 201703.
1761
abc24d93
EB
17622018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1763
1764 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1765 declaration for a typedef independently of whether the declaration of
1766 the subtype is generated.
1767
d258f4aa
MS
17682018-05-31 Martin Sebor <msebor@redhat.com>
1769
1770 PR c/82063
1771 * c.opt (-Wno-alloc-size-larger-than): New option.
1772
b67b9225
DP
17732018-04-22 David Pagan <dave.pagan@oracle.com>
1774
1775 PR c/55976
1776 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1777 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1778 differentiate between default (no option), -Wreturn-type, and
1779 -Wno-return-type.
1780
04eb9c55
JM
17812018-05-29 Jason Merrill <jason@redhat.com>
1782
1783 * c.opt (Winit-list-lifetime): New flag.
1784
b0c31bc6
BE
17852018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1786
1787 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1788 splay_tree_delete_pointers.
1789
44284983
JJ
17902018-05-26 Jakub Jelinek <jakub@redhat.com>
1791
1792 PR bootstrap/85921
1793 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1794 noinline variable to workaround broken kernel headers.
1795
b46b715d
JM
17962018-05-18 Jason Merrill <jason@redhat.com>
1797
1798 * c.opt (Wdeprecated-copy): New flag.
1799
40659769
ML
18002018-05-17 Martin Liska <mliska@suse.cz>
1801
1802 * c-warn.c (overflow_warning): Do not use
1803 space in between 'G_' and '('.
1804
403962ea
JM
18052018-05-09 Jason Merrill <jason@redhat.com>
1806
1807 * c-common.c (valid_array_size_p): Add complain parameter.
1808 * c-common.h: ...which defaults to true.
1809
1c9ee609
JJ
18102018-05-11 Jakub Jelinek <jakub@redhat.com>
1811
1812 PR c/85696
1813 * c-omp.c (c_omp_predetermined_sharing): Return
1814 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1815
19916065
ML
18162018-05-11 Martin Liska <mliska@suse.cz>
1817
92a285c1 1818 PR sanitizer/85556
19916065
ML
1819 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1820 TREE_LIST values.
1821
79e7b1fe
JJ
18222018-05-10 Jakub Jelinek <jakub@redhat.com>
1823
1824 PR c++/85662
1825 * c-common.h (fold_offsetof_1): Removed.
1826 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1827 CTX argument defaulted to ERROR_MARK.
1828 * c-common.c (fold_offsetof_1): Renamed to ...
1829 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1830 argument, convert the pointer constant to TYPE and use size_binop
1831 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1832 a pointer type. Adjust recursive calls.
1833
86c12f76
EB
18342018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1835
1836 PR c++/85400
1837 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1838
ee336e84
NS
18392018-05-07 Nathan Sidwell <nathan@acm.org>
1840
1841 * c.opt (ffor-scope): Remove functionality, issue warning.
1842
6c072e21
NS
18432018-05-03 Nathan Sidwell <nathan@acm.org>
1844
1845 * c.opt (ffriend-injection): Remove functionality, issue warning.
1846
2cc7d3a7
DM
18472018-05-01 David Malcolm <dmalcolm@redhat.com>
1848
1849 PR c/84258
1850 * c-format.c (struct format_check_results): Add field
1851 "number_non_char".
1852 (check_format_info): Initialize it, and warn if encountered.
1853 (check_format_arg): Distinguish between wide char and
1854 everything else when detecting arrays of non-char.
1855
7761dfbe
DM
18562018-04-30 David Malcolm <dmalcolm@redhat.com>
1857
1858 * c-format.c (get_corrected_substring): Update for
1859 location_get_source_line returning a char_span. Use a char_span
1860 when handling the prefix of the correction.
1861 * c-indentation.c (get_visual_column): Update for
1862 location_get_source_line returning a char_span.
1863 (get_first_nws_vis_column): Likewise.
1864
62e98ef1
DM
18652018-03-29 David Malcolm <dmalcolm@redhat.com>
1866
1867 PR c++/84269
1868 * known-headers.cc (get_stdlib_header_for_name): Add various names
1869 from <assert.h>, <string.h>, and <memory.h>; add more names from
1870 <stdio.h>.
1871
a7dea617
JJ
18722018-03-27 Jakub Jelinek <jakub@redhat.com>
1873
1874 PR c++/85061
1875 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1876 get_base_address of the second operand is a VAR_P, rather than the
1877 operand itself, and use gcc_checking_assert instead of gcc_assert.
1878
889a3a30
MP
18792018-03-23 Marek Polacek <polacek@redhat.com>
1880
1881 PR c++/85045
1882 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1883 <case RDIV_EXPR>: Tweak condition.
1884
452154b9
EB
18852018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1886
1887 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1888
63ecb626
JJ
18892018-03-16 Jakub Jelinek <jakub@redhat.com>
1890
ce811fc4
JJ
1891 PR c/84909
1892 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1893 diagnostics.
1894
63ecb626
JJ
1895 PR c/84910
1896 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1897 diagnostics.
1898
a1295eec
RB
18992018-03-16 Richard Biener <rguenther@suse.de>
1900
1901 PR c/84873
1902 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1903 unshare the possibly folded expression.
1904
919674fb
RB
19052018-03-15 Richard Biener <rguenther@suse.de>
1906
1907 PR c/84873
1908 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1909
f99309b2
MS
19102018-03-13 Martin Sebor <msebor@redhat.com>
1911
1912 PR tree-optimization/84725
1913 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1914 with all three narrow character types, including their qualified forms.
1915
e9b9fa4c
MS
19162018-03-12 Martin Sebor <msebor@redhat.com>
1917
1918 PR tree-optimization/83456
ab20d992 1919 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
1920 Restore checking of bounded built-in functions.
1921 (check_function_arguments): Also return the result
1922 of warn_for_restrict.
ab20d992
JJ
1923 * c-common.c (check_function_restrict): Return bool.
1924 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 1925
0805d020
MP
19262018-03-02 Marek Polacek <polacek@redhat.com>
1927
1928 PR c++/84171
1929 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1930 is erroneous.
1931
ed2a2f08
TS
19322018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1933
1934 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1935 function".
1936
90abdde0
MP
19372018-03-01 Marek Polacek <polacek@redhat.com>
1938
1939 PR c++/84639
1940 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1941 alignment in computation.
1942
c6db43fa
EB
19432018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1944
1945 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1946 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1947
9e25c7ed
EB
19482018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1949
1950 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1951 (is_char_array): Take a type instead of a declaration.
1952 (dump_ada_array_type): Likewise.
1953 (is_simple_enum): Minor tweak.
1954 (dump_ada_enum_type): New function extracted from...
1955 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1956 <INTEGER_TYPE>: Remove unreachable code.
1957 <RECORD_TYPE>: Likewise. Minor tweaks.
1958 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1959 <ENUMERAL_TYPE>: New case.
1960 <RECORD_TYPE>: Factor out common code.
1961 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1962 Minor tweaks. Deal with enumeral types.
1963 (dump_ada_structure): Minor tweaks.
1964
09de3550
EB
19652018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1966
1967 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1968 address for incomplete structures.
1969 (dump_forward_type): Do not bail out for incomplete structures.
1970 (dump_ada_declaration): Do not special-case incomplete structures
1971 for subtypes. Dump them as null records for types.
1972
095d8d4b
EB
19732018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1974
1975 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1976 (is_char_array): Fix formatting.
1977 (dump_template_types): Likewise.
1978 (dump_generic_ada_node): Rename into...
1979 (dump_ada_node): ...this.
1980 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1981 incomplete structures and not for empty structures. Do not use it
1982 when forward declarations are needed.
1983 (dump_forward_type): New function.
1984 (dump_nested_types): Remove FORWARD parameter. Do not consider
1985 TREE_VISITED and do not generate a forward declaration. Only dump
1986 original nested types for nested declaration.
1987 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1988 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1989 <RECORD_TYPE>: Do not consider TREE_VISITED.
1990 (dump_ada_declaration): Use booleans and fix formatting throughout.
1991 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1992 Call dump_forward_type instead of dump_nested_types for a typedef.
1993 Remove superfluous check and adjust call to dump_nested_types.
1994 <POINTER_TYPE>: Call dump_forward_type and fall through.
1995 (dump_ada_struct_decl): Rename into...
1996 (dump_ada_structure): ...this. Do not special-case empty structures.
1997
d4cfd486
MS
19982018-02-27 Martin Sebor <msebor@redhat.com>
1999
2000 PR c++/83871
2001 * c.opt (-Wmissing-attributes): New option.
2002
b22dbd03
ML
20032018-02-21 Martin Liska <mliska@suse.cz>
2004
2005 * c.opt (Wcatch-value=): Add IntegerRange.
2006
883dfe2a
JM
20072018-02-15 Jason Merrill <jason@redhat.com>
2008
2009 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
2010
0444aa9c
NS
20112018-02-09 Nathan Sidwell <nathan@acm.org>
2012
2013 PR c/84293
2014 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
2015 arg.
2016 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
2017 arg. Adjust.
2018
cea71f0a
MS
20192018-02-09 Martin Sebor <msebor@redhat.com>
2020
2021 PR lto/84212
2022 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
2023 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
2024 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
2025 (-Wstrict-overflow, -Wsuggest-attribute): Same.
2026 (-Wuninitialized): Same.
2027
8c8b7be5
EB
20282018-02-09 Eric Botcazou <ebotcazou@adacore.com>
2029
2030 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
2031 keyword for components.
2032
7c30b12a
PC
20332018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
2034
2035 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
2036
eece7fe5
JK
20372018-02-02 Julia Koval <julia.koval@intel.com>
2038
2039 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
2040
7d07a93a
MP
20412018-01-29 Marek Polacek <polacek@redhat.com>
2042
2043 PR c/83966
2044 * c-format.c (check_function_format): Check current_function_decl.
2045
53723269
JJ
20462018-01-27 Jakub Jelinek <jakub@redhat.com>
2047
2048 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
2049 argument.
2050 (LAZY_HEX_FP_VALUES_CNT): Define.
2051 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
2052 values rather than just 12.
2053 (builtin_define_with_hex_fp_value): Likewise.
2054
7365279f
BK
20552018-01-18 Boris Kolpackov <boris@codesynthesis.com>
2056
92a285c1
ML
2057 PR other/70268
2058 * c.opt (-fmacro-prefix-map): New option.
2059 * c-opts.c (c_common_handle_option): Handle it.
2060 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
2061 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 2062
bb9869d5
DM
20632018-01-17 David Malcolm <dmalcolm@redhat.com>
2064
2065 PR c++/83814
2066 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
2067
68dc87c3
EB
20682018-01-10 Eric Botcazou <ebotcazou@adacore.com>
2069
2070 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
2071 Skip 'f' and 'F' characters if it is true.
2072 (store_ada_macro): Minor tweak.
2073 (dump_ada_macros) <CPP_COMMENT>: Likewise.
2074 <CPP_WSTRING>: Likewise.
2075 <CPP_STRING>: Output '&' in the buffer if not the first string.
2076 <CPP_NUMBER>: Adjust calls to dump_number.
2077
9a004410
DM
20782018-01-10 David Malcolm <dmalcolm@redhat.com>
2079
2080 PR c++/43486
2081 * c-common.c: Include "selftest.h".
2082 (get_atomic_generic_size): Perform the test for integral type
2083 before the range test for any integer constant, fixing indentation
2084 of braces. Call fold_for_warn before testing for an INTEGER_CST.
2085 (reject_gcc_builtin): Strip any location wrapper from EXPR.
2086 (selftest::test_fold_for_warn): New function.
2087 (selftest::c_common_c_tests): New function.
2088 (selftest::c_family_tests): Call it, and
2089 selftest::c_pretty_print_c_tests.
2090 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
2091 * c-format.c (check_format_arg): Convert VAR_P check to a
2092 fold_for_warn.
2093 * c-pretty-print.c: Include "selftest.h".
2094 (pp_c_cast_expression): Don't print casts for location wrappers.
2095 (selftest::assert_c_pretty_printer_output): New function.
2096 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
2097 (selftest::test_location_wrappers): New function.
2098 (selftest::c_pretty_print_c_tests): New function.
2099 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
2100
5c0caeb3
RS
21012018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2102 Alan Hayward <alan.hayward@arm.com>
2103 David Sherwood <david.sherwood@arm.com>
2104
2105 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
2106
73a699ae
RS
21072018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2108 Alan Hayward <alan.hayward@arm.com>
2109 David Sherwood <david.sherwood@arm.com>
2110
2111 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
2112 as polynomial.
2113
928686b1
RS
21142018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
2115 Alan Hayward <alan.hayward@arm.com>
2116 David Sherwood <david.sherwood@arm.com>
2117
2118 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
2119 (convert_vector_to_array_for_subscript): Handle polynomial
2120 TYPE_VECTOR_SUBPARTS.
2121 (c_common_type_for_mode): Check valid_vector_subparts_p.
2122 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
2123 VECTOR_CST_NELTS.
2124
85ec4feb
JJ
21252018-01-03 Jakub Jelinek <jakub@redhat.com>
2126
2127 Update copyright years.
2128
170a8bd6 21292017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 2130 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
2131
2132 * c-pragma.c (init_pragma): Register pragma GCC unroll.
2133 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
2134
ab20d992 21352017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
2136
2137 PR debug/83527
2138 PR debug/83419
2139 * c-semantics.c (only_debug_stmts_after_p): New.
2140 (pop_stmt_list): Clear side effects in debug-only stmt list.
2141 Check for single nondebug stmt followed by debug stmts only.
2142
c12d20d4
AO
21432017-12-21 Alexandre Oliva <aoliva@redhat.com>
2144
2145 PR debug/83419
2146 * c-semantics.c (pop_stmt_list): Propagate side effects from
2147 single nondebug stmt to container list.
2148
01512446
JJ
21492017-12-19 Jakub Jelinek <jakub@redhat.com>
2150
2151 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
2152 conditions with typical order conditions.
2153
82cfbd01
MP
21542017-12-18 Marek Polacek <polacek@redhat.com>
2155
2156 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
2157 not in effect.
2158
99da11ec
MS
21592017-12-17 Martin Sebor <msebor@redhat.com>
2160
2161 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
2162 an error for attribute warn_if_not_aligned.
2163
cc8bea0a
MS
21642017-12-16 Martin Sebor <msebor@redhat.com>
2165
2166 PR tree-optimization/78918
2167 * c-common.c (check_function_restrict): Avoid checking built-ins.
2168 * c.opt (-Wrestrict): Include in -Wall.
2169
4849deb1
JJ
21702017-12-15 Jakub Jelinek <jakub@redhat.com>
2171
2172 * c-attribs.c (c_common_attribute_table,
2173 c_common_format_attribute_table): Swap affects_type_identity
2174 and handler fields, adjust comments.
2175
c65e18d3
BE
21762017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
2177
2178 * c.opt (Wcast-function-type): New warning option.
2179 * c-lex.c (get_fileinfo): Avoid warning.
2180 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
2181
2004617a
QZ
21822017-12-14 Qing Zhao <qing.zhao@oracle.com>
2183
7365279f 2184 PR middle_end/79538
2004617a
QZ
2185 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
2186 Adjust the size of buf1 and buf2, add a new buf to avoid
2187 format-overflow warning.
2188
ab20d992 21892017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
2190
2191 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
2192 subsequent statement list.
2193
5d9ae53d
MS
21942017-12-07 Martin Sebor <msebor@redhat.com>
2195
2196 PR c/81544
2197 PR c/81566
2198 * c-attribs.c (attr_aligned_exclusions): New array.
2199 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
2200 (attr_common_exclusions, attr_const_pure_exclusions): Same.
2201 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
2202 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
2203 (attr_warn_unused_result_exclusions): Same.
2204 (handle_hot_attribute, handle_cold_attribute): Simplify.
2205 (handle_const_attribute): Warn on function returning void.
2206 (handle_pure_attribute): Same.
2207 (handle_aligned_attribute): Diagnose conflicting attribute
2208 specifications.
2209 * c-warn.c (diagnose_mismatched_attributes): Simplify.
2210
c79144f8
DM
22112017-12-06 David Malcolm <dmalcolm@redhat.com>
2212
2213 PR c/83236
2214 * c-common.c (selftest::c_family_tests): Call
2215 selftest::c_spellcheck_cc_tests.
2216 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
2217 * c-spellcheck.cc: Include "selftest.h".
2218 (name_reserved_for_implementation_p): New function.
2219 (should_suggest_as_macro_p): New function.
2220 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
2221 should_suggest_as_macro_p and call it.
2222 (selftest::test_name_reserved_for_implementation_p): New function.
2223 (selftest::c_spellcheck_cc_tests): New function.
2224 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
2225
613bc14f
DM
22262017-12-06 David Malcolm <dmalcolm@redhat.com>
2227
2228 * c-spellcheck.cc: New file, taken from macro-handling code in
2229 spellcheck-tree.c.
2230 * c-spellcheck.h: New file, taken from macro-handling code in
2231 spellcheck-tree.h.
2232
e76c7157
JJ
22332017-12-01 Jakub Jelinek <jakub@redhat.com>
2234
2235 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
2236 attribute.
2237 (handle_simd_attribute): Don't check for "cilk simd function"
2238 attribute. Reindent, formatting changes.
2239
b0da4034
JK
22402017-11-30 Julia Koval <julia.koval@intel.com>
2241
2242 * c-common.h (inv_list): Remove.
2243
058f0b9e
JJ
22442017-11-28 Jakub Jelinek <jakub@redhat.com>
2245
2246 PR sanitizer/81275
2247 * c-common.c (c_switch_covers_all_cases_p_1,
2248 c_switch_covers_all_cases_p): New functions.
2249 * c-common.h (c_switch_covers_all_cases_p): Declare.
2250
5e9d6aa4 22512017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 2252 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
2253
2254 * array-notation-common.c: Delete.
2255 * c-cilkplus.c: Ditto.
2256 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
2257 * c-common.def (ARRAY_NOTATION_REF): Remove.
2258 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
2259 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
2260 c_validate_cilk_plus_loop, cilkplus_an_parts,
2261 cilk_ignorable_spawn_rhs_op,
2262 cilk_recognize_spawn): Remove.
2263 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
2264 * c-omp.c: Remove CILK_SIMD check.
2265 * c-pragma.c: Ditto.
2266 * c-pragma.h: Remove CILK related pragmas.
2267 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
2268 ARRAY_NOTATION_REF condition.
2269 (c_pretty_printer::expression): Ditto.
2270 * c.opt (fcilkplus): Remove.
2271 * cilk.c: Delete.
2272
1af4ebf5
MG
22732017-11-21 Marc Glisse <marc.glisse@inria.fr>
2274
2275 * c-pretty-print.c (pp_c_additive_expression,
2276 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
2277
d44ed508
JJ
22782017-11-21 Jakub Jelinek <jakub@redhat.com>
2279
7d2f0f9b
JJ
2280 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
2281
d44ed508
JJ
2282 PR c++/83059
2283 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
2284 instead of tree_to_uhwi, formatting fix.
2285
26edace6
DM
22862017-11-20 David Malcolm <dmalcolm@redhat.com>
2287
2288 PR c/81404
2289 * known-headers.cc: New file, based on material from c/c-decl.c.
2290 (suggest_missing_header): Copied as-is.
2291 (get_stdlib_header_for_name): New, based on get_c_name_hint but
2292 heavily edited to add C++ support. Add some knowledge about
2293 <limits.h>, <stdint.h>, and <wchar.h>.
2294 * known-headers.h: Likewise.
2295
6c7a259b
DM
22962017-11-20 David Malcolm <dmalcolm@redhat.com>
2297
2298 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
2299 (lookup_name_fuzzy): Likewise. Convert return type from
2300 const char * to name_hint. Add location_t param.
2301 * name-hint.h: New header.
2302
f9c59f7e
JJ
23032017-11-19 Jakub Jelinek <jakub@redhat.com>
2304
2305 PR c/66618
2306 PR c/69960
2307 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
2308
1e39313a
JM
23092017-11-16 Joseph Myers <joseph@codesourcery.com>
2310
2311 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
2312 expected publication date of C17.
2313 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
2314
3ca0dc60
JM
23152017-11-15 Joseph Myers <joseph@codesourcery.com>
2316
2317 PR c/81156
2318 * c-common.c (c_common_reswords): Add __builtin_tgmath.
2319 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
2320
025d57f0
MS
23212017-11-10 Martin Sebor <msebor@redhat.com>
2322
2323 PR c/81117
2324 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
2325 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
2326 * c.opt (-Wstringop-truncation): New option.
2327
1b6fa695
ML
23282017-11-06 Martin Liska <mliska@suse.cz>
2329
2330 PR middle-end/82404
2331 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
2332 FE.
2333 * c.opt: Set default value of warn_return_type.
2334
64a5912c
DM
23352017-10-31 David Malcolm <dmalcolm@redhat.com>
2336
2337 * c-common.c (binary_op_error): Update for renaming of
2338 error_at_rich_loc.
2339 (c_parse_error): Likewise.
2340 * c-warn.c (warn_logical_not_parentheses): Likewise for
2341 renaming of inform_at_rich_loc.
2342 (warn_for_restrict): Likewise for renaming of
2343 warning_at_rich_loc_n.
2344
c76dc9c3
JM
23452017-10-30 Joseph Myers <joseph@codesourcery.com>
2346
2347 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
2348 * c-opts.c (set_std_c17): New function.
2349 (c_common_init_options): Use gnu17 as default C version.
2350 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
2351
ee5fd23a
MM
23522017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
2353
2354 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
2355 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
2356 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
2357 __FP_FAST_FMA<N>X.
2358
d1047465
MP
23592017-10-23 Marek Polacek <polacek@redhat.com>
2360
2361 PR c/82681
2362 * c-warn.c (warnings_for_convert_and_check): Fix typos.
2363
9e878cf1
EB
23642017-10-19 Eric Botcazou <ebotcazou@adacore.com>
2365
2366 * c-common.c (check_builtin_function_arguments): Also check arguments
2367 of __builtin_alloca_with_align_and_max.
2368
89b6abbb
DM
23692017-10-17 David Malcolm <dmalcolm@redhat.com>
2370
2371 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
2372 rather than NULL to format_warning_va.
2373 (check_format_types): Likewise when calling format_type_warning.
2374 Remove code to extract source_ranges and source_range * in favor
2375 of just a location_t.
2376 (format_type_warning): Convert source_range * param to a
2377 location_t.
2378
39382c09
JJ
23792017-10-13 Jakub Jelinek <jakub@redhat.com>
2380
2381 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
2382 [LR]SHIFT_EXPR.
2383
62e1c678
DM
23842017-10-12 David Malcolm <dmalcolm@redhat.com>
2385
2386 * c-common.c (enum missing_token_insertion_kind): New enum.
2387 (get_missing_token_insertion_kind): New function.
2388 (maybe_suggest_missing_token_insertion): New function.
2389 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
2390
b90c9338
NS
23912017-10-11 Nathan Sidwell <nathan@acm.org>
2392
2393 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
2394 (c_common_handle_option): Update incpath_kind names.
2395
3a266bcd
ML
23962017-10-11 Martin Liska <mliska@suse.cz>
2397
2398 PR sanitizer/82490
2399 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2400 Wattributes warning.
2401
8e6cdc90
RS
24022017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2403
2404 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2405 operating on trees as wide_ints.
2406 * c-common.c (pointer_int_sum): Likewise.
2407 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2408 * c-warn.c (match_case_to_enum_1): Likewise.
2409 (c_do_switch_warnings): Likewise.
2410 (maybe_warn_shift_overflow): Likewise.
2411
802b38c9
JJ
24122017-10-10 Jakub Jelinek <jakub@redhat.com>
2413
2414 PR c/82437
2415 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2416 instead of wide_int::from.
2417
4e34b338
JJ
24182017-10-06 Jakub Jelinek <jakub@redhat.com>
2419
2420 PR c/82437
2421 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2422 using to_widest use wide_int with the larger of the two precisions.
2423
4bc4b2b4
BE
24242017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2425
2426 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2427 functions.
2428
a1488398
RS
24292017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2430
2431 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2432 when combining the original unconverted comparison operands.
2433
01c9fb68
JJ
24342017-09-29 Jakub Jelinek <jakub@redhat.com>
2435
2436 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2437 attribute.
2438
6e3e8419
EB
24392017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2440
2441 * c-ada-spec.c (to_ada_name): Add index parameter.
2442 (pp_ada_tree_identifier): Likewise.
2443 (dump_ada_macros): Adjust call to to_ada_name.
2444 (struct overloaded_name_hash): New type.
2445 (struct overloaded_name_hasher): Likewise.
2446 (overloaded_names): New hash table.
2447 (compute_overloading_index): New function.
2448 (dump_ada_decl_name): Call it and pass the result to
2449 pp_ada_tree_identifier.
2450 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2451 (dump_ada_function_declaration): Likewise.
2452 (dump_generic_ada_node): Likewise.
2453 (print_constructor): Likewise.
2454 (print_destructor): Likewise.
2455 (dump_ada_specs): Delete overloaded_names table.
2456
79310774
EB
24572017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2458
2459 * c-ada-spec.c (max_ada_macros): Move around.
2460 (store_ada_macro_index): Likewise.
2461 (source_file): Rename into...
2462 (macro_source_file): ...this.
2463 (count_ada_macro): Move around.
2464 (store_ada_macro): Likewise.
2465 (compare_macro): Likewise.
2466 (print_ada_macros): Merge in...
2467 (dump_ada_macros): ...this.
2468 (source_file_base): Rename into...
2469 (current_source_file): ...this.
2470 (print_comment): Move around.
2471 (dump_ada_nodes): Call dump_ada_declaration directly.
2472 (struct with): Change type of limited field to bool.
2473 (append_withs): Change type of limited_access parameter to bool.
2474 (pp_ada_tree_identifie): Likewise.
2475 (dump_ada_decl_nam): Likewise.
2476 (dump_generic_ada_node): Likewise. Do not print the return type.
2477 (to_ada_name): Change type of space_found parameter to bool.
2478 (dump_ada_function_declaration): Return void and change type of
2479 parameters to bool. Also print the return type for a function.
2480 (print_ada_methods): Rename into...
2481 (dump_ada_methods): ...this.
2482 (print_ada_declaration): Rename into ...
2483 (dump_ada_declaration): ...this. Do not print the return type.
2484 (print_ada_struct_decl): Rename into...
2485 (dump_ada_struct_decl): ...this.
2486
7d386d45
JJ
24872017-09-29 Jakub Jelinek <jakub@redhat.com>
2488
2489 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2490 rather than DECL_INITIAL.
2491 (common_handle_aligned_attribute): Likewise.
2492
ab20d992 24932017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2494
2495 * c.opt (gen-decls): Add RejectNegative.
2496
026a79f7
AS
24972017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2498 Jakub Jelinek <jakub@redhat.com>
2499
2500 Add support for -std=c++2a.
2501 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2502 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2503 * c-opts.c (set_std_cxx2a): New.
2504 (c_common_handle_option): Set options when -std=c++2a is enabled.
2505 (c_common_post_options): Adjust comments.
2506 (set_std_cxx14, set_std_cxx17): Likewise.
2507
4a8ca690
EB
25082017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2509
2510 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2511 message for non-uniform endianness and issue a warning in C++.
2512
7b936140
JJ
25132017-09-15 Jakub Jelinek <jakub@redhat.com>
2514
2515 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2516 (Wc++17-compat): Change from undocumented alias to option.
2517 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2518 change C++1z to C++17 in description.
2519 (std=c++1z, std=gnu++1z): Change from option to undocumented
2520 deprecated alias.
2521 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2522 Adjust description.
2523 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2524 * c-opts.c (set_std_cxx1z): Rename to ...
2525 (set_std_cxx17): ... this.
2526 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2527 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2528 caller.
7b936140
JJ
2529 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2530 comments.
2531
12263f13
L
25322017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2533
2534 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2535 function alignment if warn_if_not_aligned_p is true.
2536
6836632e
NS
25372017-09-12 Nathan Sidwell <nathan@acm.org>
2538
2539 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2540 resort_sorted_fields): Move to c/c-decl.c.
2541 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2542 (struct sorted_fields_type): Move to c/c-lang.h.
2543
019bf9ad
JW
25442017-09-09 Jonathan Wakely <jwakely@redhat.com>
2545
2546 PR c++/81852
2547 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2548
bc7fe952
MP
25492017-09-04 Marek Polacek <polacek@redhat.com>
2550
2551 PR c/81783
2552 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2553 (warn_tautological_cmp): Call it.
2554
ab20d992 25552017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2556
2557 * c-opts.c (c_common_finish): Write dependency information even if
2558 there are errors.
2559
d2e05fcb
JJ
25602017-09-01 Jakub Jelinek <jakub@redhat.com>
2561
2562 PR c/81887
2563 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2564 (omp_pragmas_simd): ... here.
2565 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2566 create new clauses list containing just simd clause.
2567
18e2a8b8
RS
25682017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2569 Alan Hayward <alan.hayward@arm.com>
2570 David Sherwood <david.sherwood@arm.com>
2571
2572 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2573 into scalar_mode_supported_p call.
2574 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2575
16d22000
RS
25762017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2577 Alan Hayward <alan.hayward@arm.com>
2578 David Sherwood <david.sherwood@arm.com>
2579
2580 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2581 for the mode iterator.
2582
b397965c
RS
25832017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2584 Alan Hayward <alan.hayward@arm.com>
2585 David Sherwood <david.sherwood@arm.com>
2586
2587 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2588 * c-common.c (c_build_vec_perm_expr): Likewise.
2589
357b7604
RS
25902017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2591 Alan Hayward <alan.hayward@arm.com>
2592 David Sherwood <david.sherwood@arm.com>
2593
2594 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2595
e05c94ba
RS
25962017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2597 Alan Hayward <alan.hayward@arm.com>
2598 David Sherwood <david.sherwood@arm.com>
2599
2600 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2601 before calling targetm.addr_space.valid_pointer_mode.
2602
5c20c4af
RS
26032017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2604 Alan Hayward <alan.hayward@arm.com>
2605 David Sherwood <david.sherwood@arm.com>
2606
2607 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2608
c94843d2 26092017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2610 Alan Hayward <alan.hayward@arm.com>
2611 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2612
2613 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2614 iterators.
2615 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2616
4e10a5a7
RS
26172017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2618 Alan Hayward <alan.hayward@arm.com>
2619 David Sherwood <david.sherwood@arm.com>
2620
2621 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2622 case statements.
2623
130fcab0
ML
26242017-08-29 Martin Liska <mliska@suse.cz>
2625
2626 PR other/39851
2627 * c-common.c (parse_optimize_options): Add argument to function
2628 call.
2629 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2630
14e18d71
DM
26312017-08-24 David Malcolm <dmalcolm@redhat.com>
2632
2633 * c-lex.c (interpret_float): Use token location
2634 when building an EXCESS_PRECISION_EXPR.
2635
2f687306
DM
26362017-08-21 David Malcolm <dmalcolm@redhat.com>
2637
2638 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2639 it to check_function_format.
2640 * c-common.h (check_function_arguments): Add vec<location_t> *
2641 param.
2642 (check_function_format): Likewise.
2643 * c-format.c (struct format_check_context): Add field "arglocs".
2644 (check_function_format): Add param "arglocs"; pass it to
2645 check_format_info.
ab20d992 2646 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2647 new field of format_ctx.
2648 (check_format_arg): Pass format_ctx->arglocs to new param of
2649 check_format_info_main.
2650 (class argument_parser): New field "arglocs".
2651 (argument_parser::argument_parser): Add "arglocs_" param and use
2652 it to initialize new field.
2653 (argument_parser::check_argument_type): Pass new arglocs field to
2654 check_format_types.
2655 (check_format_info_main): Add param "arglocs", and use it when
2656 constructing arg_parser.
2657 (check_format_types): Add param "arglocs"; use it if non-NULL when
2658 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2659
00aa1fa2
L
26602017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2661
2662 PR c/53037
2663 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2664 (c_common_attribute_table): Add warn_if_not_aligned.
2665 (handle_aligned_attribute): Renamed to ...
2666 (common_handle_aligned_attribute): Remove argument, name, and add
2667 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2668 (handle_aligned_attribute): New.
2669 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2670
27be025d
MS
26712017-08-14 Martin Sebor <msebor@redhat.com>
2672
2673 PR c/81117
2674 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2675 (handle_nonstring_attribute): New function.
2676
da67acb9
MS
26772017-08-14 Martin Sebor <msebor@redhat.com>
2678
2679 PR c/81117
2680 * c-format.h (T89_G): New macro.
2681 * c-format.c (local_gcall_ptr_node): New variable.
2682 (init_dynamic_diag_info): Initialize it.
2683
a8b522b4
ML
26842017-08-11 Martin Liska <mliska@suse.cz>
2685
2686 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2687 TARGET_SUPPORTS_ALIASES.
2688
32129a17
DM
26892017-08-10 David Malcolm <dmalcolm@redhat.com>
2690
2691 * c-common.c (c_parse_error): Add rich_location * param, using it
2692 rather implicitly using input_location.
2693 * c-common.h (c_parse_error): Add rich_location * param.
2694
30af3a2b
MP
26952017-08-09 Marek Polacek <polacek@redhat.com>
2696
2697 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2698 (c_common_truthvalue_conversion): Likewise.
2699 * c-omp.c (c_finish_omp_atomic): Likewise.
2700 * c-common.h (build_binary_op): Update declaration.
2701
314e6352
ML
27022017-08-08 Martin Liska <mliska@suse.cz>
2703
2704 * c-ada-spec.c: Include header files.
2705 * c-ubsan.c: Likewise.
2706 * c-warn.c: Likewise.
2707
56b5041c
JJ
27082017-08-07 Jakub Jelinek <jakub@redhat.com>
2709
2710 PR c/69389
2711 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2712
db440138
EB
27132017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2714
2715 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2716 (print_ada_methods): Likewise.
2717 (print_ada_declaration): Likewise.
2718
577eec56
ML
27192017-08-07 Martin Liska <mliska@suse.cz>
2720
2721 * array-notation-common.c: Add new includes.
2722 * c-format.c( handle_format_attribute): Canonicalize a format
2723 function name.
2724 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2725 attribute.
2726 * c-pretty-print.c: Add new include.
2727
b854df3c
EB
27282017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2729
2730 * c-ada-spec.c (has_static_fields): Look only into variables.
2731 (print_constructor): Add TYPE parameter and use it for the name.
2732 (print_destructor): Likewise.
2733 (print_ada_declaration): Adjust to new constructor/destructor names.
2734 Adjust calls to print_constructor and print_destructor.
2735 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2736 Look only into variables in the final loop.
2737
9f2cb25e
EB
27382017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2739
2740 * c-ada-spec.c (has_static_fields): Look only into fields.
2741 (dump_generic_ada_node): Small tweak.
2742 (dump_nested_types): Look only into fields.
2743 (print_ada_declaration): Look only into methods. Small tweak.
2744 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2745
f4bcd9eb
EB
27462017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2747
2748 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2749 (dump_ada_function_declaration): Likewise.
2750 (dump_generic_ada_node): Likewise.
2751 (print_ada_declaration): Add support for const-qualified variables.
2752
f34ebeb2
ML
27532017-07-31 Martin Liska <mliska@suse.cz>
2754
2755 PR sanitize/81530
2756 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2757 Guard condition with flag_sanitize_p also with current_function_decl
2758 non-null equality.
2759 (ubsan_maybe_instrument_reference_or_call): Likewise.
2760
218e5d04
UB
27612017-07-30 Uros Bizjak <ubizjak@gmail.com>
2762
2763 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2764
942047f2
EB
27652017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2766
2767 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2768 for enumeral types.
2769 (print_ada_declaration): Add missing guard for record types.
2770
a40ff0ae
JJ
27712017-07-27 Jakub Jelinek <jakub@redhat.com>
2772
2773 PR c/45784
2774 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2775 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2776 new COMPOUND_EXPRs around the rhs of the comparison.
2777
06bd22f6
MP
27782017-07-27 Marek Polacek <polacek@redhat.com>
2779
2780 PR c/81417
2781 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2782 the types.
2783
036ea399
JJ
27842017-07-27 Jakub Jelinek <jakub@redhat.com>
2785
2786 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2787 (handle_noipa_attribute): New function.
2788
417ca011
TD
27892017-07-07 Torsten Duwe <duwe@suse.de>
2790
2791 * c-attribs.c (c_common_attribute_table): Add entry for
2792 "patchable_function_entry".
2793
5aaa8fb4
NS
27942017-07-20 Nathan Sidwell <nathan@acm.org>
2795
2796 Remove TYPE_METHODS.
2797 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2798 dump_ada_template, print_ada_methods,
2799 print_ada_declaration): Member fns are on TYPE_FIELDS.
2800
ff22eb12
NS
28012017-07-18 Nathan Sidwell <nathan@acm.org>
2802
2803 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2804
eea77d1f
DM
28052017-07-14 David Malcolm <dmalcolm@redhat.com>
2806
2807 * c-common.c (try_to_locate_new_include_insertion_point): New
2808 function.
2809 (per_file_includes_t): New typedef.
2810 (added_includes_t): New typedef.
2811 (added_includes): New variable.
2812 (maybe_add_include_fixit): New function.
2813 * c-common.h (maybe_add_include_fixit): New decl.
2814
281ac396
MS
28152017-07-10 Martin Sebor <msebor@redhat.com>
2816
2817 PR other/81345
2818 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2819
b6f43128
DM
28202017-07-06 David Malcolm <dmalcolm@redhat.com>
2821
2822 * c-common.c (selftest::c_family_tests): New.
2823 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2824 (selftest::c_family_tests): New decl.
2825
efbf55b0
MP
28262017-07-04 Marek Polacek <polacek@redhat.com>
2827
2828 PR c/81231
2829 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2830 types.
2831
6c86bd88
MP
28322017-07-04 Marek Polacek <polacek@redhat.com>
2833
2834 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2835
17a7218b
ML
28362017-06-28 Martin Liska <mliska@suse.cz>
2837
2838 PR ipa/81128
2839 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2840 to a function declaration.
2841
63010089
ML
28422017-06-28 Martin Liska <mliska@suse.cz>
2843
2844 PR driver/79659
2845 * c.opt: Add IntegerRange to various options.
2846
3e2becc4
MP
28472017-06-26 Marek Polacek <polacek@redhat.com>
2848
2849 PR c/80116
2850 * c-common.h (warn_for_multistatement_macros): Declare.
2851 * c-warn.c: Include "c-family/c-indentation.h".
2852 (warn_for_multistatement_macros): New function.
2853 * c.opt (Wmultistatement-macros): New option.
2854 * c-indentation.c (guard_tinfo_to_string): No longer static.
2855 Change the parameter type to "enum rid". Handle RID_SWITCH.
2856 * c-indentation.h (guard_tinfo_to_string): Declare.
2857
2db9b7cd
MG
28582017-06-23 Marc Glisse <marc.glisse@inria.fr>
2859
2860 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2861
c3684b7b
MS
28622017-06-15 Martin Sebor <msebor@redhat.com>
2863
2864 PR c++/80560
2865 * c.opt (-Wclass-memaccess): New option.
2866
e72c4afd
BK
28672017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2868
2869 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2870
8a516588
MP
28712017-06-13 Marek Polacek <polacek@redhat.com>
2872
2873 PR objc/80949
2874 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2875 branches is null.
2876
45b2222a
ML
28772017-06-13 Martin Liska <mliska@suse.cz>
2878
2879 PR sanitize/78204
2880 * c-attribs.c (add_no_sanitize_value): New function.
2881 (handle_no_sanitize_attribute): Likewise.
2882 (handle_no_sanitize_address_attribute): Use the function.
2883 (handle_no_sanitize_thread_attribute): New function.
2884 (handle_no_address_safety_analysis_attribute): Use
2885 add_no_sanitize_value.
2886 (handle_no_sanitize_undefined_attribute): Likewise.
2887 * c-common.h: Declare new functions.
2888 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2889 (ubsan_instrument_shift): Likewise.
2890 (ubsan_instrument_bounds): Likewise.
2891 (ubsan_maybe_instrument_array_ref): Likewise.
2892 (ubsan_maybe_instrument_reference_or_call): Likewise.
2893
a01f151f
JM
28942017-06-11 Jason Merrill <jason@redhat.com>
2895
2896 * c-ada-spec.c, c-pragma.c: Use id_equal.
2897
3de4ac6d
MP
28982017-06-04 Marek Polacek <polacek@redhat.com>
2899
2900 PR c/80919
2901 * c-format.c (matching_type_p): Return false if any of the types
2902 requires structural equality.
2903
2474f48f
MS
29042017-06-02 Martin Sebor <msebor@redhat.com>
2905
2906 PR c/80892
2907 * c-warn.c (conversion_warning): Use -Wconversion for integer
2908 conversion and -Wfloat-conversion for floating one.
2909
40ffd95f
BE
29102017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2911
2912 * c.opt (Wsizeof-pointer-div): New warning option.
2913
3fa4634c
VR
29142017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2915
2916 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2917 (Wcatch-value=1): Enable by -Wall.
2918
f012c8ef
DM
29192017-05-30 David Malcolm <dmalcolm@redhat.com>
2920
2921 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2922 format_chars.
2923 * c.opt (fdiagnostics-show-template-tree): New option.
2924 (felide-type): New option.
2925
63dbcd13
VR
29262017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2927
2928 * c.opt (Wcatch-value=): New C++ warning flag.
2929
be136b5c
NS
29302017-05-24 Nathan Sidwell <nathan@acm.org>
2931
2932 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2933 const casts to avoid warning.
2934
3cd211af
MS
29352017-05-24 Martin Sebor <msebor@redhat.com>
2936
2937 PR c/80731
2938 * c-common.h (unsafe_conversion_p): Add a function argument.
2939 * c-common.c (unsafe_conversion_p): Same.
2940 Add type names and values to diagnostics.
2941 (scalar_to_vector): Adjust.
2942 * c-warn.c (constant_expression_error): Add a function argument.
2943 Add type names and values to diagnostics.
2944 (conversion_warning): Add a function argument.
2945 Add type names and values to diagnostics.
2946 (warnings_for_convert_and_check): Same.
2947
1ff7be5a
JM
29482017-05-19 Jason Merrill <jason@redhat.com>
2949
2950 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2951 enumerators.
2952
ff502317
BE
29532017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2954
2955 * c-format.c (locus): Move out of function scope,
2956 add GTY attribute.
2957
2a8a8d7b
NS
29582017-05-19 Nathan Sidwell <nathan@acm.org>
2959
2960 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2961 (c_common_parse_file): Remove class dump handling.
2962 (get_dump_info): Likewise.
2963
39aac208
RB
29642017-05-19 Richard Biener <rguenther@suse.de>
2965
2966 PR c++/80593
2967 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2968 to alias-set zero memory.
2969
6ecd2339
BE
29702017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2971
2972 * c-format.c (local_tree_type_node): Add GTY attribute.
2973
6574d78e
MP
29742017-05-18 Marek Polacek <polacek@redhat.com>
2975
2976 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2977 (c_common_fixed_point_type_for_size): Likewise.
2978 (c_common_type_for_mode): Likewise.
2979 (shorten_compare): Likewise.
2980 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2981 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2982
e3455240
MP
29832017-05-18 Marek Polacek <polacek@redhat.com>
2984
2985 * c-common.c (self_promoting_args_p): Change the return type to bool.
2986 Use false/true instead of 0/1.
2987 * c-common.h (self_promoting_args_p): Update.
2988
3fa8871b
MP
29892017-05-17 Marek Polacek <polacek@redhat.com>
2990
2991 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2992 * c-warn.c: Likewise.
2993
b42cc3ca
VV
29942017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2995
2996 Implement new C++ intrinsics __is_assignable and __is_constructible.
2997 * c-common.c (__is_assignable, __is_constructible): New.
2998 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2999
1a817418
ML
30002017-05-17 Martin Liska <mliska@suse.cz>
3001
3002 * c-common.h: Introduce dump_flags_t type and
3003 use it instead of int type.
3004 * c-gimplify.c (c_genericize): Likewise.
3005 * c-opts.c: Likewise.
3006
b2fa0a8b
MP
30072017-05-17 Marek Polacek <polacek@redhat.com>
3008
3009 * c-common.c (c_save_expr): Remove.
3010 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
3011 * c-common.h (c_save_expr): Remove declaration.
3012
31c2d57d
VR
30132017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
3014
3015 PR c/35441
3016 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
3017 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
3018 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
3019 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
3020 RDIV_EXPR.
3021 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
3022
684f84de
MP
30232017-05-09 Marek Polacek <polacek@redhat.com>
3024
3025 PR c/80525
3026 * c-warn.c (unwrap_c_maybe_const): New.
3027 (warn_logical_operator): Call it.
3028
641da50a
NS
30292017-05-09 Nathan Sidwell <nathan@acm.org>
3030
3031 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
3032 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
3033
631238ac
MS
30342017-05-08 Martin Sebor <msebor@redhat.com>
3035
3036 PR translation/80280
3037 * c-format.h (struct format_flag_spec): Add new member.
3038 (T89_T): New macro.
3039 * c-format.c (local_tree_type_node): New global.
3040 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
3041 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
3042 (strfmon_flag_specs): Likewise.
3043 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
3044 with distinct quoting properties.
3045 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
3046 (flag_chars_t::validate): Add argument and handle bad quoting.
3047 (check_format_info_main): Handle quoting problems.
3048 (init_dynamic_diag_info): Simplify.
3049
49f0c04c
JM
30502017-05-08 Jason Merrill <jason@redhat.com>
3051
3052 * c-opts.c (c_common_post_options): Update defaults for
3053 flag_abi_version and flag_abi_compat_version.
3054
56d35585
DM
30552017-05-05 David Malcolm <dmalcolm@redhat.com>
3056
3057 * c-common.c (c_cpp_error): Replace report_diagnostic
3058 with diagnostic_report_diagnostic.
3059
0f2c4a8f
MS
30602017-05-04 Martin Sebor <msebor@redhat.com>
3061
3062 PR translation/80280
3063 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
3064 (handle_weakref_attribute): Same.
3065
6fe63fb4
NS
30662017-05-03 Nathan Sidwell <nathan@acm.org>
3067
3068 Canonicalize canonical type hashing
3069 * c-common.c (complete_array_type): Use type_hash_canon.
3070
815d9cc6
XR
30712017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
3072
92a285c1 3073 PR c++/80038
815d9cc6
XR
3074 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
3075 prototype.
3076 (cilk_install_body_pedigree_operations): Likewise.
3077 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
3078 detatched.
3079 (cilk_gimplify_call_params_in_spawned_fn): Remove.
3080 (cilk_install_body_pedigree_operations): Likewise.
3081 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
3082 unwrapping.
3083
f8a36447
JJ
30842017-04-27 Jakub Jelinek <jakub@redhat.com>
3085
3086 PR c++/80534
3087 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
3088 flag on non-aggregate element types.
3089
7c145456
BE
30902017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
3091
3092 * c-common.c (c_type_hasher, type_hash_table): Remove.
3093 (c_common_get_alias_set): Remove unreachable code.
3094 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
3095
c3cbcd45
VR
30962017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
3097
3098 * c.opt (Wextra-semi): New C++ warning flag.
3099
8a59d466
JJ
31002017-04-20 Jakub Jelinek <jakub@redhat.com>
3101
3102 PR middle-end/80423
3103 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
3104
8487c9a5
JJ
31052017-04-18 Jakub Jelinek <jakub@redhat.com>
3106
3107 PR middle-end/79788
3108 PR middle-end/80375
3109 * c-common.c (c_common_type_for_mode): Don't handle
3110 widest_*_literal_type_node here.
3111 c_common_signed_or_unsigned_type): Likewise.
3112 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
3113 to *intTI_type_node or *intDI_type_node depending on whether
3114 TImode is supported by the target or not.
3115
3ee0fb02
ML
31162017-04-10 Martin Liska <mliska@suse.cz>
3117
3118 PR sanitizer/80350
3119 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
3120 doing an UBSAN check.
3121
5764ee3c
JW
31222017-04-03 Jonathan Wakely <jwakely@redhat.com>
3123
3124 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
3125
6f3af356
JJ
31262017-03-31 Jakub Jelinek <jakub@redhat.com>
3127
3128 PR c++/79572
3129 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
3130 tree *.
3131 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
3132 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
3133 REFERENCE_TYPE.
3134
f6a7a9d5
DM
31352017-03-31 David Malcolm <dmalcolm@redhat.com>
3136
3137 PR documentation/78732
3138 * c.opt (Wendif-labels): Fix description to refer to
3139 #else rather than #elif.
3140
af88f557
JJ
31412017-03-31 Jakub Jelinek <jakub@redhat.com>
3142
3143 PR libstdc++/80251
3144 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
3145 * c-common.c (c_common_reswords): Add __is_aggregate trait.
3146
a9e4a1a5
JJ
31472017-03-27 Jakub Jelinek <jakub@redhat.com>
3148
3149 PR middle-end/80162
3150 * c-common.c (c_common_mark_addressable_vec): Don't set
3151 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
3152
3f01b620
MS
31532017-03-21 Martin Sebor <msebor@redhat.com>
3154
3155 PR c++/79548
3156 * c-common.c (set_underlying_type): Mark type used only when
3157 original del is declared unused.
3158
2f6f187a
DM
31592017-03-10 David Malcolm <dmalcolm@redhat.com>
3160
3161 PR translation/79848
3162 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
3163 "%qs".
3164
a02fa805
DM
31652017-03-10 David Malcolm <dmalcolm@redhat.com>
3166
3167 PR c/79921
3168 * c-indentation.c (warn_for_misleading_indentation): Remove parens
3169 from inform's message, so that xgettext can locate it.
3170
822a132c
MP
31712017-03-09 Marek Polacek <polacek@redhat.com>
3172
3173 PR c++/79962
3174 PR c++/79984
3175 * c-attribs.c (handle_nonnull_attribute): Save the result of default
3176 conversion to the attribute list.
3177
bba81f1c
ML
31782017-03-09 Martin Liska <mliska@suse.cz>
3179
3180 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
3181
108154ff
JM
31822017-03-03 Jason Merrill <jason@redhat.com>
3183
3184 * c.opt (Wnoexcept-type): New.
3185
eb0e7c34
RB
31862017-03-02 Richard Biener <rguenther@suse.de>
3187
3188 PR c/79756
3189 * c-common.c (c_common_mark_addressable_vec): Look through
3190 C_MAYBE_CONST_EXPR.
3191
9453ba0a
ML
31922017-02-28 Martin Liska <mliska@suse.cz>
3193
3194 * c.opt: Replace space with tabular for options of <number>
3195 type.
3196
6a825afe
ML
31972017-02-28 Martin Liska <mliska@suse.cz>
3198
3199 * c.opt: Fix --help=option -Q for options which are of
3200 an enum type.
3201
4227c9ad
JJ
32022017-02-24 Jakub Jelinek <jakub@redhat.com>
3203
3204 PR c++/79588
3205 * c-common.c (check_function_restrict): New function.
3206 (check_function_arguments): Add FNDECL argument. Call
3207 check_function_restrict if -Wrestrict.
3208 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
3209 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
3210 * c-common.h (check_function_arguments): Add FNDECL argument.
3211 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
3212
59909673
EB
32132017-02-24 Eric Botcazou <ebotcazou@adacore.com>
3214
3215 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
3216 treatment of parameters with pointer-to-tagged type and tidy up.
3217 (print_ada_methods): Remove the special treatment of C++ static member
3218 functions.
3219
54dcd526
ML
32202017-02-22 Martin Liska <mliska@suse.cz>
3221
3222 * c.opt: Replace inequality signs with square brackets
3223 for -Wnornalized.
3224
00bc9de3
JJ
32252017-02-21 Jakub Jelinek <jakub@redhat.com>
3226
3227 PR c++/79641
3228 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
3229 preserve quals.
3230
97fcf744
JM
32312017-02-17 Joseph Myers <joseph@codesourcery.com>
3232
3233 * c-cppbuiltin.c (builtin_define_float_constants): Define
3234 __DECIMAL_DIG__ to the value for long double.
3235
c7545f1c
MP
32362017-02-15 Marek Polacek <polacek@redhat.com>
3237
3238 PR c/79515
3239 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
3240 conversion has occured.
3241
c2e84327
DM
32422017-01-24 David Malcolm <dmalcolm@redhat.com>
3243
3244 * c-common.c (c_common_reswords): Add "__RTL".
3245 * c-common.h (enum rid): Add RID_RTL.
3246
2ebd93e1
MP
32472017-01-20 Marek Polacek <polacek@redhat.com>
3248
3249 PR c/64279
3250 * c-common.h (do_warn_duplicated_branches_r): Declare.
3251 * c-gimplify.c (c_genericize): Walk the function tree calling
3252 do_warn_duplicated_branches_r.
3253 * c-warn.c (expr_from_macro_expansion_r): New.
3254 (do_warn_duplicated_branches): New.
3255 (do_warn_duplicated_branches_r): New.
3256 * c.opt (Wduplicated-branches): New option.
3257
0d80ab91
DM
32582017-01-17 David Malcolm <dmalcolm@redhat.com>
3259
3260 PR c++/71497
3261 * c-indentation.c (warn_for_misleading_indentation): Use the past
3262 subjunctive in the note.
3263
7f991c36
AH
32642017-01-17 Aldy Hernandez <aldyh@redhat.com>
3265
3266 PR c/79116
3267 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
3268 start type to integer_type.
3269
1c70261c
JJ
32702017-01-16 Jakub Jelinek <jakub@redhat.com>
3271
3272 PR driver/49726
3273 * c.opt (gen-decls): Add Driver flag.
3274
1ddca3f3
PC
32752017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3276
3277 Revert:
3278 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3279
3280 PR c++/71737
3281 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3282
7d2f3f1d
PC
32832017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
3284
3285 PR c++/71737
3286 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
3287
bce6f760
MS
32882017-01-12 Martin Sebor <msebor@redhat.com>
3289
3290 (-Wformat-overflow): ...to this.
3291
bf5fbf46
MS
32922017-01-11 Martin Sebor <msebor@redhat.com>
3293
3294 PR c/78768
3295 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
3296 Also enable for LTO.
3297
e363df3f
JM
32982017-01-10 Jason Merrill <jason@redhat.com>
3299
3300 Implement P0195R2, C++17 variadic using.
3301 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
3302
bd2c6270
JJ
33032017-01-09 Jakub Jelinek <jakub@redhat.com>
3304
3305 PR translation/79019
3306 PR translation/79020
3307 * c.opt (Wnormalized=): Fix typo in description.
3308
efcc8d38
MS
33092017-01-08 Martin Sebor <msebor@redhat.com>
3310
3311 PR middle-end/77708
3312 * c.opt (-Wformat-truncation): New option.
3313
ab20d992 33142017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
3315
3316 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
3317 value to unsigned short to fit in 4 hex digits without
3318 warnings.
3319
4e89adf9
EB
33202017-01-05 Eric Botcazou <ebotcazou@adacore.com>
3321
3322 * c.opt (fsso-struct): Add 'native' value.
3323
cd445b54
ML
33242017-01-05 Martin Liska <mliska@suse.cz>
3325
3326 PR pch/78970
3327 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
3328 header.
3329
a9342885
MP
33302017-01-04 Marek Polacek <polacek@redhat.com>
3331
3332 PR c++/64767
3333 * c.opt (Wpointer-compare): New option.
3334
fc73e60c
JJ
33352017-01-04 Jakub Jelinek <jakub@redhat.com>
3336
3337 PR driver/78957
3338 * c.opt (fsso-struct=): Add RejectNegative.
3339
cbe34bb5
JJ
33402017-01-01 Jakub Jelinek <jakub@redhat.com>
3341
3342 Update copyright years.
3343
d4a6c0ea
ML
33442016-12-29 Martin Liska <mliska@suse.cz>
3345
3346 PR c/78933
3347 * c.opt (strong-eval-order): Add RejectNegative keyword.
3348
67a5ad7c
JM
33492016-12-22 Jason Merrill <jason@redhat.com>
3350
3351 Implement P0522R0, matching of template template arguments.
3352 * c-cppbuiltin.c (c_cpp_builtins): Define
3353 __cpp_template_template_args.
3354
0dba7960
JJ
33552016-12-21 Jakub Jelinek <jakub@redhat.com>
3356
3357 PR bootstrap/78817
3358 * c-common.c (struct nonnull_arg_ctx): New type.
3359 (check_function_nonnull): Return bool instead of void. Use
3360 nonnull_arg_ctx as context rather than just location_t.
3361 (check_nonnull_arg): Adjust for the new context type, set
3362 warned_p to true if a warning has been diagnosed.
3363 (check_function_arguments): Return bool instead of void.
3364 * c-common.h (check_function_arguments): Adjust prototype.
3365
31bfc9b9
JM
33662016-12-21 Jason Merrill <jason@redhat.com>
3367
3368 * c.opt (-fnew-ttp-matching): New flag.
3369 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
3370
629b3d75
MJ
33712016-12-14 Martin Jambor <mjambor@suse.cz>
3372
3373 * c-omp.c: Include omp-general.h instead of omp-low.h.
3374 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
3375 name.
3376
474da67e
MS
33772016-12-14 Martin Sebor <msebor@redhat.com>
3378
3379 PR c/17308
3380 * c-common.c (check_nonnull_arg): Disable when optimization
3381 is enabled.
3382
fe366b87
MP
33832016-12-12 Marek Polacek <polacek@redhat.com>
3384
3385 PR c++/78647
3386 * c-common.c (attribute_fallthrough_p): Return false for
3387 error_mark_node.
3388
8bd9f164
MS
33892016-12-08 Martin Sebor <msebor@redhat.com>
3390
3391 PR c/78284
3392 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
3393
060162e0
MS
33942016-12-08 Martin Sebor <msebor@redhat.com>
3395
3396 PR c/78165
92a285c1
ML
3397 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
3398 suffix.
060162e0 3399
ee92e7ba
MS
34002016-12-07 Martin Sebor <msebor@redhat.com>
3401
3402 PR c/53562
3403 PR middle-end/77784
3404 PR middle-end/78149
3405 PR middle-end/78138
3406 * c.opt (-Wstringop-overflow): New option.
3407
84b0769e
MO
34082016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3409
3410 * c-attribs.c (asan odr indicator): New attribute.
3411 (handle_asan_odr_indicator_attribute): New function.
3412
7fa6a965
PK
34132016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3414
3415 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3416 ptrdiff_type_node;
3417
56d8ffc1
JG
34182016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3419
3420 * c-common.c (excess_precision_mode_join): New.
3421 (c_ts18661_flt_eval_method): New.
3422 (c_c11_flt_eval_method): Likewise.
3423 (c_flt_eval_method): Likewise.
3424 * c-common.h (excess_precision_mode_join): New.
3425 (c_flt_eval_method): Likewise.
3426 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3427 (cpp_iec_559_value): Call it.
3428 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3429 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3430 __FLT_EVAL_METHOD_TS_18661_3__.
3431
04f0fcf7
JG
34322016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3433
3434 * c-opts.c (c_common_post_options): Add logic to handle the default
3435 case for -fpermitted-flt-eval-methods.
3436
fb2675cb
PB
34372016-11-23 Paolo Bonzini <bonzini@gnu.org>
3438
3439 * c.opt (Wexpansion-to-defined): New.
3440
ec1c5694
JJ
34412016-11-23 Jakub Jelinek <jakub@redhat.com>
3442
3443 PR target/78451
3444 * c-pragma.c (handle_pragma_target): Don't replace
3445 current_target_pragma, but chainon the new args to the current one.
3446
730c9e75
NS
34472016-11-22 Nathan Sidwell <nathan@acm.org>
3448
3449 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3450 indentation and formatting.
730c9e75 3451
89990732
MS
34522016-11-21 Martin Sebor <msebor@redhat.com>
3453
3454 * c.opt (-fprintf-return-value): Enable by default.
3455
48330c93
BE
34562016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3457
3458 PR c++/71973
3459 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3460 * c-common.c (c_common_nodes_and_builtins): Initialize
3461 const_tm_ptr_type_node.
3462
0d939c95
MP
34632016-11-16 Marek Polacek <polacek@redhat.com>
3464
3465 PR c/78285
3466 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3467
8e745a17
JJ
34682016-11-14 Jakub Jelinek <jakub@redhat.com>
3469
3470 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3471
1ee62b92 34722016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3473 Richard Biener <rguenther@suse.de>
3474
3475 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3476 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3477 * c.opt (fgimple): New option.
1ee62b92 3478
22b15758
UB
34792016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3480
3481 PR c/35503
3482 * c-common.h (warn_for_restrict): Declare.
3483 * c-warn.c: Include gcc-rich-location.h.
3484 (warn_for_restrict): New function.
3485 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3486 (gcc_cdiag_char_table): Likewise.
3487 (gcc_cxxdiag_char_table): Likewise.
3488 * c.opt (Wrestrict): New option.
3489
4be719cd
EB
34902016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3491
3492 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3493 for nested types only if the type is a record or union and dump SLOC.
3494
4a826ca6
JM
34952016-11-09 Jason Merrill <jason@redhat.com>
3496
3497 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3498
2e955d50
JJ
34992016-11-09 Jakub Jelinek <jakub@redhat.com>
3500
3501 * c-ubsan.c (ubsan_instrument_shift): Handle split
3502 -fsanitize=shift-base and -fsanitize=shift-exponent.
3503
51dc6603
JM
35042016-11-07 Jason Merrill <jason@redhat.com>
3505
3506 * c.opt (Wc++1z-compat): New.
3507 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3508
6dc4a604
ML
35092016-11-07 Martin Liska <mliska@suse.cz>
3510
3511 * c-warn.c (warn_for_unused_label): Save all labels used
3512 in goto or in &label.
3513
b302001e
JM
35142016-11-03 Jason Merrill <jason@redhat.com>
3515
3516 * c-cppbuiltin.c (c_cpp_builtins): Correct
3517 __cpp_inheriting_constructors.
3518
31f7f784
JM
35192016-11-01 Jason Merrill <jason@redhat.com>
3520
2bc78e3c
JM
3521 * c-cppbuiltin.c (c_cpp_builtins): Update
3522 __cpp_inheriting_constructors.
3523
31f7f784
JM
3524 * c.opt (-fnew-inheriting-ctors): New.
3525 * c-opts.c: Default to on for ABI 11+.
3526
dcb466ec
JJ
35272016-10-31 Jakub Jelinek <jakub@redhat.com>
3528
3529 PR c++/77948
3530 * c.opt (fext-numeric-literals): Add Var and Init.
3531 * c-opts.c (c_common_handle_option): Don't clear
3532 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3533 (c_common_post_options): Clear it here if not set
3534 explicitly.
3535
52e1b91e
AH
35362016-10-28 Aldy Hernandez <aldyh@redhat.com>
3537
3538 PR debug/77773
3539 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3540 if NULL.
3541
e16f1cc7
JJ
35422016-10-25 Jakub Jelinek <jakub@redhat.com>
3543
3544 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3545 * c-common.c (c_common_reswords): Add __builtin_launder.
3546
f8348061
BE
35472016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3548
3549 * c-common.c (c_common_truthvalue_conversion): Warn for
3550 multiplications in boolean context. Fix the quoting of '<<' and '<'
3551 in the shift warning.
3552
eff89e01
BE
35532016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3554
3555 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3556
24bc7bf4
JM
35572016-10-20 Jason Merrill <jason@redhat.com>
3558
3559 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3560
4c712374
BE
35612016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3562
3563 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3564 integer shift ops in boolean context.
3565
35662016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3567
3568 * c.opt (Walloca): New.
3569 (Walloca-larger-than=): New.
3570 (Wvla-larger-than=): New.
3571
8fa18c06
MP
35722016-10-17 Marek Polacek <polacek@redhat.com>
3573
3574 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3575 Return immediately when finding a match.
3576 (warn_tautological_cmp): Remove a boolean variable that is no longer
3577 needed.
3578
b12b1915
MP
35792016-10-17 Marek Polacek <polacek@redhat.com>
3580
3581 * c-attribs.c: New file.
3582 * c-common.c: Move attributes handling to c-attribs.c.
3583 (get_nonnull_operand): No longer static.
3584 * c-common.h: Move the declarations from c-attribs.c to its own section.
3585
2045acd9
JM
35862016-10-14 Jason Merrill <jason@redhat.com>
3587
3588 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3589 and __cpp_deduction_guides.
3590
14a2c9aa
JM
35912016-10-13 Jason Merrill <jason@redhat.com>
3592
3593 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3594
4d0cdd0c
TP
35952016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3596
3597 * c-cppbuiltin.c: Include memmodel.h.
3598 * c-opts.c: Likewise.
3599 * c-pragma.c: Likewise.
3600 * c-warn.c: Likewise.
3601
70f6d5e1
JJ
36022016-10-12 Jakub Jelinek <jakub@redhat.com>
3603
3604 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3605 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3606 * c-opts.c (sanitize_cpp_opts): Initialize
3607 cpp_opts->cpp_warn_implicit_fallthrough.
3608
78f61294
MP
36092016-10-11 Marek Polacek <polacek@redhat.com>
3610
3611 * c-common.c (warning_candidate_p): Change the return type to bool
3612 and return true/false instead of 1/0.
3613 (vector_mode_valid_p): Likewise.
3614
038b5cc0
MP
36152016-10-11 Marek Polacek <polacek@redhat.com>
3616
3617 * c-common.c (fold_for_warn): No longer static.
3618 (bool_promoted_to_int_p): Likewise.
3619 (c_common_get_narrower): Likewise.
3620 (constant_expression_warning): Move to c-warn.c.
3621 (constant_expression_error): Likewise.
3622 (overflow_warning): Likewise.
3623 (warn_logical_operator): Likewise.
3624 (find_array_ref_with_const_idx_r): Likewise.
3625 (warn_tautological_cmp): Likewise.
3626 (expr_has_boolean_operands_p): Likewise.
3627 (warn_logical_not_parentheses): Likewise.
3628 (warn_if_unused_value): Likewise.
3629 (strict_aliasing_warning): Likewise.
3630 (sizeof_pointer_memaccess_warning): Likewise.
3631 (check_main_parameter_types): Likewise.
3632 (conversion_warning): Likewise.
3633 (warnings_for_convert_and_check): Likewise.
3634 (match_case_to_enum_1): Likewise.
3635 (match_case_to_enum): Likewise.
3636 (c_do_switch_warnings): Likewise.
3637 (warn_for_omitted_condop): Likewise.
3638 (readonly_error): Likewise.
3639 (lvalue_error): Likewise.
3640 (invalid_indirection_error): Likewise.
3641 (warn_array_subscript_with_type_char): Likewise.
3642 (warn_about_parentheses): Likewise.
3643 (warn_for_unused_label): Likewise.
3644 (warn_for_div_by_zero): Likewise.
3645 (warn_for_memset): Likewise.
3646 (warn_for_sign_compare): Likewise.
3647 (do_warn_double_promotion): Likewise.
3648 (do_warn_unused_parameter): Likewise.
3649 (record_locally_defined_typedef): Likewise.
3650 (maybe_record_typedef_use): Likewise.
3651 (maybe_warn_unused_local_typedefs): Likewise.
3652 (maybe_warn_bool_compare): Likewise.
3653 (maybe_warn_shift_overflow): Likewise.
3654 (warn_duplicated_cond_add_or_warn): Likewise.
3655 (diagnose_mismatched_attributes): Likewise.
3656 * c-common.h: Move the declarations from c-warn.c to its own section.
3657 * c-warn.c: New file.
3658
627be19f
JM
36592016-10-08 Jason Merrill <jason@redhat.com>
3660
3661 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3662 into COND_EXPR in C++.
3663
7bad794a
JJ
36642016-10-08 Jakub Jelinek <jakub@redhat.com>
3665
3666 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3667 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3668 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3669
be845b04
JJ
36702016-10-07 Jakub Jelinek <jakub@redhat.com>
3671
3672 Implement LWG2296 helper intrinsic
3673 * c-common.h (enum rid): Add RID_ADDRESSOF.
3674 * c-common.c (c_common_reswords): Add __builtin_addressof.
3675
c09c4992
BE
36762016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3677
3678 PR c++/77700
3679 * c-common.c (c_common_truthvalue_conversion): Warn also for
3680 suspicious enum values in boolean context.
3681
342cfb3e
JJ
36822016-10-06 Jakub Jelinek <jakub@redhat.com>
3683
3684 Implement P0258R2 - helper for C++17
3685 std::has_unique_object_representations trait
3686 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3687 * c-common.c (c_common_reswords): Add
3688 __has_unique_object_representations.
3689
2e69f143
JJ
36902016-10-05 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR sanitizer/66343
3693 * c-ubsan.c (ubsan_instrument_return): Don't call
3694 initialize_sanitizer_builtins here.
3695
700fff34
BE
36962016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3697
3698 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3699 conditional expression in boolean context when only one arm is
3700 non-boolean.
3701
9563bfcd
JJ
37022016-10-05 Jakub Jelinek <jakub@redhat.com>
3703
04a32443
JJ
3704 PR sanitizer/77823
3705 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3706 is not integral.
3707
9563bfcd
JJ
3708 * c-common.c (c_common_reswords): Update comment for C++11.
3709
f1644724
JM
37102016-10-04 Jason Merrill <jason@redhat.com>
3711
3712 * c-common.c (make_tree_vector_from_ctor): New.
3713 * c-common.h: Declare it.
3714
5a79befb
JJ
37152016-10-04 Jakub Jelinek <jakub@redhat.com>
3716
3717 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3718 __LIBGCC_JCR_SECTION_NAME__.
3719
1633d3b9
BE
37202016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3721
3722 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3723 left shift in boolean context.
3724
a2c6e7f2
JJ
37252016-09-29 Jakub Jelinek <jakub@redhat.com>
3726
3727 Implement P0001R1 - C++17 removal of register storage class specifier
3728 * c.opt (Wregister): New warning.
3729 * c-opts.c (c_common_post_options): Enable -Wregister by
3730 default for C++17.
3731
75304c87
JG
37322016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3733
3734 * c-opts.c (c_common_post_options): Remove special case for
3735 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3736 in C++.
3737
bbfac6da
JJ
37382016-09-27 Jakub Jelinek <jakub@redhat.com>
3739
6e39060a
JJ
3740 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3741 -std=c++1z.
3742
bbfac6da
JJ
3743 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3744
e73cf9a2
TP
37452016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3746
3747 * c-common.c: Include memmodel.h.
3748
c6147dc4
MP
37492016-09-26 Marek Polacek <polacek@redhat.com>
3750
3751 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3752
81fea426
MP
37532016-09-26 Marek Polacek <polacek@redhat.com>
3754
3755 PR c/7652
3756 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3757 (handle_fallthrough_attribute): New function.
3758 (attribute_fallthrough_p): New function.
3759 * c-common.h (attribute_fallthrough_p): Declare.
3760
9a2300e9
MP
37612016-09-24 Marek Polacek <polacek@redhat.com>
3762
3763 PR c/77490
3764 * c.opt (Wbool-operation): New.
3765
a09e9e35
BE
37662016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3767
3768 * c-common.c (c_common_truthvalue_conversion): Inhibit
3769 Wint-in-bool-context warning with from_macro_definition_at.
3770 Mention the expression will always evaluate to true.
3771
d43b4ccc
MS
37722016-09-21 Martin Sebor <msebor@redhat.com>
3773
3774 PR bootstrap/77676
3775 * c.opt (fprintf-return-value): Temporarily initialize to zero
3776 to unblock bootstrap failures.
3777
2e1c20b1
JJ
37782016-09-21 Jakub Jelinek <jakub@redhat.com>
3779
3780 PR c++/77651
3781 * c.opt (Waligned-new=): Add RejectNegative.
3782 (faligned-new=): Likewise. Spelling fix - change
3783 aligned_new_threshhold to aligned_new_threshold.
3784 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3785 to aligned_new_threshold.
3786
88d0c3f0
MS
37872016-09-20 Martin Sebor <msebor@redhat.com>
3788
3789 PR middle-end/49905
3790 * c.opt: Add -Wformat-length and -fprintf-return-value.
3791
144a96e4
BE
37922016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3793
3794 PR c++/77434
3795 * c.opt (Wint-in-bool-context): New warning.
3796 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3797 constants in boolean context.
3798
63012d9a
JM
37992016-09-19 Joseph Myers <joseph@codesourcery.com>
3800
3801 * c-common.c (max_align_t_align): Also consider alignment of
3802 float128_type_node.
3803
931388ce
JM
38042016-09-15 Jason Merrill <jason@redhat.com>
3805
3806 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3807 DECL_EXTERNAL.
3808
38711381
JM
38092016-09-14 Jason Merrill <jason@redhat.com>
3810
3811 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3812 limit FIELD_DECL, either.
3813
e51fbec3
MP
38142016-09-14 Marek Polacek <polacek@redhat.com>
3815
3816 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3817 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3818 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3819
254830ba
DM
38202016-09-13 David Malcolm <dmalcolm@redhat.com>
3821
3822 * c-common.c (warn_logical_not_parentheses): Replace
3823 rich_location::add_fixit_insert calls with add_fixit_insert_before
3824 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3825
42763690
JM
38262016-09-13 Jason Merrill <jason@redhat.com>
3827 Tom de Vries <tom@codesourcery.com>
3828
3829 PR c++/77427
3830 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3831
9453eee9
JM
38322016-09-13 Jason Merrill <jason@redhat.com>
3833
3834 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3835 limit types at all.
3836
e96809e3
JM
38372016-09-12 Jason Merrill <jason@redhat.com>
3838
3839 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3840 bit/byte confusion, allow large alignment for types.
3841
54dcdb88
BE
38422016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3843
3844 PR c++/77496
3845 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3846
d1463eb9
DM
38472016-09-12 David Malcolm <dmalcolm@redhat.com>
3848
3849 PR c/72858
3850 * c-format.c (argument_parser::check_argument_type): Add params
3851 "type_start" and "conversion_char". Use the former to generate
3852 offset_to_type_start and pass it and conversion_char to
3853 check_format_types.
3854 (check_format_info_main): Capture the start of the type
3855 information as "type_start", and pass it an format_char
3856 to arg_parser.check_argument_type.
3857 (check_format_types): Provide an example in the leading comment.
3858 Add params "offset_to_type_start" and "conversion_char"; pass
3859 them to format_type_warning calls.
3860 (test_get_modifier_for_format_len): Likewise.
3861 (matching_type_p): New function.
3862 (get_format_for_type): Add param "conversion_char" and move
3863 implementation into...
3864 (get_format_for_type_1): ...new function, called twice.
3865 Use new function matching_type_p rather than checking for
3866 TYPE_CANONICAL equality.
3867 (get_corrected_substring): New function.
3868 (format_type_warning): Provide an example in the leading comment.
3869 Add params "offset_to_type_start" and "conversion_char". Replace
3870 call to get_format_for_type with call to get_corrected_substring
3871 and move rejection of hints for widths/precisions there.
3872 (assert_format_for_type_streq): Add param "conversion_char".
3873 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3874 (test_get_format_for_type_printf): Add conversion chars to the
3875 tests, adding coverage for various combinations of integer
3876 vs double conversions, and for preserving octal and hexadecimal
3877 conversions.
3878 (test_get_format_for_type_scanf): Add conversion chars to the
3879 tests.
3880
5b28efbb
TV
38812016-09-10 Tom de Vries <tom@codesourcery.com>
3882
3883 PR C/71602
3884 * c-common.c (build_va_arg): Handle more strict
3885 targetm.canonical_va_list_type. Replace first argument type error with
3886 assert.
3887
3f0177e7
MS
38882016-09-09 Martin Sebor <msebor@redhat.com>
3889
3890 PR c/77520
3891 PR c/77521
3892 * c-format.c (argument_parser::find_format_char_info): Use %qc
3893 format directive unconditionally.
3894
af63ba4b
JM
38952016-09-09 Jason Merrill <jason@redhat.com>
3896
3897 Implement C++17 new of over-aligned types.
3898 * c.opt: Add -faligned-new and -Waligned-new.
3899 * c-common.c (max_align_t_align): Split out from...
3900 (cxx_fundamental_alignment_p): ...here.
3901 * c-common.h: Declare it.
3902 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3903
c65248cb
JM
39042016-09-09 Joseph Myers <joseph@codesourcery.com>
3905
3906 * c-cppbuiltin.c (builtin_define_type_width): New function.
3907 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3908 macros.
3909
e5106e27
DM
39102016-09-07 David Malcolm <dmalcolm@redhat.com>
3911
3912 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3913 a POINTER_TYPE.
3914 (substring_loc::get_location): Move to substring-locations.c,
3915 keeping implementation as...
3916 (c_get_substring_location): New function, from the above, reworked
3917 to use accessors rather than member lookup.
3918 * c-common.h (class substring_loc): Move to substring-locations.h,
3919 replacing with a forward decl.
3920 (c_get_substring_location): New decl.
3921 * c-format.c: Include "substring-locations.h".
3922 (format_warning_va): Move to substring-locations.c.
3923 (format_warning_at_substring): Likewise.
3924
ab20d992 39252016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
3926
3927 PR c/77336
3928 * c-format.c (check_function_format): Avoid issuing warnings for
3929 functions unless they call format functions with non-constant
3930 format strings.
3931
b772a565
RB
39322016-09-06 Richard Biener <rguenther@suse.de>
3933
3934 PR c/77450
3935 * c-common.c (c_common_mark_addressable_vec): Handle
3936 COMPOUND_LITERAL_EXPR.
3937
25ff5dd3
MP
39382016-09-05 Marek Polacek <polacek@redhat.com>
3939
3940 PR c/77423
3941 * c-common.c (bool_promoted_to_int_p): New function.
3942 (expr_has_boolean_operands_p): New function.
3943 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3944 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3945
21234eb5
TV
39462016-09-04 Tom de Vries <tom@codesourcery.com>
3947
3948 revert:
3949 2016-08-29 Tom de Vries <tom@codesourcery.com>
3950
3951 * c-common.c (build_va_arg): Replace first argument type error
3952 with assert.
3953
9dc5773f
JJ
39542016-09-02 Jakub Jelinek <jakub@redhat.com>
3955
3956 PR c/65467
3957 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3958 (c_finish_omp_for): Reject _Atomic qualified iterators.
3959
39602016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3961
3962 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3963 size to guarantee it fits the output of the formatted function
3964 regardless of its arguments.
3965
295844f6
MP
39662016-09-01 Marek Polacek <polacek@redhat.com>
3967
3968 PR c/7652
3969 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3970 FALLTHRU comments.
3971
3d06b6f2
MP
39722016-08-29 Marek Polacek <polacek@redhat.com>
3973
3974 PR c/77292
3975 * c-common.c (warn_logical_not_parentheses): Don't warn for
3976 a comparison or a logical operator.
3977
34cedad5
TV
39782016-08-29 Tom de Vries <tom@codesourcery.com>
3979
3980 * c-common.c (build_va_arg): Fix type comparison assert.
3981
f162d717
TV
39822016-08-29 Tom de Vries <tom@codesourcery.com>
3983
3984 * c-common.c (build_va_arg): Replace first argument type error
3985 with assert.
3986
ba9bbd6f
TV
39872016-08-29 Tom de Vries <tom@codesourcery.com>
3988
3989 PR c/77398
3990 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3991 with error_mark_node as va_list instead of with illegal va_list.
3992
ebef225f
MP
39932016-08-25 Marek Polacek <polacek@redhat.com>
3994 David Malcolm <dmalcolm@redhat.com>
3995
3996 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3997 * c-common.h (warn_logical_not_parentheses): Update declaration.
3998
b00e6e75
MP
39992016-08-22 Marek Polacek <polacek@redhat.com>
4000
4001 PR c++/77321
4002 * c-common.c (warn_for_memset): Check type for null.
4003
6dc198e3
JM
40042016-08-22 Joseph Myers <joseph@codesourcery.com>
4005
14ec014e 4006 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
4007 _FloatNx types for suffixes for built-in functions.
4008
c65699ef
JM
40092016-08-19 Joseph Myers <joseph@codesourcery.com>
4010
4011 PR c/32187
4012 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
4013 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
4014 (RID_FLOAT128X): New enum rid values.
4015 (CASE_RID_FLOATN_NX): New macro.
4016 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
4017 keywords.
4018 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
4019 corresponding complex types.
4020 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
4021 _FloatNx and corresponding complex types.
4022 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
4023 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
4024 and _FloatNx types for the widest type for determining
4025 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
4026 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
4027 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
4028 and _FloatNx types.
4029 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
4030 constants.
4031 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
4032 _FloatNx types.
4033
cc015f3a
DM
40342016-08-18 David Malcolm <dmalcolm@redhat.com>
4035
4036 * c-opts.c (c_diagnostic_finalizer): Update for change to
4037 diagnostic_show_locus.
4038
cb18fd07
DM
40392016-08-18 David Malcolm <dmalcolm@redhat.com>
4040
4041 * c-common.c: Include "spellcheck.h".
4042 (cb_get_suggestion): New function.
4043 * c-common.h (cb_get_suggestion): New decl.
4044 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
4045 cb_get_suggestion.
4046
a76989dc
MP
40472016-08-18 Marek Polacek <polacek@redhat.com>
4048
4049 PR c/71514
4050 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
4051 and pointer-to-VLA.
4052
65e736c0
DM
40532016-08-16 David Malcolm <dmalcolm@redhat.com>
4054
4055 PR c/72857
4056 * c-common.c (substring_loc::get_range): Rename to...
4057 (substring_loc::get_location): ...this, converting param from a
4058 source_range * to a location_t *. Call
4059 get_source_location_for_substring rather than
4060 get_source_range_for_substring, and pass in m_caret_idx.
4061 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
4062 (substring_loc::get_range): Replace with...
4063 (substring_loc::get_location): ...this.
4064 (substring_loc::set_caret_index): New method.
4065 (substring_loc): Add field m_caret_idx.
4066 * c-format.c (format_warning_va): Update for above changes.
4067 Rename local "substring_loc" to "fmt_substring_loc" to avoid
4068 clashing with type name.
4069 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
4070 (check_argument_type): Likewise.
4071 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
4072 Use a copy when emitting warnings, setting the caret index from TYPE.
4073
7e1dde14 40742016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 4075 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
4076
4077 * c-ada-spec.c (dump_number): New function.
4078 (handle_escape_character): Likewise.
4079 (print_ada_macros): Add handling of constant integers and strings.
4080
191816a3
MP
40812016-08-12 Marek Polacek <polacek@redhat.com>
4082
4083 PR c/7652
4084 * c-common.c (scalar_to_vector): Adjust fall through comment.
4085 * c-opts.c (c_common_handle_option): Likewise.
4086 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
4087 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
4088 fall through comment.
4089 * cilk.c (extract_free_variables): Add FALLTHRU.
4090
452df4a4
JM
40912016-08-10 Jason Merrill <jason@redhat.com>
4092
4093 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
4094
f3365c12
JM
40952016-08-09 Jason Merrill <jason@redhat.com>
4096
4097 * c-common.c (c_common_attribute_table): vector_size affects type
4098 identity.
4099
f0bc3323
MP
41002016-08-09 Marek Polacek <polacek@redhat.com>
4101
4102 PR c/7652
4103 * c-ada-spec.c (dump_generic_ada_node): Add return.
4104
98e5a19a
JM
41052016-08-09 Jason Merrill <jason@redhat.com>
4106
4107 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
4108 C++17 constexpr lambdas.
4109
895aa8e1
DM
41102016-08-08 David Malcolm <dmalcolm@redhat.com>
4111
4112 PR c/64955
4113 * c-common.h (selftest::c_format_c_tests): New declaration.
4114 (selftest::run_c_tests): New declaration.
4115 * c-format.c: Include "selftest.h.
4116 (format_warning_va): Add param "corrected_substring" and use
4117 it to add a replacement fix-it hint.
4118 (format_warning_at_substring): Likewise.
4119 (format_warning_at_char): Update for new param of
4120 format_warning_va.
4121 (argument_parser::check_argument_type): Pass "fki" to
4122 check_format_types.
4123 (check_format_types): Add param "fki" and pass it to
4124 format_type_warning.
4125 (deref_n_times): New function.
4126 (get_modifier_for_format_len): New function.
4127 (selftest::test_get_modifier_for_format_len): New function.
4128 (get_format_for_type): New function.
4129 (format_type_warning): Add param "fki" and use it to attempt
4130 to provide hints for argument types when calling
4131 format_warning_at_substring.
4132 (selftest::get_info): New function.
4133 (selftest::assert_format_for_type_streq): New function.
4134 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
4135 (selftest::test_get_format_for_type_printf): New function.
4136 (selftest::test_get_format_for_type_scanf): New function.
4137 (selftest::c_format_c_tests): New function.
4138
e52ed3fe
DM
41392016-08-08 David Malcolm <dmalcolm@redhat.com>
4140
4141 PR c/52952
4142 * c-format.c: Include "diagnostic.h".
4143 (location_column_from_byte_offset): Delete.
4144 (location_from_offset): Delete.
4145 (format_warning_va): New function.
4146 (format_warning_at_substring): New function.
4147 (format_warning_at_char): New function.
4148 (check_format_arg): Capture location of format_tree and pass to
4149 check_format_info_main.
4150 (argument_parser): Add fields "start_of_this_format" and
4151 "format_string_cst".
4152 (flag_chars_t::validate): Add param "format_string_cst". Convert
4153 warning_at call using location_from_offset to call to
4154 format_warning_at_char.
4155 (argument_parser::argument_parser): Add param "format_string_cst_"
4156 and use use it to initialize field "format_string_cst".
4157 Initialize new field "start_of_this_format".
4158 (argument_parser::read_format_flags): Convert warning_at call
4159 using location_from_offset to a call to format_warning_at_char.
4160 (argument_parser::read_any_format_left_precision): Likewise.
4161 (argument_parser::read_any_format_precision): Likewise.
4162 (argument_parser::read_any_other_modifier): Likewise.
4163 (argument_parser::find_format_char_info): Likewise, in three places.
4164 (argument_parser::parse_any_scan_set): Likewise, in one place.
4165 (argument_parser::handle_conversions): Likewise, in two places.
4166 (argument_parser::check_argument_type): Add param "fmt_param_loc"
4167 and use it to make a substring_loc. Pass the latter to
4168 check_format_types.
4169 (check_format_info_main): Add params "fmt_param_loc" and
4170 "format_string_cst". Convert warning_at calls using
4171 location_from_offset to calls to format_warning_at_char. Pass the
4172 new params to the arg_parser ctor. Pass "format_string_cst" to
4173 flag_chars.validate. Pass "fmt_param_loc" to
4174 arg_parser.check_argument_type.
4175 (check_format_types): Convert first param from a location_t
4176 to a const substring_loc & and rename to "fmt_loc". Attempt
4177 to extract the range of the relevant parameter and pass it
4178 to format_type_warning.
4179 (format_type_warning): Convert first param from a location_t
4180 to a const substring_loc & and rename to "fmt_loc". Add
4181 params "param_range" and "type". Replace calls to warning_at
4182 with calls to format_warning_at_substring.
4183
1c4d457e
DM
41842016-08-08 David Malcolm <dmalcolm@redhat.com>
4185
4186 * c-format.c (class flag_chars_t): New class.
4187 (struct length_modifier): New struct.
4188 (class argument_parser): New class.
4189 (flag_chars_t::flag_chars_t): New ctor.
4190 (flag_chars_t::has_char_p): New method.
4191 (flag_chars_t::add_char): New method.
4192 (flag_chars_t::validate): New method.
4193 (flag_chars_t::get_alloc_flag): New method.
4194 (flag_chars_t::assignment_suppression_p): New method.
4195 (argument_parser::argument_parser): New ctor.
4196 (argument_parser::read_any_dollar): New method.
4197 (argument_parser::read_format_flags): New method.
4198 (argument_parser::read_any_format_width): New method.
4199 (argument_parser::read_any_format_left_precision): New method.
4200 (argument_parser::read_any_format_precision): New method.
4201 (argument_parser::handle_alloc_chars): New method.
4202 (argument_parser::read_any_length_modifier): New method.
4203 (argument_parser::read_any_other_modifier): New method.
4204 (argument_parser::find_format_char_info): New method.
4205 (argument_parser::validate_flag_pairs): New method.
4206 (argument_parser::give_y2k_warnings): New method.
4207 (argument_parser::parse_any_scan_set): New method.
4208 (argument_parser::handle_conversions): New method.
4209 (argument_parser::check_argument_type): New method.
4210 (check_format_info_main): Introduce classes argument_parser
4211 and flag_chars_t, moving the code within the loop into methods
4212 of these classes. Make various locals "const".
4213
88fa5555
DM
42142016-08-05 David Malcolm <dmalcolm@redhat.com>
4215
4216 * c-common.c: Include "substring-locations.h".
4217 (get_cpp_ttype_from_string_type): New function.
4218 (g_string_concat_db): New global.
4219 (substring_loc::get_range): New method.
4220 * c-common.h (g_string_concat_db): New declaration.
4221 (class substring_loc): New class.
4222 * c-lex.c (lex_string): When concatenating strings, capture the
4223 locations of all tokens using a new obstack, and record the
4224 concatenation locations within g_string_concat_db.
4225 * c-opts.c (c_common_init_options): Construct g_string_concat_db
4226 on the ggc-heap.
4227
78169471
MP
42282016-07-29 Marek Polacek <polacek@redhat.com>
4229
638fc14f
MP
4230 PR c/71926
4231 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
4232 parentheses warning.
4233
78169471
MP
4234 PR c/71574
4235 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
4236
1225d6b1
ML
42372016-07-28 Martin Liska <mliska@suse.cz>
4238
4239 PR gcov-profile/68025
4240 * c-common.c (handle_no_profile_instrument_function_attribute):
4241
ec1e2a40
BE
42422016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
4243
4244 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
4245 BITS_PER_UNIT_LOG.
4246
5ec2cd9f
JM
42472016-07-25 Jason Merrill <jason@redhat.com>
4248
4249 PR c++/65970
4250 * c.opt (fconstexpr-loop-limit): New.
4251
9dc5773f 42522016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
4253
4254 PR c++/71675
4255 * c-common.c (resolve_overloaded_builtin): Avoid converting
4256 __atomic_compare_exchange_n return type to that of what its
4257 first argument points to.
4258
e3fe09c1
UB
42592016-07-22 Uros Bizjak <ubizjak@gmail.com>
4260
4261 * c-common.c: Use HOST_WIDE_INT_M1U instead of
4262 ~(unsigned HOST_WIDE_INT) 0.
4263
bc91c436
ML
42642016-07-22 Martin Liska <mliska@suse.cz>
4265
4266 PR gcov-profile/69028
4267 PR gcov-profile/62047
4268 * cilk.c (create_cilk_helper_decl): Set location of a new decl
4269 to the current_function_decl.
4270
451dcc66
JM
42712016-07-21 Jason Merrill <jason@redhat.com>
4272
4273 PR c++/65168
4274 * c-common.c (c_common_truthvalue_conversion): Check
4275 c_inhibit_evaluation_warnings for warning about address of
4276 reference.
4277
de6a69ee
DM
42782016-07-20 David Malcolm <dmalcolm@redhat.com>
4279
4280 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
4281 const char *.
4282
d022c55a
JM
42832016-07-15 Jason Merrill <jason@redhat.com>
4284
4285 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
4286
ddbbcb19
JJ
42872016-07-15 Jakub Jelinek <jakub@redhat.com>
4288
4289 PR c/71858
4290 * c-common.h (enum lookup_name_fuzzy_kind): Add
4291 FUZZY_LOOKUP_FUNCTION_NAME.
4292
d0cf395a
JM
42932016-07-08 Jason Merrill <jason@redhat.com>
4294
4295 P0145: Refining Expression Order for C++.
4296 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
4297 * c-opts.c: Adjust.
4298
98d44e93
MT
42992016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
4300
4301 PR c++/71214
4302 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
4303
f9d8d994
TS
43042016-06-29 Thomas Schwinge <thomas@codesourcery.com>
4305
4306 * c-pragma.h (enum pragma_kind): Rename
4307 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
4308 users.
4309
4aa83879
RB
43102016-06-29 Richard Biener <rguenther@suse.de>
4311
4312 PR middle-end/71002
4313 * c-common.c (c_common_get_alias_set): Remove union type punning case.
4314
a25bd9e6
JM
43152016-06-24 Jason Merrill <jason@redhat.com>
4316
4317 P0145R2: Refining Expression Order for C++.
4318 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
4319 MODIFY_EXPR.
4320
a86451b9
JJ
43212016-06-24 Jakub Jelinek <jakub@redhat.com>
4322
4323 * c-common.c (check_builtin_function_arguments): Require last
4324 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
4325 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
4326 if the last argument is pointer to enumerated or boolean type.
4327
1a4f11c8
DM
43282016-06-22 David Malcolm <dmalcolm@redhat.com>
4329
4330 PR c/70339
4331 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
4332 (lookup_name_fuzzy): New prototype.
4333
fe55692c
JDA
43342016-06-21 John David Anglin <danglin@gcc.gnu.org>
4335
4336 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
4337
4eb24e01
JM
43382016-06-14 Jason Merrill <jason@redhat.com>
4339
4340 P0145R2: Refining Expression Order for C++.
4341 * c.opt (fargs-in-order): New.
4342 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
4343
ef7cf206
JJ
43442016-06-13 Jakub Jelinek <jakub@redhat.com>
4345
0dda258b
JJ
4346 PR sanitizer/71498
4347 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
4348 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
4349
ef7cf206
JJ
4350 PR preprocessor/71183
4351 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
4352 to cb_get_source_date_epoch.
4353
50b15873
JJ
43542016-06-10 Jakub Jelinek <jakub@redhat.com>
4355
4356 PR c/68657
4357 * c.opt (Wpsabi): Add Warning flag.
4358
4d926e34
MS
43592016-06-10 Martin Sebor <msebor@redhat.com>
4360
4361 PR c/71392
14ec014e 4362 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
4363 the nonnull attribute in type-generic builtins.
4364
e01b4e16
MS
43652016-06-09 Martin Sebor <msebor@redhat.com>
4366
4367 PR c/70883
4368 * c-common.c (builtin_function_validate_nargs): Make text of error
4369 message consistent with others like it.
4370
44a845ca
MS
43712016-06-08 Martin Sebor <msebor@redhat.com>
4372 Jakub Jelinek <jakub@redhat.com>
4373
4374 PR c++/70507
4375 PR c/68120
4376 * c-common.c (check_builtin_function_arguments): Handle
4377 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
4378
a80a7051
RB
43792016-06-08 Richard Biener <rguenther@suse.de>
4380
4381 * c-common.c (parse_optimize_options): Improve diagnostic messages.
4382
bfd67b47
RB
43832016-06-07 Richard Biener <rguenther@suse.de>
4384
4385 PR c/61564
4386 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
4387 options and warn about others.
4388
15c98b2e
ES
43892016-06-01 Eduard Sanou <dhole@openmailbox.org>
4390
4391 * c-common.c (get_source_date_epoch): Rename to
4392 cb_get_source_date_epoch.
4393 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
4394 message when the parsing fails. Use error_at instead of fatal_error.
4395 * c-common.h (get_source_date_epoch): Rename to
4396 cb_get_source_date_epoch.
4397 * c-common.h (cb_get_source_date_epoch): Prototype.
4398 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4399 * c-common.h (c_omp_region_type): Remove trailing comma.
4400 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4401 * c-lex.c (c_lex_with_flags): Remove initialization of
4402 pfile->source_date_epoch.
4403
00631022
JJ
44042016-05-30 Jakub Jelinek <jakub@redhat.com>
4405
4406 PR c++/71349
4407 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4408 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4409 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4410 instead of C_OMP_CLAUSE_SPLIT_FOR.
4411
f17a223d
RB
44122016-05-24 Richard Biener <rguenther@suse.de>
4413
4414 PR middle-end/70434
4415 PR c/69504
4416 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4417 (convert_vector_to_array_for_subscript): ... this.
4418 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4419 VIEW_CONVERT_EXPR to an array type. Rename to ...
4420 (convert_vector_to_array_for_subscript): ... this.
4421
4f2e1536
MP
44222016-05-12 Marek Polacek <polacek@redhat.com>
4423
4424 PR c/70756
4425 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4426 size_in_bytes and pass LOC to it.
4427
d6e83a8d
MM
44282016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4429
4430 PR c/43651
4431 * c.opt (Wduplicate-decl-specifier): New option.
4432
5c3a10fb
MP
44332016-05-11 Marek Polacek <polacek@redhat.com>
4434
4435 PR c++/71024
4436 * c-common.c (diagnose_mismatched_attributes): New function.
4437 * c-common.h (diagnose_mismatched_attributes): Declare.
4438
deef7113
MP
44392016-05-04 Marek Polacek <polacek@redhat.com>
4440
4441 * c.opt (Wdangling-else): New option.
4442
79ce98bc
MP
44432016-05-03 Marek Polacek <polacek@redhat.com>
4444
4445 PR c/70859
4446 * c-common.c (builtin_function_validate_nargs): Add location
4447 parameter. Use it.
4448 (check_builtin_function_arguments): Add location and arguments
4449 parameters. Use them.
4450 * c-common.h (check_builtin_function_arguments): Update declaration.
4451
381cdae4
RB
44522016-05-03 Richard Biener <rguenther@suse.de>
4453
4454 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4455 allow call args to gimplify to SSA names.
4456
1d793c34
MP
44572016-05-03 Marek Polacek <polacek@redhat.com>
4458
4459 * c-common.h (enum c_omp_region_type): Remove stray comma.
4460
77886428
CP
44612016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4462
4463 * c-common.h (enum c_omp_region_type): Define.
4464
697e0b28
RS
44652016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4466
4467 * c-common.c (shorten_compare): Use wi::to_wide.
4468
e7ff0319
CP
44692016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4470
4471 PR middle-end/70626
4472 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4473 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4474 reduction clauses in acc parallel loops.
4475
2fff3db8
MP
44762016-04-29 Marek Polacek <polacek@redhat.com>
4477
4478 PR c/70852
4479 * c-common.c (warn_for_memset): Check domain before accessing it.
4480
509063eb
DV
44812016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4482
4483 PR/69089
4484 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4485 "aligned" attribute.
4486
b632761d
JM
44872016-04-28 Jason Merrill <jason@redhat.com>
4488
4489 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4490
174f6622
ES
44912016-04-28 Eduard Sanou <dhole@openmailbox.org>
4492 Matthias Klose <doko@debian.org>
4493
4494 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4495 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4496 handling.
4497 * c-common.h (get_source_date_epoch): Prototype.
4498 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4499
6bc2bb18
RB
45002015-04-27 Ryan Burn <contact@rnburn.com>
4501
4502 PR c++/69024
4503 PR c++/68997
4504 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4505 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4506 external linkage.
4507 (cilk_detect_and_unwrap): Corresponding changes.
4508 (extract_free_variables): Don't extract free variables from
4509 AGGR_INIT_EXPR slot.
4510 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4511 (cilk_recognize_spawn): Likewise.
4512
c1e1f433
BS
45132016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4514
4515 * c.opt (Wmemset-elt-size): New option.
4516 * c-common.c (warn_for_memset): New function.
4517 * c-common.h (warn_for_memset): Declare.
4518
d067e05f
JM
45192016-04-25 Jason Merrill <jason@redhat.com>
4520
4521 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4522 No longer static.
4523 * c-common.h: Declare it.
4524 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4525
9aa36ae5
JM
45262016-04-22 Jason Merrill <jason@redhat.com>
4527
4528 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4529
477d4906
IV
45302016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4531
4532 PR c++/69363
4533 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4534 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4535
fe37c7af
MM
45362016-04-18 Michael Matz <matz@suse.de>
4537
4538 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4539 and SET_DECL_ALIGN.
4540
23f2660f
EB
45412016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4542
4543 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4544 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4545 to incomplete types.
4546 (dump_nested_type): Remove redundant tests and tidy up.
4547 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4548 a type which is the typedef of an original type.
4549
1e77281b
MP
45502016-04-15 Marek Polacek <polacek@redhat.com>
4551
4552 PR c/70651
4553 * c-common.c (build_va_arg): Change two asserts into errors and return
4554 error_mark_node.
4555
b3a77f21
MP
45562016-04-13 Marek Polacek <polacek@redhat.com>
4557
4558 PR c++/70639
4559 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4560 for switch statements, too.
4561
322b8466
JM
45622016-03-28 Jason Merrill <jason@redhat.com>
4563
4564 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4565
fbdb6baf
MP
45662016-03-23 Marek Polacek <polacek@redhat.com>
4567
4568 PR c++/69884
4569 * c.opt (Wignored-attributes): New option.
4570
5c240f4d
DM
45712016-03-22 David Malcolm <dmalcolm@redhat.com>
4572
4573 PR c/69993
4574 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4575 diagnostic text, reversing the order of the warning and note so
4576 that they appear in source order.
4577
14ba7b28
MP
45782016-03-17 Marek Polacek <polacek@redhat.com>
4579
4580 PR c/69407
4581 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4582 operations.
4583
08a1cadc
JM
45842016-03-14 Jason Merrill <jason@redhat.com>
4585
2aaeea19
JM
4586 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4587
08a1cadc
JM
4588 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4589
c06d25bb
RB
45902016-03-09 Richard Biener <rguenther@suse.de>
4591
4592 PR c/70143
4593 * c-common.c (strict_aliasing_warning): Add back
4594 alias_sets_conflict_p check.
4595
80aac5c8
JM
45962016-03-08 Jason Merrill <jason@redhat.com>
4597
4598 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4599
64b23c13
DM
46002016-03-04 David Malcolm <dmalcolm@redhat.com>
4601
4602 PR c/68187
4603 * c-indentation.c (get_visual_column): Move code to determine next
4604 tab stop to...
4605 (next_tab_stop): ...this new function.
4606 (line_contains_hash_if): Delete function.
4607 (detect_preprocessor_logic): Delete function.
4608 (get_first_nws_vis_column): New function.
4609 (detect_intervening_unindent): New function.
4610 (should_warn_for_misleading_indentation): Replace call to
4611 detect_preprocessor_logic with a call to
4612 detect_intervening_unindent.
4613
729526f5
DM
46142016-03-04 David Malcolm <dmalcolm@redhat.com>
4615
4616 PR c/68187
4617 * c-indentation.c (should_warn_for_misleading_indentation): When
4618 suppressing warnings about cases where the guard and body are on
4619 the same column, only use the first non-whitespace column in place
4620 of the guard token column when dealing with "else" clauses.
4621 When rejecting aligned BODY and NEXT, loosen the requirement
4622 from equality with the first non-whitespace of guard to simply
4623 that they not be indented relative to it.
4624
e9a35493
RB
46252016-03-04 Richard Biener <rguenther@suse.de>
4626
4627 PR c++/70054
4628 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4629 instead of alias_sets_conflict_p.
4630
1be56bc5
MP
46312016-03-01 Marek Polacek <polacek@redhat.com>
4632
4633 PR c++/69795
4634 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4635 any DECL.
4636
35886f0b
MS
46372016-02-22 Martin Sebor <msebor@redhat.com>
4638
4639 PR middle-end/69780
4640 * c-common.c (check_builtin_function_arguments): Validate and
4641 reject invalid arguments to __builtin_alloca_with_align.
4642
4246c8da
MW
46432016-02-20 Mark Wielaard <mjw@redhat.com>
4644
4645 PR c/28901
4646 * c.opt (Wunused-const-variable): Turn into Alias for...
4647 (Wunused-const-variable=): New option.
4648
268be88c
BE
46492016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4650
4651 PR c++/69865
4652 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4653 here...
4654 (c_common_init_options): ...to here.
4655 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4656
871b3f47
JJ
46572016-02-19 Jakub Jelinek <jakub@redhat.com>
4658
4659 PR c++/69826
4660 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4661 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4662 flag_preprocess_only.
4663
bf14eba2
JJ
46642016-02-16 Jakub Jelinek <jakub@redhat.com>
4665
4666 PR c/69835
4667 * c.opt (Wnonnull-compare): Enable for -Wall.
4668
ba6b3795
JJ
46692016-02-15 Jakub Jelinek <jakub@redhat.com>
4670
4671 PR c++/69797
4672 * c-common.c (sync_resolve_size): Diagnose too few arguments
4673 even when params is non-NULL empty vector.
4674
a011cd92
BS
46752016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4676
4677 PR target/60410
4678 * c.opt (fshort-double): Remove.
4679
46cb9332
MS
46802016-02-05 Martin Sebor <msebor@redhat.com>
4681
4682 PR c++/69662
4683 * c.opt (Warning options): Update -Wplacement-new to take
4684 an optional argument.
4685
e1b81f2b
JJ
46862016-02-01 Jakub Jelinek <jakub@redhat.com>
4687
4688 PR preprocessor/69543
4689 PR c/69558
4690 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4691 instead of loc to control_warning_option.
4692
b6adbb9f
NS
46932016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4694
4695 * c.opt (fopenacc-dim=): New option.
4696
5d70666e
RB
46972016-01-27 Ryan Burn <contact@rnburn.com>
4698
4699 PR cilkplus/69267
4700 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4701 gimplify_arg. Removed superfluous post_p argument.
4702 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4703 superfluous post_p argument.
4704 * c-gimplify.c (c_gimplify_expr): Likewise.
4705
01e1dea3
DM
47062016-01-26 David Malcolm <dmalcolm@redhat.com>
4707
4708 PR other/69006
4709 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4710 pp_newline_and_flush with pp_flush.
4711
9f04a53e
MS
47122016-01-20 Martin Sebor <msebor@redhat.com>
4713
4714 PR c/69405
4715 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4716 an incompatible argument when the argument isn't a valid tree node.
4717
7f26f7df
JM
47182016-01-18 Jason Merrill <jason@redhat.com>
4719
4720 PR c++/68767
4721 * c-common.c (check_function_arguments_recurse): Fold the whole
4722 COND_EXPR, not just the condition.
4723
f62bf092
TV
47242016-01-18 Tom de Vries <tom@codesourcery.com>
4725
4726 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4727 classify as loop clause.
4728
e0a575ff
JJ
47292016-01-15 Jakub Jelinek <jakub@redhat.com>
4730
4731 PR bootstrap/68271
4732 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4733 C++ FE no longer has limit on number of pragmas.
4734
47352015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4736
4737 PR c++/69048
4738 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4739 to add missing cleanup point.
b6e3db06 4740
c7df95d8
DM
47412016-01-14 David Malcolm <dmalcolm@redhat.com>
4742
4743 PR c++/68819
4744 * c-indentation.c (get_visual_column): Add location_t param.
4745 Handle the column number being zero by effectively disabling the
4746 warning, with an "inform".
4747 (should_warn_for_misleading_indentation): Add location_t argument
4748 for all uses of get_visual_column.
4749
21efdd80
PP
47502016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4751
4752 PR c++/69029
4753 * c-indentation.c (should_warn_for_misleading_indentation):
4754 Don't warn about do-while statements.
4755
7a127fa7
MS
47562016-01-07 Martin Sebor <msebor@redhat.com>
4757
4758 PR c/68966
4759 * c-common.c (sync_resolve_size): Reject first argument when it's
4760 a pointer to _Bool.
4761
c589e975
DM
47622016-01-05 David Malcolm <dmalcolm@redhat.com>
4763
4764 PR c/69122
4765 * c-indentation.c (get_visual_column): Remove default argument.
4766 (should_warn_for_misleading_indentation): For the multiline case,
4767 update call to get_visual_column for next_stmt_exploc so that it
4768 captures the location of the first non-whitespace character in the
4769 relevant line. Don't issue warnings if there is non-whitespace
4770 before the next statement.
4771
818ab71a
JJ
47722016-01-04 Jakub Jelinek <jakub@redhat.com>
4773
4774 Update copyright years.
4775
745e411d
DM
47762015-12-21 David Malcolm <dmalcolm@redhat.com>
4777
4778 * c-common.c (binary_op_error): Convert first param from
4779 location_t to rich_location * and use it when emitting an error.
4780 * c-common.h (binary_op_error): Convert first param from
4781 location_t to rich_location *.
4782
de67c4c3
DM
47832015-12-16 David Malcolm <dmalcolm@redhat.com>
4784
4785 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4786 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4787
4a38b02b
IV
47882015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4789
4790 * c-common.c (c_common_attribute_table): Handle "omp declare target
4791 link" attribute.
4792
54d62f51
JJ
47932015-12-14 Jakub Jelinek <jakub@redhat.com>
4794
4795 PR c/68833
4796 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4797
8d4227c8
TB
47982014-12-12 Tobias Burnus <burnus@net-b.de>
4799
4800 PR fortran/68815
4801 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4802 specifiers (%d, %i,%u and %c).
4803
f6069ccc
DM
48042015-12-10 David Malcolm <dmalcolm@redhat.com>
4805
4806 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4807
63bbf46d
JJ
48082015-12-08 Jakub Jelinek <jakub@redhat.com>
4809
4810 PR c/48088
4811 PR c/68657
4812 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4813 * c-pragma.c (handle_pragma_diagnostic): Adjust
4814 control_warning_option caller.
4815
f79520bb
DM
48162015-12-07 David Malcolm <dmalcolm@redhat.com>
4817
4818 * c-common.c (c_cpp_error): Update for change to
4819 rich_location::set_range.
4820
b3d5bc62
JJ
48212015-12-04 Paolo Bonzini <bonzini@gnu.org>
4822
4823 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4824 shifting 1 out of the sign bit.
4825
48262015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4827
4828 * c-common.c (c_common_attribute_table[]): Update max arguments
4829 count for "simd" attribute.
4830 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4831
6eb4a537
JJ
48322015-12-03 Jakub Jelinek <jakub@redhat.com>
4833
4834 PR preprocessor/57580
4835 * c-ppoutput.c (print): Change printed field to bool.
4836 Move src_file last for smaller padding.
4837 (init_pp_output): Set print.printed to false instead of 0.
4838 (scan_translation_unit): Fix up formatting. Set print.printed
4839 to true after printing something other than newline.
4840 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4841 (maybe_print_line_1): Set print.printed to false instead of 0.
4842 (print_line_1): Likewise.
4843 (do_line_change): Set print.printed to true instead of 1.
4844 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4845 dump_macro): Set print.printed to false after printing newline.
4846
4250754e
JM
48472015-12-02 Jason Merrill <jason@redhat.com>
4848
f479b43d
JM
4849 * c-common.c (fold_for_warn): New.
4850 (warn_logical_operator, warn_tautological_cmp)
4851 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4852
4250754e
JM
4853 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4854 (c_fully_fold_internal, decl_constant_value_for_optimization):
4855 Move to c/c-fold.c.
4856 * c-common.h: Don't declare decl_constant_value_for_optimization.
4857
e9e32ee6
JM
48582015-12-02 Joseph Myers <joseph@codesourcery.com>
4859
4860 PR c/68162
4861 * c-common.h (c_build_qualified_type): Add extra default
4862 arguments.
4863
37d5ad46
JB
48642015-12-01 Julian Brown <julian@codesourcery.com>
4865 Cesar Philippidis <cesar@codesourcery.com>
4866 James Norris <James_Norris@mentor.com>
4867
4868 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4869 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4870 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4871
f07862c7
EB
48722015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4873
4874 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4875 (decl_sloc_common): Delete and move bulk of processing to...
4876 (decl_sloc): ...here.
4877 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4878 (dump_ada_double_name): Remove S parameter and compute the suffix.
4879 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4880 element type and deal with an anonymous one.
4881 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4882 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4883 and remove reference to QUAL_UNION_TYPE.
4884 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4885 (dump_nested_type): ...here. New function extracted from above.
4886 Generate a full declaration for anonymous element type of arrays.
4887 (print_ada_declaration): Really skip anonymous declarations. Remove
4888 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4889 Clean up processing of declarations of array types and objects.
4890 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4891 Remove obsolete code and tidy up.
4892
75c8aac3
JH
48932015-11-29 Jan Hubicka <hubicka@ucw.cz>
4894
4895 PR c/67581
4896 * c-common.c (handle_transparent_union_attribute): Update
4897 also type variants.
4898
b58d3df2
ML
48992015-11-27 Martin Liska <mliska@suse.cz>
4900
4901 PR c++/68312
4902 * array-notation-common.c (cilkplus_extract_an_triplets):
4903 Release vector of vectors.
4904 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4905
89a01fcf
EB
49062015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4907
4908 PR c++/68527
4909 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4910 (print_ada_struct_decl): Likewise.
4911
cc5c5226
IZ
49122015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4913
4914 PR c++/68001
4915 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4916 * cilk.c (recognize_spawn): Determine location in a more precise
4917 way.
4918
269adb9d
JM
49192015-11-19 Jason Merrill <jason@redhat.com>
4920
4921 * c-common.c (shorten_compare): But look through macros from
4922 system headers.
4923
d0eccfcd
JM
49242015-11-18 Jason Merrill <jason@redhat.com>
4925
4926 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4927 non-constant operand comes from a macro.
4928
3e44547c
JM
49292015-11-17 Jason Merrill <jason@redhat.com>
4930
4931 PR bootstrap/68346
4932 * c-common.c (warn_tautological_cmp): Fold before checking for
4933 constants.
4934
0f62c7a0
MP
49352015-11-16 Marek Polacek <polacek@redhat.com>
4936
4937 PR c++/68362
4938 * c-common.c (check_case_bounds): Fold low and high cases.
4939
a868811e
MP
49402015-11-16 Marek Polacek <polacek@redhat.com>
4941
4942 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4943 * c-common.c (c_common_get_alias_set): Likewise.
4944 (handle_visibility_attribute): Likewise.
4945
fff77217
KY
49462015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4947
4948 * c-common.c (handle_simd_attribute): New.
4949 (struct attribute_spec): Add entry for "simd".
4950 (handle_simd_attribute): New.
4951
269e63b7
KT
49522015-11-13 Kai Tietz <ktietz70@googlemail.com>
4953
4954 * c-lex.c (interpret_float): Use fold_convert.
4955
ebedc9a3
DM
49562015-11-13 David Malcolm <dmalcolm@redhat.com>
4957
4958 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4959 and store it on the result.
4960 * c-opts.c (c_common_init_options): Set
4961 global_dc->colorize_source_p.
4962
6e232ba4
JN
49632015-11-12 James Norris <jnorris@codesourcery.com>
4964 Joseph Myers <joseph@codesourcery.com>
4965
7365279f 4966 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4967 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4968 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4969 PRAGMA_OACC_CLAUSE_LINK.
4970
e78bede6
MP
49712015-11-11 Marek Polacek <polacek@redhat.com>
4972
4973 PR c/68107
4974 PR c++/68266
4975 * c-common.c (valid_array_size_p): New function.
4976 * c-common.h (valid_array_size_p): Declare.
4977
3f8257db 49782015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4979
4980 PR bootstrap/68271
4981 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4982
69f293c9
AM
49832015-11-11 Andrew MacLeod <amacleod@redhat.com>
4984
4985 * array-notation-common.c: Remove unused header files.
4986 * c-ada-spec.c: Likewise.
4987 * c-cilkplus.c: Likewise.
4988 * c-common.c: Likewise.
4989 * c-cppbuiltin.c: Likewise.
4990 * c-dump.c: Likewise.
4991 * c-format.c: Likewise.
4992 * c-gimplify.c: Likewise.
4993 * c-indentation.c: Likewise.
4994 * c-lex.c: Likewise.
4995 * c-omp.c: Likewise.
4996 * c-opts.c: Likewise.
4997 * c-pch.c: Likewise.
4998 * c-ppoutput.c: Likewise.
4999 * c-pragma.c: Likewise.
5000 * c-pretty-print.c: Likewise.
5001 * c-semantics.c: Likewise.
5002 * c-ubsan.c: Likewise.
5003 * cilk.c: Likewise.
5004 * stub-objc.c: Likewise.
5005
3a40d81d
NS
50062015-11-09 Thomas Schwinge <thomas@codesourcery.com>
5007 Cesar Philippidis <cesar@codesourcery.com>
5008 James Norris <jnorris@codesourcery.com>
5009 Julian Brown <julian@codesourcery.com>
5010 Nathan Sidwell <nathan@codesourcery.com>
5011
5012 * c-pragma.c (oacc_pragmas): Add "routine".
5013 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
5014
ee45a32d
EB
50152015-11-08 Eric Botcazou <ebotcazou@adacore.com>
5016
5017 * c-common.c (c_common_attributes): Add scalar_storage_order.
5018 (handle_scalar_storage_order_attribute): New function.
5019 * c-pragma.c (global_sso): New variable.
5020 (maybe_apply_pragma_scalar_storage_order): New function.
5021 (handle_pragma_scalar_storage_order): Likewise.
5022 (init_pragma): Register scalar_storage_order.
5023 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
5024 * c.opt (Wscalar-storage-order): New warning.
5025 (fsso-struct=): New option.
5026
eb11eb15
MS
50272015-11-08 Martin Sebor <msebor@redhat.com>
5028
5029 * c.opt (Wplacement-new): Add a period to the end of a sentence.
5030
0aad0198
RS
50312015-11-07 Richard Sandiford <richard.sandiford@arm.com>
5032
5033 * c-common.c: Don't undef DEF_BUILTIN.
5034
8a645150
DM
50352015-11-06 David Malcolm <dmalcolm@redhat.com>
5036
5037 * c-common.c (c_cpp_error): Convert parameter from location_t to
5038 rich_location *. Eliminate the "column_override" parameter and
5039 the call to diagnostic_override_column.
5040 Update the "done_lexing" clause to set range 0
5041 on the rich_location, rather than overwriting a location_t.
5042 * c-common.h (c_cpp_error): Convert parameter from location_t to
5043 rich_location *. Eliminate the "column_override" parameter.
5044
7a5e4956
CP
50452015-11-05 Cesar Philippidis <cesar@codesourcery.com>
5046 Thomas Schwinge <thomas@codesourcery.com>
5047 James Norris <jnorris@codesourcery.com>
5048
5049 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
5050 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
5051 clauses with parallel and kernels and loops.
5052 * c-pragma.h (enum pragma_omp_clause): Add entries for
5053 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
5054 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
5055 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
5056 INDEPENDENT,SEQ}.
5057 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
5058
e2f5cc96
MS
50592015-11-05 Martin Sebor <msebor@redhat.com>
5060
5061 PR c++/67942
5062 * c.opt (-Wplacement-new): New option.
5063
e01d41e5
JJ
50642015-11-05 Jakub Jelinek <jakub@redhat.com>
5065
5066 * c-common.h (c_finish_omp_atomic): Add TEST argument.
5067 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
5068 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
5069 save_expr or create_tmp_var* if TEST is true.
5070 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
5071 Don't call add_stmt here.
5072 (struct c_omp_check_loop_iv_data): New type.
5073 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
5074 c_omp_check_loop_iv_exprs): New functions.
5075 (c_omp_split_clauses): Adjust for lastprivate being allowed on
5076 distribute.
5077 (c_omp_declare_simd_clauses_to_numbers): Change
5078 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
5079 (c_omp_declare_simd_clauses_to_decls): Similarly change those
5080 from numbers to PARM_DECLs.
5081
595278be
MM
50822015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
5083
5084 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
5085 flag_checking.
5086
3f8257db 50872015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
5088
5089 PR c++-common/67882
b3d5bc62
JJ
5090 * c-common.h (fold_offsetof_1): Add argument.
5091 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
5092 offsetof expressions that reference elements past the end of
5093 an array.
5094
4bf9e5a8
TS
50952015-11-03 Thomas Schwinge <thomas@codesourcery.com>
5096 Chung-Lin Tang <cltang@codesourcery.com>
5097
5098 * c-pragma.c (oacc_pragmas): Add "atomic".
5099 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
5100
3b1661a9
ES
51012015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
5102
5103 * c-common.c (handle_target_clones_attribute): New.
5104 (c_common_attribute_table): Add handle_target_clones_attribute.
5105 (handle_always_inline_attribute): Add check on target_clones attribute.
5106 (handle_target_attribute): Ditto.
5107
2adfab87
AM
51082015-10-29 Andrew MacLeod <amacleod@redhat.com>
5109
5110 * array-notation-common.c: Reorder #include's and remove duplicates.
5111 * c-ada-spec.c: Likewise.
5112 * c-cilkplus.c: Likewise.
5113 * c-common.c: Likewise.
5114 * c-cppbuiltin.c: Likewise.
5115 * c-dump.c: Likewise.
5116 * c-format.c: Likewise.
5117 * c-gimplify.c: Likewise.
5118 * c-indentation.c: Likewise.
5119 * c-lex.c: Likewise.
5120 * c-omp.c: Likewise.
5121 * c-opts.c: Likewise.
5122 * c-pch.c: Likewise.
5123 * c-ppoutput.c: Likewise.
5124 * c-pragma.c: Likewise.
5125 * c-pretty-print.c: Likewise.
5126 * c-semantics.c: Likewise.
5127 * c-ubsan.c: Likewise.
5128 * cilk.c: Likewise.
5129 * stub-objc.c: Likewise.
5130
d90ec4f2
JM
51312015-10-28 Jason Merrill <jason@redhat.com>
5132
5133 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
5134
88bae6f4
TS
51352015-10-27 Thomas Schwinge <thomas@codesourcery.com>
5136 James Norris <jnorris@codesourcery.com>
5137 Cesar Philippidis <cesar@codesourcery.com>
5138
5139 PR c/64765
5140 PR c/64880
5141 * c-common.h (c_oacc_split_loop_clauses): Declare function.
5142 * c-omp.c (c_oacc_split_loop_clauses): New function.
5143
b1726d6c
MS
51442015-10-21 Martin Sebor <msebor@redhat.com>
5145
5146 PR driver/68043
5147 * c.opt: End each sentence that describes an option with a period.
5148
fa60eeb9
MP
51492015-10-20 Marek Polacek <polacek@redhat.com>
5150
5151 * array-notation-common.c (is_cilkplus_vector_p): Define.
5152 * c-common.h (is_cilkplus_vector_p): Declare.
5153
95979049
MP
51542015-10-20 Marek Polacek <polacek@redhat.com>
5155
5156 * c.opt (std=gnu++11): Do not describe as experimental.
5157 (std=gnu++14): Likewise.
5158
2a9fb712
JM
51592015-10-19 Jason Merrill <jason@redhat.com>
5160
5161 * c-cppbuiltin.c (c_cpp_builtins): Define
5162 __cpp_nontype_template_args.
5163
13b380a3
JM
51642015-10-19 Jason Merrill <jason@redhat.com>
5165
5166 * c-cppbuiltin.c (c_cpp_builtins): Define
5167 __cpp_enumerator_attributes, __cpp_fold_expressions,
5168 __cpp_unicode_characters.
5169
d9a6bd32
JJ
51702015-10-13 Jakub Jelinek <jakub@redhat.com>
5171 Aldy Hernandez <aldyh@redhat.com>
5172
5173 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
5174 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
5175 (c_define_builtins): Likewise.
5176 * c-common.h (enum c_omp_clause_split): Add
5177 C_OMP_CLAUSE_SPLIT_TASKLOOP.
5178 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
5179 (c_finish_omp_for): Add ORIG_DECLV argument.
5180 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
5181 201511 instead of 201307.
5182 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
5183 OMP_CRITICAL_CLAUSES to it.
5184 (c_finish_omp_ordered): Add CLAUSES argument, set
5185 OMP_ORDERED_CLAUSES to it.
5186 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
5187 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
5188 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
5189 constructs and new OpenMP 4.5 clauses. Clear
5190 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
5191 verification code.
5192 * c-pragma.c (omp_pragmas_simd): Add taskloop.
5193 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
5194 (enum pragma_omp_clause): Add
5195 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
5196 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
5197
624d31fe
RS
51982015-10-05 Richard Sandiford <richard.sandiford@arm.com>
5199
5200 * c-lex.c (interpret_float): Use real_equal instead of
5201 REAL_VALUES_EQUAL.
5202
b8fd7909
JM
52032015-10-04 Jason Merrill <jason@redhat.com>
5204
5205 Implement N4514, C++ Extensions for Transactional Memory.
5206 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
5207 (c_common_attribute_table): Add transaction_safe_dynamic.
5208 transaction_safe now affects type identity.
5209 (handle_tm_attribute): Handle transaction_safe_dynamic.
5210 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
5211 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
5212 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
5213 (D_TRANSMEM): New.
5214 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
5215 * c-pretty-print.c (pp_c_attributes_display): Don't print
5216 transaction_safe in C++.
5217
12651878
MP
52182015-10-02 Marek Polacek <polacek@redhat.com>
5219
5220 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
5221
3e3b8d63
MP
52222015-10-02 Marek Polacek <polacek@redhat.com>
5223
5224 PR c/64249
5225 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
5226 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
5227 * c.opt (Wduplicated-cond): New option.
5228
0d1a8f75
JM
52292015-10-01 Joseph Myers <joseph@codesourcery.com>
5230
5231 * c.opt (std=c11): Do not describe as experimental.
5232 (std=gnu11): Likewise.
5233 (std=iso9899:2011): Likewise.
5234
3e32ee19
NS
52352015-09-28 Nathan Sidwell <nathan@codesourcery.com>
5236
5237 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
5238 (DEF_FUNCTION_TYPE_VAR_11): Delete.
5239
974348ee
MP
52402015-09-25 Marek Polacek <polacek@redhat.com>
5241
5242 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
5243 (ubsan_instrument_shift): Likewise.
5244
15dbc1a6
MP
52452015-09-25 Marek Polacek <polacek@redhat.com>
5246
5247 PR sanitizer/64906
5248 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
5249
6b95d7cc
PP
52502015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
5251
5252 * c-indentation.c (should_warn_for_misleading_indentation):
5253 Compare next_stmt_vis_column with guard_line_first_nws instead
5254 of with guard_line_vis_column.
5255
c1822f9c
MLI
52562015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
5257
5258 PR c/49654
5259 PR c/49655
5260 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
5261 options and options not valid for the current language.
5262
d5398058
PP
52632015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
5264
5265 * c-indentation.c (should_warn_for_misleading_indentation):
5266 Float out and consolidate the calls to get_visual_column that
5267 are passed guard_exploc as an argument. Compare
5268 next_stmt_vis_column with guard_line_first_nws instead of with
5269 body_line_first_nws.
5270
6b333269
NS
52712015-09-22 Nathan Sidwell <nathan@codesourcery.com>
5272
5273 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
5274 Wnamespaces): New C++ warnings.
5275
a75f1574
JM
52762015-09-22 Jason Merrill <jason@redhat.com>
5277
5278 * c-common.h (abi_compat_version_crosses): New.
5279 (warn_abi_version): Declare.
5280 * c-common.c: Define it.
5281 * c-opts.c (c_common_post_options): Handle it.
5282 flag_abi_compat_version defaults to 8.
5283
bdaaa8b7
VV
52842015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
5285
5286 Complete the implementation of N4230, Nested namespace definition.
5287 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
5288 __cpp_nested_namespace_definitions.
5289
eaa797e8
MLI
52902015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5291
5292 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
5293
c4914de6
MLI
52942015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
5295
5296 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
5297 when warning.
5298 * c-pragma.h (pragma_lex): Add optional loc argument.
5299
fcb87c50
MM
53002015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
5301
5302 * c-format.c (check_format_arg): Adjust to use common block size in all
5303 object pools.
5304
31bdd08a
DM
53052015-09-15 David Malcolm <dmalcolm@redhat.com>
5306
5307 * c-format.c (location_from_offset): Update for change in
5308 signature of location_get_source_line.
5309 * c-indentation.c (get_visual_column): Likewise.
5310 (line_contains_hash_if): Likewise.
5311
aa9f4b4c
MP
53122015-09-14 Marek Polacek <polacek@redhat.com>
5313
5314 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
5315 setting various warnings.
5316
aa256c4a
MP
53172015-09-14 Marek Polacek <polacek@redhat.com>
5318
5319 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
5320 a negative value.
5321
0f876f22
MW
53222015-09-11 Mark Wielaard <mjw@redhat.com>
5323
5324 PR c/28901
5325 * c.opt (Wunused-variable): Option from common.opt.
5326 (Wunused-const-variable): New option.
5327
273aa49e
PC
53282015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
5329
5330 PR c++/53184
5331 * c.opt ([Wsubobject-linkage]): Add.
5332
1807ffc1
MS
53332015-09-03 Martin Sebor <msebor@redhat.com>
5334
5335 PR c/66516
5336 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
5337 functions.
5338 * c-common.c (reject_gcc_builtin): Define.
5339
38942840
BI
53402015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
5341
5342 PR middle-end/60586
5343 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
5344 prototype.
5345 * c-gimplify.c (c_gimplify_expr): Added a call to the function
5346 cilk_gimplify_call_params_in_spawned_fn.
5347 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
5348 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
5349 unwrapping.
5350
c316b5e4
MP
53512015-08-25 Marek Polacek <polacek@redhat.com>
5352
5353 PR middle-end/67330
5354 * c-common.c (handle_weak_attribute): Don't check whether the
5355 visibility can be changed here.
5356
584a7c46
MLI
53572015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
5358
5359 * c-lex.c (c_lex_with_flags): Use explicit locations.
5360
a79683d5
TS
53612015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
5362
5363 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
5364 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
5365
61717a45
FXC
53662015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
5367
5368 PR middle-end/36757
5369 * c-common.c (check_builtin_function_arguments): Add check
5370 for BUILT_IN_SIGNBIT argument.
5371
329524f5
PC
53722015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
5373
5374 PR c++/67160
5375 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
5376 in c++1z mode.
5377
4ee55665
MP
53782015-08-17 Marek Polacek <polacek@redhat.com>
5379
5380 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
5381 with whitespaces before qualifier names.
5382
b893e375
MP
53832015-08-12 Marek Polacek <polacek@redhat.com>
5384
5385 PR c++/55095
5386 * c-common.c (maybe_warn_shift_overflow): Properly handle
5387 left-shifting 1 into the sign bit.
5388
c2d89095
MLI
53892015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
5390
5391 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
5392
971e17ff
AS
53932015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
5394 Braden Obrzut <admin@maniacsvault.net>
5395 Jason Merrill <jason@redhat.com>
5396
5397 Add C++ Concepts TS support.
5398 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5399 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5400 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5401 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5402 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5403 * c.opt (fconcepts): New.
5404
b3d5bc62
JJ
54052015-08-02 Martin Sebor <msebor@redhat.com>
5406
5407 * c.opt (-Wframe-address): New warning option.
5408
8ebca419
PP
54092015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5410
5411 * c-indentation.c (should_warn_for_misleading_indentation):
5412 Improve heuristics.
5413
1a1e101f
PP
54142015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5415
5416 * c-indentation.c (get_visual_column): Add parameter first_nws,
5417 use it. Update comment documenting the function.
5418 (is_first_nonwhitespace_on_line): Remove.
5419 (should_warn_for_misleading_indentation): Replace usage of
5420 of is_first_nonwhitespace_on_line with get_visual_column.
5421
992118a1
PP
54222015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5423
5424 * c-indentation.h (struct token_indent_info): Define.
5425 (get_token_indent_info): Define.
5426 (warn_for_misleading_information): Declare.
5427 * c-common.h (warn_for_misleading_information): Remove.
5428 * c-identation.c (warn_for_misleading_indentation):
5429 Change declaration to take three token_indent_infos. Adjust
5430 accordingly.
5431 * c-identation.c (should_warn_for_misleading_indentation):
5432 Likewise. Bail out early if the body is a compound statement.
5433 (guard_tinfo_to_string): Define.
5434
e8fa3817
JM
54352015-07-30 Jason Merrill <jason@redhat.com>
5436
5437 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5438 '*' for reference decay.
5439
173864e8
MP
54402015-07-30 Marek Polacek <polacek@redhat.com>
5441
5442 * c-common.c (warn_tautological_cmp): Bail for float types.
5443
f2afe6dd
MP
54442015-07-27 Marek Polacek <polacek@redhat.com>
5445
5446 PR bootstrap/67030
5447 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5448
05b28fd6
MP
54492015-07-27 Marek Polacek <polacek@redhat.com>
5450
5451 PR c++/66555
5452 PR c/54979
5453 * c-common.c (find_array_ref_with_const_idx_r): New function.
5454 (warn_tautological_cmp): New function.
5455 * c-common.h (warn_tautological_cmp): Declare.
5456 * c.opt (Wtautological-compare): New option.
5457
5a5062b8
MP
54582015-07-23 Marek Polacek <polacek@redhat.com>
5459
5460 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5461 (ubsan_instrument_shift): Likewise.
5462
dc891fe7
MP
54632015-07-23 Marek Polacek <polacek@redhat.com>
5464
5465 PR sanitizer/66908
5466 * c-ubsan.c: Include gimplify.h.
5467 (ubsan_instrument_division): Unshare OP0 and OP1.
5468 (ubsan_instrument_shift): Likewise.
5469
451b5e48
MP
54702015-07-20 Marek Polacek <polacek@redhat.com>
5471 Richard Sandiford <richard.sandiford@arm.com>
5472
5473 PR c++/55095
5474 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5475 Use EXPR_LOC_OR_LOC.
5476 (maybe_warn_shift_overflow): New function.
5477 * c-common.h (maybe_warn_shift_overflow): Declare.
5478 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5479 * c.opt (Wshift-overflow): New option.
5480
fb0b2914
ML
54812015-07-16 Martin Liska <mliska@suse.cz>
5482
5483 * c-format.c (static void check_format_info_main): Use
5484 object_allocator instead of pool_allocator.
5485 (check_format_arg): Likewise.
5486 (check_format_info_main): Likewise.
5487
903f5c23
AM
54882015-07-15 Andrew MacLeod <amacleod@redhat.com>
5489
5490 * c-opts.c: Remove multiline #include comment.
5491
026c3cfd
AH
54922015-07-12 Aldy Hernandez <aldyh@redhat.com>
5493
5494 * c-common.c: Fix double word typos.
5495
bb49ee66
EB
54962015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5497
5498 * c-ada-spec.h (cpp_operation): Revert latest change.
5499 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5500 constructors and destructors.
5501
1916bcb5
AM
55022015-07-09 Andrew MacLeod <amacleod@redhat.com>
5503
5504 * c-common.h: Adjust includes for flags.h changes.
5505 * stub-objc.c: Likewise.
026c3cfd 5506
a9dcd529
EB
55072015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5508
5509 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5510 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5511
b03b462f
JJ
55122015-07-08 Jakub Jelinek <jakub@redhat.com>
5513
5514 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5515 are to be removed, return NULL rather than original clauses list.
5516
c7131fb2
AM
55172015-07-07 Andrew MacLeod <amacleod@redhat.com>
5518
5519 * array-notation-common.c: Adjust includes.
5520 * c-ada-spec.c: Likewise.
5521 * c-cilkplus.c: Likewise.
5522 * c-common.h: Likewise.
5523 * c-cppbuiltin.c: Likewise.
5524 * c-dump.c: Likewise.
5525 * c-format.c: Likewise.
5526 * c-gimplify.c: Likewise.
5527 * c-indentation.c: Likewise.
5528 * c-lex.c: Likewise.
5529 * c-omp.c: Likewise.
5530 * c-opts.c: Likewise.
5531 * c-pch.c: Likewise.
5532 * c-ppoutput.c: Likewise.
5533 * c-pragma.c: Likewise.
5534 * c-pretty-print.c: Likewise.
5535 * c-semantics.c: Likewise.
5536 * c-ubsan.c: Likewise.
5537 * cilk.c: Likewise.
5538 * stub-objc.c: Likewise.
5539
2a7fb83f
EB
55402015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5541
5542 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5543 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5544
a03c9bf1
JM
55452015-07-01 Jason Merrill <jason@redhat.com>
5546
36a85135
JM
5547 * c-common.h (D_CXX11): Rename from D_CXX0X.
5548 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5549 * c-common.c: Adjust.
5550
e7fa68d5
JM
5551 * c-opts.c (c_common_post_options): Default to C++14.
5552
a03c9bf1
JM
5553 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5554
fe95b036
ESR
55552015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5556
5557 Implement N4197 - Adding u8 character literals
b3d5bc62 5558 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5559 CPP_CHAR.
b3d5bc62 5560 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5561 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5562 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5563 and CPP_UTF8CHAR tokens.
5564 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5565
da2e71c9
MLI
55662015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5567
5568 PR fortran/66605
5569 * c-common.c (do_warn_unused_parameter): Move here.
5570 * c-common.h (do_warn_unused_parameter): Declare.
5571
b155cfd9
MP
55722015-06-29 Marek Polacek <polacek@redhat.com>
5573
5574 PR c/66322
5575 * c-common.c (check_case_bounds): Add bool * parameter. Set
5576 OUTSIDE_RANGE_P.
5577 (c_add_case_label): Add bool * parameter. Pass it down to
5578 check_case_bounds.
5579 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5580 warning here.
5581 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5582 declarations.
5583
31521951
MP
55842015-06-27 Marek Polacek <polacek@redhat.com>
5585
5586 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5587 or VECTOR_INTEGER_TYPE_P throughout.
5588 * c-gimplify.c: Likewise.
5589
22d03525
MP
55902015-06-26 Marek Polacek <polacek@redhat.com>
5591
5592 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5593 * c-common.c (c_fully_fold_internal): Likewise.
5594 (c_alignof_expr): Likewise.
5595 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5596 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5597 * cilk.c (create_parm_list): Likewise.
22d03525 5598
af05e6e5
MP
55992015-06-26 Marek Polacek <polacek@redhat.com>
5600
5601 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5602
f0889939
AM
56032015-06-25 Andrew MacLeod <amacleod@redhat.com>
5604
5605 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5606 * c-gimplify.c: Likewise.
5607 * c-pragma.c: Likewise.
5608 * c-ubsan.c: Likewise.
5609 * cilk.c: Likewise.
5610
ca752f39
RS
56112015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5612
5613 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5614 ggc_hasher.
5615
16a16ec7
AM
56162015-06-25 Andrew MacLeod <amacleod@redhat.com>
5617
5618 * cilk.c: Move calls.h after tm.h in the include chain.
5619
0ae9bd27
MP
56202015-06-25 Marek Polacek <polacek@redhat.com>
5621
5622 * array-notation-common.c: Use VAR_P throughout.
5623 * c-ada-spec.c: Likewise.
5624 * c-common.c: Likewise.
5625 * c-format.c: Likewise.
5626 * c-gimplify.c: Likewise.
5627 * c-omp.c: Likewise.
5628 * c-pragma.c: Likewise.
5629 * c-pretty-print.c: Likewise.
5630 * cilk.c: Likewise.
5631
62f9079a
MP
56322015-06-25 Marek Polacek <polacek@redhat.com>
5633
5634 * cilk.c (extract_free_variables): Use is_global_var.
5635
0fa16060
RS
56362015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5637
5638 * c-common.c: Don't include target-def.h.
5639
a68ae2e1
MP
56402015-06-23 Marek Polacek <polacek@redhat.com>
5641
5642 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5643 when comparing INTEGER_CSTs.
5644
c6a2f2d9
PMR
56452015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5646
5647 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5648 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5649 (dump_ada_template): Skip partially specialized types.
5650
6b4db501
MM
56512015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5652
5653 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5654 swapping.
5655
abb226c9
AM
56562015-06-17 Andrew MacLeod <amacleod@redhat.com>
5657
5658 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5659 * c-ada-spec.c: Likewise.
5660 * c-cilkplus.c: Likewise.
5661 * c-common.c: Likewise.
5662 * c-common.h: Likewise.
5663 * c-cppbuiltin.c: Likewise.
5664 * c-dump.c: Likewise.
5665 * c-format.c: Likewise.
5666 * c-gimplify.c: Likewise.
5667 * c-indentation.c: Likewise.
5668 * c-lex.c: Likewise.
5669 * c-omp.c: Likewise.
5670 * c-opts.c: Likewise.
5671 * c-pch.c: Likewise.
5672 * c-ppoutput.c: Likewise.
5673 * c-pragma.c: Likewise.
5674 * c-pretty-print.c: Likewise.
5675 * c-semantics.c: Likewise.
5676 * c-ubsan.c: Likewise.
5677 * cilk.c: Likewise.
5678 * stub-objc.c: Likewise.
5679
076fecad
PP
56802015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5681
5682 PR c++/65168
5683 * c-common.c (c_common_truthvalue_conversion): Warn when
5684 converting an address of a reference to a truth value.
5685
13fdf2e2
AM
56862015-06-08 Andrew MacLeod <amacleod@redhat.com>
5687
5688 * array-notation-common.c : Adjust include files.
5689 * c-ada-spec.c : Likewise.
5690 * c-cilkplus.c : Likewise.
5691 * c-common.c : Likewise.
5692 * c-common.h : Likewise.
5693 * c-cppbuiltin.c : Likewise.
5694 * c-dump.c : Likewise.
5695 * c-format.c : Likewise.
5696 * c-gimplify.c : Likewise.
5697 * c-indentation.c : Likewise.
5698 * c-lex.c : Likewise.
5699 * c-omp.c : Likewise.
5700 * c-opts.c : Likewise.
5701 * c-pch.c : Likewise.
5702 * c-ppoutput.c : Likewise.
5703 * c-pragma.c : Likewise.
5704 * c-pretty-print.c : Likewise.
5705 * c-semantics.c : Likewise.
5706 * c-ubsan.c : Likewise.
5707 * cilk.c : Likewise.
5708 * stub-objc.c : Likewise.
5709
a1661b90
MP
57102015-06-08 Marek Polacek <polacek@redhat.com>
5711
5712 PR c/66415
5713 * c-format.c (location_from_offset): Return LOC if LINE is null.
5714
d7438551
AH
57152015-06-05 Aldy Hernandez <aldyh@redhat.com>
5716
5717 * c-common.h (c_parse_final_cleanups): New prototype.
5718 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5719
b3d5bc62
JJ
57202015-06-04 Sriraman Tallam <tmsriram@google.com>
5721
5722 * c-common.c (noplt): New attribute.
5723 (handle_noplt_attribute): New handler.
5724
ecb9f223
AM
57252015-06-04 Andrew MacLeod <amacleod@redhat.com>
5726
5727 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5728 * c-ada-spec.c: Likewise.
5729 * c-cilkplus.c: Likewise.
5730 * c-common.c: Likewise.
5731 * c-common.h: Likewise.
5732 * c-cppbuiltin.c: Likewise.
5733 * c-dump.c: Likewise.
5734 * c-format.c: Likewise.
5735 * c-gimplify.c: Likewise.
5736 * c-indentation.c: Likewise.
5737 * c-lex.c: Likewise.
5738 * c-omp.c: Likewise.
5739 * c-opts.c: Likewise.
5740 * c-pch.c: Likewise.
5741 * c-ppoutput.c: Likewise.
5742 * c-pragma.c: Likewise.
5743 * c-pretty-print.c: Likewise.
5744 * c-semantics.c: Likewise.
5745 * c-ubsan.c: Likewise.
5746 * cilk.c: Likewise.
5747 * stub-objc.c: Likewise.
5748
6ac48155
DM
57492015-06-02 David Malcolm <dmalcolm@redhat.com>
5750
5751 PR c/66220:
5752 * c-indentation.c (should_warn_for_misleading_indentation): Use
5753 expand_location rather than expand_location_to_spelling_point.
5754 Don't warn if the guarding statement is more indented than the
5755 next/body stmts.
5756
773ce42e
DM
57572015-06-02 David Malcolm <dmalcolm@redhat.com>
5758
5759 * c-indentation.c (warn_for_misleading_indentation): Bail out
5760 immediately if -Wmisleading-indentation isn't enabled.
5761
4fef8379
ML
57622015-06-01 Martin Liska <mliska@suse.cz>
5763
5764 * c-format.c (check_format_arg):Use new type-based pool allocator.
5765 (check_format_info_main) Likewise.
5766
1edfb384
EB
57672015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5768
5769 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5770 (has_nontrivial_methods): Likewise.
5771
9677ef52
MP
57722015-05-25 Marek Polacek <polacek@redhat.com>
5773
5774 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5775
fd5c817a
MP
57762015-05-22 Marek Polacek <polacek@redhat.com>
5777
5778 PR c/47043
5779 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5780
a2f45fe6 57812015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5782
5783 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5784 STACK_GROWS_DOWNWARD.
5785
a2f45fe6 57862015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5787
5788 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5789 STACK_GROWS_DOWNWARD rather than if it is defined.
5790
0fee2ac2 57912015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5792
0fee2ac2
MLI
5793 PR c/52952
5794 * c-format.c (location_column_from_byte_offset): New.
5795 (location_from_offset): New.
5796 (struct format_wanted_type): Add offset_loc field.
5797 (check_format_info): Move handling of location for extra arguments
5798 closer to the point of warning.
5799 (check_format_info_main): Pass the result of location_from_offset
5800 to warning_at.
5801 (format_type_warning): Pass the result of location_from_offset
5802 to warning_at.
5803
cf4ef6f7
MP
58042015-05-20 Marek Polacek <polacek@redhat.com>
5805
5806 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5807
3a65ee74
MP
58082015-05-20 Marek Polacek <polacek@redhat.com>
5809
5810 * c-ada-spec.c (dump_sloc): Use DECL_P.
5811
21b634ae
MP
58122015-05-20 Marek Polacek <polacek@redhat.com>
5813
5814 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5815 * c-common.c: Likewise.
5816
0e50b624
DM
58172015-05-19 David Malcolm <dmalcolm@redhat.com>
5818
5819 * c-common.h (fe_file_change): Strengthen param from
5820 const line_map * to const line_map_ordinary *.
5821 (pp_file_change): Likewise.
5822 * c-lex.c (fe_file_change): Likewise.
5823 (cb_define): Use linemap_check_ordinary when invoking
5824 SOURCE_LINE.
5825 (cb_undef): Likewise.
5826 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5827 invoking cb_file_change.
5828 (c_finish_options): Likewise.
5829 (push_command_line_include): Likewise.
5830 (cb_file_change): Strengthen param "new_map" from
5831 const line_map * to const line_map_ordinary *.
5832 * c-ppoutput.c (cb_define): Likewise for local "map".
5833 (pp_file_change): Likewise for param "map" and local "from".
5834
fab27f52
MM
58352015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5836
5837 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5838
2fe1d762
TV
58392015-05-18 Tom de Vries <tom@codesourcery.com>
5840
5841 * c-common.c (build_va_arg_1): New function.
5842 (build_va_arg): Add address operator to va_list operand if necessary.
5843
7a37fa90
MM
58442015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5845
5846 PR c/48956
5847 * c-common.c (int_safely_convertible_to_real_p): Define.
5848 (unsafe_conversion_p): Check conversions involving complex types.
5849 (conversion_warning): Add new warning message for conversions which
5850 discard imaginary component.
5851 * c-common.h: (enum conversion_safety): Add new enumerator for such
5852 conversions.
5853
3aa3c9fc
MP
58542015-05-14 Marek Polacek <polacek@redhat.com>
5855
5856 PR c/66066
5857 PR c/66127
5858 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5859 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5860 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5861 use it. If FOR_INT_CONST, require that all evaluated operands be
5862 INTEGER_CSTs.
5863
c3388e62
DM
58642015-05-12 David Malcolm <dmalcolm@redhat.com>
5865
5866 * c-common.h (warn_for_misleading_indentation): New prototype.
5867 * c-indentation.c: New file.
5868 * c.opt (Wmisleading-indentation): New option.
5869
c7b38fd5
TV
58702015-05-12 Tom de Vries <tom@codesourcery.com>
5871
5872 PR tree-optimization/66010
5873 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5874
381bf11e
JM
58752015-05-09 Jason Merrill <jason@redhat.com>
5876
edff0c06
JM
5877 * c-opts.c (c_common_post_options): Also clear
5878 cpp_opts->cpp_warn_cxx11_compat.
5879
129211bc
JM
5880 * c-common.h (enum cxx_dialect): Add cxx_unset.
5881 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5882 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5883
381bf11e
JM
5884 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5885 (std=gnu++0x): Mark as Undocumented.
5886 (std=gnu++1y): Add deprecated message.
5887
fe191308
JM
58882015-05-08 Jason Merrill <jason@redhat.com>
5889
765189ff
JM
5890 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5891 * c-opts.c: Adjust.
5892
fe191308
JM
5893 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5894
755e528f
MP
58952015-05-08 Marek Polacek <polacek@redhat.com>
5896
5897 PR c/64918
5898 * c.opt (Woverride-init-side-effects): New option.
5899
0173bd2a
MP
59002015-05-07 Marek Polacek <polacek@redhat.com>
5901
5902 PR c/65179
5903 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5904 negative value.
5905 * c.opt (Wshift-negative-value): New option.
5906 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5907 when -Wextra and C99/C++11 mode.
5908
e0f0d3b9
MP
59092015-05-07 Marek Polacek <polacek@redhat.com>
5910 Martin Uecker <uecker@eecs.berkeley.edu>
5911
5912 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5913 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5914
8243e2a9
JM
59152015-05-05 Jason Merrill <jason@redhat.com>
5916
5917 * c.opt (Wterminate): New.
5918
577cd070
MP
59192015-04-30 Marek Polacek <polacek@redhat.com>
5920
5921 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5922 require that the non-constant be of a boolean type.
5923
0373796b
JT
59242015-04-29 Josh Triplett <josh@joshtriplett.org>
5925
e0f0d3b9
MP
5926 * c-common.c (handle_section_attribute): Refactor to reduce
5927 nesting and distinguish between error cases.
0373796b 5928
716c0ba6
MP
59292015-04-29 Marek Polacek <polacek@redhat.com>
5930
5931 PR c/64610
5932 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5933 with 0/1.
5934
8848828b
JJ
59352015-04-29 Jakub Jelinek <jakub@redhat.com>
5936
5937 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5938 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5939 HOST_BITS_PER_WIDE_INT.
5940
ecd0e562
TV
59412015-04-28 Tom de Vries <tom@codesourcery.com>
5942
5943 PR tree-optimization/65887
5944 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5945
2a877204 59462015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5947 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5948
5949 * c-ada-spec.c (in_function): Delete.
5950 (dump_generic_ada_node): Do not change in_function and remove the
5951 redundant code dealing with it.
5952 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5953 (print_ada_methods): Output the static member functions in a nested
5954 package after the regular methods as well as associated renamings.
5955
4853031e
MP
59562015-04-24 Marek Polacek <polacek@redhat.com>
5957
5958 PR c/65830
5959 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5960 and OPT_Wshift_count_overflow.
5961
8c2b7f79
MP
5962 PR c/63357
5963 * c-common.c (warn_logical_operator): Warn if the operands have the
5964 same expressions.
5965
b8787813
MP
59662015-04-24 Marek Polacek <polacek@redhat.com>
5967
5968 PR c/61534
5969 * c-common.c (warn_logical_operator): Bail if either operand comes
5970 from a macro expansion.
5971
8fba1830
BRF
59722015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5973
5974 PR target/55143
5975 * c-common.c (c_default_pointer_mode): Add definition.
5976 * c-common.h (c_default_pointer_mode): Add declaration.
5977
17958621
JJ
59782015-03-11 Jakub Jelinek <jakub@redhat.com>
5979
5980 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5981 on record_builtin_type argument.
5982
7ccb1a11
JJ
59832015-03-10 Jakub Jelinek <jakub@redhat.com>
5984
5985 PR c/65120
5986 * c-common.c (warn_logical_not_parentheses): Don't warn for
5987 !x == 0 or !x != 0.
5988
04fd785e
MP
59892015-03-07 Marek Polacek <polacek@redhat.com>
5990
5991 PR sanitizer/65280
5992 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5993 before trying to figure out whether we have a flexible array member.
5994
a4e26206 59952015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5996 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5997
5998 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5999
0d2489f4
EB
60002015-03-05 Eric Botcazou <ebotcazou@adacore.com>
6001
6002 PR ada/65319
6003 * c-ada-spec.c (print_destructor): Remove obsolete code.
6004
83ed54d7
EB
60052015-03-01 Eric Botcazou <ebotcazou@adacore.com>
6006
6007 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
6008 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
6009 DECL_TEMPLATE_RESULT emulations.
6010 (dump_ada_template)): Add guard for TYPE_METHODS.
6011
7631f0e2
MP
60122015-02-27 Marek Polacek <polacek@redhat.com>
6013
6014 PR c/65040
6015 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
6016
d1783ae5
KT
60172015-02-27 Kai Tietz <ktietz@redhat.com>
6018
6019 PR c/35330
6020 * c-pragma.c (handle_pragma_weak): Do not try to create
6021 weak/alias of declarations not being function, or variable
6022 declarations.
6023
56a9f6bc
TS
60242015-02-24 Thomas Schwinge <thomas@codesourcery.com>
6025
6026 PR libgomp/64625
6027 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6028 Remove macros.
6029 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
6030
3d5cb23d
MP
60312015-02-16 Marek Polacek <polacek@redhat.com>
6032
6033 PR c/65066
6034 * c-format.c (check_format_types): Handle null param.
6035
fa008882
MP
60362015-02-13 Marek Polacek <polacek@redhat.com>
6037
6038 PR c/65040
6039 * c-format.c (check_format_types): Don't warn about different
6040 signedness if the original value is in the range of WANTED_TYPE.
6041
785f21af
JM
60422015-02-12 Jason Merrill <jason@redhat.com>
6043
6044 PR c++/64956
6045 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
6046 to the current highest version.
6047 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
6048
4886ec8e
JJ
60492015-02-04 Jakub Jelinek <jakub@redhat.com>
6050
6051 PR c/64824
6052 PR c/64868
6053 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
6054 instead of RDIV_EXPR. Use build_binary_op instead of
6055 build2_loc.
6056
40fecdd6
JM
60572015-01-30 Joseph Myers <joseph@codesourcery.com>
6058
6059 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
6060 to pass input_location as first argument.
6061
a0c88d06
TV
60622015-01-23 Tom de Vries <tom@codesourcery.com>
6063
6064 PR libgomp/64672
6065 * c.opt (fopenacc): Mark as LTO option.
6066
1506ae0e
TV
60672015-01-23 Tom de Vries <tom@codesourcery.com>
6068
6069 PR libgomp/64707
6070 * c.opt (fopenmp): Mark as LTO option.
6071
31be63ab
JJ
60722015-01-21 Jakub Jelinek <jakub@redhat.com>
6073
6074 PR c/63307
b1726d6c 6075 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
6076 (compare_decls): Fix up formatting.
6077
60782015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
6079
6080 PR c/63307
6081 * cilk.c: Include vec.h.
6082 (struct cilk_decls): New structure.
6083 (wrapper_parm_cb): Split this function to...
6084 (fill_decls_vec): ...this...
6085 (create_parm_list): ...and this.
6086 (compare_decls): New function.
6087 (for_local_cb): Remove.
6088 (wrapper_local_cb): Ditto.
6089 (build_wrapper_type): For now first traverse and fill vector of
6090 declarations then sort it and then deal with sorted vector.
6091 (cilk_outline): Ditto.
6092 (declare_one_free_variable): Ditto.
6093
6875457f
JM
60942015-01-21 Jason Merrill <jason@redhat.com>
6095
6096 PR c++/64629
6097 * c-format.c (check_format_arg): Call decl_constant_value.
6098
185c9e56
ML
60992015-01-19 Martin Liska <mliska@suse.cz>
6100
6101 * c-common.c (handle_noicf_attribute): New function.
6102
41dbbb37
TS
61032015-01-15 Thomas Schwinge <thomas@codesourcery.com>
6104 Bernd Schmidt <bernds@codesourcery.com>
6105 James Norris <jnorris@codesourcery.com>
6106 Cesar Philippidis <cesar@codesourcery.com>
6107 Ilmir Usmanov <i.usmanov@samsung.com>
6108 Jakub Jelinek <jakub@redhat.com>
6109
6110 * c.opt (fopenacc): New option.
6111 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
6112 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
6113 New macros.
6114 * c-common.h (c_finish_oacc_wait): New prototype.
6115 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
6116 (c_finish_oacc_wait): New function.
6117 * c-pragma.c (oacc_pragmas): New variable.
6118 (c_pp_lookup_pragma, init_pragma): Handle it.
6119 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
6120 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
6121 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
6122 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
6123 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
6124 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
6125 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
6126 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
6127 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
6128 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
6129 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
6130 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
6131 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
6132 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
6133 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
6134 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
6135 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
6136 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
6137 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
6138 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
6139 PRAGMA_OACC_CLAUSE_WORKER.
6140
3f8257db 61412015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
6142
6143 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
6144 for the new option fstack-protector_explicit.
6145 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
6146 (handle_stack_protect_attribute): New function.
6147
3f8257db 61482015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
6149
6150 * c.opt: New option -Warray-bounds=.
6151
adfac8df
JJ
61522015-01-09 Michael Collison <michael.collison@linaro.org>
6153
6154 * array-notation-common.c: Include hash-set.h, machmode.h,
6155 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6156 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
6157 * c-ada-spec.c: Ditto.
6158 * c-cilkplus.c: Ditto.
6159 * c-common.c: Include input.h due to flattening of tree.h.
6160 Define macro GCC_C_COMMON_C.
6161 * c-common.h: Flatten tree.h header files into c-common.h.
6162 Remove include of tree-core.h.
6163 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6164 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6165 fold-const.h, wide-int.h, and inchash.h due to
6166 flattening of tree.h.
6167 * c-dump.c: Ditto.
6168 * c-format.c: Flatten tree.h header files into c-common.h.
6169 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
6170 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6171 fold-const.h, wide-int.h, and inchash.h due to
6172 flattening of tree.h.
6173 * c-dump.c: Include hash-set.h, machmode.h,
6174 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6175 fold-const.h, wide-int.h, and inchash.h due to
6176 flattening of tree.h.
6177 * c-format.c: Include hash-set.h, machmode.h,
6178 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6179 fold-const.h, wide-int.h, inchash.h and real.h due to
6180 flattening of tree.h.
6181 * c-gimplify.c: Include hash-set.h, machmode.h,
6182 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
6183 fold-const.h, wide-int.h, and inchash.h due to
6184 flattening of tree.h.
6185 * cilk.c: Ditto.
6186 * c-lex.c: Ditto.
6187 * c-omp.c: Ditto.
6188 * c-opts.c: Ditto.
6189 * c-pch.c: Ditto.
6190 * c-ppoutput.c: Ditto.
6191 * c-pragma.c: Ditto.
6192 * c-pretty-print.c: Ditto.
6193 * c-semantics.c: Ditto.
6194 * c-ubsan.c: Ditto.
6195 * stub-objc.c: Ditto.
6196
f5481fc4
JM
61972015-01-08 Jason Merrill <jason@redhat.com>
6198
6199 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
6200 do_ubsan_in_current_function.
6201 (ubsan_maybe_instrument_reference_or_call): Likewise.
6202 * c-ubsan.h: Declare it.
6203
de35aa66
MS
62042015-01-08 Mike Stump <mikestump@comcast.net>
6205
6206 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
6207
4a9a42ab
MP
62082015-01-07 Marek Polacek <polacek@redhat.com>
6209
6210 PR c/64440
6211 * c-common.c (c_fully_fold_internal): Warn for division and modulo
6212 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
6213
2f42e5de
TS
62142015-01-05 Trevor Saunders <tsaunders@mozilla.com>
6215
6216 PR c++/31397
6217 * c.opt (Wsuggest-override): New option.
6218
5624e564
JJ
62192015-01-05 Jakub Jelinek <jakub@redhat.com>
6220
6221 Update copyright years.
6222
5bd012f8
MP
62232015-01-05 Marek Polacek <polacek@redhat.com>
6224
6225 PR c/64423
6226 * c-common.c (warn_array_subscript_with_type_char): Add location_t
6227 parameter. Use it.
6228 * c-common.h (warn_array_subscript_with_type_char): Update
6229 declaration.
6230
a7fa8d18
ESR
62312014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
6232
6233 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
6234 Control macro with flag_sized_deallocation.
6235
3f8257db 62362014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
6237
6238 * c.opt (Wdiscarded-array-qualifiers): New option.
6239
1f8d3e84
JJ
62402014-12-19 Jakub Jelinek <jakub@redhat.com>
6241
6242 PR preprocessor/63831
6243 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
6244 and __has_cpp_attribute here.
6245 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
6246 c_common_has_attribute.
6247 * c-common.h (c_common_has_attribute): New prototype.
6248 * c-lex.c (init_c_lex): Set cb->has_attribute to
6249 c_common_has_attribute instead of cb_has_attribute.
6250 (get_token_no_padding): New function.
6251 (cb_has_attribute): Renamed to ...
6252 (c_common_has_attribute): ... this. No longer static. Use
6253 get_token_no_padding, require ()s, don't build TREE_LIST
6254 unnecessarily, fix up formatting, adjust diagnostics, call
6255 init_attributes.
6256
20b06add
JM
62572014-12-15 Jason Merrill <jason@redhat.com>
6258
6259 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
6260 (-Wsized-deallocation): New.
6261 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
6262 to on in C++14 and up.
6263
94a073b2
JM
62642014-12-11 Jason Merrill <jason@redhat.com>
6265
acaa5911
JM
6266 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
6267
94a073b2
JM
6268 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
6269 we aren't complaining about VLAs.
6270
7fb66c15
MP
62712014-12-06 Marek Polacek <polacek@redhat.com>
6272
6273 PR tree-optimization/64183
6274 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
6275 shift-expression if it is integer_type_node. Use types_compatible_p.
6276
b731b390
JJ
62772014-11-29 Jakub Jelinek <jakub@redhat.com>
6278
6279 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
6280 last argument from create_tmp_var_raw and create_tmp_var calls.
6281 * cilk.c (gimplify_cilk_spawn): Likewise.
6282 * c-omp.c (c_finish_omp_atomic): Likewise.
6283
6a4da643
MP
62842014-11-28 Marek Polacek <polacek@redhat.com>
6285
6286 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
6287 instead of unsigned_type_node.
6288
541e35a6
MP
62892014-11-28 Marek Polacek <polacek@redhat.com>
6290
6291 PR c/63862
6292 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
6293 to op1_utype.
6294 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
6295 expression to unsigned_type_node.
6296
dcc97066
MW
62972014-11-20 Mark Wielaard <mjw@redhat.com>
6298
6299 PR debug/38757
6300 * c-opts.c (set_std_c89): Set lang_hooks.name.
6301 (set_std_c99): Likewise.
6302 (set_std_c11): Likewise.
6303 (set_std_cxx98): Likewise.
6304 (set_std_cxx11): Likewise.
6305 (set_std_cxx14): Likewise.
6306 (set_std_cxx1z): Likewise.
6307
aa7da51a
JJ
63082014-11-21 Jakub Jelinek <jakub@redhat.com>
6309
6310 PR target/63764
6311 * c-common.h (convert_vector_to_pointer_for_subscript): Change
6312 return type to bool.
009a3480 6313 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
6314 (convert_vector_to_pointer_for_subscript): Change return type to
6315 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
6316 and copy it into a TARGET_EXPR and use that instead of *vecp
6317 directly.
6318
538dd0b7
DM
63192014-11-19 David Malcolm <dmalcolm@redhat.com>
6320
6321 Merger of git branch "gimple-classes-v2-option-3".
6322 * ChangeLog.gimple-classes: New.
6323 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
6324 from being just a vec<gimple> to a vec<gbind *>.
6325
c39a5e99
JJ
63262014-11-18 Jakub Jelinek <jakub@redhat.com>
6327
6328 PR sanitizer/63813
6329 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
6330 argument to ptype, set type to TREE_TYPE (ptype). Don't call
6331 get_pointer_alignment for non-pointers. Use ptype, or if it is
6332 reference type, corresponding pointer type, as type of kind
6333 argument.
6334 (ubsan_maybe_instrument_reference,
6335 ubsan_maybe_instrument_member_call): Adjust callers.
6336
8537a4a9
MP
63372014-11-15 Marek Polacek <polacek@redhat.com>
6338
6339 PR middle-end/63884
6340 * array-notation-common.c (is_sec_implicit_index_fn): Return false
6341 for NULL fndecl.
6342 (extract_array_notation_exprs): Return for NULL node.
6343
2079956a
JM
63442014-11-12 Joseph Myers <joseph@codesourcery.com>
6345
6346 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
6347 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
6348
1304953e
JJ
63492014-11-12 Jakub Jelinek <jakub@redhat.com>
6350
6351 PR c/59708
6352 * c-common.c (check_builtin_function_arguments): Handle
6353 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
6354
e5e44252
AK
63552014-11-10 Andi Kleen <ak@linux.intel.com>
6356
6357 PR c/60804
6358 * c-common.h (check_no_cilk): Declare.
6359 * cilk.c (get_error_location): New function.
6360 (check_no_cilk): Dito.
6361
e64b984d
AK
63622014-11-10 Andi Kleen <ak@linux.intel.com>
6363
6364 * cilk.c (recognize_spawn): Use expression location
6365 for error message.
6366
13c21655
PC
63672014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
6368
6369 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
6370
42fd12b1
ESR
63712014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
6372
6373 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
6374 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
6375 (__cpp_range_based_for, __cpp_initializer_lists,
6376 __cpp_delegating_constructors, __cpp_nsdmi,
6377 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
6378 for C++11; (__cpp_attribute_deprecated): Remove in favor of
6379 __has_cpp_attribute.
6380 * c-lex.c (cb_has_attribute): New callback CPP function;
6381 (init_c_lex): Set has_attribute callback.
6382
6f450181
RB
63832014-11-04 Richard Biener <rguenther@suse.de>
6384
6385 * c-common.c (shorten_compare): Do not shorten mixed
6386 DFP and non-DFP compares.
6387
26f0e1d6
ESR
63882014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6389
6390 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
6391 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
6392 Commentary and rearrangement of tests.
6393 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
6394 Commentary and rearrangement of tests.
ab20d992 6395 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
6396 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
6397
ef4bddc2
RS
63982014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6399
6400 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6401 enum from machine_mode.
6402
c582198b
AM
64032014-10-28 Andrew MacLeod <amacleod@redhat.com>
6404
adfac8df
JJ
6405 * c-common.c: Adjust include files.
6406 * c-gimplify.c: Ditto.
6407 * cilk.c: Ditto.
6408 * c-pragma.c: Ditto.
6409 * c-ubsan.c: Ditto.
c582198b 6410
60393bbc
AM
64112014-10-27 Andrew MacLeod <amacleod@redhat.com>
6412
6413 * c-gimplify.c: Adjust include files.
6414
d723bb7c
MLI
64152014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6416
6417 PR c++/53061
6418 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6419 c_common_initialize_diagnostics.
6420 * c-common.h: Likewise.
6421
90f3520e
MP
64222014-10-24 Marek Polacek <polacek@redhat.com>
6423
6424 PR c/56980
6425 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6426 print "struct"/"union"/"enum" for typedefed names.
6427
59d7607a
MP
64282014-10-23 Marek Polacek <polacek@redhat.com>
6429
6430 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6431 in unsigned type.
6432
d95a2703
JJ
64332014-10-22 Jakub Jelinek <jakub@redhat.com>
6434 Yury Gribov <y.gribov@samsung.com>
6435
6436 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6437 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6438 instead of flag_sanitize_recover as bool flag.
6439
8e6ef852
KY
64402014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6441
6442 * cilk.c: Revert previous change.
6443
948cf550
IZ
64442014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6445
6446 PR c/63307
6447 * cilk.c: Include vec.h.
6448 (struct cilk_decls): New structure.
6449 (wrapper_parm_cb): Split this function to...
6450 (fill_decls_vec): ...this...
6451 (create_parm_list): ...and this.
6452 (compare_decls): New function.
6453 (for_local_cb): Remove.
6454 (wrapper_local_cb): Ditto.
6455 (build_wrapper_type): For now first traverse and fill vector of
6456 declarations then sort it and then deal with sorted vector.
6457 (cilk_outline): Ditto.
6458 (declare_one_free_variable): Ditto.
6459
92574c7c
MP
64602014-10-17 Marek Polacek <polacek@redhat.com>
6461
6462 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6463 * c.opt (Wimplicit-int): Initialize to -1.
6464
83685514
AM
64652014-10-16 Andrew MacLeod <amacleod@redhat.com>
6466
6467 * c-pragma.c: Adjust include files.
6468 * c-semantics.c: Likewise.
6469
5b8300ea
DD
64702014-10-16 DJ Delorie <dj@redhat.com>
6471
6472 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6473 multiples of bytes.
6474
5f83e90b
JM
64752014-10-14 Jason Merrill <jason@redhat.com>
6476
6477 PR c++/63455
6478 * c-common.h (CPP_PREPARSED_EXPR): New.
6479 (N_CP_TTYPES): Adjust.
6480
d73326ca
MP
64812014-10-15 Marek Polacek <polacek@redhat.com>
6482
6483 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6484
78a7c317
DD
64852014-10-14 DJ Delorie <dj@redhat.com>
6486
6487 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6488 types, not just __int128.
6489 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6490 types, not just __int128.
6491 (cpp_atomic_builtins): Round pointer sizes up.
6492 (type_suffix): Use type precision, not specific types.
6493 * c-common.c (c_common_reswords): Remove __int128 special case.
6494 (c_common_type_for_size): Check for all __intN types, not just
6495 __int128.
6496 (c_common_type_for_mode): Likewise.
6497 (c_common_signed_or_unsigned_type): Likewise.
6498 (c_build_bitfield_integer_type): Likewise.
6499 (c_common_nodes_and_builtins): Likewise.
6500 (keyword_begins_type_specifier): Likewise.
6501 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6502 __intN variants.
6503
2a22f99c
TS
65042014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6505
6506 * c-common.c: Use hash_table instead of hashtab.
6507
2a8ef767
ESR
65082014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6509
adfac8df 6510 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6511 C++11 section.
6512
3c9aabbd
MG
65132014-10-03 Marc Glisse <marc.glisse@inria.fr>
6514
6515 PR c++/54427
6516 PR c++/57198
6517 PR c++/58845
6518 * c-common.c (warn_logical_operator): Punt for vectors.
6519
a15f7cb8
ESR
65202014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6521
6522 Implement SD-6: SG10 Feature Test Recommendations
6523 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6524 macros and the __has_header macro.
6525
8d0cf15e
JM
65262014-09-30 Jason Merrill <jason@redhat.com>
6527
dd5d5481
JM
6528 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6529 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6530 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6531
b752325e
JM
6532 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6533 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6534
8d0cf15e
JM
6535 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6536 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6537
083e891e
MP
65382014-09-24 Marek Polacek <polacek@redhat.com>
6539
6540 PR c/61405
6541 PR c/53874
6542 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6543
7861b648
AK
65442014-09-23 Andi Kleen <ak@linux.intel.com>
6545
6546 * c-common.c (handle_no_reorder_attribute): New function.
6547 (c_common_attribute_table): Add no_reorder attribute.
6548
9a79452d
JM
65492014-09-22 Joseph Myers <joseph@codesourcery.com>
6550
6551 * c-cppbuiltin.c (c_cpp_builtins): Define
6552 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6553 modes.
6554
dd69f047
JM
65552014-09-18 Joseph Myers <joseph@codesourcery.com>
6556
6557 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6558 for supported floating-point modes.
6559
737a4826
MLI
65602014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6561
6562 * c.opt (Wpsabi): Use LangEnabledBy.
6563 * c-opts.c (c_common_handle_option): Do not handle here.
6564
8cc4b7a2
JM
65652014-09-12 Joseph Myers <joseph@codesourcery.com>
6566
6567 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6568 macros for floating-point modes.
6569
179b5a55
MG
65702014-09-11 Marc Glisse <marc.glisse@inria.fr>
6571
6572 PR target/58757
6573 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6574 __*_DENORM_MIN__ without denormals.
6575
570a11fe
JJ
65762014-09-10 Jakub Jelinek <jakub@redhat.com>
6577
6578 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6579 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6580 ubsan_create_data callers.
6581 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6582 index is constant or BIT_AND_EXPR with constant mask and is
6583 small enough for the bound.
6584 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6585 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6586
b559c810
MLI
65872014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6588
6589 * c.opt: Add CppReason to various flags.
6590 (Wdate-time): Re-sort.
6591 * c-common.c: Include c-common.h earlier.
6592 (struct reason_option_codes_t): Delete.
6593 (c_option_controlling_cpp_error): Prefix global type and struct
6594 with cpp_.
6595
1ef33fd4
MLI
65962014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6597
6598 * c.opt (Wnormalized): New.
6599 (Wnormalized=): Use Enum and Reject Negative.
6600 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6601
66bb34c0
JM
66022014-09-08 Joseph Myers <joseph@codesourcery.com>
6603
6604 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6605 digits of floating-point modes if -fbuilding-libgcc.
6606
53d68b9f
JM
66072014-09-05 Joseph Myers <joseph@codesourcery.com>
6608
6609 * c-cppbuiltin.c (c_cpp_builtins): Also define
6610 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6611 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6612 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6613 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6614 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6615 __LIBGCC_STACK_GROWS_DOWNWARD__,
6616 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6617 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6618 __LIBGCC_DWARF_FRAME_REGISTERS__,
6619 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6620 __LIBGCC_STACK_POINTER_REGNUM__ and
6621 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6622 (builtin_define_with_value): Handle backslash-escaping in string
6623 macro values.
6624
f65586dc
RB
66252014-09-05 Richard Biener <rguenther@suse.de>
6626
6627 PR middle-end/63148
6628 * c-format.c (check_format_arg): Properly handle
6629 effectively signed POINTER_PLUS_EXPR offset.
6630
2b71f4a4
MLI
66312014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6632
6633 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6634 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6635 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6636 and Init.
6637 * c-opts.c (c_common_handle_option): Do not handle here.
6638 (sanitize_cpp_opts): Likewise.
6639 * c-common.c (struct reason_option_codes_t): Handle
6640 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6641
d2e4feca
MP
66422014-09-03 Marek Polacek <polacek@redhat.com>
6643
6644 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6645
9a771876
JJ
66462014-09-02 Jakub Jelinek <jakub@redhat.com>
6647 Balaji V. Iyer <balaji.v.iyer@intel.com>
6648 Igor Zamyatin <igor.zamyatin@intel.com>
6649
6650 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6651 * c-common.c (c_common_reswords): Added _Cilk_for.
6652 * c-common.h (enum rid): Added RID_CILK_FOR.
6653 (cilk_for_number_of_iterations): Add declaration.
6654 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6655 CILK_FOR.
6656 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6657 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6658
81b5d104
MLI
66592014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6660
6661 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6662 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6663 Wundef): Use CPP, Var and Init.
6664 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6665
b753b37b
MLI
66662014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6667
6668 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6669 * c-opts.c (c_common_handle_option): Do not handle here.
6670
028aee17
JM
66712014-08-25 Jason Merrill <jason@redhat.com>
6672
6673 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6674 -std=c++14 and -std=gnu++14, rather than the reverse.
6675 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6676 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6677 * c-common.h (cxx_dialect): Remove cxx1y.
6678
e4276ba5
ESR
66792014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6680
6681 * c-common.h (enum cxx_dialect): Add cxx14.
6682 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6683 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6684 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6685
a545cacd
JM
66862014-08-22 Jason Merrill <jason@redhat.com>
6687
6688 * c.opt (std=gnu++17): Fix alias.
6689
59ea0364
MP
66902014-08-22 Marek Polacek <polacek@redhat.com>
6691
6692 PR c++/62199
6693 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6694 check for vector types. Drop LHS argument.
6695 * c-common.h (warn_logical_not_parentheses): Adjust.
6696
596e808c
MLI
66972014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6698
6699 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6700 (Wmultichar): Likewise.
6701 (Wdate-time): Use C-family languages instead of Common. Use CPP
6702 and Var.
6703 * c-opts.c (c_common_handle_option): Do not handle the above
6704 options here.
6705 (sanitize_cpp_opts): Likewise.
6706
18767f65
MLI
67072014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6708
6709 PR fortran/44054
6710 * c-opts.c: Include tree-diagnostics.h.
6711 (c_diagnostic_finalizer): New.
6712 (c_common_initialize_diagnostics): Use it.
6713
b4413594
MLI
67142014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6715
6716 PR preprocessor/51303
6717 * c-common.c (struct reason_option_codes_t option_codes):
6718 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6719
43f9a13c
MLI
67202014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6721
6722 PR c/60975
6723 PR c/53063
6724 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6725 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6726 (c_common_post_options): Call init_global_opts_from_cpp.
6727 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6728
04159acf
MP
67292014-08-19 Marek Polacek <polacek@redhat.com>
6730
6731 PR c++/62153
6732 * c-common.c (maybe_warn_bool_compare): New function.
6733 * c-common.h (maybe_warn_bool_compare): Declare.
6734 * c.opt (Wbool-compare): New option.
6735
35aff4fb
MP
67362014-08-19 Marek Polacek <polacek@redhat.com>
6737
6738 * c.opt (Wc99-c11-compat): New option.
6739
177cce46
MP
67402014-08-19 Marek Polacek <polacek@redhat.com>
6741
6742 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6743 to warn_c90_c99_compat.
6744 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6745 to -1.
6746
6ae9194f
MLI
67472014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6748 Steven Bosscher <steven@gcc.gnu.org>
6749
6750 PR c/52952
6751 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6752 format_check_results.
6753 (check_function_format): Use true and add comment for boolean
6754 argument.
6755 (finish_dollar_format_checking): Use explicit location when warning.
6756 (check_format_info): Likewise.
6757 (check_format_arg): Set extra_arg_loc and format_string_loc.
6758 (check_format_info_main): Use explicit location when warning.
6759 (check_format_types): Pass explicit location.
6760 (format_type_warning): Likewise.
6761
8e54f6d3
MLI
67622014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6763
6764 PR fortran/44054
6765 * c-format.c: Handle Fortran flags.
6766
cd4e76fc
IZ
67672014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6768
6769 PR other/61962
6770 * array-notation-common.c (find_rank): Added handling for other
6771 types of references.
6772
f3bede71
MP
67732014-08-10 Marek Polacek <polacek@redhat.com>
6774
6775 PR c/51849
6776 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6777 * c.opt (Wc90-c99-compat): Add option.
6778
9f25a338
TS
67792014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6780
6781 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6782
62e4eb35
MP
67832014-08-03 Marek Polacek <polacek@redhat.com>
6784
ab20d992 6785 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6786 (c_add_case_label): Pass loc to check_case_value.
6787
b787e7a2
TS
67882014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6789
6790 * cilk.c: Use hash_map instead of pointer_map.
6791
6e2830c3
TS
67922014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6793
6794 * c-gimplify.c: Use hash_set instead of pointer_set.
6795
a7ee52fb
IZ
67962014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6797
6798 PR middle-end/61455
6799 * array-notation-common.c (extract_array_notation_exprs): Handling
6800 of DECL_EXPR added.
6801
944fa280
JJ
68022014-08-01 Jakub Jelinek <jakub@redhat.com>
6803
6804 * c-common.h (min_align_of_type): Removed prototype.
6805 * c-common.c (min_align_of_type): Removed.
6806 * c-ubsan.h (ubsan_maybe_instrument_reference,
6807 ubsan_maybe_instrument_member_call): New prototypes.
6808 * c-ubsan.c: Include stor-layout.h and builtins.h.
6809 (ubsan_maybe_instrument_reference_or_call,
6810 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6811 functions.
6812
b4dfdc11
MG
68132014-07-31 Marc Glisse <marc.glisse@inria.fr>
6814
6815 PR c++/60517
6816 * c.opt (-Wreturn-local-addr): Move to common.opt.
6817
a41844e5
JM
68182014-07-30 Jason Merrill <jason@redhat.com>
6819
6820 PR c++/61659
6821 PR c++/61687
6822 Revert:
6823 * c.opt (-fuse-all-virtuals): New.
6824
976d5a22
TT
68252014-07-30 Tom Tromey <tromey@redhat.com>
6826
6827 PR c/59855
6828 * c.opt (Wdesignated-init): New option.
6829 * c-common.c (c_common_attribute_table): Add "designated_init".
6830 (handle_designated_init): New function.
6831
cdc94aca
MP
68322014-07-24 Marek Polacek <polacek@redhat.com>
6833
6834 PR c/57653
6835 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6836
f41373b6
DS
68372014-07-16 Dodji Seketeli <dodji@redhat.com>
6838
6839 PR preprocessor/60723 - missing system-ness marks for macro tokens
6840 * c-ppoutput.c (struct print::prev_was_system_token): New data
6841 member.
6842 (init_pp_output): Initialize it.
6843 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6844 (do_line_change): Return a flag saying if a line marker was
6845 emitted or not.
6846 (scan_translation_unit): Detect if the system-ness of the token we
6847 are about to emit is different from the one of the previously
6848 emitted token. If so, emit a line marker. Avoid emitting useless
6849 adjacent line markers. Avoid emitting line markers for tokens
6850 originating from the expansion of built-in macros.
6851 (scan_translation_unit_directives_only): Adjust.
6852
4d661eaa
MP
68532014-07-15 Marek Polacek <polacek@redhat.com>
6854
6855 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6856 TYPE_MAX_VALUE is NULL.
6857
b108f48f
JJ
68582014-07-14 Jakub Jelinek <jakub@redhat.com>
6859
6860 PR middle-end/61294
6861 * c.opt (Wmemset-transposed-args): New warning.
6862
c0221884
JM
68632014-07-10 Jason Merrill <jason@redhat.com>
6864
6865 PR c++/61659
6866 PR c++/61687
6867 * c.opt (-fuse-all-virtuals): New.
6868
63dfbb95
RB
68692014-07-09 Richard Biener <rguenther@suse.de>
6870
6871 PR c-family/61741
6872 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6873 using unsigned arithmetic if overflow does not wrap instead of
6874 if overflow is undefined.
6875
773ec47f
MP
68762014-07-06 Marek Polacek <polacek@redhat.com>
6877
6878 PR c/6940
6879 * c.opt (Wsizeof-array-argument): New option.
6880
00a7ba58
JJ
68812014-07-03 Jakub Jelinek <jakub@redhat.com>
6882
b1726d6c 6883 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6884 comments->count <= 1, as comments->entries might be NULL.
6885
52ec0ea3
MP
68862014-07-01 Marek Polacek <polacek@redhat.com>
6887
6888 * c.opt (Wint-conversion): New option.
6889
d5c3d343
MP
68902014-07-01 Marek Polacek <polacek@redhat.com>
6891
6892 PR c/58286
6893 * c.opt (Wincompatible-pointer-types): New option.
6894
6e7ceb17
PC
68952014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6896
6897 PR c++/51400
6898 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6899 Do not discard TYPE_QUALS of type.
6900
da73100b
JM
69012014-06-26 Jason Merrill <jason@redhat.com>
6902
6903 * c-common.h (enum cxx_dialect): Add cxx1z.
6904 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6905 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6906
08eedf75
TJ
69072014-06-26 Teresa Johnson <tejohnson@google.com>
6908
6909 * c-common.h (get_dump_info): Declare.
6910 * c-gimplify.c (c_genericize): Use saved dump files.
6911 * c-opts.c (c_common_parse_file): Begin and end dumps
6912 once around parsing invocation.
6913 (get_dump_info): New function.
6914
7b56b2f8
MP
69152014-06-23 Marek Polacek <polacek@redhat.com>
6916 Andrew MacLeod <amacleod@redhat.com>
6917
6918 PR c/61553
6919 * c-common.c (get_atomic_generic_size): Don't segfault if the
6920 type doesn't have a size.
6921
0e37a2f3
MP
69222014-06-20 Marek Polacek <polacek@redhat.com>
6923
6924 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6925 (ubsan_walk_array_refs_r): New function.
6926 (c_genericize): Instrument array bounds.
6927 * c-ubsan.c: Include "internal-fn.h".
6928 (ubsan_instrument_division): Mark instrumented arrays as having
6929 side effects. Adjust ubsan_type_descriptor call.
6930 (ubsan_instrument_shift): Likewise.
6931 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6932 (ubsan_instrument_bounds): New function.
6933 (ubsan_array_ref_instrumented_p): New function.
6934 (ubsan_maybe_instrument_array_ref): New function.
6935 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6936 (ubsan_array_ref_instrumented_p): Declare.
6937 (ubsan_maybe_instrument_array_ref): Declare.
6938
69392014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6940
6941 PR lto/61123
6942 * c.opt (fshort-enums): Add to LTO.
6943 * c.opt (fshort-wchar): Likewise.
6944
5c3d09f7
MP
69452014-06-16 Marek Polacek <polacek@redhat.com>
6946
6947 PR c/60439
6948 * c.opt (Wswitch-bool): Add Var.
6949
9cf32741
JJ
69502014-06-12 Jakub Jelinek <jakub@redhat.com>
6951
6952 PR middle-end/61486
6953 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6954 #pragma omp target teams or
6955 #pragma omp {,target }teams distribute simd.
6956
62984918
JM
69572014-06-12 Jason Merrill <jason@redhat.com>
6958
6959 * c.opt (Wabi=, fabi-compat-version): New.
6960 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6961 (c_common_post_options): Handle flag_abi_compat_version default.
6962 Disallow -fabi-compat-version=1.
6963 * c-common.h (abi_version_crosses): New.
6964
f961457f
JH
69652014-06-11 Jan Hubicka <hubicka@ucw.cz>
6966
adfac8df 6967 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6968 section names that are no longer trees.
6969
92d28cbb
JJ
69702014-06-10 Jakub Jelinek <jakub@redhat.com>
6971
6972 PR fortran/60928
6973 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6974 (omp_pragmas): ... back here.
6975
742938c9
MP
69762014-06-05 Marek Polacek <polacek@redhat.com>
6977
6978 PR c/49706
6979 * c-common.c (warn_logical_not_parentheses): New function.
6980 * c-common.h (warn_logical_not_parentheses): Declare.
6981 * c.opt (Wlogical-not-parentheses): New option.
6982
9d548dfb
MP
69832014-06-04 Marek Polacek <polacek@redhat.com>
6984
6985 PR c/30020
6986 * c-common.c (check_case_bounds): Add location parameter.
6987 Use it.
6988 (c_add_case_label): Pass loc to check_case_bounds.
6989
fedfecef
MP
69902014-06-03 Marek Polacek <polacek@redhat.com>
6991
6992 PR c/60439
6993 * c.opt (Wswitch-bool): New option.
6994
f6a7cffc
TS
69952014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6996
040d18b6
TS
6997 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6998 Remove prototypes.
6999 (record_types_used_by_current_var_decl): Move prototype to where
7000 it belongs.
7001
f6a7cffc
TS
7002 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7003 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7004 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7005
632f2871
RS
70062014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
7007
7008 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
7009 * c-common.c (c_common_nodes_and_builtins): Don't initialize
7010 void_zero_node.
7011 * c-pretty-print.c (pp_c_void_constant): New function.
7012 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
7013 (c_pretty_printer::expression): Handle VOID_CST.
7014 * cilk.c (extract_free_variables): Likewise.
7015 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
7016 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
7017
766090c2
TS
70182014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7019
7020 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
7021 * c-pragma.c (push_alignment): Adjust.
7022 (handle_pragma_push_options): Likewise.
7023
661a0813
MP
70242014-05-09 Marek Polacek <polacek@redhat.com>
7025
7026 PR c/50459
7027 * c-common.c (check_user_alignment): Return -1 if alignment is error
7028 node.
7029 (handle_aligned_attribute): Don't call default_conversion on
7030 FUNCTION_DECLs.
7031 (handle_vector_size_attribute): Likewise.
7032 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
7033 (handle_sentinel_attribute): Call default_conversion and allow even
7034 integral types as an argument.
7035
2793eeab
MP
70362014-05-08 Marek Polacek <polacek@redhat.com>
7037
7038 PR c/61053
7039 * c-common.c (min_align_of_type): New function factored out from...
7040 (c_sizeof_or_alignof_type): ...here.
7041 * c-common.h (min_align_of_type): Declare.
7042
f827930a
MP
70432014-05-08 Marek Polacek <polacek@redhat.com>
7044
7045 PR c/61077
7046 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
7047 parameter type of main.
7048
ca49b74e
DD
70492014-05-07 DJ Delorie <dj@redhat.com>
7050
7051 * c-cppbuiltin.c (print_bits_of_hex): New.
7052 (builtin_define_type_minmax): Print values using hex so as not to
7053 require a pre-computed list of string values.
7054
1d60af08
KZ
70552014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7056 Mike Stump <mikestump@comcast.net>
7057 Richard Sandiford <rdsandiford@googlemail.com>
7058
7059 * c-ada-spec.c: Include wide-int.h.
7060 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
7061 (dump_generic_ada_node): Use wide-int interfaces.
7062 * c-common.c: Include wide-int-print.h.
7063 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
7064 (pointer_int_sum): Use wide-int interfaces.
7065 (c_common_nodes_and_builtins): Use make_int_cst.
7066 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
7067 (handle_alloc_size_attribute): Use wide-int interfaces.
7068 (get_nonnull_operand): Likewise.
7069 * c-format.c (get_constant): Use tree_fits_uhwi_p.
7070 * c-lex.c: Include wide-int.h.
7071 (narrowest_unsigned_type): Take a widest_int rather than two
7072 HOST_WIDE_INTs.
7073 (narrowest_signed_type): Likewise.
7074 (interpret_integer): Update accordingly. Use wide-int interfaces.
7075 (lex_charconst): Use wide-int interfaces.
7076 * c-pretty-print.c: Include wide-int.h.
7077 (pp_c_integer_constant): Use wide-int interfaces.
7078 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
7079 INT_CST_LT_UNSIGNED.
7080
b15458be
RB
70812014-05-06 Richard Biener <rguenther@suse.de>
7082
7083 * c-opts.c (c_common_post_options): For -freestanding,
7084 -fno-hosted and -fno-builtin disable pattern recognition
7085 if not enabled explicitely.
7086
6577374e
MP
70872014-05-02 Marek Polacek <polacek@redhat.com>
7088
7089 * c.opt (Wsizeof-pointer-memaccess): Describe option.
7090
d00887e8
MP
70912014-05-01 Marek Polacek <polacek@redhat.com>
7092
7093 PR c/43245
7094 * c.opt (Wdiscarded-qualifiers): Add.
7095
f8ed5150
MP
70962014-04-30 Marek Polacek <polacek@redhat.com>
7097
7098 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
7099 INT_MIN / -1 sanitization only for integer types.
7100
45484dcf
MP
71012014-04-25 Marek Polacek <polacek@redhat.com>
7102
7103 PR c/18079
7104 * c-common.c (handle_noinline_attribute): Warn if the attribute
7105 conflicts with always_inline attribute.
7106 (handle_always_inline_attribute): Warn if the attribute conflicts
7107 with noinline attribute.
7108
38e514c0
MP
71092014-04-25 Marek Polacek <polacek@redhat.com>
7110
7111 PR c/60156
7112 * c-common.c (check_main_parameter_types): Warn about variadic main.
7113
44875f92
MS
71142014-04-24 Mike Stump <mikestump@comcast.net>
7115
7116 * c.opt (Wshadow-ivar): Default to on.
7117
dcaaa5a0
DP
71182014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
7119
7120 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
7121
c07d7c02
MP
71222014-04-23 Marek Polacek <polacek@redhat.com>
7123
7124 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
7125
1c33c9b7
JJ
71262014-04-22 Jakub Jelinek <jakub@redhat.com>
7127
7128 PR sanitizer/60275
7129 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
7130 if flag_sanitize_undefined_trap_on_error.
7131 (ubsan_instrument_division, ubsan_instrument_shift,
7132 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
7133 if !flag_sanitize_recover.
7134
793c625f
MG
71352014-04-22 Marc Glisse <marc.glisse@inria.fr>
7136
7137 PR libstdc++/43622
7138 * c-common.c (registered_builtin_types): Make non-static.
7139 * c-common.h (registered_builtin_types): Declare.
7140
b0f1bf36 71412014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 7142 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
7143
7144 PR c/60819
7145 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
7146 apply may-alias the scalar pointer type when applicable.
7147
3b07fa4a
IZ
71482014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
7149
7150 PR middle-end/60467
7151 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
7152 as possible argument for Cilk_spawn.
7153
cbbd2b1c
TB
71542014-04-11 Tobias Burnus <burnus@net-b.de>
7155
7156 PR c/60194
7157 * c.opt (Wformat-signedness): Add
7158 * c-format.c(check_format_types): Use it.
7159
6415bd5d
JM
71602014-04-11 Jason Merrill <jason@redhat.com>
7161
7162 PR c++/57926
7163 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
7164 default_conversion for an array argument.
7165
6525783a
MP
71662014-04-08 Marek Polacek <polacek@redhat.com>
7167
7168 PR sanitizer/60745
7169 * c-ubsan.c: Include asan.h.
7170 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
7171
880a467b
NS
71722014-04-03 Nathan Sidwell <nathan@codesourcery.com>
7173
7174 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
7175
7b59ff2d
MP
71762014-04-02 Marek Polacek <polacek@redhat.com>
7177
7178 * c-common.h (c_expand_expr): Remove declaration.
7179
8edbfaa6
JJ
71802014-03-28 Jakub Jelinek <jakub@redhat.com>
7181
7182 PR c++/60689
7183 * c-common.c (add_atomic_size_parameter): When creating new
7184 params vector, push the size argument first.
7185
07d72e1d
JJ
71862014-03-26 Jakub Jelinek <jakub@redhat.com>
7187
7188 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
7189 ubsan_instrument_vla, ubsan_instrument_return): Adjust
7190 ubsan_create_data callers.
7191
b35e0fa0
JJ
71922014-03-22 Jakub Jelinek <jakub@redhat.com>
7193
7194 PR debug/60603
7195 * c-opts.c (c_finish_options): Restore cb_file_change call to
7196 <built-in>.
7197
39a1ebb3
JJ
71982014-03-13 Jakub Jelinek <jakub@redhat.com>
7199
7200 PR middle-end/36282
7201 * c-pragma.c (apply_pragma_weak): Only look at
7202 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
7203 DECL_ASSEMBLER_NAME_SET_P (decl).
7204 (maybe_apply_pending_pragma_weaks): Exit early if
7205 vec_safe_is_empty (pending_weaks) rather than only when
7206 !pending_weaks.
7207 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
7208 set assembler name back to NULL afterwards.
7209
a07f6ed2
JM
72102014-03-11 Jason Merrill <jason@redhat.com>
7211
7212 * c.opt: Add -std=gnu++14.
7213
75b107f5
IB
72142014-03-11 Ian Bolton <ian.bolton@arm.com>
7215
7216 * c-opts.c (c_common_post_options): Don't override
7217 -ffp-contract=fast if unsafe-math-optimizations is on.
7218
f42c637e
PM
72192014-03-08 Paulo Matos <paulo@matos-sorge.com>
7220
22b15758 7221 * c.opt: Enable LTO FE for fshort-double.
f42c637e 7222
70e24808
JM
72232014-03-07 Jason Merrill <jason@redhat.com>
7224
7225 * c.opt: Add -std=c++14.
7226
3af9c5e9
MP
72272014-03-06 Marek Polacek <polacek@redhat.com>
7228
7229 PR c/60197
7230 * cilk.c (contains_cilk_spawn_stmt): New function.
7231 (contains_cilk_spawn_stmt_walker): Likewise.
7232 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
7233 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
7234
b3bdf019
JJ
72352014-03-03 Jakub Jelinek <jakub@redhat.com>
7236
7237 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
7238 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
7239 even when flag_preprocess_only.
7240
ca7e759d
JM
72412014-02-26 Jason Merrill <jason@redhat.com>
7242
7243 PR c++/59231
7244 PR c++/11586
7245 * c-common.c (shorten_compare): Don't check
7246 c_inhibit_evaluation_warnings.
7247
28e41874
JJ
72482014-02-19 Jakub Jelinek <jakub@redhat.com>
7249
cca615af
JJ
7250 PR c/37743
7251 * c-common.c (c_common_nodes_and_builtins): When initializing
7252 c_uint{16,32,64}_type_node, also set corresponding
7253 uint{16,32,64}_type_node to the same value.
7254
28e41874
JJ
7255 PR c++/60267
7256 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
7257 for PRAGMA_IVDEP if flag_preprocess_only.
7258
c2bf53a1
JJ
72592014-02-12 Jakub Jelinek <jakub@redhat.com>
7260
7261 PR c/60101
7262 * c-common.c (merge_tlist): If copy is true, call new_tlist,
7263 if false, add ADD itself, rather than vice versa.
7264 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
7265 copy. For SAVE_EXPR, only call merge_tlist once.
7266
8fcbce72
JJ
72672014-02-08 Jakub Jelinek <jakub@redhat.com>
7268
7269 PR middle-end/60092
7270 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
7271 and tree_to_uhwi.
7272 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
7273 functions.
7274 (c_common_attribute_table): Add alloc_align and assume_aligned
7275 attributes.
7276
0a756a3f
MP
72772014-02-06 Marek Polacek <polacek@redhat.com>
7278
7279 PR c/60087
7280 * c-common.c (warn_for_sign_compare): Call warning_at with location
7281 instead of warning.
7282
7ec4847a
MP
72832014-02-05 Marek Polacek <polacek@redhat.com>
7284
7285 PR c/53123
7286 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
7287 statement.
7288
66f20604
MP
72892014-02-04 Marek Polacek <polacek@redhat.com>
7290
7291 PR c/60036
7292 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
7293 SAVE_EXPR.
7294
5d77fb19
MG
72952014-02-03 Marc Glisse <marc.glisse@inria.fr>
7296
7297 PR c++/53017
7298 PR c++/59211
7299 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
7300 handle_vector_size_attribute, handle_nonnull_attribute): Call
7301 default_conversion on the attribute argument.
7302 (handle_nonnull_attribute): Increment the argument number.
7303
81e5eca8
MP
73042014-01-31 Marek Polacek <polacek@redhat.com>
7305
7306 PR c/59963
7307 * c-common.c (add_atomic_size_parameter): Pass vNULL to
7308 build_function_call_vec.
7309 (resolve_overloaded_builtin): Likewise.
7310 * c-common.h (build_function_call_vec): Adjust declaration.
7311
68fca595
MP
73122014-01-30 Marek Polacek <polacek@redhat.com>
7313
7314 PR c/59940
7315 * c-common.h (unsafe_conversion_p): Adjust declaration.
7316 (warnings_for_convert_and_check): Likewise.
7317 (convert_and_check): Likewise.
7318 * c-common.c (unsafe_conversion_p): Add location parameter. Call
7319 expansion_point_location_if_in_system_header on it.
7320 (warnings_for_convert_and_check): Add location parameter. Call
7321 expansion_point_location_if_in_system_header on it. Use it.
7322 (convert_and_check): Add location parameter. Use it.
7323 (conversion_warning): Likewise.
7324 (c_add_case_label): Adjust convert_and_check calls.
7325 (scalar_to_vector): Adjust unsafe_conversion_p calls.
7326
b72271b9
BI
73272014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
7328
7329 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
7330 flag_cilkplus.
7331 * c-pragma.c (init_pragma): Likewise.
7332 * c.opt: Likewise.
7333
393e8e8b
MP
73342014-01-23 Marek Polacek <polacek@redhat.com>
7335
7336 PR c/59846
7337 * c-common.c (shorten_compare): Add location_t parameter.
7338 * c-common.h (shorten_binary_op): Adjust declaration.
7339
f04dda30
MP
73402014-01-23 Marek Polacek <polacek@redhat.com>
7341
7342 PR c/58346
7343 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
7344 * c-common.h: Declare it.
7345
621955cb
EB
73462014-01-20 Eric Botcazou <ebotcazou@adacore.com>
7347
7348 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
7349 * c-ada-spec.c (dump_ads): Likewise.
7350 (cpp_check): Likewise.
7351 (dump_ada_specs): Likewise.
7352
73532014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
7354
7355 PR c++/49718
7356 * c-common.c (handle_no_instrument_function_attribute): Allow
7357 no_instrument_function attribute in class member
7358 definition/declaration.
7359
241f845a
JJ
73602014-01-15 Jakub Jelinek <jakub@redhat.com>
7361
7362 PR c/58943
7363 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
7364 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
7365 being COMPOUND_EXPR.
7366 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
7367 operand a SAVE_EXPR and second MODIFY_EXPR.
7368
e83b8e2e
JJ
73692014-01-09 Jakub Jelinek <jakub@redhat.com>
7370
7371 PR target/58115
7372 * c-pch.c (c_common_write_pch): Call
7373 prepare_target_option_nodes_for_pch.
7374
23a5b65a
RS
73752014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7376
7377 Update copyright years
7378
f9030485
RS
73792014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
7380
7381 * array-notation-common.c, c-cilkplus.c: Use the standard form for
7382 the copyright notice.
7383
f2aa696b
EB
73842013-12-28 Eric Botcazou <ebotcazou@adacore.com>
7385
7386 * c-ada-spec.c (print_constructor): New function.
7387 (print_destructor): Retrieve the origin of the destructor.
7388 (print_ada_declaration): Revamp handling of constructors/destructors.
7389
3f8257db 73902013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
7391 Bill Maddox <maddox@google.com>
7392 Jason Merrill <jason@redhat.com>
7393
7394 * c.opt: Add -fdeclone-ctor-dtor.
7395 * c-opts.c (c_common_post_options): Default to on iff -Os.
7396
41958c28
BI
73972013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
7398
7399 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7400 attribute.
7401 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7402 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7403 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7404 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7405 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7406 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7407 PRAGMA_CILK_CLAUSE_UNIFORM.
7408
b1726d6c 7409
12893402
BI
74102013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7411
7412 * cilk.c (cilk_outline): Made this function non-static.
7413 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7414 (create_cilk_wrapper): Added a new parameter: a function pointer.
7415 (c_install_body_w_frame_cleanup): Remove
7416 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7417 * c-common.h (cilk_outline): New prototype.
7418 (gimplify_cilk_spawn): Removed two parameters.
7419 (cilk_install_body_with_frame_cleanup): New prototype.
7420 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7421 CILK_SPAWN_STMT case.
7422
085b42ed
BS
74232013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7424
2ce064c3
BS
7425 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7426
085b42ed
BS
7427 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7428 (int_array_type_node): Remove.
7429 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7430
9e36c9ed
MP
74312013-12-05 Marek Polacek <polacek@redhat.com>
7432
7433 PR c/52023
7434 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7435 [ADJUST_FIELD_ALIGN].
7436
296674db
JM
74372013-12-04 Joseph Myers <joseph@codesourcery.com>
7438
7439 PR c/52023
7440 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7441 and check field alignment if set.
7442 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7443 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7444
b1726d6c 74452013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7446 Marek Polacek <polacek@redhat.com>
7447
7448 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7449 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7450
d7947e19
L
74512013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7452
7453 PR c/59309
7454 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7455 arguments.
7456
fad7652e
JJ
74572013-11-29 Jakub Jelinek <jakub@redhat.com>
7458
7459 PR c/59280
7460 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7461 goto invalid. If it is error_mark_node, don't issue further
7462 diagnostics.
7463
8b5e1202
SO
74642013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7465
7466 * c.opt (Wopenmp-simd): New.
7467
0a508bb6
JJ
74682013-11-22 Jakub Jelinek <jakub@redhat.com>
7469
7470 * c-ubsan.h (ubsan_instrument_return): New prototype.
7471 * c-ubsan.c (ubsan_instrument_return): New function.
7472
2fb9a547
AM
74732013-11-22 Andrew MacLeod <amacleod@redhat.com>
7474
7475 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7476 * c-gimplify.c: Likewise.
7477 * cilk.c: Likewise.
2fb9a547 7478
8400e75e
DM
74792013-11-22 David Malcolm <dmalcolm@redhat.com>
7480
7481 * c-common.c (unsafe_conversion_p): Remove use of
7482 EXPR_LOC_OR_HERE macro.
7483 (conversion_warning): Likewise.
7484 (warnings_for_convert_and_check): Likewise.
7485 (warn_for_collisions_1): Likewise.
7486 (shorten_compare): Likewise, and remove use of in_system_header
7487 macro, using the location from the former.
7488 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7489 (cb_def_pragma): Remove use of in_system_header macro.
7490 (lex_string): Likewise.
7491 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7492
eb1ce453
KZ
74932013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7494 Mike Stump <mikestump@comcast.net>
7495 Richard Sandiford <rdsandiford@googlemail.com>
7496
7497 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7498 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7499 tree_fits_shwi_p or tree_fits_uhwi_p.
7500 (dump_generic_ada_node): Likewise.
7501 * c-format.c (check_format_arg): Likewise.
7502 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7503
6b3b8c27
KZ
75042013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7505
7506 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7507
49b0aa18
JC
75082013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7509
7510 PR c/53001
7511 * c-common.c (unsafe_conversion_p): Make this function
7512 return an enumeration with more detail.
7513 (conversion_warning): Use the new return type of
7514 unsafe_conversion_p to separately warn either about conversions
7515 that lower floating point number precision or about the other
7516 kinds of conversions.
7517 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7518 (unsafe_conversion_p): switching return type to
7519 conversion_safety enumeration.
49b0aa18
JC
7520 * c.opt: Adding new warning -Wfloat-conversion and
7521 enabling it with -Wconversion.
7522
b826515a
BS
75232013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7524
8e745a17
JJ
7525 * c-opts.c: Include plugin.h.
7526 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7527
b9a55b13
MP
75282013-11-19 Marek Polacek <polacek@redhat.com>
7529
7530 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7531 call.
7532 (ubsan_instrument_shift): Likewise.
7533 (ubsan_instrument_vla): Likewise.
7534
7d362f6c
RS
75352013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7536
7537 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7538 cast to unsigned type.
7539
386b1f1f
RS
75402013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7541
7542 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7543 tree_low_cst.
7544 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7545 rather than tree_low_cst.
7546
ae7e9ddd
RS
75472013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7548
7549 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7550 tree_to_uhwi throughout.
7551
9439e9a1
RS
75522013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7553
7554 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7555 tree_low_cst (..., 0) with tree_to_shwi throughout.
7556
cc269bb6
RS
75572013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7558
7559 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7560 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7561
9541ffee
RS
75622013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7563
7564 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7565 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7566
c02065fc
AH
75672013-11-15 Aldy Hernandez <aldyh@redhat.com>
7568
7569 * c-cilkplus.c: New file.
7570 * c-common.c (readonly_error): Add location argument.
7571 * c-common.h (readonly_error): Same.
7572 (c_finish_cilk_clauses): Protoize.
7573 (c_check_cilk_loop): Same.
7574 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7575 Do not fail on error_mark_node.
7576 Abstract increment canonicalization to here...
7577 (c_omp_for_incr_canonicalize_ptr): New.
7578 c-pragma.c (init_pragma): Register "simd" pragma.
7579 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7580 (enum pragma_cilk_clause): New.
7581
9cc65f15
RS
75822013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7583
7584 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7585 wchar_type and host_integerp checks.
7586
18f429e2
AM
75872013-11-14 Andrew MacLeod <amacleod@redhat.com>
7588
7589 * c-common.c: Likewise.
7590 * c-gimplify.c: Likewise.
7591 * cilk.c: Likewise.
7592
d8a2d370
DN
75932013-11-14 Diego Novillo <dnovillo@google.com>
7594
7595 * c-common.c: Include fold-const.h.
7596 Include stor-layout.h.
7597 Include calls.h.
7598 Include stringpool.h.
7599 Include attribs.h.
7600 Include varasm.h.
7601 Include trans-mem.h.
7602 * c-cppbuiltin.c: Include stor-layout.h.
7603 Include stringpool.h.
7604 * c-format.c: Include stringpool.h.
7605 * c-lex.c: Include stringpool.h.
7606 Include stor-layout.h.
7607 * c-pragma.c: Include stringpool.h.
7608 Include attribs.h.
7609 Include varasm.h.
7610 Include gcc-symtab.h.
7611 * c-pretty-print.c: Include stor-layout.h.
7612 Include attribs.h.
7613 * cilk.c: Include stringpool.h.
7614 Include calls.h.
7615
38b7bc7f
JM
76162013-11-13 Joseph Myers <joseph@codesourcery.com>
7617
7618 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7619 * c-common.c (c_common_reswords): Add __auto_type.
7620 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7621
45b0be94
AM
76222013-11-12 Andrew MacLeod <amacleod@redhat.com>
7623
18f429e2
AM
7624 * c-common.c: Include gimplify.h.
7625 * c-gimplify.c: Likewise.
7626 * cilk.c: Likewise.
7627 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7628 * c-ubsan.c: Don't include gimple.h.
45b0be94 7629
582d9b50
JM
76302013-11-12 Joseph Myers <joseph@codesourcery.com>
7631
7632 * c-common.c (c_common_reswords): Add _Thread_local.
7633
6b28e197
JM
76342013-11-09 Joseph Myers <joseph@codesourcery.com>
7635
7636 * c-common.c (atomic_size_supported_p): New function.
7637 (resolve_overloaded_atomic_exchange)
7638 (resolve_overloaded_atomic_compare_exchange)
7639 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7640 Use it instead of comparing size with a local list of sizes.
7641
267bac10
JM
76422013-11-07 Andrew MacLeod <amacleod@redhat.com>
7643 Joseph Myers <joseph@codesourcery.com>
7644
7645 * c-common.h (enum rid): Add RID_ATOMIC.
7646 * c-common.c (c_common_reswords): Add _Atomic.
7647 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7648 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7649 * c-format.c (check_format_types): Check for extra _Atomic
7650 qualifiers in format argument.
7651 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7652 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7653
5157b91e
TB
76542013-11-06 Tobias Burnus <burnus@net-b.de>
7655
7656 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7657
6dbe0958
JM
76582013-11-06 Joseph Myers <joseph@codesourcery.com>
7659
7660 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7661 standards modes.
7662 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7663 to mean lack of IEEE 754 support.
7664
e8ff5196
TB
76652013-11-05 Tobias Burnus <burnus@net-b.de>
7666
7667 * c.opt (-Wdate-time): New option
7668 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7669
254a0760
JM
76702013-11-05 Joseph Myers <joseph@codesourcery.com>
7671
7672 * c-cppbuiltin.c (cpp_iec_559_value): Test
7673 flag_excess_precision_cmdline not flag_excess_precision.
7674
6d7f7e0a
TB
76752013-11-05 Tobias Burnus <burnus@net-b.de>
7676
7677 * c.opt (fopenmp-simd): New option.
7678 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7679 (omp_pragmas): ... this new struct.
7680 (c_pp_lookup_pragma): Also walk omp_pragmas.
7681 (init_pragma): Init pragmas for -fopenmp-simd.
7682
55a7f02f
MP
76832013-11-04 Marek Polacek <polacek@redhat.com>
7684
7685 PR c++/58979
7686 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7687
9193fb05
JM
76882013-11-04 Joseph Myers <joseph@codesourcery.com>
7689
7690 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7691 New functions.
7692 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7693
94159ecf
EB
76942013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7695
7696 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7697 (dump_ada_specs): Adjust prototype of second callback.
7698 * c-ada-spec.c (cpp_check): New global variable.
7699 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7700 (print_generic_ada_decl): Likewise.
7701 (has_static_fields): Change return type to bool and add guard.
7702 (has_nontrivial_methods): New predicate.
7703 (is_tagged_type): Change return type to bool.
7704 (separate_class_package): Call has_nontrivial_methods.
7705 (pp_ada_tree_identifier): Minor tweaks.
7706 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7707 (dump_ada_array_domains): Likewise.
7708 (dump_ada_array_type): Likewise.
7709 (dump_template_types): Remove cpp_check parameter and do not pass it to
7710 dump_generic_ada_node.
7711 (dump_ada_template): Likewise.
7712 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7713 recursively.
7714 (print_ada_methods): Change return type to integer. Remove cpp_check
7715 parameter and do not pass it down.
7716 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7717 dump_generic_ada_node.
7718 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7719 accessing methods.
7720 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7721 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7722 value of print_ada_methods.
7723 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7724 Set cpp_check to it before invoking dump_ada_nodes.
7725 (dump_ada_specs): Likewise.
7726
b906f4ca
MP
77272013-11-03 Marek Polacek <polacek@redhat.com>
7728
7729 * c-ubsan.c: Don't include hash-table.h.
7730 (ubsan_instrument_vla): New function.
7731 * c-ubsan.h: Declare it.
7732
5e20cdc9
DM
77332013-10-31 David Malcolm <dmalcolm@redhat.com>
7734
7735 Automated part of renaming of symtab_node_base to symtab_node.
7736
7737 Patch autogenerated by rename_symtab.py from
7738 https://github.com/davidmalcolm/gcc-refactoring-scripts
7739 revision 58bb219cc090b2f4516a9297d868c245495ee622
7740
7741 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7742 symtab_node_base to symtab_node.
7743
7057e645
ESR
77442013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7745
8e745a17 7746 Implement C++14 digit separators.
7057e645
ESR
7747 * c-lex.c (interpret_float): Remove digit separators from scratch string
7748 before building real literal.
7749
193ea7bc
JJ
77502013-10-30 Jakub Jelinek <jakub@redhat.com>
7751
7752 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7753
939b37da
BI
77542013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7755
7756 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7757 fields.
7758 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7759 enabled.
7760 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7761 (insert_cilk_frame): New prototype.
7762 (cilk_init_builtins): Likewise.
7763 (gimplify_cilk_spawn): Likewise.
7764 (c_cilk_install_body_w_frame_cleanup): Likewise.
7765 (cilk_detect_spawn_and_unwrap): Likewise.
7766 (cilk_set_spawn_marker): Likewise.
7767 (build_cilk_sync): Likewise.
7768 (build_cilk_spawn): Likewise.
7769 * cilk.c: New file.
7770
67348ccc
DM
77712013-10-29 David Malcolm <dmalcolm@redhat.com>
7772
7773 Patch autogenerated by refactor_symtab.py from
7774 https://github.com/davidmalcolm/gcc-refactoring-scripts
7775 revision 58bb219cc090b2f4516a9297d868c245495ee622
7776
7777 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7778 to a true class hierarchy.
7779 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7780
d570872d
RS
77812013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7782
7783 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7784
98906124
JL
77852013-10-26 Jeff Law <law@redhat.com>
7786
adfac8df
JJ
7787 * c-common.c (c_define_builtins): Remove mudflap support.
7788 * c.opt: Ignore and warn for mudflap options.
98906124 7789
d73749df 77902013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7791
7792 PR other/33426
7793 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7794 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7795
3f04b1bb
JM
77962013-10-23 Jason Merrill <jason@redhat.com>
7797
7798 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7799
acf0174b
JJ
78002013-10-11 Jakub Jelinek <jakub@redhat.com>
7801
acd15a28
JJ
7802 * c-common.h (omp_clause_mask::operator !=): New method.
7803 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7804 instead of if (mask & something) tests everywhere.
7805
acf0174b
JJ
7806 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7807 201307 instead of 201107.
7808 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7809 (c_common_attribute_table): Add "omp declare target" and
7810 "omp declare simd" attributes.
7811 (handle_omp_declare_target_attribute,
7812 handle_omp_declare_simd_attribute): New functions.
7813 * c-omp.c: Include c-pragma.h.
7814 (c_finish_omp_taskgroup): New function.
7815 (c_finish_omp_atomic): Add swapped argument, if true,
7816 build the operation first with rhs, lhs arguments and use NOP_EXPR
7817 build_modify_expr.
7818 (c_finish_omp_for): Add code argument, pass it down to make_code.
7819 (c_omp_split_clauses): New function.
7820 (c_split_parallel_clauses): Removed.
7821 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7822 c_omp_declare_simd_clauses_to_decls): New functions.
7823 * c-common.h (omp_clause_mask): New type.
7824 (OMP_CLAUSE_MASK_1): Define.
7825 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7826 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7827 omp_clause_mask::operator |, omp_clause_mask::operator &,
7828 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7829 omp_clause_mask::operator ==): New methods.
7830 (enum c_omp_clause_split): New.
7831 (c_finish_omp_taskgroup): New prototype.
7832 (c_finish_omp_atomic): Add swapped argument.
7833 (c_finish_omp_for): Add code argument.
7834 (c_omp_split_clauses): New prototype.
7835 (c_split_parallel_clauses): Removed.
7836 (c_omp_declare_simd_clauses_to_numbers,
7837 c_omp_declare_simd_clauses_to_decls): New prototypes.
7838 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7839 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7840 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7841 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7842 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7843 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7844 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7845 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7846 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7847 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7848 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7849 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7850 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7851 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7852 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7853 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7854 PRAGMA_OMP_CLAUSE_UNIFORM.
7855
826cacfe
MG
78562013-10-09 Marc Glisse <marc.glisse@inria.fr>
7857
7858 PR tree-optimization/20318
7859 * c-common.c (handle_returns_nonnull_attribute): New function.
7860 (c_common_attribute_table): Add returns_nonnull.
7861
2284b034
MG
78622013-10-03 Marc Glisse <marc.glisse@inria.fr>
7863
7864 PR c++/19476
7865 * c.opt (fcheck-new): Move to common.opt.
7866
b56e9788
MP
78672013-09-25 Marek Polacek <polacek@redhat.com>
7868 Jakub Jelinek <jakub@redhat.com>
7869
7870 PR sanitizer/58413
7871 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7872 an expression if we can prove it is correct.
7873 (ubsan_instrument_division): Likewise. Remove unnecessary
7874 check.
7875
ce6923c5
MP
78762013-09-18 Marek Polacek <polacek@redhat.com>
7877
7878 PR sanitizer/58411
7879 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7880 Declare it.
7881 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7882
fb5610fb
IS
78832013-09-14 Iain Sandoe <iain@codesourcery.com>
7884
7885 PR target/48094
7886 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7887 fobjc-gc, freplace-objc-classes): Accept for LTO.
7888
88b0e79e
JC
78892013-09-13 Jacek Caban <jacek@codeweavers.com>
7890
7891 * c-target.def: New hook
7892
c9b0866a
PC
78932013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7894
7895 PR c++/43452
7896 * c.opt (Wdelete-incomplete): Add.
7897
0af94e6f
JR
78982013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7899
7900 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7901 (vector_types_compatible_elements_p): New function.
7902 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7903 declaration.
7904 (vector_types_compatible_elements_p): Declare.
7905
7c26172c
GDR
79062013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7907
7908 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7909 a virtual member function.
7910 (pp_simple_type_specifier): Remove.
7911 (pp_c_type_specifier): Likewise.
7912 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7913 Rename from pp_c_type_specifier. Adjust.
7914 (c_pretty_printer::c_pretty_printer): Do not assign to
7915 simple_type_specifier.
7916
20059c8b
GDR
79172013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7918
7919 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7920 member function.
7921 (c_pretty_printer::storage_class_specifier): Likewise.
7922 (c_pretty_printer::initializer): Likewise.
7923 (pp_declaration): Remove.
7924 (pp_declaration_specifiers): Likewise.
7925 (pp_abstract_declarator): Likewise.
7926 (pp_declarator): Likewise.
7927 (pp_type_id): Likewise.
7928 (pp_statement): Likewise.
7929 (pp_constant): Likewise.
7930 (pp_id_expression): Likewise.
7931 (pp_primary_expression): Likewise.
7932 (pp_unary_expression): Likewise.
7933 (pp_multiplicative_expression): Likewise.
7934 (pp_conditional_expression): Likewise.
7935 (pp_assignment_expression): Likewise.
7936 (pp_expression): Likewise.
7937 (pp_c_type_id): Likewise.
7938 (pp_c_storage_class_specifier): Likewise.
7939 * c-pretty-print.c (pp_c_type_cast): Tidy.
7940 (pp_c_pointer): Likewise.
7941 (pp_c_type_specifier): Likewise.
7942 (pp_c_parameter_type_list): Likewise.
7943 (pp_c_function_definition): Likewise.
7944 (pp_c_init_declarator): Likewise.
7945 (pp_c_initializer_list): Likewise.
7946 (pp_c_constructor_elts): Likewise.
7947 (c_pretty_printer::direct_abstract_declarator): Likewise.
7948 (c_pretty_printer::declaration_specifiers): Likewise.
7949 (c_pretty_printer::primary_expression): Likewise.
7950 (c_pretty_printer::postfix_expression): Likewise.
7951 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7952 (c_pretty_printer::storage_class_specifier): Rename from
7953 pp_c_storage_class_specifier.
7954 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7955 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7956 storage_class_specifier, initializer, offset_list, flags.
7957
de5a5fa1
MP
79582013-08-30 Marek Polacek <polacek@redhat.com>
7959
7960 * c-ubsan.c: New file.
7961 * c-ubsan.h: New file.
7962
8f0e4d72
GDR
79632013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7964
7965 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7966 member function.
7967 (c_pretty_printer::declaration_specifiers): Likewise.
7968 (c_pretty_printer::declarator): Likewise.
7969 (c_pretty_printer::abstract_declarator): Likewise.
7970 (c_pretty_printer::direct_abstract_declarator): Likewise.
7971 (c_pretty_printer::direct_declarator): Likewise.
7972 (c_pretty_printer::function_specifier): Likewise.
7973 (pp_declaration): Adjust.
7974 (pp_declaration_specifiers): Likewise.
7975 (pp_abstract_declarator): Likewise.
7976 (pp_direct_declarator): Likewise.
7977 (pp_function_specifier): Likewise.
7978 (pp_direct_abstract_declarator): Remove as unused.
7979 (pp_c_declaration): Remove.
7980 (pp_c_declaration_specifiers): Likewise.
7981 (pp_c_declarator): Likewise.
7982 (pp_c_direct_declarator): Likewise.
7983 (pp_c_function_specifier): Likewise.
7984 (pp_c_direct_abstract_declarator): Likewise.
7985 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7986 from pp_c_abstract_declarator. Adjust.
ab20d992 7987 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
7988 pp_c_direct_abstract_declarator. Adjust.
7989 (c_pretty_printer::function_specifier): Rename from
7990 pp_c_function_specifier. Adjust.
7991 (c_pretty_printer::declaration_specifiers): Rename from
7992 pp_c_declaration_specifiers. Adjust.
7993 (c_pretty_printer::direct_declarator): Rename from
7994 pp_c_direct_declarator. Adjust.
7995 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7996 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7997 (c_pretty_printer::c_pretty_printer): Do not assign to
7998 declaration, declaration_specifiers, declarator,
7999 direct_declarator, direct_abstract_declarator, function_specifier.
8000
00d34d3a
GDR
80012013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
8002
8003 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
8004 virtual member function.
8005 (c_pretty_printer::multiplicative_expression): Likewise.
8006 (c_pretty_printer::conditional_expression): Likewise.
8007 (c_pretty_printer::assignment_expression): Likewise.
8008 (c_pretty_printer::expression): Likewise.
8009 (pp_unary_expression): Adjust.
8010 (pp_multiplicative_expression): Likewise.
8011 (pp_assignment_expression): Likewise.
8012 (pp_conditional_expression): Likewise.
8013 (pp_expression): Likewise.
8014 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
8015 from pp_c_unary_expression. Adjust.
8016 (c_pretty_printer::multiplicative_expression): Rename from
8017 pp_c_multiplicative_expression. Adjust.
8018 (c_pretty_printer::conditional_expression): Rename from
8019 pp_c_conditional_expression. Adjust.
8020 (c_pretty_printer::assignment_expression): Rename from
8021 pp_c_assignment_expression. Adjust.
8022 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
8023 (c_pretty_printer::c_pretty_printer): Do not assign to
8024 unary_expression, multiplicative_expression,
8025 conditional_expression, expression.
8026
fb22178f
GDR
80272013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8028
8029 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
8030 virtual member function.
8031 (pp_postfix_expression): Adjust.
8032 (pp_c_postfix_expression): Remove.
8033 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
8034 from pp_c_postfix_expression. Adjust.
8035 (c_pretty_printer::c_pretty_printer): Do not assign to
8036 postfix_expression.
8037
7ecc2600
GDR
80382013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8039
8040 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
8041 virtua member function.
8042 (pp_primary_expression): Adjust.
8043 (pp_c_primary_expression): Remove.
8044 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
8045 from pp_c_primary_expression. Adjust.
8046 (pp_c_initializer_list): Use pp_primary_expression.
8047 (c_pretty_printer::c_pretty_printer): Do not assign to
8048 primary_expression.
8049
0691175f
GDR
80502013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
8051
8052 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
8053 * c-pretty-print.c (M_): Remove.
8054 (c_pretty_printer::translate_string): Define.
8055 (pp_c_type_specifier): Use it.
8056 (pp_c_primary_expression): Likewise.
8057 (pp_c_expression): Likewise.
8058
66dfe4c4
GDR
80592013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8060
8061 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
8062 virtual function.
8063 (pp_c_id_expression): Remove.
8064 (pp_id_expression): Adjust.
8065 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
8066 pp_c_id_expression. Adjust.
8067 (pp_c_postfix_expression): Use pp_id_expression.
8068 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
8069
ca43e9d5
GDR
80702013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
8071
8072 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
8073 member function.
8074 (pp_constant): Adjust.
8075 (pp_c_constant): Remove.
8076 * c-pretty-print.c (c_pretty_printer::constant): Rename from
8077 pp_c_constant. Adjust.
8078 (pp_c_constant)
8079 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
8080 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
8081
da6ca2b5
GDR
80822013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8083
8084 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
8085 (c_pretty_printer::c_pretty_printer): Declare.
8086 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
8087 c_pretty_printer_init. Adjust.
8088 (print_c_tree): Do not call c_pretty_printer_init.
8089 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
8090
65a372f4
AC
80912013-08-09 Arnaud Charlet <charlet@adacore.com>
8092
8093 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
8094
fd9b0f32
PC
80952013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
8096
8097 PR c++/58080
8098 * c-common.c (pointer_int_sum): Add bool parameter.
8099 * c-common.h (pointer_int_sum): Adjust declaration.
8100
e0aec1e9
GDR
81012013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
8102
8103 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
8104 c_pretty_printer variable.
8105
b066401f
GDR
81062013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
8107
8108 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
8109 (pp_base): Remove.
8110 (pp_c_base): Likewise. Adjust users.
8111 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
8112 (pp_c_whitespace): Do not call pp_base.
8113 (pp_c_left_paren): Likewise.
8114 (pp_c_right_paren): Likewise.
8115 (pp_c_left_brace): Likewise.
8116 (pp_c_right_brace): Likewise.
8117 (pp_c_left_bracket): Likewise.
8118 (pp_c_right_bracket): Likewise.
8119 (pp_c_dot): Likewise.
8120 (pp_c_ampersand): Likewise.
8121 (pp_c_star): Likewise.
8122 (pp_c_arrow): Likewise.
8123 (pp_c_semicolon): Likewise.
8124 (pp_c_complement): Likewise.
8125 (pp_c_exclamation): Likewise.
8126 (pp_c_direct_declarator): Likewise.
8127 (pp_c_ws_string): Likewise.
8128 (pp_c_identifier): Likewise.
8129 (pp_c_statement): Likewise.
8130 (print_c_tree): Likewise.
8131
65e5a578
ESR
81322013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
8133
8134 PR c++/58072
8135 * c-common.c (c_parse_error): Catch user-defined literal tokens and
8136 provide useful error strings.
8137
137a1a27
GDR
81382013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8139
8140 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
8141 printer functions instead of pp_string or operators and punctuators.
8142 (dump_generic_ada_node): Likewise.
8143 * c-pretty-print.c (pp_c_type_specifier): Likewise.
8144 (pp_c_relational_expression): Likewise.
8145 (pp_c_logical_or_expression): Likewise.
8146
07838b13
GDR
81472013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
8148
8149 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
8150 functions instead of pp_character.
8151 (pp_ada_tree_identifier): Likewise.
8152 (dump_ada_double_name): Likewise.
8153 (dump_ada_function_declaration): Likewise.
8154 (dump_ada_array_domains): Likewise.
8155 (dump_template_types): Likewise.
8156 (dump_generic_ada_node): Likewise.
8157 (print_ada_declaration): Likewise.
8158 (print_ada_struct_decl): Likewise.
8159 * c-pretty-print.c (pp_c_integer_constant): Likewise.
8160
433cc7b0
TT
81612013-07-23 Tom Tromey <tromey@redhat.com>
8162
8163 * c-common.h (enum rid) <RID_GENERIC>: New constant.
8164 * c-common.c (c_common_reswords): Add _Generic.
8165
688010ba
OB
81662013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
8167
8168 * c-common.c: Fix typos.
8169 * c-common.h: Likewise.
8170
2a99e5e6
LL
81712013-07-13 Lubos Lunak <l.lunak@suse.cz>
8172
8173 PR c++/55203
8174 * c-common.c (c_common_attribute_table): Add warn_unused.
8175 (handle_warn_unused_attribute): New.
8176
c26302d5
JJ
81772013-07-10 Jakub Jelinek <jakub@redhat.com>
8178
8179 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
8180 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
8181
dfeadaa0
PC
81822013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
8183
8184 PR c++/57869
8185 * c.opt: Add Wconditionally-supported.
8186
6a2fa4b2
GS
81872013-07-08 Graham Stott <graham.stott@btinternet.com>
8188
adfac8df 8189 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
8190 unused variables l_length and l_node.
8191
ecdbd01a 81922013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
8193
8194 PR c/57821
8195 * c-common.c (complete_array_type): Delay folding first index
8196 like other indices. When folding, check for index overflow.
8197
bedc293e
MG
81982013-06-27 Marc Glisse <marc.glisse@inria.fr>
8199
8200 PR c++/57509
8201 * c-common.h (c_build_vec_perm_expr): New complain argument.
8202 * c-common.c (c_build_vec_perm_expr): Likewise.
8203 Use save_expr also in C++.
8204
604b2bfc
GDR
82052013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
8206
8207 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
8208 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8209 * c-opts.c (c_common_post_options): Likewise.
8210
dfeadaa0 82112013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
8212
8213 * array-notation-common.c (length_mismatch_in_expr): Changed the
8214 parameter type's from a dynamic array to a vec_tree. Also removed
8215 the size parameters.
8216 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
8217 the change above.
8218
2ce86d2e
BI
82192013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
8220
8221 * c-common.h (struct cilkplus_an_parts): New structure.
8222 (struct cilkplus_an_loop_parts): Likewise.
8223 (cilkplus_extract_an_triplets): New prototype.
8224 (fix_sec_implicit_args): Likewise.
8225 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
8226 (fix_sec_implicit_args): Likewise.
604b2bfc 8227
07a6825b
BI
82282013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
8229
8230 * array-notation-common.c (find_inv_trees): Removed an unwanted
8231 typecasting.
8232 * c-common.h (struct inv_list::additional_tcodes): Changed type from
8233 enum rid to enum tree_code.
8234
08346abd
JH
82352013-06-11 Jan Hubicka <jh@suse.cz>
8236
8237 * c-common.c (handle_alias_ifunc_attribute): Do not set
8238 DECL_EXTERNAL for weakref variables.
8239 * c-pragma.c (handle_pragma_weak): Make sure aliases
8240 are not declared as external.
8241
d60f1706
BI
82422013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
8243
8244 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
8245 function from c/c-array-notation.c.
8246 (is_cilkplus_reduce_builtin): Likewise.
8247 (find_rank): Likewise.
8248 (extract_array_notation_exprs): Likewise.
8249 (replace_array_notations): Likewise.
8250 (find_inv_trees): Likewise.
8251 (replace_inv_trees): Likewise.
8252 (contains_array_notation_expr): Likewise.
8253 (find_correct_array_notation_type): Likewise.
8254 * c-common.h (struct inv_list): Moved this struct from the file
8255 c/c-array-notation.c and added a new field called additional tcodes.
8256 (length_mismatch_in_expr_p): New prototype.
8257 (is_cilkplus_reduce_builtin): Likewise.
8258 (find_rank): Likewise.
8259 (extract_array_notation_exprs): Likewise.
8260 (replace_array_notation): Likewise.
8261 (find_inv_trees): Likewise.
8262 (replace_inv_trees): Likewise.
8263 (find_correct_array_notation_type): Likewise.
dfeadaa0 8264
36536d79
BI
82652013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
8266
8267 * c-common.c (c_define_builtins): When cilkplus is enabled, the
8268 function array_notation_init_builtins is called.
8269 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
8270 * c-common.def (ARRAY_NOTATION_REF): New tree.
8271 * c-common.h (build_array_notation_expr): New function declaration.
8272 (build_array_notation_ref): Likewise.
8273 (extract_sec_implicit_index_arg): New extern declaration.
8274 (is_sec_implicit_index_fn): Likewise.
8275 (ARRAY_NOTATION_CHECK): New define.
8276 (ARRAY_NOTATION_ARRAY): Likewise.
8277 (ARRAY_NOTATION_START): Likewise.
8278 (ARRAY_NOTATION_LENGTH): Likewise.
8279 (ARRAY_NOTATION_STRIDE): Likewise.
8280 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
8281 ARRAY_NOTATION_REF.
8282 (pp_c_expression): Likewise.
8283 * c.opt (flag_enable_cilkplus): New flag.
8284 * array-notation-common.c: New file.
8285
f7716d57
JJ
82862013-05-14 Jakub Jelinek <jakub@redhat.com>
8287
8288 PR c++/57274
8289 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
8290
a5e0cd1d
MG
82912013-05-10 Marc Glisse <marc.glisse@inria.fr>
8292
8293 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
8294 vectors.
8295
f6bc1c4a
HS
82962013-05-07 Han Shen <shenhan@google.com>
8297
8298 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
8299
3f12f6e9
SKS
83002013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
8301
8302 * c-common.c (check_user_alignment): Emit error for negative values.
8303
61949153
PC
83042013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8305
8306 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
8307
e93e18e9
PC
83082013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8309
8310 * c-cppbuiltin.c (c_cpp_builtins): Do not define
8311 __GXX_EXPERIMENTAL_CXX1Y__.
8312
44d90fe1 83132013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 8314 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
8315
8316 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
8317 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
8318 to simply use OPT_Wpointer_arith.
8319 (c_sizeof_or_alignof_type): Likewise.
8320
13f39b2e
PC
83212013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8322
8323 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
8324
4b84d650
JJ
83252013-04-12 Jakub Jelinek <jakub@redhat.com>
8326
8327 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
8328 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
8329 specifiers.
8330
fb037b5d
SB
83312013-04-07 Steven Bosscher <steven@gcc.gnu.org>
8332
8333 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
8334
4e856798
PC
83352013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
8336
8337 * c-common.c (pointer_int_sum): Remove dead code.
8338
4b1baac8
RS
83392013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
8340
8341 PR middle-end/56524
8342 * c-common.c (handle_optimize_attribute): Don't call
8343 save_optabs_if_changed.
8344
0b50e654
JJ
83452013-03-05 Jakub Jelinek <jakub@redhat.com>
8346
8347 PR middle-end/56461
8348 * c-pch.c (pch_init): Free target_validity at the end.
8349
48c41403
JJ
83502013-03-04 Jakub Jelinek <jakub@redhat.com>
8351
8352 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
8353
e664c61c
KS
83542013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
8355 Jakub Jelinek <jakub@redhat.com>
8356
8357 PR sanitizer/56454
8358 * c-common.c (handle_no_sanitize_address_attribute): New function.
8359 (c_common_attribute_table): Add no_sanitize_address attribute.
8360 (handle_no_address_safety_analysis_attribute): Add
8361 no_sanitize_address attribute, not no_address_safety_analysis
8362 attribute.
8363
a475fd3d 83642013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
8365
8366 PR target/52555
8367 * c-common.c (handle_optimize_attribute): Call
8368 save_optabs_if_changed.
8369
f6007d99
JJ
83702013-02-18 Jakub Jelinek <jakub@redhat.com>
8371 Steven Bosscher <steven@gcc.gnu.org>
8372
8373 PR pch/54117
8374 * c-opts.c (c_common_post_options): If debug info is enabled
8375 and non-dwarf*, refuse to load PCH files and when writing PCH
8376 file warn.
8377
cf35e2b1
JJ
83782013-02-05 Jakub Jelinek <jakub@redhat.com>
8379
8380 PR middle-end/56167
8381 * c-common.c (handle_error_attribute): Fix condition.
8382
32887460
JJ
83832013-01-30 Jakub Jelinek <jakub@redhat.com>
8384
8385 PR c++/55742
8386 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
8387
5af057d8
JM
83882013-01-18 Jason Merrill <jason@redhat.com>
8389
8390 PR target/54908
8391 * c.opt (-fextern-tls-init): New.
8392 * c-opts.c (c_common_post_options): Handle it.
8393
cc83c823
JJ
83942013-01-09 Jakub Jelinek <jakub@redhat.com>
8395
8396 PR c/48418
8397 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
8398 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8399 and is either negative or bigger or equal to type precision
8400 of the first operand.
8401
a859517f
MP
84022012-12-03 Marek Polacek <polacek@redhat.com>
8403
8404 PR c/55570
8405 * c-common.c (check_user_alignment): Swap order of tests,
8406 check TREE_CODE first.
8407
2d7aa578
ESR
84082012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8409
8410 PR c++/52654
8411 * c-common.h (overflow_type): New enum.
8412 (build_userdef_literal): Add overflow_type argument.
8413 (tree_userdef_literal): Add overflow_type.
8414 (USERDEF_LITERAL_OVERFLOW): New access macro.
8415 * c-common.c (build_userdef_literal): Add overflow_type
8416 argument.
8417 * c-lex.c (c_lex_with_flags): Add overflow_type to
8418 build_userdef_literal calls.
8419 (interpret_integer, interpret_float): Add overflow_type argument.
8420
cc3c4f62
RB
84212012-11-28 Richard Biener <rguenther@suse.de>
8422
8423 PR c/35634
8424 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8425 here and use a type with proper overflow behavior for types that would
8426 need to be promoted for the arithmetic.
8427
77bc5132
JJ
84282012-11-23 Jakub Jelinek <jakub@redhat.com>
8429
8430 PR sanitizer/55435
8431 * c-common.c (handle_no_address_safety_analysis_attribute): New
8432 function.
8433 (c_common_attribute_table): Add no_address_safety_analysis.
8434
5dc99c46
SB
84352012-11-16 Simon Baldwin <simonb@google.com>
8436
8437 * c.opt: Add f[no-]canonical-system-headers.
8438 * c-opts.c (c_common_handle_option): Handle
8439 OPT_fcanonical_system_headers.
8440
a4a0016d
ESR
84412012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8442
8443 PR c++/54413
8444 * c-opts.c (c_common_handle_option): Set new flags.
8445 * c.opt: Describe new flags.
8446
7dbb85a7
JM
84472012-11-09 Jason Merrill <jason@redhat.com>
8448
8449 * c.opt (Wabi-tag): New.
8450
ad7bac31
AK
84512012-11-09 Andi Kleen <ak@linux.intel.com>
8452
8453 PR 55139
8454 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8455 MEMMODEL_MASK
ad7bac31 8456
7332899a
MLI
84572012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8458
8459 PR c/53063
8460 * c.opt (Wformat): Make it Alias Wformat=1.
8461 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8462 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8463 LangEnabledBy.
8464 (Wformat=): RejectNegative. Use LangEnabledBy.
8465 (Wnonnull): Use LangEnabledBy.
8466 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8467 * c-format.c (set_Wformat): Delete.
8468 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8469 (maybe_read_dollar_number): Likewise.
8470 (avoid_dollar_number): Likewise.
8471 (finish_dollar_format_checking): Likewise.
8472 (check_format_info): Likewise.
8473 (check_format_info_main): Likewise.
8474 (check_format_types): Likewise.
8475 (format_type_warning): Likewise.
8476 * c-common.c (int): Likewise.
8477 (check_function_sentinel): Likewise.
8e745a17 8478 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8479
34a180a6
MLI
84802012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8481
8482 PR c/53063
8483 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8484 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8485 Use LangEnabledBy.
8486 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8487 common.opt.
8488 (Wvariadic-macros): Init(1).
8489 * c-opts.c (c_common_handle_option): Do not handle them
8490 explicitly.
8491 (c_common_post_options): Likewise.
8492 (sanitize_cpp_opts): warn_unused_macros is now
8493 cpp_warn_unused_macros.
8494 (push_command_line_include): Likewise.
8495 * c-common.c (warn_unknown_pragmas): Do not define.
8496 * c-common.h (warn_unknown_pragmas): Do not declare.
8497
3f46d6a5
MLI
84982012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8499
8500 PR c/51294
8501 * c-common.c (conversion_warning): Handle conditional expressions.
8502
880661a4
JW
85032012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8504
8505 PR c++/54930
8506 * c.opt (Wreturn_local_addr): Define new option.
8507
4514a96b
JM
85082012-10-25 Jason Merrill <jason@redhat.com>
8509
f14edc1a
JM
8510 * c.opt (Wvirtual-move-assign): New.
8511
4514a96b
JM
8512 * c.opt (Winherited-variadic-ctor): New.
8513
93100c6b
MG
85142012-10-25 Marc Glisse <marc.glisse@inria.fr>
8515
8516 PR c++/54427
8517 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8518
1efcb8c6
JM
85192012-10-23 Joseph Myers <joseph@codesourcery.com>
8520
8521 * c-common.h (pch_cpp_save_state): Declare.
8522 * c-target.def (c_preinclude): New hook.
8523 * c-opts.c (done_preinclude): New.
8524 (push_command_line_include): Handle default preincluded header.
8525 (cb_file_change): Call pch_cpp_save_state when calling
8526 push_command_line_include.
8527 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8528 (pch_cpp_save_state): New.
8529 (pch_init): Call pch_cpp_save_state conditionally, instead of
8530 calling cpp_save_state.
8531
4a0ae68e
MLI
85322012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8533
8534 PR c/53063
8535 PR c/40989
8536 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8537 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8538 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8539 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8540 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8541 * c-opts.c (c_common_handle_option): Remove explicit handling from
8542 here.
8543 (c_common_post_options): Likewise.
8544
67e4210b
EB
85452012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8546
8547 * c-ada-spec.c (LOCATION_COL): Delete.
8548 (compare_location): New function.
8549 (compare_node): Use it.
8550 (compare_comment): Likewise.
8551
65d4f2cd
MLI
85522012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8553
8554 PR c/53063
8555 PR c/40989
8556 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8557 * c-opts.c (c_common_handle_option): Do not set them here. Add
8558 comment.
8559 (c_common_post_options): Likewise.
8560
909881cb
EB
85612012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8562
8563 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8564 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8565 Remove POINTER_TYPE handling, add large unsigned handling and use
8566 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8567
3a785c97
JJ
85682012-10-12 Jakub Jelinek <jakub@redhat.com>
8569
8570 PR c/54381
8571 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8572 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8573 locs and array of 3 trees instead of just single loc and single
8574 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8575 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8576 For *cmp* builtins that take two sources strings report warnings
8577 about first and second source, not about destination and source.
8578
5e54f81d
MG
85792012-10-12 Marc Glisse <marc.glisse@inria.fr>
8580
8581 PR c++/53055
8582 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8583
f5b02f1e
EB
85842012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8585
8586 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8587 declaring something coming from another file.
8588
b46dbc6c
AC
85892012-10-10 Arnaud Charlet <charlet@adacore.com>
8590
f5b02f1e 8591 PR ada/54845
b46dbc6c
AC
8592 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8593
5d9de0d0
PC
85942012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8595
8596 PR c++/54194
8597 * c-common.c (warn_about_parentheses): Add location_t parameter;
8598 use EXPR_LOC_OR_LOC.
8599 * c-common.h: Update declaration.
8600
a212e43f
MG
86012012-10-09 Marc Glisse <marc.glisse@inria.fr>
8602
8603 PR c++/54427
8604 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8605 more operations. Make error messages optional.
8606 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8607 (scalar_to_vector): Declare.
8608
b1db7f91
JM
86092012-10-08 Jason Merrill <jason@redhat.com>
8610
8611 * c-common.c (c_common_reswords): Add thread_local.
8612
e28d52cf
DS
86132012-10-08 Dodji Seketeli <dodji@redhat.com>
8614
8615 PR c++/53528 C++11 attribute support
8616 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8617 new functions.
8618 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8619 static function.
8620 (handle_aligned_attribute): In choose strictest alignment
8621 among many. Use new check_cxx_fundamental_alignment_constraints.
8622 (handle_transparent_union_attribute): In c++11 attribute syntax,
8623 don't look through typedefs.
8624
3b78de56
AC
86252012-10-04 Arnaud Charlet <charlet@adacore.com>
8626
8627 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8628 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8629 out of dumpfile.h.
8630
6040bb5f
DC
86312012-09-25 Dehao Chen <dehao@google.com>
8632
8633 PR middle-end/54645
3b78de56 8634 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8635 map when read in the pch.
8636
3f8257db 86372012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8638
8639 * c-ada-spec.c: Style fixes.
8640
3f8257db 86412012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8642
8643 * c.opt (-fada-spec-parent): Define new command line switch.
8644 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8645 is specified, generate binding spec as a child of the specified unit.
8646
0ccb505d
PC
86472012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8648 Manuel López-Ibáñez <manu@gcc.gnu.org>
8649
8650 PR c++/53210
8651 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8652
c583af79
AC
86532012-08-23 Arnaud Charlet <charlet@adacore.com>
8654
8655 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8656 for pointers, and add missing Convention C pragma.
8657 (print_ada_struct_decl): Add missing aliased keyword.
8658 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8659
1a4049e7
JJ
86602012-08-17 Jakub Jelinek <jakub@redhat.com>
8661
8662 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8663 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8664 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8665 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8666 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8667
70b5e7dc
RG
86682012-08-10 Richard Guenther <rguenther@suse.de>
8669
8670 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8671
f8923f7e
SB
86722012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8673
8674 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8675 instead of separate pp_newline and pp_flush.
8676 (print_c_tree): Likewise.
8677
e45abe1f
RH
86782012-07-26 Richard Henderson <rth@redhat.com>
8679
8680 * c-common.c (handle_hot_attribute): Allow labels.
8681 (handle_cold_attribute): Likewise.
8682
332f1d24
JJ
86832012-07-20 Jakub Jelinek <jakub@redhat.com>
8684
8685 PR c++/28656
8686 * c-common.c (check_function_nonnull): Handle multiple nonnull
8687 attributes properly.
8688
7ee2468b
SB
86892012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8690
8691 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8692 * c-ada-spec.c: Likewise.
8693 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8694
ee7b28eb
SB
86952012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8696
8697 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8698 Remove code conditional on it.
8699
6bdf3519
SB
87002012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8701
8702 * c-gimplify.c: Do not include basic-block.h.
8703 * c-common.c: Do not include linfuncs.h.
8704
532aafad
SB
87052012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8706
8707 * c-common.h: Include tree.h.
8708
8d0d1915
JM
87092012-07-02 Jason Merrill <jason@redhat.com>
8710
8711 PR c++/53524
8712 * c-common.c (get_priority): Call default_conversion.
8713
fbc873ad
UB
87142012-07-01 Uros Bizjak <ubizjak@gmail.com>
8715
8716 * c-pch.c (c_common_write_pch): Remove unused variables.
8717
d4a10d0a
SB
87182012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8719
8720 * cppspec.c: Moved from gcc/ to here.
8721
6f3a2e23
KT
87222012-06-27 Kai Tietz <ktietz@redhat.com>
8723
8724 PR preprocessor/37215
8725 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8726
8ca92d04
SB
87272012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8728
8729 * c-common.h (c_common_print_pch_checksum): Remove.
8730 * c-pch.c: Do not include output.h.
8731 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8732 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8733 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8734 (struct c_pch_header): Remove.
8735 (get_ident): Update gpch version.
8736 (pch_init): Do not print executable_checksum to asm_out_file.
8737 Do not fail if there is no asm_out_file to read back from. Set
8738 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8739 (c_common_write_pch): Verify that nothing was written to asm_out_file
8740 since pch_init was called. Do not write a c_pch_header, and do not
8741 copy from asm_out_file to the PCH.
8742 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8743 the content of asm_out_file from the PCH.
8744 (c_common_print_pch_checksum): Remove.
8745 * c-opts.c (c_common_init): Print out executable_checksum directly.
8746
70f42967
SB
87472012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8748
8749 * c-target.def (objc_declare_unresolved_class_reference,
8750 objc_declare_class_definition): Add new hooks.
8751
a8781821
SB
87522012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8753
8754 * c-lex.c: Do not include output.h.
8755 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8756 Remove uses of ASM_OUTPUT_IDENT.
8757
9e1a8dd1
RR
87582012-06-15 Marc Glisse <marc.glisse@inria.fr>
8759
8760 PR c++/51033
8761 * c-common.h (c_build_vec_perm_expr): Move decl here.
8762 * c-common.c (c_build_vec_perm_expr): Move definition
8763 here.
8764
6f07a821
SB
87652012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8766
8767 * c.opt (fconserve-space): Turn into a no-op.
8768
9faeb493 87692012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8770
8771 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8772 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8773 both the start and end of the function.
8774
a4b7d13c
SB
87752012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8776
8777 * c-common.c: Do not include output.h.
8778 * c-pragma.c: Likewise.
8779
c265f413
SA
87802012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8781
8782 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8783 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8784 (lang_decl_name): Handle namespace decls.
8785
be7a421e
SB
87862012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8787
8788 * c-ada-spec.c: Do not include output.h.
8789 * c-semantics.c: Likewise.
8790
65de6659
JM
87912012-05-29 Joseph Myers <joseph@codesourcery.com>
8792
8793 * c-common.c: Fix typo.
8794
ca5f4331
MM
87952012-05-29 Michael Matz <matz@suse.de>
8796
8797 * c-common.h (c_expand_decl): Remove prototype.
8798
4f7f7aca
MLI
87992012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8800
8801 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8802 * c-opts.c (c_common_handle_option): Remove code handling
8803 warn_missing_braces.
8804
4a792f9b
PC
88052012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8806
8807 PR c++/25137
8808 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8809 -Wmissing_braces.
8810
650dc14a
DS
88112012-05-22 Dodji Seketeli <dodji@redhat.com>
8812
8813 PR c++/53322
8814 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8815
9b095bf1
MLI
88162012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8817
8818 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8819 * c-opts.c (c_common_handle_option): Do not handle explicitly
8820 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8821
0b2c4be5
DS
88222012-05-16 Dodji Seketeli <dodji@redhat.com>
8823
8824 PR preprocessor/7263
ab20d992 8825 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8826 to cpp_classify_number. For diagnostics, use the precise location
8827 instead of the global input_location.
8828
a1bde5af
PC
88292012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8830
d02924ef 8831 PR c++/11856
a1bde5af
PC
8832 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8833
d1ede5f4
BS
88342012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8835
a1bde5af 8836 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8837
f2bc201f
MLI
88382012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8839
8840 PR 53063
8841 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8842 Wreorder): Use LangEnabledBy.
8843 * c-opts.c (c_common_handle_option): Do not enable them
8844 explicitly. Call lang-specific generated functions.
8845 (c_common_post_options): Do not set them here.
8846
95744782
MLI
88472012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8848
8849 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8850 Wmissing-field-initializers,Wmissing-parameter-type,
8851 Wold-style-declaration,Woverride-init): Use EnabledBy.
8852 * c-opts.c (c_common_post_options): Do not set here explicitly.
8853
7d5a5747
MLI
88542012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8855
8856 PR 53063
8857 * c-opts.c (c_common_handle_option): Use handle_generated_option
8858 to enable sub-options.
8859
5a3c9cf2
PC
88602012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8861
8862 PR c++/53158
8863 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8864
3ac8781c
RG
88652012-05-10 Richard Guenther <rguenther@suse.de>
8866
8867 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8868 adjust commentary about TYPE_IS_SIZETYPE types.
8869
1e537948
MLI
88702012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8871
8872 PR c++/53261
8873 * c-common.c (warn_logical_operator): Check that argument of
8874 integer_zerop is not NULL.
8875
f2c4a785
MLI
88762012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8877
8878 PR c/43772
8879 * c-common.c (warn_logical_operator): Do not warn if either side
8880 is already true or false.
8881
50f305ca
MLI
88822012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8883
8884 PR c/51712
8885 * c-common.c (expr_original_type): New.
8886 (shorten_compare): Do not warn for enumeration types.
8887
0c3641b0
MLI
88882012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8889
8890 * c.opt (fpermissive): Add Var(flag_permissive).
8891
7edaa4d2
MG
88922012-04-30 Marc Glisse <marc.glisse@inria.fr>
8893
8894 PR c++/51033
8895 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8896 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8897
b9c8da34
DS
88982012-04-30 Dodji Seketeli <dodji@redhat.com>
8899
8900 Add -Wvarargs option
ab20d992 8901 * c.opt (Wvarargs): Define new option.
b9c8da34 8902
e6c69da0
MLI
89032012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8904
8905 * c-common.c (check_function_arguments): Replace
8906 Wmissing-format-attribute with Wsuggest-attribute=format.
8907
90137d8f
MLI
89082012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8909
8910 * c.opt (Wsuggest-attribute=format): New. Alias of
8911 Wmissing-format-attribute.
8912 * c-format.c (decode_format_type): Replace
8913 Wmissing-format-attribute with Wsuggest-attribute=format.
8914 (check_function_format): Likewise.
8915
9faeb493 89162012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8917
8918 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8919 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8920 * c.opt: Add Wliteral-suffix.
8921
c1771a20
MLI
89222012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8923
8924 PR c/44774
8925 * c.opt (Wpedantic): New.
8926 (pedantic): Alias Wpedantic.
8927 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8928 (c_common_post_options): Likewise.
8929 (sanitize_cpp_opts): Likewise.
8930 * c-lex.c (interpret_float): Likewise.
8931 * c-format.c (check_format_types): Likewise.
8932 * c-common.c (pointer_int_sum): Likewise.
8933 (c_sizeof_or_alignof_type): Likewise.
8934 (c_add_case_label): Likewise.
8935 (c_do_switch_warnings): Likewise.
8936 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8937
04b391c1
JM
89382012-04-15 Jason Merrill <jason@redhat.com>
8939
8940 PR c++/52818
8941 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8942 (C_STD_NAME): Distinguish between C++98 and C++11.
8943
ac868f29
EB
89442012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8945
8946 PR target/52624
8947 * c-common.h (uint16_type_node): Rename into...
8948 (c_uint16_type_node): ...this.
8949 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8950 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8951
fd4116f4
MLI
89522012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8953
8954 * c-common.c (warn_if_unused_value): Move definition to here.
8955 * c-common.h (warn_if_unused_value): Move declaration to here.
8956
573ac65e
WB
89572012-03-23 William Bader <williambader@hotmail.com>
8958
8959 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8960
552b8185
JM
89612012-03-20 Jason Merrill <jason@redhat.com>
8962
8963 * c-common.h (enum cxx_dialect): Add cxx1y.
8964 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8965 test.
8966 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8967 * c-opts.c (c_common_post_options): Likewise.
8968 (set_std_cxx1y): New.
8969 (c_common_handle_option): Call it.
8970 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8971
04398fa8
PC
89722012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8973
8974 PR c++/14710
8975 * c.opt ([Wuseless-cast]): Add.
8976
d2a12ae7
RG
89772012-03-16 Richard Guenther <rguenther@suse.de>
8978
8979 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8980
a12bf402
MLI
89812012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8982
8983 PR c++/44783
8984 * c.opt (ftemplate-backtrace-limit) Add.
8985
5c30094f
RO
89862012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8987
8988 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8989 handling.
8990 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8991 (init_pragma): Don't register extern_prefix.
8992
21fa2faf
RG
89932012-03-12 Richard Guenther <rguenther@suse.de>
8994
8995 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8996 (builtin_type_for_size): Likewise.
8997
e3793c6f
JJ
89982012-02-13 Jakub Jelinek <jakub@redhat.com>
8999
9000 PR c++/52215
9001 * c-common.c (sync_resolve_params): Don't decide whether to convert
9002 or not based on TYPE_SIZE comparison, convert whenever arg_type
9003 is unsigned INTEGER_TYPE.
9004
93286335
PC
90052012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
9006
9007 PR c/52118
9008 * c.opt ([Wunused-local-typedefs]): Fix description.
9009
7a421706
MS
90102012-01-24 Mike Stump <mikestump@comcast.net>
9011
9012 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
9013 exactly.
9014
ba9b1f11
RG
90152012-01-18 Richard Guenther <rguenther@suse.de>
9016
9017 * c-opts.c (c_common_post_options): Reset LTO flags if
9018 we are about to generate a PCH.
9019
465406be
PC
90202012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
9021
9022 PR c++/51777
9023 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
9024 use pp_unsigned_wide_integer.
9025
aee15221
RG
90262012-01-10 Richard Guenther <rguenther@suse.de>
9027
9028 PR middle-end/51806
9029 * c-opts.c (c_common_handle_option): Move -Werror handling
9030 to language independent code.
9031
5720c0dc
RG
90322012-01-05 Richard Guenther <rguenther@suse.de>
9033
9034 PR middle-end/51764
9035 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
9036 from common.opt.
9037
73ac190a
PC
90382011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
9039
9040 PR c++/51316
9041 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
9042 of array types with an unknown bound.
9043
48b0b196
JM
90442011-12-20 Joseph Myers <joseph@codesourcery.com>
9045
9046 * c-common.c (flag_isoc99): Update comment to refer to C11.
9047 (flag_isoc1x): Change to flag_isoc11.
9048 * c-common.h (flag_isoc99): Update comment to refer to C11.
9049 (flag_isoc1x): Change to flag_isoc11.
9050 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
9051 C11.
9052 * c-opts.c (set_std_c1x): Change to set_std_c11.
9053 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
9054 Call set_std_c11.
9055 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
9056 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
9057 * c.opt (std=c1x): Change to std=c11. Document as non-draft
9058 standard.
9059 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
9060 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
9061 (std=gnu1x): Make alias of std=gnu11.
9062
d58d6eb5
JM
90632011-12-19 Jason Merrill <jason@redhat.com>
9064
9065 PR c++/51228
9066 * c-common.c (handle_transparent_union_attribute): Check the first
9067 field if the type is complete.
9068
b3908fcc
JW
90692011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
9070
9071 PR libstdc++/51365
9072 * c-common.c (RID_IS_FINAL): Add.
9073 * c-common.h (RID_IS_FINAL): Add.
9074
fea3ca91
IS
90752011-11-30 Iain Sandoe <iains@gcc.gnu.org>
9076
9077 * c.opt (fgnu-runtime): Provide full description.
9078 (fnext-runtime): Likewise.
9079 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
9080
62bad7cd
AM
90812011-11-28 Andrew MacLeod <amacleod@redhat.com>
9082
9083 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
9084 predefines in one place. Add LOCK_FREE predefines.
9085 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
9086 new func.
9087
c466c4ff
AM
90882011-11-24 Andrew MacLeod <amacleod@redhat.com>
9089
9090 PR c/51256
9faeb493 9091 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 9092 conditions
9faeb493
UB
9093 (resolve_overloaded_atomic_exchange,
9094 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
9095 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
9096 error_mark_node for error conditions.
9faeb493 9097
a5952633
RG
90982011-11-08 Richard Guenther <rguenther@suse.de>
9099
9100 PR middle-end/51010
ab20d992 9101 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 9102
0a35513e
AH
91032011-11-07 Richard Henderson <rth@redhat.com>
9104 Aldy Hernandez <aldyh@redhat.com>
9105 Torvald Riegel <triegel@redhat.com>
9106
9107 Merged from transactional-memory.
9108
9109 * c-common.c (handle_tm_wrap_attribute,
9110 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
9111 (struct c_common_reswords): Added __transaction* keywords.
9112 (struct c_common_attribute_table): Added transaction* and tm_regparm
9113 attributes.
9114 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
9115 masks.
9116 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
9117 find_tm_attribute): Declare.
9118
6d87092d
JM
91192011-11-07 Jason Merrill <jason@redhat.com>
9120
9121 PR c++/35688
9122 * c-common.c, c-common.h: Revert yesterday's changes.
9123
8e7860a1
JM
91242011-11-06 Jason Merrill <jason@redhat.com>
9125
9126 PR c++/35688
9127 * c-common.c (decl_has_visibility_attr): Split out from...
9128 (c_determine_visibility): ...here.
9129 * c-common.h: Declare it.
9130
d19fa6b5
JM
91312011-11-06 Joseph Myers <joseph@codesourcery.com>
9132
9133 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
9134 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
9135 type.
9136 (check_user_alignment): New. Split out of
9137 handle_aligned_attribute. Disallow integer constants with
9138 noninteger types. Conditionally allow zero.
9139 (handle_aligned_attribute): Use check_user_alignment.
9140 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
9141
86951993
AM
91422011-11-06 Andrew MacLeod <amacleod@redhat.com>
9143 Richard Henderson <rth@redhat.com>
9144
9145 Merged from cxx-mem-model.
9146
9147 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 9148 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
9149 parameters that are the same type size.
9150 (get_atomic_generic_size): New. Find size of generic
9151 atomic function parameters and do typechecking.
9152 (add_atomic_size_parameter): New. Insert size into parameter list.
9153 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
9154 either __atomic_exchange_n or external library call.
9faeb493 9155 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 9156 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 9157 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
9158 __atomic_load_n or an external library call.
9159 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
9160 __atomic_store_n or an external library call.
9161 (resolve_overloaded_builtin): Handle new __atomic builtins.
9162
cf9e9959
EB
91632011-11-04 Eric Botcazou <ebotcazou@adacore.com>
9164
9165 PR c++/50608
9166 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
9167 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
9168 <INDIRECT_REF>: Return the argument.
9169 <ARRAY_REF>: Remove special code for negative offset.
9170 Call fold_build_pointer_plus instead of size_binop.
9171 (fold_offsetof): Remove STOP_REF argument and adjust.
9172 * c-common.h (fold_offsetof_1): Declare.
9173 (fold_offsetof): Remove STOP_REF argument.
9174
25339f10
JM
91752011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
9176
9177 PR c++/50810
9178 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9179 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9180 Wnarrowing for C++0x and C++98.
9181 * c.opt ([Wnarrowing]): Update.
9182
89401152
PC
91832011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
9184
9185 PR c++/44277
9186 * c.opt: Add Wzero-as-null-pointer-constant.
9187
97e3ad20
JM
91882011-10-31 Jason Merrill <jason@redhat.com>
9189
15694fdd
JM
9190 * c.opt (-fdeduce-init-list): Off by default.
9191
97e3ad20
JM
9192 PR c++/50920
9193 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
9194 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
9195 and -Wc++11-compat.
9196 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
9197
fb9120e3
RAV
91982011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
9199
9200 PR c++/30066
9201 * c.opt (fvisibility-inlines-hidden): Description change.
9202
3ce4f9e4
ESR
92032011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
9204
9205 Implement C++11 user-defined literals.
9206 * c-common.c (build_userdef_literal): New.
9207 * c-common.def: New tree code.
9208 * c-common.h (tree_userdef_literal): New tree struct and accessors.
9209 * c-lex.c (interpret_float): Add suffix parm.
9210 (c_lex_with_flags): Build literal tokens.
9211
5f53c243
PC
92122011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9213
9214 PR c++/50841
9215 Revert:
9216 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9217
9218 PR c++/50810
9219 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9220 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9221 Wnarrowing for C++0x and C++98.
9222 * c.opt ([Wnarrowing]): Update.
9223
263734e1
PC
92242011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
9225
9226 PR c++/50810
9227 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
9228 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
9229 Wnarrowing for C++0x and C++98.
9230 * c.opt ([Wnarrowing]): Update.
9231
d2e312d7
PC
92322011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
9233
9234 PR c++/45385
9235 * c-common.c (conversion_warning): Remove code looking for
9236 artificial operands.
9237
d17687f6
DS
92382011-10-18 Dodji Seketeli <dodji@redhat.com>
9239
9240 PR bootstrap/50760
9241 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 9242 !NO_IMPLICIT_EXTERN_C.
d17687f6 9243
fc8396e9
PC
92442011-10-17 Michael Spertus <mike_spertus@symantec.com>
9245
9246 * c-common.c (c_common_reswords): Add __bases,
9247 __direct_bases.
9248 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
9249
92502011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
9251
9252 PR c++/50757
9253 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
9254
847e697a
TT
92552011-10-15 Tom Tromey <tromey@redhat.com>
9256 Dodji Seketeli <dodji@redhat.com>
9257
9258 * c.opt (fdebug-cpp): New option.
9259 * c-opts.c (c_common_handle_option): Handle the option.
9260 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
9261 output stream in parameter. Factorized from ...
9262 (maybe_print_line): ... this. Dump location debug information when
9263 -fdebug-cpp is in effect.
9264 (print_line_1): New static function. Takes an output stream in
9265 parameter. Factorized from ...
9266 (print_line): ... here. Dump location information when -fdebug-cpp
9267 is in effect.
9268 (scan_translation_unit): Dump location information when
9269 -fdebug-cpp is in effect.
9270
92582b75
TT
92712011-10-15 Tom Tromey <tromey@redhat.com>
9272 Dodji Seketeli <dodji@redhat.com>
9273
9274 * c.opt (ftrack-macro-expansion): New option. Handle it with and
9275 without argument.
9276 * c-opts.c (c_common_handle_option)<case
9277 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
9278 cases. Handle -ftrack-macro-expansion with and without argument.
9279
46427374
TT
92802011-10-15 Tom Tromey <tromey@redhat.com>
9281 Dodji Seketeli <dodji@redhat.com>
9282
9283 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
9284 (print_line, cb_define, do_line_change): Adjust to avoid touching
9285 the internals of struct line_map. Use the public API instead.
9286 * c-pch.c (c_common_read_pch): Likewise.
9287 * c-lex.c (fe_file_change): Likewise.
9288
fc8396e9
PC
92892011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
9290
9291 PR c++/17212
9292 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
9293
92942011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
9295
9296 PR c++/33067
9297 * c-pretty-print.c (pp_c_floating_constant): Output
9298 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
9299
e79983f4
MM
93002011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
9301
9302 * c-common.c (def_builtin_1): Delete old interface with two
9303 parallel arrays to hold standard builtin declarations, and replace
9304 it with a function based interface that can support creating
9305 builtins on the fly in the future. Change all uses, and poison
9306 the old names. Make sure 0 is not a legitimate builtin index.
9307 * c-omp.c (c_finish_omp_barrier): Ditto.
9308 (c_finish_omp_taskwait): Ditto.
9309 (c_finish_omp_flush): Ditto.
9310
6637388f
TG
93112011-10-11 Tristan Gingold <gingold@adacore.com>
9312
9313 * c.opt: (fallow-parameterless-variadic-functions): New.
9314
3797cb21
DS
93152011-09-08 Dodji Seketeli <dodji@redhat.com>
9316
9317 PR c++/33255 - Support -Wunused-local-typedefs warning
9318 * c-common.h (struct c_language_function::local_typedefs): New
9319 field.
9faeb493
UB
9320 (record_locally_defined_typedef, maybe_record_typedef_use)
9321 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 9322 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
9323 (maybe_record_typedef_use)
9324 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
9325 * c.opt: Declare new -Wunused-local-typedefs flag.
9326
693ddb1b
EB
93272011-09-06 Eric Botcazou <ebotcazou@adacore.com>
9328
9329 PR middle-end/50266
9330 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
9331 computations.
9332
830c740f
RG
93332011-09-05 Richard Guenther <rguenther@suse.de>
9334
9335 * c-common.c (complete_array_type): Use ssize_int (-1) instead
9336 of integer_minus_one_node for empty array upper bounds.
9337
892a371f
DS
93382011-08-28 Dodji Seketeli <dodji@redhat.com>
9339
9340 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
9341 it's the first time it's being called on this main TU.
9342
0e3fdb48
RB
93432011-08-24 Richard Guenther <rguenther@suse.de>
9344
9345 PR c/49396
9346 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
9347
93482011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
9349
9350 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
9351 defined in cpp_init_builtins and c_cpp_builtins.
9352
d4a83c10
JM
93532011-08-19 Joseph Myers <joseph@codesourcery.com>
9354
9355 * c-common.c (c_common_reswords): Add __builtin_complex.
9356 * c-common.h (RID_BUILTIN_COMPLEX): New.
9357
bbceee64
JM
93582011-08-18 Joseph Myers <joseph@codesourcery.com>
9359
9360 * c-common.c (c_common_reswords): Add _Noreturn.
9361 (keyword_is_function_specifier): Handle RID_NORETURN.
9362 * c-common.h (RID_NORETURN): New.
9363
3f8257db 93642011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
9365
9366 * c-common.c (unsafe_conversion_p): New function. Check if it is
9367 unsafe to convert an expression to the type.
9368 (conversion_warning): Adjust, use unsafe_conversion_p.
9369 * c-common.h (unsafe_conversion_p): New function declaration.
9370
20906c66
JJ
93712011-08-02 Jakub Jelinek <jakub@redhat.com>
9372
9373 * c-common.h (c_finish_omp_atomic): Adjust prototype.
9374 (c_finish_omp_taskyield): New prototype.
9375 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
9376 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
9377 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
9378 or RHS1 have side-effects, evaluate those too in the right spot,
9379 if it is a decl and LHS is also a decl, error out if they
9380 aren't the same.
9381 (c_finish_omp_taskyield): New function.
9382 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
9383 * c-pragma.c (omp_pragmas): Add taskyield.
9384 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
9385 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
9386 PRAGMA_OMP_CLAUSE_MERGEABLE.
9387
770e5a2e
DS
93882011-07-25 Dodji Seketeli <dodji@redhat.com>
9389
9390 * c-common.h (set_underlying_type): Remove parm name from
9391 declaration.
9392
1baae426
RG
93932011-07-25 Romain Geissler <romain.geissler@gmail.com>
9394
9395 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 9396
fcb21722
JM
93972011-07-22 Jason Merrill <jason@redhat.com>
9398
76f86d00
JM
9399 PR c++/49793
9400 * c.opt (Wnarrowing): New.
9401
3a636414
JM
9402 PR c++/30112
9403 * c-common.h: Declare c_linkage_bindings.
9404 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9405
fcb21722
JM
9406 PR c++/49813
9407 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9408 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9409 as flag_isoc99 for 'restrict'.
9410 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9411
02614448
ILT
94122011-07-21 Ian Lance Taylor <iant@google.com>
9413
9414 PR middle-end/49705
9415 * c-common.c (c_disable_warnings): New static function.
9416 (c_enable_warnings): New static function.
9417 (c_fully_fold_internal): Change local unused_p to bool. Call
9418 c_disable_warnings and c_enable_warnings rather than change
9419 c_inhibit_evaluation_warnings.
9420
34429675
JM
94212011-07-20 Jason Merrill <jason@redhat.com>
9422
9423 PR c++/6709 (DR 743)
9424 PR c++/42603 (DR 950)
9425 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9426 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9427 (CPP_DECLTYPE): New.
9428 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9429
5d49b6a7
RG
94302011-07-19 Richard Guenther <rguenther@suse.de>
9431
9432 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9433 * c-omp.c (c_finish_omp_for): Likewise.
9434
e84a58ff
EB
94352011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9436
9437 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9438 body on the next line.
9439
329af3c7
JM
94402011-07-08 Jason Merrill <jason@redhat.com>
9441
4063e61b
JM
9442 PR c++/45437
9443 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9444
329af3c7
JM
9445 PR c++/49673
9446 * c-common.c (c_apply_type_quals_to_decl): Don't check
9447 TYPE_NEEDS_CONSTRUCTING.
9448
1a072294
RG
94492011-07-06 Richard Guenther <rguenther@suse.de>
9450
9451 * c-common.c (c_common_nodes_and_builtins):
9452 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9453
fce5dddd
RG
94542011-07-05 Richard Guenther <rguenther@suse.de>
9455
9456 * c-common.c (c_common_nodes_and_builtins): Build all common
9457 tree nodes first.
9458
45d439ac
JJ
94592011-06-27 Jakub Jelinek <jakub@redhat.com>
9460
56300785
JJ
9461 * c-common.h (c_tree_chain_next): New static inline function.
9462
45d439ac
JJ
9463 * c-common.c (check_builtin_function_arguments): Handle
9464 BUILT_IN_ASSUME_ALIGNED.
9465
e0a8ecf2
AM
94662011-06-21 Andrew MacLeod <amacleod@redhat.com>
9467
9468 * c-common.c: Add sync_ or SYNC__ to builtin names.
9469 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9470
94712011-06-20 Pierre Vittet <piervit@pvittet.com>
9472
9473 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9474 handler.
9475 (gen_pragma_handler): New union.
9476 (internal_pragma_handler): New type.
9477 (c_register_pragma_with_data)
9478 (c_register_pragma_with_expansion_and_data): New functions.
9479
9480 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9481 (c_register_pragma, c_register_pragma_with_expansion)
9482 (c_invoke_pragma_handler): Changed to work with
9483 internal_pragma_handler.
9484 (c_register_pragma_with_data)
9485 (c_register_pragma_with_expansion_and_data): New functions.
9486
677f3fa8
JM
94872011-06-14 Joseph Myers <joseph@codesourcery.com>
9488
9489 * c-common.c: Include common/common-target.h.
9490 (handle_section_attribute): Use
9491 targetm_common.have_named_sections.
9492 * c-cppbuiltin.c: Include common/common-target.h.
9493 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9494
d7fc8c14
RG
94952011-06-10 Richard Guenther <rguenther@suse.de>
9496
9497 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9498 to print a IDENTIFIER_NODE.
9499
10e48e39
RO
95002011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9501 Joseph Myers <joseph@codesourcery.com>
9502
9503 * c.opt (fbuilding-libgcc): New option.
9504 * c-cppbuiltin.c (c_cpp_builtins): Define
9505 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9506
6976ae51
JM
95072011-06-07 Jason Merrill <jason@redhat.com>
9508
3ff60975
JM
9509 * c-common.c (max_tinst_depth): Lower default to 900.
9510
6976ae51
JM
9511 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9512
009db074
RG
95132011-06-07 Richard Guenther <rguenther@suse.de>
9514
9515 * c-common.c (c_common_nodes_and_builtins): Do not set
9516 size_type_node or call set_sizetype.
9517
b4592b92
DS
95182011-06-07 Dodji Seketeli <dodji@redhat.com>
9519
9520 PR debug/49130
9521 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9522 type when using pointer comparison to compare types.
b4592b92 9523
014ab419
JW
95242011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9525
9526 * c.opt: Add -Wdelete-non-virtual-dtor.
9527 * c-opts.c (c_common_handle_option): Include it in -Wall.
9528
4f60111f
NF
95292011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9530
9531 PR bootstrap/49190
9532
9533 Revert:
9534 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9535
9536 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9537 not tree_common.
9538
4cc4f2f4
JJ
95392011-05-27 Jakub Jelinek <jakub@redhat.com>
9540
9541 PR c++/49165
9542 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9543 C++ don't call c_common_truthvalue_conversion on void type arms.
9544
38e01f9e
NF
95452011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9546
9547 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9548 (stmt_list_stack): Define.
9549 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9550 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9551
92e948a8
NF
95522011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9553
9554 * c-common.c (warning_candidate_p): Check for BLOCKs.
9555
a2fc3e63
NF
95562011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9557
9558 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9559 not tree_common.
9560
0957c029
JJ
95612011-05-25 Jakub Jelinek <jakub@redhat.com>
9562
9563 * c-common.c (def_fn_type): Remove extra va_end.
9564
828fb3ba
JM
95652011-05-23 Jason Merrill <jason@redhat.com>
9566
9567 PR c++/48106
9568 * c-common.c (c_common_get_narrower): New.
9569 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9570
dde05067
NF
95712011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9572
9573 * c-common.h (check_function_arguments): Tweak prototype of
9574 check_function_arguments.
9575 * c-common.c (check_function_arguments): Likewise. Adjust
9576 calls to check_function_nonnull, check_function_format, and
9577 check_function_sentinel.
9578 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9579 separate attributes and typelist arguments. Use
9580 FOREACH_FUNCTION_ARGS to iterate over argument types.
9581
3c0d13bf
PC
95822011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9583
9584 * c-common.c (c_common_reswords): Reorder.
9585 * c-common.h (rid): Likewise.
9586
8242dd04
NF
95872011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9588
9589 * c-common.c (def_fn_type): Don't call build_function_type, call
9590 build_function_type_array or build_varargs_function_type_array
9591 instead.
9592 (c_common_nodes_and_builtins): Likewise.
9593
3d528853
NF
95942011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9595
9596 * c-common.c (c_add_case_label): Omit the loc argument to
9597 build_case_label.
9598 * c-common.h (build_case_label): Remove.
9599 * c-semantics.c (build_case_label): Remove.
9600
a04a722b
JM
96012011-05-05 Joseph Myers <joseph@codesourcery.com>
9602
9603 * c-objc.h (objc_start_method_definition): Update prototype.
9604 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9605
e19a18d4
NF
96062011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9607
9608 * c-common.c (check_main_parameter_types): Reindent. Don't use
9609 TYPE_ARG_TYPES directly.
9610 (handle_nonnull_attribute): Likewise.
9611 (sync_resolve_params): Likewise.
9612 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9613 to check_format_string.
9614 (handle_format_attribute): Likewise.
9615 (check_format_string): Take a function type to examine instead of
9616 a type list. Use a function_arg_iterator to step through argument
9617 types.
9618
c62c040f
RG
96192011-05-04 Richard Guenther <rguenther@suse.de>
9620
9621 * c-common.c (fix_string_type): Use size_int for index type bounds.
9622 (start_fname_decls): Do not pass NULL to build_int_cst.
9623 (c_init_attributes): Likewise.
9624 * c-lex.c (c_lex_with_flags): Likewise.
9625
c12ff9d8
JM
96262011-04-27 Jason Merrill <jason@redhat.com>
9627
9628 * c-common.c (make_tree_vector_from_list): New.
9629 * c-common.h: Declare it.
9630
304dfbe3
RG
96312011-04-26 Richard Guenther <rguenther@suse.de>
9632
9633 PR preprocessor/48248
9634 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9635 for output size with -P.
9636
3c0d13bf
PC
96372011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9638
9639 * c-common.c (struct c_common_resword): Add __underlying_type.
9640 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9641
04695783
JM
96422011-04-20 Jim Meyering <meyering@redhat.com>
9643
9644 * c-format.c (init_dollar_format_checking): Remove useless
9645 if-before-free.
9646
0dc33c3c
NP
96472011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9648
9649 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9650 (objc_detect_field_duplicates): New.
0dc33c3c 9651 * stub-objc.c: Likewise.
3c0d13bf 9652
c59633d9
NP
96532011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9654
9655 * stub-objc.c (objc_declare_protocols): Renamed to
9656 objc_declare_protocol.
9657 * c-objc.h: Likewise.
3c0d13bf 9658
32dabdaf
NP
96592011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9660
9661 * stub-objc.c (objc_declare_class): Updated argument name.
9662
81f653d6
NF
96632011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9664
9665 * c-common.h (c_common_init_ts): Declare.
9666 * c-common.c (c_common_init_ts): Define.
9667
eb345401
NP
96682011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9669
9670 * c-objc.h (objc_build_message_expr): Updated prototype.
9671 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9672
a358e188
MJ
96732011-04-12 Martin Jambor <mjambor@suse.cz>
9674
9675 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9676 of cgraph_node.
9677
e6313a78
RG
96782011-04-11 Richard Guenther <rguenther@suse.de>
9679
9680 * c-common.c (complete_array_type): Build a range type of
9681 proper type.
9682
dcf0c47e
NF
96832011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9684
9685 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9686 (handle_type_generic_attribute): Likewise.
9687
1ee44b26
JM
96882011-04-07 Jason Merrill <jason@redhat.com>
9689
9690 PR c++/48450
9691 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9692 conversion from C++0x scoped enum.
9693
acce4e77
JM
96942011-04-06 Joseph Myers <joseph@codesourcery.com>
9695
9696 * c-target-def.h: New file.
9697 * c-target.def: New file.
9698 * c-target.h: New file.
9699 * c-common.c (targetcm): Don't define here.
9700 * c-common.h (default_handle_c_option): Declare.
9701 * c-format.c: Include c-target.h instead of target.h.
9702 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9703 include tm.h.
9704 (default_handle_c_option): Move from targhooks.c.
9705
e2eefb55
JJ
97062011-03-29 Jakub Jelinek <jakub@redhat.com>
9707
9708 PR preprocessor/48248
9709 * c-ppoutput.c (print): Add src_file field.
9710 (init_pp_output): Initialize it.
9711 (maybe_print_line): Don't optimize by adding up to 8 newlines
9712 if map->to_file and print.src_file are different file.
9713 (print_line): Update print.src_file.
9714
ba78087b
KT
97152011-03-25 Kai Tietz <ktietz@redhat.com>
9716
9717 * c-ada-spec.c (compare_comment): Use filename_cmp
9718 instead of strcmp for filename.
9719
0edf1bb2
JL
97202011-03-25 Jeff Law <law@redhat.com>
9721
adfac8df 9722 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9723
c7dc8804
JM
97242011-03-25 Jason Merrill <jason@redhat.com>
9725
9726 * c.opt: Add -std=c++03.
9727
d1d879b1
EB
97282011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9729
9730 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9731
3f8257db 97322011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9733
9734 PR target/12171
5050afdf
KT
9735 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9736 Display allowed attributes for function pointer types.
9737 (pp_c_attributes_display): New function to display
9738 attributes having affects_type_identity flag set to true.
9739 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9740
62d784f7
KT
9741 * c-common.c (c_common_attribute_table):
9742 Add new element.
9743 (c_common_format_attribute_table): Likewise.
9744
82d37118
JM
97452011-03-18 Jason Merrill <jason@redhat.com>
9746
49a000c3
JM
9747 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9748 * c-common.h: Don't declare it here.
9749 * c-common.c: Or define it here.
9750 * c-opts.c (c_common_handle_option): Or set it here.
9751
82d37118
JM
9752 PR c++/35315
9753 * c-common.c (handle_transparent_union_attribute): Don't
9754 make a duplicate type in C++.
9755
17bc631c
JM
97562011-03-15 Jason Merrill <jason@redhat.com>
9757
9758 * c-common.c (max_constexpr_depth): New.
9759 * c-common.h: Declare it.
9760 * c-opts.c (c_common_handle_option): Set it.
9761 * c.opt (fconstexpr-depth): New option.
9762
1b9b91a6
JM
97632011-03-11 Jason Merrill <jason@redhat.com>
9764
f231b5ff
JM
9765 * c-common.c (attribute_takes_identifier_p): Add missing const.
9766
1b9b91a6
JM
9767 PR c++/46803
9768 * c-common.c (attribute_takes_identifier_p): Assume that an
9769 unknown attribute takes an identifier.
9770
a19e4d44
NF
97712011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9772
9773 PR c/47786
9774 * c-common.c (c_type_hash): Call list_length instead of iterating
9775 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9776
982d62f6
JJ
97772011-02-19 Jakub Jelinek <jakub@redhat.com>
9778
9779 PR c/47809
9780 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9781
0a256240
NP
97822011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9783
9784 * c.opt (fobjc-abi-version=) New.
9785 (fobjc-nilcheck): New.
9786
ba9e6dd5
NF
97872011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9788
9789 PR c++/46890
9790 * c-common.h (keyword_is_decl_specifier): Declare.
9791 * c-common.c (keyword_is_decl_specifier): Define.
9792 (keyword_is_function_specifier): New function.
9793
7273813a
JJ
97942011-01-26 Jakub Jelinek <jakub@redhat.com>
9795
9796 PR c/47473
9797 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9798 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9799 REAL_TYPE.
9800
908ef79b
AC
98012011-01-26 Arnaud Charlet <charlet@adacore.com>
9802
9803 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9804
237e9384
JJ
98052011-01-26 Jakub Jelinek <jakub@redhat.com>
9806
9807 PR pch/47430
9808 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9809 after init_c_lex if pch_file is set.
9810
47ea1edf
DK
98112011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9812
d4dba752 9813 PR c++/43601
47ea1edf
DK
9814 * c.opt (-fkeep-inline-dllexport): New switch.
9815
2aa9c6ae
RG
98162011-01-12 Richard Guenther <rguenther@suse.de>
9817
9818 PR middle-end/32511
9819 * c-common.c (handle_weak_attribute): Warn instead of error
9820 on declaring an inline function weak.
9821
7bd11157
TT
98222011-01-05 Tom Tromey <tromey@redhat.com>
9823
9824 * c-common.h (lvalue_error): Update.
9825 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9826 not error.
9827
0e66e494 98282010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9829
b4f588c4
NP
9830 PR objc/47075
9831 * c-objc.h (objc_finish_message_expr): Added argument to
9832 prototype.
9833
f4da8dce
NF
98342010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9835
9836 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9837 Use prototype_p.
9838
46270f14
NP
98392010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9840
9841 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9842 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9843
4816c593
NF
98442010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9845
9846 * c-common.h (readonly_error): Declare.
9847 * c-common.c (readonly_error): Define.
9848
7a6daeb0
NF
98492010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9850
9851 * c-common.h (invalid_indirection_error): Declare.
9852 * c-common.c (invalid_indirection_error): Define.
9853
892f6119
RG
98542010-12-03 Richard Guenther <rguenther@suse.de>
9855
9856 PR c/46745
9857 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9858 (pp_c_unary_expression): Likewise.
9859 (pp_c_expression): Likewise.
9860
6c39e757
NP
98612010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9862
9863 * c-common.h (objc_finish_function): New.
9864 (objc_non_volatilized_type): Removed.
9865 (objc_type_quals_match): Removed.
9866 * stub-objc.c (objc_finish_function): New.
9867 (objc_non_volatilized_type): Removed.
9868 (objc_type_quals_match): Removed.
9faeb493 9869
7c475d11
JM
98702010-11-30 Joseph Myers <joseph@codesourcery.com>
9871
9872 * c-common.h (parse_optimize_options): Declare.
9873 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9874 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9875
71f3e391
JM
98762010-11-29 Joseph Myers <joseph@codesourcery.com>
9877
9878 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9879 GET_ENVIRONMENT.
9880 * c-pch.c (O_BINARY): Don't define here.
9881 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9882
d5fabb58
JM
98832010-11-25 Joseph Myers <joseph@codesourcery.com>
9884
9885 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9886 targetm.except_unwind_info.
9887
299404a1
JM
98882010-11-23 Joseph Myers <joseph@codesourcery.com>
9889
9890 * c-opts.c (c_common_handle_option): Pass location to
9891 set_struct_debug_option.
9892
c98cd5bf
JM
98932010-11-23 Joseph Myers <joseph@codesourcery.com>
9894
9895 * c-common.c (visibility_options): Move from ../opts.c.
9896 * c-common.h (struct visibility_flags, visibility_options):
9897 Declare here.
9898 * c-opts.c (finish_options): Rename to c_finish_options.
9899 (c_common_init): Update call to finish_options.
9900
a9546771
NP
99012010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9902
9903 PR objc/34033
9904 * c-lex.c (lex_string): Check that each string in an Objective-C
9905 string concat sequence starts with either one or zero '@', and
9906 that there are no spurious '@' signs at the end.
9907
24a57808
JM
99082010-11-20 Joseph Myers <joseph@codesourcery.com>
9909
9910 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9911 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9912 HANDLE_PRAGMA_VISIBILITY.
9913 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9914 HANDLE_PRAGMA_VISIBILITY): Don't define.
9915 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9916
a9aa2c3a
NF
99172010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9918
9919 PR c++/16189
9920 PR c++/36888
9921 PR c++/45331
9922 * c-common.h (keyword_begins_type_specifier): Declare.
9923 (keyword_is_storage_class_specifier): Declare.
9924 (keyword_is_type_qualifier): Declare.
9925 * c-common.c (keyword_begins_type_specifier): New function.
9926 (keyword_is_storage_class_specifier): New function.
9927 (keyword_is_type_qualifier): Declare.
9928
5386338c
JM
99292010-11-19 Joseph Myers <joseph@codesourcery.com>
9930
9931 PR c/46547
9932 * c-common.c (in_late_binary_op): Define.
9933 (c_common_truthvalue_conversion): Check in_late_binary_op before
9934 calling c_save_expr.
9935 * c-common.h (in_late_binary_op): Declare.
9936
69ccdddb
JM
99372010-11-19 Joseph Myers <joseph@codesourcery.com>
9938
9939 * c-opts.c (c_common_handle_option): Update calls to
9940 set_struct_debug_option.
9941
6b192a09
NP
99422010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9943
9944 * c-common.h (objc_declare_protocols): Added additional argument.
9945 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9946
fb52b50a
NF
99472010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9948
9949 PR c/33193
9950 * c-common.h (build_real_imag_expr): Declare.
9951 * c-semantics.c (build_real_imag_expr): Define.
9952
b37421c6
JM
99532010-11-17 Joseph Myers <joseph@codesourcery.com>
9954
9955 * c-opts.c (c_common_parse_file): Take no arguments.
9956 * c-common.h (c_common_parse_file): Update prototype.
9957
07078664
JJ
99582010-11-16 Jakub Jelinek <jakub@redhat.com>
9959
9960 PR c++/46401
9961 * c-common.c (warning_candidate_p): Don't track non-const calls
9962 or STRING_CSTs.
9963
c6a13190
ILT
99642010-11-15 Ian Lance Taylor <iant@google.com>
9965
9966 * c-lex.c (init_c_lex): Set macro debug callbacks if
9967 flag_dump_go_spec is set.
9968
925e8657
NP
99692010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9970
9971 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9972 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9973
bb0a9581
NF
99742010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9975
9976 PR preprocessor/45038
9977 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9978 dialects.
9979
c5fa0890
JM
99802010-11-12 Joseph Myers <joseph@codesourcery.com>
9981
9982 * c-common.h (c_family_lang_mask): Declare.
9983 * c-opts.c (c_family_lang_mask): Make extern.
9984 * c-pragma.c (handle_pragma_diagnostic): Use
9985 control_warning_option.
9986
a4d8c676
JM
99872010-11-12 Joseph Myers <joseph@codesourcery.com>
9988
9989 * c-common.c (parse_optimize_options): Update call to
9990 decode_options.
9991 * c-common.h (c_common_handle_option): Update prototype.
9992 * c-opts.c (c_common_handle_option): Take location_t parameter and
9993 pass it to other functions.
9994
f954bd2c
JM
99952010-11-11 Joseph Myers <joseph@codesourcery.com>
9996
9997 * c-opts.c (warning_as_error_callback): Remove.
9998 (c_common_initialize_diagnostics): Don't call
9999 register_warning_as_error_callback.
10000 (c_common_handle_option): Handle -Werror=normalized= here.
10001
d8a07487
JM
100022010-11-10 Joseph Myers <joseph@codesourcery.com>
10003
10004 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
10005 in diagnostic.
10006 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
10007 letter.
10008 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
10009 Remove trailing '.' from diagnostics.
10010 * c.opt (Wwrite-strings_: Avoid '`' in help text.
10011
d5478783
JM
100122010-11-10 Joseph Myers <joseph@codesourcery.com>
10013
10014 * c-common.c (parse_optimize_options): Pass global_dc to
10015 decode_options.
10016 * c-opts.c (c_common_handle_option): Pass &global_options to
10017 set_Wstrict_aliasing.
10018 * c.opt (v): Don't mark Common or document here.
10019
91ebb981
IS
100202010-11-06 Iain Sandoe <iains@gcc.gnu.org>
10021
10022 PR target/44981
10023 * c-format.c (format_type): New type gcc_objc_string_format_type.
10024 (valid_stringptr_type_p): New.
10025 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 10026 (check_format_string): Pass expected type, use
91ebb981
IS
10027 valid_stringptr_type_p (), check that the format string types are
10028 consistent with the format specification.
10029 (decode_format_attr): Warn if NSString is used outside objective-c.
10030 (format_types_orig): Add NSString.
10031 (format_name): New.
10032 (format_flags): New.
10033 (check_format_arg): Handle format strings requiring an external parser.
10034 first_target_format_type: New variable.
10035 (handle_format_attribute): Set up first_target_format_type, pass the
10036 expected format arg string type to check_format_string().
ab20d992 10037 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
10038 * stub-objc.c (objc_string_ref_type_p): New.
10039 (objc_check_format_arg): New.
10040
bede2adc
NP
100412010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
10042
9faeb493 10043 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
10044 * c-common.h (objc_build_class_component_ref): New.
10045 * stub-objc.c (objc_build_class_component_ref): New.
10046
9a179d01
NP
100472010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10048
10049 * c.opt (Wproperty-assign-default): New option.
10050
22d8d616
NP
100512010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
10052
10053 Implemented -fobjc-std=objc1 flag.
10054 * c.opt (fobjc-std=objc1): New option.
10055
2debdb4f
NP
100562010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
10057
10058 Implemented format and noreturn attributes for Objective-C methods.
10059 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
10060 attribute for Objective-C methods.
10061
ec52b111
JM
100622010-10-31 Jason Merrill <jason@redhat.com>
10063
10064 * c-common.c (conversion_warning, warn_for_collisions_1): Use
10065 EXPR_LOC_OR_HERE.
10066
46a88c12
NP
100672010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
10068
10069 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
10070 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
10071 (objc_add_property_declaration): Removed arguments for copies and
10072 ivar.
10073 (objc_build_getter_call): Renamed to
10074 objc_maybe_build_component_ref.
10075 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10076 (objc_is_property_ref): New.
10077 * c-common.c (c_common_reswords): Removed copies and ivar.
10078 * stub-objc.c (objc_add_property_declaration): Removed arguments
10079 for copies and ivar.
10080 (objc_build_getter_call): Renamed to
10081 objc_maybe_build_component_ref.
10082 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
10083 (objc_is_property_ref): New.
9faeb493 10084
1e4bf85b
AC
100852010-10-29 Arnaud Charlet <charlet@adacore.com>
10086 Matthew Gingell <gingell@adacore.com>
10087
10088 * c-ada-spec.c (separate_class_package): New function.
10089 (pp_ada_tree_identifier): Prefix references to C++ classes with the
10090 name of their enclosing package.
10091 (print_ada_declaration): Use separate_class_package.
10092
81f0bab2
JM
100932010-10-27 Jason Merrill <jason@redhat.com>
10094
2b08f2c5
JM
10095 * c-common.c (c_common_reswords): Add __is_literal_type.
10096 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
10097
81f0bab2
JM
10098 * c-common.c (check_case_value): Remove special C++ code.
10099
200290f2
NP
101002010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10101
10102 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
10103 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
10104 and RID_LAST_PATTR.
10105 (objc_add_property_declaration): Added additional arguments.
10106 (objc_property_attribute_kind): Removed.
10107 (objc_set_property_attr): Removed.
10108 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
10109 copy and nonatomic.
10110 * stub-objc.c (objc_add_property_declaration): Added additional
10111 arguments.
10112 (objc_set_property_attr): Removed.
9faeb493 10113
f614132b
NP
101142010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
10115
10116 * c-common.h (objc_add_property_variable): Renamed to
10117 objc_add_property_declaration. Added location argument.
10118 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 10119
b8a18805
NP
101202010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
10121
10122 * c-common.h (objc_maybe_printable_name): New.
10123 * stub-objc.c (objc_maybe_printable_name): New.
10124
3f8257db
JJ
101252010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
10126 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
10127
10128 * c-common.h (c_common_mark_addressable_vec): Declare.
10129 * c-common.c (c_common_mark_addressable_vec): New function.
10130
249a82c4
NP
101312010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10132
10133 * c-common.h (objc_set_method_type): Removed.
10134 (objc_add_method_declaration): Added boolean argument.
10135 (objc_start_method_definition): Same change.
10136 (objc_build_method_signature): Same change.
10137 * stub-objc.c (objc_set_method_type): Removed.
10138 (objc_add_method_declaration): Added boolean argument.
10139 (objc_start_method_definition): Same change.
10140 (objc_build_method_signature): Same change.
10141
977e30bc
NP
101422010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
10143
10144 * c-common.h (finish_file): Removed.
10145 (objc_write_global_declarations): New.
10146 * c-opts.c (c_common_parse_file): Do not call finish_file.
10147 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 10148
da57d1b9
NP
101492010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10150
10151 Implemented parsing @synthesize and @dynamic for
10152 Objective-C/Objective-C++.
10153 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
10154 (objc_add_synthesize_declaration): New.
10155 (objc_add_dynamic_declaration): New.
10156 * c-common.c (c_common_reswords): Add synthesize and dynamic.
10157 * stub-objc.c (objc_add_synthesize_declaration): New.
10158 (objc_add_dynamic_declaration): New.
9faeb493 10159
0069111f
MM
101602010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
10161
10162 PR target/46041
10163 * c-cppbuiltin.c (mode_has_fma): Move function here from
10164 builtins.c. Don't use the fma optab, instead just use the
10165 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
10166 using -save-temps.
10167
e426b47b
NP
101682010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
10169
10170 Merge from 'apple/trunk' branch on FSF servers.
0069111f 10171
3f8257db 10172 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 10173
9faeb493 10174 Radar 4330422
e426b47b
NP
10175 * c-common.h (objc_non_volatilized_type): New declaration
10176 * stub-objc.c (objc_non_volatilized_type): New stub.
10177
90fbfdc3
NP
101782010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
10179
e426b47b 10180 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 10181
ab20d992 10182 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 10183
9faeb493 10184 Radar 4133425
90fbfdc3 10185 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 10186 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 10187
c37d8c30
IS
101882010-10-17 Iain Sandoe <iains@gcc.gnu.org>
10189
10190 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
10191 * c-common.h (enum rid): Add RID_AT_PACKAGE.
10192 (objc_ivar_visibility_kind): New enum.
10193 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 10194 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
10195 visibility enum.
10196
1b1562a5
MM
101972010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
10198
10199 * c-cppbuiltin.c (builtin_define_float_constants): Emit
10200 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
10201 has the appropriate fma builtins.
10202 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
10203
668ea4b1
IS
102042010-10-14 Iain Sandoe <iains@gcc.gnu.org>
10205
1b1562a5 10206 merge from FSF apple 'trunk' branch.
3f8257db 10207 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 10208
668ea4b1
IS
10209 Radars 4436866, 4505126, 4506903, 4517826
10210 * c-common.c (c_common_resword): Define @property and its attributes.
10211 * c-common.h: Define property attribute enum entries.
10212 (OBJC_IS_PATTR_KEYWORD): New.
10213 (objc_property_attribute_kind): New enum.
10214 Declare objc_set_property_attr (), objc_add_property_variable (),
10215 objc_build_getter_call () and objc_build_setter_call ().
10216 * stub-objc.c (objc_set_property_attr): New stub.
10217 (objc_add_property_variable): Likewise.
10218 (objc_build_getter_call): Likewise.
10219 (objc_build_setter_call) Likewise.
1b1562a5 10220
a1178b30
IS
102212010-10-13 Iain Sandoe <iains@gcc.gnu.org>
10222
1b1562a5 10223 merge from FSF apple 'trunk' branch.
ab20d992 10224 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
10225
10226 Radar 3803157 (method attributes)
10227 * c-common.c (handle_deprecated_attribute): Recognize
10228 objc methods as valid declarations.
10229 * c-common.h: Declare objc_method_decl ().
1b1562a5 10230 * stub-objc.c (objc_method_decl): New stub.
a1178b30 10231
a75bfaa6
JM
102322010-10-08 Joseph Myers <joseph@codesourcery.com>
10233
10234 * c-common.c (parse_optimize_options): Call
10235 decode_cmdline_options_to_array_default_mask before
10236 decode_options. Update arguments to decode_options.
10237 * c-common.h (c_common_init_options_struct): Declare.
10238 * c-opts.c (c_common_init_options_struct): New. Split out from
10239 c_common_init_options.
10240
f05b9d93
NP
102412010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
10242
10243 Implemented fast enumeration for Objective-C.
10244 * c-common.h (objc_finish_foreach_loop): New.
10245 * stub-objc.c (objc_finish_foreach_loop): New.
10246
1ebe4b4f
JM
102472010-10-05 Joseph Myers <joseph@codesourcery.com>
10248
10249 * c-common.h (struct diagnostic_context): Don't declare here.
10250 (c_common_initialize_diagnostics): Declare using
10251 diagnostic_context typedef.
10252 * c-opts.c (c_common_handle_option): Pass global_dc to
10253 handle_generated_option.
10254
d4d24ba4
JM
102552010-10-04 Joseph Myers <joseph@codesourcery.com>
10256
10257 * c-opts.c (c_common_handle_option): Pass &global_options_set to
10258 handle_generated_option.
10259
478a1c5b
ILT
102602010-10-03 Ian Lance Taylor <iant@google.com>
10261
10262 * c.opt (-fplan9-extensions): New option.
10263
82a1c2fe
FXC
102642010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10265
10266 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
10267 Remove.
10268 (c_cpp_builtins): Call functions from cppbuiltin.c instead
10269 of duplicating code.
10270
92902b1b
IS
102712010-09-30 Iain Sandoe <iains@gcc.gnu.org>
10272
10273 * c-common.c: Add two new entries for @optional
10274 and @required keywords.
10275
10276 merge from FSF 'apple/trunk' branch.
3f8257db 10277 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
10278
10279 Radar 4386773
10280 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
10281 objective-c keywords.
10282 (objc_set_method_opt): New declaration.
10283 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 10284
46625112
JM
102852010-09-30 Joseph Myers <joseph@codesourcery.com>
10286
10287 * c-common.c (handle_optimize_attribute): Pass &global_options to
10288 cl_optimization_save and cl_optimization_restore.
10289 * c-opts.c (c_common_handle_option): Pass &global_options to
10290 handle_generated_option.
10291 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
10292 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
10293 &global_options to cl_optimization_restore.
10294
49b91f05
NP
102952010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
10296
10297 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
10298 Objective-C/Objective-C++ keywords.
10299
13ed556f 103002010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 10301
9faeb493
UB
10302 Merge from 'apple/trunk' branch on FSF servers.
10303
3f8257db 10304 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
10305
10306 Radar 4281748
10307 * c-common.h (objc_check_global_decl): New declaration.
10308 * stub-objc.c (objc_check_global_decl): New stub.
10309
f0036cca
JM
103102010-09-29 Joseph Myers <joseph@codesourcery.com>
10311
10312 * c.opt: Don't use VarExists.
10313
e3339d0f
JM
103142010-09-29 Joseph Myers <joseph@codesourcery.com>
10315
10316 * c-common.c (c_cpp_error): Update names of diagnostic_context
10317 members.
10318 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
10319 cl_optimization members.
10320 * c-opts.c (warning_as_error_callback, c_common_handle_option,
10321 sanitize_cpp_opts, finish_options): Update names of cpp_options
10322 members.
10323
1973201f
NP
103242010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
10325
10326 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
10327 (objc_is_reserved_word): Removed.
10328 * c-common.c: Updated comments.
10329 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
10330 objc_is_reserved_word.
10331 * stub-objc.c (objc_is_reserved_word): Removed.
10332
f7e71da5
IS
103332010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10334
9faeb493 10335 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
10336 include attributes.
10337 (objc_start_method_definition): Likewise.
10338 (objc_build_keyword_decl): Likewise.
10339 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
10340 (objc_start_method_definition): Likewise.
10341 (objc_build_keyword_decl): Likewise.
10342
c165dca7
IS
103432010-09-28 Iain Sandoe <iains@gcc.gnu.org>
10344
10345 * c-common.h (objc_start_class_interface): Adjust prototype.
10346 (objc_start_category_interface): Likewise.
10347 (objc_start_protocol): Likewise.
10348 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
10349 (objc_start_class_interface): Likewise.
10350 (objc_start_category_interface): Likewise.
10351
7458026b
ILT
103522010-09-27 Ian Lance Taylor <iant@google.com>
10353
10354 * c-common.c (c_common_attribute_table): Add no_split_stack.
10355 (handle_no_split_stack_attribute): New static function.
10356
b581b85b
NP
103572010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
10358
9faeb493 10359 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 10360
3f8257db 10361 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 10362
9faeb493 10363 Radar 4229905
b581b85b
NP
10364 * c-common.h (objc_have_common_type): New declaration.
10365 * stub-objc.c (objc_have_common_type): New stub.
10366
10367 2005-06-22 Ziemowit Laski <zlaski@apple.com>
10368
10369 Radar 4154928
10370 * c-common.h (objc_common_type): New prototype.
9faeb493 10371 * stub-objc.c (objc_common_type): New stub.
b581b85b 10372
46a4da10
JH
103732010-09-24 Jan Hubicka <jh@suse.cz>
10374
10375 * c-common.c (handle_leaf_attribute): New function.
10376 (struct attribute_spec c_common_att): Add leaf.
10377
e200444e
JM
103782010-09-22 Joseph Myers <joseph@codesourcery.com>
10379
10380 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
10381 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
10382 -dump, -dump=, -imacros, -imacros=, -include, -include=,
10383 -include-barrier, -include-directory, -include-directory=,
10384 -include-directory-after, -include-directory-after=,
10385 -include-prefix, -include-prefix=, -include-with-prefix,
10386 -include-with-prefix=, -include-with-prefix-after,
10387 -include-with-prefix-after=, -include-with-prefix-before,
10388 -include-with-prefix-before=, -no-integrated-cpp,
10389 -no-line-commands, -no-standard-includes, -no-warnings, -output,
10390 -output=, -pedantic, -pedantic-errors, -preprocess,
10391 -print-missing-file-dependencies, -trace-includes, -traditional,
10392 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
10393 -user-dependencies, -verbose, -write-dependencies,
10394 -write-user-dependencies, no-integrated-cpp, traditional): New.
10395
29a80ea6
NP
103962010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10397
10398 PR objc/23710
ac1fc2fc
NP
10399 * c-common.h (objc_start_method_definition): Return bool instead
10400 of void.
10401 * stub-objc.c (objc_start_method_definition): Return bool instead
10402 of void.
10403
104042010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10405
10406 PR objc/25965
10407 * c-common.h (objc_get_interface_ivars): New declaration.
10408 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10409
de621752
ILT
104102010-09-15 Ian Lance Taylor <iant@google.com>
10411
10412 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10413 messages. Remove period at end of warning message.
de621752 10414
ba885ec5
NS
104152010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10416
10417 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10418 (handle_alias_attribute): ... here.
10419 (handle_ifunc_attribute): New.
10420
c5ee1358
MM
104212010-09-06 Mark Mitchell <mark@codesourcery.com>
10422
10423 * c-common.h (do_warn_double_promotion): Declare.
10424 * c-common.c (do_warn_double_promotion): Define.
10425
0a0b3574
MM
104262010-09-05 Mark Mitchell <mark@codesourcery.com>
10427
10428 * c.opt (Wdouble-promotion): New.
10429
d1779886
JM
104302010-09-02 Joseph Myers <joseph@codesourcery.com>
10431
10432 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10433 fvtable-thunks, fxref): Mark no longer supported in help text.
10434
2d2bd949
JM
104352010-09-02 Joseph Myers <joseph@codesourcery.com>
10436
10437 * c.opt (Wimport, fall-virtual, falt-external-templates,
10438 fdefault-inline, fenum-int-equiv, fexternal-templates,
10439 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10440 fname-mangling-version-, fnew-abi, fnonnull-objects,
10441 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10442 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10443 applicable.
10444 (fhandle-exceptions): Mark with Alias and Warn.
10445 * c-opts.c (c_common_handle_option): Don't handle options marked
10446 as ignored.
10447
5de8299c
JM
104482010-09-02 Joseph Myers <joseph@codesourcery.com>
10449
10450 * c.opt (Wcomments, Werror-implicit-function-declaration,
10451 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10452 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10453 aliases.
10454 * c-common.c (option_codes): Use OPT_Wcomment instead of
10455 OPT_Wcomments.
10456 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10457 Don't handle options marked as aliases.
10458
0ceb0201
RG
104592010-08-25 Richard Guenther <rguenther@suse.de>
10460
10461 * c-common.c (c_common_get_alias_set): Remove special
10462 handling for pointers.
10463
ac47786e
NF
104642010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10465
10466 * c-common.c: Use FOR_EACH_VEC_ELT.
10467 * c-gimplify.c: Likewise.
10468 * c-pragma.c: Likewise.
10469
c878765b
JM
104702010-08-16 Joseph Myers <joseph@codesourcery.com>
10471
10472 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10473 RejectDriver.
10474 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10475 RejectDriver.
10476 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10477 instead of OPT_MDX and OPT_MMDX.
10478
603349bf
JM
104792010-08-16 Joseph Myers <joseph@codesourcery.com>
10480
10481 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10482
644fa7ac
JM
104832010-08-12 Joseph Myers <joseph@codesourcery.com>
10484
10485 * c.opt (MD, MMD): Change to MDX and MMDX.
10486 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10487
481e1176
JM
104882010-08-11 Joseph Myers <joseph@codesourcery.com>
10489
10490 * c-opts.c (c_common_handle_option): Call handle_generated_option
10491 instead of handle_option.
10492
ac8dc9f7
NF
104932010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10494
10495 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10496 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10497
4f8c876d
NF
104982010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10499
10500 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10501 (pending_redefine_extname): Change type to a VEC.
10502 (add_to_renaming_pragma_list): Update for new type of
10503 pending_redefine_extname.
ac8dc9f7 10504 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10505
3b0c690e
AC
105062010-08-04 Arnaud Charlet <charlet@adacore.com>
10507
10508 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10509 visited.
10510 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10511 decide whether a type has already been declared/seen.
10512 Do not go to the original type.
10513 (dump_nested_types): New parameter forward.
10514 Generate forward declaration if needed and mark type as visited.
10515 (print_ada_declaration): Call dump_nested_types if not already done.
10516 Mark types as visited.
10517
1890bccc
JM
105182010-08-03 Joseph Myers <joseph@codesourcery.com>
10519
10520 * c.opt (-print-pch-checksum): Remove option.
10521 * c-opts.c (c_common_handle_option): Don't handle
10522 OPT_print_pch_checksum.
10523
5f20c657
JM
105242010-07-27 Joseph Myers <joseph@codesourcery.com>
10525
10526 * c-common.h (c_common_handle_option): Update prototype and return
10527 value type.
10528 * c-opts.c (c_common_handle_option): Update prototype and return
10529 value type. Update calls to handle_option and
10530 enable_warning_as_error.
10531
f551f80c
JJ
105322010-07-27 Jakub Jelinek <jakub@redhat.com>
10533
10534 PR c/45079
10535 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10536
61ff2bdc
JM
105372010-07-27 Joseph Myers <joseph@codesourcery.com>
10538
10539 * c-common.h (c_common_missing_argument): Remove.
10540 * c-opts.c (c_common_missing_argument): Remove.
10541 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10542 idirafter, imacros, include, isysroot, isystem, iquote): Add
10543 MissingArgError.
10544 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10545
7a9bf9a4
JM
105462010-07-27 Joseph Myers <joseph@codesourcery.com>
10547
10548 * c-common.h (c_common_option_lang_mask,
10549 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10550 New.
10551 (c_common_init_options): Update prototype.
10552 * c-opts.c (c_common_option_lang_mask): New.
10553 (c_common_initialize_diagnostics): Split out of
10554 c_common_init_options.
10555 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10556 New.
10557 (c_common_init_options): Update prototype. Use decoded options in
10558 search for -lang-asm.
10559
910ad8de
NF
105602010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10561
10562 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10563 * c-format.c: Likewise.
10564
718f9c0f
MLI
105652010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10566
10567 * c-common.h: Include diagnostic-core.h. Error if already
10568 included.
10569 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10570
4d451982
MLI
105712010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10572
adfac8df 10573 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10574 Do not include expr.h
10575 (vector_mode_valid_p): Move here.
10576
119fe915
SB
105772010-06-21 DJ Delorie <dj@redhat.com>
10578
10579 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10580 allow these pragmas anywhere.
10581
105822010-06-14 Jakub Jelinek <jakub@redhat.com>
10583
10584 PR bootstrap/44509
10585 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10586 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10587 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10588 ggc_strdup instead of xstrdup.
10589
105902010-06-10 Jakub Jelinek <jakub@redhat.com>
10591
10592 * c-cppbuiltin.c: Include cpp-id-data.h.
10593 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10594 (lazy_hex_fp_value): New function.
10595 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10596
6662d794
MLI
105972010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10598
10599 * c-gimplify.c: Do not include tree-flow.h
10600
38f8b050
JR
106012010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10602
10603 PR other/44034
10604 * c-common.c: Rename targetm member:
10605 targetm.enum_va_list -> targetm.enum_va_list_p
10606
9589f23e
AS
106072010-06-28 Anatoly Sokolov <aesok@post.ru>
10608
10609 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10610
3b06d379
SB
106112010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10612
10613 * c-cppbuiltin.c: Do not include except.h.
10614
d166d4c3
AK
106152010-06-24 Andi Kleen <ak@linux.intel.com>
10616
9faeb493
UB
10617 * c-common.c (warn_for_omitted_condop): New.
10618 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10619
70cb8be6
JM
106202010-06-21 Joseph Myers <joseph@codesourcery.com>
10621
10622 * c.opt (lang-objc): Remove.
10623 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10624
a4c97feb
JR
106252010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10626
10627 * c-opts.c: Include "tm_p.h".
10628
6e2f1956
JM
106292010-06-20 Joseph Myers <joseph@codesourcery.com>
10630
10631 * c-common.c (parse_optimize_options): Update call to
10632 decode_options.
10633
bc87224e
NF
106342010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10635
10636 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10637 new type of types_used_by_cur_var_decl.
10638
b49cf425
JR
106392010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10640
10641 PR bootstrap/44512
10642 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10643 for C++ standard compliance.
10644
59f9c2ed
JM
106452010-06-16 Jason Merrill <jason@redhat.com>
10646
10647 * c.opt: Add -Wnoexcept.
10648
33766b66
RG
106492010-06-16 Richard Guenther <rguenther@suse.de>
10650
10651 PR c/44555
10652 * c-common.c (c_common_truthvalue_conversion): Remove
10653 premature and wrong optimization concering ADDR_EXPRs.
10654
eff7e30c
AC
106552010-06-15 Arnaud Charlet <charlet@adacore.com>
10656
10657 * c-ada-spec.c (dump_sloc): Remove column info.
10658 (is_simple_enum): New function.
10659 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10660 enum types when relevant.
10661
6312e84d
MLI
106622010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10663
9faeb493 10664 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10665 location.
10666
1cb42611
JM
106672010-06-10 Joseph Myers <joseph@codesourcery.com>
10668
10669 * c-opts.c (c_common_handle_option): Don't handle
10670 OPT_fshow_column.
10671
a9429e29
LB
106722010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10673
10674 * c-pragma.c (push_alignment): Use typed GC allocation.
10675 (handle_pragma_push_options): Likewise.
10676
10677 * c-common.c (parse_optimize_options): Likewise.
10678
10679 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10680 option.
10681
5498f011
JM
106822010-06-07 Joseph Myers <joseph@codesourcery.com>
10683
10684 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10685 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10686 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10687 flag_signed_bitfields, warn_strict_null_sentinel,
10688 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10689 flag_gen_declaration, flag_no_gnu_keywords,
10690 flag_implement_inlines, flag_implicit_templates,
10691 flag_implicit_inline_templates, flag_optional_diags,
10692 flag_elide_constructors, flag_default_inline, flag_rtti,
10693 flag_conserve_space, flag_access_control, flag_check_new,
10694 flag_new_for_scope, flag_weak, flag_working_directory,
10695 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10696 flag_enforce_eh_specs, flag_threadsafe_statics,
10697 flag_pretty_templates): Remove.
10698 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10699 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10700 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10701 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10702 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10703 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10704 flag_no_gnu_keywords, flag_implement_inlines,
10705 flag_implicit_templates, flag_implicit_inline_templates,
10706 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10707 flag_rtti, flag_conserve_space, flag_access_control,
10708 flag_check_new, flag_new_for_scope, flag_weak,
10709 flag_working_directory, flag_use_cxa_atexit,
10710 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10711 flag_threadsafe_statics, flag_pretty_templates,
10712 warn_strict_null_sentinel): Remove.
10713 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10714 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10715 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10716 fimplicit-inline-templates, fimplicit-templates,
10717 flax-vector-conversions, fms-extensions, fnil-receivers,
10718 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10719 frtti, fshort-double, fshort-enums, fshort-wchar,
10720 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10721 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10722 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10723 gen-decls, undef): Use Var.
10724 (fdefault-inline, foptional-diags): Document as doing nothing.
10725 * c-opts.c (c_common_handle_option): Remove cases for options now
10726 using Var. Mark ignored options as such.
10727
39dabefd
SB
107282010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10729
9faeb493 10730 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10731 * c-common.def: Likewise.
10732 * c-common.h: Likewise.
10733 * c-cppbuiltin.c: Likewise.
10734 * c-dump.c: Likewise.
10735 * c-format.c: Likewise.
10736 * c-format.h : Likewise.
10737 * c-gimplify.c: Likewise.
10738 * c-lex.c: Likewise.
10739 * c-omp.c: Likewise.
10740 * c.opt: Likewise.
10741 * c-opts.c: Likewise.
10742 * c-pch.c: Likewise.
10743 * c-ppoutput.c: Likewise.
10744 * c-pragma.c: Likewise.
10745 * c-pragma.h: Likewise.
10746 * c-pretty-print.c: Likewise.
10747 * c-pretty-print.h: Likewise.
10748 * c-semantics.c: Likewise.
10749 * stub-objc.c: Likewise.
10750
10751 * c-common.c: Include gt-c-family-c-common.h.
10752 * c-pragma.c: Include gt-c-family-c-pragma.h.
10753\f
a5544970 10754Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10755
10756Copying and distribution of this file, with or without modification,
10757are permitted in any medium without royalty provided the copyright
10758notice and this notice are preserved.
This page took 3.889045 seconds and 5 git commands to generate.