]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c-family/ChangeLog
re PR target/32413 (internal compiler error: in reload_cse_simplify_operands, at...
[thirdparty/gcc.git] / gcc / c-family / ChangeLog
CommitLineData
68e2c199
PK
12019-09-04 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2
3 PR c/78736
4 * c.opt (Wenum-conversion): New option.
5
7a4418a5
JL
62019-09-03 Jozef Lawrynowicz <jozef.l@mittosystems.com>
7
8 * c-attribs.c (handle_section_attribute): Call the
9 handle_generic_attribute target hook after performing target
10 independent processing.
11 (handle_noinit_attribute): Likewise.
12
5f76ab15
ILT
132019-09-03 Ian Lance Taylor <iant@golang.org>
14
15 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Always expand
16 when using -fgo-dump-spec.
17
ae0d3f6a
ML
182019-09-02 Martin Liska <mliska@suse.cz>
19
20 PR c++/91155
21 * c-common.c (fname_as_string): Use cxx_printable_name for
22 __PRETTY_FUNCTION__ same as was used before r265711.
23
8a902edb
MP
242019-08-28 Marek Polacek <polacek@redhat.com>
25
26 Implement P1152R4: Deprecating some uses of volatile.
27 PR c++/91361
28 * c-opts.c (c_common_post_options): Enable -Wvolatile by
29 default for C++2a, unless -Wno-deprecated.
30 * c.opt (Wvolatile): New warning.
31
4742dbe7
MP
322019-08-28 Marek Polacek <polacek@redhat.com>
33
34 PR c++/91360 - Implement C++20 P1143R2: constinit.
35 * c-common.c (c_common_reswords): Add constinit and __constinit.
36 (keyword_is_decl_specifier): Handle RID_CONSTINIT.
37 * c-common.h (enum rid): Add RID_CONSTINIT, RID_FIRST_CXX20, and
38 RID_LAST_CXX20.
39 (D_CXX20): Define.
40 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_constinit.
41 * c-format.c (cxx_keywords): Add "constinit".
42 * c.opt (Wc++2a-compat, Wc++20-compat): New options.
43
6a074892
JJ
442019-08-27 Jakub Jelinek <jakub@redhat.com>
45
46 PR c++/91415
47 * c-common.c (verify_tree): For LSHIFT_EXPR, RSHIFT_EXPR,
48 COMPONENT_REF and ARRAY_REF in cxx_dialect >= cxx17 mode handle it
49 like COMPOUND_EXPR rather than normal expression.
50
22f8849d
IS
512019-08-23 Iain Sandoe <iain@sandoe.co.uk>
52
53 PR pch/61250
54 * c-lex.c (c_lex_with_flags): Don't call
55 c_common_no_more_pch () from here.
56
df375b03
JJ
572019-08-23 Jakub Jelinek <jakub@redhat.com>
58
59 PR middle-end/91283
60 * c-common.c (c_ts18661_flt_eval_method): Use flag_excess_precision
61 instead of flag_excess_precision_cmdline.
62 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): Likewise.
63 * c-opts.c (c_common_post_options): Likewise.
64
14b7950f
MS
652019-08-22 Martin Sebor <msebor@redhat.com>
66
67 PR middle-end/91490
68 * c-common.c (braced_list_to_string): Add argument and overload.
69 Handle flexible length arrays and unions.
70
8bb2ee59
EB
712019-08-21 Eric Botcazou <ebotcazou@adacore.com>
72
73 * c-ada-spec.c (dump_ada_function_declaration): Be prepared for broken
74 function declarations where arguments are missing. Rename variables.
75
21c1e205
RB
762019-08-15 Richard Biener <rguenther@suse.de>
77
78 * c-common.c (c_stddef_cpp_builtins): When the GIMPLE FE is
79 enabled, define __SIZETYPE__.
80
f0033821
CL
812019-08-14 Christophe Lyon <christophe.lyon@linaro.org>
82
83 * c-attribs.c (c_common_attribute_table): Add "noinit" entry. Add
84 exclusion with "section" attribute.
85 (attr_noinit_exclusions): New table.
86 (handle_noinit_attribute): New function.
87
4d732405
RS
882019-08-13 Richard Sandiford <richard.sandiford@arm.com>
89
90 PR middle-end/91421
91 * c-common.c (resolve_overloaded_builtin): Use
92 copy_decl_built_in_function.
93
51ad8481
MS
942019-08-13 Martin Sebor <msebor@redhat.com>
95
96 PR c/80619
97 * c-format.c (printf_length_specs): Set FMT_LEN_w for "w".
98 (asm_fprintf_length_spec): Same.
99 * c-format.h (format_lengths): Add FMT_LEN_w.
100
77eb117f
JJ
1012019-08-10 Jakub Jelinek <jakub@redhat.com>
102
103 * c-pragma.h (enum pragma_omp_clause): Add
104 PRAGMA_OMP_CLAUSE_DEVICE_TYPE.
105
398e3feb
JJ
1062019-08-07 Jakub Jelinek <jakub@redhat.com>
107
108 * c-pragma.h (enum pragma_omp_clause): Add
109 PRAGMA_OMP_CLAUSE_USE_DEVICE_ADDR. Set PRAGMA_OACC_CLAUSE_USE_DEVICE
110 equal to PRAGMA_OMP_CLAUSE_USE_DEVICE_PTR instead of being a separate
111 enumeration value.
112
ab574db6
MP
1132019-08-05 Marek Polacek <polacek@redhat.com>
114
115 PR c++/91338 - Implement P1161R3: Deprecate a[b,c].
116 * c-opts.c (c_common_post_options): Enable -Wcomma-subscript by
117 default for C++2a, unless -Wno-deprecated.
118 * c.opt (Wcomma-subscript): New warning.
119
554a530f
JJ
1202019-07-20 Jakub Jelinek <jakub@redhat.com>
121
122 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_LOOP.
123 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_BIND.
124 * c-pragma.c (omp_pragmas_simd): Add PRAGMA_OMP_LOOP entry.
125 * c-common.h (enum c_omp_clause_split): Add C_OMP_CLAUSE_SPLIT_LOOP.
126 * c-omp.c (c_omp_split_clauses): Add support for 4 new combined
127 constructs with the loop construct.
128
1a888209
JJ
1292019-07-13 Jakub Jelinek <jakub@redhat.com>
130
131 PR c/91149
132 * c-omp.c (c_omp_split_clauses): Fix a pasto in
133 OMP_CLAUSE_REDUCTION_TASK handling.
134
1fdd6f04
JJ
1352019-07-12 Jakub Jelinek <jakub@redhat.com>
136
137 * c-pragma.h (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ORDER.
138 * c-omp.c (c_omp_split_clauses): Handle splitting of OMP_CLAUSE_ORDER.
139
99b1c316
MS
1402019-07-09 Martin Sebor <msebor@redhat.com>
141
142 PR c++/61339
1fdd6f04 143 * c-opts.c (handle_deferred_opts): Change class-key of PODs to struct
99b1c316
MS
144 and others to class.
145 * c-pretty-print.h: Same.
146
6c1dae73
MS
1472019-07-09 Martin Sebor <msebor@redhat.com>
148
149 PR c++/61339
150 * c-format.c (check_argument_type): Change class-key from class to
151 struct and vice versa to match convention and avoid -Wclass-is-pod
152 and -Wstruct-no-pod.
153 * c-pretty-print.h: Same.
154
8ba6ea87
ML
1552019-07-03 Martin Liska <mliska@suse.cz>
156
157 * c-common.c (try_to_locate_new_include_insertion_point): Remove
158 dead assignemts.
159
83eb9522
JJ
1602019-07-03 Jakub Jelinek <jakub@redhat.com>
161
162 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_REDUCTION_INSCAN
163 clauses on OMP_FOR rather than OMP_PARALLEL when OMP_FOR is combined
164 with OMP_PARALLEL.
165
1c6ffbab
QZ
1662019-07-02 qing zhao <qing.zhao@oracle.com>
167
168 PR preprocessor/90581
169 * c-opts.c (c_common_handle_option): Handle -fmax-include-depth.
170 * c.opt: Add new option -fmax-include-depth.
171
7ffc7de5
JM
1722019-06-26 Jason Merrill <jason@redhat.com>
173
174 PR c++/55442 - memory-hog with highly recursive constexpr.
175 * c.opt (fconstexpr-loop-limit): New.
176
361af3e4
JJ
1772019-06-25 Jakub Jelinek <jakub@redhat.com>
178
179 PR sanitizer/90954
180 * c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
181 to SAVE_EXPR in first operand of a COMPOUND_EXPR.
182
ab20d992
JJ
1832019-06-25 Jozef Lawrynowicz <jozef.l@mittosystems.com>
184
185 * c-common.c (c_common_nodes_and_builtins): Define
186 alternate "__intN__" name for "__intN" types.
187
f4af4019
JH
1882019-06-24 Jan Hubicka <jh@suse.cz>
189
190 * c-common.c (braced_lists_to_strings): Check that
191 type is array or integer prior checking string flag.
192
da9e9b57
MB
1932019-06-21 Matthew Beliveau <mbelivea@redhat.com>
194
195 PR c++/90875 - added -Wswitch-outside-range option
196 * c.opt (Wswitch-outside-range): Added new option.
197 * c-warn.c (c_do_switch_warnings): Use OPT_Wswitch-outside-range.
198
3f3d6a6f
MP
1992019-06-21 Marek Polacek <polacek@redhat.com>
200
201 PR c++/90953 - ICE with -Wmissing-format-attribute.
202 * c-common.c (check_function_arguments_recurse): Use
203 get_attribute_name.
204 (check_missing_format_attribute): Likewise.
205
1bf32c11
MP
2062019-06-19 Marek Polacek <polacek@redhat.com>
207
208 PR c++/60364 - noreturn after first decl not diagnosed.
209 * c-attribs.c (handle_noreturn_attribute): No longer static.
210 * c-common.h (handle_noreturn_attribute, attr_noreturn_exclusions):
211 Declare.
212 * c-format.c (check_function_format): Use get_attribute_name.
213
a04c0734
MS
2142019-06-19 Martin Sebor <msebor@redhat.com>
215
216 PR translation/90156
217 * c-format.c (function_format_info::format_type): Adjust type.
218 (function_format_info::is_raw): New member.
219 (decode_format_type): Adjust signature. Handle "raw" diag attributes.
220 (decode_format_attr): Adjust call to decode_format_type.
221 Avoid a redundant call to convert_format_name_to_system_name.
222 Avoid abbreviating the word "arguments" in a diagnostic.
223 (format_warning_substr): New function.
224 (avoid_dollar_number): Quote dollar sign in a diagnostic.
225 (finish_dollar_format_checking): Same.
226 (check_format_info): Same.
227 (struct baltoks_t): New.
228 (c_opers, c_keywords, cxx_keywords, badwords, contrs): New arrays.
229 (maybe_diag_unbalanced_tokens, check_tokens, check_plain): New
230 functions.
231 (check_format_info_main): Call check_plain. Use baltoks_t. Call
232 maybe_diag_unbalanced_tokens.
233 (handle_format_attribute): Spell out the word "arguments" in
234 a diagnostic.
235
d3786ebb
MB
2362019-06-11 Matthew Beliveau <mbelivea@redhat.com>
237
238 PR c++/90449 - add -Winaccessible-base option.
239 * c.opt (Winaccessible-base): New option.
240
bf38f7e9
JJ
2412019-06-10 Jakub Jelinek <jakub@redhat.com>
242
243 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_SCAN.
244 * c-pragma.c (omp_pragmas_simd): Add #pragma omp scan.
245 * c-omp.c (c_omp_split_clauses): Diagnose inscan reductions on
246 combined/composite constructs where it is not allowed. Copy over
247 OMP_CLAUSE_REDUCTION_INSCAN.
248
0ecf545c
MS
2492019-06-05 Martin Sebor <msebor@redhat.com>
250
251 * c-attribs.c (handle_mode_attribute): Adjust quoting and hyphenation.
252 (handle_alias_ifunc_attribute): Same.
253 (handle_copy_attribute): Same.
254 (handle_weakref_attribute): Same.
255 (handle_nonnull_attribute): Same.
256 * c-warn.c (warn_for_sign_compare): Same.
257 (warn_for_restrict): Same.
258 * c.opt: Same.
259
36b34127
MS
2602019-06-05 Martin Sebor <msebor@redhat.com>
261
262 * c-pragma.c (handle_pragma_weak): Adjust quoting in a diagnostic.
263 * c.opt (-Wformat-diag): Remove a spurious period.
264
357a352f
JJ
2652019-05-29 Jakub Jelinek <jakub@redhat.com>
266
267 PR c/90628
268 * c-common.c (check_builtin_function_arguments)
269 <case BUILTIN_*_OVERFLOW>: Diagnose pointer to const qualified integer
270 as last argument.
271
2b8235ea
EB
2722019-05-23 Eric Botcazou <ebotcazou@adacore.com>
273
274 * c-ada-spec.c (compare_node): Compare the DECL_UIDs as a last resort.
275
6d86ddc4
ML
2762019-05-22 Martin Liska <mliska@suse.cz>
277
278 PR lto/90500
279 * c-attribs.c (handle_copy_attribute): Do not copy
280 target_clones attribute.
281
419ba5b9
EB
2822019-05-21 Eric Botcazou <ebotcazou@adacore.com>
283
284 * c-ada-spec.h (enum cpp_operation): Add IS_ASSIGNMENT_OPERATOR.
285 * c-ada-spec.c (print_assignment_operator): New function.
286 (dump_ada_declaration) <FUNCTION_DECL>: Call it do dump explicit copy
287 assignment operators declared as methods and filter out the others.
288
e03436e7
TS
2892019-05-17 Thomas Schwinge <thomas@codesourcery.com>
290
291 PR c/89433
292 * c-attribs.c (c_common_attribute_table): Set min_len to -1 for
293 "omp declare target".
294
a9c697b8
MS
2952019-05-16 Martin Sebor <msebor@redhat.com>
296
ab20d992
JJ
297 * c-attribs.c (handle_no_sanitize_attribute): Quote identifiers,
298 keywords, operators, and types in diagnostics.
299 (handle_scalar_storage_order_attribute): Same.
300 (handle_mode_attribute): Same.
301 (handle_visibility_attribute): Same.
302 (handle_assume_aligned_attribute): Same.
303 (handle_no_split_stack_attribute): Same.
304 * c-common.c (shorten_compare): Same.
305 (c_common_truthvalue_conversion): Same.
306 (cb_get_source_date_epoch): Same.
307 * c-lex.c (cb_def_pragma): Quote keywords, operators, and types
308 in diagnostics.
309 (interpret_float): Same.
310 * c-omp.c (c_finish_omp_for): Same.
311 * c-opts.c (c_common_post_options): Same.
312 * c-pch.c (c_common_pch_pragma): Same.
313 * c-pragma.c (pop_alignment): Same.
314 (handle_pragma_pack): Same.
315 (apply_pragma_weak): Same.
316 (handle_pragma_weak): Same.
317 (handle_pragma_scalar_storage_order): Same.
318 (handle_pragma_redefine_extname): Same.
319 (add_to_renaming_pragma_list): Same.
320 (maybe_apply_renaming_pragma): Same.
321 (push_visibility): Same.
322 (handle_pragma_visibility): Same.
323 (handle_pragma_optimize): Same.
324 (handle_pragma_message): Same.
325 * c-warn.c (warn_for_omitted_condop): Same.
326 (lvalue_error): Same.
a9c697b8 327
6b943512
RB
3282019-05-15 Richard Biener <rguenther@suse.de>
329
330 PR c/90474
331 * c-common.c (c_common_mark_addressable_vec): Also mark
332 a COMPOUND_LITERAL_EXPR_DECL addressable similar to
333 c_mark_addressable.
ab20d992 334
b744fc85
NS
3352019-05-06 Nathan Sidwell <nathan@acm.org>
336
337 * c-opts.c (handle_defered_opts): Rename struct deps to struc mkdeps.
338
598f50d7
NS
3392019-04-30 Nathan Sidwell <nathan@acm.org>
340
341 * c-common.c (c_common_init_ts): Use MARK_TS_EXP. Mark SIZEOF_EXPR.
342
5bcc5a3b
ML
3432019-04-30 Martin Liska <mliska@suse.cz>
344
345 * c-pragma.c (handle_pragma_diagnostic): Provide hints
346 for unknown options.
347
e78a87f7
RS
3482019-04-26 Richard Sandiford <richard.sandiford@arm.com>
349
350 * c-warn.c (strict_aliasing_warning): Apply COMPLETE_TYPE_P to
351 the pointer target rather than the pointer itself.
352
c280b7ee
JJ
3532019-04-19 Jakub Jelinek <jakub@redhat.com>
354
355 PR c/89888
356 * c-common.h (c_add_case_label): Remove orig_type and outside_range_p
357 arguments.
358 (c_do_switch_warnings): Remove outside_range_p argument.
359 * c-common.c (check_case_bounds): Removed.
360 (c_add_case_label): Remove orig_type and outside_range_p arguments.
361 Don't call check_case_bounds. Fold low_value as well as high_value.
362 * c-warn.c (c_do_switch_warnings): Remove outside_range_p argument.
363 Check for case labels outside of range of original type here and
364 adjust them.
365
8e8225e6
JJ
3662019-04-12 Jakub Jelinek <jakub@redhat.com>
367
63b8a166
JJ
368 PR translation/90041
369 * c.opt (-fhandle-exceptions): Use %< and %> around option names
370 in the Warn diagnostics.
371
8e8225e6
JJ
372 PR c/89946
373 * c-attribs.c (handle_patchable_function_entry_attribute): Add
374 function comment. Warn if arguments of the attribute are not positive
375 integer constants.
376
53a3f614
EB
3772019-04-09 Eric Botcazou <ebotcazou@adacore.com>
378
379 * c-ada-spec.c (print_destructor): Deal with deleting destructors.
380 (dump_ada_declaration) <FUNCTION_DECL>: Likewise.
381
22be5873
EB
3822019-04-07 Eric Botcazou <ebotcazou@adacore.com>
383
384 * c-ada-spec.c (is_float128): New predicate extracted from...
385 (dump_ada_node) <COMPLEX_TYPE>: Use it to recognize __cfloat128.
386 <REAL_TYPE>: ...here. Call it.
387
34facf20
DM
3882019-04-05 David Malcolm <dmalcolm@redhat.com>
389
390 PR c/89985
391 * c-warn.c (check_address_or_pointer_of_packed_member): Add
392 auto_diagnostic_group. Guard inform calls by result of
393 warning_at call.
394
05564120
MP
3952019-04-05 Marek Polacek <polacek@redhat.com>
396
ab20d992 397 PR c++/89973 - -Waddress-of-packed-member ICE with invalid conversion.
05564120
MP
398 * c-warn.c (check_address_or_pointer_of_packed_member): Check the type
399 of RHS.
400
7a506c3c
JM
4012019-04-03 Jason Merrill <jason@redhat.com>
402
403 PR c++/86586 - -fcompare-debug=-Wsign-compare.
404 * c-warn.c (warn_for_sign_compare): Call fold_for_warn.
405
ddeae8c8
MS
4062019-04-01 Martin Sebor <msebor@redhat.com>
407
408 PR c/89685
409 * c-attribs.c (handle_copy_attribute): Handle references and
410 non-constant expressions.
411
a15ffa22
JJ
4122019-03-22 Jakub Jelinek <jakub@redhat.com>
413
414 PR c++/87481
415 * c.opt (-fconstexpr-ops-limit=): New option.
416
36a3a7a3
JJ
4172019-03-21 Jakub Jelinek <jakub@redhat.com>
418
419 * c-common.c (per_file_includes_t): Use false as Lazy in hash_set
420 template param.
421
bec1da64
MS
4222019-03-19 Martin Sebor <msebor@redhat.com>
423
424 PR tree-optimization/89688
425 * c-common.c (braced_list_to_string): Make static.
426 (braced_lists_to_strings): Define new function.
427 * c-common.h (braced_list_to_string): Remove.
428 (braced_lists_to_strings): Declare.
429
1fe61adf
ML
4302019-03-12 Martin Liska <mliska@suse.cz>
431
432 * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
433
93964ebd
ML
4342019-03-11 Martin Liska <mliska@suse.cz>
435
436 * c-opts.c (c_common_post_options): Wrap apostrophes
437 in gcc internal format with %'.
438
a3f9f006
ML
4392019-03-11 Martin Liska <mliska@suse.cz>
440
441 * c-attribs.c (handle_nocf_check_attribute): Wrap an option name
442 in a string format message and fix GNU coding style.
443 * c-common.c (vector_types_convertible_p): Likewise.
444 (c_build_vec_perm_expr): Likewise.
445 * c-indentation.c (get_visual_column): Likewise.
446 * c-opts.c (c_common_handle_option): Likewise.
447 (c_common_post_options): Likewise.
448 (sanitize_cpp_opts): Likewise.
449 * c-pch.c (c_common_pch_pragma): Likewise.
450 * c-pragma.c (handle_pragma_pack): Likewise.
451
1db01ff9
JJ
4522019-03-08 Jakub Jelinek <jakub@redhat.com>
453
454 PR tree-optimization/89550
455 * c-common.c (c_common_truthvalue_conversion): Only set
456 TREE_NO_WARNING if warning_at returned true.
457 * c-warn.c (overflow_warning, warn_logical_operator): Likewise.
458
ba790e6f
JJ
4592019-02-25 Sandra Loosemore <sandra@codesourcery.com>
460 Martin Sebor <msebor@gmail.com>
461
462 * c.opt (Wmissing-attributes): Clean up doc string.
463
7da73ba7
JJ
4642019-02-25 Jakub Jelinek <jakub@redhat.com>
465
466 PR c/89495
467 * c-format.c (maybe_read_dollar_number): Compute nargnum in
468 HOST_WIDE_INT type to avoid overflows and change overflow_flag
469 checking.
470
921bb9d1
RB
4712019-02-22 Richard Biener <rguenther@suse.de>
472
473 * c-pch.c (no_checksum): Remove.
474 (pch_init): Remove assertion that executable_checksum is not
475 all zero.
476 (c_common_valid_pch): Likewise.
477
e2ebb05c
MS
4782019-02-18 Martin Sebor <msebor@redhat.com>
479
480 PR middle-end/89294
481 * c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
482
3fe53000
DM
4832019-02-16 David Malcolm <dmalcolm@redhat.com>
484
485 PR c++/88680
486 * c-common.c (shorten_compare): Call fold_for_warn on op0 when
487 implementing -Wtype-limits.
488
28a8cef1
MS
4892019-02-11 Martin Sebor <msebor@redhat.com>
490
491 PR c++/87996
492 * c-common.c (invalid_array_size_error): New function.
493 (valid_array_size_p): Call it. Handle size as well as type.
494 * c-common.h (valid_constant_size_p): New function.
495 (enum cst_size_error): New type.
496
ec2be203
DM
4972019-01-31 David Malcolm <dmalcolm@redhat.com>
498
499 PR c/89122
500 * known-headers.cc (get_stdlib_header_for_name): Add
501 {FLT|DBL|LDBL}_{MAX|MIN} to "hints" array.
502
8936f047
JJ
5032019-01-31 Jakub Jelinek <jakub@redhat.com>
504
505 PR libstdc++/88170
506 * c-pretty-print.c (pp_c_enumeration_constant): Print always as
507 a C cast in pp_c_flag_gnu_v3 mode.
508
6a335b96
JJ
5092019-01-29 Jakub Jelinek <jakub@redhat.com>
510
511 PR c/86125
512 * c-common.c (c_common_nodes_and_builtins): Build type variants for
513 builtin_structptr_types types even for C.
514
2a06eba5
BE
5152019-01-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
516
517 * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
518 when rhs is of array type correctly. Fix handling of nested structures.
519 Fix handling of indirect_ref together with nop_expr and/or addr_expr.
520 (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
521 type casts within nested compound expressions.
522
18a23298
JJ
5232019-01-22 Jakub Jelinek <jakub@redhat.com>
524
525 PR middle-end/88968
526 * c-omp.c (c_finish_omp_atomic): For bitfield atomics, update type
527 variable after using BIT_FIELD_REF.
528
420183d9
L
5292019-01-18 H.J. Lu <hongjiu.lu@intel.com>
530
531 PR c/51628
532 PR c/88664
533 * c-common.h (warn_for_address_or_pointer_of_packed_member):
534 Remove the boolean argument.
535 * c-warn.c (check_address_of_packed_member): Renamed to ...
536 (check_address_or_pointer_of_packed_member): This. Also
537 warn pointer conversion.
538 (check_and_warn_address_of_packed_member): Renamed to ...
539 (check_and_warn_address_or_pointer_of_packed_member): This.
540 Also warn pointer conversion.
541 (warn_for_address_or_pointer_of_packed_member): Remove the
542 boolean argument. Don't check pointer conversion here.
543
99063eee
RS
5442019-01-15 Richard Sandiford <richard.sandiford@arm.com>
545
546 PR inline-asm/52813
547 * c.opt (Wdeprecated): Move documentation and variable to common.opt.
548
a30d0196
JJ
5492019-01-14 Jakub Jelinek <jakub@redhat.com>
550
551 * c-cppbuiltin.c (c_cpp_builtin): Define __cpp_guaranteed_copy_elision
552 and __cpp_nontype_template_parameter_auto. Add a comment that
553 __cpp_template_auto is deprecated.
554
2d91f79d
TH
5552019-01-14 Tom Honermann <tom@honermann.net>
556
557 Implement P0482R5, char8_t: A type for UTF-8 characters and strings
558 * c-common.c (c_common_reswords): Add char8_t.
559 (fix_string_type): Use char8_t for the type of u8 string literals.
560 (c_common_get_alias_set): char8_t doesn't alias.
561 (c_common_nodes_and_builtins): Define char8_t as a builtin type in
562 C++.
563 (c_stddef_cpp_builtins): Add __CHAR8_TYPE__.
564 (keyword_begins_type_specifier): Add RID_CHAR8.
565 * c-common.h (rid): Add RID_CHAR8.
566 (c_tree_index): Add CTI_CHAR8_TYPE and CTI_CHAR8_ARRAY_TYPE.
567 Define D_CXX_CHAR8_T and D_CXX_CHAR8_T_FLAGS.
568 Define char8_type_node and char8_array_type_node.
569 * c-cppbuiltin.c (cpp_atomic_builtins): Predefine
570 __GCC_ATOMIC_CHAR8_T_LOCK_FREE.
571 (c_cpp_builtins): Predefine __cpp_char8_t.
572 * c-lex.c (lex_string): Use char8_array_type_node as the type of
573 CPP_UTF8STRING.
574 (lex_charconst): Use char8_type_node as the type of CPP_UTF8CHAR.
575 * c-opts.c: If not otherwise specified, enable -fchar8_t when
576 targeting C++2a.
577 * c.opt: Add the -fchar8_t command line option.
578
23db6ced
MS
5792019-01-14 Martin Sebor <msebor@redhat.com>
580
581 PR target/88638
582 * c-attribs.c (positional_argument): Call valid_format_string_type_p
583 and issue errors if it fails.
584 * c-common.h (valid_format_string_type_p): Declare.
585 * c-format.c (valid_stringptr_type_p): Rename...
586 (valid_format_string_type_p): ...to this and make extern.
587 (handle_format_arg_attribute): Adjust to new name.
588 (check_format_string): Same.
589
234c3818
L
5902019-01-13 H.J. Lu <hongjiu.lu@intel.com>
591
592 * c-warn.c (warn_for_address_or_pointer_of_packed_member):
593 Replace "may may" with "may" in warning message.
594
d8fcab68
JJ
5952019-01-07 Jakub Jelinek <jakub@redhat.com>
596
597 PR c++/85052
598 * c-common.h (enum rid): Add RID_BUILTIN_CONVERTVECTOR.
599 (c_build_vec_convert): Declare.
600 * c-common.c (c_build_vec_convert): New function.
601
29d24852
MS
6022019-01-04 Martin Sebor <msebor@redhat.com>
603
604 PR c/88546
605 * c-attribs.c (handle_copy_attribute): Avoid copying attribute leaf.
606 Handle C++ empty throw specification and C11 _Noreturn.
607 (has_attribute): Also handle C11 _Noreturn.
608
9069a4c9
MS
6092019-01-04 Martin Sebor <msebor@redhat.com>
610
611 PR c/88363
612 * c-attribs.c (positional_argument): Also accept enumerated types.
613
a5544970
JJ
6142019-01-01 Jakub Jelinek <jakub@redhat.com>
615
616 Update copyright years.
617
da77eace
L
6182018-12-20 H.J. Lu <hongjiu.lu@intel.com>
619
620 PR c/51628
621 * c-common.h (warn_for_address_or_pointer_of_packed_member): New.
622 * c-warn.c (check_alignment_of_packed_member): New function.
623 (check_address_of_packed_member): Likewise.
624 (check_and_warn_address_of_packed_member): Likewise.
625 (warn_for_address_or_pointer_of_packed_member): Likewise.
626 * c.opt: Add -Wno-address-of-packed-member.
627
573767d4
DM
6282018-12-20 David Malcolm <dmalcolm@redhat.com>
629
630 PR c++/87504
631 * c-warn.c (get_outermost_macro_expansion): New function.
632 (spelled_the_same_p): Use it to unwind the macro expansions, and
633 compare the outermost macro in each nested expansion, rather than
634 the innermost.
635
a14feb3c
DM
6362018-12-19 David Malcolm <dmalcolm@redhat.com>
637
638 PR c++/87504
639 * c-common.h (warn_tautological_cmp): Convert 1st param from
640 location_t to const op_location_t &.
641 * c-warn.c (find_array_ref_with_const_idx_r): Call fold_for_warn
642 when testing for INTEGER_CST.
643 (warn_tautological_bitwise_comparison): Convert 1st param from
644 location_t to const op_location_t &; use it to build a
645 binary_op_rich_location, and use this.
646 (spelled_the_same_p): New function.
647 (warn_tautological_cmp): Convert 1st param from location_t to
648 const op_location_t &. Warn for macro expansions if
649 spelled_the_same_p. Use binary_op_rich_location.
650
dfd7fdca
DM
6512018-12-19 David Malcolm <dmalcolm@redhat.com>
652
653 PR c++/43064
654 PR c++/43486
655 * c-common.c (unsafe_conversion_p): Fold any location wrapper.
656 (verify_tree): Handle location wrappers.
657 (c_common_truthvalue_conversion): Strip any location wrapper.
658 Handle CONST_DECL.
659 (fold_offsetof): Strip any location wrapper.
660 (complete_array_type): Likewise for initial_value.
661 (convert_vector_to_array_for_subscript): Call fold_for_warn on the
662 index before checking for INTEGER_CST.
663 * c-pretty-print.c (c_pretty_printer::primary_expression): Don't
664 print parentheses around location wrappers.
665 * c-warn.c (warn_logical_operator): Call fold_for_warn on op_right
666 before checking for INTEGER_CST.
667 (warn_tautological_bitwise_comparison): Call
668 tree_strip_any_location_wrapper on lhs, rhs, and bitop's operand
669 before checking for INTEGER_CST.
670 (readonly_error): Strip any location wrapper.
671 (warn_array_subscript_with_type_char): Strip location wrappers
672 before checking for INTEGER_CST. Use the location of the index if
673 available.
674
5c8b3702
JM
6752018-12-06 Jason Merrill <jason@redhat.com>
676
677 PR c++/88136 - -Wdeprecated-copy false positives
678 * c.opt (Wdeprecated-copy-dtor): New.
679 (Wdeprecated-copy): Move to -Wextra.
680
673670da
MS
6812018-11-29 Martin Sebor <msebor@redhat.com>
682
683 PR c/88172
684 PR testsuite/88208
685 * c-attribs.c (common_handle_aligned_attribute): Silently avoid setting
686 alignments to values less than the target requires.
687 (has_attribute): For attribute aligned consider both the attribute
688 and the alignment bits.
689 * c-common.c (c_init_attributes): Optionally issue a warning for
690 zero alignment.
691
04864ec8
MS
6922018-11-28 Martin Sebor <msebor@redhat.com>
693
694 PR c/88065
695 PR c/87297
696 * c-warn.c (sizeof_pointer_memaccess_warning): Bail if source
697 or destination is an error.
698
ace83db0
JJ
6992018-11-28 Jakub Jelinek <jakub@redhat.com>
700
701 PR c++/88215
702 * c-ubsan.c: Include langhooks.h.
703 (ubsan_instrument_division): Change gcc_assert that main variants
704 of op0 and op1 types are equal to gcc_checking_assert that the
705 main variants are compatible types.
706
da193a27
EB
7072018-11-27 Eric Botcazou <ebotcazou@adacore.com>
708
709 * c-ada-spec.c: Include stringpool.h.
710 (has_static_fields): Return false for incomplete types.
711 (is_tagged_type): Likewise.
712 (has_nontrivial_methods): Likewise.
713 (dump_ada_node) <INTEGER_TYPE>: Deal specifically with __int128.
714 (struct overloaded_name_hash): New structure.
715 (struct overloaded_name_hasher): Likewise.
716 (overloaded_names): New global variable.
717 (init_overloaded_names): New static function.
718 (overloaded_name_p): New predicate.
719 (dump_ada_declaration) <TYPE_DECL>: Tidy up and set TREE_VISITED
720 on the TYPE_STUB_DECL of the original type of a typedef, if any.
721 <FUNCTION_DECL>: Bail out for an unsupported overloaded name.
722 Remove always-true condition and dump forward types.
723 (dump_ada_specs): Delete overloaded_names.
724
98f08eb8
MS
7252018-11-20 Martin Sebor <msebor@redhat.com>
726
727 * c-attribs.c (type_for_vector_size): New function.
728 (type_valid_for_vector_size): Same.
729 (handle_vector_size_attribute): Move code to the functions above
730 and call them.
731 (validate_attribute, has_attribute): New functions.
732 * c-common.h (has_attribute): Declare.
733 (rid): Add RID_HAS_ATTRIBUTE_EXPRESSION.
734 * c-common.c (c_common_resword): Same.
735
2674fa47
JM
7362018-11-16 Jason Merrill <jason@redhat.com>
737
738 * c-lex.c (c_common_has_attribute): Handle likely/unlikely.
739 * c-attribs.c (attr_cold_hot_exclusions): Make public.
740
258b3854
JJ
7412018-11-16 Jakub Jelinek <jakub@redhat.com>
742
743 PR middle-end/87854
744 * c-common.c (fix_string_type): Reject string literals larger than
745 TYPE_MAX_VALUE (ssizetype) bytes.
746
1d249509
MS
7472018-11-15 Martin Sebor <msebor@redhat.com>
748
749 PR c++/87541
750 PR c++/87542
751 * c-attribs.c (positional_argument): New function.
752 (handle_alloc_size_attribute): Use it and simplify.
753 (handle_alloc_align_attribute): Same.
754 (handle_assume_aligned_attribute): Same.
755 (handle_nonnull_attribute): Same.
756 * c-common.c (check_function_arguments): Pass fntype to
757 check_function_format.
758 * c-common.h (check_function_format): Add an argument.
759 (PosArgFlags, positional_argument): Declare new type and function.
760 * c-format.c (decode_format_attr): Add arguments.
761 (check_format_string, get_constant): Same.
762 (convert_format_name_to_system_name): Adjust.
763
478dd60d
DM
7642018-11-15 David Malcolm <dmalcolm@redhat.com>
765
766 PR other/19165
767 * c-opts.c (c_diagnostic_finalizer): Add diagnostic_t param.
768
8cca0163
JJ
7692018-11-14 Jakub Jelinek <jakub@redhat.com>
770
8ee09943
JJ
771 P1236R1 - Signed integers are two's complement
772 * c-warn.c (maybe_warn_shift_overflow): Don't warn for c++2a.
773 * c-ubsan.c (ubsan_instrument_shift): Make signed shifts
774 with in-range second operand well defined for -std=c++2a.
775
8cca0163
JJ
776 PR other/88007
777 * c-common.c (parse_optimize_options): Allocate option string from
778 opts_obstack rather than as GC memory. Move the allocation after
779 warning for invalid option.
780
620e594b
DM
7812018-11-13 David Malcolm <dmalcolm@redhat.com>
782
783 * c-common.c (c_get_substring_location): Update for renaming of
784 get_source_location_for_substring to get_location_within_string.
785 * c-lex.c: Replace "source_location" with "location_t".
786 * c-opts.c: Likewise.
787 * c-ppoutput.c: Likewise.
788
f9731de3
MS
7892018-11-13 Martin Sebor <msebor@redhat.com>
790
791 PR middle-end/81824
792 * c-attribs.c (handle_copy_attribute): Exclude inlining attributes.
793 (handle_tls_model_attribute): Improve diagnostics.
794
e4bd6d5e
JM
7952018-11-12 Jason Merrill <jason@redhat.com>
796
a6bb6b07
JM
797 * c-cppbuiltin.c (c_cpp_builtins): Define
798 __cpp_impl_destroying_delete.
799
e4bd6d5e
JM
800 * c-cppbuiltin.c (c_cpp_builtins): Change __cpp_explicit_bool to
801 __cpp_conditional_explicit.
802
79a2c428
MS
8032018-11-09 Martin Sebor <msebor@redhat.com>
804
805 PR middle-end/81824
806 * c-attribs.c (handle_copy_attribute): New function.
807
4c7bd361
MS
8082018-11-09 Martin Sebor <msebor@redhat.com>
809
810 PR c/87795
811 * c-common.c (check_user_alignment): Use MAX_OFILE_ALIGNMENT.
812
28567c40
JJ
8132018-11-08 Jakub Jelinek <jakub@redhat.com>
814
815 * c-common.h (c_finish_omp_taskgroup): Add CLAUSES argument.
816 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
817 enum omp_memory_order MEMORY_ORDER.
818 (c_finish_omp_flush): Add MO argument.
819 (c_omp_depend_t_p, c_finish_omp_depobj): Declare.
820 (c_finish_omp_for): Add FINAL_P argument.
821 * c-omp.c: Include memmodel.h.
822 (c_finish_omp_taskgroup): Add CLAUSES argument. Set
823 OMP_TASKGROUP_CLAUSES to it.
824 (c_finish_omp_atomic): Replace bool SEQ_CST argument with
825 enum omp_memory_order MEMORY_ORDER. Set OMP_ATOMIC_MEMORY_ORDER
826 instead of OMP_ATOMIC_SEQ_CST.
827 (c_omp_depend_t_p, c_finish_omp_depobj): New functions.
828 (c_finish_omp_flush): Add MO argument, if not MEMMODEL_LAST, emit
829 __atomic_thread_fence call with the given value.
830 (check_omp_for_incr_expr): Formatting fixes.
831 (c_finish_omp_for): Add FINAL_P argument. Allow NE_EXPR
832 even in OpenMP loops, diagnose if NE_EXPR and incr expression
833 is not constant expression 1 or -1. Transform NE_EXPR loops
834 with iterators pointers to VLA into LT_EXPR or GT_EXPR loops.
835 (c_omp_check_loop_iv_r): Look for orig decl of C++ range for
836 loops too.
837 (c_omp_split_clauses): Add support for combined
838 #pragma omp parallel master and
839 #pragma omp {,parallel }master taskloop{, simd} constructs.
840 Handle OMP_CLAUSE_IN_REDUCTION. Handle OMP_CLAUSE_REDUCTION_TASK.
841 Handle OMP_CLAUSE_NONTEMPORAL. Handle splitting OMP_CLAUSE_IF
842 also to OMP_SIMD. Copy OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
843 (c_omp_predetermined_sharing): Don't return
844 OMP_CLAUSE_DEFAULT_SHARED for const qualified decls.
845 * c-pragma.c (omp_pragmas): Add PRAGMA_OMP_DEPOBJ and
846 PRAGMA_OMP_REQUIRES.
847 * c-pragma.h (enum pragma_kind): Likewise.
848 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_NONTEMPORAL
849 and PRAGMA_OMP_CLAUSE_{IN,TASK}_REDUCTION.
850
204839e7
DM
8512018-11-08 David Malcolm <dmalcolm@redhat.com>
852
853 * c-format.c (gcc_dump_printf_char_table): Add entry for %f.
854
d8010ee4
DM
8552018-11-08 David Malcolm <dmalcolm@redhat.com>
856
857 * c-format.c (local_cgraph_node_ptr_node): New variable.
858 (gcc_dump_printf_char_table): Add entry for %C.
859 (get_pointer_to_named_type): New function, taken from the handling
860 code for "gimple *" from...
861 (init_dynamic_diag_info): ...here. Add handling for
862 "cgraph_node *".
863 * c-format.h (T_CGRAPH_NODE): New.
864
4be5c72c
JM
8652018-10-19 Jason Merrill <jason@redhat.com>
866
867 * c-cppbuiltin.c (c_cpp_builtins): Add
868 __cpp_nontype_template_parameter_class.
869
f3f6029d
NS
8702018-10-31 Nathan Sidwell <nathan@acm.org>
871
ab5324fb
NS
872 * c-opts.c (c_finish_options): Force command line macro
873 location. Refactor to avoid repeating main debug hook.
874 (push_command_line_include): Clarify comment.
875
f3f6029d
NS
876 * c-opts.c (c_finish_options): Adjust cpp_force_token_locations call.
877
91e3ec29
MS
8782018-10-30 Martin Sebor <msebor@redhat.com>
879
880 PR middle-end/87041
881 * c-format.c (check_format_types): Avoid diagnosing null pointer
882 arguments to printf-family of functions.
883
b5ff4f5c
MP
8842018-10-30 Marek Polacek <polacek@redhat.com>
885
886 Implement P0892R2, explicit(bool).
887 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_explicit_bool.
888
7e2de6df
DM
8892018-10-29 David Malcolm <dmalcolm@redhat.com>
890
891 * name-hint.h (name_hint::take_deferred): New member function.
892
b2bf438c
DM
8932018-10-29 David Malcolm <dmalcolm@redhat.com>
894
895 PR c++/56856
896 * c-common.c (check_function_sentinel): Call fold_for_warn on the
897 argument.
898 (check_function_restrict): Rename param "argarray" to
899 "unfolded_argarray", and make a copy named "argarray", calling
900 fold_for_warn on each argument.
901 (check_function_arguments): Add note about responsibility for
902 folding the arguments.
903
9f936c86
JM
9042018-10-17 Joseph Myers <joseph@codesourcery.com>
905
906 * c-common.c (flag_isoc2x): New variable.
907 * c-common.h (clk_c): Update comment to reference C2X.
908 (flag_isoc99, flag_isoc11): Update comments to reference future
909 standard versions in general.
910 (flag_isoc2x): Declare.
911 * c-opts.c (set_std_c2x): New function.
912 (c_common_handle_option): Handle -std=c2x and -std=gnu2x.
913 (set_std_c89, set_std_c99, set_std_c11, set_std_c17): Set
914 flag_isoc2x to 0.
915 * c.opt (Wc11-c2x-compat, std=c2x, std=gnu2x): New options.
916
7a8a92c4
JM
9172018-10-17 Joseph Myers <joseph@codesourcery.com>
918
919 * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017)
920 (std=iso9899:2018): Document C17 as published in 2018.
921
4dc003ff
CL
9222018-10-12 Christophe Lyon <christophe.lyon@linaro.org>
923
924 PR c++/87364
925 * c-pretty-print.c (c_pretty_printer::constant): Fix typo.
926
79371671
WW
9272018-10-11 Will Wray <wjwray@gmail.com>
928
929 PR c++/87364
930 * c-pretty-print.h (pp_c_type_cast): Prototype.
931 (pp_c_integer_constant): Likewise.
932 * c-pretty-print.c (pp_c_type_cast): No longer static.
933 (pp_c_integer_constant): Likewise.
934 (pp_c_enumeration_constant): Fix loop termination when finding
935 name of constant. No longer returns a value. Call
936 pp_c_integer_constant.
937 (c_pretty_printer::constant): Update for changes to
938 pp_c_enumeration_constant.
939
46c62690
JJ
9402018-10-11 Jakub Jelinek <jakub@redhat.com>
941
942 * c-lex.c (c_common_has_attribute): Return 201803 instead of 20180312
943 for no_unique_address.
944
c24300ba
DM
9452018-10-09 David Malcolm <dmalcolm@redhat.com>
946
947 * c-common.c (c_option_controlling_cpp_error): Rename to...
948 (c_option_controlling_cpp_diagnostic): ...this, and convert
949 "reason" from int to enum.
950 (c_cpp_error): Rename to...
951 (c_cpp_diagnostic): ...this, converting level and reason to enums.
952 * c-common.h (c_cpp_error): Rename to...
953 (c_cpp_diagnostic): ...this, converting level and reason to enums.
954 * c-opts.c (c_common_init_options): Update for renaming.
955
8656dafa
RS
9562018-10-08 Richard Sandiford <richard.sandiford@arm.com>
957
958 PR c/87286
959 * c-common.c (vector_types_compatible_elements_p): Use
960 INTEGRAL_TYPE_P instead of checking only for INTEGER_TYPE.
961
8cff0652
VK
9622018-10-04 Vinay Kumar <vinay.kumar@blackfigtech.com>
963
964 * c-attribs.c (get_priority): Add a warning flag warn_prio_ctor_dtor
965 to generate constructor destructor priority warning.
966 * c.opt (-Wprio-ctor-dtor): New option.
967
bedf03a2
JM
9682018-10-01 Jason Merrill <jason@redhat.com>
969
970 * c-lex.c (c_common_has_attribute): Add no_unique_address.
971
6cc430c1
EB
9722018-10-01 Eric Botcazou <ebotcazou@adacore.com>
973
974 * c-ada-spec.c (get_underlying_decl): Get to the main type variant.
975 (dump_ada_node): Add const keyword.
976
87677ac7
ML
9772018-09-25 Martin Liska <mliska@suse.cz>
978
979 * c-common.c (c_common_truthvalue_conversion):
980 Remove Pascal from documentation.
981
518196cb
EB
9822018-09-21 Eric Botcazou <ebotcazou@adacore.com>
983
984 * c-ada-spec.c: Include diagnostic.h.
985 (dump_ada_declaration) <RECORD_TYPE>: Issue a warning on packed layout.
986
a599af84
MP
9872018-09-19 Marek Polacek <polacek@redhat.com>
988
989 * c.opt (Wclass-conversion): New.
990
9c4a4b3c
DM
9912018-09-17 David Malcolm <dmalcolm@redhat.com>
992
993 * c-format.c (range_label_for_format_type_mismatch::get_text):
994 Update for new param.
995
c896ecfe
DM
9962018-09-17 David Malcolm <dmalcolm@redhat.com>
997
998 * c-format.c (format_warning_at_char): Update for introduction of
999 format_string_diagnostic_t.
1000 (format_type_warning): Likewise.
1001
80c6d1f4
MJ
10022018-09-17 Martin Jambor <mjambor@suse.cz>
1003
1004 PR c/63886
1005 * c.opt (Wabsolute-value): New.
1006
6d900107
BE
10072018-09-06 Bernd Edlinger <bernd.edlinger@hotmail.de>
1008
1009 * c-common.c (complete_flexible_array_elts): New helper function.
1010 * c-common.h (complete_flexible_array_elts): Declare.
1011
b5764229
BE
10122018-09-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
1013
1014 * c-common.c (braced_list_to_string): Remove eval parameter.
1015 Add some more checks. Always create zero-terminated STRING_CST.
1016 * c-common.h (braced_list_to_string): Adjust prototype.
1017
85204e23
DM
10182018-08-27 David Malcolm <dmalcolm@redhat.com>
1019
1020 PR 87091
1021 * c-common.c (c_cpp_error): Update for conversion of show_caret_p
1022 to a tri-state.
1023 (maybe_suggest_missing_token_insertion): Likewise.
1024 (maybe_add_include_fixit): Add param "override_location". If set,
1025 and source-printing is enabled, then override the rich_location's
1026 primary location with that of the insertion point for the fix-it
1027 hint, marking it with SHOW_LINES_WITHOUT_RANGE.
1028 * c-common.h (extern void maybe_add_include_fixit): Add bool
1029 param.
1030 * c-format.c (selftest::test_type_mismatch_range_labels): Update
1031 for conversion of show_caret_p to a tri-state.
1032 * c-warn.c (warn_for_restrict): Likewise.
1033 * known-headers.cc
1034 (suggest_missing_header::~suggest_missing_header): Update call to
1035 maybe_add_include_fixit to suggest overriding the location, as it
1036 is for a note.
1037
3d78e008
ML
10382018-08-27 Martin Liska <mliska@suse.cz>
1039
1040 * c-common.c (check_function_restrict): Use new function
92a285c1
ML
1041 fndecl_built_in_p and remove check for FUNCTION_DECL if
1042 possible.
3d78e008
ML
1043 (check_builtin_function_arguments): Likewise.
1044 (reject_gcc_builtin): Likewise.
1045 * c-warn.c (sizeof_pointer_memaccess_warning): Likewise.
1046
b5be6d0c
MP
10472018-08-26 Marek Polacek <polacek@redhat.com>
1048
1049 PR c++/87029, Implement -Wredundant-move.
1050 * c.opt (Wredundant-move): New option.
1051
79ca9c35
MP
10522018-08-21 Marek Polacek <polacek@redhat.com>
1053
1054 PR c++/86981, Implement -Wpessimizing-move.
1055 * c.opt (Wpessimizing-move): New option.
1056
097f82ec
DM
10572018-08-20 David Malcolm <dmalcolm@redhat.com>
1058
1059 PR other/84889
1060 * c-attribs.c (common_handle_aligned_attribute): Add
1061 auto_diagnostic_group instance.
1062 * c-indentation.c (warn_for_misleading_indentation): Likewise.
1063 * c-opts.c (c_common_post_options): Likewise.
1064 * c-warn.c (warn_logical_not_parentheses): Likewise.
1065 (warn_duplicated_cond_add_or_warn): Likewise.
1066 (warn_for_multistatement_macros): Likewise.
1067
3fb558b1
NS
10682018-08-20 Nathan Sidwell <nathan@acm.org>
1069
1070 * c-ada-spec.c (macro_length, dump_ada_macros): Adjust macro parm
1071 access.
1072
800c0e98
NS
10732018-08-17 Nathan Sidwell <nathan@acm.org>
1074
1075 * c-cppbuiltin.c (struct lazy_hex_fp_value_struct): Remove macro
1076 field.
1077 (laxy_hex_fp_value_count): Make unsigned.
1078 (lazy_hex_fp_value): Provided with macro & lazy number. Directly
1079 manipulate the macro.
1080 (builtin_defin_with_hex_fp_value): Adjust callback name, use
1081 cpp_define_lazily.
1082
6f795a92
DM
10832018-08-17 David Malcolm <dmalcolm@redhat.com>
1084
1085 * c-format.c (enum format_type): Add gcc_dump_printf_format_type.
1086 (gcc_dump_printf_length_specs): New.
1087 (gcc_dump_printf_flag_pairs): New.
1088 (gcc_dump_printf_flag_specs): New.
1089 (gcc_dump_printf_char_table): New.
1090 (format_types_orig): Add entry for "gcc_dump_printf".
1091 (init_dynamic_diag_info): Set up length_char_specs and
1092 conversion_specs for gcc_dump_printf_format_type.
1093 (handle_format_attribute): Handle gcc_dump_printf_format_type.
1094
c5d725c0
NS
10952018-08-17 Nathan Sidwell <nathan@acm.org>
1096
10f04917
NS
1097 * c-ada-spec.c (macro_length, dump_ada_macros): Constify.
1098
c5d725c0
NS
1099 * c-ada-spec.c: Don't #include "cpp-id-data.h"
1100 * c-cppbuiltin.c: Likewise.
1101
c0c12356
ML
11022018-08-17 Martin Liska <mliska@suse.cz>
1103
1104 * c.opt: Remove Warn, Init and Report for options with
92a285c1
ML
1105 Ignore/Deprecated flag. Warning is done automatically for
1106 Deprecated flags.
c0c12356 1107
10fcc142
DM
11082018-08-16 David Malcolm <dmalcolm@redhat.com>
1109
1110 PR c++/70693
1111 * c-common.c (selftest::c_family_tests): Call
1112 selftest::c_indentation_c_tests.
1113 * c-common.h (selftest::c_indentation_c_tests): New decl.
1114 * c-indentation.c: Include "selftest.h".
1115 (next_tab_stop): Add "tab_width" param, rather than accessing
1116 cpp_opts.
1117 (get_visual_column): Likewise. Clarify comment. Bulletproof
1118 against reading past the end of the line.
1119 (get_first_nws_vis_column): Add "tab_width" param.
1120 (detect_intervening_unindent): Likewise.
1121 (should_warn_for_misleading_indentation): Read tab width from
1122 cpp_opts and pass around.
1123 (selftest::test_next_tab_stop): New test.
1124 (selftest::assert_get_visual_column_succeeds): New function.
1125 (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro.
1126 (selftest::assert_get_visual_column_fails): New function.
1127 (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro.
1128 (selftest::test_get_visual_column): New test.
1129 (selftest::c_indentation_c_tests): New function.
1130
3f6677f4
NS
11312018-08-16 Nathan Sidwell <nathan@acm.org>
1132
1133 * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p.
1134 (store_ada_macro): Likewise.
1135 * c-ppoutput.c (cb_used_define, dump_macro): Likewise.
1136 * c-spellcheck.cc (should-suggest_as_macro_p): Likewise,
1137
96e6ae57
DM
11382018-08-15 David Malcolm <dmalcolm@redhat.com>
1139
1140 * c-format.c: Include "selftest-diagnostic.h" and
1141 "gcc-rich-location.h".
1142 (format_warning_at_char): Pass NULL for new label params of
1143 format_warning_va.
1144 (class indirection_suffix): New class.
1145 (class range_label_for_format_type_mismatch): New class.
1146 (format_type_warning): Move logic for generating "*" suffix to
1147 class indirection_suffix. Create "fmt_label" and "param_label"
1148 to show their types, and pass them to the
1149 format_warning_at_substring calls.
1150 (selftest::test_type_mismatch_range_labels): New test.
1151 (selftest::c_format_c_tests): Call it.
1152
23aa9f7c
MS
11532018-08-13 Martin Sebor <msebor@redhat.com>
1154
1155 PR tree-optimization/71625
1156 * c-common.c (braced_list_to_string): New function.
1157 * c-common.h (braced_list_to_string): Declare it.
1158
f10a9135
NS
11592018-08-08 Nathan Sidwell <nathan@acm.org>
1160
1161 * c-common.c (try_to_locate_new_include_inertion_point): Use
1162 linemap_included_from_linemap.
1163 * c-lex.c (fe_file_change): Use linemap_included_from.
1164 * c-ppoutput.c (pp_file_change): Likewise.
1165
8a45b051
MS
11662018-08-01 Martin Sebor <msebor@redhat.com>
1167
1168 PR tree-optimization/86650
ab20d992 1169 * c-format.c (gcc_tdiag_char_table): Update comment for "%G".
8a45b051
MS
1170 (gcc_cdiag_char_table, gcc_cxxdiag_char_table): Same.
1171 (init_dynamic_diag_info): Update from "gcall *" to "gimple *".
1172 * c-format.h (T89_G): Update to be "gimple *" rather than
1173 "gcall *".
1174 (local_gcall_ptr_node): Rename...
1175 (local_gimple_ptr_node): ...to this.
1176
e540ccc0
DM
11772018-07-31 David Malcolm <dmalcolm@redhat.com>
1178
1179 * c-format.c (PP_FORMAT_CHAR_TABLE): New macro, based on existing
1180 table entries for gcc_diag_char_table, and the 'Z' entry from
1181 gcc_tdiag_char_table, changing the "chain" entry for 'Z' from
1182 &gcc_tdiag_char_table[0] to &gcc_diag_char_table[0].
1183 (gcc_diag_char_table): Use PP_FORMAT_CHAR_TABLE, implicitly
1184 adding missing "Z" for this table. Remove erroneous "G" and "K"
1185 entries.
1186 (gcc_tdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1187 (gcc_cdiag_char_table): Use PP_FORMAT_CHAR_TABLE.
1188 (gcc_cxxdiag_char_table): Use PP_FORMAT_CHAR_TABLE. Remove "v".
1189
425fc685
RE
11902018-07-31 Richard Earnshaw <rearnsha@arm.com>
1191
1192 * c-common.c (speculation_safe_resolve_call): New function.
1193 (speculation_safe_resolve_params): New function.
1194 (speculation_safe_resolve_return): New function.
1195 (resolve_overloaded_builtin): Handle __builtin_speculation_safe_value.
1196 * c-cppbuiltin.c (c_cpp_builtins): Add pre-define for
1197 __HAVE_SPECULATION_SAFE_VALUE.
1198
181463c2
DM
11992018-07-20 David Malcolm <dmalcolm@redhat.com>
1200
1201 * c-common.c (c_cpp_error): Remove redundant "line_table"
1202 parameter from call to rich_location::set_range.
1203 (maybe_suggest_missing_token_insertion): Likewise.
1204
0d7f9065
MS
12052018-07-20 Martin Sebor <msebor@redhat.com>
1206
1207 PR middle-end/82063
ab20d992 1208 * c.opt (-Warray-bounds): Remove redundant -Wall.
0d7f9065 1209
00abf86c
MS
12102018-07-20 Martin Sebor <msebor@redhat.com>
1211
1212 PR middle-end/82063
1213 * c-common.h (c_common_handle_option): Change function argument
1214 to HOST_WIDE_INT.
1215 * c-opts.c (c_common_init_options): Same.
1216 (c_common_handle_option): Same. Remove special handling of
1217 OPT_Walloca_larger_than_ and OPT_Wvla_larger_than_.
1218 * c.opt (-Walloc-size-larger-than, -Walloca-larger-than): Change
1219 options to take a HOST_WIDE_INT argument and accept a byte-size
1220 suffix. Initialize.
1221 (-Wvla-larger-than): Same.
1222 (-Wno-alloc-size-larger-than, -Wno-alloca-larger-than): New.
1223 (-Wno-vla-larger-than): Same.
1224
9b452033
JJ
12252018-07-12 Jakub Jelinek <jakub@redhat.com>
1226
1227 * c-attribs.c (c_common_attribute_table): Add
1228 "omp declare target implicit" attribute.
1229
cd0762f3
RB
12302018-07-12 Richard Biener <rguenther@suse.de>
1231
1232 PR c/86453
1233 * c-attribs.c (handle_packed_attribute): Do not build a variant
1234 type with TYPE_PACKED, instead ignore the attribute if we may
1235 not apply to the original type.
1236
0b27c3ed
JJ
12372018-07-10 Jakub Jelinek <jakub@redhat.com>
1238
1239 PR c++/86443
1240 * c-omp.c (c_omp_check_loop_iv_r, c_omp_check_loop_iv): Allow declv
1241 to contain TREE_LIST for both the original class iterator and the
1242 "last" helper var.
1243
e730a0ef
EB
12442018-07-07 Eric Botcazou <ebotcazou@adacore.com>
1245
1246 * c-ada-spec.c (to_ada_name): Remove index parameter.
1247 (pp_ada_tree_identifier): Likewise.
1248 (dump_ada_macros): Adjust call to to_ada_name.
1249 (struct overloaded_name_hash): Delete.
1250 (struct overloaded_name_hasher): Likewise.
1251 (overloaded_names): Likewise.
1252 (compute_overloading_index): Likewise.
1253 (dump_ada_decl_name): Do not call compute_overloading_index and
1254 adjust calls to pp_ada_tree_identifier.
1255 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
1256 (dump_ada_import): Add spc parameter and switch to aspect syntax.
1257 (dump_ada_function_declaration): Adjust call to pp_ada_tree_identifier.
1258 (dump_ada_enum_type): Remove type and display_convention parameters.
1259 Adjust calls to pp_ada_tree_identifier.
1260 (dump_ada_node): Likewise and for dump_ada_structure.
1261 (dump_nested_type) <ENUMERAL_TYPE>: Adjust call to dump_ada_enum_type
1262 and tidy up.
1263 <RECORD_TYPE>: Adjust call to dump_ada_structure and switch to aspect
1264 syntax.
1265 (print_constructor): Adjust call to pp_ada_tree_identifier.
1266 (print_destructor): Likewise.
1267 (dump_ada_declaration): Switch to aspect syntax.
1268 (dump_ada_structure): Likewise and tidy up. Replace display_convention
1269 parameter with nested parameter.
1270 (dump_ads): Emit pragma Ada_2012 in lieu of pragma Ada_2005.
1271 (dump_ada_specs): Do not delete overloaded_names table.
1272
8de583fc
PB
12732018-07-06 Peter Bergner <bergner@linux.ibm.com>
1274
1275 PR target/86324
e730a0ef 1276 * c-attribs.c (handle_mode_attribute): Call translate_mode_attribute
8de583fc
PB
1277 target hook.
1278
09cff37b
NS
12792018-07-05 Nathan Sidwell <nathan@acm.org>
1280
1281 * c-lex.c (fe_file_change): Check SYSTEM_IMPLICIT_EXTERN_C not
1282 NO_IMPLICIT_EXTERN_C.
1283
98086b2b
ML
12842018-06-28 Martin Liska <mliska@suse.cz>
1285
1286 * cppspec.c: Include opt-suggestions.h.
1287
ab20d992
JJ
12882018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1289 Thomas Schwinge <thomas@codesourcery.com>
829c6349
CLT
1290 Cesar Philippidis <cesar@codesourcery.com>
1291
1292 * c-pragma.h (enum pragma_omp_clause): Add
1293 PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
1294 PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.
1295
f41b7612
JJ
12962018-06-20 Jakub Jelinek <jakub@redhat.com>
1297
1298 PR c++/86210
1299 * c-common.c (check_nonnull_arg): Use fold_for_warn. Adjust obsolete
1300 comment.
1301
4252ccd7
MS
13022018-06-18 Martin Sebor <msebor@redhat.com>
1303
1304 PR middle-end/85602
1305 * c-warn.c (sizeof_pointer_memaccess_warning): Check for attribute
1306 nonstring.
1307
e197e64e
KV
13082018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
1309
1310 * c-common.c (c_common_truthvalue_conversion): Handle ABSU_EXPR.
1311
34a7a230
JM
13122018-06-13 Jason Merrill <jason@redhat.com>
1313
5cef3733
JM
1314 * c-opts.c (c_common_post_options): Warn about useless -Wabi.
1315 (c_common_handle_option) [OPT_Wabi_]: Remove flag_abi_compat_version
1316 handling.
1317
34a7a230
JM
1318 PR c++/86094 - wrong code with defaulted move ctor.
1319 * c-opts.c (c_common_post_options): Bump the current ABI version to
1320 13. Set warn_abi_version and flag_abi_compat_version to the current
1321 version rather than 0. Fix defaulting flag_abi_compat_version from
1322 warn_abi_version.
1323
bb0f14ae
MS
13242018-06-12 Martin Sebor <msebor@redhat.com>
1325
1326 PR c/85931
1327 * c-warn.c (sizeof_pointer_memaccess_warning): Avoid warning when
1328 sizeof source and destination yields the same value.
1329
3713f2e2
ML
13302018-06-12 Martin Liska <mliska@suse.cz>
1331
1332 * c.opt: Make MPX-related options as Deprecated.
1333
4af78ef8
DM
13342018-06-08 David Malcolm <dmalcolm@redhat.com>
1335
1336 * c-pretty-print.c (c_pretty_printer::statement): Use TDF_NONE
1337 rather than 0.
1338
31db0fe0
ML
13392018-06-08 Martin Liska <mliska@suse.cz>
1340
1341 * c-attribs.c (handle_bnd_variable_size_attribute): Remove support
1342 for MPX (macros, related functions, fields in cgraph_node, ...).
1343 (handle_bnd_legacy): Likewise.
1344 (handle_bnd_instrument): Likewise.
1345 * c.opt: Likewise.
1346
fe16acf2
JJ
13472018-06-06 Jakub Jelinek <jakub@redhat.com>
1348
1349 PR c++/86068
1350 * c-cppbuiltin.c (c_cpp_builtins): Fix a typo, set
1351 __cpp_transactional_memory to 201500 instead of 210500.
1352
4dbdb49b
JM
13532018-06-06 Jason Merrill <jason@redhat.com>
1354
1355 PR c++/85710 - ICE with -Wmemset-elt-size.
1356 * c-warn.c (warn_for_memset): Don't crash on incomplete element type.
1357
f8ad043f
JM
13582018-06-01 Jason Merrill <jason@redhat.com>
1359
1360 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_deduction_guides to
1361 201703.
1362
abc24d93
EB
13632018-06-01 Eric Botcazou <ebotcazou@adacore.com>
1364
1365 * c-ada-spec.c (dump_ada_declaration) <TYPE_DECL>: Generate a forward
1366 declaration for a typedef independently of whether the declaration of
1367 the subtype is generated.
1368
d258f4aa
MS
13692018-05-31 Martin Sebor <msebor@redhat.com>
1370
1371 PR c/82063
1372 * c.opt (-Wno-alloc-size-larger-than): New option.
1373
b67b9225
DP
13742018-04-22 David Pagan <dave.pagan@oracle.com>
1375
1376 PR c/55976
1377 * c-opts.c (c_common_post_options): Set default for warn_return_type
ab20d992 1378 for C++/C++ with ObjC extensions only. For C, makes it possible to
b67b9225
DP
1379 differentiate between default (no option), -Wreturn-type, and
1380 -Wno-return-type.
1381
04eb9c55
JM
13822018-05-29 Jason Merrill <jason@redhat.com>
1383
1384 * c.opt (Winit-list-lifetime): New flag.
1385
b0c31bc6
BE
13862018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
1387
1388 * c-lex.c (get_fileinfo): Use splay_tree_compare_strings and
1389 splay_tree_delete_pointers.
1390
44284983
JJ
13912018-05-26 Jakub Jelinek <jakub@redhat.com>
1392
1393 PR bootstrap/85921
1394 * c-warn.c (diagnose_mismatched_attributes): Remove unnecessary
1395 noinline variable to workaround broken kernel headers.
1396
b46b715d
JM
13972018-05-18 Jason Merrill <jason@redhat.com>
1398
1399 * c.opt (Wdeprecated-copy): New flag.
1400
40659769
ML
14012018-05-17 Martin Liska <mliska@suse.cz>
1402
1403 * c-warn.c (overflow_warning): Do not use
1404 space in between 'G_' and '('.
1405
403962ea
JM
14062018-05-09 Jason Merrill <jason@redhat.com>
1407
1408 * c-common.c (valid_array_size_p): Add complain parameter.
1409 * c-common.h: ...which defaults to true.
1410
1c9ee609
JJ
14112018-05-11 Jakub Jelinek <jakub@redhat.com>
1412
1413 PR c/85696
1414 * c-omp.c (c_omp_predetermined_sharing): Return
1415 OMP_CLAUSE_DEFAULT_SHARED for artificial vars with integral type.
1416
19916065
ML
14172018-05-11 Martin Liska <mliska@suse.cz>
1418
92a285c1 1419 PR sanitizer/85556
19916065
ML
1420 * c-attribs.c (handle_no_sanitize_attribute): Iterate all
1421 TREE_LIST values.
1422
79e7b1fe
JJ
14232018-05-10 Jakub Jelinek <jakub@redhat.com>
1424
1425 PR c++/85662
1426 * c-common.h (fold_offsetof_1): Removed.
1427 (fold_offsetof): Add TYPE argument defaulted to size_type_node and
1428 CTX argument defaulted to ERROR_MARK.
1429 * c-common.c (fold_offsetof_1): Renamed to ...
1430 (fold_offsetof): ... this. Remove wrapper function. Add TYPE
1431 argument, convert the pointer constant to TYPE and use size_binop
1432 with PLUS_EXPR instead of fold_build_pointer_plus if type is not
1433 a pointer type. Adjust recursive calls.
1434
86c12f76
EB
14352018-05-10 Eric Botcazou <ebotcazou@adacore.com>
1436
1437 PR c++/85400
1438 * c-attribs.c (handle_visibility_attribute): Do not set no_add_attrs.
1439
ee336e84
NS
14402018-05-07 Nathan Sidwell <nathan@acm.org>
1441
1442 * c.opt (ffor-scope): Remove functionality, issue warning.
1443
6c072e21
NS
14442018-05-03 Nathan Sidwell <nathan@acm.org>
1445
1446 * c.opt (ffriend-injection): Remove functionality, issue warning.
1447
2cc7d3a7
DM
14482018-05-01 David Malcolm <dmalcolm@redhat.com>
1449
1450 PR c/84258
1451 * c-format.c (struct format_check_results): Add field
1452 "number_non_char".
1453 (check_format_info): Initialize it, and warn if encountered.
1454 (check_format_arg): Distinguish between wide char and
1455 everything else when detecting arrays of non-char.
1456
7761dfbe
DM
14572018-04-30 David Malcolm <dmalcolm@redhat.com>
1458
1459 * c-format.c (get_corrected_substring): Update for
1460 location_get_source_line returning a char_span. Use a char_span
1461 when handling the prefix of the correction.
1462 * c-indentation.c (get_visual_column): Update for
1463 location_get_source_line returning a char_span.
1464 (get_first_nws_vis_column): Likewise.
1465
62e98ef1
DM
14662018-03-29 David Malcolm <dmalcolm@redhat.com>
1467
1468 PR c++/84269
1469 * known-headers.cc (get_stdlib_header_for_name): Add various names
1470 from <assert.h>, <string.h>, and <memory.h>; add more names from
1471 <stdio.h>.
1472
a7dea617
JJ
14732018-03-27 Jakub Jelinek <jakub@redhat.com>
1474
1475 PR c++/85061
1476 * c-common.c (fold_offsetof_1) <case COMPOUND_EXPR>: Assert that
1477 get_base_address of the second operand is a VAR_P, rather than the
1478 operand itself, and use gcc_checking_assert instead of gcc_assert.
1479
889a3a30
MP
14802018-03-23 Marek Polacek <polacek@redhat.com>
1481
1482 PR c++/85045
1483 * c-pretty-print.c (c_pretty_printer::multiplicative_expression)
1484 <case RDIV_EXPR>: Tweak condition.
1485
452154b9
EB
14862018-03-20 Eric Botcazou <ebotcazou@adacore.com>
1487
1488 * c-ada-spec.c (pp_ada_tree_identifier): Deal specifically with _Bool.
1489
63ecb626
JJ
14902018-03-16 Jakub Jelinek <jakub@redhat.com>
1491
ce811fc4
JJ
1492 PR c/84909
1493 * c-warn.c (conversion_warning): Replace "to to" with "to" in
1494 diagnostics.
1495
63ecb626
JJ
1496 PR c/84910
1497 * c-warn.c (diagnose_mismatched_attributes): Remove trailing space from
1498 diagnostics.
1499
a1295eec
RB
15002018-03-16 Richard Biener <rguenther@suse.de>
1501
1502 PR c/84873
1503 * c-gimplify.c (c_gimplify_expr): Revert previous change. Instead
1504 unshare the possibly folded expression.
1505
919674fb
RB
15062018-03-15 Richard Biener <rguenther@suse.de>
1507
1508 PR c/84873
1509 * c-gimplify.c (c_gimplify_expr): Do not fold expressions.
1510
f99309b2
MS
15112018-03-13 Martin Sebor <msebor@redhat.com>
1512
1513 PR tree-optimization/84725
1514 * c-attribs.c (handle_nonstring_attribute): Allow attribute nonstring
1515 with all three narrow character types, including their qualified forms.
1516
e9b9fa4c
MS
15172018-03-12 Martin Sebor <msebor@redhat.com>
1518
1519 PR tree-optimization/83456
ab20d992 1520 * c-common.c (check_function_restrict): Return bool.
e9b9fa4c
MS
1521 Restore checking of bounded built-in functions.
1522 (check_function_arguments): Also return the result
1523 of warn_for_restrict.
ab20d992
JJ
1524 * c-common.c (check_function_restrict): Return bool.
1525 * c-warn.c (warn_for_restrict): Return bool.
e9b9fa4c 1526
0805d020
MP
15272018-03-02 Marek Polacek <polacek@redhat.com>
1528
1529 PR c++/84171
1530 * c-warn.c (warn_for_sign_compare): Bail out if any of the operands
1531 is erroneous.
1532
ed2a2f08
TS
15332018-03-02 Thomas Schwinge <thomas@codesourcery.com>
1534
1535 * c-attribs.c (c_common_attribute_table): Remove "cilk simd
1536 function".
1537
90abdde0
MP
15382018-03-01 Marek Polacek <polacek@redhat.com>
1539
1540 PR c++/84639
1541 * c-attribs.c (common_handle_aligned_attribute): Don't use invalid
1542 alignment in computation.
1543
c6db43fa
EB
15442018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1545
1546 * c-ada-spec.c (dump_ada_node) <NULLPTR_TYPE>: New case.
1547 <REAL_TYPE>: Deal specifically with _Float128/__float128.
1548
9e25c7ed
EB
15492018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1550
1551 * c-ada-spec.c (dump_ada_double_name) <ENUMERAL_TYPE>: New case.
1552 (is_char_array): Take a type instead of a declaration.
1553 (dump_ada_array_type): Likewise.
1554 (is_simple_enum): Minor tweak.
1555 (dump_ada_enum_type): New function extracted from...
1556 (dump_ada_node) <ENUMERAL_TYPE>: ...here. Invoke it.
1557 <INTEGER_TYPE>: Remove unreachable code.
1558 <RECORD_TYPE>: Likewise. Minor tweaks.
1559 (dump_nested_type) <ARRAY_TYPE>: Adjust to above changes.
1560 <ENUMERAL_TYPE>: New case.
1561 <RECORD_TYPE>: Factor out common code.
1562 (dump_ada_declaration) <ARRAY_TYPE>: Adjust to above changes.
1563 Minor tweaks. Deal with enumeral types.
1564 (dump_ada_structure): Minor tweaks.
1565
09de3550
EB
15662018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1567
1568 * c-ada-spec.c (dump_ada_node) <POINTER_TYPE>: Do not use generic
1569 address for incomplete structures.
1570 (dump_forward_type): Do not bail out for incomplete structures.
1571 (dump_ada_declaration): Do not special-case incomplete structures
1572 for subtypes. Dump them as null records for types.
1573
095d8d4b
EB
15742018-02-28 Eric Botcazou <ebotcazou@adacore.com>
1575
1576 * c-ada-spec.c (dump_ada_import): Use boolean and fix formatting.
1577 (is_char_array): Fix formatting.
1578 (dump_template_types): Likewise.
1579 (dump_generic_ada_node): Rename into...
1580 (dump_ada_node): ...this.
1581 <POINTER_TYPE>: Remove superfluous space. Use generic address for
1582 incomplete structures and not for empty structures. Do not use it
1583 when forward declarations are needed.
1584 (dump_forward_type): New function.
1585 (dump_nested_types): Remove FORWARD parameter. Do not consider
1586 TREE_VISITED and do not generate a forward declaration. Only dump
1587 original nested types for nested declaration.
1588 (dump_nested_type) <POINTER_TYPE>: Call dump_forward_type.
1589 <ARRAY_TYPE>: Likewise if the component type is an anonymous pointer.
1590 <RECORD_TYPE>: Do not consider TREE_VISITED.
1591 (dump_ada_declaration): Use booleans and fix formatting throughout.
1592 <TYPE_DECL>: Skip incomplete structures and not empty structures.
1593 Call dump_forward_type instead of dump_nested_types for a typedef.
1594 Remove superfluous check and adjust call to dump_nested_types.
1595 <POINTER_TYPE>: Call dump_forward_type and fall through.
1596 (dump_ada_struct_decl): Rename into...
1597 (dump_ada_structure): ...this. Do not special-case empty structures.
1598
d4cfd486
MS
15992018-02-27 Martin Sebor <msebor@redhat.com>
1600
1601 PR c++/83871
1602 * c.opt (-Wmissing-attributes): New option.
1603
b22dbd03
ML
16042018-02-21 Martin Liska <mliska@suse.cz>
1605
1606 * c.opt (Wcatch-value=): Add IntegerRange.
1607
883dfe2a
JM
16082018-02-15 Jason Merrill <jason@redhat.com>
1609
1610 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_deduction_guides.
1611
0444aa9c
NS
16122018-02-09 Nathan Sidwell <nathan@acm.org>
1613
1614 PR c/84293
1615 * c-common.h (strict_aliasing_warning): Drop OTYPE arg, insert LOC
1616 arg.
1617 * c-warn.c (strict_aliasing_warning): Drop OTYPE arg, require LOC
1618 arg. Adjust.
1619
cea71f0a
MS
16202018-02-09 Martin Sebor <msebor@redhat.com>
1621
1622 PR lto/84212
1623 * c.opt (-Wstringop-overflow, -Warray-bounds): Add LTO.
1624 (-Walloc-size-larger-than, -Wformat-truncation=): Same.
1625 (-Wmaybe-uninitialized, -Wnonnull, -Wrestrict): Same.
1626 (-Wstrict-overflow, -Wsuggest-attribute): Same.
1627 (-Wuninitialized): Same.
1628
8c8b7be5
EB
16292018-02-09 Eric Botcazou <ebotcazou@adacore.com>
1630
1631 * c-ada-spec.c (dump_ada_declaration): Do not generate the 'constant'
1632 keyword for components.
1633
7c30b12a
PC
16342018-02-02 Paolo Carlini <paolo.carlini@oracle.com>
1635
1636 * c-common.h (DECL_UNNAMED_BIT_FIELD): New.
1637
eece7fe5
JK
16382018-02-02 Julia Koval <julia.koval@intel.com>
1639
1640 * c-common.h (omp_clause_mask): Move to wide_int_bitmask.h.
1641
7d07a93a
MP
16422018-01-29 Marek Polacek <polacek@redhat.com>
1643
1644 PR c/83966
1645 * c-format.c (check_function_format): Check current_function_decl.
1646
53723269
JJ
16472018-01-27 Jakub Jelinek <jakub@redhat.com>
1648
1649 * c-cppbuiltin.c (c_cpp_builtins): Use ggc_strdup for the fp_suffix
1650 argument.
1651 (LAZY_HEX_FP_VALUES_CNT): Define.
1652 (lazy_hex_fp_values): Allow up to LAZY_HEX_FP_VALUES_CNT lazy hex fp
1653 values rather than just 12.
1654 (builtin_define_with_hex_fp_value): Likewise.
1655
7365279f
BK
16562018-01-18 Boris Kolpackov <boris@codesynthesis.com>
1657
92a285c1
ML
1658 PR other/70268
1659 * c.opt (-fmacro-prefix-map): New option.
1660 * c-opts.c (c_common_handle_option): Handle it.
1661 * c-lex.c (init_c_lex): Set remap_filename cpp callback.
1662 * c-ppoutput.c (init_pp_output): Likewise.
7365279f 1663
bb9869d5
DM
16642018-01-17 David Malcolm <dmalcolm@redhat.com>
1665
1666 PR c++/83814
1667 * c-common.c (fold_for_warn): Move to c/c-fold.c and cp/expr.c.
1668
68dc87c3
EB
16692018-01-10 Eric Botcazou <ebotcazou@adacore.com>
1670
1671 * c-ada-spec.c (dump_number): Add FLOAT_P parameter.
1672 Skip 'f' and 'F' characters if it is true.
1673 (store_ada_macro): Minor tweak.
1674 (dump_ada_macros) <CPP_COMMENT>: Likewise.
1675 <CPP_WSTRING>: Likewise.
1676 <CPP_STRING>: Output '&' in the buffer if not the first string.
1677 <CPP_NUMBER>: Adjust calls to dump_number.
1678
9a004410
DM
16792018-01-10 David Malcolm <dmalcolm@redhat.com>
1680
1681 PR c++/43486
1682 * c-common.c: Include "selftest.h".
1683 (get_atomic_generic_size): Perform the test for integral type
1684 before the range test for any integer constant, fixing indentation
1685 of braces. Call fold_for_warn before testing for an INTEGER_CST.
1686 (reject_gcc_builtin): Strip any location wrapper from EXPR.
1687 (selftest::test_fold_for_warn): New function.
1688 (selftest::c_common_c_tests): New function.
1689 (selftest::c_family_tests): Call it, and
1690 selftest::c_pretty_print_c_tests.
1691 * c-common.h (selftest::c_pretty_print_c_tests): New decl.
1692 * c-format.c (check_format_arg): Convert VAR_P check to a
1693 fold_for_warn.
1694 * c-pretty-print.c: Include "selftest.h".
1695 (pp_c_cast_expression): Don't print casts for location wrappers.
1696 (selftest::assert_c_pretty_printer_output): New function.
1697 (ASSERT_C_PRETTY_PRINTER_OUTPUT): New macro.
1698 (selftest::test_location_wrappers): New function.
1699 (selftest::c_pretty_print_c_tests): New function.
1700 * c-warn.c (warn_for_memset): Call fold_for_warn on the arguments.
1701
5c0caeb3
RS
17022018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1703 Alan Hayward <alan.hayward@arm.com>
1704 David Sherwood <david.sherwood@arm.com>
1705
1706 * c-common.c (c_common_type_for_mode): Handle MODE_VECTOR_BOOL.
1707
73a699ae
RS
17082018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1709 Alan Hayward <alan.hayward@arm.com>
1710 David Sherwood <david.sherwood@arm.com>
1711
1712 * c-ubsan.c (ubsan_instrument_shift): Treat GET_MODE_BITSIZE
1713 as polynomial.
1714
928686b1
RS
17152018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
1716 Alan Hayward <alan.hayward@arm.com>
1717 David Sherwood <david.sherwood@arm.com>
1718
1719 * c-common.c (vector_types_convertible_p, c_build_vec_perm_expr)
1720 (convert_vector_to_array_for_subscript): Handle polynomial
1721 TYPE_VECTOR_SUBPARTS.
1722 (c_common_type_for_mode): Check valid_vector_subparts_p.
1723 * c-pretty-print.c (pp_c_initializer_list): Handle polynomial
1724 VECTOR_CST_NELTS.
1725
85ec4feb
JJ
17262018-01-03 Jakub Jelinek <jakub@redhat.com>
1727
1728 Update copyright years.
1729
170a8bd6 17302017-12-22 Mike Stump <mikestump@comcast.net>
92a285c1 1731 Eric Botcazou <ebotcazou@adacore.com>
170a8bd6
EB
1732
1733 * c-pragma.c (init_pragma): Register pragma GCC unroll.
1734 * c-pragma.h (enum pragma_kind): Add PRAGMA_UNROLL.
1735
ab20d992 17362017-12-22 Alexandre Oliva <aoliva@redhat.com>
18408e96
AO
1737
1738 PR debug/83527
1739 PR debug/83419
1740 * c-semantics.c (only_debug_stmts_after_p): New.
1741 (pop_stmt_list): Clear side effects in debug-only stmt list.
1742 Check for single nondebug stmt followed by debug stmts only.
1743
c12d20d4
AO
17442017-12-21 Alexandre Oliva <aoliva@redhat.com>
1745
1746 PR debug/83419
1747 * c-semantics.c (pop_stmt_list): Propagate side effects from
1748 single nondebug stmt to container list.
1749
01512446
JJ
17502017-12-19 Jakub Jelinek <jakub@redhat.com>
1751
1752 * known-headers.cc (get_stdlib_header_for_name): Replace Yoda
1753 conditions with typical order conditions.
1754
82cfbd01
MP
17552017-12-18 Marek Polacek <polacek@redhat.com>
1756
1757 * c-warn.c (warn_logical_operator): Return early if -Wlogical-op is
1758 not in effect.
1759
99da11ec
MS
17602017-12-17 Martin Sebor <msebor@redhat.com>
1761
1762 * c-attribs.c (common_handle_aligned_attribute): Avoid issuing
1763 an error for attribute warn_if_not_aligned.
1764
cc8bea0a
MS
17652017-12-16 Martin Sebor <msebor@redhat.com>
1766
1767 PR tree-optimization/78918
1768 * c-common.c (check_function_restrict): Avoid checking built-ins.
1769 * c.opt (-Wrestrict): Include in -Wall.
1770
4849deb1
JJ
17712017-12-15 Jakub Jelinek <jakub@redhat.com>
1772
1773 * c-attribs.c (c_common_attribute_table,
1774 c_common_format_attribute_table): Swap affects_type_identity
1775 and handler fields, adjust comments.
1776
c65e18d3
BE
17772017-12-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
1778
1779 * c.opt (Wcast-function-type): New warning option.
1780 * c-lex.c (get_fileinfo): Avoid warning.
1781 * c-ppoutput.c (scan_translation_unit_directives_only): Remove cast.
1782
2004617a
QZ
17832017-12-14 Qing Zhao <qing.zhao@oracle.com>
1784
7365279f 1785 PR middle_end/79538
2004617a
QZ
1786 * c-cppbuiltin.c (builtin_define_with_hex_fp_value):
1787 Adjust the size of buf1 and buf2, add a new buf to avoid
1788 format-overflow warning.
1789
ab20d992 17902017-12-12 Alexandre Oliva <aoliva@redhat.com>
96a95ac1
AO
1791
1792 * c-semantics.c (pop_stmt_list): Move begin stmt marker into
1793 subsequent statement list.
1794
5d9ae53d
MS
17952017-12-07 Martin Sebor <msebor@redhat.com>
1796
1797 PR c/81544
1798 PR c/81566
1799 * c-attribs.c (attr_aligned_exclusions): New array.
1800 (attr_alloc_exclusions, attr_cold_hot_exclusions): Same.
1801 (attr_common_exclusions, attr_const_pure_exclusions): Same.
1802 (attr_gnu_inline_exclusions, attr_inline_exclusions): Same.
1803 (attr_noreturn_exclusions, attr_returns_twice_exclusions): Same.
1804 (attr_warn_unused_result_exclusions): Same.
1805 (handle_hot_attribute, handle_cold_attribute): Simplify.
1806 (handle_const_attribute): Warn on function returning void.
1807 (handle_pure_attribute): Same.
1808 (handle_aligned_attribute): Diagnose conflicting attribute
1809 specifications.
1810 * c-warn.c (diagnose_mismatched_attributes): Simplify.
1811
c79144f8
DM
18122017-12-06 David Malcolm <dmalcolm@redhat.com>
1813
1814 PR c/83236
1815 * c-common.c (selftest::c_family_tests): Call
1816 selftest::c_spellcheck_cc_tests.
1817 * c-common.h (selftest::c_spellcheck_cc_tests): New decl.
1818 * c-spellcheck.cc: Include "selftest.h".
1819 (name_reserved_for_implementation_p): New function.
1820 (should_suggest_as_macro_p): New function.
1821 (find_closest_macro_cpp_cb): Move the check for NT_MACRO to
1822 should_suggest_as_macro_p and call it.
1823 (selftest::test_name_reserved_for_implementation_p): New function.
1824 (selftest::c_spellcheck_cc_tests): New function.
1825 * c-spellcheck.h (name_reserved_for_implementation_p): New decl.
1826
613bc14f
DM
18272017-12-06 David Malcolm <dmalcolm@redhat.com>
1828
1829 * c-spellcheck.cc: New file, taken from macro-handling code in
1830 spellcheck-tree.c.
1831 * c-spellcheck.h: New file, taken from macro-handling code in
1832 spellcheck-tree.h.
1833
e76c7157
JJ
18342017-12-01 Jakub Jelinek <jakub@redhat.com>
1835
1836 * c-attribs.c (c_common_attribute_table): Remove "cilk simd function"
1837 attribute.
1838 (handle_simd_attribute): Don't check for "cilk simd function"
1839 attribute. Reindent, formatting changes.
1840
b0da4034
JK
18412017-11-30 Julia Koval <julia.koval@intel.com>
1842
1843 * c-common.h (inv_list): Remove.
1844
058f0b9e
JJ
18452017-11-28 Jakub Jelinek <jakub@redhat.com>
1846
1847 PR sanitizer/81275
1848 * c-common.c (c_switch_covers_all_cases_p_1,
1849 c_switch_covers_all_cases_p): New functions.
1850 * c-common.h (c_switch_covers_all_cases_p): Declare.
1851
5e9d6aa4 18522017-11-28 Julia Koval <julia.koval@intel.com>
92a285c1 1853 Sebastian Peryt <sebastian.peryt@intel.com>
5e9d6aa4
JK
1854
1855 * array-notation-common.c: Delete.
1856 * c-cilkplus.c: Ditto.
1857 * c-common.c (_Cilk_spawn, _Cilk_sync, _Cilk_for): Remove.
1858 * c-common.def (ARRAY_NOTATION_REF): Remove.
1859 * c-common.h (RID_CILK_SPAWN, build_array_notation_expr,
1860 build_array_notation_ref, C_ORT_CILK, c_check_cilk_loop,
1861 c_validate_cilk_plus_loop, cilkplus_an_parts,
1862 cilk_ignorable_spawn_rhs_op,
1863 cilk_recognize_spawn): Remove.
1864 * c-gimplify.c (CILK_SPAWN_STMT): Remove.
1865 * c-omp.c: Remove CILK_SIMD check.
1866 * c-pragma.c: Ditto.
1867 * c-pragma.h: Remove CILK related pragmas.
1868 * c-pretty-print.c (c_pretty_printer::postfix_expression): Remove
1869 ARRAY_NOTATION_REF condition.
1870 (c_pretty_printer::expression): Ditto.
1871 * c.opt (fcilkplus): Remove.
1872 * cilk.c: Delete.
1873
1af4ebf5
MG
18742017-11-21 Marc Glisse <marc.glisse@inria.fr>
1875
1876 * c-pretty-print.c (pp_c_additive_expression,
1877 c_pretty_printer::expression): Handle POINTER_DIFF_EXPR.
1878
d44ed508
JJ
18792017-11-21 Jakub Jelinek <jakub@redhat.com>
1880
7d2f0f9b
JJ
1881 * c-common.c (get_nonnull_operand): Use tree_to_uhwi.
1882
d44ed508
JJ
1883 PR c++/83059
1884 * c-common.c (get_atomic_generic_size): Use TREE_INT_CST_LOW
1885 instead of tree_to_uhwi, formatting fix.
1886
26edace6
DM
18872017-11-20 David Malcolm <dmalcolm@redhat.com>
1888
1889 PR c/81404
1890 * known-headers.cc: New file, based on material from c/c-decl.c.
1891 (suggest_missing_header): Copied as-is.
1892 (get_stdlib_header_for_name): New, based on get_c_name_hint but
1893 heavily edited to add C++ support. Add some knowledge about
1894 <limits.h>, <stdint.h>, and <wchar.h>.
1895 * known-headers.h: Likewise.
1896
6c7a259b
DM
18972017-11-20 David Malcolm <dmalcolm@redhat.com>
1898
1899 * c-common.h (enum lookup_name_fuzzy_kind): Move to name-hint.h.
1900 (lookup_name_fuzzy): Likewise. Convert return type from
1901 const char * to name_hint. Add location_t param.
1902 * name-hint.h: New header.
1903
f9c59f7e
JJ
19042017-11-19 Jakub Jelinek <jakub@redhat.com>
1905
1906 PR c/66618
1907 PR c/69960
1908 * c-common.h (c_fully_fold): Add LVAL argument defaulted to false.
1909
1e39313a
JM
19102017-11-16 Joseph Myers <joseph@codesourcery.com>
1911
1912 * c.opt (-std=c17, std=gnu17, -std=iso9899:2017): Refer to 2018
1913 expected publication date of C17.
1914 (-std=c18, -std=gnu18, -std=iso9899:2018): New option aliases.
1915
3ca0dc60
JM
19162017-11-15 Joseph Myers <joseph@codesourcery.com>
1917
1918 PR c/81156
1919 * c-common.c (c_common_reswords): Add __builtin_tgmath.
1920 * c-common.h (enum rid): Add RID_BUILTIN_TGMATH.
1921
025d57f0
MS
19222017-11-10 Martin Sebor <msebor@redhat.com>
1923
1924 PR c/81117
1925 * c-common.c (catenate_strings): Use memcpy instead of strncpy.
1926 * c-warn.c (sizeof_pointer_memaccess_warning): Handle arrays.
1927 * c.opt (-Wstringop-truncation): New option.
1928
1b6fa695
ML
19292017-11-06 Martin Liska <mliska@suse.cz>
1930
1931 PR middle-end/82404
1932 * c-opts.c (c_common_post_options): Set -Wreturn-type for C++
1933 FE.
1934 * c.opt: Set default value of warn_return_type.
1935
64a5912c
DM
19362017-10-31 David Malcolm <dmalcolm@redhat.com>
1937
1938 * c-common.c (binary_op_error): Update for renaming of
1939 error_at_rich_loc.
1940 (c_parse_error): Likewise.
1941 * c-warn.c (warn_logical_not_parentheses): Likewise for
1942 renaming of inform_at_rich_loc.
1943 (warn_for_restrict): Likewise for renaming of
1944 warning_at_rich_loc_n.
1945
c76dc9c3
JM
19462017-10-30 Joseph Myers <joseph@codesourcery.com>
1947
1948 * c.opt (std=c17, std=gnu17, std=iso9899:2017): New options.
1949 * c-opts.c (set_std_c17): New function.
1950 (c_common_init_options): Use gnu17 as default C version.
1951 (c_common_handle_option): Handle -std=c17 and -std=gnu17.
1952
ee5fd23a
MM
19532017-10-27 Michael Meissner <meissner@linux.vnet.ibm.com>
1954
1955 * c-cppbuiltin.c (mode_has_fma): Add support for PowerPC KFmode.
1956 (c_cpp_builtins): If a machine has a fast fma _Float<N> and
1957 _Float<N>X variant, define __FP_FAST_FMA<N> and/or
1958 __FP_FAST_FMA<N>X.
1959
d1047465
MP
19602017-10-23 Marek Polacek <polacek@redhat.com>
1961
1962 PR c/82681
1963 * c-warn.c (warnings_for_convert_and_check): Fix typos.
1964
9e878cf1
EB
19652017-10-19 Eric Botcazou <ebotcazou@adacore.com>
1966
1967 * c-common.c (check_builtin_function_arguments): Also check arguments
1968 of __builtin_alloca_with_align_and_max.
1969
89b6abbb
DM
19702017-10-17 David Malcolm <dmalcolm@redhat.com>
1971
1972 * c-format.c (format_warning_at_char): Pass UNKNOWN_LOCATION
1973 rather than NULL to format_warning_va.
1974 (check_format_types): Likewise when calling format_type_warning.
1975 Remove code to extract source_ranges and source_range * in favor
1976 of just a location_t.
1977 (format_type_warning): Convert source_range * param to a
1978 location_t.
1979
39382c09
JJ
19802017-10-13 Jakub Jelinek <jakub@redhat.com>
1981
1982 * c-gimplify.c (c_gimplify_expr): Handle [LR]ROTATE_EXPR like
1983 [LR]SHIFT_EXPR.
1984
62e1c678
DM
19852017-10-12 David Malcolm <dmalcolm@redhat.com>
1986
1987 * c-common.c (enum missing_token_insertion_kind): New enum.
1988 (get_missing_token_insertion_kind): New function.
1989 (maybe_suggest_missing_token_insertion): New function.
1990 * c-common.h (maybe_suggest_missing_token_insertion): New decl.
1991
b90c9338
NS
19922017-10-11 Nathan Sidwell <nathan@acm.org>
1993
1994 * c-opts.c (add_prefixed_path): Change chain to incpath_kind.
1995 (c_common_handle_option): Update incpath_kind names.
1996
3a266bcd
ML
19972017-10-11 Martin Liska <mliska@suse.cz>
1998
1999 PR sanitizer/82490
2000 * c-attribs.c (handle_no_sanitize_attribute): Report directly
2001 Wattributes warning.
2002
8e6cdc90
RS
20032017-10-10 Richard Sandiford <richard.sandiford@linaro.org>
2004
2005 * c-ada-spec.c (dump_generic_ada_node): Use wi::to_wide when
2006 operating on trees as wide_ints.
2007 * c-common.c (pointer_int_sum): Likewise.
2008 * c-pretty-print.c (pp_c_integer_constant): Likewise.
2009 * c-warn.c (match_case_to_enum_1): Likewise.
2010 (c_do_switch_warnings): Likewise.
2011 (maybe_warn_shift_overflow): Likewise.
2012
802b38c9
JJ
20132017-10-10 Jakub Jelinek <jakub@redhat.com>
2014
2015 PR c/82437
2016 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_wide
2017 instead of wide_int::from.
2018
4e34b338
JJ
20192017-10-06 Jakub Jelinek <jakub@redhat.com>
2020
2021 PR c/82437
2022 * c-warn.c (warn_tautological_bitwise_comparison): Instead of
2023 using to_widest use wide_int with the larger of the two precisions.
2024
4bc4b2b4
BE
20252017-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
2026
2027 * c-pretty-print.c (pp_c_parameter_type_list): Print ... for variadic
2028 functions.
2029
a1488398
RS
20302017-10-02 Richard Sandiford <richard.sandiford@linaro.org>
2031
2032 * c-warn.c (warn_tautological_bitwise_comparison): Use wi::to_widest
2033 when combining the original unconverted comparison operands.
2034
01c9fb68
JJ
20352017-09-29 Jakub Jelinek <jakub@redhat.com>
2036
2037 * c-attribs.c (handle_noipa_attribute): Don't add "stack_protect"
2038 attribute.
2039
6e3e8419
EB
20402017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2041
2042 * c-ada-spec.c (to_ada_name): Add index parameter.
2043 (pp_ada_tree_identifier): Likewise.
2044 (dump_ada_macros): Adjust call to to_ada_name.
2045 (struct overloaded_name_hash): New type.
2046 (struct overloaded_name_hasher): Likewise.
2047 (overloaded_names): New hash table.
2048 (compute_overloading_index): New function.
2049 (dump_ada_decl_name): Call it and pass the result to
2050 pp_ada_tree_identifier.
2051 (dump_ada_double_name): Adjust calls to pp_ada_tree_identifier.
2052 (dump_ada_function_declaration): Likewise.
2053 (dump_generic_ada_node): Likewise.
2054 (print_constructor): Likewise.
2055 (print_destructor): Likewise.
2056 (dump_ada_specs): Delete overloaded_names table.
2057
79310774
EB
20582017-09-29 Eric Botcazou <ebotcazou@adacore.com>
2059
2060 * c-ada-spec.c (max_ada_macros): Move around.
2061 (store_ada_macro_index): Likewise.
2062 (source_file): Rename into...
2063 (macro_source_file): ...this.
2064 (count_ada_macro): Move around.
2065 (store_ada_macro): Likewise.
2066 (compare_macro): Likewise.
2067 (print_ada_macros): Merge in...
2068 (dump_ada_macros): ...this.
2069 (source_file_base): Rename into...
2070 (current_source_file): ...this.
2071 (print_comment): Move around.
2072 (dump_ada_nodes): Call dump_ada_declaration directly.
2073 (struct with): Change type of limited field to bool.
2074 (append_withs): Change type of limited_access parameter to bool.
2075 (pp_ada_tree_identifie): Likewise.
2076 (dump_ada_decl_nam): Likewise.
2077 (dump_generic_ada_node): Likewise. Do not print the return type.
2078 (to_ada_name): Change type of space_found parameter to bool.
2079 (dump_ada_function_declaration): Return void and change type of
2080 parameters to bool. Also print the return type for a function.
2081 (print_ada_methods): Rename into...
2082 (dump_ada_methods): ...this.
2083 (print_ada_declaration): Rename into ...
2084 (dump_ada_declaration): ...this. Do not print the return type.
2085 (print_ada_struct_decl): Rename into...
2086 (dump_ada_struct_decl): ...this.
2087
7d386d45
JJ
20882017-09-29 Jakub Jelinek <jakub@redhat.com>
2089
2090 * c-attribs.c (handle_packed_attribute): Test DECL_C_BIT_FIELD
2091 rather than DECL_INITIAL.
2092 (common_handle_aligned_attribute): Likewise.
2093
ab20d992 20942017-09-20 Alexandre Oliva <aoliva@redhat.com>
9ed32e27
AO
2095
2096 * c.opt (gen-decls): Add RejectNegative.
2097
026a79f7
AS
20982017-09-15 Andrew Sutton <andrew.n.sutton@gmail.com>
2099 Jakub Jelinek <jakub@redhat.com>
2100
2101 Add support for -std=c++2a.
2102 * c-common.h (cxx_dialect): Add cxx2a as a dialect.
2103 * opt.c: Add options for -std=c++2a and -std=gnu++2a.
2104 * c-opts.c (set_std_cxx2a): New.
2105 (c_common_handle_option): Set options when -std=c++2a is enabled.
2106 (c_common_post_options): Adjust comments.
2107 (set_std_cxx14, set_std_cxx17): Likewise.
2108
4a8ca690
EB
21092017-09-15 Eric Botcazou <ebotcazou@adacore.com>
2110
2111 * c-pragma.c (handle_pragma_scalar_storage_order): Expand on error
2112 message for non-uniform endianness and issue a warning in C++.
2113
7b936140
JJ
21142017-09-15 Jakub Jelinek <jakub@redhat.com>
2115
2116 * c.opt (Wc++1z-compat): Change from option to undocumented alias.
2117 (Wc++17-compat): Change from undocumented alias to option.
2118 (Wnoexcept-type): Enable by Wc++17-compat instead of Wc++1z-compat,
2119 change C++1z to C++17 in description.
2120 (std=c++1z, std=gnu++1z): Change from option to undocumented
2121 deprecated alias.
2122 (std=c++17, std=gnu++17): Change from undocumented alias to option.
2123 Adjust description.
2124 * c-common.h (enum cxx_dialect): Rename cxx1z to cxx17.
2125 * c-opts.c (set_std_cxx1z): Rename to ...
2126 (set_std_cxx17): ... this.
2127 (c_common_handle_option): Rename OPT_std_c__1z to OPT_std_c__17
2128 and OPT_std_gnu__1z to OPT_std_gnu__17. Adjust set_std_cxx1z
7365279f 2129 caller.
7b936140
JJ
2130 (c_common_post_options): Use cxx17 instead of cxx1z. Adjust
2131 comments.
2132
12263f13
L
21332017-09-12 H.J. Lu <hongjiu.lu@intel.com>
2134
2135 * c-attribs.c (common_handle_aligned_attribute): Don't warn
2136 function alignment if warn_if_not_aligned_p is true.
2137
6836632e
NS
21382017-09-12 Nathan Sidwell <nathan@acm.org>
2139
2140 * c-common.c (field_decl_cmp, resort_data, resort_field_decl_cmp,
2141 resort_sorted_fields): Move to c/c-decl.c.
2142 * c-common.h (field_decl_cmp, resort_sorted_fields): Delete.
2143 (struct sorted_fields_type): Move to c/c-lang.h.
2144
019bf9ad
JW
21452017-09-09 Jonathan Wakely <jwakely@redhat.com>
2146
2147 PR c++/81852
2148 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_threadsafe_static_init.
2149
bc7fe952
MP
21502017-09-04 Marek Polacek <polacek@redhat.com>
2151
2152 PR c/81783
2153 * c-warn.c (warn_tautological_bitwise_comparison): New function.
2154 (warn_tautological_cmp): Call it.
2155
ab20d992 21562017-09-01 Boris Kolpackov <boris@codesynthesis.com>
de7c2c6a
BK
2157
2158 * c-opts.c (c_common_finish): Write dependency information even if
2159 there are errors.
2160
d2e05fcb
JJ
21612017-09-01 Jakub Jelinek <jakub@redhat.com>
2162
2163 PR c/81887
2164 * c-pragma.c (omp_pragmas): Move "ordered" entry from here to ...
2165 (omp_pragmas_simd): ... here.
2166 * c-omp.c (c_finish_omp_ordered): If clauses isn't simd clause alone,
2167 create new clauses list containing just simd clause.
2168
18e2a8b8
RS
21692017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2170 Alan Hayward <alan.hayward@arm.com>
2171 David Sherwood <david.sherwood@arm.com>
2172
2173 * c-attribs.c (vector_mode_valid_p) Fold GET_MODE_INNER call
2174 into scalar_mode_supported_p call.
2175 (handle_mode_attribute): Update call to scalar_mode_supported_p.
2176
16d22000
RS
21772017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2178 Alan Hayward <alan.hayward@arm.com>
2179 David Sherwood <david.sherwood@arm.com>
2180
2181 * c-common.c (c_common_fixed_point_type_for_size): Use opt_scalar_mode
2182 for the mode iterator.
2183
b397965c
RS
21842017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2185 Alan Hayward <alan.hayward@arm.com>
2186 David Sherwood <david.sherwood@arm.com>
2187
2188 * c-lex.c (interpret_fixed): Use SCALAR_TYPE_MODE.
2189 * c-common.c (c_build_vec_perm_expr): Likewise.
2190
357b7604
RS
21912017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2192 Alan Hayward <alan.hayward@arm.com>
2193 David Sherwood <david.sherwood@arm.com>
2194
2195 * c-common.c (c_common_type_for_mode): Use as_a <scalar_int_mode>.
2196
e05c94ba
RS
21972017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2198 Alan Hayward <alan.hayward@arm.com>
2199 David Sherwood <david.sherwood@arm.com>
2200
2201 * c-attribs.c (handle_mode_attribute): Check for a scalar_int_mode
2202 before calling targetm.addr_space.valid_pointer_mode.
2203
5c20c4af
RS
22042017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2205 Alan Hayward <alan.hayward@arm.com>
2206 David Sherwood <david.sherwood@arm.com>
2207
2208 * c-cppbuiltin.c (c_cpp_builtins): Use opt_scalar_float_mode.
2209
c94843d2 22102017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
92a285c1
ML
2211 Alan Hayward <alan.hayward@arm.com>
2212 David Sherwood <david.sherwood@arm.com>
c94843d2
RS
2213
2214 * c-common.c (c_common_fixed_point_type_for_size): Use new mode
2215 iterators.
2216 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
2217
4e10a5a7
RS
22182017-08-30 Richard Sandiford <richard.sandiford@linaro.org>
2219 Alan Hayward <alan.hayward@arm.com>
2220 David Sherwood <david.sherwood@arm.com>
2221
2222 * c-cppbuiltin.c (mode_has_fma): Prefix mode names with E_ in
2223 case statements.
2224
130fcab0
ML
22252017-08-29 Martin Liska <mliska@suse.cz>
2226
2227 PR other/39851
2228 * c-common.c (parse_optimize_options): Add argument to function
2229 call.
2230 * c-pragma.c (handle_pragma_diagnostic): Likewise.
2231
14e18d71
DM
22322017-08-24 David Malcolm <dmalcolm@redhat.com>
2233
2234 * c-lex.c (interpret_float): Use token location
2235 when building an EXCESS_PRECISION_EXPR.
2236
2f687306
DM
22372017-08-21 David Malcolm <dmalcolm@redhat.com>
2238
2239 * c-common.c (check_function_arguments): Add "arglogs" param; pass
2240 it to check_function_format.
2241 * c-common.h (check_function_arguments): Add vec<location_t> *
2242 param.
2243 (check_function_format): Likewise.
2244 * c-format.c (struct format_check_context): Add field "arglocs".
2245 (check_function_format): Add param "arglocs"; pass it to
2246 check_format_info.
ab20d992 2247 (check_format_info): Add param "arglocs"; use it to initialize
2f687306
DM
2248 new field of format_ctx.
2249 (check_format_arg): Pass format_ctx->arglocs to new param of
2250 check_format_info_main.
2251 (class argument_parser): New field "arglocs".
2252 (argument_parser::argument_parser): Add "arglocs_" param and use
2253 it to initialize new field.
2254 (argument_parser::check_argument_type): Pass new arglocs field to
2255 check_format_types.
2256 (check_format_info_main): Add param "arglocs", and use it when
2257 constructing arg_parser.
2258 (check_format_types): Add param "arglocs"; use it if non-NULL when
2259 !EXPR_HAS_LOCATION (cur_param) to get at location information.
2260
00aa1fa2
L
22612017-08-18 H.J. Lu <hongjiu.lu@intel.com>
2262
2263 PR c/53037
2264 * c-attribs.c (handle_warn_if_not_aligned_attribute): New.
2265 (c_common_attribute_table): Add warn_if_not_aligned.
2266 (handle_aligned_attribute): Renamed to ...
2267 (common_handle_aligned_attribute): Remove argument, name, and add
2268 argument, warn_if_not_aligned. Handle warn_if_not_aligned.
2269 (handle_aligned_attribute): New.
2270 * c.opt: Add -Wif-not-aligned and -Wpacked-not-aligned.
2271
27be025d
MS
22722017-08-14 Martin Sebor <msebor@redhat.com>
2273
2274 PR c/81117
2275 * c-attribs.c (c_common_attribute_table): Add nonstring entry.
2276 (handle_nonstring_attribute): New function.
2277
da67acb9
MS
22782017-08-14 Martin Sebor <msebor@redhat.com>
2279
2280 PR c/81117
2281 * c-format.h (T89_G): New macro.
2282 * c-format.c (local_gcall_ptr_node): New variable.
2283 (init_dynamic_diag_info): Initialize it.
2284
a8b522b4
ML
22852017-08-11 Martin Liska <mliska@suse.cz>
2286
2287 * c-opts.c (c_common_post_options): Replace ASM_OUTPUT_DEF with
2288 TARGET_SUPPORTS_ALIASES.
2289
32129a17
DM
22902017-08-10 David Malcolm <dmalcolm@redhat.com>
2291
2292 * c-common.c (c_parse_error): Add rich_location * param, using it
2293 rather implicitly using input_location.
2294 * c-common.h (c_parse_error): Add rich_location * param.
2295
30af3a2b
MP
22962017-08-09 Marek Polacek <polacek@redhat.com>
2297
2298 * c-common.c (pointer_int_sum): Use true/false instead of 1/0.
2299 (c_common_truthvalue_conversion): Likewise.
2300 * c-omp.c (c_finish_omp_atomic): Likewise.
2301 * c-common.h (build_binary_op): Update declaration.
2302
314e6352
ML
23032017-08-08 Martin Liska <mliska@suse.cz>
2304
2305 * c-ada-spec.c: Include header files.
2306 * c-ubsan.c: Likewise.
2307 * c-warn.c: Likewise.
2308
56b5041c
JJ
23092017-08-07 Jakub Jelinek <jakub@redhat.com>
2310
2311 PR c/69389
2312 * c-omp.c (c_finish_omp_atomic): Handle atomics on bitfields.
2313
db440138
EB
23142017-08-07 Eric Botcazou <ebotcazou@adacore.com>
2315
2316 * c-ada-spec.c (has_nontrivial_methods): Test for FUNCTION_DECL.
2317 (print_ada_methods): Likewise.
2318 (print_ada_declaration): Likewise.
2319
577eec56
ML
23202017-08-07 Martin Liska <mliska@suse.cz>
2321
2322 * array-notation-common.c: Add new includes.
2323 * c-format.c( handle_format_attribute): Canonicalize a format
2324 function name.
2325 * c-lex.c (c_common_has_attribute): Canonicalize name of an
2326 attribute.
2327 * c-pretty-print.c: Add new include.
2328
b854df3c
EB
23292017-08-05 Eric Botcazou <ebotcazou@adacore.com>
2330
2331 * c-ada-spec.c (has_static_fields): Look only into variables.
2332 (print_constructor): Add TYPE parameter and use it for the name.
2333 (print_destructor): Likewise.
2334 (print_ada_declaration): Adjust to new constructor/destructor names.
2335 Adjust calls to print_constructor and print_destructor.
2336 (print_ada_struct_decl): Do not test TREE_STATIC on FIELD_DECL.
2337 Look only into variables in the final loop.
2338
9f2cb25e
EB
23392017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2340
2341 * c-ada-spec.c (has_static_fields): Look only into fields.
2342 (dump_generic_ada_node): Small tweak.
2343 (dump_nested_types): Look only into fields.
2344 (print_ada_declaration): Look only into methods. Small tweak.
2345 (print_ada_struct_decl): Look only into fields. Use DECL_VIRTUAL_P.
2346
f4bcd9eb
EB
23472017-08-01 Eric Botcazou <ebotcazou@adacore.com>
2348
2349 * c-ada-spec.c (print_generic_ada_decl): Pass correctly-typed constant.
2350 (dump_ada_function_declaration): Likewise.
2351 (dump_generic_ada_node): Likewise.
2352 (print_ada_declaration): Add support for const-qualified variables.
2353
f34ebeb2
ML
23542017-07-31 Martin Liska <mliska@suse.cz>
2355
2356 PR sanitize/81530
2357 * c-ubsan.c (ubsan_maybe_instrument_array_ref):
2358 Guard condition with flag_sanitize_p also with current_function_decl
2359 non-null equality.
2360 (ubsan_maybe_instrument_reference_or_call): Likewise.
2361
218e5d04
UB
23622017-07-30 Uros Bizjak <ubizjak@gmail.com>
2363
2364 * c-format.c (asm_fprintf_char_table): Add 'z' to format_chars.
2365
942047f2
EB
23662017-07-29 Eric Botcazou <ebotcazou@adacore.com>
2367
2368 * c-ada-spec.c (dump_generic_ada_node): Take into account signedness
2369 for enumeral types.
2370 (print_ada_declaration): Add missing guard for record types.
2371
a40ff0ae
JJ
23722017-07-27 Jakub Jelinek <jakub@redhat.com>
2373
2374 PR c/45784
2375 * c-omp.c (c_finish_omp_for): If the condition is wrapped in
2376 rhs of COMPOUND_EXPR(s), skip them and readd their lhs into
2377 new COMPOUND_EXPRs around the rhs of the comparison.
2378
06bd22f6
MP
23792017-07-27 Marek Polacek <polacek@redhat.com>
2380
2381 PR c/81417
2382 * c-warn.c (warn_for_sign_compare): Tweak the warning message. Print
2383 the types.
2384
036ea399
JJ
23852017-07-27 Jakub Jelinek <jakub@redhat.com>
2386
2387 * c-attribs.c (c_common_attribute_table): Add noipa attribute.
2388 (handle_noipa_attribute): New function.
2389
417ca011
TD
23902017-07-07 Torsten Duwe <duwe@suse.de>
2391
2392 * c-attribs.c (c_common_attribute_table): Add entry for
2393 "patchable_function_entry".
2394
5aaa8fb4
NS
23952017-07-20 Nathan Sidwell <nathan@acm.org>
2396
2397 Remove TYPE_METHODS.
2398 * c-ada-spec.c (is_tagged_type, has_nontrivial_methods,
2399 dump_ada_template, print_ada_methods,
2400 print_ada_declaration): Member fns are on TYPE_FIELDS.
2401
ff22eb12
NS
24022017-07-18 Nathan Sidwell <nathan@acm.org>
2403
2404 * c-warn.c (warn_for_memset): Use TYPE_{MIN,MAX}_VALUE.
2405
eea77d1f
DM
24062017-07-14 David Malcolm <dmalcolm@redhat.com>
2407
2408 * c-common.c (try_to_locate_new_include_insertion_point): New
2409 function.
2410 (per_file_includes_t): New typedef.
2411 (added_includes_t): New typedef.
2412 (added_includes): New variable.
2413 (maybe_add_include_fixit): New function.
2414 * c-common.h (maybe_add_include_fixit): New decl.
2415
281ac396
MS
24162017-07-10 Martin Sebor <msebor@redhat.com>
2417
2418 PR other/81345
2419 * c.opt (-Wstringop-overflow): Set defaults in LangEnabledBy.
2420
b6f43128
DM
24212017-07-06 David Malcolm <dmalcolm@redhat.com>
2422
2423 * c-common.c (selftest::c_family_tests): New.
2424 * c-common.h (selftest::run_c_tests): Move decl to c/c-lang.h.
2425 (selftest::c_family_tests): New decl.
2426
efbf55b0
MP
24272017-07-04 Marek Polacek <polacek@redhat.com>
2428
2429 PR c/81231
2430 * c-common.c (sync_resolve_size): Give error for pointers to incomplete
2431 types.
2432
6c86bd88
MP
24332017-07-04 Marek Polacek <polacek@redhat.com>
2434
2435 * c-warn.c (warn_if_unused_value): Remove WITH_CLEANUP_EXPR handling.
2436
17a7218b
ML
24372017-06-28 Martin Liska <mliska@suse.cz>
2438
2439 PR ipa/81128
2440 * c-attribs.c (handle_alias_ifunc_attribute): Append ifunc alias
2441 to a function declaration.
2442
63010089
ML
24432017-06-28 Martin Liska <mliska@suse.cz>
2444
2445 PR driver/79659
2446 * c.opt: Add IntegerRange to various options.
2447
3e2becc4
MP
24482017-06-26 Marek Polacek <polacek@redhat.com>
2449
2450 PR c/80116
2451 * c-common.h (warn_for_multistatement_macros): Declare.
2452 * c-warn.c: Include "c-family/c-indentation.h".
2453 (warn_for_multistatement_macros): New function.
2454 * c.opt (Wmultistatement-macros): New option.
2455 * c-indentation.c (guard_tinfo_to_string): No longer static.
2456 Change the parameter type to "enum rid". Handle RID_SWITCH.
2457 * c-indentation.h (guard_tinfo_to_string): Declare.
2458
2db9b7cd
MG
24592017-06-23 Marc Glisse <marc.glisse@inria.fr>
2460
2461 * c-common.c (c_common_nodes_and_builtins): Use builtin_structptr_types.
2462
c3684b7b
MS
24632017-06-15 Martin Sebor <msebor@redhat.com>
2464
2465 PR c++/80560
2466 * c.opt (-Wclass-memaccess): New option.
2467
e72c4afd
BK
24682017-06-14 Boris Kolpackov <boris@codesynthesis.com>
2469
2470 * c-opts.c (c_common_finish): Handle '-' special value to -MF.
2471
8a516588
MP
24722017-06-13 Marek Polacek <polacek@redhat.com>
2473
2474 PR objc/80949
2475 * c-warn.c (do_warn_duplicated_branches): Return if any of the
2476 branches is null.
2477
45b2222a
ML
24782017-06-13 Martin Liska <mliska@suse.cz>
2479
2480 PR sanitize/78204
2481 * c-attribs.c (add_no_sanitize_value): New function.
2482 (handle_no_sanitize_attribute): Likewise.
2483 (handle_no_sanitize_address_attribute): Use the function.
2484 (handle_no_sanitize_thread_attribute): New function.
2485 (handle_no_address_safety_analysis_attribute): Use
2486 add_no_sanitize_value.
2487 (handle_no_sanitize_undefined_attribute): Likewise.
2488 * c-common.h: Declare new functions.
2489 * c-ubsan.c (ubsan_instrument_division): Use sanitize_flags_p.
2490 (ubsan_instrument_shift): Likewise.
2491 (ubsan_instrument_bounds): Likewise.
2492 (ubsan_maybe_instrument_array_ref): Likewise.
2493 (ubsan_maybe_instrument_reference_or_call): Likewise.
2494
a01f151f
JM
24952017-06-11 Jason Merrill <jason@redhat.com>
2496
2497 * c-ada-spec.c, c-pragma.c: Use id_equal.
2498
3de4ac6d
MP
24992017-06-04 Marek Polacek <polacek@redhat.com>
2500
2501 PR c/80919
2502 * c-format.c (matching_type_p): Return false if any of the types
2503 requires structural equality.
2504
2474f48f
MS
25052017-06-02 Martin Sebor <msebor@redhat.com>
2506
2507 PR c/80892
2508 * c-warn.c (conversion_warning): Use -Wconversion for integer
2509 conversion and -Wfloat-conversion for floating one.
2510
40ffd95f
BE
25112017-06-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
2512
2513 * c.opt (Wsizeof-pointer-div): New warning option.
2514
3fa4634c
VR
25152017-06-01 Volker Reichelt <v.reichelt@netcologne.de>
2516
2517 * c.opt (Wcatch-value): New shortcut for Wcatch-value=1.
2518 (Wcatch-value=1): Enable by -Wall.
2519
f012c8ef
DM
25202017-05-30 David Malcolm <dmalcolm@redhat.com>
2521
2522 * c-format.c (gcc_cxxdiag_char_table): Add 'H' and 'I' to
2523 format_chars.
2524 * c.opt (fdiagnostics-show-template-tree): New option.
2525 (felide-type): New option.
2526
63dbcd13
VR
25272017-05-25 Volker Reichelt <v.reichelt@netcologne.de>
2528
2529 * c.opt (Wcatch-value=): New C++ warning flag.
2530
be136b5c
NS
25312017-05-24 Nathan Sidwell <nathan@acm.org>
2532
2533 * c=common.c (field_decl_cmp, resort_field_decl_cmp): Adjust T
2534 const casts to avoid warning.
2535
3cd211af
MS
25362017-05-24 Martin Sebor <msebor@redhat.com>
2537
2538 PR c/80731
2539 * c-common.h (unsafe_conversion_p): Add a function argument.
2540 * c-common.c (unsafe_conversion_p): Same.
2541 Add type names and values to diagnostics.
2542 (scalar_to_vector): Adjust.
2543 * c-warn.c (constant_expression_error): Add a function argument.
2544 Add type names and values to diagnostics.
2545 (conversion_warning): Add a function argument.
2546 Add type names and values to diagnostics.
2547 (warnings_for_convert_and_check): Same.
2548
1ff7be5a
JM
25492017-05-19 Jason Merrill <jason@redhat.com>
2550
2551 * c-warn.c (match_case_to_enum_1): Don't warn about enums with no
2552 enumerators.
2553
ff502317
BE
25542017-05-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
2555
2556 * c-format.c (locus): Move out of function scope,
2557 add GTY attribute.
2558
2a8a8d7b
NS
25592017-05-19 Nathan Sidwell <nathan@acm.org>
2560
2561 * c-opts.c (class_dump_file, class_dump_flags): Delete.
2562 (c_common_parse_file): Remove class dump handling.
2563 (get_dump_info): Likewise.
2564
39aac208
RB
25652017-05-19 Richard Biener <rguenther@suse.de>
2566
2567 PR c++/80593
2568 * c-warn.c (strict_aliasing_warning): Do not warn for accesses
2569 to alias-set zero memory.
2570
6ecd2339
BE
25712017-05-18 Bernd Edlinger <bernd.edlinger@hotmail.de>
2572
2573 * c-format.c (local_tree_type_node): Add GTY attribute.
2574
6574d78e
MP
25752017-05-18 Marek Polacek <polacek@redhat.com>
2576
2577 * c-common.c (c_common_type_for_size): Use NULL_TREE instead of 0.
2578 (c_common_fixed_point_type_for_size): Likewise.
2579 (c_common_type_for_mode): Likewise.
2580 (shorten_compare): Likewise.
2581 (c_promoting_integer_type_p): Use false/true instead of 0/1.
2582 * c-pragma.c (maybe_apply_renaming_pragma): Use NULL_TREE instead of 0.
2583
e3455240
MP
25842017-05-18 Marek Polacek <polacek@redhat.com>
2585
2586 * c-common.c (self_promoting_args_p): Change the return type to bool.
2587 Use false/true instead of 0/1.
2588 * c-common.h (self_promoting_args_p): Update.
2589
3fa8871b
MP
25902017-05-17 Marek Polacek <polacek@redhat.com>
2591
2592 * c-common.c: Use NULL_TREE instead of 0 where appropriate.
2593 * c-warn.c: Likewise.
2594
b42cc3ca
VV
25952017-05-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2596
2597 Implement new C++ intrinsics __is_assignable and __is_constructible.
2598 * c-common.c (__is_assignable, __is_constructible): New.
2599 * c-common.h (RID_IS_ASSIGNABLE, RID_IS_CONSTRUCTIBLE): Likewise.
2600
1a817418
ML
26012017-05-17 Martin Liska <mliska@suse.cz>
2602
2603 * c-common.h: Introduce dump_flags_t type and
2604 use it instead of int type.
2605 * c-gimplify.c (c_genericize): Likewise.
2606 * c-opts.c: Likewise.
2607
b2fa0a8b
MP
26082017-05-17 Marek Polacek <polacek@redhat.com>
2609
2610 * c-common.c (c_save_expr): Remove.
2611 (c_common_truthvalue_conversion): Remove a call to c_save_expr.
2612 * c-common.h (c_save_expr): Remove declaration.
2613
31c2d57d
VR
26142017-05-09 Volker Reichelt <v.reichelt@netcologne.de>
2615
2616 PR c/35441
2617 * c-pretty-print.c (c_pretty_printer::expression): Handle MAX_EXPR,
2618 MIN_EXPR, EXACT_DIV_EXPR, RDIV_EXPR, LROTATE_EXPR, RROTATE_EXPR.
2619 (c_pretty_printer::postfix_expression): Handle MAX_EXPR, MIN_EXPR.
2620 (c_pretty_printer::multiplicative_expression): Handle EXACT_DIV_EXPR,
2621 RDIV_EXPR.
2622 (pp_c_shift_expression): Handle LROTATE_EXPR, RROTATE_EXPR.
2623
684f84de
MP
26242017-05-09 Marek Polacek <polacek@redhat.com>
2625
2626 PR c/80525
2627 * c-warn.c (unwrap_c_maybe_const): New.
2628 (warn_logical_operator): Call it.
2629
641da50a
NS
26302017-05-09 Nathan Sidwell <nathan@acm.org>
2631
2632 * c-common.c (c_register_builtin_type): Use pushdecl lang_hook.
2633 * c-common.h (pushdecl_top_level, pushdecl): Don't declare here.
2634
631238ac
MS
26352017-05-08 Martin Sebor <msebor@redhat.com>
2636
2637 PR translation/80280
2638 * c-format.h (struct format_flag_spec): Add new member.
2639 (T89_T): New macro.
2640 * c-format.c (local_tree_type_node): New global.
2641 (printf_flag_specs, asm_fprintf_flag_spec): Initialize new data.
2642 (gcc_diag_flag_specs, scanf_flag_specs, strftime_flag_specs): Ditto.
2643 (strfmon_flag_specs): Likewise.
2644 (gcc_diag_char_table, gcc_cdiag_char_table): Split up specifiers
2645 with distinct quoting properties.
2646 (gcc_tdiag_char_table, gcc_cxxdiag_char_table): Same.
2647 (flag_chars_t::validate): Add argument and handle bad quoting.
2648 (check_format_info_main): Handle quoting problems.
2649 (init_dynamic_diag_info): Simplify.
2650
49f0c04c
JM
26512017-05-08 Jason Merrill <jason@redhat.com>
2652
2653 * c-opts.c (c_common_post_options): Update defaults for
2654 flag_abi_version and flag_abi_compat_version.
2655
56d35585
DM
26562017-05-05 David Malcolm <dmalcolm@redhat.com>
2657
2658 * c-common.c (c_cpp_error): Replace report_diagnostic
2659 with diagnostic_report_diagnostic.
2660
0f2c4a8f
MS
26612017-05-04 Martin Sebor <msebor@redhat.com>
2662
2663 PR translation/80280
2664 * c-attribs.c (handle_alias_ifunc_attribute): Quote a %D directive.
2665 (handle_weakref_attribute): Same.
2666
6fe63fb4
NS
26672017-05-03 Nathan Sidwell <nathan@acm.org>
2668
2669 Canonicalize canonical type hashing
2670 * c-common.c (complete_array_type): Use type_hash_canon.
2671
815d9cc6
XR
26722017-05-01 Xi Ruoyao <ryxi@stu.xidian.edu.cn>
2673
92a285c1 2674 PR c++/80038
815d9cc6
XR
2675 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): Remove
2676 prototype.
2677 (cilk_install_body_pedigree_operations): Likewise.
2678 * cilk.c (cilk_set_spawn_marker): Mark functions that should be
2679 detatched.
2680 (cilk_gimplify_call_params_in_spawned_fn): Remove.
2681 (cilk_install_body_pedigree_operations): Likewise.
2682 (gimplify_cilk_spawn): Add EXPR_STMT and CLEANUP_POINT_EXPR
2683 unwrapping.
2684
f8a36447
JJ
26852017-04-27 Jakub Jelinek <jakub@redhat.com>
2686
2687 PR c++/80534
2688 * c-common.c (complete_array_type): Only hash TYPE_TYPELESS_STORAGE
2689 flag on non-aggregate element types.
2690
7c145456
BE
26912017-04-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
2692
2693 * c-common.c (c_type_hasher, type_hash_table): Remove.
2694 (c_common_get_alias_set): Remove unreachable code.
2695 * c-opts.c (c_common_post_options): Make sure cc1 takes only one file.
2696
c3cbcd45
VR
26972017-04-20 Volker Reichelt <v.reichelt@netcologne.de>
2698
2699 * c.opt (Wextra-semi): New C++ warning flag.
2700
8a59d466
JJ
27012017-04-20 Jakub Jelinek <jakub@redhat.com>
2702
2703 PR middle-end/80423
2704 * c-common.c (complete_array_type): Preserve TYPE_TYPELESS_STORAGE.
2705
8487c9a5
JJ
27062017-04-18 Jakub Jelinek <jakub@redhat.com>
2707
2708 PR middle-end/79788
2709 PR middle-end/80375
2710 * c-common.c (c_common_type_for_mode): Don't handle
2711 widest_*_literal_type_node here.
2712 c_common_signed_or_unsigned_type): Likewise.
2713 (c_common_nodes_and_builtins): Set widest_*_literal_type_node
2714 to *intTI_type_node or *intDI_type_node depending on whether
2715 TImode is supported by the target or not.
2716
3ee0fb02
ML
27172017-04-10 Martin Liska <mliska@suse.cz>
2718
2719 PR sanitizer/80350
2720 * c-ubsan.c (ubsan_instrument_shift): Evaluate RHS before
2721 doing an UBSAN check.
2722
5764ee3c
JW
27232017-04-03 Jonathan Wakely <jwakely@redhat.com>
2724
2725 * c-warn.c (do_warn_double_promotion): Fix typo in comment.
2726
6f3af356
JJ
27272017-03-31 Jakub Jelinek <jakub@redhat.com>
2728
2729 PR c++/79572
2730 * c-ubsan.h (ubsan_maybe_instrument_reference): Change argument to
2731 tree *.
2732 * c-ubsan.c (ubsan_maybe_instrument_reference): Likewise. Handle
2733 not just NOP_EXPR to REFERENCE_TYPE, but also INTEGER_CST with
2734 REFERENCE_TYPE.
2735
f6a7a9d5
DM
27362017-03-31 David Malcolm <dmalcolm@redhat.com>
2737
2738 PR documentation/78732
2739 * c.opt (Wendif-labels): Fix description to refer to
2740 #else rather than #elif.
2741
af88f557
JJ
27422017-03-31 Jakub Jelinek <jakub@redhat.com>
2743
2744 PR libstdc++/80251
2745 * c-common.h (enum rid): Add RID_IS_AGGREGATE.
2746 * c-common.c (c_common_reswords): Add __is_aggregate trait.
2747
a9e4a1a5
JJ
27482017-03-27 Jakub Jelinek <jakub@redhat.com>
2749
2750 PR middle-end/80162
2751 * c-common.c (c_common_mark_addressable_vec): Don't set
2752 TREE_ADDRESSABLE on DECL_HARD_REGISTER.
2753
3f01b620
MS
27542017-03-21 Martin Sebor <msebor@redhat.com>
2755
2756 PR c++/79548
2757 * c-common.c (set_underlying_type): Mark type used only when
2758 original del is declared unused.
2759
2f6f187a
DM
27602017-03-10 David Malcolm <dmalcolm@redhat.com>
2761
2762 PR translation/79848
2763 * c-format.c (check_format_string): Simplify uses of "%<%s%>" to
2764 "%qs".
2765
a02fa805
DM
27662017-03-10 David Malcolm <dmalcolm@redhat.com>
2767
2768 PR c/79921
2769 * c-indentation.c (warn_for_misleading_indentation): Remove parens
2770 from inform's message, so that xgettext can locate it.
2771
822a132c
MP
27722017-03-09 Marek Polacek <polacek@redhat.com>
2773
2774 PR c++/79962
2775 PR c++/79984
2776 * c-attribs.c (handle_nonnull_attribute): Save the result of default
2777 conversion to the attribute list.
2778
bba81f1c
ML
27792017-03-09 Martin Liska <mliska@suse.cz>
2780
2781 * c-ada-spec.c (macro_length): Increment value instead of a pointer.
2782
108154ff
JM
27832017-03-03 Jason Merrill <jason@redhat.com>
2784
2785 * c.opt (Wnoexcept-type): New.
2786
eb0e7c34
RB
27872017-03-02 Richard Biener <rguenther@suse.de>
2788
2789 PR c/79756
2790 * c-common.c (c_common_mark_addressable_vec): Look through
2791 C_MAYBE_CONST_EXPR.
2792
9453ba0a
ML
27932017-02-28 Martin Liska <mliska@suse.cz>
2794
2795 * c.opt: Replace space with tabular for options of <number>
2796 type.
2797
6a825afe
ML
27982017-02-28 Martin Liska <mliska@suse.cz>
2799
2800 * c.opt: Fix --help=option -Q for options which are of
2801 an enum type.
2802
4227c9ad
JJ
28032017-02-24 Jakub Jelinek <jakub@redhat.com>
2804
2805 PR c++/79588
2806 * c-common.c (check_function_restrict): New function.
2807 (check_function_arguments): Add FNDECL argument. Call
2808 check_function_restrict if -Wrestrict.
2809 * c-warn.c (warn_for_restrict): Remove ARGS argument, add ARGARRAY
2810 and NARGS. Use auto_vec for ARG_POSITIONS, simplify.
2811 * c-common.h (check_function_arguments): Add FNDECL argument.
2812 (warn_for_restrict): Remove ARGS argument, add ARGARRAY and NARGS.
2813
59909673
EB
28142017-02-24 Eric Botcazou <ebotcazou@adacore.com>
2815
2816 * c-ada-spec.c (dump_ada_function_declaration): Add comment about the
2817 treatment of parameters with pointer-to-tagged type and tidy up.
2818 (print_ada_methods): Remove the special treatment of C++ static member
2819 functions.
2820
54dcd526
ML
28212017-02-22 Martin Liska <mliska@suse.cz>
2822
2823 * c.opt: Replace inequality signs with square brackets
2824 for -Wnornalized.
2825
00bc9de3
JJ
28262017-02-21 Jakub Jelinek <jakub@redhat.com>
2827
2828 PR c++/79641
2829 * c-attribs.c (handle_mode_attribute): Use build_qualified_type to
2830 preserve quals.
2831
97fcf744
JM
28322017-02-17 Joseph Myers <joseph@codesourcery.com>
2833
2834 * c-cppbuiltin.c (builtin_define_float_constants): Define
2835 __DECIMAL_DIG__ to the value for long double.
2836
c7545f1c
MP
28372017-02-15 Marek Polacek <polacek@redhat.com>
2838
2839 PR c/79515
2840 * c-warn.c (do_warn_double_promotion): Don't warn if an invalid
2841 conversion has occured.
2842
c2e84327
DM
28432017-01-24 David Malcolm <dmalcolm@redhat.com>
2844
2845 * c-common.c (c_common_reswords): Add "__RTL".
2846 * c-common.h (enum rid): Add RID_RTL.
2847
2ebd93e1
MP
28482017-01-20 Marek Polacek <polacek@redhat.com>
2849
2850 PR c/64279
2851 * c-common.h (do_warn_duplicated_branches_r): Declare.
2852 * c-gimplify.c (c_genericize): Walk the function tree calling
2853 do_warn_duplicated_branches_r.
2854 * c-warn.c (expr_from_macro_expansion_r): New.
2855 (do_warn_duplicated_branches): New.
2856 (do_warn_duplicated_branches_r): New.
2857 * c.opt (Wduplicated-branches): New option.
2858
0d80ab91
DM
28592017-01-17 David Malcolm <dmalcolm@redhat.com>
2860
2861 PR c++/71497
2862 * c-indentation.c (warn_for_misleading_indentation): Use the past
2863 subjunctive in the note.
2864
7f991c36
AH
28652017-01-17 Aldy Hernandez <aldyh@redhat.com>
2866
2867 PR c/79116
2868 * array-notation-common.c (cilkplus_extract_an_triplets): Convert
2869 start type to integer_type.
2870
1c70261c
JJ
28712017-01-16 Jakub Jelinek <jakub@redhat.com>
2872
2873 PR driver/49726
2874 * c.opt (gen-decls): Add Driver flag.
2875
1ddca3f3
PC
28762017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2877
2878 Revert:
2879 2017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2880
2881 PR c++/71737
2882 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2883
7d2f3f1d
PC
28842017-01-16 Paolo Carlini <paolo.carlini@oracle.com>
2885
2886 PR c++/71737
2887 * c-common.c (set_underlying_type): Always set DECL_ORIGINAL_TYPE.
2888
bce6f760
MS
28892017-01-12 Martin Sebor <msebor@redhat.com>
2890
2891 (-Wformat-overflow): ...to this.
2892
bf5fbf46
MS
28932017-01-11 Martin Sebor <msebor@redhat.com>
2894
2895 PR c/78768
2896 * c.opt (-Walloca-larger-than, -Wformat-length, -Wformat-truncation):
2897 Also enable for LTO.
2898
e363df3f
JM
28992017-01-10 Jason Merrill <jason@redhat.com>
2900
2901 Implement P0195R2, C++17 variadic using.
2902 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_variadic_using.
2903
bd2c6270
JJ
29042017-01-09 Jakub Jelinek <jakub@redhat.com>
2905
2906 PR translation/79019
2907 PR translation/79020
2908 * c.opt (Wnormalized=): Fix typo in description.
2909
efcc8d38
MS
29102017-01-08 Martin Sebor <msebor@redhat.com>
2911
2912 PR middle-end/77708
2913 * c.opt (-Wformat-truncation): New option.
2914
ab20d992 29152017-01-06 Alexandre Oliva <aoliva@redhat.com>
435f3f7a
AO
2916
2917 * c-pretty-print.c (pp_c_tree_decl_identifier): Convert 16-bit
2918 value to unsigned short to fit in 4 hex digits without
2919 warnings.
2920
4e89adf9
EB
29212017-01-05 Eric Botcazou <ebotcazou@adacore.com>
2922
2923 * c.opt (fsso-struct): Add 'native' value.
2924
cd445b54
ML
29252017-01-05 Martin Liska <mliska@suse.cz>
2926
2927 PR pch/78970
2928 * c-opts.c (c_common_post_options): Reject '-' filename for a precompiled
2929 header.
2930
a9342885
MP
29312017-01-04 Marek Polacek <polacek@redhat.com>
2932
2933 PR c++/64767
2934 * c.opt (Wpointer-compare): New option.
2935
fc73e60c
JJ
29362017-01-04 Jakub Jelinek <jakub@redhat.com>
2937
2938 PR driver/78957
2939 * c.opt (fsso-struct=): Add RejectNegative.
2940
cbe34bb5
JJ
29412017-01-01 Jakub Jelinek <jakub@redhat.com>
2942
2943 Update copyright years.
2944
d4a6c0ea
ML
29452016-12-29 Martin Liska <mliska@suse.cz>
2946
2947 PR c/78933
2948 * c.opt (strong-eval-order): Add RejectNegative keyword.
2949
67a5ad7c
JM
29502016-12-22 Jason Merrill <jason@redhat.com>
2951
2952 Implement P0522R0, matching of template template arguments.
2953 * c-cppbuiltin.c (c_cpp_builtins): Define
2954 __cpp_template_template_args.
2955
0dba7960
JJ
29562016-12-21 Jakub Jelinek <jakub@redhat.com>
2957
2958 PR bootstrap/78817
2959 * c-common.c (struct nonnull_arg_ctx): New type.
2960 (check_function_nonnull): Return bool instead of void. Use
2961 nonnull_arg_ctx as context rather than just location_t.
2962 (check_nonnull_arg): Adjust for the new context type, set
2963 warned_p to true if a warning has been diagnosed.
2964 (check_function_arguments): Return bool instead of void.
2965 * c-common.h (check_function_arguments): Adjust prototype.
2966
31bfc9b9
JM
29672016-12-21 Jason Merrill <jason@redhat.com>
2968
2969 * c.opt (-fnew-ttp-matching): New flag.
2970 * c-opts.c (c_common_post_options): Default on if -std=c++1z.
2971
629b3d75
MJ
29722016-12-14 Martin Jambor <mjambor@suse.cz>
2973
2974 * c-omp.c: Include omp-general.h instead of omp-low.h.
2975 (c_finish_oacc_wait): Adjusted call to find_omp_clause to use its new
2976 name.
2977
474da67e
MS
29782016-12-14 Martin Sebor <msebor@redhat.com>
2979
2980 PR c/17308
2981 * c-common.c (check_nonnull_arg): Disable when optimization
2982 is enabled.
2983
fe366b87
MP
29842016-12-12 Marek Polacek <polacek@redhat.com>
2985
2986 PR c++/78647
2987 * c-common.c (attribute_fallthrough_p): Return false for
2988 error_mark_node.
2989
8bd9f164
MS
29902016-12-08 Martin Sebor <msebor@redhat.com>
2991
2992 PR c/78284
2993 * c.opt (-Walloc-zero, -Walloc-size-larger-than): New options.
2994
060162e0
MS
29952016-12-08 Martin Sebor <msebor@redhat.com>
2996
2997 PR c/78165
92a285c1
ML
2998 * c-pretty-print (pp_c_integer_constant): Avoid formatting type
2999 suffix.
060162e0 3000
ee92e7ba
MS
30012016-12-07 Martin Sebor <msebor@redhat.com>
3002
3003 PR c/53562
3004 PR middle-end/77784
3005 PR middle-end/78149
3006 PR middle-end/78138
3007 * c.opt (-Wstringop-overflow): New option.
3008
84b0769e
MO
30092016-12-02 Maxim Ostapenko <m.ostapenko@samsung.com>
3010
3011 * c-attribs.c (asan odr indicator): New attribute.
3012 (handle_asan_odr_indicator_attribute): New function.
3013
7fa6a965
PK
30142016-11-26 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3015
3016 * c-common.c (c_common_nodes_and_builtins): Remove initialization of
3017 ptrdiff_type_node;
3018
56d8ffc1
JG
30192016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3020
3021 * c-common.c (excess_precision_mode_join): New.
3022 (c_ts18661_flt_eval_method): New.
3023 (c_c11_flt_eval_method): Likewise.
3024 (c_flt_eval_method): Likewise.
3025 * c-common.h (excess_precision_mode_join): New.
3026 (c_flt_eval_method): Likewise.
3027 * c-cppbuiltin.c (c_cpp_flt_eval_method_iec_559): New.
3028 (cpp_iec_559_value): Call it.
3029 (c_cpp_builtins): Modify logic for __LIBGCC_*_EXCESS_PRECISION__,
3030 call c_flt_eval_method to set __FLT_EVAL_METHOD__ and
3031 __FLT_EVAL_METHOD_TS_18661_3__.
3032
04f0fcf7
JG
30332016-11-23 James Greenhalgh <james.greenhalgh@arm.com>
3034
3035 * c-opts.c (c_common_post_options): Add logic to handle the default
3036 case for -fpermitted-flt-eval-methods.
3037
fb2675cb
PB
30382016-11-23 Paolo Bonzini <bonzini@gnu.org>
3039
3040 * c.opt (Wexpansion-to-defined): New.
3041
ec1c5694
JJ
30422016-11-23 Jakub Jelinek <jakub@redhat.com>
3043
3044 PR target/78451
3045 * c-pragma.c (handle_pragma_target): Don't replace
3046 current_target_pragma, but chainon the new args to the current one.
3047
730c9e75
NS
30482016-11-22 Nathan Sidwell <nathan@acm.org>
3049
3050 * array-notation-common.c (cilkplus_extract_an_trplets): Fix
cacd29be 3051 indentation and formatting.
730c9e75 3052
89990732
MS
30532016-11-21 Martin Sebor <msebor@redhat.com>
3054
3055 * c.opt (-fprintf-return-value): Enable by default.
3056
48330c93
BE
30572016-11-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3058
3059 PR c++/71973
3060 * c.opt (-Wbuiltin-declaration-mismatch): New warning.
3061 * c-common.c (c_common_nodes_and_builtins): Initialize
3062 const_tm_ptr_type_node.
3063
0d939c95
MP
30642016-11-16 Marek Polacek <polacek@redhat.com>
3065
3066 PR c/78285
3067 * c-common.c (c_add_case_label): Turn error_at calls into inform.
3068
8e745a17
JJ
30692016-11-14 Jakub Jelinek <jakub@redhat.com>
3070
3071 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_structured_bindings.
3072
1ee62b92 30732016-11-14 Prasad Ghangal <prasad.ghangal@gmail.com>
8e745a17
JJ
3074 Richard Biener <rguenther@suse.de>
3075
3076 * c-common.h (c_common_resword): Add RID_GIMPLE, RID_PHI types.
3077 * c-common.h (enum rid): Add RID_GIMPLE, RID_PHI.
3078 * c.opt (fgimple): New option.
1ee62b92 3079
22b15758
UB
30802016-11-13 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
3081
3082 PR c/35503
3083 * c-common.h (warn_for_restrict): Declare.
3084 * c-warn.c: Include gcc-rich-location.h.
3085 (warn_for_restrict): New function.
3086 * c-format.c (gcc_tdiag_char_table): Add entry for "Z" specifier.
3087 (gcc_cdiag_char_table): Likewise.
3088 (gcc_cxxdiag_char_table): Likewise.
3089 * c.opt (Wrestrict): New option.
3090
4be719cd
EB
30912016-11-13 Eric Botcazou <ebotcazou@adacore.com>
3092
3093 * c-ada-spec.c (print_ada_declaration): For typedef declarations, look
3094 for nested types only if the type is a record or union and dump SLOC.
3095
4a826ca6
JM
30962016-11-09 Jason Merrill <jason@redhat.com>
3097
3098 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.
3099
2e955d50
JJ
31002016-11-09 Jakub Jelinek <jakub@redhat.com>
3101
3102 * c-ubsan.c (ubsan_instrument_shift): Handle split
3103 -fsanitize=shift-base and -fsanitize=shift-exponent.
3104
51dc6603
JM
31052016-11-07 Jason Merrill <jason@redhat.com>
3106
3107 * c.opt (Wc++1z-compat): New.
3108 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
3109
6dc4a604
ML
31102016-11-07 Martin Liska <mliska@suse.cz>
3111
3112 * c-warn.c (warn_for_unused_label): Save all labels used
3113 in goto or in &label.
3114
b302001e
JM
31152016-11-03 Jason Merrill <jason@redhat.com>
3116
3117 * c-cppbuiltin.c (c_cpp_builtins): Correct
3118 __cpp_inheriting_constructors.
3119
31f7f784
JM
31202016-11-01 Jason Merrill <jason@redhat.com>
3121
2bc78e3c
JM
3122 * c-cppbuiltin.c (c_cpp_builtins): Update
3123 __cpp_inheriting_constructors.
3124
31f7f784
JM
3125 * c.opt (-fnew-inheriting-ctors): New.
3126 * c-opts.c: Default to on for ABI 11+.
3127
dcb466ec
JJ
31282016-10-31 Jakub Jelinek <jakub@redhat.com>
3129
3130 PR c++/77948
3131 * c.opt (fext-numeric-literals): Add Var and Init.
3132 * c-opts.c (c_common_handle_option): Don't clear
3133 cpp_opts->ext_numeric_literals for -std=c++{11,14,1z}.
3134 (c_common_post_options): Clear it here if not set
3135 explicitly.
3136
52e1b91e
AH
31372016-10-28 Aldy Hernandez <aldyh@redhat.com>
3138
3139 PR debug/77773
3140 * c-pretty-print.c (simple_type_specifier): Do not dereference `t'
3141 if NULL.
3142
e16f1cc7
JJ
31432016-10-25 Jakub Jelinek <jakub@redhat.com>
3144
3145 * c-common.h (enum rid): Add RID_BUILTIN_LAUNDER.
3146 * c-common.c (c_common_reswords): Add __builtin_launder.
3147
f8348061
BE
31482016-10-24 Bernd Edlinger <bernd.edlinger@hotmail.de>
3149
3150 * c-common.c (c_common_truthvalue_conversion): Warn for
3151 multiplications in boolean context. Fix the quoting of '<<' and '<'
3152 in the shift warning.
3153
eff89e01
BE
31542016-10-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
3155
3156 * c-common.c (c_common_truthvalue_conversion): Fix the comment.
3157
24bc7bf4
JM
31582016-10-20 Jason Merrill <jason@redhat.com>
3159
3160 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_concepts value.
3161
4c712374
BE
31622016-10-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3163
3164 * c-common.c (c_common_truthvalue_conversion): Warn only for signed
3165 integer shift ops in boolean context.
3166
31672016-10-18 Aldy Hernandez <aldyh@redhat.com>
adc577c5
AH
3168
3169 * c.opt (Walloca): New.
3170 (Walloca-larger-than=): New.
3171 (Wvla-larger-than=): New.
3172
8fa18c06
MP
31732016-10-17 Marek Polacek <polacek@redhat.com>
3174
3175 * c-warn.c (find_array_ref_with_const_idx_r): Remove parameter names.
3176 Return immediately when finding a match.
3177 (warn_tautological_cmp): Remove a boolean variable that is no longer
3178 needed.
3179
b12b1915
MP
31802016-10-17 Marek Polacek <polacek@redhat.com>
3181
3182 * c-attribs.c: New file.
3183 * c-common.c: Move attributes handling to c-attribs.c.
3184 (get_nonnull_operand): No longer static.
3185 * c-common.h: Move the declarations from c-attribs.c to its own section.
3186
2045acd9
JM
31872016-10-14 Jason Merrill <jason@redhat.com>
3188
3189 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_aggregate_bases
3190 and __cpp_deduction_guides.
3191
14a2c9aa
JM
31922016-10-13 Jason Merrill <jason@redhat.com>
3193
3194 * c-cppbuiltin.c (c_cpp_builtins): Add __cpp_inline_variables.
3195
4d0cdd0c
TP
31962016-10-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
3197
3198 * c-cppbuiltin.c: Include memmodel.h.
3199 * c-opts.c: Likewise.
3200 * c-pragma.c: Likewise.
3201 * c-warn.c: Likewise.
3202
70f6d5e1
JJ
32032016-10-12 Jakub Jelinek <jakub@redhat.com>
3204
3205 * c.opt (Wextra): Add as C/C++/ObjC/ObjC++ option.
3206 (Wimplicit-fallthrough=): Enable for these languages by -Wextra.
3207 * c-opts.c (sanitize_cpp_opts): Initialize
3208 cpp_opts->cpp_warn_implicit_fallthrough.
3209
78f61294
MP
32102016-10-11 Marek Polacek <polacek@redhat.com>
3211
3212 * c-common.c (warning_candidate_p): Change the return type to bool
3213 and return true/false instead of 1/0.
3214 (vector_mode_valid_p): Likewise.
3215
038b5cc0
MP
32162016-10-11 Marek Polacek <polacek@redhat.com>
3217
3218 * c-common.c (fold_for_warn): No longer static.
3219 (bool_promoted_to_int_p): Likewise.
3220 (c_common_get_narrower): Likewise.
3221 (constant_expression_warning): Move to c-warn.c.
3222 (constant_expression_error): Likewise.
3223 (overflow_warning): Likewise.
3224 (warn_logical_operator): Likewise.
3225 (find_array_ref_with_const_idx_r): Likewise.
3226 (warn_tautological_cmp): Likewise.
3227 (expr_has_boolean_operands_p): Likewise.
3228 (warn_logical_not_parentheses): Likewise.
3229 (warn_if_unused_value): Likewise.
3230 (strict_aliasing_warning): Likewise.
3231 (sizeof_pointer_memaccess_warning): Likewise.
3232 (check_main_parameter_types): Likewise.
3233 (conversion_warning): Likewise.
3234 (warnings_for_convert_and_check): Likewise.
3235 (match_case_to_enum_1): Likewise.
3236 (match_case_to_enum): Likewise.
3237 (c_do_switch_warnings): Likewise.
3238 (warn_for_omitted_condop): Likewise.
3239 (readonly_error): Likewise.
3240 (lvalue_error): Likewise.
3241 (invalid_indirection_error): Likewise.
3242 (warn_array_subscript_with_type_char): Likewise.
3243 (warn_about_parentheses): Likewise.
3244 (warn_for_unused_label): Likewise.
3245 (warn_for_div_by_zero): Likewise.
3246 (warn_for_memset): Likewise.
3247 (warn_for_sign_compare): Likewise.
3248 (do_warn_double_promotion): Likewise.
3249 (do_warn_unused_parameter): Likewise.
3250 (record_locally_defined_typedef): Likewise.
3251 (maybe_record_typedef_use): Likewise.
3252 (maybe_warn_unused_local_typedefs): Likewise.
3253 (maybe_warn_bool_compare): Likewise.
3254 (maybe_warn_shift_overflow): Likewise.
3255 (warn_duplicated_cond_add_or_warn): Likewise.
3256 (diagnose_mismatched_attributes): Likewise.
3257 * c-common.h: Move the declarations from c-warn.c to its own section.
3258 * c-warn.c: New file.
3259
627be19f
JM
32602016-10-08 Jason Merrill <jason@redhat.com>
3261
3262 * c-common.c (c_common_truthvalue_conversion): Don't distribute
3263 into COND_EXPR in C++.
3264
7bad794a
JJ
32652016-10-08 Jakub Jelinek <jakub@redhat.com>
3266
3267 * c-lex.c (c_lex_with_flags) <case CPP_COMMENT>: For CPP_COMMENT
3268 token with PREV_FALLTHROUGH, skip all following CPP_PADDING and
3269 CPP_COMMENT tokens and set add_flags to PREV_FALLTHROUGH afterwards.
3270
be845b04
JJ
32712016-10-07 Jakub Jelinek <jakub@redhat.com>
3272
3273 Implement LWG2296 helper intrinsic
3274 * c-common.h (enum rid): Add RID_ADDRESSOF.
3275 * c-common.c (c_common_reswords): Add __builtin_addressof.
3276
c09c4992
BE
32772016-10-07 Bernd Edlinger <bernd.edlinger@hotmail.de>
3278
3279 PR c++/77700
3280 * c-common.c (c_common_truthvalue_conversion): Warn also for
3281 suspicious enum values in boolean context.
3282
342cfb3e
JJ
32832016-10-06 Jakub Jelinek <jakub@redhat.com>
3284
3285 Implement P0258R2 - helper for C++17
3286 std::has_unique_object_representations trait
3287 * c-common.h (enum rid): Add RID_HAS_UNIQUE_OBJ_REPRESENTATIONS.
3288 * c-common.c (c_common_reswords): Add
3289 __has_unique_object_representations.
3290
2e69f143
JJ
32912016-10-05 Jakub Jelinek <jakub@redhat.com>
3292
3293 PR sanitizer/66343
3294 * c-ubsan.c (ubsan_instrument_return): Don't call
3295 initialize_sanitizer_builtins here.
3296
700fff34
BE
32972016-10-05 Bernd Edlinger <bernd.edlinger@hotmail.de>
3298
3299 * c-common.c (c_common_truthvalue_conversion): Warn also for suspicious
3300 conditional expression in boolean context when only one arm is
3301 non-boolean.
3302
9563bfcd
JJ
33032016-10-05 Jakub Jelinek <jakub@redhat.com>
3304
04a32443
JJ
3305 PR sanitizer/77823
3306 * c-ubsan.c (ubsan_instrument_shift): Return NULL_TREE if type0
3307 is not integral.
3308
9563bfcd
JJ
3309 * c-common.c (c_common_reswords): Update comment for C++11.
3310
f1644724
JM
33112016-10-04 Jason Merrill <jason@redhat.com>
3312
3313 * c-common.c (make_tree_vector_from_ctor): New.
3314 * c-common.h: Declare it.
3315
5a79befb
JJ
33162016-10-04 Jakub Jelinek <jakub@redhat.com>
3317
3318 * c-cppbuiltin.c (c_cpp_builtins): Don't define
3319 __LIBGCC_JCR_SECTION_NAME__.
3320
1633d3b9
BE
33212016-10-03 Bernd Edlinger <bernd.edlinger@hotmail.de>
3322
3323 * c-common.c (c_common_truthvalue_conversion): Warn for suspicious
3324 left shift in boolean context.
3325
a2c6e7f2
JJ
33262016-09-29 Jakub Jelinek <jakub@redhat.com>
3327
3328 Implement P0001R1 - C++17 removal of register storage class specifier
3329 * c.opt (Wregister): New warning.
3330 * c-opts.c (c_common_post_options): Enable -Wregister by
3331 default for C++17.
3332
75304c87
JG
33332016-09-29 James Greenhalgh <james.greenhalgh@arm.com>
3334
3335 * c-opts.c (c_common_post_options): Remove special case for
3336 TARGET_FLT_EVAL_METHOD_NON_DEFAULT with -fexcess-precision=standard
3337 in C++.
3338
bbfac6da
JJ
33392016-09-27 Jakub Jelinek <jakub@redhat.com>
3340
6e39060a
JJ
3341 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_capture_star_this for
3342 -std=c++1z.
3343
bbfac6da
JJ
3344 * c-ada-spec.c (print_ada_declaration): Remove break after return.
3345
e73cf9a2
TP
33462016-09-26 Thomas Preud'homme <thomas.preudhomme@arm.com>
3347
3348 * c-common.c: Include memmodel.h.
3349
c6147dc4
MP
33502016-09-26 Marek Polacek <polacek@redhat.com>
3351
3352 * c-lex.c (c_common_has_attribute): Handle attribute fallthrough.
3353
81fea426
MP
33542016-09-26 Marek Polacek <polacek@redhat.com>
3355
3356 PR c/7652
3357 * c-common.c (c_common_attribute_table): Add fallthrough attribute.
3358 (handle_fallthrough_attribute): New function.
3359 (attribute_fallthrough_p): New function.
3360 * c-common.h (attribute_fallthrough_p): Declare.
3361
9a2300e9
MP
33622016-09-24 Marek Polacek <polacek@redhat.com>
3363
3364 PR c/77490
3365 * c.opt (Wbool-operation): New.
3366
a09e9e35
BE
33672016-09-21 Bernd Edlinger <bernd.edlinger@hotmail.de>
3368
3369 * c-common.c (c_common_truthvalue_conversion): Inhibit
3370 Wint-in-bool-context warning with from_macro_definition_at.
3371 Mention the expression will always evaluate to true.
3372
d43b4ccc
MS
33732016-09-21 Martin Sebor <msebor@redhat.com>
3374
3375 PR bootstrap/77676
3376 * c.opt (fprintf-return-value): Temporarily initialize to zero
3377 to unblock bootstrap failures.
3378
2e1c20b1
JJ
33792016-09-21 Jakub Jelinek <jakub@redhat.com>
3380
3381 PR c++/77651
3382 * c.opt (Waligned-new=): Add RejectNegative.
3383 (faligned-new=): Likewise. Spelling fix - change
3384 aligned_new_threshhold to aligned_new_threshold.
3385 * c-cppbuiltin.c (c_cpp_builtins): Change aligned_new_threshhold
3386 to aligned_new_threshold.
3387
88d0c3f0
MS
33882016-09-20 Martin Sebor <msebor@redhat.com>
3389
3390 PR middle-end/49905
3391 * c.opt: Add -Wformat-length and -fprintf-return-value.
3392
144a96e4
BE
33932016-09-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
3394
3395 PR c++/77434
3396 * c.opt (Wint-in-bool-context): New warning.
3397 * c-common.c (c_common_truthvalue_conversion): Warn on integer
3398 constants in boolean context.
3399
63012d9a
JM
34002016-09-19 Joseph Myers <joseph@codesourcery.com>
3401
3402 * c-common.c (max_align_t_align): Also consider alignment of
3403 float128_type_node.
3404
931388ce
JM
34052016-09-15 Jason Merrill <jason@redhat.com>
3406
3407 * c-common.c (check_cxx_fundamental_alignment_constraints): Check
3408 DECL_EXTERNAL.
3409
38711381
JM
34102016-09-14 Jason Merrill <jason@redhat.com>
3411
3412 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3413 limit FIELD_DECL, either.
3414
e51fbec3
MP
34152016-09-14 Marek Polacek <polacek@redhat.com>
3416
3417 * c-common.c (c_common_truthvalue_conversion): Use false instead of 0.
3418 * c-common.h (build_unary_op): Change nonconvert parameter type to bool.
3419 * c-omp.c (c_finish_omp_atomic): Use false instead of 0.
3420
254830ba
DM
34212016-09-13 David Malcolm <dmalcolm@redhat.com>
3422
3423 * c-common.c (warn_logical_not_parentheses): Replace
3424 rich_location::add_fixit_insert calls with add_fixit_insert_before
3425 and add_fixit_insert_after, eliminating the "next_loc" calculation.
3426
42763690
JM
34272016-09-13 Jason Merrill <jason@redhat.com>
3428 Tom de Vries <tom@codesourcery.com>
3429
3430 PR c++/77427
3431 * c-common.c (set_underlying_type): Don't treat array as builtin type.
3432
9453eee9
JM
34332016-09-13 Jason Merrill <jason@redhat.com>
3434
3435 * c-common.c (check_cxx_fundamental_alignment_constraints): Don't
3436 limit types at all.
3437
e96809e3
JM
34382016-09-12 Jason Merrill <jason@redhat.com>
3439
3440 * c-common.c (check_cxx_fundamental_alignment_constraints): Fix
3441 bit/byte confusion, allow large alignment for types.
3442
54dcdb88
BE
34432016-09-12 Bernd Edlinger <bernd.edlinger@hotmail.de>
3444
3445 PR c++/77496
3446 * c-common.c (warn_for_omitted_condop): Also warn for boolean data.
3447
d1463eb9
DM
34482016-09-12 David Malcolm <dmalcolm@redhat.com>
3449
3450 PR c/72858
3451 * c-format.c (argument_parser::check_argument_type): Add params
3452 "type_start" and "conversion_char". Use the former to generate
3453 offset_to_type_start and pass it and conversion_char to
3454 check_format_types.
3455 (check_format_info_main): Capture the start of the type
3456 information as "type_start", and pass it an format_char
3457 to arg_parser.check_argument_type.
3458 (check_format_types): Provide an example in the leading comment.
3459 Add params "offset_to_type_start" and "conversion_char"; pass
3460 them to format_type_warning calls.
3461 (test_get_modifier_for_format_len): Likewise.
3462 (matching_type_p): New function.
3463 (get_format_for_type): Add param "conversion_char" and move
3464 implementation into...
3465 (get_format_for_type_1): ...new function, called twice.
3466 Use new function matching_type_p rather than checking for
3467 TYPE_CANONICAL equality.
3468 (get_corrected_substring): New function.
3469 (format_type_warning): Provide an example in the leading comment.
3470 Add params "offset_to_type_start" and "conversion_char". Replace
3471 call to get_format_for_type with call to get_corrected_substring
3472 and move rejection of hints for widths/precisions there.
3473 (assert_format_for_type_streq): Add param "conversion_char".
3474 (ASSERT_FORMAT_FOR_TYPE_STREQ): Add param CONVERSION_CHAR.
3475 (test_get_format_for_type_printf): Add conversion chars to the
3476 tests, adding coverage for various combinations of integer
3477 vs double conversions, and for preserving octal and hexadecimal
3478 conversions.
3479 (test_get_format_for_type_scanf): Add conversion chars to the
3480 tests.
3481
5b28efbb
TV
34822016-09-10 Tom de Vries <tom@codesourcery.com>
3483
3484 PR C/71602
3485 * c-common.c (build_va_arg): Handle more strict
3486 targetm.canonical_va_list_type. Replace first argument type error with
3487 assert.
3488
3f0177e7
MS
34892016-09-09 Martin Sebor <msebor@redhat.com>
3490
3491 PR c/77520
3492 PR c/77521
3493 * c-format.c (argument_parser::find_format_char_info): Use %qc
3494 format directive unconditionally.
3495
af63ba4b
JM
34962016-09-09 Jason Merrill <jason@redhat.com>
3497
3498 Implement C++17 new of over-aligned types.
3499 * c.opt: Add -faligned-new and -Waligned-new.
3500 * c-common.c (max_align_t_align): Split out from...
3501 (cxx_fundamental_alignment_p): ...here.
3502 * c-common.h: Declare it.
3503 * c-cppbuiltin.c (c_cpp_builtins): Handle aligned new.
3504
c65248cb
JM
35052016-09-09 Joseph Myers <joseph@codesourcery.com>
3506
3507 * c-cppbuiltin.c (builtin_define_type_width): New function.
3508 (builtin_define_stdint_macros, c_cpp_builtins): Define type width
3509 macros.
3510
e5106e27
DM
35112016-09-07 David Malcolm <dmalcolm@redhat.com>
3512
3513 * c-common.c (get_cpp_ttype_from_string_type): Handle being passed
3514 a POINTER_TYPE.
3515 (substring_loc::get_location): Move to substring-locations.c,
3516 keeping implementation as...
3517 (c_get_substring_location): New function, from the above, reworked
3518 to use accessors rather than member lookup.
3519 * c-common.h (class substring_loc): Move to substring-locations.h,
3520 replacing with a forward decl.
3521 (c_get_substring_location): New decl.
3522 * c-format.c: Include "substring-locations.h".
3523 (format_warning_va): Move to substring-locations.c.
3524 (format_warning_at_substring): Likewise.
3525
ab20d992 35262016-09-06 Martin Sebor <msebor@redhat.com>
a42e7952
MS
3527
3528 PR c/77336
3529 * c-format.c (check_function_format): Avoid issuing warnings for
3530 functions unless they call format functions with non-constant
3531 format strings.
3532
b772a565
RB
35332016-09-06 Richard Biener <rguenther@suse.de>
3534
3535 PR c/77450
3536 * c-common.c (c_common_mark_addressable_vec): Handle
3537 COMPOUND_LITERAL_EXPR.
3538
25ff5dd3
MP
35392016-09-05 Marek Polacek <polacek@redhat.com>
3540
3541 PR c/77423
3542 * c-common.c (bool_promoted_to_int_p): New function.
3543 (expr_has_boolean_operands_p): New function.
3544 (warn_logical_not_parentheses): Return if expr_has_boolean_operands_p.
3545 (maybe_warn_bool_compare): Use bool_promoted_to_int_p.
3546
21234eb5
TV
35472016-09-04 Tom de Vries <tom@codesourcery.com>
3548
3549 revert:
3550 2016-08-29 Tom de Vries <tom@codesourcery.com>
3551
3552 * c-common.c (build_va_arg): Replace first argument type error
3553 with assert.
3554
9dc5773f
JJ
35552016-09-02 Jakub Jelinek <jakub@redhat.com>
3556
3557 PR c/65467
3558 * c-omp.c (c_finish_omp_atomic): Reject _Atomic qualified expressions.
3559 (c_finish_omp_for): Reject _Atomic qualified iterators.
3560
35612016-09-01 Martin Sebor <msebor@redhat.com>
3d7b83b6
MS
3562
3563 * c-ada-spec.c (dump_ada_function_declaration): Increase buffer
3564 size to guarantee it fits the output of the formatted function
3565 regardless of its arguments.
3566
295844f6
MP
35672016-09-01 Marek Polacek <polacek@redhat.com>
3568
3569 PR c/7652
3570 * c-common.c (resolve_overloaded_builtin): Fix formatting. Add
3571 FALLTHRU comments.
3572
3d06b6f2
MP
35732016-08-29 Marek Polacek <polacek@redhat.com>
3574
3575 PR c/77292
3576 * c-common.c (warn_logical_not_parentheses): Don't warn for
3577 a comparison or a logical operator.
3578
34cedad5
TV
35792016-08-29 Tom de Vries <tom@codesourcery.com>
3580
3581 * c-common.c (build_va_arg): Fix type comparison assert.
3582
f162d717
TV
35832016-08-29 Tom de Vries <tom@codesourcery.com>
3584
3585 * c-common.c (build_va_arg): Replace first argument type error
3586 with assert.
3587
ba9bbd6f
TV
35882016-08-29 Tom de Vries <tom@codesourcery.com>
3589
3590 PR c/77398
3591 * c-common.c (build_va_arg): Add first argument error. Build va_arg
3592 with error_mark_node as va_list instead of with illegal va_list.
3593
ebef225f
MP
35942016-08-25 Marek Polacek <polacek@redhat.com>
3595 David Malcolm <dmalcolm@redhat.com>
3596
3597 * c-common.c (warn_logical_not_parentheses): Print fixit hints.
3598 * c-common.h (warn_logical_not_parentheses): Update declaration.
3599
b00e6e75
MP
36002016-08-22 Marek Polacek <polacek@redhat.com>
3601
3602 PR c++/77321
3603 * c-common.c (warn_for_memset): Check type for null.
3604
6dc198e3
JM
36052016-08-22 Joseph Myers <joseph@codesourcery.com>
3606
14ec014e 3607 * c-cppbuiltin.c (c_cpp_builtins): Check _FloatN and
6dc198e3
JM
3608 _FloatNx types for suffixes for built-in functions.
3609
c65699ef
JM
36102016-08-19 Joseph Myers <joseph@codesourcery.com>
3611
3612 PR c/32187
3613 * c-common.h (RID_FLOAT16, RID_FLOATN_NX_FIRST, RID_FLOAT32)
3614 (RID_FLOAT64, RID_FLOAT128, RID_FLOAT32X, RID_FLOAT64X)
3615 (RID_FLOAT128X): New enum rid values.
3616 (CASE_RID_FLOATN_NX): New macro.
3617 * c-common.c (c_common_reswords): Add _FloatN and _FloatNx
3618 keywords.
3619 (c_common_type_for_mode): Check for _FloatN and _FloatNx and
3620 corresponding complex types.
3621 (c_common_nodes_and_builtins): For non-C++, register _FloatN and
3622 _FloatNx and corresponding complex types.
3623 (keyword_begins_type_specifier): Use CASE_RID_FLOATN_NX.
3624 * c-cppbuiltin.c (builtin_define_float_constants): Check _FloatN
3625 and _FloatNx types for the widest type for determining
3626 DECIMAL_DIG. Define __LDBL_DECIMAL_DIG__ as well as
3627 __DECIMAL_DIG__ for long double. Handle FMA_SUFFIX being NULL.
3628 (c_cpp_builtins): Call builtin_define_float_constants for _FloatN
3629 and _FloatNx types.
3630 * c-lex.c (interpret_float): Handle _FloatN and _FloatNx
3631 constants.
3632 * c-pretty-print.c (pp_c_floating_constant): Handle _FloatN and
3633 _FloatNx types.
3634
cc015f3a
DM
36352016-08-18 David Malcolm <dmalcolm@redhat.com>
3636
3637 * c-opts.c (c_diagnostic_finalizer): Update for change to
3638 diagnostic_show_locus.
3639
cb18fd07
DM
36402016-08-18 David Malcolm <dmalcolm@redhat.com>
3641
3642 * c-common.c: Include "spellcheck.h".
3643 (cb_get_suggestion): New function.
3644 * c-common.h (cb_get_suggestion): New decl.
3645 * c-lex.c (init_c_lex): Initialize cb->get_suggestion to
3646 cb_get_suggestion.
3647
a76989dc
MP
36482016-08-18 Marek Polacek <polacek@redhat.com>
3649
3650 PR c/71514
3651 * c-common.c (get_atomic_generic_size): Disallow pointer-to-function
3652 and pointer-to-VLA.
3653
65e736c0
DM
36542016-08-16 David Malcolm <dmalcolm@redhat.com>
3655
3656 PR c/72857
3657 * c-common.c (substring_loc::get_range): Rename to...
3658 (substring_loc::get_location): ...this, converting param from a
3659 source_range * to a location_t *. Call
3660 get_source_location_for_substring rather than
3661 get_source_range_for_substring, and pass in m_caret_idx.
3662 * c-common.h (substring_loc::substring_loc): Add param "caret_idx".
3663 (substring_loc::get_range): Replace with...
3664 (substring_loc::get_location): ...this.
3665 (substring_loc::set_caret_index): New method.
3666 (substring_loc): Add field m_caret_idx.
3667 * c-format.c (format_warning_va): Update for above changes.
3668 Rename local "substring_loc" to "fmt_substring_loc" to avoid
3669 clashing with type name.
3670 (format_warning_at_char): Add caret_idx param to substring_loc ctor.
3671 (check_argument_type): Likewise.
3672 (format_type_warning): Rename param "fmt_loc" to "whole_fmt_loc"
3673 Use a copy when emitting warnings, setting the caret index from TYPE.
3674
7e1dde14 36752016-08-16 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 3676 Arnaud Charlet <charlet@adacore.com>
7e1dde14
EB
3677
3678 * c-ada-spec.c (dump_number): New function.
3679 (handle_escape_character): Likewise.
3680 (print_ada_macros): Add handling of constant integers and strings.
3681
191816a3
MP
36822016-08-12 Marek Polacek <polacek@redhat.com>
3683
3684 PR c/7652
3685 * c-common.c (scalar_to_vector): Adjust fall through comment.
3686 * c-opts.c (c_common_handle_option): Likewise.
3687 * c-pragma.c (handle_pragma_pack): Add FALLTHRU.
3688 * c-pretty-print.c (c_pretty_printer::postfix_expression): Adjust
3689 fall through comment.
3690 * cilk.c (extract_free_variables): Add FALLTHRU.
3691
452df4a4
JM
36922016-08-10 Jason Merrill <jason@redhat.com>
3693
3694 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_if_constexpr.
3695
f3365c12
JM
36962016-08-09 Jason Merrill <jason@redhat.com>
3697
3698 * c-common.c (c_common_attribute_table): vector_size affects type
3699 identity.
3700
f0bc3323
MP
37012016-08-09 Marek Polacek <polacek@redhat.com>
3702
3703 PR c/7652
3704 * c-ada-spec.c (dump_generic_ada_node): Add return.
3705
98e5a19a
JM
37062016-08-09 Jason Merrill <jason@redhat.com>
3707
3708 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_constexpr for
3709 C++17 constexpr lambdas.
3710
895aa8e1
DM
37112016-08-08 David Malcolm <dmalcolm@redhat.com>
3712
3713 PR c/64955
3714 * c-common.h (selftest::c_format_c_tests): New declaration.
3715 (selftest::run_c_tests): New declaration.
3716 * c-format.c: Include "selftest.h.
3717 (format_warning_va): Add param "corrected_substring" and use
3718 it to add a replacement fix-it hint.
3719 (format_warning_at_substring): Likewise.
3720 (format_warning_at_char): Update for new param of
3721 format_warning_va.
3722 (argument_parser::check_argument_type): Pass "fki" to
3723 check_format_types.
3724 (check_format_types): Add param "fki" and pass it to
3725 format_type_warning.
3726 (deref_n_times): New function.
3727 (get_modifier_for_format_len): New function.
3728 (selftest::test_get_modifier_for_format_len): New function.
3729 (get_format_for_type): New function.
3730 (format_type_warning): Add param "fki" and use it to attempt
3731 to provide hints for argument types when calling
3732 format_warning_at_substring.
3733 (selftest::get_info): New function.
3734 (selftest::assert_format_for_type_streq): New function.
3735 (ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
3736 (selftest::test_get_format_for_type_printf): New function.
3737 (selftest::test_get_format_for_type_scanf): New function.
3738 (selftest::c_format_c_tests): New function.
3739
e52ed3fe
DM
37402016-08-08 David Malcolm <dmalcolm@redhat.com>
3741
3742 PR c/52952
3743 * c-format.c: Include "diagnostic.h".
3744 (location_column_from_byte_offset): Delete.
3745 (location_from_offset): Delete.
3746 (format_warning_va): New function.
3747 (format_warning_at_substring): New function.
3748 (format_warning_at_char): New function.
3749 (check_format_arg): Capture location of format_tree and pass to
3750 check_format_info_main.
3751 (argument_parser): Add fields "start_of_this_format" and
3752 "format_string_cst".
3753 (flag_chars_t::validate): Add param "format_string_cst". Convert
3754 warning_at call using location_from_offset to call to
3755 format_warning_at_char.
3756 (argument_parser::argument_parser): Add param "format_string_cst_"
3757 and use use it to initialize field "format_string_cst".
3758 Initialize new field "start_of_this_format".
3759 (argument_parser::read_format_flags): Convert warning_at call
3760 using location_from_offset to a call to format_warning_at_char.
3761 (argument_parser::read_any_format_left_precision): Likewise.
3762 (argument_parser::read_any_format_precision): Likewise.
3763 (argument_parser::read_any_other_modifier): Likewise.
3764 (argument_parser::find_format_char_info): Likewise, in three places.
3765 (argument_parser::parse_any_scan_set): Likewise, in one place.
3766 (argument_parser::handle_conversions): Likewise, in two places.
3767 (argument_parser::check_argument_type): Add param "fmt_param_loc"
3768 and use it to make a substring_loc. Pass the latter to
3769 check_format_types.
3770 (check_format_info_main): Add params "fmt_param_loc" and
3771 "format_string_cst". Convert warning_at calls using
3772 location_from_offset to calls to format_warning_at_char. Pass the
3773 new params to the arg_parser ctor. Pass "format_string_cst" to
3774 flag_chars.validate. Pass "fmt_param_loc" to
3775 arg_parser.check_argument_type.
3776 (check_format_types): Convert first param from a location_t
3777 to a const substring_loc & and rename to "fmt_loc". Attempt
3778 to extract the range of the relevant parameter and pass it
3779 to format_type_warning.
3780 (format_type_warning): Convert first param from a location_t
3781 to a const substring_loc & and rename to "fmt_loc". Add
3782 params "param_range" and "type". Replace calls to warning_at
3783 with calls to format_warning_at_substring.
3784
1c4d457e
DM
37852016-08-08 David Malcolm <dmalcolm@redhat.com>
3786
3787 * c-format.c (class flag_chars_t): New class.
3788 (struct length_modifier): New struct.
3789 (class argument_parser): New class.
3790 (flag_chars_t::flag_chars_t): New ctor.
3791 (flag_chars_t::has_char_p): New method.
3792 (flag_chars_t::add_char): New method.
3793 (flag_chars_t::validate): New method.
3794 (flag_chars_t::get_alloc_flag): New method.
3795 (flag_chars_t::assignment_suppression_p): New method.
3796 (argument_parser::argument_parser): New ctor.
3797 (argument_parser::read_any_dollar): New method.
3798 (argument_parser::read_format_flags): New method.
3799 (argument_parser::read_any_format_width): New method.
3800 (argument_parser::read_any_format_left_precision): New method.
3801 (argument_parser::read_any_format_precision): New method.
3802 (argument_parser::handle_alloc_chars): New method.
3803 (argument_parser::read_any_length_modifier): New method.
3804 (argument_parser::read_any_other_modifier): New method.
3805 (argument_parser::find_format_char_info): New method.
3806 (argument_parser::validate_flag_pairs): New method.
3807 (argument_parser::give_y2k_warnings): New method.
3808 (argument_parser::parse_any_scan_set): New method.
3809 (argument_parser::handle_conversions): New method.
3810 (argument_parser::check_argument_type): New method.
3811 (check_format_info_main): Introduce classes argument_parser
3812 and flag_chars_t, moving the code within the loop into methods
3813 of these classes. Make various locals "const".
3814
88fa5555
DM
38152016-08-05 David Malcolm <dmalcolm@redhat.com>
3816
3817 * c-common.c: Include "substring-locations.h".
3818 (get_cpp_ttype_from_string_type): New function.
3819 (g_string_concat_db): New global.
3820 (substring_loc::get_range): New method.
3821 * c-common.h (g_string_concat_db): New declaration.
3822 (class substring_loc): New class.
3823 * c-lex.c (lex_string): When concatenating strings, capture the
3824 locations of all tokens using a new obstack, and record the
3825 concatenation locations within g_string_concat_db.
3826 * c-opts.c (c_common_init_options): Construct g_string_concat_db
3827 on the ggc-heap.
3828
78169471
MP
38292016-07-29 Marek Polacek <polacek@redhat.com>
3830
638fc14f
MP
3831 PR c/71926
3832 * c-common.c (c_common_truthvalue_conversion): Use LOCATION for the
3833 parentheses warning.
3834
78169471
MP
3835 PR c/71574
3836 * c-common.c (handle_alloc_align_attribute): Also check FUNCTION_DECL.
3837
1225d6b1
ML
38382016-07-28 Martin Liska <mliska@suse.cz>
3839
3840 PR gcov-profile/68025
3841 * c-common.c (handle_no_profile_instrument_function_attribute):
3842
ec1e2a40
BE
38432016-07-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
3844
3845 * c-common.c (check_user_alignment): Use LOG2_BITS_PER_UNIT instead of
3846 BITS_PER_UNIT_LOG.
3847
5ec2cd9f
JM
38482016-07-25 Jason Merrill <jason@redhat.com>
3849
3850 PR c++/65970
3851 * c.opt (fconstexpr-loop-limit): New.
3852
9dc5773f 38532016-07-22 Martin Sebor <msebor@redhat.com>
2e6b45af
MS
3854
3855 PR c++/71675
3856 * c-common.c (resolve_overloaded_builtin): Avoid converting
3857 __atomic_compare_exchange_n return type to that of what its
3858 first argument points to.
3859
e3fe09c1
UB
38602016-07-22 Uros Bizjak <ubizjak@gmail.com>
3861
3862 * c-common.c: Use HOST_WIDE_INT_M1U instead of
3863 ~(unsigned HOST_WIDE_INT) 0.
3864
bc91c436
ML
38652016-07-22 Martin Liska <mliska@suse.cz>
3866
3867 PR gcov-profile/69028
3868 PR gcov-profile/62047
3869 * cilk.c (create_cilk_helper_decl): Set location of a new decl
3870 to the current_function_decl.
3871
451dcc66
JM
38722016-07-21 Jason Merrill <jason@redhat.com>
3873
3874 PR c++/65168
3875 * c-common.c (c_common_truthvalue_conversion): Check
3876 c_inhibit_evaluation_warnings for warning about address of
3877 reference.
3878
de6a69ee
DM
38792016-07-20 David Malcolm <dmalcolm@redhat.com>
3880
3881 * c-common.h (lookup_name_fuzzy): Convert return type from tree to
3882 const char *.
3883
d022c55a
JM
38842016-07-15 Jason Merrill <jason@redhat.com>
3885
3886 * c-opts.c (c_common_post_options): Update -fabi-version default to 11.
3887
ddbbcb19
JJ
38882016-07-15 Jakub Jelinek <jakub@redhat.com>
3889
3890 PR c/71858
3891 * c-common.h (enum lookup_name_fuzzy_kind): Add
3892 FUZZY_LOOKUP_FUNCTION_NAME.
3893
d0cf395a
JM
38942016-07-08 Jason Merrill <jason@redhat.com>
3895
3896 P0145: Refining Expression Order for C++.
3897 * c.opts (-fargs-in-order): Rename to -fstrong-eval-order.
3898 * c-opts.c: Adjust.
3899
98d44e93
MT
39002016-07-05 Markus Trippelsdorf <markus@trippelsdorf.de>
3901
3902 PR c++/71214
3903 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_rvalue_references.
3904
f9d8d994
TS
39052016-06-29 Thomas Schwinge <thomas@codesourcery.com>
3906
3907 * c-pragma.h (enum pragma_kind): Rename
3908 PRAGMA_OMP_DECLARE_REDUCTION to PRAGMA_OMP_DECLARE. Adjust all
3909 users.
3910
4aa83879
RB
39112016-06-29 Richard Biener <rguenther@suse.de>
3912
3913 PR middle-end/71002
3914 * c-common.c (c_common_get_alias_set): Remove union type punning case.
3915
a25bd9e6
JM
39162016-06-24 Jason Merrill <jason@redhat.com>
3917
3918 P0145R2: Refining Expression Order for C++.
3919 * c-common.c (verify_tree) [COMPOUND_EXPR]: Fix handling on LHS of
3920 MODIFY_EXPR.
3921
a86451b9
JJ
39222016-06-24 Jakub Jelinek <jakub@redhat.com>
3923
3924 * c-common.c (check_builtin_function_arguments): Require last
3925 argument of BUILT_IN_*_OVERFLOW_P to have INTEGER_TYPE type.
3926 Adjust wording of diagnostics for BUILT_IN_*_OVERLFLOW
3927 if the last argument is pointer to enumerated or boolean type.
3928
1a4f11c8
DM
39292016-06-22 David Malcolm <dmalcolm@redhat.com>
3930
3931 PR c/70339
3932 * c-common.h (enum lookup_name_fuzzy_kind): New enum.
3933 (lookup_name_fuzzy): New prototype.
3934
fe55692c
JDA
39352016-06-21 John David Anglin <danglin@gcc.gnu.org>
3936
3937 * c-common.c (get_source_date_epoch): Use int64_t instead of long long.
3938
4eb24e01
JM
39392016-06-14 Jason Merrill <jason@redhat.com>
3940
3941 P0145R2: Refining Expression Order for C++.
3942 * c.opt (fargs-in-order): New.
3943 * c-opts.c (c_common_post_options): Adjust flag_args_in_order.
3944
ef7cf206
JJ
39452016-06-13 Jakub Jelinek <jakub@redhat.com>
3946
0dda258b
JJ
3947 PR sanitizer/71498
3948 * c-gimplify.c (ubsan_walk_array_refs_r): Set *walk_subtrees = 0 on
3949 all BIND_EXPRs, and on all BIND_EXPRs recurse also on BIND_EXPR_BODY.
3950
ef7cf206
JJ
3951 PR preprocessor/71183
3952 * c-ppoutput.c (init_pp_output): Set cb->get_source_date_epoch
3953 to cb_get_source_date_epoch.
3954
50b15873
JJ
39552016-06-10 Jakub Jelinek <jakub@redhat.com>
3956
3957 PR c/68657
3958 * c.opt (Wpsabi): Add Warning flag.
3959
4d926e34
MS
39602016-06-10 Martin Sebor <msebor@redhat.com>
3961
3962 PR c/71392
14ec014e 3963 * c-common.c (handle_nonnull_attribute): Accept
4d926e34
MS
3964 the nonnull attribute in type-generic builtins.
3965
e01b4e16
MS
39662016-06-09 Martin Sebor <msebor@redhat.com>
3967
3968 PR c/70883
3969 * c-common.c (builtin_function_validate_nargs): Make text of error
3970 message consistent with others like it.
3971
44a845ca
MS
39722016-06-08 Martin Sebor <msebor@redhat.com>
3973 Jakub Jelinek <jakub@redhat.com>
3974
3975 PR c++/70507
3976 PR c/68120
3977 * c-common.c (check_builtin_function_arguments): Handle
3978 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW_P.
3979
a80a7051
RB
39802016-06-08 Richard Biener <rguenther@suse.de>
3981
3982 * c-common.c (parse_optimize_options): Improve diagnostic messages.
3983
bfd67b47
RB
39842016-06-07 Richard Biener <rguenther@suse.de>
3985
3986 PR c/61564
3987 * c-common.c (parse_optimize_options): Only apply CL_OPTIMIZATION
3988 options and warn about others.
3989
15c98b2e
ES
39902016-06-01 Eduard Sanou <dhole@openmailbox.org>
3991
3992 * c-common.c (get_source_date_epoch): Rename to
3993 cb_get_source_date_epoch.
3994 * c-common.c (cb_get_source_date_epoch): Use a single generic erorr
3995 message when the parsing fails. Use error_at instead of fatal_error.
3996 * c-common.h (get_source_date_epoch): Rename to
3997 cb_get_source_date_epoch.
3998 * c-common.h (cb_get_source_date_epoch): Prototype.
3999 * c-common.h (MAX_SOURCE_DATE_EPOCH): Define.
4000 * c-common.h (c_omp_region_type): Remove trailing comma.
4001 * c-lex.c (init_c_lex): Set cb->get_source_date_epoch callback.
4002 * c-lex.c (c_lex_with_flags): Remove initialization of
4003 pfile->source_date_epoch.
4004
00631022
JJ
40052016-05-30 Jakub Jelinek <jakub@redhat.com>
4006
4007 PR c++/71349
4008 * c-omp.c (c_omp_split_clauses): Put OMP_CLAUSE_DEPEND to
4009 C_OMP_CLAUSE_SPLIT_TARGET. Put OMP_CLAUSE_NOWAIT to
4010 C_OMP_CLAUSE_SPLIT_TARGET if combined with target construct,
4011 instead of C_OMP_CLAUSE_SPLIT_FOR.
4012
f17a223d
RB
40132016-05-24 Richard Biener <rguenther@suse.de>
4014
4015 PR middle-end/70434
4016 PR c/69504
4017 * c-common.h (convert_vector_to_pointer_for_subscript): Rename to ...
4018 (convert_vector_to_array_for_subscript): ... this.
4019 * c-common.c (convert_vector_to_pointer_for_subscript): Use a
4020 VIEW_CONVERT_EXPR to an array type. Rename to ...
4021 (convert_vector_to_array_for_subscript): ... this.
4022
4f2e1536
MP
40232016-05-12 Marek Polacek <polacek@redhat.com>
4024
4025 PR c/70756
4026 * c-common.c (pointer_int_sum): Call size_in_bytes_loc instead of
4027 size_in_bytes and pass LOC to it.
4028
d6e83a8d
MM
40292016-05-11 Mikhail Maltsev <maltsevm@gmail.com>
4030
4031 PR c/43651
4032 * c.opt (Wduplicate-decl-specifier): New option.
4033
5c3a10fb
MP
40342016-05-11 Marek Polacek <polacek@redhat.com>
4035
4036 PR c++/71024
4037 * c-common.c (diagnose_mismatched_attributes): New function.
4038 * c-common.h (diagnose_mismatched_attributes): Declare.
4039
deef7113
MP
40402016-05-04 Marek Polacek <polacek@redhat.com>
4041
4042 * c.opt (Wdangling-else): New option.
4043
79ce98bc
MP
40442016-05-03 Marek Polacek <polacek@redhat.com>
4045
4046 PR c/70859
4047 * c-common.c (builtin_function_validate_nargs): Add location
4048 parameter. Use it.
4049 (check_builtin_function_arguments): Add location and arguments
4050 parameters. Use them.
4051 * c-common.h (check_builtin_function_arguments): Update declaration.
4052
381cdae4
RB
40532016-05-03 Richard Biener <rguenther@suse.de>
4054
4055 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Do not
4056 allow call args to gimplify to SSA names.
4057
1d793c34
MP
40582016-05-03 Marek Polacek <polacek@redhat.com>
4059
4060 * c-common.h (enum c_omp_region_type): Remove stray comma.
4061
77886428
CP
40622016-05-02 Cesar Philippidis <cesar@codesourcery.com>
4063
4064 * c-common.h (enum c_omp_region_type): Define.
4065
697e0b28
RS
40662016-05-02 Richard Sandiford <richard.sandiford@arm.com>
4067
4068 * c-common.c (shorten_compare): Use wi::to_wide.
4069
e7ff0319
CP
40702016-04-29 Cesar Philippidis <cesar@codesourcery.com>
4071
4072 PR middle-end/70626
4073 * c-common.h (c_oacc_split_loop_clauses): Add boolean argument.
4074 * c-omp.c (c_oacc_split_loop_clauses): Use it to duplicate
4075 reduction clauses in acc parallel loops.
4076
2fff3db8
MP
40772016-04-29 Marek Polacek <polacek@redhat.com>
4078
4079 PR c/70852
4080 * c-common.c (warn_for_memset): Check domain before accessing it.
4081
509063eb
DV
40822016-04-29 Dominik Vogt <vogt@linux.vnet.ibm.com>
4083
4084 PR/69089
4085 * c-common.c (handle_aligned_attribute): Allow 0 as an argument to the
4086 "aligned" attribute.
4087
b632761d
JM
40882016-04-28 Jason Merrill <jason@redhat.com>
4089
4090 * c-lex.c (c_common_has_attribute): Handle nodiscard.
4091
174f6622
ES
40922016-04-28 Eduard Sanou <dhole@openmailbox.org>
4093 Matthias Klose <doko@debian.org>
4094
4095 * c-common.c (get_source_date_epoch): New function, gets the environment
7365279f 4096 variable SOURCE_DATE_EPOCH and parses it as long long with error
174f6622
ES
4097 handling.
4098 * c-common.h (get_source_date_epoch): Prototype.
4099 * c-lex.c (c_lex_with_flags): set parse_in->source_date_epoch.
4100
6bc2bb18
RB
41012015-04-27 Ryan Burn <contact@rnburn.com>
4102
4103 PR c++/69024
4104 PR c++/68997
4105 * cilk.c (cilk_ignorable_spawn_rhs_op): Change to external linkage.
4106 (cilk_recognize_spawn): Renamed from recognize_spawn and change to
4107 external linkage.
4108 (cilk_detect_and_unwrap): Corresponding changes.
4109 (extract_free_variables): Don't extract free variables from
4110 AGGR_INIT_EXPR slot.
4111 * c-common.h (cilk_ignorable_spawn_rhs_op): Prototype.
4112 (cilk_recognize_spawn): Likewise.
4113
c1e1f433
BS
41142016-04-27 Bernd Schmidt <bschmidt@redhat.com>
4115
4116 * c.opt (Wmemset-elt-size): New option.
4117 * c-common.c (warn_for_memset): New function.
4118 * c-common.h (warn_for_memset): Declare.
4119
d067e05f
JM
41202016-04-25 Jason Merrill <jason@redhat.com>
4121
4122 * c-common.c (handle_unused_attribute): Accept CONST_DECL.
4123 No longer static.
4124 * c-common.h: Declare it.
4125 * c-lex.c (c_common_has_attribute): Add maybe_unused.
4126
9aa36ae5
JM
41272016-04-22 Jason Merrill <jason@redhat.com>
4128
4129 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_range_based_for.
4130
477d4906
IV
41312016-04-20 Ilya Verbin <ilya.verbin@intel.com>
4132
4133 PR c++/69363
4134 * c-cilkplus.c (c_finish_cilk_clauses): Remove function.
4135 * c-common.h (c_finish_cilk_clauses): Remove declaration.
4136
fe37c7af
MM
41372016-04-18 Michael Matz <matz@suse.de>
4138
4139 * c-common.c (handle_aligned_attribute): Use SET_TYPE_ALIGN
4140 and SET_DECL_ALIGN.
4141
23f2660f
EB
41422016-04-17 Eric Botcazou <ebotcazou@adacore.com>
4143
4144 * c-ada-spec.c (get_underlying_decl): Return the typedef, if any.
4145 (dump_generic_ada_node) <POINTER_TYPE>: Clean up handling of access
4146 to incomplete types.
4147 (dump_nested_type): Remove redundant tests and tidy up.
4148 (print_ada_declaration): Also set TREE_VISITED on the declaration of
4149 a type which is the typedef of an original type.
4150
1e77281b
MP
41512016-04-15 Marek Polacek <polacek@redhat.com>
4152
4153 PR c/70651
4154 * c-common.c (build_va_arg): Change two asserts into errors and return
4155 error_mark_node.
4156
b3a77f21
MP
41572016-04-13 Marek Polacek <polacek@redhat.com>
4158
4159 PR c++/70639
4160 * c-indentation.c (should_warn_for_misleading_indentation): Bail out
4161 for switch statements, too.
4162
322b8466
JM
41632016-03-28 Jason Merrill <jason@redhat.com>
4164
4165 * c-cppbuiltin.c (c_cpp_builtins): Update __cpp_range_based_for.
4166
fbdb6baf
MP
41672016-03-23 Marek Polacek <polacek@redhat.com>
4168
4169 PR c++/69884
4170 * c.opt (Wignored-attributes): New option.
4171
5c240f4d
DM
41722016-03-22 David Malcolm <dmalcolm@redhat.com>
4173
4174 PR c/69993
4175 * c-indentation.c (warn_for_misleading_indentation): Rewrite the
4176 diagnostic text, reversing the order of the warning and note so
4177 that they appear in source order.
4178
14ba7b28
MP
41792016-03-17 Marek Polacek <polacek@redhat.com>
4180
4181 PR c/69407
4182 * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch
4183 operations.
4184
08a1cadc
JM
41852016-03-14 Jason Merrill <jason@redhat.com>
4186
2aaeea19
JM
4187 * c-cppbuiltin.c (c_cpp_builtins): Set __cpp_hex_float.
4188
08a1cadc
JM
4189 * c-cppbuiltin.c (c_cpp_builtins): Bump __cpp_range_based_for.
4190
c06d25bb
RB
41912016-03-09 Richard Biener <rguenther@suse.de>
4192
4193 PR c/70143
4194 * c-common.c (strict_aliasing_warning): Add back
4195 alias_sets_conflict_p check.
4196
80aac5c8
JM
41972016-03-08 Jason Merrill <jason@redhat.com>
4198
4199 * c-opts.c (set_std_cxx1z): Don't enable concepts.
4200
64b23c13
DM
42012016-03-04 David Malcolm <dmalcolm@redhat.com>
4202
4203 PR c/68187
4204 * c-indentation.c (get_visual_column): Move code to determine next
4205 tab stop to...
4206 (next_tab_stop): ...this new function.
4207 (line_contains_hash_if): Delete function.
4208 (detect_preprocessor_logic): Delete function.
4209 (get_first_nws_vis_column): New function.
4210 (detect_intervening_unindent): New function.
4211 (should_warn_for_misleading_indentation): Replace call to
4212 detect_preprocessor_logic with a call to
4213 detect_intervening_unindent.
4214
729526f5
DM
42152016-03-04 David Malcolm <dmalcolm@redhat.com>
4216
4217 PR c/68187
4218 * c-indentation.c (should_warn_for_misleading_indentation): When
4219 suppressing warnings about cases where the guard and body are on
4220 the same column, only use the first non-whitespace column in place
4221 of the guard token column when dealing with "else" clauses.
4222 When rejecting aligned BODY and NEXT, loosen the requirement
4223 from equality with the first non-whitespace of guard to simply
4224 that they not be indented relative to it.
4225
e9a35493
RB
42262016-03-04 Richard Biener <rguenther@suse.de>
4227
4228 PR c++/70054
4229 * c-common.c (strict_aliasing_warning): Use alias_set_subset_of
4230 instead of alias_sets_conflict_p.
4231
1be56bc5
MP
42322016-03-01 Marek Polacek <polacek@redhat.com>
4233
4234 PR c++/69795
4235 * c-common.c (reject_gcc_builtin): Check for FUNCTION_DECL rather than
4236 any DECL.
4237
35886f0b
MS
42382016-02-22 Martin Sebor <msebor@redhat.com>
4239
4240 PR middle-end/69780
4241 * c-common.c (check_builtin_function_arguments): Validate and
4242 reject invalid arguments to __builtin_alloca_with_align.
4243
4246c8da
MW
42442016-02-20 Mark Wielaard <mjw@redhat.com>
4245
4246 PR c/28901
4247 * c.opt (Wunused-const-variable): Turn into Alias for...
4248 (Wunused-const-variable=): New option.
4249
268be88c
BE
42502016-02-19 Bernd Edlinger <bernd.edlinger@hotmail.de>
4251
4252 PR c++/69865
4253 * c-opts.c (c_common_post_options): Move call to set_std_cxx14 from
4254 here...
4255 (c_common_init_options): ...to here.
4256 (set_std_cxx98): Initialize flag_isoc94 and flag_isoc99.
4257
871b3f47
JJ
42582016-02-19 Jakub Jelinek <jakub@redhat.com>
4259
4260 PR c++/69826
4261 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_GRAINSIZE.
4262 (init_pragma): Register PRAGMA_CILK_GRAINSIZE even for
4263 flag_preprocess_only.
4264
bf14eba2
JJ
42652016-02-16 Jakub Jelinek <jakub@redhat.com>
4266
4267 PR c/69835
4268 * c.opt (Wnonnull-compare): Enable for -Wall.
4269
ba6b3795
JJ
42702016-02-15 Jakub Jelinek <jakub@redhat.com>
4271
4272 PR c++/69797
4273 * c-common.c (sync_resolve_size): Diagnose too few arguments
4274 even when params is non-NULL empty vector.
4275
a011cd92
BS
42762016-02-08 Bernd Schmidt <bschmidt@redhat.com>
4277
4278 PR target/60410
4279 * c.opt (fshort-double): Remove.
4280
46cb9332
MS
42812016-02-05 Martin Sebor <msebor@redhat.com>
4282
4283 PR c++/69662
4284 * c.opt (Warning options): Update -Wplacement-new to take
4285 an optional argument.
4286
e1b81f2b
JJ
42872016-02-01 Jakub Jelinek <jakub@redhat.com>
4288
4289 PR preprocessor/69543
4290 PR c/69558
4291 * c-pragma.c (handle_pragma_diagnostic): Pass input_location
4292 instead of loc to control_warning_option.
4293
b6adbb9f
NS
42942016-02-01 Nathan Sidwell <nathan@codesourcery.com>
4295
4296 * c.opt (fopenacc-dim=): New option.
4297
5d70666e
RB
42982016-01-27 Ryan Burn <contact@rnburn.com>
4299
4300 PR cilkplus/69267
4301 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): Change to use
4302 gimplify_arg. Removed superfluous post_p argument.
4303 * c-family.h (cilk_gimplify_call_params_in_spawned_fn): Removed
4304 superfluous post_p argument.
4305 * c-gimplify.c (c_gimplify_expr): Likewise.
4306
01e1dea3
DM
43072016-01-26 David Malcolm <dmalcolm@redhat.com>
4308
4309 PR other/69006
4310 * c-opts.c (c_diagnostic_finalizer): Replace invocation of
4311 pp_newline_and_flush with pp_flush.
4312
9f04a53e
MS
43132016-01-20 Martin Sebor <msebor@redhat.com>
4314
4315 PR c/69405
4316 * c-common.c (sync_resolve_size): Avoid printing diagnostic about
4317 an incompatible argument when the argument isn't a valid tree node.
4318
7f26f7df
JM
43192016-01-18 Jason Merrill <jason@redhat.com>
4320
4321 PR c++/68767
4322 * c-common.c (check_function_arguments_recurse): Fold the whole
4323 COND_EXPR, not just the condition.
4324
f62bf092
TV
43252016-01-18 Tom de Vries <tom@codesourcery.com>
4326
4327 * c-omp.c (c_oacc_split_loop_clauses): Don't copy OMP_CLAUSE_REDUCTION,
4328 classify as loop clause.
4329
e0a575ff
JJ
43302016-01-15 Jakub Jelinek <jakub@redhat.com>
4331
4332 PR bootstrap/68271
4333 * c-pragma.c (c_register_pragma_1): Adjust comment to note that
4334 C++ FE no longer has limit on number of pragmas.
4335
43362015-01-14 Ryan Burn <contact@rnburn.com>
b6e3db06
RB
4337
4338 PR c++/69048
4339 * cilk.c (create_cilk_wrapper_body): Call fold_build_cleanup_point_expr
c47eaca6 4340 to add missing cleanup point.
b6e3db06 4341
c7df95d8
DM
43422016-01-14 David Malcolm <dmalcolm@redhat.com>
4343
4344 PR c++/68819
4345 * c-indentation.c (get_visual_column): Add location_t param.
4346 Handle the column number being zero by effectively disabling the
4347 warning, with an "inform".
4348 (should_warn_for_misleading_indentation): Add location_t argument
4349 for all uses of get_visual_column.
4350
21efdd80
PP
43512016-01-10 Patrick Palka <ppalka@gcc.gnu.org>
4352
4353 PR c++/69029
4354 * c-indentation.c (should_warn_for_misleading_indentation):
4355 Don't warn about do-while statements.
4356
7a127fa7
MS
43572016-01-07 Martin Sebor <msebor@redhat.com>
4358
4359 PR c/68966
4360 * c-common.c (sync_resolve_size): Reject first argument when it's
4361 a pointer to _Bool.
4362
c589e975
DM
43632016-01-05 David Malcolm <dmalcolm@redhat.com>
4364
4365 PR c/69122
4366 * c-indentation.c (get_visual_column): Remove default argument.
4367 (should_warn_for_misleading_indentation): For the multiline case,
4368 update call to get_visual_column for next_stmt_exploc so that it
4369 captures the location of the first non-whitespace character in the
4370 relevant line. Don't issue warnings if there is non-whitespace
4371 before the next statement.
4372
818ab71a
JJ
43732016-01-04 Jakub Jelinek <jakub@redhat.com>
4374
4375 Update copyright years.
4376
745e411d
DM
43772015-12-21 David Malcolm <dmalcolm@redhat.com>
4378
4379 * c-common.c (binary_op_error): Convert first param from
4380 location_t to rich_location * and use it when emitting an error.
4381 * c-common.h (binary_op_error): Convert first param from
4382 location_t to rich_location *.
4383
de67c4c3
DM
43842015-12-16 David Malcolm <dmalcolm@redhat.com>
4385
4386 * c-common.h (conflict_marker_get_final_tok_kind): New prototype.
4387 * c-lex.c (conflict_marker_get_final_tok_kind): New function.
4388
4a38b02b
IV
43892015-12-15 Ilya Verbin <ilya.verbin@intel.com>
4390
4391 * c-common.c (c_common_attribute_table): Handle "omp declare target
4392 link" attribute.
4393
54d62f51
JJ
43942015-12-14 Jakub Jelinek <jakub@redhat.com>
4395
4396 PR c/68833
4397 * c.opt (Wmissing-format-attribute, Wnormalized): Add Warning option.
4398
8d4227c8
TB
43992014-12-12 Tobias Burnus <burnus@net-b.de>
4400
4401 PR fortran/68815
4402 * c-format.c (gcc_gfc_char_table): Add 'q' flag to remaining
4403 specifiers (%d, %i,%u and %c).
4404
f6069ccc
DM
44052015-12-10 David Malcolm <dmalcolm@redhat.com>
4406
4407 * c.opt (Wmisleading-indentation): Add to -Wall for C and C++.
4408
63bbf46d
JJ
44092015-12-08 Jakub Jelinek <jakub@redhat.com>
4410
4411 PR c/48088
4412 PR c/68657
4413 * c.opt (Wfloat-conversion, Wsign-conversion): Add Warning.
4414 * c-pragma.c (handle_pragma_diagnostic): Adjust
4415 control_warning_option caller.
4416
f79520bb
DM
44172015-12-07 David Malcolm <dmalcolm@redhat.com>
4418
4419 * c-common.c (c_cpp_error): Update for change to
4420 rich_location::set_range.
4421
b3d5bc62
JJ
44222015-12-04 Paolo Bonzini <bonzini@gnu.org>
4423
4424 * c-common.c (maybe_warn_shift_overflow): Warn on all overflows if
4425 shifting 1 out of the sign bit.
4426
44272015-12-04 Kirill Yukhin <kirill.yukhin@intel.com>
4428
4429 * c-common.c (c_common_attribute_table[]): Update max arguments
4430 count for "simd" attribute.
4431 (handle_simd_attribute): Parse "notinbranch" and "inbranch" arguments.
4432
6eb4a537
JJ
44332015-12-03 Jakub Jelinek <jakub@redhat.com>
4434
4435 PR preprocessor/57580
4436 * c-ppoutput.c (print): Change printed field to bool.
4437 Move src_file last for smaller padding.
4438 (init_pp_output): Set print.printed to false instead of 0.
4439 (scan_translation_unit): Fix up formatting. Set print.printed
4440 to true after printing something other than newline.
4441 (scan_translation_unit_trad): Set print.printed to true instead of 1.
4442 (maybe_print_line_1): Set print.printed to false instead of 0.
4443 (print_line_1): Likewise.
4444 (do_line_change): Set print.printed to true instead of 1.
4445 (cb_define, dump_queued_macros, cb_include, cb_def_pragma,
4446 dump_macro): Set print.printed to false after printing newline.
4447
4250754e
JM
44482015-12-02 Jason Merrill <jason@redhat.com>
4449
f479b43d
JM
4450 * c-common.c (fold_for_warn): New.
4451 (warn_logical_operator, warn_tautological_cmp)
4452 (check_function_arguments_recurse, maybe_warn_bool_compare): Use it.
4453
4250754e
JM
4454 * c-common.c (c_disable_warnings, c_enable_warnings, c_fully_fold)
4455 (c_fully_fold_internal, decl_constant_value_for_optimization):
4456 Move to c/c-fold.c.
4457 * c-common.h: Don't declare decl_constant_value_for_optimization.
4458
e9e32ee6
JM
44592015-12-02 Joseph Myers <joseph@codesourcery.com>
4460
4461 PR c/68162
4462 * c-common.h (c_build_qualified_type): Add extra default
4463 arguments.
4464
37d5ad46
JB
44652015-12-01 Julian Brown <julian@codesourcery.com>
4466 Cesar Philippidis <cesar@codesourcery.com>
4467 James Norris <James_Norris@mentor.com>
4468
4469 * c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
4470 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
4471 (pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
4472
f07862c7
EB
44732015-11-30 Eric Botcazou <ebotcazou@adacore.com>
4474
4475 * c-ada-spec.c (print_ada_macros): Remove redundant blank line.
4476 (decl_sloc_common): Delete and move bulk of processing to...
4477 (decl_sloc): ...here.
4478 (pp_ada_tree_identifier): Remove reference to QUAL_UNION_TYPE.
4479 (dump_ada_double_name): Remove S parameter and compute the suffix.
4480 (dump_ada_array_type): Add PARENT parameter. Simplify computation of
4481 element type and deal with an anonymous one.
4482 (dump_ada_template): Use RECORD_OR_UNION_TYPE_P macro.
4483 (dump_generic_ada_node): Tweak. Adjust call to dump_ada_array_type
4484 and remove reference to QUAL_UNION_TYPE.
4485 (dump_nested_types): Make 2 passes on the fields and move bulk to...
4486 (dump_nested_type): ...here. New function extracted from above.
4487 Generate a full declaration for anonymous element type of arrays.
4488 (print_ada_declaration): Really skip anonymous declarations. Remove
4489 references to QUAL_UNION_TYPE. Adjust call to dump_ada_array_type.
4490 Clean up processing of declarations of array types and objects.
4491 (print_ada_struct_decl): Remove reference to QUAL_UNION_TYPE.
4492 Remove obsolete code and tidy up.
4493
75c8aac3
JH
44942015-11-29 Jan Hubicka <hubicka@ucw.cz>
4495
4496 PR c/67581
4497 * c-common.c (handle_transparent_union_attribute): Update
4498 also type variants.
4499
b58d3df2
ML
45002015-11-27 Martin Liska <mliska@suse.cz>
4501
4502 PR c++/68312
4503 * array-notation-common.c (cilkplus_extract_an_triplets):
4504 Release vector of vectors.
4505 * cilk.c (gimplify_cilk_spawn): Free allocated memory.
4506
89a01fcf
EB
45072015-11-26 Eric Botcazou <ebotcazou@adacore.com>
4508
4509 PR c++/68527
4510 * c-ada-spec.c (dump_nested_types): Add guard for error_mark_node.
4511 (print_ada_struct_decl): Likewise.
4512
cc5c5226
IZ
45132015-11-23 Igor Zamyatin <igor.zamyatin@intel.com>
4514
4515 PR c++/68001
4516 * c-gimplify.c (c_gimplify_expr): Stop the process if see an error.
4517 * cilk.c (recognize_spawn): Determine location in a more precise
4518 way.
4519
269adb9d
JM
45202015-11-19 Jason Merrill <jason@redhat.com>
4521
4522 * c-common.c (shorten_compare): But look through macros from
4523 system headers.
4524
d0eccfcd
JM
45252015-11-18 Jason Merrill <jason@redhat.com>
4526
4527 * c-common.c (shorten_compare): Don't -Wtype-limits if the
4528 non-constant operand comes from a macro.
4529
3e44547c
JM
45302015-11-17 Jason Merrill <jason@redhat.com>
4531
4532 PR bootstrap/68346
4533 * c-common.c (warn_tautological_cmp): Fold before checking for
4534 constants.
4535
0f62c7a0
MP
45362015-11-16 Marek Polacek <polacek@redhat.com>
4537
4538 PR c++/68362
4539 * c-common.c (check_case_bounds): Fold low and high cases.
4540
a868811e
MP
45412015-11-16 Marek Polacek <polacek@redhat.com>
4542
4543 * c-ada-spec.c (dump_ada_template): Use RECORD_OR_UNION_TYPE_P.
4544 * c-common.c (c_common_get_alias_set): Likewise.
4545 (handle_visibility_attribute): Likewise.
4546
fff77217
KY
45472015-11-16 Kirill Yukhin <kirill.yukhin@intel.com>
4548
4549 * c-common.c (handle_simd_attribute): New.
4550 (struct attribute_spec): Add entry for "simd".
4551 (handle_simd_attribute): New.
4552
269e63b7
KT
45532015-11-13 Kai Tietz <ktietz70@googlemail.com>
4554
4555 * c-lex.c (interpret_float): Use fold_convert.
4556
ebedc9a3
DM
45572015-11-13 David Malcolm <dmalcolm@redhat.com>
4558
4559 * c-common.c (c_fully_fold_internal): Capture existing souce_range,
4560 and store it on the result.
4561 * c-opts.c (c_common_init_options): Set
4562 global_dc->colorize_source_p.
4563
6e232ba4
JN
45642015-11-12 James Norris <jnorris@codesourcery.com>
4565 Joseph Myers <joseph@codesourcery.com>
4566
7365279f 4567 * c-pragma.c (oacc_pragmas): Add entry for declare directive.
6e232ba4
JN
4568 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_DECLARE.
4569 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_DEVICE_RESIDENT and
4570 PRAGMA_OACC_CLAUSE_LINK.
4571
e78bede6
MP
45722015-11-11 Marek Polacek <polacek@redhat.com>
4573
4574 PR c/68107
4575 PR c++/68266
4576 * c-common.c (valid_array_size_p): New function.
4577 * c-common.h (valid_array_size_p): Declare.
4578
3f8257db 45792015-11-11 Dominique d'Humieres <dominiq@lps.ens.fr>
4ac93c7c
DH
4580
4581 PR bootstrap/68271
4582 * c-pragma.c (c_register_pragma_1): Update the gcc_assert to 256.
4583
69f293c9
AM
45842015-11-11 Andrew MacLeod <amacleod@redhat.com>
4585
4586 * array-notation-common.c: Remove unused header files.
4587 * c-ada-spec.c: Likewise.
4588 * c-cilkplus.c: Likewise.
4589 * c-common.c: Likewise.
4590 * c-cppbuiltin.c: Likewise.
4591 * c-dump.c: Likewise.
4592 * c-format.c: Likewise.
4593 * c-gimplify.c: Likewise.
4594 * c-indentation.c: Likewise.
4595 * c-lex.c: Likewise.
4596 * c-omp.c: Likewise.
4597 * c-opts.c: Likewise.
4598 * c-pch.c: Likewise.
4599 * c-ppoutput.c: Likewise.
4600 * c-pragma.c: Likewise.
4601 * c-pretty-print.c: Likewise.
4602 * c-semantics.c: Likewise.
4603 * c-ubsan.c: Likewise.
4604 * cilk.c: Likewise.
4605 * stub-objc.c: Likewise.
4606
3a40d81d
NS
46072015-11-09 Thomas Schwinge <thomas@codesourcery.com>
4608 Cesar Philippidis <cesar@codesourcery.com>
4609 James Norris <jnorris@codesourcery.com>
4610 Julian Brown <julian@codesourcery.com>
4611 Nathan Sidwell <nathan@codesourcery.com>
4612
4613 * c-pragma.c (oacc_pragmas): Add "routine".
4614 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ROUTINE.
4615
ee45a32d
EB
46162015-11-08 Eric Botcazou <ebotcazou@adacore.com>
4617
4618 * c-common.c (c_common_attributes): Add scalar_storage_order.
4619 (handle_scalar_storage_order_attribute): New function.
4620 * c-pragma.c (global_sso): New variable.
4621 (maybe_apply_pragma_scalar_storage_order): New function.
4622 (handle_pragma_scalar_storage_order): Likewise.
4623 (init_pragma): Register scalar_storage_order.
4624 * c-pragma.h (maybe_apply_pragma_scalar_storage_order): Declare.
4625 * c.opt (Wscalar-storage-order): New warning.
4626 (fsso-struct=): New option.
4627
eb11eb15
MS
46282015-11-08 Martin Sebor <msebor@redhat.com>
4629
4630 * c.opt (Wplacement-new): Add a period to the end of a sentence.
4631
0aad0198
RS
46322015-11-07 Richard Sandiford <richard.sandiford@arm.com>
4633
4634 * c-common.c: Don't undef DEF_BUILTIN.
4635
8a645150
DM
46362015-11-06 David Malcolm <dmalcolm@redhat.com>
4637
4638 * c-common.c (c_cpp_error): Convert parameter from location_t to
4639 rich_location *. Eliminate the "column_override" parameter and
4640 the call to diagnostic_override_column.
4641 Update the "done_lexing" clause to set range 0
4642 on the rich_location, rather than overwriting a location_t.
4643 * c-common.h (c_cpp_error): Convert parameter from location_t to
4644 rich_location *. Eliminate the "column_override" parameter.
4645
7a5e4956
CP
46462015-11-05 Cesar Philippidis <cesar@codesourcery.com>
4647 Thomas Schwinge <thomas@codesourcery.com>
4648 James Norris <jnorris@codesourcery.com>
4649
4650 * c-omp.c (c_oacc_split_loop_clauses): Make TILE, GANG, WORKER, VECTOR,
4651 AUTO, SEQ, INDEPENDENT and PRIVATE loop clauses. Associate REDUCTION
4652 clauses with parallel and kernels and loops.
4653 * c-pragma.h (enum pragma_omp_clause): Add entries for
4654 PRAGMA_OACC_CLAUSE_{INDEPENDENT,TILE,DEFAULT}.
4655 * pt.c (tsubst_omp_clauses): Add support for OMP_CLAUSE_{NUM_GANGS,
4656 NUM_WORKERS,VECTOR_LENGTH,GANG,WORKER,VECTOR,ASYNC,WAIT,TILE,AUTO,
4657 INDEPENDENT,SEQ}.
4658 (tsubst_expr): Add support for OMP_CLAUSE_{KERNELS,PARALLEL,LOOP}.
4659
e2f5cc96
MS
46602015-11-05 Martin Sebor <msebor@redhat.com>
4661
4662 PR c++/67942
4663 * c.opt (-Wplacement-new): New option.
4664
e01d41e5
JJ
46652015-11-05 Jakub Jelinek <jakub@redhat.com>
4666
4667 * c-common.h (c_finish_omp_atomic): Add TEST argument.
4668 (c_omp_check_loop_iv, c_omp_check_loop_iv_exprs): New prototypes.
4669 * c-omp.c (c_finish_omp_atomic): Add TEST argument. Don't call
4670 save_expr or create_tmp_var* if TEST is true.
4671 (c_finish_omp_for): Store OMP_FOR_ORIG_DECLS always.
4672 Don't call add_stmt here.
4673 (struct c_omp_check_loop_iv_data): New type.
4674 (c_omp_check_loop_iv_r, c_omp_check_loop_iv,
4675 c_omp_check_loop_iv_exprs): New functions.
4676 (c_omp_split_clauses): Adjust for lastprivate being allowed on
4677 distribute.
4678 (c_omp_declare_simd_clauses_to_numbers): Change
4679 OMP_CLAUSE_LINEAR_VARIABLE_STRIDE OMP_CLAUSE_LINEAR_STEP into numbers.
4680 (c_omp_declare_simd_clauses_to_decls): Similarly change those
4681 from numbers to PARM_DECLs.
4682
595278be
MM
46832015-11-04 Mikhail Maltsev <maltsevm@gmail.com>
4684
4685 * c-omp.c (c_omp_split_clauses): Remove conditional compilation. Use
4686 flag_checking.
4687
3f8257db 46882015-11-03 Bernd Schmidt <bschmidt@redhat.com>
c85158de
MS
4689
4690 PR c++-common/67882
b3d5bc62
JJ
4691 * c-common.h (fold_offsetof_1): Add argument.
4692 * c-common.c (fold_offsetof_1): Diagnose more invalid
c85158de
MS
4693 offsetof expressions that reference elements past the end of
4694 an array.
4695
4bf9e5a8
TS
46962015-11-03 Thomas Schwinge <thomas@codesourcery.com>
4697 Chung-Lin Tang <cltang@codesourcery.com>
4698
4699 * c-pragma.c (oacc_pragmas): Add "atomic".
4700 * c-pragma.h (pragma_kind): Add PRAGMA_OACC_ATOMIC.
4701
3b1661a9
ES
47022015-10-30 Evgeny Stupachenko <evstupac@gmail.com>
4703
4704 * c-common.c (handle_target_clones_attribute): New.
4705 (c_common_attribute_table): Add handle_target_clones_attribute.
4706 (handle_always_inline_attribute): Add check on target_clones attribute.
4707 (handle_target_attribute): Ditto.
4708
2adfab87
AM
47092015-10-29 Andrew MacLeod <amacleod@redhat.com>
4710
4711 * array-notation-common.c: Reorder #include's and remove duplicates.
4712 * c-ada-spec.c: Likewise.
4713 * c-cilkplus.c: Likewise.
4714 * c-common.c: Likewise.
4715 * c-cppbuiltin.c: Likewise.
4716 * c-dump.c: Likewise.
4717 * c-format.c: Likewise.
4718 * c-gimplify.c: Likewise.
4719 * c-indentation.c: Likewise.
4720 * c-lex.c: Likewise.
4721 * c-omp.c: Likewise.
4722 * c-opts.c: Likewise.
4723 * c-pch.c: Likewise.
4724 * c-ppoutput.c: Likewise.
4725 * c-pragma.c: Likewise.
4726 * c-pretty-print.c: Likewise.
4727 * c-semantics.c: Likewise.
4728 * c-ubsan.c: Likewise.
4729 * cilk.c: Likewise.
4730 * stub-objc.c: Likewise.
4731
d90ec4f2
JM
47322015-10-28 Jason Merrill <jason@redhat.com>
4733
4734 * c-common.c (pointer_int_sum): Fold the MULT_EXPR.
4735
88bae6f4
TS
47362015-10-27 Thomas Schwinge <thomas@codesourcery.com>
4737 James Norris <jnorris@codesourcery.com>
4738 Cesar Philippidis <cesar@codesourcery.com>
4739
4740 PR c/64765
4741 PR c/64880
4742 * c-common.h (c_oacc_split_loop_clauses): Declare function.
4743 * c-omp.c (c_oacc_split_loop_clauses): New function.
4744
b1726d6c
MS
47452015-10-21 Martin Sebor <msebor@redhat.com>
4746
4747 PR driver/68043
4748 * c.opt: End each sentence that describes an option with a period.
4749
fa60eeb9
MP
47502015-10-20 Marek Polacek <polacek@redhat.com>
4751
4752 * array-notation-common.c (is_cilkplus_vector_p): Define.
4753 * c-common.h (is_cilkplus_vector_p): Declare.
4754
95979049
MP
47552015-10-20 Marek Polacek <polacek@redhat.com>
4756
4757 * c.opt (std=gnu++11): Do not describe as experimental.
4758 (std=gnu++14): Likewise.
4759
2a9fb712
JM
47602015-10-19 Jason Merrill <jason@redhat.com>
4761
4762 * c-cppbuiltin.c (c_cpp_builtins): Define
4763 __cpp_nontype_template_args.
4764
13b380a3
JM
47652015-10-19 Jason Merrill <jason@redhat.com>
4766
4767 * c-cppbuiltin.c (c_cpp_builtins): Define
4768 __cpp_enumerator_attributes, __cpp_fold_expressions,
4769 __cpp_unicode_characters.
4770
d9a6bd32
JJ
47712015-10-13 Jakub Jelinek <jakub@redhat.com>
4772 Aldy Hernandez <aldyh@redhat.com>
4773
4774 * c-common.c (enum c_builtin_type): Define DEF_FUNCTION_TYPE_9,
4775 DEF_FUNCTION_TYPE_10 and DEF_FUNCTION_TYPE_11.
4776 (c_define_builtins): Likewise.
4777 * c-common.h (enum c_omp_clause_split): Add
4778 C_OMP_CLAUSE_SPLIT_TASKLOOP.
4779 (c_finish_omp_critical, c_finish_omp_ordered): Add CLAUSES argument.
4780 (c_finish_omp_for): Add ORIG_DECLV argument.
4781 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP as
4782 201511 instead of 201307.
4783 * c-omp.c (c_finish_omp_critical): Add CLAUSES argument, set
4784 OMP_CRITICAL_CLAUSES to it.
4785 (c_finish_omp_ordered): Add CLAUSES argument, set
4786 OMP_ORDERED_CLAUSES to it.
4787 (c_finish_omp_for): Add ORIG_DECLV argument, set OMP_FOR_ORIG_DECLS
4788 to it if OMP_FOR. Clear DECL_INITIAL on the IVs.
4789 (c_omp_split_clauses): Handle OpenMP 4.5 combined/composite
4790 constructs and new OpenMP 4.5 clauses. Clear
4791 OMP_CLAUSE_SCHEDULE_SIMD if not combined with OMP_SIMD. Add
4792 verification code.
4793 * c-pragma.c (omp_pragmas_simd): Add taskloop.
4794 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKLOOP.
4795 (enum pragma_omp_clause): Add
4796 PRAGMA_OMP_CLAUSE_{DEFAULTMAP,GRAINSIZE,HINT,{IS,USE}_DEVICE_PTR}
4797 and PRAGMA_OMP_CLAUSE_{LINK,NOGROUP,NUM_TASKS,PRIORITY,SIMD,THREADS}.
4798
624d31fe
RS
47992015-10-05 Richard Sandiford <richard.sandiford@arm.com>
4800
4801 * c-lex.c (interpret_float): Use real_equal instead of
4802 REAL_VALUES_EQUAL.
4803
b8fd7909
JM
48042015-10-04 Jason Merrill <jason@redhat.com>
4805
4806 Implement N4514, C++ Extensions for Transactional Memory.
4807 * c-common.c (c_common_reswords): Add C++ TM TS keywords.
4808 (c_common_attribute_table): Add transaction_safe_dynamic.
4809 transaction_safe now affects type identity.
4810 (handle_tm_attribute): Handle transaction_safe_dynamic.
4811 * c-common.h (enum rid): Add RID_ATOMIC_NOEXCEPT,
4812 RID_ATOMIC_CANCEL, RID_SYNCHRONIZED.
4813 (OBJC_IS_CXX_KEYWORD): Add RID_SYNCHRONIZED.
4814 (D_TRANSMEM): New.
4815 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_transactional_memory.
4816 * c-pretty-print.c (pp_c_attributes_display): Don't print
4817 transaction_safe in C++.
4818
12651878
MP
48192015-10-02 Marek Polacek <polacek@redhat.com>
4820
4821 * c.opt (Wduplicated-cond): Don't enable by -Wall anymore.
4822
3e3b8d63
MP
48232015-10-02 Marek Polacek <polacek@redhat.com>
4824
4825 PR c/64249
4826 * c-common.c (warn_duplicated_cond_add_or_warn): New function.
4827 * c-common.h (warn_duplicated_cond_add_or_warn): Declare.
4828 * c.opt (Wduplicated-cond): New option.
4829
0d1a8f75
JM
48302015-10-01 Joseph Myers <joseph@codesourcery.com>
4831
4832 * c.opt (std=c11): Do not describe as experimental.
4833 (std=gnu11): Likewise.
4834 (std=iso9899:2011): Likewise.
4835
3e32ee19
NS
48362015-09-28 Nathan Sidwell <nathan@codesourcery.com>
4837
4838 * c-common.c (DEF_FUNCTION_TYPE_VAR_6): New.
4839 (DEF_FUNCTION_TYPE_VAR_11): Delete.
4840
974348ee
MP
48412015-09-25 Marek Polacek <polacek@redhat.com>
4842
4843 * c-ubsan.c (ubsan_instrument_division): Remove unnecessary code.
4844 (ubsan_instrument_shift): Likewise.
4845
15dbc1a6
MP
48462015-09-25 Marek Polacek <polacek@redhat.com>
4847
4848 PR sanitizer/64906
4849 * c-ubsan.c (ubsan_instrument_division): Also pre-evaluate OP1.
4850
6b95d7cc
PP
48512015-09-24 Patrick Palka <ppalka@gcc.gnu.org>
4852
4853 * c-indentation.c (should_warn_for_misleading_indentation):
4854 Compare next_stmt_vis_column with guard_line_first_nws instead
4855 of with guard_line_vis_column.
4856
c1822f9c
MLI
48572015-09-23 Manuel López-Ibáñez <manu@gcc.gnu.org>
4858
4859 PR c/49654
4860 PR c/49655
4861 * c-pragma.c (handle_pragma_diagnostic): Detect non-warning
4862 options and options not valid for the current language.
4863
d5398058
PP
48642015-09-22 Patrick Palka <ppalka@gcc.gnu.org>
4865
4866 * c-indentation.c (should_warn_for_misleading_indentation):
4867 Float out and consolidate the calls to get_visual_column that
4868 are passed guard_exploc as an argument. Compare
4869 next_stmt_vis_column with guard_line_first_nws instead of with
4870 body_line_first_nws.
4871
6b333269
NS
48722015-09-22 Nathan Sidwell <nathan@codesourcery.com>
4873
4874 * c.opt (Wmultiple-inheritance, Wvirtual-inheritance, Wtemplates,
4875 Wnamespaces): New C++ warnings.
4876
a75f1574
JM
48772015-09-22 Jason Merrill <jason@redhat.com>
4878
4879 * c-common.h (abi_compat_version_crosses): New.
4880 (warn_abi_version): Declare.
4881 * c-common.c: Define it.
4882 * c-opts.c (c_common_post_options): Handle it.
4883 flag_abi_compat_version defaults to 8.
4884
bdaaa8b7
VV
48852015-09-21 Ville Voutilainen <ville.voutilainen@gmail.com>
4886
4887 Complete the implementation of N4230, Nested namespace definition.
4888 * c-cppbuiltin.c: Add __cpp_namespace_attributes and
4889 __cpp_nested_namespace_definitions.
4890
eaa797e8
MLI
48912015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4892
4893 * c-pragma.c (handle_pragma_diagnostic): Fix wrong return.
4894
c4914de6
MLI
48952015-09-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
4896
4897 * c-pragma.c (handle_pragma_diagnostic): Use explicit location
4898 when warning.
4899 * c-pragma.h (pragma_lex): Add optional loc argument.
4900
fcb87c50
MM
49012015-09-16 Mikhail Maltsev <maltsevm@gmail.com>
4902
4903 * c-format.c (check_format_arg): Adjust to use common block size in all
4904 object pools.
4905
31bdd08a
DM
49062015-09-15 David Malcolm <dmalcolm@redhat.com>
4907
4908 * c-format.c (location_from_offset): Update for change in
4909 signature of location_get_source_line.
4910 * c-indentation.c (get_visual_column): Likewise.
4911 (line_contains_hash_if): Likewise.
4912
aa9f4b4c
MP
49132015-09-14 Marek Polacek <polacek@redhat.com>
4914
4915 * c-opts.c (c_common_post_options): Set C++ standard earlier, before
4916 setting various warnings.
4917
aa256c4a
MP
49182015-09-14 Marek Polacek <polacek@redhat.com>
4919
4920 * c-common.c (warn_for_sign_compare): Cast to unsigned when shifting
4921 a negative value.
4922
0f876f22
MW
49232015-09-11 Mark Wielaard <mjw@redhat.com>
4924
4925 PR c/28901
4926 * c.opt (Wunused-variable): Option from common.opt.
4927 (Wunused-const-variable): New option.
4928
273aa49e
PC
49292015-09-09 Paolo Carlini <paolo.carlini@oracle.com>
4930
4931 PR c++/53184
4932 * c.opt ([Wsubobject-linkage]): Add.
4933
1807ffc1
MS
49342015-09-03 Martin Sebor <msebor@redhat.com>
4935
4936 PR c/66516
4937 * c-common.h (c_decl_implicit, reject_gcc_builtin): Declare new
4938 functions.
4939 * c-common.c (reject_gcc_builtin): Define.
4940
38942840
BI
49412015-09-02 Balaji V. Iyer <balaji.v.iyer@intel.com>
4942
4943 PR middle-end/60586
4944 * c-common.h (cilk_gimplify_call_params_in_spawned_fn): New
4945 prototype.
4946 * c-gimplify.c (c_gimplify_expr): Added a call to the function
4947 cilk_gimplify_call_params_in_spawned_fn.
4948 * cilk.c (cilk_gimplify_call_params_in_spawned_fn): New function.
4949 (gimplify_cilk_spawn): Removed EXPR_STMT and CLEANUP_POINT_EXPR
4950 unwrapping.
4951
c316b5e4
MP
49522015-08-25 Marek Polacek <polacek@redhat.com>
4953
4954 PR middle-end/67330
4955 * c-common.c (handle_weak_attribute): Don't check whether the
4956 visibility can be changed here.
4957
584a7c46
MLI
49582015-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
4959
4960 * c-lex.c (c_lex_with_flags): Use explicit locations.
4961
a79683d5
TS
49622015-08-18 Trevor Saunders <tbsaunde@tbsaunde.org>
4963
4964 * c-ada-spec.h, c-common.c, c-common.h, c-format.c, c-format.h,
4965 c-objc.h, c-ppoutput.c, c-pragma.c, c-pragma.h: Remove useless
4966
61717a45
FXC
49672015-08-18 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4968
4969 PR middle-end/36757
4970 * c-common.c (check_builtin_function_arguments): Add check
4971 for BUILT_IN_SIGNBIT argument.
4972
329524f5
PC
49732015-08-18 Paolo Carlini <paolo.carlini@oracle.com>
4974
4975 PR c++/67160
4976 * c-cppbuiltin.c (c_cpp_builtins): Fix __cpp_static_assert value
4977 in c++1z mode.
4978
4ee55665
MP
49792015-08-17 Marek Polacek <polacek@redhat.com>
4980
4981 * c-pretty-print.c (pp_c_cv_qualifiers): Remove code dealing
4982 with whitespaces before qualifier names.
4983
b893e375
MP
49842015-08-12 Marek Polacek <polacek@redhat.com>
4985
4986 PR c++/55095
4987 * c-common.c (maybe_warn_shift_overflow): Properly handle
4988 left-shifting 1 into the sign bit.
4989
c2d89095
MLI
49902015-08-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
4991
4992 * c.opt (Wchkp): Use LangEnabledBy instead of EnabledBy.
4993
971e17ff
AS
49942015-08-06 Andrew Sutton <andrew.n.sutton@gmail.com>
4995 Braden Obrzut <admin@maniacsvault.net>
4996 Jason Merrill <jason@redhat.com>
4997
4998 Add C++ Concepts TS support.
4999 * c-common.c (c_common_reswords): Add __is_same_as, concept, requires.
5000 * c-common.h (enum rid): Add RID_IS_SAME_AS, RID_CONCEPT, RID_REQUIRES.
5001 (D_CXX_CONCEPTS, D_CXX_CONCEPTS_FLAGS): New.
5002 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_concepts.
5003 * c-opts.c (set_std_cxx1z): Set flag_concepts.
5004 * c.opt (fconcepts): New.
5005
b3d5bc62
JJ
50062015-08-02 Martin Sebor <msebor@redhat.com>
5007
5008 * c.opt (-Wframe-address): New warning option.
5009
8ebca419
PP
50102015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5011
5012 * c-indentation.c (should_warn_for_misleading_indentation):
5013 Improve heuristics.
5014
1a1e101f
PP
50152015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5016
5017 * c-indentation.c (get_visual_column): Add parameter first_nws,
5018 use it. Update comment documenting the function.
5019 (is_first_nonwhitespace_on_line): Remove.
5020 (should_warn_for_misleading_indentation): Replace usage of
5021 of is_first_nonwhitespace_on_line with get_visual_column.
5022
992118a1
PP
50232015-08-02 Patrick Palka <ppalka@gcc.gnu.org>
5024
5025 * c-indentation.h (struct token_indent_info): Define.
5026 (get_token_indent_info): Define.
5027 (warn_for_misleading_information): Declare.
5028 * c-common.h (warn_for_misleading_information): Remove.
5029 * c-identation.c (warn_for_misleading_indentation):
5030 Change declaration to take three token_indent_infos. Adjust
5031 accordingly.
5032 * c-identation.c (should_warn_for_misleading_indentation):
5033 Likewise. Bail out early if the body is a compound statement.
5034 (guard_tinfo_to_string): Define.
5035
e8fa3817
JM
50362015-07-30 Jason Merrill <jason@redhat.com>
5037
5038 * c-pretty-print.c (unary_expression) [INDIRECT_REF]: Don't print
5039 '*' for reference decay.
5040
173864e8
MP
50412015-07-30 Marek Polacek <polacek@redhat.com>
5042
5043 * c-common.c (warn_tautological_cmp): Bail for float types.
5044
f2afe6dd
MP
50452015-07-27 Marek Polacek <polacek@redhat.com>
5046
5047 PR bootstrap/67030
5048 * c-common.c (warn_tautological_cmp): Don't warn for macro expansion.
5049
05b28fd6
MP
50502015-07-27 Marek Polacek <polacek@redhat.com>
5051
5052 PR c++/66555
5053 PR c/54979
5054 * c-common.c (find_array_ref_with_const_idx_r): New function.
5055 (warn_tautological_cmp): New function.
5056 * c-common.h (warn_tautological_cmp): Declare.
5057 * c.opt (Wtautological-compare): New option.
5058
5a5062b8
MP
50592015-07-23 Marek Polacek <polacek@redhat.com>
5060
5061 * c-ubsan.c (ubsan_instrument_division): Use unshare_expr throughout.
5062 (ubsan_instrument_shift): Likewise.
5063
dc891fe7
MP
50642015-07-23 Marek Polacek <polacek@redhat.com>
5065
5066 PR sanitizer/66908
5067 * c-ubsan.c: Include gimplify.h.
5068 (ubsan_instrument_division): Unshare OP0 and OP1.
5069 (ubsan_instrument_shift): Likewise.
5070
451b5e48
MP
50712015-07-20 Marek Polacek <polacek@redhat.com>
5072 Richard Sandiford <richard.sandiford@arm.com>
5073
5074 PR c++/55095
5075 * c-common.c (c_fully_fold_internal): Warn about left shift overflows.
5076 Use EXPR_LOC_OR_LOC.
5077 (maybe_warn_shift_overflow): New function.
5078 * c-common.h (maybe_warn_shift_overflow): Declare.
5079 * c-opts.c (c_common_post_options): Set warn_shift_overflow.
5080 * c.opt (Wshift-overflow): New option.
5081
fb0b2914
ML
50822015-07-16 Martin Liska <mliska@suse.cz>
5083
5084 * c-format.c (static void check_format_info_main): Use
5085 object_allocator instead of pool_allocator.
5086 (check_format_arg): Likewise.
5087 (check_format_info_main): Likewise.
5088
903f5c23
AM
50892015-07-15 Andrew MacLeod <amacleod@redhat.com>
5090
5091 * c-opts.c: Remove multiline #include comment.
5092
026c3cfd
AH
50932015-07-12 Aldy Hernandez <aldyh@redhat.com>
5094
5095 * c-common.c: Fix double word typos.
5096
bb49ee66
EB
50972015-07-10 Eric Botcazou <ebotcazou@adacore.com>
5098
5099 * c-ada-spec.h (cpp_operation): Revert latest change.
5100 * c-ada-spec.c (print_ada_declaration): Likewise. Skip implicit
5101 constructors and destructors.
5102
1916bcb5
AM
51032015-07-09 Andrew MacLeod <amacleod@redhat.com>
5104
5105 * c-common.h: Adjust includes for flags.h changes.
5106 * stub-objc.c: Likewise.
026c3cfd 5107
a9dcd529
EB
51082015-07-08 Eric Botcazou <ebotcazou@adacore.com>
5109
5110 * c-ada-spec.h (cpp_operation): Add IS_CONSTEXPR.
5111 * c-ada-spec.c (print_ada_declaration): Skip constexpr constructors.
5112
b03b462f
JJ
51132015-07-08 Jakub Jelinek <jakub@redhat.com>
5114
5115 * c-omp.c (c_omp_declare_simd_clauses_to_numbers): If all clauses
5116 are to be removed, return NULL rather than original clauses list.
5117
c7131fb2
AM
51182015-07-07 Andrew MacLeod <amacleod@redhat.com>
5119
5120 * array-notation-common.c: Adjust includes.
5121 * c-ada-spec.c: Likewise.
5122 * c-cilkplus.c: Likewise.
5123 * c-common.h: Likewise.
5124 * c-cppbuiltin.c: Likewise.
5125 * c-dump.c: Likewise.
5126 * c-format.c: Likewise.
5127 * c-gimplify.c: Likewise.
5128 * c-indentation.c: Likewise.
5129 * c-lex.c: Likewise.
5130 * c-omp.c: Likewise.
5131 * c-opts.c: Likewise.
5132 * c-pch.c: Likewise.
5133 * c-ppoutput.c: Likewise.
5134 * c-pragma.c: Likewise.
5135 * c-pretty-print.c: Likewise.
5136 * c-semantics.c: Likewise.
5137 * c-ubsan.c: Likewise.
5138 * cilk.c: Likewise.
5139 * stub-objc.c: Likewise.
5140
2a7fb83f
EB
51412015-07-07 Eric Botcazou <ebotcazou@adacore.com>
5142
5143 * c-ada-spec.h (cpp_operation): Add IS_MOVE_CONSTRUCTOR.
5144 * c-ada-spec.c (print_ada_declaration): Skip move constructors.
5145
a03c9bf1
JM
51462015-07-01 Jason Merrill <jason@redhat.com>
5147
36a85135
JM
5148 * c-common.h (D_CXX11): Rename from D_CXX0X.
5149 (RID_FIRST_CXX11, RID_LAST_CXX11): Rename from *_CXX0X.
5150 * c-common.c: Adjust.
5151
e7fa68d5
JM
5152 * c-opts.c (c_common_post_options): Default to C++14.
5153
a03c9bf1
JM
5154 * c-opts.c (c_common_post_options): Highest ABI level is now 10.
5155
fe95b036
ESR
51562015-06-30 Edward Smith-Rowland <3dw4rd@verizon.net>
5157
5158 Implement N4197 - Adding u8 character literals
b3d5bc62 5159 * c-ada-spec.c (print_ada_macros): Treat CPP_UTF8CHAR like
a64be36b 5160 CPP_CHAR.
b3d5bc62 5161 * c-common.c (c_parse_error): Print CPP_UTF8CHAR and
a64be36b 5162 CPP_UTF8CHAR_USERDEF tokens.
b3d5bc62 5163 * c-lex.c (c_lex_with_flags): Treat CPP_UTF8CHAR_USERDEF
a64be36b
EB
5164 and CPP_UTF8CHAR tokens.
5165 (lex_charconst): Treat CPP_UTF8CHAR token.
fe95b036 5166
da2e71c9
MLI
51672015-06-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
5168
5169 PR fortran/66605
5170 * c-common.c (do_warn_unused_parameter): Move here.
5171 * c-common.h (do_warn_unused_parameter): Declare.
5172
b155cfd9
MP
51732015-06-29 Marek Polacek <polacek@redhat.com>
5174
5175 PR c/66322
5176 * c-common.c (check_case_bounds): Add bool * parameter. Set
5177 OUTSIDE_RANGE_P.
5178 (c_add_case_label): Add bool * parameter. Pass it down to
5179 check_case_bounds.
5180 (c_do_switch_warnings): Add bool parameters. Implement -Wswitch-bool
5181 warning here.
5182 * c-common.h (c_add_case_label, c_do_switch_warnings): Update
5183 declarations.
5184
31521951
MP
51852015-06-27 Marek Polacek <polacek@redhat.com>
5186
5187 * c-common.c (check_main_parameter_types): Use VECTOR_TYPE_P
5188 or VECTOR_INTEGER_TYPE_P throughout.
5189 * c-gimplify.c: Likewise.
5190
22d03525
MP
51912015-06-26 Marek Polacek <polacek@redhat.com>
5192
5193 * array-notation-common.c (find_rank): Use INDIRECT_REF_P.
5194 * c-common.c (c_fully_fold_internal): Likewise.
5195 (c_alignof_expr): Likewise.
5196 * c-pretty-print.c (c_pretty_printer::postfix_expression): Likewise.
5197 * c-ubsan.c (ubsan_instrument_bounds): Likewise.
b1726d6c 5198 * cilk.c (create_parm_list): Likewise.
22d03525 5199
af05e6e5
MP
52002015-06-26 Marek Polacek <polacek@redhat.com>
5201
5202 * c-common.c (handle_unused_attribute): Use VAR_OR_FUNCTION_DECL_P.
5203
f0889939
AM
52042015-06-25 Andrew MacLeod <amacleod@redhat.com>
5205
5206 * c-common.c: Remove ipa-ref.h and plugin-api.h from include list.
5207 * c-gimplify.c: Likewise.
5208 * c-pragma.c: Likewise.
5209 * c-ubsan.c: Likewise.
5210 * cilk.c: Likewise.
5211
ca752f39
RS
52122015-06-25 Richard Sandiford <richard.sandiford@arm.com>
5213
5214 * c-common.c (c_type_hasher): Inherit from ggc_ptr_hash rather than
5215 ggc_hasher.
5216
16a16ec7
AM
52172015-06-25 Andrew MacLeod <amacleod@redhat.com>
5218
5219 * cilk.c: Move calls.h after tm.h in the include chain.
5220
0ae9bd27
MP
52212015-06-25 Marek Polacek <polacek@redhat.com>
5222
5223 * array-notation-common.c: Use VAR_P throughout.
5224 * c-ada-spec.c: Likewise.
5225 * c-common.c: Likewise.
5226 * c-format.c: Likewise.
5227 * c-gimplify.c: Likewise.
5228 * c-omp.c: Likewise.
5229 * c-pragma.c: Likewise.
5230 * c-pretty-print.c: Likewise.
5231 * cilk.c: Likewise.
5232
62f9079a
MP
52332015-06-25 Marek Polacek <polacek@redhat.com>
5234
5235 * cilk.c (extract_free_variables): Use is_global_var.
5236
0fa16060
RS
52372015-06-23 Richard Sandiford <richard.sandiford@arm.com>
5238
5239 * c-common.c: Don't include target-def.h.
5240
a68ae2e1
MP
52412015-06-23 Marek Polacek <polacek@redhat.com>
5242
5243 * c-common.c (warn_logical_operator): Use tree_int_cst_equal
5244 when comparing INTEGER_CSTs.
5245
c6a2f2d9
PMR
52462015-06-22 Pierre-Marie de Rodat <derodat@adacore.com>
5247
5248 * c-ada-spec.h (cpp_operation): Add HAS_DEPENDENT_TEMPLATE_ARGS.
5249 * c-ada-spec.c (collect_ada_nodes): Skip NAMESPACE_DECL
5250 (dump_ada_template): Skip partially specialized types.
5251
6b4db501
MM
52522015-06-22 Mikhail Maltsev <maltsevm@gmail.com>
5253
5254 * c-common.c (scalar_to_vector): Use std::swap instead of manually
5255 swapping.
5256
abb226c9
AM
52572015-06-17 Andrew MacLeod <amacleod@redhat.com>
5258
5259 * array-notation-common.c: Do not include input.h, line-map.h or is-a.h.
5260 * c-ada-spec.c: Likewise.
5261 * c-cilkplus.c: Likewise.
5262 * c-common.c: Likewise.
5263 * c-common.h: Likewise.
5264 * c-cppbuiltin.c: Likewise.
5265 * c-dump.c: Likewise.
5266 * c-format.c: Likewise.
5267 * c-gimplify.c: Likewise.
5268 * c-indentation.c: Likewise.
5269 * c-lex.c: Likewise.
5270 * c-omp.c: Likewise.
5271 * c-opts.c: Likewise.
5272 * c-pch.c: Likewise.
5273 * c-ppoutput.c: Likewise.
5274 * c-pragma.c: Likewise.
5275 * c-pretty-print.c: Likewise.
5276 * c-semantics.c: Likewise.
5277 * c-ubsan.c: Likewise.
5278 * cilk.c: Likewise.
5279 * stub-objc.c: Likewise.
5280
076fecad
PP
52812015-06-13 Patrick Palka <ppalka@gcc.gnu.org>
5282
5283 PR c++/65168
5284 * c-common.c (c_common_truthvalue_conversion): Warn when
5285 converting an address of a reference to a truth value.
5286
13fdf2e2
AM
52872015-06-08 Andrew MacLeod <amacleod@redhat.com>
5288
5289 * array-notation-common.c : Adjust include files.
5290 * c-ada-spec.c : Likewise.
5291 * c-cilkplus.c : Likewise.
5292 * c-common.c : Likewise.
5293 * c-common.h : Likewise.
5294 * c-cppbuiltin.c : Likewise.
5295 * c-dump.c : Likewise.
5296 * c-format.c : Likewise.
5297 * c-gimplify.c : Likewise.
5298 * c-indentation.c : Likewise.
5299 * c-lex.c : Likewise.
5300 * c-omp.c : Likewise.
5301 * c-opts.c : Likewise.
5302 * c-pch.c : Likewise.
5303 * c-ppoutput.c : Likewise.
5304 * c-pragma.c : Likewise.
5305 * c-pretty-print.c : Likewise.
5306 * c-semantics.c : Likewise.
5307 * c-ubsan.c : Likewise.
5308 * cilk.c : Likewise.
5309 * stub-objc.c : Likewise.
5310
a1661b90
MP
53112015-06-08 Marek Polacek <polacek@redhat.com>
5312
5313 PR c/66415
5314 * c-format.c (location_from_offset): Return LOC if LINE is null.
5315
d7438551
AH
53162015-06-05 Aldy Hernandez <aldyh@redhat.com>
5317
5318 * c-common.h (c_parse_final_cleanups): New prototype.
5319 * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups.
5320
b3d5bc62
JJ
53212015-06-04 Sriraman Tallam <tmsriram@google.com>
5322
5323 * c-common.c (noplt): New attribute.
5324 (handle_noplt_attribute): New handler.
5325
ecb9f223
AM
53262015-06-04 Andrew MacLeod <amacleod@redhat.com>
5327
5328 * array-notation-common.c: Adjust includes for restructured coretypes.h.
5329 * c-ada-spec.c: Likewise.
5330 * c-cilkplus.c: Likewise.
5331 * c-common.c: Likewise.
5332 * c-common.h: Likewise.
5333 * c-cppbuiltin.c: Likewise.
5334 * c-dump.c: Likewise.
5335 * c-format.c: Likewise.
5336 * c-gimplify.c: Likewise.
5337 * c-indentation.c: Likewise.
5338 * c-lex.c: Likewise.
5339 * c-omp.c: Likewise.
5340 * c-opts.c: Likewise.
5341 * c-pch.c: Likewise.
5342 * c-ppoutput.c: Likewise.
5343 * c-pragma.c: Likewise.
5344 * c-pretty-print.c: Likewise.
5345 * c-semantics.c: Likewise.
5346 * c-ubsan.c: Likewise.
5347 * cilk.c: Likewise.
5348 * stub-objc.c: Likewise.
5349
6ac48155
DM
53502015-06-02 David Malcolm <dmalcolm@redhat.com>
5351
5352 PR c/66220:
5353 * c-indentation.c (should_warn_for_misleading_indentation): Use
5354 expand_location rather than expand_location_to_spelling_point.
5355 Don't warn if the guarding statement is more indented than the
5356 next/body stmts.
5357
773ce42e
DM
53582015-06-02 David Malcolm <dmalcolm@redhat.com>
5359
5360 * c-indentation.c (warn_for_misleading_indentation): Bail out
5361 immediately if -Wmisleading-indentation isn't enabled.
5362
4fef8379
ML
53632015-06-01 Martin Liska <mliska@suse.cz>
5364
5365 * c-format.c (check_format_arg):Use new type-based pool allocator.
5366 (check_format_info_main) Likewise.
5367
1edfb384
EB
53682015-05-31 Eric Botcazou <ebotcazou@adacore.com>
5369
5370 * c-ada-spec.c (is_tagged_type): Test for TYPE_METHODS on main variant.
5371 (has_nontrivial_methods): Likewise.
5372
9677ef52
MP
53732015-05-25 Marek Polacek <polacek@redhat.com>
5374
5375 * c-ubsan.c (ubsan_instrument_shift): Use type0.
5376
fd5c817a
MP
53772015-05-22 Marek Polacek <polacek@redhat.com>
5378
5379 PR c/47043
5380 * c-common.c (handle_deprecated_attribute): Allow CONST_DECL.
5381
a2f45fe6 53822015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
581edfa3
TS
5383
5384 * c-cppbuiltin.c (c_cpp_builtins): Use if instead of #if with
5385 STACK_GROWS_DOWNWARD.
5386
a2f45fe6 53872015-05-21 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
62f9f30b
TS
5388
5389 * c-cppbuiltin.c (c_cpp_builtins): Check the value of
5390 STACK_GROWS_DOWNWARD rather than if it is defined.
5391
0fee2ac2 53922015-05-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
b1726d6c 5393
0fee2ac2
MLI
5394 PR c/52952
5395 * c-format.c (location_column_from_byte_offset): New.
5396 (location_from_offset): New.
5397 (struct format_wanted_type): Add offset_loc field.
5398 (check_format_info): Move handling of location for extra arguments
5399 closer to the point of warning.
5400 (check_format_info_main): Pass the result of location_from_offset
5401 to warning_at.
5402 (format_type_warning): Pass the result of location_from_offset
5403 to warning_at.
5404
cf4ef6f7
MP
54052015-05-20 Marek Polacek <polacek@redhat.com>
5406
5407 * c-omp.c (check_omp_for_incr_expr): Use BINARY_CLASS_P.
5408
3a65ee74
MP
54092015-05-20 Marek Polacek <polacek@redhat.com>
5410
5411 * c-ada-spec.c (dump_sloc): Use DECL_P.
5412
21b634ae
MP
54132015-05-20 Marek Polacek <polacek@redhat.com>
5414
5415 * c-pragma.c: Use VAR_OR_FUNCTION_DECL_P throughout.
5416 * c-common.c: Likewise.
5417
0e50b624
DM
54182015-05-19 David Malcolm <dmalcolm@redhat.com>
5419
5420 * c-common.h (fe_file_change): Strengthen param from
5421 const line_map * to const line_map_ordinary *.
5422 (pp_file_change): Likewise.
5423 * c-lex.c (fe_file_change): Likewise.
5424 (cb_define): Use linemap_check_ordinary when invoking
5425 SOURCE_LINE.
5426 (cb_undef): Likewise.
5427 * c-opts.c (c_finish_options): Use linemap_check_ordinary when
5428 invoking cb_file_change.
5429 (c_finish_options): Likewise.
5430 (push_command_line_include): Likewise.
5431 (cb_file_change): Strengthen param "new_map" from
5432 const line_map * to const line_map_ordinary *.
5433 * c-ppoutput.c (cb_define): Likewise for local "map".
5434 (pp_file_change): Likewise for param "map" and local "from".
5435
fab27f52
MM
54362015-05-19 Mikhail Maltsev <maltsevm@gmail.com>
5437
5438 * c-common.c (shorten_compare): Use std::swap instead of explicit swaps.
5439
2fe1d762
TV
54402015-05-18 Tom de Vries <tom@codesourcery.com>
5441
5442 * c-common.c (build_va_arg_1): New function.
5443 (build_va_arg): Add address operator to va_list operand if necessary.
5444
7a37fa90
MM
54452015-05-15 Mikhail Maltsev <maltsevm@gmail.com>
5446
5447 PR c/48956
5448 * c-common.c (int_safely_convertible_to_real_p): Define.
5449 (unsafe_conversion_p): Check conversions involving complex types.
5450 (conversion_warning): Add new warning message for conversions which
5451 discard imaginary component.
5452 * c-common.h: (enum conversion_safety): Add new enumerator for such
5453 conversions.
5454
3aa3c9fc
MP
54552015-05-14 Marek Polacek <polacek@redhat.com>
5456
5457 PR c/66066
5458 PR c/66127
5459 * c-common.c (c_fully_fold): Pass false down to c_fully_fold_internal.
5460 (c_fully_fold_internal): Fold C_MAYBE_CONST_EXPRs with
5461 C_MAYBE_CONST_EXPR_INT_OPERANDS set. Add FOR_INT_CONST argument and
5462 use it. If FOR_INT_CONST, require that all evaluated operands be
5463 INTEGER_CSTs.
5464
c3388e62
DM
54652015-05-12 David Malcolm <dmalcolm@redhat.com>
5466
5467 * c-common.h (warn_for_misleading_indentation): New prototype.
5468 * c-indentation.c: New file.
5469 * c.opt (Wmisleading-indentation): New option.
5470
c7b38fd5
TV
54712015-05-12 Tom de Vries <tom@codesourcery.com>
5472
5473 PR tree-optimization/66010
5474 * c-common.c (build_va_arg): Don't mark ap addressable unless necessary.
5475
381bf11e
JM
54762015-05-09 Jason Merrill <jason@redhat.com>
5477
edff0c06
JM
5478 * c-opts.c (c_common_post_options): Also clear
5479 cpp_opts->cpp_warn_cxx11_compat.
5480
129211bc
JM
5481 * c-common.h (enum cxx_dialect): Add cxx_unset.
5482 * c-common.c (cxx_dialect): Initialize to cxx_unset.
5483 * c-opts.c (c_common_post_options): Set C++ dialect to C++98 if unset.
5484
381bf11e
JM
5485 * c.opt (std=c++14): Remove Undocumented flag and experimental warning.
5486 (std=gnu++0x): Mark as Undocumented.
5487 (std=gnu++1y): Add deprecated message.
5488
fe191308
JM
54892015-05-08 Jason Merrill <jason@redhat.com>
5490
765189ff
JM
5491 * c.opt (Wc++11-compat): Make primary. Rename var warn_cxx11_compat.
5492 * c-opts.c: Adjust.
5493
fe191308
JM
5494 * c.opt (Wc++0x-compat): Also set cpp_warn_cxx11_compat.
5495
755e528f
MP
54962015-05-08 Marek Polacek <polacek@redhat.com>
5497
5498 PR c/64918
5499 * c.opt (Woverride-init-side-effects): New option.
5500
0173bd2a
MP
55012015-05-07 Marek Polacek <polacek@redhat.com>
5502
5503 PR c/65179
5504 * c-common.c (c_fully_fold_internal): Warn when left shifting a
5505 negative value.
5506 * c.opt (Wshift-negative-value): New option.
5507 * c-opts.c (c_common_post_options): Set warn_shift_negative_value
5508 when -Wextra and C99/C++11 mode.
5509
e0f0d3b9
MP
55102015-05-07 Marek Polacek <polacek@redhat.com>
5511 Martin Uecker <uecker@eecs.berkeley.edu>
5512
5513 * c-ubsan.c (ubsan_instrument_bounds): Don't skip instrumenting
5514 flexible member array-like members if SANITIZE_BOUNDS_STRICT.
5515
8243e2a9
JM
55162015-05-05 Jason Merrill <jason@redhat.com>
5517
5518 * c.opt (Wterminate): New.
5519
577cd070
MP
55202015-04-30 Marek Polacek <polacek@redhat.com>
5521
5522 * c-common.c (maybe_warn_bool_compare): When comparing with 0/1,
5523 require that the non-constant be of a boolean type.
5524
0373796b
JT
55252015-04-29 Josh Triplett <josh@joshtriplett.org>
5526
e0f0d3b9
MP
5527 * c-common.c (handle_section_attribute): Refactor to reduce
5528 nesting and distinguish between error cases.
0373796b 5529
716c0ba6
MP
55302015-04-29 Marek Polacek <polacek@redhat.com>
5531
5532 PR c/64610
5533 * c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
5534 with 0/1.
5535
8848828b
JJ
55362015-04-29 Jakub Jelinek <jakub@redhat.com>
5537
5538 * c-common.h (omp_clause_mask): Unconditionally define as a class.
5539 Use uint64_t instead of unsigned HOST_WIDE_INT and 64 instead of
5540 HOST_BITS_PER_WIDE_INT.
5541
ecd0e562
TV
55422015-04-28 Tom de Vries <tom@codesourcery.com>
5543
5544 PR tree-optimization/65887
5545 * c-common.c (build_va_arg): Mark va_arg ap argument as addressable.
5546
2a877204 55472015-04-28 Eric Botcazou <ebotcazou@adacore.com>
e0f0d3b9 5548 Pierre-Marie de Rodat <derodat@adacore.com>
2a877204
EB
5549
5550 * c-ada-spec.c (in_function): Delete.
5551 (dump_generic_ada_node): Do not change in_function and remove the
5552 redundant code dealing with it.
5553 (print_ada_declaration): Do not change in_function. Use INDENT_INCR.
5554 (print_ada_methods): Output the static member functions in a nested
5555 package after the regular methods as well as associated renamings.
5556
4853031e
MP
55572015-04-24 Marek Polacek <polacek@redhat.com>
5558
5559 PR c/65830
5560 * c-common.c (c_fully_fold_internal): Use OPT_Wshift_count_negative
5561 and OPT_Wshift_count_overflow.
5562
8c2b7f79
MP
5563 PR c/63357
5564 * c-common.c (warn_logical_operator): Warn if the operands have the
5565 same expressions.
5566
b8787813
MP
55672015-04-24 Marek Polacek <polacek@redhat.com>
5568
5569 PR c/61534
5570 * c-common.c (warn_logical_operator): Bail if either operand comes
5571 from a macro expansion.
5572
8fba1830
BRF
55732015-04-10 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
5574
5575 PR target/55143
5576 * c-common.c (c_default_pointer_mode): Add definition.
5577 * c-common.h (c_default_pointer_mode): Add declaration.
5578
17958621
JJ
55792015-03-11 Jakub Jelinek <jakub@redhat.com>
5580
5581 * c-common.c (c_common_nodes_and_builtins): Don't call xstrdup
5582 on record_builtin_type argument.
5583
7ccb1a11
JJ
55842015-03-10 Jakub Jelinek <jakub@redhat.com>
5585
5586 PR c/65120
5587 * c-common.c (warn_logical_not_parentheses): Don't warn for
5588 !x == 0 or !x != 0.
5589
04fd785e
MP
55902015-03-07 Marek Polacek <polacek@redhat.com>
5591
5592 PR sanitizer/65280
5593 * c-ubsan.c (ubsan_instrument_bounds): Check for COMPONENT_REF
5594 before trying to figure out whether we have a flexible array member.
5595
a4e26206 55962015-03-06 Eric Botcazou <ebotcazou@adacore.com>
8e745a17 5597 Jonathan Wakely <jwakely.gcc@gmail.com>
a4e26206
EB
5598
5599 * c-ada-spec.c (dump_ada_double_name): Fix pasto.
5600
0d2489f4
EB
56012015-03-05 Eric Botcazou <ebotcazou@adacore.com>
5602
5603 PR ada/65319
5604 * c-ada-spec.c (print_destructor): Remove obsolete code.
5605
83ed54d7
EB
56062015-03-01 Eric Botcazou <ebotcazou@adacore.com>
5607
5608 * c-ada-spec.c (is_tagged_type): Add guard for DECL_VINDEX.
5609 (dump_template_types): Adjust DECL_TEMPLATE_INSTANTIATIONS and
5610 DECL_TEMPLATE_RESULT emulations.
5611 (dump_ada_template)): Add guard for TYPE_METHODS.
5612
7631f0e2
MP
56132015-02-27 Marek Polacek <polacek@redhat.com>
5614
5615 PR c/65040
5616 * c.opt (Wformat-signedness): Don't enable by -Wformat=2.
5617
d1783ae5
KT
56182015-02-27 Kai Tietz <ktietz@redhat.com>
5619
5620 PR c/35330
5621 * c-pragma.c (handle_pragma_weak): Do not try to create
5622 weak/alias of declarations not being function, or variable
5623 declarations.
5624
56a9f6bc
TS
56252015-02-24 Thomas Schwinge <thomas@codesourcery.com>
5626
5627 PR libgomp/64625
5628 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5629 Remove macros.
5630 (DEF_FUNCTION_TYPE_VAR_7, DEF_FUNCTION_TYPE_VAR_11): New macros.
5631
3d5cb23d
MP
56322015-02-16 Marek Polacek <polacek@redhat.com>
5633
5634 PR c/65066
5635 * c-format.c (check_format_types): Handle null param.
5636
fa008882
MP
56372015-02-13 Marek Polacek <polacek@redhat.com>
5638
5639 PR c/65040
5640 * c-format.c (check_format_types): Don't warn about different
5641 signedness if the original value is in the range of WANTED_TYPE.
5642
785f21af
JM
56432015-02-12 Jason Merrill <jason@redhat.com>
5644
5645 PR c++/64956
5646 * c-opts.c (c_common_post_options): Change flag_abi_version from 0
5647 to the current highest version.
5648 * c-cppbuiltin.c (c_cpp_builtins): Assert that it isn't 0.
5649
4886ec8e
JJ
56502015-02-04 Jakub Jelinek <jakub@redhat.com>
5651
5652 PR c/64824
5653 PR c/64868
5654 * c-omp.c (c_finish_omp_atomic): Use TRUNC_DIV_EXPR
5655 instead of RDIV_EXPR. Use build_binary_op instead of
5656 build2_loc.
5657
40fecdd6
JM
56582015-01-30 Joseph Myers <joseph@codesourcery.com>
5659
5660 * c-opts.c, c-pch.c, cppspec.c: All callers of fatal_error changed
5661 to pass input_location as first argument.
5662
a0c88d06
TV
56632015-01-23 Tom de Vries <tom@codesourcery.com>
5664
5665 PR libgomp/64672
5666 * c.opt (fopenacc): Mark as LTO option.
5667
1506ae0e
TV
56682015-01-23 Tom de Vries <tom@codesourcery.com>
5669
5670 PR libgomp/64707
5671 * c.opt (fopenmp): Mark as LTO option.
5672
31be63ab
JJ
56732015-01-21 Jakub Jelinek <jakub@redhat.com>
5674
5675 PR c/63307
b1726d6c 5676 * cilk.c (fill_decls_vec): Only put decls into vector v.
31be63ab
JJ
5677 (compare_decls): Fix up formatting.
5678
56792015-01-21 Igor Zamyatin <igor.zamyatin@intel.com>
5680
5681 PR c/63307
5682 * cilk.c: Include vec.h.
5683 (struct cilk_decls): New structure.
5684 (wrapper_parm_cb): Split this function to...
5685 (fill_decls_vec): ...this...
5686 (create_parm_list): ...and this.
5687 (compare_decls): New function.
5688 (for_local_cb): Remove.
5689 (wrapper_local_cb): Ditto.
5690 (build_wrapper_type): For now first traverse and fill vector of
5691 declarations then sort it and then deal with sorted vector.
5692 (cilk_outline): Ditto.
5693 (declare_one_free_variable): Ditto.
5694
6875457f
JM
56952015-01-21 Jason Merrill <jason@redhat.com>
5696
5697 PR c++/64629
5698 * c-format.c (check_format_arg): Call decl_constant_value.
5699
185c9e56
ML
57002015-01-19 Martin Liska <mliska@suse.cz>
5701
5702 * c-common.c (handle_noicf_attribute): New function.
5703
41dbbb37
TS
57042015-01-15 Thomas Schwinge <thomas@codesourcery.com>
5705 Bernd Schmidt <bernds@codesourcery.com>
5706 James Norris <jnorris@codesourcery.com>
5707 Cesar Philippidis <cesar@codesourcery.com>
5708 Ilmir Usmanov <i.usmanov@samsung.com>
5709 Jakub Jelinek <jakub@redhat.com>
5710
5711 * c.opt (fopenacc): New option.
5712 * c-cppbuiltin.c (c_cpp_builtins): Conditionally define _OPENACC.
5713 * c-common.c (DEF_FUNCTION_TYPE_VAR_8, DEF_FUNCTION_TYPE_VAR_12):
5714 New macros.
5715 * c-common.h (c_finish_oacc_wait): New prototype.
5716 * c-omp.c: Include "omp-low.h" and "gomp-constants.h".
5717 (c_finish_oacc_wait): New function.
5718 * c-pragma.c (oacc_pragmas): New variable.
5719 (c_pp_lookup_pragma, init_pragma): Handle it.
5720 * c-pragma.h (enum pragma_kind): Add PRAGMA_OACC_CACHE,
5721 PRAGMA_OACC_DATA, PRAGMA_OACC_ENTER_DATA, PRAGMA_OACC_EXIT_DATA,
5722 PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP, PRAGMA_OACC_PARALLEL,
5723 PRAGMA_OACC_UPDATE, PRAGMA_OACC_WAIT.
5724 (enum pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_ASYNC,
5725 PRAGMA_OACC_CLAUSE_AUTO, PRAGMA_OACC_CLAUSE_COLLAPSE,
5726 PRAGMA_OACC_CLAUSE_COPY, PRAGMA_OACC_CLAUSE_COPYIN,
5727 PRAGMA_OACC_CLAUSE_COPYOUT, PRAGMA_OACC_CLAUSE_CREATE,
5728 PRAGMA_OACC_CLAUSE_DELETE, PRAGMA_OACC_CLAUSE_DEVICE,
5729 PRAGMA_OACC_CLAUSE_DEVICEPTR, PRAGMA_OACC_CLAUSE_FIRSTPRIVATE,
5730 PRAGMA_OACC_CLAUSE_GANG, PRAGMA_OACC_CLAUSE_HOST,
5731 PRAGMA_OACC_CLAUSE_IF, PRAGMA_OACC_CLAUSE_NUM_GANGS,
5732 PRAGMA_OACC_CLAUSE_NUM_WORKERS, PRAGMA_OACC_CLAUSE_PRESENT,
5733 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPY,
5734 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYIN,
5735 PRAGMA_OACC_CLAUSE_PRESENT_OR_COPYOUT,
5736 PRAGMA_OACC_CLAUSE_PRESENT_OR_CREATE, PRAGMA_OACC_CLAUSE_PRIVATE,
5737 PRAGMA_OACC_CLAUSE_REDUCTION, PRAGMA_OACC_CLAUSE_SELF,
5738 PRAGMA_OACC_CLAUSE_SEQ, PRAGMA_OACC_CLAUSE_VECTOR,
5739 PRAGMA_OACC_CLAUSE_VECTOR_LENGTH, PRAGMA_OACC_CLAUSE_WAIT,
5740 PRAGMA_OACC_CLAUSE_WORKER.
5741
3f8257db 57422015-01-14 Marcos Diaz <marcos.diaz@tallertechnologies.com>
5434dc07
MD
5743
5744 * c-cppbuiltin.c (c_cpp_builtins): New cpp define __SSP_EXPLICIT__
5745 for the new option fstack-protector_explicit.
5746 * c-common.c (c_common_attribute_table): Add stack_protect attribute.
5747 (handle_stack_protect_attribute): New function.
5748
3f8257db 57492015-01-13 Martin Uecker <uecker@eecs.berkeley.edu>
de1b5c17
MU
5750
5751 * c.opt: New option -Warray-bounds=.
5752
adfac8df
JJ
57532015-01-09 Michael Collison <michael.collison@linaro.org>
5754
5755 * array-notation-common.c: Include hash-set.h, machmode.h,
5756 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5757 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
5758 * c-ada-spec.c: Ditto.
5759 * c-cilkplus.c: Ditto.
5760 * c-common.c: Include input.h due to flattening of tree.h.
5761 Define macro GCC_C_COMMON_C.
5762 * c-common.h: Flatten tree.h header files into c-common.h.
5763 Remove include of tree-core.h.
5764 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5765 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5766 fold-const.h, wide-int.h, and inchash.h due to
5767 flattening of tree.h.
5768 * c-dump.c: Ditto.
5769 * c-format.c: Flatten tree.h header files into c-common.h.
5770 * c-cppbuiltin.c: Include hash-set.h, machmode.h,
5771 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5772 fold-const.h, wide-int.h, and inchash.h due to
5773 flattening of tree.h.
5774 * c-dump.c: Include hash-set.h, machmode.h,
5775 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5776 fold-const.h, wide-int.h, and inchash.h due to
5777 flattening of tree.h.
5778 * c-format.c: Include hash-set.h, machmode.h,
5779 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5780 fold-const.h, wide-int.h, inchash.h and real.h due to
5781 flattening of tree.h.
5782 * c-gimplify.c: Include hash-set.h, machmode.h,
5783 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
5784 fold-const.h, wide-int.h, and inchash.h due to
5785 flattening of tree.h.
5786 * cilk.c: Ditto.
5787 * c-lex.c: Ditto.
5788 * c-omp.c: Ditto.
5789 * c-opts.c: Ditto.
5790 * c-pch.c: Ditto.
5791 * c-ppoutput.c: Ditto.
5792 * c-pragma.c: Ditto.
5793 * c-pretty-print.c: Ditto.
5794 * c-semantics.c: Ditto.
5795 * c-ubsan.c: Ditto.
5796 * stub-objc.c: Ditto.
5797
f5481fc4
JM
57982015-01-08 Jason Merrill <jason@redhat.com>
5799
5800 * c-ubsan.c (ubsan_maybe_instrument_array_ref): Use
5801 do_ubsan_in_current_function.
5802 (ubsan_maybe_instrument_reference_or_call): Likewise.
5803 * c-ubsan.h: Declare it.
5804
de35aa66
MS
58052015-01-08 Mike Stump <mikestump@comcast.net>
5806
5807 * c-common.c (c_common_attribute_table): Add no_sanitize_thread.
5808
4a9a42ab
MP
58092015-01-07 Marek Polacek <polacek@redhat.com>
5810
5811 PR c/64440
5812 * c-common.c (c_fully_fold_internal): Warn for division and modulo
5813 if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST and is zero.
5814
2f42e5de
TS
58152015-01-05 Trevor Saunders <tsaunders@mozilla.com>
5816
5817 PR c++/31397
5818 * c.opt (Wsuggest-override): New option.
5819
5624e564
JJ
58202015-01-05 Jakub Jelinek <jakub@redhat.com>
5821
5822 Update copyright years.
5823
5bd012f8
MP
58242015-01-05 Marek Polacek <polacek@redhat.com>
5825
5826 PR c/64423
5827 * c-common.c (warn_array_subscript_with_type_char): Add location_t
5828 parameter. Use it.
5829 * c-common.h (warn_array_subscript_with_type_char): Update
5830 declaration.
5831
a7fa8d18
ESR
58322014-12-20 Edward Smith-Rowland <3dw4rd@verizon.net>
5833
5834 * c-cppbuiltin.c (__cpp_sized_deallocation): Uncomment and move macro.
5835 Control macro with flag_sized_deallocation.
5836
3f8257db 58372014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
768952be
MU
5838
5839 * c.opt (Wdiscarded-array-qualifiers): New option.
5840
1f8d3e84
JJ
58412014-12-19 Jakub Jelinek <jakub@redhat.com>
5842
5843 PR preprocessor/63831
5844 * c-cppbuiltin.c (c_cpp_builtins): Don't define __has_attribute
5845 and __has_cpp_attribute here.
5846 * c-ppoutput.c (init_pp_output): Set cb->has_attribute to
5847 c_common_has_attribute.
5848 * c-common.h (c_common_has_attribute): New prototype.
5849 * c-lex.c (init_c_lex): Set cb->has_attribute to
5850 c_common_has_attribute instead of cb_has_attribute.
5851 (get_token_no_padding): New function.
5852 (cb_has_attribute): Renamed to ...
5853 (c_common_has_attribute): ... this. No longer static. Use
5854 get_token_no_padding, require ()s, don't build TREE_LIST
5855 unnecessarily, fix up formatting, adjust diagnostics, call
5856 init_attributes.
5857
20b06add
JM
58582014-12-15 Jason Merrill <jason@redhat.com>
5859
5860 * c.opt (-fsized-deallocation, -Wc++14-compat): New.
5861 (-Wsized-deallocation): New.
5862 * c-opts.c (c_common_post_options): -fsized-deallocation defaults
5863 to on in C++14 and up.
5864
94a073b2
JM
58652014-12-11 Jason Merrill <jason@redhat.com>
5866
acaa5911
JM
5867 * c-cppbuiltin.c (c_cpp_builtins): Enable C++14 __cpp_constexpr.
5868
94a073b2
JM
5869 * c-cppbuiltin.c (c_cpp_builtins): Define __cpp_runtime_arrays if
5870 we aren't complaining about VLAs.
5871
7fb66c15
MP
58722014-12-06 Marek Polacek <polacek@redhat.com>
5873
5874 PR tree-optimization/64183
5875 * c-gimplify.c (c_gimplify_expr): Don't convert the RHS of a
5876 shift-expression if it is integer_type_node. Use types_compatible_p.
5877
b731b390
JJ
58782014-11-29 Jakub Jelinek <jakub@redhat.com>
5879
5880 * c-common.c (convert_vector_to_pointer_for_subscript): Remove NULL
5881 last argument from create_tmp_var_raw and create_tmp_var calls.
5882 * cilk.c (gimplify_cilk_spawn): Likewise.
5883 * c-omp.c (c_finish_omp_atomic): Likewise.
5884
6a4da643
MP
58852014-11-28 Marek Polacek <polacek@redhat.com>
5886
5887 * c-ubsan.c (ubsan_instrument_shift): Use op1_utype for MINUS_EXPR
5888 instead of unsigned_type_node.
5889
541e35a6
MP
58902014-11-28 Marek Polacek <polacek@redhat.com>
5891
5892 PR c/63862
5893 * c-ubsan.c (ubsan_instrument_shift): Change the type of a MINUS_EXPR
5894 to op1_utype.
5895 * c-gimplify.c (c_gimplify_expr): Convert right operand of a shift
5896 expression to unsigned_type_node.
5897
dcc97066
MW
58982014-11-20 Mark Wielaard <mjw@redhat.com>
5899
5900 PR debug/38757
5901 * c-opts.c (set_std_c89): Set lang_hooks.name.
5902 (set_std_c99): Likewise.
5903 (set_std_c11): Likewise.
5904 (set_std_cxx98): Likewise.
5905 (set_std_cxx11): Likewise.
5906 (set_std_cxx14): Likewise.
5907 (set_std_cxx1z): Likewise.
5908
aa7da51a
JJ
59092014-11-21 Jakub Jelinek <jakub@redhat.com>
5910
5911 PR target/63764
5912 * c-common.h (convert_vector_to_pointer_for_subscript): Change
5913 return type to bool.
009a3480 5914 * c-common.c: Include gimple-expr.h.
aa7da51a
JJ
5915 (convert_vector_to_pointer_for_subscript): Change return type to
5916 bool. If *vecp is not lvalue_p and has VECTOR_TYPE, return true
5917 and copy it into a TARGET_EXPR and use that instead of *vecp
5918 directly.
5919
538dd0b7
DM
59202014-11-19 David Malcolm <dmalcolm@redhat.com>
5921
5922 Merger of git branch "gimple-classes-v2-option-3".
5923 * ChangeLog.gimple-classes: New.
5924 * c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
5925 from being just a vec<gimple> to a vec<gbind *>.
5926
c39a5e99
JJ
59272014-11-18 Jakub Jelinek <jakub@redhat.com>
5928
5929 PR sanitizer/63813
5930 * c-ubsan.c (ubsan_maybe_instrument_reference_or_call): Change type
5931 argument to ptype, set type to TREE_TYPE (ptype). Don't call
5932 get_pointer_alignment for non-pointers. Use ptype, or if it is
5933 reference type, corresponding pointer type, as type of kind
5934 argument.
5935 (ubsan_maybe_instrument_reference,
5936 ubsan_maybe_instrument_member_call): Adjust callers.
5937
8537a4a9
MP
59382014-11-15 Marek Polacek <polacek@redhat.com>
5939
5940 PR middle-end/63884
5941 * array-notation-common.c (is_sec_implicit_index_fn): Return false
5942 for NULL fndecl.
5943 (extract_array_notation_exprs): Return for NULL node.
5944
2079956a
JM
59452014-11-12 Joseph Myers <joseph@codesourcery.com>
5946
5947 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Define and
5948 undefine __NO_MATH_ERRNO__ based on changes to -fmath-errno state.
5949
1304953e
JJ
59502014-11-12 Jakub Jelinek <jakub@redhat.com>
5951
5952 PR c/59708
5953 * c-common.c (check_builtin_function_arguments): Handle
5954 BUILT_IN_{ADD,SUB,MUL}_OVERFLOW.
5955
e5e44252
AK
59562014-11-10 Andi Kleen <ak@linux.intel.com>
5957
5958 PR c/60804
5959 * c-common.h (check_no_cilk): Declare.
5960 * cilk.c (get_error_location): New function.
5961 (check_no_cilk): Dito.
5962
e64b984d
AK
59632014-11-10 Andi Kleen <ak@linux.intel.com>
5964
5965 * cilk.c (recognize_spawn): Use expression location
5966 for error message.
5967
13c21655
PC
59682014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
5969
5970 * c.opt ([Wshift-count-negative, Wshift-count-overflow]): Add.
5971
42fd12b1
ESR
59722014-11-10 Edward Smith-Rowland <3dw4rd@verizon.net>
5973
5974 * c-cppbuiltin.c (__has_attribute, __has_cpp_attribute): New macros;
5975 (__cpp_rtti, __cpp_exceptions): New macros for C++98;
5976 (__cpp_range_based_for, __cpp_initializer_lists,
5977 __cpp_delegating_constructors, __cpp_nsdmi,
5978 __cpp_inheriting_constructors, __cpp_ref_qualifiers): New macros
5979 for C++11; (__cpp_attribute_deprecated): Remove in favor of
5980 __has_cpp_attribute.
5981 * c-lex.c (cb_has_attribute): New callback CPP function;
5982 (init_c_lex): Set has_attribute callback.
5983
6f450181
RB
59842014-11-04 Richard Biener <rguenther@suse.de>
5985
5986 * c-common.c (shorten_compare): Do not shorten mixed
5987 DFP and non-DFP compares.
5988
26f0e1d6
ESR
59892014-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
5990
5991 * g++.dg/cpp1y/feat-cxx11.C: Commentary and rearrangement of tests.
5992 * g++.dg/cpp1y/feat-cxx11-neg.C: Add aggregate NSDMI test.
5993 Commentary and rearrangement of tests.
5994 * g++.dg/cpp1y/feat-cxx14.C: Enable aggregate NSDMI test.
5995 Commentary and rearrangement of tests.
ab20d992 5996 * g++.dg/cpp1y/feat-cxx98-neg.C: Ditto.
26f0e1d6
ESR
5997 * g++.dg/cpp1y/feat-cxx98.C: Commentary.
5998
ef4bddc2
RS
59992014-10-29 Richard Sandiford <richard.sandiford@arm.com>
6000
6001 * c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
6002 enum from machine_mode.
6003
c582198b
AM
60042014-10-28 Andrew MacLeod <amacleod@redhat.com>
6005
adfac8df
JJ
6006 * c-common.c: Adjust include files.
6007 * c-gimplify.c: Ditto.
6008 * cilk.c: Ditto.
6009 * c-pragma.c: Ditto.
6010 * c-ubsan.c: Ditto.
c582198b 6011
60393bbc
AM
60122014-10-27 Andrew MacLeod <amacleod@redhat.com>
6013
6014 * c-gimplify.c: Adjust include files.
6015
d723bb7c
MLI
60162014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
6017
6018 PR c++/53061
6019 * c-opts.c (c_common_diagnostics_set_defaults): Renamed from
6020 c_common_initialize_diagnostics.
6021 * c-common.h: Likewise.
6022
90f3520e
MP
60232014-10-24 Marek Polacek <polacek@redhat.com>
6024
6025 PR c/56980
6026 * c-pretty-print.c (c_pretty_printer::simple_type_specifier): Don't
6027 print "struct"/"union"/"enum" for typedefed names.
6028
59d7607a
MP
60292014-10-23 Marek Polacek <polacek@redhat.com>
6030
6031 * c-ubsan.c (ubsan_instrument_shift): Perform the MINUS_EXPR
6032 in unsigned type.
6033
d95a2703
JJ
60342014-10-22 Jakub Jelinek <jakub@redhat.com>
6035 Yury Gribov <y.gribov@samsung.com>
6036
6037 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6038 ubsan_instrument_vla): Check bits in flag_sanitize_recover bitmask
6039 instead of flag_sanitize_recover as bool flag.
6040
8e6ef852
KY
60412014-10-21 Kirill Yukhin <kirill.yukhin@intel.com>
6042
6043 * cilk.c: Revert previous change.
6044
948cf550
IZ
60452014-10-20 Igor Zamyatin <igor.zamyatin@intel.com>
6046
6047 PR c/63307
6048 * cilk.c: Include vec.h.
6049 (struct cilk_decls): New structure.
6050 (wrapper_parm_cb): Split this function to...
6051 (fill_decls_vec): ...this...
6052 (create_parm_list): ...and this.
6053 (compare_decls): New function.
6054 (for_local_cb): Remove.
6055 (wrapper_local_cb): Ditto.
6056 (build_wrapper_type): For now first traverse and fill vector of
6057 declarations then sort it and then deal with sorted vector.
6058 (cilk_outline): Ditto.
6059 (declare_one_free_variable): Ditto.
6060
92574c7c
MP
60612014-10-17 Marek Polacek <polacek@redhat.com>
6062
6063 * c-opts.c (c_common_post_options): Set warn_implicit_int.
6064 * c.opt (Wimplicit-int): Initialize to -1.
6065
83685514
AM
60662014-10-16 Andrew MacLeod <amacleod@redhat.com>
6067
6068 * c-pragma.c: Adjust include files.
6069 * c-semantics.c: Likewise.
6070
5b8300ea
DD
60712014-10-16 DJ Delorie <dj@redhat.com>
6072
6073 * c-cppbuiltin.c (cpp_atomic_builtins): Don't assume pointers are
6074 multiples of bytes.
6075
5f83e90b
JM
60762014-10-14 Jason Merrill <jason@redhat.com>
6077
6078 PR c++/63455
6079 * c-common.h (CPP_PREPARSED_EXPR): New.
6080 (N_CP_TTYPES): Adjust.
6081
d73326ca
MP
60822014-10-15 Marek Polacek <polacek@redhat.com>
6083
6084 * c-opts.c (c_common_init_options): Make -std=gnu11 the default for C.
6085
78a7c317
DD
60862014-10-14 DJ Delorie <dj@redhat.com>
6087
6088 * c-pretty-print.c (pp_c_integer_constant): Check for all __intN
6089 types, not just __int128.
6090 * c-cppbuiltin.c (c_cpp_builtins): Add builtins for all __intN
6091 types, not just __int128.
6092 (cpp_atomic_builtins): Round pointer sizes up.
6093 (type_suffix): Use type precision, not specific types.
6094 * c-common.c (c_common_reswords): Remove __int128 special case.
6095 (c_common_type_for_size): Check for all __intN types, not just
6096 __int128.
6097 (c_common_type_for_mode): Likewise.
6098 (c_common_signed_or_unsigned_type): Likewise.
6099 (c_build_bitfield_integer_type): Likewise.
6100 (c_common_nodes_and_builtins): Likewise.
6101 (keyword_begins_type_specifier): Likewise.
6102 * c-common.h (rid): Remove RID_INT128 and add RID_INT_N_* for all
6103 __intN variants.
6104
2a22f99c
TS
61052014-10-12 Trevor Saunders <tsaunders@mozilla.com>
6106
6107 * c-common.c: Use hash_table instead of hashtab.
6108
2a8ef767
ESR
61092014-10-06 Edward Smith-Rowland <3dw4rd@verizon.net>
6110
adfac8df 6111 * c-cppbuiltin.c: Move __cpp_attribute_deprecated to the
2a8ef767
ESR
6112 C++11 section.
6113
3c9aabbd
MG
61142014-10-03 Marc Glisse <marc.glisse@inria.fr>
6115
6116 PR c++/54427
6117 PR c++/57198
6118 PR c++/58845
6119 * c-common.c (warn_logical_operator): Punt for vectors.
6120
a15f7cb8
ESR
61212014-10-01 Edward Smith-Rowland <3dw4rd@verizon.net>
6122
6123 Implement SD-6: SG10 Feature Test Recommendations
6124 * c-cppbuiltin.c (c_cpp_builtins()): Define language feature
6125 macros and the __has_header macro.
6126
8d0cf15e
JM
61272014-09-30 Jason Merrill <jason@redhat.com>
6128
dd5d5481
JM
6129 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_ASSIGNABLE and
6130 RID_IS_TRIVIALLY_CONSTRUCTIBLE.
6131 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6132
b752325e
JM
6133 * c-common.h (enum rid): Add RID_IS_TRIVIALLY_COPYABLE.
6134 * c-common.c (c_common_reswords): Add __is_trivially_copyable.
6135
8d0cf15e
JM
6136 * c-common.h (enum rid): Remove RID_IS_CONVERTIBLE_TO.
6137 * c-common.c (c_common_reswords): Remove __is_convertible_to.
6138
083e891e
MP
61392014-09-24 Marek Polacek <polacek@redhat.com>
6140
6141 PR c/61405
6142 PR c/53874
6143 * c-common.h (struct c_common_resword): Don't define CPP_KEYWORD.
6144
7861b648
AK
61452014-09-23 Andi Kleen <ak@linux.intel.com>
6146
6147 * c-common.c (handle_no_reorder_attribute): New function.
6148 (c_common_attribute_table): Add no_reorder attribute.
6149
9a79452d
JM
61502014-09-22 Joseph Myers <joseph@codesourcery.com>
6151
6152 * c-cppbuiltin.c (c_cpp_builtins): Define
6153 __LIBGCC_*_EXCESS_PRECISION__ macros for supported floating-point
6154 modes.
6155
dd69f047
JM
61562014-09-18 Joseph Myers <joseph@codesourcery.com>
6157
6158 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_*_FUNC_EXT__
6159 for supported floating-point modes.
6160
737a4826
MLI
61612014-09-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6162
6163 * c.opt (Wpsabi): Use LangEnabledBy.
6164 * c-opts.c (c_common_handle_option): Do not handle here.
6165
8cc4b7a2
JM
61662014-09-12 Joseph Myers <joseph@codesourcery.com>
6167
6168 * c-cppbuiltin.c (c_cpp_builtins): Define __LIBGCC_HAS_%s_MODE__
6169 macros for floating-point modes.
6170
179b5a55
MG
61712014-09-11 Marc Glisse <marc.glisse@inria.fr>
6172
6173 PR target/58757
6174 * c-cppbuiltin.c (builtin_define_float_constants): Correct
6175 __*_DENORM_MIN__ without denormals.
6176
570a11fe
JJ
61772014-09-10 Jakub Jelinek <jakub@redhat.com>
6178
6179 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6180 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6181 ubsan_create_data callers.
6182 (ubsan_instrument_bounds): Don't emit UBSAN_BOUNDS at all if
6183 index is constant or BIT_AND_EXPR with constant mask and is
6184 small enough for the bound.
6185 * c-gimplify.c (ubsan_walk_array_refs_r): For ADDR_EXPR of
6186 ARRAY_REF, make sure the inner ARRAY_REF is not walked again.
6187
b559c810
MLI
61882014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6189
6190 * c.opt: Add CppReason to various flags.
6191 (Wdate-time): Re-sort.
6192 * c-common.c: Include c-common.h earlier.
6193 (struct reason_option_codes_t): Delete.
6194 (c_option_controlling_cpp_error): Prefix global type and struct
6195 with cpp_.
6196
1ef33fd4
MLI
61972014-09-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
6198
6199 * c.opt (Wnormalized): New.
6200 (Wnormalized=): Use Enum and Reject Negative.
6201 * c-opts.c (c_common_handle_option): Do not handle Wnormalized here.
6202
66bb34c0
JM
62032014-09-08 Joseph Myers <joseph@codesourcery.com>
6204
6205 * c-cppbuiltin.c (c_cpp_builtins): Define macros for mantissa
6206 digits of floating-point modes if -fbuilding-libgcc.
6207
53d68b9f
JM
62082014-09-05 Joseph Myers <joseph@codesourcery.com>
6209
6210 * c-cppbuiltin.c (c_cpp_builtins): Also define
6211 __LIBGCC_EH_TABLES_CAN_BE_READ_ONLY__,
6212 __LIBGCC_EH_FRAME_SECTION_NAME__, __LIBGCC_JCR_SECTION_NAME__,
6213 __LIBGCC_CTORS_SECTION_ASM_OP__, __LIBGCC_DTORS_SECTION_ASM_OP__,
6214 __LIBGCC_TEXT_SECTION_ASM_OP__, __LIBGCC_INIT_SECTION_ASM_OP__,
6215 __LIBGCC_INIT_ARRAY_SECTION_ASM_OP__,
6216 __LIBGCC_STACK_GROWS_DOWNWARD__,
6217 __LIBGCC_DONT_USE_BUILTIN_SETJMP__,
6218 __LIBGCC_DWARF_ALT_FRAME_RETURN_COLUMN__,
6219 __LIBGCC_DWARF_FRAME_REGISTERS__,
6220 __LIBGCC_EH_RETURN_STACKADJ_RTX__, __LIBGCC_JMP_BUF_SIZE__,
6221 __LIBGCC_STACK_POINTER_REGNUM__ and
6222 __LIBGCC_VTABLE_USES_DESCRIPTORS__ for -fbuilding-libgcc.
6223 (builtin_define_with_value): Handle backslash-escaping in string
6224 macro values.
6225
f65586dc
RB
62262014-09-05 Richard Biener <rguenther@suse.de>
6227
6228 PR middle-end/63148
6229 * c-format.c (check_format_arg): Properly handle
6230 effectively signed POINTER_PLUS_EXPR offset.
6231
2b71f4a4
MLI
62322014-09-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
6233
6234 * c.opt (Wc90-c99-compat,Wc++-compat,Wcomment,Wendif-labels,
6235 Winvalid-pch,Wlong-long,Wmissing-include-dirs,Wmultichar,Wpedantic,
6236 (Wdate-time,Wtraditional,Wundef,Wvariadic-macros): Add CPP, Var
6237 and Init.
6238 * c-opts.c (c_common_handle_option): Do not handle here.
6239 (sanitize_cpp_opts): Likewise.
6240 * c-common.c (struct reason_option_codes_t): Handle
6241 CPP_W_C90_C99_COMPAT and CPP_W_PEDANTIC.
6242
d2e4feca
MP
62432014-09-03 Marek Polacek <polacek@redhat.com>
6244
6245 * c.opt (Wlogical-not-parentheses): Enable by -Wall.
6246
9a771876
JJ
62472014-09-02 Jakub Jelinek <jakub@redhat.com>
6248 Balaji V. Iyer <balaji.v.iyer@intel.com>
6249 Igor Zamyatin <igor.zamyatin@intel.com>
6250
6251 * c-cilkplus.c (cilk_for_number_of_iterations): New function.
6252 * c-common.c (c_common_reswords): Added _Cilk_for.
6253 * c-common.h (enum rid): Added RID_CILK_FOR.
6254 (cilk_for_number_of_iterations): Add declaration.
6255 * c-omp.c (c_finish_omp_for): Added checks for CILK_SIMD and
6256 CILK_FOR.
6257 * c-pragma.c (init_pragma): Register "grainsize" pragma.
6258 * c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_GRAINSIZE.
6259
81b5d104
MLI
62602014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6261
6262 * c.opt (Wbuiltin-macro-redefined,Wdeprecated,Wendif-labels,
6263 Winvalid-pch,Wliteral-suffix,Wmissing-include-dirs,Wtrigraphs,
6264 Wundef): Use CPP, Var and Init.
6265 * c-opts.c (c_common_handle_option): Do not handle the above flags here.
6266
b753b37b
MLI
62672014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
6268
6269 * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init.
6270 * c-opts.c (c_common_handle_option): Do not handle here.
6271
028aee17
JM
62722014-08-25 Jason Merrill <jason@redhat.com>
6273
6274 * c.opt: Change -std=c++1y and -std=gnu++1y to be aliases for
6275 -std=c++14 and -std=gnu++14, rather than the reverse.
6276 * c-opts.c (c_common_handle_option): Change OPT_std_c__1y and
6277 OPT_std_gnu__1y to OPT_std_c__14 and OPT_std_gnu__14.
6278 * c-common.h (cxx_dialect): Remove cxx1y.
6279
e4276ba5
ESR
62802014-08-23 Edward Smith-Rowland <3dw4rd@verizon.net>
6281
6282 * c-common.h (enum cxx_dialect): Add cxx14.
6283 * c-opts.c (set_std_cxx1y): Rename to set_std_cxx14; Use cxx14.
6284 * c-ubsan.c (ubsan_instrument_shift): Change comment and logic from
6285 cxx_dialect == cxx11 || cxx_dialect == cxx1y to cxx_dialect >= cxx11.
6286
a545cacd
JM
62872014-08-22 Jason Merrill <jason@redhat.com>
6288
6289 * c.opt (std=gnu++17): Fix alias.
6290
59ea0364
MP
62912014-08-22 Marek Polacek <polacek@redhat.com>
6292
6293 PR c++/62199
6294 * c-common.c (warn_logical_not_parentheses): Don't check LHS. Don't
6295 check for vector types. Drop LHS argument.
6296 * c-common.h (warn_logical_not_parentheses): Adjust.
6297
596e808c
MLI
62982014-08-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
6299
6300 * c.opt (Wcomment): Use CPP, Var and LangEnabledBy.
6301 (Wmultichar): Likewise.
6302 (Wdate-time): Use C-family languages instead of Common. Use CPP
6303 and Var.
6304 * c-opts.c (c_common_handle_option): Do not handle the above
6305 options here.
6306 (sanitize_cpp_opts): Likewise.
6307
18767f65
MLI
63082014-08-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
6309
6310 PR fortran/44054
6311 * c-opts.c: Include tree-diagnostics.h.
6312 (c_diagnostic_finalizer): New.
6313 (c_common_initialize_diagnostics): Use it.
6314
b4413594
MLI
63152014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6316
6317 PR preprocessor/51303
6318 * c-common.c (struct reason_option_codes_t option_codes):
6319 Add CPP_W_MISSING_INCLUDE_DIRS. Sort alphabetically.
6320
43f9a13c
MLI
63212014-08-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
6322
6323 PR c/60975
6324 PR c/53063
6325 * c.opt (Wvariadic-macros): Use CPP and LangEnabledBy.
6326 * c-opts.c (c_common_handle_option): Call cpp_handle_option_auto.
6327 (c_common_post_options): Call init_global_opts_from_cpp.
6328 (sanitize_cpp_opts): Do not handle Wvariadic-macros here.
6329
04159acf
MP
63302014-08-19 Marek Polacek <polacek@redhat.com>
6331
6332 PR c++/62153
6333 * c-common.c (maybe_warn_bool_compare): New function.
6334 * c-common.h (maybe_warn_bool_compare): Declare.
6335 * c.opt (Wbool-compare): New option.
6336
35aff4fb
MP
63372014-08-19 Marek Polacek <polacek@redhat.com>
6338
6339 * c.opt (Wc99-c11-compat): New option.
6340
177cce46
MP
63412014-08-19 Marek Polacek <polacek@redhat.com>
6342
6343 * c-opts.c (sanitize_cpp_opts): Make warn_long_long be set according
6344 to warn_c90_c99_compat.
6345 * c.opt (Wc90-c99-compat, Wdeclaration-after-statement): Initialize
6346 to -1.
6347
6ae9194f
MLI
63482014-08-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
6349 Steven Bosscher <steven@gcc.gnu.org>
6350
6351 PR c/52952
6352 * c-format.c: Add extra_arg_loc and format_string_loc to struct
6353 format_check_results.
6354 (check_function_format): Use true and add comment for boolean
6355 argument.
6356 (finish_dollar_format_checking): Use explicit location when warning.
6357 (check_format_info): Likewise.
6358 (check_format_arg): Set extra_arg_loc and format_string_loc.
6359 (check_format_info_main): Use explicit location when warning.
6360 (check_format_types): Pass explicit location.
6361 (format_type_warning): Likewise.
6362
8e54f6d3
MLI
63632014-08-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
6364
6365 PR fortran/44054
6366 * c-format.c: Handle Fortran flags.
6367
cd4e76fc
IZ
63682014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
6369
6370 PR other/61962
6371 * array-notation-common.c (find_rank): Added handling for other
6372 types of references.
6373
f3bede71
MP
63742014-08-10 Marek Polacek <polacek@redhat.com>
6375
6376 PR c/51849
6377 * c-opts.c (sanitize_cpp_opts): Pass warn_c90_c99_compat to libcpp.
6378 * c.opt (Wc90-c99-compat): Add option.
6379
9f25a338
TS
63802014-08-07 Trevor Saunders <tsaunders@mozilla.com>
6381
6382 * c-gimplify.c, cilk.c: Remove includes of pointer-set.h.
6383
62e4eb35
MP
63842014-08-03 Marek Polacek <polacek@redhat.com>
6385
ab20d992 6386 * c-common.c (check_case_value): Add location_t parameter. Use it.
62e4eb35
MP
6387 (c_add_case_label): Pass loc to check_case_value.
6388
b787e7a2
TS
63892014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6390
6391 * cilk.c: Use hash_map instead of pointer_map.
6392
6e2830c3
TS
63932014-08-02 Trevor Saunders <tsaunders@mozilla.com>
6394
6395 * c-gimplify.c: Use hash_set instead of pointer_set.
6396
a7ee52fb
IZ
63972014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
6398
6399 PR middle-end/61455
6400 * array-notation-common.c (extract_array_notation_exprs): Handling
6401 of DECL_EXPR added.
6402
944fa280
JJ
64032014-08-01 Jakub Jelinek <jakub@redhat.com>
6404
6405 * c-common.h (min_align_of_type): Removed prototype.
6406 * c-common.c (min_align_of_type): Removed.
6407 * c-ubsan.h (ubsan_maybe_instrument_reference,
6408 ubsan_maybe_instrument_member_call): New prototypes.
6409 * c-ubsan.c: Include stor-layout.h and builtins.h.
6410 (ubsan_maybe_instrument_reference_or_call,
6411 ubsan_maybe_instrument_reference, ubsan_maybe_instrument_call): New
6412 functions.
6413
b4dfdc11
MG
64142014-07-31 Marc Glisse <marc.glisse@inria.fr>
6415
6416 PR c++/60517
6417 * c.opt (-Wreturn-local-addr): Move to common.opt.
6418
a41844e5
JM
64192014-07-30 Jason Merrill <jason@redhat.com>
6420
6421 PR c++/61659
6422 PR c++/61687
6423 Revert:
6424 * c.opt (-fuse-all-virtuals): New.
6425
976d5a22
TT
64262014-07-30 Tom Tromey <tromey@redhat.com>
6427
6428 PR c/59855
6429 * c.opt (Wdesignated-init): New option.
6430 * c-common.c (c_common_attribute_table): Add "designated_init".
6431 (handle_designated_init): New function.
6432
cdc94aca
MP
64332014-07-24 Marek Polacek <polacek@redhat.com>
6434
6435 PR c/57653
6436 * c-opts.c (c_finish_options): If -imacros is in effect, return.
6437
f41373b6
DS
64382014-07-16 Dodji Seketeli <dodji@redhat.com>
6439
6440 PR preprocessor/60723 - missing system-ness marks for macro tokens
6441 * c-ppoutput.c (struct print::prev_was_system_token): New data
6442 member.
6443 (init_pp_output): Initialize it.
6444 (maybe_print_line_1, maybe_print_line, print_line_1, print_line)
6445 (do_line_change): Return a flag saying if a line marker was
6446 emitted or not.
6447 (scan_translation_unit): Detect if the system-ness of the token we
6448 are about to emit is different from the one of the previously
6449 emitted token. If so, emit a line marker. Avoid emitting useless
6450 adjacent line markers. Avoid emitting line markers for tokens
6451 originating from the expansion of built-in macros.
6452 (scan_translation_unit_directives_only): Adjust.
6453
4d661eaa
MP
64542014-07-15 Marek Polacek <polacek@redhat.com>
6455
6456 * c-ubsan.c (ubsan_instrument_bounds): Don't instrument if
6457 TYPE_MAX_VALUE is NULL.
6458
b108f48f
JJ
64592014-07-14 Jakub Jelinek <jakub@redhat.com>
6460
6461 PR middle-end/61294
6462 * c.opt (Wmemset-transposed-args): New warning.
6463
c0221884
JM
64642014-07-10 Jason Merrill <jason@redhat.com>
6465
6466 PR c++/61659
6467 PR c++/61687
6468 * c.opt (-fuse-all-virtuals): New.
6469
63dfbb95
RB
64702014-07-09 Richard Biener <rguenther@suse.de>
6471
6472 PR c-family/61741
6473 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
6474 using unsigned arithmetic if overflow does not wrap instead of
6475 if overflow is undefined.
6476
773ec47f
MP
64772014-07-06 Marek Polacek <polacek@redhat.com>
6478
6479 PR c/6940
6480 * c.opt (Wsizeof-array-argument): New option.
6481
00a7ba58
JJ
64822014-07-03 Jakub Jelinek <jakub@redhat.com>
6483
b1726d6c 6484 * c-ada-spec.c (dump_ada_nodes): Don't call qsort if
00a7ba58
JJ
6485 comments->count <= 1, as comments->entries might be NULL.
6486
52ec0ea3
MP
64872014-07-01 Marek Polacek <polacek@redhat.com>
6488
6489 * c.opt (Wint-conversion): New option.
6490
d5c3d343
MP
64912014-07-01 Marek Polacek <polacek@redhat.com>
6492
6493 PR c/58286
6494 * c.opt (Wincompatible-pointer-types): New option.
6495
6e7ceb17
PC
64962014-06-30 Paolo Carlini <paolo.carlini@oracle.com>
6497
6498 PR c++/51400
6499 * c-common.c (handle_noreturn_attribute, handle_const_attribute):
6500 Do not discard TYPE_QUALS of type.
6501
da73100b
JM
65022014-06-26 Jason Merrill <jason@redhat.com>
6503
6504 * c-common.h (enum cxx_dialect): Add cxx1z.
6505 * c.opt (std=c++1z, std=c++17, std=gnu++1z, std=gnu++17): New.
6506 * c-opts.c (c_common_handle_option, set_std_cxx1z): Handle it.
6507
08eedf75
TJ
65082014-06-26 Teresa Johnson <tejohnson@google.com>
6509
6510 * c-common.h (get_dump_info): Declare.
6511 * c-gimplify.c (c_genericize): Use saved dump files.
6512 * c-opts.c (c_common_parse_file): Begin and end dumps
6513 once around parsing invocation.
6514 (get_dump_info): New function.
6515
7b56b2f8
MP
65162014-06-23 Marek Polacek <polacek@redhat.com>
6517 Andrew MacLeod <amacleod@redhat.com>
6518
6519 PR c/61553
6520 * c-common.c (get_atomic_generic_size): Don't segfault if the
6521 type doesn't have a size.
6522
0e37a2f3
MP
65232014-06-20 Marek Polacek <polacek@redhat.com>
6524
6525 * c-gimplify.c: Include "c-ubsan.h" and "pointer-set.h".
6526 (ubsan_walk_array_refs_r): New function.
6527 (c_genericize): Instrument array bounds.
6528 * c-ubsan.c: Include "internal-fn.h".
6529 (ubsan_instrument_division): Mark instrumented arrays as having
6530 side effects. Adjust ubsan_type_descriptor call.
6531 (ubsan_instrument_shift): Likewise.
6532 (ubsan_instrument_vla): Adjust ubsan_type_descriptor call.
6533 (ubsan_instrument_bounds): New function.
6534 (ubsan_array_ref_instrumented_p): New function.
6535 (ubsan_maybe_instrument_array_ref): New function.
6536 * c-ubsan.h (ubsan_instrument_bounds): Declare.
6537 (ubsan_array_ref_instrumented_p): Declare.
6538 (ubsan_maybe_instrument_array_ref): Declare.
6539
65402014-06-20 Hale Wang <hale.wang@arm.com>
dd6fe7d4
HW
6541
6542 PR lto/61123
6543 * c.opt (fshort-enums): Add to LTO.
6544 * c.opt (fshort-wchar): Likewise.
6545
5c3d09f7
MP
65462014-06-16 Marek Polacek <polacek@redhat.com>
6547
6548 PR c/60439
6549 * c.opt (Wswitch-bool): Add Var.
6550
9cf32741
JJ
65512014-06-12 Jakub Jelinek <jakub@redhat.com>
6552
6553 PR middle-end/61486
6554 * c-omp.c (c_omp_split_clauses): Don't crash on firstprivate in
6555 #pragma omp target teams or
6556 #pragma omp {,target }teams distribute simd.
6557
62984918
JM
65582014-06-12 Jason Merrill <jason@redhat.com>
6559
6560 * c.opt (Wabi=, fabi-compat-version): New.
6561 * c-opts.c (c_common_handle_option): Handle -Wabi=.
6562 (c_common_post_options): Handle flag_abi_compat_version default.
6563 Disallow -fabi-compat-version=1.
6564 * c-common.h (abi_version_crosses): New.
6565
f961457f
JH
65662014-06-11 Jan Hubicka <hubicka@ucw.cz>
6567
adfac8df 6568 * c-common.c (handle_section_attribute): Update handling for
f961457f
JH
6569 section names that are no longer trees.
6570
92d28cbb
JJ
65712014-06-10 Jakub Jelinek <jakub@redhat.com>
6572
6573 PR fortran/60928
6574 * c-pragma.c (omp_pragmas_simd): Move PRAGMA_OMP_TASK...
6575 (omp_pragmas): ... back here.
6576
742938c9
MP
65772014-06-05 Marek Polacek <polacek@redhat.com>
6578
6579 PR c/49706
6580 * c-common.c (warn_logical_not_parentheses): New function.
6581 * c-common.h (warn_logical_not_parentheses): Declare.
6582 * c.opt (Wlogical-not-parentheses): New option.
6583
9d548dfb
MP
65842014-06-04 Marek Polacek <polacek@redhat.com>
6585
6586 PR c/30020
6587 * c-common.c (check_case_bounds): Add location parameter.
6588 Use it.
6589 (c_add_case_label): Pass loc to check_case_bounds.
6590
fedfecef
MP
65912014-06-03 Marek Polacek <polacek@redhat.com>
6592
6593 PR c/60439
6594 * c.opt (Wswitch-bool): New option.
6595
f6a7cffc
TS
65962014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6597
040d18b6
TS
6598 * c-common.h (c_omp_sharing_predetermined, c_omp_remap_decl):
6599 Remove prototypes.
6600 (record_types_used_by_current_var_decl): Move prototype to where
6601 it belongs.
6602
f6a7cffc
TS
6603 * c-common.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6604 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6605 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6606
632f2871
RS
66072014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
6608
6609 * c-common.h (CTI_VOID_ZERO, void_zero_node): Delete.
6610 * c-common.c (c_common_nodes_and_builtins): Don't initialize
6611 void_zero_node.
6612 * c-pretty-print.c (pp_c_void_constant): New function.
6613 (c_pretty_printer::constant, c_pretty_printer::primary_expression)
6614 (c_pretty_printer::expression): Handle VOID_CST.
6615 * cilk.c (extract_free_variables): Likewise.
6616 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift)
6617 (ubsan_instrument_vla): Use void_node instead of void_zero_node.
6618
766090c2
TS
66192014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6620
6621 * c-common.h (sorted_fields_type): Remove variable_size GTY attribute.
6622 * c-pragma.c (push_alignment): Adjust.
6623 (handle_pragma_push_options): Likewise.
6624
661a0813
MP
66252014-05-09 Marek Polacek <polacek@redhat.com>
6626
6627 PR c/50459
6628 * c-common.c (check_user_alignment): Return -1 if alignment is error
6629 node.
6630 (handle_aligned_attribute): Don't call default_conversion on
6631 FUNCTION_DECLs.
6632 (handle_vector_size_attribute): Likewise.
6633 (handle_tm_wrap_attribute): Handle case when wrap_decl is error node.
6634 (handle_sentinel_attribute): Call default_conversion and allow even
6635 integral types as an argument.
6636
2793eeab
MP
66372014-05-08 Marek Polacek <polacek@redhat.com>
6638
6639 PR c/61053
6640 * c-common.c (min_align_of_type): New function factored out from...
6641 (c_sizeof_or_alignof_type): ...here.
6642 * c-common.h (min_align_of_type): Declare.
6643
f827930a
MP
66442014-05-08 Marek Polacek <polacek@redhat.com>
6645
6646 PR c/61077
6647 * c-common.c (check_main_parameter_types): Warn for _Atomic-qualified
6648 parameter type of main.
6649
ca49b74e
DD
66502014-05-07 DJ Delorie <dj@redhat.com>
6651
6652 * c-cppbuiltin.c (print_bits_of_hex): New.
6653 (builtin_define_type_minmax): Print values using hex so as not to
6654 require a pre-computed list of string values.
6655
1d60af08
KZ
66562014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6657 Mike Stump <mikestump@comcast.net>
6658 Richard Sandiford <rdsandiford@googlemail.com>
6659
6660 * c-ada-spec.c: Include wide-int.h.
6661 (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Remove.
6662 (dump_generic_ada_node): Use wide-int interfaces.
6663 * c-common.c: Include wide-int-print.h.
6664 (shorten_compare): Use wide-int interfaces and tree_int_cst_lt.
6665 (pointer_int_sum): Use wide-int interfaces.
6666 (c_common_nodes_and_builtins): Use make_int_cst.
6667 (match_case_to_enum_1): Use tree_fits_uhwi_p and tree_fits_shwi_p.
6668 (handle_alloc_size_attribute): Use wide-int interfaces.
6669 (get_nonnull_operand): Likewise.
6670 * c-format.c (get_constant): Use tree_fits_uhwi_p.
6671 * c-lex.c: Include wide-int.h.
6672 (narrowest_unsigned_type): Take a widest_int rather than two
6673 HOST_WIDE_INTs.
6674 (narrowest_signed_type): Likewise.
6675 (interpret_integer): Update accordingly. Use wide-int interfaces.
6676 (lex_charconst): Use wide-int interfaces.
6677 * c-pretty-print.c: Include wide-int.h.
6678 (pp_c_integer_constant): Use wide-int interfaces.
6679 * cilk.c (declare_one_free_variable): Use tree_int_cst_lt instead of
6680 INT_CST_LT_UNSIGNED.
6681
b15458be
RB
66822014-05-06 Richard Biener <rguenther@suse.de>
6683
6684 * c-opts.c (c_common_post_options): For -freestanding,
6685 -fno-hosted and -fno-builtin disable pattern recognition
6686 if not enabled explicitely.
6687
6577374e
MP
66882014-05-02 Marek Polacek <polacek@redhat.com>
6689
6690 * c.opt (Wsizeof-pointer-memaccess): Describe option.
6691
d00887e8
MP
66922014-05-01 Marek Polacek <polacek@redhat.com>
6693
6694 PR c/43245
6695 * c.opt (Wdiscarded-qualifiers): Add.
6696
f8ed5150
MP
66972014-04-30 Marek Polacek <polacek@redhat.com>
6698
6699 * c-ubsan.c (ubsan_instrument_division): Handle REAL_TYPEs. Perform
6700 INT_MIN / -1 sanitization only for integer types.
6701
45484dcf
MP
67022014-04-25 Marek Polacek <polacek@redhat.com>
6703
6704 PR c/18079
6705 * c-common.c (handle_noinline_attribute): Warn if the attribute
6706 conflicts with always_inline attribute.
6707 (handle_always_inline_attribute): Warn if the attribute conflicts
6708 with noinline attribute.
6709
38e514c0
MP
67102014-04-25 Marek Polacek <polacek@redhat.com>
6711
6712 PR c/60156
6713 * c-common.c (check_main_parameter_types): Warn about variadic main.
6714
44875f92
MS
67152014-04-24 Mike Stump <mikestump@comcast.net>
6716
6717 * c.opt (Wshadow-ivar): Default to on.
6718
dcaaa5a0
DP
67192014-04-24 Dimitris Papavasiliou <dpapavas@gmail.com>
6720
6721 * c.opt (Wshadow-ivar, flocal-ivars, fivar-visibility): Add.
6722
c07d7c02
MP
67232014-04-23 Marek Polacek <polacek@redhat.com>
6724
6725 * c-common.c (handle_tm_wrap_attribute): Tweak error message.
6726
1c33c9b7
JJ
67272014-04-22 Jakub Jelinek <jakub@redhat.com>
6728
6729 PR sanitizer/60275
6730 * c-ubsan.c (ubsan_instrument_return): Return __builtin_trap ()
6731 if flag_sanitize_undefined_trap_on_error.
6732 (ubsan_instrument_division, ubsan_instrument_shift,
6733 ubsan_instrument_vla): Likewise. Use __ubsan_handle_*_abort ()
6734 if !flag_sanitize_recover.
6735
793c625f
MG
67362014-04-22 Marc Glisse <marc.glisse@inria.fr>
6737
6738 PR libstdc++/43622
6739 * c-common.c (registered_builtin_types): Make non-static.
6740 * c-common.h (registered_builtin_types): Declare.
6741
b0f1bf36 67422014-04-14 Richard Biener <rguenther@suse.de>
ab20d992 6743 Marc Glisse <marc.glisse@inria.fr>
b0f1bf36
RB
6744
6745 PR c/60819
6746 * c-common.c (convert_vector_to_pointer_for_subscript): Properly
6747 apply may-alias the scalar pointer type when applicable.
6748
3b07fa4a
IZ
67492014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
6750
6751 PR middle-end/60467
6752 * cilk.c (cilk_set_spawn_marker): Remove FUNCTION_DECL
6753 as possible argument for Cilk_spawn.
6754
cbbd2b1c
TB
67552014-04-11 Tobias Burnus <burnus@net-b.de>
6756
6757 PR c/60194
6758 * c.opt (Wformat-signedness): Add
6759 * c-format.c(check_format_types): Use it.
6760
6415bd5d
JM
67612014-04-11 Jason Merrill <jason@redhat.com>
6762
6763 PR c++/57926
6764 * c-common.c (sync_resolve_size, get_atomic_generic_size): Call
6765 default_conversion for an array argument.
6766
6525783a
MP
67672014-04-08 Marek Polacek <polacek@redhat.com>
6768
6769 PR sanitizer/60745
6770 * c-ubsan.c: Include asan.h.
6771 (ubsan_instrument_return): Call initialize_sanitizer_builtins.
6772
880a467b
NS
67732014-04-03 Nathan Sidwell <nathan@codesourcery.com>
6774
6775 * c.opt (Wnon-virtual-dtor): Auto set when Weffc++.
6776
7b59ff2d
MP
67772014-04-02 Marek Polacek <polacek@redhat.com>
6778
6779 * c-common.h (c_expand_expr): Remove declaration.
6780
8edbfaa6
JJ
67812014-03-28 Jakub Jelinek <jakub@redhat.com>
6782
6783 PR c++/60689
6784 * c-common.c (add_atomic_size_parameter): When creating new
6785 params vector, push the size argument first.
6786
07d72e1d
JJ
67872014-03-26 Jakub Jelinek <jakub@redhat.com>
6788
6789 * c-ubsan.c (ubsan_instrument_division, ubsan_instrument_shift,
6790 ubsan_instrument_vla, ubsan_instrument_return): Adjust
6791 ubsan_create_data callers.
6792
b35e0fa0
JJ
67932014-03-22 Jakub Jelinek <jakub@redhat.com>
6794
6795 PR debug/60603
6796 * c-opts.c (c_finish_options): Restore cb_file_change call to
6797 <built-in>.
6798
39a1ebb3
JJ
67992014-03-13 Jakub Jelinek <jakub@redhat.com>
6800
6801 PR middle-end/36282
6802 * c-pragma.c (apply_pragma_weak): Only look at
6803 TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)) if
6804 DECL_ASSEMBLER_NAME_SET_P (decl).
6805 (maybe_apply_pending_pragma_weaks): Exit early if
6806 vec_safe_is_empty (pending_weaks) rather than only when
6807 !pending_weaks.
6808 (maybe_apply_pragma_weak): Likewise. If !DECL_ASSEMBLER_NAME_SET_P,
6809 set assembler name back to NULL afterwards.
6810
a07f6ed2
JM
68112014-03-11 Jason Merrill <jason@redhat.com>
6812
6813 * c.opt: Add -std=gnu++14.
6814
75b107f5
IB
68152014-03-11 Ian Bolton <ian.bolton@arm.com>
6816
6817 * c-opts.c (c_common_post_options): Don't override
6818 -ffp-contract=fast if unsafe-math-optimizations is on.
6819
f42c637e
PM
68202014-03-08 Paulo Matos <paulo@matos-sorge.com>
6821
22b15758 6822 * c.opt: Enable LTO FE for fshort-double.
f42c637e 6823
70e24808
JM
68242014-03-07 Jason Merrill <jason@redhat.com>
6825
6826 * c.opt: Add -std=c++14.
6827
3af9c5e9
MP
68282014-03-06 Marek Polacek <polacek@redhat.com>
6829
6830 PR c/60197
6831 * cilk.c (contains_cilk_spawn_stmt): New function.
6832 (contains_cilk_spawn_stmt_walker): Likewise.
6833 (recognize_spawn): Give error on invalid use of _Cilk_spawn.
6834 * c-common.h (contains_cilk_spawn_stmt): Add declaration.
6835
b3bdf019
JJ
68362014-03-03 Jakub Jelinek <jakub@redhat.com>
6837
6838 * c-pragma.c (c_pp_lookup_pragma): Handle PRAGMA_CILK_SIMD.
6839 (init_pragma): Call cpp_register_deferred_pragma for PRAGMA_CILK_SIMD
6840 even when flag_preprocess_only.
6841
ca7e759d
JM
68422014-02-26 Jason Merrill <jason@redhat.com>
6843
6844 PR c++/59231
6845 PR c++/11586
6846 * c-common.c (shorten_compare): Don't check
6847 c_inhibit_evaluation_warnings.
6848
28e41874
JJ
68492014-02-19 Jakub Jelinek <jakub@redhat.com>
6850
cca615af
JJ
6851 PR c/37743
6852 * c-common.c (c_common_nodes_and_builtins): When initializing
6853 c_uint{16,32,64}_type_node, also set corresponding
6854 uint{16,32,64}_type_node to the same value.
6855
28e41874
JJ
6856 PR c++/60267
6857 * c-pragma.c (init_pragma): Don't call cpp_register_deferred_pragma
6858 for PRAGMA_IVDEP if flag_preprocess_only.
6859
c2bf53a1
JJ
68602014-02-12 Jakub Jelinek <jakub@redhat.com>
6861
6862 PR c/60101
6863 * c-common.c (merge_tlist): If copy is true, call new_tlist,
6864 if false, add ADD itself, rather than vice versa.
6865 (verify_tree): For COND_EXPR, don't call merge_tlist with non-zero
6866 copy. For SAVE_EXPR, only call merge_tlist once.
6867
8fcbce72
JJ
68682014-02-08 Jakub Jelinek <jakub@redhat.com>
6869
6870 PR middle-end/60092
6871 * c-common.c (handle_alloc_size_attribute): Use tree_fits_uhwi_p
6872 and tree_to_uhwi.
6873 (handle_alloc_align_attribute, handle_assume_aligned_attribute): New
6874 functions.
6875 (c_common_attribute_table): Add alloc_align and assume_aligned
6876 attributes.
6877
0a756a3f
MP
68782014-02-06 Marek Polacek <polacek@redhat.com>
6879
6880 PR c/60087
6881 * c-common.c (warn_for_sign_compare): Call warning_at with location
6882 instead of warning.
6883
7ec4847a
MP
68842014-02-05 Marek Polacek <polacek@redhat.com>
6885
6886 PR c/53123
6887 * c-omp.c (c_finish_omp_atomic): Remove unreachable return
6888 statement.
6889
66f20604
MP
68902014-02-04 Marek Polacek <polacek@redhat.com>
6891
6892 PR c/60036
6893 * c-common.c (conversion_warning): Unwrap C_MAYBE_CONST_EXPR and/or
6894 SAVE_EXPR.
6895
5d77fb19
MG
68962014-02-03 Marc Glisse <marc.glisse@inria.fr>
6897
6898 PR c++/53017
6899 PR c++/59211
6900 * c-common.c (handle_aligned_attribute, handle_alloc_size_attribute,
6901 handle_vector_size_attribute, handle_nonnull_attribute): Call
6902 default_conversion on the attribute argument.
6903 (handle_nonnull_attribute): Increment the argument number.
6904
81e5eca8
MP
69052014-01-31 Marek Polacek <polacek@redhat.com>
6906
6907 PR c/59963
6908 * c-common.c (add_atomic_size_parameter): Pass vNULL to
6909 build_function_call_vec.
6910 (resolve_overloaded_builtin): Likewise.
6911 * c-common.h (build_function_call_vec): Adjust declaration.
6912
68fca595
MP
69132014-01-30 Marek Polacek <polacek@redhat.com>
6914
6915 PR c/59940
6916 * c-common.h (unsafe_conversion_p): Adjust declaration.
6917 (warnings_for_convert_and_check): Likewise.
6918 (convert_and_check): Likewise.
6919 * c-common.c (unsafe_conversion_p): Add location parameter. Call
6920 expansion_point_location_if_in_system_header on it.
6921 (warnings_for_convert_and_check): Add location parameter. Call
6922 expansion_point_location_if_in_system_header on it. Use it.
6923 (convert_and_check): Add location parameter. Use it.
6924 (conversion_warning): Likewise.
6925 (c_add_case_label): Adjust convert_and_check calls.
6926 (scalar_to_vector): Adjust unsafe_conversion_p calls.
6927
b72271b9
BI
69282014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
6929
6930 * c-common.c (c_define_builtins): Replaced flag_enable_cilkplus with
6931 flag_cilkplus.
6932 * c-pragma.c (init_pragma): Likewise.
6933 * c.opt: Likewise.
6934
393e8e8b
MP
69352014-01-23 Marek Polacek <polacek@redhat.com>
6936
6937 PR c/59846
6938 * c-common.c (shorten_compare): Add location_t parameter.
6939 * c-common.h (shorten_binary_op): Adjust declaration.
6940
f04dda30
MP
69412014-01-23 Marek Polacek <polacek@redhat.com>
6942
6943 PR c/58346
6944 * c-common.c (pointer_to_zero_sized_aggr_p): New function.
6945 * c-common.h: Declare it.
6946
621955cb
EB
69472014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6948
6949 * c-ada-spec.h (dump_ada_specs): Revert prototype change.
6950 * c-ada-spec.c (dump_ads): Likewise.
6951 (cpp_check): Likewise.
6952 (dump_ada_specs): Likewise.
6953
69542014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
67bf2939
LA
6955
6956 PR c++/49718
6957 * c-common.c (handle_no_instrument_function_attribute): Allow
6958 no_instrument_function attribute in class member
6959 definition/declaration.
6960
241f845a
JJ
69612014-01-15 Jakub Jelinek <jakub@redhat.com>
6962
6963 PR c/58943
6964 * c-omp.c (c_finish_omp_atomic): Set in_late_binary_op around
6965 build_modify_expr with non-NOP_EXPR opcode. Handle return from it
6966 being COMPOUND_EXPR.
6967 (c_finish_omp_for): Handle incr being COMPOUND_EXPR with first
6968 operand a SAVE_EXPR and second MODIFY_EXPR.
6969
e83b8e2e
JJ
69702014-01-09 Jakub Jelinek <jakub@redhat.com>
6971
6972 PR target/58115
6973 * c-pch.c (c_common_write_pch): Call
6974 prepare_target_option_nodes_for_pch.
6975
23a5b65a
RS
69762014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6977
6978 Update copyright years
6979
f9030485
RS
69802014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
6981
6982 * array-notation-common.c, c-cilkplus.c: Use the standard form for
6983 the copyright notice.
6984
f2aa696b
EB
69852013-12-28 Eric Botcazou <ebotcazou@adacore.com>
6986
6987 * c-ada-spec.c (print_constructor): New function.
6988 (print_destructor): Retrieve the origin of the destructor.
6989 (print_ada_declaration): Revamp handling of constructors/destructors.
6990
3f8257db 69912013-12-23 Stuart Hastings <stuart@apple.com>
1f26ac87
JM
6992 Bill Maddox <maddox@google.com>
6993 Jason Merrill <jason@redhat.com>
6994
6995 * c.opt: Add -fdeclone-ctor-dtor.
6996 * c-opts.c (c_common_post_options): Default to on iff -Os.
6997
41958c28
BI
69982013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
6999
7000 * c-common.c (c_common_attribute_table): Added "cilk simd function"
7001 attribute.
7002 * c-pragma.h (enum pragma_cilk_clause): Remove.
ab20d992 7003 (enum pragma_omp_clause): Added the following fields:
41958c28
BI
7004 PRAGMA_CILK_CLAUSE_NOMASK, PRAGMA_CILK_CLAUSE_MASK,
7005 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_NONE,
7006 PRAGMA_CILK_CLAUSE_LINEAR, PRAGMA_CILK_CLAUSE_PRIVATE,
7007 PRAGMA_CILK_CLAUSE_FIRSTPRIVATE, PRAGMA_CILK_CLAUSE_LASTPRIVATE,
7008 PRAGMA_CILK_CLAUSE_UNIFORM.
7009
b1726d6c 7010
12893402
BI
70112013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
7012
7013 * cilk.c (cilk_outline): Made this function non-static.
7014 (gimplify_cilk_spawn): Removed pre_p and post_p arguments.
7015 (create_cilk_wrapper): Added a new parameter: a function pointer.
7016 (c_install_body_w_frame_cleanup): Remove
7017 (extract_free_variables): Added VEC_INIT_EXPR and CONSTRUCTOR case.
7018 * c-common.h (cilk_outline): New prototype.
7019 (gimplify_cilk_spawn): Removed two parameters.
7020 (cilk_install_body_with_frame_cleanup): New prototype.
7021 * c-gimplify.c (c_gimplify_expr): Added MODIFY_EXPR, CALL_EXPR and
7022 CILK_SPAWN_STMT case.
7023
085b42ed
BS
70242013-12-11 Bernd Schmidt <bernds@codesourcery.com>
7025
2ce064c3
BS
7026 * c-common.c (c_fully_fold_internal): Handle ADDR_SPACE_CONVERT_EXPR.
7027
085b42ed
BS
7028 * c-common.h (enum c_tree_index): Remove CTI_INT_ARRAY_TYPE.
7029 (int_array_type_node): Remove.
7030 * c-common.c (c_common_nodes_and_builtins): Don't build it.
7031
9e36c9ed
MP
70322013-12-05 Marek Polacek <polacek@redhat.com>
7033
7034 PR c/52023
7035 * c-common.c (c_sizeof_or_alignof_type): Move a declaration into
7036 [ADJUST_FIELD_ALIGN].
7037
296674db
JM
70382013-12-04 Joseph Myers <joseph@codesourcery.com>
7039
7040 PR c/52023
7041 * c-common.c (c_sizeof_or_alignof_type): Add parameter min_alignof
7042 and check field alignment if set.
7043 * c-common.h (c_sizeof_or_alignof_type): Update prototype.
7044 (c_sizeof, c_alignof): Update calls to c_sizeof_or_alignof_type.
7045
b1726d6c 70462013-12-04 Jakub Jelinek <jakub@redhat.com>
31e071ae
MP
7047 Marek Polacek <polacek@redhat.com>
7048
7049 * c-gimplify.c (c_gimplify_expr): If doing the integer-overflow
7050 sanitization, call unsigned_type_for only when !TYPE_OVERFLOW_WRAPS.
7051
d7947e19
L
70522013-11-29 H.J. Lu <hongjiu.lu@intel.com>
7053
7054 PR c/59309
7055 * cilk.c (gimplify_cilk_spawn): Properly handle function without
7056 arguments.
7057
fad7652e
JJ
70582013-11-29 Jakub Jelinek <jakub@redhat.com>
7059
7060 PR c/59280
7061 * c-common.c (get_priority): If TREE_VALUE (args) is IDENTIFIER_NODE,
7062 goto invalid. If it is error_mark_node, don't issue further
7063 diagnostics.
7064
8b5e1202
SO
70652013-11-28 Sergey Ostanevich <sergos.gnu@gmail.com>
7066
7067 * c.opt (Wopenmp-simd): New.
7068
0a508bb6
JJ
70692013-11-22 Jakub Jelinek <jakub@redhat.com>
7070
7071 * c-ubsan.h (ubsan_instrument_return): New prototype.
7072 * c-ubsan.c (ubsan_instrument_return): New function.
7073
2fb9a547
AM
70742013-11-22 Andrew MacLeod <amacleod@redhat.com>
7075
7076 * c-common.c: Add required include files from gimple.h.
ab20d992
JJ
7077 * c-gimplify.c: Likewise.
7078 * cilk.c: Likewise.
2fb9a547 7079
8400e75e
DM
70802013-11-22 David Malcolm <dmalcolm@redhat.com>
7081
7082 * c-common.c (unsafe_conversion_p): Remove use of
7083 EXPR_LOC_OR_HERE macro.
7084 (conversion_warning): Likewise.
7085 (warnings_for_convert_and_check): Likewise.
7086 (warn_for_collisions_1): Likewise.
7087 (shorten_compare): Likewise, and remove use of in_system_header
7088 macro, using the location from the former.
7089 * c-lex.c (dump_one_header): Remove use of input_filename macro.
7090 (cb_def_pragma): Remove use of in_system_header macro.
7091 (lex_string): Likewise.
7092 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
7093
eb1ce453
KZ
70942013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7095 Mike Stump <mikestump@comcast.net>
7096 Richard Sandiford <rdsandiford@googlemail.com>
7097
7098 * c-ada-spec.c (is_simple_enum): Use tree_to_shwi and tree_to_uhwi
7099 instead of TREE_INT_CST_LOW, in cases where there is a protecting
7100 tree_fits_shwi_p or tree_fits_uhwi_p.
7101 (dump_generic_ada_node): Likewise.
7102 * c-format.c (check_format_arg): Likewise.
7103 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7104
6b3b8c27
KZ
71052013-11-20 Kenneth Zadeck <zadeck@naturalbridge.com>
7106
7107 * c-common.c (check_function_arguments_recurse): Use tree_to_uhwi.
7108
49b0aa18
JC
71092013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
7110
7111 PR c/53001
7112 * c-common.c (unsafe_conversion_p): Make this function
7113 return an enumeration with more detail.
7114 (conversion_warning): Use the new return type of
7115 unsafe_conversion_p to separately warn either about conversions
7116 that lower floating point number precision or about the other
7117 kinds of conversions.
7118 * c-common.h (enum conversion_safety): New enumeration.
8e745a17
JJ
7119 (unsafe_conversion_p): switching return type to
7120 conversion_safety enumeration.
49b0aa18
JC
7121 * c.opt: Adding new warning -Wfloat-conversion and
7122 enabling it with -Wconversion.
7123
b826515a
BS
71242013-11-19 Basile Starynkevitch <basile@starynkevitch.net>
7125
8e745a17
JJ
7126 * c-opts.c: Include plugin.h.
7127 (cb_file_change): Invoke plugin event PLUGIN_INCLUDE_FILE.
b826515a 7128
b9a55b13
MP
71292013-11-19 Marek Polacek <polacek@redhat.com>
7130
7131 * c-ubsan.c (ubsan_instrument_division): Adjust ubsan_create_data
7132 call.
7133 (ubsan_instrument_shift): Likewise.
7134 (ubsan_instrument_vla): Likewise.
7135
7d362f6c
RS
71362013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7137
7138 * c-common.c (convert_vector_to_pointer_for_subscript): Remove
7139 cast to unsigned type.
7140
386b1f1f
RS
71412013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7142
7143 * c-common.c (fold_offsetof_1): Use tree_to_uhwi rather than
7144 tree_low_cst.
7145 (complete_array_type): Update comment to refer to tree_to_[su]hwi
7146 rather than tree_low_cst.
7147
ae7e9ddd
RS
71482013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7149
7150 * c-common.c, c-cppbuiltin.c: Replace tree_low_cst (..., 1) with
7151 tree_to_uhwi throughout.
7152
9439e9a1
RS
71532013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7154
7155 * c-common.c, c-format.c, c-omp.c, c-pretty-print.c: Replace
7156 tree_low_cst (..., 0) with tree_to_shwi throughout.
7157
cc269bb6
RS
71582013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7159
7160 * c-ada-spec.c, c-common.c, c-pretty-print.c: Replace
7161 host_integerp (..., 1) with tree_fits_uhwi_p throughout.
7162
9541ffee
RS
71632013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
7164
7165 * c-ada-spec.c, c-common.c, c-format.c, c-pretty-print.c: Replace
7166 host_integerp (..., 0) with tree_fits_shwi_p throughout.
7167
c02065fc
AH
71682013-11-15 Aldy Hernandez <aldyh@redhat.com>
7169
7170 * c-cilkplus.c: New file.
7171 * c-common.c (readonly_error): Add location argument.
7172 * c-common.h (readonly_error): Same.
7173 (c_finish_cilk_clauses): Protoize.
7174 (c_check_cilk_loop): Same.
7175 c-omp.c (c_finish_omp_for): Handle CILK_SIMD nodes.
7176 Do not fail on error_mark_node.
7177 Abstract increment canonicalization to here...
7178 (c_omp_for_incr_canonicalize_ptr): New.
7179 c-pragma.c (init_pragma): Register "simd" pragma.
7180 c-pragma.h (enum pragma_kind): Add PRAGMA_CILK_SIMD.
7181 (enum pragma_cilk_clause): New.
7182
9cc65f15
RS
71832013-11-15 Richard Sandiford <rdsandiford@googlemail.com>
7184
7185 * c-pretty-print.c (pp_c_character_constant): Remove unnecessary
7186 wchar_type and host_integerp checks.
7187
18f429e2
AM
71882013-11-14 Andrew MacLeod <amacleod@redhat.com>
7189
7190 * c-common.c: Likewise.
7191 * c-gimplify.c: Likewise.
7192 * cilk.c: Likewise.
7193
d8a2d370
DN
71942013-11-14 Diego Novillo <dnovillo@google.com>
7195
7196 * c-common.c: Include fold-const.h.
7197 Include stor-layout.h.
7198 Include calls.h.
7199 Include stringpool.h.
7200 Include attribs.h.
7201 Include varasm.h.
7202 Include trans-mem.h.
7203 * c-cppbuiltin.c: Include stor-layout.h.
7204 Include stringpool.h.
7205 * c-format.c: Include stringpool.h.
7206 * c-lex.c: Include stringpool.h.
7207 Include stor-layout.h.
7208 * c-pragma.c: Include stringpool.h.
7209 Include attribs.h.
7210 Include varasm.h.
7211 Include gcc-symtab.h.
7212 * c-pretty-print.c: Include stor-layout.h.
7213 Include attribs.h.
7214 * cilk.c: Include stringpool.h.
7215 Include calls.h.
7216
38b7bc7f
JM
72172013-11-13 Joseph Myers <joseph@codesourcery.com>
7218
7219 * c-common.h (enum rid): Add RID_AUTO_TYPE.
7220 * c-common.c (c_common_reswords): Add __auto_type.
7221 (keyword_begins_type_specifier): Handle RID_AUTO_TYPE.
7222
45b0be94
AM
72232013-11-12 Andrew MacLeod <amacleod@redhat.com>
7224
18f429e2
AM
7225 * c-common.c: Include gimplify.h.
7226 * c-gimplify.c: Likewise.
7227 * cilk.c: Likewise.
7228 * c-omp.c: Include gimple-expr.h instead of gimple.h.
7229 * c-ubsan.c: Don't include gimple.h.
45b0be94 7230
582d9b50
JM
72312013-11-12 Joseph Myers <joseph@codesourcery.com>
7232
7233 * c-common.c (c_common_reswords): Add _Thread_local.
7234
6b28e197
JM
72352013-11-09 Joseph Myers <joseph@codesourcery.com>
7236
7237 * c-common.c (atomic_size_supported_p): New function.
7238 (resolve_overloaded_atomic_exchange)
7239 (resolve_overloaded_atomic_compare_exchange)
7240 (resolve_overloaded_atomic_load, resolve_overloaded_atomic_store):
7241 Use it instead of comparing size with a local list of sizes.
7242
267bac10
JM
72432013-11-07 Andrew MacLeod <amacleod@redhat.com>
7244 Joseph Myers <joseph@codesourcery.com>
7245
7246 * c-common.h (enum rid): Add RID_ATOMIC.
7247 * c-common.c (c_common_reswords): Add _Atomic.
7248 (sync_resolve_params): Use TYPE_MAIN_VARIANT on pointer argument.
7249 (keyword_is_type_qualifier): Accept RID_ATOMIC.
7250 * c-format.c (check_format_types): Check for extra _Atomic
7251 qualifiers in format argument.
7252 * c-pretty-print.c (pp_c_cv_qualifiers): Handle atomic qualifier.
7253 (pp_c_type_qualifier_list): Mention _Atomic in comment.
7254
5157b91e
TB
72552013-11-06 Tobias Burnus <burnus@net-b.de>
7256
7257 * c-common.c (reason_option_codes_t): Add CPP_W_DATE_TIME.
7258
6dbe0958
JM
72592013-11-06 Joseph Myers <joseph@codesourcery.com>
7260
7261 * c-opts.c (c_common_post_options): Set -ffp-contract=off in C
7262 standards modes.
7263 * c-cppbuiltin.c (cpp_iec_559_value): Consider -ffp-contract=fast
7264 to mean lack of IEEE 754 support.
7265
e8ff5196
TB
72662013-11-05 Tobias Burnus <burnus@net-b.de>
7267
7268 * c.opt (-Wdate-time): New option
7269 * c-opts.c (sanitize_cpp_opts): Pass on to libcpp.
7270
254a0760
JM
72712013-11-05 Joseph Myers <joseph@codesourcery.com>
7272
7273 * c-cppbuiltin.c (cpp_iec_559_value): Test
7274 flag_excess_precision_cmdline not flag_excess_precision.
7275
6d7f7e0a
TB
72762013-11-05 Tobias Burnus <burnus@net-b.de>
7277
7278 * c.opt (fopenmp-simd): New option.
7279 * c-pragma.c (omp_pragmas): Move pragmas which can contain simd to ...
7280 (omp_pragmas): ... this new struct.
7281 (c_pp_lookup_pragma): Also walk omp_pragmas.
7282 (init_pragma): Init pragmas for -fopenmp-simd.
7283
55a7f02f
MP
72842013-11-04 Marek Polacek <polacek@redhat.com>
7285
7286 PR c++/58979
7287 * c-common.c (invalid_indirection_error): Handle RO_ARROW_STAR case.
7288
9193fb05
JM
72892013-11-04 Joseph Myers <joseph@codesourcery.com>
7290
7291 * c-cppbuiltin.c (cpp_iec_559_value, cpp_iec_559_complex_value):
7292 New functions.
7293 (c_cpp_builtins): Define __GCC_IEC_559 and __GCC_IEC_559_COMPLEX.
7294
94159ecf
EB
72952013-11-04 Eric Botcazou <ebotcazou@adacore.com>
7296
7297 * c-ada-spec.h (cpp_operation): Add IS_TRIVIAL.
7298 (dump_ada_specs): Adjust prototype of second callback.
7299 * c-ada-spec.c (cpp_check): New global variable.
7300 (dump_ada_nodes): Remove cpp_check parameter and do not pass it down.
7301 (print_generic_ada_decl): Likewise.
7302 (has_static_fields): Change return type to bool and add guard.
7303 (has_nontrivial_methods): New predicate.
7304 (is_tagged_type): Change return type to bool.
7305 (separate_class_package): Call has_nontrivial_methods.
7306 (pp_ada_tree_identifier): Minor tweaks.
7307 (dump_ada_function_declaration): Adjust calls to dump_generic_ada_node.
7308 (dump_ada_array_domains): Likewise.
7309 (dump_ada_array_type): Likewise.
7310 (dump_template_types): Remove cpp_check parameter and do not pass it to
7311 dump_generic_ada_node.
7312 (dump_ada_template): Likewise.
7313 (dump_generic_ada_node): Remove cpp_check parameter and do not pass it
7314 recursively.
7315 (print_ada_methods): Change return type to integer. Remove cpp_check
7316 parameter and do not pass it down.
7317 (dump_nested_types): Remove cpp_check parameter and do not pass it to
7318 dump_generic_ada_node.
7319 (print_ada_declaration): Likewise. Test RECORD_OR_UNION_TYPE_P before
7320 accessing methods.
7321 (print_ada_struct_decl): Remove cpp_check parameter and do not pass it
7322 down. Use has_nontrivial_methods to recognize C++ classes. Use return
7323 value of print_ada_methods.
7324 (dump_ads): Rename cpp_check parameter to check and adjust prototype.
7325 Set cpp_check to it before invoking dump_ada_nodes.
7326 (dump_ada_specs): Likewise.
7327
b906f4ca
MP
73282013-11-03 Marek Polacek <polacek@redhat.com>
7329
7330 * c-ubsan.c: Don't include hash-table.h.
7331 (ubsan_instrument_vla): New function.
7332 * c-ubsan.h: Declare it.
7333
5e20cdc9
DM
73342013-10-31 David Malcolm <dmalcolm@redhat.com>
7335
7336 Automated part of renaming of symtab_node_base to symtab_node.
7337
7338 Patch autogenerated by rename_symtab.py from
7339 https://github.com/davidmalcolm/gcc-refactoring-scripts
7340 revision 58bb219cc090b2f4516a9297d868c245495ee622
7341
7342 * c-pragma.c (maybe_apply_pending_pragma_weaks): Rename
7343 symtab_node_base to symtab_node.
7344
7057e645
ESR
73452013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
7346
8e745a17 7347 Implement C++14 digit separators.
7057e645
ESR
7348 * c-lex.c (interpret_float): Remove digit separators from scratch string
7349 before building real literal.
7350
193ea7bc
JJ
73512013-10-30 Jakub Jelinek <jakub@redhat.com>
7352
7353 * cilk.c (create_cilk_helper_decl): Use HOST_WIDE_INT_PRINT_DEC.
7354
939b37da
BI
73552013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
7356
7357 * c-common.c (c_common_reswords[]): Added _Cilk_spawn and _Cilk_sync
7358 fields.
7359 (c_define_builtins): Called cilk_init_builtins if Cilk Plus is
7360 enabled.
7361 * c-common.h (enum rid): Added RID_CILK_SPAWN and RID_CILK_SYNC.
7362 (insert_cilk_frame): New prototype.
7363 (cilk_init_builtins): Likewise.
7364 (gimplify_cilk_spawn): Likewise.
7365 (c_cilk_install_body_w_frame_cleanup): Likewise.
7366 (cilk_detect_spawn_and_unwrap): Likewise.
7367 (cilk_set_spawn_marker): Likewise.
7368 (build_cilk_sync): Likewise.
7369 (build_cilk_spawn): Likewise.
7370 * cilk.c: New file.
7371
67348ccc
DM
73722013-10-29 David Malcolm <dmalcolm@redhat.com>
7373
7374 Patch autogenerated by refactor_symtab.py from
7375 https://github.com/davidmalcolm/gcc-refactoring-scripts
7376 revision 58bb219cc090b2f4516a9297d868c245495ee622
7377
7378 * c-gimplify.c (c_genericize): Update for conversion of symtab types
7379 to a true class hierarchy.
7380 * c-pragma.c (maybe_apply_pending_pragma_weaks): Likewise.
7381
d570872d
RS
73822013-10-27 Richard Sandiford <rdsandiford@googlemail.com>
7383
7384 * c-lex.c (interpret_integer): Remove call to cpp_num_sign_extend.
7385
98906124
JL
73862013-10-26 Jeff Law <law@redhat.com>
7387
adfac8df
JJ
7388 * c-common.c (c_define_builtins): Remove mudflap support.
7389 * c.opt: Ignore and warn for mudflap options.
98906124 7390
d73749df 73912013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
7392
7393 PR other/33426
7394 * c-pragma.c (init_pragma) Add #pragma ivdep handling.
7395 * c-pragma.h (pragma_kind): Add PRAGMA_IVDEP.
7396
3f04b1bb
JM
73972013-10-23 Jason Merrill <jason@redhat.com>
7398
7399 * c-format.c (gcc_cxxdiag_char_table): Add %X.
7400
acf0174b
JJ
74012013-10-11 Jakub Jelinek <jakub@redhat.com>
7402
acd15a28
JJ
7403 * c-common.h (omp_clause_mask::operator !=): New method.
7404 * c-omp.c (c_omp_split_clauses): Use if ((mask & something) != 0)
7405 instead of if (mask & something) tests everywhere.
7406
acf0174b
JJ
7407 * c-cppbuiltin.c (c_cpp_builtins): Predefine _OPENMP to
7408 201307 instead of 201107.
7409 * c-common.c (DEF_FUNCTION_TYPE_8): Define.
7410 (c_common_attribute_table): Add "omp declare target" and
7411 "omp declare simd" attributes.
7412 (handle_omp_declare_target_attribute,
7413 handle_omp_declare_simd_attribute): New functions.
7414 * c-omp.c: Include c-pragma.h.
7415 (c_finish_omp_taskgroup): New function.
7416 (c_finish_omp_atomic): Add swapped argument, if true,
7417 build the operation first with rhs, lhs arguments and use NOP_EXPR
7418 build_modify_expr.
7419 (c_finish_omp_for): Add code argument, pass it down to make_code.
7420 (c_omp_split_clauses): New function.
7421 (c_split_parallel_clauses): Removed.
7422 (c_omp_declare_simd_clause_cmp, c_omp_declare_simd_clauses_to_numbers,
7423 c_omp_declare_simd_clauses_to_decls): New functions.
7424 * c-common.h (omp_clause_mask): New type.
7425 (OMP_CLAUSE_MASK_1): Define.
7426 (omp_clause_mask::omp_clause_mask, omp_clause_mask::operator &=,
7427 omp_clause_mask::operator |=, omp_clause_mask::operator ~,
7428 omp_clause_mask::operator |, omp_clause_mask::operator &,
7429 omp_clause_mask::operator <<, omp_clause_mask::operator >>,
7430 omp_clause_mask::operator ==): New methods.
7431 (enum c_omp_clause_split): New.
7432 (c_finish_omp_taskgroup): New prototype.
7433 (c_finish_omp_atomic): Add swapped argument.
7434 (c_finish_omp_for): Add code argument.
7435 (c_omp_split_clauses): New prototype.
7436 (c_split_parallel_clauses): Removed.
7437 (c_omp_declare_simd_clauses_to_numbers,
7438 c_omp_declare_simd_clauses_to_decls): New prototypes.
7439 * c-pragma.c (omp_pragmas): Add new OpenMP 4.0 constructs.
7440 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_CANCEL,
7441 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_DECLARE_REDUCTION,
7442 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_SIMD,
7443 PRAGMA_OMP_TARGET, PRAGMA_OMP_TASKGROUP and PRAGMA_OMP_TEAMS.
7444 Remove PRAGMA_OMP_PARALLEL_FOR and PRAGMA_OMP_PARALLEL_SECTIONS.
7445 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_ALIGNED,
7446 PRAGMA_OMP_CLAUSE_DEPEND, PRAGMA_OMP_CLAUSE_DEVICE,
7447 PRAGMA_OMP_CLAUSE_DIST_SCHEDULE, PRAGMA_OMP_CLAUSE_FOR,
7448 PRAGMA_OMP_CLAUSE_FROM, PRAGMA_OMP_CLAUSE_INBRANCH,
7449 PRAGMA_OMP_CLAUSE_LINEAR, PRAGMA_OMP_CLAUSE_MAP,
7450 PRAGMA_OMP_CLAUSE_NOTINBRANCH, PRAGMA_OMP_CLAUSE_NUM_TEAMS,
7451 PRAGMA_OMP_CLAUSE_PARALLEL, PRAGMA_OMP_CLAUSE_PROC_BIND,
7452 PRAGMA_OMP_CLAUSE_SAFELEN, PRAGMA_OMP_CLAUSE_SECTIONS,
7453 PRAGMA_OMP_CLAUSE_SIMDLEN, PRAGMA_OMP_CLAUSE_TASKGROUP,
7454 PRAGMA_OMP_CLAUSE_THREAD_LIMIT, PRAGMA_OMP_CLAUSE_TO and
7455 PRAGMA_OMP_CLAUSE_UNIFORM.
7456
826cacfe
MG
74572013-10-09 Marc Glisse <marc.glisse@inria.fr>
7458
7459 PR tree-optimization/20318
7460 * c-common.c (handle_returns_nonnull_attribute): New function.
7461 (c_common_attribute_table): Add returns_nonnull.
7462
2284b034
MG
74632013-10-03 Marc Glisse <marc.glisse@inria.fr>
7464
7465 PR c++/19476
7466 * c.opt (fcheck-new): Move to common.opt.
7467
b56e9788
MP
74682013-09-25 Marek Polacek <polacek@redhat.com>
7469 Jakub Jelinek <jakub@redhat.com>
7470
7471 PR sanitizer/58413
7472 * c-ubsan.c (ubsan_instrument_shift): Don't instrument
7473 an expression if we can prove it is correct.
7474 (ubsan_instrument_division): Likewise. Remove unnecessary
7475 check.
7476
ce6923c5
MP
74772013-09-18 Marek Polacek <polacek@redhat.com>
7478
7479 PR sanitizer/58411
7480 * c-common.c (handle_no_sanitize_undefined_attribute): New function.
7481 Declare it.
7482 (struct attribute_spec c_common_att): Add no_sanitize_undefined.
7483
fb5610fb
IS
74842013-09-14 Iain Sandoe <iain@codesourcery.com>
7485
7486 PR target/48094
7487 * c.opt (fgnu-runtime, fnext-runtime, fobjc-abi-version,
7488 fobjc-gc, freplace-objc-classes): Accept for LTO.
7489
88b0e79e
JC
74902013-09-13 Jacek Caban <jacek@codeweavers.com>
7491
7492 * c-target.def: New hook
7493
c9b0866a
PC
74942013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
7495
7496 PR c++/43452
7497 * c.opt (Wdelete-incomplete): Add.
7498
0af94e6f
JR
74992013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
7500
7501 * c-common.c (same_scalar_type_ignoring_signedness): Delete.
7502 (vector_types_compatible_elements_p): New function.
7503 * c-common.h: (same_scalar_type_ignoring_signedness): Delete
7504 declaration.
7505 (vector_types_compatible_elements_p): Declare.
7506
7c26172c
GDR
75072013-09-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7508
7509 * c-pretty-print.h (c_pretty_printer::simple_type_specifier): Now
7510 a virtual member function.
7511 (pp_simple_type_specifier): Remove.
7512 (pp_c_type_specifier): Likewise.
7513 * c-pretty-print.c (c_pretty_printer::simple_type_specifier):
7514 Rename from pp_c_type_specifier. Adjust.
7515 (c_pretty_printer::c_pretty_printer): Do not assign to
7516 simple_type_specifier.
7517
20059c8b
GDR
75182013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7519
7520 * c-pretty-print.h (c_pretty_printer::type_id): Now a virtual
7521 member function.
7522 (c_pretty_printer::storage_class_specifier): Likewise.
7523 (c_pretty_printer::initializer): Likewise.
7524 (pp_declaration): Remove.
7525 (pp_declaration_specifiers): Likewise.
7526 (pp_abstract_declarator): Likewise.
7527 (pp_declarator): Likewise.
7528 (pp_type_id): Likewise.
7529 (pp_statement): Likewise.
7530 (pp_constant): Likewise.
7531 (pp_id_expression): Likewise.
7532 (pp_primary_expression): Likewise.
7533 (pp_unary_expression): Likewise.
7534 (pp_multiplicative_expression): Likewise.
7535 (pp_conditional_expression): Likewise.
7536 (pp_assignment_expression): Likewise.
7537 (pp_expression): Likewise.
7538 (pp_c_type_id): Likewise.
7539 (pp_c_storage_class_specifier): Likewise.
7540 * c-pretty-print.c (pp_c_type_cast): Tidy.
7541 (pp_c_pointer): Likewise.
7542 (pp_c_type_specifier): Likewise.
7543 (pp_c_parameter_type_list): Likewise.
7544 (pp_c_function_definition): Likewise.
7545 (pp_c_init_declarator): Likewise.
7546 (pp_c_initializer_list): Likewise.
7547 (pp_c_constructor_elts): Likewise.
7548 (c_pretty_printer::direct_abstract_declarator): Likewise.
7549 (c_pretty_printer::declaration_specifiers): Likewise.
7550 (c_pretty_printer::primary_expression): Likewise.
7551 (c_pretty_printer::postfix_expression): Likewise.
7552 (c_pretty_printer::type_id): Rename from pp_c_type_id.
7553 (c_pretty_printer::storage_class_specifier): Rename from
7554 pp_c_storage_class_specifier.
7555 (c_pretty_printer::initializer): Rename from pp_c_initializer.
7556 (c_pretty_printer::c_pretty_printer): Do not assign to type_id,
7557 storage_class_specifier, initializer, offset_list, flags.
7558
de5a5fa1
MP
75592013-08-30 Marek Polacek <polacek@redhat.com>
7560
7561 * c-ubsan.c: New file.
7562 * c-ubsan.h: New file.
7563
8f0e4d72
GDR
75642013-08-30 Gabriel Dos Reis <gdr@integrable-solutions.net>
7565
7566 * c-pretty-print.h (c_pretty_printer::declaration): Now a virtual
7567 member function.
7568 (c_pretty_printer::declaration_specifiers): Likewise.
7569 (c_pretty_printer::declarator): Likewise.
7570 (c_pretty_printer::abstract_declarator): Likewise.
7571 (c_pretty_printer::direct_abstract_declarator): Likewise.
7572 (c_pretty_printer::direct_declarator): Likewise.
7573 (c_pretty_printer::function_specifier): Likewise.
7574 (pp_declaration): Adjust.
7575 (pp_declaration_specifiers): Likewise.
7576 (pp_abstract_declarator): Likewise.
7577 (pp_direct_declarator): Likewise.
7578 (pp_function_specifier): Likewise.
7579 (pp_direct_abstract_declarator): Remove as unused.
7580 (pp_c_declaration): Remove.
7581 (pp_c_declaration_specifiers): Likewise.
7582 (pp_c_declarator): Likewise.
7583 (pp_c_direct_declarator): Likewise.
7584 (pp_c_function_specifier): Likewise.
7585 (pp_c_direct_abstract_declarator): Likewise.
7586 * c-pretty-print.c (c_pretty_printer::abstract_declarator): Rename
7587 from pp_c_abstract_declarator. Adjust.
ab20d992 7588 (c_pretty_printer::direct_abstract_declarator): Rename from
8f0e4d72
GDR
7589 pp_c_direct_abstract_declarator. Adjust.
7590 (c_pretty_printer::function_specifier): Rename from
7591 pp_c_function_specifier. Adjust.
7592 (c_pretty_printer::declaration_specifiers): Rename from
7593 pp_c_declaration_specifiers. Adjust.
7594 (c_pretty_printer::direct_declarator): Rename from
7595 pp_c_direct_declarator. Adjust.
7596 (c_pretty_printer::declarator): Rename from pp_c_declarator. Adjust.
7597 (c_pretty_printer::declaration): Rename from pp_c_declaration. Adjust.
7598 (c_pretty_printer::c_pretty_printer): Do not assign to
7599 declaration, declaration_specifiers, declarator,
7600 direct_declarator, direct_abstract_declarator, function_specifier.
7601
00d34d3a
GDR
76022013-08-26 Gabriel Dos Reis <gdre@integrable-solutions.net>
7603
7604 * c-pretty-print.h (c_pretty_printer::unary_expression): Now a
7605 virtual member function.
7606 (c_pretty_printer::multiplicative_expression): Likewise.
7607 (c_pretty_printer::conditional_expression): Likewise.
7608 (c_pretty_printer::assignment_expression): Likewise.
7609 (c_pretty_printer::expression): Likewise.
7610 (pp_unary_expression): Adjust.
7611 (pp_multiplicative_expression): Likewise.
7612 (pp_assignment_expression): Likewise.
7613 (pp_conditional_expression): Likewise.
7614 (pp_expression): Likewise.
7615 * c-pretty-print.c (c_pretty_printer::unary_expression): Rename
7616 from pp_c_unary_expression. Adjust.
7617 (c_pretty_printer::multiplicative_expression): Rename from
7618 pp_c_multiplicative_expression. Adjust.
7619 (c_pretty_printer::conditional_expression): Rename from
7620 pp_c_conditional_expression. Adjust.
7621 (c_pretty_printer::assignment_expression): Rename from
7622 pp_c_assignment_expression. Adjust.
7623 (c_pretty_printer::expression): Rename from pp_c_expression. Adjust.
7624 (c_pretty_printer::c_pretty_printer): Do not assign to
7625 unary_expression, multiplicative_expression,
7626 conditional_expression, expression.
7627
fb22178f
GDR
76282013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7629
7630 * c-pretty-print.h (c_pretty_printer::postfix_expression): Now a
7631 virtual member function.
7632 (pp_postfix_expression): Adjust.
7633 (pp_c_postfix_expression): Remove.
7634 * c-pretty-print.c (c_pretty_printer::postfix_expression): Rename
7635 from pp_c_postfix_expression. Adjust.
7636 (c_pretty_printer::c_pretty_printer): Do not assign to
7637 postfix_expression.
7638
7ecc2600
GDR
76392013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7640
7641 * c-pretty-print.h (c_pretty_printer::primary_expression): Now a
7642 virtua member function.
7643 (pp_primary_expression): Adjust.
7644 (pp_c_primary_expression): Remove.
7645 * c-pretty-print.c (c_pretty_printer::primary_expression): Rename
7646 from pp_c_primary_expression. Adjust.
7647 (pp_c_initializer_list): Use pp_primary_expression.
7648 (c_pretty_printer::c_pretty_printer): Do not assign to
7649 primary_expression.
7650
0691175f
GDR
76512013-08-25 Gabriel Dos Reis <gdr@integrable-solutions.net>
7652
7653 * c-pretty-print.h (c_pretty_printer::translate_string): Declare.
7654 * c-pretty-print.c (M_): Remove.
7655 (c_pretty_printer::translate_string): Define.
7656 (pp_c_type_specifier): Use it.
7657 (pp_c_primary_expression): Likewise.
7658 (pp_c_expression): Likewise.
7659
66dfe4c4
GDR
76602013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7661
7662 * c-pretty-print.h (c_pretty_printer::id_expression): Now a
7663 virtual function.
7664 (pp_c_id_expression): Remove.
7665 (pp_id_expression): Adjust.
7666 * c-pretty-print.c (c_pretty_printer::id_expression): Rename from
7667 pp_c_id_expression. Adjust.
7668 (pp_c_postfix_expression): Use pp_id_expression.
7669 (c_pretty_printer::c_pretty_printer): Do not assign to id_expression.
7670
ca43e9d5
GDR
76712013-08-24 Gabriel Dos Reis <gdr@integrable-solutions.net>
7672
7673 * c-pretty-print.h (c_pretty_printer::constant): Now a virtual
7674 member function.
7675 (pp_constant): Adjust.
7676 (pp_c_constant): Remove.
7677 * c-pretty-print.c (c_pretty_printer::constant): Rename from
7678 pp_c_constant. Adjust.
7679 (pp_c_constant)
7680 (pp_c_primary_expression): Call pp_constant in lieu of pp_c_constant.
7681 (c_pretty_printer::c_pretty_printer): Remove assignment to constant.
7682
da6ca2b5
GDR
76832013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7684
7685 * c-pretty-print.h (pp_c_pretty_printer_init): Remove.
7686 (c_pretty_printer::c_pretty_printer): Declare.
7687 * c-pretty-print.c (pretty_printer::c_pretty_printer): Rename from
7688 c_pretty_printer_init. Adjust.
7689 (print_c_tree): Do not call c_pretty_printer_init.
7690 * c-ada-spec.c (dump_ads): Remove call to pp_construct.
7691
65a372f4
AC
76922013-08-09 Arnaud Charlet <charlet@adacore.com>
7693
7694 * c-ada-spec.c (print_ada_declaration): Prevent accessing null asm name
7695
fd9b0f32
PC
76962013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
7697
7698 PR c++/58080
7699 * c-common.c (pointer_int_sum): Add bool parameter.
7700 * c-common.h (pointer_int_sum): Adjust declaration.
7701
e0aec1e9
GDR
77022013-08-05 Gabriel Dos Reis <gdr@integrable-solutions.net>
7703
7704 * c-pretty-print.c (print_c_tree): Simplify. Use non-static local
7705 c_pretty_printer variable.
7706
b066401f
GDR
77072013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
7708
7709 * c-pretty-print.h (c_pretty_printer): Derive from pretty_printer.
7710 (pp_base): Remove.
7711 (pp_c_base): Likewise. Adjust users.
7712 * c-pretty-print.c (pp_c_maybe_whitespace): Adjust.
7713 (pp_c_whitespace): Do not call pp_base.
7714 (pp_c_left_paren): Likewise.
7715 (pp_c_right_paren): Likewise.
7716 (pp_c_left_brace): Likewise.
7717 (pp_c_right_brace): Likewise.
7718 (pp_c_left_bracket): Likewise.
7719 (pp_c_right_bracket): Likewise.
7720 (pp_c_dot): Likewise.
7721 (pp_c_ampersand): Likewise.
7722 (pp_c_star): Likewise.
7723 (pp_c_arrow): Likewise.
7724 (pp_c_semicolon): Likewise.
7725 (pp_c_complement): Likewise.
7726 (pp_c_exclamation): Likewise.
7727 (pp_c_direct_declarator): Likewise.
7728 (pp_c_ws_string): Likewise.
7729 (pp_c_identifier): Likewise.
7730 (pp_c_statement): Likewise.
7731 (print_c_tree): Likewise.
7732
65e5a578
ESR
77332013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
7734
7735 PR c++/58072
7736 * c-common.c (c_parse_error): Catch user-defined literal tokens and
7737 provide useful error strings.
7738
137a1a27
GDR
77392013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7740
7741 * c-ada-spec.c (pp_ada_tree_identifier): Use specialized pretty
7742 printer functions instead of pp_string or operators and punctuators.
7743 (dump_generic_ada_node): Likewise.
7744 * c-pretty-print.c (pp_c_type_specifier): Likewise.
7745 (pp_c_relational_expression): Likewise.
7746 (pp_c_logical_or_expression): Likewise.
7747
07838b13
GDR
77482013-08-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
7749
7750 * c-ada-spec.c (print_ada_macros): Use specialized pretty printer
7751 functions instead of pp_character.
7752 (pp_ada_tree_identifier): Likewise.
7753 (dump_ada_double_name): Likewise.
7754 (dump_ada_function_declaration): Likewise.
7755 (dump_ada_array_domains): Likewise.
7756 (dump_template_types): Likewise.
7757 (dump_generic_ada_node): Likewise.
7758 (print_ada_declaration): Likewise.
7759 (print_ada_struct_decl): Likewise.
7760 * c-pretty-print.c (pp_c_integer_constant): Likewise.
7761
433cc7b0
TT
77622013-07-23 Tom Tromey <tromey@redhat.com>
7763
7764 * c-common.h (enum rid) <RID_GENERIC>: New constant.
7765 * c-common.c (c_common_reswords): Add _Generic.
7766
688010ba
OB
77672013-07-21 OndÅ\99ej Bílka <neleai@seznam.cz>
7768
7769 * c-common.c: Fix typos.
7770 * c-common.h: Likewise.
7771
2a99e5e6
LL
77722013-07-13 Lubos Lunak <l.lunak@suse.cz>
7773
7774 PR c++/55203
7775 * c-common.c (c_common_attribute_table): Add warn_unused.
7776 (handle_warn_unused_attribute): New.
7777
c26302d5
JJ
77782013-07-10 Jakub Jelinek <jakub@redhat.com>
7779
7780 * c-ppoutput.c (scan_translation_unit): Call account_for_newlines
7781 for all CPP_TOKEN_FLD_STR tokens, not just CPP_COMMENT.
7782
dfeadaa0
PC
77832013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
7784
7785 PR c++/57869
7786 * c.opt: Add Wconditionally-supported.
7787
6a2fa4b2
GS
77882013-07-08 Graham Stott <graham.stott@btinternet.com>
7789
adfac8df 7790 * array-notation-common.c (length_mismatch_in_expr_p): Delete
6a2fa4b2
GS
7791 unused variables l_length and l_node.
7792
ecdbd01a 77932013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
7794
7795 PR c/57821
7796 * c-common.c (complete_array_type): Delay folding first index
7797 like other indices. When folding, check for index overflow.
7798
bedc293e
MG
77992013-06-27 Marc Glisse <marc.glisse@inria.fr>
7800
7801 PR c++/57509
7802 * c-common.h (c_build_vec_perm_expr): New complain argument.
7803 * c-common.c (c_build_vec_perm_expr): Likewise.
7804 Use save_expr also in C++.
7805
604b2bfc
GDR
78062013-06-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
7807
7808 * c-common.c (c_common_nodes_and_builtins): Use cxx11 in lieu of cxx0x.
7809 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
7810 * c-opts.c (c_common_post_options): Likewise.
7811
dfeadaa0 78122013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
713b46fa
BI
7813
7814 * array-notation-common.c (length_mismatch_in_expr): Changed the
7815 parameter type's from a dynamic array to a vec_tree. Also removed
7816 the size parameters.
7817 * c-common.h (length_mismatch_in_expr_p): Fixed prototype's as per
7818 the change above.
7819
2ce86d2e
BI
78202013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
7821
7822 * c-common.h (struct cilkplus_an_parts): New structure.
7823 (struct cilkplus_an_loop_parts): Likewise.
7824 (cilkplus_extract_an_triplets): New prototype.
7825 (fix_sec_implicit_args): Likewise.
7826 * array-notation-common.c (cilkplus_extract_an_triplets): New function.
7827 (fix_sec_implicit_args): Likewise.
604b2bfc 7828
07a6825b
BI
78292013-06-20 Balaji V. Iyer <balaji.v.iyer@intel.com>
7830
7831 * array-notation-common.c (find_inv_trees): Removed an unwanted
7832 typecasting.
7833 * c-common.h (struct inv_list::additional_tcodes): Changed type from
7834 enum rid to enum tree_code.
7835
08346abd
JH
78362013-06-11 Jan Hubicka <jh@suse.cz>
7837
7838 * c-common.c (handle_alias_ifunc_attribute): Do not set
7839 DECL_EXTERNAL for weakref variables.
7840 * c-pragma.c (handle_pragma_weak): Make sure aliases
7841 are not declared as external.
7842
d60f1706
BI
78432013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
7844
7845 * array-notation-common.c (length_mismatch_in_expr_p): Moved this
7846 function from c/c-array-notation.c.
7847 (is_cilkplus_reduce_builtin): Likewise.
7848 (find_rank): Likewise.
7849 (extract_array_notation_exprs): Likewise.
7850 (replace_array_notations): Likewise.
7851 (find_inv_trees): Likewise.
7852 (replace_inv_trees): Likewise.
7853 (contains_array_notation_expr): Likewise.
7854 (find_correct_array_notation_type): Likewise.
7855 * c-common.h (struct inv_list): Moved this struct from the file
7856 c/c-array-notation.c and added a new field called additional tcodes.
7857 (length_mismatch_in_expr_p): New prototype.
7858 (is_cilkplus_reduce_builtin): Likewise.
7859 (find_rank): Likewise.
7860 (extract_array_notation_exprs): Likewise.
7861 (replace_array_notation): Likewise.
7862 (find_inv_trees): Likewise.
7863 (replace_inv_trees): Likewise.
7864 (find_correct_array_notation_type): Likewise.
dfeadaa0 7865
36536d79
BI
78662013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
7867
7868 * c-common.c (c_define_builtins): When cilkplus is enabled, the
7869 function array_notation_init_builtins is called.
7870 (c_common_init_ts): Added ARRAY_NOTATION_REF as typed.
7871 * c-common.def (ARRAY_NOTATION_REF): New tree.
7872 * c-common.h (build_array_notation_expr): New function declaration.
7873 (build_array_notation_ref): Likewise.
7874 (extract_sec_implicit_index_arg): New extern declaration.
7875 (is_sec_implicit_index_fn): Likewise.
7876 (ARRAY_NOTATION_CHECK): New define.
7877 (ARRAY_NOTATION_ARRAY): Likewise.
7878 (ARRAY_NOTATION_START): Likewise.
7879 (ARRAY_NOTATION_LENGTH): Likewise.
7880 (ARRAY_NOTATION_STRIDE): Likewise.
7881 * c-pretty-print.c (pp_c_postifix_expression): Added a new case for
7882 ARRAY_NOTATION_REF.
7883 (pp_c_expression): Likewise.
7884 * c.opt (flag_enable_cilkplus): New flag.
7885 * array-notation-common.c: New file.
7886
f7716d57
JJ
78872013-05-14 Jakub Jelinek <jakub@redhat.com>
7888
7889 PR c++/57274
7890 * c-common.c (verify_tree): Don't recurse into SIZEOF_EXPR.
7891
a5e0cd1d
MG
78922013-05-10 Marc Glisse <marc.glisse@inria.fr>
7893
7894 * c-common.c (vector_types_convertible_p): No TYPE_PRECISION for
7895 vectors.
7896
f6bc1c4a
HS
78972013-05-07 Han Shen <shenhan@google.com>
7898
7899 * c-cppbuiltin.c (c_cpp_builtins): Added "__SSP_STRONG__=3".
7900
3f12f6e9
SKS
79012013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
7902
7903 * c-common.c (check_user_alignment): Emit error for negative values.
7904
61949153
PC
79052013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7906
7907 * c-opts.c (set_std_cxx11): Use CLK_CXX1Y and CLK_GNUCXX1Y.
7908
e93e18e9
PC
79092013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7910
7911 * c-cppbuiltin.c (c_cpp_builtins): Do not define
7912 __GXX_EXPERIMENTAL_CXX1Y__.
7913
44d90fe1 79142013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
8e745a17 7915 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
44d90fe1
PC
7916
7917 * c.opt ([Wpointer-arith]): Enabled by -Wpedantic, as documented.
7918 * c-common.c (pointer_int_sum): Change -Wpointer-arith pedwarns
7919 to simply use OPT_Wpointer_arith.
7920 (c_sizeof_or_alignof_type): Likewise.
7921
13f39b2e
PC
79222013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
7923
7924 * c-cppbuiltin.c (c_cpp_builtins): Define __GXX_EXPERIMENTAL_CXX1Y__.
7925
4b84d650
JJ
79262013-04-12 Jakub Jelinek <jakub@redhat.com>
7927
7928 * c-format.c (gcc_diag_char_table, gcc_tdiag_char_table,
7929 gcc_cdiag_char_table, gcc_cxxdiag_char_table): Add %r and %R format
7930 specifiers.
7931
fb037b5d
SB
79322013-04-07 Steven Bosscher <steven@gcc.gnu.org>
7933
7934 * c-pragma.c (add_to_renaming_pragma_list): Fix leading comment.
7935
4e856798
PC
79362013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
7937
7938 * c-common.c (pointer_int_sum): Remove dead code.
7939
4b1baac8
RS
79402013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
7941
7942 PR middle-end/56524
7943 * c-common.c (handle_optimize_attribute): Don't call
7944 save_optabs_if_changed.
7945
0b50e654
JJ
79462013-03-05 Jakub Jelinek <jakub@redhat.com>
7947
7948 PR middle-end/56461
7949 * c-pch.c (pch_init): Free target_validity at the end.
7950
48c41403
JJ
79512013-03-04 Jakub Jelinek <jakub@redhat.com>
7952
7953 * c-pretty-print.c (pp_c_pretty_printer_init): Clear pp->flags.
7954
e664c61c
KS
79552013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
7956 Jakub Jelinek <jakub@redhat.com>
7957
7958 PR sanitizer/56454
7959 * c-common.c (handle_no_sanitize_address_attribute): New function.
7960 (c_common_attribute_table): Add no_sanitize_address attribute.
7961 (handle_no_address_safety_analysis_attribute): Add
7962 no_sanitize_address attribute, not no_address_safety_analysis
7963 attribute.
7964
a475fd3d 79652013-02-18 Aldy Hernandez <aldyh@redhat.com>
135204dd
AH
7966
7967 PR target/52555
7968 * c-common.c (handle_optimize_attribute): Call
7969 save_optabs_if_changed.
7970
f6007d99
JJ
79712013-02-18 Jakub Jelinek <jakub@redhat.com>
7972 Steven Bosscher <steven@gcc.gnu.org>
7973
7974 PR pch/54117
7975 * c-opts.c (c_common_post_options): If debug info is enabled
7976 and non-dwarf*, refuse to load PCH files and when writing PCH
7977 file warn.
7978
cf35e2b1
JJ
79792013-02-05 Jakub Jelinek <jakub@redhat.com>
7980
7981 PR middle-end/56167
7982 * c-common.c (handle_error_attribute): Fix condition.
7983
32887460
JJ
79842013-01-30 Jakub Jelinek <jakub@redhat.com>
7985
7986 PR c++/55742
7987 * c-common.c (handle_target_attribute): Revert 2012-12-26 change.
7988
5af057d8
JM
79892013-01-18 Jason Merrill <jason@redhat.com>
7990
7991 PR target/54908
7992 * c.opt (-fextern-tls-init): New.
7993 * c-opts.c (c_common_post_options): Handle it.
7994
cc83c823
JJ
79952013-01-09 Jakub Jelinek <jakub@redhat.com>
7996
7997 PR c/48418
7998 * c-common.c (c_fully_fold_internal): Warn for LSHIFT_EXPR and
7999 RSHIFT_EXPR, if orig_op1 isn't INTEGER_CST, op1 is INTEGER_CST
8000 and is either negative or bigger or equal to type precision
8001 of the first operand.
8002
a859517f
MP
80032012-12-03 Marek Polacek <polacek@redhat.com>
8004
8005 PR c/55570
8006 * c-common.c (check_user_alignment): Swap order of tests,
8007 check TREE_CODE first.
8008
2d7aa578
ESR
80092012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
8010
8011 PR c++/52654
8012 * c-common.h (overflow_type): New enum.
8013 (build_userdef_literal): Add overflow_type argument.
8014 (tree_userdef_literal): Add overflow_type.
8015 (USERDEF_LITERAL_OVERFLOW): New access macro.
8016 * c-common.c (build_userdef_literal): Add overflow_type
8017 argument.
8018 * c-lex.c (c_lex_with_flags): Add overflow_type to
8019 build_userdef_literal calls.
8020 (interpret_integer, interpret_float): Add overflow_type argument.
8021
cc3c4f62
RB
80222012-11-28 Richard Biener <rguenther@suse.de>
8023
8024 PR c/35634
8025 * c-gimplify.c (c_gimplify_expr): Gimplify self-modify expressions
8026 here and use a type with proper overflow behavior for types that would
8027 need to be promoted for the arithmetic.
8028
77bc5132
JJ
80292012-11-23 Jakub Jelinek <jakub@redhat.com>
8030
8031 PR sanitizer/55435
8032 * c-common.c (handle_no_address_safety_analysis_attribute): New
8033 function.
8034 (c_common_attribute_table): Add no_address_safety_analysis.
8035
5dc99c46
SB
80362012-11-16 Simon Baldwin <simonb@google.com>
8037
8038 * c.opt: Add f[no-]canonical-system-headers.
8039 * c-opts.c (c_common_handle_option): Handle
8040 OPT_fcanonical_system_headers.
8041
a4a0016d
ESR
80422012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
8043
8044 PR c++/54413
8045 * c-opts.c (c_common_handle_option): Set new flags.
8046 * c.opt: Describe new flags.
8047
7dbb85a7
JM
80482012-11-09 Jason Merrill <jason@redhat.com>
8049
8050 * c.opt (Wabi-tag): New.
8051
ad7bac31
AK
80522012-11-09 Andi Kleen <ak@linux.intel.com>
8053
8054 PR 55139
8055 * c-common.c (get_atomic_generic_size): Mask with
8e745a17 8056 MEMMODEL_MASK
ad7bac31 8057
7332899a
MLI
80582012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8059
8060 PR c/53063
8061 * c.opt (Wformat): Make it Alias Wformat=1.
8062 (Wformat-contains-nul,Wformat-extra-args,Wformat-nonliteral,
8063 Wformat-security,Wformat-y2k,Wformat-zero-length): Use
8064 LangEnabledBy.
8065 (Wformat=): RejectNegative. Use LangEnabledBy.
8066 (Wnonnull): Use LangEnabledBy.
8067 * c-opts.c (c_common_handle_option): Do not handle Wformat here.
8068 * c-format.c (set_Wformat): Delete.
8069 (decode_format_attr): Replace OPT_Wformat with OPT_Wformat_.
ab20d992
JJ
8070 (maybe_read_dollar_number): Likewise.
8071 (avoid_dollar_number): Likewise.
8072 (finish_dollar_format_checking): Likewise.
8073 (check_format_info): Likewise.
8074 (check_format_info_main): Likewise.
8075 (check_format_types): Likewise.
8076 (format_type_warning): Likewise.
8077 * c-common.c (int): Likewise.
8078 (check_function_sentinel): Likewise.
8e745a17 8079 * c-common.h (warn_format,set_Wformat): Do not declare here.
7332899a 8080
34a180a6
MLI
80812012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8082
8083 PR c/53063
8084 * c.opt(Warray-bounds,Wdelete-non-virtual-dtor,Wenum-compare,
8085 Wmain,Woverlength-strings, Wunknown-pragmas,Wunused-macros):
8086 Use LangEnabledBy.
8087 (Wswitch,Wswitch-default,Wswitch-enum): Likewise. Move here from
8088 common.opt.
8089 (Wvariadic-macros): Init(1).
8090 * c-opts.c (c_common_handle_option): Do not handle them
8091 explicitly.
8092 (c_common_post_options): Likewise.
8093 (sanitize_cpp_opts): warn_unused_macros is now
8094 cpp_warn_unused_macros.
8095 (push_command_line_include): Likewise.
8096 * c-common.c (warn_unknown_pragmas): Do not define.
8097 * c-common.h (warn_unknown_pragmas): Do not declare.
8098
3f46d6a5
MLI
80992012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
8100
8101 PR c/51294
8102 * c-common.c (conversion_warning): Handle conditional expressions.
8103
880661a4
JW
81042012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
8105
8106 PR c++/54930
8107 * c.opt (Wreturn_local_addr): Define new option.
8108
4514a96b
JM
81092012-10-25 Jason Merrill <jason@redhat.com>
8110
f14edc1a
JM
8111 * c.opt (Wvirtual-move-assign): New.
8112
4514a96b
JM
8113 * c.opt (Winherited-variadic-ctor): New.
8114
93100c6b
MG
81152012-10-25 Marc Glisse <marc.glisse@inria.fr>
8116
8117 PR c++/54427
8118 * c-common.c (scalar_to_vector): Handle VEC_COND_EXPR.
8119
1efcb8c6
JM
81202012-10-23 Joseph Myers <joseph@codesourcery.com>
8121
8122 * c-common.h (pch_cpp_save_state): Declare.
8123 * c-target.def (c_preinclude): New hook.
8124 * c-opts.c (done_preinclude): New.
8125 (push_command_line_include): Handle default preincluded header.
8126 (cb_file_change): Call pch_cpp_save_state when calling
8127 push_command_line_include.
8128 * c-pch.c (pch_ready_to_save_cpp_state, pch_cpp_state_saved)
8129 (pch_cpp_save_state): New.
8130 (pch_init): Call pch_cpp_save_state conditionally, instead of
8131 calling cpp_save_state.
8132
4a0ae68e
MLI
81332012-10-20 Manuel López-Ibáñez <manu@gcc.gnu.org>
8134
8135 PR c/53063
8136 PR c/40989
8137 * c.opt (Waddress,Wchar-subscripts,Wsign-conversion,Wimplicit,
8138 Wimplicit-function-declaration,Wimplicit-int,Wsizeof-pointer-memaccess,
8139 Wnarrowing,Wparentheses,Wpointer-sign,Wreturn-type,Wsequence-point,
8140 Wsign-compare,Wuninitialized,Wmaybe-uninitialized,Wunused,
8141 Wvolatile-register-var): Add LangEnabledBy or EnabledBy.
8142 * c-opts.c (c_common_handle_option): Remove explicit handling from
8143 here.
8144 (c_common_post_options): Likewise.
8145
67e4210b
EB
81462012-10-18 Eric Botcazou <ebotcazou@adacore.com>
8147
8148 * c-ada-spec.c (LOCATION_COL): Delete.
8149 (compare_location): New function.
8150 (compare_node): Use it.
8151 (compare_comment): Likewise.
8152
65d4f2cd
MLI
81532012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
8154
8155 PR c/53063
8156 PR c/40989
8157 * c.opt (Wstrict-aliasing=,Wstrict-overflow=): Use LangEnabledBy.
8158 * c-opts.c (c_common_handle_option): Do not set them here. Add
8159 comment.
8160 (c_common_post_options): Likewise.
8161
909881cb
EB
81622012-10-16 Eric Botcazou <ebotcazou@adacore.com>
8163
8164 * c-ada-spec.c (ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX): Define.
8165 (dump_generic_ada_node) <INTEGER_CST>: Deal with sizetype specially.
8166 Remove POINTER_TYPE handling, add large unsigned handling and use
8167 ADA_HOST_WIDE_INT_PRINT_DOUBLE_HEX for big numbers.
8168
3a785c97
JJ
81692012-10-12 Jakub Jelinek <jakub@redhat.com>
8170
8171 PR c/54381
8172 * c-common.h (sizeof_pointer_memaccess_warning): Adjust prototype.
8173 * c-common.c (sizeof_pointer_memaccess_warning): Take array of 3
8174 locs and array of 3 trees instead of just single loc and single
8175 sizeof_arg tree. Handle __builtin___*_chk builtins too, and
8176 also stpncpy, bcopy, bcmp, bzero, snprintf and vsnprintf builtins.
8177 For *cmp* builtins that take two sources strings report warnings
8178 about first and second source, not about destination and source.
8179
5e54f81d
MG
81802012-10-12 Marc Glisse <marc.glisse@inria.fr>
8181
8182 PR c++/53055
8183 * c-common.h (enum ref_operator) [RO_ARROW_STAR]: New.
8184
f5b02f1e
EB
81852012-10-11 Eric Botcazou <ebotcazou@adacore.com>
8186
8187 * c-ada-spec.c (dump_ada_template): Bail out for template declarations
8188 declaring something coming from another file.
8189
b46dbc6c
AC
81902012-10-10 Arnaud Charlet <charlet@adacore.com>
8191
f5b02f1e 8192 PR ada/54845
b46dbc6c
AC
8193 * c-ada-spec.c (print_ada_struct_decl): Increase buf size.
8194
5d9de0d0
PC
81952012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
8196
8197 PR c++/54194
8198 * c-common.c (warn_about_parentheses): Add location_t parameter;
8199 use EXPR_LOC_OR_LOC.
8200 * c-common.h: Update declaration.
8201
a212e43f
MG
82022012-10-09 Marc Glisse <marc.glisse@inria.fr>
8203
8204 PR c++/54427
8205 * c-common.c (scalar_to_vector): Moved from c-typeck.c. Support
8206 more operations. Make error messages optional.
8207 * c-common.h (enum stv_conv): Moved from c-typeck.c.
8208 (scalar_to_vector): Declare.
8209
b1db7f91
JM
82102012-10-08 Jason Merrill <jason@redhat.com>
8211
8212 * c-common.c (c_common_reswords): Add thread_local.
8213
e28d52cf
DS
82142012-10-08 Dodji Seketeli <dodji@redhat.com>
8215
8216 PR c++/53528 C++11 attribute support
8217 * c-common.h (bitfield_p, cxx_fundamental_alignment_p): Declare
8218 new functions.
8219 * c-common.c (check_cxx_fundamental_alignment_constraints): New
8220 static function.
8221 (handle_aligned_attribute): In choose strictest alignment
8222 among many. Use new check_cxx_fundamental_alignment_constraints.
8223 (handle_transparent_union_attribute): In c++11 attribute syntax,
8224 don't look through typedefs.
8225
3b78de56
AC
82262012-10-04 Arnaud Charlet <charlet@adacore.com>
8227
8228 * c-ada-spec.c (print_ada_declaration): Remove handling of TDF_RAW.
8229 * c.opt (-fdump-ada-spec, -fdump-ada-spec-slim): Move switch definition
8230 out of dumpfile.h.
8231
6040bb5f
DC
82322012-09-25 Dehao Chen <dehao@google.com>
8233
8234 PR middle-end/54645
3b78de56 8235 * c-pch.c (c_common_read_pch): Rebuild the location_adhoc_data
6040bb5f
DC
8236 map when read in the pch.
8237
3f8257db 82382012-09-18 Arnaud Charlet <charlet@adacore.com>
0b07a57e
AC
8239
8240 * c-ada-spec.c: Style fixes.
8241
3f8257db 82422012-09-18 Thomas Quinot <quinot@adacore.com>
da5182be
TQ
8243
8244 * c.opt (-fada-spec-parent): Define new command line switch.
8245 * c-ada-spec.c (get_ada_package): When -fada-spec-parent
8246 is specified, generate binding spec as a child of the specified unit.
8247
0ccb505d
PC
82482012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
8249 Manuel López-Ibáñez <manu@gcc.gnu.org>
8250
8251 PR c++/53210
8252 * c.opt ([Winit-self]): Enabled by -Wall in C++.
8253
c583af79
AC
82542012-08-23 Arnaud Charlet <charlet@adacore.com>
8255
8256 * c-ada-spec.c (dump_generic_ada_node): Fix handling of name_only
8257 for pointers, and add missing Convention C pragma.
8258 (print_ada_struct_decl): Add missing aliased keyword.
8259 (dump_ads): Add pragma Ada_2005 and Style_Checks (Off).
8260
1a4049e7
JJ
82612012-08-17 Jakub Jelinek <jakub@redhat.com>
8262
8263 * c-common.c (sizeof_pointer_memaccess_warning): New function.
8264 * c.opt (-Wsizeof-pointer-memaccess): Add new option.
8265 * c-opts.c (c_common_handle_option): Enable it for -Wall.
8266 * c-common.h (sizeof_pointer_memaccess_warning): Add prototype.
8267 * c-common.def (SIZEOF_EXPR): Moved here from cp-tree.def.
8268
70b5e7dc
RG
82692012-08-10 Richard Guenther <rguenther@suse.de>
8270
8271 * c-pretty-print.c (pp_c_expression): Handle anonymous SSA names.
8272
f8923f7e
SB
82732012-08-07 Steven Bosscher <steven@gcc.gnu.org>
8274
8275 * c-pretty-print.c (pp_c_function_definition): Use pp_newline_and_flush
8276 instead of separate pp_newline and pp_flush.
8277 (print_c_tree): Likewise.
8278
e45abe1f
RH
82792012-07-26 Richard Henderson <rth@redhat.com>
8280
8281 * c-common.c (handle_hot_attribute): Allow labels.
8282 (handle_cold_attribute): Likewise.
8283
332f1d24
JJ
82842012-07-20 Jakub Jelinek <jakub@redhat.com>
8285
8286 PR c++/28656
8287 * c-common.c (check_function_nonnull): Handle multiple nonnull
8288 attributes properly.
8289
7ee2468b
SB
82902012-07-16 Steven Bosscher <steven@gcc.gnu.org>
8291
8292 * c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
8293 * c-ada-spec.c: Likewise.
8294 * c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
8295
ee7b28eb
SB
82962012-07-14 Steven Bosscher <steven@gcc.gnu.org>
8297
8298 * c-pch.c (CHECK_NO_ASM_OUT_DURING_PCH): Do not define.
8299 Remove code conditional on it.
8300
6bdf3519
SB
83012012-07-11 Steven Bosscher <steven@gcc.gnu.org>
8302
8303 * c-gimplify.c: Do not include basic-block.h.
8304 * c-common.c: Do not include linfuncs.h.
8305
532aafad
SB
83062012-07-08 Steven Bosscher <steven@gcc.gnu.org>
8307
8308 * c-common.h: Include tree.h.
8309
8d0d1915
JM
83102012-07-02 Jason Merrill <jason@redhat.com>
8311
8312 PR c++/53524
8313 * c-common.c (get_priority): Call default_conversion.
8314
fbc873ad
UB
83152012-07-01 Uros Bizjak <ubizjak@gmail.com>
8316
8317 * c-pch.c (c_common_write_pch): Remove unused variables.
8318
d4a10d0a
SB
83192012-06-29 Steven Bosscher <steven@gcc.gnu.org>
8320
8321 * cppspec.c: Moved from gcc/ to here.
8322
6f3a2e23
KT
83232012-06-27 Kai Tietz <ktietz@redhat.com>
8324
8325 PR preprocessor/37215
8326 * c-ppoutput.c (preprocess_file): Check for nonempty buffer.
8327
8ca92d04
SB
83282012-06-21 Steven Bosscher <steven@gcc.gnu.org>
8329
8330 * c-common.h (c_common_print_pch_checksum): Remove.
8331 * c-pch.c: Do not include output.h.
8332 (CHECK_NO_ASM_OUT_DURING_PCH): Define and add FIXME.
8333 (asm_out_file): Define iff CHECK_NO_ASM_OUT_DURING_PCH isdefined.
8334 (asm_file_startpos): Define iff CHECK_NO_ASM_OUT_DURING_PCH is defined.
8335 (struct c_pch_header): Remove.
8336 (get_ident): Update gpch version.
8337 (pch_init): Do not print executable_checksum to asm_out_file.
8338 Do not fail if there is no asm_out_file to read back from. Set
8339 asm_file_startpos only if CHECK_NO_ASM_OUT_DURING_PCH is defined.
8340 (c_common_write_pch): Verify that nothing was written to asm_out_file
8341 since pch_init was called. Do not write a c_pch_header, and do not
8342 copy from asm_out_file to the PCH.
8343 (c_common_read_pch): Do not read a c_pch_header, and do not restore
8344 the content of asm_out_file from the PCH.
8345 (c_common_print_pch_checksum): Remove.
8346 * c-opts.c (c_common_init): Print out executable_checksum directly.
8347
70f42967
SB
83482012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8349
8350 * c-target.def (objc_declare_unresolved_class_reference,
8351 objc_declare_class_definition): Add new hooks.
8352
a8781821
SB
83532012-06-19 Steven Bosscher <steven@gcc.gnu.org>
8354
8355 * c-lex.c: Do not include output.h.
8356 (cb_ident): Try to put out .ident with targetm.asm_out.output_ident.
8357 Remove uses of ASM_OUTPUT_IDENT.
8358
9e1a8dd1
RR
83592012-06-15 Marc Glisse <marc.glisse@inria.fr>
8360
8361 PR c++/51033
8362 * c-common.h (c_build_vec_perm_expr): Move decl here.
8363 * c-common.c (c_build_vec_perm_expr): Move definition
8364 here.
8365
6f07a821
SB
83662012-06-06 Steven Bosscher <steven@gcc.gnu.org>
8367
8368 * c.opt (fconserve-space): Turn into a no-op.
8369
9faeb493 83702012-06-04 Sterling Augustine <saugustine@google.com>
c265f413
SA
8371
8372 * c-pretty-print.h (pp_c_flag_gnu_v3): New enumerator.
8373 * c-pretty-print.c (pp_c_specifier_qualifier_list): Check it at
8374 both the start and end of the function.
8375
a4b7d13c
SB
83762012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8377
8378 * c-common.c: Do not include output.h.
8379 * c-pragma.c: Likewise.
8380
c265f413
SA
83812012-06-04 Steven Bosscher <steven@gcc.gnu.org>
8382
8383 * error.c (dump_decl): Check pp_c_flag_gnu_v3.
8384 (decl_as_dwarf_string, lang_decl_dwarf_name): New functions.
8385 (lang_decl_name): Handle namespace decls.
8386
be7a421e
SB
83872012-05-31 Steven Bosscher <steven@gcc.gnu.org>
8388
8389 * c-ada-spec.c: Do not include output.h.
8390 * c-semantics.c: Likewise.
8391
65de6659
JM
83922012-05-29 Joseph Myers <joseph@codesourcery.com>
8393
8394 * c-common.c: Fix typo.
8395
ca5f4331
MM
83962012-05-29 Michael Matz <matz@suse.de>
8397
8398 * c-common.h (c_expand_decl): Remove prototype.
8399
4f7f7aca
MLI
84002012-05-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
8401
8402 * c.opt (Wmissing-braces): Use LangEnabledBy(C ObjC,Wall).
8403 * c-opts.c (c_common_handle_option): Remove code handling
8404 warn_missing_braces.
8405
4a792f9b
PC
84062012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
8407
8408 PR c++/25137
8409 * c-opts.c (c_common_handle_option): For C++ -Wall doesn't enable
8410 -Wmissing_braces.
8411
650dc14a
DS
84122012-05-22 Dodji Seketeli <dodji@redhat.com>
8413
8414 PR c++/53322
8415 * c.opt (Wunused-local-typedefs): Use EnabledBy(Wunused).
8416
9b095bf1
MLI
84172012-05-17 Manuel López-Ibáñez <manu@gcc.gnu.org>
8418
8419 * c.opt (--pedantic-errors,-pedantic-errors): Do not handle here.
8420 * c-opts.c (c_common_handle_option): Do not handle explicitly
8421 Wreturn-type, Wwrite-strings, warn_ecpp, and -pedantic-errors.
8422
0b2c4be5
DS
84232012-05-16 Dodji Seketeli <dodji@redhat.com>
8424
8425 PR preprocessor/7263
ab20d992 8426 * c-lex.c (c_lex_with_flags): Pass a virtual location to the call
0b2c4be5
DS
8427 to cpp_classify_number. For diagnostics, use the precise location
8428 instead of the global input_location.
8429
a1bde5af
PC
84302012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
8431
d02924ef 8432 PR c++/11856
a1bde5af
PC
8433 * c-common.c (shorten_compare): Check c_inhibit_evaluation_warnings.
8434
d1ede5f4
BS
84352012-05-14 Bernd Schmidt <bernds@codesourcery.com>
8436
a1bde5af 8437 * c-common.c (DEF_ATTR_STRING): Define and undefine as necessary.
d1ede5f4 8438
f2bc201f
MLI
84392012-05-14 Manuel López-Ibáñez <manu@gcc.gnu.org>
8440
8441 PR 53063
8442 * c.opt (Wc++0X-compat,Wdelete-non-virtual-dtor,Wjump-misses-init,
8443 Wreorder): Use LangEnabledBy.
8444 * c-opts.c (c_common_handle_option): Do not enable them
8445 explicitly. Call lang-specific generated functions.
8446 (c_common_post_options): Do not set them here.
8447
95744782
MLI
84482012-05-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
8449
8450 * c.opt (Wclobbered,Wempty-body,Wignored-qualifiers,
8451 Wmissing-field-initializers,Wmissing-parameter-type,
8452 Wold-style-declaration,Woverride-init): Use EnabledBy.
8453 * c-opts.c (c_common_post_options): Do not set here explicitly.
8454
7d5a5747
MLI
84552012-05-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
8456
8457 PR 53063
8458 * c-opts.c (c_common_handle_option): Use handle_generated_option
8459 to enable sub-options.
8460
5a3c9cf2
PC
84612012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
8462
8463 PR c++/53158
8464 * c-common.c (warnings_for_convert_and_check): Use warning_at.
8465
3ac8781c
RG
84662012-05-10 Richard Guenther <rguenther@suse.de>
8467
8468 * c-common.c (c_sizeof_or_alignof_type): Remove assert and
8469 adjust commentary about TYPE_IS_SIZETYPE types.
8470
1e537948
MLI
84712012-05-09 Manuel López-Ibáñez <manu@gcc.gnu.org>
8472
8473 PR c++/53261
8474 * c-common.c (warn_logical_operator): Check that argument of
8475 integer_zerop is not NULL.
8476
f2c4a785
MLI
84772012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
8478
8479 PR c/43772
8480 * c-common.c (warn_logical_operator): Do not warn if either side
8481 is already true or false.
8482
50f305ca
MLI
84832012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
8484
8485 PR c/51712
8486 * c-common.c (expr_original_type): New.
8487 (shorten_compare): Do not warn for enumeration types.
8488
0c3641b0
MLI
84892012-05-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
8490
8491 * c.opt (fpermissive): Add Var(flag_permissive).
8492
7edaa4d2
MG
84932012-04-30 Marc Glisse <marc.glisse@inria.fr>
8494
8495 PR c++/51033
8496 * c-common.c (convert_vector_to_pointer_for_subscript): New function.
8497 * c-common.h (convert_vector_to_pointer_for_subscript): Declare it.
8498
b9c8da34
DS
84992012-04-30 Dodji Seketeli <dodji@redhat.com>
8500
8501 Add -Wvarargs option
ab20d992 8502 * c.opt (Wvarargs): Define new option.
b9c8da34 8503
e6c69da0
MLI
85042012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8505
8506 * c-common.c (check_function_arguments): Replace
8507 Wmissing-format-attribute with Wsuggest-attribute=format.
8508
90137d8f
MLI
85092012-04-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
8510
8511 * c.opt (Wsuggest-attribute=format): New. Alias of
8512 Wmissing-format-attribute.
8513 * c-format.c (decode_format_type): Replace
8514 Wmissing-format-attribute with Wsuggest-attribute=format.
8515 (check_function_format): Likewise.
8516
9faeb493 85172012-04-27 Ollie Wild <aaw@google.com>
7f5f5f98
OW
8518
8519 * c-common.c: Add CPP_W_LITERAL_SUFFIX mapping.
8520 * c-opts.c (c_common_handle_option): Handle OPT_Wliteral_suffix.
8521 * c.opt: Add Wliteral-suffix.
8522
c1771a20
MLI
85232012-04-22 Manuel López-Ibáñez <manu@gcc.gnu.org>
8524
8525 PR c/44774
8526 * c.opt (Wpedantic): New.
8527 (pedantic): Alias Wpedantic.
8528 * c-opts.c (c_common_handle_option): Replace -pedantic with -Wpedantic.
8529 (c_common_post_options): Likewise.
8530 (sanitize_cpp_opts): Likewise.
8531 * c-lex.c (interpret_float): Likewise.
8532 * c-format.c (check_format_types): Likewise.
8533 * c-common.c (pointer_int_sum): Likewise.
8534 (c_sizeof_or_alignof_type): Likewise.
8535 (c_add_case_label): Likewise.
8536 (c_do_switch_warnings): Likewise.
8537 * c-pragma.c (handle_pragma_float_const_decimal64): Likewise.
8538
04b391c1
JM
85392012-04-15 Jason Merrill <jason@redhat.com>
8540
8541 PR c++/52818
8542 * c-format.c (CPLUSPLUS_STD_VER): C++11 inherits from C99.
8543 (C_STD_NAME): Distinguish between C++98 and C++11.
8544
ac868f29
EB
85452012-04-11 Eric Botcazou <ebotcazou@adacore.com>
8546
8547 PR target/52624
8548 * c-common.h (uint16_type_node): Rename into...
8549 (c_uint16_type_node): ...this.
8550 * c-common.c (c_common_nodes_and_builtins): Adjust for above renaming.
8551 * c-cppbuiltin.c (builtin_define_stdint_macros): Likewise.
8552
fd4116f4
MLI
85532012-04-10 Manuel López-Ibáñez <manu@gcc.gnu.org>
8554
8555 * c-common.c (warn_if_unused_value): Move definition to here.
8556 * c-common.h (warn_if_unused_value): Move declaration to here.
8557
573ac65e
WB
85582012-03-23 William Bader <williambader@hotmail.com>
8559
8560 * c-lex.c (c_lex_with_flags): Avoid declarations after stmts.
8561
552b8185
JM
85622012-03-20 Jason Merrill <jason@redhat.com>
8563
8564 * c-common.h (enum cxx_dialect): Add cxx1y.
8565 * c-common.c (c_common_nodes_and_builtins): Use >= for cxx_dialect
8566 test.
8567 * c-cppbuiltin.c (c_cpp_builtins): Likewise.
8568 * c-opts.c (c_common_post_options): Likewise.
8569 (set_std_cxx1y): New.
8570 (c_common_handle_option): Call it.
8571 * c.opt (-std=c++1y, -std=gnu++1y): New flags.
8572
04398fa8
PC
85732012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
8574
8575 PR c++/14710
8576 * c.opt ([Wuseless-cast]): Add.
8577
d2a12ae7
RG
85782012-03-16 Richard Guenther <rguenther@suse.de>
8579
8580 * c-pretty-print.c (pp_c_initializer_list): Adjust.
8581
a12bf402
MLI
85822012-03-15 Manuel López-Ibáñez <manu@gcc.gnu.org>
8583
8584 PR c++/44783
8585 * c.opt (ftemplate-backtrace-limit) Add.
8586
5c30094f
RO
85872012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8588
8589 * c-cppbuiltin.c (c_cpp_builtins): Remove #pragma extern_prefix
8590 handling.
8591 * c-pragma.c (handle_pragma_extern_prefix): Remove.
8592 (init_pragma): Don't register extern_prefix.
8593
21fa2faf
RG
85942012-03-12 Richard Guenther <rguenther@suse.de>
8595
8596 * c-common.c (c_common_get_narrower): Use c_common_type_for_size.
8597 (builtin_type_for_size): Likewise.
8598
e3793c6f
JJ
85992012-02-13 Jakub Jelinek <jakub@redhat.com>
8600
8601 PR c++/52215
8602 * c-common.c (sync_resolve_params): Don't decide whether to convert
8603 or not based on TYPE_SIZE comparison, convert whenever arg_type
8604 is unsigned INTEGER_TYPE.
8605
93286335
PC
86062012-02-06 Paolo Carlini <paolo.carlini@oracle.com>
8607
8608 PR c/52118
8609 * c.opt ([Wunused-local-typedefs]): Fix description.
8610
7a421706
MS
86112012-01-24 Mike Stump <mikestump@comcast.net>
8612
8613 * c-common.c (c_common_type_for_mode): Match signed/unsigned types
8614 exactly.
8615
ba9b1f11
RG
86162012-01-18 Richard Guenther <rguenther@suse.de>
8617
8618 * c-opts.c (c_common_post_options): Reset LTO flags if
8619 we are about to generate a PCH.
8620
465406be
PC
86212012-01-17 Paolo Carlini <paolo.carlini@oracle.com>
8622
8623 PR c++/51777
8624 * c-pretty-print.c (pp_c_integer_constant): For unsigned constants
8625 use pp_unsigned_wide_integer.
8626
aee15221
RG
86272012-01-10 Richard Guenther <rguenther@suse.de>
8628
8629 PR middle-end/51806
8630 * c-opts.c (c_common_handle_option): Move -Werror handling
8631 to language independent code.
8632
5720c0dc
RG
86332012-01-05 Richard Guenther <rguenther@suse.de>
8634
8635 PR middle-end/51764
8636 * c.opt (Wmudflap, fmudflap, fmudflapth, fmudflapir): Move here
8637 from common.opt.
8638
73ac190a
PC
86392011-12-30 Paolo Carlini <paolo.carlini@oracle.com>
8640
8641 PR c++/51316
8642 * c-common.c (c_sizeof_or_alignof_type): In C++ allow for alignof
8643 of array types with an unknown bound.
8644
48b0b196
JM
86452011-12-20 Joseph Myers <joseph@codesourcery.com>
8646
8647 * c-common.c (flag_isoc99): Update comment to refer to C11.
8648 (flag_isoc1x): Change to flag_isoc11.
8649 * c-common.h (flag_isoc99): Update comment to refer to C11.
8650 (flag_isoc1x): Change to flag_isoc11.
8651 * c-cppbuiltin.c (cpp_atomic_builtins): Change comment to refer to
8652 C11.
8653 * c-opts.c (set_std_c1x): Change to set_std_c11.
8654 (c_common_handle_option): Handle OPT_std_c11 and OPT_std_gnu11.
8655 Call set_std_c11.
8656 (set_std_c89, set_std_c99, set_std_c11): Use flag_isoc11.
8657 (set_std_c1): Use CLK_STDC11 and CLK_GNUC11.
8658 * c.opt (std=c1x): Change to std=c11. Document as non-draft
8659 standard.
8660 (std=c1x, std=iso9899:2011): Add as aliases of std=c11.
8661 (std=gnu1x): Change to std=gnu11. Refer to non-draft standard.
8662 (std=gnu1x): Make alias of std=gnu11.
8663
d58d6eb5
JM
86642011-12-19 Jason Merrill <jason@redhat.com>
8665
8666 PR c++/51228
8667 * c-common.c (handle_transparent_union_attribute): Check the first
8668 field if the type is complete.
8669
b3908fcc
JW
86702011-12-15 Jonathan Wakely <jwakely.gcc@gmail.com>
8671
8672 PR libstdc++/51365
8673 * c-common.c (RID_IS_FINAL): Add.
8674 * c-common.h (RID_IS_FINAL): Add.
8675
fea3ca91
IS
86762011-11-30 Iain Sandoe <iains@gcc.gnu.org>
8677
8678 * c.opt (fgnu-runtime): Provide full description.
8679 (fnext-runtime): Likewise.
8680 * c-opts.c (OPT_fgnu_runtime, OPT_fnext_runtime) Remove.
8681
62bad7cd
AM
86822011-11-28 Andrew MacLeod <amacleod@redhat.com>
8683
8684 * c-cpp-builtin.c (cpp_atomic_builtins):New. Emit all atomic
8685 predefines in one place. Add LOCK_FREE predefines.
8686 (c_cpp_builtins): Move Legacy HAVE_SYNC predefines to
8687 new func.
8688
c466c4ff
AM
86892011-11-24 Andrew MacLeod <amacleod@redhat.com>
8690
8691 PR c/51256
9faeb493 8692 * c-common.c (get_atomic_generic_size): Check for various error
c466c4ff 8693 conditions
9faeb493
UB
8694 (resolve_overloaded_atomic_exchange,
8695 resolve_overloaded_atomic_compare_exchange,
c466c4ff
AM
8696 resolve_overloaded_atomic_load, resolve_overloaded_atomic_store): Return
8697 error_mark_node for error conditions.
9faeb493 8698
a5952633
RG
86992011-11-08 Richard Guenther <rguenther@suse.de>
8700
8701 PR middle-end/51010
ab20d992 8702 * c-pretty-print.c (pp_c_expression): Handle SSA_NAMEs.
a5952633 8703
0a35513e
AH
87042011-11-07 Richard Henderson <rth@redhat.com>
8705 Aldy Hernandez <aldyh@redhat.com>
8706 Torvald Riegel <triegel@redhat.com>
8707
8708 Merged from transactional-memory.
8709
8710 * c-common.c (handle_tm_wrap_attribute,
8711 handle_tm_attribute, ignore_attribute, parse_tm_stmt_attr): New.
8712 (struct c_common_reswords): Added __transaction* keywords.
8713 (struct c_common_attribute_table): Added transaction* and tm_regparm
8714 attributes.
8715 * c-common.h: Added RID_TRANSACTION*. Added TM_ATTR* and TM_STMT*
8716 masks.
8717 (parse_tm_stmt_attr, tm_attr_to_mask, tm_mask_to_attr,
8718 find_tm_attribute): Declare.
8719
6d87092d
JM
87202011-11-07 Jason Merrill <jason@redhat.com>
8721
8722 PR c++/35688
8723 * c-common.c, c-common.h: Revert yesterday's changes.
8724
8e7860a1
JM
87252011-11-06 Jason Merrill <jason@redhat.com>
8726
8727 PR c++/35688
8728 * c-common.c (decl_has_visibility_attr): Split out from...
8729 (c_determine_visibility): ...here.
8730 * c-common.h: Declare it.
8731
d19fa6b5
JM
87322011-11-06 Joseph Myers <joseph@codesourcery.com>
8733
8734 * c-common.c (c_common_reswords): Add _Alignas and _Alignof.
8735 (c_sizeof_or_alignof_type): Diagnose alignof applied to a function
8736 type.
8737 (check_user_alignment): New. Split out of
8738 handle_aligned_attribute. Disallow integer constants with
8739 noninteger types. Conditionally allow zero.
8740 (handle_aligned_attribute): Use check_user_alignment.
8741 * c-common.h (RID_ALIGNAS, check_user_alignment): New.
8742
86951993
AM
87432011-11-06 Andrew MacLeod <amacleod@redhat.com>
8744 Richard Henderson <rth@redhat.com>
8745
8746 Merged from cxx-mem-model.
8747
8748 * c-cppbuiltin.c (c_cpp_builtins): Test both atomic and sync patterns.
9faeb493 8749 * c-common.c (sync_resolve_params, sync_resolve_return): Only tweak
86951993
AM
8750 parameters that are the same type size.
8751 (get_atomic_generic_size): New. Find size of generic
8752 atomic function parameters and do typechecking.
8753 (add_atomic_size_parameter): New. Insert size into parameter list.
8754 (resolve_overloaded_atomic_exchange): Restructure __atomic_exchange to
8755 either __atomic_exchange_n or external library call.
9faeb493 8756 (resolve_overloaded_atomic_compare_exchange): Restructure
86951993 8757 __atomic_compare_exchange to either _n variant or external library call.
9faeb493 8758 (resolve_overloaded_atomic_load): Restructure __atomic_load to either
86951993
AM
8759 __atomic_load_n or an external library call.
8760 (resolve_overloaded_atomic_store): Restructure __atomic_store to either
8761 __atomic_store_n or an external library call.
8762 (resolve_overloaded_builtin): Handle new __atomic builtins.
8763
cf9e9959
EB
87642011-11-04 Eric Botcazou <ebotcazou@adacore.com>
8765
8766 PR c++/50608
8767 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Call fold_offsetof_1.
8768 (fold_offsetof_1): Make global. Remove STOP_REF argument and adjust.
8769 <INDIRECT_REF>: Return the argument.
8770 <ARRAY_REF>: Remove special code for negative offset.
8771 Call fold_build_pointer_plus instead of size_binop.
8772 (fold_offsetof): Remove STOP_REF argument and adjust.
8773 * c-common.h (fold_offsetof_1): Declare.
8774 (fold_offsetof): Remove STOP_REF argument.
8775
25339f10
JM
87762011-11-02 Paolo Carlini <paolo.carlini@oracle.com>
8777
8778 PR c++/50810
8779 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8780 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8781 Wnarrowing for C++0x and C++98.
8782 * c.opt ([Wnarrowing]): Update.
8783
89401152
PC
87842011-11-01 Paolo Carlini <paolo.carlini@oracle.com>
8785
8786 PR c++/44277
8787 * c.opt: Add Wzero-as-null-pointer-constant.
8788
97e3ad20
JM
87892011-10-31 Jason Merrill <jason@redhat.com>
8790
15694fdd
JM
8791 * c.opt (-fdeduce-init-list): Off by default.
8792
97e3ad20
JM
8793 PR c++/50920
8794 * c-common.h (cxx_dialect): Add cxx11 and cxx03.
8795 * c.opt: Add -std=c++11, -std=gnu++11, -std=gnu++03,
8796 and -Wc++11-compat.
8797 * c-opts.c (set_std_cxx11): Rename from set_std_cxx0x.
8798
fb9120e3
RAV
87992011-10-27 Roberto Agostino Vitillo <ravitillo@lbl.gov>
8800
8801 PR c++/30066
8802 * c.opt (fvisibility-inlines-hidden): Description change.
8803
3ce4f9e4
ESR
88042011-10-26 Ed Smith-Rowland <3dw4rd@verizon.net>
8805
8806 Implement C++11 user-defined literals.
8807 * c-common.c (build_userdef_literal): New.
8808 * c-common.def: New tree code.
8809 * c-common.h (tree_userdef_literal): New tree struct and accessors.
8810 * c-lex.c (interpret_float): Add suffix parm.
8811 (c_lex_with_flags): Build literal tokens.
8812
5f53c243
PC
88132011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8814
8815 PR c++/50841
8816 Revert:
8817 2011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8818
8819 PR c++/50810
8820 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8821 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8822 Wnarrowing for C++0x and C++98.
8823 * c.opt ([Wnarrowing]): Update.
8824
263734e1
PC
88252011-10-23 Paolo Carlini <paolo.carlini@oracle.com>
8826
8827 PR c++/50810
8828 * c-opts.c (c_common_handle_option): Enable -Wnarrowing as part
8829 of -Wall; include -Wnarrowing in -Wc++0x-compat; adjust default
8830 Wnarrowing for C++0x and C++98.
8831 * c.opt ([Wnarrowing]): Update.
8832
d2e312d7
PC
88332011-10-21 Paolo Carlini <paolo.carlini@oracle.com>
8834
8835 PR c++/45385
8836 * c-common.c (conversion_warning): Remove code looking for
8837 artificial operands.
8838
d17687f6
DS
88392011-10-18 Dodji Seketeli <dodji@redhat.com>
8840
8841 PR bootstrap/50760
8842 * c-lex.c (fe_file_change): Use LINEMAP_SYSP when
9faeb493 8843 !NO_IMPLICIT_EXTERN_C.
d17687f6 8844
fc8396e9
PC
88452011-10-17 Michael Spertus <mike_spertus@symantec.com>
8846
8847 * c-common.c (c_common_reswords): Add __bases,
8848 __direct_bases.
8849 * c-common.h: Add RID_BASES and RID_DIRECT_BASES.
8850
88512011-10-17 Paolo Carlini <paolo.carlini@oracle.com>
8852
8853 PR c++/50757
8854 * c.opt ([Wnonnull]): Add C++ and Objective-C++.
8855
847e697a
TT
88562011-10-15 Tom Tromey <tromey@redhat.com>
8857 Dodji Seketeli <dodji@redhat.com>
8858
8859 * c.opt (fdebug-cpp): New option.
8860 * c-opts.c (c_common_handle_option): Handle the option.
8861 * c-ppoutput.c (maybe_print_line_1): New static function. Takes an
8862 output stream in parameter. Factorized from ...
8863 (maybe_print_line): ... this. Dump location debug information when
8864 -fdebug-cpp is in effect.
8865 (print_line_1): New static function. Takes an output stream in
8866 parameter. Factorized from ...
8867 (print_line): ... here. Dump location information when -fdebug-cpp
8868 is in effect.
8869 (scan_translation_unit): Dump location information when
8870 -fdebug-cpp is in effect.
8871
92582b75
TT
88722011-10-15 Tom Tromey <tromey@redhat.com>
8873 Dodji Seketeli <dodji@redhat.com>
8874
8875 * c.opt (ftrack-macro-expansion): New option. Handle it with and
8876 without argument.
8877 * c-opts.c (c_common_handle_option)<case
8878 OPT_ftrack_macro_expansion_, case OPT_ftrack_macro_expansion>: New
8879 cases. Handle -ftrack-macro-expansion with and without argument.
8880
46427374
TT
88812011-10-15 Tom Tromey <tromey@redhat.com>
8882 Dodji Seketeli <dodji@redhat.com>
8883
8884 * c-ppoutput.c (scan_translation_unit, maybe_print_line)
8885 (print_line, cb_define, do_line_change): Adjust to avoid touching
8886 the internals of struct line_map. Use the public API instead.
8887 * c-pch.c (c_common_read_pch): Likewise.
8888 * c-lex.c (fe_file_change): Likewise.
8889
fc8396e9
PC
88902011-10-14 Paolo Carlini <paolo.carlini@oracle.com>
8891
8892 PR c++/17212
8893 * c.opt ([Wformat-zero-length]): Add C++ and Objective-C++.
8894
88952011-10-11 Paolo Carlini <paolo.carlini@oracle.com>
8896
8897 PR c++/33067
8898 * c-pretty-print.c (pp_c_floating_constant): Output
8899 max_digits10 (in the ISO C++ WG N1822 sense) decimal digits.
8900
e79983f4
MM
89012011-10-11 Michael Meissner <meissner@linux.vnet.ibm.com>
8902
8903 * c-common.c (def_builtin_1): Delete old interface with two
8904 parallel arrays to hold standard builtin declarations, and replace
8905 it with a function based interface that can support creating
8906 builtins on the fly in the future. Change all uses, and poison
8907 the old names. Make sure 0 is not a legitimate builtin index.
8908 * c-omp.c (c_finish_omp_barrier): Ditto.
8909 (c_finish_omp_taskwait): Ditto.
8910 (c_finish_omp_flush): Ditto.
8911
6637388f
TG
89122011-10-11 Tristan Gingold <gingold@adacore.com>
8913
8914 * c.opt: (fallow-parameterless-variadic-functions): New.
8915
3797cb21
DS
89162011-09-08 Dodji Seketeli <dodji@redhat.com>
8917
8918 PR c++/33255 - Support -Wunused-local-typedefs warning
8919 * c-common.h (struct c_language_function::local_typedefs): New
8920 field.
9faeb493
UB
8921 (record_locally_defined_typedef, maybe_record_typedef_use)
8922 (maybe_warn_unused_local_typedefs): Declare new functions.
3797cb21 8923 * c-common.c (record_locally_defined_typedef)
9faeb493
UB
8924 (maybe_record_typedef_use)
8925 (maybe_warn_unused_local_typedefs): Define new functions.
3797cb21
DS
8926 * c.opt: Declare new -Wunused-local-typedefs flag.
8927
693ddb1b
EB
89282011-09-06 Eric Botcazou <ebotcazou@adacore.com>
8929
8930 PR middle-end/50266
8931 * c-common.c (c_fully_fold_internal) <ADDR_EXPR>: Fold offsetof-like
8932 computations.
8933
830c740f
RG
89342011-09-05 Richard Guenther <rguenther@suse.de>
8935
8936 * c-common.c (complete_array_type): Use ssize_int (-1) instead
8937 of integer_minus_one_node for empty array upper bounds.
8938
892a371f
DS
89392011-08-28 Dodji Seketeli <dodji@redhat.com>
8940
8941 * c-pch.c (c_common_read_pch): Call linemap_add with LC_ENTER as
8942 it's the first time it's being called on this main TU.
8943
0e3fdb48
RB
89442011-08-24 Richard Guenther <rguenther@suse.de>
8945
8946 PR c/49396
8947 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Fix conditional.
8948
89492011-08-22 Gabriel Charette <gchare@google.com>
e3dfef44
GC
8950
8951 * c-opts.c (c_finish_options): Force BUILTINS_LOCATION for tokens
8952 defined in cpp_init_builtins and c_cpp_builtins.
8953
d4a83c10
JM
89542011-08-19 Joseph Myers <joseph@codesourcery.com>
8955
8956 * c-common.c (c_common_reswords): Add __builtin_complex.
8957 * c-common.h (RID_BUILTIN_COMPLEX): New.
8958
bbceee64
JM
89592011-08-18 Joseph Myers <joseph@codesourcery.com>
8960
8961 * c-common.c (c_common_reswords): Add _Noreturn.
8962 (keyword_is_function_specifier): Handle RID_NORETURN.
8963 * c-common.h (RID_NORETURN): New.
8964
3f8257db 89652011-08-10 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
0e3a99ae
AS
8966
8967 * c-common.c (unsafe_conversion_p): New function. Check if it is
8968 unsafe to convert an expression to the type.
8969 (conversion_warning): Adjust, use unsafe_conversion_p.
8970 * c-common.h (unsafe_conversion_p): New function declaration.
8971
20906c66
JJ
89722011-08-02 Jakub Jelinek <jakub@redhat.com>
8973
8974 * c-common.h (c_finish_omp_atomic): Adjust prototype.
8975 (c_finish_omp_taskyield): New prototype.
8976 * c-omp.c (c_finish_omp_atomic): Add OPCODE, V, LHS1 and RHS1
8977 arguments. Handle OMP_ATOMIC_READ, OMP_ATOMIC_CAPTURE_OLD and
8978 OMP_ATOMIC_CAPTURE_NEW in addition to OMP_ATOMIC. If LHS1
8979 or RHS1 have side-effects, evaluate those too in the right spot,
8980 if it is a decl and LHS is also a decl, error out if they
8981 aren't the same.
8982 (c_finish_omp_taskyield): New function.
8983 * c-cppbuiltin.c (c_cpp_builtins): Change _OPENMP to 201107.
8984 * c-pragma.c (omp_pragmas): Add taskyield.
8985 * c-pragma.h (enum pragma_kind): Add PRAGMA_OMP_TASKYIELD.
8986 (enum pragma_omp_clause): Add PRAGMA_OMP_CLAUSE_FINAL and
8987 PRAGMA_OMP_CLAUSE_MERGEABLE.
8988
770e5a2e
DS
89892011-07-25 Dodji Seketeli <dodji@redhat.com>
8990
8991 * c-common.h (set_underlying_type): Remove parm name from
8992 declaration.
8993
1baae426
RG
89942011-07-25 Romain Geissler <romain.geissler@gmail.com>
8995
8996 * c-pretty-print.h: Search c-common.h in c-family.
9faeb493 8997
fcb21722
JM
89982011-07-22 Jason Merrill <jason@redhat.com>
8999
76f86d00
JM
9000 PR c++/49793
9001 * c.opt (Wnarrowing): New.
9002
3a636414
JM
9003 PR c++/30112
9004 * c-common.h: Declare c_linkage_bindings.
9005 * c-pragma.c (handle_pragma_redefine_extname): Use it.
9006
fcb21722
JM
9007 PR c++/49813
9008 * c-opts.c (set_std_cxx0x): Set flag_isoc94 and flag_isoc99.
9009 * c-pretty-print.c (pp_c_cv_qualifiers): Check c_dialect_cxx as well
9010 as flag_isoc99 for 'restrict'.
9011 (pp_c_specifier_qualifier_list): Likewise for _Complex.
9012
02614448
ILT
90132011-07-21 Ian Lance Taylor <iant@google.com>
9014
9015 PR middle-end/49705
9016 * c-common.c (c_disable_warnings): New static function.
9017 (c_enable_warnings): New static function.
9018 (c_fully_fold_internal): Change local unused_p to bool. Call
9019 c_disable_warnings and c_enable_warnings rather than change
9020 c_inhibit_evaluation_warnings.
9021
34429675
JM
90222011-07-20 Jason Merrill <jason@redhat.com>
9023
9024 PR c++/6709 (DR 743)
9025 PR c++/42603 (DR 950)
9026 * c-common.h (CPP_KEYWORD, CPP_TEMPLATE_ID): Move from cp/parser.h.
9027 (CPP_NESTED_NAME_SPECIFIER, N_CP_TTYPES): Likewise.
9028 (CPP_DECLTYPE): New.
9029 * c-common.c (c_parse_error): Handle CPP_DECLTYPE.
9030
5d49b6a7
RG
90312011-07-19 Richard Guenther <rguenther@suse.de>
9032
9033 * c-common.c (pointer_int_sum): Use fold_build_pointer_plus.
9034 * c-omp.c (c_finish_omp_for): Likewise.
9035
e84a58ff
EB
90362011-07-12 Eric Botcazou <ebotcazou@adacore.com>
9037
9038 * c-ada-spec.c (dump_nested_types): Put semi-colon after empty loop
9039 body on the next line.
9040
329af3c7
JM
90412011-07-08 Jason Merrill <jason@redhat.com>
9042
4063e61b
JM
9043 PR c++/45437
9044 * c-omp.c (check_omp_for_incr_expr): Handle preevaluation.
9045
329af3c7
JM
9046 PR c++/49673
9047 * c-common.c (c_apply_type_quals_to_decl): Don't check
9048 TYPE_NEEDS_CONSTRUCTING.
9049
1a072294
RG
90502011-07-06 Richard Guenther <rguenther@suse.de>
9051
9052 * c-common.c (c_common_nodes_and_builtins):
9053 Merge calls to build_common_tree_nodes and build_common_tree_nodes_2.
9054
fce5dddd
RG
90552011-07-05 Richard Guenther <rguenther@suse.de>
9056
9057 * c-common.c (c_common_nodes_and_builtins): Build all common
9058 tree nodes first.
9059
45d439ac
JJ
90602011-06-27 Jakub Jelinek <jakub@redhat.com>
9061
56300785
JJ
9062 * c-common.h (c_tree_chain_next): New static inline function.
9063
45d439ac
JJ
9064 * c-common.c (check_builtin_function_arguments): Handle
9065 BUILT_IN_ASSUME_ALIGNED.
9066
e0a8ecf2
AM
90672011-06-21 Andrew MacLeod <amacleod@redhat.com>
9068
9069 * c-common.c: Add sync_ or SYNC__ to builtin names.
9070 * c-omp.c: Add sync_ or SYNC__ to builtin names.
dfb43cd5
PV
9071
90722011-06-20 Pierre Vittet <piervit@pvittet.com>
9073
9074 * c-pragma.h (pragma_handler_1arg, pragma_handler_2arg): New
9075 handler.
9076 (gen_pragma_handler): New union.
9077 (internal_pragma_handler): New type.
9078 (c_register_pragma_with_data)
9079 (c_register_pragma_with_expansion_and_data): New functions.
9080
9081 * c-pragma.c (registered_pragmas, c_register_pragma_1)
9082 (c_register_pragma, c_register_pragma_with_expansion)
9083 (c_invoke_pragma_handler): Changed to work with
9084 internal_pragma_handler.
9085 (c_register_pragma_with_data)
9086 (c_register_pragma_with_expansion_and_data): New functions.
9087
677f3fa8
JM
90882011-06-14 Joseph Myers <joseph@codesourcery.com>
9089
9090 * c-common.c: Include common/common-target.h.
9091 (handle_section_attribute): Use
9092 targetm_common.have_named_sections.
9093 * c-cppbuiltin.c: Include common/common-target.h.
9094 (c_cpp_builtins): Use targetm_common.except_unwind_info.
9095
d7fc8c14
RG
90962011-06-10 Richard Guenther <rguenther@suse.de>
9097
9098 * c-pretty-print.c (pp_c_type_specifier): Use pp_c_identifier
9099 to print a IDENTIFIER_NODE.
9100
10e48e39
RO
91012011-06-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
9102 Joseph Myers <joseph@codesourcery.com>
9103
9104 * c.opt (fbuilding-libgcc): New option.
9105 * c-cppbuiltin.c (c_cpp_builtins): Define
9106 __LIBGCC_TRAMPOLINE_SIZE__ if flag_building_libgcc.
9107
6976ae51
JM
91082011-06-07 Jason Merrill <jason@redhat.com>
9109
3ff60975
JM
9110 * c-common.c (max_tinst_depth): Lower default to 900.
9111
6976ae51
JM
9112 * c-format.c (gcc_cxxdiag_char_table): Add 'S' format.
9113
009db074
RG
91142011-06-07 Richard Guenther <rguenther@suse.de>
9115
9116 * c-common.c (c_common_nodes_and_builtins): Do not set
9117 size_type_node or call set_sizetype.
9118
b4592b92
DS
91192011-06-07 Dodji Seketeli <dodji@redhat.com>
9120
9121 PR debug/49130
9122 * c-pretty-print.c (pp_c_integer_constant): Consider the canonical
9faeb493 9123 type when using pointer comparison to compare types.
b4592b92 9124
014ab419
JW
91252011-06-02 Jonathan Wakely <jwakely.gcc@gmail.com>
9126
9127 * c.opt: Add -Wdelete-non-virtual-dtor.
9128 * c-opts.c (c_common_handle_option): Include it in -Wall.
9129
4f60111f
NF
91302011-05-30 Nathan Froyd <froydnj@gcc.gnu.org>
9131
9132 PR bootstrap/49190
9133
9134 Revert:
9135 2011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9136
9137 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9138 not tree_common.
9139
4cc4f2f4
JJ
91402011-05-27 Jakub Jelinek <jakub@redhat.com>
9141
9142 PR c++/49165
9143 * c-common.c (c_common_truthvalue_conversion) <case COND_EXPR>: For
9144 C++ don't call c_common_truthvalue_conversion on void type arms.
9145
38e01f9e
NF
91462011-05-27 Nathan Froyd <froydnj@codesourcery.com>
9147
9148 * c-common.h (struct stmt_tree_s) [x_cur_stmt_list]: Change to a VEC.
9149 (stmt_list_stack): Define.
9150 (cur_stmt_list): Adjust for new type of x_cur_stmt_list.
9151 * c-semantics.c (push_stmt_list, pop_stmt_list): Likewise.
9152
92e948a8
NF
91532011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9154
9155 * c-common.c (warning_candidate_p): Check for BLOCKs.
9156
a2fc3e63
NF
91572011-05-26 Nathan Froyd <froydnj@codesourcery.com>
9158
9159 * c-common.h (struct c_common_identifier): Inherit from tree_typed,
9160 not tree_common.
9161
0957c029
JJ
91622011-05-25 Jakub Jelinek <jakub@redhat.com>
9163
9164 * c-common.c (def_fn_type): Remove extra va_end.
9165
828fb3ba
JM
91662011-05-23 Jason Merrill <jason@redhat.com>
9167
9168 PR c++/48106
9169 * c-common.c (c_common_get_narrower): New.
9170 (shorten_binary_op, shorten_compare, warn_for_sign_compare): Use it.
9171
dde05067
NF
91722011-05-23 Nathan Froyd <froydnj@codesourcery.com>
9173
9174 * c-common.h (check_function_arguments): Tweak prototype of
9175 check_function_arguments.
9176 * c-common.c (check_function_arguments): Likewise. Adjust
9177 calls to check_function_nonnull, check_function_format, and
9178 check_function_sentinel.
9179 (check_function_sentinel): Take a FUNCTION_TYPE rather than
9180 separate attributes and typelist arguments. Use
9181 FOREACH_FUNCTION_ARGS to iterate over argument types.
9182
3c0d13bf
PC
91832011-05-15 Paolo Carlini <paolo.carlini@oracle.com>
9184
9185 * c-common.c (c_common_reswords): Reorder.
9186 * c-common.h (rid): Likewise.
9187
8242dd04
NF
91882011-05-10 Nathan Froyd <froydnj@codesourcery.com>
9189
9190 * c-common.c (def_fn_type): Don't call build_function_type, call
9191 build_function_type_array or build_varargs_function_type_array
9192 instead.
9193 (c_common_nodes_and_builtins): Likewise.
9194
3d528853
NF
91952011-05-05 Nathan Froyd <froydnj@codesourcery.com>
9196
9197 * c-common.c (c_add_case_label): Omit the loc argument to
9198 build_case_label.
9199 * c-common.h (build_case_label): Remove.
9200 * c-semantics.c (build_case_label): Remove.
9201
a04a722b
JM
92022011-05-05 Joseph Myers <joseph@codesourcery.com>
9203
9204 * c-objc.h (objc_start_method_definition): Update prototype.
9205 * stub-objc.c (objc_start_method_definition): Add extra parameter.
9206
e19a18d4
NF
92072011-05-04 Nathan Froyd <froydnj@codesourcery.com>
9208
9209 * c-common.c (check_main_parameter_types): Reindent. Don't use
9210 TYPE_ARG_TYPES directly.
9211 (handle_nonnull_attribute): Likewise.
9212 (sync_resolve_params): Likewise.
9213 * c-format.c (handle_format_arg_attribute): Likewise. Adjust call
9214 to check_format_string.
9215 (handle_format_attribute): Likewise.
9216 (check_format_string): Take a function type to examine instead of
9217 a type list. Use a function_arg_iterator to step through argument
9218 types.
9219
c62c040f
RG
92202011-05-04 Richard Guenther <rguenther@suse.de>
9221
9222 * c-common.c (fix_string_type): Use size_int for index type bounds.
9223 (start_fname_decls): Do not pass NULL to build_int_cst.
9224 (c_init_attributes): Likewise.
9225 * c-lex.c (c_lex_with_flags): Likewise.
9226
c12ff9d8
JM
92272011-04-27 Jason Merrill <jason@redhat.com>
9228
9229 * c-common.c (make_tree_vector_from_list): New.
9230 * c-common.h: Declare it.
9231
304dfbe3
RG
92322011-04-26 Richard Guenther <rguenther@suse.de>
9233
9234 PR preprocessor/48248
9235 * c-ppoutput.c (maybe_print_line): Always optimize newlines
9236 for output size with -P.
9237
3c0d13bf
PC
92382011-04-25 Paolo Carlini <paolo.carlini@oracle.com>
9239
9240 * c-common.c (struct c_common_resword): Add __underlying_type.
9241 * c-common.h (enum rid): Add RID_UNDERLYING_TYPE.
9242
04695783
JM
92432011-04-20 Jim Meyering <meyering@redhat.com>
9244
9245 * c-format.c (init_dollar_format_checking): Remove useless
9246 if-before-free.
9247
0dc33c3c
NP
92482011-04-15 Nicola Pero <nicola.pero@meta-innovation.com>
9249
9250 * c-objc.h (objc_get_interface_ivars): Removed.
3c0d13bf 9251 (objc_detect_field_duplicates): New.
0dc33c3c 9252 * stub-objc.c: Likewise.
3c0d13bf 9253
c59633d9
NP
92542011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9255
9256 * stub-objc.c (objc_declare_protocols): Renamed to
9257 objc_declare_protocol.
9258 * c-objc.h: Likewise.
3c0d13bf 9259
32dabdaf
NP
92602011-04-14 Nicola Pero <nicola.pero@meta-innovation.com>
9261
9262 * stub-objc.c (objc_declare_class): Updated argument name.
9263
81f653d6
NF
92642011-04-12 Nathan Froyd <froydnj@codesourcery.com>
9265
9266 * c-common.h (c_common_init_ts): Declare.
9267 * c-common.c (c_common_init_ts): Define.
9268
eb345401
NP
92692011-04-12 Nicola Pero <nicola.pero@meta-innovation.com>
9270
9271 * c-objc.h (objc_build_message_expr): Updated prototype.
9272 * stub-objc.c (objc_build_message_expr): Likewise.
9faeb493 9273
a358e188
MJ
92742011-04-12 Martin Jambor <mjambor@suse.cz>
9275
9276 * c-gimplify.c (c_genericize): Call cgraph_get_create_node instead
9277 of cgraph_node.
9278
e6313a78
RG
92792011-04-11 Richard Guenther <rguenther@suse.de>
9280
9281 * c-common.c (complete_array_type): Build a range type of
9282 proper type.
9283
dcf0c47e
NF
92842011-04-08 Nathan Froyd <froydnj@codesourcery.com>
9285
9286 * c-common.c (handle_sentinel_attribute): Don't use TYPE_ARG_TYPES.
9287 (handle_type_generic_attribute): Likewise.
9288
1ee44b26
JM
92892011-04-07 Jason Merrill <jason@redhat.com>
9290
9291 PR c++/48450
9292 * c-common.c (c_common_truthvalue_conversion): Don't ignore
9293 conversion from C++0x scoped enum.
9294
acce4e77
JM
92952011-04-06 Joseph Myers <joseph@codesourcery.com>
9296
9297 * c-target-def.h: New file.
9298 * c-target.def: New file.
9299 * c-target.h: New file.
9300 * c-common.c (targetcm): Don't define here.
9301 * c-common.h (default_handle_c_option): Declare.
9302 * c-format.c: Include c-target.h instead of target.h.
9303 * c-opts.c: Include c-target.h instead of target.h. Explicitly
9304 include tm.h.
9305 (default_handle_c_option): Move from targhooks.c.
9306
e2eefb55
JJ
93072011-03-29 Jakub Jelinek <jakub@redhat.com>
9308
9309 PR preprocessor/48248
9310 * c-ppoutput.c (print): Add src_file field.
9311 (init_pp_output): Initialize it.
9312 (maybe_print_line): Don't optimize by adding up to 8 newlines
9313 if map->to_file and print.src_file are different file.
9314 (print_line): Update print.src_file.
9315
ba78087b
KT
93162011-03-25 Kai Tietz <ktietz@redhat.com>
9317
9318 * c-ada-spec.c (compare_comment): Use filename_cmp
9319 instead of strcmp for filename.
9320
0edf1bb2
JL
93212011-03-25 Jeff Law <law@redhat.com>
9322
adfac8df 9323 * c-common.c (def_fn_type): Add missing va_end.
0edf1bb2 9324
c7dc8804
JM
93252011-03-25 Jason Merrill <jason@redhat.com>
9326
9327 * c.opt: Add -std=c++03.
9328
d1d879b1
EB
93292011-03-22 Eric Botcazou <ebotcazou@adacore.com>
9330
9331 * c-ada-spec.c (dump_ada_template): Skip non-class instances.
9332
3f8257db 93332011-03-17 Kai Tietz <ktietz@redhat.com>
62d784f7
KT
9334
9335 PR target/12171
5050afdf
KT
9336 * c-pretty-print.c (pp_c_specifier_qualifier_list):
9337 Display allowed attributes for function pointer types.
9338 (pp_c_attributes_display): New function to display
9339 attributes having affects_type_identity flag set to true.
9340 * c-pretty-print.h (pp_c_attributes_display): New prototype.
9341
62d784f7
KT
9342 * c-common.c (c_common_attribute_table):
9343 Add new element.
9344 (c_common_format_attribute_table): Likewise.
9345
82d37118
JM
93462011-03-18 Jason Merrill <jason@redhat.com>
9347
49a000c3
JM
9348 * c.opt (fconstexpr-depth): Add Var(max_constexpr_depth).
9349 * c-common.h: Don't declare it here.
9350 * c-common.c: Or define it here.
9351 * c-opts.c (c_common_handle_option): Or set it here.
9352
82d37118
JM
9353 PR c++/35315
9354 * c-common.c (handle_transparent_union_attribute): Don't
9355 make a duplicate type in C++.
9356
17bc631c
JM
93572011-03-15 Jason Merrill <jason@redhat.com>
9358
9359 * c-common.c (max_constexpr_depth): New.
9360 * c-common.h: Declare it.
9361 * c-opts.c (c_common_handle_option): Set it.
9362 * c.opt (fconstexpr-depth): New option.
9363
1b9b91a6
JM
93642011-03-11 Jason Merrill <jason@redhat.com>
9365
f231b5ff
JM
9366 * c-common.c (attribute_takes_identifier_p): Add missing const.
9367
1b9b91a6
JM
9368 PR c++/46803
9369 * c-common.c (attribute_takes_identifier_p): Assume that an
9370 unknown attribute takes an identifier.
9371
a19e4d44
NF
93722011-03-07 Nathan Froyd <froydnj@codesourcery.com>
9373
9374 PR c/47786
9375 * c-common.c (c_type_hash): Call list_length instead of iterating
9376 through DECL_CHAIN. Rename 'i' to 'n_elements'.
9377
982d62f6
JJ
93782011-02-19 Jakub Jelinek <jakub@redhat.com>
9379
9380 PR c/47809
9381 * c-common.c (c_fully_fold_internal): Handle VIEW_CONVERT_EXPR.
9382
0a256240
NP
93832011-02-17 Iain Sandoe <iains@gcc.gnu.org>
9384
9385 * c.opt (fobjc-abi-version=) New.
9386 (fobjc-nilcheck): New.
9387
ba9e6dd5
NF
93882011-02-03 Nathan Froyd <froydnj@codesourcery.com>
9389
9390 PR c++/46890
9391 * c-common.h (keyword_is_decl_specifier): Declare.
9392 * c-common.c (keyword_is_decl_specifier): Define.
9393 (keyword_is_function_specifier): New function.
9394
7273813a
JJ
93952011-01-26 Jakub Jelinek <jakub@redhat.com>
9396
9397 PR c/47473
9398 * c-lex.c (interpret_float): If CPP_N_IMAGINARY, ensure
9399 EXCESS_PRECISION_EXPR is created with COMPLEX_TYPE instead of
9400 REAL_TYPE.
9401
908ef79b
AC
94022011-01-26 Arnaud Charlet <charlet@adacore.com>
9403
9404 * c-ada-spec.c (dump_generic_ada_node): Avoid dereferencing null type.
9405
237e9384
JJ
94062011-01-26 Jakub Jelinek <jakub@redhat.com>
9407
9408 PR pch/47430
9409 * c-opts.c (c_common_post_options): Call c_common_no_more_pch
9410 after init_c_lex if pch_file is set.
9411
47ea1edf
DK
94122011-01-26 Dave Korn <dave.korn.cygwin@gmail.com>
9413
d4dba752 9414 PR c++/43601
47ea1edf
DK
9415 * c.opt (-fkeep-inline-dllexport): New switch.
9416
2aa9c6ae
RG
94172011-01-12 Richard Guenther <rguenther@suse.de>
9418
9419 PR middle-end/32511
9420 * c-common.c (handle_weak_attribute): Warn instead of error
9421 on declaring an inline function weak.
9422
7bd11157
TT
94232011-01-05 Tom Tromey <tromey@redhat.com>
9424
9425 * c-common.h (lvalue_error): Update.
9426 * c-common.c (lvalue_error): Add 'loc' argument. Call error_at,
9427 not error.
9428
0e66e494 94292010-12-29 Nicola Pero <nicola.pero@meta-innovation.com>
9faeb493 9430
b4f588c4
NP
9431 PR objc/47075
9432 * c-objc.h (objc_finish_message_expr): Added argument to
9433 prototype.
9434
f4da8dce
NF
94352010-12-22 Nathan Froyd <froydnj@codesourcery.com>
9436
9437 * c-common.c (handle_nonnull_attribute, handle_sentinel_attribute):
9438 Use prototype_p.
9439
46270f14
NP
94402010-12-18 Nicola Pero <nicola.pero@meta-innovation.com>
9441
9442 * c-objc.h (objc_maybe_warn_exceptions): New.
9faeb493 9443 * stub-objc.c (objc_maybe_warn_exceptions): New.
46270f14 9444
4816c593
NF
94452010-12-10 Nathan Froyd <froydnj@codesourcery.com>
9446
9447 * c-common.h (readonly_error): Declare.
9448 * c-common.c (readonly_error): Define.
9449
7a6daeb0
NF
94502010-12-09 Nathan Froyd <froydnj@codesourcery.com>
9451
9452 * c-common.h (invalid_indirection_error): Declare.
9453 * c-common.c (invalid_indirection_error): Define.
9454
892f6119
RG
94552010-12-03 Richard Guenther <rguenther@suse.de>
9456
9457 PR c/46745
9458 * c-pretty-print.c (pp_c_postfix_expression): Handle MEM_REF.
9459 (pp_c_unary_expression): Likewise.
9460 (pp_c_expression): Likewise.
9461
6c39e757
NP
94622010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
9463
9464 * c-common.h (objc_finish_function): New.
9465 (objc_non_volatilized_type): Removed.
9466 (objc_type_quals_match): Removed.
9467 * stub-objc.c (objc_finish_function): New.
9468 (objc_non_volatilized_type): Removed.
9469 (objc_type_quals_match): Removed.
9faeb493 9470
7c475d11
JM
94712010-11-30 Joseph Myers <joseph@codesourcery.com>
9472
9473 * c-common.h (parse_optimize_options): Declare.
9474 * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c,
9475 c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h.
9476
71f3e391
JM
94772010-11-29 Joseph Myers <joseph@codesourcery.com>
9478
9479 * c-opts.c (check_deps_environment_vars): Use getenv instead of
9480 GET_ENVIRONMENT.
9481 * c-pch.c (O_BINARY): Don't define here.
9482 * c-pragma.h: Include "cpplib.h" instead of <cpplib.h>.
9483
d5fabb58
JM
94842010-11-25 Joseph Myers <joseph@codesourcery.com>
9485
9486 * c-cppbuiltin.c (c_cpp_builtins): Pass &global_options to
9487 targetm.except_unwind_info.
9488
299404a1
JM
94892010-11-23 Joseph Myers <joseph@codesourcery.com>
9490
9491 * c-opts.c (c_common_handle_option): Pass location to
9492 set_struct_debug_option.
9493
c98cd5bf
JM
94942010-11-23 Joseph Myers <joseph@codesourcery.com>
9495
9496 * c-common.c (visibility_options): Move from ../opts.c.
9497 * c-common.h (struct visibility_flags, visibility_options):
9498 Declare here.
9499 * c-opts.c (finish_options): Rename to c_finish_options.
9500 (c_common_init): Update call to finish_options.
9501
a9546771
NP
95022010-11-22 Nicola Pero <nicola.pero@meta-innovation.com>
9503
9504 PR objc/34033
9505 * c-lex.c (lex_string): Check that each string in an Objective-C
9506 string concat sequence starts with either one or zero '@', and
9507 that there are no spurious '@' signs at the end.
9508
24a57808
JM
95092010-11-20 Joseph Myers <joseph@codesourcery.com>
9510
9511 * c-pragma.c: Remove conditionals on HANDLE_PRAGMA_PACK,
9512 HANDLE_PRAGMA_PACK_PUSH_POP, HANDLE_PRAGMA_WEAK and
9513 HANDLE_PRAGMA_VISIBILITY.
9514 * c-pragma.h (HANDLE_PRAGMA_WEAK, HANDLE_PRAGMA_PACK,
9515 HANDLE_PRAGMA_VISIBILITY): Don't define.
9516 (HANDLE_SYSV_PRAGMA, HANDLE_PRAGMA_PACK_PUSH_POP): Don't test.
9517
a9aa2c3a
NF
95182010-11-20 Nathan Froyd <froydnj@codesourcery.com>
9519
9520 PR c++/16189
9521 PR c++/36888
9522 PR c++/45331
9523 * c-common.h (keyword_begins_type_specifier): Declare.
9524 (keyword_is_storage_class_specifier): Declare.
9525 (keyword_is_type_qualifier): Declare.
9526 * c-common.c (keyword_begins_type_specifier): New function.
9527 (keyword_is_storage_class_specifier): New function.
9528 (keyword_is_type_qualifier): Declare.
9529
5386338c
JM
95302010-11-19 Joseph Myers <joseph@codesourcery.com>
9531
9532 PR c/46547
9533 * c-common.c (in_late_binary_op): Define.
9534 (c_common_truthvalue_conversion): Check in_late_binary_op before
9535 calling c_save_expr.
9536 * c-common.h (in_late_binary_op): Declare.
9537
69ccdddb
JM
95382010-11-19 Joseph Myers <joseph@codesourcery.com>
9539
9540 * c-opts.c (c_common_handle_option): Update calls to
9541 set_struct_debug_option.
9542
6b192a09
NP
95432010-11-19 Nicola Pero <nicola.pero@meta-innovation.com>
9544
9545 * c-common.h (objc_declare_protocols): Added additional argument.
9546 * stub-objc.c (objc_declare_protocol): Same change.
9faeb493 9547
fb52b50a
NF
95482010-11-18 Nathan Froyd <froydnj@codesourcery.com>
9549
9550 PR c/33193
9551 * c-common.h (build_real_imag_expr): Declare.
9552 * c-semantics.c (build_real_imag_expr): Define.
9553
b37421c6
JM
95542010-11-17 Joseph Myers <joseph@codesourcery.com>
9555
9556 * c-opts.c (c_common_parse_file): Take no arguments.
9557 * c-common.h (c_common_parse_file): Update prototype.
9558
07078664
JJ
95592010-11-16 Jakub Jelinek <jakub@redhat.com>
9560
9561 PR c++/46401
9562 * c-common.c (warning_candidate_p): Don't track non-const calls
9563 or STRING_CSTs.
9564
c6a13190
ILT
95652010-11-15 Ian Lance Taylor <iant@google.com>
9566
9567 * c-lex.c (init_c_lex): Set macro debug callbacks if
9568 flag_dump_go_spec is set.
9569
925e8657
NP
95702010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
9571
9572 * c-common.h (objc_build_incr_expr_for_property_ref): New.
9573 * stub-objc.c (objc_build_incr_expr_for_property_ref): New.
9574
bb0a9581
NF
95752010-11-15 Nathan Froyd <froydnj@codesourcery.com>
9576
9577 PR preprocessor/45038
9578 * c-cppbuiltin.c (c_cpp_builtins): Use different format for C++
9579 dialects.
9580
c5fa0890
JM
95812010-11-12 Joseph Myers <joseph@codesourcery.com>
9582
9583 * c-common.h (c_family_lang_mask): Declare.
9584 * c-opts.c (c_family_lang_mask): Make extern.
9585 * c-pragma.c (handle_pragma_diagnostic): Use
9586 control_warning_option.
9587
a4d8c676
JM
95882010-11-12 Joseph Myers <joseph@codesourcery.com>
9589
9590 * c-common.c (parse_optimize_options): Update call to
9591 decode_options.
9592 * c-common.h (c_common_handle_option): Update prototype.
9593 * c-opts.c (c_common_handle_option): Take location_t parameter and
9594 pass it to other functions.
9595
f954bd2c
JM
95962010-11-11 Joseph Myers <joseph@codesourcery.com>
9597
9598 * c-opts.c (warning_as_error_callback): Remove.
9599 (c_common_initialize_diagnostics): Don't call
9600 register_warning_as_error_callback.
9601 (c_common_handle_option): Handle -Werror=normalized= here.
9602
d8a07487
JM
96032010-11-10 Joseph Myers <joseph@codesourcery.com>
9604
9605 * c-common.c (handle_mode_attribute): Use %' and word "signedness"
9606 in diagnostic.
9607 * c-opts.c (c_common_parse_file): Start diagnostics with lowercase
9608 letter.
9609 * c-pragma.c (handle_pragma_target, handle_pragma_optimize):
9610 Remove trailing '.' from diagnostics.
9611 * c.opt (Wwrite-strings_: Avoid '`' in help text.
9612
d5478783
JM
96132010-11-10 Joseph Myers <joseph@codesourcery.com>
9614
9615 * c-common.c (parse_optimize_options): Pass global_dc to
9616 decode_options.
9617 * c-opts.c (c_common_handle_option): Pass &global_options to
9618 set_Wstrict_aliasing.
9619 * c.opt (v): Don't mark Common or document here.
9620
91ebb981
IS
96212010-11-06 Iain Sandoe <iains@gcc.gnu.org>
9622
9623 PR target/44981
9624 * c-format.c (format_type): New type gcc_objc_string_format_type.
9625 (valid_stringptr_type_p): New.
9626 (handle_format_arg_attribute): Use valid_stringptr_type_p ().
9faeb493 9627 (check_format_string): Pass expected type, use
91ebb981
IS
9628 valid_stringptr_type_p (), check that the format string types are
9629 consistent with the format specification.
9630 (decode_format_attr): Warn if NSString is used outside objective-c.
9631 (format_types_orig): Add NSString.
9632 (format_name): New.
9633 (format_flags): New.
9634 (check_format_arg): Handle format strings requiring an external parser.
9635 first_target_format_type: New variable.
9636 (handle_format_attribute): Set up first_target_format_type, pass the
9637 expected format arg string type to check_format_string().
ab20d992 9638 * c-common.h (FMT_FLAG_PARSE_ARG_CONVERT_EXTERNAL): New flag.
91ebb981
IS
9639 * stub-objc.c (objc_string_ref_type_p): New.
9640 (objc_check_format_arg): New.
9641
bede2adc
NP
96422010-11-04 Nicola Pero <nicola.pero@meta-innovation.com>
9643
9faeb493 9644 Fixed using the Objective-C 2.0 dot-syntax with class names.
bede2adc
NP
9645 * c-common.h (objc_build_class_component_ref): New.
9646 * stub-objc.c (objc_build_class_component_ref): New.
9647
9a179d01
NP
96482010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9649
9650 * c.opt (Wproperty-assign-default): New option.
9651
22d8d616
NP
96522010-11-03 Nicola Pero <nicola.pero@meta-innovation.com>
9653
9654 Implemented -fobjc-std=objc1 flag.
9655 * c.opt (fobjc-std=objc1): New option.
9656
2debdb4f
NP
96572010-11-01 Nicola Pero <nicola.pero@meta-innovation.com>
9658
9659 Implemented format and noreturn attributes for Objective-C methods.
9660 * c-common.c (handle_noreturn_attribute): Recognize 'noreturn'
9661 attribute for Objective-C methods.
9662
ec52b111
JM
96632010-10-31 Jason Merrill <jason@redhat.com>
9664
9665 * c-common.c (conversion_warning, warn_for_collisions_1): Use
9666 EXPR_LOC_OR_HERE.
9667
46a88c12
NP
96682010-10-30 Nicola Pero <nicola.pero@meta-innovation.com>
9669
9670 Implemented Objective-C 2.0 @property, @synthesize and @dynamic.
9671 * c-common.h (enum rid): Removed RID_COPIES and RID_IVAR.
9672 (objc_add_property_declaration): Removed arguments for copies and
9673 ivar.
9674 (objc_build_getter_call): Renamed to
9675 objc_maybe_build_component_ref.
9676 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9677 (objc_is_property_ref): New.
9678 * c-common.c (c_common_reswords): Removed copies and ivar.
9679 * stub-objc.c (objc_add_property_declaration): Removed arguments
9680 for copies and ivar.
9681 (objc_build_getter_call): Renamed to
9682 objc_maybe_build_component_ref.
9683 (objc_build_setter_call): Renamed to objc_maybe_build_modify_expr.
9684 (objc_is_property_ref): New.
9faeb493 9685
1e4bf85b
AC
96862010-10-29 Arnaud Charlet <charlet@adacore.com>
9687 Matthew Gingell <gingell@adacore.com>
9688
9689 * c-ada-spec.c (separate_class_package): New function.
9690 (pp_ada_tree_identifier): Prefix references to C++ classes with the
9691 name of their enclosing package.
9692 (print_ada_declaration): Use separate_class_package.
9693
81f0bab2
JM
96942010-10-27 Jason Merrill <jason@redhat.com>
9695
2b08f2c5
JM
9696 * c-common.c (c_common_reswords): Add __is_literal_type.
9697 * c-common.h (enum rid): Add RID_IS_LITERAL_TYPE.
9698
81f0bab2
JM
9699 * c-common.c (check_case_value): Remove special C++ code.
9700
200290f2
NP
97012010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9702
9703 * c-common.h (enum rid): Added RID_READWRITE, RID_ASSIGN,
9704 RID_RETAIN, RID_COPY and RID_NONATOMIC. Updated RID_FIRST_PATTR
9705 and RID_LAST_PATTR.
9706 (objc_add_property_declaration): Added additional arguments.
9707 (objc_property_attribute_kind): Removed.
9708 (objc_set_property_attr): Removed.
9709 * c-common.c (c_common_reswords): Added readwrite, assign, retain,
9710 copy and nonatomic.
9711 * stub-objc.c (objc_add_property_declaration): Added additional
9712 arguments.
9713 (objc_set_property_attr): Removed.
9faeb493 9714
f614132b
NP
97152010-10-27 Nicola Pero <nicola.pero@meta-innovation.com>
9716
9717 * c-common.h (objc_add_property_variable): Renamed to
9718 objc_add_property_declaration. Added location argument.
9719 * stub-objc.c (objc_add_property_variable): Same change.
b1726d6c 9720
b8a18805
NP
97212010-10-23 Nicola Pero <nicola.pero@meta-innovation.com>
9722
9723 * c-common.h (objc_maybe_printable_name): New.
9724 * stub-objc.c (objc_maybe_printable_name): New.
9725
3f8257db
JJ
97262010-10-22 Artjoms Sinkarovs <artyom.shinakroff@gmail.com>
9727 Andrew Pinski <pinskia@gmail.com>
30cd1c5d
AS
9728
9729 * c-common.h (c_common_mark_addressable_vec): Declare.
9730 * c-common.c (c_common_mark_addressable_vec): New function.
9731
249a82c4
NP
97322010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9733
9734 * c-common.h (objc_set_method_type): Removed.
9735 (objc_add_method_declaration): Added boolean argument.
9736 (objc_start_method_definition): Same change.
9737 (objc_build_method_signature): Same change.
9738 * stub-objc.c (objc_set_method_type): Removed.
9739 (objc_add_method_declaration): Added boolean argument.
9740 (objc_start_method_definition): Same change.
9741 (objc_build_method_signature): Same change.
9742
977e30bc
NP
97432010-10-20 Nicola Pero <nicola.pero@meta-innovation.com>
9744
9745 * c-common.h (finish_file): Removed.
9746 (objc_write_global_declarations): New.
9747 * c-opts.c (c_common_parse_file): Do not call finish_file.
9748 * stub-objc.c (objc_write_global_declarations): New.
9faeb493 9749
da57d1b9
NP
97502010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9751
9752 Implemented parsing @synthesize and @dynamic for
9753 Objective-C/Objective-C++.
9754 * c-common.h (enum rid): Add RID_AT_SYNTHESIZE and RID_AT_DYNAMIC.
9755 (objc_add_synthesize_declaration): New.
9756 (objc_add_dynamic_declaration): New.
9757 * c-common.c (c_common_reswords): Add synthesize and dynamic.
9758 * stub-objc.c (objc_add_synthesize_declaration): New.
9759 (objc_add_dynamic_declaration): New.
9faeb493 9760
0069111f
MM
97612010-10-18 Michael Meissner <meissner@linux.vnet.ibm.com>
9762
9763 PR target/46041
9764 * c-cppbuiltin.c (mode_has_fma): Move function here from
9765 builtins.c. Don't use the fma optab, instead just use the
9766 HAVE_fma* macros, so that __FP_FAST_FMA* will be defined when
9767 using -save-temps.
9768
e426b47b
NP
97692010-10-18 Nicola Pero <nicola.pero@meta-innovation.com>
9770
9771 Merge from 'apple/trunk' branch on FSF servers.
0069111f 9772
3f8257db 9773 2005-11-08 Fariborz Jahanian <fjahanian@apple.com>
e426b47b 9774
9faeb493 9775 Radar 4330422
e426b47b
NP
9776 * c-common.h (objc_non_volatilized_type): New declaration
9777 * stub-objc.c (objc_non_volatilized_type): New stub.
9778
90fbfdc3
NP
97792010-10-17 Nicola Pero <nicola.pero@meta-innovation.com>
9780
e426b47b 9781 Merge from 'apple/trunk' branch on FSF servers.
90fbfdc3 9782
ab20d992 9783 2006-03-27 Fariborz Jahanian <fjahanian@apple.com>
90fbfdc3 9784
9faeb493 9785 Radar 4133425
90fbfdc3 9786 * c-common.h (objc_diagnose_private_ivar): New decl.
0069111f 9787 * stub-objc.c (objc_diagnose_private_ivar): New stub.
90fbfdc3 9788
c37d8c30
IS
97892010-10-17 Iain Sandoe <iains@gcc.gnu.org>
9790
9791 * c-common.c (c_common_reswords): Add package, RID_AT_PACKAGE.
9792 * c-common.h (enum rid): Add RID_AT_PACKAGE.
9793 (objc_ivar_visibility_kind): New enum.
9794 (objc_set_visibility): Adjust prototype to use visibility enum.
0069111f 9795 * stub-objc.c (objc_set_visibility): Adjust stub to use
c37d8c30
IS
9796 visibility enum.
9797
1b1562a5
MM
97982010-10-14 Michael Meissner <meissner@linux.vnet.ibm.com>
9799
9800 * c-cppbuiltin.c (builtin_define_float_constants): Emit
9801 __FP_FAST_FMA, __FP_FAST_FMAF, and __FP_FAST_FMAL if the machine
9802 has the appropriate fma builtins.
9803 (c_cpp_builtins): Adjust call to builtin_define_float_constants.
9804
668ea4b1
IS
98052010-10-14 Iain Sandoe <iains@gcc.gnu.org>
9806
1b1562a5 9807 merge from FSF apple 'trunk' branch.
3f8257db 9808 2006 Fariborz Jahanian <fjahanian@apple.com>
1b1562a5 9809
668ea4b1
IS
9810 Radars 4436866, 4505126, 4506903, 4517826
9811 * c-common.c (c_common_resword): Define @property and its attributes.
9812 * c-common.h: Define property attribute enum entries.
9813 (OBJC_IS_PATTR_KEYWORD): New.
9814 (objc_property_attribute_kind): New enum.
9815 Declare objc_set_property_attr (), objc_add_property_variable (),
9816 objc_build_getter_call () and objc_build_setter_call ().
9817 * stub-objc.c (objc_set_property_attr): New stub.
9818 (objc_add_property_variable): Likewise.
9819 (objc_build_getter_call): Likewise.
9820 (objc_build_setter_call) Likewise.
1b1562a5 9821
a1178b30
IS
98222010-10-13 Iain Sandoe <iains@gcc.gnu.org>
9823
1b1562a5 9824 merge from FSF apple 'trunk' branch.
ab20d992 9825 2006-04-26 Fariborz Jahanian <fjahanian@apple.com>
a1178b30
IS
9826
9827 Radar 3803157 (method attributes)
9828 * c-common.c (handle_deprecated_attribute): Recognize
9829 objc methods as valid declarations.
9830 * c-common.h: Declare objc_method_decl ().
1b1562a5 9831 * stub-objc.c (objc_method_decl): New stub.
a1178b30 9832
a75bfaa6
JM
98332010-10-08 Joseph Myers <joseph@codesourcery.com>
9834
9835 * c-common.c (parse_optimize_options): Call
9836 decode_cmdline_options_to_array_default_mask before
9837 decode_options. Update arguments to decode_options.
9838 * c-common.h (c_common_init_options_struct): Declare.
9839 * c-opts.c (c_common_init_options_struct): New. Split out from
9840 c_common_init_options.
9841
f05b9d93
NP
98422010-10-06 Nicola Pero <nicola.pero@meta-innovation.com>
9843
9844 Implemented fast enumeration for Objective-C.
9845 * c-common.h (objc_finish_foreach_loop): New.
9846 * stub-objc.c (objc_finish_foreach_loop): New.
9847
1ebe4b4f
JM
98482010-10-05 Joseph Myers <joseph@codesourcery.com>
9849
9850 * c-common.h (struct diagnostic_context): Don't declare here.
9851 (c_common_initialize_diagnostics): Declare using
9852 diagnostic_context typedef.
9853 * c-opts.c (c_common_handle_option): Pass global_dc to
9854 handle_generated_option.
9855
d4d24ba4
JM
98562010-10-04 Joseph Myers <joseph@codesourcery.com>
9857
9858 * c-opts.c (c_common_handle_option): Pass &global_options_set to
9859 handle_generated_option.
9860
478a1c5b
ILT
98612010-10-03 Ian Lance Taylor <iant@google.com>
9862
9863 * c.opt (-fplan9-extensions): New option.
9864
82a1c2fe
FXC
98652010-10-03 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
9866
9867 * c-cppbuiltin.c (define__GNUC__, builtin_define_type_precision):
9868 Remove.
9869 (c_cpp_builtins): Call functions from cppbuiltin.c instead
9870 of duplicating code.
9871
92902b1b
IS
98722010-09-30 Iain Sandoe <iains@gcc.gnu.org>
9873
9874 * c-common.c: Add two new entries for @optional
9875 and @required keywords.
9876
9877 merge from FSF 'apple/trunk' branch.
3f8257db 9878 2006-01-30 Fariborz Jahanian <fjahanian@apple.com>
92902b1b
IS
9879
9880 Radar 4386773
9881 * c-common.h (RID_AT_OPTIONAL, RID_AT_REQUIRED): Two new
9882 objective-c keywords.
9883 (objc_set_method_opt): New declaration.
9884 * stub-objc.c (objc_set_method_opt): New stub.
9faeb493 9885
46625112
JM
98862010-09-30 Joseph Myers <joseph@codesourcery.com>
9887
9888 * c-common.c (handle_optimize_attribute): Pass &global_options to
9889 cl_optimization_save and cl_optimization_restore.
9890 * c-opts.c (c_common_handle_option): Pass &global_options to
9891 handle_generated_option.
9892 * c-pragma.c (handle_pragma_diagnostic): Use option_flag_var.
9893 (handle_pragma_pop_options, handle_pragma_reset_options): Pass
9894 &global_options to cl_optimization_restore.
9895
49b91f05
NP
98962010-09-30 Nicola Pero <nicola.pero@meta-innovation.com>
9897
9898 * c-lex.c (c_lex_with_flags): Updated comments for CPP_AT_NAME
9899 Objective-C/Objective-C++ keywords.
9900
13ed556f 99012010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
a6341d57 9902
9faeb493
UB
9903 Merge from 'apple/trunk' branch on FSF servers.
9904
3f8257db 9905 2005-10-04 Fariborz Jahanian <fjahanian@apple.com>
a6341d57
NP
9906
9907 Radar 4281748
9908 * c-common.h (objc_check_global_decl): New declaration.
9909 * stub-objc.c (objc_check_global_decl): New stub.
9910
f0036cca
JM
99112010-09-29 Joseph Myers <joseph@codesourcery.com>
9912
9913 * c.opt: Don't use VarExists.
9914
e3339d0f
JM
99152010-09-29 Joseph Myers <joseph@codesourcery.com>
9916
9917 * c-common.c (c_cpp_error): Update names of diagnostic_context
9918 members.
9919 * c-cppbuiltin.c (c_cpp_builtins_optimize_pragma): Update names of
9920 cl_optimization members.
9921 * c-opts.c (warning_as_error_callback, c_common_handle_option,
9922 sanitize_cpp_opts, finish_options): Update names of cpp_options
9923 members.
9924
1973201f
NP
99252010-09-29 Nicola Pero <nicola.pero@meta-innovation.com>
9926
9927 * c-common.h (OBJC_IS_CXX_KEYWORD): New macro. Updated comments.
9928 (objc_is_reserved_word): Removed.
9929 * c-common.c: Updated comments.
9930 * c-lex.c (c_lex_with_flags): Use OBJC_IS_CXX_KEYWORD instead of
9931 objc_is_reserved_word.
9932 * stub-objc.c (objc_is_reserved_word): Removed.
9933
f7e71da5
IS
99342010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9935
9faeb493 9936 * c-common.h (objc_add_method_declaration): Adjust prototype to
f7e71da5
IS
9937 include attributes.
9938 (objc_start_method_definition): Likewise.
9939 (objc_build_keyword_decl): Likewise.
9940 * stub-objc.c:(objc_add_method_declaration): Handle attributes.
9941 (objc_start_method_definition): Likewise.
9942 (objc_build_keyword_decl): Likewise.
9943
c165dca7
IS
99442010-09-28 Iain Sandoe <iains@gcc.gnu.org>
9945
9946 * c-common.h (objc_start_class_interface): Adjust prototype.
9947 (objc_start_category_interface): Likewise.
9948 (objc_start_protocol): Likewise.
9949 * stub-objc.c (objc_start_protocol): Adjust for extra argument.
9950 (objc_start_class_interface): Likewise.
9951 (objc_start_category_interface): Likewise.
9952
7458026b
ILT
99532010-09-27 Ian Lance Taylor <iant@google.com>
9954
9955 * c-common.c (c_common_attribute_table): Add no_split_stack.
9956 (handle_no_split_stack_attribute): New static function.
9957
b581b85b
NP
99582010-09-27 Nicola Pero <nicola.pero@meta-innovation.com>
9959
9faeb493 9960 Merge from 'apple/trunk' branch on FSF servers.
b581b85b 9961
3f8257db 9962 2005-12-15 Fariborz Jahanian <fjahanian@apple.com>
b581b85b 9963
9faeb493 9964 Radar 4229905
b581b85b
NP
9965 * c-common.h (objc_have_common_type): New declaration.
9966 * stub-objc.c (objc_have_common_type): New stub.
9967
9968 2005-06-22 Ziemowit Laski <zlaski@apple.com>
9969
9970 Radar 4154928
9971 * c-common.h (objc_common_type): New prototype.
9faeb493 9972 * stub-objc.c (objc_common_type): New stub.
b581b85b 9973
46a4da10
JH
99742010-09-24 Jan Hubicka <jh@suse.cz>
9975
9976 * c-common.c (handle_leaf_attribute): New function.
9977 (struct attribute_spec c_common_att): Add leaf.
9978
e200444e
JM
99792010-09-22 Joseph Myers <joseph@codesourcery.com>
9980
9981 * c.opt (-all-warnings, -ansi, -assert, -assert=, -comments,
9982 -comments-in-macros, -define-macro, -define-macro=, -dependencies,
9983 -dump, -dump=, -imacros, -imacros=, -include, -include=,
9984 -include-barrier, -include-directory, -include-directory=,
9985 -include-directory-after, -include-directory-after=,
9986 -include-prefix, -include-prefix=, -include-with-prefix,
9987 -include-with-prefix=, -include-with-prefix-after,
9988 -include-with-prefix-after=, -include-with-prefix-before,
9989 -include-with-prefix-before=, -no-integrated-cpp,
9990 -no-line-commands, -no-standard-includes, -no-warnings, -output,
9991 -output=, -pedantic, -pedantic-errors, -preprocess,
9992 -print-missing-file-dependencies, -trace-includes, -traditional,
9993 -traditional-cpp, -trigraphs, -undefine-macro, -undefine-macro=,
9994 -user-dependencies, -verbose, -write-dependencies,
9995 -write-user-dependencies, no-integrated-cpp, traditional): New.
9996
29a80ea6
NP
99972010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
9998
9999 PR objc/23710
ac1fc2fc
NP
10000 * c-common.h (objc_start_method_definition): Return bool instead
10001 of void.
10002 * stub-objc.c (objc_start_method_definition): Return bool instead
10003 of void.
10004
100052010-09-21 Nicola Pero <nicola.pero@meta-innovation.com>
10006
10007 PR objc/25965
10008 * c-common.h (objc_get_interface_ivars): New declaration.
10009 * stub-objc.c (objc_get_interface_ivars): New stub.
29a80ea6 10010
de621752
ILT
100112010-09-15 Ian Lance Taylor <iant@google.com>
10012
10013 * c-common.c (parse_optimize_options): Do not capitalize warning
06730c5d 10014 messages. Remove period at end of warning message.
de621752 10015
ba885ec5
NS
100162010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10017
10018 * c-common.c (handle_alias_ifunc_attribute): New, broken out of ...
10019 (handle_alias_attribute): ... here.
10020 (handle_ifunc_attribute): New.
10021
c5ee1358
MM
100222010-09-06 Mark Mitchell <mark@codesourcery.com>
10023
10024 * c-common.h (do_warn_double_promotion): Declare.
10025 * c-common.c (do_warn_double_promotion): Define.
10026
0a0b3574
MM
100272010-09-05 Mark Mitchell <mark@codesourcery.com>
10028
10029 * c.opt (Wdouble-promotion): New.
10030
d1779886
JM
100312010-09-02 Joseph Myers <joseph@codesourcery.com>
10032
10033 * c.opt (falt-external-templates, fhuge-objects, fvtable-gc,
10034 fvtable-thunks, fxref): Mark no longer supported in help text.
10035
2d2bd949
JM
100362010-09-02 Joseph Myers <joseph@codesourcery.com>
10037
10038 * c.opt (Wimport, fall-virtual, falt-external-templates,
10039 fdefault-inline, fenum-int-equiv, fexternal-templates,
10040 fguiding-decls, fhonor-std, fhuge-objects, flabels-ok,
10041 fname-mangling-version-, fnew-abi, fnonnull-objects,
10042 foptional-diags, fsquangle, fstrict-prototype, fthis-is-variable,
10043 fvtable-gc, fvtable-thunks, fxref): Mark with Ignore and Warn as
10044 applicable.
10045 (fhandle-exceptions): Mark with Alias and Warn.
10046 * c-opts.c (c_common_handle_option): Don't handle options marked
10047 as ignored.
10048
5de8299c
JM
100492010-09-02 Joseph Myers <joseph@codesourcery.com>
10050
10051 * c.opt (Wcomments, Werror-implicit-function-declaration,
10052 ftemplate-depth-, std=c89, std=c9x, std=gnu89, std=gnu9x,
10053 std=iso9899:1990, std=iso9899:1999, std=iso9899:199x): Mark as
10054 aliases.
10055 * c-common.c (option_codes): Use OPT_Wcomment instead of
10056 OPT_Wcomments.
10057 * c-opts.c (warning_as_error_callback, c_common_handle_option):
10058 Don't handle options marked as aliases.
10059
0ceb0201
RG
100602010-08-25 Richard Guenther <rguenther@suse.de>
10061
10062 * c-common.c (c_common_get_alias_set): Remove special
10063 handling for pointers.
10064
ac47786e
NF
100652010-08-20 Nathan Froyd <froydnj@codesourcery.com>
10066
10067 * c-common.c: Use FOR_EACH_VEC_ELT.
10068 * c-gimplify.c: Likewise.
10069 * c-pragma.c: Likewise.
10070
c878765b
JM
100712010-08-16 Joseph Myers <joseph@codesourcery.com>
10072
10073 * c.opt (MDX): Change back to MD. Mark NoDriverArg instead of
10074 RejectDriver.
10075 (MMDX): Change back to MMD. Mark NoDriverArg instead of
10076 RejectDriver.
10077 * c-opts.c (c_common_handle_option): Use OPT_MD and OPT_MMD
10078 instead of OPT_MDX and OPT_MMDX.
10079
603349bf
JM
100802010-08-16 Joseph Myers <joseph@codesourcery.com>
10081
10082 * c.opt (MDX, MMDX, lang-asm): Mark RejectDriver.
10083
644fa7ac
JM
100842010-08-12 Joseph Myers <joseph@codesourcery.com>
10085
10086 * c.opt (MD, MMD): Change to MDX and MMDX.
10087 * c-opts.c (c_common_handle_option): Use OPT_MMD and OPT_MMDX.
10088
481e1176
JM
100892010-08-11 Joseph Myers <joseph@codesourcery.com>
10090
10091 * c-opts.c (c_common_handle_option): Call handle_generated_option
10092 instead of handle_option.
10093
ac8dc9f7
NF
100942010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10095
10096 * c-pragma.c (add_to_renaming_pragma_list): Fix call to VEC_safe_push.
10097 (maybe_apply_renaming_pragma): Delete unneeded declarations.
10098
4f8c876d
NF
100992010-08-08 Nathan Froyd <froydnj@codesourcery.com>
10100
10101 * c-pragma.c (pending_redefinition): Declare. Declare a VEC of it.
10102 (pending_redefine_extname): Change type to a VEC.
10103 (add_to_renaming_pragma_list): Update for new type of
10104 pending_redefine_extname.
ac8dc9f7 10105 (maybe_apply_renaming_pragma): Likewise.
4f8c876d 10106
3b0c690e
AC
101072010-08-04 Arnaud Charlet <charlet@adacore.com>
10108
10109 * c-ada-spec.c (dump_ada_template): Mark underlying instance type as
10110 visited.
10111 (dump_generic_ada_node): Code clean up. Use TREE_VISITED flag to
10112 decide whether a type has already been declared/seen.
10113 Do not go to the original type.
10114 (dump_nested_types): New parameter forward.
10115 Generate forward declaration if needed and mark type as visited.
10116 (print_ada_declaration): Call dump_nested_types if not already done.
10117 Mark types as visited.
10118
1890bccc
JM
101192010-08-03 Joseph Myers <joseph@codesourcery.com>
10120
10121 * c.opt (-print-pch-checksum): Remove option.
10122 * c-opts.c (c_common_handle_option): Don't handle
10123 OPT_print_pch_checksum.
10124
5f20c657
JM
101252010-07-27 Joseph Myers <joseph@codesourcery.com>
10126
10127 * c-common.h (c_common_handle_option): Update prototype and return
10128 value type.
10129 * c-opts.c (c_common_handle_option): Update prototype and return
10130 value type. Update calls to handle_option and
10131 enable_warning_as_error.
10132
f551f80c
JJ
101332010-07-27 Jakub Jelinek <jakub@redhat.com>
10134
10135 PR c/45079
10136 * c-pretty-print.c (pp_c_expression): Handle C_MAYBE_CONST_EXPR.
10137
61ff2bdc
JM
101382010-07-27 Joseph Myers <joseph@codesourcery.com>
10139
10140 * c-common.h (c_common_missing_argument): Remove.
10141 * c-opts.c (c_common_missing_argument): Remove.
10142 * c.opt (A, D, F, I, MD, MMD, MQ, MT, U, fconstant-string-class=,
10143 idirafter, imacros, include, isysroot, isystem, iquote): Add
10144 MissingArgError.
10145 * c-objc-common.h (LANG_HOOKS_MISSING_ARGUMENT): Remove.
10146
7a9bf9a4
JM
101472010-07-27 Joseph Myers <joseph@codesourcery.com>
10148
10149 * c-common.h (c_common_option_lang_mask,
10150 c_common_initialize_diagnostics, c_common_complain_wrong_lang_p):
10151 New.
10152 (c_common_init_options): Update prototype.
10153 * c-opts.c (c_common_option_lang_mask): New.
10154 (c_common_initialize_diagnostics): Split out of
10155 c_common_init_options.
10156 (accept_all_c_family_options, c_common_complain_wrong_lang_p):
10157 New.
10158 (c_common_init_options): Update prototype. Use decoded options in
10159 search for -lang-asm.
10160
910ad8de
NF
101612010-07-15 Nathan Froyd <froydnj@codesourcery.com>
10162
10163 * c-common.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
10164 * c-format.c: Likewise.
10165
718f9c0f
MLI
101662010-07-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
10167
10168 * c-common.h: Include diagnostic-core.h. Error if already
10169 included.
10170 * c-semantics.c: Do not define GCC_DIAG_STYLE here.
10171
4d451982
MLI
101722010-07-03 Manuel López-Ibáñez <manu@gcc.gnu.org>
10173
adfac8df 10174 * c-common.c (IN_GCC_FRONTEND): Do not undef.
4d451982
MLI
10175 Do not include expr.h
10176 (vector_mode_valid_p): Move here.
10177
119fe915
SB
101782010-06-21 DJ Delorie <dj@redhat.com>
10179
10180 * c-pragma.c (handle_pragma_diagnostic): Add push/pop,
10181 allow these pragmas anywhere.
10182
101832010-06-14 Jakub Jelinek <jakub@redhat.com>
10184
10185 PR bootstrap/44509
10186 * c-cppbuiltin.c: Include gt-c-family-c-cppbuiltin.h.
10187 (lazy_hex_fp_values, lazy_hex_fp_value_count): Add GTY(()) markers.
10188 (lazy_hex_fp_value, builtin_define_with_hex_fp_value): Use
10189 ggc_strdup instead of xstrdup.
10190
101912010-06-10 Jakub Jelinek <jakub@redhat.com>
10192
10193 * c-cppbuiltin.c: Include cpp-id-data.h.
10194 (lazy_hex_fp_values, lazy_hex_fp_value_count): New variables.
10195 (lazy_hex_fp_value): New function.
10196 (builtin_define_with_hex_fp_value): Provide definitions lazily.
10197
6662d794
MLI
101982010-06-30 Manuel López-Ibáñez <manu@gcc.gnu.org>
10199
10200 * c-gimplify.c: Do not include tree-flow.h
10201
38f8b050
JR
102022010-06-29 Joern Rennecke <joern.rennecke@embecosm.com>
10203
10204 PR other/44034
10205 * c-common.c: Rename targetm member:
10206 targetm.enum_va_list -> targetm.enum_va_list_p
10207
9589f23e
AS
102082010-06-28 Anatoly Sokolov <aesok@post.ru>
10209
10210 * c-common.c (shorten_compare): Adjust call to force_fit_type_double.
10211
3b06d379
SB
102122010-06-28 Steven Bosscher <steven@gcc.gnu.org>
10213
10214 * c-cppbuiltin.c: Do not include except.h.
10215
d166d4c3
AK
102162010-06-24 Andi Kleen <ak@linux.intel.com>
10217
9faeb493
UB
10218 * c-common.c (warn_for_omitted_condop): New.
10219 * c-common.h (warn_for_omitted_condop): Add prototype.
d166d4c3 10220
70cb8be6
JM
102212010-06-21 Joseph Myers <joseph@codesourcery.com>
10222
10223 * c.opt (lang-objc): Remove.
10224 * c-opts.c (c_common_handle_option): Don't handle OPT_lang_objc.
10225
a4c97feb
JR
102262010-06-21 Joern Rennecke <joern.rennecke@embecosm.com>
10227
10228 * c-opts.c: Include "tm_p.h".
10229
6e2f1956
JM
102302010-06-20 Joseph Myers <joseph@codesourcery.com>
10231
10232 * c-common.c (parse_optimize_options): Update call to
10233 decode_options.
10234
bc87224e
NF
102352010-06-18 Nathan Froyd <froydnj@codesourcery.com>
10236
10237 * c-common.c (record_types_used_by_current_var_decl): Adjust for
10238 new type of types_used_by_cur_var_decl.
10239
b49cf425
JR
102402010-06-17 Joern Rennecke <joern.rennecke@embecosm.com>
10241
10242 PR bootstrap/44512
10243 * c-cppbuiltin.c (builtin_define_with_hex_fp_value): Add cast
10244 for C++ standard compliance.
10245
59f9c2ed
JM
102462010-06-16 Jason Merrill <jason@redhat.com>
10247
10248 * c.opt: Add -Wnoexcept.
10249
33766b66
RG
102502010-06-16 Richard Guenther <rguenther@suse.de>
10251
10252 PR c/44555
10253 * c-common.c (c_common_truthvalue_conversion): Remove
10254 premature and wrong optimization concering ADDR_EXPRs.
10255
eff7e30c
AC
102562010-06-15 Arnaud Charlet <charlet@adacore.com>
10257
10258 * c-ada-spec.c (dump_sloc): Remove column info.
10259 (is_simple_enum): New function.
10260 (dump_generic_ada_node, print_ada_declaration): Map C enum types to Ada
10261 enum types when relevant.
10262
6312e84d
MLI
102632010-06-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
10264
9faeb493 10265 * c-common.c (conversion_warning): Warn at expression
6312e84d
MLI
10266 location.
10267
1cb42611
JM
102682010-06-10 Joseph Myers <joseph@codesourcery.com>
10269
10270 * c-opts.c (c_common_handle_option): Don't handle
10271 OPT_fshow_column.
10272
a9429e29
LB
102732010-06-08 Laurynas Biveinis <laurynas.biveinis@gmail.com>
10274
10275 * c-pragma.c (push_alignment): Use typed GC allocation.
10276 (handle_pragma_push_options): Likewise.
10277
10278 * c-common.c (parse_optimize_options): Likewise.
10279
10280 * c-common.h (struct sorted_fields_type): Add variable_size GTY
10281 option.
10282
5498f011
JM
102832010-06-07 Joseph Myers <joseph@codesourcery.com>
10284
10285 * c-common.c (flag_preprocess_only, flag_undef, flag_no_builtin,
10286 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10287 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10288 flag_signed_bitfields, warn_strict_null_sentinel,
10289 flag_nil_receivers, flag_zero_link, flag_replace_objc_classes,
10290 flag_gen_declaration, flag_no_gnu_keywords,
10291 flag_implement_inlines, flag_implicit_templates,
10292 flag_implicit_inline_templates, flag_optional_diags,
10293 flag_elide_constructors, flag_default_inline, flag_rtti,
10294 flag_conserve_space, flag_access_control, flag_check_new,
10295 flag_new_for_scope, flag_weak, flag_working_directory,
10296 flag_use_cxa_atexit, flag_use_cxa_get_exception_ptr,
10297 flag_enforce_eh_specs, flag_threadsafe_statics,
10298 flag_pretty_templates): Remove.
10299 * c-common.h (flag_preprocess_only, flag_nil_receivers,
10300 flag_objc_exceptions, flag_objc_sjlj_exceptions, flag_zero_link,
10301 flag_replace_objc_classes, flag_undef, flag_no_builtin,
10302 flag_no_nonansi_builtin, flag_short_double, flag_short_wchar,
10303 flag_lax_vector_conversions, flag_ms_extensions, flag_no_asm,
10304 flag_const_strings, flag_signed_bitfields, flag_gen_declaration,
10305 flag_no_gnu_keywords, flag_implement_inlines,
10306 flag_implicit_templates, flag_implicit_inline_templates,
10307 flag_optional_diags, flag_elide_constructors, flag_default_inline,
10308 flag_rtti, flag_conserve_space, flag_access_control,
10309 flag_check_new, flag_new_for_scope, flag_weak,
10310 flag_working_directory, flag_use_cxa_atexit,
10311 flag_use_cxa_get_exception_ptr, flag_enforce_eh_specs,
10312 flag_threadsafe_statics, flag_pretty_templates,
10313 warn_strict_null_sentinel): Remove.
10314 * c.opt (E, Wstrict-null-sentinel, faccess-control, fasm,
10315 fbuiltin, fcheck-new, fconserve-space, felide-constructors,
10316 fenforce-eh-specs, ffor-scope, fgnu-keywords, fimplement-inlines,
10317 fimplicit-inline-templates, fimplicit-templates,
10318 flax-vector-conversions, fms-extensions, fnil-receivers,
10319 fnonansi-builtins, fpretty-templates, freplace-objc-classes,
10320 frtti, fshort-double, fshort-enums, fshort-wchar,
10321 fsigned-bitfields, fsigned-char, fstats, fthreadsafe-statics,
10322 funsigned-bitfields, funsigned-char, fuse-cxa-atexit,
10323 fuse-cxa-get-exception-ptr, fweak, fworking-directory, fzero-link,
10324 gen-decls, undef): Use Var.
10325 (fdefault-inline, foptional-diags): Document as doing nothing.
10326 * c-opts.c (c_common_handle_option): Remove cases for options now
10327 using Var. Mark ignored options as such.
10328
39dabefd
SB
103292010-06-05 Steven Bosscher <steven@gcc.gnu.org>
10330
9faeb493 10331 * c-common.c: Moved to here from parent directory.
39dabefd
SB
10332 * c-common.def: Likewise.
10333 * c-common.h: Likewise.
10334 * c-cppbuiltin.c: Likewise.
10335 * c-dump.c: Likewise.
10336 * c-format.c: Likewise.
10337 * c-format.h : Likewise.
10338 * c-gimplify.c: Likewise.
10339 * c-lex.c: Likewise.
10340 * c-omp.c: Likewise.
10341 * c.opt: Likewise.
10342 * c-opts.c: Likewise.
10343 * c-pch.c: Likewise.
10344 * c-ppoutput.c: Likewise.
10345 * c-pragma.c: Likewise.
10346 * c-pragma.h: Likewise.
10347 * c-pretty-print.c: Likewise.
10348 * c-pretty-print.h: Likewise.
10349 * c-semantics.c: Likewise.
10350 * stub-objc.c: Likewise.
10351
10352 * c-common.c: Include gt-c-family-c-common.h.
10353 * c-pragma.c: Include gt-c-family-c-pragma.h.
10354\f
a5544970 10355Copyright (C) 2010-2019 Free Software Foundation, Inc.
39dabefd
SB
10356
10357Copying and distribution of this file, with or without modification,
10358are permitted in any medium without royalty provided the copyright
10359notice and this notice are preserved.